Lists in Word

So true. So very, very true:

Note: Unfortunately, the embedded tweet has the formatting messed up a bit. Click on it to see the original.

Posted in General | Tagged , | Leave a comment

Which-key and Calc

I ran across this excellent video on Emacs calc and was preparing to write about it. During my research, I discovered that I’d already written about it. That was a couple of years ago so you can consider this a reminder to watch it if you haven’t already. Calc is much much more than a simple calculator and can do some pretty astounding things. Karthik C covers only a few of them but the video does serve to show you powerful it is. For example, if it’s been a few years since you last sat in a Calculus class and you need to know the indefinite integral \int x^{2}e^{x}\,dx, just power up calc, type in x^2 exp(x), press a i and discover the integral is x^{2}e^x+2e^{x}-2xe^{x}. As I say, watch the video. If you want to start using calc, you should also download a copy of Sue D. Nymme’s cheat sheet. It’s, by far, the best one I know of.

Once I discovered that I’d already written about the video, I abandoned the post but started playing around with calc just for fun. It was then that I discovered something new. If you’re familiar with calc or watch the video, you know that you can get help by hitting a prefix key and ?. For example, if you can’t remember how to integrate, you can type a ? to get a list of options. However, with which-key installed, that all happens automatically. If you type a and pause before hitting another key, which-key will pop up one of its normal help buffers with all the options. That very nice and reason enough to install which-key if you’re a calc user. Actually, unless you have a photographic memory you should install which-key.

Posted in General | Tagged | Leave a comment

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