[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: new default bindings for winner and windmove
From: |
Boruch Baum |
Subject: |
Re: Proposal: new default bindings for winner and windmove |
Date: |
Sun, 22 Aug 2021 03:37:43 -0400 |
User-agent: |
NeoMutt/20180716 |
> From: Eli Zaretskii
> Date: Sun, 22 Aug 2021 09:02:23 +0300
>
> > From: Arthur Miller <arthur.miller@live.com>
> > Date: Sat, 21 Aug 2021 22:20:22 +0200
> >
> > > I'm actually surprised they have key bindings. How frequently do you
> > > undo/redo window configuration changes?
> > You obviously don't need to call help functions as often as I :).
Adding myself to the list of people who use winner-mode often and are
happy with the keybinding status quo.
> > It is handy to restore back windows after
> > ...
+1
> My solution to the "window configuration issue" is to keep several
> frames, one each for different tasks. Each frame has windows arranged
> as appropriate for that task, and that configuration rarely if ever
> changes.
As a case in point, I found `ediff' mode very frustrating in that upon
quitting, it would always leave me with an undesirable window
configuration, and I never figured out how to *reliably* automate using
`winner-undo' for that situation. What did work was what you're
suggesting:
(defun my-ediff-pre ()
"Stuff to perform before starting any `ediff' session.
Meant to be an entry in variable `ediff-before-setup-hook'."
(make-frame-command)
(set-frame-name "ediff"))
(defun my-ediff-post ()
"Stuff to perform after exiting any `ediff' session.
Meant to be an entry in variable `ediff-quit-hook'."
(condition-case nil
(progn
(select-frame-by-name "ediff")
(delete-frame))))
(add-hook 'ediff-before-setup-hook #'my-ediff-pre)
(add-hook 'ediff-quit-hook #'my-ediff-post 100)
IMO, this should be considered as a default setup for ediff, and the
notion of defaulting to a dedicated frame for certain other specific
tasks should be considered (eg. calendar/diary). BTW, I do this with
packages diredc and crossword.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0