GNU bug report logs - #48916
28.0.50; allow windmove to select windows with the 'no-other-window parameter

Previous Next

Package: emacs;

Reported by: pillule <pillule <at> riseup.net>

Date: Tue, 8 Jun 2021 10:28:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 48916 <at> debbugs.gnu.org (full text, mbox):

From: pillule <pillule <at> riseup.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: pillule <pillule <at> riseup.net>, Eli Zaretskii <eliz <at> gnu.org>,
 48916 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
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
[Message part 1 (text/plain, inline)]
Robert Pluim <rpluim <at> gmail.com> 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 <juri <at> linkov.net> 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.

[0005-User-option-to-select-no-other-window-with-windmove.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
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.

This bug report was last modified 4 years and 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.