unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8368: 24.0.50; "temp" means "help" - rename or at least document
@ 2011-03-28 16:24 Drew Adams
  2011-07-14 19:26 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 23+ messages in thread
From: Drew Adams @ 2011-03-28 16:24 UTC (permalink / raw)
  To: 8368

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'
 






^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-10-11 20:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 16:24 bug#8368: 24.0.50; "temp" means "help" - rename or at least document Drew Adams
2011-07-14 19:26 ` 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

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).