From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Shutko Newsgroups: gmane.emacs.devel Subject: appt.el fix: don't use prin1-to-string Date: Mon, 12 Aug 2002 17:26:47 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <877kivsr8o.fsf@wesley.springies.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: main.gmane.org 1029188069 25512 127.0.0.1 (12 Aug 2002 21:34:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2002 21:34:29 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17eMpX-0006dH-00 for ; Mon, 12 Aug 2002 23:34:27 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17eNDk-0008R3-00 for ; Mon, 12 Aug 2002 23:59:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eMqM-0006eW-00; Mon, 12 Aug 2002 17:35:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17eMpt-0006bs-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 17:34:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17eMps-0006bg-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 17:34:49 -0400 Original-Received: from mta6.srv.hcvlny.cv.net ([167.206.5.17]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eMps-0006bb-00 for emacs-devel@gnu.org; Mon, 12 Aug 2002 17:34:48 -0400 Original-Received: from wesley.springies.com (ool-182f7213.dyn.optonline.net [24.47.114.19]) by mta6.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 (built Feb 21 2002)) with ESMTP id <0H0R00B49293FL@mta6.srv.hcvlny.cv.net> for emacs-devel@gnu.org; Mon, 12 Aug 2002 17:27:03 -0400 (EDT) Original-Received: from ats by wesley.springies.com with local (Exim 3.35 #1 (Debian)) id 17eMiM-000101-00 for ; Mon, 12 Aug 2002 17:27:02 -0400 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) Original-Lines: 45 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6483 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6483 I noticed my appointment popups were looking like: 5:25pm Test" 0 11 (fontified nil) Cause was appt.el using prin1-to-string for the entries, which had text properties. I don't think it shouldn't have ever been using prin1-to-string, since those _are_ strings to begin with (and it had code to remove the quotes that prin1-to-string added). So they're gone. 2002-08-12 Alan Shutko * calendar/appt.el (appt-delete, appt-make-list): Remove prin1-to-string calls (and substrings around them). --- appt.el.~1.44.~ 2002-08-12 17:08:41.000000000 -0400 +++ appt.el 2002-08-12 17:14:52.000000000 -0400 @@ -454,9 +454,9 @@ (let* ((tmp-msg-list appt-time-msg-list)) (while tmp-msg-list (let* ((element (car tmp-msg-list)) - (prompt-string (concat "Delete " - (prin1-to-string (car (cdr element))) - " from list? ")) + (prompt-string (concat "Delete \"" + (car (cdr element)) + "\" from list? ")) (test-input (y-or-n-p prompt-string))) (setq tmp-msg-list (cdr tmp-msg-list)) (if test-input @@ -512,9 +512,7 @@ (while (and entry-list (calendar-date-equal (calendar-current-date) (car (car entry-list)))) - (let ((time-string (substring (prin1-to-string - (cadr (car entry-list))) 1 -1))) - + (let ((time-string (cadr (car entry-list)))) (while (string-match "\\([0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?\\).*" time-string) -- Alan Shutko - In a variety of flavors! My American Express card left home without me.