GNU bug report logs - #48917
28.0.50; allow user to choose what function is used when windmove create a window

Previous Next

Package: emacs;

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

Date: Tue, 8 Jun 2021 11:00: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


View this message in rfc822 format

From: pillule <pillule <at> riseup.net>
To: 48917 <at> debbugs.gnu.org
Subject: bug#48917: 28.0.50; allow user to choose what function is used when windmove create a window
Date: Tue, 08 Jun 2021 12:31:58 +0200
[Message part 1 (text/plain, inline)]
Hi,

This is not directly related to bug#48916 but nonetheless derive 
from a same logic of window management.

Actually the user can choose if windmove will create a window when 
it encounter the edges of the frame. I propose to let the user 
eventually provides instead a function that will be triggered in 
that case.

The function will receive as arguments the `dir' and `window' 
bindings of `windmove-do-window-select' so it can adapt its 
behavior accordingly.

The simplest use case I found for this feature is to creates a 
dispatch function that choose from the direction to display eg, a 
dired side window on the left, a shell side window on the top, a 
message side window on the bottom, another thing on the right ; 
and that act as a toggle, eg :

windmove-left : creates a dired side window
windmove-left again : delete the dired side window

From here the function can be tuned again to behave differently in 
different contexts with eg, a local binding or by inspecting the 
WINDOW argument.

[0001-User-option-to-choose-a-function-triggered-by-windmo.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
The second attachment is a library I am currently working on that 
implement a functional dired side window and its windmove bindings 
in 200 loc, so you can eventually try it and feel what I am 
requesting.
I wrote it for testing purposes for bug#48493 so some of its 
functionalities relies on fixes that are not yet available, and it 
is less about dired in a side window than implementing local 
bindings on couples of buffer/windows.

[dired-side-window.tar.gz (application/gzip, attachment)]

This bug report was last modified 3 years and 343 days ago.

Previous Next


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