emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two buglets in diary-list-entries


From: Stephen Berman
Subject: Two buglets in diary-list-entries
Date: Wed, 09 Nov 2005 00:44:44 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

(i) In my init-file default-major-mode is set to text-mode and as a
result, since diary-list-entries only checks for fundamental-mode, my
diary file isn't automatically visited in diary-mode.
(ii) In the diary display (I use fancy-diary-display) there are
unwanted blank lines between entries from the same day, which arise
when the last line of the diary file or of any included files is a
newline.  I usually don't add a newline myself when making a diary
entry, so these seem to be coming from somewhere else.

The following patch fixes these two problems for me, but I don't know
if it's free of undesirable side effects or otherwise suboptimal.

*** lisp/calendar/diary-lib.el  2005-10-25 09:55:17.000000000 +0200 orig
--- lisp/calendar/diary-lib.el  2005-11-09 00:08:48.000000000 +0100 fix
***************
*** 378,384 ****
              (or (verify-visited-file-modtime diary-buffer)
                  (revert-buffer t t))))
          ;; Setup things like the header-line-format and invisibility-spec.
!         (when (eq major-mode 'fundamental-mode) (diary-mode))
          ;; d-s-p is passed to the diary display function.
          (let ((diary-saved-point (point)))
            (save-excursion
--- 378,384 ----
              (or (verify-visited-file-modtime diary-buffer)
                  (revert-buffer t t))))
          ;; Setup things like the header-line-format and invisibility-spec.
!         (when (eq major-mode default-major-mode) (diary-mode))
          ;; d-s-p is passed to the diary display function.
          (let ((diary-saved-point (point)))
            (save-excursion
***************
*** 456,461 ****
--- 456,463 ----
                               (unless list-only
                                 (remove-overlays date-start (point)
                                                  'invisible 'diary))
+                            (when (and (eobp) (looking-at "^$")) 
+                              (delete-char -1))
                               (setq entry (buffer-substring entry-start 
(point))
                                     temp (diary-pull-attrs entry 
file-glob-attrs)
                                     entry (nth 0 temp))


In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.3)
 of 2005-10-26 on escher
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  senator-minor-mode: t
  semantic-idle-summary-mode: t
  semantic-idle-scheduler-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  recentf-mode: t
  show-paren-mode: t
  display-time-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  menu-bar-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: identity

Recent input:
e d i f f <return> <return> M-b M-n <down> <down> <up> 
C-e M-n <up> d i <tab> ~ <return> D <switch-frame> 
C-x k <return> C-x k <return> <f1> M-x <up> <return> 
<up> <return> <up> <up> <up> <return> D <switch-frame> 
<switch-frame> <f1> C-x b <up> <up> <up> <down> <down> 
<return> <f2> <S-up> C-c j e d <tab> <return> <S-up> 
<S-up> <S-right> <S-up> <S-up> C-c j d <tab> i <backspace> 
f <tab> <return> <f12> M-g M-g 3 7 8 <return> C-M-a 
<select-window> <down-mouse-1> <mouse-1> <double-down-mouse-1> 
<double-mouse-1> <f1> M-x e m a <tab> <M-backspace> 
r e p o <tab> r <tab> <return>

Recent messages:
Reading file /usr/local/share/emacs/22.0.50/lisp/calendar/diary-lib.el~ ... 
Reading file /usr/local/share/emacs/22.0.50/lisp/calendar/diary-lib.el ... 
Computing differences between diary-lib.el~ and diary-lib.el ...
Buffer A: Processing difference region 0 of 2
Buffer B: Processing difference region 0 of 2
Processing difference regions ... done
next-history-element: Beginning of history; no preceding item
Making completion list...
Loading emacsbug...done
Loading dabbrev...done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]