emacs-devel
[Top][All Lists]
Advanced

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

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


From: martin rudalics
Subject: Re: with-output-to-temp-buffer and help-mode
Date: Sat, 26 Jul 2014 11:00:19 +0200

The following annotations serve only to clarify some issues.  I have no
opinion on how to proceed in this matter.

> 1.  The "traditional" implementation of `with-output-to-temp-buffer'
>      provides (by default, and without option) many features to support
>      help-mode.  (Fact: nobody argues with this.)

It provided only one such feature - an explicit call to `help-mode'
within `temp-buffer-setup-hook'.  Richard once explained that he used a
hook on purpose to make this feature optional.

Also, there is no "traditional" semantics of this macro.  Most features
have been added over time and you usually could tell from functions
using this macro whether a feature already existed at the time the
function was written.

> 3.  The argument does not depend at all on the existence or frequency
>      of use cases that don't use the help features.

It did for me since otherwise I would never have bothered about this
issue.  It only later occurred to me that people cared about cosmetic
issues only.

> 5.  The strategy to deal with this (provide a new alias indicating the
>      traditional semantics properly, and a new function with an
>      appropriate name to indicate the non-help semantics) is
>      well-known, is well-known to have worked well in similar
>      circumstances, and should be adopted here, too.
>      We even know *why* it works well: because of (3), only new code
>      has need for the new function, and in new code it's almost as easy
>      to use a function with a new name as the documentation for the
>      "obvious" name will indicate that it's a backward compatibility
>      kludge.

There is no such strategy.  Most options of `with-output-to-temp-buffer'
have been implemented with the help of hooks and hooks can be changed by
the application and/or the user.  The new macro can now either run the
same hooks as `with-output-to-temp-buffer' in which case it will run
into precisely the same problems (like turning on `help-mode') or run
different hooks in which case users or developers will complain that the
functions they use to put on the hooks of `with-output-to-temp-buffer'
are not run any more (as happened with `with-help-window').

martin



reply via email to

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