unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Stephen J. Turnbull" <turnbull@sk.tsukuba.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: with-output-to-temp-buffer and help-mode
Date: Sat, 26 Jul 2014 11:00:19 +0200	[thread overview]
Message-ID: <53D36E23.8060409@gmx.at> (raw)
In-Reply-To: <87a97worge.fsf@uwakimon.sk.tsukuba.ac.jp>

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	other threads:[~2014-07-26  9:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  8:15 with-output-to-temp-buffer and help-mode Glenn Morris
2014-07-25  9:06 ` Leo Liu
2014-07-25 15:34   ` Drew Adams
2014-07-25 18:12     ` Leo Liu
2014-07-25 19:06       ` Drew Adams
2014-07-26  1:10         ` Stephen J. Turnbull
2014-07-26  9:00           ` martin rudalics [this message]
2014-07-26  1:30       ` Glenn Morris
2014-07-26  1:39   ` Glenn Morris
2014-07-26  3:33     ` Thien-Thi Nguyen
2014-08-05  8:35     ` Glenn Morris
2014-08-06 16:54       ` Stefan Monnier
2014-08-07  3:30         ` Leo Liu
2014-07-25 15:13 ` Drew Adams

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=53D36E23.8060409@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=turnbull@sk.tsukuba.ac.jp \
    /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).