Research Tools for the Beginner

Kieran Haley, a Sociologist at Duke has an interesting paper that provides advice on research tools for beginning graduate students—or perhaps for brand new faculty members—in the social sciences. Haley has a Uses This profile that gives a précis of his background.

It’s Irreal fodder because his primary recommendation is Emacs and R. The paper is from 2013 so it’s a bit dated—he’s using Emacs 23—but its advice is still very relevant today. Actually, Emacs provides an even better solution today than it did in 2013. This is mostly because of the growing ecosystem around Org mode. For example, John Kitchin’s org-ref addresses many of the citation problems that Haley mentions.

One of the things that that Haley calls out as very important is reproducible research and keeping your data, processing code, and text together. Org mode excels in this and provides a way of ensuring that your computed results always match your data.

If you’re just starting graduate school or an academic career in the sciences—even the social sciences—you should definitely take a look at Haley’s paper. It’s got a lot of useful suggestions and makes a few specific suggestions about tools. Emacs and Org are a steep hill to climb, of course, but very much worth the effort.

Posted in General | Tagged | Leave a comment

Introduction to Emacs Profiling

After his post on dealing with long lines in Emacs, Alain M. Lafon got a comment complaining that he didn’t mention how to profile the situation. To remedy that, he’s posted a short introduction to profiling in Emacs. If you’re not familiar with the process, you’ll be pleasantly surprised at how easy it is.

In the simplest case, which covers most situations, there are only three commands to worry about. To profile an operation, you

  1. Start the profiler with profiler-start.
  2. Run the operation.
  3. Stop the profiler with profiler-stop.
  4. Get the results of the profiling with profiler-report.

That’s all there is to it. There’s a video with the post that runs through the process for the long lines problem. The video is short (6 minutes, 32 seconds) so you shouldn’t have any problem finding time for it. As Lafon says, there’s lot of reasons you might want to profile an operation even if you aren’t an Elisp programmer. The post and video are definitely worth your time

Posted in General | Tagged | Leave a comment

The Webster 1913 Dictionary

If you’ve been around for a while, you may remember my Draft #4 post from 5 years ago. That post explained why you’re probably using the wrong dictionary and why the correct dictionary is the Webster 1913 + 1828. The dictionary was online but, sadly, has since disappeared. It turned out, though, that you can install the 1913 version locally and make it available through Emacs. It’s really great having it available directly from Emacs and since you have a local copy, there’s no worrying about being online when you want to consult it.

Ever since I installed it, I’ve stopped worrying about its online availability but I’m reliably informed that there are still some people who are not using Emacs and, of course, there’s no reason that they shouldn’t benefit from Webster 1923 too. You can still install it and access it from the command line but many might find that inconvenient.

I just came across this life hacker article on the Webster 1913 dictionary. It affirms that this is the dictionary you want to be using and provides a link to an online version. When I checked my old posts, I discovered that I’d already provided that link but I don’t remember it being a reasonable alternative to the University of Chicago site. Perhaps it was different then or perhaps it’s because it was only the 1913 version. Regardless, it’s the same dictionary you get when you embed it in Emacs so if you’re looking for a great dictionary—see James Somers’ post to find out why it’s the dictionary you should be using—and you’re not an Emacs user, you can consult the online version.

Posted in General | Tagged , , | Leave a comment

The Types Controversy Explained

After yesterday’s heavy duty post on modernizing Emacs, here’s something to refresh your palate. I find this hilarious on many levels. Your mileage may vary:

Thanks to Wilfred Hughes on whose Twitter feed I found this.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Modernizing Emacs

I originally planned this as a short rant on the idea that Emacs needs to be modernized. The discussion has been raging for a while on the Emacs-devel list but was pretty much inside baseball until an lwn.net article on the discussion. Now everyone seems to be talking about it.

That’s good for me because I thought my objection to the whole thing was just another example of my innate and ever-increasing grumpiness. Hence my framing it as a Red Meat Friday post. It turns out I needed have worried. Vivek Haldar, who knows a bit about editors, reacted with a pithy tweet:

Others, such as systemhalted, had a bit more to say and suggested that Emacs is already a modern editor. Vfclists says that Emacs developers are not the type of people who will spend their time trying to make Emacs look more modern. Derek Taylor devoted an entire video to the debate. His take is that the whole thing is silly. He equates the effort to modernize Emacs with a desire to dumb it down. The problem is that the n00bs whom the whole thing is intended to attract still won’t adopt Emacs and the current users will move on.

My personal take is neatly summed up by Dragan Djuric:

A lot of the “modernization” suggestions are the usual silliness:

  • Have Emacs start with a dark theme.
  • Make CUA the default so, God forbid, n00bs will not have to enable it themselves.
  • Make installing a theme (even) easier.
  • Make the start screen more “welcoming.”

These are what engineers of my generation call “eyewash:” Something of no utility meant to impress the outsiders.

To be fair, some of the ideas are not so trivial but, really, I wish these people would let the developers—who are volunteers doing this for free on their own time, remember—spend their time on substantive changes as they always have. If you’re convinced that Emacs needs some sort of out-of-the-box starter configuration for n00bs, feel free to implement it. It’s not that hard. Just don’t ask our already overextended developers to do it for you.

Posted in General | Tagged | Leave a comment

Long Line Remediation

Alain M. Lafon, whom I’ve mentioned several times before (1, 2, 3, 4, 5), has posted a useful guide for dealing with long lines in Emacs. One of Emacs’ well known weaknesses is that it can become very slow when it’s dealing with long lines. Usually this happens with programmatically generated files with extremely long lines but Lafon says that it can also happen with lines of a couple thousand characters.

Fortunately, there are some steps you can take to remediate the problem. Lafon offers several suggestions. One of the most effective strategies is to use Phil Sainty’s so-long library that I wrote about previously. Happily, as of Emacs 27.1, so-long is a standard part of Emacs so you won’t have to do anything but enable it. Even if you’re running an older version, you can still install it as a package.

Another remediation is to disable certain features of the bidirectional display facility. Unless you’re using both left-to-right and right-to-left display in the same file—see Lafon’s post for how this can happen naturally—you can reduce the number of times a lines has to be scanned by disabling some of the bidirectional capabilities.

If you’re having problems with long lines, take a look at Lafon’s post. He has several suggestions for helping to make Emacs a bit faster in working with them.

Posted in General | Tagged | Leave a comment

Gnus and Gmail

If you’re in the intersection of Gnus and Gmail users, T. V. Raman over at Emacspeak has a bit of Elisp that might interest you. He’s a Gmail user who wants to do Gmail type searches from within Gnus.

That turns out to be no too difficult and Raman shows the code to enable Gmail search syntax from withn Gnus. You can read more details in his post.

Posted in General | Tagged | Leave a comment

An Org Template for Meeting Minutes

When I was a Unix n00b, one of the things that really impressed me was the format of the Bell Labs technical memoranda. I especially liked the cover sheet, which captured all the vital information. It was, of course, generated by a set of Troff macros,

These days, most companies that have a standardized format for such things probably implement it as a Word style sheet. If you share Irreal’s sensibilities, that’s horrifying but, as usual, Emacs comes to the rescue.

Matthias David has an excellent package that uses Org mode to do the same thing for meeting notes. If you’re tasked with taking notes during meetings or if you’re, say, the secretary of some club or organization, this package produces excellent looking reports from Org source. You specify some headings that have the required information, write the report, and Org exports it as a beautifully formatted report.

Follow the link to see an example of the final result and the header options that control it. You can even include a PNG of a logo. It is, except for the subject matter, an exact analog to the Bell Lab’s technical memo. An interesting, if easy, project would be to adopt it to technical memoranda. If you don’t already have a company standard for technical memoranda, you should implement this immediately before you end up stuck with a Word style sheet.

Posted in General | Tagged , | Leave a comment

The Org Agenda

Derek Taylor over at DistroTube has another useful video. This time it’s on Org agenda. Taylor is a Doom Emacs user so the keybindings will be unfamiliar to vanilla Emacs users but a couple of minutes with the manual can overcome that if you don’t worship at the Church of Doom.

Many newcomers to Emacs come specifically for Org but Taylor is not one of them. He’s been using Emacs for a while and is just now discovering the full power of Org. It is, he says, much more than another markup language like Markdown, LaTeX, or Troff. This video focuses on its scheduling capabilities and Org agenda.

If you like scheduling your day or recording your day’s events as in a memobook, org can make that easy. Taylor’s video serves as an introduction into some of the basic operations but is by no means a complete exegesis. Still, it’s ideal for the n00b who wants to get a feeling for Org’s scheduling abilities.

The video is about 34 and a quarter minutes—a little less if you skip the shoutouts at the end—so you’ll need to schedule some time. As I said, this video will probably be useful mostly to Org n00bs but others may find some useful information in it too.

Posted in General | Tagged , | Leave a comment

The Law of Unintended Consequences

I find this hilarious:

There’s actually a lesson here: Whatever precautions you take, someone will find a way to game the system.

Posted in General | Tagged | Leave a comment