[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
display-buffer and save-current-buffer
From: |
Ian Zimmerman |
Subject: |
display-buffer and save-current-buffer |
Date: |
Sun, 26 Jul 2015 08:47:48 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
I was trying todo-mode ie. lisp/calendar/todo-mode.el in the emacs
distribution. In the todo mode buffer I hit "t" which is bound to
todo-top-priorities.
Here is a bit of the code:
(save-excursion
(todo-show)
(save-restriction
(save-current-buffer
(widen)
(copy-to-buffer todo-print-buffer-name (point-min) (point-max))
(set-buffer todo-print-buffer-name)
(too-much-junk-to-not-elide)
)))
(when interactive (display-buffer todo-print-buffer-name))
(message "Type C-x 1 to remove %s window. M-C-v to scroll the help."
todo-print-buffer-name)
Clearly, the intention is to show the buffer which was temporarily
selected within the save-current-buffer form. However no such thing
happens; I get the message (with the expected buffer name interpolated)
but the buffer is not shown, I'm still in the original window
configuration with a single window showing the todo buffer.
When I do M-x eval-expression (display-buffer todo-print-buffer-name)
afterwards, it works as expected.
Is there perhaps a known bug with the interaction of save-current-buffer
and display-buffer in emacs 23.4 ?
--
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.
- display-buffer and save-current-buffer,
Ian Zimmerman <=