unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gud menus
@ 2021-10-17 22:23 Lars Ingebrigtsen
  2021-10-17 23:12 ` Stefan Monnier
  2021-10-18 12:01 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-17 22:23 UTC (permalink / raw)
  To: emacs-devel

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

I'm looking at

(easy-mmode-defmap gud-minor-mode-map
  (append
     `(([menu-bar debug] . ("Gud" . ,gud-menu-map)))
     ;; Get tool bar like functionality from the menu bar on a text only
     ;; terminal.
   (unless window-system
     `(([menu-bar down]
	. (,(propertize "down" 'face 'font-lock-doc-face) . gud-down))
       ([menu-bar up]
	. (,(propertize "up" 'face 'font-lock-doc-face) . gud-up))
       ([menu-bar finish]
	. (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish))
       ([menu-bar step]
	. (,(propertize "step" 'face 'font-lock-doc-face) . gud-step))
       ([menu-bar next]
	. (,(propertize "next" 'face 'font-lock-doc-face) . gud-next))

and I'm not quite sure how this is supposed to work.

It's only run in non-graphical Emacsen, and does indeed put those texts
into the window:


[-- Attachment #2: Type: image/png, Size: 27857 bytes --]

[-- Attachment #3: Type: text/plain, Size: 446 bytes --]


However, this makes F10 not work at all, so I can't use the menus in the
buffer after saying `M-x gud-gdb'.

Clicking on those texts does nothing, either -- with or without
xterm-mouse-mode.

So...  is this something that used to work?  And is it supposed to
disable the menus?  Or does it work, just in a way that's not readily
apparent? 

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


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

* Re: gud menus
  2021-10-17 22:23 gud menus Lars Ingebrigtsen
@ 2021-10-17 23:12 ` Stefan Monnier
  2021-10-18  7:02   ` Lars Ingebrigtsen
  2021-10-18 12:04   ` Eli Zaretskii
  2021-10-18 12:01 ` Eli Zaretskii
  1 sibling, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2021-10-17 23:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

Lars Ingebrigtsen [2021-10-18 00:23:59] wrote:
> However, this makes F10 not work at all, so I can't use the menus in the
> buffer after saying `M-x gud-gdb'.
>
> Clicking on those texts does nothing, either -- with or without
> xterm-mouse-mode.
>
> So...  is this something that used to work?  And is it supposed to
> disable the menus?  Or does it work, just in a way that's not readily
> apparent? 

This was introduced by:

     commit c635126ac12579adc1227ded80a3860e4cfa8dfc
     Author: Nick Roberts <nickrob@snap.net.nz>
     Date:   Tue Apr 3 01:07:16 2007 +0000
     
         (gud-menu-map): Simplify.
         (gud-minor-mode-map): Add tool-bar like bindings to the text mode
         menubar.

so it sounds like it did work.
My crystal ball suggests that it stopped working when Eli installed the
new feature that makes the menu bar work "graphically" in ttys just like
it worked in MS-DOS.


        Stefan




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

* Re: gud menus
  2021-10-17 23:12 ` Stefan Monnier
@ 2021-10-18  7:02   ` Lars Ingebrigtsen
  2021-10-18 12:24     ` Eli Zaretskii
  2021-10-18 12:04   ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-18  7:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> My crystal ball suggests that it stopped working when Eli installed the
> new feature that makes the menu bar work "graphically" in ttys just like
> it worked in MS-DOS.

gud wants to have a clickable line at the top of the window, I guess?
Would it work to do that with a header line of buttons?  Or do we have
some other thing somewhere to "emulate" the toolbar in non-GUI Emacs?

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



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

* Re: gud menus
  2021-10-17 22:23 gud menus Lars Ingebrigtsen
  2021-10-17 23:12 ` Stefan Monnier
@ 2021-10-18 12:01 ` Eli Zaretskii
  2021-10-18 12:33   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-10-18 12:01 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 18 Oct 2021 00:23:59 +0200
> 
> However, this makes F10 not work at all, so I can't use the menus in the
> buffer after saying `M-x gud-gdb'.

It's not a menu, so I don't think F10 should work here.  Do you see it
working in any old version of Emacs, say Emacs 23?

> Clicking on those texts does nothing, either -- with or without
> xterm-mouse-mode.

That works here on MS-Windows, where the TTY frames support the mouse.
Do you have a build with the GPM mouse to try that?  xterm-mouse-mode
might not support this, if no one wrote the code.

> So...  is this something that used to work?

It used, and it does, but only if the mouse is supported.  For the
other builds, it is just a reminder of the tool-bar buttons.

> And is it supposed to disable the menus?

I'll have to look into that, but it could be that overwriting the menu
with these "too-bar buttons" disables the TTY menus as side effect.
However, with xterm-mouse-mode you should have the global menu on
C-mouse-3 if you turn off menu-bar-mode.



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

* Re: gud menus
  2021-10-17 23:12 ` Stefan Monnier
  2021-10-18  7:02   ` Lars Ingebrigtsen
@ 2021-10-18 12:04   ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-10-18 12:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: larsi, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sun, 17 Oct 2021 19:12:37 -0400
> 
> Lars Ingebrigtsen [2021-10-18 00:23:59] wrote:
> > However, this makes F10 not work at all, so I can't use the menus in the
> > buffer after saying `M-x gud-gdb'.
> >
> > Clicking on those texts does nothing, either -- with or without
> > xterm-mouse-mode.
> >
> > So...  is this something that used to work?  And is it supposed to
> > disable the menus?  Or does it work, just in a way that's not readily
> > apparent? 
> 
> This was introduced by:
> 
>      commit c635126ac12579adc1227ded80a3860e4cfa8dfc
>      Author: Nick Roberts <nickrob@snap.net.nz>
>      Date:   Tue Apr 3 01:07:16 2007 +0000
>      
>          (gud-menu-map): Simplify.
>          (gud-minor-mode-map): Add tool-bar like bindings to the text mode
>          menubar.
> 
> so it sounds like it did work.
> My crystal ball suggests that it stopped working when Eli installed the
> new feature that makes the menu bar work "graphically" in ttys just like
> it worked in MS-DOS.

I'm not sure.  I don't have an old enough Emacs to try.  F10 invoked
tmm-menubar before we had TTY menus, so I very much doubt that F10
would do something with this "tool bar" on mouse-less TTY frames,
except invoke tmm-menubar.



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

* Re: gud menus
  2021-10-18  7:02   ` Lars Ingebrigtsen
@ 2021-10-18 12:24     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-10-18 12:24 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: monnier, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 18 Oct 2021 09:02:28 +0200
> Cc: emacs-devel@gnu.org
> 
> gud wants to have a clickable line at the top of the window, I guess?
> Would it work to do that with a header line of buttons?

It would, but only if a mouse is available, which is supposed to work
even with the current crude "tool bar".  But we have no way of
invoking actions on the header-line without a mouse.

> Or do we have some other thing somewhere to "emulate" the toolbar in
> non-GUI Emacs?

No, none that I know about.

We could turn on tmm-menubar on TTY frames in gdb-mi, though.  Then at
least it will work as well as it did before TTY menus.



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

* Re: gud menus
  2021-10-18 12:01 ` Eli Zaretskii
@ 2021-10-18 12:33   ` Lars Ingebrigtsen
  2021-10-18 13:07     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-18 12:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

Eli Zaretskii <eliz@gnu.org> writes:

> It's not a menu, so I don't think F10 should work here.  Do you see it
> working in any old version of Emacs, say Emacs 23?

I'm getting various results, but none that I think I can call "working".
The oldest Emacs I have, Emacs 25.1, if I click the leftmost "toolbar"
bits, then it open that TMM menu with the "File" menu, so it seems like
TMM is overriding the "toolbar".  (F10 does nothing in this mode.)

But items further to the right in the "toolbar" does work.

In the current Emacs, the menu actually works fine when I click on the
items (well, they seem to be shifted, so they don't quite work right).

And none of the "toolbar" things work.

> That works here on MS-Windows, where the TTY frames support the mouse.
> Do you have a build with the GPM mouse to try that?  xterm-mouse-mode
> might not support this, if no one wrote the code.

The mouse (with xterm-mouse-mode) works fine on the normal menu (and
when clicking on other buttons), but for the "toolbar", C-h k *click*

Command: cont
posn-set-point: Position not in text area of window

>> And is it supposed to disable the menus?
>
> I'll have to look into that, but it could be that overwriting the menu
> with these "too-bar buttons" disables the TTY menus as side effect.
> However, with xterm-mouse-mode you should have the global menu on
> C-mouse-3 if you turn off menu-bar-mode.

C-mouse-3 works here...  Uhm, sort of.  It works fine in other buffers,
but in gud buffers, trying to select something gives me:


[-- Attachment #2: Type: image/png, Size: 50677 bytes --]

[-- Attachment #3: Type: text/plain, Size: 241 bytes --]


I.e., the echo area fills up with mouse movement things.

So there's something Emacs really doesn't like about that "toolbar", I
guess.

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

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

* Re: gud menus
  2021-10-18 12:33   ` Lars Ingebrigtsen
@ 2021-10-18 13:07     ` Eli Zaretskii
  2021-10-18 13:19       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-10-18 13:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Mon, 18 Oct 2021 14:33:42 +0200
> 
> I.e., the echo area fills up with mouse movement things.
> 
> So there's something Emacs really doesn't like about that "toolbar", I
> guess.

I think this is unrelated.  AFAIR, gdb-mi enables mouse-tracking
because it wants to pop up tooltips with values of variables or
something?  Yes, see gud-tooltip-activate-mouse-motions in gud.el.

So I guess we need to temporarily disable track-mouse when we pop up
TTY menus...



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

* Re: gud menus
  2021-10-18 13:07     ` Eli Zaretskii
@ 2021-10-18 13:19       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-18 13:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> I think this is unrelated.  AFAIR, gdb-mi enables mouse-tracking
> because it wants to pop up tooltips with values of variables or
> something?  Yes, see gud-tooltip-activate-mouse-motions in gud.el.
>
> So I guess we need to temporarily disable track-mouse when we pop up
> TTY menus...

Ah, I see.

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



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

end of thread, other threads:[~2021-10-18 13:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 22:23 gud menus Lars Ingebrigtsen
2021-10-17 23:12 ` Stefan Monnier
2021-10-18  7:02   ` Lars Ingebrigtsen
2021-10-18 12:24     ` Eli Zaretskii
2021-10-18 12:04   ` Eli Zaretskii
2021-10-18 12:01 ` Eli Zaretskii
2021-10-18 12:33   ` Lars Ingebrigtsen
2021-10-18 13:07     ` Eli Zaretskii
2021-10-18 13:19       ` Lars Ingebrigtsen

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