GNU bug report logs - #43192
lisp/files.el; 6d10b607d0 introduced bug that breaks C-x C-c

Previous Next

Package: emacs;

Reported by: Tom Gillespie <tgbugs <at> gmail.com>

Date: Fri, 4 Sep 2020 02:50:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

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: Tom Gillespie <tgbugs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43192 <at> debbugs.gnu.org
Subject: bug#43192: lisp/files.el; 6d10b607d0 introduced bug that breaks C-x C-c
Date: Thu, 3 Sep 2020 20:16:09 -0700
Ah, I wondered if that might be the case, everything else was so
consistent, but I thought there might be some reason to use the
variable directly. Since it is not the case my other concerns don't
matter. Confirming fixed on my end. Thanks!
Tom

On Thu, Sep 3, 2020 at 7:59 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> Tom Gillespie <tgbugs <at> gmail.com> writes:
>
> > #+begin_src diff
> > +                                   (string-match
> > +                                    (concat "\\<"
> > +                                            (regexp-quote
> > +                                             (file-name-nondirectory
> > +                                              buffer-file-name))
> > +                                            "<[0-9]+>\\'")
> > +                                    (buffer-name buffer)))
> > #+end_src
> >
> > This is the second statement in a call to `or'. buffer-file-name is
> > not guaranteed to be non-nil because buffers like *scratch* and
> > *Messages* exist. In many workflows for emacsclient opening to scratch
> > and closing again from scratch are common.
>
> I think it's just a typo -- the code should be:
>
> diff --git a/lisp/files.el b/lisp/files.el
> index 3403e257a1..5f5902d0cb 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -5574,7 +5574,7 @@ save-some-buffers
>                                      (concat "\\<"
>                                              (regexp-quote
>                                               (file-name-nondirectory
> -                                              buffer-file-name))
> +                                              (buffer-file-name buffer)))
>                                              "<[^>]*>\\'")
>                                      (buffer-name buffer)))
>                                    ;; The buffer name is similar to the
>
> I've now applied this to Emacs 28, and that fixes the test case in this
> bug report.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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