From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props) Date: Wed, 25 Mar 2020 22:39:59 +0200 Organization: LINKOV.NET Message-ID: <87k138jka8.fsf@mail.linkov.net> References: <875zh73dg8.fsf@betli.tmit.bme.hu> <875zh13e5d.fsf@mail.linkov.net> <87h80iqafm.fsf@betli.tmit.bme.hu> <87ftg0fnyb.fsf@mail.linkov.net> <87d0b3qz3m.fsf@betli.tmit.bme.hu> <871rrhkgkm.fsf@mail.linkov.net> <87v9os914e.fsf@betli.tmit.bme.hu> <87a764y35u.fsf@mail.linkov.net> <87r1zd8gvx.fsf@betli.tmit.bme.hu> <87imknqogu.fsf@mail.linkov.net> <87lfpi548j.fsf@mail.linkov.net> <87a75wek14.fsf@mail.linkov.net> <87sgjj7njt.fsf@betli.tmit.bme.hu> <87o8twep2f.fsf@mail.linkov.net> <87sgj78q2o.fsf@mail.linkov.net> <87imitsad7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="25118"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 39190@debbugs.gnu.org, Felician Nemeth To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 25 22:01:03 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 1jHD95-0006Ra-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 22:01:03 +0100 Original-Received: from localhost ([::1]:43324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHD94-0004Dv-HY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 17:01:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHD89-0003NT-U2 for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 17:00:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHD88-00080Z-LY for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 17:00:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHD88-0007zg-Hx for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 17:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHD87-0008Bx-GC for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 17:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2020 21:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39190 X-GNU-PR-Package: emacs Original-Received: via spool by 39190-submit@debbugs.gnu.org id=B39190.158516998431412 (code B ref 39190); Wed, 25 Mar 2020 21:00:03 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 25 Mar 2020 20:59:44 +0000 Original-Received: from localhost ([127.0.0.1]:57848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHD7o-0008Aa-7z for submit@debbugs.gnu.org; Wed, 25 Mar 2020 16:59:44 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:45955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHD7j-00089X-8b for 39190@debbugs.gnu.org; Wed, 25 Mar 2020 16:59:39 -0400 X-Originating-IP: 91.129.96.173 Original-Received: from mail.gandi.net (m91-129-96-173.cust.tele2.ee [91.129.96.173]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id BCFB060002; Wed, 25 Mar 2020 20:59:29 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Tue, 24 Mar 2020 18:29:34 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:177723 Archived-At: >> (defun conf-guess-mode () >> (funcall (conf--guess-mode))) > > That shouldn't be needed! > [ I.e. the right fix should arrange for that not to be necessary. > I'm looking into it, thanks. ] BTW, I noticed another problem related to diff-syntax-fontify: when diff-font-lock-syntax is customized to 'hunk-also', and a patch displayed by Gnus contains a truncated local variables list, e.g. only the first line ;; Local Variables: is presented in diff context without the terminating "End:" then opening such attachment patch raises the error: "Local variables list is not properly terminated" Not sure if this is the right way to fix this, but it works: diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 8171a58515..96baea8526 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2724,7 +2724,7 @@ diff-syntax-fontify-props (buffer-file-name file)) ;; Don't run hooks that might assume buffer-file-name ;; really associates buffer with a file (bug#39190). - (delay-mode-hooks (set-auto-mode)) + (delay-mode-hooks (ignore-errors (set-auto-mode))) ;; FIXME: Is this really worth the trouble? (when (and (fboundp 'generic-mode-find-file-hook) (memq #'generic-mode-find-file-hook