bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48917: 28.0.50; allow user to choose what function is used when wind


From: pillule
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


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.

Attachment: 0001-User-option-to-choose-a-function-triggered-by-windmo.patch
Description: allow user to choose what function is used when windmove create a window


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.

Attachment: dired-side-window.tar.gz
Description: moirai early stage


reply via email to

[Prev in Thread] Current Thread [Next in Thread]