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.devel Subject: Re: Context menus and mouse-3 Date: Thu, 17 Sep 2020 10:43:59 +0300 Organization: LINKOV.NET Message-ID: <87h7rw95x4.fsf@mail.linkov.net> References: <67FBE6CE-73C5-4C14-8531-AB55ADE3CC36@misasa.okayama-u.ac.jp> <87d02lykl3.fsf@mail.linkov.net> <26336BF5-CDA2-4CED-90B9-5CCB1155CFD2@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="16271"; 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: emacs-devel@gnu.org To: Tak Kunihiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 17 10:28:43 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kIpHX-00044Z-BW for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 10:28:43 +0200 Original-Received: from localhost ([::1]:52604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIpHW-0003sw-AA for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 04:28:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIpGK-0002De-Cs for emacs-devel@gnu.org; Thu, 17 Sep 2020 04:27:28 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:46799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIpGI-0005uy-CW for emacs-devel@gnu.org; Thu, 17 Sep 2020 04:27:28 -0400 X-Originating-IP: 91.129.108.13 Original-Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DE481C000D; Thu, 17 Sep 2020 08:27:21 +0000 (UTC) In-Reply-To: <26336BF5-CDA2-4CED-90B9-5CCB1155CFD2@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Thu, 17 Sep 2020 08:49:17 +0900") Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/17 04:27:24 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:255968 Archived-At: >>> - Horizontal scroll by wheel is supported. >>> - Moving text using mouse is supported. > >> Please explain how horizontal scroll by wheel is supported. >> Also please explain how moving text using mouse is supported. > > Try something like this. > > (setq mouse-wheel-tilt-scroll t) I tried this, but still it doesn't scroll horizontally with the mouse wheel. It seems this feature expects the mouse events mouse-6 and mouse-7, but scrolling the mouse wheel produces mouse-4 and mouse-5. > (setq mouse-drag-and-drop-region 'meta) I tried this with (setq mouse-drag-and-drop-region 'control) and it moves the text without modifier, and copies the text when the modifier key is pressed immediately before releasing the mouse button. In other apps, the modifier key can be pressed before clicking the mouse button. >> Thanks, this is a good starting point for adding contextual menu. >> I tried poplife-mode, and it pops up the menu on mouse-3, >> but it seems only when there is the selection already, >> i.e. it doesn't pop up the menu when nothing is selected. >> Is this intended to work this way? > > That’s not intended behavior! > I found that for unknown reason, poplife-mode does not overwrite > [mouse-3] started with emacs -Q. I’ll fix it and come back > soon while the topic is hot. ... > I fixed it and confirm with Emacs -Q. Can you try again to see > the approach to start with? Now this is much better, thanks. There are still some minor problems. For example, when "Paste" is selected from the Context menu, it doesn't paste the text where mouse-3 was clicked. It still pastes at the current cursor position. Also the Context menu is not activated immediately after clicking down-mouse-3. It's activated only after mouse-3 is released. In other apps, down-mouse-3 can activate the Context menu.