From: Glenn Morris <rgm@gnu.org>
To: Leo Liu <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: with-output-to-temp-buffer and help-mode
Date: Fri, 25 Jul 2014 21:39:39 -0400 [thread overview]
Message-ID: <l3egx8290k.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <m3egx96c59.fsf@gmail.com> (Leo Liu's message of "Fri, 25 Jul 2014 17:06:10 +0800")
Leo Liu wrote:
> See Martin's comment in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16038#14, there seems to be
> problems either way.
His comments relate to with-temp-buffer-window, which was a new thing he
introduced. This is normally how it works. If you don't like existing
long-standing behaviour, you introduce a new thing that behaves as you
want, and deprecate the old thing. You don't just silently change the
old thing to do something else.
As he said in the very message you cite:
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.
That would be fine by me:
Deprecate with-output-to-temp-buffer and its ugly implementation,
and use with-temp-buffer-window + an explicit help call.
But leave the old with-output-to-temp-buffer alone.
> Note also temp-buffer-setup-hook is part of the public hooks of
> with-output-to-temp-buffer so the macro makes no guarantee it will be in
> Help mode. I.e. it is permissible for a user to have (add-hook
> 'temp-buffer-setup-hook 'fancy-help-mode t)
As I said, I agree the way this was implemented was unfortunate.
So deprecate it and introduce something better.
> The more important reason is we have variants of those macros and it is
> time to consolidate them.
I am just completely failing to understand your logic here.
But no-one else seems to care (can't say I blame them from being put
off this discussion).
next prev parent reply other threads:[~2014-07-26 1:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 8:15 with-output-to-temp-buffer and help-mode Glenn Morris
2014-07-25 9:06 ` Leo Liu
2014-07-25 15:34 ` Drew Adams
2014-07-25 18:12 ` Leo Liu
2014-07-25 19:06 ` Drew Adams
2014-07-26 1:10 ` Stephen J. Turnbull
2014-07-26 9:00 ` martin rudalics
2014-07-26 1:30 ` Glenn Morris
2014-07-26 1:39 ` Glenn Morris [this message]
2014-07-26 3:33 ` Thien-Thi Nguyen
2014-08-05 8:35 ` Glenn Morris
2014-08-06 16:54 ` Stefan Monnier
2014-08-07 3:30 ` Leo Liu
2014-07-25 15:13 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=l3egx8290k.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).