aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-01-18 16:19:21 +0000
committerStefan Monnier2006-01-18 16:19:21 +0000
commitf462ee2c28b52d1637d3383b9da8983f83ccb88d (patch)
treebdd1236d817e0ace17136eaa45c3fe1867226eb6
parent5d724235437912e7c5cd1214fd09f91e7daa774b (diff)
downloademacs-f462ee2c28b52d1637d3383b9da8983f83ccb88d.tar.gz
emacs-f462ee2c28b52d1637d3383b9da8983f83ccb88d.zip
Move defvars out of eval-when-compile. Move code
that was after the end of file. Use buffer-file-name variable. (org-timestamp-change): Use with-current-buffer. (org-todo-list): Don't unnecessarily define a new buffer-local var. (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused arg `file'.
-rw-r--r--lisp/textmodes/org.el214
1 files changed, 106 insertions, 108 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 92854893b25..7c686091319 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -1875,43 +1875,42 @@ When this is non-nil, the headline after the keyword is set to the
1875 1875
1876;; Tell the compiler about dynamically scoped variables, 1876;; Tell the compiler about dynamically scoped variables,
1877;; and variables from other packages 1877;; and variables from other packages
1878(eval-when-compile 1878(defvar zmacs-regions)
1879 (defvar zmacs-regions) 1879(defvar original-date)
1880 (defvar original-date) 1880(defvar org-transient-mark-mode)
1881 (defvar org-transient-mark-mode) 1881(defvar org-old-auto-fill-inhibit-regexp)
1882 (defvar org-old-auto-fill-inhibit-regexp) 1882(defvar orgtbl-mode-menu)
1883 (defvar orgtbl-mode-menu) 1883(defvar org-html-entities)
1884 (defvar org-html-entities) 1884(defvar org-goto-start-pos)
1885 (defvar org-goto-start-pos) 1885(defvar org-cursor-color)
1886 (defvar org-cursor-color) 1886(defvar org-time-was-given)
1887 (defvar org-time-was-given) 1887(defvar org-ts-what)
1888 (defvar org-ts-what) 1888(defvar mark-active)
1889 (defvar mark-active) 1889(defvar timecnt)
1890 (defvar timecnt) 1890(defvar levels-open)
1891 (defvar levels-open) 1891(defvar title)
1892 (defvar title) 1892(defvar author)
1893 (defvar author) 1893(defvar email)
1894 (defvar email) 1894(defvar text)
1895 (defvar text) 1895(defvar entry)
1896 (defvar entry) 1896(defvar date)
1897 (defvar date) 1897(defvar language)
1898 (defvar language) 1898(defvar options)
1899 (defvar options) 1899(defvar ans1)
1900 (defvar ans1) 1900(defvar ans2)
1901 (defvar ans2) 1901(defvar starting-day)
1902 (defvar starting-day) 1902(defvar include-all-loc)
1903 (defvar include-all-loc) 1903(defvar vm-message-pointer)
1904 (defvar vm-message-pointer) 1904(defvar vm-folder-directory)
1905 (defvar vm-folder-directory) 1905(defvar wl-summary-buffer-elmo-folder)
1906 (defvar wl-summary-buffer-elmo-folder) 1906(defvar wl-summary-buffer-folder-name)
1907 (defvar wl-summary-buffer-folder-name) 1907(defvar gnus-group-name)
1908 (defvar gnus-group-name) 1908(defvar gnus-article-current)
1909 (defvar gnus-article-current) 1909(defvar w3m-current-url)
1910 (defvar w3m-current-url) 1910(defvar org-selected-point)
1911 (defvar org-selected-point) 1911(defvar calendar-mode-map)
1912 (defvar calendar-mode-map) 1912(defvar remember-save-after-remembering)
1913 (defvar remember-save-after-remembering) 1913(defvar remember-data-file)
1914 (defvar remember-data-file))
1915 1914
1916 1915
1917;;; Define the mode 1916;;; Define the mode
@@ -3101,7 +3100,7 @@ heading be marked DONE, and the current time will be added."
3101 (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) 3100 (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location)
3102 (progn 3101 (progn
3103 (setq file (format (match-string 1 org-archive-location) 3102 (setq file (format (match-string 1 org-archive-location)
3104 (file-name-nondirectory (buffer-file-name))) 3103 (file-name-nondirectory buffer-file-name))
3105 heading (match-string 2 org-archive-location))) 3104 heading (match-string 2 org-archive-location)))
3106 (error "Invalid `org-archive-location'")) 3105 (error "Invalid `org-archive-location'"))
3107 (if (> (length file) 0) 3106 (if (> (length file) 0)
@@ -4032,9 +4031,8 @@ in the timestamp determines what will be changed."
4032 (nthcdr 6 time0)))) 4031 (nthcdr 6 time0))))
4033 (if (eq what 'calendar) 4032 (if (eq what 'calendar)
4034 (let ((cal-date 4033 (let ((cal-date
4035 (save-excursion 4034 (save-match-data
4036 (save-match-data 4035 (with-current-buffer "*Calendar*"
4037 (set-buffer "*Calendar*")
4038 (calendar-cursor-to-date))))) 4036 (calendar-cursor-to-date)))))
4039 (setcar (nthcdr 4 time0) (nth 0 cal-date)) ; month 4037 (setcar (nthcdr 4 time0) (nth 0 cal-date)) ; month
4040 (setcar (nthcdr 3 time0) (nth 1 cal-date)) ; day 4038 (setcar (nthcdr 3 time0) (nth 1 cal-date)) ; day
@@ -4287,7 +4285,7 @@ first press `1' to indicate that the agenda should be temporarily (until the
4287next use of \\[org-agenda]) restricted to the current file." 4285next use of \\[org-agenda]) restricted to the current file."
4288 (interactive "P") 4286 (interactive "P")
4289 (catch 'exit 4287 (catch 'exit
4290 (let ((restrict-ok (and (buffer-file-name) (eq major-mode 'org-mode))) 4288 (let ((restrict-ok (and buffer-file-name (eq major-mode 'org-mode)))
4291 (custom org-agenda-custom-commands) 4289 (custom org-agenda-custom-commands)
4292 c entry key type string) 4290 c entry key type string)
4293 (put 'org-agenda-files 'org-restrict nil) 4291 (put 'org-agenda-files 'org-restrict nil)
@@ -4322,7 +4320,7 @@ C Configure your own agenda commands")
4322 (message "") 4320 (message "")
4323 (when (equal c ?1) 4321 (when (equal c ?1)
4324 (if restrict-ok 4322 (if restrict-ok
4325 (put 'org-agenda-files 'org-restrict (list (buffer-file-name))) 4323 (put 'org-agenda-files 'org-restrict (list buffer-file-name))
4326 (error "Cannot restrict agenda to current buffer")) 4324 (error "Cannot restrict agenda to current buffer"))
4327 (message "Press key for agenda command%s" 4325 (message "Press key for agenda command%s"
4328 (if restrict-ok " (restricted to current file)" "")) 4326 (if restrict-ok " (restricted to current file)" ""))
@@ -4446,8 +4444,8 @@ dates."
4446 (dotodo include-all) 4444 (dotodo include-all)
4447 (doclosed org-agenda-show-log) 4445 (doclosed org-agenda-show-log)
4448 (org-agenda-keep-modes keep-modes) 4446 (org-agenda-keep-modes keep-modes)
4449 (entry (buffer-file-name)) 4447 (entry buffer-file-name)
4450 (org-agenda-files (list (buffer-file-name))) 4448 (org-agenda-files (list buffer-file-name))
4451 (date (calendar-current-date)) 4449 (date (calendar-current-date))
4452 (win (selected-window)) 4450 (win (selected-window))
4453 (pos1 (point)) 4451 (pos1 (point))
@@ -4674,10 +4672,9 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
4674 (erase-buffer) 4672 (erase-buffer)
4675 (org-agenda-mode) (setq buffer-read-only nil) 4673 (org-agenda-mode) (setq buffer-read-only nil)
4676 (set (make-local-variable 'org-agenda-type) 'todo) 4674 (set (make-local-variable 'org-agenda-type) 'todo)
4677 (set (make-local-variable 'last-arg) arg)
4678 (set (make-local-variable 'org-todo-keywords) kwds) 4675 (set (make-local-variable 'org-todo-keywords) kwds)
4679 (set (make-local-variable 'org-agenda-redo-command) 4676 (set (make-local-variable 'org-agenda-redo-command)
4680 '(org-todo-list (or current-prefix-arg last-arg) t)) 4677 `(org-todo-list (or current-prefix-arg ',arg) t))
4681 (setq files (org-agenda-files) 4678 (setq files (org-agenda-files)
4682 rtnall nil) 4679 rtnall nil)
4683 (while (setq file (pop files)) 4680 (while (setq file (pop files))
@@ -4974,7 +4971,7 @@ date. Itt also removes lines that contain only whitespace."
4974 "Make the position visible." 4971 "Make the position visible."
4975 (if (and org-disable-agenda-to-diary ;; called from org-agenda 4972 (if (and org-disable-agenda-to-diary ;; called from org-agenda
4976 (stringp string) 4973 (stringp string)
4977 (buffer-file-name)) 4974 buffer-file-name)
4978 (setq string (org-modify-diary-entry-string string)))))) 4975 (setq string (org-modify-diary-entry-string string))))))
4979 4976
4980(defun org-modify-diary-entry-string (string) 4977(defun org-modify-diary-entry-string (string)
@@ -4986,7 +4983,7 @@ date. Itt also removes lines that contain only whitespace."
4986 'help-echo 4983 'help-echo
4987 (format 4984 (format
4988 "mouse-2 or RET jump to diary file %s" 4985 "mouse-2 or RET jump to diary file %s"
4989 (abbreviate-file-name (buffer-file-name))) 4986 (abbreviate-file-name buffer-file-name))
4990 'org-agenda-diary-link t 4987 'org-agenda-diary-link t
4991 'org-marker (org-agenda-new-marker (point-at-bol))) 4988 'org-marker (org-agenda-new-marker (point-at-bol)))
4992 string) 4989 string)
@@ -5008,7 +5005,7 @@ If the current buffer visits an agenda file, find the next one in the list.
5008If the current buffer does not, find the first agenda file." 5005If the current buffer does not, find the first agenda file."
5009 (interactive) 5006 (interactive)
5010 (let ((files (append org-agenda-files (list (car org-agenda-files)))) 5007 (let ((files (append org-agenda-files (list (car org-agenda-files))))
5011 (tcf (if (buffer-file-name) (file-truename (buffer-file-name)))) 5008 (tcf (if buffer-file-name (file-truename buffer-file-name)))
5012 file) 5009 file)
5013 (unless files (error "No agenda files")) 5010 (unless files (error "No agenda files"))
5014 (catch 'exit 5011 (catch 'exit
@@ -5019,30 +5016,28 @@ If the current buffer does not, find the first agenda file."
5019 (throw 'exit t)))) 5016 (throw 'exit t))))
5020 (find-file (car org-agenda-files))))) 5017 (find-file (car org-agenda-files)))))
5021 5018
5022(defun org-agenda-file-to-end (&optional file) 5019(defun org-agenda-file-to-end ()
5023 "Move/add the current file to the end of the agenda fiole list. 5020 "Move/add the current file to the end of the agenda fiole list.
5024I the file is not present in the list, it is appended ot the list. If it is 5021If the file is not present in the list, append it to the list. If it is
5025present, it is moved there." 5022present, move it there."
5026 (interactive) 5023 (interactive)
5027 (org-agenda-file-to-front 'to-end file)) 5024 (org-agenda-file-to-front 'to-end))
5028 5025
5029(defun org-agenda-file-to-front (&optional to-end file) 5026(defun org-agenda-file-to-front (&optional to-end)
5030 "Move/add the current file to the top of the agenda file list. 5027 "Move/add the current file to the top of the agenda file list.
5031If the file is not present in the list, it is added to the front. If it is 5028If the file is not present in the list, add it to the front. If it is
5032present, it is moved there. With optional argument TO-END, add/move to the 5029present, it move it there. With optional argument TO-END, add/move to the
5033end of the list." 5030end of the list."
5034 (interactive "P") 5031 (interactive "P")
5035 (let ((file-alist (mapcar (lambda (x) 5032 (let* ((file-alist (mapcar (lambda (x)
5036 (cons (file-truename x) x)) 5033 (cons (file-truename x) x))
5037 org-agenda-files)) 5034 org-agenda-files))
5038 (ctf (file-truename (buffer-file-name))) 5035 (ctf (file-truename buffer-file-name))
5039 x had) 5036 (had (assoc ctf file-alist))
5040 (setq x (assoc ctf file-alist) had x) 5037 (x (or had (cons ctf (abbreviate-file-name buffer-file-name)))))
5041 5038 (setq file-alist (if to-end
5042 (if (not x) (setq x (cons ctf (abbreviate-file-name (buffer-file-name))))) 5039 (append (delq x file-alist) (list x))
5043 (if to-end 5040 (cons x (delq x file-alist))))
5044 (setq file-alist (append (delq x file-alist) (list x)))
5045 (setq file-alist (cons x (delq x file-alist))))
5046 (setq org-agenda-files (mapcar 'cdr file-alist)) 5041 (setq org-agenda-files (mapcar 'cdr file-alist))
5047 (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode)) 5042 (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
5048 (customize-save-variable 'org-agenda-files org-agenda-files)) 5043 (customize-save-variable 'org-agenda-files org-agenda-files))
@@ -5055,7 +5050,7 @@ end of the list."
5055These are the files which are being checked for agenda entries. 5050These are the files which are being checked for agenda entries.
5056Optional argument FILE means, use this file instead of the current." 5051Optional argument FILE means, use this file instead of the current."
5057 (interactive) 5052 (interactive)
5058 (let* ((file (or file (buffer-file-name))) 5053 (let* ((file (or file buffer-file-name))
5059 (true-file (file-truename file)) 5054 (true-file (file-truename file))
5060 (afile (abbreviate-file-name file)) 5055 (afile (abbreviate-file-name file))
5061 (files (delq nil (mapcar 5056 (files (delq nil (mapcar
@@ -5179,9 +5174,9 @@ function from a program - use `org-agenda-get-day-entries' instead."
5179 (cond 5174 (cond
5180 ((null org-category) 5175 ((null org-category)
5181 (setq org-category 5176 (setq org-category
5182 (if (buffer-file-name) 5177 (if buffer-file-name
5183 (file-name-sans-extension 5178 (file-name-sans-extension
5184 (file-name-nondirectory (buffer-file-name))) 5179 (file-name-nondirectory buffer-file-name))
5185 "???"))) 5180 "???")))
5186 ((symbolp org-category) (symbol-name org-category)) 5181 ((symbolp org-category) (symbol-name org-category))
5187 (t org-category)) 5182 (t org-category))
@@ -5278,7 +5273,7 @@ the documentation of `org-diary'."
5278 'keymap org-agenda-keymap 5273 'keymap org-agenda-keymap
5279 'help-echo 5274 'help-echo
5280 (format "mouse-2 or RET jump to org file %s" 5275 (format "mouse-2 or RET jump to org file %s"
5281 (abbreviate-file-name (buffer-file-name))))) 5276 (abbreviate-file-name buffer-file-name))))
5282 (regexp (concat "[\n\r]\\*+ *\\(" 5277 (regexp (concat "[\n\r]\\*+ *\\("
5283 (if org-select-this-todo-keyword 5278 (if org-select-this-todo-keyword
5284 (concat "\\<\\(" org-select-this-todo-keyword 5279 (concat "\\<\\(" org-select-this-todo-keyword
@@ -5320,7 +5315,7 @@ the documentation of `org-diary'."
5320 'keymap org-agenda-keymap 5315 'keymap org-agenda-keymap
5321 'help-echo 5316 'help-echo
5322 (format "mouse-2 or RET jump to org file %s" 5317 (format "mouse-2 or RET jump to org file %s"
5323 (abbreviate-file-name (buffer-file-name))))) 5318 (abbreviate-file-name buffer-file-name))))
5324 (regexp (regexp-quote 5319 (regexp (regexp-quote
5325 (substring 5320 (substring
5326 (format-time-string 5321 (format-time-string
@@ -5397,7 +5392,7 @@ the documentation of `org-diary'."
5397 'keymap org-agenda-keymap 5392 'keymap org-agenda-keymap
5398 'help-echo 5393 'help-echo
5399 (format "mouse-2 or RET jump to org file %s" 5394 (format "mouse-2 or RET jump to org file %s"
5400 (abbreviate-file-name (buffer-file-name))))) 5395 (abbreviate-file-name buffer-file-name))))
5401 (regexp (concat 5396 (regexp (concat
5402 "\\<" org-closed-string " *\\[" 5397 "\\<" org-closed-string " *\\["
5403 (regexp-quote 5398 (regexp-quote
@@ -5453,7 +5448,7 @@ the documentation of `org-diary'."
5453 'keymap org-agenda-keymap 5448 'keymap org-agenda-keymap
5454 'help-echo 5449 'help-echo
5455 (format "mouse-2 or RET jump to org file %s" 5450 (format "mouse-2 or RET jump to org file %s"
5456 (abbreviate-file-name (buffer-file-name))))) 5451 (abbreviate-file-name buffer-file-name))))
5457 (regexp org-deadline-time-regexp) 5452 (regexp org-deadline-time-regexp)
5458 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar 5453 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
5459 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar 5454 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
@@ -5515,7 +5510,7 @@ the documentation of `org-diary'."
5515 'keymap org-agenda-keymap 5510 'keymap org-agenda-keymap
5516 'help-echo 5511 'help-echo
5517 (format "mouse-2 or RET jump to org file %s" 5512 (format "mouse-2 or RET jump to org file %s"
5518 (abbreviate-file-name (buffer-file-name))))) 5513 (abbreviate-file-name buffer-file-name))))
5519 (regexp org-scheduled-time-regexp) 5514 (regexp org-scheduled-time-regexp)
5520 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar 5515 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
5521 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar 5516 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
@@ -5564,7 +5559,7 @@ the documentation of `org-diary'."
5564 'keymap org-agenda-keymap 5559 'keymap org-agenda-keymap
5565 'help-echo 5560 'help-echo
5566 (format "mouse-2 or RET jump to org file %s" 5561 (format "mouse-2 or RET jump to org file %s"
5567 (abbreviate-file-name (buffer-file-name))))) 5562 (abbreviate-file-name buffer-file-name))))
5568 (regexp org-tr-regexp) 5563 (regexp org-tr-regexp)
5569 (d0 (calendar-absolute-from-gregorian date)) 5564 (d0 (calendar-absolute-from-gregorian date))
5570 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags) 5565 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags)
@@ -5637,6 +5632,8 @@ After a match, the following groups carry important information:
5637 "A flag, set by `org-compile-prefix-format'. 5632 "A flag, set by `org-compile-prefix-format'.
5638The flag is set if the currently compiled format contains a `%t'.") 5633The flag is set if the currently compiled format contains a `%t'.")
5639 5634
5635(defvar time) ;Needed for the eval of the prefix format.
5636(defvar tag) ;Presumably, same thing as above.
5640(defun org-format-agenda-item (extra txt &optional category tags dotime noprefix) 5637(defun org-format-agenda-item (extra txt &optional category tags dotime noprefix)
5641 "Format TXT to be inserted into the agenda buffer. 5638 "Format TXT to be inserted into the agenda buffer.
5642In particular, it adds the prefix and corresponding text properties. EXTRA 5639In particular, it adds the prefix and corresponding text properties. EXTRA
@@ -5654,9 +5651,9 @@ only the correctly processes TXT should be returned - this is used by
5654 (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt))) 5651 (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
5655 (let* ((category (or category 5652 (let* ((category (or category
5656 org-category 5653 org-category
5657 (if (buffer-file-name) 5654 (if buffer-file-name
5658 (file-name-sans-extension 5655 (file-name-sans-extension
5659 (file-name-nondirectory (buffer-file-name))) 5656 (file-name-nondirectory buffer-file-name))
5660 ""))) 5657 "")))
5661 (tag (or (nth (1- (length tags)) tags) "")) 5658 (tag (or (nth (1- (length tags)) tags) ""))
5662 time ;; needed for the eval of the prefix format 5659 time ;; needed for the eval of the prefix format
@@ -5819,6 +5816,9 @@ HH:MM."
5819 ((< tb ta) +1) 5816 ((< tb ta) +1)
5820 (t nil)))) 5817 (t nil))))
5821 5818
5819(defvar time-up) (defvar time-down)
5820(defvar priority-up) (defvar priority-down)
5821(defvar category-up) (defvar category-down) (defvar category-keep)
5822(defun org-entries-lessp (a b) 5822(defun org-entries-lessp (a b)
5823 "Predicate for sorting agenda entries." 5823 "Predicate for sorting agenda entries."
5824 ;; The following variables will be used when the form is evaluated. 5824 ;; The following variables will be used when the form is evaluated.
@@ -6260,7 +6260,7 @@ d are included in the output."
6260 'keymap org-agenda-keymap 6260 'keymap org-agenda-keymap
6261 'help-echo 6261 'help-echo
6262 (format "mouse-2 or RET jump to org file %s" 6262 (format "mouse-2 or RET jump to org file %s"
6263 (abbreviate-file-name (buffer-file-name))))) 6263 (abbreviate-file-name buffer-file-name))))
6264 lspos 6264 lspos
6265 tags tags-list tags-alist (llast 0) rtn level category i txt 6265 tags tags-list tags-alist (llast 0) rtn level category i txt
6266 todo marker) 6266 todo marker)
@@ -6862,7 +6862,7 @@ openen in emacs.
6862If the file does not exist, an error is thrown." 6862If the file does not exist, an error is thrown."
6863 (setq in-emacs (or in-emacs line search)) 6863 (setq in-emacs (or in-emacs line search))
6864 (let* ((file (if (equal path "") 6864 (let* ((file (if (equal path "")
6865 (buffer-file-name) 6865 buffer-file-name
6866 (convert-standard-filename (org-expand-file-name path)))) 6866 (convert-standard-filename (org-expand-file-name path))))
6867 (dfile (downcase file)) 6867 (dfile (downcase file))
6868 ext cmd apps) 6868 ext cmd apps)
@@ -6893,7 +6893,7 @@ If the file does not exist, an error is thrown."
6893 (shell-command (concat cmd " &")))) 6893 (shell-command (concat cmd " &"))))
6894 ((or (stringp cmd) 6894 ((or (stringp cmd)
6895 (eq cmd 'emacs)) 6895 (eq cmd 'emacs))
6896 (unless (equal (file-truename file) (file-truename (buffer-file-name))) 6896 (unless (equal (file-truename file) (file-truename buffer-file-name))
6897 (funcall (cdr (assq 'file org-link-frame-setup)) file)) 6897 (funcall (cdr (assq 'file org-link-frame-setup)) file))
6898 (if line (goto-line line) 6898 (if line (goto-line line)
6899 (if search (org-link-search search)))) 6899 (if search (org-link-search search))))
@@ -6956,7 +6956,7 @@ For file links, arg negates `org-context-in-file-links'."
6956 (save-excursion 6956 (save-excursion
6957 (vm-select-folder-buffer) 6957 (vm-select-folder-buffer)
6958 (let* ((message (car vm-message-pointer)) 6958 (let* ((message (car vm-message-pointer))
6959 (folder (buffer-file-name)) 6959 (folder buffer-file-name)
6960 (subject (vm-su-subject message)) 6960 (subject (vm-su-subject message))
6961 (author (vm-su-full-name message)) 6961 (author (vm-su-full-name message))
6962 (message-id (vm-su-message-id message))) 6962 (message-id (vm-su-message-id message)))
@@ -6987,7 +6987,7 @@ For file links, arg negates `org-context-in-file-links'."
6987 (save-excursion 6987 (save-excursion
6988 (save-restriction 6988 (save-restriction
6989 (rmail-narrow-to-non-pruned-header) 6989 (rmail-narrow-to-non-pruned-header)
6990 (let ((folder (buffer-file-name)) 6990 (let ((folder buffer-file-name)
6991 (message-id (mail-fetch-field "message-id")) 6991 (message-id (mail-fetch-field "message-id"))
6992 (author (mail-fetch-field "from")) 6992 (author (mail-fetch-field "from"))
6993 (subject (mail-fetch-field "subject"))) 6993 (subject (mail-fetch-field "subject")))
@@ -7041,7 +7041,7 @@ For file links, arg negates `org-context-in-file-links'."
7041 ((eq major-mode 'org-mode) 7041 ((eq major-mode 'org-mode)
7042 ;; Just link to current headline 7042 ;; Just link to current headline
7043 (setq cpltxt (concat "file:" 7043 (setq cpltxt (concat "file:"
7044 (abbreviate-file-name (buffer-file-name)))) 7044 (abbreviate-file-name buffer-file-name)))
7045 ;; Add a context search string 7045 ;; Add a context search string
7046 (when (org-xor org-context-in-file-links arg) 7046 (when (org-xor org-context-in-file-links arg)
7047 (if (save-excursion 7047 (if (save-excursion
@@ -7059,10 +7059,10 @@ For file links, arg negates `org-context-in-file-links'."
7059 ))))) 7059 )))))
7060 (setq link (org-make-link cpltxt))) 7060 (setq link (org-make-link cpltxt)))
7061 7061
7062 ((buffer-file-name) 7062 (buffer-file-name
7063 ;; Just link to this file here. 7063 ;; Just link to this file here.
7064 (setq cpltxt (concat "file:" 7064 (setq cpltxt (concat "file:"
7065 (abbreviate-file-name (buffer-file-name)))) 7065 (abbreviate-file-name buffer-file-name)))
7066 ;; Add a context string 7066 ;; Add a context string
7067 (when (org-xor org-context-in-file-links arg) 7067 (when (org-xor org-context-in-file-links arg)
7068 (setq cpltxt 7068 (setq cpltxt
@@ -7197,7 +7197,7 @@ is in the current directory or below."
7197 (case-fold-search nil) 7197 (case-fold-search nil)
7198 (search (match-string 2 link))) 7198 (search (match-string 2 link)))
7199 (when (save-match-data 7199 (when (save-match-data
7200 (equal (file-truename (buffer-file-name)) 7200 (equal (file-truename buffer-file-name)
7201 (file-truename path))) 7201 (file-truename path)))
7202 (if (save-match-data 7202 (if (save-match-data
7203 (string-match (concat "^" org-camel-regexp "$") search)) 7203 (string-match (concat "^" org-camel-regexp "$") search))
@@ -7356,7 +7356,7 @@ See also the variable `org-reverse-note-order'."
7356 (let ((all org-reverse-note-order) 7356 (let ((all org-reverse-note-order)
7357 entry) 7357 entry)
7358 (while (setq entry (pop all)) 7358 (while (setq entry (pop all))
7359 (if (string-match (car entry) (buffer-file-name)) 7359 (if (string-match (car entry) buffer-file-name)
7360 (throw 'exit (cdr entry)))) 7360 (throw 'exit (cdr entry))))
7361 nil))))) 7361 nil)))))
7362 7362
@@ -10010,7 +10010,7 @@ underlined headlines. The default is 3."
10010 (level 0) line txt 10010 (level 0) line txt
10011 (umax nil) 10011 (umax nil)
10012 (case-fold-search nil) 10012 (case-fold-search nil)
10013 (filename (concat (file-name-sans-extension (buffer-file-name)) 10013 (filename (concat (file-name-sans-extension buffer-file-name)
10014 ".txt")) 10014 ".txt"))
10015 (buffer (find-file-noselect filename)) 10015 (buffer (find-file-noselect filename))
10016 (levels-open (make-vector org-level-max nil)) 10016 (levels-open (make-vector org-level-max nil))
@@ -10159,7 +10159,7 @@ underlined headlines. The default is 3."
10159Also removes the first line of the buffer if it specifies a mode, 10159Also removes the first line of the buffer if it specifies a mode,
10160and all options lines." 10160and all options lines."
10161 (interactive) 10161 (interactive)
10162 (let* ((filename (concat (file-name-sans-extension (buffer-file-name)) 10162 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
10163 ".txt")) 10163 ".txt"))
10164 (buffer (find-file-noselect filename)) 10164 (buffer (find-file-noselect filename))
10165 (ore (concat 10165 (ore (concat
@@ -10233,7 +10233,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
10233 org-export-with-sub-superscripts 10233 org-export-with-sub-superscripts
10234 org-export-with-emphasize 10234 org-export-with-emphasize
10235 org-export-with-TeX-macros 10235 org-export-with-TeX-macros
10236 (file-name-nondirectory (buffer-file-name)) 10236 (file-name-nondirectory buffer-file-name)
10237 (if (equal org-todo-interpretation 'sequence) 10237 (if (equal org-todo-interpretation 'sequence)
10238 (mapconcat 'identity org-todo-keywords " ") 10238 (mapconcat 'identity org-todo-keywords " ")
10239 "TODO FEEDBACK VERIFY DONE") 10239 "TODO FEEDBACK VERIFY DONE")
@@ -10306,7 +10306,7 @@ The prefix ARG specifies how many levels of the outline should become
10306headlines. The default is 3. Lower levels will become bulleted lists." 10306headlines. The default is 3. Lower levels will become bulleted lists."
10307 (interactive "P") 10307 (interactive "P")
10308 (org-export-as-html arg 'hidden) 10308 (org-export-as-html arg 'hidden)
10309 (org-open-file (buffer-file-name))) 10309 (org-open-file buffer-file-name))
10310 10310
10311(defun org-export-as-html-batch () 10311(defun org-export-as-html-batch ()
10312 "Call `org-export-as-html', may be used in batch processing as 10312 "Call `org-export-as-html', may be used in batch processing as
@@ -10336,7 +10336,7 @@ headlines. The default is 3. Lower levels will become bulleted lists."
10336 (lines (org-export-find-first-heading-line all_lines)) 10336 (lines (org-export-find-first-heading-line all_lines))
10337 (level 0) (line "") (origline "") txt todo 10337 (level 0) (line "") (origline "") txt todo
10338 (umax nil) 10338 (umax nil)
10339 (filename (concat (file-name-sans-extension (buffer-file-name)) 10339 (filename (concat (file-name-sans-extension buffer-file-name)
10340 ".html")) 10340 ".html"))
10341 (buffer (find-file-noselect filename)) 10341 (buffer (find-file-noselect filename))
10342 (levels-open (make-vector org-level-max nil)) 10342 (levels-open (make-vector org-level-max nil))
@@ -10999,7 +10999,7 @@ When LEVEL is non-nil, increase section numbers on that level."
10999The iCalendar file will be located in the same directory as the Org-mode 10999The iCalendar file will be located in the same directory as the Org-mode
11000file, but with extension `.ics'." 11000file, but with extension `.ics'."
11001 (interactive) 11001 (interactive)
11002 (org-export-icalendar nil (buffer-file-name))) 11002 (org-export-icalendar nil buffer-file-name))
11003 11003
11004;;;###autoload 11004;;;###autoload
11005(defun org-export-icalendar-all-agenda-files () 11005(defun org-export-icalendar-all-agenda-files ()
@@ -11036,7 +11036,7 @@ file and store it under the name `org-combined-agenda-icalendar-file'."
11036 (set-buffer (org-get-agenda-file-buffer file)) 11036 (set-buffer (org-get-agenda-file-buffer file))
11037 (setq category (or org-category 11037 (setq category (or org-category
11038 (file-name-sans-extension 11038 (file-name-sans-extension
11039 (file-name-nondirectory (buffer-file-name))))) 11039 (file-name-nondirectory buffer-file-name))))
11040 (if (symbolp category) (setq category (symbol-name category))) 11040 (if (symbolp category) (setq category (symbol-name category)))
11041 (let ((standard-output ical-buffer)) 11041 (let ((standard-output ical-buffer))
11042 (if combine 11042 (if combine
@@ -12074,8 +12074,7 @@ When ENTRY is non-nil, show the entire entry."
12074 ;; trees. And is uses an invisible-OK argument. 12074 ;; trees. And is uses an invisible-OK argument.
12075 ;; Under Emacs this is not needed, but the old outline.el needs this fix. 12075 ;; Under Emacs this is not needed, but the old outline.el needs this fix.
12076 (org-back-to-heading invisible-OK) 12076 (org-back-to-heading invisible-OK)
12077 (let ((opoint (point)) 12077 (let ((first t)
12078 (first t)
12079 (level (funcall outline-level))) 12078 (level (funcall outline-level)))
12080 (while (and (not (eobp)) 12079 (while (and (not (eobp))
12081 (or first (> (funcall outline-level) level))) 12080 (or first (> (funcall outline-level) level)))
@@ -12138,16 +12137,6 @@ Show the heading too, if it is currently invisible."
12138 (org-invisible-p))) 12137 (org-invisible-p)))
12139 (org-show-hierarchy-above))) 12138 (org-show-hierarchy-above)))
12140 12139
12141;;; Finish up
12142
12143(provide 'org)
12144
12145(run-hooks 'org-load-hook)
12146
12147;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
12148;;; org.el ends here
12149
12150
12151(defun org-get-tags-at (&optional pos) 12140(defun org-get-tags-at (&optional pos)
12152 "Get a list of all headline targs applicable at POS. 12141 "Get a list of all headline targs applicable at POS.
12153POS defaults to point. If tags are inherited, the list contains 12142POS defaults to point. If tags are inherited, the list contains
@@ -12168,4 +12157,13 @@ the tags of the current headline come last."
12168 (error nil)))) 12157 (error nil))))
12169 (message "%s" tags) 12158 (message "%s" tags)
12170 tags)) 12159 tags))
12160
12161;;; Finish up
12162
12163(provide 'org)
12164
12165(run-hooks 'org-load-hook)
12166
12167;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
12168;;; org.el ends here
12171 12169