From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pillule Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <87zgw0xxya.fsf@riseup.net> References: <878s3kzm66.fsf@riseup.net> <83czswfunl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35844"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pillule , 48916@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 15:56:10 2021 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 1lqcDB-00092p-9l for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 15:56:09 +0200 Original-Received: from localhost ([::1]:36932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqcDA-0005yk-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 09:56:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqcD4-0005yW-PP for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 09:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqcD4-0001cs-J4 for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 09:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqcD3-0008DP-R7 for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 09:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: pillule Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jun 2021 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48916 X-GNU-PR-Package: emacs Original-Received: via spool by 48916-submit@debbugs.gnu.org id=B48916.162316056031572 (code B ref 48916); Tue, 08 Jun 2021 13:56:01 +0000 Original-Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 13:56:00 +0000 Original-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 Original-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 Original-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 Original-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) In-reply-to: <83czswfunl.fsf@gnu.org> 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" Xref: news.gmane.io gmane.emacs.bugs:208238 Archived-At: --=-=-= 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 -- --=-=-=--