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

Org Mode Clock Checks

I’ve had this in my blog queue for sometime but before I could get to it, Sacha ran with it in her Emacs News post. I was going to forego mentioning it but after my Clocktables post, I decided that would be a useful adjunct to that post. After all, if you’re going to be using clocktables, you really should be sure that your clocking data is accurate and this post from Marcin Borkowski shows a nice way of helping to do this.

It turns out that the Org mode agenda has a builtin way of checking for anomalies in clock data. That means things like overly long clock intervals. Borkowski’s post talks about some of these cases and shows how to invoke the checks.

As Borkowski writes, you can check out the details by looking at the docstring of org-agenda-clock-consistency-checks but that function is defined with a defcustom so you’ll need to search for it in org-agenda.el directly.

Posted in General | Tagged , | Leave a comment

Setting Up emacs

Will Schenk has a post that may interest some of you. It’s about setting up a new Emacs instance. It’s not that he’s a n00b; he just wants to set up a nice clean instance. You can argue with his choice of themes and the packages that he chooses but the post is handy nonetheless.

He starts with installing emacs-plus from Homebrew along with the Roboto fonts. Then he disables package.el in favor of straight.el. Lots of folks have abandoned the default package.el in favor of straight.el or one of the other alternatives but I’ve never felt the need. The default system works well for me and I don’t need the pain of worrying about another package to wrangle my packages. Still, straight.el appears to be a good choice if you do feel the need for another package manager.

Next, he installs Org and counsel. Those are pretty much mandatory and I definitely agree with those choices. The last major decision is to install the Nano theme. I don’t use any theme, preferring to simply set my background to a light tan (oldlace) and otherwise use the Emacs defaults. I’ve been doing that for years and have never felt the need to change. But lots of people love Nano so if you’re looking for theme, you should take a look at it.

Schenk installs some other packages so be sure to take a look at his post to see what he’s decided on.

Posted in General | Tagged | Leave a comment

Red Meat Friday: A Conversation With An Emacs User

A conversation with a typical Emacs user:

Interview with an Emacs Enthusiast in 2033 [Colorized]
by u/miversen33 in emacs

What makes this so funny is that every outrageous statement the protagonist makes is something that we’d agree with. Sort of.

So this one is for all you Vim users and other heathen.

Posted in General | Tagged , | Leave a comment