emacs-devel
[Top][All Lists]
Advanced

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

Popping up a custom-shaped window compatible with quit-window


From: Roland Winkler
Subject: Popping up a custom-shaped window compatible with quit-window
Date: Sat, 10 Nov 2012 16:05:03 -0600

BBDB uses the function bbdb-pop-up-window whenever it needs to pop
up a BBDB buffer. This function implements some hackery to make sure
that the BBDB window appears with a custom size where the user
expects it to be. Yet the algorithm is not compatible with
quit-window: If BBDB splits an existing window to display the BBDB
window, quit-window applied to the newly created BBDB window does
not restore the old window configuration (as it is the case when
pop-to-buffer splits a window).

What is the best way to achieve compatibility with quit-window?
Unfortunately, I do not know too much about the details of how emacs
is doing these things. While I have recently cleaned up BBDB
(including the code of bbdb-pop-up-window), the underlying algorithm
used by bbdb-pop-up-window is still the same that BBDB has used for
many years. Possibly the whole approach implemented in
bbdb-pop-up-window is not quite compatible anymore with how this
should be implemented nowadays. Or there is a simple solution to the
quit-window problem that I just do not know about.

I browsed through the long thread of Emacs Bug#1806, which is kind
of related, in the sense that BBDB wants to pop up its window such
that the new window "fits best" into the overall window layout of
the frame. Yet this thread left me clueless.

Any comments or suggestions are appreciated.


BBDB is available at
http://savannah.nongnu.org/projects/bbdb/
To check it out, use
git clone git://git.savannah.nongnu.org/bbdb.git



reply via email to

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