From unknown Sat Sep 06 08:36:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7536: 24.0.50; sexp diary entry on last line is truncated Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Dec 2010 23:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7536 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 7536@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12913310779814 (code B ref -1); Thu, 02 Dec 2010 23:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Dec 2010 23:04:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POICb-0002YE-JN for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:04:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POICZ-0002Y3-U3 for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:04:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POII4-000612-TD for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:10:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:59652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POII4-00060y-QZ for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:10:16 -0500 Received: from [140.186.70.92] (port=37897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POII3-0000M7-K7 for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POII2-00060a-Ar for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:15 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:42613 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1POII1-0005zm-Rw for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:14 -0500 Received: (qmail invoked by alias); 02 Dec 2010 23:10:10 -0000 Received: from i59F563CD.versanet.de (EHLO escher.home) [89.245.99.205] by mail.gmx.net (mp059) with SMTP; 03 Dec 2010 00:10:11 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/fSmdtjunfAseBBSrMc7m+5WewZpNb4ZyXhf1ao8 pw9hVC1+xmfk7a Received: by escher.home (Postfix, from userid 1000) id 0B19C104BA; Fri, 3 Dec 2010 00:10:17 +0100 (CET) From: Stephen Berman Date: Fri, 03 Dec 2010 00:10:17 +0100 Message-ID: <87wrnr93fq.fsf@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) 1. Let there be no file ~/diary. 2. emacs -Q 3. M-x calendar 4. In the Calendar buffer type `C-SPC i b', then in the popped to diary buffer type `test' as the entry after the diary-block sexp and then `C-x C-s' to save the diary file. 5. M-x diary => The fancy diary display shows the above diary entry as `tes'. AFAICT the reason is that diary-list-sexp-entries assumes there is a newline after a sexp diary entry. Here is a fix: *** /data/steve/bzr/emacs/trunk/lisp/calendar/diary-lib.el 2010-11-26 20:52:25.000000000 +0100 --- /data/steve/bzr/emacs/quickfixes/lisp/calendar/diary-lib.el 2010-12-02 23:49:25.000000000 +0100 *************** *** 1764,1770 **** (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) ! (backward-char 1) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation --- 1764,1770 ---- (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) ! (when (bolp) (backward-char 1)) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation In GNU Emacs 24.0.50.19 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-11-26 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10605000 configured using `configure '--without-toolkit-scroll-bars'' From unknown Sat Sep 06 08:36:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stephen Berman Subject: bug#7536: closed (Re: bug#7536: 24.0.50; sexp diary entry on last line is truncated) Message-ID: References: <5ibp4vk93z.fsf@fencepost.gnu.org> <87wrnr93fq.fsf@escher.home> X-Gnu-PR-Message: they-closed 7536 X-Gnu-PR-Package: emacs Reply-To: 7536@debbugs.gnu.org Date: Thu, 09 Dec 2010 01:45:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1291859103-18193-1" This is a multi-part message in MIME format... ------------=_1291859103-18193-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7536: 24.0.50; sexp diary entry on last line is truncated which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7536@debbugs.gnu.org. --=20 7536: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7536 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1291859103-18193-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7536-done) by debbugs.gnu.org; 9 Dec 2010 01:44:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQVYc-0004iX-Mc for submit@debbugs.gnu.org; Wed, 08 Dec 2010 20:44:30 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQVYa-0004iJ-7C for 7536-done@debbugs.gnu.org; Wed, 08 Dec 2010 20:44:28 -0500 Received: from localhost ([127.0.0.1]:45956) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQVeK-0005LS-OS; Wed, 08 Dec 2010 20:50:24 -0500 To: 7536-done@debbugs.gnu.org Subject: Re: bug#7536: 24.0.50; sexp diary entry on last line is truncated References: <87wrnr93fq.fsf@escher.home> From: Glenn Morris X-Spook: White House Ceridian Uzi counter terrorism cypherpunk X-Ran: %(;_c#i#oWApm2Q(&vi"(kmg34XsGlLO%r};xvtF~[_~V~aTtT=xv}Ps})!etY4>V{b*eE X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 08 Dec 2010 20:50:24 -0500 In-Reply-To: <87wrnr93fq.fsf@escher.home> (Stephen Berman's message of "Fri\, 03 Dec 2010 00\:10\:17 +0100") Message-ID: <5ibp4vk93z.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 7536-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Version: 23.3 Thanks; applied. ------------=_1291859103-18193-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Dec 2010 23:04:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POICb-0002YE-JN for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:04:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POICZ-0002Y3-U3 for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:04:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POII4-000612-TD for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:10:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:59652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POII4-00060y-QZ for submit@debbugs.gnu.org; Thu, 02 Dec 2010 18:10:16 -0500 Received: from [140.186.70.92] (port=37897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POII3-0000M7-K7 for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POII2-00060a-Ar for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:15 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:42613 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1POII1-0005zm-Rw for bug-gnu-emacs@gnu.org; Thu, 02 Dec 2010 18:10:14 -0500 Received: (qmail invoked by alias); 02 Dec 2010 23:10:10 -0000 Received: from i59F563CD.versanet.de (EHLO escher.home) [89.245.99.205] by mail.gmx.net (mp059) with SMTP; 03 Dec 2010 00:10:11 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/fSmdtjunfAseBBSrMc7m+5WewZpNb4ZyXhf1ao8 pw9hVC1+xmfk7a Received: by escher.home (Postfix, from userid 1000) id 0B19C104BA; Fri, 3 Dec 2010 00:10:17 +0100 (CET) From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.0.50; sexp diary entry on last line is truncated Date: Fri, 03 Dec 2010 00:10:17 +0100 Message-ID: <87wrnr93fq.fsf@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) 1. Let there be no file ~/diary. 2. emacs -Q 3. M-x calendar 4. In the Calendar buffer type `C-SPC i b', then in the popped to diary buffer type `test' as the entry after the diary-block sexp and then `C-x C-s' to save the diary file. 5. M-x diary => The fancy diary display shows the above diary entry as `tes'. AFAICT the reason is that diary-list-sexp-entries assumes there is a newline after a sexp diary entry. Here is a fix: *** /data/steve/bzr/emacs/trunk/lisp/calendar/diary-lib.el 2010-11-26 20:52:25.000000000 +0100 --- /data/steve/bzr/emacs/quickfixes/lisp/calendar/diary-lib.el 2010-12-02 23:49:25.000000000 +0100 *************** *** 1764,1770 **** (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) ! (backward-char 1) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation --- 1764,1770 ---- (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) ! (when (bolp) (backward-char 1)) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation In GNU Emacs 24.0.50.19 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-11-26 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10605000 configured using `configure '--without-toolkit-scroll-bars'' ------------=_1291859103-18193-1--