From: martin rudalics <rudalics@gmx.at>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 16816@debbugs.gnu.org
Subject: bug#16816: 24.3.50; erroneous docstring in with-temp-buffer-window
Date: Fri, 21 Feb 2014 14:08:43 +0100 [thread overview]
Message-ID: <53074FDB.4040907@gmx.at> (raw)
In-Reply-To: <87sire4wqw.fsf@yahoo.fr>
> The docstring of `with-temp-buffer-window' contains :
>
> It does not make the buffer current for BODY.
>
> (2nd sentence of 2nd paragraph).
>
> But I think that is wrong, because :
> (with-temp-buffer-window
> (get-buffer-create "foo")
> nil
> nil
> (message "curbuf: %s"
> (current-buffer)))
>
> outputs "curbuf: foo"
>
> If this is a docbug, here's a suggestion :
>
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -149,10 +149,9 @@ BUFFER-OR-NAME must specify either a live buffer, or the name of a
> buffer (if it does not exist, this macro creates it).
>
> This construct makes buffer BUFFER-OR-NAME empty before running BODY.
> -It does not make the buffer current for BODY.
> -Instead it binds `standard-output' to that buffer, so that output
> -generated with `prin1' and similar functions in BODY goes into
> -the buffer.
> +It makes the buffer current for BODY and binds `standard-output' to that
> +buffer, so that output generated with `prin1' and similar functions in
> +BODY goes into the buffer.
>
> At the end of BODY, this marks the specified buffer unmodified and
> read-only, and displays it in a window (but does not select it, or make
`with-temp-buffer-window' should behave as `with-output-to-temp-buffer'
in this regard (at least I hope so). So in revision 116509 I moved the
evaluation of BODY out of the scope of `with-current-buffer'. If this
causes problems, I will revert and use your patch.
Thanks, martin
next prev parent reply other threads:[~2014-02-21 13:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 21:29 bug#16816: 24.3.50; erroneous docstring in with-temp-buffer-window Nicolas Richard
2014-02-21 13:08 ` martin rudalics [this message]
2014-02-27 15:32 ` Juanma Barranquero
2014-02-27 18:44 ` martin rudalics
2014-02-27 18:55 ` Juanma Barranquero
2014-02-27 20:00 ` martin rudalics
2014-02-27 21:04 ` Drew Adams
2014-02-28 10:58 ` martin rudalics
2014-03-16 10:00 ` martin rudalics
2014-03-22 5:19 ` Juanma Barranquero
2014-02-28 10:59 ` martin rudalics
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=53074FDB.4040907@gmx.at \
--to=rudalics@gmx.at \
--cc=16816@debbugs.gnu.org \
--cc=theonewiththeevillook@yahoo.fr \
/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.