Emacs for Everything

Over at the Emacs reddit, ambrevar has a nice essay entitled Emacs Everywhere. This essay is a followup to his previous essay on Eshell that I wrote about previously. In it, he describes why he moved almost all his computing tasks into Emacs and why he resisted doing so for a long time.

Ambrevar is an adherent to the Unix philosophy that programs should do one thing well. Given that, he reasoned, why would he want to do everything with one program? Over time, though, he came to realize that one could view Emacs as providing a user interface for “back end” programs that adhere to the Unix philosophy. This makes even more sense if you consider back end programs to include Emacs packages written in Elisp. From this point of view, handling your email from within Emacs with something like mu4e is not a matter of Emacs doing too many tasks but rather of Emacs providing a consistent user interface that allows one to work more efficiently.

The bulk of the essay discusses the advantages of moving as much as possible into Emacs and lists some of the standalone apps that he’s replaced with something equivalent in Emacs. He even uses EXWM to make Emacs his system window manager. As a Mac user, that option isn’t open to me but I don’t really need it: I spend almost all my tube time in either Emacs or Safari. Both run in full-screen mode and I have function keys to switch between them easily from the keyboard.

Whether or not you’re an Emacs user or have advanced to moving as much as possible into it, you will probably find ambrevar’s essay interesting. Definitely worth a read.

Posted in General | Tagged | 1 Comment

Org Mode 9.1.2

Bastien brings us the news that Org Mode 9.1.2 is available.

It’s a bug fix and is already on Melpa if you like to stay up to date.

Posted in General | Tagged , | Leave a comment

Working With Log Files in Emacs

Lee Hinman over at writequit.org has an excellent post on working with log files in Emacs. By “log file” he really means “structured text” so, for example, most of his techniques work for things like JSON as well.

The post is fairly long so I won’t try to summarize the whole thing but it’s interesting how many built-in Emacs functions can be brought to bear on the problem. Everyday things like keep-lines, occur, and narrowing can make a big difference.

Hinman also talks about 3rd party packages that can help. One such package is View Large Files (vlf) that allows Emacs to gracefully handle huge files. That’s especially important for log files that can be multiple gigabytes in size. Read Hinman’s post for other useful packages and ideas for dealing with log files. It’s a very useful post.

Posted in General | Tagged | Leave a comment

Doubleclick Whines

The IETF has a new draft standard on browser cookies and Doubleclick is whining. The standard would eliminate—or at least make more difficult—the ability of Doubleclick and other advertisers to deposit tracking cookies on our machines. If you aren’t in the adtech business, this is great news.

It is, I know, unseemly to take pleasure in the misfortunes of others but these miscreants have earned it. We’ve asked them and asked them not to track us. We even had a way of requesting this built into our browsers. The adtech industry told us to take a hike and continued tracking us. Therefore, unseemly as it may be, I’m finding this news schadenfreudelicious.

Posted in General | Tagged , | Leave a comment

Adding Hyper and Super Keys for Emacs

I’ve written about this before but it was a few years ago so it’s worth repeating for new Emacs and/or Mac users. One problem with Emacs is that it’s hard to find enough shortcut keys. Having Hyper and Super keys helps a lot but, of course, modern keyboards don’t have them. Fortunately, modern keyboards do have keys that are otherwise unused in Emacs and they can be drafted as substitutes for Hyper and Super.

Xah Lee has has a page that shows how to set Hyper and Super keys for Linux, Windows, and macOS. For the Mac, he recommends setting the ⌘ Cmd key as Meta and the ⌥ Opt key as Super. That’s common advice but I’ve never understood it. Emacs already considers the ⌘ Cmd key to be Super and, at least on my Mac keyboards the ⌥ Opt key has a sublabel of Alt so it makes sense to me to use the ⌥ Opt key as Meta and the ⌘ Cmd key as Super.

That leaves the Hyper key which, following Magnar Sveen’s advice, I map onto the fn key. It seem like begging for trouble to use fn and ⌘ Cmd this way since they have important OS functions that you might want to access from within Emacs but it turns out that they still perform those functions despite the mapping. For example, fn+F8 still pauses/restarts music even when fn is mapped to Hyper.

It’s really useful to have these extra modifier keys to use with 3rd party packages or even obscure standard Emacs functions. Take a look at Lee’s page to see ways of getting them on your platform.

Posted in General | Tagged | 6 Comments

Open Offices and Sickness

In a study that should surprise absolutely no one, a paper in the Scandinavian Journal of Work, Environment & Health concludes that occupants of open plan offices take 62% more sick days than those with private offices. (The paper itself is short and can be found here by clicking on the PDF button at the top.)

The first link takes you to a nice summary of the research, its methods, and its results. Even sharing an office with one other person results in a significant increase in sick days. Unless you think that there’s something special about Danish workers, this is devastating to the usual arguments management proffers in support of open plan offices and even argues against their real, hidden reason of cost reduction. If those open plan offices are increasing sick days by 62%, how long will it take to swamp the costs of a proper office buildout?

If you’re a parent with school age children, you see this phenomenon in action everyday. Kids go to school and come home with colds because they’re in the same room as kids who are already sick. Why would you think it would be different just because it’s adults instead of kids and offices instead of schools?

Posted in General | Tagged | Leave a comment

Org Mode as an Exocortex

Jeff Terrell has an interesting video up that considers Org mode’s role as an exocortex. By “exocortex” he means (roughly) “memory external to your brain that helps you remember things you don’t need to be thinking about right now.” The idea is to improve your focus by offloading facts that aren’t important to the task at hand.

On the one hand, there’s not really anything new here. Most of us maintain a TODO list to record tasks that need doing but that we aren’t working on right now. By not having to keep those in our active memory, we can improve our focus on the current task. As Terrell says, there are many devices that can serve as an exocortex: a notebook, a calendar app, and the many software implementations of a TODO list.

His video considers why Org mode is a excellent exocortex and he looks at ways to use it for that purpose effectively. Terrell goes over some of the features of Org and shows how they can be used to improve your focus by not having to worry about remembering future tasks. Most of the features he considers are those comprising the agenda and capture functions in Org. He does not, for example, consider Babel or the publishing aspects. One nice feature that he’s configured is the ability to pop up a capture buffer from anywhere in his system. That makes it really easy to capture an idea or task in a low friction way. I have the same thing and use it all the time. It’s hard to overstate how useful it is.

One other point that Terrell mentions is that it’s really handy to be able to carry your exocortex with you and Org’s iOS and Android apps make that possible. He even gives an example of recording things he needs to talk to his wife about and checking his phone at dinner to see what they are.

The video is 14 minutes, 45 seconds long so you can easily fit it into a coffee break. It’s definitely worth while watching, especially if you aren’t already an Org user and are trying to figure out if it could be useful to you.

Posted in General | Tagged , | 1 Comment

Emacs Rocks! #17: Magit

Magnar Sveen is back with another Emacs Rocks!. This time he discusses Magit. He starts by saying how Magit gives you all the information you need without having to invoke several git commands on the command line. Then he suggests that rather than doing a pull to update the local repository, you should fetch the data instead. That allows you the opportunity to check out the changes and stay up with the code base.

Sveen goes on to demonstrate some of features of git/Magit such as committing chunks instead of whole files, spinning off changes to a new branch, and editing a commit. He goes through that material fairly quickly so it’s a bit harder to follow. Part of the problem is that he has highly customized key sequences so it doesn’t make sense to show his keystrokes as he did in his earlier videos.

Still, it’s a great video and if, for some reason, you’re not already a Magit user, this video may convince you to give it a try. The running time is just 2 minutes 39 seconds so you watch it whenever you like.

Posted in General | Tagged | Leave a comment

Kitchin on Org Entities

Last week I wrote Olivier Berger’s tweet pointing at org-entities-help and remarked what a boon it was to me because I can never remember the names of encodings. Yesterday, John Kitchin commented that he has written a bit of code for inserting org-entities (as well as the \(\LaTeX\) or HTML encodings or even the glyph itself). There are two functions: one that works with Helm and another that works with Ivy.

These are really nice because you can use the Helm/Ivy filtering to narrow down to the entity you want. For example, if I want a ‘U’ with an umlaut, I bring up the function, type “uu” and Ivy narrows the choices down to the two entries (capital and lower case) with an umlauted U, Ü. If I just type Return, the UTF glyph is inserted. If I type Meta+o (in Ivy, Helm, presumably, has a similar mechanism) I get a menu that allows me to enter the org-entity, \(\LaTeX\), or HTML encodings.

Unless you’re participating in a discussion, most of you won’t see the comments for a particular post so I’m writing this up separately so that everyone can all take advantage of Kitchin’s excellent contribution.

Posted in General | Tagged , | Leave a comment

Building Presentations

Oskar Wickström has a nice post on automating the build of your technical presentation. Wickström likes to develop his code examples and diagrams concurrently with the text of the presentation. That means that the code and diagrams can change often as the presentation evolves. His post discusses ways of automating the process—essentially through a make file—so that anything that’s changed gets rebuilt and added to the presentation.

Wickström is not an Org mode user so his process involves Markdown, Pandoc, and Beamer. If you, too, don’t or can’t use Org, his post has some good ideas to make the process smoother.

What struck me, though, was how much easier things are with Org. The code is simply embedded in the document and compiled and run in place, automatically adding its output to the document. Likewise, diagrams and graphs are generated automatically from commands embedded in the source document. Finally, the presentation can be exported to Beamer—that’s what Wickström is using—or perhaps reveal.js. Mike Zamansky has a great video that shows how easy it is to make really nice presentations with Org mode and reveal.js. Everything is in a single Org file so you don’t have to worry about copying the latest code into your source document. It’s a very smooth and easy process.

Posted in General | Tagged , | 2 Comments