Correcting Org Tags

A couple of days ago, I was adding some item to my journal—which is really my engineering note book—and when my capture template prompted me for a tag and I started to type it in, I noticed that in the list of suggestions (from Ivy) there was a misspelled tag. That happens fairly regularly. Sometimes I make a flat out typo, sometimes I unconsciously capitalize a proper noun (my policy is all tags are lower case), and sometimes I use a slightly different tag from what I usually do.

When I find a bad tag, I fix it by searching my agenda files with the m option from the Agenda menu1 to bring up the headlines with the offending tag and then fix it by editing the tag with Ctrl+c Ctrl+q.

This time, I’d finally had enough and decided to get rid of them all. The question was how to get a list of all the tags? I first tried grep but the result was a mess and too hard to work with. Then I thought that if Ivy was gathering that list for its completing read, there must be an easy way to do it. I asked for help on functions, typed in “org tag”, and looked through the completions until I found org-global-tags-completion-table. That did exactly what I wanted so I fired up ielm, invoked org-global-tags-completion-table, and had a nice list of tags. I didn’t bother sorting it, I just read down the list until a found a bad tag and called the match TAGS query to bring up the affected headlines so I could fix them. It turned out there were a lot of bad tags but it was easy, if boring, to find and fix them all.

The point of this post is twofold. First, Emacs gives you the tools to fix problems in your data even if several files are involved. It also gives you an easy way to discover those tools. Secondly, the exercise reminded me of the power of ielm. Usually, when I need to run a random elisp command I do it from the minibuffer. This time I needed an easily accessible list so I used ielm. I tend to forget about it but it’s often just what you need, even in situations that don’t involve elisp development.

If I had to do this a lot, I’d write some code to handle correcting the bad tags but that didn’t seem worth the trouble in this case. Still, if I ever decide I need to, Emacs has all the tools to make it easy.

Footnotes:

1

I use Ctrl+c a m but if your keybindings differ it’s the “Match a TAGS/PROP/TODO query”.

Posted in General | Tagged , | Leave a comment

Remote-First Companies

Kevin McArdle has an interesting post on working remotely. He makes an interesting point: we have all the technology to make working remotely a reality but we still talk of it as something in the future. Why, he asks, aren’t more companies remote-first?

The benefits of remote work are both obvious and documented. Companies save money—lots of money, it turns out—as do employees. Employees don’t waste time commuting or sitting in mostly useless meetings and are therefore more productive. This, of course, is hugely beneficial to employers. Perhaps the biggest win for companies is that they have a vastly larger talent pool to recruit from.

McArdle’s own company, SureSwift Capital, has 80 team members, operates in 14 time zones, and has no real offices. His experience shows it can be done and that all the advantages can be realized. His post urges other companies to realize them too.

When I first got interested in remote work it really was a dream. Hardly anyone was doing it—mostly journalists and some developers—and we didn’t have nearly the infrastructure to support it that we do now. Now the infrastructure is there and except for those famous face-to-face meeting at the water cooler, there really aren’t many cogent reasons to keep doing what we’re doing.

Posted in General | Tagged | Leave a comment

Revisiting Abrams’ Capture Techniques

A year ago, I wrote about Howard Abrams’ post on Capturing Content for Emacs. I just saw a current reference to the post and reread it. It’s a really great article and worth mentioning again in case you missed it.

The basic idea is to make capturing data and inserting it into the currently clocked in task as effortless as possible. Abrams starts with some simple templates that show how to add a capture to the currently clocked in task and then moves on to adding data directly from the system clipboard to the current task. He even shows how to move selected text in an Emacs buffer to the current task.

All of that uses just the normal capture template mechanisms built into Org-mode. What I really liked was how he arranged to move data from the browser or other apps into the current task. One example is a simple shell script that you can put at the end of a pipeline to capture the output from the rest of the pipeline and import it into your current task.

He also considers capturing text and HTML preserving the necessary formatting and changing (HTML) links into Org links. He shows how to do it for macOS and Linux.

If you haven’t already read his post or you’ve forgotten the details, you really should take a look. There are a lot of great tricks that can help reduce friction in your workflow.

Posted in General | Tagged , | Leave a comment

Writing Academic Papers

Jonathan Bennett has another post up in his Year of Emacs series. This one is about writing academic papers. Bennett is in the humanities but still uses Emacs and Org-mode to write his papers. I’m always interested in posts like this because writers in the humanities have special conventions they need to follow so seeing how they adjust the Org workflow to meet them is instructive. You shouldn’t think, however, that his post is useful only to those working in the humanities. The same setup will work for any discipline.

Bennett’s tool chain is mainly

  • Zotero for library management
  • Org-mode and LaTeX to produce PDFs
  • org-ref to manage his citations
  • PDF tools for reading and marking up papers
  • Magit/Git for version control

Zotero is a nice tool and open source so there’s no reason to avoid it but as shown in Kitchin’s video on org-ref you probably don’t need it. Org-ref can download papers in several ways and using it means there’s one less tool to learn and worry about.

One very nice thing about Bennett’s post for beginners is that he doesn’t assume you know how to configure things for a workflow like his and he show’s everything that’s necessary.

This is a nice post and well worth reading if you’re involved in writing papers either professionally or as a student. Bennett explains why he prefers not to use Word or one of its evil progeny but, of course, Irreal readers are already familiar with reasons to avoid them. Really, it’s hard to envision a nicer writing environment than one involving Org and org-ref.

Posted in General | Tagged , | Leave a comment

Notion

Ali Abdaal is a Junior Doctor (sort of like a Resident in the US) practicing in Cambridge, UK. He’s also a YouTuber producing videos on productivity, efficient study habits, tech reviews, and life as a Junior Doctor. I’ve been following him since his medical school days after I saw his excellent video on how (and why) he uses an iPad and Notability to take notes in medical school. If you’re still in school you must watch this video.

One of his favorite topics is productivity apps and how he uses them to organize his life and manage his many activities. His latest favorite is Notion, a notetaking app with many features and ways to display your data. Normally, I wouldn’t pay any attention to something like this because I have the power of Emacs and Org-mode to do everything that Notion does and much more but when Abdaal gives such a positive review of an application, it’s worth taking a further look.

My quick take is that it’s a nice application that has much of the Org-mode note taking capabilities all wrapped up in a pretty GUI. It is, of course, mouse-centric so if you aren’t a point and clicker you might not like it. If you’re not an Emacser—or more generally, don’t live in your editor—you may find it a useful way to organize your notes and data. It will probably appeal to the same sort of person who likes and uses Evernote. There are mobile as well as desktop versions so you can have access to your data on the go and make notes when you’re out and about without a laptop.

All-in-all it seems to be a pretty nice application if you don’t mind the point and click aspects. Or it would be except for one fatal flaw: Your data lives on someone else’s server1. If you want more than the free version, you have to buy a subscription to the service. That would be Okay—after all, you’re renting space on someone else’s computer—but what Notion really is is software as a service and that’s inherently dangerous as Eric Raymond had occasion to point out just the other day.

Of course, a huge number of people aren’t bothered by this—until they are—and happily commit their irreplaceable work to Google apps despite Google’s record of freezing accounts if they detect what they suspect might be BadThink. I don’t know anything about the people running Notion and what their thoughts are on this sort of thing but I’m not willing to risk my data and workflow to someone else’s whim. Especially not when Org-mode gives me the same or better functionality and I can keep control of my data.

Footnotes:

1

I can’t tell for sure that the client apps don’t keep a local copy of your data but their Web page suggests not. If I’m wrong, perhaps some Notion user will let me know and I can update this post.

Posted in General | Tagged , , | Leave a comment

How to Limit Google Tracking You

It turns out that there are some steps you can take to limit the type and amount of data that Google collects on you. This is especially relevant if you live in the Android ecosystem but even for those of us, like me, who prefer to live in the Apple world, some of these steps are useful to stop some of the collection.

Via John D. Cook’s excellent Data Privacy twitter feed, I found a pointer to a Wired article entitled All The Ways Google Tracks You—And How To Stop It. The article tells you how to find the Google pages concerned with managing your data and how to turn the collection off. If you’re signed into your Google account (such as Gmail) you can simply follow a link in the article and it will take you to the page. Once there, you can turn off the collection of various sorts of data and delete what they have.

I’ve made a point of not being signed into Google for some time now. About once a month I check my Gmail account and then delete cookies so that I’m signed out again. If you’re like me, simply sign in to your Gmail account or whatever you have, follow the link, and set things the way you want them. When you’re done, delete your cookies and everything should be fine.

This is, I know, like bailing out the sea with a teaspoon but every bit helps.

Posted in General | Tagged , | Leave a comment

Cell Phones and the Crime Rate

The New Luddites current favorite hobby horse is the evils of smart phones and all the myriad ways they are destroying civilization as we know it. These people are exceptionally tiresome but they never seem to tire of badgering us with their end-of-the-world warnings.

Rather than repent, I offer the following: according to a study by Lena Edlund and Cecilia Machado, cell phones may be responsible for the dramatic decrease in crime from 1990 to 2000. Well, at least there is a negative correlation between cell phone usage and the homicide rate. Mathematical grownups know that correlation doesn’t imply causation but the paper is suggestive and the reason Edlund and Machado give for correlation appears reasonable.

You might think that that reason is obvious: cell phones make it easier to quickly report crime as it’s happening. But that’s not the reason Edlund and Machado give. They say that cell phones changed the illegal drug trade making it less important for gangs to hold and defend territory. They attribute the fall in homicide rate to a decrease in gang violence.

The paper has received some push back—mainly from people with their own theories of what caused the decline—but its explanation seems more sensible than some of the competing theories such as the rise in abortions.

The cautious reader should always treat studies like these with suspicion. Most of them boil down to “Hey! Look at this correlation.” Still, it’s a pleasant change from the New Luddites’ incessant doom saying.

Posted in General | Tagged , | Leave a comment

Hidden Gems #4: TODOs

Cheong Yiufung has another great post up in his Org-mode Hidden Gems series. The latest post takes a look at Org-mode TODO functionality. As usual, I learned some new things proving again that the “hidden gems” tag is appropriate, at least for me.

Most Org users know that you can specify your own TOTO tags and make them anything you want. Yiufung shows how you can use that fact to implement a sort of lightweight task assignment system. I’d probably implement this with check boxes under a project heading but you may like Yiufung’s system better: take a look and see.

Next, he discusses TODO statistics. Those are the cookies that tell you how much of a task has been completed. Normally, the statistics cover the entire subtree so that even subtasks are counted. It’s possible, though, to specify that you want them to act in a hierarchical manner. Then, each (sub)subtree is treated as a unit and can have it’s own counter. Yiufung has a video that shows this and makes it clear how the two modes differ.

Finally, he looks at the Org habits functionality. This is useful for repetitive tasks such as exercising when you want to track your progress. Org gives you a nice graphical summary of how well you’re doing. Again, take a look Yiufung’s video to see what it looks like.

Posted in General | Tagged , | Leave a comment

The Story of VisiCalc

Via Karl Voit I found this video of Dan Bricklin telling the story of how VisiCalc came to be. Many younger Irreal readers probably don’t remember Lotus 1-2-3 let alone VisiCalc so it’s worth mentioning that VisiCalc was the first electronic spreadsheet.

It’s a typical hacker story of writing some code to scratch an itch. Bricklin was getting his MBA at Harvard where the curriculum was based on case studies and involved, among other things, making manual spreadsheet calculations. Bricklin found that it was easy to make a calculation error and of course that error would propagate to other rows and columns. Since grading was based in large part on class participation, it was important to have the calculations correct in order to contribute in an intelligent way.

Bricklin had an undergraduate degree in Computer Science from MIT so automating the calculations on a computer seemed a natural solution. Along with his classmate Bob Frankston, Bricklin starting working on VisiCalc. This was in 1979 when the only reasonable small computer available was the Apple II. Although it ran on the Apple II, VisiCalc was developed on a Multics system that Bricklin and Frankston had access to.

An interesting part of Bricklin’s talk is how he struggled to find the right interface for the program. These days the grid paradigm with numbered rows and lettered columns is so well established that it’s hard to imagine any other way of doing it but Bricklin tried several schemes before settling on the now familiar pattern.

It’s an enjoyable talk and well worth the 12 minutes it takes to watch it. Steve Jobs said that VisiCalc was largely responsible for the early success of Apple so it’s more important than you might think.

Posted in General | Tagged | Leave a comment

A Year of Emacs

Jonathan Bennett has an interesting project underway. He’s a longtime Vim user whose evolving needs led him to Emacs. At first, he used Spacemacs but he had problems with its speed and had difficulties configuring it. So he moved on to vanilla Emacs and used it to write his Masters thesis.

Now he’s planning on writing a blog post every week for a year that considers a single Emacs package or use case. His first post, Introduction to a Year of Emacs, recounts his journey from Vim to Emacs and his plans for his “Year of Emacs.”

I’m looking forward to his posts. I like that they’ll be appearing regularly and will consider a single subject in depth. He has an RSS feed so it should be easy to keep up with the series.

Posted in General | Tagged | Leave a comment