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

LaTeX Tip For Using Colon In Math Mode

The other day, I stumbled across a LaTeX tip over at John Cook’s TeX and Typography feed. For some reason, WordPress won’t let me embed it, so here it is.

The Tweet is about why you should use \colon instead of : in certain Math situations.
You can click on the Tweet to see the a couple of examples but here the first:

f: X \to Y \(f: X \to Y\)
f\colon X \to Y \(f\colon X \to Y\)

As you can see, in the first line the colon has equal spacing on both sides and doesn’t look quite right while in the second it’s flush up against the \(f\) with space on the right.

This might seem overly technical but if you’re trying to make your rendered mathematics look as nice as possible, it’s a technique worth knowing. I’m posting about this because I hadn’t seen it before.

Posted in General | Tagged | Leave a comment

Request For Your Garbage Collection Statistics

There’s been some discussion lately on the Emacs-devel mailing list about Emacs garbage collection. It’s pretty well known that Emacs GC uses old algorithms and is far from optimal. Part of improving the Emacs GC situation is understanding how the current GC implementation is behaving in the wild.

Ihor Radchenko has written a bit of Elisp to capture and store the GC statistics, which can be later uploaded to the developers working on this problem. He is asking Emacs users to install his package and run it to help gather information. The statistics are in plain text and can be viewed before sending them if you’re nervous about security. Additionally, you can view the source code before loading and running it.

This seems like a worthwhile project to me so please consider participating if you can. In the meantime, if you are experiencing delays for GC you might consider trying gcmh, a package that arranges for doing GC during idle times rather than when you’re actively using Emacs. I’ve used it for some time and never see any problems with GC delay.

In any event, if you’re willing and your employer doesn’t object try capturing and sharing your GC statistics to help improve Emacs.

Posted in General | Tagged | Leave a comment

Noweb as glue

Álvaro Ramírez has a revealing post about using noweb with Org mode in an unusual way. Most of us think of noweb as a way of doing Literate Programming. It enables the insertion of previously named text in another place. Ramírez reasoned that it would be a good way gluing the contents of Org blocks or their results into another block.

If you’re not familiar with the noweb system, the way you include a block—NAMED-BLOCK, say—is to put where you want to text to appear. Ramírez pointed out something I didn’t know: If you want the results of evaluating the block, rather than the verbatim contents, you can use instead.

Ramírez’s post has examples of both methods. The second, more complicated example shows how complex data generated in one block using Elisp can be included in another block using a different language. Even if, like me, you don’t know anything about Swift Charts, you won’t have any trouble following the process of using noweb to glue the results together.

There are, of course, other ways of doing this but using noweb is an easy method that doesn’t require remembering a lot of syntax.Take a look at the post for the details. It’s a nice technique.

Posted in General | Tagged , | Leave a comment

The Third Pretest For Emacs 29 Is Available

Eli Zaretskii writes to tell us that the Emacs developers have released the third pretest for Emacs 29. If you believe in history, it shouldn’t be long before the release candidates are available and shortly after that Emacs 29.1 itself. In the meantime, you can help speed things along by testing this release and reporting any problems back to the developers.

I always say—but it can’t be said enough—we all owe Eli and the other developers a big vote of thanks for their selfless work in keeping Emacs alive, thriving, and the best editor for those who want a complete work environment.

Posted in General | Tagged | Leave a comment