From unknown Sat Aug 16 11:33:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48916 <48916@debbugs.gnu.org> To: bug#48916 <48916@debbugs.gnu.org> Subject: Status: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Reply-To: bug#48916 <48916@debbugs.gnu.org> Date: Sat, 16 Aug 2025 18:33:21 +0000 retitle 48916 28.0.50; allow windmove to select windows with the 'no-other-= window parameter reassign 48916 emacs submitter 48916 pillule severity 48916 normal tag 48916 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 06:27:29 2021 Received: (at submit) by debbugs.gnu.org; 8 Jun 2021 10:27:29 +0000 Received: from localhost ([127.0.0.1]:57520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqYxE-0000Jp-UB for submit@debbugs.gnu.org; Tue, 08 Jun 2021 06:27:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:58334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqYxC-0000Jg-G1 for submit@debbugs.gnu.org; Tue, 08 Jun 2021 06:27:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqYxC-00007W-8y for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 06:27:26 -0400 Received: from mx1.riseup.net ([198.252.153.129]:46602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqYx9-00069O-Ry for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 06:27:25 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FzmdP1PmhzDqC3 for ; Tue, 8 Jun 2021 03:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623148041; bh=sNaK3B+YRyl79/UiMrEaUtm1sl7SBlLHs7tGiRUlX4o=; h=From:To:Subject:Date:From; b=sUhX3tyH6xUq0xe793Rkl+JxlPttfwYRPNuP6IeRNPeAhI8CU+iFMz5pjubwLpsp1 6ZKMs75LNvFu+CBRVJk+h2fCheBGY1aT/Fh5iw7emWxonei2w2pPceVXFd4lxtaLei hKqob3nF3GgyOzzdF3jdRIE2kPIS8i4ybbLj33xQ= X-Riseup-User-ID: 3F4D8905A89C9CCE3161F4189D2EC5B1C22A18E50D0775A4C871C9C41BC1C333 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FzmdN0vR0z5vSN for ; Tue, 8 Jun 2021 03:27:19 -0700 (PDT) From: pillule To: bug-gnu-emacs@gnu.org Subject: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 08 Jun 2021 12:09:21 +0200 Message-ID: <878s3kzm66.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=198.252.153.129; envelope-from=pillule@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; format=flowed Hi, One may want to customize its `display-buffer-alist' carefully to apply the 'no-other-window parameter to eg side windows so they are not selected by the `other-window' command and to create custom functions of the family (eg creating a `find-file-in-other-window' that does not select windows with the no-other-window parameter) Unfortunately by doing so, we actually limit the use of the windmove commands since `windmove-find-other-window' always ignore windows with this parameter. It is not a fatality since `window-in-direction' can receive an argument to choose if we want to ignore this parameter or not. This draft implements an user option to let the user choose that behavior. Because it applies to `windmove-find-other-window', it allows the commands windmove-right, windmove-left, windmove-down, windmove-up to select windows with the no-other-window parameter, but not for the `windmove-display-*' functions. I suppose it is the desired behavior. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-User-option-to-select-no-other-window-with-windmove.patch Content-Description: allow windmove to select windows with the 'no-other-window parameter >From 8997dcd61e68cb0cd6251987fbc8c291ef0c7bbe Mon Sep 17 00:00:00 2001 From: Trust me I am a doctor Date: Tue, 8 Jun 2021 11:51:55 +0200 Subject: [PATCH] User option to select 'no-other-window with windmove * lisp/windmove.el (windmove-ignore-no-other-window): add this new user option (windmove-find-other-window): uses windmove-ignore-no-other-window to choose whether windmove can access to the window with the 'no-other-window property. --- lisp/windmove.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index d648613e10..23bbc0908e 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -165,6 +165,14 @@ windmove-window-distance-delta (make-obsolete-variable 'windmove-window-distance-delta "no longer used." "27.1") +(defcustom windmove-ignore-no-other-window nil + "Whether the windmove commands are allowed to target all type of windows, +If this variable is set to t, `windmove-find-other-window--side' and +subsequently all interactive windmove commandswill ignore the +no-other-window parameter." + :type 'boolean + :group 'windmove) + ;; Note: ;; @@ -345,7 +353,8 @@ windmove-find-other-window Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of `window-point'; if positive, use the left or top edge of WINDOW as reference point." - (window-in-direction dir window nil arg windmove-wrap-around t)) + (window-in-direction dir window windmove-ignore-no-other-window + arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-find-other-window', or screams if there's no window there. -- 2.20.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 07:44:44 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 11:44:44 +0000 Received: from localhost ([127.0.0.1]:57572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqaA0-0004Nm-6S for submit@debbugs.gnu.org; Tue, 08 Jun 2021 07:44:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqa9u-0004NU-Q8 for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 07:44:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58918) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqa9p-0003TE-BZ; Tue, 08 Jun 2021 07:44:33 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4102 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqa9o-0004SF-Ut; Tue, 08 Jun 2021 07:44:33 -0400 Date: Tue, 08 Jun 2021 14:44:14 +0300 Message-Id: <83czswfunl.fsf@gnu.org> From: Eli Zaretskii To: pillule In-Reply-To: <878s3kzm66.fsf@riseup.net> (message from pillule on Tue, 08 Jun 2021 12:09:21 +0200) Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter References: <878s3kzm66.fsf@riseup.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48916 Cc: 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: pillule > Date: Tue, 08 Jun 2021 12:09:21 +0200 > > One may want to customize its `display-buffer-alist' carefully to > apply the 'no-other-window parameter to eg side windows so they > are not selected by the `other-window' command and to create > custom functions of the family (eg creating a > `find-file-in-other-window' that does not select windows with the > no-other-window parameter) > > Unfortunately by doing so, we actually limit the use of the > windmove commands since `windmove-find-other-window' always ignore > windows with this parameter. > It is not a fatality since `window-in-direction' can receive an > argument to choose if we want to ignore this parameter or not. > > This draft implements an user option to let the user choose that > behavior. Thanks. I don't use windmove, so I will let others comment. But please allow me a few minor nits: > * lisp/windmove.el > (windmove-ignore-no-other-window): add this new user option > (windmove-find-other-window): uses windmove-ignore-no-other-window > to choose whether windmove can access to the window with the > 'no-other-window property. This isn't formatted accoring to our rules. In particular, each sentence after the colon should begin with a capital letter and end with a period. See CONTRIBUTE for more details (and I suggest to use Emacs commands for writing log messages, as they will take care of some routine parts of the formatting for you). > +(defcustom windmove-ignore-no-other-window nil This name is not the best one. For starters, "ignore-no" is a kind of double negation, which makes it harder to understand and remember. Can you come up with a better description of what exactly is ignored here? > + "Whether the windmove commands are allowed to target all type of windows, The first line of a doc string should be a complete sentence (it is) and end with a period. > +If this variable is set to t, `windmove-find-other-window--side' and ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "If non-nil, ..." > +subsequently all interactive windmove commandswill ignore the ^^^^^^^^^^^^ A typo. > +no-other-window parameter." If you reference this parameter, I think you should say that it's a parameter to be applied by display-buffer-alist's actions. > + :type 'boolean > + :group 'windmove) New defcustoms should have a :version tag. Also, I believe we don't like redundant :group tags, such as the one here. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 09:56:00 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 13:56:00 +0000 Received: from localhost ([127.0.0.1]:59382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcD2-0008D9-08 for submit@debbugs.gnu.org; Tue, 08 Jun 2021 09:56:00 -0400 Received: from mx1.riseup.net ([198.252.153.129]:56580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcCz-0008Cv-Vq for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 09:55:58 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FzsG02wx3zDqC0; Tue, 8 Jun 2021 06:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623160552; bh=DTN/HZzyJhuRnDUT3ngx/gk9cK5E4pDeZaHknAVf9bc=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=gfD7uK2v0w+PWGtyLgKKpbG3Fahr2Fa71dRZJOAJF7YB/cKz4hwwrj3khb0d73oKL phXHmVeqxCi3NhfLCoylTYZgIAw8jsh5iw8Sz1HwaeBMQJs1N6WXghggphPkg/ZZQ/ nOgB7zyt3xWQXAqgfJi9s5aGUBNwPzshlnENSFsE= X-Riseup-User-ID: 7CFCDE98FA5850EC5E4F661002EF51FDCAA905B2F6C2F51D00C417D5D44A1E4E Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FzsFx6Ld4z5w2G; Tue, 8 Jun 2021 06:55:49 -0700 (PDT) References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> From: pillule To: Eli Zaretskii Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 08 Jun 2021 15:28:34 +0200 In-reply-to: <83czswfunl.fsf@gnu.org> Message-ID: <87zgw0xxya.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: pillule , 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > Thanks. I don't use windmove, so I will let others comment.=20 > But > please allow me a few minor nits: Your =E2=80=98minor nits=E2=80=99 are indeed welcome. >> * lisp/windmove.el >> (windmove-ignore-no-other-window): add this new user option >> (windmove-find-other-window): uses=20 >> windmove-ignore-no-other-window >> to choose whether windmove can access to the window with the >> 'no-other-window property. > > This isn't formatted accoring to our rules. In particular, each > sentence after the colon should begin with a capital letter and=20 > end > with a period. See CONTRIBUTE for more details (and I suggest=20 > to use > Emacs commands for writing log messages, as they will take care=20 > of > some routine parts of the formatting for you). So that means you are recommending to use VC instead of Magit=20 (that I used) for committing changes ? Maybe Magit have a something that I am not aware for this purpose=20 ? >> +(defcustom windmove-ignore-no-other-window nil > > This name is not the best one. For starters, "ignore-no" is a=20 > kind of > double negation, which makes it harder to understand and=20 > remember. > Can you come up with a better description of what exactly is=20 > ignored > here? Yes, i think 'windmove-move-in-all-windows' will be more explicit. >> + "Whether the windmove commands are allowed to target all=20 >> type of windows, > > The first line of a doc string should be a complete sentence (it=20 > is) > and end with a period. > >> +If this variable is set to t,=20 >> `windmove-find-other-window--side' and > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > "If non-nil, ..." > >> +subsequently all interactive windmove commandswill ignore the > ^^^^^^^^^^^^ > A typo. > >> +no-other-window parameter." > > If you reference this parameter, I think you should say that=20 > it's a > parameter to be applied by display-buffer-alist's actions. >> + :type 'boolean >> + :group 'windmove) > > New defcustoms should have a :version tag. > Also, I believe we don't like redundant :group tags, such as=20 > the one here. got them. the last one may be a little bit confusing for the=20 reader that is not aware of it because all others defcustoms of=20 window.el applies a :group tag. Do you want that I remove the=20 others unnecessary ones ? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-User-option-to-select-no-other-window-with-windmove.patch Content-Description: minor nits >From 8997dcd61e68cb0cd6251987fbc8c291ef0c7bbe Mon Sep 17 00:00:00 2001 From: Trust me I am a doctor Date: Tue, 8 Jun 2021 11:51:55 +0200 Subject: [PATCH] User option to select 'no-other-window with windmove * lisp/windmove.el (windmove-ignore-no-other-window): add this new user option (windmove-find-other-window): uses windmove-ignore-no-other-window to choose whether windmove can access to the window with the 'no-other-window property. --- lisp/windmove.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index d648613e10..23bbc0908e 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -165,6 +165,14 @@ windmove-window-distance-delta (make-obsolete-variable 'windmove-window-distance-delta "no longer used." "27.1") +(defcustom windmove-ignore-no-other-window nil + "Whether the windmove commands are allowed to target all type of windows, +If this variable is set to t, `windmove-find-other-window--side' and +subsequently all interactive windmove commandswill ignore the +no-other-window parameter." + :type 'boolean + :group 'windmove) + ;; Note: ;; @@ -345,7 +353,8 @@ windmove-find-other-window Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of `window-point'; if positive, use the left or top edge of WINDOW as reference point." - (window-in-direction dir window nil arg windmove-wrap-around t)) + (window-in-direction dir window windmove-ignore-no-other-window + arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-find-other-window', or screams if there's no window there. -- 2.20.1 --=-=-= Content-Type: text/plain; format=flowed -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 10:01:49 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 14:01:49 +0000 Received: from localhost ([127.0.0.1]:59392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcIf-0008Nf-Do for submit@debbugs.gnu.org; Tue, 08 Jun 2021 10:01:49 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcId-0008NS-DW for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 10:01:48 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FzsNj5cvhzDxXt; Tue, 8 Jun 2021 07:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623160901; bh=AhGogKedDQpIDM2GlUVKt1Rq7rSZGON73UfPfQd8gAw=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=GNzMUi9jHVH38asKbGoAscIkhk13VkJ8qUYnHsoP7Jk+DUxZa++YdAMSgeKBbw80K 2BhTSHhuKI9EANNJK4mSqZRetqMYe2a3XmUHg0hDHN9tq3nXNwgBhKvewrlQ8Py9aC SACkRB0cley9hDUHpn4+p64/TyzrrrVJuGceG0Os= X-Riseup-User-ID: 16DA8CFEF519C7E60DB9D556E14B0835A01C4307653036FA1617B2ADA631BCF3 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FzsNg3fRmz5vks; Tue, 8 Jun 2021 07:01:38 -0700 (PDT) References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> From: pillule To: Eli Zaretskii Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 08 Jun 2021 15:57:49 +0200 In-reply-to: <83czswfunl.fsf@gnu.org> Message-ID: <87wnr4xxok.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: pillule , 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> +subsequently all interactive windmove commandswill ignore the > ^^^^^^^^^^^^ > A typo. > No, it seems to be a bug on my end. Somewhere on a file transfer. Sorry I am not sure I will be able to fix that one easily. -- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 10:12:34 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 14:12:34 +0000 Received: from localhost ([127.0.0.1]:59405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcT3-0000D6-Tj for submit@debbugs.gnu.org; Tue, 08 Jun 2021 10:12:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcT2-0000Cv-7y for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 10:12:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34464) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqcSx-0003sa-2u; Tue, 08 Jun 2021 10:12:27 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1428 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqcSw-00010n-JA; Tue, 08 Jun 2021 10:12:27 -0400 Date: Tue, 08 Jun 2021 17:12:08 +0300 Message-Id: <83y2bke98n.fsf@gnu.org> From: Eli Zaretskii To: pillule In-Reply-To: <87zgw0xxya.fsf@riseup.net> (message from pillule on Tue, 08 Jun 2021 15:28:34 +0200) Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48916 Cc: 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: pillule > Cc: pillule , 48916@debbugs.gnu.org > Date: Tue, 08 Jun 2021 15:28:34 +0200 > > > This isn't formatted accoring to our rules. In particular, each > > sentence after the colon should begin with a capital letter and > > end with a period. See CONTRIBUTE for more details (and I suggest > > to use Emacs commands for writing log messages, as they will take > > care of some routine parts of the formatting for you). > > So that means you are recommending to use VC instead of Magit > (that I used) for committing changes ? > Maybe Magit have a something that I am not aware for this purpose > ? AFAIK, Magit does have such a command, but don't ask me what it is... > > Also, I believe we don't like redundant :group tags, such as > > the one here. > > got them. the last one may be a little bit confusing for the > reader that is not aware of it because all others defcustoms of > window.el applies a :group tag. Do you want that I remove the > others unnecessary ones ? Fine with me if you remove them. (The patch you sent was the old one, right?) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 10:13:30 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 14:13:30 +0000 Received: from localhost ([127.0.0.1]:59409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcTy-0000Ex-7n for submit@debbugs.gnu.org; Tue, 08 Jun 2021 10:13:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcTw-0000Ej-C9 for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 10:13:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34508) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqcTr-0004TU-3l; Tue, 08 Jun 2021 10:13:23 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1489 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqcTq-0001NI-OF; Tue, 08 Jun 2021 10:13:23 -0400 Date: Tue, 08 Jun 2021 17:13:07 +0300 Message-Id: <83wnr4e970.fsf@gnu.org> From: Eli Zaretskii To: pillule In-Reply-To: <87wnr4xxok.fsf@riseup.net> (message from pillule on Tue, 08 Jun 2021 15:57:49 +0200) Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87wnr4xxok.fsf@riseup.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48916 Cc: 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: pillule > Cc: pillule , 48916@debbugs.gnu.org > Date: Tue, 08 Jun 2021 15:57:49 +0200 > > >> +subsequently all interactive windmove commandswill ignore the > > ^^^^^^^^^^^^ > > A typo. > > > > No, it seems to be a bug on my end. Somewhere on a file > transfer. Sorry I am not sure I will be able to fix that one > easily. If that's the case, I suggest to send the patch as an attachment. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 10:34:42 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 14:34:42 +0000 Received: from localhost ([127.0.0.1]:59433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcoU-0000nc-EB for submit@debbugs.gnu.org; Tue, 08 Jun 2021 10:34:42 -0400 Received: from mx1.riseup.net ([198.252.153.129]:55658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqcoQ-0000nM-Ql for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 10:34:40 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4Fzt6d0r4SzDqN6; Tue, 8 Jun 2021 07:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623162873; bh=bWBZ/hHnx/HWizcnwaPXHyYl9kIjOFIkaxwdVTtn8KU=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=Ly/OER+0lG3vH1jkg6mG+nURPxlGmlCrroODB7aS9qcRCIz3V60zYuJ3AcCWEEHet YK1PKIS/sCra1JW3IeqZH0+d+s+P0Kaud9sHYQSrDyfSk0zn7UWDn0sy3DkU/hNAuq +o4UfGx5Uwfrp0uSh31ezedOW+/ap+GfSTZM0NkE= X-Riseup-User-ID: DFA5C39062A03477DF1153227652A202FD39A233BF208FC3F672A661F0526C0E Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4Fzt6b4CSDz5w50; Tue, 8 Jun 2021 07:34:31 -0700 (PDT) References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87wnr4xxok.fsf@riseup.net> <83wnr4e970.fsf@gnu.org> From: pillule To: Eli Zaretskii Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 08 Jun 2021 16:26:51 +0200 In-reply-to: <83wnr4e970.fsf@gnu.org> Message-ID: <87r1hcxw5q.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: pillule , 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; format=flowed Eli Zaretskii writes: >> got them. the last one may be a little bit confusing for the >> reader that is not aware of it because all others defcustoms of >> window.el applies a :group tag. Do you want that I remove the >> others unnecessary ones ? > > Fine with me if you remove them. > > (The patch you sent was the old one, right?) >> [...] > > If that's the case, I suggest to send the patch as an > attachment. My bad the bug was me ;) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0004-User-option-to-select-no-other-window-with-windmove.patch Content-Description: minor nits >From dff7eedd24f5ff85b075b3616fca6c0fa090ff90 Mon Sep 17 00:00:00 2001 From: Trust me I am a doctor Date: Tue, 8 Jun 2021 11:51:55 +0200 Subject: [PATCH] User option to select 'no-other-window with windmove * lisp/windmove.el (windmove-ignore-no-other-window): Add new user option, remove superfluous :group tag. (windmove-find-other-window): Use windmove-ignore-no-other-window to choose whether windmove can access to the window with the 'no-other-window property. (windmove-wrap-around): Remove superfluous :group tag. (windmove-create-window): Remove superfluous :group tag. (windmove-window-distance-delta): Remove superfluous :group tag. (windmove-display-no-select): Remove superfluous :group tag. (windmove-default-keybindings): Remove superfluous :group tag. (windmove-display-default-keybindings): Remove superfluous :group tag. (windmove-delete-default-keybindings): Remove superfluous :group tag. (windmove-swap-states-default-keybindings): Remove superfluous :group tag. --- lisp/windmove.el | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index f558903681..b883824413 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -138,8 +138,7 @@ windmove-wrap-around a frame will find the rightmost one, and similarly for the other directions. The minibuffer is skipped over in up/down movements if it is inactive." - :type 'boolean - :group 'windmove) + :type 'boolean) (defcustom windmove-create-window nil "Whether movement off the edge of the frame creates a new window. @@ -147,7 +146,6 @@ windmove-create-window a frame will create a new window on the left, and similarly for the other directions." :type 'boolean - :group 'windmove :version "27.1") ;; If your Emacs sometimes places an empty column between two adjacent @@ -157,11 +155,18 @@ windmove-window-distance-delta Measured in characters either horizontally or vertically; setting this to a value larger than 1 may be useful in getting around window- placement bugs in old versions of Emacs." - :type 'number - :group 'windmove) + :type 'number) (make-obsolete-variable 'windmove-window-distance-delta "no longer used." "27.1") +(defcustom windmove-move-in-all-windows nil + "Whether the windmove commands are allowed to target all type of windows. +If this variable is set to non-nil, `windmove-find-other-window--side' and +subsequently all interactive windmove commands will ignore the +no-other-window parameter applied with `display-buffer-alist'." + :type 'boolean + :version "28.0.50") + ;; Note: ;; @@ -342,7 +347,8 @@ windmove-find-other-window Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of `window-point'; if positive, use the left or top edge of WINDOW as reference point." - (window-in-direction dir window nil arg windmove-wrap-around t)) + (window-in-direction dir window windmove-move-in-all-windows + arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-find-other-window', or screams if there's no window there. @@ -480,7 +486,6 @@ windmove-default-keybindings (defcustom windmove-display-no-select nil "Whether the window should be selected after displaying the buffer in it." :type 'boolean - :group 'windmove :version "27.1") (defun windmove-display-in-direction (dir &optional arg) @@ -761,8 +766,7 @@ windmove-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-display-default-keybindings nil "Default keybindings for windmove directional buffer display commands. @@ -780,8 +784,7 @@ windmove-display-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-delete-default-keybindings nil "Default keybindings for windmove directional window deletion commands. @@ -796,8 +799,7 @@ windmove-delete-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-swap-states-default-keybindings nil "Default keybindings for windmove's directional window swap-state commands. @@ -812,8 +814,7 @@ windmove-swap-states-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (provide 'windmove) -- 2.20.1 --=-=-= Content-Type: text/plain; format=flowed -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 10:48:56 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 14:48:56 +0000 Received: from localhost ([127.0.0.1]:59519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqd2G-0001FQ-HB for submit@debbugs.gnu.org; Tue, 08 Jun 2021 10:48:56 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:37523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqd2D-0001FB-Na for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 10:48:55 -0400 Received: by mail-wm1-f43.google.com with SMTP id f16-20020a05600c1550b02901b00c1be4abso2157316wmg.2 for <48916@debbugs.gnu.org>; Tue, 08 Jun 2021 07:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=9nu+IPn4byiomSYokwONfQzTVlVfTEhRriu2tFG6RYQ=; b=vS3eztDNPbLmsCmnPr39wklyaAZyE3wE7ea2t9YKhOFK8KfQMwaUHviHLrlA75pK1Q PGg3EJHPwGxQM45bVzllxq21TQ5tVNgGri28PA9YT5Mho92rLSKkQHYnXkA4TOOPbfgC Vd+OZZqhG66a5kS0CcckuSaoglNIWYZMbAVkhJF6r4Xic0xdoUgHP5VQPYfP/f1a/RJf Z/84GWTsYfBg1h5qOBaG8KxEdoGiKPrAcaq9J6hbyXXIM0Uwoiqv7V0/ArH8duqbT900 SIhF6vlUxMn7WTnx8Zno6ABuvzO5H3dEh+hoI4gs69ST3VbmDfSK74vw4zx+cM2J4VMZ EDiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version; bh=9nu+IPn4byiomSYokwONfQzTVlVfTEhRriu2tFG6RYQ=; b=bZ9WDzP8aO+pp9L4K+9103hPZV+i+ogZgTpafSCMU8W8wN6xYk9UBR+s6sHHRMHv0C 3+5hRWRhlpKuntVkcJUACBD/mPIdipxJHnKpjzT1jyodMyEZu5/9xasZnwjRE0LcV7r7 TKpq1RveY+FW7+9SUNHWup2wxYl2HxkrXWcs/LsE92V9DwsL4dGX5s22j4f5exw8YlUW hIYxgQQCp0Hz61xBKKde8dnXNgOGlni6ncA1coMOvta6i33tVAVRLQdtwyM0JTo8Lf+n mMY7E7OALXEIy/koFUe+vE/jHdQwe5MR6qdXdYLItOGkxi3XTdetsE6RU+LKpnWQmphd o1Eg== X-Gm-Message-State: AOAM5306fPhf6E5SwZWP5taZc4+fdPOL3jz2oB3rNDBTRh8sHRCju1Zj Kn48CmT6mJ7GfS4keaQrn9nHB5l5ke4= X-Google-Smtp-Source: ABdhPJyOdM4K3IeCsWxkA0GmcfgmCEqzCbyleZLBE8EbgQCN4dFNy1L6/PQIBowRx+Ep9NiS75pJRg== X-Received: by 2002:a05:600c:251:: with SMTP id 17mr4605017wmj.137.1623163727285; Tue, 08 Jun 2021 07:48:47 -0700 (PDT) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 125sm3557347wmb.34.2021.06.08.07.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 07:48:46 -0700 (PDT) From: Robert Pluim To: pillule Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> <83y2bke98n.fsf@gnu.org> Date: Tue, 08 Jun 2021 16:48:45 +0200 In-Reply-To: <83y2bke98n.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Jun 2021 17:12:08 +0300") Message-ID: <878s3k76pe.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48916 Cc: Eli Zaretskii , 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Tue, 08 Jun 2021 17:12:08 +0300, Eli Zaretskii said: >> From: pillule >> Cc: pillule , 48916@debbugs.gnu.org >> Date: Tue, 08 Jun 2021 15:28:34 +0200 >> >> > This isn't formatted accoring to our rules. In particular, each >> > sentence after the colon should begin with a capital letter and >> > end with a period. See CONTRIBUTE for more details (and I suggest >> > to use Emacs commands for writing log messages, as they will take >> > care of some routine parts of the formatting for you). >> >> So that means you are recommending to use VC instead of Magit >> (that I used) for committing changes ? How you commit is up to you. This is about how to create the commit message. >> Maybe Magit have a something that I am not aware for this purpose >> ? Eli> AFAIK, Magit does have such a command, but don't ask me what it is... 'magit-generate-changelog', which you can run from your Magit commit buffer. It's pretty much the same as C-x 4 A (diff-add-change-log-entries-other-window), which you'd run from a *vc-diff* buffer. The main difference is that C-x 4 A and C-x 4 a will put entries into a ChangeLog file or buffer. Robert -- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 08 12:56:49 2021 Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 16:56:49 +0000 Received: from localhost ([127.0.0.1]:59629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqf20-0006dC-Pj for submit@debbugs.gnu.org; Tue, 08 Jun 2021 12:56:49 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqf1v-0006co-Le for 48916@debbugs.gnu.org; Tue, 08 Jun 2021 12:56:47 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 4C6F21BF206; Tue, 8 Jun 2021 16:56:35 +0000 (UTC) From: Juri Linkov To: pillule Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Organization: LINKOV.NET References: <878s3kzm66.fsf@riseup.net> Date: Tue, 08 Jun 2021 19:46:23 +0300 In-Reply-To: <878s3kzm66.fsf@riseup.net> (pillule@riseup.net's message of "Tue, 08 Jun 2021 12:09:21 +0200") Message-ID: <87fsxscpw4.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: 48916@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> +(defcustom windmove-ignore-no-other-window nil >> >> This name is not the best one. For starters, "ignore-no" is a kind of >> double negation, which makes it harder to understand and remember. >> Can you come up with a better description of what exactly is ignored >> here? > Yes, i think 'windmove-move-in-all-windows' will be more explicit. Repeating words "...move-move..." doesn't look nice. Maybe a better name would be 'windmove-allow-all-windows'. > Because it applies to `windmove-find-other-window', it allows the commands > windmove-right, windmove-left, windmove-down, windmove-up to select windows > with the no-other-window parameter, but not for the `windmove-display-*' > functions. I suppose it is the desired behavior. You could try using new option in all functions that call window-in-direction: in windmove-display-in-direction, in windmove-delete-in-direction, in windmove-swap-states-in-direction. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 06:33:41 2021 Received: (at control) by debbugs.gnu.org; 9 Jun 2021 10:33:41 +0000 Received: from localhost ([127.0.0.1]:60595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqvWm-0001tU-UB for submit@debbugs.gnu.org; Wed, 09 Jun 2021 06:33:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqvWl-0001t6-Rd for control@debbugs.gnu.org; Wed, 09 Jun 2021 06:33:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Brk5DZz7oSVL7+NG3CPPNaWg5mZ0vv8oLt23gRn6Dtw=; b=It543+K90V7R6DmzQlbUCp4H6C C/PAS35caNmbZK/cYYLm0itzuZ91H6NI3d+ePjyeq+ktQXhPhrN7ahQpZobQdS4k8RUYbNYbREc8K PSf4enxpVcZO3AS6iTvlZu0JN8YgzfRle7k0z3P0/Bv14SpHSPEBoJDoplalHgjZgNV4=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqvWe-0002um-Ei for control@debbugs.gnu.org; Wed, 09 Jun 2021 12:33:34 +0200 Date: Wed, 09 Jun 2021 12:33:32 +0200 Message-Id: <874ke7l43n.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #48916 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 48916 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 48916 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 14:57:10 2021 Received: (at 48916) by debbugs.gnu.org; 9 Jun 2021 18:57:10 +0000 Received: from localhost ([127.0.0.1]:34698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr3O2-0005h7-4D for submit@debbugs.gnu.org; Wed, 09 Jun 2021 14:57:10 -0400 Received: from mx1.riseup.net ([198.252.153.129]:56068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr3Nz-0005gu-PR for 48916@debbugs.gnu.org; Wed, 09 Jun 2021 14:57:08 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4G0bv21RnlzDqlB; Wed, 9 Jun 2021 11:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623265022; bh=Xhv4OSQr5xKoFLgW0ijYntB4iyFzEFpm47uTAwaE8yg=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=l0OFlT/yyo8IRXpeW69Pl8o693frshYzA/p88r/Sa0e1ClAORpBpHITeu//0bzG5O ySd/sPHh505akmB3SqR6phStrWoF99+AbnTQ8M7pUQZkV46rE/qMZVuyk//WnZ9d51 lEhIRotWuqX1Q/JjKmaK2MG5tlwmFwlAwZ/lW/J8= X-Riseup-User-ID: 76A7FD06DFC53444448192DA7C301690626237C320C0344DB1FED25384A13CEF Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4G0bty4WMgz5vSN; Wed, 9 Jun 2021 11:56:58 -0700 (PDT) References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> <83y2bke98n.fsf@gnu.org> <878s3k76pe.fsf@gmail.com> From: pillule To: Robert Pluim Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Wed, 09 Jun 2021 19:37:15 +0200 In-reply-to: <878s3k76pe.fsf@gmail.com> Message-ID: <87mtryj28g.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: pillule , Eli Zaretskii , 48916@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; format=flowed Robert Pluim writes: > >> Maybe Magit have a something that I am not aware for this > >> purpose > >> ? > > Eli> AFAIK, Magit does have such a command, but don't ask me > what it is... > > 'magit-generate-changelog', which you can run from your Magit > commit > buffer. It's pretty much the same as C-x 4 A > (diff-add-change-log-entries-other-window), which you'd run from > a > *vc-diff* buffer. The main difference is that C-x 4 A and C-x 4 > a will > put entries into a ChangeLog file or buffer. Thanks you for the guidance, I think I would have had difficulties to find it myself because it seems dependant of the context (at least the magit one) and I couldn't find them directly with eg 'helpfull-function'. However it don't seems to always works and another annoyance but it is another topic. Very much appreciated. Juri Linkov writes: >>>> +(defcustom windmove-ignore-no-other-window nil >>> >>> This name is not the best one. For starters, "ignore-no" is a >>> kind of >>> double negation, which makes it harder to understand and >>> remember. >>> Can you come up with a better description of what exactly is >>> ignored >>> here? > >> Yes, i think 'windmove-move-in-all-windows' will be more >> explicit. > > Repeating words "...move-move..." doesn't look nice. Maybe a > better name > would be 'windmove-allow-all-windows'. That is better, indeed, thank you. >> Because it applies to `windmove-find-other-window', it allows >> the commands >> windmove-right, windmove-left, windmove-down, windmove-up to >> select windows >> with the no-other-window parameter, but not for the >> `windmove-display-*' >> functions. I suppose it is the desired behavior. > > You could try using new option in all functions that call > window-in-direction: > in windmove-display-in-direction, in > windmove-delete-in-direction, > in windmove-swap-states-in-direction. Done. I am in terra incognita for theses commands, The opportunity to add new keybindings in my configuration is always nice :p It was really simple and my tests seems to works fine with 'windmove-allow-all-windows' for all functions. See the patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0005-User-option-to-select-no-other-window-with-windmove.patch Content-Description: windmove-allow-all-windows >From f1e8eb238305b4c956fe3dc02edfa96bdbcb67c6 Mon Sep 17 00:00:00 2001 From: Trust me I am a doctor Date: Tue, 8 Jun 2021 11:51:55 +0200 Subject: [PATCH] User option to select 'no-other-window with windmove * lisp/windmove.el (windmove-wrap-around): Remove superfluous :group tag. (windmove-create-window): Remove superfluous :group tag. (windmove-window-distance-delta): Remove superfluous :group tag. (windmove-allow-all-windows): Add new user option to allow the commands of windmove to target windows with the 'no-other-window parameter. (windmove-find-other-window): Use windmove-allow-all-windows. (windmove-display-no-select): Remove superfluous :group tag. (windmove-display-in-direction): Use windmove-allow-all-windows. (windmove-delete-in-direction): Use windmove-allow-all-windows. (windmove-swap-states-in-direction): Use windmove-allow-all-windows. (windmove-default-keybindings): Remove superfluous :group tag. (windmove-display-default-keybindings): Remove superfluous :group tag. (windmove-delete-default-keybindings): Remove superfluous :group tag. (windmove-swap-states-default-keybindings): Remove superfluous :group tag. --- lisp/windmove.el | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index f558903681..8ba1242519 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -138,8 +138,7 @@ windmove-wrap-around a frame will find the rightmost one, and similarly for the other directions. The minibuffer is skipped over in up/down movements if it is inactive." - :type 'boolean - :group 'windmove) + :type 'boolean) (defcustom windmove-create-window nil "Whether movement off the edge of the frame creates a new window. @@ -147,7 +146,6 @@ windmove-create-window a frame will create a new window on the left, and similarly for the other directions." :type 'boolean - :group 'windmove :version "27.1") ;; If your Emacs sometimes places an empty column between two adjacent @@ -157,11 +155,18 @@ windmove-window-distance-delta Measured in characters either horizontally or vertically; setting this to a value larger than 1 may be useful in getting around window- placement bugs in old versions of Emacs." - :type 'number - :group 'windmove) + :type 'number) (make-obsolete-variable 'windmove-window-distance-delta "no longer used." "27.1") +(defcustom windmove-allow-all-windows nil + "Whether the windmove commands are allowed to target all type of windows. +If this variable is set to non-nil, `windmove-find-other-window--side' and +subsequently all interactive windmove commands will ignore the +no-other-window parameter applied with `display-buffer-alist'." + :type 'boolean + :version "28.0.50") + ;; Note: ;; @@ -342,7 +347,8 @@ windmove-find-other-window Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of `window-point'; if positive, use the left or top edge of WINDOW as reference point." - (window-in-direction dir window nil arg windmove-wrap-around t)) + (window-in-direction dir window windmove-allow-all-windows + arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-find-other-window', or screams if there's no window there. @@ -480,7 +486,6 @@ windmove-default-keybindings (defcustom windmove-display-no-select nil "Whether the window should be selected after displaying the buffer in it." :type 'boolean - :group 'windmove :version "27.1") (defun windmove-display-in-direction (dir &optional arg) @@ -517,7 +522,7 @@ windmove-display-in-direction ((eq dir 'same-window) (selected-window)) (t (window-in-direction - dir nil nil + dir nil windmove-allow-all-windows (and arg (prefix-numeric-value arg)) windmove-wrap-around 'nomini))))) (unless window @@ -606,8 +611,8 @@ windmove-delete-in-direction select the window at direction DIR. When `windmove-wrap-around' is non-nil, takes the window from the opposite side of the frame." - (let ((other-window (window-in-direction dir nil nil arg - windmove-wrap-around 'nomini))) + (let ((other-window (window-in-direction dir nil windmove-allow-all-windows + arg windmove-wrap-around 'nomini))) (cond ((null other-window) (user-error "No window %s from selected window" dir)) (t @@ -680,8 +685,8 @@ windmove-swap-states-in-direction "Swap the states of the selected window and the window at direction DIR. When `windmove-wrap-around' is non-nil, takes the window from the opposite side of the frame." - (let ((other-window (window-in-direction dir nil nil nil - windmove-wrap-around 'nomini))) + (let ((other-window (window-in-direction dir nil windmove-allow-all-windows + nil windmove-wrap-around 'nomini))) (cond ((or (null other-window) (window-minibuffer-p other-window)) (user-error "No window %s from selected window" dir)) (t @@ -761,8 +766,7 @@ windmove-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-display-default-keybindings nil "Default keybindings for windmove directional buffer display commands. @@ -780,8 +784,7 @@ windmove-display-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-delete-default-keybindings nil "Default keybindings for windmove directional window deletion commands. @@ -796,8 +799,7 @@ windmove-delete-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-swap-states-default-keybindings nil "Default keybindings for windmove's directional window swap-state commands. @@ -812,8 +814,7 @@ windmove-swap-states-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (provide 'windmove) -- 2.20.1 --=-=-= Content-Type: text/plain; format=flowed As a side note, while reading these commands, I think 'windmove-display-same-window', 'windmove-display-new-frame', 'windmove-display-new-tab' are not really at they own place in windmove. We have already "C-x 4 1" (same-window-prefix) and "C-x 5 5" (other-frame-prefix) and (other-tab-prefix) --that is not bound to any key on my system but would eventually have its place in the "C-x t" map. Should we --for these windmove-commands : 1. keep them as they are 2. make aliases and clean-up 'windmove-display-in-direction' 3. delete them and clean-up 'windmove-display-in-direction' ? Since it becomes to get off the topic with the removal of the :group tag, I can start another patch "clean-up" if requested. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 16:14:53 2021 Received: (at 48916) by debbugs.gnu.org; 9 Jun 2021 20:14:53 +0000 Received: from localhost ([127.0.0.1]:34737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr4bF-0007cJ-9t for submit@debbugs.gnu.org; Wed, 09 Jun 2021 16:14:53 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr4bD-0007c6-23 for 48916@debbugs.gnu.org; Wed, 09 Jun 2021 16:14:51 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 066F31C0004; Wed, 9 Jun 2021 20:14:43 +0000 (UTC) From: Juri Linkov To: pillule Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Organization: LINKOV.NET References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> <83y2bke98n.fsf@gnu.org> <878s3k76pe.fsf@gmail.com> <87mtryj28g.fsf@riseup.net> Date: Wed, 09 Jun 2021 23:13:04 +0300 In-Reply-To: <87mtryj28g.fsf@riseup.net> (pillule@riseup.net's message of "Wed, 09 Jun 2021 19:37:15 +0200") Message-ID: <87lf7ibxxf.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: Robert Pluim , 48916@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> You could try using new option in all functions that call >> window-in-direction: >> in windmove-display-in-direction, in windmove-delete-in-direction, >> in windmove-swap-states-in-direction. > > Done. > I am in terra incognita for theses commands, The opportunity to add new > keybindings in my configuration is always nice :p > > It was really simple and my tests seems to works fine with > 'windmove-allow-all-windows' for all functions. > > See the patch attached. Thanks, now it's much better. > As a side note, while reading these commands, > > I think 'windmove-display-same-window', 'windmove-display-new-frame', > 'windmove-display-new-tab' are not really at they own place in windmove. > > We have already "C-x 4 1" (same-window-prefix) and "C-x 5 5" > (other-frame-prefix) and (other-tab-prefix) --that is not bound to any > key on my system but would eventually have its place in the "C-x t" map. It's very strange that your configuration has unbound other-tab-prefix. By default, it's bound to 'C-x t t'. > Should we --for these windmove-commands : > 1. keep them as they are > 2. make aliases and clean-up 'windmove-display-in-direction' > 3. delete them and clean-up 'windmove-display-in-direction' > ? Please keep them as they are. It's very convenient to bind these commands to use the same prefix keys that are configured by windmove customization (that was greatly improved recently!) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 10 11:01:28 2021 Received: (at 48916) by debbugs.gnu.org; 10 Jun 2021 15:01:28 +0000 Received: from localhost ([127.0.0.1]:37555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrMBU-0000td-Iy for submit@debbugs.gnu.org; Thu, 10 Jun 2021 11:01:28 -0400 Received: from mx1.riseup.net ([198.252.153.129]:56726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrMBS-0000tP-ET for 48916@debbugs.gnu.org; Thu, 10 Jun 2021 11:01:26 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4G16cc6wqGzDrC1; Thu, 10 Jun 2021 08:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623337281; bh=99Q6O0dZvLVzf/ohko5IIg/94Y3YzzMdW692DE/KatI=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=HQ4Ay+WrcXvRgf8JDof4ILIDV+3qnLuQ626ggyJk/P+VoUIfLBKzb0P+ynsIuIt1p uqpCAkhz3d/n2JM7sbrHzsfsVcrGchttI8aqqXj06qq1DYz4y6TPKLznWL6wSjNTqA 5INe/6Lkz+YSaHMbPAE1lRBk7UmrFXjgYakU4xaU= X-Riseup-User-ID: 242F4DBA05ED4E13C95C415E3376E9C8A1A4BBB00228C5A546F4E87D6A6B35DC Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4G16cY6f1fz5vcH; Thu, 10 Jun 2021 08:01:17 -0700 (PDT) References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> <83y2bke98n.fsf@gnu.org> <878s3k76pe.fsf@gmail.com> <87mtryj28g.fsf@riseup.net> <87lf7ibxxf.fsf@mail.linkov.net> From: pillule To: Juri Linkov Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Thu, 10 Jun 2021 10:58:11 +0200 Message-ID: <87a6nyks9y.fsf@riseup.net> In-reply-to: <87lf7ibxxf.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 48916 Cc: pillule , Robert Pluim , 48916@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Juri Linkov writes: >> Should we --for these windmove-commands : >> 1. keep them as they are >> 2. make aliases and clean-up 'windmove-display-in-direction' >> 3. delete them and clean-up 'windmove-display-in-direction' >> ? > > Please keep them as they are. It's very convenient > to bind these commands to use the same prefix keys > that are configured by windmove customization > (that was greatly improved recently!) Ok fine. -- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 15 16:00:33 2021 Received: (at 48916) by debbugs.gnu.org; 15 Jun 2021 20:00:33 +0000 Received: from localhost ([127.0.0.1]:50906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltFEe-0001sb-DW for submit@debbugs.gnu.org; Tue, 15 Jun 2021 16:00:33 -0400 Received: from mx1.riseup.net ([198.252.153.129]:42402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltFEb-0001sL-J5 for 48916@debbugs.gnu.org; Tue, 15 Jun 2021 16:00:30 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4G4K1M2SczzDsDk; Tue, 15 Jun 2021 13:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623787224; bh=nqPPhkPrkNUyRem4P4U2Ah4MZ8C2ITerJyPtzQMlb/8=; h=From:To:Cc:Subject:Date:From; b=gMVrr6C8AjHnsLt8MbBeKyBrzpgPYpp1l6ayJBKaslnvJq7pf2ZmYCUSj23UFqhLG VU3lXaCjwXjboLSXX8R0WehS8IORFiHqQzIuTwku4gnPDoe4K+c7MLhjWRf5+9TV0C c6U32Fml/0wTFtGX34cH1yp9+wmvt639l3/1iRvE= X-Riseup-User-ID: B2A0E9BD6236C500226D00D9B73286CD64B64F4E96A812C89F24F1A1526DA167 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4G4K1J4bqzz5vY3; Tue, 15 Jun 2021 13:00:20 -0700 (PDT) From: pillule To: pillule Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 15 Jun 2021 21:50:03 +0200 Message-ID: <87o8c6525z.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: Robert Pluim , 48916@debbugs.gnu.org, Eli Zaretskii , Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> <87zgw0xxya.fsf@riseup.net> <83y2bke98n.fsf@gnu.org> <878s3k76pe.fsf@gmail.com> <87mtryj28g.fsf@riseup.net> <87lf7ibxxf.fsf@mail.linkov.net> <87a6nyks9y.fsf@riseup.net> User-agent: mu4e 1.5.11; emacs 28.0.50 In-reply-to: <87a6nyks9y.fsf@riseup.net> pillule writes: > Juri Linkov writes: > >>> Should we --for these windmove-commands : >>> 1. keep them as they are >>> 2. make aliases and clean-up 'windmove-display-in-direction' >>> 3. delete them and clean-up 'windmove-display-in-direction' >>> ? >> >> Please keep them as they are. It's very convenient >> to bind these commands to use the same prefix keys >> that are configured by windmove customization >> (that was greatly improved recently!) > > Ok fine. Hi, here the patch for this one with v28.1 and an updated docstring. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0003-User-option-to-select-no-other-window-with-windmove-.patch Content-Description: user-option for no-other-window >From e1052bbfb919e9988b14a12e136dfebac86521f1 Mon Sep 17 00:00:00 2001 From: Trust me I am a doctor Date: Tue, 8 Jun 2021 11:51:55 +0200 Subject: [PATCH] User-option to select 'no-other-window' with windmove (bug#48916) * lisp/windmove.el (windmove-wrap-around): Remove superfluous :group tag. (windmove-create-window): Remove superfluous :group tag. (windmove-window-distance-delta): Remove superfluous :group tag. (windmove-allow-all-windows): Add new user option to allow the commands of windmove to target windows with the 'no-other-window parameter. (windmove-find-other-window): Use windmove-allow-all-windows. (windmove-display-no-select): Remove superfluous :group tag. (windmove-display-in-direction): Use windmove-allow-all-windows. (windmove-delete-in-direction): Use windmove-allow-all-windows. (windmove-swap-states-in-direction): Use windmove-allow-all-windows. (windmove-default-keybindings): Remove superfluous :group tag. (windmove-display-default-keybindings): Remove superfluous :group tag. (windmove-delete-default-keybindings): Remove superfluous :group tag. (windmove-swap-states-default-keybindings): Remove superfluous :group tag. --- lisp/windmove.el | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/lisp/windmove.el b/lisp/windmove.el index f558903681..3df4a01116 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -138,8 +138,7 @@ windmove-wrap-around a frame will find the rightmost one, and similarly for the other directions. The minibuffer is skipped over in up/down movements if it is inactive." - :type 'boolean - :group 'windmove) + :type 'boolean) (defcustom windmove-create-window nil "Whether movement off the edge of the frame creates a new window. @@ -147,7 +146,6 @@ windmove-create-window a frame will create a new window on the left, and similarly for the other directions." :type 'boolean - :group 'windmove :version "27.1") ;; If your Emacs sometimes places an empty column between two adjacent @@ -157,11 +155,18 @@ windmove-window-distance-delta Measured in characters either horizontally or vertically; setting this to a value larger than 1 may be useful in getting around window- placement bugs in old versions of Emacs." - :type 'number - :group 'windmove) + :type 'number) (make-obsolete-variable 'windmove-window-distance-delta "no longer used." "27.1") +(defcustom windmove-allow-all-windows nil + "Whether the windmove commands are allowed to target all type of windows. +If this variable is set to non-nil, all windmove commmands will +ignore the no-other-window parameter applied by `display-buffer-alist' +or `set-window-parameter'." + :type 'boolean + :version "28.1") + ;; Note: ;; @@ -342,7 +347,8 @@ windmove-find-other-window Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of `window-point'; if positive, use the left or top edge of WINDOW as reference point." - (window-in-direction dir window nil arg windmove-wrap-around t)) + (window-in-direction dir window windmove-allow-all-windows + arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-find-other-window', or screams if there's no window there. @@ -480,7 +486,6 @@ windmove-default-keybindings (defcustom windmove-display-no-select nil "Whether the window should be selected after displaying the buffer in it." :type 'boolean - :group 'windmove :version "27.1") (defun windmove-display-in-direction (dir &optional arg) @@ -517,7 +522,7 @@ windmove-display-in-direction ((eq dir 'same-window) (selected-window)) (t (window-in-direction - dir nil nil + dir nil windmove-allow-all-windows (and arg (prefix-numeric-value arg)) windmove-wrap-around 'nomini))))) (unless window @@ -606,8 +611,8 @@ windmove-delete-in-direction select the window at direction DIR. When `windmove-wrap-around' is non-nil, takes the window from the opposite side of the frame." - (let ((other-window (window-in-direction dir nil nil arg - windmove-wrap-around 'nomini))) + (let ((other-window (window-in-direction dir nil windmove-allow-all-windows + arg windmove-wrap-around 'nomini))) (cond ((null other-window) (user-error "No window %s from selected window" dir)) (t @@ -680,8 +685,8 @@ windmove-swap-states-in-direction "Swap the states of the selected window and the window at direction DIR. When `windmove-wrap-around' is non-nil, takes the window from the opposite side of the frame." - (let ((other-window (window-in-direction dir nil nil nil - windmove-wrap-around 'nomini))) + (let ((other-window (window-in-direction dir nil windmove-allow-all-windows + nil windmove-wrap-around 'nomini))) (cond ((or (null other-window) (window-minibuffer-p other-window)) (user-error "No window %s from selected window" dir)) (t @@ -761,8 +766,7 @@ windmove-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-display-default-keybindings nil "Default keybindings for windmove directional buffer display commands. @@ -780,8 +784,7 @@ windmove-display-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-delete-default-keybindings nil "Default keybindings for windmove directional window deletion commands. @@ -796,8 +799,7 @@ windmove-delete-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (defcustom windmove-swap-states-default-keybindings nil "Default keybindings for windmove's directional window swap-state commands. @@ -812,8 +814,7 @@ windmove-swap-states-default-keybindings (null val)) (set-default sym val)) :type windmove--default-keybindings-type - :version "28.1" - :group 'windmove) + :version "28.1") (provide 'windmove) -- 2.20.1 --=-=-= Content-Type: text/plain -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 15 19:33:41 2021 Received: (at 48916) by debbugs.gnu.org; 15 Jun 2021 23:33:41 +0000 Received: from localhost ([127.0.0.1]:51052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltIYv-00078Q-HE for submit@debbugs.gnu.org; Tue, 15 Jun 2021 19:33:41 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltIYu-000785-8r; Tue, 15 Jun 2021 19:33:40 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2E48860004; Tue, 15 Jun 2021 23:33:31 +0000 (UTC) From: Juri Linkov To: pillule Subject: Re: bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Organization: LINKOV.NET References: <87o8c6525z.fsf@riseup.net> Date: Wed, 16 Jun 2021 02:27:29 +0300 In-Reply-To: <87o8c6525z.fsf@riseup.net> (pillule@riseup.net's message of "Tue, 15 Jun 2021 21:50:03 +0200") Message-ID: <87k0mulndq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48916 Cc: Robert Pluim , 48916@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 48916 fixed close 48916 28.0.50 thanks >> Ok fine. > > Hi, here the patch for this one with v28.1 and an updated docstring. Thanks for the patch, now it's pushed. From unknown Sat Aug 16 11:33:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 14 Jul 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator