summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-12-24 17:32:22 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-12-24 17:32:22 +0100
commit55d664e6d3484f43c9e5160ebfd30bb20e881b7f (patch)
treef6c82f9428a0765397f0dd3ecdc40afc1f8ca93b
parenta33a4003a1c4319007f94f52c0116e934616f24d (diff)
downloadorg-mode-55d664e6d3484f43c9e5160ebfd30bb20e881b7f.tar.gz
Revert "Always return refreshed category"
This reverts commit f5bb1b7dbfd9a42fd63adf0744316920b666ff4d.
-rw-r--r--lisp/org-archive.el1
-rw-r--r--lisp/org-clock.el4
-rw-r--r--lisp/org-icalendar.el1
-rw-r--r--lisp/org.el12
4 files changed, 11 insertions, 7 deletions
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index c32ee23..e56b01f 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -226,6 +226,7 @@ this heading."
(save-excursion
(org-back-to-heading t)
;; Get context information that will be lost by moving the tree
+ (org-refresh-category-properties)
(setq category (org-get-category)
todo (and (looking-at org-todo-line-regexp)
(match-string 2))
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 17fccae..93b0b52 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -442,7 +442,9 @@ pointing to it."
(ignore-errors
(goto-char marker)
(setq file (buffer-file-name (marker-buffer marker))
- cat (org-get-category)
+ cat (or (org-get-category)
+ (progn (org-refresh-category-properties)
+ (org-get-category)))
heading (org-get-heading 'notags)
prefix (save-excursion
(org-back-to-heading t)
diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el
index a1bc5ad..d4034fe 100644
--- a/lisp/org-icalendar.el
+++ b/lisp/org-icalendar.el
@@ -302,6 +302,7 @@ When COMBINE is non nil, add the category to each line."
scheduledp deadlinep todo prefix due start
tmp pri categories location summary desc uid alarm
(sexp-buffer (get-buffer-create "*ical-tmp*")))
+ (org-refresh-category-properties)
(save-excursion
(goto-char (point-min))
(while (re-search-forward re1 nil t)
diff --git a/lisp/org.el b/lisp/org.el
index 863a80b..e190b84 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8142,11 +8142,7 @@ call CMD."
(defun org-get-category (&optional pos)
"Get the category applying to position POS."
- (let ((pos (or pos (point))))
- (or (get-text-property pos 'org-category)
- (progn
- (org-refresh-category-properties)
- (get-text-property pos 'org-category)))))
+ (get-text-property (or pos (point)) 'org-category))
(defun org-refresh-category-properties ()
"Refresh category text properties in the buffer."
@@ -13486,7 +13482,10 @@ things up because then unnecessary parsing is avoided."
'add_times))
props))
(unless (assoc "CATEGORY" props)
- (push (cons "CATEGORY" (org-get-category)) props))
+ (setq value (or (org-get-category)
+ (progn (org-refresh-category-properties)
+ (org-get-category))))
+ (push (cons "CATEGORY" value) props))
(append sum-props (nreverse props)))))))
(defun org-entry-get (pom property &optional inherit literal-nil)
@@ -15703,6 +15702,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
(set-buffer (org-get-agenda-file-buffer file)))
(widen)
(setq bmp (buffer-modified-p))
+ (org-refresh-category-properties)
(setq org-todo-keywords-for-agenda
(append org-todo-keywords-for-agenda org-todo-keywords-1))
(setq org-done-keywords-for-agenda