unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Glenn Morris <rgm@gnu.org>
Cc: Stephen Berman <stephen.berman@gmx.net>, 18381@debbugs.gnu.org
Subject: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window
Date: Fri, 05 Sep 2014 12:46:06 +0200	[thread overview]
Message-ID: <5409946E.4040907@gmx.at> (raw)
In-Reply-To: <7lr3zrjm94.fsf@fencepost.gnu.org>

 > The most conservative fix would seem to be to only change
 > calendar-basic-setup, where it calls diary-view-entries.

Is that sufficient?  I thought the problematic call is that of
`display-buffer' in `calendar-in-read-only-buffer'.  I must admit that I
have a hard time debugging calendar code.

 > I guess what we really want to say is "don't display the diary in the
 > window that you just displayed the calendar in" (is that possible?),

We can make that window softly dedicated to the calendar.  But that's
not very clean.

 > but
 > failing that, simply removing display-buffer-in-previous-window seems to
 > work. What's the cleanest way to do that? Binding
 > display-buffer-overriding-action or display-buffer-fallback-action
 > to an explicit list? display-buffer-fallback-action does not have the
 > friendliest format to make "remove element X" straightforward,
 > and is marked as a constant.

If we can identify the specific `display-buffer' or `pop-to-buffer'
calls in the calendar or diary code, we should pass it via the ACTION
argument.  That is, pass the value of `display-buffer-fallback-action'
with `display-buffer-in-previous-window' removed.

`display-buffer-overriding-action' is too drastic here and
`display-buffer-fallback-action' should not be used indeed.

Eventually, the code should be revised anyway.  For example, when a
window can be split, apparently the following sequence of actions is
performed:

(1) The calendar is displayed and its window is fit to the buffer.

(2) The diary is displayed in a window split off from the calendar
     window annihilating the effort of `fit-window-to-buffer' and leaving
     me with some two lines of the calendar.

martin





      parent reply	other threads:[~2014-09-05 10:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 14:59 bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window Stephen Berman
2014-09-01 17:37 ` Glenn Morris
2014-09-01 18:38   ` Stephen Berman
2014-09-04  0:34     ` Glenn Morris
2014-09-04 12:27 ` martin rudalics
2014-09-04 18:04   ` Glenn Morris
2014-09-04 19:48     ` Glenn Morris
2014-09-04 22:39       ` Glenn Morris
2014-09-04 23:40         ` Glenn Morris
2014-09-05 10:46         ` martin rudalics
2014-09-05 16:14           ` Glenn Morris
2014-09-06  8:52             ` martin rudalics
2014-09-08  6:04               ` Glenn Morris
2014-09-08 20:32                 ` Stephen Berman
2014-09-09  1:26                   ` Glenn Morris
2014-09-09  6:58                     ` martin rudalics
2014-09-09  7:44                       ` Glenn Morris
2014-09-09  9:18                         ` martin rudalics
2014-09-09 18:13                           ` Glenn Morris
2014-09-09 13:00                         ` Stefan Monnier
2014-09-05 10:46     ` martin rudalics [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5409946E.4040907@gmx.at \
    --to=rudalics@gmx.at \
    --cc=18381@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --cc=stephen.berman@gmx.net \
    /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 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).