unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
@ 2021-10-22 17:27 Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-23 17:58 ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-22 17:27 UTC (permalink / raw)
  To: 51337

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


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

[-- Attachment #2: Type: text/html, Size: 11001 bytes --]

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

* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
  2021-10-22 17:27 bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-23 17:58 ` Juri Linkov
  2021-10-23 18:38   ` Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Juri Linkov @ 2021-10-23 17:58 UTC (permalink / raw)
  To: Peter Scott; +Cc: 51337

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





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

* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
  2021-10-23 17:58 ` Juri Linkov
@ 2021-10-23 18:38   ` Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-24 18:32   ` Lars Ingebrigtsen
  2021-10-24 18:32   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-23 18:38 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 51337@debbugs.gnu.org

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@linkov.net> 
Sent: Saturday, 23 October 2021 7:58 PM
To: Peter Scott <peter.scott@ericsson.com>
Cc: 51337@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")

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

* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
  2021-10-23 17:58 ` Juri Linkov
  2021-10-23 18:38   ` Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-24 18:32   ` Lars Ingebrigtsen
  2021-10-24 18:32   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-24 18:32 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 51337, Peter Scott

Juri Linkov <juri@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





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

* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
  2021-10-23 17:58 ` Juri Linkov
  2021-10-23 18:38   ` Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-24 18:32   ` Lars Ingebrigtsen
@ 2021-10-24 18:32   ` Lars Ingebrigtsen
  2021-11-08 19:24     ` Juri Linkov
  2 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-24 18:32 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 51337, Peter Scott

Juri Linkov <juri@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





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

* bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups
  2021-10-24 18:32   ` Lars Ingebrigtsen
@ 2021-11-08 19:24     ` Juri Linkov
  0 siblings, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2021-11-08 19:24 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51337, Peter Scott

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





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

end of thread, other threads:[~2021-11-08 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 17:27 bug#51337: Subject: 27.2; mouse-buffer-menu-mode-groups Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 17:58 ` Juri Linkov
2021-10-23 18:38   ` Peter Scott via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-24 18:32   ` Lars Ingebrigtsen
2021-10-24 18:32   ` Lars Ingebrigtsen
2021-11-08 19:24     ` 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).