GNU bug report logs - #51337
Subject: 27.2; mouse-buffer-menu-mode-groups

Previous Next

Package: emacs;

Reported by: Peter Scott <peter.scott <at> ericsson.com>

Date: Fri, 22 Oct 2021 18:03:01 UTC

Severity: normal

Fixed in version 28.0.60

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 51337 in the body.
You can then email your comments to 51337 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#51337; Package emacs. (Fri, 22 Oct 2021 18:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Scott <peter.scott <at> ericsson.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 22 Oct 2021 18:03:01 GMT) Full text and rfc822 format available.

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

From: Peter Scott <peter.scott <at> ericsson.com>
To: "To:" <bug-gnu-emacs <at> gnu.org>
Subject: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Fri, 22 Oct 2021 17:27:56 +0000
[Message part 1 (text/plain, inline)]
Im programming FPGAs so i open a lot of vhd files and verilog files.
when i control mouse-click-left the opened files are grouped by their
major mode.

that is to say the *.vhd files are grouped with a Heading "VHDL/s". While
the verilog files are grouped as "Version Control". Clearly this is not
correct. If i switch to a verilog file and do C-h major-mode Ret the
major mode is listed as verilog.

I've tried to update the mouse-buffer-menu-mode-groups to this

Value:
(("Info\\|Help\\|Apropos\\|Man" . "Help")
("\\bVM\\b\\|\\bMH\\b\\|Message\\b\\|Mail\\|Group\\|Score\\|Summary\\|Article" . "Mail/News")
("\\<C\\>" . "C")
("ObjC" . "C")
("Text" . "Text")
("Outline" . "Text")
("Ve.*\\|ve.*" . "Verilog")
("\\(HT\\|SG\\|X\\|XHT\\)ML" . "SGML")
("log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")
("Threads\\|Memory\\|Disassembly\\|Breakpoints\\|Frames\\|Locals\\|Registers\\|Inferior I/O\\|Debugger" . "GDB")
("Lisp" . "Lisp"))

But it doesn't have any effect on the grouping .

I would also like to point out that I'm a relative nubie when it comes
to emacs so I'm probably missing something.

Many thanks
/Peter Scott


In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.18362
System Description: Microsoft Windows 10 Enterprise (v10.0.1903.18362.1256)

Recent messages:
Mark set [2 times]
Auto-saving...done
End of buffer [6 times]
Beginning of buffer
Auto-saving...
Mark set [9 times]
End of buffer
Mark set
<C-mouse-1> is undefined
Making completion list... [2 times]

Configured using:
'configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: ENA
  locale-coding-system: cp1252

Major mode: Verilog

Minor modes in effect:
  vhdl-stutter-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  global-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
  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:
(verilog-mode diff cl-print mouse-copy mouse-drag thingatpt help-fns
radix-tree help-mode pp shadow sort mail-extr emacsbug message rmc puny
dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search seq byte-opt gv bytecomp byte-compile cconv
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils time-date subr-x vc-git diff-mode easy-mmode cl-loaddefs
cl-lib vhdl-mode hippie-exp easymenu compile comint ansi-color ring
server delsel cua-base cus-start cus-load tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars 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 tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer 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
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 w32notify w32
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 118701 24699)
(symbols 48 12235 1)
(strings 32 37627 2363)
(string-bytes 1 1101125)
(vectors 16 16566)
(vector-slots 8 209055 14442)
(floats 8 51 291)
(intervals 56 1603 0)
(buffers 1000 22))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51337; Package emacs. (Sat, 23 Oct 2021 18:37:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Peter Scott <peter.scott <at> ericsson.com>
Cc: 51337 <at> debbugs.gnu.org
Subject: Re: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Sat, 23 Oct 2021 20:58:09 +0300
> the verilog files are grouped as "Version Control”. Clearly this is not
> correct. If i switch to a verilog file and do C-h major-mode Ret the
> major mode is listed as verilog.
>
> I've tried to update the mouse-buffer-menu-mode-groups to this
> Value:
> ("log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")

Oh, it's unfortunate that "log\\|diff..." also matches "verilog".
This regexp should be tightened to match only VC buffers, but
not buffers from other modes.  Maybe something like

  ("vc.*log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51337; Package emacs. (Sat, 23 Oct 2021 18:39:01 GMT) Full text and rfc822 format available.

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

From: Peter Scott <peter.scott <at> ericsson.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: "51337 <at> debbugs.gnu.org" <51337 <at> debbugs.gnu.org>
Subject: RE: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Sat, 23 Oct 2021 18:38:42 +0000
Thanks,
I also found that if I reverse the order of the tests the last one is valid. And it works then.

Many thanks

-----Original Message-----
From: Juri Linkov <juri <at> linkov.net> 
Sent: Saturday, 23 October 2021 7:58 PM
To: Peter Scott <peter.scott <at> ericsson.com>
Cc: 51337 <at> debbugs.gnu.org
Subject: Re: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups

> the verilog files are grouped as "Version Control”. Clearly this is 
> not correct. If i switch to a verilog file and do C-h major-mode Ret 
> the major mode is listed as verilog.
>
> I've tried to update the mouse-buffer-menu-mode-groups to this
> Value:
> ("log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")

Oh, it's unfortunate that "log\\|diff..." also matches "verilog".
This regexp should be tightened to match only VC buffers, but not buffers from other modes.  Maybe something like

  ("vc.*log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51337; Package emacs. (Sun, 24 Oct 2021 18:33:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51337 <at> debbugs.gnu.org, Peter Scott <peter.scott <at> ericsson.com>
Subject: Re: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Sun, 24 Oct 2021 20:32:17 +0200
Juri Linkov <juri <at> linkov.net> writes:

> Oh, it's unfortunate that "log\\|diff..." also matches "verilog".
> This regexp should be tightened to match only VC buffers, but
> not buffers from other modes.  Maybe something like
>
>   ("vc.*log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")

Makes sense to me -- there's also a bunch of other buffers that have
names ending with "log", so it's not just about verilog buffers.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51337; Package emacs. (Sun, 24 Oct 2021 18:33:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51337 <at> debbugs.gnu.org, Peter Scott <peter.scott <at> ericsson.com>
Subject: Re: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Sun, 24 Oct 2021 20:32:24 +0200
Juri Linkov <juri <at> linkov.net> writes:

> Oh, it's unfortunate that "log\\|diff..." also matches "verilog".
> This regexp should be tightened to match only VC buffers, but
> not buffers from other modes.  Maybe something like
>
>   ("vc.*log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")

Makes sense to me -- there's also a bunch of other buffers that have
names ending with "log", so it's not just about verilog buffers.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51337; Package emacs. (Mon, 08 Nov 2021 19:26:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51337 <at> debbugs.gnu.org, Peter Scott <peter.scott <at> ericsson.com>
Subject: Re: bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
Date: Mon, 08 Nov 2021 21:24:21 +0200
close 51337 28.0.60
quit

>> Oh, it's unfortunate that "log\\|diff..." also matches "verilog".
>> This regexp should be tightened to match only VC buffers, but
>> not buffers from other modes.  Maybe something like
>>
>>   ("vc.*log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")
>
> Makes sense to me -- there's also a bunch of other buffers that have
> names ending with "log", so it's not just about verilog buffers.

Some examples of mode names that belong to "Version Control":

  "Log-Edit/git" (e.g. in a buffer named "*vc-log*")
  "Git-Log-View" (e.g. "*vc-change-log*", "*vc-search-log*")
  "Change Log" (e.g. "ChangeLog")
  "Diff" (e.g. "*vc-diff*")
  "VC dir" (e.g. "*vc-dir*")
  "Annotate" (e.g. "*Annotate file*")

Grepping reveals more mode names belonging to "Version Control":

  "Log-Edit", "Log-View", "Bzr-Log-View", "Hg-Log-View",
  "Log-Edit/hg", "Mtn-Log-View", "SVN-Log-View"

Whereas here is a list of mode names that should be
excluded from "Version Control" and thus should not match:

  "Verilog", "Prolog", "Prolog[Mercury]", "Inferior Prolog",
  "Rlogin", "recentf-dialog"

So I pushed this fix to emacs-28:

diff --git a/lisp/mouse.el b/lisp/mouse.el
index d6912892ef..aa73c80d61 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2477,7 +2481,7 @@ mouse-buffer-menu-mode-groups
     ("Text" . "Text")
     ("Outline" . "Text")
     ("\\(HT\\|SG\\|X\\|XHT\\)ML" . "SGML")
-    ("log\\|diff\\|vc\\|cvs\\|Git\\|Annotate" . "Version Control")
+    ("\\blog\\b\\|diff\\|\\bvc\\b\\|cvs\\|Git\\|Annotate" . "Version Control")
     ("Threads\\|Memory\\|Disassembly\\|Breakpoints\\|Frames\\|Locals\\|Registers\\|Inferior I/O\\|Debugger"
      . "GDB")
     ("Lisp" . "Lisp")))
-- 




bug marked as fixed in version 28.0.60, send any further explanations to 51337 <at> debbugs.gnu.org and Peter Scott <peter.scott <at> ericsson.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Mon, 08 Nov 2021 19:26: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. (Tue, 07 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 133 days ago.

Previous Next


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