Emacs magic for indexing