[Top][All Lists]

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

bug#3419: 23.0.94; calc, calendar and temp-buffer-resize-mode

From: Juri Linkov
Subject: bug#3419: 23.0.94; calc, calendar and temp-buffer-resize-mode
Date: Wed, 02 Nov 2011 11:35:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)

>> (let ((display-buffer-overriding-action '(display-buffer-reuse-window
>>                                           (inhibit-same-window . t))))
> Better would be
>> (let ((display-buffer-overriding-action '(nil (inhibit-same-window . t))))

Yes, this works too.

Looking at the available display actions in window.el, I found that
there are `display-buffer--other-frame-action' and the command
`display-buffer-other-frame' that uses it, but their counterpart
window functions are missing.

Copying these frame-related functions and replacing "frame" with "window"
in their names, produces two new functions:

(defvar display-buffer--other-window-action
    (inhibit-same-window . t)))

(defun display-buffer-other-window (buffer)
  (interactive "BDisplay buffer in other window: ")
  (display-buffer buffer display-buffer--other-window-action))

I don't know why these window functions are omitted from window.el,
but the `display-buffer--other-window-action' would be useful for this case:

(let ((display-buffer-overriding-action display-buffer--other-window-action))
  (with-output-to-temp-buffer "*Help*"
    (princ "GNU Emacs Calculator.\n")))

reply via email to

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