summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2013-09-08 08:56:17 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2013-09-08 08:56:17 +0200
commit3e99e9298c534f19bd19f37c196b0850e2c99ca0 (patch)
tree409576fa05d10c778f0276f7098a125eecca1841
parentb64626ecf49b3d1504c5107ace2b2931f5dadb37 (diff)
downloadorg-mode-3e99e9298c534f19bd19f37c196b0850e2c99ca0.tar.gz
Allow sparse trees with property values containing a slash
* lisp/org.el (org-make-tags-matcher): Do not interpret / in property value as starter of TODO match.
-rw-r--r--lisp/org.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index c92fa66..ae40732 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14050,10 +14050,19 @@ See also `org-scan-tags'.
minus tag mm
tagsmatch todomatch tagsmatcher todomatcher kwd matcher
orterms term orlist re-p str-p level-p level-op time-p
- prop-p pn pv po gv rest)
+ prop-p pn pv po gv rest (start 0) (ss 0))
;; Expand group tags
(setq match (org-tags-expand match))
- (if (string-match "/+" match)
+
+ ;; Check if there is a TODO part of this match, which would be the
+ ;; part after a "/". TO make sure that this slash is not part of
+ ;; a property value to be matched against, we also check that there
+ ;; is no " after that slash.
+ ;; First, find the last slash
+ (while (string-match "/+" match ss)
+ (setq start (match-beginning 0) ss (match-end 0)))
+ (if (and (string-match "/+" match start)
+ (not (save-match-data (string-match "\"" match start))))
;; match contains also a todo-matching request
(progn
(setq tagsmatch (substring match 0 (match-beginning 0))