diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org index 675824a8a..8a3d37c20 100644 --- a/ORGWEBPAGE/Changes.org +++ b/ORGWEBPAGE/Changes.org @@ -27,8 +27,8 @@ There are new values for the =:scope= parameter of a clock table. This can now be =file-with-archives= and =agenda-with-archives=, in order to collect information not - only from the file org agenda files, but also all archive - files that are currently used by these files. + only from the current file or all agenda files, but also from + all archive files that are currently used by these files. *** New operators for property searches @@ -44,12 +44,11 @@ the operator, a string comparison is done: =+PRIORITY<"C".= Finally, if the right hand side is enclosed in curly braces, - a regexp match is done: =aaa={regexp}=. You should use only - the `=' operator in this case. + a regexp match is done: =aaa={regexp}=. In this case you + should use only the `=' or `<>' operators, meaning "does + match" or "does not match", respectively. - This was a simple change and should have been implemented a - long time ago - now it was finally triggered by a request - from Dan Davison. + This was a triggered with a request by Dan Davison. *** Orgtbl radio tables generalized. diff --git a/doc/org.texi b/doc/org.texi index 4ae480fa0..7fea65449 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3668,11 +3668,12 @@ and the allowed operators are @samp{<}, @samp{=}, @samp{>}, @samp{<=}, @samp{>=}, and @samp{<>}. If the comparison value is enclosed in double quotes, a string comparison is done, and the same operators are allowed. If the comparison value is enclosed in curly braces, a regexp match is -performed. So the search string in the example finds entries tagged -@samp{:work:} but not @samp{:boss:}, which also have a priority value -@samp{A}, a @samp{:Coffee:} property with the value @samp{unlimited}, an -@samp{Effort} property that is numerically smaller than 2, and a -@samp{:With:} property that is matched by the regular expression +performed, with @samp{=} meaning that the regexp matches the property value, +and @samp{<>} meaning that it does not match. So the search string in the +example finds entries tagged @samp{:work:} but not @samp{:boss:}, which also +have a priority value @samp{A}, a @samp{:Coffee:} property with the value +@samp{unlimited}, an @samp{Effort} property that is numerically smaller than +2, and a @samp{:With:} property that is matched by the regular expression @samp{Sarah\|Denny}. You can configure Org mode to use property inheritance during a search, but diff --git a/lisp/org.el b/lisp/org.el index 32e4b2085..e36309ae1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8814,7 +8814,9 @@ also TODO lines." (setq gv '(get-text-property (point) 'org-category)) (setq gv `(org-cached-entry-get nil ,pn))) (if re-p - `(string-match ,pv (or ,gv "")) + (if (eq po 'org<>) + `(not (string-match ,pv (or ,gv ""))) + `(string-match ,pv (or ,gv ""))) (if str-p `(,po (or ,gv "") ,pv) `(,po (string-to-number (or ,gv ""))