From: pillule <pillule@riseup.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: pillule <pillule@riseup.net>, 48916@debbugs.gnu.org
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 [thread overview]
Message-ID: <87zgw0xxya.fsf@riseup.net> (raw)
In-Reply-To: <83czswfunl.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2402 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks. I don't use windmove, so I will let others comment.
> But
> please allow me a few minor nits:
Your ‘minor nits’ are indeed welcome.
>> * 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).
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
?
>> +(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.
>> + "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.
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 ?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minor nits --]
[-- Type: text/x-diff, Size: 1783 bytes --]
From 8997dcd61e68cb0cd6251987fbc8c291ef0c7bbe Mon Sep 17 00:00:00 2001
From: Trust me I am a doctor <pillule@riseup.net>
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)
+
\f
;; 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
[-- Attachment #3: Type: text/plain, Size: 4 bytes --]
--
next prev parent reply other threads:[~2021-06-08 13:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 10:09 bug#48916: 28.0.50; allow windmove to select windows with the 'no-other-window parameter pillule
2021-06-08 11:44 ` Eli Zaretskii
2021-06-08 13:28 ` pillule [this message]
2021-06-08 14:12 ` Eli Zaretskii
2021-06-08 14:48 ` Robert Pluim
2021-06-09 17:37 ` pillule
2021-06-09 20:13 ` Juri Linkov
2021-06-10 8:58 ` pillule
2021-06-08 13:57 ` pillule
2021-06-08 14:13 ` Eli Zaretskii
2021-06-08 14:26 ` pillule
2021-06-08 16:46 ` Juri Linkov
2021-06-15 19:50 ` pillule
2021-06-15 23:27 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgw0xxya.fsf@riseup.net \
--to=pillule@riseup.net \
--cc=48916@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).