diff options
| author | Carsten Dominik | 2007-06-19 08:53:36 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2007-06-19 08:53:36 +0000 |
| commit | 219513ac8838d885c1c31fb1ef2b5ead8a7302e7 (patch) | |
| tree | a888f341531b4bea8a6786cca9e626c6ffa2d313 | |
| parent | b38c6895869ce5ef99ff7dc6584b1fe007a834a5 (diff) | |
| download | emacs-219513ac8838d885c1c31fb1ef2b5ead8a7302e7.tar.gz emacs-219513ac8838d885c1c31fb1ef2b5ead8a7302e7.zip | |
(Tag): Section swapped with node Timestamps.
(Formula syntax for Lisp): Document new `L' flag.
| -rw-r--r-- | man/org.texi | 591 |
1 files changed, 302 insertions, 289 deletions
diff --git a/man/org.texi b/man/org.texi index 22d217c1c89..6fb9d63c540 100644 --- a/man/org.texi +++ b/man/org.texi | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | @setfilename ../info/org | 3 | @setfilename ../info/org |
| 4 | @settitle Org Mode Manual | 4 | @settitle Org Mode Manual |
| 5 | 5 | ||
| 6 | @set VERSION 4.77 | 6 | @set VERSION 4.78 |
| 7 | @set DATE June 2007 | 7 | @set DATE June 2007 |
| 8 | 8 | ||
| 9 | @dircategory Emacs | 9 | @dircategory Emacs |
| @@ -80,8 +80,8 @@ Software Foundation raise funds for GNU development.'' | |||
| 80 | * Tables:: Pure magic for quick formatting | 80 | * Tables:: Pure magic for quick formatting |
| 81 | * Hyperlinks:: Notes in context | 81 | * Hyperlinks:: Notes in context |
| 82 | * TODO items:: Every tree branch can be a TODO item | 82 | * TODO items:: Every tree branch can be a TODO item |
| 83 | * Timestamps:: Assign date and time to items | ||
| 84 | * Tags:: Tagging headlines and matching sets of tags | 83 | * Tags:: Tagging headlines and matching sets of tags |
| 84 | * Timestamps:: Assign date and time to items | ||
| 85 | * Agenda views:: Collecting information into views | 85 | * Agenda views:: Collecting information into views |
| 86 | * Embedded LaTeX:: LaTeX fragments and formulas | 86 | * Embedded LaTeX:: LaTeX fragments and formulas |
| 87 | * Exporting:: Sharing and publishing of notes | 87 | * Exporting:: Sharing and publishing of notes |
| @@ -173,6 +173,12 @@ Extended use of TODO keywords | |||
| 173 | * Multiple sets in one file:: Mixing it all, and still finding your way | 173 | * Multiple sets in one file:: Mixing it all, and still finding your way |
| 174 | * Per file keywords:: Different files, different requirements | 174 | * Per file keywords:: Different files, different requirements |
| 175 | 175 | ||
| 176 | Tags | ||
| 177 | |||
| 178 | * Tag inheritance:: Tags use the tree structure of the outline | ||
| 179 | * Setting tags:: How to assign tags to a headline | ||
| 180 | * Tag searches:: Searching for combinations of tags | ||
| 181 | |||
| 176 | Timestamps | 182 | Timestamps |
| 177 | 183 | ||
| 178 | * Time stamps:: Assigning a time to a tree entry | 184 | * Time stamps:: Assigning a time to a tree entry |
| @@ -196,12 +202,6 @@ Progress Logging | |||
| 196 | * Tracking TODO state changes:: When did the status change? | 202 | * Tracking TODO state changes:: When did the status change? |
| 197 | * Clocking work time:: When exactly did you work on this item? | 203 | * Clocking work time:: When exactly did you work on this item? |
| 198 | 204 | ||
| 199 | Tags | ||
| 200 | |||
| 201 | * Tag inheritance:: Tags use the tree structure of the outline | ||
| 202 | * Setting tags:: How to assign tags to a headline | ||
| 203 | * Tag searches:: Searching for combinations of tags | ||
| 204 | |||
| 205 | Agenda Views | 205 | Agenda Views |
| 206 | 206 | ||
| 207 | * Agenda files:: Files being searched for agenda information | 207 | * Agenda files:: Files being searched for agenda information |
| @@ -1040,10 +1040,7 @@ Org-mode supports these lists by tuning filling and wrapping commands to | |||
| 1040 | deal with them correctly@footnote{Org-mode only changes the filling | 1040 | deal with them correctly@footnote{Org-mode only changes the filling |
| 1041 | settings for Emacs. For XEmacs, you should use Kyle E. Jones' | 1041 | settings for Emacs. For XEmacs, you should use Kyle E. Jones' |
| 1042 | @file{filladapt.el}. To turn this on, put into @file{.emacs}: | 1042 | @file{filladapt.el}. To turn this on, put into @file{.emacs}: |
| 1043 | @example | 1043 | @code{(require 'filladapt)}}. |
| 1044 | (require 'filladapt) | ||
| 1045 | @end example | ||
| 1046 | }. | ||
| 1047 | 1044 | ||
| 1048 | The following commands act on items when the cursor is in the first line | 1045 | The following commands act on items when the cursor is in the first line |
| 1049 | of an item (the line with the bullet or number). | 1046 | of an item (the line with the bullet or number). |
| @@ -1056,6 +1053,9 @@ Items can be folded just like headline levels if you set the variable | |||
| 1056 | given by the indentation of the bullet/number. Items are always | 1053 | given by the indentation of the bullet/number. Items are always |
| 1057 | subordinate to real headlines, however; the hierarchies remain | 1054 | subordinate to real headlines, however; the hierarchies remain |
| 1058 | completely separated. | 1055 | completely separated. |
| 1056 | |||
| 1057 | If @code{org-cycle-include-plain-lists} has not been set, @key{TAB} | ||
| 1058 | fixes the indentation of the curent line in a heuristic way. | ||
| 1059 | @kindex M-@key{RET} | 1059 | @kindex M-@key{RET} |
| 1060 | @item M-@key{RET} | 1060 | @item M-@key{RET} |
| 1061 | Insert new item at current level. With prefix arg, force a new heading | 1061 | Insert new item at current level. With prefix arg, force a new heading |
| @@ -1094,8 +1094,9 @@ the command chain with a cursor motion or so. | |||
| 1094 | @kindex C-c C-c | 1094 | @kindex C-c C-c |
| 1095 | @item C-c C-c | 1095 | @item C-c C-c |
| 1096 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the | 1096 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the |
| 1097 | state of the checkbox. Otherwise, if this is an ordered list, renumber | 1097 | state of the checkbox. If not, make this command makes sure that all |
| 1098 | the ordered list at the cursor. | 1098 | the items on this list level use the same bullet. Furthermore, if this |
| 1099 | is an ordered list, make sure the numbering is ok. | ||
| 1099 | @end table | 1100 | @end table |
| 1100 | 1101 | ||
| 1101 | @node Tables, Hyperlinks, Document structure, Top | 1102 | @node Tables, Hyperlinks, Document structure, Top |
| @@ -1641,12 +1642,18 @@ functionality is not enough. If a formula starts with a single quote | |||
| 1641 | followed by an opening parenthesis, then it is evaluated as a lisp form. | 1642 | followed by an opening parenthesis, then it is evaluated as a lisp form. |
| 1642 | The evaluation should return either a string or a number. Just as with | 1643 | The evaluation should return either a string or a number. Just as with |
| 1643 | @file{calc} formulas, you can specify modes and a printf format after a | 1644 | @file{calc} formulas, you can specify modes and a printf format after a |
| 1644 | semicolon. A reference will be replaced with a string (in double | 1645 | semicolon. With Emacs Lisp forms, you need to be concious about the way |
| 1645 | quotes) containing the field. If you provide the @samp{N} mode switch, | 1646 | field references are interpolated into the form. By default, a |
| 1646 | all referenced elements will be numbers. Ranges are inserted as | 1647 | reference will be interpolated as a Lisp string (in double quotes) |
| 1647 | space-separated fields, so you can embed them in list or vector syntax. | 1648 | containing the field. If you provide the @samp{N} mode switch, all |
| 1648 | A few examples, note how the @samp{N} mode is used when we do | 1649 | referenced elements will be numbers (non-number fields will be zero) and |
| 1649 | computations in lisp. | 1650 | interpolated as Lisp numbers, without quotes. If you provide the |
| 1651 | @samp{L} flag, all fields will be interpolated literally, without quotes. | ||
| 1652 | I.e., if you want a reference to be interpreted as a string by the Lisp | ||
| 1653 | form, enclode the reference operator itself in double quotes, like | ||
| 1654 | @code{"$3"}. Ranges are inserted as space-separated fields, so you can | ||
| 1655 | embed them in list or vector syntax. A few examples, note how the | ||
| 1656 | @samp{N} mode is used when we do computations in lisp. | ||
| 1650 | 1657 | ||
| 1651 | @example | 1658 | @example |
| 1652 | @r{Swap the first two characters of the content of column 1} | 1659 | @r{Swap the first two characters of the content of column 1} |
| @@ -2042,8 +2049,8 @@ convenient to put them into a comment line. For example | |||
| 2042 | 2049 | ||
| 2043 | @noindent In HTML export (@pxref{HTML export}), such targets will become | 2050 | @noindent In HTML export (@pxref{HTML export}), such targets will become |
| 2044 | named anchors for direct access through @samp{http} links@footnote{Note | 2051 | named anchors for direct access through @samp{http} links@footnote{Note |
| 2045 | that text before the first headline will never be exported, so the first | 2052 | that text before the first headline is usually not exported, so the |
| 2046 | such target must be after the first headline.}. | 2053 | first such target should be after the first headline.}. |
| 2047 | 2054 | ||
| 2048 | If no dedicated target exists, Org-mode will search for the words in the | 2055 | If no dedicated target exists, Org-mode will search for the words in the |
| 2049 | link. In the above example the search would be for @samp{my target}. | 2056 | link. In the above example the search would be for @samp{my target}. |
| @@ -2581,7 +2588,7 @@ non-nil, the entire text is also indented so that it starts in the | |||
| 2581 | same column as the headline (after the asterisks). | 2588 | same column as the headline (after the asterisks). |
| 2582 | 2589 | ||
| 2583 | 2590 | ||
| 2584 | @node TODO items, Timestamps, Hyperlinks, Top | 2591 | @node TODO items, Tags, Hyperlinks, Top |
| 2585 | @chapter TODO items | 2592 | @chapter TODO items |
| 2586 | @cindex TODO items | 2593 | @cindex TODO items |
| 2587 | 2594 | ||
| @@ -2960,7 +2967,264 @@ delete boxes or add/change them by hand, use this command to get things | |||
| 2960 | back into synch. Or simply toggle any checkbox twice with @kbd{C-c C-c}. | 2967 | back into synch. Or simply toggle any checkbox twice with @kbd{C-c C-c}. |
| 2961 | @end table | 2968 | @end table |
| 2962 | 2969 | ||
| 2963 | @node Timestamps, Tags, TODO items, Top | 2970 | |
| 2971 | @node Tags, Timestamps, TODO items, Top | ||
| 2972 | @chapter Tags | ||
| 2973 | @cindex tags | ||
| 2974 | @cindex headline tagging | ||
| 2975 | @cindex matching, tags | ||
| 2976 | @cindex sparse tree, tag based | ||
| 2977 | |||
| 2978 | If you wish to implement a system of labels and contexts for | ||
| 2979 | cross-correlating information, an excellent way is to assign @i{tags} to | ||
| 2980 | headlines. Org-mode has extensive support for using tags. | ||
| 2981 | |||
| 2982 | Every headline can contain a list of tags, at the end of the headline. | ||
| 2983 | Tags are normal words containing letters, numbers, @samp{_}, and | ||
| 2984 | @samp{@@}. Tags must be preceded and followed by a single colon; like | ||
| 2985 | @samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}. | ||
| 2986 | |||
| 2987 | @menu | ||
| 2988 | * Tag inheritance:: Tags use the tree structure of the outline | ||
| 2989 | * Setting tags:: How to assign tags to a headline | ||
| 2990 | * Tag searches:: Searching for combinations of tags | ||
| 2991 | @end menu | ||
| 2992 | |||
| 2993 | @node Tag inheritance, Setting tags, Tags, Tags | ||
| 2994 | @section Tag inheritance | ||
| 2995 | @cindex inheritance, of tags | ||
| 2996 | @cindex sublevels, inclusion into tags match | ||
| 2997 | |||
| 2998 | @i{Tags} make use of the hierarchical structure of outline trees. If a | ||
| 2999 | heading has a certain tag, all subheadings will inherit the tag as | ||
| 3000 | well. For example, in the list | ||
| 3001 | |||
| 3002 | @example | ||
| 3003 | * Meeting with the French group :WORK: | ||
| 3004 | ** Summary by Frank :BOSS:NOTES: | ||
| 3005 | *** TODO Prepare slides for him :ACTION: | ||
| 3006 | @end example | ||
| 3007 | |||
| 3008 | @noindent | ||
| 3009 | the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:}, | ||
| 3010 | @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and | ||
| 3011 | Org-mode finds that a certain headline matches the search criterion, it | ||
| 3012 | will not check any sublevel headline, assuming that these likely also | ||
| 3013 | match, and that the list of matches can become very long. This may | ||
| 3014 | not be what you want, however, and you can influence inheritance and | ||
| 3015 | searching using the variables @code{org-use-tag-inheritance} and | ||
| 3016 | @code{org-tags-match-list-sublevels}. | ||
| 3017 | |||
| 3018 | @node Setting tags, Tag searches, Tag inheritance, Tags | ||
| 3019 | @section Setting tags | ||
| 3020 | @cindex setting tags | ||
| 3021 | @cindex tags, setting | ||
| 3022 | |||
| 3023 | @kindex M-@key{TAB} | ||
| 3024 | Tags can simply be typed into the buffer at the end of a headline. | ||
| 3025 | After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is | ||
| 3026 | also a special command for inserting tags: | ||
| 3027 | |||
| 3028 | @table @kbd | ||
| 3029 | @kindex C-c C-c | ||
| 3030 | @item C-c C-c | ||
| 3031 | @cindex completion, of tags | ||
| 3032 | Enter new tags for the current headline. Org-mode will either offer | ||
| 3033 | completion or a special single-key interface for setting tags, see | ||
| 3034 | below. After pressing @key{RET}, the tags will be inserted and aligned | ||
| 3035 | to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all | ||
| 3036 | tags in the current buffer will be aligned to that column, just to make | ||
| 3037 | things look nice. TAGS are automatically realigned after promotion, | ||
| 3038 | demotion, and TODO state changes (@pxref{TODO basics}). | ||
| 3039 | @end table | ||
| 3040 | |||
| 3041 | Org will support tag insertion based on a @emph{list of tags}. By | ||
| 3042 | default this list is constructed dynamically, containing all tags | ||
| 3043 | currently used in the buffer. You may also globally specify a hard list | ||
| 3044 | of tags with the variable @code{org-tag-alist}. Finally you can set | ||
| 3045 | the default tags for a given file with lines like | ||
| 3046 | |||
| 3047 | @example | ||
| 3048 | #+TAGS: @@WORK @@HOME @@TENNISCLUB | ||
| 3049 | #+TAGS: Laptop Car PC Sailboat | ||
| 3050 | @end example | ||
| 3051 | |||
| 3052 | If you have globally defined your preferred set of tags using the | ||
| 3053 | variable @code{org-tag-alist}, but would like to use a dynamic tag list | ||
| 3054 | in a specific file: Just add an empty TAGS option line to that file: | ||
| 3055 | |||
| 3056 | @example | ||
| 3057 | #+TAGS: | ||
| 3058 | @end example | ||
| 3059 | |||
| 3060 | The default support method for entering tags is minibuffer completion. | ||
| 3061 | However, Org-mode also implements a much better method: @emph{fast tag | ||
| 3062 | selection}. This method allows to select and deselect tags with a | ||
| 3063 | single key per tag. To function efficiently, you should assign unique | ||
| 3064 | keys to most tags. This can be done globally with | ||
| 3065 | |||
| 3066 | @lisp | ||
| 3067 | (setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l))) | ||
| 3068 | @end lisp | ||
| 3069 | |||
| 3070 | @noindent or on a per-file basis with | ||
| 3071 | |||
| 3072 | @example | ||
| 3073 | #+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t) Laptop(l) PC(p) | ||
| 3074 | @end example | ||
| 3075 | |||
| 3076 | @noindent | ||
| 3077 | You can also group together tags that are mutually exclusive. With | ||
| 3078 | curly braces@footnote{In @code{org-mode-alist} use | ||
| 3079 | @code{'(:startgroup)} and @code{'(:endgroup)}, respectively. Several | ||
| 3080 | groups are allowed.} | ||
| 3081 | |||
| 3082 | @example | ||
| 3083 | #+TAGS: @{ @@WORK(w) @@HOME(h) @@TENNISCLUB(t) @} Laptop(l) PC(p) | ||
| 3084 | @end example | ||
| 3085 | |||
| 3086 | @noindent you indicate that at most one of @samp{@@WORK}, @samp{@@HOME}, | ||
| 3087 | and @samp{@@TENNISCLUB} should be selected. | ||
| 3088 | |||
| 3089 | @noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of | ||
| 3090 | these lines to activate any changes. | ||
| 3091 | |||
| 3092 | If at least one tag has a selection key, pressing @kbd{C-c C-c} will | ||
| 3093 | automatically present you with a special interface, listing inherited | ||
| 3094 | tags, the tags of the current headline, and a list of all legal tags | ||
| 3095 | with corresponding keys@footnote{Keys will automatically be assigned to | ||
| 3096 | tags which have no configured keys.}. In this interface, you can use | ||
| 3097 | the following keys: | ||
| 3098 | |||
| 3099 | @table @kbd | ||
| 3100 | @item a-z... | ||
| 3101 | Pressing keys assigned to tags will add or remove them from the list of | ||
| 3102 | tags in the current line. Selecting a tag in a group of mutually | ||
| 3103 | exclusive tags will turn off any other tags from that group. | ||
| 3104 | @kindex @key{TAB} | ||
| 3105 | @item @key{TAB} | ||
| 3106 | Enter a tag in the minibuffer, even if the tag is not in the predefined | ||
| 3107 | list. You will be able to complete on all tags present in the buffer. | ||
| 3108 | @kindex @key{SPC} | ||
| 3109 | @item @key{SPC} | ||
| 3110 | Clear all tags for this line. | ||
| 3111 | @kindex @key{RET} | ||
| 3112 | @item @key{RET} | ||
| 3113 | Accept the modified set. | ||
| 3114 | @item C-g | ||
| 3115 | Abort without installing changes. | ||
| 3116 | @item q | ||
| 3117 | If @kbd{q} is not assigned to a tag, it aborts like @kbd{C-g}. | ||
| 3118 | @item ! | ||
| 3119 | Turn off groups of mutually exclusive tags. Use this to (as an | ||
| 3120 | exception) assign several tags from such a group. | ||
| 3121 | @item C-c | ||
| 3122 | Toggle auto-exit after the next change (see below). | ||
| 3123 | If you are using expert mode, the first @kbd{C-c} will display the | ||
| 3124 | selection window. | ||
| 3125 | @end table | ||
| 3126 | |||
| 3127 | @noindent | ||
| 3128 | This method lets you assign tags to a headline with very few keys. With | ||
| 3129 | the above setup, you could clear the current tags and set @samp{@@HOME}, | ||
| 3130 | @samp{Laptop} and @samp{PC} tags with just the following keys: @kbd{C-c | ||
| 3131 | C-c @key{SPC} h l p @key{RET}}. Switching from @samp{@@HOME} to | ||
| 3132 | @samp{@@WORK} would be done with @kbd{C-c C-c w @key{RET}} or | ||
| 3133 | alternatively with @kbd{C-c C-c C-c w}. Adding the non-predefined tag | ||
| 3134 | @samp{Sarah} could be done with @kbd{C-c C-c @key{TAB} S a r a h | ||
| 3135 | @key{RET} @key{RET}}. | ||
| 3136 | |||
| 3137 | If you find that most of the time, you need only a single keypress to | ||
| 3138 | modify your list of tags, set the variable | ||
| 3139 | @code{org-fast-tag-selection-single-key}. Then you no longer have to | ||
| 3140 | press @key{RET} to exit fast tag selection - it will immediately exit | ||
| 3141 | after the first change. If you then occasionally need more keys, press | ||
| 3142 | @kbd{C-c} to turn off auto-exit for the current tag selection process | ||
| 3143 | (in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c | ||
| 3144 | C-c}). If you set the variable to the value @code{expert}, the special | ||
| 3145 | window is not even shown for single-key tag selection, it comes up only | ||
| 3146 | when you press an extra @kbd{C-c}. | ||
| 3147 | |||
| 3148 | @node Tag searches, , Setting tags, Tags | ||
| 3149 | @section Tag searches | ||
| 3150 | @cindex tag searches | ||
| 3151 | @cindex searching for tags | ||
| 3152 | |||
| 3153 | Once a tags system has been set up, it can be used to collect related | ||
| 3154 | information into special lists. | ||
| 3155 | |||
| 3156 | @table @kbd | ||
| 3157 | @kindex C-c \ | ||
| 3158 | @item C-c \ | ||
| 3159 | Create a sparse tree with all headlines matching a tags search. With a | ||
| 3160 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | ||
| 3161 | @kindex C-c a m | ||
| 3162 | @item C-c a m | ||
| 3163 | Create a global list of tag matches from all agenda files. | ||
| 3164 | @xref{Matching headline tags}. | ||
| 3165 | @kindex C-c a M | ||
| 3166 | @item C-c a M | ||
| 3167 | Create a global list of tag matches from all agenda files, but check | ||
| 3168 | only TODO items and force checking subitems (see variable | ||
| 3169 | @code{org-tags-match-list-sublevels}). | ||
| 3170 | @end table | ||
| 3171 | |||
| 3172 | @cindex Boolean logic, for tag searches | ||
| 3173 | A @i{tags} search string can use Boolean operators @samp{&} for AND and | ||
| 3174 | @samp{|} for OR. @samp{&} binds more strongly than @samp{|}. | ||
| 3175 | Parenthesis are currently not implemented. A tag may also be preceded | ||
| 3176 | by @samp{-}, to select against it, and @samp{+} is syntactic sugar for | ||
| 3177 | positive selection. The AND operator @samp{&} is optional when @samp{+} | ||
| 3178 | or @samp{-} is present. Examples: | ||
| 3179 | |||
| 3180 | @table @samp | ||
| 3181 | @item +WORK-BOSS | ||
| 3182 | Select headlines tagged @samp{:WORK:}, but discard those also tagged | ||
| 3183 | @samp{:BOSS:}. | ||
| 3184 | @item WORK|LAPTOP | ||
| 3185 | Selects lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. | ||
| 3186 | @item WORK|LAPTOP&NIGHT | ||
| 3187 | Like before, but require the @samp{:LAPTOP:} lines to be tagged also | ||
| 3188 | @samp{NIGHT}. | ||
| 3189 | @end table | ||
| 3190 | |||
| 3191 | @cindex TODO keyword matching, with tags search | ||
| 3192 | If you are using multi-state TODO keywords (@pxref{TODO extensions}), it | ||
| 3193 | can be useful to also match on the TODO keyword. This can be done by | ||
| 3194 | adding a condition after a slash to a tags match. The syntax is similar | ||
| 3195 | to the tag matches, but should be applied with consideration: For | ||
| 3196 | example, a positive selection on several TODO keywords can not | ||
| 3197 | meaningfully be combined with boolean AND. However, @emph{negative | ||
| 3198 | selection} combined with AND can be meaningful. To make sure that only | ||
| 3199 | lines are checked that actually have any TODO keyword, use @kbd{C-c a | ||
| 3200 | M}, or equivalently start the todo part after the slash with @samp{!}. | ||
| 3201 | Examples: | ||
| 3202 | |||
| 3203 | @table @samp | ||
| 3204 | @item WORK/WAITING | ||
| 3205 | Select @samp{:WORK:}-tagged TODO lines with the specific TODO | ||
| 3206 | keyword @samp{WAITING}. | ||
| 3207 | @item WORK/!-WAITING-NEXT | ||
| 3208 | Select @samp{:WORK:}-tagged TODO lines that are neither @samp{WAITING} | ||
| 3209 | nor @samp{NEXT} | ||
| 3210 | @item WORK/+WAITING|+NEXT | ||
| 3211 | Select @samp{:WORK:}-tagged TODO lines that are either @samp{WAITING} or | ||
| 3212 | @samp{NEXT}. | ||
| 3213 | @end table | ||
| 3214 | |||
| 3215 | @cindex regular expressions, with tags search | ||
| 3216 | Any element of the tag/todo match can be a regular expression - in this | ||
| 3217 | case it must be enclosed in curly braces. For example, | ||
| 3218 | @samp{WORK+@{^BOSS.*@}} matches headlines that contain the tag | ||
| 3219 | @samp{WORK} and any tag @i{starting} with @samp{BOSS}. | ||
| 3220 | |||
| 3221 | @cindex level, require for tags match | ||
| 3222 | You can also require a headline to be of a certain level, by writing | ||
| 3223 | instead of any TAG an expression like @samp{LEVEL=3}. For example, a | ||
| 3224 | search @samp{+LEVEL=3+BOSS/-DONE} lists all level three headlines that | ||
| 3225 | have the tag BOSS and are @emph{not} marked with the todo keyword DONE. | ||
| 3226 | |||
| 3227 | @node Timestamps, Agenda views, Tags, Top | ||
| 2964 | @chapter Timestamps | 3228 | @chapter Timestamps |
| 2965 | @cindex time stamps | 3229 | @cindex time stamps |
| 2966 | @cindex date stamps | 3230 | @cindex date stamps |
| @@ -2984,12 +3248,13 @@ planning. | |||
| 2984 | @cindex deadlines | 3248 | @cindex deadlines |
| 2985 | @cindex scheduling | 3249 | @cindex scheduling |
| 2986 | 3250 | ||
| 2987 | A time stamp is a specification of a date (possibly with time) in a | 3251 | A time stamp is a specification of a date (possibly with time or a range |
| 2988 | special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16 Tue | 3252 | of times) in a special format, either @samp{<2003-09-16 Tue>} or |
| 2989 | 09:39>}@footnote{This is the standard ISO date/time format. If you | 3253 | @samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue |
| 2990 | cannot get used to these, see @ref{Custom time format}}. A time stamp | 3254 | 12:00-12:30>}@footnote{This is the standard ISO date/time format. If |
| 2991 | can appear anywhere in the headline or body of an org-tree entry. Its | 3255 | you cannot get used to these, see @ref{Custom time format}}. A time |
| 2992 | presence causes entries to be shown on specific dates in the agenda | 3256 | stamp can appear anywhere in the headline or body of an org-tree entry. |
| 3257 | Its presence causes entries to be shown on specific dates in the agenda | ||
| 2993 | (@pxref{Weekly/Daily agenda}). We distinguish: | 3258 | (@pxref{Weekly/Daily agenda}). We distinguish: |
| 2994 | 3259 | ||
| 2995 | @table @var | 3260 | @table @var |
| @@ -3003,6 +3268,7 @@ associated with a plain time stamp will be shown exactly on that date. | |||
| 3003 | 3268 | ||
| 3004 | @example | 3269 | @example |
| 3005 | * Meet Peter at the movies <2006-11-01 Wed 19:15> | 3270 | * Meet Peter at the movies <2006-11-01 Wed 19:15> |
| 3271 | * Discussion on climate change <2006-11-02 Thu 20:00-22:00> | ||
| 3006 | @end example | 3272 | @end example |
| 3007 | 3273 | ||
| 3008 | @item Time stamp with repeater interval | 3274 | @item Time stamp with repeater interval |
| @@ -3227,6 +3493,9 @@ the stamp, @kbd{S-@key{up}/@key{down}} will change the stamp by one day, | |||
| 3227 | just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the | 3493 | just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the |
| 3228 | time will be changed by one minute. | 3494 | time will be changed by one minute. |
| 3229 | @item | 3495 | @item |
| 3496 | If the time stamp contains a range of clock times or a repeater, these | ||
| 3497 | will not be overlayed, but remain in the buffer as they were. | ||
| 3498 | @item | ||
| 3230 | When you delete a time stamp character-by-character, it will only | 3499 | When you delete a time stamp character-by-character, it will only |
| 3231 | disappear from the buffer after @emph{all} (invisible) characters | 3500 | disappear from the buffer after @emph{all} (invisible) characters |
| 3232 | belonging to the ISO timestamp have been removed. | 3501 | belonging to the ISO timestamp have been removed. |
| @@ -3508,263 +3777,7 @@ The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | |||
| 3508 | the agenda (@pxref{Weekly/Daily agenda}) to show which tasks have been | 3777 | the agenda (@pxref{Weekly/Daily agenda}) to show which tasks have been |
| 3509 | worked on or closed during a day. | 3778 | worked on or closed during a day. |
| 3510 | 3779 | ||
| 3511 | @node Tags, Agenda views, Timestamps, Top | 3780 | @node Agenda views, Embedded LaTeX, Timestamps, Top |
| 3512 | @chapter Tags | ||
| 3513 | @cindex tags | ||
| 3514 | @cindex headline tagging | ||
| 3515 | @cindex matching, tags | ||
| 3516 | @cindex sparse tree, tag based | ||
| 3517 | |||
| 3518 | If you wish to implement a system of labels and contexts for | ||
| 3519 | cross-correlating information, an excellent way is to assign @i{tags} to | ||
| 3520 | headlines. Org-mode has extensive support for using tags. | ||
| 3521 | |||
| 3522 | Every headline can contain a list of tags, at the end of the headline. | ||
| 3523 | Tags are normal words containing letters, numbers, @samp{_}, and | ||
| 3524 | @samp{@@}. Tags must be preceded and followed by a single colon; like | ||
| 3525 | @samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}. | ||
| 3526 | |||
| 3527 | @menu | ||
| 3528 | * Tag inheritance:: Tags use the tree structure of the outline | ||
| 3529 | * Setting tags:: How to assign tags to a headline | ||
| 3530 | * Tag searches:: Searching for combinations of tags | ||
| 3531 | @end menu | ||
| 3532 | |||
| 3533 | @node Tag inheritance, Setting tags, Tags, Tags | ||
| 3534 | @section Tag inheritance | ||
| 3535 | @cindex inheritance, of tags | ||
| 3536 | @cindex sublevels, inclusion into tags match | ||
| 3537 | |||
| 3538 | @i{Tags} make use of the hierarchical structure of outline trees. If a | ||
| 3539 | heading has a certain tag, all subheadings will inherit the tag as | ||
| 3540 | well. For example, in the list | ||
| 3541 | |||
| 3542 | @example | ||
| 3543 | * Meeting with the French group :WORK: | ||
| 3544 | ** Summary by Frank :BOSS:NOTES: | ||
| 3545 | *** TODO Prepare slides for him :ACTION: | ||
| 3546 | @end example | ||
| 3547 | |||
| 3548 | @noindent | ||
| 3549 | the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:}, | ||
| 3550 | @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and | ||
| 3551 | Org-mode finds that a certain headline matches the search criterion, it | ||
| 3552 | will not check any sublevel headline, assuming that these likely also | ||
| 3553 | match, and that the list of matches can become very long. This may | ||
| 3554 | not be what you want, however, and you can influence inheritance and | ||
| 3555 | searching using the variables @code{org-use-tag-inheritance} and | ||
| 3556 | @code{org-tags-match-list-sublevels}. | ||
| 3557 | |||
| 3558 | @node Setting tags, Tag searches, Tag inheritance, Tags | ||
| 3559 | @section Setting tags | ||
| 3560 | @cindex setting tags | ||
| 3561 | @cindex tags, setting | ||
| 3562 | |||
| 3563 | @kindex M-@key{TAB} | ||
| 3564 | Tags can simply be typed into the buffer at the end of a headline. | ||
| 3565 | After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is | ||
| 3566 | also a special command for inserting tags: | ||
| 3567 | |||
| 3568 | @table @kbd | ||
| 3569 | @kindex C-c C-c | ||
| 3570 | @item C-c C-c | ||
| 3571 | @cindex completion, of tags | ||
| 3572 | Enter new tags for the current headline. Org-mode will either offer | ||
| 3573 | completion or a special single-key interface for setting tags, see | ||
| 3574 | below. After pressing @key{RET}, the tags will be inserted and aligned | ||
| 3575 | to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all | ||
| 3576 | tags in the current buffer will be aligned to that column, just to make | ||
| 3577 | things look nice. TAGS are automatically realigned after promotion, | ||
| 3578 | demotion, and TODO state changes (@pxref{TODO basics}). | ||
| 3579 | @end table | ||
| 3580 | |||
| 3581 | Org will support tag insertion based on a @emph{list of tags}. By | ||
| 3582 | default this list is constructed dynamically, containing all tags | ||
| 3583 | currently used in the buffer. You may also globally specify a hard list | ||
| 3584 | of tags with the variable @code{org-tag-alist}. Finally you can set | ||
| 3585 | the default tags for a given file with lines like | ||
| 3586 | |||
| 3587 | @example | ||
| 3588 | #+TAGS: @@WORK @@HOME @@TENNISCLUB | ||
| 3589 | #+TAGS: Laptop Car PC Sailboat | ||
| 3590 | @end example | ||
| 3591 | |||
| 3592 | If you have globally defined your preferred set of tags using the | ||
| 3593 | variable @code{org-tag-alist}, but would like to use a dynamic tag list | ||
| 3594 | in a specific file: Just add an empty TAGS option line to that file: | ||
| 3595 | |||
| 3596 | @example | ||
| 3597 | #+TAGS: | ||
| 3598 | @end example | ||
| 3599 | |||
| 3600 | The default support method for entering tags is minibuffer completion. | ||
| 3601 | However, Org-mode also implements a much better method: @emph{fast tag | ||
| 3602 | selection}. This method allows to select and deselect tags with a | ||
| 3603 | single key per tag. To function efficiently, you should assign unique | ||
| 3604 | keys to most tags. This can be done globally with | ||
| 3605 | |||
| 3606 | @lisp | ||
| 3607 | (setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l))) | ||
| 3608 | @end lisp | ||
| 3609 | |||
| 3610 | @noindent or on a per-file basis with | ||
| 3611 | |||
| 3612 | @example | ||
| 3613 | #+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t) Laptop(l) PC(p) | ||
| 3614 | @end example | ||
| 3615 | |||
| 3616 | @noindent | ||
| 3617 | You can also group together tags that are mutually exclusive. With | ||
| 3618 | curly braces@footnote{In @code{org-mode-alist} use | ||
| 3619 | @code{'(:startgroup)} and @code{'(:endgroup)}, respectively. Several | ||
| 3620 | groups are allowed.} | ||
| 3621 | |||
| 3622 | @example | ||
| 3623 | #+TAGS: @{ @@WORK(w) @@HOME(h) @@TENNISCLUB(t) @} Laptop(l) PC(p) | ||
| 3624 | @end example | ||
| 3625 | |||
| 3626 | @noindent you indicate that at most one of @samp{@@WORK}, @samp{@@HOME}, | ||
| 3627 | and @samp{@@TENNISCLUB} should be selected. | ||
| 3628 | |||
| 3629 | @noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of | ||
| 3630 | these lines to activate any changes. | ||
| 3631 | |||
| 3632 | If at least one tag has a selection key, pressing @kbd{C-c C-c} will | ||
| 3633 | automatically present you with a special interface, listing inherited | ||
| 3634 | tags, the tags of the current headline, and a list of all legal tags | ||
| 3635 | with corresponding keys@footnote{Keys will automatically be assigned to | ||
| 3636 | tags which have no configured keys.}. In this interface, you can use | ||
| 3637 | the following keys: | ||
| 3638 | |||
| 3639 | @table @kbd | ||
| 3640 | @item a-z... | ||
| 3641 | Pressing keys assigned to tags will add or remove them from the list of | ||
| 3642 | tags in the current line. Selecting a tag in a group of mutually | ||
| 3643 | exclusive tags will turn off any other tags from that group. | ||
| 3644 | @kindex @key{TAB} | ||
| 3645 | @item @key{TAB} | ||
| 3646 | Enter a tag in the minibuffer, even if the tag is not in the predefined | ||
| 3647 | list. You will be able to complete on all tags present in the buffer. | ||
| 3648 | @kindex @key{SPC} | ||
| 3649 | @item @key{SPC} | ||
| 3650 | Clear all tags for this line. | ||
| 3651 | @kindex @key{RET} | ||
| 3652 | @item @key{RET} | ||
| 3653 | Accept the modified set. | ||
| 3654 | @item C-g | ||
| 3655 | Abort without installing changes. | ||
| 3656 | @item q | ||
| 3657 | If @kbd{q} is not assigned to a tag, it aborts like @kbd{C-g}. | ||
| 3658 | @item ! | ||
| 3659 | Turn off groups of mutually exclusive tags. Use this to (as an | ||
| 3660 | exception) assign several tags from such a group. | ||
| 3661 | @item C-c | ||
| 3662 | Toggle auto-exit after the next change (see below). | ||
| 3663 | If you are using expert mode, the first @kbd{C-c} will display the | ||
| 3664 | selection window. | ||
| 3665 | @end table | ||
| 3666 | |||
| 3667 | @noindent | ||
| 3668 | This method lets you assign tags to a headline with very few keys. With | ||
| 3669 | the above setup, you could clear the current tags and set @samp{@@HOME}, | ||
| 3670 | @samp{Laptop} and @samp{PC} tags with just the following keys: @kbd{C-c | ||
| 3671 | C-c @key{SPC} h l p @key{RET}}. Switching from @samp{@@HOME} to | ||
| 3672 | @samp{@@WORK} would be done with @kbd{C-c C-c w @key{RET}} or | ||
| 3673 | alternatively with @kbd{C-c C-c C-c w}. Adding the non-predefined tag | ||
| 3674 | @samp{Sarah} could be done with @kbd{C-c C-c @key{TAB} S a r a h | ||
| 3675 | @key{RET} @key{RET}}. | ||
| 3676 | |||
| 3677 | If you find that most of the time, you need only a single keypress to | ||
| 3678 | modify your list of tags, set the variable | ||
| 3679 | @code{org-fast-tag-selection-single-key}. Then you no longer have to | ||
| 3680 | press @key{RET} to exit fast tag selection - it will immediately exit | ||
| 3681 | after the first change. If you then occasionally need more keys, press | ||
| 3682 | @kbd{C-c} to turn off auto-exit for the current tag selection process | ||
| 3683 | (in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c | ||
| 3684 | C-c}). If you set the variable to the value @code{expert}, the special | ||
| 3685 | window is not even shown for single-key tag selection, it comes up only | ||
| 3686 | when you press an extra @kbd{C-c}. | ||
| 3687 | |||
| 3688 | @node Tag searches, , Setting tags, Tags | ||
| 3689 | @section Tag searches | ||
| 3690 | @cindex tag searches | ||
| 3691 | @cindex searching for tags | ||
| 3692 | |||
| 3693 | Once a tags system has been set up, it can be used to collect related | ||
| 3694 | information into special lists. | ||
| 3695 | |||
| 3696 | @table @kbd | ||
| 3697 | @kindex C-c \ | ||
| 3698 | @item C-c \ | ||
| 3699 | Create a sparse tree with all headlines matching a tags search. With a | ||
| 3700 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | ||
| 3701 | @kindex C-c a m | ||
| 3702 | @item C-c a m | ||
| 3703 | Create a global list of tag matches from all agenda files. | ||
| 3704 | @xref{Matching headline tags}. | ||
| 3705 | @kindex C-c a M | ||
| 3706 | @item C-c a M | ||
| 3707 | Create a global list of tag matches from all agenda files, but check | ||
| 3708 | only TODO items and force checking subitems (see variable | ||
| 3709 | @code{org-tags-match-list-sublevels}). | ||
| 3710 | @end table | ||
| 3711 | |||
| 3712 | @cindex Boolean logic, for tag searches | ||
| 3713 | A @i{tags} search string can use Boolean operators @samp{&} for AND and | ||
| 3714 | @samp{|} for OR. @samp{&} binds more strongly than @samp{|}. | ||
| 3715 | Parenthesis are currently not implemented. A tag may also be preceded | ||
| 3716 | by @samp{-}, to select against it, and @samp{+} is syntactic sugar for | ||
| 3717 | positive selection. The AND operator @samp{&} is optional when @samp{+} | ||
| 3718 | or @samp{-} is present. Examples: | ||
| 3719 | |||
| 3720 | @table @samp | ||
| 3721 | @item +WORK-BOSS | ||
| 3722 | Select headlines tagged @samp{:WORK:}, but discard those also tagged | ||
| 3723 | @samp{:BOSS:}. | ||
| 3724 | @item WORK|LAPTOP | ||
| 3725 | Selects lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. | ||
| 3726 | @item WORK|LAPTOP&NIGHT | ||
| 3727 | Like before, but require the @samp{:LAPTOP:} lines to be tagged also | ||
| 3728 | @samp{NIGHT}. | ||
| 3729 | @end table | ||
| 3730 | |||
| 3731 | @cindex TODO keyword matching, with tags search | ||
| 3732 | If you are using multi-state TODO keywords (@pxref{TODO extensions}), it | ||
| 3733 | can be useful to also match on the TODO keyword. This can be done by | ||
| 3734 | adding a condition after a slash to a tags match. The syntax is similar | ||
| 3735 | to the tag matches, but should be applied with consideration: For | ||
| 3736 | example, a positive selection on several TODO keywords can not | ||
| 3737 | meaningfully be combined with boolean AND. However, @emph{negative | ||
| 3738 | selection} combined with AND can be meaningful. To make sure that only | ||
| 3739 | lines are checked that actually have any TODO keyword, use @kbd{C-c a | ||
| 3740 | M}, or equivalently start the todo part after the slash with @samp{!}. | ||
| 3741 | Examples: | ||
| 3742 | |||
| 3743 | @table @samp | ||
| 3744 | @item WORK/WAITING | ||
| 3745 | Select @samp{:WORK:}-tagged TODO lines with the specific TODO | ||
| 3746 | keyword @samp{WAITING}. | ||
| 3747 | @item WORK/!-WAITING-NEXT | ||
| 3748 | Select @samp{:WORK:}-tagged TODO lines that are neither @samp{WAITING} | ||
| 3749 | nor @samp{NEXT} | ||
| 3750 | @item WORK/+WAITING|+NEXT | ||
| 3751 | Select @samp{:WORK:}-tagged TODO lines that are either @samp{WAITING} or | ||
| 3752 | @samp{NEXT}. | ||
| 3753 | @end table | ||
| 3754 | |||
| 3755 | @cindex regular expressions, with tags search | ||
| 3756 | Any element of the tag/todo match can be a regular expression - in this | ||
| 3757 | case it must be enclosed in curly braces. For example, | ||
| 3758 | @samp{WORK+@{^BOSS.*@}} matches headlines that contain the tag | ||
| 3759 | @samp{WORK} and any tag @i{starting} with @samp{BOSS}. | ||
| 3760 | |||
| 3761 | @cindex level, require for tags match | ||
| 3762 | You can also require a headline to be of a certain level, by writing | ||
| 3763 | instead of any TAG an expression like @samp{LEVEL=3}. For example, a | ||
| 3764 | search @samp{+LEVEL=3+BOSS/-DONE} lists all level three headlines that | ||
| 3765 | have the tag BOSS and are @emph{not} marked with the todo keyword DONE. | ||
| 3766 | |||
| 3767 | @node Agenda views, Embedded LaTeX, Tags, Top | ||
| 3768 | @chapter Agenda Views | 3781 | @chapter Agenda Views |
| 3769 | @cindex agenda views | 3782 | @cindex agenda views |
| 3770 | 3783 | ||
| @@ -5578,8 +5591,8 @@ separator line will be formatted as table header fields. | |||
| 5578 | @item | 5591 | @item |
| 5579 | If a headline starts with the word @samp{QUOTE}, the text below the | 5592 | If a headline starts with the word @samp{QUOTE}, the text below the |
| 5580 | headline will be typeset as fixed-width, to allow quoting of computer | 5593 | headline will be typeset as fixed-width, to allow quoting of computer |
| 5581 | codes etc. Lines starting with @samp{:} are also typeset in | 5594 | codes etc. Lines starting with @samp{:} are also typeset in fixed-width |
| 5582 | fixed-width font. | 5595 | font. |
| 5583 | @table @kbd | 5596 | @table @kbd |
| 5584 | @kindex C-c : | 5597 | @kindex C-c : |
| 5585 | @item C-c : | 5598 | @item C-c : |