emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

with-output-to-temp-buffer and help-mode


From: Glenn Morris
Subject: with-output-to-temp-buffer and help-mode
Date: Fri, 25 Jul 2014 04:15:16 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

with-output-to-temp-buffer was changed to no longer put the buffer in
help-mode. This change makes no sense to me - can someone explain the
logic? Otherwise I'm thinking the change should just be reverted.

I did ask in http://debbugs.gnu.org/16038#104, but I haven't seen a
proper explanation.

The elisp manual documents the use of help-mode (since at least 1999):

   This function executes the forms in BODY while arranging to insert
   any output they print into the buffer named BUFFER-NAME, which is
   first created if necessary, and put into Help mode.
   [...]
   If the forms in BODY do not change the major mode in the output
   buffer, so that it is still Help mode at the end of their
   execution, then `with-output-to-temp-buffer' makes this buffer
   read-only at the end, and also scans it for function and variable
   names to make them into clickable cross-references.

I agree that:

1) the fact there is no "help" in the name is unfortunate.

2) the fact that help-mode is not mentioned in the doc-string is
unfortunate.

3) the way this was implemented (via hooks) was unfortunate.


However:

Many (most?) uses of the thing rely on the output being in help mode.
See eg http://debbugs.gnu.org/17966 .
There are ~ 223 uses of with-output-to-temp-buffer in lisp/.
As a first simple test, the string "help" appears on the same line as 76
of them.

Nobody shows any signs of fixing all those uses, or even documenting
this (incompatible) change in NEWS.

So I think this should just be reverted.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]