GNU bug report logs -
#7466
24.0.50; (emacs) `Menu Mouse Clicks' conflicts with code obsolescence
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 22 Nov 2010 16:50:02 UTC
Severity: minor
Found in version 24.0.50
Done: Stefan Kangas <stefan <at> marxist.se>
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 7466 in the body.
You can then email your comments to 7466 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Mon, 22 Nov 2010 16:50:03 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
.
(Mon, 22 Nov 2010 16:50:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The footnote on this manual page tells you how to put the mouse-3 menu
on mouse-3 instead of on C-mouse-3 (the default). It tells you to bind
`mouse-popup-menubar-stuff'.
But in mouse.el, that function (as well as the other mouse-3 menu
functions) has been declared obsolete since 23.1.
There is no comment in the code indicating what now replaces these
functions - what to use instead. And I find nothing in NEWS or NEWS.23
(or NEWS.22) about "mouse-3" or "popup". Grepping the Lisp sources
didn't help either.
How are users supposed to know how to code this, now that these
functions are obsolete? What is the right way to do it now? Where in
the Lisp code is C-mouse-3 doted with menus (e.g. the major-mode
menubar menu)?
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-11-16 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Thu, 14 Jul 2011 15:08:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7466 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> The footnote on this manual page tells you how to put the mouse-3 menu
> on mouse-3 instead of on C-mouse-3 (the default). It tells you to bind
> `mouse-popup-menubar-stuff'.
>
> But in mouse.el, that function (as well as the other mouse-3 menu
> functions) has been declared obsolete since 23.1.
>
> There is no comment in the code indicating what now replaces these
> functions - what to use instead. And I find nothing in NEWS or NEWS.23
> (or NEWS.22) about "mouse-3" or "popup". Grepping the Lisp sources
> didn't help either.
>
> How are users supposed to know how to code this, now that these
> functions are obsolete? What is the right way to do it now? Where in
> the Lisp code is C-mouse-3 doted with menus (e.g. the major-mode
> menubar menu)?
Good question. I see from bzr that Juanma marked the function as
obsolete. Do you know what this is all about?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Thu, 14 Jul 2011 15:25:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 7466 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jul 14, 2011 at 16:53, Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
> I see from bzr that Juanma marked the function as obsolete.
No, I didn't, I just added the "23.1" WHEN argument.
The change was by Stefan:
------------------------------------------------------------
revno: 86557
committer: Stefan Monnier <monnier <at> iro.umontreal.ca>
timestamp: Wed 2008-04-09 03:53:48 +0000
message:
* mouse.el (mouse-menu-major-mode-map): New fun extracted from
mouse-major-mode-menu.
(mouse-menu-bar-map): New fun extracted from mouse-popup-menubar.
(mouse-major-mode-menu, mouse-popup-menubar)
(mouse-popup-menubar-stuff): Use them.
(C-down-mouse-3): Bind to a dynamic map rather than to
mouse-popup-menubar-stuff.
* bindings.el (mode-line-major-mode-keymap): Bind down-mouse-1
to mouse-menu-major-mode-map rather than to mouse-major-mode-menu.
C-u M-x vc-annotate is your friend.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Thu, 14 Jul 2011 15:30:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 7466 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> C-u M-x vc-annotate is your friend.
I use `C-x v g' all the time, but how did you find that (previous)
revision for that line with the `C-u'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Thu, 14 Jul 2011 15:40:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 7466 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jul 14, 2011 at 17:28, Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
> I use `C-x v g' all the time, but how did you find that (previous)
> revision for that line with the `C-u'?
You use `d' to check the change, and if it is not the one you're
interested in, C-u C-x v g and pass the revno just before that change
(I mean, revno - 1), so you get a new vc-annotate log. Repeat until
`d' in the line you're intested shows the change you're after.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Fri, 15 Jul 2011 15:58:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 7466 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> You use `d' to check the change, and if it is not the one you're
> interested in, C-u C-x v g and pass the revno just before that change
> (I mean, revno - 1), so you get a new vc-annotate log. Repeat until
> `d' in the line you're intested shows the change you're after.
Thanks; very useful.
Perhaps there should be a command in the Annotate buffer to do this? I
mean, to re-run annotate on (1- commit-under-point)?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Fri, 15 Jul 2011 16:15:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 7466 <at> debbugs.gnu.org (full text, mbox):
On Fri, Jul 15, 2011 at 17:57, Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
> Perhaps there should be a command in the Annotate buffer to do this? I
> mean, to re-run annotate on (1- commit-under-point)?
I wouldn't bet against it existing already and I just not knowing
about it... :-)
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sat, 16 Jul 2011 13:51:02 GMT)
Full text and
rfc822 format available.
Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero wrote:
> On Fri, Jul 15, 2011 at 17:57, Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
>> Perhaps there should be a command in the Annotate buffer to do this? I
>> mean, to re-run annotate on (1- commit-under-point)?
> I wouldn't bet against it existing already and I just not knowing
> about it... :-)
Do you mean `vc-annotate-revision-previous-to-line', bound to a
in the annotate buffer, by any chance?
Lawrence
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sat, 16 Jul 2011 20:48:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 7466 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jul 16, 2011 at 15:50, Lawrence Mitchell <wence <at> gmx.li> wrote:
> Do you mean `vc-annotate-revision-previous-to-line', bound to a
> in the annotate buffer, by any chance?
Yes, thanks.
I knew it wasn't a good idea to bet against it.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sun, 17 Jul 2011 13:43:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 7466 <at> debbugs.gnu.org (full text, mbox):
>> The footnote on this manual page tells you how to put the mouse-3 menu
>> on mouse-3 instead of on C-mouse-3 (the default). It tells you to bind
>> `mouse-popup-menubar-stuff'.
>>
>> But in mouse.el, that function (as well as the other mouse-3 menu
>> functions) has been declared obsolete since 23.1.
>>
>> There is no comment in the code indicating what now replaces these
>> functions - what to use instead.
C-h f mouse-major-mode-menu RET tells me
This function is obsolete since 23.1;
use `mouse-menu-major-mode-map' instead.
So for me it does say what replaces it.
> Good question. I see from bzr that Juanma marked the function as
> obsolete. Do you know what this is all about?
It's mostly about what C-h k returns:
Before my patch "C-h k mouse-3" returns "mouse-3 runs mouse-major-mode-menu"
whereas after my patch it pops up the menu, lets you choose an entry from
it and then gives you the name and docstring of the function
corresponding to the entry you selected.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sun, 17 Jul 2011 14:47:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 7466 <at> debbugs.gnu.org (full text, mbox):
> >> The footnote on this manual page tells you how to put the
> >> mouse-3 menu on mouse-3 instead of on C-mouse-3 (the default).
> >> It tells you to bind `mouse-popup-menubar-stuff'.
Still true, in the latest Windows build:
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2011-07-11 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/build/include'
Likewise, this is still true:
> And I find nothing in NEWS or NEWS.23 (or NEWS.22) about
> "mouse-3" or "popup". Grepping the Lisp sources didn't help either.
> >> But in mouse.el, that function (as well as the other mouse-3 menu
> >> functions) has been declared obsolete since 23.1.
> >>
> >> There is no comment in the code indicating what now replaces these
> >> functions - what to use instead.
>
> C-h f mouse-major-mode-menu RET tells me
> This function is obsolete since 23.1;
> use `mouse-menu-major-mode-map' instead.
> So for me it does say what replaces it.
It does not tell you "how to put the mouse-3 menu on mouse-3 instead of on
C-mouse-3". It is not specific wrt doing what that now-obsolete variable did.
Likewise, wrt doing what the other mouse-3 menu functions (also made obsolete)
did.
Several things have been declared obsolete, and there is not even a comment in
the code indicating what to do in their stead. And nothing in NEWS. And the
doc still refers to what is obsolete - "since 23.1", as you point out.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Tue, 02 Aug 2011 21:02:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 7466 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
>> C-h f mouse-major-mode-menu RET tells me
>> This function is obsolete since 23.1;
>> use `mouse-menu-major-mode-map' instead.
>> So for me it does say what replaces it.
>
> It does not tell you "how to put the mouse-3 menu on mouse-3 instead of on
> C-mouse-3". It is not specific wrt doing what that now-obsolete variable did.
> Likewise, wrt doing what the other mouse-3 menu functions (also made obsolete)
> did.
And, as you point out, the manual says:
(1) Some systems use `Mouse-3' for a mode-specific menu. We took a
survey of users, and found they preferred to keep `Mouse-3' for
selecting and killing regions. Hence the decision to use `C-Mouse-3'
for this menu. To use `Mouse-3' instead, do `(global-set-key [mouse-3]
'mouse-popup-menubar-stuff)'.
I assume that we're not asking people to bind mouse-3 to
(mouse-menu-major-mode-map)?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Wed, 03 Aug 2011 01:19:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 7466 <at> debbugs.gnu.org (full text, mbox):
> I assume that we're not asking people to bind mouse-3 to
> (mouse-menu-major-mode-map)?
Why would you assume so?
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Wed, 03 Aug 2011 07:51:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 7466 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I assume that we're not asking people to bind mouse-3 to
>> (mouse-menu-major-mode-map)?
>
> Why would you assume so?
Because I tried that, and it didn't give me the same menu that's
currently on `C-mouse-3'. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Wed, 03 Aug 2011 14:55:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 7466 <at> debbugs.gnu.org (full text, mbox):
>>> I assume that we're not asking people to bind mouse-3 to
>>> (mouse-menu-major-mode-map)?
>> Why would you assume so?
> Because I tried that, and it didn't give me the same menu that's
> currently on `C-mouse-3'. :-)
Oh, right it's not what I thought. Yes, it's a bit inconvenient to move
the mapping from C-mouse-3 to mouse-3 because you really want to put
onto mouse-3 the menu-item that's on C-mouse-3, but
(global-set-key [down-mouse-3] (key-binding [C-down-mouse-3]))
will only give you the keymap returned by mouse-menu-major-mode-map
rather than the menu-item itself. You'd like to be able to do:
(global-set-key [down-mouse-3] [C-down-mouse-3])
But that doesn't work because such remapping don't work right for events
with parameters such as mouse clicks. I guess you can do:
(global-set-key [down-mouse-3] (cdr (assq 'C-down-mouse-3 global-map)))
but it's ugly. Maybe we need a way to ask `key-binding' to return
menu-items rather than the binding specified in them. But key-binding
already takes many parameters..maybe we could abuse the `no-remap' arg
for that?
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Wed, 03 Aug 2011 20:41:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 7466 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> But that doesn't work because such remapping don't work right for events
> with parameters such as mouse clicks. I guess you can do:
>
> (global-set-key [down-mouse-3] (cdr (assq 'C-down-mouse-3 global-map)))
>
> but it's ugly. Maybe we need a way to ask `key-binding' to return
> menu-items rather than the binding specified in them. But key-binding
> already takes many parameters..maybe we could abuse the `no-remap' arg
> for that?
---
Like the normal command loop, `key-binding' will remap the command
resulting from looking up KEY by looking up the command in the
current keymaps. However, if the optional third argument NO-REMAP
is non-nil, `key-binding' returns the unmapped command.
---
Using `no-remap' for that sounds like a reasonable thing to do.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Sat, 25 Sep 2021 20:45:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Sat, 25 Sep 2021 20:45:02 GMT)
Full text and
rfc822 format available.
Message #55 received at 7466-done <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> The footnote on this manual page tells you how to put the mouse-3 menu
> on mouse-3 instead of on C-mouse-3 (the default). It tells you to bind
> `mouse-popup-menubar-stuff'.
>
> But in mouse.el, that function (as well as the other mouse-3 menu
> functions) has been declared obsolete since 23.1.
>
> There is no comment in the code indicating what now replaces these
> functions - what to use instead. And I find nothing in NEWS or NEWS.23
> (or NEWS.22) about "mouse-3" or "popup". Grepping the Lisp sources
> didn't help either.
>
> How are users supposed to know how to code this, now that these
> functions are obsolete? What is the right way to do it now? Where in
> the Lisp code is C-mouse-3 doted with menus (e.g. the major-mode
> menubar menu)?
This text is no longer there in the manual, presumably it has been
updated in the 12 years since this was reported. I'm therefore closing
this bug report.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sat, 25 Sep 2021 21:14:02 GMT)
Full text and
rfc822 format available.
Message #58 received at 7466-done <at> debbugs.gnu.org (full text, mbox):
> > How are users supposed to know how to code this, now that these
> > functions are obsolete? What is the right way to do it now? Where
> in
> > the Lisp code is C-mouse-3 doted with menus (e.g. the major-mode
> > menubar menu)?
>
> This text is no longer there in the manual, presumably it has been
> updated in the 12 years since this was reported. I'm therefore closing
> this bug report.
OK, that text is no longer there.
But "how to put the mouse-3 menu on mouse-3 instead
of on C-mouse-3"? Is that documented somewhere?
Is it still possible? If it was documented before,
and it's still possible, shouldn't it be documented
now (somewhere)?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#7466
; Package
emacs
.
(Sat, 25 Sep 2021 22:06:02 GMT)
Full text and
rfc822 format available.
Message #61 received at 7466-done <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> But "how to put the mouse-3 menu on mouse-3 instead
> of on C-mouse-3"? Is that documented somewhere?
> Is it still possible? If it was documented before,
> and it's still possible, shouldn't it be documented
> now (somewhere)?
In Emacs 28.1, this should be (from NEWS):
** New minor mode 'context-menu-mode' for context menus popped by 'mouse-3'.
When this mode is enabled, clicking 'down-mouse-3' anywhere in the buffer
pops up a menu whose contents depends on surrounding context near the
mouse click. You can change the order of the default sub-menus in the
context menu by customizing the user option 'context-menu-functions'.
You can also invoke the context menu by pressing 'S-<F10>' or,
on macOS, by clicking 'C-down-mouse-1'.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 24 Oct 2021 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.