Emacs Line Modes

LigerLearn has another nice video up. This time it’s about line wrapping, line truncation, and visual line mode. If you’ve ever been confused about visual line mode and what it’s for, this video will help clear things up for you.

The video begins with a demonstration of how many Emacs commands don’t act in the expected way when operating on long lines that are wrapped on the screen. It then goes on to show how visual line mode solves these problems and gives you a better user experience both visually and operationally.

The video is short—5 minutes, 40 seconds—so it’s easy to find time for it. If your understanding of visual line mode is that it just automatically adjusts line wrapping as you edit, you should take a few minutes to watch this video.

Posted in General | Tagged | Leave a comment

Remote Sudo

If your workflow involves administering remote systems or something similar, you probably have the following burned into your muscle memory. If, on the other hand, you’re like me and don’t have occasion to need root access on a remote machine very often, you can probably use a reminder. If you’re in the second category, here, courtesy of abo-abo, you go:

If you click on the tweet, you’ll see the next tweet, which explains that “cloud” is the name of a remote system defined in abo-abo’s ~/.ssh/config. Defining often used remote systems like this is something I do too and it saves me a bunch of time and mental cycles trying to remember domains or, worse yet, IP addresses.

Posted in General | Tagged | 3 Comments

Mathematical Typesetting

I’ve always been fascinated by the typesetting process and have a particular fondness for the old mechanical typesetters such as the Linotype. I wrote about that in this post from a couple of years ago. That post has a link to a wonderful film that describes in detail how the Linotype worked. It really was a mechanical marvel.

Over at Practically Efficient Eddie Smith has a long post that describes the special problems that mathematical typesetting presents. If you think of a reasonably complicated mathematical expression, the Cauchy Integral Formula, say,

f(a)=\frac {1}{2\pi{}i}\oint_\Gamma \frac{f(z)}{z-a}\,dz

you can see right away why it was such a problem. There are Greek letters, fractions, and special symbols that can take up either multiple lines or have to be set in part of one of those lines. It was difficult and expensive to typeset.

Smith discusses some of the solutions to these problems but until fairly recently, you had a choice of expensive, essentially hand-set type or something that looked ugly on the page. It was that “ugly on the page” part that provoked Don Knuth to take a decade off from writing The Art of Computer Programming and develop \TeX. I have the original version of Volume 2 of AOCP that was produced with the traditional hot lead Monotype typesetter. I remember seeing the revised edition that was produced by an early phototypesetter in a book store. It looked terrible. That book was the impetus for \TeX.

Now, of course, typesetting mathematics isn’t much harder than typesetting anything else. \TeX and especially \LaTeX have made it so easy that many, or maybe even most, authors typeset their work themselves. The publisher may tweak the \LaTeX a bit but essentially all the hard work is already done.

Posted in General | Tagged , | 2 Comments

Start an Engineering Notebook

Camilla over at Winterflower argues that software engineers should keep an engineering notebook. That’s advice that everybody knows they should follow but that too many of us don’t. We’re busy and we think, “I’ll remember what I just did, I don’t need to write it down.” Of course, a little later we don’t remember and have to go through the pain of figuring things out all over again.

I keep a journal in which I record everything I do and discover but I’ve only been doing this for about 3 years. I really wish I’d started earlier. A good way of making it easier to get started and keep with it is to have a good system for recording things.

Of course, as an Emacs and Org mode user that means I have a built-in infrastructure for such things. One of the things that Emacs and Org mode provide is an easy way of retrieving information from your notebook. Org mode tags provide an excellent way of finding things. For example months ago I revised the way I compile Emacs (which can be a bit finicky on macOS), put it in my journal, and added the tags emacs and compiling. When I want to compile Emacs, I merely type Ctrl+c a m emacs:comiling to find all my journal entries with those tags. Even better, I have the commands in a code block so I can run them automatically by just typing Ctrl+c Ctrl+c in the block. That’s a real win over trying to figure out everything each time I compile a new Emacs.

There’s lots of examples like this, of course, and the more you put into your notebook, the more you can get out and the easier it will make things for you. Of you aren’t already keeping an engineering notebook, you should start. Or at least make a New Years resolution to start. I promise you, you’ll be glad you did.

Posted in General | Tagged , | 3 Comments

Everybody Wants to Get Into the Act

BuzzFeed—I know, I know—is reporting that the Treasury Department is now spying on Americans and their financial data. As the late, great Jimmy Durante used to say, “Everybody wants to get into the act.” This spying is so egregious that even Treasury employees are complaining.

The Treasury’s Office of Intelligence and Analysis (OIA) is gathering and storing financial data on Americans without warrants and apparently without any legal justification. The OIA says that everything they do is legal and that the BuzzFeed article is inaccurate but a senior Treasury official says flatly that it’s domestic spying.

The issues are a bit arcane but the BuzzFeed article does a good job of explaining what’s going on. Basically it’s another case of the Iron Law of Data Collection. In this case, data collected from the banks on money transfers over $10,000 that is supposed to be used to prevent money laundering is being mined and stored by the OIA over the objections of the Financial Crimes Enforcement Network, the agency tasked with collecting the data and preventing money laundering.

It seems that you just can’t be a real government agency without spying on your citizens. Pretty soon, Animal Control will start spying on us. Oh wait, they already are.

Posted in General | Tagged | Leave a comment

Elisp for Configuration

Chris Done has a nice introduction to Elisp for configuration. This introduction is aimed at programmers who are relatively new to Emacs and want to start doing some simple customization.

He doesn’t intend to provide an thorough guide to the Elisp language but rather to give you just enough to be able to use more comprehensive documentation such as the Elisp manual. He assumes the reader has enough programming experience that an “Introduction of Programming” section isn’t necessary.

If you fall into the intended readership, you should give Done’s article a read. It might help you get started making Emacs your own editor.

Posted in General | Tagged , | Leave a comment

Emacs Pretest 1 Is Available

Nicolas Petton has announced the release of Emacs 26.0.90, the first pretest for Emacs 26. I’ve already been reading very favorable reviews, some saying it’s the best release available.

If you don’t mind living on the edge, you can help the developers out by using and testing it. The more feedback you can give the developers, the better Emacs 26 will be and the faster it will be available.

As always, we owe the developers a huge amount of gratitude for their work in continuing to improve Emacs.

Posted in General | Tagged | Leave a comment

C-q and ASCII in Emacs

LigerLearn has a nice video on using Ctrl+q in Emacs to insert arbitrary ASCII (or even Unicode) characters into the current buffer. The video begins with a discussion of ASCII control characters and the “caret notation” used to represent them.

The video goes on to discuss how Ctrl+q can be used to insert control and other characters into the buffer. That’s really handy when you want to insert a character like a newline (^J) that would normally perform an action.

The video is obviously aimed at n00bs but others may learn something useful too. It’s just under 9 minutes so it should be easy to fit into a coffee break.

Posted in General | Tagged | 1 Comment

Bookmarks, Eshell, and Docker

Fuco1 is really good at investigating how Emacs’ systems work and extending them to better suit his workflow. The latest example of this—or at least the latest that I know of—is his work in extending the Emacs bookmark system. The particular problem he is trying to solve is bookmarking Eshell sessions in Docker containers. That’s pretty interesting if you do a lot of work with Docker and you can check Fuco1’s post for the details.

More interesting to me, however, is how flexible the bookmark system is. You can bookmark whatever you want by providing a couple of functions. One of the functions builds an alist containing all the information needed to rebuild the buffer you want to bookmark. The other function uses this alist to rebuild the buffer when the bookmark is opened. Again, you should see Fuco1’s post for the details.

If you’re like me, you probably never thought much about the implementation of bookmarks, but as usual with Emacs, it’s well thought out and very extensible. If you have some special type of buffer you’d like to bookmark, it turns out to be pretty easy to do. Fuco1’s post is worth reading just to see the details of how the bookmark system works. It’s definitely worth a read even if you don’t have an immediate need to make a new bookmark type.

Posted in General | Tagged | 2 Comments

Unix History

The other day I saw a reference to this great history of Unix. It’s Chapter 2 from Eric Raymond’s The Art of Unix Programming. I hadn’t read it for some time and enjoyed it all over again.

Many—or maybe even most—Irreal readers weren’t around in the early Unix days and they should definitely read this history. It’s an important part of our shared heritage and a reminder that before Linux there was Unix and a wonderful culture that went with it.

Posted in General | Tagged , | Leave a comment