all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Roland Winkler" <winkler@gnu.org>
To: emacs-devel@gnu.org
Subject: Popping up a custom-shaped window compatible with quit-window
Date: Sat, 10 Nov 2012 16:05:03 -0600	[thread overview]
Message-ID: <20638.53135.511315.127514@gargle.gargle.HOWL> (raw)

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	other threads:[~2012-11-10 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 22:05 Roland Winkler [this message]
2012-11-12  9:58 ` Popping up a custom-shaped window compatible with quit-window martin rudalics
2012-11-13  2:41   ` Roland Winkler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20638.53135.511315.127514@gargle.gargle.HOWL \
    --to=winkler@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.