From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.bugs Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props) Date: Sun, 02 Feb 2020 10:42:26 +0100 Message-ID: <87r1zd8gvx.fsf@betli.tmit.bme.hu> 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> <871rrhkgkm.fsf@mail.linkov.net> <87v9os914e.fsf@betli.tmit.bme.hu> <87a764y35u.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="1766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 39190@debbugs.gnu.org, Stefan Monnier To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 02 10:43:12 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 1iyBmZ-0000Jd-F4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 10:43:11 +0100 Original-Received: from localhost ([::1]:54492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyBmY-0004Wg-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 04:43:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37686) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyBmR-0004WN-2y for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 04:43:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyBmQ-0006Ze-3U for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 04:43:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyBmQ-0006Za-0Q for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 04:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyBmP-0001aK-Sw for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 04:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2020 09:43:01 +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.15806365566062 (code B ref 39190); Sun, 02 Feb 2020 09:43:01 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 2 Feb 2020 09:42:36 +0000 Original-Received: from localhost ([127.0.0.1]:39542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyBm0-0001Zh-9i for submit@debbugs.gnu.org; Sun, 02 Feb 2020 04:42:36 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:40134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyBly-0001ZV-9f for 39190@debbugs.gnu.org; Sun, 02 Feb 2020 04:42:34 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id j104so14073368wrj.7 for <39190@debbugs.gnu.org>; Sun, 02 Feb 2020 01:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:face:mime-version; bh=eiRQfTph4eLw7PMX0OfB5TZ0c/kU1AaMVP1A/itkESE=; b=Bnv3+d69JCfKzD4+3pPX8RCdDvGnpSq9/yW8fX8ysgxwIw9PZ57+FVJlIVJFi2Gqsk rQpMpvYJPPWaj3bcZCPlBjBAWVy9kbNeDkctKaaV676EsGZQTSrMsqqaFOTpoYVHvyiC SrpvJ3qd0suMWiUAs/Eq3EV/KCnBySylSf3trD+uyd38lRvjyQreAsF+o4FfyLnPoesZ 4EsnXA2KVHgJX2BqKz9a3FjbTIWt3KDsVBwjjO1+1n9jePYbXTBSY2l4CZpp9GRoUk3E kR1PBUeZJnR2zZZUWv8lgVHU6HIapyHar/edVT0REM4MDnNc2YmafAX5uS+iKKq4QMlq CNTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:face:mime-version; bh=eiRQfTph4eLw7PMX0OfB5TZ0c/kU1AaMVP1A/itkESE=; b=jwv9+UUdj0Fj1L0PFZULfngeFGzCC02uZ0Si8l+rFdWPXRtbOi+7GAvdCnCgAvX3a3 qHKhd/VtD/RUDVOOPmxbC5dx/AUOZX3KLzulh/4xEtt+TYxGfgUi5E+b49KE4uFZ1j+T 1t1r5jFnQ7d47muk3fJsXZap9Tcnvn1k2ZpxDf4113OeifE+49ZB7F5tWDw7hZyiuvVb XD2WCpY4XEjuczEs3dMCX/yLScQQB6QF/3S0gTE+c5cUnq+FghcLQNw1Lj4nZ7yv5YKq RqRu6+nIwbV8wHsFL3quF3edOdSVDhwnTlMep13X6mdprCs54zdaokmukIqzS7KUd3ch oQRg== X-Gm-Message-State: APjAAAVHKrZZ9tVH7ugvr6mBgXys69AzVhEVeiyCeRMX1Mn8fvFw0lSA P5G07HeykmNKjJ7irIisKElSvA/u X-Google-Smtp-Source: APXvYqy5hV0WxsUKH/3E/v4gXu30fPxqHuiFCUDIAQRO/p/b/YGTiOADg+l7yMojrIiqM/Cv6PLU4g== X-Received: by 2002:adf:93c1:: with SMTP id 59mr9599082wrp.399.1580636547851; Sun, 02 Feb 2020 01:42:27 -0800 (PST) Original-Received: from betli.gmail.com (catv-178-48-82-41.catv.broadband.hu. [178.48.82.41]) by smtp.gmail.com with ESMTPSA id s22sm18098459wmh.4.2020.02.02.01.42.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Feb 2020 01:42:27 -0800 (PST) In-Reply-To: <87a764y35u.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 31 Jan 2020 00:45:17 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= 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:175577 Archived-At: Juri Linkov writes: >>> 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. >> >> Unfortunately the minimal patch doesn't fix the issue. >> >> Case 1. When Eglot is started manually, then the recipe fails in an >> after-change-major-mode-hook where the buffer-file-name is non-nil for >> the temporary diff buffer. > > Strange, when I tested the minimal patch, there were no errors anymore. Maybe I wasn't clear enough. I got no errors, but flymake incorrectly fontified the buffer. Anyway, I tried to look into why this happened even after applying your patch and it turned out that vc-find-revision-no-save also calls set-auto-mode. So, I don't know if the following patch is correct, but together with your patch it does solve the original issue. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index f64b6c0631..c50ba132e7 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2098,7 +2098,7 @@ vc-find-revision-no-save ;; For non-interactive, skip any questions (let ((enable-local-variables :safe) ;; to find `mode:' (buffer-file-name file)) - (ignore-errors (set-auto-mode))) + (ignore-errors (delay-mode-hooks (set-auto-mode)))) (normal-mode)) (set-buffer-modified-p nil) (setq buffer-read-only t))