From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Recent changes to Calendar/Diary Date: Mon, 19 Sep 2005 11:49:28 -0400 Message-ID: References: <871x3ttr3c.fsf@pacem.orebokech.com> <878xxx2ecg.fsf-monnier+emacs@gnu.org> <878xxx0xdc.fsf@pacem.orebokech.com> <87br2pyyux.fsf-monnier+emacs@gnu.org> <87d5n5xj9x.fsf@pacem.orebokech.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127145913 24794 80.91.229.2 (19 Sep 2005 16:05:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2005 16:05:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 19 18:05:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EHO67-0000yK-Hm for ged-emacs-devel@m.gmane.org; Mon, 19 Sep 2005 18:02:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EHO67-0006cN-1R for ged-emacs-devel@m.gmane.org; Mon, 19 Sep 2005 12:02:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EHO0p-0005Sm-SU for emacs-devel@gnu.org; Mon, 19 Sep 2005 11:57:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EHO0h-0005PA-OE for emacs-devel@gnu.org; Mon, 19 Sep 2005 11:56:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EHO0e-0005KH-NT for emacs-devel@gnu.org; Mon, 19 Sep 2005 11:56:48 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EHNtn-0005ui-Rt for emacs-devel@gnu.org; Mon, 19 Sep 2005 11:49:43 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8D4892CF5BE; Mon, 19 Sep 2005 11:49:42 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 1EC224AC00B; Mon, 19 Sep 2005 11:49:29 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 07723E6C1E; Mon, 19 Sep 2005 11:49:28 -0400 (EDT) Original-To: Romain Francoise In-Reply-To: <87d5n5xj9x.fsf@pacem.orebokech.com> (Romain Francoise's message of "Mon, 19 Sep 2005 15:46:18 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.846, requis 5, autolearn=not spam, AWL 0.05, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43076 Archived-At: >> Hmm.... curious ... I'll take yet another look, > Note that I installed a change yesterday to that effect. I think it hides the actual problem. A `save-excursion' around `with-current-buffer' is just very weird. What happens if you revert your patch and apply the one below instead? Stefan --- calendar.el 12 sep 2005 17:27:05 -0400 1.176 +++ calendar.el 19 sep 2005 11:45:08 -0400 @@ -2900,8 +2900,8 @@ MARK is a single-character string, a list of face attributes/values, or a face. MARK defaults to `diary-entry-marker'." (if (calendar-date-is-legal-p date) + (with-current-buffer calendar-buffer (save-excursion - (set-buffer calendar-buffer) (calendar-cursor-to-visible-date date) (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char (and (listp mark) (> (length mark) 0) mark) ; attr list @@ -2936,7 +2940,7 @@ ;; Apply the font aspects (apply 'set-face-attribute temp-face nil mark) (overlay-put - (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) + (make-overlay (1- (point)) (1+ (point))) 'face temp-face))))))))) (defun calendar-star-date () "Replace the date under the cursor in the calendar window with asterisks.