From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.bugs Subject: bug#57372: no-toolkit menu popups do not respect emacs font configuration Date: Thu, 25 Aug 2022 21:07:25 +0200 Message-ID: <87h720b0r6.fsf@logand.com> References: <87lerek7pt.fsf@logand.com> <83k06y74sy.fsf@gnu.org> <87v8qihxbk.fsf@logand.com> <87czcp29m6.fsf@yahoo.com> <834jy17umv.fsf@gnu.org> <87mtbtipnx.fsf@logand.com> <834jy161rs.fsf@gnu.org> <87h721iian.fsf@logand.com> <83tu614f1k.fsf@gnu.org> <87zgftgsdx.fsf@logand.com> <835yig4y03.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 57372@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 21:14:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRIJG-0005s5-Hy for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 21:14:34 +0200 Original-Received: from localhost ([::1]:57084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRIJF-0003Ah-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 15:14:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRICw-0002cS-8A for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRICv-0007I6-QE for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:08:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRICv-0000zr-LO for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Hlavaty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 19:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57372 X-GNU-PR-Package: emacs Original-Received: via spool by 57372-submit@debbugs.gnu.org id=B57372.16614544503791 (code B ref 57372); Thu, 25 Aug 2022 19:08:01 +0000 Original-Received: (at 57372) by debbugs.gnu.org; 25 Aug 2022 19:07:30 +0000 Original-Received: from localhost ([127.0.0.1]:51310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRICP-0000z5-NU for submit@debbugs.gnu.org; Thu, 25 Aug 2022 15:07:30 -0400 Original-Received: from logand.com ([37.48.87.44]:42168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRICN-0000yv-Vg for 57372@debbugs.gnu.org; Thu, 25 Aug 2022 15:07:28 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 253801A1823; Thu, 25 Aug 2022 21:07:27 +0200 (CEST) X-Mailer: emacs 28.1 (via feedmail 11-beta-1 I) In-Reply-To: <835yig4y03.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240743 Archived-At: On Thu 25 Aug 2022 at 09:51, Eli Zaretskii wrote: > If you need to use the File menu, you shouldn't be bothered about the > Edit menu. If I want to use the Edit menu, it disappears half way through getting to it. > If you have a mouse that works on the TTY frames (either GPM or > xterm-mouse mode), you can click directly at Edit and open the Edit > menu instead of (the default) File menu. Otherwise, use the arrow > keys or C-f/C-b to move between the top-level menus. The problem is not with mouse or keyboard. The problem is with how the selected menu-bar item is presented. Anyway, it seems to me that all the existing menu implementations are dead end for what I want to achieve, except tmm-menubar. >> Is there a reason, why is tmm-menubar restricted to tty? > > It isn't. It's only the F10 binding that works differently on TTY > frames, for reasons of backward compatibility (before TTY menus were > available). On GUI frames, you need to invoke tmm-menubar by name > instead. (You can, of course, bind F10 to tmm-menubar globally, if > that's what you want.) I tried binding tmm-menubar to F10 but that does not work: $ emacs -q \ --eval "(global-set-key [F10] 'tmm-menubar)" \ --eval '(describe-key [F10])' This shows that tmm-menubar is bound to and M-`. Pressing M-` opens tmm-menubar which is correct. But pressing F10 pops up the X resources based menu which is wrong. It seems that something in Emacs does not respect my F10 key binding. >> It would be nicer, if the cond in menu-bar-open was replaced >> with run-hook-with-args-until-success and a customizable >> open-menu-bar-functions variable. > > That's a lot of complexity for very little gain. Binding F10 globally > is much easier. Agree that it would be much easier, if it worked. > And, given the fact that almost no one uses tmm-menubar on GUI frames, > I don't see the justification for the added complexity. It seems to me that tmm-menubar is the only menu implementation which respects faces and does not depend on anything alien which means I can customize it the usual Emacs way and change it dynamically. That is a huge plus and looks like the way to go for what I want to achieve. Thanks again for the pointer. It looks quite nice with this customisation: (setq tmm-mid-prompt " ") (setq tmm-completion-prompt nil) However, if I click on the menu-bar I still get the X resource based menu instead of tmm-menubar. What do I need to do to get tmm-menubar after clicking on the menubar (not only after pressing F10 or M-`)? I tried to discover, what gets called in such case. Unfortunatelly, C-h k (describe-key) does not work in that case. How can one discover, what code handles particular click? Unlike other implementations, it seems that tmm-menubar does not show checkboxes.