GNU bug report logs - #36448
26.2; doc string of `highlight-lines-matching-regexp'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 30 Jun 2019 20:41:01 UTC

Severity: minor

Found in version 26.2

Done: Eli Zaretskii <eliz <at> gnu.org>

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 36448 in the body.
You can then email your comments to 36448 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#36448; Package emacs. (Sun, 30 Jun 2019 20:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Jun 2019 20:41:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; doc string of `highlight-lines-matching-regexp'
Date: Sun, 30 Jun 2019 13:40:10 -0700 (PDT)
This part of the doc string is not so good:

  Set face of all lines containing a match of REGEXP to FACE.

That's not what happens - "set" is the wrong verb here (face attributes
are set, but not the displayed face as a whole).

For example, if `font-lock-mode' is enabled and the command highlights a
line that contains text already highlighted by font-lock (e.g. with a
face foreground attribute) then the `highlight-lines-matching-regexp'
highlighting adds its face to the `face' spec for that already
highlighted text.  It does not replace face attributes that are already
set there.

The doc string should just say something similar to what (elisp)
`Highlight Interactively' says:

  Highlight entire lines containing a match for REGEXP, using face
  FACE ('highlight-lines-matching-regexp').

Highlighting "using" FACE is less definitive (more vague) than "setting"
the face to FACE.

If the doc string wants to go into more detail then it can say that FACE
is _added_ to faces already present, or that its attributes are added
merged with those already present.




In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 03 Jul 2019 12:57:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Wed, 03 Jul 2019 12:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 36448-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 36448-done <at> debbugs.gnu.org
Subject: Re: bug#36448: 26.2; doc string of `highlight-lines-matching-regexp'
Date: Wed, 03 Jul 2019 15:56:14 +0300
> Date: Sun, 30 Jun 2019 13:40:10 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> This part of the doc string is not so good:
> 
>   Set face of all lines containing a match of REGEXP to FACE.
> 
> That's not what happens - "set" is the wrong verb here (face attributes
> are set, but not the displayed face as a whole).

Thanks, fixed.




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

This bug report was last modified 5 years and 327 days ago.

Previous Next


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