all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 11651@debbugs.gnu.org
Subject: bug#11651: Special display is not dedicated any more
Date: Fri, 08 Jun 2012 20:18:19 +0200	[thread overview]
Message-ID: <4FD241EB.70306@gmx.at> (raw)
In-Reply-To: <jwvfwa5ucm4.fsf@iro.umontreal.ca>

 > 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





  reply	other threads:[~2012-06-08 18:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 14:01 bug#11651: Special display is not dedicated any more Stefan Monnier
2012-06-08 18:18 ` martin rudalics [this message]
2012-06-09 10:13   ` martin rudalics

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=4FD241EB.70306@gmx.at \
    --to=rudalics@gmx.at \
    --cc=11651@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.