Browse Source

Agenda filtering: Make `- SPC' a filter that selects entries without tags

Request by John Wiegley.
Carsten Dominik 15 years ago
parent
commit
33c75c6e29
4 changed files with 21 additions and 11 deletions
  1. 5 0
      doc/ChangeLog
  2. 10 10
      doc/org.texi
  3. 5 0
      lisp/ChangeLog
  4. 1 1
      lisp/org-agenda.el

+ 5 - 0
doc/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-14  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.texi (Agenda commands): Document that SPC is a filter for
+	any tag.
+
 2009-10-04  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.texi (Cap): New chapter.

+ 10 - 10
doc/org.texi

@@ -7129,16 +7129,16 @@ binding the variable @code{org-agenda-filter-preset} as an option.  This
 filter will then be applied to the view and persist as a basic filter through
 refreshes and more secondary filtering.}
 
-You will be prompted for a tag selection letter.  Pressing @key{TAB} at that
-prompt will offer use completion to select a tag (including any tags that do
-not have a selection character).  The command then hides all entries that do
-not contain or inherit this tag.  When called with prefix arg, remove the
-entries that @emph{do} have the tag.  A second @kbd{/} at the prompt will
-turn off the filter and unhide any hidden entries.  If the first key you
-press is either @kbd{+} or @kbd{-}, the previous filter will be narrowed by
-requiring or forbidding the selected additional tag.  Instead of pressing
-@kbd{+} or @kbd{-} after @kbd{/}, you can also immediately use the @kbd{\}
-command.
+You will be prompted for a tag selection letter, SPC will mean any tag at
+all.  Pressing @key{TAB} at that prompt will offer use completion to select a
+tag (including any tags that do not have a selection character).  The command
+then hides all entries that do not contain or inherit this tag.  When called
+with prefix arg, remove the entries that @emph{do} have the tag.  A second
+@kbd{/} at the prompt will turn off the filter and unhide any hidden entries.
+If the first key you press is either @kbd{+} or @kbd{-}, the previous filter
+will be narrowed by requiring or forbidding the selected additional tag.
+Instead of pressing @kbd{+} or @kbd{-} after @kbd{/}, you can also
+immediately use the @kbd{\} command.
 
 @vindex org-sort-agenda-noeffort-is-high
 In order to filter for effort estimates, you should set-up allowed

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-10-14  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-agenda.el (org-agenda-filter-make-matcher): Allow to filter
+	entries that have no tags.
+
 2009-10-13  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-outline-level): Add doc string.

+ 1 - 1
lisp/org-agenda.el

@@ -5085,7 +5085,7 @@ to switch to narrowing."
     (dolist (x (append (get 'org-agenda-filter :preset-filter)
 		       org-agenda-filter))
       (if (member x '("-" "+"))
-	  (setq f1 '(not tags))
+	  (setq f1 (if (equal x "-") 'tags '(not tags)))
 	(if (string-match "[<=>?]" x)
 	    (setq f1 (org-agenda-filter-effort-form x))
 	  (setq f1 (list 'member (downcase (substring x 1)) 'tags)))