Open mandarm opened 1 week ago
I'm sorry, I think your code already tries to determine the project root, and store it in a property list, but I did not fully understand your code. Here are some errors from the Messages buffer that may help to identify where things go wrong, if I save a file that is not a part of any project.
gtags-mode: Global sync error output: global: GTAGS not found. gtags-mode: Sync /bin/global (--print-dbpath): exited abnormally with code 3
Whenever gtags-mode is enabled,
gtags-mode--after-save-hook
is added toafter-save-hook
, and runs every time a buffer is saved. This results in spurious error messages likeprocess-file: Setting current directory: Not a directory
when I am editing files that are not part of any project tagged with GNU global.
Please consider whether it would be a good idea to replace the following condition at the beginning of
gtags-mode--after-save-hook
(when (and buffer-file-name
with something like
(when (and (gtags-root-dir) buffer-file-name
http://www.emacswiki.org/emacs/GnuGlobal contains the gtags-root-dir function.