yaml-path.el provides a function to display a Ruby expression (or an xpath-like string) for the yaml element on the current line. It’s meant to complement Yoshiki Kurihara’s YamlMode.

Get it at http://alpheus.me/src/emacs/yaml-path/yaml-path.el (The link was broken. After some search, I guess this is the “official” link: https://github.com/craig-ludington/yaml-path/blob/master/yaml-path.el)

yaml-path.el doesn’t strictly depend on yaml-mode, but works better with yaml-mode. (That’s because yaml-mode makes syntax-ppss usable for locating comments.)

The functions provided are:

It’s convenient to bind one of them a key, e.g. C-c C-p. Instructions for doing that are inside yaml-path.el