Merge remote-tracking branch 'srht/master'
[worg.git] / org-glossary.org
blob349caebb6fa64e6cc9cac7997ed4c32af8d36998
1 #+TITLE:      Org Glossary: An Explanation of Basic Org-Mode Concepts
2 #+AUTHOR:     Worg people
3 #+EMAIL:      mdl AT imapmail DOT org
4 #+OPTIONS:    H:3 num:nil toc:1 \n:nil ::t |:t ^:nil -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc
5 #+STARTUP:    align fold nodlcheck oddeven lognotestate
6 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
7 #+TAGS:       Write(w) Update(u) Fix(f) Check(c)
8 #+LANGUAGE:   en
9 #+PRIORITIES: A C B
10 #+CATEGORY:   worg
11 #+HTML_LINK_UP:    index.html
12 #+HTML_LINK_HOME:  https://orgmode.org/worg/
14 # This file is released by its authors and contributors under the GNU
15 # Free Documentation license v1.3 or later, code examples are released
16 # under the GNU General Public License v3 or later.
18 # Please feel free to add items or to complete any of the unfinished items.
20 * The Glossary
22 #+index: Glossary!Definition
24 The org-manual does a great job of explaining the myriad features of
25 org-mode. But for new users, the sheer number of options and features
26 can be overwhelming.
28 #+begin_quote
30 What exactly are properties? How should I use them? Do I need to know
31 how they work in order to use org mode?
33 What are categories? How do they differ from tags?
35 #+end_quote
37 If you find yourself asking such questions, this document is for you.
38 In the table of contents, you will find an alphabetical list of basic
39 concepts/features in org-mode. Click on any of them to jump to a brief
40 definition, a more detailed explanation of the feature, and a
41 description of possible uses. And feel free to add your own
42 definitions by [[file:worg-about.org][editing Worg]].
44 * Agenda
45   :PROPERTIES:
46   :CUSTOM_ID: agenda
47   :END:
49 #+index: Agenda!Definition
51 ** Definition
53 The agenda allows you to create filtered views of the items in your
54 [[#agenda-files][agenda files]]. These include "day-planner" views of your schedule,
55 lists of your todos, and the results of queries (for tags, words,
56 regular expressions, etc.). You might think of the agenda as a
57 combination of a task manager and a very powerful search interface.
59 ** Details
61 Provided you have followed the manual's instructions on setting up
62 org-mode and have designated some [[#agenda-files][agenda files]], simply type =C-c C-a=
63 (or =M-x org-agenda=) to gain access to the various views available.
65 Here are brief explanations of the options:
67  - a (Agenda) :: Presents a view of today's (or, optionally, this
68    week's) scheduled items, appointments, and upcoming deadlines.
70  - t (Todo entries) :: Presents a list of all active [[#todo-keywords][todo
71    keywords]] in your agenda files.
73  - m (Match) :: Allows you to search your agenda files for headlines
74    with particular metadata (tags, properties, or TOD0s).
76      + The simplest way to query your files is to enter the name of a
77        tag, e.g., "@computer".
79      + To construct more advanced queries, please [[https://orgmode.org/manual/Matching-tags-and-properties.html][consult the manual]].
81  - L (Timeline for current buffer) :: Shows a chronological view of
82    all items with dates in the file you are currently visiting.
84  - s (Search) :: Allows you to search entries in your agenda files for
85    particular words or regular expressions.
87  - / (multi-occur) :: Shows all lines in your agenda files matching a
88    regular expression.
90  - < :: Restricts the agenda view to the file you are currently
91    visiting.
93  - << :: Restricts the agenda view to the subtree you are currently
94    visiting.
96 Within the agenda view, each item is linked to its location in your
97 files, so you can jump directly to that location from the agenda (by
98 pressing =TAB= or =RET=).
100 ** Uses
102 The uses of the agenda are limitless!
104 The agenda frees you from having to worry too much about the
105 organization of your org-mode files. If you are new to org-mode,
106 simply start by creating todos in your outlines and notes and
107 (optionally) adding tags and scheduling information to them. Even if
108 your file is cluttered with extraneous notes and ramblings, the agenda
109 will find the relevant lines and display them in a clean and readable
110 fashion.
112   - One use of the agenda is as a day planner system. If you prefer to
113     schedule your tasks and to see a daily agenda of TODOs, you'll
114     probably be pressing =C-c a a= a lot.
116   - The agenda can also be used for a powerful GTD system. If you like
117     to filter your "next actions" by context, then you'll probably
118     make frequent use of =C-c a t= to see a list of all your active
119     TODOs and to filter them by tag/context.
121   - While the agenda is a powerful task management tool, it is also a
122     fantastic research tool. If you keep a file full of reading notes,
123     for instance, you can use the agenda to locate entries containing
124     a particular word or labeled by a particular tag.
126 There are many more possibilities of configuring the agenda with
127 [[https://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php][custom agenda commands]].
129 * Agenda files
130   :PROPERTIES:
131   :CUSTOM_ID: agenda-files
132   :END:
134 #+index: Agenda Files!Definition
136 ** Definition
138 These are the files that are used to generate your [[#agenda][agenda]] views. When
139 you call your agenda, the TODOs and scheduling information in your
140 agenda files will be displayed.
142 ** Details
144 There are different ways to designate these files:
146   1. Add a file manually with =C-c [= (=M-x
147      org-agenda-file-to-front=).
149      - Remove with =C-c ]= (=M-x org-remove-file=).
151   2. Type =M-x customize-variable [RET] org-agenda-files= and enter
152      the names of your agenda files.
154      - If you enter a directory, all org files in that directory will
155        be included in your agenda files.
157 ** Tips: Organizing agenda files
159 One of the most common questions for new (and seasoned) users of
160 org-mode is how to organize agenda files. Should you put everything in
161 one big file organized by project? Should you create a new file for
162 each project? Or should you have separate "containers" for different
163 types of data: i.e., one file (or subtree) for appointments, one for
164 reference, one for todos, and so on.
166 The short answer: it doesn't matter. The agenda will be able to parse
167 and organize your TODOs, appointments, and deadlines no matter how
168 they are organized in your files.
170 If you are using org-mode for the first time, the simplest approach
171 may be to use a single file and to enter projects or todos as the
172 appear. Then, whenever you review your file, reorganize your todos and
173 projects into "groupings" (i.e., trees) that make sense to you. If a
174 tree starts to get too big, then start a new file. Perhaps you'll
175 discover that you want to keep your "work" and "personal" tasks in
176 different files.
178 Perhaps the main consideration in organizing your files is to consider
179 [[#inheritance][inheritance]] and [[#file-restriction][restriction]]. If you'd like a number of items to belong
180 to the same category or to have the same tags for easy agenda
181 filtering, then they probably belong in the same tree and/or file.
183 An example:
185   - If you'd like all your appointments to belong to the [[#category][category]]
186     "appts", then it probably doesn't make sense to scatter them as
187     first level headings among multiple files. It would make more
188     sense to create an appointments file or heading with the category
189     "appts".
191   - On the other hand, if you'd prefer to organize your appointments
192     by area of responsibility (e.g., work, personal, health, etc.),
193     then it would make perfect sense to place them in separate trees
194     and/or files.
196 * Archiving
197   :PROPERTIES:
198   :CUSTOM_ID: archiving
199   :END:
201 #+index: Archiving!Definition
203 ** Definition
205 Archiving is a way of hiding and/or getting rid of old or unwanted
206 items in your org files without deleting them altogether.
208 ** Details
210 Archiving works on [[#tree][subtrees]] in your org-file by doing the following:
212   - Preventing them from opening when you cycle visibility with =TAB=
213     or =Shift-TAB=. (They will stay closed unless you explictly open
214     them with =Control-TAB=.)
216   - Keeping them out of your [[#agenda][agenda]] views. (They will only be included
217     if you type =v a= or =v A= in the agenda.)
219 There are three different ways to archiving an item/tree:
221   - C-c C-x a :: Mark the subtree as archived (i.e., give it an
222      =:ARCHIVE:= tag) but leave it in its current location.
224        - The headline remains visible in your org file but its contents
225          will not open during cycling and it will not be included in
226          the agenda.
228   - C-c C-x A :: Move the subtree to a separate archive headline
229      within the parent tree and/or file.
231        - This is useful for maintaining a clean org-file, since it
232          removes archived headlines from view.
234   - C-c C-x C-s :: Move the subtree to a separate file. The default
235      name of the file is =[filename].org_archive=.
237        - This is useful for getting rid of subtrees altogether. You
238          might want to use this when you finish a project.
240        - Since this is a relatively drastic action, org-mode offers an
241          alternate version of the command (=C-u C-c C-x C-s=) that
242          checks the subtree to make sure there are no active TODOs
243          before archiving it.
245 ** Uses
247 Archiving is very useful for keeping your org files free of clutter.
248 But which type of archiving should you use?
250 Here are a few ideas:
252   - Use =C-c C-x a= when you'd like to archive an entry/subtree but
253     want to be reminded of its presence (e.g., to be reminded of a
254     completed task) when you view your org file.
256   - Use =C-c C-x A= when you want to remove an entry/subtree from view but
257     want it to remain together with its context (i.e., within the file
258     or parent tree). This is often useful for archiving TODO items
259     that are part of an incomplete project.
261   - Use =C-c C-x C-s= when you are sure you no longer require an
262     entry/subtree except for reference. This is often useful for
263     archiving completed projects.
265 * Attachment
266   :PROPERTIES:
267   :CUSTOM_ID: Attachment
268   :END:
270 #+index: Attachment!Definition
272 ** Definition
273 Attachments allow the addition of arbitrary reference material (e.g. binary files, images, audio, etc.)
274 to a node in an org file.
276 ** Details
277 Attachments are files located in a directory belonging to an outline
278 node.  Org uses directories named by the unique ID of each entry
279 and stored the ID as a special property of the node
280 These directories are located in the `data' directory which lives in
281 the same directory where your Org file lives(1).  If you initialize
282 this directory with `git init', Org will automatically commit changes
283 when it sees them.
285 ** Uses
286 Attachments can be used essentially for the purposes as links, to allow
287 access to documents related to a particular node. If there is a large number
288 of such links, it may be more convenient to just put them in a directory
289 and plant a link to the directory. Attachments provide a more convenient
290 way to do this latter task.
292 * Category
293   :PROPERTIES:
294   :CUSTOM_ID: category
295   :END:
297 #+index: Category!Definition
299 ** Definition
300 A category is the group an item belongs to.
302 ** Details
303 The category of an item is shown in the left hand column of the
304 daily/weekly agenda view.
306 : Day-agenda (W38):
307 : Wednesday  16 September 2009
308 :   badclient:  Scheduled:  TODO Call angry client to calm him down
309 :   appts:      Dinner at Julio's
311 By default an item's category is the name of the file (minus the
312 extension) to which it belongs.
314 You can specify a different category for a file by placing the
315 following line at the top of your org file:
317 #+begin_src org
318   ,#+CATEGORY: CompanyABC
319 #+end_src
321 Or, you can set a category as the property of a [[#tree][tree]]. All items in
322 that tree will [[#inheritance][inherit]] that category and be labeled with it in the
323 agenda.
325 #+begin_src org
326   ,* Birthdays
327     :PROPERTIES:
328     :CATEGORY: birthdays
329     :END:
330 #+end_src
332 ** Uses
334 The main purpose of a category is to increase visibility in the
335 daily/weekly agenda --- i.e., to allow you to see which "group" an
336 item belongs to.
338 Apart from visibility and compartmentalization, categories do not add
339 much additional functionality to an item. It is certainly *not*
340 necessary to set them for every file and/or heading.
342 You can search for items by category in the agenda using the following
343 key sequence:
345 : C-c C-a m CATEGORY="birthdays"
347 In general, categories are *not* an efficient way of searching
348 for and/or filtering tasks. It is much faster to use [[#tag][tags]] or filetags
349 for this.
351 Here's one way to distinguish between categories and tags: an entry
352 can belong to only one category but it can have multiple tags.
354 * DEADLINE
356 #+index: DEADLINE!Definition
358 ** Definition
360 A deadline is a special timestamp for indicating items that should be
361 performed by a certain time. Reminders about deadlines appear in your
362 agenda a specified number of days before they due.
364 ** Details
366 You can add a deadline to a headline/entry by typing C-c C-d. You can
367 remove a deadline by typing C-u C-c C-d.
369 Here is the syntax for deadlines:
371 #+begin_src org
372   ,* My big project
373     DEADLINE: <2009-09-20 Sun>
374 #+end_src
376 You will be alerted of this deadline ahead of time when you select the
377 daily/weekly agenda (=C-c C-a a=).
379 :  index:      In   3 d.:  My big project
381 How soon the warning appears in your agenda is controlled by the
382 variable =org-deadline-warning-days=. The default number of days is 14.
384 The deadline will remain in your agenda (as an overdue item) until it
385 is marked done.
387 You can change the a warning period for a particular headline by
388 adding something like "-3d" (3 days) or "-2m" (two months) to the
389 timestamp:
391 #+begin_src org
392   ,* My big project
393     DEADLINE: <2009-09-20 Sun -2m>
394 #+end_src
396 ** Uses
398 The obvious use of a deadline is to reminder yourself of tasks that
399 need to be completed by a certain date.
401 Deadlines can also be useful as an "advanced notice" system --- e.g.,
402 reminding yourself to prepare for an event or project.
404 You can add both a deadline and a scheduling timestamp to the same
405 entry.
407 * Docstring
408   :PROPERTIES:
409   :CUSTOM_ID: docstring
410   :END:
412 #+index: Docstring!Definition
414 ** Definition
415 A [[https://en.wikipedia.org/wiki/Docstring][docstring]] is the documentation written as part of a emacs lisp
416 variable or a function. It is part of Emacs' wonderful interactive
417 help system.
419 (Note: This definition is not org-mode specific, but is rather a more
420 general org-mode/lisp/coding concept. It's included here because
421 mailing list posts often reference a "docstring," an obscure phrase
422 for anyone not familiar with coding lingo.)
424 ** Details and uses
426 If you are wondering what a particular org-mode key combination,
427 function, or variable does, the manual is not your only source of
428 information. Carsten has also embedded a wealth of resources into the
429 org-mode source code itself. These can be easily viewed using Emacs
430 built-in help functions.
432 For instance, let's say you want to learn more about creating a clock
433 report in org mode. One way to do this is to type =C-h k= or =M-x
434 describe-key= and then to enter the relevant key combination (=C-c
435 C-x-C-r=). This will provide the following very helpful information:
437 : org-clock-report is an interactive compiled Lisp function in
438 : `org-clock.el'.
440 : It is bound to C-c C-x C-r, <menu-bar> <Org> <Logging work> <Create
441 : clock table>.
443 : (org-clock-report &optional arg)
445 : Create a table containing a report about clocked time.
446 : If the cursor is inside an existing clocktable block, then the table
447 : will be updated.  If not, a new clocktable will be inserted.
448 : When called with a prefix argument, move to the first clock table in the
449 : buffer and update it.
451 : [back]
453 If you happened to know the name of the function, you could also
454 locate the same information using =C-h f= or =M-x describe-function=
455 and entering =org-clock-report=. Or you could use =C-h a= or
456 =apropos-command= to browse all functions that contain the words "org
457 clock".
459 Finally, if you want to learn more about variables, you can read their
460 docstrings by browsing the customize interface (=M-x customize-group
461 [RET] org=) or by typing =C-h v= or =M-x describe-variable=).
463 * Drawers
464   :PROPERTIES:
465   :CUSTOM_ID: drawer
466   :END:
468 #+index: Drawers!Definition
470 ** Definition
472 A drawer is a container that can hide information you don't want to
473 see during normal viewing and/or cycling of your outline.
475 ** Details
477 A drawer looks like this:
479 #+begin_src org
480   ,* Daily sleep log
481     :LOGBOOK:
482     - Note taken on [2009-09-16 Wed 04:02] \\
483       Didn't sleep at all.
484     - Note taken on [2009-09-15 Tue 05:25] \\
485       Slept fitfully.
486     - Note taken on [2009-09-14 Mon 09:30] \\
487       Slept like a log.
488     :END:
489 #+end_src
491 When you cycle the visibility of your outline, the contents of the
492 drawer will remain hidden.
494 #+begin_src org
495   ,* Daily sleep log
496       :LOGBOOK:
497       :END:
498 #+end_src
500 The only way to view the contents is to press =TAB= directly on the
501 drawer.
503 If you want a new name for a drawer, such as :NOTES:, you must
504 customize the variable "org-drawers". Simply type =M-x
505 customize-variable [RET] org-drawers" and add a new label.
507 ** Uses
509 By default, org-mode uses drawers to hide a variety of information,
510 such as [[#property][properties]] and clocked times.
512 But drawers are also quite useful for storing comments that you don't
513 want to see all the time. For instance, if you are writing a paper,
514 you might add a =:NOTE:= drawer to the variable =org-drawers=. Then
515 you can deposit any notes to yourself in such drawers. By default, the
516 information you put in drawers will not be exported to HTML, LaTeX,
517 etc.
519 * Entry
520   :PROPERTIES:
521   :CUSTOM_ID: entry
522   :END:
524 #+index: Entry!Definition
526 ** Definition
528 An entry is the basic unit of data in org-mode. It consists of a
529 [[#headline][headline]], metadata (tags, todo keyword, properties, priority, etc.),
530 and whatever other text it contains.
532 ** Details
534 An entry is to be distinguished from a [[#tree][tree]], which consists of all
535 headlines and entries beneath a particular entry within the outline
536 structure. Entries nested within other entries form a tree.
538 Here is a sample entry with a lot of data:
540 #+begin_src org
541   ,* TODO [#B] Headline                                                   :tags:
542      :PROPERTIES:
543      :DESCRIPTION: This is a sample property.
544      :CATEGORY: documentation
545      :CUSTOM_ID: an-extra-special-headline
546      :END:
548    And here is the text of an entry. You can put an unlimited amount of
549    text in an entry!
551    You can also add lists:
553     - First item
555     - Second item
557     - Third item
559    And tables:
561    | Meal      | Food            | Calories |
562    |-----------+-----------------+----------|
563    | Breakfast | Eggs            |      500 |
564    | Lunch     | Escargot        |      800 |
565    | Dinner    | Bread and Water |      200 |
566    |-----------+-----------------+----------|
567    | Total     |                 |     1500 |
568 #+end_src
570 * Headline
571   :PROPERTIES:
572   :CUSTOM_ID: headline
573   :END:
575 #+index: Headline!Definition
577 ** Definition
578 A headline is the name for an outline heading in an org file.
580 ** Details
581 Headlines begin with one or more asterisks.
583 #+begin_src org
584   ,* A headline
585 #+end_src
587 The "level" of a headline corresponds to the number of asterisks. The more asterisks,
588 the deeper the level in the outline.
590 #+begin_src org
591   ,***** A "level 5" outline heading
592 #+end_src
594 As are all outlines, org-files are organized hierarchically. Deeper
595 headlines are "children" of higher-level "parent" headlines (and can
596 "inherit" their properties). Headlines on the same level are known as
597 siblings.
599 #+begin_src org
600   ,* A parent
601   ,** A child
602   ,*** Sibling one (also a child of "A child")
603   ,*** Sibling two
604   ,*** Sibling three
605 #+end_src
607 You can move headlines (and their corresponding [[#entry][entries]]) by using the
608 cursor keys in conjunction with the =Meta= key.
610  - =M-Left= and =M-Right= move the headline horizontally (i.e., change
611    its level).
613    - The org documentation often uses the terms "promote" and "demote"
614      for this action.
616  - =M-Up= and =M-Down= move the headline vertically.
618 You can easily jump to another headline using =M-x org-goto= (=C-c
619 C-j=).
621 You can easily "refile" a headline in a different location using =M-x
622 org-refile= (=C-c C-w=).
624 ** Uses
626 The basic use of headings, of course, is to distinguish separate
627 sections within your outline and to organize them hierarchically.
629 The other major use of headings is as TODO "items" that appear in your
630 agenda.
632 The power of org-mode lies in its treatment of headlines as
633 "containers" of information to which you can attach all sorts of data
634 ([[#todo-keywords][todo keywords]], [[#tag][tags]], priorities, timestamps, [[#property][properties]], and an
635 unlimited amount of text). This turns org-mode's deceptively simple
636 outline structure into a powerful "database" of information, in which
637 units of data can be nested within one another.
639 * Inheritance
640   :PROPERTIES:
641   :CUSTOM_ID: inheritance
642   :END:
644 #+index: Inheritance!Definition
646 ** Definition
648 Inheritance is a term used to describe the way in which [[#entry][entries]] in a
649 [[#tree][tree]] can share the properties of their "parent" [[#headline][headlines]].
651 ** Details
653 Org-mode takes full advantage of the hierarchical structure of
654 outlines by allowing lower level headlines to "inherit" (or share) the
655 properties of their parents.
657 The most common form of inheritance in org-mode is "[[https://orgmode.org/manual/Tag-inheritance.html][tag inheritance]]".
658 This is controlled by the variable org-use-tag-inheritance (true by
659 default). When turned on, lower level outline headings share the tags
660 of their parents. Thus in the following tree, all the headlines have
661 the tag "=:reading:=", even though it is only explicitly set for the
662 top level headline:
664 #+name: tag-inheritance-example
665 #+begin_src org
666   ,* Summer reading list                                               :reading:
667     DEADLINE: <1965-06-06 Sun>
669   ,** /To Kill a Mockingbird/
671   ,** /Catch 22/
673   ,** /Herzog/
674 #+end_src
676 Some properties, such as [[#category][category]], are also inherited by default. See
677 [[https://orgmode.org/manual/Property-inheritance.html][the manual]] for more details.
679 ** Uses
681 The most common use of tag inheritance is in agenda views and agenda
682 filtering. For instance, if you searched for the tag "reading" in your
683 agenda files, all of the headings in the [[tag-inheritance-example][example above]] would appear.
685 As a result it is easy to add a tag and/or category to a whole subtree
686 of items simply by adding a single tag to the parent headline.
688 Let's say for instance, that you want to designate a whole bunch of
689 tasks as belonging to the project "topsecret". By adding =:topsecret:=
690 to the top headline of the group, you are in effect labeling all the
691 items in the tree as "topsecret". An agenda search for the TODOs with
692 the tag "topsecret" (=C-c a M [RET] topsecret=) would then return any
693 active TODOs in the entire tree.
695 Another common use of inheritance is to allow a special setting (e.g.,
696 logging or archive location) to apply to an entire subtree.
698 Finally, inheritance plays an important role in org-mode's column
699 view.
701 * Property
702   :PROPERTIES:
703   :CUSTOM_ID: property
704   :END:
706 #+index: Property!Definition
708 ** Definition
710 A property is an arbitrary piece of "metadata" you can attach to an
711 entry. A property takes the form of a "data pair," which consists of
712 a key and its value.
714 ** Details
715 Properties are stored in [[#drawer][drawers]] beneath a headline. Here is a sample
716 property drawer:
718 #+begin_src org
719   ,* Invoice for fixing the toilet
720      :PROPERTIES:
721      :LOGGING:  lognoterepeat
722      :BILLED: 102.13
723      :BILLING_DATE: 2009-09-11
724      :CLIENT:   ABC Company
725      :END:
726 #+end_src
728 Though org-mode reserves a handful of property keys for special uses
729 (e.g., LOGGING in the example above), you are otherwise free to add
730 whatever property keys and values you'd like.
732 Though you can type properties by hand, the simplest way to add them
733 is to type =C-c C-x p= or =M-x org-set-property=.
735 ** Uses
737 For new org users, properties can seem a bit puzzling. What exactly
738 are they for? Here are some of their uses:
740    1. To specify settings for the local org-mode [[#tree][tree]].
742       - For instance, though you may not normally want to be prompted
743         for a note when you mark an item as DONE, you might want to
744         make an exception for a particular task or project. To do so,
745         you would set the LOGGING property to "lognotedone" in the
746         relevant subtree.
748    2. To create a small database of information.
750       - The manual offers an nice example of this: [[https://orgmode.org/manual/Property-syntax.html#Property-syntax][keeping track
751         of a information about a CD collection]].
753       - Similarly, you might keep bibliographical information about
754         books you've read in properties.
756    3. To enter data that can be viewed as a "spreadsheet" in column view.
758    4. To create more specific labels for headlines than generic tags allow.
760       - For instance, if you are keeping track of expenses, you could
761         put the type of expense in a tag, but then it would be mixed
762         up with your other tags. A solution would be to create a
763         special property (e.g., EXPENSE_TYPE) to hold the information.
765    5. To label a particular tree with a unique ID so that it can be
766       referenced easily via hyperlinks.
768 * Tag
769   :PROPERTIES:
770   :CUSTOM_ID: tag
771   :END:
773 #+index: Tag!Definition
775 ** Definition
777 A tag is a label (or piece of "metadata") that is attached to a
778 headline for easy identification and filtering later. Several tags can
779 be attached to the same headline.
781 ** Details
783 Tags can be added to headlines with the key combination =C-c C-q= or
784 =C-c C-c=.
786 Tags have the following syntax:
788 #+begin_src org
789   ,* A headline with tags                               :Richard:URGENT:errands:
790 #+end_src
792 You may be familiar with tags from blogs or sites like [[http://del.icio.us][del.icio.us]].
793 Tags are a way of labeling information without having to rely on a
794 rigid hierarchical structure. Unlike categories, you can give a
795 headline/entry multiple tags. In many ways, org-mode offers the best
796 of both worlds: the hierarchical organization of an outline and the
797 impromptu labeling of tags.
799 The entry above would appear in queries for any of the tags:
800 "Richard", "URGENT", or "errands".
802 The syntax for searching tags via the [[#agenda][agenda]] is quite simple. For
803 instance, you could create a targeted agenda search for all items
804 tagged "Richard" and "urgent".
806 : C-c a m Richard+URGENT
808 Or for items tagged Richard that are not urgent:
810 : C-c a m Richard-URGENT
812 You can also use sparse view searches to display all tags within a
813 particular org-file.
815 If you find yourself commonly using certain tags, you can create a
816 list of shortcuts for them by typing =M-x customize-variable [RET]
817 org-tags-alist=. You can also set special tags for a particular file.
818 See [[https://orgmode.org/manual/Setting-tags.html][the manual]] for more details.
820 ** Uses
822 One common use of tags is as [[https://en.wikipedia.org/wiki/Getting_Things_Done#GTD_methodology][GTD contexts]]. You might, for instance,
823 define a list of tags in org-tags-alist that correspond to the various
824 contexts in a "next action" can be completed: @computer, @home,
825 @errands, @work, and so on. Then you can quickly filter for these tags
826 by pressing "=/=" in the agenda. See [[https://orgmode.org/manual/Agenda-commands.html#Agenda-commands][the manual]] for more details.
828 Another common use of a tag is to label a group of tasks as belonging
829 to a particular project or area of responsibility. For instance, you
830 might create a subtree in your file that contains all your house
831 repair projects and tag it with ":houserepair:". Let's say that when
832 Saturday rolls around, you decide to work exclusively on repairs.
833 Thanks to [[#inheritance][inheritance]], you can quickly locate all your tasks that
834 inherit the ":houserepair:" tag.
836 Here's what this would look like:
838 #+begin_src org
839   ,* Tasks around the house                                        :houserepair:
841   ,** TODO Fix sink
843   ,** TODO Mow lawn
845   ,** TODO Tear up carpet
846 #+end_src
848 Tags are also extremely useful for notetaking and research. You might,
849 for instance, create a file of reading notes in which each entry is a
850 snippet of information tagged with relevant keywords. The beauty of
851 org-mode is that these snippets can be easily rearranged within the
852 outline and yet remain easy to find via tags.
854 ** Considerations: Tags vs. TODO keywords vs. Properties
856 One question that often emerges for new users of org mode is how to
857 decide when tags, [[#todo-keywords][TODO keywords]], or [[#property][properties]] are appropriate.
859 For instance, should you define your projects by creating a special
860 todo keyword for them (=PROJECT=) or by giving them a "=:project:="
861 tag? Similarly, should you create a TODO keyword for items that are
862 waiting, or should you add a "=:waiting:=" tag?
864 Either choice would be fine, of course, but here are a few
865 considerations to keep in mind:
867 1. Do you want quickly to filter for the item in the agenda view? If
868    so, a tag is probably your best choice.
870    - Note, you can add a setting to your .emacs that automatically
871      adds a tag whenever you assign a particular TODO keyword. Type
872      "=C-c v org-todo-state-tags-triggers=" for more information.
874 2. How visible do you want the keyword and/or tag to be? When viewing
875    an org-mode file, TODO Keywords are highly visible, tags somewhat
876    less so, and properties not at all.
878 3. Is the keyword part of your workflow? Do you want to be able to log
879    information (such as a timestamp and a note) when you add or remove
880    the keyword? If so, then use a TODO keyword.
882    - An example: While a "waiting" tag might make it easier to filter
883      for items in your todo list that are waiting/pending, a =WAITING=
884      todo keyword would allow you to keep track of when an item
885      entered the "waiting" state and when it left it.
887    - Similarly, if you want to keep track of a sequence of actions on
888      phone calls you receive, it would be relatively inefficient to
889      add and remove tags to designate each stage. It would probably be
890      better to set up a TODO sequence, such as ACT -> CALL -> MESSAGE
891      -> FOLLOWUP -> etc.
893 * Tree (subtree)
894   :PROPERTIES:
895   :CUSTOM_ID: tree
896   :END:
898 #+index: Tree!Definition
899 #+index: Subtree!Definition
901 ** Definition
903 A tree is created by the structure of an outline. It consists of a
904 heading and all subheadings/entries beneath it within the outline
905 hierarchy.
907 ** Details
909 A tree is to be distinguished from an [[#entry][entry]]. Whereas an entry
910 indicates only a single headline and its data, a tree consists of
911 multiple nested entries. And, of course, subtrees are nested within
912 larger trees.
914 * Todo Keywords
915   :PROPERTIES:
916   :CUSTOM_ID: todo-keywords
917   :END:
919 #+index: Todo Keywords!Definition
921 ** Definition
923 A TODO keyword is a small keyword at the beginning of a headline that
924 defines the TODO state of the entry.
926 ** Details
928 The default TODO keywords in org-mode are TODO and DONE. They are
929 automatically given nice colors to make them stand out.
931 #+begin_src org
932   ,* DONE Check cupboard to see if I'm out of bread
933     CLOSED: [2009-09-16 Wed 13:14]
934   ,* TODO Buy bread at the store
935 #+end_src
937 Org mode distinguishes between two types of keywords, active and
938 inactive (corresponding with the default TODO and DONE). By default,
939 active TODOs will be shown in [[#agenda][agenda views]]. Inactive todos will not be
940 shown.
942 You can select a TODO keyword by typing =C-c C-t= on an item. Or you
943 can move sequentially through TODOs by typing =Shift-Left= or
944 =Shift-Right=.
946 While the default keywords TODO and DONE will suffice for many users,
947 you can define your own TODO keywords (such as PROJECT, WAITING,
948 etc.) by following the instructions in the manual:
950 - https://orgmode.org/manual/TODO-items.html
952 ** Uses
953 :PROPERTIES:
954 :ID:       e0f76b6c-411f-4df1-88f5-445e11d9ca1d
955 :END:
957 Not surprisingly, the most common use of TODO keywords is to indicate
958 items in your outline files that require action. Where other task
959 management systems often separate notes and todos, org-mode allows you
960 to mark items in your notes as TODOs.
962 Another common use of TODO keywords is to follow a single item through
963 an extended workflow. For instance, you might create a special TODO
964 keyword sequence for invoices by placing the following at the top of
965 your org file:
967 #+begin_src org
968   ,#+SEQ_TODO: INVOICE(i) MAIL(m) WAITING(w) FOLLOWUP(f) | RECEIVED(r)
969 #+end_src
971 Note: The "|" separates active from inactive todos.
973 You can combine such todo sequences with logging in order to keep a
974 record of when each event in the sequence happened.
976 * TODO Awaiting definitions
977 ** Agenda filtering
979 #+index: Agenda filtering!Definition
981 ** CLOCK
983 #+index: Clock!Definition
985 ** Column view
987 #+index: Column view!Definition
989 ** Cycling
991 #+index: Cycling!Definition
993 ** Effort estimate
995 #+index: Effort estimate!Definition
997 ** Filetag
999 #+index: Filetag!Definition
1001 ** Project
1003 #+index: Project!Definition
1005 ** Note
1007 #+index: Note!Definition
1009 ** List
1011 #+index: List !Definition
1013 ** Level
1015 #+index: Level!Definition
1017 ** Logging
1019 #+index: Logging!Definition
1021 ** SCHEDULED
1023 #+index: SCHEDULED!Definition
1025 ** Restriction lock
1026   :PROPERTIES:
1027   :CUSTOM_ID: file-restriction
1028   :END:
1029 # roklein AT roklein DOT de: is this the right place for the tag?
1030 #+index: Restriction lock!Definition
1032 ** Table
1034 #+index: Table!Definition
1036 ** Timestamp
1038 #+index: Timestamp!Definition