unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7536: 24.0.50; sexp diary entry on last line is truncated
@ 2010-12-02 23:10 Stephen Berman
  2010-12-09  1:50 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Berman @ 2010-12-02 23:10 UTC (permalink / raw)
  To: 7536

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''





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#7536: 24.0.50; sexp diary entry on last line is truncated
  2010-12-02 23:10 bug#7536: 24.0.50; sexp diary entry on last line is truncated Stephen Berman
@ 2010-12-09  1:50 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2010-12-09  1:50 UTC (permalink / raw)
  To: 7536-done

Version: 23.3

Thanks; applied.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-09  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 23:10 bug#7536: 24.0.50; sexp diary entry on last line is truncated Stephen Berman
2010-12-09  1:50 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).