emacs already has structural editing packages like combobulate