From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#64619: [PATCH] Add toggle-window-dedicated command Date: Sat, 19 Aug 2023 21:47:39 +0000 (UTC) Message-ID: <87zg2mpuv9.fsf@catern.com> References: <87h6ovgnpn.fsf@catern.com> <387ee04aa9601b936ac5@heytings.org> <87350ere4n.fsf@catern.com> <387ee04aa97c3477c4f3@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , Philip Kaludercic , 64619@debbugs.gnu.org, martin rudalics , Eli Zaretskii , Drew Adams To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 19 23:48:25 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 1qXTo0-0008YE-9T for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Aug 2023 23:48:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXTnf-0005fi-7N; Sat, 19 Aug 2023 17:48:03 -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 1qXTnd-0005fa-Lp for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 17:48:01 -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 1qXTnd-0006J8-Dq for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 17:48:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXTne-0003hV-DC for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2023 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64619-submit@debbugs.gnu.org id=B64619.169248166914142 (code B ref 64619); Sat, 19 Aug 2023 21:48:02 +0000 Original-Received: (at 64619) by debbugs.gnu.org; 19 Aug 2023 21:47:49 +0000 Original-Received: from localhost ([127.0.0.1]:52412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXTnQ-0003fz-Ko for submit@debbugs.gnu.org; Sat, 19 Aug 2023 17:47:49 -0400 Original-Received: from s.wrqvtzvf.outbound-mail.sendgrid.net ([149.72.126.143]:28852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXTnO-0003fD-NX for 64619@debbugs.gnu.org; Sat, 19 Aug 2023 17:47:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=QSkoaXSPeT5vAp3pYsbCHRFb/Ekq30BcSB/oClu1uJ4=; b=FByL8sxUO3VOjsGQEanAV6rI6deiG/ESmsPRK5NsVl7tKvGwu97SuJUBRbMRQmBzK+ju mRmE8fUPBvoSVhyWv78xD4Ypxehj+JPU+35yEhiHqWk5w2+kpVvWzBAs1J6Mn6guK3lNYh +cMWs9E+/sXGJJ6sVUrLKV0SzoEYF3YjKfRu+rhfvzYuvLyU4zASxpUGKwXZihGZmuJERM ealrO6LHE2TEvZw/tc6PrAbpbVNzstXVyN7b68AVmRL0kN+ZURhJLVmKDr3Nry7nyzCqDV LqJJDp0GNwhACFIv4w5EYwgyJxRjSX7EYN74/gJ7ie3NIWNqE5cBt8DTxZ3WnPSg== Original-Received: by filterdrecv-canary-56575c7785-wd5jg with SMTP id filterdrecv-canary-56575c7785-wd5jg-1-64E1387B-1 2023-08-19 21:47:39.126107348 +0000 UTC m=+8719767.907610797 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-20 (SG) with ESMTP id 8hRVkiNvS4yUTgVTIgyNyQ Sat, 19 Aug 2023 21:47:38.802 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=heytings.org Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 7F64D6009C; Sat, 19 Aug 2023 17:47:38 -0400 (EDT) In-Reply-To: <387ee04aa97c3477c4f3@heytings.org> (Gregory Heytings's message of "Sat, 19 Aug 2023 20:37:31 +0000") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbJ8Oemg2SB5x93TJMY2m5R8HctOgkeZjJuhdbc4KGYqj/eeFze7RzNj4Gh/ZlUP/1NYt7nziobqSGTDGCsyMbQf1nFlClPDABMP8uFGRPk4QOPHin8LsBndsaN0aiuy9pj8f0uptOJmVZ/jCpYN16tzPFkg/UfBa10N7fp6d/J/3XwDWt/Fcn5CQ1IHQDT63Po= X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:267921 Archived-At: Gregory Heytings writes: > I agree with Drew here: strong dedication would be a better default. > The fact that the window was weakly dedicated and that I could switch > to another buffer without any warning or confirmation surprised me > when I tried your patch, hence my reaction. Dedicating a window to a > buffer is somewhat like making a buffer read-only, and I guess "weak > read-onlyness" would be surprising to most users. Maybe it's surprising to Emacs developers, but I think strong dedication would be more surprising to users. In fact, I initially used strong dedication in my patch. But I found it annoying that I had to turn off strong dedication explicitly if I wanted to switch to another buffer. That's what made me realize that weak dedication was better. Strong dedication would make sense if C-x b used display-buffer. Then it would be very helpful: C-x b in a strongly dedicated window would automatically use another window, which would be nice for muscle memory since you could just use C-x b regardless of what window you're in. But C-x b doesn't use display buffer, and instead just errors when the current window is strongly dedicated, which I think is fairly useless behavior; the user reaction is almost always going to be annoyance followed by C-x w d and C-x b again. So I think weak dedication is better. (Or making C-x b use display-buffer?) >>> 2. I would not bind it to the "d" key but to the "!" key: ISTM that >>> toggling window dedication is not such a common action that it >>> needs a letter key binding. >> >> It's not common at the moment, but I expect some users will use this >> command quite frequently. Also the C-x w prefix is pretty empty at >> the moment, so it's not as if it's competing with anything. >> > > It's pretty empty, but IMO that's not a reason to use its "best" > bindings for something like this. "d" should IMO be used for "delete" > (yes, I know it's already available with C-x 0). See > https://lists.gnu.org/archive/html/emacs-devel/2022-09/msg00326.html. Eh, I agree with others in that thread, I don't think C-x w d should run delete-buffer. :) But this does make me think that maybe toggle-window-dedicated should not have a default binding at first. We can see if people use it and only then give it a binding. I'm fine with that.