From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36492: c-mode fails with errors during fontification Date: Tue, 09 Jul 2019 00:46:10 +0300 Organization: LINKOV.NET Message-ID: <877e8s19p9.fsf@mail.linkov.net> References: <20190706142748.85417.qmail@mail.muc.de> <871rz15xp1.fsf@mail.linkov.net> <20190708125332.GA5244@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66780"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Alan Mackenzie , 36492@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 08 23:49:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkbVk-000HDV-4o for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 23:49:24 +0200 Original-Received: from localhost ([::1]:45024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkbVi-0006fc-Hq for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 17:49:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40273) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkbVP-0006fI-Nf for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 17:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkbVO-0008Qy-B0 for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 17:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkbVO-0008PV-57; Mon, 08 Jul 2019 17:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkbVO-00033S-0b; Mon, 08 Jul 2019 17:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 08 Jul 2019 21:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36492 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 36492-submit@debbugs.gnu.org id=B36492.156262252511714 (code B ref 36492); Mon, 08 Jul 2019 21:49:01 +0000 Original-Received: (at 36492) by debbugs.gnu.org; 8 Jul 2019 21:48:45 +0000 Original-Received: from localhost ([127.0.0.1]:59785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbV6-00032s-Ky for submit@debbugs.gnu.org; Mon, 08 Jul 2019 17:48:44 -0400 Original-Received: from azure.elm.relay.mailchannels.net ([23.83.212.7]:48250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkbV4-00032g-9p for 36492@debbugs.gnu.org; Mon, 08 Jul 2019 17:48:42 -0400 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 434171426EF; Mon, 8 Jul 2019 21:48:41 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a97.g.dreamhost.com (100-96-92-193.trex.outbound.svc.cluster.local [100.96.92.193]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B5CE7142BE8; Mon, 8 Jul 2019 21:48:40 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a97.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.17.3); Mon, 08 Jul 2019 21:48:41 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Plucky-Little: 7156d243731c30a7_1562622521016_589675142 X-MC-Loop-Signature: 1562622521016:2499581453 X-MC-Ingress-Time: 1562622521016 Original-Received: from pdx1-sub0-mail-a97.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTP id 82FD381FD1; Mon, 8 Jul 2019 14:48:35 -0700 (PDT) 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=IiTpBZVgl7xFRov2pG+Lry1nKp8=; b= ifPOh0E4t9qJr4TCHsKeHpJ5mKwP5RT5NxHSA0LCdGicHaxWg9lFlogR6nJ47L1P LHgWXfkUx5QIlld4G2tJw6w6bl9oo6MHINg8PdcgHDCxQ/N+8aqQN1uif4U2zHBd bip6sYZ2v3PxeY/S89h46uB30I6ykdpz9ODDRPLGqDM= Original-Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (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-a97.g.dreamhost.com (Postfix) with ESMTPSA id 39DCD81FC1; Mon, 8 Jul 2019 14:48:31 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a97 In-Reply-To: (Noam Postavsky's message of "Mon, 8 Jul 2019 09:16:56 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgedugddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledruddvjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepnhhpohhsthgrvhhssehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162376 Archived-At: >> > I wonder if ignore-errors around font-lock-ensure in mm-display-inline-fontify >> > is still necessary to ensure no more bugs in other modes disrupt Gnus >> > by erroneous code in attachments? Or maybe raising such errors will help >> > to find fontification bugs sooner? >> >> My feeling is that it's better to let the errors happen, so that we can >> debug them. But on the other hand, it's not me that gets inconvenienced >> by such an error (I don't use gnus). > > Rather than ignore-errors, perhaps using with-demoted-errors would > still let the errors be noticed without too much inconvenience? I tried this change: diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 6ffa1fc168..c833f2ed01 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -500,7 +500,7 @@ mm-display-inline-fontify (setq mode major-mode))) ;; Do not fontify if the guess mode is fundamental. (unless (eq major-mode 'fundamental-mode) - (font-lock-ensure)))) + (with-demoted-errors (font-lock-ensure))))) (setq text (buffer-string)) (when (eq mode 'diff-mode) (setq ovs (mapcar (lambda (ov) (list ov (overlay-start ov) But it pops up the same error backtrace buffer.