Vanilla Emacs Configuration

Emacs Elements has another useful video on a minimal configuration for vanilla Emacs. This is mainly for the new user, of course, but I was struck by how closely it matched my basic configuration. My current init.el is about 2,500 lines so there’s obviously a lot more there but I think the video captures what a new user needs to get started with Emacs.

The video starts out by getting rid of all the annoying things that everyone wants gone. That includes the startup screen, the tool bar, and the menu. I’d add the scroll bar to that but others may disagree. Note that deleting the menu bar on macOS can be problematic and you may want to omit that change if you’re on macOS.

Next up is configuring the package system. Part of that was arranging to include the use-package package. Fortunately, after Emacs 29 that will no longer be necessary because it will be included automatically. The other part of package configuration that everyone will want to include is adding MELPA as one of the package repositories. That will never be included out-of-the-box because of ideological reasons so it’s needs to be done manually. Most of the useful packages are available only there so including it is pretty much mandatory no matter what the true believers tell you.

The video includes some other useful configurations so you should definitely take a look if you’re interested in a minimal Emacs configuration. The video is only 8 minutes, 36 seconds so it should be easy to fit it in

Posted in General | Tagged | Leave a comment

How Many Years Have You Been Using Emacs?

Tuhdo asks a question on the Emacs reddit: How many years have you been using Emacs? On the one hand it seems like the answer should be “who cares?” but I found the answers revealing. Those answers ranged from “about a week” to “over 40 years.” One thing for sure, my 15 or 16 years puts me right in the neophyte range.

The thing about the answers is that no one said, “I’ve been using it for X years so I’m an expert.” Even folks with 40 years of experience acknowledge that they’re still
learning the mysteries of Emacs. One guy said said, “I’m a newbie, I started in 93.” Someone else replied to that, “Same for me. I graduated from college in 1983 and started using Emacs a couple of years before that.”

I really like the humble attitude of long-time Emacs users. Even if they’ve been using it for 40 years or more, they still describe themselves as “newbies”. This fact should give pause to those who whine that Emacs has a steep learning curve and is just too hard to bother with. Yes, you won’t learn everything there is to know in a couple of weeks or a couple of decades but the journey is rewarding and after a fairly short time you will be outediting those posers using the latest blingware.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Dark R Sessions in ESS

lf_araujo has a question:

How to fix too dark R session colors in ESS (right pane)?
by u/lf_araujo in emacs

You know what the Minions would say.

Posted in General | Tagged , | Leave a comment

Emacs and Standard Manuscript Format

I ran across this video from a year ago by Chris Maiorana on using Emacs as a typewriter. By that he means producing a publishing industry standard format manuscript for your fiction. The trick is to use the sffms LaTeX package. The resulting manuscript uses a monospace font (usually Courier), is double spaced, and generally looks like it was produced on a typewriter. The idea is that it’s easy for editors to read and annotate.

The sffms package is easy to use. Most everything you need to know is covered in Maiorana’s video. There are a few options that you can use to specialize your manuscript for various publishers but you can mostly just use the defaults. The sffms Manual list all the options and other commands in the package.

One of the nice things about the package is that you don’t need to know very much LaTeX to use it. It was designed for the nontechnical author. Despite that, Maiorana uses the excellent AUCTeX package for his writing environment. The only feature he uses in the video is compile and view (Ctrl+c Ctrl+a) so even using AUCTeX is simple.

Despite the title of his video, you aren’t, of course, using a typewriter when you use the sffms package. You are, in fact, using Emacs and have all the usual powerful editing commands at your command. The difference is that when you print the results, it looks as if it were produced on a typewriter.

I doubt it would be too hard to integrate the sffms package with Org mode but it’s so simple to use it directly that it’s probably not worth the effort. The video is 15 minutes, 28 seconds long so you’ll need to schedule some time but if you need to produce documents in standard manuscript form, it’s well worth your time.

Posted in General | Tagged | Leave a comment

Zamansky 81: Elfeed-webkit

He’s back! After a long hiatus, Mike Zamansky has returned with another video in his Using Emacs Series. For those of you not following along, Zamansky recently retired and has gained a second wind. He has a series on using Elisp planned but in the meantime, he offers us a splendid video on using and installing elfeed-webkit.

I’ve written about elfeed-webkit before [1, 2] but there’s nothing like seeing it in action. Configuring and using elfeed-webkit is so simple that Zamansky originally thought there wasn’t enough for a video but then he realized that the hard part was compiling Emacs to support the XWidget library. That isn’t really hard but it can be fiddly and lots of folks seem unaware of how to do it.

Zamansky solves that with a demonstration of how to compile Emacs to support XWidgets and other options. Mostly it’s a matter of running configure with the proper options but if you haven’t compiled Emacs from source before, you’re probably going to be missing some required libraries. Zamansky walks us through that and then explains how to install elfeed-webkit. His demonstration of how to compile Emacs is specific to Mint Linux but should work, mutatis mutandis, for any Linux distribution. It’s pretty close to what I do to compile it under macOS except that downloading libraries is different.

The video is 24 minutes, 13 seconds so you’ll definitely need to schedule some time but, come on, it’s one of Zamansky’s videos so you know it’s worth your time. I second Zamansky’s conclusion that elfeed-webkit is a game changer. If you use RSS—and you should—and you read your feeds with elfeed you really, really need to check out elfeed-webkit.

Posted in General | Tagged | Leave a comment

Org Attach Video

Over at the Emacs Elements Channel, there’s a new video on using Org mode attach. For those of you aren’t familiar with the attach facility, the idea is that you can attach one or more files to an org heading. The file is kept in a separate directory and linked to the Org heading. The files can, of course, be opened from the Org file to which they are attached.

For most users, the only complex part is deciding how to “attach” the file. You can do that by

  1. Making a copy of the file
  2. Moving the file to the attachment directory
  3. Linking to the file
  4. Attaching a symlink to the file

As the video explains, you can also set a default method if you always do it the same way.

One interesting thing that I didn’t know is that you have some control over where the file(s) is stored. By default it goes into a data subdirectory in the same directory as the Org file but you can arrange to have a single data directory for all attachments regardless of where the Org file resides.

I don’t use attach as much as I could because before I was aware of it, I set up my workflow to do essentially the same thing but use Org links directly. That means, among other things, that I can put those links in an org table, which is handy for, say, tax receipts. If I were starting now, I would probably make more use of the attach facility.

The video is 12 minutes, 27 seconds so you’ll probably need to schedule some time. If you’re not already familiar with attach, you should definitely spend the time to watch it. As a bonus, the video shows you a bit of Elisp that allows you to attach files from Dired and some code that displays the names of the stored more easily.

Posted in General | Tagged , | Leave a comment

Is Org Mode Better For Writers

Chris Maiorana has an interesting post that asks if Org mode is better for writers. He starts with the beginning of Ambrose Bierce’s story A Watcher By The Dead displayed in Libre Office and notes that LibreOffice will do everything you need to write a story, format it, and send it off to a publisher. Why, then, he asks, would you bother with learning Emacs and Org mode?

To me, not having to write in Word or one of its spawn-of-the-devil siblings is reason enough but Maiorana has a less emotional response. He starts by by observing that you can just write your prose and not worry about what the output will look like until later. For example, you might use the markup for underlining but at export time you can arrange for it to be rendered differently.

The rest of the video considers structural editing. That’s an idea that’s important to writers but may not be familiar to the rest of us. The idea is that you can mark up your manuscript in a way that reflects the structure of the story. This is important for understanding the flow of your story and how it hangs together. Naturally you don’t want this markup to appear in the final output and Org makes it easy to arrange for this.

In the end, Maiorana concludes that Org is definitely worth learning. Watch his video for all his reasons why he thinks this. The video is 16 minutes, 50 seconds long so you’ll probably need to schedule some time.

Posted in General | Tagged , | Leave a comment

Phone Calls and Maps from Emacs in macOS

Charles Choi has an interesting post on how to make phone calls and bring up a map of a given location from Emacs in the macOS environment. What’s interesting is not that you can do it—it’s Emacs, of course you can do it—but that it’s so easy.

In native macOS apps, you can put your cursor on a phone number and click on it to dial the number (assuming, of course, you have an iPhone and have configured it to use your Mac as a proxy). Similarly, you can put your cursor on a location and click on it to bring the location up in Apple maps.

The interface to both services is the same: you just present a specially formatted URL to the browser and the system takes care of the rest of it. Making a call is the more complicated functionality but only because you have to canonicalize the phone number. That’s done with a (not so simple) regex but the rest is easy.

Take a look at Choi’s post for the details including the code. If you’re a macOS user, often make calls or bring up map from your Mac, and like to stay in Emacs as much as you can, you should take a look at the post.

Of course, the code is for macOS but I’d be surprised if there weren’t similar services in the other OSes.

Update [2023-06-25 Sun 15:38]: Added link to Choi’s post.

Posted in General | Tagged | Leave a comment

Golden Ratio Mode

There’s a new video over at the Emacs Elements Channel about the Golden Ratio package. The idea, to a first order approximation, is to make the current window—the one having focus—larger so that it is easier to type in. If you switch to another window, the new window is made the larger one.

But that’s just the first order approximation. The other feature of the package is that when the window having focus is enlarged, it’s sized so that its sides obey the golden ratio. That, depending on your school of Feng shui, makes for the most pleasing size and is most comfortable for reading. As the video demonstrates, you can tweak this a bit to limit, say, how wide the window can be.

I mostly have two equal, side-by-side windows that take up the whole screen. They don’t, I’m sure, honor the golden ratio principle but they’re fine for my everyday work so I don’t feel a need for this package. But as always, other folks have their own needs and preferences and they may prefer using the package. The video commenters certainly seem to: they all praise the package and say how much they enjoy using it.

If you think you might like it, take a look at the video. The package is easy to install and you can turn it off easily so there’s nothing to lose. The video is only 6 minutes 50 seconds so it should be easy to find time for it.

Posted in General | Tagged | Leave a comment

Red Meat Friday: XEmacs 21.5.35 Released

Who knew? It turns out the XEmacs is still a thing. Although until now there’s been no releases since 2013, they have a new Beta release. It’s reasonable to take the position of “Who cares?” but I think it’s always a good idea to have an alternative if only to keep the other players honest.

Every once in a while the GNU Emacs project falls into a sort of paralysis where they refuse to move things forward. Sometimes this is for ideological reasons, sometimes because “the way things are have always been this way.” XEmacs was born because GNU Emacs wasn’t implementing a GUI version of Emacs.

Those days are, of course, far in the past but the lesson holds. Sometimes you need an interloper to get things moving again. Having XEmacs lurking in the wings helps keep everyone on their toes.

As you all know, I love GNU Emacs and hope and expect that it will continue to thrive but if silliness overtakes the project, it’s nice to know there is an alternative.

Posted in General | Tagged , | Leave a comment