Feb 3, 2018

give unique identifier to show the same files differently in org-agnda

I'm a big fun of org mode. But I have the one problem with this mode.

When you register two files, a/readme.org and b/readme.org to register org-agenda-files, the problem is that o, both are expressed "readme" and treated as the same agenda.

Imagine the case where you join two different project for development, you will see how annoying those are. So I tried to solve this problem.

My basic idea was to use the upper directory name also as an identifier. In the above example, "a/readme" and "b/readme" show up in Org Agenda and are treated as different tag space.

It was also nice to know how to debug functions in emacs / elisp.

example

before fix

readme    :TODO [#A] update docs for sound-reflection module
readme    :TODO [#A] update docs for setup

after my fix

ultrasonic/readme    :TODO [#A] update docs for sound-reflection module
onboarding/readme    :TODO [#A] update docs for setup

implementation

I checked where the value comes from in org-agenda.

files

set up edebug to trace a

edebug is simple to use so this matches my case.

  • enable edebug-defun to target function
  • enable breakpoint by C-x X b
  • enable edebug-step-mode
  • run function
    • you can eval / step /continue