From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#11249: 24.1.50; Overlay with face property causes calendar buffer to scroll Followup-To: gmane.emacs.orgmode Date: Sun, 15 Apr 2012 23:04:16 +0200 Message-ID: <20120415210416.GA28522__74.2880897179887$1334526390$gmane$org@c3po.home> References: <20120415192439.GA9139@c3po.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1334526390 2530 80.91.229.3 (15 Apr 2012 21:46:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Apr 2012 21:46:30 +0000 (UTC) Cc: emacs-orgmode@gnu.org, 11249@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 15 23:46:28 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJXH8-0006KJ-Pj for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Apr 2012 23:46:27 +0200 Original-Received: from localhost ([::1]:56915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJXH8-0007at-7p for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Apr 2012 17:46:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJXGG-0007YS-Tz for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 17:45:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJXGF-0004Ny-6D for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 17:45:32 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJXGF-0004Nt-2c for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 17:45:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SJXHh-00042C-Ly for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 17:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Toby Cubitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Apr 2012 21:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11249 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11249-submit@debbugs.gnu.org id=B11249.133452639515474 (code B ref 11249); Sun, 15 Apr 2012 21:47:01 +0000 Original-Received: (at 11249) by debbugs.gnu.org; 15 Apr 2012 21:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:60015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJXHG-00041X-Mj for submit@debbugs.gnu.org; Sun, 15 Apr 2012 17:46:35 -0400 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:30765) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJWeH-00037k-B8 for 11249@debbugs.gnu.org; Sun, 15 Apr 2012 17:06:18 -0400 Original-Received: (qmail 22445 invoked by uid 1003); 15 Apr 2012 21:04:45 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Sun, 15 Apr 2012 17:04:41 -0400 Content-Disposition: inline In-Reply-To: <83zkaczq1v.fsf@gnu.org> X-PGP-Key: http://www.dr-qubit.org/gpg-toby.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) Mail-Followup-To: emacs-orgmode@gnu.org X-Primary-Address: toby@dr-qubit.org X-Mailman-Approved-At: Sun, 15 Apr 2012 17:46:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sun, 15 Apr 2012 17:46:24 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59097 Archived-At: On Sun, Apr 15, 2012 at 11:41:00PM +0300, Eli Zaretskii wrote: > > Date: Sun, 15 Apr 2012 21:24:39 +0200 > > From: Toby Cubitt > > > > Steps to reproduce: > > > > 1. emacs -Q > > 2. M-x calendar > > 3. M-: (setq o (make-overlay 1 2)) > > 4. M-: (overlay-put o 'face 'font-lock-warning-face) > > 5. Use C-n to move point to date in the last line of calendar > > > > > > Symptoms: > > > > When the point moves to the last line of the calendar in step 5., the > > calendar buffer scrolls down, so that the top part of the calendar > > scrolls off the top of the window and can't be seen. > > This is not a bug, but a feature: Emacs does not allow the cursor to > enter a partially visible line; it scrolls the buffer to make the line > with the cursor fully visible. Displaying characters in the > font-lock-warning-face makes them slightly larger (because that face > makes the characters bold), and that can cause the last line to exceed > the visible portion of the window. Aha, that makes sense. > > The above steps are a minimal sequence needed to reproduce the bug. In > > everyday Emacs use, the bug is triggered by date selection via > > `org-read-date' in org-mode (which uses an overlay with non-null 'face > > property in the calendar buffer to highlight the current date). > > If that face also enlarges the characters, this is a feature of the > Emacs display engine. Yup, I chose `font-lock-warning-face' in the steps to reproduce because org-mode sets `org-warning' face to this by default. Even if this behaviour is related to a display engine feature, this is nonetheless a bug in `org-read-date'. It's very irritating to have the top part of the calendar scroll off the top of the window. Apart from being ugly, it hides the month and day names (in addition to half the dates), making it very difficult to select the desired date. The obvious solution is for org-mode to use a face that doesn't enlarge the characters. I imagine that would mean defining a separate org-mode face specifically for highlighting the date in the calendar, since `org-warning' is used for all kinds of other things in org-mode for which bold characters make sense (e.g. warning about todo items whose deadline is due). I've copied this to the org-mode mailing list, since presumably the org-mode maintainers will have to take care of this. Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org