unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 8368@debbugs.gnu.org
Subject: bug#8368: 24.0.50; "temp" means "help" - rename or at least document
Date: Mon, 28 Mar 2011 09:24:28 -0700	[thread overview]
Message-ID: <D29072FFEAEB4A3483F787E542F030E3@us.oracle.com> (raw)

I think it is a mistake to treat "temporary buffer" macros and functions
as if they necessarily dealt with particular buffers such as *Help* and
*Completions* or with particular modes such as `help-mode' and
`completion-list-mode'.
 
Based on their names and descriptions (doc), things such as
`with-output-to-temp-buffer' should simply set up a temporary buffer,
with no special treatment for it being a "help" buffer or a
"completions" buffer etc.
 
Why, for example, should `with-output-to-temp-buffer' always imply
calling `help-mode-*' in that buffer?  Based on the name, a "temporary
buffer" is not necessarily a help buffer.
 
And based on its doc, `with-output-to-temp-buffer', for example, is not
about a help buffer.  There is NOTHING in its doc that gives the
slightest suggestion that the temporary buffer is a help buffer, is in
`help-mode', etc.  Nada.  Please take a moment to read the doc string.

But in help.el we do this, at top level:
 
;; This makes `with-output-to-temp-buffer' buffers use `help-mode'.
(add-hook 'temp-buffer-setup-hook 'help-mode-setup)
(add-hook 'temp-buffer-show-hook 'help-mode-finish)
 
Yes, I know that this has been the case for a long time.  But I also
know that the effect has resulted in confusion for at least some users.
 
You can say that the problem is just the name.  In that case, the doc
should help to correct the false impression by stating explicitly that a
"temp" buffer is really a "help" buffer, in `help-mode' (by default).
 
Better, however, would be to rename *-temp-* to *-help-* whenever "temp"
really implies "help".

And after renaming functions/macros that way, I think it would be good
to have real temporary-buffer facilities - a real
`with-output-to-temp-buffer' (but we would need to pick a new name, to
avoid confusion), one that does not imply using `help-mode' etc.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-03-21 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'
 






             reply	other threads:[~2011-03-28 16:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 16:24 Drew Adams [this message]
2011-07-14 19:26 ` bug#8368: 24.0.50; "temp" means "help" - rename or at least document Lars Magne Ingebrigtsen
2011-09-11  3:45   ` Lars Magne Ingebrigtsen
2011-09-11  4:58     ` Stefan Monnier
2011-09-11  5:00       ` Lars Magne Ingebrigtsen
2012-04-28  0:15       ` Drew Adams
2012-04-28  8:25         ` martin rudalics
2012-04-28 14:00           ` Drew Adams
2012-04-29 10:40             ` martin rudalics
2012-04-29 15:28               ` Drew Adams
2012-04-30  9:40                 ` martin rudalics
2012-04-30 14:28                   ` Drew Adams
2012-05-01  8:08                     ` martin rudalics
2012-05-01 13:09                       ` Drew Adams
2012-05-02  9:40                         ` martin rudalics
2012-05-02 14:19                           ` Drew Adams
2012-04-28 15:07           ` Stefan Monnier
2016-04-28 10:28             ` Lars Ingebrigtsen
2019-10-11 20:34               ` Lars Ingebrigtsen
2011-09-11 18:41     ` Richard Stallman
2011-09-11 18:48       ` Lars Magne Ingebrigtsen
2011-09-11 19:24         ` Drew Adams
2011-09-12  2:46         ` Richard Stallman

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=D29072FFEAEB4A3483F787E542F030E3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8368@debbugs.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 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).