Adding Hyper and Super Keys for Emacs

I’ve written about this before but it was a few years ago so it’s worth repeating for new Emacs and/or Mac users. One problem with Emacs is that it’s hard to find enough shortcut keys. Having Hyper and Super keys helps a lot but, of course, modern keyboards don’t have them. Fortunately, modern keyboards do have keys that are otherwise unused in Emacs and they can be drafted as substitutes for Hyper and Super.

Xah Lee has has a page that shows how to set Hyper and Super keys for Linux, Windows, and macOS. For the Mac, he recommends setting the ⌘ Cmd key as Meta and the ⌥ Opt key as Super. That’s common advice but I’ve never understood it. Emacs already considers the ⌘ Cmd key to be Super and, at least on my Mac keyboards the ⌥ Opt key has a sublabel of Alt so it makes sense to me to use the ⌥ Opt key as Meta and the ⌘ Cmd key as Super.

That leaves the Hyper key which, following Magnar Sveen’s advice, I map onto the fn key. It seem like begging for trouble to use fn and ⌘ Cmd this way since they have important OS functions that you might want to access from within Emacs but it turns out that they still perform those functions despite the mapping. For example, fn+F8 still pauses/restarts music even when fn is mapped to Hyper.

It’s really useful to have these extra modifier keys to use with 3rd party packages or even obscure standard Emacs functions. Take a look at Lee’s page to see ways of getting them on your platform.

Posted in General | Tagged | 6 Comments

Open Offices and Sickness

In a study that should surprise absolutely no one, a paper in the Scandinavian Journal of Work, Environment & Health concludes that occupants of open plan offices take 62% more sick days than those with private offices. (The paper itself is short and can be found here by clicking on the PDF button at the top.)

The first link takes you to a nice summary of the research, its methods, and its results. Even sharing an office with one other person results in a significant increase in sick days. Unless you think that there’s something special about Danish workers, this is devastating to the usual arguments management proffers in support of open plan offices and even argues against their real, hidden reason of cost reduction. If those open plan offices are increasing sick days by 62%, how long will it take to swamp the costs of a proper office buildout?

If you’re a parent with school age children, you see this phenomenon in action everyday. Kids go to school and come home with colds because they’re in the same room as kids who are already sick. Why would you think it would be different just because it’s adults instead of kids and offices instead of schools?

Posted in General | Tagged | Leave a comment

Org Mode as an Exocortex

Jeff Terrell has an interesting video up that considers Org mode’s role as an exocortex. By “exocortex” he means (roughly) “memory external to your brain that helps you remember things you don’t need to be thinking about right now.” The idea is to improve your focus by offloading facts that aren’t important to the task at hand.

On the one hand, there’s not really anything new here. Most of us maintain a TODO list to record tasks that need doing but that we aren’t working on right now. By not having to keep those in our active memory, we can improve our focus on the current task. As Terrell says, there are many devices that can serve as an exocortex: a notebook, a calendar app, and the many software implementations of a TODO list.

His video considers why Org mode is a excellent exocortex and he looks at ways to use it for that purpose effectively. Terrell goes over some of the features of Org and shows how they can be used to improve your focus by not having to worry about remembering future tasks. Most of the features he considers are those comprising the agenda and capture functions in Org. He does not, for example, consider Babel or the publishing aspects. One nice feature that he’s configured is the ability to pop up a capture buffer from anywhere in his system. That makes it really easy to capture an idea or task in a low friction way. I have the same thing and use it all the time. It’s hard to overstate how useful it is.

One other point that Terrell mentions is that it’s really handy to be able to carry your exocortex with you and Org’s iOS and Android apps make that possible. He even gives an example of recording things he needs to talk to his wife about and checking his phone at dinner to see what they are.

The video is 14 minutes, 45 seconds long so you can easily fit it into a coffee break. It’s definitely worth while watching, especially if you aren’t already an Org user and are trying to figure out if it could be useful to you.

Posted in General | Tagged , | 1 Comment

Emacs Rocks! #17: Magit

Magnar Sveen is back with another Emacs Rocks!. This time he discusses Magit. He starts by saying how Magit gives you all the information you need without having to invoke several git commands on the command line. Then he suggests that rather than doing a pull to update the local repository, you should fetch the data instead. That allows you the opportunity to check out the changes and stay up with the code base.

Sveen goes on to demonstrate some of features of git/Magit such as committing chunks instead of whole files, spinning off changes to a new branch, and editing a commit. He goes through that material fairly quickly so it’s a bit harder to follow. Part of the problem is that he has highly customized key sequences so it doesn’t make sense to show his keystrokes as he did in his earlier videos.

Still, it’s a great video and if, for some reason, you’re not already a Magit user, this video may convince you to give it a try. The running time is just 2 minutes 39 seconds so you watch it whenever you like.

Posted in General | Tagged | Leave a comment

Kitchin on Org Entities

Last week I wrote Olivier Berger’s tweet pointing at org-entities-help and remarked what a boon it was to me because I can never remember the names of encodings. Yesterday, John Kitchin commented that he has written a bit of code for inserting org-entities (as well as the \(\LaTeX\) or HTML encodings or even the glyph itself). There are two functions: one that works with Helm and another that works with Ivy.

These are really nice because you can use the Helm/Ivy filtering to narrow down to the entity you want. For example, if I want a ‘U’ with an umlaut, I bring up the function, type “uu” and Ivy narrows the choices down to the two entries (capital and lower case) with an umlauted U, Ü. If I just type Return, the UTF glyph is inserted. If I type Meta+o (in Ivy, Helm, presumably, has a similar mechanism) I get a menu that allows me to enter the org-entity, \(\LaTeX\), or HTML encodings.

Unless you’re participating in a discussion, most of you won’t see the comments for a particular post so I’m writing this up separately so that everyone can all take advantage of Kitchin’s excellent contribution.

Posted in General | Tagged , | Leave a comment

Building Presentations

Oskar Wickström has a nice post on automating the build of your technical presentation. Wickström likes to develop his code examples and diagrams concurrently with the text of the presentation. That means that the code and diagrams can change often as the presentation evolves. His post discusses ways of automating the process—essentially through a make file—so that anything that’s changed gets rebuilt and added to the presentation.

Wickström is not an Org mode user so his process involves Markdown, Pandoc, and Beamer. If you, too, don’t or can’t use Org, his post has some good ideas to make the process smoother.

What struck me, though, was how much easier things are with Org. The code is simply embedded in the document and compiled and run in place, automatically adding its output to the document. Likewise, diagrams and graphs are generated automatically from commands embedded in the source document. Finally, the presentation can be exported to Beamer—that’s what Wickström is using—or perhaps reveal.js. Mike Zamansky has a great video that shows how easy it is to make really nice presentations with Org mode and reveal.js. Everything is in a single Org file so you don’t have to worry about copying the latest code into your source document. It’s a very smooth and easy process.

Posted in General | Tagged , | 2 Comments

A Graphviz Go by

As I wrote the other day, the Graphviz dot language for drawing graphs is pretty simple and easy to learn but if, like me, you don’t use it very often, it’s easy to forget the details. There’s an excellent manual and a man-page-like reference page but for most diagrams you only need a a few of the commands.

Justin Worthe over at Worthe It has a very nice introduction to Graphviz (actually dot) that’s worth bookmarking. Then when you want to draw a graph you can use his examples as a go by. Be sure to also take a look at the list of attributes that he links to. As Worthe’s examples show, it’s amazing how much you can do with just a few easy-to-learn commands. It’s especially useful if you write with Org mode because you can embed the dot commands in an Org source block and have the diagram automatically embedded in your document.

Posted in General | Tagged , , | Leave a comment

WeChat and Privacy

As most of you know, I’m a big fan of the “digital life.” By that I mean moving as many chores and record keeping tasks as possible into the digital realm—in particular, onto my iPhone. Thus I pay almost all bills digitally, take notes, scan and store receipts, keep copies of important documents on my phone, and generally strive towards making my iPhone the only thing I need to carry.

I haven’t quite emptied my pockets of everything but my iPhone although it’s certainly possible as WeChat users in China have shown [1, 2, 3]. As I wrote in those previous posts, though, I’m not necessarily looking for a single portal like WeChat and in particular, I have no interest in installing WeChat. This article explains why.

WeChat is manufactured by the Chinese company Tencent and has therefore long been suspected of sharing its users’ data with the Chinese government. As the article makes clear, this is indeed the case and virtually everything a user types into the app is recorded and made available to the government. This isn’t Tencent’s fault of course: they have to abide by the laws of their country just as American firms have to abide by US laws. Nonetheless, I have no interest in sharing the details of my, admittedly mundane, life with the Chinese or anyone else.

What I’m hoping for is Apple Pay or something like it to become universal so I can ditch my cash and credit cards and for more services (governmental, taxi, takeout ordering, and so on) to be available through a smart phone app. I don’t care if there are multiple apps. In fact, that’s probably preferable because it eliminates a single point of failure (or attack). As I’ve said before, I don’t think we in the West will have to wait much longer. The Chinese have already shown it can be done and Apple has shown it can be done securely and privately.

Posted in General | Tagged | Leave a comment

Zamansky 37: Treemacs

Mike Zamansky has a new video up. This time he discusses the Treemacs file browser. The idea is to recreate file browser side tab that editors like Atom popularized. You can watch the video to see its features and how it works or you can check out the project README at GitHub. One nice feature is its integration with Evil and Projectile.

Coincidentally, I read the project description just before I saw Zamansky’s video. Like him, my first thought was, “That’s nice but I probably won’t use it.” My reason for that is that it takes up valuable screen real estate but doesn’t offer me a compensating efficiency gain. I don’t use the mouse in Emacs so navigating through the menus would take longer than finding the file with my usual Avy assist. Helm or ido users would doubtless find the same.

You could argue that it helps when you’re not familiar with a directory structure but in those cases Dired offers the same functionality and gets out of the way once you’ve picked your file. Still, if you’re coming from Atom or one of the other editors offering a file browser or if just like the idea, you might want to give Treemacs a try. It’s not that I think there’s anything wrong with the package, it’s just that it doesn’t fit in with my workflow.

Zamansky’s video is just short of 10 minutes so it should be easy to fit it in. Like all of Zamansky’s videos, it’s definitely worth the time.

Posted in General | Tagged | Leave a comment

Karl Voit on the Superiority of Org Mode Markup

I’ve been following a tweet discussion between Karl Voit and several others over the relative merits of light weight markup languages. You can get a feel for the arguments by expanding the following:

Tweets are not, of course, a very good platform for making reasoned arguments about technical issues or anything else for that matter so Voit has pulled his arguments into a blog post in which he make the case that Org-Mode Is One of the Most Reasonable Markup Language to Use for Text. As I’ve said many times, I do almost all my writing these days in Org mode so I already agreed with his conclusion but Voit makes a good case for his conclusion.

He looks at several light weight markup languages such as Org mode, Markdown, AsciiDoc, Wikitext, and reStructuredText and identifies how Org is superior to them. He notes that Org is better even without Emacs because you can write it in any editor and use tools like pandoc to get it into whatever final form you need.

Of course, the right tools make all the difference and using Org markup from within Emacs is a real win. Still, even some people who prefer not to use Emacs, write Org markdown in some other editor and convert it using pandoc. Even if you don’t already agree that Org syntax is the best, be sure to read Voit’s post. He’s got some good arguments and may convince you.

Posted in General | Tagged , | 5 Comments