GNU bug report logs - #3419
23.0.94; calc, calendar and temp-buffer-resize-mode

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Fri, 29 May 2009 19:10:04 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #136 received at 3419 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: martin rudalics <rudalics <at> gmx.at>, 3419 <at> debbugs.gnu.org
Subject: Re: bug#3419: 23.0.94; calc, calendar and temp-buffer-resize-mode
Date: Wed, 02 Nov 2011 11:35:39 +0200
>> (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
  '((display-buffer-reuse-window
     display-buffer--special
     display-buffer-pop-up-window)
    (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")))




This bug report was last modified 12 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.