GNU bug report logs -
#11651
Special display is not dedicated any more
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Fri, 8 Jun 2012 14:05:01 UTC
Severity: normal
Found in version 24.1.50
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Something's wrong with the way the `dedicated' bit is set:
>
> % src/emacs -Q --eval '(setq special-display-regexps (quote ("\\*.*\\*")))'
> C-h v values RET
> M-: (window-dedicated-p nil) RET
> q
>
> The M-: shows that the window is not marked dedicated as it should.
> And the `q' shows the consequence: rather than hiding the frame, Emacs
> switches to some other buffer.
>
> This was probably introduced in the last couple weeks.
Indeed. I was fooled by a comment in `special-display-popup-frame'.
The old code had
(let* ((frame
(with-current-buffer buffer
(make-frame (append args special-display-frame-alist))))
(window (frame-selected-window frame)))
(display-buffer-record-window 'frame window buffer)
;; FIXME: Use window--display-buffer-2?
(set-window-buffer window buffer)
;; Reset list of WINDOW's previous buffers to nil.
(set-window-prev-buffers window nil)
(set-window-dedicated-p window t)
window)))))
but `make-frame' already puts BUFFER into the new frame so the
`set-window-buffer' is silly. I changed this to
(let ((frame
(with-current-buffer buffer
(make-frame (append args special-display-frame-alist)))))
(window--display-buffer
buffer (frame-selected-window frame) 'frame t))))))
but `window--display-buffer' detected that BUFFER was already displayed
in the new window and decided not to deal with it.
Can you try replacing the snippet by
(let* ((frame
(with-current-buffer buffer
(make-frame (append args special-display-frame-alist))))
(window (frame-selected-window frame)))
(display-buffer-record-window 'frame window buffer)
(set-window-dedicated-p window t)
window)))))
martin
This bug report was last modified 13 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.