Emacs for the Social Sciences

Ista Zahn of Harvard’s Institute for Quantitative Social Sciences is a long time Emacs user. A year or so ago, a user asked for an Emacs configuration with a specific set of features and Zahn realized that his configuration already had most of what the user wanted. They got together and produced a configuration aimed at Social Science users.

As you might expect, the configuration is heavily slanted towards LaTeX, git, R, Stata, SAS, and Julia. If you follow the link to his dotemacs GitHub, you’ll see that the README (available as markdown and Org) is a nice discussion of what the configuration is trying to do as well as the actual implementation.

If you’re in the Social Sciences and tired of Word and other soul and energy sucking software, be sure to give Zahn’a configuration a try. As many others before you have found, Emacs will make you more productive and probably lower your blood pressure as well1. Even if you’re not a social scientist, you may find something useful in the configuration—many of us write in LaTeX and use R, after all.

Footnotes:

1

Well, at least after you get past the initial learning curve.

Posted in General | Tagged | Leave a comment

Wrap Region

Ben Maughan over at the excellent Pragmatic Emacs has a nice post about the wrap-region package. The idea is that you can arrange to wrap highlighted text with beginning and ending characters. For example, if you’re a C programmer you can arrange for / to wrap the highlighted text in /* and */. If you’re an Org mode user, you can use it to add the markup characters such as /, *, =, and ~.

Take a look at Maughan’s post to see how it works and how to set up your own wrappings. As Maughan points out, this composes nicely with Magnar Sveen’s expand region package. If you often find yourself adding wrapping characters after the fact, this package may be a real help.

UPDATE: *\*/

Posted in General | Tagged | Leave a comment

Remembering Dennis Ritchie

Jason Perlow over at ZD Net has a nice piece on Dennis Ritchie. Ritchie died a four years ago, about the same time as Steve Jobs. Everyone knows who Jobs was but most of the population—and sadly, some of our community’s younger members—don’t know who Ritchie was.

As Perlow recounts, almost none of modern computing would exist today if it weren’t for Ritchie’s work. Although his contributions were legion, he is mainly remembered as the inventor of C and the co-inventor of Unix.

It’s hard to overestimate either. Although many who haven’t bothered to learn it like to mock it as a latter day COBOL, C is, in fact, behind almost all the important software we use. Even “modern” languages like Python and Ruby take inspiration and syntax from C and are implemented in it. If you’re a Unix or Linux user, your operating system is written in it. If you’re a Windows user, your operating system is written in C’s unlovely child, C++. If you worship at the Church of Apple, your operating system is written in another C derivative, Objective C.

One of the most important contributions of C was to provide a portable systems language. Before C, almost all system software was written in the assembly language of the host machine. It was C that made Unix a portable operating system that ran on multiple hardware platforms. None of this would be possible without Ritchie’s C.

Unix, of course, has been so successful that Rob Pike once gave a talk bemoaning the fact that it had essentially killed operating system research. Even Windows, its archenemy for many years, has incorporated large parts of Unix. Today Unix is seen mostly on big iron providing back end processing but it lives on in smaller machines in the form of Linux. These days, any youngster can get a cheap computer, put Linux on it, and have a world class computing environment. At the same time Linux is powering much of the Internet so Unix’s influence extends to all of modern computing. Again, none of this would have been possible without Dennis Ritchie’s work.

Before he died, Ritchie was always adding interesting things to his Bell Labs Home Page—which Bell Labs still maintains—and I remembering checking it regularly for his latest offerings. Give Perlow’s article a look and celebrate one of computing’s heroes.

Posted in General | Tagged | Leave a comment

More Hydras

Speaking of hydras, as we did yesterday, Eric James Michael Ritz has a nice post on some of the hydras he uses. If you’re looking to see some good ways of using the hydra package, Ritz’s post is a worth taking a look at.

He begins by reconsidering abo-abo’s hydra to zoom the Emacs screen by adding a reset option and choosing keys that are more consistent with the default sequences. He has several other hydras that do things like navigate Org buffers, page breaks, and flycheck reports. He also has hydras for things like the Avy functions.

You’ll almost certainly find something useful for your own workflow in the post so it’s well worth taking a look. If you aren’t yet using the hydra package, I urge you to consider installing it. It’s just the thing for easing and speeding your workflow.

Posted in General | Tagged | 1 Comment

Navigation Hydras

John Kitchin has a couple of nice posts on building hydras to ease navigation. In the first, he considers commands that might be classified as “gotos.” They are in the isearch mold. About half of these are from the Avy package. The others make use of helm functionality. In a sense, none of this is new but adding them to a hydra means that you need remember only one key sequence to bring up the hydra menu. If you use a key chord such as 【Super+g】 as Kitchin recommends, then all these commands are only two keystrokes away. That’s pretty handy. Of course, you can still use whatever keystrokes you have assigned to them already, if you prefer, and use the hydra for the less used ones that you can’t remember the key sequence for.

The second post is mostly about “small” cursor movements: move by character, word, lines, paragraphs, etc. This hydra uses standard Emacs cursor movement commands and thus doesn’t require any add ons. The advantage of the hydra is that it makes these commands reachable in a couple of key strokes. Most experienced Emacsers will already have them burned into their muscle memory.

There’s a metapoint to be made here. Steve Yegge changed my life and the lives of countless others by recommending the use of isearch as a navigation tool. The introduction of ace-jump-mode (later replaced by avy) was a refinement of that technique: ways to get your cursor where you want it quickly and easily. They’re all about optimizing your navigation through the text you’re working on. All of the commands that Kitchin captures in his hydras serve this same purpose. It’s definitely worth taking a look at these two posts and using whatever parts you find useful for your workflow.

Posted in General | Tagged | Leave a comment

Emacs for Writers

Regular readers know I’m fascinated by the stories of professional writers who use Emacs. I’ve written in the past about Vernor Vinge, Tony Ballantyne, Randall Wood, Urpo Lankinen, and some non-prose writers who use Emacs for their writing.

Now Jay Dixit, a science writer, has given an excellent talk at the New York Emacs Meetup on Emacs for Writers. Dixit, who is not a programmer, talks about his long search for the ideal editor for writing. He tried all the usual suspects—Word, Scrivener, WorkFlowy—but none of them did what he wanted: an outline in the left hand pane and editable text in the right hand pane all of which was manipulable from the keyboard.

After spending some time in writers’ forums, someone finally told him he could do what he wanted with Emacs, Org mode, and indirect buffers. As a non-programmer, it took him some time to get things configured appropriately but now he has the exact setup he wanted.

The second half of his talk demonstrates how he uses this functionality in his writing. As usual, his particular workflow may not be precisely what you’re after but he’s got lots of good ideas and shows that even someone without programming expertise can get Emacs configured to his liking. If you’re a writer and tired of Word, take a look at Dixit’s talk to see if his ideas make sense for you. Don’t worry about having to deliver your manuscript in Word; that’s easily handled.

The talk is just over an hour so you’ll have to schedule some time.

Posted in General | Tagged , | Leave a comment

Lisp Performance

One of the tiresome things that Lispers keep hearing from the misinformed is that Lisp systems are too slow for production work. Here’s a very impressive counter example to that notion.

JCG over at the Racket Users forum reports that he rewrote a 2,000 line C++ program in Racket Scheme and saw a 20% speed increase. More importantly, I think, is that new server was only 700 lines of Scheme.

So faster, shorter. What’s not to like? JCG does say that the memory footprint is significantly larger (300 megs versus 60) so there is a downside. At least there’s a downside if you’re worried about a 300 MB memory footprint. These days, most of us probably aren’t.

Posted in General | Tagged , | Leave a comment

Org Basics V

Ben Maughan has posted the last in his series of Org mode basics posts, Org Basics V. The final episode covers exporting. In the previous posts, Maughan showed the basics of Org markup and data manipulation for writing structured notes. Now we learn how to export these notes to nice looking output.

Maughan demonstrates adding headers to specify CSS and LaTeX style sheets to the notes so that you get optimal results for HTML or PDF output. As he mentions, you can also export to plain ASCII, Markdown, or ODT (doc) formats. He includes links to the HTML and PDF renderings so you can see what the final product looks like.

As I’ve said before, this series of posts is an excellent introduction to writing with Org mode. Even though there are only 5 short posts, they show the richness that Org mode provides.

Posted in General | Tagged , | 1 Comment

Org Radio Buttons

John Kitchin has another great trick: how to implement radio buttons in Org mode. The idea is to take a normal Org checklist and arrange it so that only one item can be checked at a time. In other words, a radio button.

Oddly, there’s nothing like that built into Org mode but Kitchin shows how to implement it with just a few lines of Elisp. You might want to query the list programmatically and retrieve the checked item. Kitchin wrote a couple more functions to allow you to do just that.

It’s a nice post and even if you don’t have a need for a radio button right now, you’ll learn a lot about working with Org structures. Definitely recommended.

Posted in General | Tagged , | Leave a comment

Some Bad New for Emacs

As I’m sure you’ve all heard by now, there’s some bad news for those of us who love and use Emacs. Monnier has been a good steward and his work as the Emacs maintainer will be missed. It will be hard to fill his shoes.

Posted in General | Tagged | 2 Comments