unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 18357@debbugs.gnu.org
Subject: bug#18357: 24.3.93; Calendar not fully displayed
Date: Sat, 30 Aug 2014 12:58:26 +0300	[thread overview]
Message-ID: <83vbpaguyl.fsf@gnu.org> (raw)
In-Reply-To: <874mwv40ja.fsf@rosalinde.fritz.box>

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Fri, 29 Aug 2014 20:24:09 +0200
> 
> 0. emacs -Q
>    (sanity check) M-x calendar => The Calendar is fully displayed in the
>    lower fitted window.
> 1. M-x customize-option RET calendar-week-start-day RET, set value to 1
>    and save for current session.
>    M-x customize-face RET mode-line RET, show all attributes, check
>    `Overline' set its value to `On' and save for current session.
> 2. M-x calendar => Only the last four lines of the Calendar are
>    displayed in the lower fitted window.
> 
> It looks as if point is centered in the Calendar window, but if I type
> `C-l', it displays the last five lines, not just the last four.  Also,
> the date could be relevant, since point is on today's date, which is on
> the last line of the displayed Calendar; if this changes on September 1,
> I'll report back.
> 
> I'm not sure but I think I first observed this problem in my build of
> 2014-08-20.  I don't remember seeing it in my previous build of
> 2014-07-22, but if I do the above recipe with the executable from the
> that build, I do see the problematic display, which suggests it is due
> to a change in a non-pre-loaded lisp file, though nothing in the
> ChangeLog looks relevant, so perhaps my memory of when this began is
> failing me.
> 
> The Calendar display problem also happens in my 2014-08-21 build from
> the trunk, but only when configured --without-toolkit-scroll-bars; a
> trunk build with (GTK+) scroll bars (including the new horizontal scroll
> bar) does not show the problem.  However, I just rebuilt the current
> emacs-24 --without-toolkit-scroll-bars and still see the problem there.

Sorry, I don't see any problem here: with the customized face of the
mode line, the window showing the calendar buffer is not tall enough
to show all of the buffer _and_ show the cursor on today's date (we
don't allow point to be in a partially visible line).  So Emacs
scrolls the display to make the line with point fully visible.  That's
perfectly normal, not a problem.

calendar.el includes a facility to fit the window to the buffer's
contents, but it only does so when "M-x calendar" is invoked from the
window that displays the calendar:

    ;; Don't do any window-related stuff if we weren't called from a
    ;; window displaying the calendar.
    (when in-calendar-window
      (if (window-combined-p)
	  ;; Adjust the window to exactly fit the displayed calendar.
	  (fit-window-to-buffer nil nil calendar-minimum-window-height)
	;; For a full height window or a window that is horizontally
	;; combined don't fit height to that of its buffer.
	(set-window-vscroll nil 0))
      (sit-for 0))

This code has been there for ages, so I don't believe some change done
lately changed anything there.  Rather, I'm guessing that this is
caused by the fact that today's date is on the last line of the
buffer, which wasn't so before.

You can customize calendar-minimum-window-height to work around "the
problem".





  parent reply	other threads:[~2014-08-30  9:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 18:24 bug#18357: 24.3.93; Calendar not fully displayed Stephen Berman
2014-08-29 19:07 ` Stephen Berman
2014-08-30  9:58 ` Eli Zaretskii [this message]
2014-08-30 11:32   ` Stephen Berman
2014-08-30 12:34     ` Eli Zaretskii
2014-08-30 14:07       ` Stephen Berman
2014-08-30 16:40         ` martin rudalics
2014-08-30 12:43     ` martin rudalics
2014-08-30 12:48       ` martin rudalics
2014-08-30 13:27         ` Eli Zaretskii
2014-08-30 13:51           ` martin rudalics
2014-08-30 14:09             ` Eli Zaretskii
2014-08-30 16:40               ` martin rudalics
2014-08-30 16:46                 ` Eli Zaretskii
2014-08-30 17:15                   ` martin rudalics
2014-08-30 17:54                     ` Eli Zaretskii
2014-08-30 18:08                       ` martin rudalics
2014-08-30 19:35                         ` Stephen Berman
2014-08-31 11:28                           ` martin rudalics
2014-09-01  9:18                             ` 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

  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=83vbpaguyl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18357@debbugs.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).