From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Context menus and mouse-3 [was: Changes for emacs 28] Date: Mon, 14 Sep 2020 08:11:11 +0200 Message-ID: <20200914061111.3trmuzhdvv7nwdcc@Ergus> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4103"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, Richard Stallman , emacs-devel@gnu.org, Arthur Miller , Dmitry Gutov , Gregory Heytings To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 08:13:06 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 1kHhje-0000x9-CK for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 08:13:06 +0200 Original-Received: from localhost ([::1]:52956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHhjd-0006tF-CH for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 02:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHhi0-0003k2-IL for emacs-devel@gnu.org; Mon, 14 Sep 2020 02:11:24 -0400 Original-Received: from sonic308-3.consmr.mail.bf2.yahoo.com ([74.6.130.42]:43402) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHhhx-0002rs-Aw for emacs-devel@gnu.org; Mon, 14 Sep 2020 02:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1600063878; bh=5oR6WUDzcZSdelkqkZV2T78P5cHZZ89kg++uJ3yF01k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=BKpQXi1rPcPPdNfV2zOTBUs+CPZBgEqJ0NZwzCBWO1dK34rzOk+G2WV7O75nYa5oXxNCvpLla7sk1XpVciZ8bdfuX7idM4B4J2H6MCevSwtq8PgDIB3U1TlO8eoTK28mb7LQ/gR+mPKaZap+s+fPiaBn1nrz3vHlym5G/IyNJxGg29EfZ2w4hcKk6jeh/M21wB0UwUTZQXOLSp5D5oC41pIv2Cb8EFegnoY1QpKHxwRFj0kasmixBmnXKQo6oIxN03NNiprPa3NvqW2EtsifO+VQz7rXFufu/a+iS9WxU/f2zPARifUs3uffpIAt279na4+ySKGFNuBc130cf6BVWQ== X-YMail-OSG: fp5dOj8VM1lzl5Dcwim_dYXLDmZjhDZ68vq1sH97HTBWnuzNY6u8ouqJiOMxn4h PPIS51is7nrHgvsMD.8IBz0lczZ4FHEoWeFUd0UGqKD4O6VK93CUHekQXRYNBwa9mKCo4SutZkCm IM0hGnI4ISvYpviHM_5EPLdc8rnMt7BaWhT2J3zZ6BGKPNguNqsNX1pcLMonv68zDqX0N8oJ1wNR 2wC1JI_Y5uD50Mzx04_932p3bAaX5klWavXgyHhIFABRNn0jmOIMF04w040mIyPnaGaFdWI.ClWB sKULqMedsHyCGL8YOshVdv6CYDxOgzrhfOChStXPoNf.GNLC9zWK0HEoCOCujwCsxndABD5Z2CZl WEjVrj6LlY.MGrQXNsisb8WpnNzrpL4q.xJ45YBAZ5VGTqegoo5RBwwbyGSa4FmBvIHwn1g9Led6 qQqziUx4iP.cBy7jyaOTYq3I7PqQOtdul_rCo.uF972tnR1FNae4Cpo7NE8DS4u7AKqwNRx0Tx_7 WMH_HsNiHEsG84bIB3pKmqRnadMxK5Bzkp9D17x1NKKBDfGurz97Lqzezu7_YzFIOmlzenr9kuqz CORkGl5kqQzSFUL3_kkIHl_sIoTqMwOJJuQNTlJA3GM5hJeQy.iEI_G_K8F5qchE634Bcprrc.Xg VPWg6SvvVmqySo4nzbChOe6RWOvuK0lWn3sNpMrx4QO8qTPFrEkpMhpIOiN6MCpLLiprTtY9KIXA LkFJn7.icJHLf4qKa5OAMiMw8MgQs9hjIW.rESfylCpx6FWDNZRlQlOaGMyZUECnSKSplqmJ.tqd wl7qfLkvdhxbc69_gq2Tj1EjzVooyb5BNDLt40JXhr Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Mon, 14 Sep 2020 06:11:18 +0000 Original-Received: by smtp422.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 15b74483c40f2e750d232b3db4a4d7f0; Mon, 14 Sep 2020 06:11:17 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.130.42; envelope-from=spacibba@aol.com; helo=sonic308-3.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 02:11:18 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:255604 Archived-At: Hi Drew: I have been trying to find the usefulness for the command 'mouse-save-then-kill' and so far I understand what it does but I still don't think it is more important/useful/intuitive than a good context panel. When I said that I have never used it I mean because of a need not because I don't know what it does. Actually part of it's function (the kill) could be considered as a problem more than a feature for less expert users or accidental double right click (ex: looking for the panel). Usually I prefer simpler solutions rather than complex and if I have to do a proposal respecting to this, it will be: 1- Move mouse-save-then-kill to C-mouse-3 2- Move The panel in C-mouse-3 to mouse-3 3- Improve the panel just bit as has been mentioned before: promoting copy, paste and cut to the main panel, adding spell and flymake corrections (maybe group those) and so on... like in a normal editor. Indeed the options I consider the most important/useful ones are already there BUT only when the menu-bar is disabled (which gives me the only good reason to disable it :p ). I already tried your package and it still feels unnatural to me; but also the hand installation is beyond the new users capabilities and reserved only to part of the public. That's my opinion and I think they are very sensible; but I don't want to come into 1000 emails again arguing about this kind of details. Best Ergus On Mon, Sep 14, 2020 at 03:06:43AM +0000, Drew Adams wrote: >Ergus> The real problem is that now the right click >Ergus> is bind to mouse-save-then-kill which I have >Ergus> never ever used, but probably others have. > >and earlier: > >Ergus> Sadly we have bind to mouse-save-then-kill >Ergus> which I don't find useful at all, but maybe >Ergus> somebody will complain if we change it to >Ergus> C- and move the panel to . > >I suspect that people who use a mouse but feel >that `mouse-save-then-kill' isn't useful have >never really understood what it offers. > >Part of the lack of understanding may come from >not having read the manual about it. Node `Mouse >Commands' of the Emacs manual makes the behavior >clear, and thus how useful it can be. > >`mouse-3' lets you select text, delete or kill >text, and extend or reduce the selection. >That's a lot, and the actions to do those things >fit well together. > >The extend-or-reduce bit works in a special way >if you've selected text by multiple clicking: >double-clicking or triple-clicking `mouse-1'. >I invite you to read the full text, if you >haven't already. And then play with it a bit. >___ > >What happens if you just read the doc string? >You don't get a great idea of the richness of >`mouse-3' behavior, IMO. It's OK, as far as a >doc string goes. But it's unlikely to teach >someone what they can do with it. > >Here's a suggestion for that doc string, and >also for the doc strings for other `mouse-*' >bindings (keys and commands): Provide a link >to that `Mouse Commands' node in the manual. >___ > >To me, the behavior of `mouse-save-then-kill' >is super useful. So much so that my library >`mouse3.el' has, as a big part of its design, >to keep that behavior, while supplementing it >with `mouse-3' context menus. > >You can of course optionally just get the menus. >But that's not where it's at - not the default >behavior. The idea is to let you use the normal >behavior as many times as you like - extend, >reduce, kill, whatever - and then, if you like, >click `mouse-3' at the same place again, to pop >up a context menu. > >The first part is optional, and so is the menu >popping. Click in the same spot for the menu. >Click anywhere else for the vanilla behavior. > >The other big part of the design is context >menu definition and behavior. Those two parts >are logically independent, but it makes sense >for them to be in the same library. > >There are alternative ways to define the menus, >and alternative ways to present them. Menus can >be mode-dependent or not, dynamic (programmed) >or static. > >Menus can, and generally do, differ, depending >on whether or not the region is active. When >active, a context menu provides actions on the >region or things in it. When inactive, it >provides actions on thing(s) located where you >click. > >(There are always multiple things located at the >spot where you click. It's up to a particular >menu to decide which things to act on.) >___ > >Should a context menu include _only_ items that >pertain to the region or the location clicked? >In general, no. But you can certainly have >menus that do provide only that, if you want. > >Should a context menu include global menus as >submenus, i.e., major-mode menus or menu-bar >menus? That's up to you - an option controls >this. If non-nil then yes: if the menu-bar is >visible then include the major-mode menus; else >include the menu-bar menus. >___ > >There are two alternative ways to define the >menus: (1) use keymaps and extended menu items >or (2) use the `x-poup-menu' form. The former >is the default method. It gives you more >control: keywords such as :visible and :enable, >for instance. The latter is a bit simpler for >defining, perhaps. > >Simple example code of using each method is >provided in `mouse3.el', with explanation. >An example of method #1 is provided for use >with Dired mode. An example of #2 is provided >for use with Picture mode. >___ > >`mouse3.el' is completely compatible with the >traditional Emacs `mouse-3' behavior. The >only place where they overlap is if you click >`mouse-3' twice at the same spot. > >If you do that to delete the selected text, >then to get that effect with `mouse3.el' you >double-click instead. Vanilla Emacs doesn't >distinguish a double-click from two clicks >separated by more than the double-click time. > >(You can swap those two behaviors: slow 2-click >to delete instead of to show menu.) >