emacs-devel
[Top][All Lists]
Advanced

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

Re: bug in calendar-exit (calendar-hide-window)


From: martin rudalics
Subject: Re: bug in calendar-exit (calendar-hide-window)
Date: Fri, 22 Jun 2012 12:22:16 +0200

I suppose

> (setq pop-up-windows                nil
>       pop-up-frames                 t
>       special-display-buffer-names  '(("*Calendar*" (same-frame . t)))
>       display-buffer-mark-dedicated 'weak)
>
> Under this configuration, pop-up-frames are used, with windows dedicated
> to their buffers, but the calendar is opened in the current frame, not a
> new frame.  Calendar-hide-window seems to assume that whenever dedicated
> windows are being used, it is okay to delete or iconify a frame:
>
>   (cond
>    ...
>    ((and (display-multi-frame-p) (window-dedicated-p window))
>     (if calendar-remove-frame-by-deleting
>         (delete-frame (window-frame window))
>         (iconify-frame (window-frame window))))
>    ...
>    )
>
> M-x version:
>
>   GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>   of 2012-04-07 on trouble, modified by Debian
>
> Any thoughts for a solution?

The corresponding code has changed on trunk but the bug is still
present.  Note that you now have to

(setq calendar-setup t)

in order to reproduce it.  I'd propose the attached patch which still
has the deficiency that KILL is not respected when the buffer appears on
a separate frame.  This is, however, a general problem shared, for
example, by `debug' which kills the *Backtrace* buffer when it appears
on the same frame and retains it when on another.

martin
*** lisp/calendar/calendar.el   2012-06-06 18:46:34 +0000
--- lisp/calendar/calendar.el   2012-06-22 09:53:14 +0000
***************
*** 1818,1827 ****
            (dolist (w (window-list-1 nil nil t))
              (if (and (memq (window-buffer w) calendar-buffers)
                       (window-dedicated-p w))
!                 (if calendar-remove-frame-by-deleting
!                     (delete-frame (window-frame w))
!                     (iconify-frame (window-frame w)))
!               (quit-window kill w)))
          (dolist (b calendar-buffers)
            (quit-windows-on b kill))))))
  
--- 1818,1828 ----
            (dolist (w (window-list-1 nil nil t))
              (if (and (memq (window-buffer w) calendar-buffers)
                       (window-dedicated-p w))
!                 (if (eq (window-deletable-p w) 'frame)
!                   (if calendar-remove-frame-by-deleting
!                       (delete-frame (window-frame w))
!                     (iconify-frame (window-frame w)))
!                 (quit-window kill w))))
          (dolist (b calendar-buffers)
            (quit-windows-on b kill))))))
  


reply via email to

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