all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 17109@debbugs.gnu.org
Subject: bug#17109: 24.4.50; REGRESSION: `with-output-to-temp-buffer' is broken
Date: Wed, 26 Mar 2014 13:08:25 -0700 (PDT)	[thread overview]
Message-ID: <e2aea124-cb96-4046-bbf4-226f6ee6a263@default> (raw)

In a build as recent as this one there was no such problem:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-03-21 on ODIEONE
Bzr revision: 116829 dancol@dancol.org-20140321121023-5tjxtiws6qa4qyod
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include' LDFLAGS=-Lc:/Devel/emacs/lib'

The problem exists in this build:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-03-23 on ODIEONE
Bzr revision: 116869 yamaoka@jpl.org-20140324004210-m3ek4k40qwamyabx
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''

Recipe:

emacs -Q

Evaluate this:


(defun describe-keymap (keymap)         ; Bound to `C-h M-k'
  "Describe bindings in KEYMAP, a variable whose value is a keymap.
Completion is available for the keymap name."
  (interactive
   (list (intern
          (completing-read
           "Keymap: " obarray
           (lambda (m) (and (boundp m)
                       (keymapp (symbol-value m))))
           t nil 'variable-name-history))))
  (unless (and (symbolp keymap)  (boundp keymap)
               (keymapp (symbol-value keymap)))
    (error "`%S' is not a keymapp" keymap))
  (let ((name  (symbol-name keymap))
        (doc   (documentation-property
                keymap 'variable-documentation)))
    (help-setup-xref
     (list #'describe-keymap keymap)
     (called-interactively-p 'interactive))
    (with-output-to-temp-buffer "*Help*" ; NO GOOD with this
      ;; (with-help-window "*Help*" ; <======== OK with this
      (princ name) (terpri)
      (princ (make-string (length name) ?-))
      (terpri) (terpri)
      (when doc
        (princ doc) (terpri) (terpri))
      (with-current-buffer "*Help*"
        (insert (substitute-command-keys
                 (concat "\\{" name "}")))))))

M-x describe-keymap RET ctl-x-map RET

Buffer *Help* is not in Help mode, as it should be.
It is in Fundamental mode.

Change `with-output-to-temp-buffer' to `with-help-window' and the
problem goes away.

This does not seem right.  We should not have to replace the former with
the latter everywhere.  And the former still exists.  It just does not
do the right thing anymore.





             reply	other threads:[~2014-03-26 20:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 20:08 Drew Adams [this message]
2014-03-27  0:05 ` bug#17109: 24.4.50; REGRESSION: `with-output-to-temp-buffer' is broken Leo Liu
2014-03-27  1:52   ` Drew Adams
2014-03-27  9:55   ` Nicolas Richard
2014-03-27 15:09     ` Drew Adams
2014-03-28 21:45       ` Drew Adams
2014-03-29  0:58         ` Leo Liu
2014-03-29  1:39           ` 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

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

  git send-email \
    --in-reply-to=e2aea124-cb96-4046-bbf4-226f6ee6a263@default \
    --to=drew.adams@oracle.com \
    --cc=17109@debbugs.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.