GNU bug report logs -
#65763
Error opening a file from a Git working directory if Git is not installed
Previous Next
Full log
Message #8 received at 65763 <at> debbugs.gnu.org (full text, mbox):
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Tue, 5 Sep 2023 20:54:54 +0200
>
> To reproduce:
>
> 1. Change current directory to a Git checkout (e.g. `~/git/emacs' or something).
> 2. From the command line:
>
> $ emacs --batch --eval "(progn (setf vc-git-program \"git-is-not-installed\") (find-file-noselect
> \"whatever\"))"
> Error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed")
>
> Expected: Emacs is able to open the file, Git must not be essential.
Emacs does open the file; what you see is not an error, it's a
message. The code which tries to invoke Git runs with-demoted-errors,
so any error is converted to a simple message. If you try this
variant of your command:
$ emacs --batch --eval "(progn (setf vc-git-program \"git-is-not-installed\") (message \"%s\" (find-file-noselect \"README\")))"
you will see:
Error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed")
README
That "README" at the end means that find-file-noselect did read the
file into its buffer, and the error message is just a message.
So if this somehow prevented you from doing something, please tell
more, or maybe the recipe needs more steps?
This bug report was last modified 1 year and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.