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#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter Date: Tue, 08 Jun 2021 14:44:14 +0300 Message-ID: <83czswfunl.fsf@gnu.org> References: <878s3kzm66.fsf@riseup.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48916@debbugs.gnu.org To: pillule Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 13:45:15 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 1lqaAV-0002Eg-Mp for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 13:45:15 +0200 Original-Received: from localhost ([::1]:37574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqaAU-0006nM-PL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 07:45:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqaAI-0006mP-DL for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 07:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqaAI-0003lb-6B for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 07:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqaAI-0004OX-4C for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 07:45: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: Tue, 08 Jun 2021 11:45:02 +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.162315268416854 (code B ref 48916); Tue, 08 Jun 2021 11:45:02 +0000 Original-Received: (at 48916) by debbugs.gnu.org; 8 Jun 2021 11:44:44 +0000 Original-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 Original-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 Original-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 Original-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 In-Reply-To: <878s3kzm66.fsf@riseup.net> (message from pillule on Tue, 08 Jun 2021 12:09:21 +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" Xref: news.gmane.io gmane.emacs.bugs:208222 Archived-At: > 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.