all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
	"'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 8368@debbugs.gnu.org, rms@gnu.org
Subject: bug#8368: 24.0.50; "temp" means "help" - rename or at least document
Date: Fri, 27 Apr 2012 17:15:53 -0700	[thread overview]
Message-ID: <F54EE4638F994AD494581B989F5D14B3@us.oracle.com> (raw)
In-Reply-To: <jwvehznsmjp.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier Sent: Saturday, September 10, 2011 9:58 PM
>
Lars> There's been no response in two months.
Lars> I think the following is a bug:
Lars> ;; This makes `with-output-to-temp-buffer' buffers use `help-mode'.
Lars> (add-hook 'temp-buffer-setup-hook 'help-mode-setup)
Lars> (add-hook 'temp-buffer-show-hook 'help-mode-finish)
Lars> Would removing these be a good idea?
> 
> Not at this stage of the development, no.

So now it's been over a year since the bug was filed.

Can't the help mode code add those hooks only for the use of *Help* and other
help-mode buffers?  Why should all uses of `with-output-to-temp-buffer' end up
running those hook functions that are, after all, specific to help mode?

Can we please move forward on fixing this bug?

There is lots of stuff in a "temp" buffer now that has nothing to do with a
temporary buffer.

emacs -Q
(setq debug-on-error t)
(defun foo ()
  "..."
  (with-output-to-temp-buffer "*TEMP*"
    (princ "FOOOOO\n-----\n\n")))
(foo)
C-x b *TEMP*
TAB

Debugger entered--Lisp error: (error "No buttons!")
  signal(error ("No buttons!"))
  error("No buttons!")
  forward-button(1 1 1)
  call-interactively(forward-button nil nil)

No f___ing buttons?  WTF?  Who cares?

Look at all the keys bound now in a "temporary" buffer (below).  How many of
them have to do with a temporary display of something other than outright
*Help*?

The only keys I can think of that might generally make sense for a temporary
buffer mode are SPC, DEL, <, >, ?, h, q, maybe z (but why was `z' chosen to
kill?), maybe the digits and -, and maybe (if `revert-buffer-function' says so)
g.

All of the special help link and navigation commands should be reserved for a
help mode that is _derived_ from a (minimal) temporary buffer mode.

While waiting for that, users have to do something like this, just to get rid of
the *Help*-imposed stuff:

(defmacro with-output-to-plain-temp-buffer (buf &rest body)
  "Like `with-output-to-temp-buffer', but with no *Help* navigation stuff."
  `(unwind-protect
    (progn
      (remove-hook 'temp-buffer-setup-hook 'help-mode-setup)
      (remove-hook 'temp-buffer-show-hook  'help-mode-finish)
      (with-output-to-temp-buffer ,buf ,@body))
    (add-hook 'temp-buffer-setup-hook 'help-mode-setup)
    (add-hook 'temp-buffer-show-hook  'help-mode-finish)))

It makes no more sense for *Help* to have co-opted temporary buffer display than
it would have made for Info to have co-opted it.  Dunno how we ever went down
this road.

key             binding
---             -------

C-c		Prefix Command
TAB		forward-button
RET		help-follow
ESC		Prefix Command
SPC		scroll-up-command
-		negative-argument
0 .. 9	digit-argument
<		beginning-of-buffer
>		end-of-buffer
?		describe-mode
g		revert-buffer
h		describe-mode
q		quit-window
z		kill-this-buffer
DEL		scroll-down-command
<backtab>	backward-button
<mouse-2>	help-follow-mouse
<remap>	Prefix Command

C-c C-b	help-go-back
C-c C-c	help-follow-symbol
C-c C-f	help-go-forward

M-TAB		backward-button






  parent reply	other threads:[~2012-04-28  0:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F54EE4638F994AD494581B989F5D14B3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8368@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.