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: Thu, 30 Jan 2020 01:07:05 +0200 Organization: LINKOV.NET Message-ID: <871rrhkgkm.fsf@mail.linkov.net> References: <875zh73dg8.fsf@betli.tmit.bme.hu> <8736c921s6.fsf@mail.linkov.net> <875zh13e5d.fsf@mail.linkov.net> <87h80iqafm.fsf@betli.tmit.bme.hu> <87ftg0fnyb.fsf@mail.linkov.net> <87d0b3qz3m.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="9319"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) Cc: 39190@debbugs.gnu.org, Stefan Monnier To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 30 00:46:54 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 1iwx2r-0002Mn-M7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jan 2020 00:46:53 +0100 Original-Received: from localhost ([::1]:53090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwx2q-0005IL-Of for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Jan 2020 18:46:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40699) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwx17-0003QA-R4 for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 18:45:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwx16-0004Kq-Mx for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 18:45:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwx14-0004IN-Os for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 18:45:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iwx14-0003qH-O8 for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 18:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jan 2020 23:45:02 +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.158034148514696 (code B ref 39190); Wed, 29 Jan 2020 23:45:02 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 29 Jan 2020 23:44:45 +0000 Original-Received: from localhost ([127.0.0.1]:34720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iwx0n-0003oy-Hw for submit@debbugs.gnu.org; Wed, 29 Jan 2020 18:44:45 -0500 Original-Received: from azure.elm.relay.mailchannels.net ([23.83.212.7]:21151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iwx0l-0003oo-Bt for 39190@debbugs.gnu.org; Wed, 29 Jan 2020 18:44:44 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 33ACA580B66; Wed, 29 Jan 2020 23:44:42 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com (100-96-1-10.trex.outbound.svc.cluster.local [100.96.1.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 905C058119E; Wed, 29 Jan 2020 23:44:41 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 29 Jan 2020 23:44:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Turn-Arch: 40a5efbc3ecc0844_1580341481931_1125987433 X-MC-Loop-Signature: 1580341481931:2813475626 X-MC-Ingress-Time: 1580341481931 Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a85.g.dreamhost.com (Postfix) with ESMTP id 34EAB7F012; Wed, 29 Jan 2020 15:44:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=SoQ6Ly/aHezNYoAZi+N+I2S1ukE=; b= QOd2BckfJDRBUHvBDXoIBX/YdFdvdk6bqdxSs4lvOPHPYFxHpq7RmBqA2/g6bm4U x2kNlk7hVy2GJLpASdbuKuF6zRNYflxMUabFens3qVdRhFVrsEP0v4l1PGi2ce8X npDX5VzE3xpB4I2vpFsu8wrY6BayK7hSb482kidJOl0= Original-Received: from mail.jurta.org (m91-129-105-126.cust.tele2.ee [91.129.105.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a85.g.dreamhost.com (Postfix) with ESMTPSA id DF5477F009; Wed, 29 Jan 2020 15:44:33 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a85 In-Reply-To: <87d0b3qz3m.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Tue, 28 Jan 2020 18:18:05 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrfeejgdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedruddvieenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedruddviedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehfvghlihgtihgrnhdrnhgvmhgvthhhsehgmhgrihhlrdgtohhm 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:175419 Archived-At: >> Since it will take much time when the fix in Emacs will appear in a released >> version, a workaround needs to be added to Eglot immediately. > > OK, but this feature ("Better syntax highlighting of Diff hunks") will > first appear in Emacs 27. Right, so it needs to be fixed in Emacs 27. Could you please try to reproduce the issue using Eglot with the following minimal patch. If it really fixes the bug then it should be committed to Emacs 27 immediately, and more changes could be added later. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 2dbab80208..9035f7643a 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2719,7 +2719,7 @@ diff-syntax-fontify-props (cl-assert (null buffer-file-name)) (let ((enable-local-variables :safe) ;; to find `mode:' (buffer-file-name file)) - (set-auto-mode) + (delay-mode-hooks (set-auto-mode)) ;; FIXME: Is this really worth the trouble? (when (and (fboundp 'generic-mode-find-file-hook) (memq #'generic-mode-find-file-hook