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: Fri, 31 Jan 2020 00:45:17 +0200 Organization: LINKOV.NET Message-ID: <87a764y35u.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> <871rrhkgkm.fsf@mail.linkov.net> <87v9os914e.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="38528"; 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, Stefan Monnier To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 31 00:04:22 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 1ixIrG-0009zO-8U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jan 2020 00:04:22 +0100 Original-Received: from localhost ([::1]:40634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixIrF-000221-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jan 2020 18:04:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34069) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixIq0-0000my-DK for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixIpz-0007kd-7R for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixIpz-0007kF-3U for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ixIpy-0003Hk-WA for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jan 2020 23:03: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.158042536912582 (code B ref 39190); Thu, 30 Jan 2020 23:03:02 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 30 Jan 2020 23:02:49 +0000 Original-Received: from localhost ([127.0.0.1]:36357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixIpl-0003Gq-2p for submit@debbugs.gnu.org; Thu, 30 Jan 2020 18:02:49 -0500 Original-Received: from anteater.elm.relay.mailchannels.net ([23.83.212.3]:46826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixIpi-0003Gi-N4 for 39190@debbugs.gnu.org; Thu, 30 Jan 2020 18:02:47 -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 74A4D5E2899; Thu, 30 Jan 2020 23:02:45 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a43.g.dreamhost.com (100-96-10-4.trex.outbound.svc.cluster.local [100.96.10.4]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C7D1E5E28E1; Thu, 30 Jan 2020 23:02:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a43.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); Thu, 30 Jan 2020 23:02:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cold-Spicy: 61cbf66846b6e5cb_1580425365128_593292083 X-MC-Loop-Signature: 1580425365127:137535292 X-MC-Ingress-Time: 1580425365127 Original-Received: from pdx1-sub0-mail-a43.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a43.g.dreamhost.com (Postfix) with ESMTP id ACE787F104; Thu, 30 Jan 2020 15:02:40 -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=H+fecMR7tEHqz+c3Wu4fjnKwCyI=; b= fh/Uv3M/4YNHkG5eEmcnF7wJw94xVWi9kZ6lAHd+GonHfZ4NEh8XKgMVFDn3wRot rZ+MGjlmAMcVWaUm7STb7WPNjxD3+iWks6kfsBe1m84IIaktUWA1qVCEofHzvvaF a76XBCxuLC72f1s4ecGfKM5D4On9NTbanB2XSWH/pZo= 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-a43.g.dreamhost.com (Postfix) with ESMTPSA id 39D357F470; Thu, 30 Jan 2020 15:02:37 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a43 In-Reply-To: <87v9os914e.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Thu, 30 Jan 2020 20:48:33 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrfeelgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedruddvieenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedruddviedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehfvghlihgtihgrnhdrnhgvmhgvthhhsehgmhgrihhlrdgtohhm 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:175458 Archived-At: >> 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. Before the patch, I got this error in the git master when trying to use 'C-c C-r' (diff-reverse-direction) in the diff buffer: Debugger entered--Lisp error: (wrong-type-argument arrayp nil) substring(nil 0 1) file-truename(nil) But after applying the patch, after-change-major-mode-hook is not called anymore in the temporary diff buffer. > Case 2. With (add-to-list 'python-mode-hook 'eglot-ensure) the recipe > fails in a post-command-hook, because eglot-ensure has this: > > (when buffer-file-name > (add-hook 'post-command-hook #'maybe-connect 'append nil))))) > > And buffer-file-name is non-nil for the diff buffer during the execution > of python-mode-hook. But during the execution of maybe-connect in the > post-command-hook, the buffer-file-name is nil and that leads to an > error. I guess Eglot should have more safeguarding, i.e. the same check 'when buffer-file-name' could be added to 'maybe-connect' as well.