* bug#74740: 31.0.50; tty menus not displaying separators @ 2024-12-08 17:34 Gerd Möllmann 2024-12-08 18:33 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Gerd Möllmann @ 2024-12-08 17:34 UTC (permalink / raw) To: 74740 To see this, emacs -nw -q and open a menu from the menubar. Simple separators there are displayed as "--". More generally, all separator types are displayed as they appear in the menu item definition, '--double-line' as "--double-line" and so on. In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.1.0) of 2024-12-08 built on pro2 Repository revision: 9a0e26b88616946d2512680859166caa2675b30a Repository branch: master System Description: macOS 15.1.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-08 17:34 bug#74740: 31.0.50; tty menus not displaying separators Gerd Möllmann @ 2024-12-08 18:33 ` Eli Zaretskii 2024-12-08 18:46 ` Gerd Möllmann 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2024-12-08 18:33 UTC (permalink / raw) To: Gerd Möllmann; +Cc: 74740 > From: Gerd Möllmann <gerd.moellmann@gmail.com> > Date: Sun, 08 Dec 2024 18:34:33 +0100 > > To see this, emacs -nw -q and open a menu from the menubar. Simple > separators there are displayed as "--". What did you expect instead? I think this always worked like that on TTY frames. > More generally, all separator types are displayed as they appear in the > menu item definition, '--double-line' as "--double-line" and so on. What do you mean by that? where do we have such separators, and how do you display the menus which show them? I don't think I see them in the default menu bar. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-08 18:33 ` Eli Zaretskii @ 2024-12-08 18:46 ` Gerd Möllmann 2024-12-08 19:04 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Gerd Möllmann @ 2024-12-08 18:46 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 74740 Eli Zaretskii <eliz@gnu.org> writes: >> From: Gerd Möllmann <gerd.moellmann@gmail.com> >> Date: Sun, 08 Dec 2024 18:34:33 +0100 >> >> To see this, emacs -nw -q and open a menu from the menubar. Simple >> separators there are displayed as "--". > > What did you expect instead? I think this always worked like that on > TTY frames. > >> More generally, all separator types are displayed as they appear in the >> menu item definition, '--double-line' as "--double-line" and so on. I expected a horizontal line for "--". > What do you mean by that? where do we have such separators, and how do > you display the menus which show them? I don't think I see them in > the default menu bar. Concerning the separator types, Elisp Info says 23.18.1.3 Menu Separators ......................... A menu separator is a kind of menu item that doesn't display any text--instead, it divides the menu into subparts with a horizontal line. A separator looks like this in the menu keymap: (menu-item SEPARATOR-TYPE) where SEPARATOR-TYPE is a string starting with two or more dashes. followed by a list of separator types, among them the --double-line I mentioned. One can get these from 3rd-party packages. Minion is an example, where --double-line appears in a popup menu on the mode line. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-08 18:46 ` Gerd Möllmann @ 2024-12-08 19:04 ` Eli Zaretskii 2024-12-09 4:29 ` Gerd Möllmann 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2024-12-08 19:04 UTC (permalink / raw) To: Gerd Möllmann; +Cc: 74740 > From: Gerd Möllmann <gerd.moellmann@gmail.com> > Cc: 74740@debbugs.gnu.org > Date: Sun, 08 Dec 2024 19:46:35 +0100 > > Eli Zaretskii <eliz@gnu.org> writes: > > >> From: Gerd Möllmann <gerd.moellmann@gmail.com> > >> Date: Sun, 08 Dec 2024 18:34:33 +0100 > >> > >> To see this, emacs -nw -q and open a menu from the menubar. Simple > >> separators there are displayed as "--". > > > > What did you expect instead? I think this always worked like that on > > TTY frames. > > > >> More generally, all separator types are displayed as they appear in the > >> menu item definition, '--double-line' as "--double-line" and so on. > > I expected a horizontal line for "--". > > > What do you mean by that? where do we have such separators, and how do > > you display the menus which show them? I don't think I see them in > > the default menu bar. > > Concerning the separator types, Elisp Info says > > 23.18.1.3 Menu Separators > ......................... > > A menu separator is a kind of menu item that doesn't display any > text--instead, it divides the menu into subparts with a horizontal line. > A separator looks like this in the menu keymap: > > (menu-item SEPARATOR-TYPE) > > where SEPARATOR-TYPE is a string starting with two or more dashes. > > followed by a list of separator types, among them the --double-line I > mentioned. > > One can get these from 3rd-party packages. Minion is an example, where > --double-line appears in a popup menu on the mode line. This was never supported in TTY menus (I think I was completely unaware of this feature when I wrote the code). Patches to support it will be most welcome. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-08 19:04 ` Eli Zaretskii @ 2024-12-09 4:29 ` Gerd Möllmann 2024-12-09 13:54 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Gerd Möllmann @ 2024-12-09 4:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 74740 [-- Attachment #1: Type: text/plain, Size: 1894 bytes --] Eli Zaretskii <eliz@gnu.org> writes: >> From: Gerd Möllmann <gerd.moellmann@gmail.com> >> Cc: 74740@debbugs.gnu.org >> Date: Sun, 08 Dec 2024 19:46:35 +0100 >> >> Eli Zaretskii <eliz@gnu.org> writes: >> >> >> From: Gerd Möllmann <gerd.moellmann@gmail.com> >> >> Date: Sun, 08 Dec 2024 18:34:33 +0100 >> >> >> >> To see this, emacs -nw -q and open a menu from the menubar. Simple >> >> separators there are displayed as "--". >> > >> > What did you expect instead? I think this always worked like that on >> > TTY frames. >> > >> >> More generally, all separator types are displayed as they appear in the >> >> menu item definition, '--double-line' as "--double-line" and so on. >> >> I expected a horizontal line for "--". >> >> > What do you mean by that? where do we have such separators, and how do >> > you display the menus which show them? I don't think I see them in >> > the default menu bar. >> >> Concerning the separator types, Elisp Info says >> >> 23.18.1.3 Menu Separators >> ......................... >> >> A menu separator is a kind of menu item that doesn't display any >> text--instead, it divides the menu into subparts with a horizontal line. >> A separator looks like this in the menu keymap: >> >> (menu-item SEPARATOR-TYPE) >> >> where SEPARATOR-TYPE is a string starting with two or more dashes. >> >> followed by a list of separator types, among them the --double-line I >> mentioned. >> >> One can get these from 3rd-party packages. Minion is an example, where >> --double-line appears in a popup menu on the mode line. > > This was never supported in TTY menus (I think I was completely > unaware of this feature when I wrote the code). Patches to support it > will be most welcome. The following patch displays "--" for all separator types. I'd say that's good enough, WDYT? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: separator types --] [-- Type: text/x-patch, Size: 957 bytes --] From 09917757737d65fbb5bbcd57427a8e0528b87119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= <gerd@gnu.org> Date: Mon, 9 Dec 2024 05:20:29 +0100 Subject: [PATCH] Support menu separator types in tty menus (bug#74740) * src/xdisp.c (display_tty_menu_item): Display "--" If a menu item's text looks like a separator. --- src/xdisp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 534c0520240..abbe665a2fd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27333,6 +27333,9 @@ display_tty_menu_item (const char *item_text, int width, int face_id, display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0, FRAME_COLS (f) - 1, -1); } + else if (menu_separator_name_p (item_text)) + display_string ("--", Qnil, Qnil, 0, 0, &it, + width, 0, FRAME_COLS (f) - 1, -1); else display_string (item_text, Qnil, Qnil, 0, 0, &it, width, 0, FRAME_COLS (f) - 1, -1); -- 2.47.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-09 4:29 ` Gerd Möllmann @ 2024-12-09 13:54 ` Eli Zaretskii 2024-12-09 14:20 ` Gerd Möllmann 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2024-12-09 13:54 UTC (permalink / raw) To: Gerd Möllmann; +Cc: 74740 > From: Gerd Möllmann <gerd.moellmann@gmail.com> > Cc: 74740@debbugs.gnu.org > Date: Mon, 09 Dec 2024 05:29:43 +0100 > > >> 23.18.1.3 Menu Separators > >> ......................... > >> > >> A menu separator is a kind of menu item that doesn't display any > >> text--instead, it divides the menu into subparts with a horizontal line. > >> A separator looks like this in the menu keymap: > >> > >> (menu-item SEPARATOR-TYPE) > >> > >> where SEPARATOR-TYPE is a string starting with two or more dashes. > >> > >> followed by a list of separator types, among them the --double-line I > >> mentioned. > >> > >> One can get these from 3rd-party packages. Minion is an example, where > >> --double-line appears in a popup menu on the mode line. > > > > This was never supported in TTY menus (I think I was completely > > unaware of this feature when I wrote the code). Patches to support it > > will be most welcome. > > The following patch displays "--" for all separator types. I'd say > that's good enough, WDYT? Yes, LGTM, please install. But please add a FIXME comment there mentioning the feature and inviting its implementation. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#74740: 31.0.50; tty menus not displaying separators 2024-12-09 13:54 ` Eli Zaretskii @ 2024-12-09 14:20 ` Gerd Möllmann 0 siblings, 0 replies; 7+ messages in thread From: Gerd Möllmann @ 2024-12-09 14:20 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 74740 Eli Zaretskii <eliz@gnu.org> writes: >> From: Gerd Möllmann <gerd.moellmann@gmail.com> >> Cc: 74740@debbugs.gnu.org >> Date: Mon, 09 Dec 2024 05:29:43 +0100 >> >> >> 23.18.1.3 Menu Separators >> >> ......................... >> >> >> >> A menu separator is a kind of menu item that doesn't display any >> >> text--instead, it divides the menu into subparts with a horizontal line. >> >> A separator looks like this in the menu keymap: >> >> >> >> (menu-item SEPARATOR-TYPE) >> >> >> >> where SEPARATOR-TYPE is a string starting with two or more dashes. >> >> >> >> followed by a list of separator types, among them the --double-line I >> >> mentioned. >> >> >> >> One can get these from 3rd-party packages. Minion is an example, where >> >> --double-line appears in a popup menu on the mode line. >> > >> > This was never supported in TTY menus (I think I was completely >> > unaware of this feature when I wrote the code). Patches to support it >> > will be most welcome. >> >> The following patch displays "--" for all separator types. I'd say >> that's good enough, WDYT? > > Yes, LGTM, please install. But please add a FIXME comment there > mentioning the feature and inviting its implementation. Thanks, pushed to master, and closing. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-09 14:20 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-12-08 17:34 bug#74740: 31.0.50; tty menus not displaying separators Gerd Möllmann 2024-12-08 18:33 ` Eli Zaretskii 2024-12-08 18:46 ` Gerd Möllmann 2024-12-08 19:04 ` Eli Zaretskii 2024-12-09 4:29 ` Gerd Möllmann 2024-12-09 13:54 ` Eli Zaretskii 2024-12-09 14:20 ` Gerd Möllmann
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.