From: martin rudalics <rudalics@gmx.at>
To: Leo Liu <sdl.web@gmail.com>
Cc: 16038@debbugs.gnu.org
Subject: bug#16038: 24.3; latest change to with-help-window makes temp-buffer-browse useless
Date: Sat, 11 Jan 2014 16:41:27 +0100 [thread overview]
Message-ID: <52D16627.4080604@gmx.at> (raw)
In-Reply-To: <m1a9f2vbbw.fsf@gmail.com>
> with-output-to-temp-buffer usually are used to show useful text.
> with-temp-buffer-window is sometimes used to show temporary text such as
> used by dired to show a list of marked files.
IIRC my primary purpose writing `with-temp-buffer-window' was to get
`with-help-window' right and this does not necessarily show temporary
text.
> Certainly I can put a hook
> temp-buffer-window-show-hook but then I also need to opt out those
> temporary cases.
You would have had to do this anyway: Earlier there was only
`with-output-to-temp-buffer' and so the marked files of dired would have
been shown with `with-output-to-temp-buffer' instead. I suppose we use
`with-temp-buffer-window' now because this allows us to "quit" the
window easier.
> And it seems temp-buffer-resize-mode is now
> unnecessarily coupled with the window.el code, i.e. if we were to move
> temp-buffer-resize-mode to a standalone package it won't work without
> help from window.el.
`temp-buffer-resize-mode' which uses `resize-temp-buffer-window' is
still in help.el although it doesn't really belong there. And
`resize-temp-buffer-window' calls `fit-window-to-buffer' which is
inherently tied to the window code. So the core of
`temp-buffer-resize-mode' was with the window resizing code ever since.
> The more interesting question is is it possible to merge these two
> macros? For example, will it work if we can re-design the first argument
> of with-output-to-temp-buffer to accept a list (BUFFER-OR-NAME ACTION
> QUIT-FUNCTION) or an atom BUFFER-OR-NAME?
I'd rather get rid of `with-output-to-temp-buffer' ;-)
If you look into our mail archives, you should find a couple of
complaints about `with-output-to-temp-buffer' putting the buffer in
`help-mode' (via `temp-buffer-setup-hook') and the like. I tried to
avoid these when I wrote `with-temp-buffer-window'.
Assume two applications A and B: A expects `with-output-to-temp-buffer'
to put the buffer in `help-mode'. B wants to avoid that the buffer is
put in `help-mode'. I can offer B to use `with-temp-buffer-window'
instead while A can continue to work as usual. Eventually I'd like A to
use `with-temp-buffer-window' too and put the buffer in `help-mode'
itself. But there were too many `with-output-to-temp-buffer' calls in
the code base and I was not able to look into them.
martin
next prev parent reply other threads:[~2014-01-11 15:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 14:34 bug#16038: 24.3; latest change to with-help-window makes temp-buffer-browse useless Leo Liu
2014-01-11 14:01 ` martin rudalics
2014-01-11 14:32 ` Leo Liu
2014-01-11 15:41 ` martin rudalics [this message]
2014-01-11 16:31 ` Leo Liu
2014-01-12 9:53 ` martin rudalics
2014-01-14 0:23 ` Leo Liu
2014-01-14 1:47 ` Stefan Monnier
2014-01-14 4:42 ` Leo Liu
2014-01-14 21:38 ` Stefan Monnier
2014-01-14 21:55 ` Drew Adams
2014-01-14 23:46 ` Leo Liu
2014-01-22 2:14 ` Leo Liu
2014-01-22 3:02 ` Stefan Monnier
2014-01-22 3:32 ` Leo Liu
2014-01-22 13:44 ` Stefan Monnier
2014-01-23 10:03 ` Leo Liu
2014-01-23 17:48 ` Drew Adams
2014-01-24 7:30 ` Leo Liu
2014-01-24 15:06 ` Drew Adams
2014-01-24 15:45 ` martin rudalics
2014-01-24 16:29 ` Drew Adams
2014-01-25 9:21 ` martin rudalics
2014-01-25 16:34 ` Drew Adams
2014-01-25 16:48 ` martin rudalics
2014-01-25 17:33 ` Drew Adams
2014-01-25 18:25 ` martin rudalics
2014-01-25 20:19 ` Drew Adams
2014-01-26 11:24 ` martin rudalics
2014-01-26 17:52 ` Drew Adams
2014-01-27 8:21 ` martin rudalics
2014-01-27 15:14 ` Drew Adams
2014-01-22 3:07 ` Glenn Morris
2014-07-08 1:54 ` Glenn Morris
2014-07-08 2:04 ` Glenn Morris
2014-07-08 5:59 ` Glenn Morris
2014-07-08 13:57 ` Drew Adams
2014-07-08 22:24 ` Leo Liu
2014-07-10 7:20 ` Glenn Morris
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=52D16627.4080604@gmx.at \
--to=rudalics@gmx.at \
--cc=16038@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
/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.