emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/textmodes/org.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/org.el
Date: Tue, 14 Jun 2005 11:33:45 -0400

Index: emacs/lisp/textmodes/org.el
diff -c emacs/lisp/textmodes/org.el:1.23 emacs/lisp/textmodes/org.el:1.24
*** emacs/lisp/textmodes/org.el:1.23    Mon Jun 13 09:49:47 2005
--- emacs/lisp/textmodes/org.el Tue Jun 14 15:33:45 2005
***************
*** 1,4 ****
! ;;; org.el --- Outline-based notes management and organizer 
  ;; Carstens outline-mode for keeping track of everything.
  ;; Copyright (c) 2004, 2005 Free Software Foundation
  ;;
--- 1,4 ----
! ;;; org.el --- Outline-based notes management and organizer
  ;; Carstens outline-mode for keeping track of everything.
  ;; Copyright (c) 2004, 2005 Free Software Foundation
  ;;
***************
*** 445,451 ****
            (goto-char (point-min))
            (while (re-search-forward re nil t)
              (setq key (match-string 1) value (match-string 2))
!             (cond 
               ((equal key "CATEGORY")
                (if (string-match "[ \t]+$" value)
                    (setq value (replace-match "" t t value)))
--- 445,451 ----
            (goto-char (point-min))
            (while (re-search-forward re nil t)
              (setq key (match-string 1) value (match-string 2))
!             (cond
               ((equal key "CATEGORY")
                (if (string-match "[ \t]+$" value)
                    (setq value (replace-match "" t t value)))
***************
*** 485,491 ****
            org-todo-kwd-max-priority (1- (length org-todo-keywords))
            org-ds-keyword-length (+ 2 (max (length org-deadline-string)
                                            (length org-scheduled-string)))
!           org-done-string 
            (nth (1- (length org-todo-keywords)) org-todo-keywords)
            org-todo-regexp
            (concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords
--- 485,491 ----
            org-todo-kwd-max-priority (1- (length org-todo-keywords))
            org-ds-keyword-length (+ 2 (max (length org-deadline-string)
                                            (length org-scheduled-string)))
!           org-done-string
            (nth (1- (length org-todo-keywords)) org-todo-keywords)
            org-todo-regexp
            (concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords
***************
*** 565,571 ****
  
  (defcustom org-select-agenda-window t
    "Non-nil means, after creating an agenda, move cursor into Agenda window.
! When nil, cursor will remain in the current window." 
    :group 'org-agenda
    :type 'boolean)
  
--- 565,571 ----
  
  (defcustom org-select-agenda-window t
    "Non-nil means, after creating an agenda, move cursor into Agenda window.
! When nil, cursor will remain in the current window."
    :group 'org-agenda
    :type 'boolean)
  
***************
*** 601,607 ****
  When nil, date-less entries will only be shown if `org-agenda' is called
  with a prefix argument.
  When non-nil, the TODO entries will be listed at the top of the agenda, before
! the entries for specific days." 
    :group 'org-agenda
    :type 'boolean)
  
--- 601,607 ----
  When nil, date-less entries will only be shown if `org-agenda' is called
  with a prefix argument.
  When non-nil, the TODO entries will be listed at the top of the agenda, before
! the entries for specific days."
    :group 'org-agenda
    :type 'boolean)
  
***************
*** 646,652 ****
  Leaving out `category-keep' would mean that items will be sorted across
  categories by priority."
    :group 'org-agenda
!   :type '(repeat 
            (choice
             (const time-up)
             (const time-down)
--- 646,652 ----
  Leaving out `category-keep' would mean that items will be sorted across
  categories by priority."
    :group 'org-agenda
!   :type '(repeat
            (choice
             (const time-up)
             (const time-down)
***************
*** 722,728 ****
    :group 'org-agenda
    :type 'boolean)
  
! (defcustom org-agenda-time-grid 
    '((daily today require-timed)
      "----------------"
      (800 1000 1200 1400 1600 1800 2000))
--- 722,728 ----
    :group 'org-agenda
    :type 'boolean)
  
! (defcustom org-agenda-time-grid
    '((daily today require-timed)
      "----------------"
      (800 1000 1200 1400 1600 1800 2000))
***************
*** 741,747 ****
  The third item is a list of integers, indicating the times that should have
  a grid line."
    :group 'org-agenda
!   :type 
    '(list
      (set :greedy t :tag "Grid Display Options"
           (const :tag "Show grid in single day agenda display" daily)
--- 741,747 ----
  The third item is a list of integers, indicating the times that should have
  a grid line."
    :group 'org-agenda
!   :type
    '(list
      (set :greedy t :tag "Grid Display Options"
           (const :tag "Show grid in single day agenda display" daily)
***************
*** 835,841 ****
  
  (defcustom org-archive-location "%s_archive::"
    "The location where subtrees should be archived.
! This string consists of two parts, separated by a double-colon.  
  
  The first part is a file name - when omitted, archiving happens in the same
  file.  %s will be replaced by the current file name (without directory part).
--- 835,841 ----
  
  (defcustom org-archive-location "%s_archive::"
    "The location where subtrees should be archived.
! This string consists of two parts, separated by a double-colon.
  
  The first part is a file name - when omitted, archiving happens in the same
  file.  %s will be replaced by the current file name (without directory part).
***************
*** 864,870 ****
  
  You may set this option on a per-file basis by adding to the buffer a
  line like
!  
  #+ARCHIVE: basement::** Finished Tasks"
    :group 'org-structure
    :type 'string)
--- 864,870 ----
  
  You may set this option on a per-file basis by adding to the buffer a
  line like
! 
  #+ARCHIVE: basement::** Finished Tasks"
    :group 'org-structure
    :type 'string)
***************
*** 1556,1562 ****
    "Face for items scheduled previously, and not yet done."
    :group 'org-faces)
  
! (defface org-link 
    '((((type tty) (class color)) (:foreground "cyan" :weight bold))
      (((class color) (background light)) (:foreground "Purple"))
      (((class color) (background dark)) (:foreground "Cyan"))
--- 1556,1562 ----
    "Face for items scheduled previously, and not yet done."
    :group 'org-faces)
  
! (defface org-link
    '((((type tty) (class color)) (:foreground "cyan" :weight bold))
      (((class color) (background light)) (:foreground "Purple"))
      (((class color) (background dark)) (:foreground "Cyan"))
***************
*** 1663,1669 ****
  
  ;;;###autoload
  (define-derived-mode org-mode outline-mode "Org"
!   "Outline-based notes management and organizer, alias 
  \"Carstens outline-mode for keeping track of everything.\"
  
  Org-mode develops organizational tasks around a NOTES file which
--- 1663,1669 ----
  
  ;;;###autoload
  (define-derived-mode org-mode outline-mode "Org"
!   "Outline-based notes management and organizer, alias
  \"Carstens outline-mode for keeping track of everything.\"
  
  Org-mode develops organizational tasks around a NOTES file which
***************
*** 1728,1734 ****
  ;;; Font-Lock stuff
  
  (defvar org-mouse-map (make-sparse-keymap))
! (define-key org-mouse-map 
    (if org-xemacs-p [button2] [mouse-2]) 'org-open-at-mouse)
  (define-key org-mouse-map
    (if org-xemacs-p [button3] [mouse-3]) 'org-find-file-at-mouse)
--- 1728,1734 ----
  ;;; Font-Lock stuff
  
  (defvar org-mouse-map (make-sparse-keymap))
! (define-key org-mouse-map
    (if org-xemacs-p [button2] [mouse-2]) 'org-open-at-mouse)
  (define-key org-mouse-map
    (if org-xemacs-p [button3] [mouse-3]) 'org-find-file-at-mouse)
***************
*** 1804,1812 ****
            (list (concat "\\<" org-scheduled-string) '(0 'org-warning t))
            ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)"
            ;; (3 'bold))
!           ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" 
            ;; (3 'italic))
!           ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" 
            ;; (3 'underline))
            '("\\<FIXME\\>" (0 'org-warning t))
            (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>")
--- 1804,1812 ----
            (list (concat "\\<" org-scheduled-string) '(0 'org-warning t))
            ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)"
            ;; (3 'bold))
!           ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)"
            ;; (3 'italic))
!           ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)"
            ;; (3 'underline))
            '("\\<FIXME\\>" (0 'org-warning t))
            (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>")
***************
*** 1825,1831 ****
            (if org-noutline-p     ; FIXME:  I am not sure if eval will work
                                   ; on XEmacs if noutline is ever ported
                '((eval . (list "^\\(\\*+\\).*"
!                               0 '(nth 
                                    (% (- (match-end 1) (match-beginning 1) 1)
                                       org-n-levels)
                                    org-level-faces)
--- 1825,1831 ----
            (if org-noutline-p     ; FIXME:  I am not sure if eval will work
                                   ; on XEmacs if noutline is ever ported
                '((eval . (list "^\\(\\*+\\).*"
!                               0 '(nth
                                    (% (- (match-end 1) (match-beginning 1) 1)
                                       org-n-levels)
                                    org-level-faces)
***************
*** 1839,1845 ****
      (set (make-local-variable 'font-lock-defaults)
           '(org-font-lock-keywords t nil nil backward-paragraph))
      (kill-local-variable 'font-lock-keywords) nil))
!     
  (defun org-unfontify-region (beg end &optional maybe_loudly)
    "Remove fontification and activation overlays from links."
    (font-lock-default-unfontify-region beg end)
--- 1839,1845 ----
      (set (make-local-variable 'font-lock-defaults)
           '(org-font-lock-keywords t nil nil backward-paragraph))
      (kill-local-variable 'font-lock-keywords) nil))
! 
  (defun org-unfontify-region (beg end &optional maybe_loudly)
    "Remove fontification and activation overlays from links."
    (font-lock-default-unfontify-region beg end)
***************
*** 2239,2245 ****
    (org-back-to-heading t)
    (let* ((level (save-match-data (funcall outline-level)))
           (up-head (make-string (1- level) ?*)))
!     (if (= level 1) (error "Cannot promote to level 0. UNDO to recover."))
      (replace-match up-head nil t)
      (if org-adapt-indentation
          (org-fixup-indentation "^ " "" "^ ?\\S-"))))
--- 2239,2245 ----
    (org-back-to-heading t)
    (let* ((level (save-match-data (funcall outline-level)))
           (up-head (make-string (1- level) ?*)))
!     (if (= level 1) (error "Cannot promote to level 0. UNDO to recover"))
      (replace-match up-head nil t)
      (if org-adapt-indentation
          (org-fixup-indentation "^ " "" "^ ?\\S-"))))
***************
*** 2558,2564 ****
                  (end-of-line 0))
                ;; Make the heading visible, and the following as well
                (let ((org-show-following-heading t)) 
(org-show-hierarchy-above))
!               (if (re-search-forward 
                     (concat "^" (regexp-quote (make-string level ?*)) "[ \t]")
                     nil t)
                    (progn (goto-char (match-beginning 0)) (insert "\n")
--- 2558,2564 ----
                  (end-of-line 0))
                ;; Make the heading visible, and the following as well
                (let ((org-show-following-heading t)) 
(org-show-hierarchy-above))
!               (if (re-search-forward
                     (concat "^" (regexp-quote (make-string level ?*)) "[ \t]")
                     nil t)
                    (progn (goto-char (match-beginning 0)) (insert "\n")
***************
*** 2617,2627 ****
             (table (cond
                     (opt
                      (setq type :opt)
!                     (mapcar (lambda (x) 
                                (string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x)
                                (cons (match-string 2 x) (match-string 1 x)))
                              (org-split-string (org-get-current-options) 
"\n")))
!                    (texp 
                      (setq type :tex)
                      org-html-entities)
                     ((string-match "\\`\\*+[ \t]*\\'"
--- 2617,2627 ----
             (table (cond
                     (opt
                      (setq type :opt)
!                     (mapcar (lambda (x)
                                (string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x)
                                (cons (match-string 2 x) (match-string 1 x)))
                              (org-split-string (org-get-current-options) 
"\n")))
!                    (texp
                      (setq type :tex)
                      org-html-entities)
                     ((string-match "\\`\\*+[ \t]*\\'"
***************
*** 2631,2637 ****
                     (t (progn (ispell-complete-word arg) (throw 'exit nil)))))
             (completion (try-completion pattern table)))
        (cond ((eq completion t)
!              (if (equal type :opt) 
                   (insert (substring (cdr (assoc (upcase pattern) table))
                                      (length pattern)))))
              ((null completion)
--- 2631,2637 ----
                     (t (progn (ispell-complete-word arg) (throw 'exit nil)))))
             (completion (try-completion pattern table)))
        (cond ((eq completion t)
!              (if (equal type :opt)
                   (insert (substring (cdr (assoc (upcase pattern) table))
                                      (length pattern)))))
              ((null completion)
***************
*** 2639,2645 ****
               (ding))
              ((not (string= pattern completion))
               (delete-region beg end)
!              (if (string-match " +$" completion) 
                   (setq completion (replace-match "" t t completion)))
               (insert completion)
               (if (get-buffer-window "*Completions*")
--- 2639,2645 ----
               (ding))
              ((not (string= pattern completion))
               (delete-region beg end)
!              (if (string-match " +$" completion)
                   (setq completion (replace-match "" t t completion)))
               (insert completion)
               (if (get-buffer-window "*Completions*")
***************
*** 2876,2884 ****
    (save-match-data
      (if (not (string-match org-priority-regexp s))
          (* 1000 (- org-lowest-priority org-default-priority))
!       (* 1000 (- org-lowest-priority 
                   (string-to-char (match-string 2 s)))))))
!       
  ;;; Timestamps
  
  (defvar org-last-changed-timestamp nil)
--- 2876,2884 ----
    (save-match-data
      (if (not (string-match org-priority-regexp s))
          (* 1000 (- org-lowest-priority org-default-priority))
!       (* 1000 (- org-lowest-priority
                   (string-to-char (match-string 2 s)))))))
! 
  ;;; Timestamps
  
  (defvar org-last-changed-timestamp nil)
***************
*** 2910,2916 ****
        (setq time (let ((this-command this-command))
                     (org-read-date arg 'totime)))
        (and (org-at-timestamp-p) (replace-match
!                                  (setq org-last-changed-timestamp 
                                         (format-time-string fmt time))
                                   t t))
        (message "Timestamp updated"))
--- 2910,2916 ----
        (setq time (let ((this-command this-command))
                     (org-read-date arg 'totime)))
        (and (org-at-timestamp-p) (replace-match
!                                  (setq org-last-changed-timestamp
                                         (format-time-string fmt time))
                                   t t))
        (message "Timestamp updated"))
***************
*** 2940,2947 ****
  
  While prompting, a calendar is popped up - you can also select the
  date with the mouse (button 1).  The calendar shows a period of three
! month.  To scroll it to other months, use the keys `>' and `<'.  
! If you don't like the calendar, turn it off with 
         \(setq org-popup-calendar-for-date-prompt nil).
  
  With optional argument TO-TIME, the date will immediately be converted
--- 2940,2947 ----
  
  While prompting, a calendar is popped up - you can also select the
  date with the mouse (button 1).  The calendar shows a period of three
! month.  To scroll it to other months, use the keys `>' and `<'.
! If you don't like the calendar, turn it off with
         \(setq org-popup-calendar-for-date-prompt nil).
  
  With optional argument TO-TIME, the date will immediately be converted
***************
*** 2955,2961 ****
             ;; Default time is either today, or, when entering a range,
             ;; the range start.
             (if (save-excursion
!                  (re-search-backward 
                    (concat org-ts-regexp "--\\=")
                    (- (point) 20) t))
                 (apply
--- 2955,2961 ----
             ;; Default time is either today, or, when entering a range,
             ;; the range start.
             (if (save-excursion
!                  (re-search-backward
                    (concat org-ts-regexp "--\\=")
                    (- (point) 20) t))
                 (apply
***************
*** 3066,3072 ****
             (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
        (setq ans1 (format-time-string "%Y-%m-%d" time)))
      (if (active-minibuffer-window) (exit-minibuffer))))
!           
  (defun org-check-deadlines (ndays)
    "Check if there are any deadlines due or past due.
  A deadline is considered due if it happens within `org-deadline-warning-days'
--- 3066,3072 ----
             (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
        (setq ans1 (format-time-string "%Y-%m-%d" time)))
      (if (active-minibuffer-window) (exit-minibuffer))))
! 
  (defun org-check-deadlines (ndays)
    "Check if there are any deadlines due or past due.
  A deadline is considered due if it happens within `org-deadline-warning-days'
***************
*** 3106,3112 ****
        (goto-char (point-at-bol))
        (re-search-forward org-tr-regexp (point-at-eol) t))
      (if (not (org-at-date-range-p))
!         (error "Not at a time-stamp range, and none found in current line.")))
    (let* ((ts1 (match-string 1))
           (ts2 (match-string 2))
           (havetime (or (> (length ts1) 15) (> (length ts2) 15)))
--- 3106,3112 ----
        (goto-char (point-at-bol))
        (re-search-forward org-tr-regexp (point-at-eol) t))
      (if (not (org-at-date-range-p))
!         (error "Not at a time-stamp range, and none found in current line")))
    (let* ((ts1 (match-string 1))
           (ts2 (match-string 2))
           (havetime (or (> (length ts1) 15) (> (length ts2) 15)))
***************
*** 3358,3367 ****
    (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local)
    (add-hook 'pre-command-hook 'org-unhighlight nil 'local)
    (setq org-agenda-follow-mode nil)
!   (easy-menu-change 
     '("Agenda") "Agenda Files"
     (append
!     (list 
       ["Edit File List" (customize-variable 'org-agenda-files) t]
       "--")
     (mapcar 'org-file-menu-entry org-agenda-files)))
--- 3358,3367 ----
    (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local)
    (add-hook 'pre-command-hook 'org-unhighlight nil 'local)
    (setq org-agenda-follow-mode nil)
!   (easy-menu-change
     '("Agenda") "Agenda Files"
     (append
!     (list
       ["Edit File List" (customize-variable 'org-agenda-files) t]
       "--")
     (mapcar 'org-file-menu-entry org-agenda-files)))
***************
*** 3422,3428 ****
  (defvar org-agenda-keymap (copy-keymap org-agenda-mode-map)
    "Local keymap for agenda entries from Org-mode.")
  
! (define-key org-agenda-keymap 
    (if org-xemacs-p [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse)
  (define-key org-agenda-keymap
    (if org-xemacs-p [(button3)] [(mouse-3)]) 'org-agenda-show-mouse)
--- 3422,3428 ----
  (defvar org-agenda-keymap (copy-keymap org-agenda-mode-map)
    "Local keymap for agenda entries from Org-mode.")
  
! (define-key org-agenda-keymap
    (if org-xemacs-p [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse)
  (define-key org-agenda-keymap
    (if org-xemacs-p [(button3)] [(mouse-3)]) 'org-agenda-show-mouse)
***************
*** 3434,3440 ****
      ["Show" org-agenda-show t]
      ["Go To (other window)" org-agenda-goto t]
      ["Go To (one window)" org-agenda-switch-to t]
!     ["Follow Mode" org-agenda-follow-mode 
       :style toggle :selected org-agenda-follow-mode :active t]
      "--"
      ["Cycle TODO" org-agenda-todo t]
--- 3434,3440 ----
      ["Show" org-agenda-show t]
      ["Go To (other window)" org-agenda-goto t]
      ["Go To (one window)" org-agenda-switch-to t]
!     ["Follow Mode" org-agenda-follow-mode
       :style toggle :selected org-agenda-follow-mode :active t]
      "--"
      ["Cycle TODO" org-agenda-todo t]
***************
*** 3552,3558 ****
           (org-respect-restriction t)
           (past t)
           s e rtn d)
!     (setq org-agenda-redo-command 
            (list 'progn
                  (list 'switch-to-buffer-other-window (current-buffer))
                  (list 'org-timeline include-all)))
--- 3552,3558 ----
           (org-respect-restriction t)
           (past t)
           s e rtn d)
!     (setq org-agenda-redo-command
            (list 'progn
                  (list 'switch-to-buffer-other-window (current-buffer))
                  (list 'org-timeline include-all)))
***************
*** 3561,3567 ****
          (setq day-numbers (delq nil (mapcar (lambda(x)
                                                (if (>= x today) x nil))
                                              day-numbers))))
!     (switch-to-buffer-other-window 
       (get-buffer-create org-agenda-buffer-name))
      (setq buffer-read-only nil)
      (erase-buffer)
--- 3561,3567 ----
          (setq day-numbers (delq nil (mapcar (lambda(x)
                                                (if (>= x today) x nil))
                                              day-numbers))))
!     (switch-to-buffer-other-window
       (get-buffer-create org-agenda-buffer-name))
      (setq buffer-read-only nil)
      (erase-buffer)
***************
*** 3576,3582 ****
        (setq date (calendar-gregorian-from-absolute d))
        (setq s (point))
        (if dotodo
!           (setq rtn (org-agenda-get-day-entries 
                       entry date :todo :timestamp))
          (setq rtn (org-agenda-get-day-entries entry date :timestamp)))
        (if (or rtn (equal d today))
--- 3576,3582 ----
        (setq date (calendar-gregorian-from-absolute d))
        (setq s (point))
        (if dotodo
!           (setq rtn (org-agenda-get-day-entries
                       entry date :todo :timestamp))
          (setq rtn (org-agenda-get-day-entries entry date :timestamp)))
        (if (or rtn (equal d today))
***************
*** 3632,3638 ****
           (day-numbers (list start))
           (inhibit-redisplay t)
           s e rtn rtnall file date d start-pos end-pos todayp nd)
!     (setq org-agenda-redo-command 
            (list 'org-agenda include-all start-day ndays))
      ;; Make the list of days
      (setq ndays (or ndays org-agenda-ndays)
--- 3632,3638 ----
           (day-numbers (list start))
           (inhibit-redisplay t)
           s e rtn rtnall file date d start-pos end-pos todayp nd)
!     (setq org-agenda-redo-command
            (list 'org-agenda include-all start-day ndays))
      ;; Make the list of days
      (setq ndays (or ndays org-agenda-ndays)
***************
*** 3644,3650 ****
      (if (not (equal (current-buffer) (get-buffer org-agenda-buffer-name)))
          (progn
            (delete-other-windows)
!           (switch-to-buffer-other-window 
             (get-buffer-create org-agenda-buffer-name))))
      (setq buffer-read-only nil)
      (erase-buffer)
--- 3644,3650 ----
      (if (not (equal (current-buffer) (get-buffer org-agenda-buffer-name)))
          (progn
            (delete-other-windows)
!           (switch-to-buffer-other-window
             (get-buffer-create org-agenda-buffer-name))))
      (setq buffer-read-only nil)
      (erase-buffer)
***************
*** 3662,3668 ****
                  rtn (org-agenda-get-day-entries
                       file date :todo))
            (setq rtnall (append rtnall rtn))))
!       (when rtnall 
          (insert "ALL CURRENTLY OPEN TODO ITEMS:\n")
          (add-text-properties (point-min) (1- (point))
                               (list 'face 'org-link))
--- 3662,3668 ----
                  rtn (org-agenda-get-day-entries
                       file date :todo))
            (setq rtnall (append rtnall rtn))))
!       (when rtnall
          (insert "ALL CURRENTLY OPEN TODO ITEMS:\n")
          (add-text-properties (point-min) (1- (point))
                               (list 'face 'org-link))
***************
*** 3696,3707 ****
                              (extract-calendar-year date)))
              (put-text-property s (1- (point)) 'face
                                 'org-link)
!             (if rtnall (insert 
                          (org-finalize-agenda-entries ;; FIXME: condition 
needed
                           (org-agenda-add-time-grid-maybe
                            rtnall nd todayp))
                          "\n"))
!             (put-text-property s (1- (point)) 'day d))))            
      (goto-char (point-min))
      (setq buffer-read-only t)
      (if org-fit-agenda-window
--- 3696,3707 ----
                              (extract-calendar-year date)))
              (put-text-property s (1- (point)) 'face
                                 'org-link)
!             (if rtnall (insert
                          (org-finalize-agenda-entries ;; FIXME: condition 
needed
                           (org-agenda-add-time-grid-maybe
                            rtnall nd todayp))
                          "\n"))
!             (put-text-property s (1- (point)) 'day d))))
      (goto-char (point-min))
      (setq buffer-read-only t)
      (if org-fit-agenda-window
***************
*** 3791,3797 ****
      (error "Not allowed"))
    (setq org-agenda-ndays
          (if (equal org-agenda-ndays 1) 7 1))
!   (org-agenda include-all-loc 
                (or (get-text-property (point) 'day)
                    starting-day))
    (org-agenda-set-mode-name)
--- 3791,3797 ----
      (error "Not allowed"))
    (setq org-agenda-ndays
          (if (equal org-agenda-ndays 1) 7 1))
!   (org-agenda include-all-loc
                (or (get-text-property (point) 'day)
                    starting-day))
    (org-agenda-set-mode-name)
***************
*** 3806,3812 ****
    (if (not (re-search-forward "^\\S-" nil t arg))
        (progn
          (backward-char 1)
!         (error "No next date after this line in this buffer.")))
    (goto-char (match-beginning 0)))
  
  (defun org-agenda-previous-date-line (&optional arg)
--- 3806,3812 ----
    (if (not (re-search-forward "^\\S-" nil t arg))
        (progn
          (backward-char 1)
!         (error "No next date after this line in this buffer")))
    (goto-char (match-beginning 0)))
  
  (defun org-agenda-previous-date-line (&optional arg)
***************
*** 3814,3820 ****
    (interactive "p")
    (beginning-of-line 1)
    (if (not (re-search-backward "^\\S-" nil t arg))
!       (error "No previous date before this line in this buffer.")))
  
  ;; Initialize the highlight
  (defvar org-hl (funcall (if org-xemacs-p 'make-extent 'make-overlay) 1 1))
--- 3814,3820 ----
    (interactive "p")
    (beginning-of-line 1)
    (if (not (re-search-backward "^\\S-" nil t arg))
!       (error "No previous date before this line in this buffer")))
  
  ;; Initialize the highlight
  (defvar org-hl (funcall (if org-xemacs-p 'make-extent 'make-overlay) 1 1))
***************
*** 3880,3886 ****
    "Get the (Emacs Calendar) diary entries for DATE."
    (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
           (diary-display-hook '(fancy-diary-display))
!          (list-diary-entries-hook 
            (cons 'org-diary-default-entry list-diary-entries-hook))
           entries
           (org-disable-diary t))
--- 3880,3886 ----
    "Get the (Emacs Calendar) diary entries for DATE."
    (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
           (diary-display-hook '(fancy-diary-display))
!          (list-diary-entries-hook
            (cons 'org-diary-default-entry list-diary-entries-hook))
           entries
           (org-disable-diary t))
***************
*** 3904,3915 ****
          (kill-buffer fancy-diary-buffer)))
      (when entries
        (setq entries (org-split-string entries "\n"))
!       (setq entries 
!             (mapcar 
               (lambda (x)
                 (setq x (org-format-agenda-item "" x "Diary" 'time))
                 ;; Extend the text properties to the beginning of the line
!                (add-text-properties 
                  0 (length x)
                  (text-properties-at (1- (length x)) x)
                  x)
--- 3904,3915 ----
          (kill-buffer fancy-diary-buffer)))
      (when entries
        (setq entries (org-split-string entries "\n"))
!       (setq entries
!             (mapcar
               (lambda (x)
                 (setq x (org-format-agenda-item "" x "Diary" 'time))
                 ;; Extend the text properties to the beginning of the line
!                (add-text-properties
                  0 (length x)
                  (text-properties-at (1- (length x)) x)
                  x)
***************
*** 3950,3956 ****
            0 (length string)
            (list 'mouse-face 'highlight
                  'keymap org-agenda-keymap
!                 'help-echo 
                  (format
                   "mouse-2 or RET jump to diary file %s"
                   (abbreviate-file-name (buffer-file-name)))
--- 3950,3956 ----
            0 (length string)
            (list 'mouse-face 'highlight
                  'keymap org-agenda-keymap
!                 'help-echo
                  (format
                   "mouse-2 or RET jump to diary file %s"
                   (abbreviate-file-name (buffer-file-name)))
***************
*** 3972,3978 ****
  These are the files which are being checked for agenda entries.
  Optional argument FILE means, use this file instead of the current.
  It is possible (but not recommended) to add this function to the
! `org-mode-hook'." 
    (interactive)
    (catch 'exit
      (let* ((file (or file (buffer-file-name)
--- 3972,3978 ----
  These are the files which are being checked for agenda entries.
  Optional argument FILE means, use this file instead of the current.
  It is possible (but not recommended) to add this function to the
! `org-mode-hook'."
    (interactive)
    (catch 'exit
      (let* ((file (or file (buffer-file-name)
***************
*** 3987,3993 ****
                                 org-agenda-files))))
        (if (not present)
            (progn
!             (setq org-agenda-files 
                    (cons afile org-agenda-files))
              ;; Make sure custom.el does not end up with Org-mode
              (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
--- 3987,3993 ----
                                 org-agenda-files))))
        (if (not present)
            (progn
!             (setq org-agenda-files
                    (cons afile org-agenda-files))
              ;; Make sure custom.el does not end up with Org-mode
              (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
***************
*** 4004,4010 ****
    (let* ((file (or file (buffer-file-name)))
           (true-file (file-truename file))
           (afile (abbreviate-file-name file))
!          (files (delq nil (mapcar 
                             (lambda (x)
                               (if (equal true-file
                                          (file-truename x))
--- 4004,4010 ----
    (let* ((file (or file (buffer-file-name)))
           (true-file (file-truename file))
           (afile (abbreviate-file-name file))
!          (files (delq nil (mapcar
                             (lambda (x)
                               (if (equal true-file
                                          (file-truename x))
***************
*** 4089,4095 ****
  
  The function expects the lisp variables `entry' and `date' to be provided
  by the caller, because this is how the calendar works.  Don't use this
! function from a program - use `org-agenda-get-day-entries' instead." 
    (org-agenda-maybe-reset-markers)
    (org-compile-agenda-prefix-format org-agenda-prefix-format)
    (setq args (or args '(:deadline :scheduled :timestamp)))
--- 4089,4095 ----
  
  The function expects the lisp variables `entry' and `date' to be provided
  by the caller, because this is how the calendar works.  Don't use this
! function from a program - use `org-agenda-get-day-entries' instead."
    (org-agenda-maybe-reset-markers)
    (org-compile-agenda-prefix-format org-agenda-prefix-format)
    (setq args (or args '(:deadline :scheduled :timestamp)))
***************
*** 4131,4137 ****
                    (if (org-region-active-p)
                        ;; Respect a region to restrict search
                        (narrow-to-region (region-beginning) (region-end)))
!                 ;; If we work for the calendar or many files, 
                  ;; get rid of any restriction
                  (widen))
                ;; The way we repeatedly append to `results' makes it O(n^2) :-(
--- 4131,4137 ----
                    (if (org-region-active-p)
                        ;; Respect a region to restrict search
                        (narrow-to-region (region-beginning) (region-end)))
!                 ;; If we work for the calendar or many files,
                  ;; get rid of any restriction
                  (widen))
                ;; The way we repeatedly append to `results' makes it O(n^2) :-(
***************
*** 4197,4203 ****
        (goto-char (match-beginning 1))
        (setq marker (org-agenda-new-marker (point-at-bol))
              txt (org-format-agenda-item "" (match-string 1))
!             priority 
              (+ (org-get-priority txt)
                 (if org-todo-kwd-priority-p
                           (- org-todo-kwd-max-priority -2
--- 4197,4203 ----
        (goto-char (match-beginning 1))
        (setq marker (org-agenda-new-marker (point-at-bol))
              txt (org-format-agenda-item "" (match-string 1))
!             priority
              (+ (org-get-priority txt)
                 (if org-todo-kwd-priority-p
                           (- org-todo-kwd-max-priority -2
***************
*** 4269,4275 ****
                (if deadlinep
                    (add-text-properties
                     0 (length txt)
!                    (list 'face 
                           (if donep 'org-done 'org-warning)
                           'undone-face 'org-warning
                           'done-face 'org-done
--- 4269,4275 ----
                (if deadlinep
                    (add-text-properties
                     0 (length txt)
!                    (list 'face
                           (if donep 'org-done 'org-warning)
                           'undone-face 'org-warning
                           'done-face 'org-done
***************
*** 4329,4336 ****
                (setq txt org-agenda-no-heading-message))
              (when txt
                (add-text-properties
!                0 (length txt) 
!                (append 
                  (list 'org-marker (org-agenda-new-marker pos)
                        'org-hd-marker (org-agenda-new-marker pos1)
                        'priority (+ (- 10 diff) (org-get-priority txt))
--- 4329,4336 ----
                (setq txt org-agenda-no-heading-message))
              (when txt
                (add-text-properties
!                0 (length txt)
!                (append
                  (list 'org-marker (org-agenda-new-marker pos)
                        'org-hd-marker (org-agenda-new-marker pos1)
                        'priority (+ (- 10 diff) (org-get-priority txt))
***************
*** 4422,4428 ****
                    (setq hdmarker (org-agenda-new-marker (match-end 1)))
                    (goto-char (match-end 1))
                    (looking-at "\\*+[ \t]*\\([^\r\n]+\\)")
!                   (setq txt (org-format-agenda-item 
                               (format (if (= d1 d2) "" "(%d/%d): ")
                                       (1+ (- d0 d1)) (1+ (- d2 d1)))
                               (match-string 1) nil (if (= d0 d1) timestr))))
--- 4422,4428 ----
                    (setq hdmarker (org-agenda-new-marker (match-end 1)))
                    (goto-char (match-end 1))
                    (looking-at "\\*+[ \t]*\\([^\r\n]+\\)")
!                   (setq txt (org-format-agenda-item
                               (format (if (= d1 d2) "" "(%d/%d): ")
                                       (1+ (- d0 d1)) (1+ (- d2 d1)))
                               (match-string 1) nil (if (= d0 d1) timestr))))
***************
*** 4504,4510 ****
            (setq s0 (match-string 0 ts)
                  s1 (match-string (if plain 1 2) ts)
                  s2 (match-string (if plain 8 4) ts))
!           
            ;; If the times are in TXT (not in DOTIMES), and the prefix will 
list
            ;; them, we might want to remove them there to avoid duplication.
            ;; The user can turn this off with a variable.
--- 4504,4510 ----
            (setq s0 (match-string 0 ts)
                  s1 (match-string (if plain 1 2) ts)
                  s2 (match-string (if plain 8 4) ts))
! 
            ;; If the times are in TXT (not in DOTIMES), and the prefix will 
list
            ;; them, we might want to remove them there to avoid duplication.
            ;; The user can turn this off with a variable.
***************
*** 4517,4523 ****
          ;; Normalize the time(s) to 24 hour
          (if s1 (setq s1 (org-get-time-of-day s1 'string)))
          (if s2 (setq s2 (org-get-time-of-day s2 'string))))
!       
        ;; Create the final string
        (if noprefix
            (setq rtn txt)
--- 4517,4523 ----
          ;; Normalize the time(s) to 24 hour
          (if s1 (setq s1 (org-get-time-of-day s1 'string)))
          (if s2 (setq s2 (org-get-time-of-day s2 'string))))
! 
        ;; Create the final string
        (if noprefix
            (setq rtn txt)
***************
*** 4529,4535 ****
                category (if (symbolp category) (symbol-name category) 
category))
          ;; Evaluate the compiled format
          (setq rtn (concat (eval org-prefix-format-compiled) txt)))
!       
        ;; And finally add the text properties
        (add-text-properties
         0 (length rtn) (list 'category (downcase category)
--- 4529,4535 ----
                category (if (symbolp category) (symbol-name category) 
category))
          ;; Evaluate the compiled format
          (setq rtn (concat (eval org-prefix-format-compiled) txt)))
! 
        ;; And finally add the text properties
        (add-text-properties
         0 (length rtn) (list 'category (downcase category)
***************
*** 4560,4570 ****
        (while (setq time (pop gridtimes))
          (unless (and remove (member time have))
            (setq time (int-to-string time))
!           (push (org-format-agenda-item 
                   nil string "" ;; FIXME: put a category?
                   (concat (substring time 0 -2) ":" (substring time -2)))
                  new)
!           (put-text-property 
             1 (length (car new)) 'face 'org-time-grid (car new))))
        (if (member 'time-up org-agenda-sorting-strategy)
            (append new list)
--- 4560,4570 ----
        (while (setq time (pop gridtimes))
          (unless (and remove (member time have))
            (setq time (int-to-string time))
!           (push (org-format-agenda-item
                   nil string "" ;; FIXME: put a category?
                   (concat (substring time 0 -2) ":" (substring time -2)))
                  new)
!           (put-text-property
             1 (length (car new)) 'face 'org-time-grid (car new))))
        (if (member 'time-up org-agenda-sorting-strategy)
            (append new list)
***************
*** 4603,4609 ****
  The optional STRING argument forces conversion into a 5 character wide string
  HH:MM."
    (save-match-data
!     (when 
       (or
        (string-match
         "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s)
--- 4603,4609 ----
  The optional STRING argument forces conversion into a 5 character wide string
  HH:MM."
    (save-match-data
!     (when
       (or
        (string-match
         "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s)
***************
*** 4659,4665 ****
           (category-up (org-cmp-category a b))
           (category-down (if category-up (- category-up) nil))
           (category-keep (if category-up +1 nil)))  ; FIXME +1 or -1?
!     (cdr (assoc 
            (eval (cons 'or org-agenda-sorting-strategy))
            '((-1 . t) (1 . nil) (nil . nil))))))
  
--- 4659,4665 ----
           (category-up (org-cmp-category a b))
           (category-down (if category-up (- category-up) nil))
           (category-keep (if category-up +1 nil)))  ; FIXME +1 or -1?
!     (cdr (assoc
            (eval (cons 'or org-agenda-sorting-strategy))
            '((-1 . t) (1 . nil) (nil . nil))))))
  
***************
*** 4674,4680 ****
  (defun org-agenda-goto (&optional highlight)
    "Go to the Org-mode file which contains the item at point."
    (interactive)
!   (let* ((marker (or (get-text-property (point) 'org-marker) 
                       (org-agenda-error)))
           (buffer (marker-buffer marker))
           (pos (marker-position marker)))
--- 4674,4680 ----
  (defun org-agenda-goto (&optional highlight)
    "Go to the Org-mode file which contains the item at point."
    (interactive)
!   (let* ((marker (or (get-text-property (point) 'org-marker)
                       (org-agenda-error)))
           (buffer (marker-buffer marker))
           (pos (marker-position marker)))
***************
*** 4691,4697 ****
  (defun org-agenda-switch-to ()
    "Go to the Org-mode file which contains the item at point."
    (interactive)
!   (let* ((marker (or (get-text-property (point) 'org-marker) 
                       (org-agenda-error)))
           (buffer (marker-buffer marker))
           (pos (marker-position marker)))
--- 4691,4697 ----
  (defun org-agenda-switch-to ()
    "Go to the Org-mode file which contains the item at point."
    (interactive)
!   (let* ((marker (or (get-text-property (point) 'org-marker)
                       (org-agenda-error)))
           (buffer (marker-buffer marker))
           (pos (marker-position marker)))
***************
*** 4738,4744 ****
        (org-agenda-error)))
  
  (defun org-agenda-error ()
!   (error "Command not allowed in this line."))
  
  (defvar org-last-heading-marker (make-marker)
    "Marker pointing to the headline that last changed its TODO state
--- 4738,4744 ----
        (org-agenda-error)))
  
  (defun org-agenda-error ()
!   (error "Command not allowed in this line"))
  
  (defvar org-last-heading-marker (make-marker)
    "Marker pointing to the headline that last changed its TODO state
***************
*** 4805,4811 ****
                  (beginning-of-line 1)
                  (add-text-properties (point-at-bol) (point-at-eol) props)
                  (if fixface
!                     (add-text-properties 
                       (point-at-bol) (point-at-eol)
                       (list 'face
                             (if org-last-todo-state-is-todo
--- 4805,4811 ----
                  (beginning-of-line 1)
                  (add-text-properties (point-at-bol) (point-at-eol) props)
                  (if fixface
!                     (add-text-properties
                       (point-at-bol) (point-at-eol)
                       (list 'face
                             (if org-last-todo-state-is-todo
***************
*** 4902,4908 ****
  All the standard commands work: block, weekly etc"
    (interactive)
    (require 'diary-lib)
!   (let* ((char (progn 
                   (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early 
[a]nniversary [b]lock [c]yclic")
                   (read-char-exclusive)))
           (cmd (cdr (assoc char
--- 4902,4908 ----
  All the standard commands work: block, weekly etc"
    (interactive)
    (require 'diary-lib)
!   (let* ((char (progn
                   (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early 
[a]nniversary [b]lock [c]yclic")
                   (read-char-exclusive)))
           (cmd (cdr (assoc char
***************
*** 4932,4938 ****
            (progn
              (fset 'calendar-cursor-to-date
                    (lambda (&optional error)
!                     (calendar-gregorian-from-absolute 
                       (get-text-property point 'day))))
              (call-interactively cmd))
          (fset 'calendar-cursor-to-date oldf)))))
--- 4932,4938 ----
            (progn
              (fset 'calendar-cursor-to-date
                    (lambda (&optional error)
!                     (calendar-gregorian-from-absolute
                       (get-text-property point 'day))))
              (call-interactively cmd))
          (fset 'calendar-cursor-to-date oldf)))))
***************
*** 4955,4961 ****
            (progn
              (fset 'calendar-cursor-to-date
                    (lambda (&optional error)
!                     (calendar-gregorian-from-absolute 
                       (get-text-property point 'day))))
              (call-interactively cmd))
          (fset 'calendar-cursor-to-date oldf))))
--- 4955,4961 ----
            (progn
              (fset 'calendar-cursor-to-date
                    (lambda (&optional error)
!                     (calendar-gregorian-from-absolute
                       (get-text-property point 'day))))
              (call-interactively cmd))
          (fset 'calendar-cursor-to-date oldf))))
***************
*** 5005,5011 ****
      (unless day
        (error "Don't know which date to convert"))
      (setq date (calendar-gregorian-from-absolute day))
!     (setq s (concat 
               "Gregorian:  " (calendar-date-string date) "\n"
               "ISO:        " (calendar-iso-date-string date) "\n"
               "Day of Yr:  " (calendar-day-of-year-string date) "\n"
--- 5005,5011 ----
      (unless day
        (error "Don't know which date to convert"))
      (setq date (calendar-gregorian-from-absolute day))
!     (setq s (concat
               "Gregorian:  " (calendar-date-string date) "\n"
               "ISO:        " (calendar-iso-date-string date) "\n"
               "Day of Yr:  " (calendar-day-of-year-string date) "\n"
***************
*** 5064,5070 ****
              (setq type (match-string 1)
                    path (match-string 2)))
          (unless path
!           (error "No link found."))
          ;; Remove any trailing spaces in path
          (if (string-match " +\\'" path)
              (setq path (replace-match "" t t path)))
--- 5064,5070 ----
              (setq type (match-string 1)
                    path (match-string 2)))
          (unless path
!           (error "No link found"))
          ;; Remove any trailing spaces in path
          (if (string-match " +\\'" path)
              (setq path (replace-match "" t t path)))
***************
*** 5118,5126 ****
  
           ((string= type "shell")
            (let ((cmd path))
!             (while (string-match "@{" cmd) 
                (setq cmd (replace-match "<" t t cmd)))
!             (while (string-match "@}" cmd) 
                (setq cmd (replace-match ">" t t cmd)))
              (if (or (not org-confirm-shell-links)
                      (yes-or-no-p (format "Execute \"%s\" in the shell? " 
cmd)))
--- 5118,5126 ----
  
           ((string= type "shell")
            (let ((cmd path))
!             (while (string-match "@{" cmd)
                (setq cmd (replace-match "<" t t cmd)))
!             (while (string-match "@}" cmd)
                (setq cmd (replace-match ">" t t cmd)))
              (if (or (not org-confirm-shell-links)
                      (yes-or-no-p (format "Execute \"%s\" in the shell? " 
cmd)))
***************
*** 5217,5223 ****
                  (widen)
                  (goto-char (point-max))
                  (if (re-search-backward
!                      (concat "^Message-ID:\\s-+" (regexp-quote 
                                                    (or article "")))
                       nil t)
                      (rmail-what-message))))))
--- 5217,5223 ----
                  (widen)
                  (goto-char (point-max))
                  (if (re-search-backward
!                      (concat "^Message-ID:\\s-+" (regexp-quote
                                                    (or article "")))
                       nil t)
                      (rmail-what-message))))))
***************
*** 5304,5310 ****
                      (or (bbdb-record-name (bbdb-current-record))
                          (bbdb-record-company (bbdb-current-record))))
              link (org-make-link cpltxt)))
!      
       ((eq major-mode 'calendar-mode)
        (let ((cd (calendar-cursor-to-date)))
          (setq link
--- 5304,5310 ----
                      (or (bbdb-record-name (bbdb-current-record))
                          (bbdb-record-company (bbdb-current-record))))
              link (org-make-link cpltxt)))
! 
       ((eq major-mode 'calendar-mode)
        (let ((cd (calendar-cursor-to-date)))
          (setq link
***************
*** 5330,5337 ****
                             folder)
               (setq folder (replace-match "" t t folder)))
           (setq cpltxt (concat author " on: " subject))
!          (setq link (concat cpltxt "\n  " 
!                             (org-make-link 
                               "vm:" folder "#" message-id))))))
  
       ((eq major-mode 'wl-summary-mode)
--- 5330,5337 ----
                             folder)
               (setq folder (replace-match "" t t folder)))
           (setq cpltxt (concat author " on: " subject))
!          (setq link (concat cpltxt "\n  "
!                             (org-make-link
                               "vm:" folder "#" message-id))))))
  
       ((eq major-mode 'wl-summary-mode)
***************
*** 5343,5349 ****
               (author (wl-summary-line-from)) ; FIXME: how to get author name?
               (subject "???"))   ; FIXME: How to get subject of email?
          (setq cpltxt (concat author  " on: " subject))
!         (setq link (concat cpltxt "\n  " 
                             (org-make-link
                              "wl:" wl-summary-buffer-folder-name
                             "#" message-id)))))
--- 5343,5349 ----
               (author (wl-summary-line-from)) ; FIXME: how to get author name?
               (subject "???"))   ; FIXME: How to get subject of email?
          (setq cpltxt (concat author  " on: " subject))
!         (setq link (concat cpltxt "\n  "
                             (org-make-link
                              "wl:" wl-summary-buffer-folder-name
                             "#" message-id)))))
***************
*** 5357,5363 ****
                  (author (mail-fetch-field "from"))
                  (subject (mail-fetch-field "subject")))
              (setq cpltxt (concat author  " on: " subject))
!             (setq link (concat cpltxt "\n  " 
                                 (org-make-link
                                  "rmail:" folder "#" message-id)))))))
  
--- 5357,5363 ----
                  (author (mail-fetch-field "from"))
                  (subject (mail-fetch-field "subject")))
              (setq cpltxt (concat author  " on: " subject))
!             (setq link (concat cpltxt "\n  "
                                 (org-make-link
                                  "rmail:" folder "#" message-id)))))))
  
***************
*** 5411,5417 ****
        (if (org-xor org-line-numbers-in-file-links arg)
            (setq cpltxt
                  (concat cpltxt
!                         ":" (int-to-string 
                               (+ (if (bolp) 1 0) (count-lines
                                                   (point-min) (point)))))))
        (setq link (org-make-link cpltxt)))
--- 5411,5417 ----
        (if (org-xor org-line-numbers-in-file-links arg)
            (setq cpltxt
                  (concat cpltxt
!                         ":" (int-to-string
                               (+ (if (bolp) 1 0) (count-lines
                                                   (point-min) (point)))))))
        (setq link (org-make-link cpltxt)))
***************
*** 5581,5587 ****
  also indented so that it starts in the same column as the headline
  \(i.e. after the stars).
  
! See also the variable `org-reverse-note-order'."  
    (catch 'quit
      (let* ((txt (buffer-substring (point-min) (point-max)))
             (fastp current-prefix-arg)
--- 5581,5587 ----
  also indented so that it starts in the same column as the headline
  \(i.e. after the stars).
  
! See also the variable `org-reverse-note-order'."
    (catch 'quit
      (let* ((txt (buffer-substring (point-min) (point-max)))
             (fastp current-prefix-arg)
***************
*** 6071,6077 ****
  non-empty field above.  With argument N, use the Nth non-empty field.
  If the current field is not empty, it is copied down to the next row, and
  the cursor is moved with it.  Therefore, repeating this command causes the
! column to be filled row-by-row.  
  If the variable `org-table-copy-increment' is non-nil and the field is an
  integer, it will be incremented while copying."
    (interactive "p")
--- 6071,6077 ----
  non-empty field above.  With argument N, use the Nth non-empty field.
  If the current field is not empty, it is copied down to the next row, and
  the cursor is moved with it.  Therefore, repeating this command causes the
! column to be filled row-by-row.
  If the variable `org-table-copy-increment' is non-nil and the field is an
  integer, it will be incremented while copying."
    (interactive "p")
***************
*** 6162,6168 ****
  (defun org-table-goto-column (n &optional on-delim force)
    "Move the cursor to the Nth column in the current table line.
  With optional argument ON-DELIM, stop with point before the left delimiter
! of the field. 
  If there are less than N fields, just go to after the last delimiter.
  However, when FORCE is non-nil, create new columns if necessary."
    (let ((pos (point-at-eol)))
--- 6162,6168 ----
  (defun org-table-goto-column (n &optional on-delim force)
    "Move the cursor to the Nth column in the current table line.
  With optional argument ON-DELIM, stop with point before the left delimiter
! of the field.
  If there are less than N fields, just go to after the last delimiter.
  However, when FORCE is non-nil, create new columns if necessary."
    (let ((pos (point-at-eol)))
***************
*** 6363,6369 ****
      (if (not (org-at-table-p))
          (progn
            (goto-char pos)
!           (error "Cannot move row further.")))
      (goto-char pos)
      (beginning-of-line 1)
      (setq pos (point))
--- 6363,6369 ----
      (if (not (org-at-table-p))
          (progn
            (goto-char pos)
!           (error "Cannot move row further")))
      (goto-char pos)
      (beginning-of-line 1)
      (setq pos (point))
***************
*** 6450,6456 ****
      (goto-char beg)
      (org-table-check-inside-data-field)
      (setq l01 (count-lines (point-min) (point))
!           c01 (org-table-current-column)) 
      (goto-char end)
      (org-table-check-inside-data-field)
      (setq l02 (count-lines (point-min) (point))
--- 6450,6456 ----
      (goto-char beg)
      (org-table-check-inside-data-field)
      (setq l01 (count-lines (point-min) (point))
!           c01 (org-table-current-column))
      (goto-char end)
      (org-table-check-inside-data-field)
      (setq l02 (count-lines (point-min) (point))
***************
*** 6471,6477 ****
            (setq l1 (1+ l1)))))
      (setq org-table-clip (nreverse region))
      (if cut (org-table-align))))
!   
  (defun org-table-paste-rectangle ()
    "Paste a rectangular region into a table.
  The upper right corner ends up in the current field.  All involved fields
--- 6471,6477 ----
            (setq l1 (1+ l1)))))
      (setq org-table-clip (nreverse region))
      (if cut (org-table-align))))
! 
  (defun org-table-paste-rectangle ()
    "Paste a rectangular region into a table.
  The upper right corner ends up in the current field.  All involved fields
***************
*** 6582,6588 ****
                               (+ (length org-table-clip) arg)
                             arg)
                         (length org-table-clip)))
!         (setq org-table-clip 
                (mapcar 'list (org-wrap (mapconcat 'car org-table-clip " ")
                                        nil nlines)))
          (goto-char beg)
--- 6582,6588 ----
                               (+ (length org-table-clip) arg)
                             arg)
                         (length org-table-clip)))
!         (setq org-table-clip
                (mapcar 'list (org-wrap (mapconcat 'car org-table-clip " ")
                                        nil nlines)))
          (goto-char beg)
***************
*** 6637,6643 ****
                 (setq ll (org-do-wrap words w)))
               ll))
            (t (error "Cannot wrap this")))))
!            
  
  (defun org-do-wrap (words width)
    "Create lines of maximum width WIDTH (in characters) from word list WORDS."
--- 6637,6643 ----
                 (setq ll (org-do-wrap words w)))
               ll))
            (t (error "Cannot wrap this")))))
! 
  
  (defun org-do-wrap (words width)
    "Create lines of maximum width WIDTH (in characters) from word list WORDS."
***************
*** 6962,6968 ****
  
  ;;;###autoload
  (defun orgtbl-mode (&optional arg)
!   "The `org-mode' table editor as a minor mode for use in other modes." 
    (interactive)
    (if (eq major-mode 'org-mode)
        ;; Exit without error, in case some hook functions calls this
--- 6962,6968 ----
  
  ;;;###autoload
  (defun orgtbl-mode (&optional arg)
!   "The `org-mode' table editor as a minor mode for use in other modes."
    (interactive)
    (if (eq major-mode 'org-mode)
        ;; Exit without error, in case some hook functions calls this
***************
*** 6971,6977 ****
      (setq orgtbl-mode
            (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode)))
      (if orgtbl-mode
!         (progn 
            (set (make-local-variable (quote org-table-may-need-update)) t)
            (make-local-hook (quote before-change-functions))
            (add-hook 'before-change-functions 'org-before-change-function
--- 6971,6977 ----
      (setq orgtbl-mode
            (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode)))
      (if orgtbl-mode
!         (progn
            (set (make-local-variable (quote org-table-may-need-update)) t)
            (make-local-hook (quote before-change-functions))
            (add-hook 'before-change-functions 'org-before-change-function
***************
*** 6979,6985 ****
            (set (make-local-variable 'org-old-auto-fill-inhibit-regexp)
                 auto-fill-inhibit-regexp)
            (set (make-local-variable 'auto-fill-inhibit-regexp)
!                (if auto-fill-inhibit-regexp 
                     (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp)
                   "[ \t]*|"))
            (easy-menu-add orgtbl-mode-menu)
--- 6979,6985 ----
            (set (make-local-variable 'org-old-auto-fill-inhibit-regexp)
                 auto-fill-inhibit-regexp)
            (set (make-local-variable 'auto-fill-inhibit-regexp)
!                (if auto-fill-inhibit-regexp
                     (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp)
                   "[ \t]*|"))
            (easy-menu-add orgtbl-mode-menu)
***************
*** 7050,7060 ****
  
  ;; Special treatment needed for TAB and RET
  
! (define-key orgtbl-mode-map [(return)] 
    (orgtbl-make-binding 'orgtbl-ret [(return)] "\C-m"))
! (define-key orgtbl-mode-map "\C-m" 
    (orgtbl-make-binding 'orgtbl-ret "\C-m" [(return)]))
! (define-key orgtbl-mode-map [(tab)] 
    (orgtbl-make-binding 'orgtbl-tab [(tab)] "\C-i"))
  (define-key orgtbl-mode-map "\C-i"
    (orgtbl-make-binding 'orgtbl-tab "\C-i" [(tab)]))
--- 7050,7060 ----
  
  ;; Special treatment needed for TAB and RET
  
! (define-key orgtbl-mode-map [(return)]
    (orgtbl-make-binding 'orgtbl-ret [(return)] "\C-m"))
! (define-key orgtbl-mode-map "\C-m"
    (orgtbl-make-binding 'orgtbl-ret "\C-m" [(return)]))
! (define-key orgtbl-mode-map [(tab)]
    (orgtbl-make-binding 'orgtbl-tab [(tab)] "\C-i"))
  (define-key orgtbl-mode-map "\C-i"
    (orgtbl-make-binding 'orgtbl-tab "\C-i" [(tab)]))
***************
*** 7164,7170 ****
       ["Fill Rectangle" org-table-wrap-region :active (org-at-table-p) :keys 
"C-c C-q"])
      "--"
      ["Which Column?" org-table-current-column :active (org-at-table-p) :keys 
"C-c ?"]
!     ["Sum Column/Rectangle" org-table-sum 
       :active (or (org-at-table-p) (org-region-active-p)) :keys "C-c +"]
      ["Eval Formula" org-table-eval-formula :active (org-at-table-p) :keys 
"C-c ="]
      ))
--- 7164,7170 ----
       ["Fill Rectangle" org-table-wrap-region :active (org-at-table-p) :keys 
"C-c C-q"])
      "--"
      ["Which Column?" org-table-current-column :active (org-at-table-p) :keys 
"C-c ?"]
!     ["Sum Column/Rectangle" org-table-sum
       :active (or (org-at-table-p) (org-region-active-p)) :keys "C-c +"]
      ["Eval Formula" org-table-eval-formula :active (org-at-table-p) :keys 
"C-c ="]
      ))
***************
*** 7676,7682 ****
    (let* ((filename (concat (file-name-sans-extension (buffer-file-name))
                             ".txt"))
           (buffer (find-file-noselect filename))
!          (ore (concat 
                 (org-make-options-regexp
                  '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO"
                    "STARTUP" "ARCHIVE"
--- 7676,7682 ----
    (let* ((filename (concat (file-name-sans-extension (buffer-file-name))
                             ".txt"))
           (buffer (find-file-noselect filename))
!          (ore (concat
                 (org-make-options-regexp
                  '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO"
                    "STARTUP" "ARCHIVE"
***************
*** 7908,7914 ****
                             ;; This is a headline
                             (progn
                               (setq level (- (match-end 1) (match-beginning 1))
!                                    txt (save-match-data 
                                           (org-html-expand
                                            (match-string 3 line)))
                                     todo
--- 7908,7914 ----
                             ;; This is a headline
                             (progn
                               (setq level (- (match-end 1) (match-beginning 1))
!                                    txt (save-match-data
                                           (org-html-expand
                                            (match-string 3 line)))
                                     todo
***************
*** 8191,8197 ****
      (insert (mapconcat 'identity lines "\n"))
      (goto-char (point-min))
      (if (not (re-search-forward "|[^+]" nil t))
!         (error "Error processing table."))
      (table-recognize-table)
      (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer))
      (table-generate-source 'html " org-tmp2 ")
--- 8191,8197 ----
      (insert (mapconcat 'identity lines "\n"))
      (goto-char (point-min))
      (if (not (re-search-forward "|[^+]" nil t))
!         (error "Error processing table"))
      (table-recognize-table)
      (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer))
      (table-generate-source 'html " org-tmp2 ")
***************
*** 8566,8572 ****
  
  (defun org-shiftcursor-error ()
    "Throw an error because Shift-Cursor command was applied in wrong context."
!   (error "This command is only active in tables and on headlines."))
  
  (defun org-shifttab ()
    "Call `(org-cycle t)' or `org-table-previous-field'."
--- 8566,8572 ----
  
  (defun org-shiftcursor-error ()
    "Throw an error because Shift-Cursor command was applied in wrong context."
!   (error "This command is only active in tables and on headlines"))
  
  (defun org-shifttab ()
    "Call `(org-cycle t)' or `org-table-previous-field'."
***************
*** 8697,8703 ****
        (if (y-or-n-p "Convert inactive region to table? ")
            (org-table-convert-region (region-beginning) (region-end) arg)
          (error "Abort")))
!      (t (error "No table at point, and no region to make one.")))))
  
  (defun org-return ()
    "Call `org-table-next-row' or `newline'."
--- 8697,8703 ----
        (if (y-or-n-p "Convert inactive region to table? ")
            (org-table-convert-region (region-beginning) (region-end) arg)
          (error "Abort")))
!      (t (error "No table at point, and no region to make one")))))
  
  (defun org-return ()
    "Call `org-table-next-row' or `newline'."
***************
*** 8822,8828 ****
        ["Fill Rectangle" org-table-wrap-region (org-at-table-p)])
       "--"
       ["Which Column?" org-table-current-column (org-at-table-p)]
!      ["Sum Column/Rectangle" org-table-sum 
        (or (org-at-table-p) (org-region-active-p))]
       ["Eval Formula" org-table-eval-formula (org-at-table-p)]
       "--"
--- 8822,8828 ----
        ["Fill Rectangle" org-table-wrap-region (org-at-table-p)])
       "--"
       ["Which Column?" org-table-current-column (org-at-table-p)]
!      ["Sum Column/Rectangle" org-table-sum
        (or (org-at-table-p) (org-region-active-p))]
       ["Eval Formula" org-table-eval-formula (org-at-table-p)]
       "--"
***************
*** 8865,8874 ****
    (Info-goto-node (format "(org)%s" (or node ""))))
  
  (defun org-install-agenda-files-menu ()
!   (easy-menu-change 
     '("Org") "File List for Agenda"
     (append
!     (list 
       ["Edit File List" (customize-variable 'org-agenda-files) t]
       ["Add Current File to List" org-add-file t]
       ["Remove Current File from List" org-remove-file t]
--- 8865,8874 ----
    (Info-goto-node (format "(org)%s" (or node ""))))
  
  (defun org-install-agenda-files-menu ()
!   (easy-menu-change
     '("Org") "File List for Agenda"
     (append
!     (list
       ["Edit File List" (customize-variable 'org-agenda-files) t]
       ["Add Current File to List" org-add-file t]
       ["Remove Current File from List" org-remove-file t]
***************
*** 8983,8989 ****
  ;; Functions needed for compatibility with old outline.el
  
  ;; The following functions capture almost the entire compatibility code
! ;; between the different versions of outline-mode.  The only other place 
  ;; where this is important are the font-lock-keywords.  Search for
  ;; `org-noutline-p' to find it.
  
--- 8983,8989 ----
  ;; Functions needed for compatibility with old outline.el
  
  ;; The following functions capture almost the entire compatibility code
! ;; between the different versions of outline-mode.  The only other place
  ;; where this is important are the font-lock-keywords.  Search for
  ;; `org-noutline-p' to find it.
  
***************
*** 9048,9054 ****
  This function considers both visible and invisible heading lines.
  With argument, move up ARG levels."
    (if org-noutline-p
!       (if (fboundp 'outline-up-heading-all) 
            (outline-up-heading-all arg)   ; emacs 21 version of outline.el
          (outline-up-heading arg t))      ; emacs 22 version of outline.el
      (org-back-to-heading t)
--- 9048,9054 ----
  This function considers both visible and invisible heading lines.
  With argument, move up ARG levels."
    (if org-noutline-p
!       (if (fboundp 'outline-up-heading-all)
            (outline-up-heading-all arg)   ; emacs 21 version of outline.el
          (outline-up-heading arg t))      ; emacs 22 version of outline.el
      (org-back-to-heading t)
***************
*** 9104,9111 ****
  
  (defun org-show-subtree ()
    "Show everything after this heading at deeper levels."
!   (outline-flag-region 
!    (point) 
     (save-excursion
       (outline-end-of-subtree) (outline-next-heading) (point))
     (if org-noutline-p nil ?\n)))
--- 9104,9111 ----
  
  (defun org-show-subtree ()
    "Show everything after this heading at deeper levels."
!   (outline-flag-region
!    (point)
     (save-excursion
       (outline-end-of-subtree) (outline-next-heading) (point))
     (if org-noutline-p nil ?\n)))
***************
*** 9116,9122 ****
    (interactive)
    (save-excursion
      (org-back-to-heading t)
!     (outline-flag-region 
       (1- (point))
       (save-excursion
         (re-search-forward (concat "[\r\n]\\(" outline-regexp "\\)") nil 'move)
--- 9116,9122 ----
    (interactive)
    (save-excursion
      (org-back-to-heading t)
!     (outline-flag-region
       (1- (point))
       (save-excursion
         (re-search-forward (concat "[\r\n]\\(" outline-regexp "\\)") nil 'move)




reply via email to

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