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 23:48:00 +0200 Organization: LINKOV.NET Message-ID: <87ftdwgl7z.fsf@mail.linkov.net> References: <875zh73dg8.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> <87k138jka8.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="43681"; 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 23:00:19 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 1jHE4Q-000BCz-CV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 23:00:18 +0100 Original-Received: from localhost ([::1]:43842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHE4P-0007xx-Cd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 18:00:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52487) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHE4D-0007st-7T for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 18:00:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHE4B-00087v-UY for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 18:00:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHE4B-00087l-Qi for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 18:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHE4B-0001Ry-QB for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 18: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 22: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.15851735705452 (code B ref 39190); Wed, 25 Mar 2020 22:00:03 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 25 Mar 2020 21:59:30 +0000 Original-Received: from localhost ([127.0.0.1]:57928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHE3e-0001Ps-DF for submit@debbugs.gnu.org; Wed, 25 Mar 2020 17:59:30 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHE3c-0001PU-3Y for 39190@debbugs.gnu.org; Wed, 25 Mar 2020 17:59:29 -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 1465860005; Wed, 25 Mar 2020 21:59:18 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Wed, 25 Mar 2020 17:13:09 -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:177734 Archived-At: >> is presented in diff context without the terminating >> "End:" then opening such attachment patch raises the error: >> >> "Local variables list is not properly terminated" > > Really? AFAICT the code does: > > (unless (let ((case-fold-search t)) > (re-search-forward > (concat prefix "[ \t]*End:[ \t]*" suffix) > nil t)) > ;; This used to be an error, but really all it means is > ;; that this may simply not be a local-variables section, > ;; so just ignore it. > (message "Local variables list is not properly terminated")) > > so it shouldn't signal an error but just emit a message. Sorry, actually this is what is displayed in the echo area after I added ignore-errors. But before adding ignore-errors, there was such backtrace: Debugger entered--Lisp error: (error "Malformed local variable line: \"Local Variables:\"") signal(error ("Malformed local variable line: \"Local Variables:\"")) error("Malformed local variable line: %S" "Local Variables:") hack-local-variables(t) set-auto-mode() (let ((delay-mode-hooks t)) (set-auto-mode)) (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (set-auto-mode))) diff-syntax-fontify-props(#("a/lisp/dired-aux.el" ... diff-syntax-fontify-hunk(136 1334 t) diff-syntax-fontify(136 1334) diff--iterate-hunks(3750 #f(compiled-function (beg end) #)) diff--font-lock-syntax(3750) font-lock-fontify-keywords-region(1 3750 nil) font-lock-default-fontify-region(1 3750 nil) font-lock-fontify-region(1 3750) font-lock-ensure() mm-display-inline-fontify(... mm-display-patch-inline(... mm-display-inline(... gnus-mime-display-single(... gnus-mime-display-part(... gnus-mime-display-mixed(... gnus-mime-display-part(... gnus-display-mime() gnus-article-prepare-display() gnus-article-prepare(165466 nil) gnus-summary-display-article(165466 nil) gnus-summary-select-article(nil nil pseudo) gnus-summary-scroll-up(1) funcall-interactively(gnus-summary-scroll-up 1) call-interactively(gnus-summary-scroll-up nil nil) command-execute(gnus-summary-scroll-up) >> Not sure if this is the right way to fix this, but it works: > > I think we should try and arrange for errors to really be "not normal", > and then use `with-demoted-errors`, yes. > > But w.r.t file-local variables and diff-hunk, I think obeying "file-local > variables" doesn't make much sense when we only have a hunk to go on > since it's more common for the hunk not to include the actual file-local > vars, so if we find something it's likely to be a false-positive. I'll try to set enable-local-variables to nil in case of HUNK-ONLY.