GNU bug report logs - #38778
26.3; next-error-highlight set to t doesn't seem semi-permanent

Previous Next

Package: emacs;

Reported by: Howard Melman <hmelman <at> gmail.com>

Date: Sat, 28 Dec 2019 19:44:02 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 27.1

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38778 in the body.
You can then email your comments to 38778 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38778; Package emacs. (Sat, 28 Dec 2019 19:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Howard Melman <hmelman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 28 Dec 2019 19:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; next-error-highlight set to t doesn't seem semi-permanent
Date: Sat, 28 Dec 2019 14:42:56 -0500
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.

Howard


In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
of 2019-09-02 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1671
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Creating customization items...
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
ls does not support --dired; see ‘dired-use-ls-dired’ for more details.
Grep finished with matches found
File local-variables error: (void-function python-black-on-save-mode)

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-git
diff-mode easy-mmode python tramp-sh tramp tramp-compat tramp-loaddefs
trampver parse-time format-spec advice auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json shell pcomplete
grep compile comint ansi-color ring map seq byte-opt gv bytecomp
byte-compile cconv dired dired-loaddefs thingatpt help-fns radix-tree
help-mode cus-edit easymenu cus-start cus-load wid-edit cl-loaddefs
cl-lib elec-pair time-date tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 259054 13300)
(symbols 48 24850 2)
(miscs 40 179 325)
(strings 32 44096 2342)
(string-bytes 1 1289500)
(vectors 16 40807)
(vector-slots 8 789749 12026)
(floats 8 79 548)
(intervals 56 2073 0)
(buffers 992 17))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38778; Package emacs. (Mon, 02 Mar 2020 22:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 38778 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 38778 <at> debbugs.gnu.org
Subject: Re: bug#38778: 26.3; next-error-highlight set to t doesn't seem
 semi-permanent
Date: Tue, 03 Mar 2020 00:03:10 +0200
[Message part 1 (text/plain, inline)]
> 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:

[next-error-highlight-no-select.patch (text/x-diff, inline)]
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.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38778; Package emacs. (Tue, 03 Mar 2020 02:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 38778 <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: 38778 <at> debbugs.gnu.org
Subject: Re: bug#38778: 26.3; next-error-highlight set to t doesn't seem
 semi-permanent
Date: Mon, 2 Mar 2020 21:42:03 -0500
> On Mar 2, 2020, at 5:03 PM, Juri Linkov <juri <at> linkov.net> wrote:
> 
> 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.

Thank you. Setting next-error-highlight-no-select does indeed give me the behavior I want.

> Before closing this bug report, I propose to improve the documentation:

These doc changes would have enabled me to figure this out on my own, so I like them.

Howard






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38778; Package emacs. (Tue, 03 Mar 2020 17:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 38778 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: hmelman <at> gmail.com, 38778 <at> debbugs.gnu.org
Subject: Re: bug#38778: 26.3;
 next-error-highlight set to t doesn't seem semi-permanent
Date: Tue, 03 Mar 2020 19:18:58 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Date: Tue, 03 Mar 2020 00:03:10 +0200
> Cc: 38778 <at> debbugs.gnu.org
> 
> Before closing this bug report, I propose to improve the documentation:

Thanks, please push to the release branch, after taking care of a nit
below.

>    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
        ^^^^^^^^^^^^^^^^^^^
There's only one selected buffer, so I'd suggest to say "in the
selected buffer", singular.

>  (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.

In these two doc strings, please move the reference to the other
variable to the end of the doc string.  That is the usual place for
"see also" kinds of text, because that way it doesn't disrupt the
reading of the documentation of this variable.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38778; Package emacs. (Wed, 04 Mar 2020 00:11:03 GMT) Full text and rfc822 format available.

Message #17 received at 38778 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: hmelman <at> gmail.com, 38778 <at> debbugs.gnu.org
Subject: Re: bug#38778: 26.3; next-error-highlight set to t doesn't seem
 semi-permanent
Date: Wed, 04 Mar 2020 01:48:38 +0200
tags 38778 fixed
close 38778 27.1
quit

>> Before closing this bug report, I propose to improve the documentation:
>
> Thanks, please push to the release branch, after taking care of a nit
> below.

Pushed to the release branch with these changes, and closed.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 04 Mar 2020 00:11:04 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 38778 <at> debbugs.gnu.org and Howard Melman <hmelman <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 04 Mar 2020 00:11:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Apr 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.