The Iron Law Strikes in Baltimore

Baltimore has an aerial surveillance program that uses a small plane equipped with high resolution cameras flying over the city for hours at a time.

When the program was announced there were many privacy concerns but the public was assured that

  1. The data would be used only for major crimes.
  2. The data would be destroyed after 45 days unless it was being used in an active investigation.

If you’re familiar with the Iron Law of Data Collection, you know how this story ends.

The data was not destroyed after 45 days and was subsequently used to charge individuals with crimes without informing the court or defense council where the evidence came from. Worse, the company running the program, Persistent Surveillance Systems, admits that they have archived all the data—not destroying any of it—and is now considering selling the data to third parties. Follow the link to see some of the consequences of that.

At the risk of being tedious, it’s worth repeating the lesson that this and similar stories are trying to teach us: Never believe anything the snoopers tell you and resist their pleas for “just one more small program that is, of course, for your own good.”

Posted in General | Tagged | Leave a comment

A PSA from Sacha

Here’s a useful public service announcement from Sacha Chua:

Posted in General | Tagged , | Leave a comment

Mobile Org on iOS

If you live in the Apple world and are an Org mode user, here a bit of good news. The iOS MobileOrg maintainer has announced that he and others are resurrecting the iOS Mobile Org app.

I keep seeing queries on Twitter and elsewhere asking about Org on iPhones and lamenting that MobileOrg appeared to be dead. Those folks can join me in rejoicing that there’s some movement in the project. If you’re interested in what MobileOrg can do, here’s a link to the MobileOrg Github page.

Posted in General | Tagged , | 2 Comments

Capturing Gcal for Display in Emacs

Ben Maughan has a post that represents another way of integrating Gcal into Emacs. In my first two posts on this, we looked at how Rainer König and Mike Zamansky imported their Google Calendars into their Org agendas. Maughan has a slightly different use case. He uses his Org agenda to track tasks and his calendar for appointments and he doesn’t want the appointments in his agenda.

Still, like many hardcore Emacs users, he’d like to do as much as possible in Emacs so he wanted a way to read his Google calendar from Emacs without importing it into the agenda. He found a nice way of doing this with gcalcli, a utility that allows you to access a Google calendar from the command line. With just a little bit of glue code and some extra processing to take care of colors, he can import his calendar into an Emacs buffer.

If you’re a “live in Emacs” person who also uses Gcal, this is a nice way of staying in Emacs even as you check your calendar. The system provides a view of the calendar only; you can’t interact with it as you can with Zamansky’s method. See Maughan’s post for the details.

Posted in General | Tagged | 2 Comments

Elisp Text Processing Idioms

The hard part of learning Elisp is not the syntax. Being Lisp, the syntax is trivial and takes about 10 minutes to learn. The real problem is learning the library and, perhaps even more difficult, the proper idioms for getting things done. For example, a n00b writing Elisp code may load a file by calling find-file, the command used at the user level to load a file with Ctrl+x Ctrl+f but that is almost never the best strategy.

One excellent way of learning Elisp is Xah Lee’s Emacs tutorial. In particular his page on Emacs Lisp Idioms for Text Processing really helped me get up to speed with writing Elisp. I’m certain I’ve linked to that page before but it bears repeating: if you’re trying to learn a bit of Elisp—even if all you want to do is add an occasional function to your configuration—you should definitely read this page and the pages linked to it.

The definitive authority, of course, is the Emacs Lisp Reference Manual, which is also available as an info file right from Emacs, but for getting an idea of how to actually write Elisp, Lee’s tutorial is hard to beat. Read his tutorial and read some of the Emacs (or Emacs packages) source and you’ll be well on your way to becoming a competent Elisp programmer.

Posted in General | Tagged | 1 Comment

By the Way

On Tuesday, I wrote about my discovery of org-next-link and how it quickly became my go to method of navigating to Org links. Today, my target link was before the point and it suddenly dawned on me that there was probably an org-previous-link and that it would be mapped to Ctrl+c Ctrl+x Ctrl+p. That turned out to be true, of course, so I’m passing it on in case there are one or two other folks out there to whom this is not immediately obvious.

Again, if you often have the need to navigate to Org links it’s worth internalizing the shortcuts. It’s amazing how much faster it’s made my moving around in Org documents.

Posted in General | Tagged , | Leave a comment

Zamansky 26: Syncing with Gcal

The other day I wrote about Rainer König’s video on syncing Gcal with Org agenda. Serendipitously, Mike Zamansky just posted a video on the same subject. Zamansky solves the problem in a different way so it’s definitely worth watching his video too.

His idea is to use org-gcal, which is available on MELPA, to do the heavy lifting. Under the covers, it does pretty much what König did in his video but it appears to be a bit easier to implement. As you can see from Zamansky’s video, org-gcal allows you to move entries in both directions.

In the video, Zamansky also walks us through getting things set up with Google so that everything works smoothly. If you’d like to see your Google calendar event in your agenda, take a look at this and König’s video. One of them should work for you. The video is 12 and a half minutes.

Posted in General | Tagged , | Leave a comment

Indexing Org Files with a Database

The other day, I wrote about how Karl Voit uses an Org file to index his other Org files. It’s a nice scheme that’s light weight and easy to understand and it fits in well with his Memacs system. John Kitchin has a similar problem. He uses Org mode for writing papers, taking meeting notes, writing letters of recommendation, taking notes on papers he’s reading, keeping TODO lists, maintaining help files on software, writing lecture notes, running his courses, and many other chores.

Kitchin has about 5 years of Org files that are scattered across Dropbox, Google Drive, Git repos, and his local file system. It’s hard for him to locate a particular file, especially if he hasn’t accessed it in a while. His solution is to index everything in an SQLite database. He indexes the headlines, properties, tags, links, and even (provisionally) content. He uses EmacSQL to access the data and has hooks that (re)index any Org file he opens.

The system is still in the proof of concept stage but appears to be working well. Kitchin has stopped indexing the content because it slows things down too much and generates about a half gig of data. Even so, he can generate amazingly fine grained queries. For example, it’s trivial to find all his files that cite a certain paper. His post has other examples of queries like that.

If you have a huge collection of Org files, indexing them in a database like Kitchin does might be a good strategy. As usual, his code is available and although you probably won’t want his exact database schema, his is a good jumping off point for your own needs. Adapting his system will require a bit of knowledge of SQL but even generating non-trivial queries requires basic SQL knowledge so it’s definitely not for casual users.

This post is yet another example of Kitchin leveraging the power of Org mode to get his primary job of a Chemical Engineering researcher and teacher done. As always, his work is full of useful ideas that many of us can adopt or adapt.

Posted in General | Tagged , | 2 Comments

Syncing GCal with Your Org Agenda

Rainer König has the latest video in his OrgMode Tutorial series up. This time it’s about synching Google calendar to the Org agenda. Many folks, even those who otherwise live in Emacs, prefer to maintain a separate calendar. Most calendar apps can generate alarms, can share calendars with other people, and can be accessed from your smartphone so they offer some advantages over keeping everything in the agenda.

König uses Gcal for this because it meets all those requirements but he would really like to see the entries in his daily and weekly agendas. It turns out to be pretty easy to do. You just set up a cron job to import your .ics files from Google and add them to your diary file. You tell Org mode to include the diary in the agenda and everything just works. See the video for the details.

Because I have no interest in letting Google harvest my information and sell it to one and all, I don’t use Gcal but as an Apple user I have access to the Calendar app, which provides the same functionality1. There is already a contributed package, org-mac-iCal that will import the Apple calendar into the Org agenda. It’s available from Melpa if you’d like to try it out. From a quick scan of the code, it looks like it does the same thing that König does: it grabs the calendar files and adds them to the diary.

König’s method should work with any calendar app that uses .ics files so if you’ve been looking for a way to see your calendar entries in your Org agenda, take a look at the video.

Footnotes:

1

I probably can’t share calendars with non-Apple users but the need has never come up so I haven’t looked into the possibility.

Posted in General | Tagged , | Leave a comment

Fast Opening an Org Index File

I’ve written before about Karl Voit’s Memacs system. It’s basically a set of programs that collects all his daily data—phone calls, emails, photographs, texts, bank statements, git commits, and so on—stores it in Org files and then makes it available via links in his daily agenda. The data is stored in various places in his file system and can be moved if necessary. He locates the data indirectly with an Org based index file. The agenda link points to the index file that, in turn, points to the actual file. The index file is sort of like the Unix File Table for you Unix heads.

The system is so useful to Voit that he’s run into a problem. His index file is now how almost half a million entries and Org takes too long to load the file and locate the correct entry. He solved this problem, with some help from John Kitchin, by using grep to search the index file and follow the link in the appropriate entry to the desired file. All this is initiated by simply clicking on the agenda link. Take a look at his post for the details and also a bit more information on how the index file works.

Voit’s solution is interesting and probably applicable to similar situations but it’s a detail buried in Kitchin’s Elisp that is really the gold in the post for me. After the code locates the proper index entry, it places it in a temporary buffer and moves to the link to the target file by calling org-next-link. That function simply moves the point to the next Org link. If you use a lot of Org links like I do, you’ll find yourself doing this all the time. Usually I’d just manually move the point with the usual motion keys. But with org-next-link, which is bound to Ctrl+c Ctrl+x Ctrl+n, I can move directly to the link. It’s very handy and I’m already addicted.

UPDATE [2017-01-07 Sat 10:56]: memecs → memacs in link.

Posted in General | Tagged , | 2 Comments