From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66780: [PATCH] Improve rectangle-mark-mode when transient-mark-mode is off Date: Sat, 28 Oct 2023 16:17:39 +0300 Message-ID: <83edhedgy4.fsf@gnu.org> References: <0b1f5f23-b683-4367-beae-332a8d850d32@vodafonemail.de> <83zg03clik.fsf@gnu.org> <871qdf3trr.fsf@sappc2.fritz.box> <83lebnc8tn.fsf@gnu.org> <87y1fm3o78.fsf@sappc2.fritz.box> 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="3663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66780@debbugs.gnu.org To: Jens Schmidt , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 28 15:18:54 2023 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 1qwjDI-0000gZ-RX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Oct 2023 15:18:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwjCy-0008BB-Pc; Sat, 28 Oct 2023 09:18:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwjCw-0008B3-RV for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2023 09:18:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwjCw-00080s-JH for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2023 09:18:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwjDS-0008O5-7h for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2023 09:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Oct 2023 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66780-submit@debbugs.gnu.org id=B66780.169849910932198 (code B ref 66780); Sat, 28 Oct 2023 13:19:02 +0000 Original-Received: (at 66780) by debbugs.gnu.org; 28 Oct 2023 13:18:29 +0000 Original-Received: from localhost ([127.0.0.1]:37925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwjCu-0008NF-UX for submit@debbugs.gnu.org; Sat, 28 Oct 2023 09:18:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwjCr-0008N0-V8 for 66780@debbugs.gnu.org; Sat, 28 Oct 2023 09:18:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwjCF-0007xw-Gs; Sat, 28 Oct 2023 09:17:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=zWLGChPrL/5jGbF15bwy7SxiVzS4alAGT+ESDSq/7zs=; b=mcnM+zDWMDa9zeLhZDKs UKOJ78hsncK69HtD1Ok+9nXNQQIT41kap1/Rtjc97CEHEYUhNYrMV4+oe/vL3O1JRpAUrdsoskx9B qdg9ZssY3eu8ak3cuwqw2TISuo83/AKlk5jBDK5NIb7VDEi3cU6TBcRpX9uJekWxMq2bclZi5kFuM BnhgtksBn8fBFxl7KvsxqC7ieP6uz4hH1ErRppFWCC+IWlC0h6SdSEPqwpGiyAxltTKSBfPAPmsYE uq1bMJbyw9H26bvYZRVSL9sNZh38OE3IPGxxhpHQ0oHJ1Q9W3HPj7NvRwx0hsXDZkvsVl4US8cFi8 eoM21R0VTgJJxA==; In-Reply-To: <87y1fm3o78.fsf@sappc2.fritz.box> (message from Jens Schmidt on Sat, 28 Oct 2023 14:51:07 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273438 Archived-At: > From: Jens Schmidt > Cc: 66780@debbugs.gnu.org > Date: Sat, 28 Oct 2023 14:51:07 +0200 > > Eli Zaretskii writes: > > >> From: Jens Schmidt > >> Cc: 66780@debbugs.gnu.org > >> Date: Sat, 28 Oct 2023 12:50:48 +0200 > > A general question first: Notwithstanding the discussion of how many use > it, do we agree that the combination of using shift-select-mode > _without_ permanent transient-mark-mode ("shift-select-mode-only > scenario") is a supported scenario in Emacs? It is supported de-facto, yes. But that doesn't mean we must recommend that people use it, if the results are confusing and hard to predict and understand. Whoever uses this combination, if they understand the consequences, are free to use it, of course. But if they don't understand the consequences well enough to be using this combination in a way that's useful to them, then there's nothing wrong with saying don't do that. > Because that's what this bug is about, in the end: Instead of > discouraging the shift-select-mode-only users to use rectangle-mark-mode > I would like to find a solution that helps them. Without affecting any > other users. Is that not a valid, probably even noble ambition? Not necessarily, not where I stand. You found something that you'd like to fix for your own reasons. That is perfectly legitimate, and you have all the means of doing so locally: that's what makes Emacs the perfectly customizable tool. But when you come here and propose patches, you say something else: that your personal preferences and itches you'd like to scratch are important enough and general enough to make those changes in Emacs core so that they affect everyone else. And that is something that doesn't automatically follows from your personal preferences and use patterns. It needs more serious justifications. IOW, when you call this a "bug", I can easily agree with you if "bug" is interpreted as "bug under your personal preferences and use patterns". But if you want to convince me that it is a "bug" worthy of making changes in Emacs that will affect everyone, it is not enough to describe your own personal use case. > >> Another option would have been to turn off the confusing bits of RMM > >> when *permanent* TMM is off. I would have preferred that, actually: A > >> rectangle-mark-mode that *really* only shows the region-rectangle when > >> permanent TMM is off but leaves all other functionality (kill, yank, C-x > >> C-x) unchanged. In that case a conditional minor mode lighter would not > >> be neccessary, either. > >> > >> What do you think about that option? > > > > It would be a backward-incompatible change, so it has even more > > disadvantages IMO. > > It would be backward-incompatible only where the behavior currently is > confusing. It is confusing for you, I get that. But we have no reason to believe it's confusing for everyone else. > Another option, not featuring backward-incompatiblity at all but still > helping shift-select-mode-only users: Adding a rectangle-light-mark-mode > that provides the selection capabilities, but not the editing surprises > of rectangle-mark-mode. The documentation could then provide the > recommendation to use that new mode instead of the other. And here you suggest a complication in Emacs, which again, as far as I'm concerned, requires to be justified. Once again I ask: why not make these changes, or others that you propose, in your own local Emacs, and be done? Emacs makes it very easy to make such changes, definitely for someone who can write patches you submitted in this bug report. Why do you insist on making these changes in upstream, to affect everyone else, when all you have is your personal negative experience with these features? > > I actually think most users want transient-mark-mode turned ON, since > > that is closer what other editors do. > > I disagree here. Other editors do the equivalent of shift-select-mode. They have both, because region is highlighted not only by shift-movements, but also by other means. We turned on transient-mark-mode by default because we have ample evidence that many people prefer it. I don't think this has changed since we made that decision. > I haven't seen yet an editor that (exaggerating) randomly activates the > region and then leaves it on until you press C-g. It is true that the Emacs behavior under transient-mark-mode is not exactly like that of other applications, but it is very close where the related behaviors overlap (C-g is not a good example because it is quite unique to Emacs). > >> Finally, do you also have any objections on fix C, adding the "^" > >> markers to the interactive specs of the movement commands? Or would > >> that bit be OK? > > > > You never explained why that would be advantageous, nor even what > > effect will that have. > > Sorry. It would have the effect documented for `interactive': > > If the string begins with ‘^’ and ‘shift-select-mode’ is non-nil, > Emacs first calls the function ‘handle-shift-selection’. > > Function `handle-shift-selection' in that case temporarily enables > transient-mark-mode and pushes the mark, which in turn activates the > region-rectangle provided that RMM is enabled. The effect would be that > I can use the shifted cursor keys to select a region-rectangle even if > transient-mark-mode is not permanently on. Which I consider > advantageous. Maybe we should do this. I'd like to hear opinions of others about this, in particular that of Stefan Kangas (CC'ed).