From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.bugs Subject: bug#43192: lisp/files.el; 6d10b607d0 introduced bug that breaks C-x C-c Date: Thu, 3 Sep 2020 20:16:09 -0700 Message-ID: References: <87pn72fdsh.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1810"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43192@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 04 05:17:25 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kE2E8-0000ND-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 05:17:24 +0200 Original-Received: from localhost ([::1]:52130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE2E7-0005eU-P8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Sep 2020 23:17:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE2Dm-0005Qt-G3 for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kE2Dm-0001Of-7F for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kE2Dm-0000iB-35 for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Gillespie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2020 03:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43192 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 43192-submit@debbugs.gnu.org id=B43192.15991893901209 (code B ref 43192); Fri, 04 Sep 2020 03:17:02 +0000 Original-Received: (at 43192) by debbugs.gnu.org; 4 Sep 2020 03:16:30 +0000 Original-Received: from localhost ([127.0.0.1]:36742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE2DG-0000JD-9W for submit@debbugs.gnu.org; Thu, 03 Sep 2020 23:16:30 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:55733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE2DD-0000D2-GX for 43192@debbugs.gnu.org; Thu, 03 Sep 2020 23:16:28 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id a65so4694397wme.5 for <43192@debbugs.gnu.org>; Thu, 03 Sep 2020 20:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=406A3A0Fjg/Gz+/gUfCvZc5/WkvErk7SqqZ2IVVHhi0=; b=Id1petJSGecNiZW/NjuufBB7BVOkJjqRyZHmV8dFiP365E4NXodg2IrAzLDbWQg4N2 v0jvohkoINIfFGxUlRRH0is2RfaBYUhSj7QSLro3anVf7UpqtFfMJVld69Yt1m9DvcLR n3Mq6TkQvGo6uQ8VWhzst86G4TaJrB9xoWvYHvJDTfAlXSQganKU6YBkHZokutwa8PrC mUtXFNsKJTZaYoGbjm1mz32o7Lqw0HlBcFbXMyArJnmlRUSPZ04hD5SK0lnyNHhcF5MB CK02UModW78qaa/P3yPNP4+9ZMIrYuVJNh5p+UYnzQSQpJd4ARXppXXib6f3OoQfHz13 w0HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=406A3A0Fjg/Gz+/gUfCvZc5/WkvErk7SqqZ2IVVHhi0=; b=UuEyK58TLJO95eX8MGHwW8WmD+rjpn2foMomrycmL4MqIOYzRTyFjh7f8M+2V+TKin 0ro01/zA/fVXKoArFFwaZFA4vZURfG3P1P0OH4UdNI9vEC2npuERbwu6qh/2tj3innbR I6BOaU7PiB3c1c+xuoWqmz/xhfMF8YoRLeskuplwLTgoYnAXkehlH+V0uqNZe9e6JG3p Hiq+RY/1MSzngi6AKUKXBRPY4Hg2GG6+m1BJWvUk3ptKkPfRNJNk8ojLK4SoF8px4s02 Wa2330Ls9UkiqpsqOnCf4HlbbygCNC+vXiQ4YJG5PKH1RK6aOVac4Kb5MUGid8mT3hY/ S2/g== X-Gm-Message-State: AOAM531wesVHWq1HjAfOsqkBLjIjNMBwnVjRdXfKR+HeWbE5kLqg3LMt 1fh6IYDeiy7n0A9HvuCYK6wSUe5XqdfU1eiv0GQ= X-Google-Smtp-Source: ABdhPJzGxQAejttdddeugcE8Z9O8YAZ5UoT76EMt2rltjtv57dM91ADve+OZ4eCgKJVEG+BfkLbzaOaX8dM2uz5F26A= X-Received: by 2002:a1c:dec2:: with SMTP id v185mr5267978wmg.1.1599189380312; Thu, 03 Sep 2020 20:16:20 -0700 (PDT) In-Reply-To: <87pn72fdsh.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187067 Archived-At: 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 wrote: > > Tom Gillespie 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