From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50067: Context menus Date: Mon, 23 Aug 2021 10:24:22 +0300 Organization: LINKOV.NET Message-ID: <87wnociu41.fsf@mail.linkov.net> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18358"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Alan Third , 50067@debbugs.gnu.org, Lars Ingebrigtsen To: Tak Kunihiro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 23 09:39:18 2021 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 1mI4Y8-0004aE-KB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Aug 2021 09:39:16 +0200 Original-Received: from localhost ([::1]:47512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI4Y7-0004KX-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Aug 2021 03:39:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI4Xu-0004H8-Di for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2021 03:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mI4Xu-0007Qv-6G for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2021 03:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mI4Xu-0003Uy-3I for bug-gnu-emacs@gnu.org; Mon, 23 Aug 2021 03:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Aug 2021 07:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50067 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 50067-submit@debbugs.gnu.org id=B50067.162970428813384 (code B ref 50067); Mon, 23 Aug 2021 07:39:02 +0000 Original-Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 07:38:08 +0000 Original-Received: from localhost ([127.0.0.1]:40440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI4X2-0003To-3s for submit@debbugs.gnu.org; Mon, 23 Aug 2021 03:38:08 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:42127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI4Wz-0003T7-A4 for 50067@debbugs.gnu.org; Mon, 23 Aug 2021 03:38:05 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id EB561240012; Mon, 23 Aug 2021 07:37:56 +0000 (UTC) In-Reply-To: <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Mon, 23 Aug 2021 12:11:27 +0900") 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:212465 Archived-At: >> I tried to implement this, but soon found that long-left-click is unusable, >> because such artificial delay is a hassle - no one would have >> patience to wait even half a second until the menu finally appears. >> But this could be implemented anyway when users will demand this. > > I think this is useful especially on laptop computer with Mac. > As inferred on other posts laptop computer with Mac does not have > mouse-3. However, it is possible that I’m the only one. Recently Mattias bound C-mouse-1 to use instead of mouse-3 on Mac. > `ffap-at-mouse’ will open a file under pointer on `this window’. > Randomly I want to open it by `other frame’. > It’s good if I can choose open the file on `this window’ or `other frame’. > Is there a way to detect meta key pressed when select one of menu items? There is no way to detect meta key. But you can create a new command to open in a new frame, and add this command to the menu. Or use the existing `ffap-other-frame'. >>> It is handy to have buffer menu when right click mode bar. > > This suggestion may be unrelated to context-menu. > On mode bar, both mouse-1 and mouse-3 switches buffer. > I think mouse-3 should show something like (mouse-buffer-menu-map). Yes, this would be useful. >>> On paste when there is a region and delete-selection-mode is t, the >>> region should be replaced by the text. >> >> Please explain how the region should be replaced by the text, >> when mouse-yank-at-click or mouse-yank-primary is used >> to paste where the mouse is clicked. Should it delete the region >> and paste where mouse is clicked on another part of the buffer? >> What if the mouse is clicked in another window? > > When there is a region and yank text by `C-y’, the text would > be replaced. > > I think when there is a region and point in on region, region > should be replaced by text. No? mouse-yank-at-click is intended to paste where you click. So when there is a region, and you click mouse-3 at some other position where you want to paste, and select "Paste" from the context-menu, it's unclear what to do with the region. It makes no sense to delete the region, when you paste at the clicked position outside of the region, but not on the region. Please see more in mouse-yank-at-click and mouse-yank-primary that contain such comment about the need to deactivate the region: ;; Without this, confusing things happen upon e.g. inserting into ;; the middle of an active region. (when select-active-regions (let (select-active-regions) (deactivate-mark))) >>> I cannot figure out how to include pre-existing menu such for >>> (mouse-buffer-menu-map). Actually, the right function to use is (mouse-buffer-menu-keymap) instead of (mouse-buffer-menu-map). > I cannot find guid line how the menu should be created. > Do you know where to look? Good documentation is in (info "(elisp) Defining Menus").