GNU bug report logs - #40109
27.0.90; simple-delete-trailing-whitespace--bug-21766 fails if Git isn't installed

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Tue, 17 Mar 2020 17:15:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.0.90

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 40109 <at> debbugs.gnu.org
Subject: bug#40109: 27.0.90; simple-delete-trailing-whitespace--bug-21766 fails if Git isn't installed
Date: Thu, 28 Jan 2021 09:45:55 +0100
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> Make sure that git isn't installed, e.g. by running 'apt remove git' on
> a Debian system.  Then, in the Emacs source test directory:
>
> $ make lisp/simple-tests SELECTOR=simple-delete-trailing-whitespace--bug-21766
> make[1]: Entering directory '/emacs/test'
>   GEN      lisp/simple-tests.log
> Running 1 tests (2020-03-17 18:07:31+0100, selector `simple-delete-trailing-whitespace--bug-21766')
> Test simple-delete-trailing-whitespace--bug-21766 backtrace:
>   call-process("git" nil (t nil) nil "rev-parse" "--abbrev-ref" "HEAD"

I'm unable to reproduce the error with the current emacs-27 branch (or
on the trunk).  I "apt remove git" first, and then:

larsi <at> xo:~/src/emacs/emacs-27/test$ make lisp/simple-tests SELECTOR=simple-delete-trailing-whitespace--bug-21766
make[1]: Entering directory '/home/larsi/src/emacs/emacs-27/test'
  ELC      lisp/simple-tests.elc
  GEN      lisp/simple-tests.log
Running 1 tests (2021-01-28 09:43:24+0100, selector `simple-delete-trailing-whitespace--bug-21766')
   passed  1/1  simple-delete-trailing-whitespace--bug-21766 (0.089470 sec)

Ran 1 tests, 1 results as expected, 0 unexpected (2021-01-28 09:43:24+0100, 0.089821 sec)

make[1]: Leaving directory '/home/larsi/src/emacs/emacs-27/test'

[...]

> Ah, the problem is that with-demoted-errors uses
> condition-case-unless-debug.  More minimal example:
>
> $ emacs -Q -batch -eval '(let ((debug-on-error t)) (ignore-errors
> (with-demoted-errors "%S" (error "foo"))))'
> Debugger entered--Lisp error: (error "foo")
> […]
>
> I think this behavior is very confusing. Both version.el and
> trampver.el try to do the right thing, but that breaks in such a
> situation.

It is somewhat confusing, yes, but it's also pretty convenient in some
circumstances.

In any case, are you still seeing the reported test problem?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.