unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43192@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	[thread overview]
Message-ID: <CA+G3_PPPAsaFyaY7jvnknh4qinaq3XW+Q8X=VKu2yKy3DBCp1w@mail.gmail.com> (raw)
In-Reply-To: <87pn72fdsh.fsf@gnus.org>

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@gnus.org> wrote:
>
> Tom Gillespie <tgbugs@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





      reply	other threads:[~2020-09-04  3:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  2:49 bug#43192: lisp/files.el; 6d10b607d0 introduced bug that breaks C-x C-c Tom Gillespie
2020-09-04  2:58 ` Lars Ingebrigtsen
2020-09-04  3:16   ` Tom Gillespie [this message]

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='CA+G3_PPPAsaFyaY7jvnknh4qinaq3XW+Q8X=VKu2yKy3DBCp1w@mail.gmail.com' \
    --to=tgbugs@gmail.com \
    --cc=43192@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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).