/[emacs]/emacs/lisp/textmodes/org.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/org.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.44 by cdominik, Mon Oct 24 19:37:30 2005 UTC revision 1.45 by cdominik, Fri Nov 4 09:25:17 2005 UTC
# Line 5  Line 5 
5  ;; Author: Carsten Dominik <dominik at science dot uva dot nl>  ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6  ;; Keywords: outlines, hypermedia, calendar  ;; Keywords: outlines, hypermedia, calendar
7  ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/  ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8  ;; Version: 3.18  ;; Version: 3.19
9  ;;  ;;
10  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
11  ;;  ;;
# Line 80  Line 80 
80  ;;  ;;
81  ;; Changes:  ;; Changes:
82  ;; -------  ;; -------
83    ;; Version 3.19
84    ;;    - Bug fixes
85    ;;
86  ;; Version 3.18  ;; Version 3.18
87  ;;    - Export of calendar information in the standard iCalendar format.  ;;    - Export of calendar information in the standard iCalendar format.
88  ;;    - Some bug fixes.  ;;    - Some bug fixes.
# Line 217  Line 220 
220    
221  ;;; Customization variables  ;;; Customization variables
222    
223  (defvar org-version "3.18"  (defvar org-version "3.19"
224    "The version number of the file org.el.")    "The version number of the file org.el.")
225  (defun org-version ()  (defun org-version ()
226    (interactive)    (interactive)
# Line 781  as possible." Line 784  as possible."
784  (defcustom org-level-color-stars-only nil  (defcustom org-level-color-stars-only nil
785    "Non-nil means fontify only the stars in each headline.    "Non-nil means fontify only the stars in each headline.
786  When nil, the entire headline is fontified.  When nil, the entire headline is fontified.
787  After changing this, requires restart of Emacs to become effective."  After changin this, requires restart of Emacs to become effective."
788    :group 'org-structure    :group 'org-structure
789    :type 'boolean)    :type 'boolean)
790    
# Line 2865  At all other locations, this simply call Line 2868  At all other locations, this simply call
2868               (message "Making completion list...")               (message "Making completion list...")
2869               (let ((list (sort (all-completions pattern table) 'string<)))               (let ((list (sort (all-completions pattern table) 'string<)))
2870                 (with-output-to-temp-buffer "*Completions*"                 (with-output-to-temp-buffer "*Completions*"
2871                   (display-completion-list list pattern)))                   (display-completion-list list)))
2872               (message "Making completion list...%s" "done"))))))               (message "Making completion list...%s" "done"))))))
2873    
2874  ;;; Comments, TODO and DEADLINE  ;;; Comments, TODO and DEADLINE
# Line 3189  used to insert the time stamp into the b Line 3192  used to insert the time stamp into the b
3192                  (mapcar (lambda(x) (or x 0))  ;; FIXME: Problem with timezone?                  (mapcar (lambda(x) (or x 0))  ;; FIXME: Problem with timezone?
3193                          (parse-time-string (match-string 1))))                          (parse-time-string (match-string 1))))
3194               (current-time)))               (current-time)))
3195             (calendar-move-hook nil)
3196             (view-diary-entries-initially nil)
3197           (timestr (format-time-string           (timestr (format-time-string
3198                     (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time))                     (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time))
3199           (prompt (format "YYYY-MM-DD [%s]: " timestr))           (prompt (format "YYYY-MM-DD [%s]: " timestr))
# Line 3200  used to insert the time stamp into the b Line 3205  used to insert the time stamp into the b
3205          ;; Copied (with modifications) from planner.el by John Wiegley          ;; Copied (with modifications) from planner.el by John Wiegley
3206          (save-excursion          (save-excursion
3207            (save-window-excursion            (save-window-excursion
3208              (let ((view-diary-entries-initially nil))              (calendar)
               (calendar))  
3209              (calendar-forward-day (- (time-to-days default-time)              (calendar-forward-day (- (time-to-days default-time)
3210                                       (calendar-absolute-from-gregorian                                       (calendar-absolute-from-gregorian
3211                                        (calendar-current-date))))                                        (calendar-current-date))))
# Line 3524  in the timestamp determines what will be Line 3528  in the timestamp determines what will be
3528  (defun org-recenter-calendar (date)  (defun org-recenter-calendar (date)
3529    "If the calendar is visible, recenter it to DATE."    "If the calendar is visible, recenter it to DATE."
3530    (let* ((win (selected-window))    (let* ((win (selected-window))
3531           (cwin (get-buffer-window "*Calendar*" t)))           (cwin (get-buffer-window "*Calendar*" t))
3532             (calendar-move-hook nil))
3533      (when cwin      (when cwin
3534        (select-window cwin)        (select-window cwin)
3535        (calendar-goto-date (if (listp date) date        (calendar-goto-date (if (listp date) date
# Line 3536  in the timestamp determines what will be Line 3541  in the timestamp determines what will be
3541  If there is a time stamp in the current line, go to that date.  If there is a time stamp in the current line, go to that date.
3542  A prefix ARG can be used force the current date."  A prefix ARG can be used force the current date."
3543    (interactive "P")    (interactive "P")
3544    (let ((tsr org-ts-regexp) diff)    (let ((tsr org-ts-regexp) diff
3545            (calendar-move-hook nil)
3546            (view-diary-entries-initially nil))
3547      (if (or (org-at-timestamp-p)      (if (or (org-at-timestamp-p)
3548              (save-excursion              (save-excursion
3549                (beginning-of-line 1)                (beginning-of-line 1)
# Line 3545  A prefix ARG can be used force the curre Line 3552  A prefix ARG can be used force the curre
3552                (d2 (time-to-days                (d2 (time-to-days
3553                     (org-time-string-to-time (match-string 1)))))                     (org-time-string-to-time (match-string 1)))))
3554            (setq diff (- d2 d1))))            (setq diff (- d2 d1))))
3555      (let ((view-diary-entries-initially nil))      (calendar)
       (calendar))  
3556      (calendar-goto-today)      (calendar-goto-today)
3557      (if (and diff (not arg)) (calendar-forward-day diff))))      (if (and diff (not arg)) (calendar-forward-day diff))))
3558    
# Line 5248  argument, latitude and longitude will be Line 5254  argument, latitude and longitude will be
5254    (interactive)    (interactive)
5255    (let* ((day (or (get-text-property (point) 'day)    (let* ((day (or (get-text-property (point) 'day)
5256                    (error "Don't know which date to open in calendar")))                    (error "Don't know which date to open in calendar")))
5257           (date (calendar-gregorian-from-absolute day)))           (date (calendar-gregorian-from-absolute day))
5258      (let ((view-diary-entries-initially nil))           (calendar-move-hook nil)
5259        (calendar))           (view-diary-entries-initially nil))
5260        (calendar)
5261      (calendar-goto-date date)))      (calendar-goto-date date)))
5262    
5263  (defun org-calendar-goto-agenda ()  (defun org-calendar-goto-agenda ()
# Line 9574  END:VTODO\n" Line 9581  END:VTODO\n"
9581    (let ((user user-full-name)    (let ((user user-full-name)
9582          (calname "something")          (calname "something")
9583          (name (or name "unknown"))          (name (or name "unknown"))
9584          (timezone "Europe/Amsterdam")) ;; FIXME:  How to get the real timezone?          (timezone "FIXME"))
9585      (princ      (princ
9586       (format "BEGIN:VCALENDAR       (format "BEGIN:VCALENDAR
9587  VERSION:2.0  VERSION:2.0
9588  X-WR-CALNAME:%s  X-WR-CALNAME:%s
9589  PRODID:-//%s//Emacs with Org-mode//EN  PRODID:-//%s//Emacs with Org-mode//EN
9590  X-WR-TIMEZONE:Europe/%s  X-WR-TIMEZONE:Europe/Amsterdam
9591  CALSCALE:GREGORIAN\n" name user timezone))))  CALSCALE:GREGORIAN\n" name user timezone))))
9592    
9593  (defun org-finish-icalendar-file ()  (defun org-finish-icalendar-file ()

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26