From: Eli Zaretskii <eliz@gnu.org>
To: Paul Pogonyshev <pogonyshev@gmail.com>
Cc: 65763@debbugs.gnu.org
Subject: bug#65763: Error opening a file from a Git working directory if Git is not installed
Date: Tue, 05 Sep 2023 22:44:34 +0300 [thread overview]
Message-ID: <831qfc4d7h.fsf@gnu.org> (raw)
In-Reply-To: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@mail.gmail.com> (message from Paul Pogonyshev on Tue, 5 Sep 2023 20:54:54 +0200)
> From: Paul Pogonyshev <pogonyshev@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?
next prev parent reply other threads:[~2023-09-05 19:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 18:54 bug#65763: Error opening a file from a Git working directory if Git is not installed Paul Pogonyshev
2023-09-05 19:44 ` Eli Zaretskii [this message]
2023-09-05 20:06 ` Paul Pogonyshev
2023-09-05 20:14 ` Paul Pogonyshev
2023-09-06 2:25 ` Eli Zaretskii
2023-09-06 7:29 ` Paul Pogonyshev
2023-09-06 12:13 ` Eli Zaretskii
2023-09-06 12:35 ` Dmitry Gutov
2023-09-06 12:49 ` Paul Pogonyshev
2023-09-06 12:52 ` Dmitry Gutov
2023-09-06 13:11 ` Paul Pogonyshev
2023-09-06 14:31 ` Dmitry Gutov
2023-09-06 15:46 ` Eli Zaretskii
2023-09-06 15:59 ` Dmitry Gutov
2023-09-10 6:26 ` Eli Zaretskii
2023-09-10 13:21 ` Dmitry Gutov
2023-09-10 13:40 ` Eli Zaretskii
2023-09-10 17:36 ` Paul Pogonyshev
2023-09-10 17:52 ` Eli Zaretskii
2023-09-06 13:06 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=831qfc4d7h.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65763@debbugs.gnu.org \
--cc=pogonyshev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).