From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32676: [PATCH] Add option to highlight the 'next-error' error message Date: Wed, 14 Oct 2020 22:30:55 +0300 Organization: LINKOV.NET Message-ID: <874kmwy7k8.fsf@mail.linkov.net> References: <20180910050802.25922-1-erjoalgo@gmail.com> <83a7ollcq2.fsf@gnu.org> <874let1o3k.fsf@gmail.com> <831s9xl54b.fsf@gnu.org> <874leq1hw4.fsf@mail.linkov.net> <87worlgh0k.fsf@mail.linkov.net> <878swkxqo1.fsf_-_@mail.linkov.net> <874kmxz7e0.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19803"; 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: Ernesto Alfonso , Robert Pluim , 32676@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 14 21:51:31 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 1kSmo7-00050i-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Oct 2020 21:51:31 +0200 Original-Received: from localhost ([::1]:46036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSmo6-0007po-No for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Oct 2020 15:51:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSmne-0007ou-CL for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2020 15:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSmne-0005TJ-0G for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2020 15:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSmnd-0004XE-UI for bug-gnu-emacs@gnu.org; Wed, 14 Oct 2020 15:51:01 -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, 14 Oct 2020 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32676 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 32676-submit@debbugs.gnu.org id=B32676.160270503717391 (code B ref 32676); Wed, 14 Oct 2020 19:51:01 +0000 Original-Received: (at 32676) by debbugs.gnu.org; 14 Oct 2020 19:50:37 +0000 Original-Received: from localhost ([127.0.0.1]:53056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSmnF-0004WQ-6b for submit@debbugs.gnu.org; Wed, 14 Oct 2020 15:50:37 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:56425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSmnD-0004Vq-6k for 32676@debbugs.gnu.org; Wed, 14 Oct 2020 15:50:35 -0400 X-Originating-IP: 91.129.102.160 Original-Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7AD9640003; Wed, 14 Oct 2020 19:50:26 +0000 (UTC) In-Reply-To: <874kmxz7e0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Oct 2020 07:47:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:190519 Archived-At: > I've now applied the patch (after reworking slightly), and it seems to > work well, so I've pushed it to Emacs 28. > >> 1. compilation-current-error should be generalized not to be too >> compilation-specific; > > Reading the code, it looks like that variable is always set, even in > grep buffers and the like? So it's a bad name, but... Unsurprisingly, now using occur fails with the error next-error-found: Symbol’s value as variable is void: compilation-current-error and when compile.el is loaded, occur fails with the error next-error-found: Wrong type argument: integer-or-marker-p, nil This fails only when next-error-message-highlight is customized to t, so there is no need to revert the patch, but it should be fixed ASAP. > Is there a different variable that should be used instead? I can't find another variable. Maybe a new variable should be created, with a name like next-error-current. Then compilation-current-error could be declared as an obsolete alias. Or maybe there is no need to remove the old variable, so they both could be used: compilation-current-error in compilation-mode, and next-error-current elsewhere. PS: I see compilation-current-error is used also in next-error-follow-mode-post-command-hook, and it works fine when 'C-c C-f' (next-error-follow-minor-mode) in enabled in occur buffers.