Org-Mode and Project Overviews

I recently started a new job and my new manager wanted me to give him a periodically-updated task list showing what I was working on, its progress, and any deadlines I had.  I like Emacs’ Org Mode, so I set out to set up something in Org Mode that worked for both of us.  This is my story.

In general, I want to have a main directory for my files and, within that directory, use a separate file for each distinct project I work on.  My manager wanted to easily see project progress via milestones, so each level-1 heading represents a milestone, while the deeper headings are more fluid and are more for my benefit than his.  It was pretty easy to set up HTML publishing from the Org file directory to a web server, so my manager could browse through the details of my org files.

My manager also, however, wanted to see an overview page with sections for current, future, and recently-past projects, with detail lines for the milestones on current projects.  That proved to be the trickiest thing to implement:  since I dislike repeating myself, I wanted as much of the “current project status” part of the overview to be automatically generated from the individual project files, including any milestone deadlines but ignoring all of the more minor details.

Org Mode is big, so I spent a while reading through the manual about custom agenda views and such until I stumbled on the C-c / d key sequence, which folds all the file’s subheadings and displays any deadlines on the level-1 headings.  In combination with C-c C-e v Spc, which exports only the visible portions of the current buffer to a new org-mode buffer, I was able to create an org-mode formatted project overview.  Thus, my general overview page (named index.org so it becomes index.html during publishing) looks something like this:

* Active Projects

** [[file:project-1.org][Project 1 Description]]
   DEADLINE: <2012-11-16 Fri>
#+INCLUDE: "project-1.org_overview" :minlevel 2

** [[file:project-2.org][Project 2 Description]]
   DEADLINE: <2012-11-30 Fri>
#+INCLUDE: "project-2.org_overview" :minlevel 2

* Future Projects

** [[file:project-a.org][Project A Description]]
** [[file:project-b.org][Project B Description]]

* Recently Completed Projects

** [2012-11-01] [[file:project-x.org][Project X Description]]

I added a few CSS tweaks at the top of the index.org file to better fit its purpose.  Mostly, they just put related things closer together and deemphasize some of the extra information on the page:

#+OPTIONS:   H:2 num:nil toc:nil tasks:t
#+STYLE: <style>
#+STYLE: .outline-3 h3 {
#+STYLE:   margin-bottom: 0;
#+STYLE: }
#+STYLE: .outline-text-3 p {
#+STYLE:   margin: 0;
#+STYLE: }
#+STYLE: .outline-4 {
#+STYLE:   line-height: 0.5em;
#+STYLE: }
#+STYLE: .outline-text-4 {
#+STYLE:   font-size: 0.75em;
#+STYLE: }
#+STYLE: .outline-4 h4 {
#+STYLE:   margin-bottom: 0;
#+STYLE: }
#+STYLE: </style>

I also wrote the following two elisp functions.  The first one generates the overview file for a given buffer, while the second looks through a buffer for included overview files and regenerates all of them.

(defun org-export-overview (file)
  (save-window-excursion
    (find-file file)
    (org-check-deadlines org-deadline-warning-days)
    (org-export-visible ?\  0) ; calls switch-to-buffer-other-window
    (write-file (concat file "_overview"))
    (kill-buffer)))

(defun org-export-overviews-for (buffer-or-name)
  (let ((plan-dir (file-name-directory (buffer-file-name (get-buffer buffer-or-name)))))
    (with-current-buffer buffer-or-name
      (save-excursion
        (goto-char 1)
        (while (re-search-forward "^#\\+INCLUDE: +\"\\(.*\\)_overview\"" nil t)
          (org-export-overview (concat plan-dir (match-string 1))))))))

Finally, I wrote a simple function that goes through all the stuff I need to publish my org files and I call that hourly, so my manager can see my current project status at pretty much any time with no manual steps on my part:

(defun pmg-org-publish ()
  (org-save-all-org-buffers)
  (org-export-overviews-for "index.org")
  (org-publish-all))
        
(run-at-time "00:45" 3600 'pmg-org-publish)

All I need to do is periodically update index.org as I add or complete projects, and the rest of my work is done, as it normally is, in the project files.  Thanks, Org Mode!


Why are there so many Dolfield Roads?

A question that perturbed me when I lived in Owings Mills was why there were so many roads named “Dolfield”.  There are three different Dolfield Roads, one South Dolfield Road, and three Dolfield Boulevards.  I finally got around to researching the question, and now I share the answer (to the degreee that I have one) with everyone.

This is a map of Dolfield Road, past and present:

The thick, dark blue line is where Dolfield Road once ran.  At one point, it connected Painters Mill Road and Deer Park Road.

The thinner, light blue line shows where Dolfield Road, in all its parts, runs today.  When Interstate 795 was built, Dolfield Road was cut in two, as happened to many roads during the construation of the Interstate system.  At the same time, part of the eastern portion of Dolfield Road was diverted to make room for the ramps from Owings Mills Boulevard to Interstate 795.  The section of Dolfield Road south of Owings Mills Boulevard was renamed South Dolfield Road, for reasons I cannot find.

At some point—I cannot tell when, exactly—the chunk of Dolfield Road that extends from present-day Red Run Boulevard to Pleasant Hill Road was closed, though I was unable to find out why.  The small section between Red Run Boulevard and Interstate 795 now serves as an access road to a SHA facility, and the rest of the closed section has been turned into a hiking/biking trail (colored in light green on the map).  Finally, the section of Dolfield Road just west of Pleasant Hill Road was realigned when Dolfield Boulevard was built.

Here’s a map of Dolfield Boulevard:

At some point in the past, the county planned to build a road named Dolfield Boulevard that would connect Owings Mills New Town with the eastern area of Reisterstown, both areas that were slated for new development.  The road was planned to have two lanes in each direction with a raised median dividing the road.  The dark purple line on the above map shows where it was to have gone, as far as I can tell.  I’m not sure whether the original plans included anything further north, though it might have made sense to connect it to Owings Mills Boulevard.

Unfortunately for the county, a number of people living in the proposed path of the new road put up sufficient objections that the project stalled.  Portions along Reisterstown Road and Academy Avenue were built and, in both cases, partly divided and partly not—the light purple lines are the divided sections and the pink lines are the undivided sections.  Furthermore, the southern end of Dolfield Boulevard was built without incident as part of the development of Owings Mills New Town, though part of Pleasant Hill Road was rechristened Dolfield Boulevard but left undivided.

From what I can tell, the county never entirely abandoned its plans for Dolfield Boulevard, but they seems to be shelved indefinitely.  Separately from those plans, they are currently considering adding an interchange between Dolfield Boulevard and Interstate 795 (which would have been really convenient for me if it had been in place when I lived there).

So there are three sections of Dolfield Road (and a South Dolfield Road) because Interstate 795 and other factors caused a former road to be split into pieces, and there are three sections of Dolfield Boulevard because that’s as far as the county has gotten on the plans for a new road.  This ends today’s episode of “I’m a geek and will research anything that catches my fancy”.


Knife Meme

This is a thing, apparently: “Take knife from pocket, post pic on the internet.”

Myerchin Lightknife
My main knife, and the one that best matches the intent of the meme, I think, is a Myerchin Lightknife L377P, which they apparently don’t sell anymore.  It’s a very nice, light, compact knife, with a multipurpose half-straight half-serrated blade; a marlinspike, which is useful for knot- and ropework; and a small red LED, which is nice for seeing things without ruining your night vision.  I use the marlinspike a lot less these days, because I don’t do as much decorative knotwork, but it’s still occasionally useful.

The knife was a Christmas gift from my dad and stepmother a number of years ago.  (Possibly 2004 or so.)  I’d been thinking about replacing my at-the-time pocket knife, something from Spyderco, with a lighter, more compact knife, when I read a Cool Tools review of the Myerchin L377P.  It sounded like it would do everything I wanted and more, so I made a Christmas request and then got what I asked for.

Brookstone Credit Card Multi-tool
The Myerchin isn’t the only knife that meets the letter of the meme’s wording, though.  I also have a credit-card-shaped multitool from Brookstone in my wallet.  I use it mostly for its tweezers, but its pen, needle, scissors, and knife blade are also occasionally useful.

Victorinox CyberTool
A knife I also usually have on me is my Victorinox Swiss Army CyberTool.  Technically, it lives in my laptop bag, not my pocket, but I usually have the bag with me.  It’s very useful for dealing with all sorts of small-scale hardware, because it’s got the screwdriver with interchangeable phillips, flat, and torx bits, plus the small pliers (which also include a wire cutter).

This was a birthday gift from my parents back in 2000 or so.  It replaced my previous everyday knife, a Swiss Army Automobile Special, which had also been a birthday gift from my parents.  Victorinox had just come out with the CyberTool and I’d been working for a couple of years in a hardware and software tech support position, so I let my parents know I was really interested in the new knife.  More than ten years later, it’s still serving me well.

CRKT Rollock
The last knife that I usually have on me (also in my laptop bag) is a Columbia River Knife & Tool Rollock, which doesn’t appear to be for sale anymore.  It’s got an interesting opening mechanism; instead of unfolding, the blade flips up a little and slides out of the body, locking into place at its fullest extent.  It’s mostly in my laptop bag because it’s very slim, so it doesn’t take up much extra room and it’s handy if I’ve forgotten my Myerchin somewhere.  Because it’s got a completely straight blade, it’s less of a pain to sharpen than the Myerchin, so it’s usually the sharpest knife I have on me, which sometimes means I use it instead of the Myerchin even if I have both with me.

This one was a gift from my youngest sister at her wedding as thanks for being a groomsman and playing trumpet in the wedding.


The MTA and GTFS

Just today I found about GTFS, a standardized data format from Google for describing public transit schedules.  I subsequently discovered that the MTA has a GTFS feed.

Back when I didn’t have a car, I used the MTA daily and had a set of scripts to extract their schedule data from the website and import it into trainsched on my Palm Pilot.  I asked them for more structured data at one point but was rebuffed, so I stuck with my scripts that had to be updated every time they changed their schedule pages.

I don’t have a Palm Pilot any more (and trainsched doesn’t even run on the PalmOS emulator on my WebOS phone), but I thought it would be nice to update my old scripts to use the new GTFS feeds.  This should even work with other GTFS feeds; there’s nothing really MTA-specific going on.

The updated scripts are here: GTFS to trainsched converter.


Car Engine Advice Sought

I’ve been having intermittent problems with my car that have now stumped two mechanics, so I’m turning to the Internet for advice.  I have a 1996 Jeep Grand Cherokee, with Selec-Track four-wheel-drive and a 6 cylinder engine.

The problem I’m having is that the engine will sometimes just stall (the motive power goes away and the engine RPMs drop to zero).  It only seems to happen right after starting the car (so the engine hasn’t warmed up yet), and it’s much more common in wet weather (rain, snow, heavy fog).  Often times, I can feel the engine losing power and can prevent a stall by stepping on the gas pedal.  If the engine actually stalls, I have to wait at least a minute to restart it; if I try restarting it immediately, I hear the chug-chug-chug of the starter, but the engine won’t start running.

I’ve had a few times when the stalling seemed to hit as I was braking, just as the automatic transmission was downshifting from second to first gear.  I’ve had the car sall at times apparently unrelated to shifting, though.

This morning, it was particularly bad.  I barely got out of the parking lot at home (after several stop/wait/restart cycles) before the engine stopped being useful—it would only run for 30–45 seconds before stalling, and I couldn’t prevent the stall.  I had the car towed to a mechanic, but by the time they took a look at it, the engine started and ran normally.  They couldn’t find anything wrong with the engine, and there were no codes from the onboard diagnostics.

The coolant system has a slow leak (my regular mechanic tracked it to the water pump, I think), but I’ve had that for over a year now and I doubt it’s related.  In the time since the problem first manifested, I’ve had a system tune-up (including replacing the spark plug wiring, apparently a common contributor to problems such as these), had the oil changed, had the transmission fluid changed, and had a (presumably unrelated) badly-leaking coolant hose replaced.

Any suggestions on what to look for to fix this will be gladly accepted.  I’ll be cross-posting this to several social media sites; responses there are fine, or just send an email to

Update 2010-01-02: I’ve gotten a number of suggestions for problem areas that could be causing this problem.  The most-suggested item was the fuel filter, which I haven’t replaced since I got the car five years ago, so I’m taking care of that to start with.  I’ll see how well the car behaves with a new filter.  Other suggestions have included the idle valve, O2 sensor, or fuel pump.  If replacing the fuel filter doesn’t work, I’ll check out some of the other possibilities.

Update from late 2010: The problem turned out to be the engine computer.  It was failing to set appropriate engine parameters under various circumstances, particularly when it was wet.  It took a lot of trial an error to get to this diagnosis, and my mechanic said this was the first he’d ever seen this particular problem.