From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toby Cubitt Subject: Re: bug#11249: 24.1.50; Overlay with face property causes calendar buffer to scroll Date: Mon, 16 Apr 2012 15:41:31 +0200 Message-ID: <20120416134131.GA28445@c3po.home> References: <83wr5gz8xh.fsf@gnu.org> Reply-To: Toby Cubitt Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="XsQoSWH+UP9D9v3l" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJmBz-00036R-Oq for emacs-orgmode@gnu.org; Mon, 16 Apr 2012 09:42:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJmBt-0007el-BE for emacs-orgmode@gnu.org; Mon, 16 Apr 2012 09:42:07 -0400 Received: from starfish.geekisp.com ([216.168.135.166]:24826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJmBt-0007eO-6O for emacs-orgmode@gnu.org; Mon, 16 Apr 2012 09:42:01 -0400 Content-Disposition: inline In-Reply-To: <83wr5gz8xh.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 16, 2012 at 05:50:50AM +0300, Eli Zaretskii wrote: > > Date: Sun, 15 Apr 2012 23:04:16 +0200 > > Cc: 11249@debbugs.gnu.org, emacs-orgmode@gnu.org > > From: Toby Cubitt > > > > The obvious solution is for org-mode to use a face that doesn't enlarge > > the characters. > > Another solution would be to enlarge the calendar window by one line. I've attached a patch that does exactly this. As expected, it fixes the bug for me. As discussed previously, the alternative solution would be to change the default face used to highlight the current date to something that doesn't set the :bold attribute (which would probably mean introducing a separate face for this, instead of reusing org-warning). But expanding the calendar window is a more general solution, as it fixes the problem for (almost) any face. Arguably, it might be worth defining a separate face for highlighting the date in the calendar during org-read-date, even if this patch is applied, so that it can be customized separately from the face for impending todo deadlines etc. If there's interest in adding a new calendar-date-highlight face, I can post a separate patch for that. For the record, one can already change the face used to highlight the date in the calendar from within .emacs, via (overlay-put org-date-ovl 'face 'new-face) But that's much less discoverable than defining a separate face for 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 --XsQoSWH+UP9D9v3l Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="0001-Enlarge-calendar-by-1-line-to-fix-scrolling-bug-when.patch" >From 107b18f3ee306c0cd28566c8e7e5ba94c4b9268c Mon Sep 17 00:00:00 2001 From: "Toby S. Cubitt" Date: Mon, 16 Apr 2012 14:22:35 +0200 Subject: [PATCH] Enlarge calendar by 1 line to fix scrolling bug when selecting date. * lisp/org.el (org-read-date): Enlarge calendar window by 1 line, and make cursor invisible. --- lisp/org.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 170ddc9..18ae685 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15106,6 +15106,8 @@ user." (save-excursion (save-window-excursion (calendar) + (org-eval-in-calendar + '(progn (enlarge-window 1) (setq cursor-type nil))) (unwind-protect (progn (calendar-forward-day (- (time-to-days org-def) -- 1.7.8.5 --XsQoSWH+UP9D9v3l--