* bug in calendar-exit (calendar-hide-window)
@ 2012-06-21 22:08 John J Foerch
2012-06-22 10:22 ` martin rudalics
0 siblings, 1 reply; 5+ messages in thread
From: John J Foerch @ 2012-06-21 22:08 UTC (permalink / raw)
To: emacs-devel
Hello,
In calendar, under a configuration like the following, calendar-exit
kills the frame instead of just the window containing the calendar:
(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?
Thank you
--
John Foerch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in calendar-exit (calendar-hide-window)
2012-06-21 22:08 bug in calendar-exit (calendar-hide-window) John J Foerch
@ 2012-06-22 10:22 ` martin rudalics
2012-06-25 17:04 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: martin rudalics @ 2012-06-22 10:22 UTC (permalink / raw)
To: John J Foerch; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]
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
[-- Attachment #2: calendar.diff --]
[-- Type: text/plain, Size: 1078 bytes --]
*** 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))))))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in calendar-exit (calendar-hide-window)
2012-06-22 10:22 ` martin rudalics
@ 2012-06-25 17:04 ` Glenn Morris
2012-06-26 7:25 ` martin rudalics
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-06-25 17:04 UTC (permalink / raw)
To: martin rudalics; +Cc: John J Foerch, emacs-devel
Please install your patch if you think it improves things. Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in calendar-exit (calendar-hide-window)
2012-06-25 17:04 ` Glenn Morris
@ 2012-06-26 7:25 ` martin rudalics
2012-06-26 13:02 ` John J Foerch
0 siblings, 1 reply; 5+ messages in thread
From: martin rudalics @ 2012-06-26 7:25 UTC (permalink / raw)
To: Glenn Morris; +Cc: John J Foerch, emacs-devel
> Please install your patch if you think it improves things.
Installed.
martin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in calendar-exit (calendar-hide-window)
2012-06-26 7:25 ` martin rudalics
@ 2012-06-26 13:02 ` John J Foerch
0 siblings, 0 replies; 5+ messages in thread
From: John J Foerch @ 2012-06-26 13:02 UTC (permalink / raw)
To: emacs-devel
martin rudalics <rudalics@gmx.at> writes:
>> Please install your patch if you think it improves things.
>
> Installed.
>
> martin
Thank you!
--
John Foerch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-26 13:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21 22:08 bug in calendar-exit (calendar-hide-window) John J Foerch
2012-06-22 10:22 ` martin rudalics
2012-06-25 17:04 ` Glenn Morris
2012-06-26 7:25 ` martin rudalics
2012-06-26 13:02 ` John J Foerch
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).