GNU bug report logs - #11651
Special display is not dedicated any more

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11651 in the body.
You can then email your comments to 11651 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11651; Package emacs. (Fri, 08 Jun 2012 14:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 08 Jun 2012 14:05:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: Special display is not dedicated any more
Date: Fri, 08 Jun 2012 10:01:07 -0400
Package: Emacs
Version: 24.1.50

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.


        Stefan




In GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-08 on pastel
Bzr revision: 99998 monnier <at> iro.umontreal.ca-20120608062034-qwjto7k7pguuvj53
Windowing system distributor `The X.Org Foundation', version 11.0.11201902
Configured using:
 `configure
 'CFLAGS=-Wall -Wno-pointer-sign -DUSE_LISP_UNION_TYPE -DSYNC_INPUT -DENABLE_CHECKING -DXASSERTS -DFONTSET_DEBUG -g -O0'
 '--with-tiff=no''

Important settings:
  value of $LANG: fr_CH.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: InactiveMinibuffer

Minor modes in effect:
  electric-pair-mode: t
  electric-indent-mode: t
  url-handler-mode: t
  global-reveal-mode: t
  reveal-mode: t
  auto-insert-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Recent input:
<up> <left> <right> <up> <left> <right> <up> <left> 
<right> <up> <left> <right> <down> <left> <right> <down> 
<left> <right> <down> <left> <right> <down> <down> 
<left> <right> <down> <down> <left> <right> <down> 
<left> <up> <left> <right> <right> <left> <right> <down> 
<left> <right> <up> <left> <right> <down> <left> <right> 
<down> <down> <down> <left> <right> <down> <left> <right> 
<down> <left> <right> <down> <left> <right> <left> 
<right> <down> <left> <right> <down> <left> <right> 
<down> <left> <right> <down> <left> <right> <down> 
<down> <left> <right> <down> <left> <right> <down> 
<left> <right> <down> <left> <right> <down> <left> 
<right> <down> <down> <left> <right> <down> <left> 
<right> <down> <left> <right> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <left> <right> <down> 
<left> <right> <down> <left> <right> <down> <left> 
<right> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <down> <down> C-e <right> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <left> <right> <up> <left> <right> <up> <left> 
<right> <down> <left> <right> <down> <left> <right> 
<down-mouse-1> <mouse-movement> <mouse-1> <double-down-mouse-1> 
<mouse-movement> <mouse-movement> <double-drag-mouse-1> 
<down-mouse-1> <mouse-movement> <mouse-1> C-e <help-echo> 
<down-mouse-5> <mouse-5> <double-down-mouse-5> <double-mouse-5> 
<down-mouse-5> <mouse-5> <down-mouse-1> <mouse-1> <double-down-mouse-1> 
<double-mouse-1> <triple-down-mouse-1> <triple-mouse-1> 
<down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> 
<triple-down-mouse-1> <triple-mouse-1> <down-mouse-1> 
<mouse-1> <double-down-mouse-1> <double-mouse-1> <help-echo> 
<switch-frame> M-x r e p o - e m <tab> <return>

Recent messages:
Starting new Ispell process [/usr/bin/aspell::american] ...
For information about GNU Emacs and the GNU system, type C-h C-a.
 [2 times]
nil
Loading vc-bzr...done
Followed link to /home/monnier/share/etc/emacs/X11.el
Loading cl-indent...done
Package cust-print is obsolete!
Mark saved where search started
delete-backward-char: Text is read-only

Load-path shadows:
None found.

Features:
(sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils multi-isearch xscheme
trace testcover scheme unsafep re-builder shadow inf-lisp ielm pp comint
ansi-color ring gmm-utils ert find-func ewoc debug elp edebug cust-print
cus-edit cus-start cus-load wid-edit vc-bzr filecache server noutline
outline easy-mmode flyspell ispell eldoc checkdoc thingatpt help-mode
view prog-mode load-dir electric url-handlers url-parse auth-source
warnings eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util
mail-prsvr password-cache url-vars reveal autoinsert uniquify advice
help-fns advice-preload time-date savehist minibuf-eldef disp-table
adaptive-wrap-autoloads all-autoloads company-autoloads
csv-mode-autoloads debbugs-autoloads djvu-autoloads ediprolog-autoloads
eldoc-eval-autoloads epoch-view-autoloads
f90-interface-browser-autoloads ioccur-autoloads jgraph-mode-autoloads
js2-mode-autoloads lmc-autoloads load-dir-autoloads markchars-autoloads
memory-usage-autoloads minimap-autoloads muse-autoloads info easymenu
oauth2-autoloads quarter-plane-autoloads rainbow-mode-autoloads
register-list-autoloads shen-mode-autoloads sisu-mode-autoloads
svg-clock-autoloads undo-tree-autoloads uni-confusables-autoloads
windresize-autoloads xclip-autoloads package proof-site proof-autoloads
cl-macs cl cl-lib cl-loaddefs pg-vars bbdb-autoloads agda2 tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe macroexp tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit
x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11651; Package emacs. (Fri, 08 Jun 2012 18:21:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11651 <at> debbugs.gnu.org
Subject: Re: bug#11651: Special display is not dedicated any more
Date: Fri, 08 Jun 2012 20:18:19 +0200
> 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 sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Sat, 09 Jun 2012 10:16:02 GMT) Full text and rfc822 format available.

Notification sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
bug acknowledged by developer. (Sat, 09 Jun 2012 10:16:02 GMT) Full text and rfc822 format available.

Message #13 received at 11651-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 11651-done <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#11651: Special display is not dedicated any more
Date: Sat, 09 Jun 2012 12:13:37 +0200
I comitted the fix proposed earlier.

martin




Message #14 received at 11651-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 11651-done <at> debbugs.gnu.org
Subject: Re: bug#11651: Special display is not dedicated any more
Date: Sat, 09 Jun 2012 16:00:57 -0400
> I comitted the fix proposed earlier.

Thanks, it does fix my use case,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 63 days ago.

Previous Next


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