I am using emacs -Q as editor for git, because my startup is too heavy for "quick editing" use and using emacsclient will hang when git is invoked with M-x shell-command. However, as a consequence I keep getting prompted to confirm directory variables, when I have custom variables in a repository.

Is there some way to make emacs -Q ignore directory variables, it doesn't know about?

  • My apologies if you've already heard this a thousand times, but the magit interface for git is amazing, and would resolve all these niggling little conflicts – Tyler Dec 10 '20 at 15:56
  • @Tyler Powerful or not, using the cli tools directly is more so. And I'd rather use the tools that work for every project, rather than learning the UI of yet another wrapper. With the exception of git gui, which allows comitting only specific lines for a cleaner history, I am using non-cli tools only for visualization/investigation purposes (e.g. M-x magit-blame or M-! gitk --branches). – kdb Dec 11 '20 at 8:40
  • If I understand you, you've got directory variables, which means you are editing your files in Emacs? Then you open M-x shell to interact with git on the command line, and you want to open emacs -Q from git running in your M-x shell terminal? You can call emacsclient from M-x shell, so debugging that might be easier than convincing emacs -Q to ignore directory variables. – Tyler Dec 11 '20 at 16:12
  • @Tyler The files are edited in Emacs. For interaction with git I use both M-x shell-command = M-! and a separate terminal. Invoked from M-x shell-command, using git config core.editor emacsclient causes a dead-lock. – kdb Dec 15 '20 at 14:04
  • This works for me. Have you started the emacs daemon? In order for emacsclient to work, you need to call (server-start) from within emacs, or start emacs with the command emacs --daemon. That would be the most likely cause of a lock. – Tyler Dec 16 '20 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.