unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent
@ 2019-12-28 19:42 Howard Melman
  2020-03-02 22:03 ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Howard Melman @ 2019-12-28 19:42 UTC (permalink / raw)
  To: 38778

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))






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent
  2019-12-28 19:42 bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent Howard Melman
@ 2020-03-02 22:03 ` Juri Linkov
  2020-03-03  2:42   ` Howard Melman
  2020-03-03 17:18   ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Juri Linkov @ 2020-03-02 22:03 UTC (permalink / raw)
  To: Howard Melman; +Cc: 38778

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: next-error-highlight-no-select.patch --]
[-- Type: text/x-diff, Size: 2139 bytes --]

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.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent
  2020-03-02 22:03 ` Juri Linkov
@ 2020-03-03  2:42   ` Howard Melman
  2020-03-03 17:18   ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Howard Melman @ 2020-03-03  2:42 UTC (permalink / raw)
  To: 38778


> On Mar 2, 2020, at 5:03 PM, Juri Linkov <juri@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







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent
  2020-03-02 22:03 ` Juri Linkov
  2020-03-03  2:42   ` Howard Melman
@ 2020-03-03 17:18   ` Eli Zaretskii
  2020-03-03 23:48     ` Juri Linkov
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-03-03 17:18 UTC (permalink / raw)
  To: Juri Linkov; +Cc: hmelman, 38778

> From: Juri Linkov <juri@linkov.net>
> Date: Tue, 03 Mar 2020 00:03:10 +0200
> Cc: 38778@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent
  2020-03-03 17:18   ` Eli Zaretskii
@ 2020-03-03 23:48     ` Juri Linkov
  0 siblings, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2020-03-03 23:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: hmelman, 38778

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-03 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-28 19:42 bug#38778: 26.3; next-error-highlight set to t doesn't seem semi-permanent Howard Melman
2020-03-02 22:03 ` Juri Linkov
2020-03-03  2:42   ` Howard Melman
2020-03-03 17:18   ` Eli Zaretskii
2020-03-03 23:48     ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).