The Emacs *‍Scratch*‍ Buffer

Many people consider the Emacs *‍scratch*‍ buffer mysterious. This is true even though, by default, it includes a message telling you what to use it for. I like it and use it often. Others, not so much.

Despite that default message, I never use the *‍scratch*‍ buffer for notes (I use Org capture for that sort of thing) but I use it all the time for trying out a bit of Elisp or writing a function for my init.el file. It is true, though, that the majority of Emacs users don’t write in Emacs Lisp and really have no use for the *‍scratch*‍ buffer.

Most of us know that you can eliminate or change the message in the *‍scratch*‍ buffer but that doesn’t address any real problems. It is Emacs, though, so of course you can configure more than just the message. Bozhidar Batsov over at Emacs Redux has a nice post that shows you how to configure the default mode of the *‍scratch*‍ buffer. Thus, to use Batsov’s example, if you’re a Ruby programmer you can configure the *‍scratch*‍ buffer to use ruby-mode as it’s default mode.

I’m happy with having the *‍scratch*‍ buffer come up in Emacs Lisp mode but Batsov’s post may help make it more useful to others who aren’t Elisp programmers.

Posted in General | Tagged | 1 Comment

Speaking of Logical Conclusions

Yesterday, I wrote about the logical conclusion of government surveillance in democracies. If you’re wondering what the end result looks like in the large, here’s the answer.

The most horrifying part of the linked story is:

  1. Singapore’s program is modeled on a proposed U.S. program (Total Information Awareness) that was too extreme even for congress. It was aborted in the U.S., although parts were secretly resurrected as other separate programs.
  2. Western security services have traveled to Singapore to study the system and, presumably, mine it for ideas.
Posted in General | Tagged | Leave a comment

Emacs in a Year

Chen Bin, who you may recognize from the Emacs and ErgoEmacs Google+ communities or from his blog, has an interesting essay on GitHub about how to master Emacs in a year. The essay is really the steps that Bin followed when he was learning Emacs. He has a lot of good advice and it’s well worth giving it a read, especially if you’re an Emacs n00b.

Old hands may or may not agree with everything he says but it’s all reasonable advice. He lists some good resources to help the beginner get up to speed. I’m always happy to see articles like this. They spread the word and help beginners learn about the glories of Emacs.

Posted in General | Tagged | Leave a comment

The Logical Conclusion

I’ve been writing, recently, about surveillance abuses in the United States. Just in case my European pals are imagining that this is an NSA problem that mainly concerns America with a few residual casualties in Europe, consider this logical conclusion of an out-of-control surveillance establishment.

The UK House of Lords has issued a report recommending that steps be taken to end on-line anonymity. Forget for a moment how unenforceable and silly this idea is. It represents an end goal—a logical conclusion—for those who believe they have the right to monitor everything everyone does. Just think how much easier it would be if only we could identify any actor on the Internet and monitor what they’re doing. It’s almost as if they hadn’t read the quintessential British warning about such things.

Posted in General | Tagged | Leave a comment

A Medal for Edward Snowden

Jon Evans over at TechCrunch makes the case that America should give Edward Snowden a medal. To many, of course, that’s a non-starter; Snowden is the ultimate traitor doing his best to harm his country. Cooler heads, including Evans, are asking which enemy, exactly, did he aid if he is to deserve the traitor epithet.

How long, Evans wonders, should American authoritarians have carte blanche to do whatever they want in the sacred name of national security? He’s got a point. After a while, all that protecting does more to harm the nation than the enemies we are worried about. Those of a certain age will remember the Vietnam quote attributed to an American officer that they must destroy the village to save it.

In Evans estimation, Snowden’s revelations—even if we stipulate for the sake of argument that we was aiding some enemy—has done far more good than harm. He believes Snowden helped rescue our democracy before the government could destroy it in order to save it. As yesterday’s post makes clear, we have already traveled a good distance down the road of destruction. Our security apparatus apparently feels—in the name of national security, of course—that it is appropriate to spy on the Senate, who are, after all, our elected representatives.

We wouldn’t know any of this if it weren’t for Edward Snowden. I agree with Evans: he deserves a medal.

Posted in General | Tagged | Leave a comment

Spying on the Senate

Last March, I wrote about revelations that the CIA was spying on the U.S. Senate. At the time, CIA head John Brennan denied the allegation and heaped scorn on the very idea. Now, Brennan has admitted that, well yes, they may have done that after all.

The Senate, of course, is beside itself with outrage. What was all part of keeping us safe when it was done to citizens at large, is suddenly a crime of the very worst sort. Senators, The New York Times, and others have called for Brennan’s head. I’m fine with someone finally paying a price for the wholesale violations of the Fourth Amendment but I do wish more than a handful of Senators would have been outraged before it became clear that they, too, were victims.

Sadly, it’s hard, at this point, to hold much hope that those responsible for these crimes will ever be held to account. The Senate will make sure that they regain their immunity, perhaps even throwing Brennan overboard, but will be only too happy for the rest of us to have our private digital information looted in a systematic and comprehensive manner.

Posted in General | Tagged | Leave a comment

Programmers’ Fonts

The other day I wrote about Emacs themes. It’s amazing how much difference a well chosen theme can make to your peace of mind and productivity. Just as important is the choice of a programming font. Fortunately, Emacs can support just about any font and can even look elsewhere for missing glyphs. It’s really just a matter of deciding on a font, installing it, and telling Emacs to use it.

Not all that long ago, monospaced fonts weren’t antialiased and were really ugly. Now there are several good, free fonts to choose from. Jacob Gube over at Six Revisions has a great article on 10 excellent free programmers’ fonts. Each font has a screen shot and additional information, including where to get it.

I’m a long-time user of Inconsolata, which is one of the fonts he lists, and am very happy with it. My only complaint with it is that the l (ell) and 1 (one) are a bit hard to tell apart. Some of the other fonts do better. Source Code Pro, for example has a very distinctive ell that can’t be mistaken for a one. Others have a distinctive one with an exaggerated serif at the top. Oddly, the otherwise excellent Droid Sans Mono has a zero and oh that are very difficult to tell apart unless you see them together.

If you’re looking for a new font or you just want to see some of the other choices, take a look at Gube’s article. It’s a nice set of choices and is sure to have something for just about everyone.

Posted in General | Tagged | 2 Comments

DWIM Narrowing

The other day I saw a nice bit of code from Michael Fogelman that implemented a “do what I mean narrowing” function. That seemed pretty neat and I made a mental note to add it to my init.el. Then Artur Malabarba over at Endless Parentheses, a site you should definitely add to your feed, took that code and improved it a bit.

His best idea, though, was to add it to his toggle map. Now, for almost all uses of narrowing, a single, easy-to-remember key sequence will do what he wants. That means he no longer has to remember all the different narrowing calls and their key sequences; he just has to type 【Ctrl+x t n】 and the desired narrowing takes place. I’ll definitely be adding his implementation to my version of the toggle map.

Posted in General | Tagged | Leave a comment

SBCL 1.2.2

The latest version of Steel Bank Common Lisp is out and available at the usual place. The new version has some bug fixes and minor enhancements (see the NEWS page for details) so it represents the ongoing refinement of the environment that the developers have been working on for some time. The package just keeps getting better and better.

As always, the system compiled and ran the tests without problems on my OS X 10.9.4 systems. As I say every month, if you’re looking for an excellent Common Lisp package that is under continuous development, you should definitely try out SBCL. It’s an outstanding package.

Posted in Programming | Tagged | Leave a comment

Emacs Autoloads

Over at lunarsite, Sebastian Wiesner has a very nice post that explains the ins and outs of autoloads in Emacs lisp. Mostly, autoloads take care of themselves but sometimes users do need to interact with them. Here’s an example that I learned from Steve Purcell.

Of course, if you’re writing packages you will need to understand how autoloads work and when to use them. Wiesner’s post gives you all the information you need. Definitely worth a read even if you’re not writing your own packages.

Posted in General | Tagged | 2 Comments