GNU bug report logs - #20977
24.5; Hi Lock Mode fails with "Invalid pattern list expression"

Previous Next

Package: emacs;

Reported by: Raffaele Ricciardi <rfflrccrd <at> gmail.com>

Date: Sat, 4 Jul 2015 10:35:02 UTC

Severity: minor

Tags: easy

Found in version 24.5

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 20977 in the body.
You can then email your comments to 20977 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#20977; Package emacs. (Sat, 04 Jul 2015 10:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raffaele Ricciardi <rfflrccrd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Jul 2015 10:35:02 GMT) Full text and rfc822 format available.

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

From: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Hi Lock Mode fails with "Invalid pattern list expression"
Date: Sat, 4 Jul 2015 12:34:32 +0200
This may happen in Help buffers.

Recipe:

emacs -Q
C-h f hi-lock-mode RET
C-x b *Help* RET
M-x hi-lock-mode RET

Emacs says:

Invalid pattern list expression at 60


Thank you.

--

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.25)
 of 2015-06-27 on debian
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
System Description:    Debian GNU/Linux 8.1 (jessie)

Configured using:
 `configure --prefix=/opt/emacs/emacs-24.5-gtk2 --with-x-toolkit=gtk2'

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

Major mode: Help

Minor modes in effect:
  hi-lock-mode: t
  tooltip-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading hi-lock...done
Type C-x 1 to delete the help window, C-M-v to scroll help.
Invalid pattern list expression at 60
 [3 times]
Debug on Error enabled globally
Invalid pattern list expression at 60
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils cus-start cus-load pp hi-lock help-mode easymenu
help-fns time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 83092 7518)
 (symbols 48 18597 0)
 (miscs 40 50 171)
 (strings 32 11407 4465)
 (string-bytes 1 301418)
 (vectors 16 9121)
 (vector-slots 8 386170 15786)
 (floats 8 70 182)
 (intervals 56 218 9)
 (buffers 960 12)
 (heap 1024 18347 926))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20977; Package emacs. (Sat, 04 Jul 2015 14:47:02 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
Cc: 20977 <at> debbugs.gnu.org
Subject: Re: bug#20977: 24.5;
 Hi Lock Mode fails with "Invalid pattern list expression"
Date: Sat, 04 Jul 2015 16:46:27 +0200
Raffaele Ricciardi <rfflrccrd <at> gmail.com> writes:

> emacs -Q
> C-h f hi-lock-mode RET
> C-x b *Help* RET
> M-x hi-lock-mode RET
>
> Emacs says:
>
> Invalid pattern list expression at 60

AFAIK this is not an error, just a message (that you can safely ignore).
The mode is enabled nonetheless and should work as expected.

Background: There is a feature that hi-lock-mode searches for pattern
specifications of the kind

  Hi-lock: FOO

that define initial highlightings.

Since the help buffer of `hi-lock-mode' explains this feature, it
contains a match for the regexp searched for (namely "Hi-lock: FOO") but
hi-lock-mode discards it because it is invalid (thus the message).  So
this issue is only a coincidence appearing only in the help buffer of
`hi-lock-mode'.  FWIW I can live with this message in this special case,
though I agree that it is confusing.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20977; Package emacs. (Sun, 05 Jul 2015 10:53:02 GMT) Full text and rfc822 format available.

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

From: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 20977 <at> debbugs.gnu.org
Subject: Re: bug#20977: 24.5; Hi Lock Mode fails with "Invalid pattern list
 expression"
Date: Sun, 5 Jul 2015 12:52:40 +0200
On 04/07/15 16:46, Michael Heerdegen wrote:
> Raffaele Ricciardi <rfflrccrd <at> gmail.com> writes:
>
>> emacs -Q
>> C-h f hi-lock-mode RET
>> C-x b *Help* RET
>> M-x hi-lock-mode RET
>>
>> Emacs says:
>>
>> Invalid pattern list expression at 60
> AFAIK this is not an error, just a message (that you can safely ignore).
> The mode is enabled nonetheless and should work as expected.
>
> Background: There is a feature that hi-lock-mode searches for pattern
> specifications of the kind
>
>    Hi-lock: FOO
>
> that define initial highlightings.
>
> Since the help buffer of `hi-lock-mode' explains this feature, it
> contains a match for the regexp searched for (namely "Hi-lock: FOO") but
> hi-lock-mode discards it because it is invalid (thus the message).  So
> this issue is only a coincidence appearing only in the help buffer of
> `hi-lock-mode'.  FWIW I can live with this message in this special case,
> though I agree that it is confusing.
>
>
> Michael.

I agree that this glitch is not worth fixing.  And if another user will
stumble upon it, he will find this discussion and understand what is
going on.

Thanks, Michael, for your assistance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20977; Package emacs. (Sun, 05 Jul 2015 10:58:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Michael Heerdegen <michael_heerdegen <at> web.de>, 
 Raffaele Ricciardi <rfflrccrd <at> gmail.com>
Cc: 20977 <at> debbugs.gnu.org
Subject: Re: bug#20977: 24.5; Hi Lock Mode fails with "Invalid pattern list
 expression"
Date: Sun, 05 Jul 2015 12:57:01 +0200
> FWIW I can live with this message in this special case,
> though I agree that it is confusing.

I suppose we could write something like


When hi-lock is started and if the mode is not excluded or patterns
rejected, the beginning of the buffer is searched for lines of the
form:
  Hi-lock: (FOO BAR)

where FOO and BAR are patterns.


but I don't know what `hi-lock-mode' patterns should look like and how
that mode works.  If anyone does, please apply a patch so we can close
this.

martin




Added tag(s) easy. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 17 Apr 2019 23:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20977; Package emacs. (Sat, 04 Sep 2021 07:13:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 20977 <at> debbugs.gnu.org,
 Raffaele Ricciardi <rfflrccrd <at> gmail.com>
Subject: Re: bug#20977: 24.5; Hi Lock Mode fails with "Invalid pattern list
 expression"
Date: Sat, 04 Sep 2021 09:11:55 +0200
martin rudalics <rudalics <at> gmx.at> writes:

> I suppose we could write something like
>
> When hi-lock is started and if the mode is not excluded or patterns
> rejected, the beginning of the buffer is searched for lines of the
> form:
>   Hi-lock: (FOO BAR)
>
> where FOO and BAR are patterns.
>
> but I don't know what `hi-lock-mode' patterns should look like and how
> that mode works.  If anyone does, please apply a patch so we can close
> this.

I've now done something like this in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 20977 <at> debbugs.gnu.org and Raffaele Ricciardi <rfflrccrd <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 04 Sep 2021 07:13:02 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. (Sat, 02 Oct 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 265 days ago.

Previous Next


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