Ogbe on Why He Uses Emacs

Last week I wrote about how Dennis Ogbe uses Org Mode to Blog. While I was on his site, I looked at some of his other posts and found one about why he uses Emacs.

The post was written fairly early in his Emacs use so it has the air of discovery that we all feel when we start. It’s a nice post and something worth pointing prospective Emacs users to. If someone asks you why they should use Emacs, this is a good explanation of some of its benefits.

The main features Ogbe found compelling were

  • TRAMP
    Ogbe is a PhD student and does a lot of work on remote machines. Before Emacs, he was using SSH and Vim to edit files remotely. With TRAMP, he simply opens the remote file like he would a local one but with a filespec that includes the remote machine’s name.
  • dired
    One of the things that Vim users are always doing is dropping into the shell to run an ls to find the name of a file to edit. With dired, you can do all this without leaving Emacs. Of course, you can also perform the common file operations—renaming, copying, changing permissions, etc.—that you might otherwise do in the shell from dired too.
  • Org Mode
    At this point in his Org mode use, Ogbe was using it mostly for writing READMEs and taking meeting notes. You can see in his later posts that he started using more of his potential, including using it to publish his blog as I wrote about previously.
  • mu4e
    Ogbe discovered early on the benefits of moving as much as he could into Emacs. He uses mu4e to handle both his school and personal email. Like Ben Maughan he found that mu4e brought speed and simplicity to his Email chores.
  • MATLAB
    Ogbe is in Electrical Engineering and does a lot of work with MATLAB. He doesn’t like their GUI app and used to run the MATLAB shell in a separate window with tmux. Now he just uses matlab-mode and keeps everything in Emacs.

Those of you that have been around Irreal for a while know that I like reading about how other people use Emacs and integrate it into their workflow. If you’re the same way, you’ll probably enjoy reading Ogbe’s post.

Posted in General | Tagged | 1 Comment

The Piper Sends its Bill to the NSA

The NSA has been playing fast and lose with its duty to secure our communications by arranging for backdoors to be inserted into our cryptographic protocols. Everyone familiar with the situation is convinced that the NSA diddled with the Dual_EC_DRBG random number generator, had it vetted by NIST, and then pushed to have it deployed as widely as possible.

Recently, it became known that

  • Juniper Networks used the Dual_EC_DRBG RNG in its products but changed the constants that constituted the back door.
  • Someone had replaced the Juniper constants with other values presumably opening another backdoor.
  • These Juniper devices are widely used throughout the US Government.

As things stand now, someone—believed not to be the NSA—has a backdoor into scores of government networks. This is possible because the NSA valued its ability to spy on everyone more than their duty to help us and the government secure its communications. How does this advance our national security?

There’s a lesson here for everyone who thinks encryption backdoors should be inserted into our communication products. They have a way of circling back and biting you in the butt. Someone always find a way to exploit them and turn them against whoever installed them in the first place.

The NSA and GCHQ internally trumpeted their ability to break into Juniper devices. I bet they’re not high-fiving now.

UPDATE: GCHG → GCHQ

Posted in General | Tagged | 2 Comments

A Magit Tip

A nice tip from Wilfred Hughes for Magit users:

Posted in General | Tagged , | Leave a comment

More Backdoor Silliness

Benjamin Wittes over at Lawfare has posted a particularly silly idea for forcing vendors to install encryption backdoors: simply withdraw CDA §230 protection from any company that does not provide an unencrypted copy of any data they carry. The CDA (Communications Decency Act) protection Wittes is talking about is the law that says a service that merely carries data from third parties can not be held civilly liable for that content. Why shouldn’t the government, Wittes asks, condition its ‘great gift’ to service providers on their willingness to assist the government with decryption?

In the first place, it’s hard to see how saying “you’re not responsible for what someone else does” can be characterized as “a great gift from the government.” Secondly, it shows an astounding ignorance of who the players are and how they depend on §230.

Robert Graham has a splendidly entertaining rant explaining why this is just nonsense by someone who doesn’t understand the Internet or crypto. Graham certainly knows about the Internet and crypto but maybe he’s wrong about the law.

But no, not even Wittes co-bloggers are buying his ideas. Nicholas Weaver takes to Lawfare to describe in detail why Wittes is wrong and his ideas won’t work. Companies like Apple—one of the major targets of those pushing for backdoors—carries virtually no third-party data and does not depend on §230. Companies like AT&T that do depend on it have nothing to do with the encryption that law enforcement is concerned about.

Sadly, Wittes’ argument is typical of those advocating backdoors: it reveals that he doesn’t understand crypto, how it’s used on the Internet, or by whom.

Posted in General | Tagged | Leave a comment

Magit: Staging All Files Including Those Untracked

A nice tip from Xah Lee that I didn’t know about

Posted in General | Tagged | Leave a comment

Navigating to a File

If you’re like most people, you access your files by navigating down the directory structure to them. That’s not the only possibility though. You could also use one of the search engines built into your operating system. If you can’t remember where a file is, you may have to use this method.

It turns out though, that people prefer navigating to files over searching for them. Looked at rationally, that seems backwards. Most times search is faster both when storing files and when locating them. Karl Voit, whose tweet lead me to the video linked below, has done extensive research in this area and uses a file naming convention that aids in using search techniques for locating files. Still, most people prefer the navigation method.

Ofer Bergman has a very short video (1:42) that explains why this is. The video is so short and to-the-point that giving a TL;DR doesn’t make sense. Just go watch it; it’s interesting and helps explain why search-based file handling hasn’t taken off.

Posted in General | Tagged | 1 Comment

Entering Accented Characters in Emacs

John D. Cook points out that it’s pretty easy to enter accented characters, ç, ü, é, etc., in Emacs by typing【Ctrl+x 8】followed by a punctuation mark and letter. For example, to get ç you type 【Ctrl+x 8 , c】. Cook’s post has a chart of the possible accented characters.

I prefer to use the TeX default input method for entering accented characters but the method that Cook describes works well too. There are more possibilities than those in Cook’s chart. The easiest way to see them is to type 【Ctrl+x 8 Ctrl+h】.

Posted in General | Tagged | 3 Comments

Happy Birthday!

Today Ken Thompson is 72. Happy Birthday, Ken, and may you have many many more.

UPDATE: Well actually it’s tomorrow so consider this early birthday greetings.

Posted in General | Tagged | Leave a comment

Blogging with Org Mode (Only)

Dennis Ogbe has a blog that he writes in Emacs with Org mode. There’s nothing unusual about that, of course; lots of people do. All Irreal posts begin life as an Org file that is exported to HTML and pushed to my WordPress site by the excellent org2blog/wp package. What makes Ogbe’s blog different is that everything (posts, archive, RSS feed) is generated as static pages directly from Org mode. There’re no external packages to worry about; it’s all just Emacs and Org mode.

In an interesting post, Ogbe describes how he does this. Many of us use Org mode to write content and export it to HTML but Org mode provides a much more comprehensive functionality with its publishing system. Ogbe uses this to describe his site and take care of most of the details of publishing it automatically. He chooses to rsync the completed HTML to his hosting provider manually but that, too, could be done automatically by leveraging Tramp.

I prefer to let WordPress worry about RSS, the archive, and things like that but many bloggers would rather have a simple system with static pages and the simplicity (and security) that they enable. If you’re one of those people, take a look at Ogbe’s post; it can serve as a useful go-by for rolling your own. Be sure to check out the three example sites that Ogbe used as his own go-by. They have lots of good ideas too.

Posted in General | Tagged , , | 1 Comment

Emacs pcase

Pattern matching is a powerful paradigm in programming. Recent versions of Emacs Lisp implement this paradigm with the pcase macro. Unfortunately, pcase can be a bit difficult to understand. Fortunately, our Emacs maintainer, John Wiegley, has published an excellent tutorial on its use.

The tutorial doesn’t address how to leverage pattern matching in your programming but it does cover the use of pcase. It’s a powerful idea and can often be useful. Take a look at Wiegley’s tutorial to get started.

Posted in Programming | Tagged | Leave a comment