Inserting an Org Date Quickly

Here’s a useful tip:

It’s obvious, of course, but for me, at least, it’s a subtly different way of thinking about it. Instead of the two step process of bringing up the Org calendar dialog and then choosing a date, you do it in a single operation: 【Ctrl+c .friReturn】.

It’s worth pointing out that the above operation inserts an active date. If you want an inactive date use 【Ctrl+c !friReturn】 instead.

Posted in General | Tagged , | 2 Comments

Praising the Command Line

Stephan Ramsay has an interesting series of posts in which he takes the retro position that the command line is superior to a GUI. Even more radically, in the current milieu, he argues that the average user—the ever popular man in the street—would find the command line easier to use than a GUI if he could be persuaded to try it. In Life on the Command Line and The Mythical Man-Finger he explains why he thinks this is true.

Ramsay isn’t one of those annoying people who does things like living without electricity for a week to make some silly point and show he can. As far as the command line is concerned, he walks the walk. He notes that he has almost completely stopped using graphical tools on his computer and that when he does it’s to surf the Web.

To illustrate his point, he starts with email. GUI email programs are slow and waste time. Why, he asks, does Gmail start so slowly that it shows you a progress bar? He compares that to a text-based email client like mutt or pine where you simply type the name1 to start the app and bang! you’re looking at your mail. Type another key and the app quits and is gone. All without taking your hands off the keyboard.

If you choose the right text-based email client, you can integrate your email with the rest of your system to perform tasks that the client itself doesn’t support. Ben Maughan’s post on how he handles email with mu4e is an excellent example of this. Maughan shows how he can search for emails, integrate an email into a TODO list, and easily archive those he wants to save all from the keyboard.

In the second post Ramsay takes up the complaint that he’s a power user and what he does is beyond the capabilities of the average user who just want things to work. While acknowledging that he is a power user, he emphatically denies that using the command line is harder than using a GUI or beyond the average user’s capabilities.

In the first place, the ergonomics of a GUI make interacting with it slower and clumsier. If you’re having to take your hands off the keyboard to move the mouse around and click on things, you’re going to be slower than if you can type a key or two to do the same thing. Navigation can be more difficult too. If you have to pull down and menu and search for the right action, it’s going to be harder to do what you want to do.

To illustrate this, he considers a notional command line music application. Instead of bringing up a GUI, scrolling around looking for the track you want and clicking on it, you merely type

play "Comfortably Numb"

Want to hear it again?

play last

In the mood for more Pink Floyd?

play pink-floyd

Ramsay goes on to show various other music player tasks that fit nicely into this paradigm. It is, he argues, easier and more natural than trying to do the same thing with a GUI.

Finally, in The Man-Finger Aftermath he discusses some of the points raised in the comments to his posts.

As retro as all this sounds, I realized that I do essentially the same thing because I mostly live in Emacs. Sure, I use the browser a lot but other than that, almost everything I do is in Emacs and while it’s not strictly speaking a command line, it comes down to the same thing. A lot of the time, I’ll pop into eshell to use some tool that’s not integrated nicely into Emacs.

Like Ramsay, I find working from the command line or Emacs much easier than messing around with the mouse and clicking on things. Whether that’s true for everyone, I don’t know but it’s worth pointing out that it used to be that the command line was the only thing available and somehow the average user managed.

Footnotes:

1

Or better yet have a hot key that starts the application automatically. That makes a lot of sense for applications that you use frequently.

Posted in General | Tagged , | 1 Comment

Org Agenda Capture

As often happens in Emacs, I hit the wrong key and stumbled upon a functionality I didn’t know about. It turns out that if you press 【k】 while in an Org Agenda buffer you will bring up a capture buffer for the date of the entry at point. How is this useful?

Suppose you have a journal or some other Org file organized as a date-tree and you remember that a couple of days ago you forgot to enter some event. You can go to the Org file and enter it by hand but the date-tree makes getting that correct fussy. It’s far easier to bring up the agenda, put the point on the date you want, press【k】and enter the information in the capture buffer as you normally would. The difference is that it will be put in the correct place in the date-tree.

This isn’t something I, or you, will need to do often but when you do it’s a real win. So much easier than trying to insert the entry in the date-tree by hand.

Posted in General | Tagged , | Leave a comment

Emacs 25.1 Pretest

Emacs 25 is drawing nigh. If you can, download the first pretest and help stamp out any remaining problems.

Posted in General | Tagged | Leave a comment

The char-menu Package

I just updated my ELPA packages and noticed the new package char-menu. It allows you to make a (possibly tree-structured) list of characters that you might want to add to an Emacs buffer. The obvious examples are round quotes—single: ‘’ or double: “”—, em and en dashes, arrows, and, perhaps, Greek letters.

This can be done in stock Emacs with the 【Ctrl+x 8】 prefix, of course, but then you have to remember the Unicode name for the character you want. In Org mode, a lot of these things are available with standard TeX shortcuts or by setting the input method to TeX. Still, you have to remember the names or shortcuts and it’s often clunky to use them. With char-menu, you hit a single shortcut key and you get a menu of the characters to insert.

The menu is Avy-based so it’s familiar and easy to use. The GitHub page for char-menu shows a simple list or characters and a more complex set with multiple levels. For my initial configuration I used the complex set minus the Greek letters. Here it is:

(use-package char-menu
  :ensure t
  :bind ("H-s" . char-menu)
  :config (setq char-menu '("—" "‘’" "“”" "…" "«»" "–"
                            ("Typography" "•" "©" "†" "‡" "°" "·" "§" "№" "★")
                            ("Math"       "≈" "≡" "≠" "∞" "×" "±" "∓" "÷" "√")
                            ("Arrows"     "←" "→" "↑" "↓" "⇐" "⇒" "⇑" "⇓"))))

I’ll probably modify this based on my usage but it’s a good beginning.

One other feature of the package is that when you have a pair of characters, such as quotes, char-menu will put the point between them. If you have highlighted text, char-menu will wrap the text with the two characters. It’s a very nice and light weight solution to adding UTF-8 characters to your Emacs buffers.

Posted in General | Tagged | Leave a comment

Spacemacs

There’s been a lot of buzz lately regarding Spacemacs. Probably the best way of describing it is as an Emacs environment that brings together VIM key bindings, an attractive UI, and a powerful customization capability. Sebastian Wiesner has a nice post on Why Spacemacs that describes the system and explains its advantages.

The first thing you notice is how beautiful the UI is, especially the mode line. The beauty is more than skin deep, though, because the UI, as Wiesner says, puts the user first. That starts with the VIM bindings, which given their composability, makes them very efficient and arguably superior to the standard Emacs bindings. Wiesner discounts the importance of those bindings but unless you’re coming from VIM, the modal editing experience, let alone relearning the key bindings, is going to be a high hurdle that most probably won’t want to deal with.

To me, the most interesting part of Spacemacs is its concept of layers. The idea is that instead of configuring individual packages, groups of functionality are enabled and configured as a whole. A layer may involve several packages so you can think of them as capabilities that can be configured without having to worry about the details. Sometimes, you need to worry about the details and want to tweak a layer’s behavior to suit your needs—it’s Emacs, after all–and the layer functionality provides this fine control when you need it. Of course, you can define your own layers in addition to the ones that come predefined with Spacemacs.

I come from decades of VIM use but when I started using Emacs, I didn’t feel the need to drag VIM along with me. I never, even in the beginning, used Vile or Evil, and I’ve been perfectly happy with the standard Emacs bindings. Still, if you miss modal editing and the VIM bindings you should definitely check out Spacemacs. Wiesner’s post is a good place to start

Posted in General | Tagged | 2 Comments

Presentations With Org Mode

Rob Rohan, whose work I’ve mentioned before, has posted a nice video about a bit of presentation software that he built. The software, bestowed, takes a normal Org mode outline and turns it into an HTML-based presentation. It does this with some Javascript and a CSS file, which are invoked by editing the Org mode headers. Nothing in Emacs or Org has to be changed for added to. The Org file is simply exported to HTML as usual.

Org has lots of ways to generate presentations and many of them have more capabilities than bestowed but if you’re looking for something quick and easy that will work, after adding a couple of headers, with Org files that weren’t written with it in mind, bestowed may be just what you need. If you’ve got a presentation in half an hour and would like to turn your Org notes into the slides for it, bestowed is perfect. There’s no export to PDF, so you’ll have to show the presentation in a browser.

The best way to understand the system is to watch the video and look at org file from which the example in the video was generated. The video is only 6 minutes 17 seconds so it’s easy to find time to watch it.

Posted in General | Tagged , | 1 Comment

Clocking In and Out

Sacha pointed me to this video by Mr. Swathe on logging the time spent on various tasks by clocking in and out with Org mode. The video is pretty elementary but it showed me enough to get going. I’ve tried to use clocking before but couldn’t get it to work. That’s because when I first started using Org, I didn’t know about the first rule for using Org and copied someone else’s configuration. Once I stripped out all that configuration from my init.el, it worked fine for me.

I don’t really have a need to track projects but readers who have been around for a while know I love to keep records so I decided to track how long it takes me to write each blog post. Most of you, I’m sure, have better applications and clocking really makes tracking your time easy. Watch the video and take a look at the manual to get going.

Posted in General | Tagged , | Leave a comment

We Need More of This

I love this. We definitely need more of it. My only suggestion is to make it longer. Making these busy bodies suffer is a moral imperative.

Posted in General | Tagged , | Leave a comment

Bling for Your Org Files

If you like bling on your desktop, Robert over at thraxys has some suggestions for prettying up your Org files. The first involves replacing the heading stars with various types of UTF-8 bullets. He recommends ◉, ◎, ⚫, ○, ►, and ◇ but there are other possibilities. These changes require the org-bullets package.

His second suggestion is to add UTF-8 glyphs to the TODO keywords. Take a look at his post for some suggestions. This is easy to configure with a stock Org mode installation.

I prefer a more austere presentation for my Org files but lots of people feel otherwise. If you’re one of those people, head on over and take a look at Robert’s post.

Posted in General | Tagged , | 1 Comment