[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57407: closed (Re: bug#57407: [PATCH] Handle error of ’vc-registered
From: |
Simon Tournier |
Subject: |
bug#57407: closed (Re: bug#57407: [PATCH] Handle error of ’vc-registered’) |
Date: |
Mon, 10 Jun 2024 16:03:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
On Sun, 09 Jun 2024 at 22:18, help-debbugs@gnu.org (GNU bug Tracking System)
wrote:
>> That was one year ago.
>>
>> Simon, did you have a chance to look into the issues that Dmitry
>> mentioned below?
>
> More information was requested, but none was given within 9 months, so
> I'm closing this bug. If this is still an issue, please reply to this
> email (use "Reply to all" in your email client) and we can reopen the
> bug report.
The issue is not gone, AFAICT. The cover letter provides a reproducer;
see below.
> From: Simon Tournier <zimon.toutoune@gmail.com>
> Subject: [PATCH] Handle error of ’vc-registered’
> To: bug-gnu-emacs@gnu.org
> Date: Thu, 25 Aug 2022 18:20:07 +0200
> Date: Thu, 25 Aug 2022 18:20:07 +0200 (1 year, 41 weeks, 2 days ago)
>
> Hi,
>
> Submission (Bug#18481) [0] merged on 2020-08-13 with commit
> 991e145450ec8b02865597bc80fd797e39e81f07 [1] aims to:
>
> “Notify the user if we errors when querying for registered git files“
>
> However, the replacement of ’ignore-errors’ by ’with-demoted-errors’
> introduces spurious messages. This patch proposes to handle the errors
> in a way that:
>
> 1. the user is still informed (avoid silent error)
> 2. improve the messages trying to be more accurate
> 3. do it for all the VC backends
>
> 0: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18481
> 1:
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=991e145450ec8b02865597bc80fd797e39e81f07
>
>
>
> First, let compare the previous situation with the patched one. If the
> user runs ’find-file’ in a Git repository without having installed the
> Git binary, then Emacs complains and the error is misleading.
> Reproducer:
>
> $ which git
> which: no git in …
> $ mkdir -p /tmp/Git/.git
> $ emacs -q --batch --eval="(find-file \"/tmp/Git/foo\")"
> Error: (file-missing "Searching for program" "No such file or directory"
> "git")
> Package vc-mtn is deprecated
>
>
> Not having a working Git installation is not an error for opening one
> file belonging to a folder containing a ’.git’ subdirectory. For
> instance, if an user processes many files reporting many messages, then
> it seems hard to locate the real error, if any.
>
>
> Moreover, the messages are inconsistent depending on the VC backend;
> from nothing reported to a backtrace.
>
> $ mkdir -p /tmp/Bzr/.bzr
> $ emacs -q --batch --eval="(find-file \"/tmp/Bzr/foo\")"
> Error: (file-missing "Searching for program" "No such file or directory"
> "bzr")
> Error: (file-missing "Searching for program" "No such file or directory"
> "bzr")
>
> Error: file-missing ("Searching for program" "No such file or directory"
> "bzr")
>
> [...]
>
> Searching for program: No such file or directory, bzr
Well, I am not following very closely the development of Emacs master,
so I cannot tell with high confidence if a workaround introduced
elsewhere fixes the issue. However, from my quick look, the code that
triggers the spurious messages has not been changed.
Sorry to not have the time to send a v2; I am running out of time.
However, closing this report:
1. Do not change that 991e145450ec8b02865597bc80fd797e39e81f07 is
clearly incorrect. It’s a regression
2. My patch, while imperfect, fixes such regression.
Cheers,
simon