summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-12-14 02:02:21 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-12-14 02:02:40 -0500
commit14350cac3431c4c6fd39b9daca279756c67e549e (patch)
tree1f795ee03d8f2c44236d3b345ec81de94e321008
parent8916e948d21bb381772590b3b977bc9ef6222c05 (diff)
downloadorg-mode-14350cac3431c4c6fd39b9daca279756c67e549e.tar.gz
Added FILE meta-property
-rw-r--r--doc/org.texi2
-rw-r--r--lisp/org.el4
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 5a67678..45e9341 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -4708,6 +4708,7 @@ used as keys in the properties drawer:
@cindex property, special, BLOCKED
@c guessing that ITEM is needed in this area; also, should this list be sorted?
@cindex property, special, ITEM
+@cindex property, special, FILE
@example
TODO @r{The TODO keyword of the entry.}
TAGS @r{The tags defined directly in the headline.}
@@ -4723,6 +4724,7 @@ CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}
@r{must be run first to compute the values.}
BLOCKED @r{"t" if task is currently blocked by children or siblings}
ITEM @r{The content of the entry.}
+FILE @r{The filename the entry is located in.}
@end example
@node Property searches, Property inheritance, Special properties, Properties and Columns
diff --git a/lisp/org.el b/lisp/org.el
index c4fe6a0..6d1062c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13237,7 +13237,7 @@ a *different* entry, you cannot use these techniques."
(defconst org-special-properties
'("TODO" "TAGS" "ALLTAGS" "DEADLINE" "SCHEDULED" "CLOCK" "CLOSED" "PRIORITY"
- "TIMESTAMP" "TIMESTAMP_IA" "BLOCKED")
+ "TIMESTAMP" "TIMESTAMP_IA" "BLOCKED" "FILE")
"The special properties valid in Org-mode.
These are properties that are not defined in the property drawer,
@@ -13409,6 +13409,8 @@ things up because then unnecessary parsing is avoided."
(when (and (or (not specific) (string= specific "PRIORITY"))
(looking-at org-priority-regexp))
(push (cons "PRIORITY" (org-match-string-no-properties 2)) props))
+ (when (or (not specific) (string= specific "FILE"))
+ (push (cons "FILE" buffer-file-name) props))
(when (and (or (not specific) (string= specific "TAGS"))
(setq value (org-get-tags-string))
(string-match "\\S-" value))