GNU bug report logs - #45820
menu-bar-mode: show drop-down menu instead of tmm-menubar in terminal Emacs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Tim Lee <progscriptclone@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug closed, send any further explanations to 45820 <at> debbugs.gnu.org and Tim Lee <progscriptclone@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45820 <at> debbugs.gnu.org:


Received: (at 45820) by debbugs.gnu.org; 19 Jan 2021 06:52:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 19 01:52:56 2021
Received: from localhost ([127.0.0.1]:49232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l1ksq-0006XX-K4
	for submit <at> debbugs.gnu.org; Tue, 19 Jan 2021 01:52:56 -0500
Received: from quimby.gnus.org ([95.216.78.240]:55610)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l1ksp-0006XI-5F
 for 45820 <at> debbugs.gnu.org; Tue, 19 Jan 2021 01:52:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=OirpRdwrHbHBqsL9nniY9ZeZ8VPOoHLiHco+fwThBSY=; b=UHuZs8J/THzIEdsVTrPrMLNytz
 Df0jTlH0TCarojhGxdzeNFSynyUv0vmkbunhYxTdM84L3llKl1tJusNSFdkGPaUfKagzLwSubphHn
 V+3D4qdjQnZO3yKZzxcrb8/HOO3P0xLU6SKfsZyZoc3GxW+qy/70qQEe0mdXCdcL9XyM=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1l1ksg-0004ct-GZ; Tue, 19 Jan 2021 07:52:48 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#45820: menu-bar-mode: show drop-down menu instead of
 tmm-menubar in terminal Emacs
References: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN>
 <83turmc9ix.fsf@HIDDEN>
 <e7288f22-deee-4369-e893-f3b9ca237921@HIDDEN>
 <83czy8di89.fsf@HIDDEN>
X-Now-Playing: Bobbie Gentry's _The Girl From Chickasaw County (2): The
 Delta Sweete_: "Mornin' Glory"
Date: Tue, 19 Jan 2021 07:52:45 +0100
In-Reply-To: <83czy8di89.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 13 Jan
 2021 16:28:06 +0200")
Message-ID: <8735yxmn9e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: >> Yes,
 I am using xt-mouse.
 Thank you for the information about Emacs 28. >> >> By "what you want is
 already implemented", do you mean that Emacs 28's >> menu bar will show the
 drop-down menu when cl [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45820
Cc: Tim Lee <progscriptclone@HIDDEN>, 45820 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Yes, I am using xt-mouse. Thank you for the information about Emacs 28.
>> 
>> By "what you want is already implemented", do you mean that Emacs 28's
>> menu bar will show the drop-down menu when clicked, or would I still
>> need to add "(define-key global-map [menu-bar mouse-1] ...)" to my Emacs
>> configuration file?
>
> The former: it works as you expect without any need to tinker.

Then I guess there's nothing more here to be done, and I'm closing this
bug report.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45820; Package emacs. Full text available.

Message received at 45820 <at> debbugs.gnu.org:


Received: (at 45820) by debbugs.gnu.org; 13 Jan 2021 14:28:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 13 09:28:20 2021
Received: from localhost ([127.0.0.1]:34736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzh8G-0002d4-MV
	for submit <at> debbugs.gnu.org; Wed, 13 Jan 2021 09:28:20 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60140)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kzh8E-0002cs-Nj
 for 45820 <at> debbugs.gnu.org; Wed, 13 Jan 2021 09:28:19 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56930)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kzh89-0004Xe-He; Wed, 13 Jan 2021 09:28:13 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4954
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kzh83-00049N-Oi; Wed, 13 Jan 2021 09:28:11 -0500
Date: Wed, 13 Jan 2021 16:28:06 +0200
Message-Id: <83czy8di89.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tim Lee <progscriptclone@HIDDEN>
In-Reply-To: <e7288f22-deee-4369-e893-f3b9ca237921@HIDDEN> (message from
 Tim Lee on Wed, 13 Jan 2021 13:11:02 +0800)
Subject: Re: bug#45820: menu-bar-mode: show drop-down menu instead of
 tmm-menubar in terminal Emacs
References: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN>
 <83turmc9ix.fsf@HIDDEN> <e7288f22-deee-4369-e893-f3b9ca237921@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45820
Cc: 45820 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tim Lee <progscriptclone@HIDDEN>
> Cc: 45820 <at> debbugs.gnu.org
> Date: Wed, 13 Jan 2021 13:11:02 +0800
> 
> Yes, I am using xt-mouse. Thank you for the information about Emacs 28.
> 
> By "what you want is already implemented", do you mean that Emacs 28's
> menu bar will show the drop-down menu when clicked, or would I still
> need to add "(define-key global-map [menu-bar mouse-1] ...)" to my Emacs
> configuration file?

The former: it works as you expect without any need to tinker.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45820; Package emacs. Full text available.

Message received at 45820 <at> debbugs.gnu.org:


Received: (at 45820) by debbugs.gnu.org; 13 Jan 2021 08:19:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 13 03:19:58 2021
Received: from localhost ([127.0.0.1]:34164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzbNk-0004xS-PU
	for submit <at> debbugs.gnu.org; Wed, 13 Jan 2021 03:19:58 -0500
Received: from mail-pj1-f45.google.com ([209.85.216.45]:56217)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <progscriptclone@HIDDEN>) id 1kzYQN-0007qk-Ux
 for 45820 <at> debbugs.gnu.org; Wed, 13 Jan 2021 00:10:29 -0500
Received: by mail-pj1-f45.google.com with SMTP id p12so390618pju.5
 for <45820 <at> debbugs.gnu.org>; Tue, 12 Jan 2021 21:10:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:cc:message-id:date:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=o+6bzCHiBTp/jbw2Y3n2OknRVWzigsvrwZBVcl2CeYg=;
 b=Ak2+obDuoXA8AAfrJbwyCD4oaJ2sjatJDA6F3CByuFk0tnu6yGDOT7gSMvHmdZzNqF
 RbPdbEhtF8hezEPX6jYJaWDPVGQM9Ng2w/eQMd/SDYgGRhcDtMR1UN+7QNgcNpSQHNti
 HOX/3Z+eYgFYnT7J7Hx3fJgU8VgCHK2G839qJ/y7UWmu+35jNWH59sND/JKuatP8oxzb
 WTsnU90heYoWu2l2Y5Persa3Yx+HORWij8bY/7PagWf4XvM+hY4K927E3pzzQChHSVSF
 4Y/6obV/iSEGeca2PHDu2o7tWs4Z670tjqbIUkbYmxm86Yan3uA88wVzLehPh1DCM+33
 XEmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:cc:message-id:date
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=o+6bzCHiBTp/jbw2Y3n2OknRVWzigsvrwZBVcl2CeYg=;
 b=lR8uz/jT2Lw6U7g4vnak12FGBe3ULK2LISaqAm/j74ZleBMiCikOvdYuuqtVD4WV9H
 Sd8N5RLnrJWCmeTnlTMcT7k+oadwqQvKAachMITH/8ANbbkf9VT+urpp6RnA1xxvNhzZ
 F2+cgg2JvDCEH0Ibt9tbcXVBfAseNePKFIwN8LSZ+3hXcBSF+EZkUN+Qyfb+amMKc0DC
 6idiy6hp4jG0f4ZFM5gP2dJeio9TJI/hTUoQIsOQEXweHqgrxXOmQ94Ib98mHh699pTW
 GY5TCKK5lqtJdOKLZkvmUJcsAMJlS02PTYFTjxLfnA3Qlmtl7oAhrc/xmEdSxvFUIaq0
 XWNg==
X-Gm-Message-State: AOAM532q/lxUtV+RtRQX56C+iUJ/AI1mjANR7dgDItkffAQmttLauqju
 1v6/kY2TMnR8U6YmFCEsPnrj0WRXDYk=
X-Google-Smtp-Source: ABdhPJwfa2sFjLsME18EbnrqL7Gvm1uLzuyb7DK4hLtPUKcsK6FbCtRX84/9NUqL8krLTEaI2Yitiw==
X-Received: by 2002:a17:90a:e7cd:: with SMTP id
 kb13mr363147pjb.10.1610514621822; 
 Tue, 12 Jan 2021 21:10:21 -0800 (PST)
Received: from [10.0.2.15] ([61.6.232.58])
 by smtp.gmail.com with ESMTPSA id d203sm873106pfd.148.2021.01.12.21.10.19
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 12 Jan 2021 21:10:21 -0800 (PST)
Subject: Re: bug#45820: menu-bar-mode: show drop-down menu instead of
 tmm-menubar in terminal Emacs
To: Eli Zaretskii <eliz@HIDDEN>
References: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN>
 <83turmc9ix.fsf@HIDDEN>
From: Tim Lee <progscriptclone@HIDDEN>
Message-ID: <e7288f22-deee-4369-e893-f3b9ca237921@HIDDEN>
Date: Wed, 13 Jan 2021 13:11:02 +0800
MIME-Version: 1.0
In-Reply-To: <83turmc9ix.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45820
X-Mailman-Approved-At: Wed, 13 Jan 2021 03:19:55 -0500
Cc: 45820 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Which terminal is that, and what kind of mouse support does it use?

Terminal: GNOME Terminal 3.28.2 on Ubuntu 18.04.

Mouse support: (xterm-mouse-mode t)

> If you are using xt-mouse, then what you want is already implemented
> in what will become the next major release, Emacs 28.

Yes, I am using xt-mouse. Thank you for the information about Emacs 28.

By "what you want is already implemented", do you mean that Emacs 28's
menu bar will show the drop-down menu when clicked, or would I still
need to add "(define-key global-map [menu-bar mouse-1] ...)" to my Emacs
configuration file?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45820; Package emacs. Full text available.

Message received at 45820 <at> debbugs.gnu.org:


Received: (at 45820) by debbugs.gnu.org; 12 Jan 2021 18:09:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 13:09:04 2021
Received: from localhost ([127.0.0.1]:33059 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzO6K-0002fr-Jt
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:09:04 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55898)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kzO6J-0002f0-0u
 for 45820 <at> debbugs.gnu.org; Tue, 12 Jan 2021 13:09:03 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36840)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kzO6D-0006gZ-Pd; Tue, 12 Jan 2021 13:08:57 -0500
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1578
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kzO6B-00059E-67; Tue, 12 Jan 2021 13:08:57 -0500
Date: Tue, 12 Jan 2021 20:09:10 +0200
Message-Id: <83turmc9ix.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tim Lee <progscriptclone@HIDDEN>
In-Reply-To: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN> (message from
 Tim Lee on Tue, 12 Jan 2021 23:30:31 +0800)
Subject: Re: bug#45820: menu-bar-mode: show drop-down menu instead of
 tmm-menubar in terminal Emacs
References: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45820
Cc: 45820 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tim Lee <progscriptclone@HIDDEN>
> Date: Tue, 12 Jan 2021 23:30:31 +0800
> 
> The problem: In terminal Emacs, clicking on an item in the menu bar will open "tmm-menubar".

Which terminal is that, and what kind of mouse support does it use?
If you are using xt-mouse, then what you want is already implemented
in what will become the next major release, Emacs 28.

If you are using some other mouse support, please describe that.

> However, there are serious flaws with this "solution":

Yes, they were all recently fixed for xt-mouse.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#45820; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 17:46:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 12 12:46:34 2021
Received: from localhost ([127.0.0.1]:33012 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzNkX-0008Ps-MG
	for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 12:46:34 -0500
Received: from lists.gnu.org ([209.51.188.17]:52602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <progscriptclone@HIDDEN>) id 1kzLaS-0004af-3i
 for submit <at> debbugs.gnu.org; Tue, 12 Jan 2021 10:28:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:35874)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <progscriptclone@HIDDEN>)
 id 1kzLaR-00071g-Q3
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 10:27:59 -0500
Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:37050)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <progscriptclone@HIDDEN>)
 id 1kzLaO-0007WK-OG
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jan 2021 10:27:59 -0500
Received: by mail-pg1-x531.google.com with SMTP id z21so1666983pgj.4
 for <bug-gnu-emacs@HIDDEN>; Tue, 12 Jan 2021 07:27:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:subject:to:message-id:date:mime-version:content-language;
 bh=OKCGFEand6CHOISgItLKS/jXNEYZKLIvPo+zpXrAXJw=;
 b=uF9asiUOi7JFXrF43h8mJqUW+NhRyu0GY+Iee4/eF98MnClqhmKXuapIBoPuPP3PRM
 jzpFAUKSR2rFJX1AV30JyNACbPNdMdXqngjRzOa0LoRL0bUWARvbCwCKZLgisa+hyLb+
 MT0cqkAHbDWxLQ95RLXcCSlGDsKG4KpFzf8ChNRGkG5ZGd53xAgHGwksNUDkD3ePjavp
 p9ZRLUQZoKkAAP7eNnN6T+aFATT8syV77Hf1lgv8pjTMU7vCSKQ7euwOyEzo+Kt8oH/h
 kE0X+4EFJ5RPJvIP8/WblkMaWnUIpeg/scpuHNAs0affdZhLvSgHk3kVULoXPz1zYktn
 HJuw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:subject:to:message-id:date:mime-version
 :content-language;
 bh=OKCGFEand6CHOISgItLKS/jXNEYZKLIvPo+zpXrAXJw=;
 b=RztKU0GJkj6nAcI1DdfJ39F8/yEx7nrgZq1EviqsHH4tyBe5JdWMTbOzS5Zb0qvfZF
 SarhSzBGSSCntAksa5xy99BVZG3IsxJYbvXzts5bNJ3QrXnFwHOPYgiEfy6b0hB+V45h
 2vx85gncMBAJensGLvNTEQUhFK2tsJcyDe1hBSdlRg5jYKu2hbJCVupNy+Ho6UDP/YCR
 yQeLKiH8Q77VQqrbj32DdyJeKFnDWKBUU6Y2p1WOohtOtO6WmdvspBMYG8AH9jC60/XU
 k1K0VEafNAFa1UkWP68WKXd0hrUaLBeqo8yZ3knBxucpftFM9ofeh1lgd7/NWRHAkrry
 dwPg==
X-Gm-Message-State: AOAM5301BubZEXUmtVN+s1m/zVWH2gWrQGN8hhdujF0gq00cxJ2/rlTE
 YTih7QCoq+TcTCTZ0sG6WJT6bI2ag0k=
X-Google-Smtp-Source: ABdhPJxj241XkW76t4r1t75UHMSwSvZtFqaAyzXUIwxp9ZVyjuI6Yc4ACFvcC12IwIRkimJcHvY62w==
X-Received: by 2002:a65:488d:: with SMTP id n13mr5103239pgs.315.1610465273405; 
 Tue, 12 Jan 2021 07:27:53 -0800 (PST)
Received: from [10.0.2.15] ([61.6.233.193])
 by smtp.gmail.com with ESMTPSA id b129sm4073923pgc.52.2021.01.12.07.27.48
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 12 Jan 2021 07:27:49 -0800 (PST)
From: Tim Lee <progscriptclone@HIDDEN>
Subject: menu-bar-mode: show drop-down menu instead of tmm-menubar in terminal
 Emacs
To: bug-gnu-emacs@HIDDEN
Message-ID: <29733eeb-d5b4-a133-2d44-f844b7768caf@HIDDEN>
Date: Tue, 12 Jan 2021 23:30:31 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------C89917B39C455BC528EFAA12"
Content-Language: en-US
Received-SPF: pass client-ip=2607:f8b0:4864:20::531;
 envelope-from=progscriptclone@HIDDEN; helo=mail-pg1-x531.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 12 Jan 2021 12:46:33 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This is a multi-part message in MIME format.
--------------C89917B39C455BC528EFAA12
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

The problem: In terminal Emacs, clicking on an item in the menu bar will
open "tmm-menubar".

Expected behavior: "menu-bar-open" should be run instead (i.e. a
drop-down menu should appear instead of tmm-menubar).

For example, if I left-click on the "Edit" menu item in the menu bar, I
expect the "Edit" drop-down to appear. Currently however, a left-click
on a menu item will open tmm-menubar in a *Completions* window. This is
surprising behavior.

By default, in terminal Emacs, "<menu-bar> <mouse-1>" is bound to
"tmm-menubar-mouse". There doesn't seem to be an easy way to change this
to the drop-down menu instead.

There exist a question about this issue on Emacs Stack Exchange site:
https://emacs.stackexchange.com/questions/50478/replace-clicking-a-menu-bar-option-from-m-to-f10-behavior
The proposed "solution" there is similar to this:

(define-key global-map [menu-bar mouse-1]
            (lambda (event)
              (interactive "e")
              ;; Adapted from the implementation of "menu-bar-open" in
Emacs 25.2.2.
              (let* ((x (car (posn-x-y (event-start event))))
                     (menu (menu-bar-menu-at-x-y x 0)))
                (popup-menu (or (lookup-key-ignore-too-long global-map
(vector 'menu-bar menu))
                                (lookup-key-ignore-too-long
(current-local-map) (vector 'menu-bar menu))
                                (cdar (minor-mode-key-binding (vector
'menu-bar menu)))
                                (mouse-menu-bar-map))
                            (posn-at-x-y x 0 nil t)
                            nil
                            t))))

However, there are serious flaws with this "solution":

  * Clicking on a menu bar item (e.g. "Help"), followed immediately by
    clicking outside the menus and drop-downs (e.g. clicking in the
    window) will not cancel the selected action. Instead, the
    highlighted action will actually run.
  * Clicking on a particular menu bar item (e.g. "Help") and immediately
    clicking on it again will not close the drop-down menu.

(Emacs version: 25.2.2, Terminal: GNOME Terminal 3.28.2, OS: Ubuntu 18.04)



--------------C89917B39C455BC528EFAA12
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>The problem: In terminal Emacs, clicking on an item in the menu
      bar will open "tmm-menubar".</p>
    <p>Expected behavior: "menu-bar-open" should be run instead (i.e. a
      drop-down menu should appear instead of tmm-menubar).<br>
      <br>
      For example, if I left-click on the "Edit" menu item in the menu
      bar, I expect the "Edit" drop-down to appear. Currently however, a
      left-click on a menu item will open tmm-menubar in a *Completions*
      window. This is surprising behavior.<br>
      <br>
      By default, in terminal Emacs, "&lt;menu-bar&gt; &lt;mouse-1&gt;"
      is bound to "tmm-menubar-mouse". There doesn't seem to be an easy
      way to change this to the drop-down menu instead.<br>
      <br>
      There exist a question about this issue on Emacs Stack Exchange
      site: <a moz-do-not-send="true"
href="https://emacs.stackexchange.com/questions/50478/replace-clicking-a-menu-bar-option-from-m-to-f10-behavior">https://emacs.stackexchange.com/questions/50478/replace-clicking-a-menu-bar-option-from-m-to-f10-behavior</a>
      The proposed "solution" there is similar to this:<br>
    </p>
    <p></p>
    <pre><tt>(define-key global-map [menu-bar mouse-1]</tt>
<tt>            (lambda (event)</tt>
<tt>              (interactive "e")</tt>
<tt>              ;; Adapted from the implementation of "menu-bar-open" in Emacs 25.2.2.</tt>
<tt>              (let* ((x (car (posn-x-y (event-start event))))</tt>
<tt>                     (menu (menu-bar-menu-at-x-y x 0)))</tt>
<tt>                (popup-menu (or (lookup-key-ignore-too-long global-map (vector 'menu-bar menu))</tt>
<tt>                                (lookup-key-ignore-too-long (current-local-map) (vector 'menu-bar menu))</tt>
<tt>                                (cdar (minor-mode-key-binding (vector 'menu-bar menu)))</tt>
<tt>                                (mouse-menu-bar-map))</tt>
<tt>                            (posn-at-x-y x 0 nil t)</tt>
<tt>                            nil</tt>
<tt>                            t))))</tt>
</pre>
    <p>However, there are serious flaws with this "solution":</p>
    <ul>
      <li>Clicking on a menu bar item (e.g. "Help"), followed
        immediately by clicking outside the menus and drop-downs (e.g.
        clicking in the window) will not cancel the selected action.
        Instead, the highlighted action will actually run.</li>
      <li>Clicking on a particular menu bar item (e.g. "Help") and
        immediately clicking on it again will not close the drop-down
        menu.</li>
    </ul>
    (Emacs version: 25.2.2, Terminal: GNOME Terminal 3.28.2, OS: Ubuntu
    18.04)<br>
    <br>
    <br>
  </body>
</html>

--------------C89917B39C455BC528EFAA12--




Acknowledgement sent to Tim Lee <progscriptclone@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#45820; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 19 Jan 2021 07:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.