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#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent Date: Tue, 03 Mar 2020 00:03:10 +0200 Organization: LINKOV.NET Message-ID: <87v9nm76z9.fsf@mail.linkov.net> References: <59A3A231-5EC7-4869-81D5-46CE5DA2D75A@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="15173"; 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: 38778@debbugs.gnu.org To: Howard Melman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 02 23:21:36 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 1j8tRQ-0003qW-75 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Mar 2020 23:21:36 +0100 Original-Received: from localhost ([::1]:39266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8tRP-0003fv-8b for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Mar 2020 17:21:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54053) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8tQv-00035N-7U for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:21:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8tQt-0002aW-0L for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:21:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60725) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8tQs-0002aQ-ER for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8tQs-0003he-BB for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2020 17:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Mar 2020 22:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38778 X-GNU-PR-Package: emacs Original-Received: via spool by 38778-submit@debbugs.gnu.org id=B38778.158318761214110 (code B ref 38778); Mon, 02 Mar 2020 22:21:02 +0000 Original-Received: (at 38778) by debbugs.gnu.org; 2 Mar 2020 22:20:12 +0000 Original-Received: from localhost ([127.0.0.1]:38457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8tQ3-0003fW-RH for submit@debbugs.gnu.org; Mon, 02 Mar 2020 17:20:12 -0500 Original-Received: from cadetblue.birch.relay.mailchannels.net ([23.83.209.28]:28586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8tQ1-0003fL-PM for 38778@debbugs.gnu.org; Mon, 02 Mar 2020 17:20:10 -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 833FB260EB2; Mon, 2 Mar 2020 22:20:08 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a46.g.dreamhost.com (100-96-217-40.trex.outbound.svc.cluster.local [100.96.217.40]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 17344260D93; Mon, 2 Mar 2020 22:20:08 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a46.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); Mon, 02 Mar 2020 22:20:08 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Wipe-Rock: 13de742262489078_1583187608310_761254664 X-MC-Loop-Signature: 1583187608310:461466825 X-MC-Ingress-Time: 1583187608309 Original-Received: from pdx1-sub0-mail-a46.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTP id 02EFF7F565; Mon, 2 Mar 2020 14:20:06 -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=tWn2ALp/L5JrAW5ifFIzK0l4PR8=; b= OKSOhDlhegbUaRhZPYDozPhcaDyBhZ7C5WCfzEiMPJeaduUawSe0o4czBxV0sz/O 5oUtpgYODufy1/qZHrjXLofk1ep135qkIaPU9cAH03Mq8E/Z1hXtVwpalZzmGvni FSHoUnv1uYrtES73X0YTMJwznJDZH99BZsixOiGR1oA= Original-Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (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-a46.g.dreamhost.com (Postfix) with ESMTPSA id 3928980010; Mon, 2 Mar 2020 14:20:04 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a46 In-Reply-To: <59A3A231-5EC7-4869-81D5-46CE5DA2D75A@gmail.com> (Howard Melman's message of "Sat, 28 Dec 2019 14:42:56 -0500") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddtgedgudeitdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehhmhgvlhhmrghnsehgmhgrihhlrdgtohhm 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:176781 Archived-At: --=-=-= Content-Type: text/plain > I tried this with emacs -Q on a mac using Gnu Emacs 26.3. > > Using customize-variable I set next-error-highlight to t ("Semipermanent > highlighting") and saved that value for the current session. > > I then ran M-x grep and got a *grep* buffer and moved through the errors > using n and p. The matches appeared in another window and were > highlighted but the highlighting disappeared after a short time (could > be the default value of 0.5 seconds) even if I didn't hit a key. > > My understanding of next-error-highlight is when set to t, the > highlighting should remain until I enter another command. Yet > it seems to disappear on it's own. Sorry for the delay, I looked at this bug report, and the solution for you is to customize next-error-highlight-no-select instead of next-error-highlight, because next-error-highlight-no-select affects the highlighting of non-selected windows displayed from the *grep* buffer with n and p keys. Before closing this bug report, I propose to improve the documentation: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=next-error-highlight-no-select.patch diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 272b08d08e..95bdca737d 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -214,6 +214,7 @@ Compilation Mode @kindex C-x ` @findex next-error @vindex next-error-highlight +@vindex next-error-highlight-no-select To visit errors sequentially, type @w{@kbd{C-x `}} (@code{next-error}), or equivalently @kbd{M-g M-n} or @kbd{M-g n}. This command can be invoked from any buffer, not just a Compilation @@ -258,7 +259,9 @@ Compilation Mode When Emacs visits the locus of an error message, it momentarily highlights the relevant source line. The duration of this highlight -is determined by the variable @code{next-error-highlight}. +is determined by the variable @code{next-error-highlight} for +loci in selected buffers, and @code{next-error-highlight-no-select} for +loci in non-selected buffers. @vindex compilation-context-lines If the @file{*compilation*} buffer is shown in a window with a left diff --git a/lisp/simple.el b/lisp/simple.el index 688dbcc947..d1e10850bf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -76,6 +76,8 @@ next-error (defcustom next-error-highlight 0.5 "Highlighting of locations in selected source buffers. +See `next-error-highlight-no-select' to customize highlighting +of locations in non-selected buffers. If a number, highlight the locus in `next-error' face for the given time in seconds, or until the next command is executed. If t, highlight the locus until the next command is executed, or until @@ -91,7 +93,9 @@ next-error-highlight :version "22.1") (defcustom next-error-highlight-no-select 0.5 - "Highlighting of locations in `next-error-no-select'. + "Highlighting of locations in non-selected source buffers. +Usually non-selected buffers are displayed by `next-error-no-select'. +See `next-error-highlight' to customize highlighting of selected buffers. If number, highlight the locus in `next-error' face for given time in seconds. If t, highlight the locus indefinitely until some other locus replaces it. If nil, don't highlight the locus in the source buffer. --=-=-=--