Gnus Guide Update

After Sacha’s chat with John Wiegley that explored how Wiegley uses Gnus to manage his Emacs maintainer workflow, there’s been a bit of renewed interest from Emacsers in using it for their email client. Unfortunately, Gnus is a large and complex system that is difficult to set up and use. Back in 2014, I wrote about Chen Bin’s Gnus Guide.

The guide takes the pragmatic approach of covering the basic 5% of Gnus that a new user needs to get started. Now, just in time for the renewed Gnus interest, Chen Bin has has updated his guide. He also provides his configuration so you have a go-by if you want to set up your own instance.

The guide is oriented towards using Gmail as the server but it should be pretty easy to adapt to other providers. If you’ve been wanting to try Gnus but were put off by the difficulty of getting it set up, Chen Bin’s guide may be just what you need.

Posted in General | Tagged , | Leave a comment

TPP: A Warning

Posted in General | Leave a comment

Running Emacs as a Daemon

M. J. Wall has an interesting post entitled How I Use Emacs. Wall’s workflow is a bit unusual—by which I mean different from mine—in that he spends a lot of time in the terminal even though he’s running GUI desktops in Linux and OS X. Sometimes he just wants to edit a file and then return to the terminal. Other times he wants to pop up an Emacs buffer and return to the terminal immediately.

To facilitate that workflow, he has two scripts. One starts Emacs in the terminal window and waits for Emacs to finish before returning to the shell. The other pops up a new Emacs frame and returns to the terminal immediately. An interesting trick that both these scripts use is to call emacsclient with the -a “” option. That says that if the Emacs server is not already running, start it and then reattach emacsclient to it.

As I mentioned, my workflow is different. I always have Emacs running and have a shortcut key to change focus to it so if I’m in a terminal and need Emacs I just press【F6】 to pop into Emacs and do what needs doing. Nonetheless, there is one case where Wall’s technique is useful to me. Usually if I want to edit a file on another machine, I just use tramp but if I’m sshed into that machine already it’s convenient to just bring up emacsclient on the remote machine. Wall’s et script is perfect for that. Even if the remote machine doesn’t have a copy of the et script installed, it’s simple to call emacsclient directly

emacsclient -a "" -t file-to-edit

If you use Emacs and ever ssh into remote machines, this is a technique worth knowing.

Posted in General | Tagged | Leave a comment

Org Schedules and Deadlines

Ben Maughan has another great post in his Org mode series. This time, he augments his simple TODO list with schedules and deadlines. Org mode is famously flexible and that can make it hard to settle on a strategy for handling and displaying your tasks and agenda. Maughan shows us how he does it and provides some excellent ideas.

The real benefit of his post, I think, are the configuration items he uses to get his desired behavior. He explains each one in the comments so you can see what they’re supposed to do and look at the results in the accompanying screen shots. You can pick and choose from his list of configuration items to get a behavior that works for you.

It’s important, though, to remember Carsten’s advice for setting up your task management: don’t try to create a final strategy from the beginning. Start small and simple and let your strategy grow organically as you discover what works best for you. That means you shouldn’t blindly adopt someone else’s configuration. Rather, use interesting configurations like Maughan’s to discover what’s possible and steal the pieces that fit in with your workflow.

As I’ve said before, Maughan’s posts are useful and interesting so you should definitely put Pragmatic Emacs in your feed. The posts are usually short and pithy so you won’t have to spend a lot of time with them. A definite win for a small investment.

Posted in General | Tagged , | Leave a comment

Switch to Editing a File with SUDO

Here’s a very useful tip

especially if you administer your own machine and often need to edit root-owned files.

If you’re like me, you forget to open the file with SUDO. Fortunately, Emacs protects you from making a lot of changes that you can’t save by marking the buffer read only but you still have to back out of the file and reopen it with SUDO. With Thaiyar’s tiny Elisp function, you can just push a button and automatically re-open the file with SUDO.

Even if you don’t want to install the code in your config file or you find yourself on someone else’s machine, you can do the same trick manually1.

Footnotes:

1

Although to be fair, it’s not clear that that would be much easier than just starting over.

Posted in General | Tagged | 5 Comments

Diffie-Hellman Explained with Paint

A cornerstone of modern secure communications is the Diffie-Hellman key exchange. It solves the problem of two communicators who may not know each other and haven’t previously agreed on a key to negotiate a secret key in public. This may seem impossible1 but there is, in fact, a simple solution. The solution is simple enough that anyone with, say, a high school mathematics background can understand it easily. Here’s my attempt at an explanation.

Yesterday, though, I saw a video that explains the method in such a simple and clear manner that even a grade school kid still struggling with arithmetic can understand it. The video uses the metaphor of mixing paints to explain the idea of the algorithm. After that it also goes through the mathematical explanation but that seems easier and more natural after the paint explanation.

Most Irreal readers, I’m sure, already understand Diffie-Hellman or would have no trouble understanding it once they saw an explanation. Even so, the video is very much worth watching. By stripping away the mathematics it makes the idea behind the algorithm come alive.

Footnotes:

1

Indeed, Ralph Merkle, who independently discovered the method, was trying to prove that it was impossible when he discovered it.

Posted in General | Tagged | Leave a comment

Using Yasnippet with Mu4e

Ben Maughan over at Pragmatic Emacs has a followup to his great post on mu4e and Org-mode. Since he recently moved from Thunderbird to mu4e, there are still a few gaps in his email workflow. One of those is the Thunderbird quicktext functionality that provides templates for common email message types.

Following Bin Chen’s excellent examples, he implemented his templates with yasnippet. There are a couple of lessons here. First, of course, is that if you are missing some functionality that you’re used to from a program you’re no longer using, it’s usually pretty easy—trivial even—to implement it in Emacs. Yet another reason for moving as many tasks as possible to Emacs.

Second is the power of yasnippet. Whatever you’re doing in Emacs, you can almost certainly do it more easily with yasnippet. As Maughan demonstrates (really, just hints at) they are much more than static templates and can be programmed for a rich set of behaviors. If you’re not already using them, you should definitely check them out.

Posted in General | Tagged | Leave a comment

Research Paper Workflow

In a comment on my post Why I Use Emacs, which was mostly a hat tip to Don Knuth’s observation about enjoying your tools, Nick Higham points us to his post on the same quote. Higham is a mathematician whose excellent post on LaTeX tips for n00bs I’ve mentioned before.

Higham’s post is about workflow and in it he points to an article he wrote about research paper workflow. Although targeted at mathematicians, any researcher using LaTeX will find the article useful and informative. If you produce reports or articles with LaTeX, you should definitely give the article a look.

Although I don’t spend a lot of time with LaTeX these days, Higham’s workflow is similar to mine in that he does everything he can from within Emacs. Even his blog, like mine, is produced with org2blog. Higham, like John Kitchin, is proof that Emacs is useful far beyond the realm of software engineering.

Posted in General | Tagged , , | 1 Comment

Nothing to Hide? Lose your Curtains.

It may seem facile but it makes a legitimate point: there’s a difference between secrecy and privacy. As Cory Doctorow says, everyone knows what goes on in the bathroom but no one wants to share it with the world.

Posted in General | Tagged | Leave a comment

Org 8.3.3

Bastien Guerry announces that he has released Org mode 8.3.3.

It’s a bug release so you should definitely upgrade. If you’re like me, you’ll get it automatically when you upgrade your ELPA packages. However you do it, be sure to get it installed.

Posted in General | Tagged , | Leave a comment