diff options
| author | Carsten Dominik | 2005-11-04 09:25:17 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2005-11-04 09:25:17 +0000 |
| commit | 908c3feae3577a2890bd233a8c729134a019d68f (patch) | |
| tree | 235be29d036d2f383cdba21a42b48dc419c79e96 | |
| parent | 44e21b24adc4a1cb3a358b1b4bd08bebbdc16776 (diff) | |
| download | emacs-908c3feae3577a2890bd233a8c729134a019d68f.tar.gz emacs-908c3feae3577a2890bd233a8c729134a019d68f.zip | |
(org-read-date, org-goto-calendar)
(org-recenter-calendar, org-agenda-goto-calendar): Temporarily
clear 'calendar-move-hook'.
| -rw-r--r-- | lisp/textmodes/org.el | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 18df2ab226c..372b0dd64bd 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> | 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> |
| 6 | ;; Keywords: outlines, hypermedia, calendar | 6 | ;; Keywords: outlines, hypermedia, calendar |
| 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ | 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ |
| 8 | ;; Version: 3.18 | 8 | ;; Version: 3.19 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -80,6 +80,9 @@ | |||
| 80 | ;; | 80 | ;; |
| 81 | ;; Changes: | 81 | ;; Changes: |
| 82 | ;; ------- | 82 | ;; ------- |
| 83 | ;; Version 3.19 | ||
| 84 | ;; - Bug fixes | ||
| 85 | ;; | ||
| 83 | ;; Version 3.18 | 86 | ;; Version 3.18 |
| 84 | ;; - Export of calendar information in the standard iCalendar format. | 87 | ;; - Export of calendar information in the standard iCalendar format. |
| 85 | ;; - Some bug fixes. | 88 | ;; - Some bug fixes. |
| @@ -217,7 +220,7 @@ | |||
| 217 | 220 | ||
| 218 | ;;; Customization variables | 221 | ;;; Customization variables |
| 219 | 222 | ||
| 220 | (defvar org-version "3.18" | 223 | (defvar org-version "3.19" |
| 221 | "The version number of the file org.el.") | 224 | "The version number of the file org.el.") |
| 222 | (defun org-version () | 225 | (defun org-version () |
| 223 | (interactive) | 226 | (interactive) |
| @@ -781,7 +784,7 @@ as possible." | |||
| 781 | (defcustom org-level-color-stars-only nil | 784 | (defcustom org-level-color-stars-only nil |
| 782 | "Non-nil means fontify only the stars in each headline. | 785 | "Non-nil means fontify only the stars in each headline. |
| 783 | When nil, the entire headline is fontified. | 786 | When nil, the entire headline is fontified. |
| 784 | After changing this, requires restart of Emacs to become effective." | 787 | After changin this, requires restart of Emacs to become effective." |
| 785 | :group 'org-structure | 788 | :group 'org-structure |
| 786 | :type 'boolean) | 789 | :type 'boolean) |
| 787 | 790 | ||
| @@ -2865,7 +2868,7 @@ At all other locations, this simply calls `ispell-complete-word'." | |||
| 2865 | (message "Making completion list...") | 2868 | (message "Making completion list...") |
| 2866 | (let ((list (sort (all-completions pattern table) 'string<))) | 2869 | (let ((list (sort (all-completions pattern table) 'string<))) |
| 2867 | (with-output-to-temp-buffer "*Completions*" | 2870 | (with-output-to-temp-buffer "*Completions*" |
| 2868 | (display-completion-list list pattern))) | 2871 | (display-completion-list list))) |
| 2869 | (message "Making completion list...%s" "done")))))) | 2872 | (message "Making completion list...%s" "done")))))) |
| 2870 | 2873 | ||
| 2871 | ;;; Comments, TODO and DEADLINE | 2874 | ;;; Comments, TODO and DEADLINE |
| @@ -3189,6 +3192,8 @@ used to insert the time stamp into the buffer to include the time." | |||
| 3189 | (mapcar (lambda(x) (or x 0)) ;; FIXME: Problem with timezone? | 3192 | (mapcar (lambda(x) (or x 0)) ;; FIXME: Problem with timezone? |
| 3190 | (parse-time-string (match-string 1)))) | 3193 | (parse-time-string (match-string 1)))) |
| 3191 | (current-time))) | 3194 | (current-time))) |
| 3195 | (calendar-move-hook nil) | ||
| 3196 | (view-diary-entries-initially nil) | ||
| 3192 | (timestr (format-time-string | 3197 | (timestr (format-time-string |
| 3193 | (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time)) | 3198 | (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time)) |
| 3194 | (prompt (format "YYYY-MM-DD [%s]: " timestr)) | 3199 | (prompt (format "YYYY-MM-DD [%s]: " timestr)) |
| @@ -3200,8 +3205,7 @@ used to insert the time stamp into the buffer to include the time." | |||
| 3200 | ;; Copied (with modifications) from planner.el by John Wiegley | 3205 | ;; Copied (with modifications) from planner.el by John Wiegley |
| 3201 | (save-excursion | 3206 | (save-excursion |
| 3202 | (save-window-excursion | 3207 | (save-window-excursion |
| 3203 | (let ((view-diary-entries-initially nil)) | 3208 | (calendar) |
| 3204 | (calendar)) | ||
| 3205 | (calendar-forward-day (- (time-to-days default-time) | 3209 | (calendar-forward-day (- (time-to-days default-time) |
| 3206 | (calendar-absolute-from-gregorian | 3210 | (calendar-absolute-from-gregorian |
| 3207 | (calendar-current-date)))) | 3211 | (calendar-current-date)))) |
| @@ -3524,7 +3528,8 @@ in the timestamp determines what will be changed." | |||
| 3524 | (defun org-recenter-calendar (date) | 3528 | (defun org-recenter-calendar (date) |
| 3525 | "If the calendar is visible, recenter it to DATE." | 3529 | "If the calendar is visible, recenter it to DATE." |
| 3526 | (let* ((win (selected-window)) | 3530 | (let* ((win (selected-window)) |
| 3527 | (cwin (get-buffer-window "*Calendar*" t))) | 3531 | (cwin (get-buffer-window "*Calendar*" t)) |
| 3532 | (calendar-move-hook nil)) | ||
| 3528 | (when cwin | 3533 | (when cwin |
| 3529 | (select-window cwin) | 3534 | (select-window cwin) |
| 3530 | (calendar-goto-date (if (listp date) date | 3535 | (calendar-goto-date (if (listp date) date |
| @@ -3536,7 +3541,9 @@ in the timestamp determines what will be changed." | |||
| 3536 | If there is a time stamp in the current line, go to that date. | 3541 | If there is a time stamp in the current line, go to that date. |
| 3537 | A prefix ARG can be used force the current date." | 3542 | A prefix ARG can be used force the current date." |
| 3538 | (interactive "P") | 3543 | (interactive "P") |
| 3539 | (let ((tsr org-ts-regexp) diff) | 3544 | (let ((tsr org-ts-regexp) diff |
| 3545 | (calendar-move-hook nil) | ||
| 3546 | (view-diary-entries-initially nil)) | ||
| 3540 | (if (or (org-at-timestamp-p) | 3547 | (if (or (org-at-timestamp-p) |
| 3541 | (save-excursion | 3548 | (save-excursion |
| 3542 | (beginning-of-line 1) | 3549 | (beginning-of-line 1) |
| @@ -3545,8 +3552,7 @@ A prefix ARG can be used force the current date." | |||
| 3545 | (d2 (time-to-days | 3552 | (d2 (time-to-days |
| 3546 | (org-time-string-to-time (match-string 1))))) | 3553 | (org-time-string-to-time (match-string 1))))) |
| 3547 | (setq diff (- d2 d1)))) | 3554 | (setq diff (- d2 d1)))) |
| 3548 | (let ((view-diary-entries-initially nil)) | 3555 | (calendar) |
| 3549 | (calendar)) | ||
| 3550 | (calendar-goto-today) | 3556 | (calendar-goto-today) |
| 3551 | (if (and diff (not arg)) (calendar-forward-day diff)))) | 3557 | (if (and diff (not arg)) (calendar-forward-day diff)))) |
| 3552 | 3558 | ||
| @@ -5248,9 +5254,10 @@ argument, latitude and longitude will be prompted for." | |||
| 5248 | (interactive) | 5254 | (interactive) |
| 5249 | (let* ((day (or (get-text-property (point) 'day) | 5255 | (let* ((day (or (get-text-property (point) 'day) |
| 5250 | (error "Don't know which date to open in calendar"))) | 5256 | (error "Don't know which date to open in calendar"))) |
| 5251 | (date (calendar-gregorian-from-absolute day))) | 5257 | (date (calendar-gregorian-from-absolute day)) |
| 5252 | (let ((view-diary-entries-initially nil)) | 5258 | (calendar-move-hook nil) |
| 5253 | (calendar)) | 5259 | (view-diary-entries-initially nil)) |
| 5260 | (calendar) | ||
| 5254 | (calendar-goto-date date))) | 5261 | (calendar-goto-date date))) |
| 5255 | 5262 | ||
| 5256 | (defun org-calendar-goto-agenda () | 5263 | (defun org-calendar-goto-agenda () |
| @@ -9574,13 +9581,13 @@ END:VTODO\n" | |||
| 9574 | (let ((user user-full-name) | 9581 | (let ((user user-full-name) |
| 9575 | (calname "something") | 9582 | (calname "something") |
| 9576 | (name (or name "unknown")) | 9583 | (name (or name "unknown")) |
| 9577 | (timezone "Europe/Amsterdam")) ;; FIXME: How to get the real timezone? | 9584 | (timezone "FIXME")) |
| 9578 | (princ | 9585 | (princ |
| 9579 | (format "BEGIN:VCALENDAR | 9586 | (format "BEGIN:VCALENDAR |
| 9580 | VERSION:2.0 | 9587 | VERSION:2.0 |
| 9581 | X-WR-CALNAME:%s | 9588 | X-WR-CALNAME:%s |
| 9582 | PRODID:-//%s//Emacs with Org-mode//EN | 9589 | PRODID:-//%s//Emacs with Org-mode//EN |
| 9583 | X-WR-TIMEZONE:Europe/%s | 9590 | X-WR-TIMEZONE:Europe/Amsterdam |
| 9584 | CALSCALE:GREGORIAN\n" name user timezone)))) | 9591 | CALSCALE:GREGORIAN\n" name user timezone)))) |
| 9585 | 9592 | ||
| 9586 | (defun org-finish-icalendar-file () | 9593 | (defun org-finish-icalendar-file () |