Using Org-mode to keep track of your project files

For every project I work on I have a org-file. Every file has the following structure:

  • Tasks
  • Repeat
  • Wait
  • Notes
  • Calls
  • Reading

I use remember-mode to capture tasks, notes and calls. Under the heading “Repeat” are tasks that are repeated on a regularly base. Under “Wait” are reminders for things I wait for (like a reply on an e-mail, an order, a call, etc.). These waits are also captured using org-remember (I have written about that in an earlier post). Under the heading “Reading” I have links to papers I am currently reading (using Bibtex; see an earlier post on that).

Sometimes it is nice to have information on the files in one of the project directories, if possible with links. This can be done with org-fstree. Just add (require ‘org-fstree) in your .emacs-file after installing. You now can add the following line somewhere in your org-project file:

#+BEGIN_FSTREE: d:/inbox/Gams

This will give me all the files in the directory d:/inbox/Gams with a direct link (this is my folder for answering questions in the Gams forums).

image

You can update this by putting the cursor in this line and hitting C-c C-c. The documentation gives you information on the options:

“#+BEGIN_FSTREE: <dir> :<optionname1> <optionvalue1> :<optionname2> <optionvalue2> …

Options are:

  • :non-recursive t , to suppress recursion into directories
  • :exclude-regexp-name <list of regexp strings> , exclude file/directory names matching either of the given regexp expressions
    • :exclude-regexp-name (“.*\\.pdf$” “.*\\.zip$”), excludes files/directories ending with either “.pdf” or “.zip”
    • :exclude-regexp-name (“^\\.git$“) , excludes files/directories named “.git”
    • – :exclude-regexp-fullpath <list of regexp strings>, same as :exclude-regexp-name but matches absolute path to file/directory
  • :relative-links t , generates relative instead of absolute links
  • :show-only-matches t , only files that are being linked to show up
  • :only-directories t , only directories are listed
  • :only-regular-files t , only regular files are listed
  • :dynamic-update t , [EXPERIMENTAL] dynamically update a subtree on visibility cycling.
  • :links-as-properties t, sets the links as properties Link1, Link2,… for use in column view [Does not work with dynamic-update!]
  • :no-annotations t, suppresses the search and display of file annotations

Following up on Outlook E-Mails in Org-Mode

The combination of Org-Mode and Remember-Mode helps me to organize my projects. One special task category is “WAIT”, if I have to wait for some input from somebody else or waiting for a delivery to arrive. An example is ordering a book at Amazon. As soon as I make the order, I generate a “WAIT” which would look like this

** WAIT [#C] [2014-09-16 Tu] Book on Modeling by Morgan

In this case, I ordered the book on September 9th and it has not a high priority. Once a week I check this category in a customized agenda view which sorts the WAITs according to their priority. If necessary, I take action (for example resending an E-Mail). 

One nuisance is that I use Outlook for my E-Mails and Org-Mode for my tasks.If I send an E-Mail and are waiting for an answer, or if I receive an E-Mail with information on my order, I can’t generate a direct link between the E-Mail and the WAIT-task and I loose time looking for the original E-Mail.

I googled around and found the following solution by John Hilliard here (there is org-outlook, but I did not find a good explanation, how that works). He suggests to write a macro in Outlook that looks like this

The macro gets the unique id for the email message and writes an Org Mode link to that message to the clip board.

Note that in order to write a macro, you have to activate the “Developer” tab in Outook, image

which can be done by right-clicking on the tabs and choosing “Customizing the Ribbon”. After defining the macro, you can add it to the quick access toolbar (same procedure as adding the developer tab), and choose a nice icon

image 

There might be an error, when running the macro, but you John nicely describes how to get rid of that one:

“When I first ran the macro, I actually got an error saying “Compile error: User-defined type not defined.” That was a little mysterious. In order to fix that error:

Click “Tools” then “References” in the menu.

Check “Microsoft Forms 2.0 Object Library” in the list of available references. 

  • This option wasn’t available to me at first so I clicked “Browse”
  • Then I opened “c:\windows\system32\FM20.DLL”

Then I clicked “OK”

I finally added the code for opening Outlook in my .emacs file.

(defcustom org-outlook-location (w32-short-file-name “c:/Program Files/Microsoft Office 15/root/office15/OUTLOOK.exe”)
  “* Microsoft Outlook 2013 location.”
  :type ‘string
  :group ‘org-outlook)

Now, I can select a message, click on the macro symbol which copies the link, jump to Emacs (I have a script for that) and insert the link. The WAIIT-Task would look like this: image

If I click on the Message-link, Outlook opens the message.