An Org Mode Workflow

Ayrat Badykov has an interesting post on his Org-mode workflow. In it he shows how he leverages Org mode to be more productive. What I find interesting—other than that I always find workflow articles interesting—is how far he gets using just a few basic Org features. He mostly uses just the list making and agenda functions of Org but still manages to organize his day. Doubtless, he’ll find, as many of us have, that his use of Org will grow organically (heh) and that he will start using more and more of its functionality.

If you’re a n00b, one of the important lessons to take away from Badykov’s post is to start small. Org has a lot of features, many of which are orthogonal to the others. You can make lists and schedule items with it. You can also write and publish papers with it. Or you can use it for literate programming or even to organize your Emacs configuration.

There’s too much there to learn all at once but you don’t need to. Learn a couple of its capabilities and integrate them into your workflow. You’ll find yourself thinking, “Gee, it would be nice if I could …,” check the manual and find that, in fact, Org can do that. Before long you’ll find yourself using a significant portion of Org’s functionality.

Posted in General | Tagged , | Leave a comment

A Road to Common Lisp

I had years of programming experience before I learned Common Lisp—or any Lisp, for that matter—and I’ve always regretted it. Lisp teaches you new ways of thinking about programming and every programmer should be familiar with it even if they never use it in a non-trivial way. Emacs users have an advantage here because it’s almost impossible to use Emacs without learning at least a little Lisp.

The problem is that it’s hard to get started. Lisp is the second oldest (non-assembler) programming language and some of the terms it uses have different meanings now. Steve Losh has performed a public service by publishing A Road to Common Lisp, a longish post on how to get started with Common Lisp. He doesn’t teach you the language or how to program in Lisp; he focuses on the steps you should take and the resources you should use to learn Lisp and to set up a reasonable Lisp programming environment.

His first piece of sage advice is not to worry about an editor. Use whatever editor you’re familiar and comfortable with. Later, when you get more experienced, he says you’re going to have to choose between Vim and Emacs because of their Slime or Slime-like plugins. He’s a Vim user himself so this is more than a roundabout piece of Emacs evangelism.

He goes on to suggest some useful books and explain some of the harder concepts like “packages,” “systems,” and “projects.” Finally, he discusses some of the popular libraries that perform tasks not built into the language itself. It’s a great post and should be very useful to n00bs. I wish I’d had it when I was learning Lisp.

Posted in General | Tagged , | Leave a comment

Mike Elgan on Google

I’ve been reading Mike Elgan since his article on the New Bedouins in 2007. He still writes about technology but is increasingly focusing on traveling to exotic places and sampling their food and wine. One of his latest posts on technology bemoans the shuttering of Google+.

Google has become, he says, the new Yahoo. By that he means that, like Yahoo, Google introduces new products with great fanfare and once its users become dependent on them, abandons the products. Google+ is just the latest example. Ironically, Elgan makes a compelling case for not trusting Google or depending on their apps but then reveals that he’s still depending on Google Photos and—worse yet—Google drive.

I don’t get it. You spend a whole article articulating why you shouldn’t use Google apps yet you continue to commit some of your most precious content to it. Several of the commenters are in the same boat.

These folks are going to get burned. That is what happens when you depend on Google for anything. Sooner or later they’re going to pull the rug out from under you. It’s impossible, as a practical matter, to get away from all their apps. If you want to watch a video, for example, the chances are overwhelming that it will be on YouTube. But there’s a difference between consuming someone else’s content on a Google app and committing your own data to it.

Of course, none of this addresses the—even worse in my opinion—Google practice of reading your documents and locking your account if they find something they don’t like. The engineers writing the AI to do this aren’t nearly as clever as they think they are so they get false positives. That means a completely innocent research paper on Google Docs, say, could get flagged as Bad Think™ and just like that you lose your work. Why would anyone subject themselves to this?

Elgan wonders where people should go in a post-Google+ world to express their views and share their content. It’s not that expensive to get a domain and rent a virtual server. Irreal costs less than $10 per month. Then you can have a blog and build a community around it. It’s completely portable and if the provider goes out of business (or doesn’t like you) you simply move to another provider and update your DNS. Users wouldn’t even have to be aware of the change.

Posted in General | Tagged , | Leave a comment

More Pro Tips from Ambrevar

I was looking for something to write about and found this (slightly old) post from Ambrevar (Pierre Neidhardt) on some useful Emacs tips. He begins with a couple of tips to speed up Emacs loading. I last restarted Emacs when I updated my OS to Mojave so this is not something I worry about but some people—especially Emacs developers—restart Emacs more often so having a fast startup time can be a win.

He follows with a couple of tips to control package loading. One tip makes sure that the latest code is loaded even if it’s not byte compiled. The other sets up a local Lisp site directory.

There are some tips on controlling modes and a bit of Elisp that uses youtube-dl to download the video URL at point. There are also some suggestions for improving your workflow such as using lispy instead of paredit and turning on parentheses matching and possibly rainbow delimiters.

There are a few more tips as well so be sure to take a look at Ambrevar’s post. And while you’re at it, take a look at his first post on Emacs tips. After all, who doesn’t like learning some tips that will improve your workflow?

Posted in General | Tagged | Leave a comment

Advanced Hashing Techniques

One of the first advanced programming techniques I learned back when I was beginning was the use of hashing for fast table lookup. The use of the adjective “advanced” probably looks strange to younger engineers who are used to languages like Perl, Python, and others that have dictionaries or hash tables built in but they weren’t as well known back then except, of course, that Lisp already had them. Regardless, I was fascinated with the technology and read everything I could find about them. During my career I’ve implemented hashing tens or even hundreds of times.

Attractivechaos over at Attractive Chaos has a very nice post on Advanced techniques to implement fast hash tables. He begins by noting that open hashing is very often faster than the chaining method. That’s a bit counterintuitive for me, perhaps because chaining seems more deterministic even though it really isn’t.

He then goes on to discuss some advanced techniques that can be used to speed up hashing. He concludes by noting that the choice of a hashing library is always a tradeoff and there is no “best choice.” He says there probably isn’t even a best choice for the fastest hashing method.

It’s a fairly short post and well worth reading for anyone who uses hashing in any way more significant that just using Perl or Python’s associative arrays.

Posted in Programming | Tagged | Leave a comment

Ignoring Files Locally in Magit

I learned two things I didn’t know about Magit from a post by Marcin Borkowski (mbork). The first is that you can exclude files locally. That is, you can ignore files just as if they were in .gitignore but that information doesn’t get committed as it does with .gitignore. That’s handy when you’re working in a team and have some local files that are peculiar to you and that you don’t want committed.

The other information is how to add those files to the exclude list from within Magit. Head on over to mbork’s post to get all the details.

Posted in General | Tagged , | Leave a comment

Configuring Org Mode to Look Like a Word Processor

Last month, I wrote about clean screen writing where all the extraneous information is removed from the screen and the writer is presented with a “blank page.” In the same vein, Abhinav Tushar has an interesting post on making Org mode itself look like a word processor. By that he means that Org looks like a word processor as you enter text.

Mostly it’s a matter of picking a nice font, a nice background, adjusting the spacing, and getting rid of everything but the text you’re editing. That include hiding all the Org markup and #+ commands. The result, I must admit, looks gorgeous. Still, as I said in the blank page post, it’s not for me. When I’m writing, I like to see the markup because, among other things, it makes it easier to edit the text.

Not everyone will agree, of course, so you should take a look at his results to see if they’re something you’d like. He has links to his configuration so it shouldn’t be hard to recreate his setup or use it as a jumping off place for your own. Even if you don’t want his setup, you might like using a proportional font in Org. He uses the ET Book, which looks very nice. I am impressed at what he was able to do and how nice it looks.

Posted in General | Tagged , | Leave a comment

The Real Point of All the Talk About Tech Addiction

I’ve written at length about so called “tech addiction” and why I don’t believe there is such a thing—at least not for the vast majority of people not already suffering from psychological disabilities. It makes no difference. We continue to see article after article assuring us that the problem is real and that something must be done.

Having a nasty, suspicious mind, I’ve long suspected that someone is trying to sell us snake oil. Now an article from Loupventures make this explicit: Solving Tech Addiction Is an Underappreciated Market Opportunity. Loupventures is an investment firm so they probably aren’t selling snake oil themselves but they do recognize that there’s money to be made.

As far as I can see, those pushing the tech addiction meme are either clueless journalists looking to fill today’s 500 word slot or someone with something to sell. Don’t take my word for it; read what psychologist Christopher J. Ferguson has to say. When you do, you’ll notice that the Loupventures article starts with assuming most of the myths that Ferguson debunks.

The people pushing this meme are beyond tiresome and I wish they’d stop.

Posted in General | Tagged , | Leave a comment

Virtualized Emacs

I’ve been happily Windows free for more than 20 years but it’s a sad fact that some of our brethren are forced, for reasons beyond their control, to work in the Windows environment. That’s hard on any Unix-head but especially so for Emacs users. It’s a sad fact that Emacs just doesn’t run very well on Windows and setting up the environment is harder than it should be.

Adrien Brochard recently gave a talk to the New York Emacs Meetup on his solution to this problem. He’s a Linux guy whose current job requires he work on a Windows machine. His answer is to Virtualize Emacs. What that means is that he runs Emacs on Arch Linux that in turn runs in a VirtualBox instance. As Brochard points out, this works even on locked down machines to which the developer doesn’t have administrative rights.

One of the nice things about this solution is how easy it is. Brochard has some scripts he uses to automate the installation of Linux and Emacs. During the presentation, he builds the entire environment, including VirtualBox, from scratch. It takes about 25 minutes but most of it is automated so that once he starts it, he can go on with his presentation. He says that even if you get something wrong you can simply blow away the VirtualBox instance and start over.

There is, of course, some overhead and Brochard does a good job on discussing that aspect too. All things considered, though, he believes that it’s the best solution for running Emacs on Windows.

The video is about 33 minutes so plan accordingly. It’s an excellent presentation and interesting even if you aren’t faced with running Emacs on Windows.

As a final note, I’ve discovered that I’m more partisan about editors than I thought. Back in 2016 I was outraged when someone did something similar to run Notepad++ under Ubuntu. In retrospect, it seems that it was the idea of using Notepad++ that outraged me not the use of a virtual environment to run it in.

Posted in General | Tagged | Leave a comment

Formatting Tables

If you’re like me, you automatically think of the Org mode table editor (or Orgtbl minor mode) when you think of tables in Emacs. It’s hard to beat that functionality and Orgtbl mode makes it available everywhere in Emacs, even if you’re not in an Org buffer. Sometimes, though, you’d like to have special formatting for some or all of the table. That’s where delim-col comes in.

Delim-col is built-in Emacs functionality that allows you to do things like adjust what string separates the columns, add a beginning or ending string to each item, add an ending string for each row, and adjust the padding in the table. It can be really handy for copying and pasting and then reformatting tables from an external source.

I didn’t know about delim-col until I read about it over at Emacs Notes, where you’ll find a good explanation of the facility and what it can do. The Emacs Notes post also offers at bit of Elisp to make choosing the strings and delimiters a bit easier. By default you have to set them using a series of setq statements if you want something different from the built-in choices. The Emacs Notes codes arranges for you to be prompted for the values.

You probably won’t need the delim-col functionality very often but when you do it’s much easier than using something like a keyboard macro. Take a look at the post and see if you don’t agree.

Posted in General | Tagged | Leave a comment