When working in a big YAML file, I often lose track of where I am, and especially what the “current” top level key is.

I wrote an Elisp function to show the “path” to the point, ie. the list of parent keys over the current point in the file.

The path is shown in the message are when the function is invoked:

Editing a YAML file

The code can be found here.

In YAML files it can be invoked with C-x p.

This is scratching an itch I’ve had for a long time. Both because I needed the feature and because I wanted to do a bit more advanced customization of Emacs. Comments welcome, especially on how to improve the Elisp.