changeset 66689:a9a692f50d60

(org-read-date, org-goto-calendar) (org-recenter-calendar, org-agenda-goto-calendar): Temporarily clear 'calendar-move-hook'.
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 04 Nov 2005 09:25:17 +0000
parents 4f7af488adb0
children 4beb6b8b80fc
files lisp/textmodes/org.el
diffstat 1 files changed, 22 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org.el	Fri Nov 04 07:37:36 2005 +0000
+++ b/lisp/textmodes/org.el	Fri Nov 04 09:25:17 2005 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 3.18
+;; Version: 3.19
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -80,6 +80,9 @@
 ;;
 ;; Changes:
 ;; -------
+;; Version 3.19
+;;    - Bug fixes
+;;
 ;; Version 3.18
 ;;    - Export of calendar information in the standard iCalendar format.
 ;;    - Some bug fixes.
@@ -217,7 +220,7 @@
 
 ;;; Customization variables
 
-(defvar org-version "3.18"
+(defvar org-version "3.19"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -781,7 +784,7 @@
 (defcustom org-level-color-stars-only nil
   "Non-nil means fontify only the stars in each headline.
 When nil, the entire headline is fontified.
-After changing this, requires restart of Emacs to become effective."
+After changin this, requires restart of Emacs to become effective."
   :group 'org-structure
   :type 'boolean)
 
@@ -2865,7 +2868,7 @@
 	     (message "Making completion list...")
 	     (let ((list (sort (all-completions pattern table) 'string<)))
 	       (with-output-to-temp-buffer "*Completions*"
-		 (display-completion-list list pattern)))
+		 (display-completion-list list)))
 	     (message "Making completion list...%s" "done"))))))
 
 ;;; Comments, TODO and DEADLINE
@@ -3189,6 +3192,8 @@
 		(mapcar (lambda(x) (or x 0))  ;; FIXME: Problem with timezone?
 			(parse-time-string (match-string 1))))
 	     (current-time)))
+	 (calendar-move-hook nil)
+	 (view-diary-entries-initially nil)
 	 (timestr (format-time-string
 		   (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time))
 	 (prompt (format "YYYY-MM-DD [%s]: " timestr))
@@ -3200,8 +3205,7 @@
 	;; Copied (with modifications) from planner.el by John Wiegley
 	(save-excursion
 	  (save-window-excursion
-	    (let ((view-diary-entries-initially nil))
-	      (calendar))
+	    (calendar)
 	    (calendar-forward-day (- (time-to-days default-time)
 				     (calendar-absolute-from-gregorian
 				      (calendar-current-date))))
@@ -3524,7 +3528,8 @@
 (defun org-recenter-calendar (date)
   "If the calendar is visible, recenter it to DATE."
   (let* ((win (selected-window))
-	 (cwin (get-buffer-window "*Calendar*" t)))
+	 (cwin (get-buffer-window "*Calendar*" t))
+	 (calendar-move-hook nil))
     (when cwin
       (select-window cwin)
       (calendar-goto-date (if (listp date) date
@@ -3536,7 +3541,9 @@
 If there is a time stamp in the current line, go to that date.
 A prefix ARG can be used force the current date."
   (interactive "P")
-  (let ((tsr org-ts-regexp) diff)
+  (let ((tsr org-ts-regexp) diff
+	(calendar-move-hook nil)
+	(view-diary-entries-initially nil))
     (if (or (org-at-timestamp-p)
 	    (save-excursion
 	      (beginning-of-line 1)
@@ -3545,8 +3552,7 @@
 	      (d2 (time-to-days
 		   (org-time-string-to-time (match-string 1)))))
 	  (setq diff (- d2 d1))))
-    (let ((view-diary-entries-initially nil))
-      (calendar))
+    (calendar)
     (calendar-goto-today)
     (if (and diff (not arg)) (calendar-forward-day diff))))
 
@@ -5248,9 +5254,10 @@
   (interactive)
   (let* ((day (or (get-text-property (point) 'day)
 		  (error "Don't know which date to open in calendar")))
-	 (date (calendar-gregorian-from-absolute day)))
-    (let ((view-diary-entries-initially nil))
-      (calendar))
+	 (date (calendar-gregorian-from-absolute day))
+	 (calendar-move-hook nil)
+	 (view-diary-entries-initially nil))
+    (calendar)
     (calendar-goto-date date)))
 
 (defun org-calendar-goto-agenda ()
@@ -9574,13 +9581,13 @@
   (let ((user user-full-name)
 	(calname "something")
 	(name (or name "unknown"))
-	(timezone "Europe/Amsterdam")) ;; FIXME:  How to get the real timezone?
+	(timezone "FIXME"))
     (princ
      (format "BEGIN:VCALENDAR
 VERSION:2.0
 X-WR-CALNAME:%s
 PRODID:-//%s//Emacs with Org-mode//EN
-X-WR-TIMEZONE:Europe/%s
+X-WR-TIMEZONE:Europe/Amsterdam
 CALSCALE:GREGORIAN\n" name user timezone))))
 
 (defun org-finish-icalendar-file ()