Ich befinde mich oft in der Situation, dass ich aufgefordert werde, relative Pfade als lokale Verzeichnisvariable anzugeben. Zum Beispiel cmake-ide 's cmake-ide-project-dirund cmake-ide-build-dir. Das ist natürlich nicht sehr portabel.
Also statt
.dir-locals.el:
((nil . ((cmake-ide-project-dir . "/home/user/code/project"))))
Ich möchte so etwas wie
((nil . ((cmake-ide-project-dir . directory-of-current-dir-locals-file))))
Wie kann ich eine solche Variable definieren directory-of-current-dir-locals-file? Und wie würde ich zum Beispiel einstellen cmake-ide-build-dir, was typisch ist (concat directory-of-current-dir-locals-file "build")?
(locate-dominating-file default-directory ".dir-local.el")