Using Org as a Timesheet

The other day I saw this tweet

and thought it was pretty neat but I didn’t know exactly how Woodbury was doing it. Part of the problem was that I didn’t recognize the keywords :block and :step and couldn’t find them in the Org documentation. So I asked Duck Duck Go and was pointed to the documentation for clock tables.

The clock table is a dynamic block that you can add to an Org file that will extract clocking information from the file. Thus, if you keep a journal that includes your, say, work tasks and you clock the time spent on those tasks, at the end of the week or month or whatever your reporting period is, you can produce a detailed report of the tasks you worked on and how long you spent on them.

As you can see from the documentation, you can filter the data to include at a granular level (including by tags) and have flexibility in formatting the resulting table. If you’re already keeping a daily journal or log report, you can start clocking your time spent on tasks if you aren’t already and you get the time sheet for free. It’s painless and powerful.

Posted in General | Tagged , | Leave a comment

Reproducible Research for R

Continuing with yesterday’s theme of reproducible research, I’d like to point to this resource for reproducible research. I’ve written about this before but I just came across this tweet

that points the Rawal’s GitHub page and after rereading it, I thought it was worthwhile pointing it out for others who may have missed it the first time.

Rawal is mostly concerned with statistics and R but there are a lot a very good tips on his page that are more generally applicable. If you are interested in using Org in your research or other scientific work, you should definitely take a look.

In the meantime, Karl Voit, in a comment to yesterday’s post, points out a number of other reproducible research links on the Worg site. You should check those out as well.

Posted in General | Tagged , , | Leave a comment

A Complete Example of Reproducible Research with Org

Those of you who frequent Irreal know that I’m a big believer in reproducible research and that I’m particularly fascinated with how Org mode can be leveraged to produce it. In the past, I’ve pointed out some small examples of researchers doing this. The other day, I came across this tweet

that pointed me to a complete example.

Luka Stanisic, Arnaud Legrand and Vincent Danjean from the University of Grenoble have an excellent paper on leveraging git and Org mode for reproducible research in the ACM SIGOPS Operating Systems Review1. The paper recounts in significant detail the git/Org-based workflow that the three authors used to do the research for and publish a paper in the Proceedings of the 20th Euro-Par Conference.

One of the things that makes their account especially useful is that they provide access to the full git repository for their research and writing. You can see every step they took and how they took pains to record the experimental environment for later researchers.

If you have any interest at all in reproducible research or in using Org mode to assist in research and writing papers, you should definitely take a look at their paper. It’s a complete, worked out example of reproducible research.

Footnotes:

1

If you don’t have access to the ACM Digital Library, there’s a preprint of the paper here.

Posted in General | Tagged , | 1 Comment

Interacting with the Emacs Compile Buffer

Artur Malabarba, an exemplar of configuring Emacs to accommodate your workflow, solves a long standing problem with the Emacs compile command. Although the command is powerful, it doesn’t allow you to interact with the build process.

Malabarba presents a bit of Elisp that allows the user to respond to requests for input from the build process. That turns out to be pretty easy to do—see Malabarba’s post for the details.

Usually, inputting data to the build process isn’t a problem—at least for the type of work I do. My makefiles do their work without any assistance from me but not all environments are like that. Malabarba uses Ruby as an example of where you sometimes need to help things along during the build process. If you have a environment that needs extra input, be sure to take a look at Malabarba’s post. It may help you eliminate one more reason for having to leave Emacs for the shell.

Posted in General | Tagged | Leave a comment

Project Planning with Org Mode

Peter J. Jones has a really useful post on how he uses Org mode to do project planning. In his post he demonstrates some features of Org mode that you might not be familiar with. Chief among these is column view, which turns out to be really useful for visualizing and exporting data.

Jones begins by noting that the most important attribute of any project planning tool is that it use plain text. Use plain text and your data is never orphaned by lost or discontinued applications or by moving to a different platform. Org mode, of course, is one of the very best applications of this sort and is what Jones uses.

Jones starts his planning by listing the features of his project and then the tasks needed to complete each of the features. Once that’s complete, he can assign time estimates to each task. This is easy to do in column view and Org will automatically total the times for each feature and for the total project. Once this is done, he exports the results into a basic proposal for management or a client.

As he works on the project, he clocks his time on each task and, again, this is shown in column view along with the state of each task. His post has several screen shots that show the various views as he proceeds with the project. He also includes the raw org file for the project so you can see how he did things and how he set up the columns for column view1. It serves as an excellent go-by if you’re interested in doing your own project planning this way or even if you just want to see a nice example of using column view.

Footnotes:

1

Be sure to look at the raw file and the Org documentation on capturing column views to see how he produced the Estimates section of his proposal.

Posted in General | Tagged , | Leave a comment

Writing Leanpub Books with Org Mode

As most of you know, I’ve moved almost all my writing chores to Org mode so I’m always on the lookout for new writing workflows that leverage Org. I particularly enjoy posts about using Org mode to write books.

Lakshmi Narasimhan has such a post. In it, he explains how he’s using Org to write a book for Leanpub. Leanpub uses Markdown for input but it turns our that there’s an Org exporter that converts to Leanpub input. That makes it easy to write in Org and still meet Leanpub’s requirements.

Leanpub has a simple and structured publishing protocol so Narasimhan was able to automate almost all of it. In his case, he puts his text in a shared Dropbox folder and Leanpub does the rest. One file, Book.txt, lists the files containing the chapters of the book. Another similar file, Sample.txt, lists the sample chapters. Narasimhan generates those file automatically from a single Org file that contains the chapters as the top level headings.

Take a look at his post for the details of how he ties everything together and how he maintains metadata about the book. Everything, including his writing times, is included in the single Org file. If you’re thinking of publishing a book with Leanpub, you absolutely must read his post. His workflow is simple and effective and lets him concentrate on writing instead of the ancillary tasks. Even if you aren’t planning on writing for Leanpub, the post describes a nice workflow that should be translatable to many long form writing projects.

Posted in General | Tagged , | 1 Comment

Emacs Modifier Keys on OS X

Yesterday, I wrote about using a prefix keymap to help deal with the shortage of available key sequences. That’s a good solution for what Xah Lee calls take-a-break commands. For frequently used commands it’s more efficient to use the 【Hyper】 and 【Super】 modifier keys. These do have some commands bound to them but are hardly ever used so they are a good place to look for fast key sequences.

The problem is that modern keyboards, alas, no longer include them. I partially solved that problem by mapping the 【fn】 key to 【Hyper】. That’s easy to do with Emacs but it’s not the only solution. And, of course, it doesn’t address where to assign the 【Super】 key.

Grant Rettke has an excellent video post on how to map OS X keys to the Emacs modier keys. If you’re an OS X user, you should definitely take a look. Emacs is pretty flexible about mapping the OS X modifier keys to the Emacs modifier keys and let’s you do things like map the the right 【⌘ Cmd】 key to 【Super】 while leaving the left 【⌘ Cmd】 to serve its normal OS X functions.

Rettke even shows how you can toggle the special behavior of these keys on and off for various situations. The video is short and definitely worth watching if you work with OS X.

Posted in General | Tagged , | Leave a comment

Defining a Keymap Prefix

I’ve written about this before but it’s a useful technique and worth revisiting now and then. One of the problems all Emacs users face eventually is a lack of practical key sequences for commands. One way of solving this problem is to define your own keymap prefix. Just as many of the built-in commands have the prefix 【Ctrl+x】, we can define our own prefix and add commands to an additional key.

Between this technique and defining hydras, you can easily assign a key sequence to what Lee describes as take-a-break commands. For commands you use a lot, especially during text input, it makes sense to assign a key to one of the (usually ignored) other prefix keys: 【Super】 and 【Hyper】. I have hyper mapped the the 【fn】 key and use sequences such as 【fn+a】 to call often used commands, avy-goto-word-1 in this case.

Posted in General | Tagged | Leave a comment

Org Clocking and Idle Time

Marcin Borkowski (mbork) posts some useful information on Org mode clocking that I didn’t know. If you’re tracking your time on a task with Org mode clocking, it’s easy to forget to stop the clock when you finish or get interrupted. That can distort your task time because it adds time to the clock when you weren’t actually working on the task.

Of course, this is Emacs so there’s a solution. It turns out that Org has the notion of idle time—configurable, naturally—that notices when you’re not doing anything with Emacs1 and will present you with a menu when the idle time exceeds the configured limit. The menu asks you what you want to do about the idle time. You could just ignore it, stop the clock, subtract the idle time from the clock, or various other actions. See mbork’s post for the details. He also has a link to the relevant Org manual page so that you can see all the options.

Footnotes:

1

On some systems this may be the actual user idle time. Consult the manual for details.

Posted in General | Tagged , | Leave a comment

Rolling Your Own Crypto

Via Jean-Philippe Paradis:

It made me laugh but it’s all too true.

Posted in General | Tagged | Leave a comment