aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorCarsten Dominik2009-08-06 09:14:10 +0000
committerCarsten Dominik2009-08-06 09:14:10 +0000
commitc8d0cf5ca023b996beb0ca15f7b054951acf9c7e (patch)
treeb1c465c4840dd899dc51ea577a3f5f70c4079e71 /doc/misc
parent8c914fdb1828b576dd66fd4ef546c32d62252c06 (diff)
downloademacs-c8d0cf5ca023b996beb0ca15f7b054951acf9c7e.tar.gz
emacs-c8d0cf5ca023b996beb0ca15f7b054951acf9c7e.zip
2009-08-06 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-create-formula-image): Remove the -E option for dvipng. * org-exp.el (org-default-export-plist): Respect #+BIND. (org-export-confirm-letbind): New function. * org.el (org-paste-subtree): Test the kill ring entry if it is going to be used. (org-copy-subtree): Use `org-forward-same-level'. (org-forward-same-level): Respect the `invisibe-ok' arg for back-to-heading. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-table-map-tables): Make sure cursor is back at table beginning after funcall. * org-agenda.el (org-agenda-bulk-action): Make sure parents are handled before children, and do not error if an entry is not found, probably because it hase been remove when the parent was archived or refiled. * org.el (org-ido-completing-read): Accept straight lists for completion as well as alists. * org-timer.el (org-timer-cancel-timers): Renamed from `org-timer-cancel-timers'. * org.el (org-cycle-internal-local): Fix problem with finding next invisible line. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-list.el (org-list-send-list): Call `org-list-goto-true-beginning' instead of `org-list-find-true-beginning', which does not exist. * org-timer.el (org-timer-reset-timers): Use `mapc'. (org-timer-set-timer): Do not assign to heading. * org-id.el (org-id-open): Quote function name. * org-macs.el (org-unmodified): Turn off recording undo information while running inside the macro. * org-table.el (org-table-export): Also work in file-less buffers. * org.el (org-startup-indented): New option. (org-startup-options): Add new options indent and noindent. (org-unfontify-region): Remove line-prefix and wrap-prefix properties. (org-after-demote-entry-hook, org-after-promote-entry-hook): New hooks. (org-promote, org-demote): Run the new hooks. * org-table.el (org-table-align): Replace leading \n as well. * org-exp.el (org-export-push-to-kill-ring): Remove `line-prefix' and `line-wrap' text properties. * org-compat.el (org-kill-new): New function. * org-agenda.el (org-format-agenda-item): Remove `line-prefix' and `line-wrap' text properties. * org-indent.el: New file. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-provide-todo-statistics): Tweak docstring. * org-id.el (org-id-open): Honor `org-link-frame-setup'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-as-org): Insert the "-source" string before the extension. * org.el (org-read-date): Make sure the calendar is in the current frame. (org-set-emph-re): Remove the ? from the post-match. (org-emphasis-regexp-components): Add backslash to the postmatch class. (org-set-font-lock-defaults): Write \n instead of \xa, and make it optional so that also lines at the end of the buffers will still be matched as headlines. * org-table.el (org-table-error-on-row-ref-crossing-hline): Variable made obsolete. (org-table-relative-ref-may-cross-hline): New option. (org-table-find-row-type): Honow the new option `org-table-relative-ref-may-cross-hline'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (org-table-cut-region, org-table-copy-region): Work on single field if no active region. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-make-header): Only insert title if one is defined. * org.el (org-make-options-regexp): Allow empty values. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-cycle-internal-local): Improved version of finding next visible line. (org-cycle-hide-drawers): Only hide drawers if this is really necessary. (outline-end-of-subtree): Make `outline-end-of-subtree' use the org-version of this function in Org-mode. We use advice to implement this change, so that future changes to this function in outline.el wil be handled properly. (org-forward-same-level, org-backward-same-level): New commands. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-remove-empty-overlays-at) (org-clean-visibility-after-subtree-move): New functons. (org-move-subtree-down): Simplify cleanup of display. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-mac-message.el (org-mac-message-get-links): Improve docstring. Make argument SELECT-OR-FLAGGED optional, default to "s". Fix the return value. (org-mac-message-insert-flagged): Simplify. * org.el (org-refile-get-location): Tamper with refile history o that history contains compete matches instead of the entered string. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-store-link): Never store a link to an inline task. * org-footnote.el (org-footnote-goto-local-insertion-point): Skip inline tasks when positioning footnotes. * org.el (org-refile): Remove the END line when archiving an inline task that does have an END line. * org-archive.el (org-archive-subtree): Remove the END line when archiving an inline task that does have an END line. * org-macs.el (org-with-limited-levels): New macro. (org-get-limited-outline-regexp): New function. * org-exp.el (org-export-format-source-code-or-example): Fix bug that did not enumerate first line. (org-export-mark-radio-links): Skip matches in links. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-activate-plain-links): Make single-match. (org-adapt-indentation): Fix docstring. * org-macs.el (org-unmodified): Turn of modification hooks while running this macro. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-adapt-indentation): Slightly improve the docstring. (org-occur): Sends an error when the user inputs an empty string. (org-priority): Bugfix: the tag alignement should happen within save-excursion. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-make-link-regexps): Don't exclude parentheses from `org-plain-link-re' (org-cycle-internal-local): When locally cycling, switch directly from CHILDREN to FOLDED if there is no subtree (org-cycle): Update the docstring to document the new behavior of `org-cycle-internal-local'. 2009-08-06 Nicolas Goaziou <n.goaziou@neuf.fr> (tiny change) * org-clock.el (org-clock-in): Bugfix: recognize timestamps with an abbreviated format for days. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-protocol.el (org-protocol-default-template-key): New option. * org.el (org-refile): Bugfix: save-excursion before reading the refile target, otherwise cursor moves might confuse `org-refile'. * org.el (org-toggle-heading): Bugfix: correctly convert list items before the first headline. * org.el (org-provide-todo-statistics): Allow a list of TODO keywords to compute statistics against headlines containing a keyword from this list. (org-update-parent-todo-statistics): Possibly use the new allowed value of `org-provide-todo-statistics'. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-timer.el: Add autoload cookie. * org.el (org-occur-link-in-agenda-files): New function. * org-timer.el (org-timer-last-timer): New variable. * org-agenda.el (org-agenda-mode-map): New key for org-timer-set-timer called from the agenda. * org.el (org-mode-map): New key for org-timer-set-timer. * org-timer.el (org-timer-reset-timers) (org-timer-show-remaining-time, org-timer-set-timer): New functions. * org-clock.el (org-show-notification): Update the docstring. * org.el (org-provide-todo-statistics): Allow new value 'all-headlines for this option, which includes entries with no TODO keywords in the todo statistics. (org-update-parent-todo-statistics): Possibly use the new 'all-headline value from `org-provide-todo-statistics'. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-clock.el (org-dblock-write:clocktable): Add a new option :timestamp which allows display of timestamps in clock reports. * org.el (org-mode-map): Define new key `C-c C-*': convert a plain list to a subtree, preserving the structure of the list. (org-set-emph-re): Make the last element optional in the regexp. This regexp now matches an emphasized string at the end of a line. * org-list.el (org-list-goto-true-beginning) (org-list-make-subtree, org-list-make-subtrees): New functions. * org.el (org-eval-in-calendar): Select the right frame. (org-save-frame-excursion): Remove this macro. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-list.el (org-list-beginning-re): Bugfix: don't use * when trying to find the beginning of a list. * org-exp.el (org-get-file-contents): Use a new argument: markup. When present, tell org-get-file-contents not to protect org-like lines. * org-id.el (org-id-uuid-program): New option to set the name of the uuidgen program. (org-id-method): Use `org-id-uuid-program'. (org-id-new): Use `org-id-uuid-program'. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-exp.el (org-export-number-lines): Allow whitespace in code references. Allow the -r switch to remove the references in the source code even when the lines are not numbered: the labels can be explicit enough. * org.el (org-fontify-whole-heading-line): New option. (org-set-font-lock-defaults): Use the new option. * org-clock.el (org-show-notification-handler): New option. (org-show-notification): Use the new option. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-eval-in-calendar): Fix a bug about calendar navigation when `calendar-setup' value is 'calendar-only. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (orgstruct++-mode): Fix typo in docstring. (org-insert-link): Clean up: (or (...)) => (...) (org-insert-link): Use TAB for stored links completion. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-get-refile-targets): Fix bug: don't ignore case when building the list of targets. * org-remember.el (org-remember-delete-empty-lines-at-end): New option. (org-remember-handler): Use the new option. 2009-08-06 James TD Smith <ahktenzero@mohorovi.cc> * org.el (org-tags-sort-function): New option for sorting tags. (org-set-tags): Use the new option to sort tags. * org-plot.el (org-plot/gnuplot): Run with an idle timer to avoid premature deletion of the data when using org-plot in a script. 2009-08-06 Bastien Guerry <bzg@altern.org> * org-clock.el (org-clock-in-prepare-hook): New hook. (org-clock-in): Use this new hook. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-special-ctrl-a/e): Explicitely bind the value 'reversed for this option to the "true line boundary first" behavior. (org-tags-match-list-sublevels): Document the 'indented value for this variable. * org-latex.el (org-export-latex-first-lines): Fix problem with publishing the region. * org-exp.el (org-export-format-source-code-or-example): Fix bad line numbering when exporting examples in HTML. 2009-08-06 James TD Smith <ahktenzero@mohorovi.cc> * org-colview.el (org-format-time-period): Formats a time in fractional days as days, hours, mins, seconds. (org-columns-display-here): Add special handling for SINCE and SINCE_IA to format for display. * org.el (org-time-since): Add a function to get the time since an org timestamp. (org-entry-properties): Add two new special properties: SINCE and SINCE_IA. These give the time since any active or inactive timestamp in an entry. (org-special-properties): Add SINCE, SINCE_IA. (org-tags-sort-function): Add custom declaration for tags sorting function. (org-set-tags): Sort tags if org-tags-sort-function is set 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clock-goto): Find hidden headlines as well. * org.el (org-narrow-to-subtree): Find hidden headlines as well. * org-plot.el (org-plot/add-options-to-plist): Add timeind option. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-publish.el (org-publish-remove-all-timestamps): New function. (org-publish-all): Remove all timestamp files if `org-publish-all' is called with a prefix argument. * org-list.el (org-indent-item): Fix typo. (org-item-indent-positions): Normalize ordered bullet. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-macs.el (org-set-local): Make a local variable, do not make the variable buffer-local! * org-latex.el (org-export-as-latex): Call `org-install-letbind'. * org-exp.el (org-infile-export-plist): Read BIND lines. (org-install-letbind): New function. (org-export-as-org, org-export-preprocess-string): Call `org-install-letbind'. * org-list.el (org-list-demote-modify-bullet): New option. (org-first-list-item-p): Save point. (org-fix-bullet-type): New optional argument FORCE-BULLET. (org-indent-item): Honor `org-list-demote-modify-bullet'. (org-item-indent-positions): Return bullet types along with indentation. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-show-entry): Hide drawers. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-footnote.el (org-footnote-auto-adjust): New option. (org-footnote-auto-adjust-maybe): New function. (org-footnote-new, org-footnote-delete): Call `org-footnote-auto-adjust-maybe'. * org.el (org-startup-options): Add new footnote-related keywords. * org-publish.el (org-publish-timestamp-filename): Additional arguments PUB-DIR and PUB-FUNC, which are included in the hash. (org-publish-needed-p): Additional arguments PUB-DIR PUB-FUNC TRUE-PUB-DIR. Pass them through to `org-publish-timestamp-filename'. (org-publish-update-timestamp): Additional arguments PUB-DIR and PUB-FUNC, which are included in the hash. (org-publish-file): Delay timestamp test until the publishing function is known. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-bulk-action): Add scheduling and setting the deadline. * org.el (org-read-date-final-answer): New variable. (org-read-date): Store the final answer string, including the date from the calendar, for reuse by agenda bulk commands. * org-publish.el (org-publish-attachment): Fix publishing of attachments. * org-latex.el (org-export-latex-quotation-marks): Fix export of quotation makrs in parenthesis. (org-remove-initial-hash): New function. (org-export-latex-preprocess): Fix bug with infinite loop if environment is not properly closed. * org-table.el (org-table-get-remote-range): Find #+TBLNAME also when indented. * org.el (org-fontify-meta-lines-and-blocks): Make #+TBLNAME highlight also when indented. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-footnote.el (org-footnote-renumber-fn:N): New command. (org-footnote-action): Offer renumbering. * org.el (org-cycle): Honor the `integrate' value of org-cycle-include-plain-lists'. * org-list.el (org-cycle-include-plain-lists): New allowed value `internal'. Improve the docstring. * org.el (org-set-autofill-regexps): Improve the paragraph-start regexp to work better with LaTeX commands. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-inline-image-extensions): Add ps and eps extensions. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-write-agenda): Make sure org-icalendar is loaded. * org.el (org-map-entries): No longer force `org-tags-match-list-sublevels' to t during a todo-only tags search. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-low-levels): Allow user-defined environment. (org-export-latex-subcontent): Handle user-defined environment. * org-agenda.el (org-agenda-view-mode-dispatch): Add more keys to the View dispatcher. * org.el (org-hide-block-toggle): Use `org-make-overlay' instead of `make-overlay'. * org-latex.el (org-export-as-pdf): Protect match data during call to shell-quote-argument. * org-agenda.el (org-agenda-mode-map): Modify bulk action keys. (org-agenda-view-mode-dispatch): New function. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-mode): Reset list of marks. (org-agenda-mode-map): Define new keys for refile and bulk action. (org-agenda-menu): Add menu itesm for refile and bulk action. (org-agenda-refile): New function. (org-agenda-set-tags): Optional arguments TAG and ONOFF. (org-agenda-marked-entries): New variable. (org-agenda-bulk-select, org-agenda-remove-bulk-action-overlays) (org-agenda-remove-all-bulk-action-marks) (org-agenda-bulk-action): New functions/commands. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-get-file-contents): Protect org-like lines in included files. (org-export-format-source-code-or-example): Remove newlines. * org-latex.el (org-export-latex-links): Check for no-description marking. * org-exp.el (org-export-preprocess-apply-macros): Switch macro argument separator back to comma. (org-export-normalize-links): Mark links without description. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-infile-export-plist): Fix bug in macro processing. * org-agenda.el (org-agenda-clock-out): Update line after clocking out. (org-agenda-highlight-todo): Fix bug with highlighting. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-set-font-lock-defaults): Adapt formatting to capture new alignment strings. * org-table.el (orgtbl-self-insert-command): Add yas/expand to command list. (org-table-align): Check for forced align type. * org.el (org-self-insert-command): Add yas/expand to command list. * org-clock.el (org-clock-in-hook): New hook. (org-clock-in): Run `org-clock-in-hook. (org-clock-out-hook): New hook. (org-clock-out): Run `org-clock-out-hook. (org-clock-cancel-hook): New hook. (org-clock-cancel): Run `org-clock-cancel-hook. (org-clock-goto-hook): New hook. (org-clock-goto): Run `org-clock-goto-hook. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-store-link): Better default description for link to Org-mode headline. * org-exp.el (org-export-generic): Autoload the generic exporter function. (org-export): Implement the `g' key for the generic exporter. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (orgtbl-setup): Add a binding for `S-iso-lefttab', and for zbacktab'. * org-exp.el (org-infile-export-plist): Get macros also from #+SETUPFILE. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-colview.el (org-columns-capture-view): Protect vertical bars in column values. (org-columns-capture-view): Exclude comment and archived trees. * org-colview-xemacs.el (org-columns-capture-view): Protect vertical bars in column values. (org-columns-capture-view): Exclude comment and archived trees. * org.el (org-quote-vert): New function. * org-latex.el (org-export-latex-verbatim-wrap): New option. * org-exp.el (org-export-format-source-code-or-example): Use `org-export-latex-verbatim-wrap'. * org.el (org-clone-subtree-with-time-shift): Also shift inactive time stamps. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp-blocks.el: New file. * org-remember.el (org-remember-templates): Allow the headline element to be a function. (org-remember-apply-template): If the headline is a function, call it to get the true function. * org-clock.el (org-clock-menu): New function. (org-clock-update-mode-line): Update help string. (org-clock-modify-effort-estimate): New function. (org-clock-mark-default-task): New function. * org.el (org-hh:mm-string-to-minutes): Also take just a number of minutes as input. (org-org-menu): Add new clocking stuff. (org-clock-is-active): New function. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-open-non-existing-files): Improve docstring. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-icalendar.el (org-icalendar-include-bbdb-anniversaries): New option. (org-export-icalendar): Call `org-bbdb-anniv-export-ical'. * org-bbdb.el (org-bbdb-anniv-export-ical): New function. * org-list.el (org-get-checkbox-statistics-face): Use the new faces. * org-faces.el (org-checkbox-statistics-todo) (org-checkbox-statistics-done): New faces. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-use-verb): New variable. (org-export-latex-emph-format): Prefer \texttt over \verb when org-export-latex-use-verb is set. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-remember.el (org-remember-handler): Abort remember if the buffer is empty. * org-exp.el (org-export-format-source-code-or-example): Run `org-src-mode-hook'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-indent-line-function): Fix indentation of +#end lines. 2009-08-06 Tassilo Horn <tassilo@member.fsf.org> * org-gnus.el (org-gnus-store-link): Require message.el in org-gnus-store-link. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-src.el: New file, split out of org.el * org-macs.el (org-replace-match-keep-properties): New function. * org-exp.el (org-export-mark-blockquote-verse-center): Better preprocessing of center and quote and verse blocks. * org-list.el (org-list-end): Respect the stored "original" indentation when determining the end of the list. * org-exp.el (org-export-replace-src-segments-and-examples): Remember indentation correctly. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clock-update-mode-line): Apply face org-mode-line-clock. * org-faces.el (org-mode-line-clock): New face. 2009-08-06 Tassilo Horn <tassilo@member.fsf.org> * org-gnus.el (org-gnus-store-link): Fix bug where `org-gnus-store-link' used wrong subject when called in an article buffer. Patch provided by fengli AT gmail DOT com. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-format-source-code-or-example): Remember the original indentation of source code snippets and examples. * org-latex.el (org-export-as-latex): Relocate the table of contents. * org.el (org-ctrl-c-ctrl-c): Update clock lines. * org-agenda.el (org-run-agenda-series): Scope global options also when creating the agenda buffer. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-adapt-indentation): Improve documentation. (org-insert-property-drawer): Respect org-adapt-indentation when inserting the drawer. (org-remove-flyspell-overlays-in): New function. (org-do-emphasis-faces, org-activate-plain-links) (org-activate-code, org-fontify-meta-lines-and-blocks) (org-activate-angle-links, org-activate-footnote-links) (org-activate-bracket-links, org-activate-dates) (org-activate-target-links, org-activate-tags): Remove flyspell overlays. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-edit-src-save): New function. * org-clock.el (org-clock-out-switch-to-state): New option. (org-clock-out): Honor `org-clock-out-switch-to-state'. * org-compat.el (org-compatible-face): Improve macro. * org.el (org-global-properties-fixed): Add default for CLOCK_MODELINE_TOTAL. * org-clock.el (org-clock-sum): Accept lists and strigs as tstart andd tend. (org-clock-sum-current-item): Optional argument TSTART, pass it to org-clock-sum. (org-clock-get-sum-start): New function. * org.el (org-startup-options): New keywords blockhide and blockshow. (org-mode): Add new invisibility spec. (org-set-startup-visibility): Hide block on startup if so desired. (org-hide-block-startup): New option. (org-block-regexp): New constant. (org-hide-block-overlays): New variable. (org-block-map, org-hide-block-toggle-all, org-hide-block-all) (org-show-block-all, org-hide-block-toggle-maybe) (org-hide-block-toggle): New functions. (org-edit-src-exit): Do not quote lines starting with # and no + behind it. (org-auto-repeat-maybe): Add LAST_REPEAT properter for a repeating entry. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-buffer-property-keys): Add Effort property for completion. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clock-sum-current-item): Fix positioning bug when retrieving total clocked time in the subtree. * org.el (org-quoting-blocks): New variable. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (org-table-store-formulas) (org-table-get-stored-formulas, org-table-fix-formulas) (org-table-edit-formulas, orgtbl-ctrl-c-ctrl-c) (orgtbl-gather-send-defs): Allow indented #+TBLFM line. * org.el (org-fontify-meta-lines, org-ctrl-c-ctrl-c): Allow indented #+TBLFM line. * org-footnote.el (org-footnote-goto-local-insertion-point): Allow indented #+TBLFM line. * org-colview.el (org-dblock-write:columnview): Allow indented #+TBLFM line. * org-colview-xemacs.el (org-dblock-write:columnview): Allow indented #+TBLFM line. * org-clock.el (org-dblock-write:clocktable): Allow indented #+TBLFM line. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-format-source-code-or-example): Make editing indented blocks work correctly. * org.el (org-edit-src-nindent): New variable. (org-edit-src-code, org-edit-fixed-width-region) (org-edit-src-find-region-and-lang, org-edit-src-exit): Make editing indented blocks work correctly. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-replace-src-segments-and-examples): FInd indented blocks. (org-export-format-source-code-or-example): Fix indentation of blocks. (org-export-remove-indentation): New function. (org-export-select-backend-specific-text): Allow backend-specific code to be indented. (org-export-mark-blockquote-verse-center): Allow markers to be indented. * org.el (org-fontify-meta-lines): New function. (org-set-font-lock-defaults): Call the new fontification function. * org-faces.el (org-meta-line): New face (org-block): New face. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-treat-insert-todo-heading-as-state-change) (org-treat-S-cursor-todo-selection-as-state-change): New variables. (org-insert-todo-heading): Honor `org-treat-insert-todo-heading-as-state-change'. (org-shiftright, org-shiftleft): Honor `org-treat-S-cursor-todo-selection-as-state-change'. (org-inhibit-logging): New variable. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-remove-subtree-entries-from-agenda): Reduce range for marker position checking. * org-latex.el (org-export-latex-first-lines): Fix bug when exporting a region. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-push-to-kill-ring): Protect using x-set-selection, because that does not always work. * org-agenda.el (org-agenda-list): Apply the new face `org-agenda-date-today'. * org-faces.el (org-agenda-date-today): New face. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-to-appt): Turn off restriction when creating appointments. * org-latex.el (org-export-latex-low-levels): Fix customization type. * org.el (org-priority, org-shiftup, org-shiftdown): Disable priority commands. * org-agenda.el (org-agenda-priority): Disable priority commands. * org.el (org-enable-priority-commands): New option. * org-colview-xemacs.el (org-columns-compute) (org-columns-number-to-string): Fix problems with empty fields. * org-colview.el (org-columns-compute) (org-columns-number-to-string): Fix problems with empty fields. * org-exp.el (org-export-push-to-kill-ring): New function. (org-export-copy-to-kill-ring): New option. * org-latex.el (org-export-as-latex): Call `org-export-push-to-kill-ring'. * org-exp.el (org-export-show-temporary-export-buffer): New option. * org-latex.el (org-export-as-latex): Use `org-export-show-temporary-export-buffer'. * org-exp.el (org-export-show-temporary-export-buffer): New option. (org-export-push-to-kill-ring): New function. * org-colview.el (org-columns-compile-map): New variable. (org-columns-new, org-columns-compute) (org-columns-number-to-string, org-columns-uncompile-format) (org-columns-compile-format): Implement new operators. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-plist-vars): Add :xml-declaration. * org-list.el (org-update-checkbox-count): Make property dependent. * org.el (org-hierarchical-todo-statistics): New option. (org-update-parent-todo-statistics): Modified to handle recursive statistics. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-publish.el (org-publish): Make this function behave correctly in interactive use when called with a prefix argument. * org.el (org-todo-statistics-hook): New hook. (org-update-parent-todo-statistics): Use new hook. (org-log-into-drawer): New function. (org-add-log-setup): Use the new `org-log-into-drawer' function to determine if we should be logging into a drawer. (org-log-into-drawer): Update docstring. (org-default-properties): Add LOG_INTO_DRAWER as a property. * org-list.el (org-checkbox-statistics-hook): New hook. (org-update-checkbox-count-maybe): Use new hook. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-edit-src-code, org-edit-fixed-width-region): Use a better bufer-generating mechanism. (org-edit-src-find-buffer): New function. * org-icalendar.el (org-print-icalendar-entries): Don't check for archive tag, this is already done by `org-agenda-skip'. data while constructing lost of tags. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-preprocess-apply-macros): Use semicolon as argument separator in macros. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-after-sorting-entries-or-items-hook): New hook. (org-sort-entries-or-items): Run the new hook. (org-after-refile-insert-hook): New hook. (org-refile): Run `org-after-refile-insert-hook'. * org-agenda.el (org-agenda-get-progress): Never take time of day from headline when displaying progress. * org-latex.el (org-export-latex-complex-heading-re): New variable. (org-export-as-latex): Force the correct regexp in the preprocessor buffer. (org-export-latex-set-initial-vars): Set `org-export-latex-complex-heading-re'. * org-agenda.el (org-agenda-start-with-log-mode): New option. (org-agenda-mode): Use `org-agenda-start-with-log-mode'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-tables-centered): New option. (org-export-latex-tables): Use `org-export-latex-tables-centered'. * org-exp.el (org-export-as-org): New command. (org-export-as-org): New command. * org-publish.el (org-publish-org-to-org): New function. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-yank): Just call `org-yank-generic'. (org-yank-generic): New function, containing the formaer functionality of `org-yank'. * org-latex.el (org-export-latex-not-done-keywords) (org-export-latex-done-keywords): New variables. (org-export-latex-todo-keyword-markup): New option. (org-export-latex-set-initial-vars): Remember the TODO keywords. (org-export-latex-keywords-maybe): Apply the TODO markup. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-infile-export-plist): Add more default macros. (org-export-preprocess-apply-macros): Process macro arguments. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-icalendar.el (org-icalendar-include-todo): New allowedvalue `unblocked'. (org-print-icalendar-entries): Respect the new value of `org-icalendar-include-todo'. * org.el (org-link-try-special-completion) (org-file-complete-link): New functions. (org-insert-link): Add special completion support for some link types. * org-bbdb.el (org-bbdb-complete-link): New function. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-list.el (org-update-checkbox-count): Allow recursive statistics. (org-hierarchical-checkbox-statistics): New option. * org.el (org-cycle): Remove erraneous space character. * org-icalendar.el (org-icalendar-timezone): Initialize from environment. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-autoload): Fix autoloading of ascii export functions. (org-modules): Add org-special-blocks. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-icalendar.el (org-start-icalendar-file): Use the new option. (org-ical-timezone): New option. * org-exp.el (org-export-get-coderef-format): Use the description is present. * org.el (org-sort-entries-or-items): Improve docstring, and make better implementation for time sorting. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-edit-src-persistent-message): New option. (org-edit-src-code, org-edit-fixed-width-region): Use the new option. * org-clock.el (org-clock-insert-selection-line): Fix prefious patch. * org.el (org-edit-src-code, org-edit-fixed-width-region): Use separate buffer instead of indirect buffer to edit source code. (org-edit-src-exit): Make this function work with the new setup. * org-clock.el (org-clock-insert-selection-line): Make sure tasks are properly fontified before shown in the selection menu. * org.el (org-fontify-like-in-org-mode): New function. * org-latex.el (org-export-latex-links): Use the property list to retrieve the default image attributes. * org-exp.el (org-export-plist-vars): Add a new option. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export, org-export-visible): Support ASCII export to buffer (org-export-normalize-links): Do not protect the description if it is explicitly given. * org-list.el (org-reset-checkbox-state-subtree): Moved here from org-checklist.el. (org-reset-checkbox-state-subtree): Call `org-reset-checkbox-state-subtree'. * org-remember.el (org-select-remember-template): For the selection of a valid template. * org-latex.el (org-export-region-as-latex): Supply the force-no-subtree argument. (org-export-as-latex): Provide better limits when exporting the first line. When exporting to string, we still want the first lines. (org-export-latex-first-lines): New argument END, to force the end of the region. (org-export-region-as-latex): Use the property list. (org-export-as-latex): * org-colview-xemacs.el (org-columns-remove-overlays) (org-columns): Fix call to `local-variable-p'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-after-blockquotes-hook): New hook. (org-export-latex-preprocess): Run the new hook. * org-exp.el (org-export-preprocess-after-blockquote-hook): New hook. (org-export-preprocess-string): Run the new hook. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-macs.el (org-check-external-command): New defsubst. * org.el (org-mode-map): New key for reload. (org-format-latex): Better error message when external programs are not available. * org-agenda.el (org-agenda-mode-map): Bind `org-reload'. * org.el (org-sort-entries-or-items): Explicit sorting function for priorities, needed for XEmacs compatibility. * org-remember.el (org-remember-apply-template): Improve auto-save behavior. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-preprocess): Also protect environments ending in a star. * org-list.el (org-at-item-p): Fix regular expression. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-end-of-subtree): Improve speed. * org-agenda.el (org-agenda-get-timestamps) (org-agenda-get-progress, org-agenda-get-deadlines) (org-agenda-get-scheduled, org-agenda-get-blocks): Optimizations, in particular, wait as long as possible to collect the tags. (org-stuck-projects): Improve docstring. * org.el (org-store-link): No errors when getting custom id before first headline. (org-get-tags-at): Use `org-up-heading-safe' when getting tags. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-prepare-agenda-buffers): Catch a throw to nextfile. * org-protocol.el: Remove dependency on url.el. (org-protocol-unhex-compound, org-protocol-open-source): Remove dependency on url.el. * org-latex.el (org-export-as-pdf): Use `org-latex-to-pdf-process'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-latex-to-pdf-process): New option. * org-agenda.el (org-agenda-skip-additional-timestamps-same-entry): New option. (org-agenda-get-timestamps): Honor `org-agenda-skip-additional-timestamps-same-entry'. * org-clock.el (org-clock-goto-may-find-recent-task): New option. (org-clock-goto): Find recent task only if `org-clock-goto-may-find-recent-task' allows it. * org-exp.el (org-export-remove-or-extract-drawers): Handle empty drawers, and drawers that are missing the :END: line. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clock-goto): Go to recently clocked task if no clock is running. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-update-parent-todo-statistics): Check for STATISTICS_FROM property. * org-list.el (org-update-checkbox-count): Check for STATISTICS_FROM property. * org.el (org-tab-first-hook) (org-tab-after-check-for-table-hook) (org-tab-after-check-for-cycling-hook): New hooks. (org-cycle-internal-global, org-cycle-internal-local): New functions, split out from `org-cycle'. (org-cycle): Call the new hooks. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-preprocess-string): Reset the list of preferred targets for each run of the preprocessor. * org.el (org-refile-target-verify-function): Improve documentation. (org-get-refile-targets): Respect point being moved by the verification function. * org-latex.el (org-export-latex-timestamp-keyword-markup): New option. (org-export-latex-keywords): Use new option. * org.el (org-rear-nonsticky-at): New defsubst. (org-activate-plain-links, org-activate-angle-links) (org-activate-footnote-links, org-activate-bracket-links) (org-activate-dates, org-activate-target-links) (org-activate-tags): Place the rear-nonsticky properties at the correct location. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-protocol.el (server-edit): Declare `server-edit'. (org-protocol-unhex-string, org-protocol-unhex-compound): New functions. (org-protocol-check-filename-for-protocol): Call `server-edit'. * org.el (org-default-properties): New default properteis for completion. * org-exp.el (org-export-add-subtree-options): Add new properties for subtree export. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-id.el (org-id-get-with-outline-path-completion): Turn off org-refile-target-verify-function for the duration of the command. * org.el (org-link-to-org-use-id): New possible value `create-if-interactive-and-no-custom-id'. (org-store-link): Use custom IDs. (org-link-search): Find custom ID properties from #link. (org-default-properties): Add CUSTOM_ID for property completion. (org-refile-target-verify-function): New option. (org-goto): Turn off org-refile-target-verify-function for the duration of the command. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-preferred-target-alist): New variable. (org-export-define-heading-targets): Find the new CUSTOM_ID property. (org-export-target-internal-links): Target the custom ids when possible. * org-latex.el (org-export-latex-preprocess): Better regexp for matching latex macros with arguments. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-remember.el (org-remember-handler): Allow filing to non-org files. 2009-08-06 Magnus Henoch <magnus.henoch@gmail.com> * org-table.el (org-table-fix-formulas): Do not change references to remote tables. (org-table-get-remote-range): Convert standard coordinates to RC format. * org-latex.el (org-export-latex-keywords): Fix regexp bug. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-compat.el (org-sha1-string): Function removed. * org.el (org-refile-allow-creating-parent-nodes): New option. (org-refile-get-location): New argument NEW-NODES. (org-refile): Call `org-refile-get-location' with the new argument. (org-refile-get-location): Arrange for adding a new child. (org-refile-new-child): New function. * org-clock.el: Fix a number of docstrings. (org-clock-find-position): New argument FIND-UNCLOSED to make the function find an unclosed clock in the entry. (org-clock-in): Call `org-clock-find-position' with the new argument if we might be resuming a clock. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-display-custom-times): New variable. (org-export-latex-timestamp-markup): New option. (org-export-latex-set-initial-vars): Remember the local value of `org-display-custom-times'. (org-export-latex-content): Process time stamps. (org-export-latex-time-stamps): New function. * org-macs.el (org-maybe-intangible): Add intangible property again to invisible text. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-default-export-plist): Handle undefined variables. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-sort-entries-or-items): Match TODO keywrds case-sensitively, when sorting. (org-priority): Do not match TODO keywords with wrong case. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-todo): Honor the NOBLOCKING property. * org-agenda.el (org-agenda-dim-blocked-tasks): Honor the NOBLOCKING property. * org.el (org-scan-tags): Fix bug in tag scanner 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-modules): Mark obsolete packages. * org-html.el: New file, split out from org-exp.el. * org-icalendar.el: New file, split out from org-exp.el. * org-xoxo.el: New file, split out from org-exp.el. * org-ascii.el: New file, split out from org-exp.el. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-compat.el (org-find-library-name): New function. * org.el (org-pre-cycle-hook): New hook. (org-cycle): Call the new hook in appropriate places. (org-reload): Only reload files that have been loaded before. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-set-font-lock-defaults): Enforxe space or line end after todo keyword. (org-todo): When changing TODO state, do matching case-sensitively. (org-map-continue-from): New variable. (org-scan-tags): Respect values in `org-map-continue-from'. (org-reload): Make XEmacs compatible. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-protocol.el (org-protocol-flatten-greedy): New function. (org-protocol-flatten): New function. * org.el (org-open-link-from-string): Pass reference buffer to `org-open-at-point'. (org-open-at-point): New optional argument `reference-buffer'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-scan-tags): Make tag scan find headline in first line, 2nd attempt. (org-get-refile-targets): Add the naked file name. (org-refile): Store as top-level entry when only file name was given. * org-agenda.el (org-agenda-get-progress): Fix regexp bug. * org.el (org-block-todo-from-children-or-siblings-or-parent): Renamed from org-block-todo-from-children-or-siblings, and enhanced to look for the parent's status as well. * org-agenda.el (org-agenda-log-mode-add-notes): New option. (org-agenda-get-progress): Add first notes line to log entry if so desired. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-cleanup-fancy-diary-hook): New hook. (org-agenda-cleanup-fancy-diary): Call the new hook. * org-remember.el (org-remember-apply-template): Take the default for the annotation from the :annotation property. * org-mac-message.el (org-mac-message-get-link): Remove the quotes. (org-mac-message-get-link): Return the result. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-refile-get-location): Add file name only if not already included in outline path. * org-faces.el (org-n-level-faces): Fix customization type from number to integer. * org-exp.el (org-export-headline-levels): Fix customization type from number to integer. * org-agenda.el (org-agenda-confirm-kill) (org-agenda-custom-commands-local-options) (org-timeline-show-empty-dates, org-agenda-ndays) (org-agenda-start-on-weekday, org-scheduled-past-days): Fix customization type from number to integer. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-protocol.el: Declare some functions. * org-agenda.el (org-agenda-compare-effort): Honor `org-sort-agenda-noeffort-is-high'. (org-agenda-filter-by-tag, org-agenda-filter-make-matcher) (org-agenda-compare-effort): Implement the "?" operator for finding entries without effort setting. * org.el (org-extract-attributes-from-string): New function. * org-exp.el (org-export-splice-attributes): New function. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-mouse.el: XEmacs compatibility fixes * org.el (org-modules): Add org-inlinetasks.el (org-cycle): Implement limiting level on cycling. (org-move-subtree-down): Fix bug with swapping subtrees at end of buffer. * org-inlinetask.el: New file. * org-protocol.el: New file. * org.el (org-emphasis-regexp-components): Allow braces in emphasis pre and post match. * org-footnote.el (org-footnote-normalize): When only dorting, do not insert inline notes at the end. * org.el (org-require-autoloaded-modules): Add org-docbook.el. * org-docbook.el: New file. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-reftex-citation): New command. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-cmp-user-defined): New option. (org-sorting-choice, org-agenda-sorting-strategy): Add the new sorting options. (org-entries-lessp): Apply the new sorting option. * org.el (org-block-todo-from-children-or-siblings): Fix bug in blocker code, when an older sibling has children. * org-mac-message.el (org-mac-message-get-link): Improve getting links from multiple selected messages. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-remember.el (org-remember-finalize): Do not set buffer file name to nil. (org-remember-handler): Mark buffer as unmodified. (org-remember-handler): Delete backup file and show message about remaining backup files. (org-remember-auto-remove-backup-files): New option. * org.el (org-store-link): Use buffer name as link description in w3-mode buffers. (org-ido-switchb): Fix argument bug for completion. * org-remember.el (org-remember-apply-template): Set local variable `auto-save-visited-file-name' instead of global one. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-get-todos): Fix bug with match-data. (org-agenda-get-todos): Mark file tags as inherited. (org-agenda-list): Always search diary lines for a time. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-feed.el: New file. * org-exp.el (org-export-as-html): Close local lists depending on indentation, also when starting a table. * org-remember.el (org-remember-backup-directory) (org-remember-backup-name): New internal variable. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clock-out-if-current): Make buffer detection work in indirect buffers as well. * org.el (org-emphasis-regexp-components): Add the exxclamation mark to the post-emphasis characters. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-read-date-minibiffer-septup-hook): New hook. (org-read-date): Run the new hook. * org-mac-message.el (org-mac-flagged-mail): New group. (org-mac-mail-account): New variable. (org-mac-create-flagged-mail, org-mac-insert-flagged-mail): New commands. * org-remember.el (org-remember-backup-directory): New variable. (org-remember-apply-template): Write file to backup directory. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-mouse.el (org-mouse-todo-menu): New function. (org-mouse-todo-keywords): Function removed. (org-mouse-context-menu): Use `org-mouse-todo-menu'. * org-table.el (org-table-beginning-of-field) (org-table-end-of-field): New commands (org-table-previous-field, org-table-beginning-of-field): Better error messages. (orgtbl-setup): Include `M-a' and `M-e'. * org.el (org-backward-sentence, org-forward-sentence): New commands. * org-colview.el (org-colview-initial-truncate-line-value): New variable. (org-columns-remove-overlays): Restore the value of `truncate-lines'. (org-columns): Remember the value of `truncate-lines'. * org-colview-xemacs.el (org-colview-initial-truncate-line-value): New variable. (org-columns-remove-overlays): Restore the value of `truncate-lines'. (org-columns): Remember the value of `truncate-lines'. * org.el (org-columns-skip-arrchived-trees): New option. * org-agenda.el (org-agenda-export-html-style): Define color for org-agenda-done face. (org-search-view, org-agenda-get-todos, org-agenda-get-progress) (org-agenda-get-deadlines, org-agenda-get-scheduled): Use new face. * org.el (org-scan-tags): Use the new face. * org-faces.el (org-agenda-done): New face. * org.el (org-scan-tags): Test the value org `org-tags-match-list-sublevels'. (org-tags-match-list-sublevels): New allowed value: indented. * org-latex.el (org-export-latex-make-header): Apply macros in header. * org-exp.el (org-export-apply-macros-in-string): New function. * org-latex.el (org-export-latex-list-parameters): Fix bug with the definition of a checked box. * org-clock.el (org-clock-find-position): Fix drawer indentations. * org-latex.el (org-export-latex-low-levels): More options for how to process lower levels in LaTeX. (org-export-latex-subcontent): Better treatment for lists as a means of publishing lower levels. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-set-font-lock-defaults): Use new checkbox face. * org-faces.el (org-checkbox): New face. * org-exp.el (org-export-html-preprocess): Only create LaTeX fragement images if there is an export file. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-stuck-projects): Document that the subtree of projects that are not stuck will now be searched for stuck sub-projects. (org-agenda-skip-entry-when-regexp-matches) (org-agenda-skip-entry-when-regexp-matches-in-subtree): New functions. (org-agenda-list-stuck-projects): Use `org-agenda-skip-entry-when-regexp-matches-in-subtree'. * org-latex.el (org-export-latex-preprocess): Improve export of verses. * org-exp.el (org-export-as-html): Implement centering as a div rather than a paragraph. Do a better job with line-end in verse environments. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-open-at-point): Fix tags searches by mouse click. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-preprocess): Implement the centering markup. * org-exp.el (org-export-mark-blockquote-verse-center): Renamed from `org-export-mark-blockquote-and-verse'. (org-export-as-html): Implement the centering markup. * org-latex.el (org-export-latex-tables): Fix vertical lines in tables. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-read-date-history): New variable. (org-read-date): Use new history variable. (org-toggle-heading): Fix bug when used before first headline. (org-store-log-note): Remove drawer if empty while note is aborted. (org-remove-empty-drawer-at): New function. (org-check-after-date): New command. (org-sparse-tree): New sparse tree command "a". * org-exp.el (org-export-as-ascii): Improve export of plain lists. 2009-08-06 Bastien Guerry <bzg@altern.org> * org.el (org-toggle-fixed-width-section): Bug fix: insert a column and a space, not only a column. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-emphasis-alist): Better defaults for verbose emphasis. (org-export-latex-emph-format): New function. (org-export-latex-fontify): Call `org-export-latex-emph-format'. * org-agenda.el (org-agenda-menu): Add new commands to menu. (org-agenda-do-date-later, org-agenda-do-date-earlier) (org-agenda-date-later-minutes, org-agenda-date-earlier-minutes) (org-agenda-date-later-hours, org-agenda-date-earlier-hours): New commands. * org.el (org-timestamp-change): Move end-time along with start time. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-target-internal-links) (org-export-as-html): Protect links specified as #name. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-clone-subtree-with-time-shift): New command. * org-latex.el (org-export-latex-special-chars) (org-export-latex-treat-sub-super-char): Fix subscript export. * org-exp.el (org-create-multibrace-regexp): Do not add backslashes to the class. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-colview.el (org-columns-map): Better functions for moving up and down a row, even if `truncate-line' is nil. * org.el (org-insert-todo-heading): Make sure the keyword is inserted at the correct position. * org-publish.el (org-publish-project-alist) (org-publish-projects, org-publish-org-index): Change default anme for the index of file names to "sitemap.org". * org-latex.el (org-export-latex-tables): Use `org-split-string', for Emacs 21 compatibility. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-log-mode-items): Improve docstring. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-page-description) (org-export-page-keywords): New variables. (org-export-plist-vars): Add entries for :keywords and :description. (org-infile-export-plist): Parse for new keywords. (org-get-current-options): Add new keywords (org-export-as-html): Publish description and keywords. * org-agenda.el (org-agenda-add-entry-text-descriptive-links): New option. (org-agenda-add-entry-text): Honor `org-agenda-add-entry-text-descriptive-links'. * org-latex.el (org-export-latex-preprocess): Make all external preprocess functions use a PARAMETER arg. * org-exp.el (org-export-preprocess-string) (org-export-select-backend-specific-text) (org-export-format-source-code-or-example) (org-format-org-table-html): Support docbook export. (org-export-preprocess-string): Make all external preprocess functions use a PARAMETER arg. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-html-style-include-scripts): New option. (org-export-plist-vars): Add new option `org-export-html-style-include-scripts'. (org-export-as-html): Honor new option `org-export-html-style-include-scripts'. (org-export-html-scripts, org-export-html-style-default): Fix xml issues with the Safari browser. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-publish.el (org-publish-attachment): Only copy file when the directories differ. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-clocktable-steps): Use inactive time stamps for clocktable steps. * org.el (org-additional-option-like-keywords): Add two more keywords. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-format-source-code-or-example): Mark temporary buffer unmodified, so that it will be killed even if mode like message mode has decided to assign a file name. * org.el (org-scan-tags): Improve tag inheritance. (org-scan-tags, org-make-tags-matcher): Make tag comparison case-sensitive. (org-scan-tags): Use the internal tags list instead of creating it from scratch. (org-trust-scanner-tags, org-scanner-tags): New variables. (org-scan-tags): Set `org-scanner-tags'. (org-get-tags-at): Take advantage of `org-trust-scanner-tags'. (org-map-entries): Document the possible speedup using scanner tags. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-add-planning-info): Fix bug with looking for keyword only at column 0. * org-agenda.el (org-agenda-custom-commands-local-options): Add option for tags filter preset. (org-prepare-agenda): Store filter preset as a property on the filter variable. (org-finalize-agenda): Call the filter, if there is a preset. (org-agenda-filter-by-tag): Filter again after clearing the filter, when there still is a preset. (org-agenda-filter-make-matcher, org-agenda-set-mode-name): Include the preset filter. (org-agenda-redo): Apply the filter again, also the preset filter. * org-exp.el (org-export-as-html): Use IDs in the correct way. * org.el (org-uuidgen-p): New funtion. * org-agenda.el (org-agenda-fontify-priorities): New default value `cookies'. (org-agenda-fontify-priorities): Renamed from org-fontify-priorities. * org.el (org-set-font-lock-defaults): Call `org-font-lock-add-priority-faces'. (org-font-lock-add-priority-faces): New function. * org-faces.el: (org-set-tag-faces): New option. (org-priority-faces): New variable. * org-exp.el (org-export-as-html): Add a "content" div around the entire content of the body tag. (org-export-html-get-bibliography): New function. (org-export-html-validation-link): New variable. (org-export-as-html): Add validation link to exported page. * org.el (org-match-sparse-tree): Renamed from `org-tags-sparse-tree'. (org-tags-sparse-tree): New alias. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-get-valid-level): Catch the case where the level change is nil. * org-clock.el (org-clock-find-position): Better indentation of new clock drawers. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-quit): Delete window only when the frame-setup was not `current-window'. * org.el (org-tag-persistent-alist): New option. (org-startup-options): Add keyword `noptag'. (org-fast-todo-selection): Handle :newline correctly. (org-set-tags): Handle :newline correctly. (org-fast-tag-selection): Handle :newline correctly. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-as-ascii): Reverse link buffer before outputting it. (org-export-ascii-push-links): Fix bug with pussing links into the export buffer. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-archive.el (org-archive-subtree): Do not add 1 to level if pasting at top level. * org-bbdb.el: Improve documentation. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-list.el (org-insert-item): Only consider insert empty lines is `org-empty-line-terminates-plain-lists' is not nil. * org.el (org-blank-before-new-entry): Mention the dependence on `org-empty-line-terminates-plain-lists' in the docstring. * org-publish.el (org-publish-get-project-from-filename): New optional argument UP. Only find the top project if UP is set. (org-publish-current-project): Find the top encloding project. * org-agenda.el (org-agenda-before-write-hook) (org-agenda-add-entry-text-maxlines): New options. (org-write-agenda): Run the new hook in the temporary buffer. (org-agenda-add-entry-text): New function. (org-write-agenda): Implement PDF export, using ps2pdf. * org.el (org-global-properties-fixed, org-global-properties): Improve documentation string. * org-exp.el (org-export-ascii-links-to-notes): New option. (org-export-as-ascii): Handle links better. (org-export-ascii-wrap, org-export-ascii-push-links): New functions. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda): Make prefix arg optional. (org-agenda-search-headline-for-time): New option. (org-format-agenda-item): Honor `org-agenda-search-headline-for-time'. * org-table.el (orgtbl-self-insert-command): Cluster undo for 20 characters. * org.el (org-self-insert-cluster-for-undo): New option. (org-self-insert-command): Cluster undo for 20 characters. (org-self-insert-command-undo-counter): New variable. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-exp.el (org-export-as-html): Fix problem with closing colone example. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-as-latex) (org-export-latex-first-lines): Avoid modification flag when adding or removing text properties. (org-export-latex-fontify): Catch error when org-emph-alist has entries that are not defined for LaTeX export. * org-export-latex.el: renamed to org-latex.el * org-latex.el: renamed from org-export-latex.el * org.el (orgstruct++-mode): New function. (turn-on-orgstruct++): Call `orgstruct++-mode'. (org-context-p): Allow detecting item context after the first line of an item. (orgstruct-make-binding): Detect if item-body context should be seen. (orgstruct-is-++): New variable. (org-add-planning-info): Catch the case when there is no planning info yet and the call does not want to add anything, only maybe tries to remove something. (org-special-ctrl-a/e): All value to be a cons cell with separate settings for `C-a. and `C-e'. (org-beginning-of-line, org-end-of-line): Honor separate values for `C-a' and `C-e'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-reload): New command. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.texi (Publishing action): Improve documentation of file names when publishing to the source directory. (Clean view): Document `org-indent-mode'. (Clocking work time): Add documentation for the new :timetamp option when creating a clock report. (Paragraphs): Fix many typos. (Plain lists): Remove duplicate explanation about the `C-c *' command. (Literal examples): Update to reflect the new behavior of the -n -r -k switches when exporting source code examples. (Structure editing): Add information about `C-c *', converting a plain list into a list of Org items. (Remember): Small rephrasing of the paragraph describing remember.el. Also mentioned that remember.el is part of Emacs 23, not Emacs 22. (Clocking work time): Add documentation about displaying the current clocking time against the effort estimate. Also add a footnote about using `org-clock-in-prepare-hook' to add an effort estimate on the fly, just before clocking it. (Footnotes): Document automatic renumbering and sorting. (Agenda commands): Document new bulk commands. (Plain lists): Document new behavior of `org-cycle-include-plain-lists'. Hyphenation only in TeX. (Clocking work time): Document the key to update effort estimates. (Clocking work time): Document the clock time display. (Structure editing, TODO basics): Document new variables. (Column attributes): Document new colciew operators. (Publishing options): Document :xml-declaration. (Tracking TODO state changes): Document the LOG_INTO_DRAWER property. (Literal examples): Document the new implementation for editing source code. (Publishing action): Mention the new publishing function, to publish an Org source file. (Publishing links): Mention how to link to an Org source file. (Macro replacement): Document new macros. (Handling links): Document type-specific completion when inserting links. (Structure editing, Plain lists): Improve documentation on sorting. (Internal links): Document custom ids for links. (Handling links): Document custom ids for links. (CSS support): Document new class. (Refiling notes): Document the possibility to create new nodes during refiling. (Agenda commands): Document the "?" operator to find tasks without effort setting. (Exporting agenda information): Section moved. (RSS Feeds): New section. (Built-in table editor): Document M-e and M-a navigate inside table field. (Stuck projects): Docment that projects identified as un-stuck will still be searchd for stuck sub-projects. (Paragraphs): Document centering. (Creating timestamps, Agenda commands): Document new behavior when changing time stamps. (Structure editing): Document the new command `org-clone-subtree-with-time-shift'. (Publishing): Refresh this chapter. (Export options, Export options, In-buffer settings): Document the new keywords. (Matching tags and properties): Collect all documentation about tags/property matches here. (Setting tags): Document `org-tag-persistent-alist'. (Weekly/daily agenda): New section. (Orgstruct mode): Describe `orgstruct++-mode'. (Drawers): Mention the LOGBOOK drawer. (Export options, Sectioning structure): Document the #+LEATEX_HEADER in-buffer setting. (Bugs): Section removed. (Hooks): New section. (Add-on packages): Moved here from old location. (Context-sensitive commands): New section. (Setting tags): Document newline option. (Global TODO list, Matching tags and properties): Mention more variables. (Checkboxes): Update to changed command behavior.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/ChangeLog83
-rw-r--r--doc/misc/org.texi4244
2 files changed, 2855 insertions, 1472 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index f9ec9a6f6e7..6f847d6d86d 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,86 @@
12009-08-06 Carsten Dominik <carsten.dominik@gmail.com>
2
3 * org.texi (Publishing action): Improve documentation of file
4 names when publishing to the source directory.
5 (Clean view): Document `org-indent-mode'.
6 (Clocking work time): Add documentation for the
7 new :timetamp option when creating a clock report.
8 (Paragraphs): Fix many typos.
9 (Plain lists): Remove duplicate explanation about the
10 `C-c *' command.
11 (Literal examples): Update to reflect the new behavior
12 of the -n -r -k switches when exporting source code examples.
13 (Structure editing): Add information about `C-c *',
14 converting a plain list into a list of Org items.
15 (Remember): Small rephrasing of the paragraph
16 describing remember.el. Also mentioned that remember.el is part
17 of Emacs 23, not Emacs 22.
18 (Clocking work time): Add documentation about
19 displaying the current clocking time against the effort estimate.
20 Also add a footnote about using `org-clock-in-prepare-hook' to add
21 an effort estimate on the fly, just before clocking it.
22 (Footnotes): Document automatic renumbering and
23 sorting.
24 (Agenda commands): Document new bulk commands.
25 (Plain lists): Document new behavior of
26 `org-cycle-include-plain-lists'.
27 Hyphenation only in TeX.
28 (Clocking work time): Document the key to update effort
29 estimates.
30 (Clocking work time): Document the clock time display.
31 (Structure editing, TODO basics): Document new
32 variables.
33 (Column attributes): Document new colciew operators.
34 (Publishing options): Document :xml-declaration.
35 (Tracking TODO state changes): Document the
36 LOG_INTO_DRAWER property.
37 (Literal examples): Document the new implementation for
38 editing source code.
39 (Publishing action): Mention the new publishing
40 function, to publish an Org source file.
41 (Publishing links): Mention how to link to an Org source file.
42 (Macro replacement): Document new macros.
43 (Handling links): Document type-specific completion
44 when inserting links.
45 (Structure editing, Plain lists): Improve documentation
46 on sorting.
47 (Internal links): Document custom ids for links.
48 (Handling links): Document custom ids for links.
49 (CSS support): Document new class.
50 (Refiling notes): Document the possibility to create new nodes
51 during refiling.
52 (Agenda commands): Document the "?" operator to find
53 tasks without effort setting.
54 (Exporting agenda information): Section moved.
55 (RSS Feeds): New section.
56 (Built-in table editor): Document M-e and M-a navigate
57 inside table field.
58 (Stuck projects): Docment that projects identified as
59 un-stuck will still be searchd for stuck sub-projects.
60 (Paragraphs): Document centering.
61 (Creating timestamps, Agenda commands): Document new
62 behavior when changing time stamps.
63 (Structure editing): Document the new command
64 `org-clone-subtree-with-time-shift'.
65 (Publishing): Refresh this chapter.
66 (Export options, Export options, In-buffer settings):
67 Document the new keywords.
68 (Matching tags and properties): Collect all
69 documentation about tags/property matches here.
70 (Setting tags): Document `org-tag-persistent-alist'.
71 (Weekly/daily agenda): New section.
72 (Orgstruct mode): Describe `orgstruct++-mode'.
73 (Drawers): Mention the LOGBOOK drawer.
74 (Export options, Sectioning structure): Document the
75 #+LEATEX_HEADER in-buffer setting.
76 (Bugs): Section removed.
77 (Hooks): New section.
78 (Add-on packages): Moved here from old location.
79 (Context-sensitive commands): New section.
80 (Setting tags): Document newline option.
81 (Global TODO list, Matching tags and properties):
82 Mention more variables.
83 (Checkboxes): Update to changed command behavior.
12009-08-02 Eric Yu <sucode@gmail.com> (tiny change) 842009-08-02 Eric Yu <sucode@gmail.com> (tiny change)
2 85
3 * speedbar.texi (Basic Key Bindings): Fix typo. 86 * speedbar.texi (Basic Key Bindings): Fix typo.
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index aad349567fb..cc7ff28bbec 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -3,8 +3,8 @@
3@setfilename ../../info/org 3@setfilename ../../info/org
4@settitle The Org Manual 4@settitle The Org Manual
5 5
6@set VERSION 6.21b 6@set VERSION 6.29c
7@set DATE February 2009 7@set DATE August 2009
8 8
9@c Version and Contact Info 9@c Version and Contact Info
10@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage} 10@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
@@ -16,6 +16,21 @@
16@finalout 16@finalout
17 17
18@c Macro definitions 18@c Macro definitions
19@iftex
20@c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed}
21@end iftex
22@macro Ie {}
23I.e.,
24@end macro
25@macro ie {}
26i.e.,
27@end macro
28@macro Eg {}
29E.g.,
30@end macro
31@macro eg {}
32e.g.,
33@end macro
19 34
20@c Subheadings inside a table. 35@c Subheadings inside a table.
21@macro tsubheading{text} 36@macro tsubheading{text}
@@ -28,7 +43,7 @@
28@end macro 43@end macro
29 44
30@copying 45@copying
31This manual is for Org (version @value{VERSION}). 46This manual is for Org version @value{VERSION}.
32 47
33Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation 48Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
34 49
@@ -93,11 +108,11 @@ license to the document, as described in section 6 of the license.
93* Exporting:: Sharing and publishing of notes 108* Exporting:: Sharing and publishing of notes
94* Publishing:: Create a web site of linked Org files 109* Publishing:: Create a web site of linked Org files
95* Miscellaneous:: All the rest which did not fit elsewhere 110* Miscellaneous:: All the rest which did not fit elsewhere
96* Extensions:: Add-ons for Org mode
97* Hacking:: How to hack your way around 111* Hacking:: How to hack your way around
98* History and Acknowledgments:: How Org came into being 112* History and Acknowledgments:: How Org came into being
99* Main Index:: An index of Org's concepts and features 113* Main Index:: An index of Org's concepts and features
100* Key Index:: Key bindings and where they are described 114* Key Index:: Key bindings and where they are described
115* Variable Index:: Variables mentioned in the manual
101 116
102@detailmenu 117@detailmenu
103 --- The Detailed Node Listing --- 118 --- The Detailed Node Listing ---
@@ -121,6 +136,7 @@ Document Structure
121* Sparse trees:: Matches embedded in context 136* Sparse trees:: Matches embedded in context
122* Plain lists:: Additional structure within an entry 137* Plain lists:: Additional structure within an entry
123* Drawers:: Tucking stuff away 138* Drawers:: Tucking stuff away
139* Blocks:: Folding blocks
124* Footnotes:: How footnotes are defined in Org's syntax 140* Footnotes:: How footnotes are defined in Org's syntax
125* Orgstruct mode:: Structure editing outside Org 141* Orgstruct mode:: Structure editing outside Org
126 142
@@ -132,11 +148,11 @@ Archiving
132Tables 148Tables
133 149
134* Built-in table editor:: Simple tables 150* Built-in table editor:: Simple tables
135* Narrow columns:: Stop wasting space in tables 151* Column width and alignment:: Overrule the automatic settings
136* Column groups:: Grouping to trigger vertical lines 152* Column groups:: Grouping to trigger vertical lines
137* Orgtbl mode:: The table editor as minor mode 153* Orgtbl mode:: The table editor as minor mode
138* The spreadsheet:: The table editor has spreadsheet capabilities 154* The spreadsheet:: The table editor has spreadsheet capabilities
139* Org Plot:: Plotting from org tables 155* Org-Plot:: Plotting from org tables
140 156
141The spreadsheet 157The spreadsheet
142 158
@@ -237,10 +253,12 @@ Capture
237 253
238* Remember:: Capture new tasks/ideas with little interruption 254* Remember:: Capture new tasks/ideas with little interruption
239* Attachments:: Add files to tasks. 255* Attachments:: Add files to tasks.
256* RSS Feeds:: Getting input from RSS feeds
257* Protocols:: External (@eg Browser) access to Emacs and Org
240 258
241Remember 259Remember
242 260
243* Setting up Remember:: Some code for .emacs to get things going 261* Setting up Remember for Org:: Some code for .emacs to get things going
244* Remember templates:: Define the outline of different note types 262* Remember templates:: Define the outline of different note types
245* Storing notes:: Directly get the note to where it belongs 263* Storing notes:: Directly get the note to where it belongs
246* Refiling notes:: Moving a note or task to a project 264* Refiling notes:: Moving a note or task to a project
@@ -253,6 +271,7 @@ Agenda Views
253* Presentation and sorting:: How agenda items are prepared for display 271* Presentation and sorting:: How agenda items are prepared for display
254* Agenda commands:: Remote editing of Org trees 272* Agenda commands:: Remote editing of Org trees
255* Custom agenda views:: Defining special searches and views 273* Custom agenda views:: Defining special searches and views
274* Exporting Agenda Views::
256* Agenda column view:: Using column view for collected entries 275* Agenda column view:: Using column view for collected entries
257 276
258The built-in agenda views 277The built-in agenda views
@@ -275,15 +294,13 @@ Custom agenda views
275* Storing searches:: Type once, use often 294* Storing searches:: Type once, use often
276* Block agenda:: All the stuff you need in a single buffer 295* Block agenda:: All the stuff you need in a single buffer
277* Setting Options:: Changing the rules 296* Setting Options:: Changing the rules
278* Exporting Agenda Views:: Writing agendas to files
279* Using the agenda elsewhere:: Using agenda information in other programs
280 297
281Embedded LaTeX 298Embedded La@TeX{}
282 299
283* Math symbols:: TeX macros for symbols and Greek letters 300* Math symbols:: @TeX{} macros for symbols and Greek letters
284* Subscripts and superscripts:: Simple syntax for raising/lowering text 301* Subscripts and superscripts:: Simple syntax for raising/lowering text
285* LaTeX fragments:: Complex formulas made easy 302* LaTeX fragments:: Complex formulas made easy
286* Processing LaTeX fragments:: Previewing LaTeX processing 303* Processing LaTeX fragments:: Previewing La@TeX{} processing
287* CDLaTeX mode:: Speed up entering of formulas 304* CDLaTeX mode:: Speed up entering of formulas
288 305
289Exporting 306Exporting
@@ -294,7 +311,8 @@ Exporting
294* The export dispatcher:: How to access exporter commands 311* The export dispatcher:: How to access exporter commands
295* ASCII export:: Exporting to plain ASCII 312* ASCII export:: Exporting to plain ASCII
296* HTML export:: Exporting to HTML 313* HTML export:: Exporting to HTML
297* LaTeX and PDF export:: Exporting to LaTeX, and processing to PDF 314* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
315* DocBook export:: Exporting to DocBook
298* XOXO export:: Exporting to XOXO 316* XOXO export:: Exporting to XOXO
299* iCalendar export:: Exporting in iCalendar format 317* iCalendar export:: Exporting in iCalendar format
300 318
@@ -310,33 +328,45 @@ Markup rules
310* Include files:: Include the contents of a file during export 328* Include files:: Include the contents of a file during export
311* Tables exported:: Tables are exported richly 329* Tables exported:: Tables are exported richly
312* Inlined images:: How to inline images during export 330* Inlined images:: How to inline images during export
313* Footnote markup:: 331* Footnote markup:: ASCII representation of footnotes
314* Emphasis and monospace:: To bold or not to bold 332* Emphasis and monospace:: To bold or not to bold
315* TeX macros and LaTeX fragments:: Create special, rich export. 333* TeX macros and LaTeX fragments:: Create special, rich export.
316* Horizontal rules:: A line across the page 334* Horizontal rules:: A line across the page
317* Comment lines:: Some lines will not be exported 335* Comment lines:: Some lines will not be exported
336* Macro replacement:: Global replacement of place holders
318 337
319HTML export 338HTML export
320 339
321* HTML Export commands:: How to invoke HTML export 340* HTML Export commands:: How to invoke HTML export
322* Quoting HTML tags:: Using direct HTML in Org mode 341* Quoting HTML tags:: Using direct HTML in Org mode
323* Links:: Transformation of links for HTML 342* Links:: Transformation of links for HTML
343* Tables in HTML export:: How to modify the formatting of tables
324* Images in HTML export:: How to insert figures into HTML output 344* Images in HTML export:: How to insert figures into HTML output
325* Text areas in HTML export:: An alternative way to show an example 345* Text areas in HTML export:: An alternative way to show an example
326* CSS support:: Changing the appearance of the output 346* CSS support:: Changing the appearance of the output
327* Javascript support:: Info and Folding in a web browser 347* Javascript support:: Info and Folding in a web browser
328 348
329LaTeX and PDF export 349La@TeX{} and PDF export
330 350
331* LaTeX/PDF export commands:: Which key invokes which commands 351* LaTeX/PDF export commands:: Which key invokes which commands
332* Quoting LaTeX code:: Incorporating literal LaTeX code 352* Quoting LaTeX code:: Incorporating literal La@TeX{} code
333* Sectioning structure:: Changing sectioning in LaTeX output 353* Sectioning structure:: Changing sectioning in La@TeX{} output
334* Tables in LaTeX export:: Options for exporting tables to LaTeX 354* Tables in LaTeX export:: Options for exporting tables to La@TeX{}
335* Images in LaTeX export:: How to insert figures into LaTeX output 355* Images in LaTeX export:: How to insert figures into La@TeX{} output
356
357DocBook export
358
359* DocBook export commands:: How to invoke DocBook export
360* Quoting DocBook code:: Incorporating DocBook code in Org files
361* Recursive sections:: Recursive sections in DocBook
362* Tables in DocBook export:: Tables are exported as HTML tables
363* Images in DocBook export:: How to insert figures into DocBook output
364* Special characters:: How to handle special characters
336 365
337Publishing 366Publishing
338 367
339* Configuration:: Defining projects 368* Configuration:: Defining projects
369* Uploading files:: How to get files up on the server
340* Sample configuration:: Example projects 370* Sample configuration:: Example projects
341* Triggering publication:: Publication commands 371* Triggering publication:: Publication commands
342 372
@@ -364,24 +394,22 @@ Miscellaneous
364* Clean view:: Getting rid of leading stars in the outline 394* Clean view:: Getting rid of leading stars in the outline
365* TTY keys:: Using Org on a tty 395* TTY keys:: Using Org on a tty
366* Interaction:: Other Emacs packages 396* Interaction:: Other Emacs packages
367* Bugs:: Things which do not work perfectly
368 397
369Interaction with other packages 398Interaction with other packages
370 399
371* Cooperation:: Packages Org cooperates with 400* Cooperation:: Packages Org cooperates with
372* Conflicts:: Packages that lead to conflicts 401* Conflicts:: Packages that lead to conflicts
373 402
374Extensions
375
376* Extensions in the contrib directory:: These come with the Org distro
377* Other extensions:: These you have to find on the web.
378
379Hacking 403Hacking
380 404
405* Hooks:: Who to reach into Org's internals
406* Add-on packages:: Available extensions
381* Adding hyperlink types:: New custom link types 407* Adding hyperlink types:: New custom link types
382* Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs 408* Context-sensitive commands:: How to add functionality to such commands
409* Tables in arbitrary syntax:: Orgtbl for La@TeX{} and other programs
383* Dynamic blocks:: Automatically filled blocks 410* Dynamic blocks:: Automatically filled blocks
384* Special agenda views:: Customized views 411* Special agenda views:: Customized views
412* Extracting agenda information:: Postprocessing of agenda information
385* Using the property API:: Writing programs that use entry properties 413* Using the property API:: Writing programs that use entry properties
386* Using the mapping API:: Mapping over all or selected entries 414* Using the mapping API:: Mapping over all or selected entries
387 415
@@ -420,7 +448,7 @@ implemented on top of Outline mode, which makes it possible to keep the
420content of large files well structured. Visibility cycling and 448content of large files well structured. Visibility cycling and
421structure editing help to work with the tree. Tables are easily created 449structure editing help to work with the tree. Tables are easily created
422with a built-in table editor. Org supports TODO items, deadlines, 450with a built-in table editor. Org supports TODO items, deadlines,
423time stamps, and scheduling. It dynamically compiles entries into an 451timestamps, and scheduling. It dynamically compiles entries into an
424agenda that utilizes and smoothly integrates much of the Emacs calendar 452agenda that utilizes and smoothly integrates much of the Emacs calendar
425and diary. Plain text URL-like links connect to websites, emails, 453and diary. Plain text URL-like links connect to websites, emails,
426Usenet messages, BBDB entries, and any files related to the projects. 454Usenet messages, BBDB entries, and any files related to the projects.
@@ -429,14 +457,14 @@ structured ASCII file, as HTML, or (TODO and agenda items only) as an
429iCalendar file. It can also serve as a publishing tool for a set of 457iCalendar file. It can also serve as a publishing tool for a set of
430linked web pages. 458linked web pages.
431 459
432An important design aspect that distinguishes Org from for example 460An important design aspect that distinguishes Org from, for example,
433Planner/Muse is that it encourages to store every piece of information 461Planner/Muse is that it encourages you to store every piece of information
434only once. In Planner, you have project pages, day pages and possibly 462only once. In Planner, you have project pages, day pages and possibly
435other files, duplicating some information such as tasks. In Org, 463other files, duplicating some information such as tasks. In Org,
436you only have notes files. In your notes you mark entries as tasks, 464you only have notes files. In your notes you mark entries as tasks, and
437label them with tags and timestamps. All necessary lists like a 465label them with tags and timestamps. All necessary lists, like a
438schedule for the day, the agenda for a meeting, tasks lists selected by 466schedule for the day, the agenda for a meeting, tasks lists selected by
439tags etc are created dynamically when you need them. 467tags, etc., are created dynamically when you need them.
440 468
441Org keeps simple things simple. When first fired up, it should 469Org keeps simple things simple. When first fired up, it should
442feel like a straightforward, easy to use outliner. Complexity is not 470feel like a straightforward, easy to use outliner. Complexity is not
@@ -445,18 +473,19 @@ it. Org is a toolbox and can be used in different ways, for
445example as: 473example as:
446 474
447@example 475@example
448@r{@bullet{} outline extension with visibility cycling and structure editing} 476@r{@bullet{} an outline extension with visibility cycling and structure editing}
449@r{@bullet{} ASCII system and table editor for taking structured notes} 477@r{@bullet{} an ASCII system and table editor for taking structured notes}
450@r{@bullet{} ASCII table editor with spreadsheet-like capabilities} 478@r{@bullet{} an ASCII table editor with spreadsheet-like capabilities}
451@r{@bullet{} TODO list editor} 479@r{@bullet{} a TODO list editor}
452@r{@bullet{} full agenda and planner with deadlines and work scheduling} 480@r{@bullet{} a full agenda and planner with deadlines and work scheduling}
453@r{@bullet{} environment to implement David Allen's GTD system} 481@pindex GTD, Getting Things Done
482@r{@bullet{} an environment to implement David Allen's GTD system}
454@r{@bullet{} a basic database application} 483@r{@bullet{} a basic database application}
455@r{@bullet{} simple hypertext system, with HTML and LaTeX export} 484@r{@bullet{} a simple hypertext system, with HTML and La@TeX{} export}
456@r{@bullet{} publishing tool to create a set of interlinked webpages} 485@r{@bullet{} a publishing tool to create a set of interlinked webpages}
457@end example 486@end example
458 487
459Org's automatic, context sensitive table editor with spreadsheet 488Org's automatic, context-sensitive table editor with spreadsheet
460capabilities can be integrated into any major mode by activating the 489capabilities can be integrated into any major mode by activating the
461minor Orgtbl mode. Using a translation step, it can be used to maintain 490minor Orgtbl mode. Using a translation step, it can be used to maintain
462tables in arbitrary file types, for example in La@TeX{}. The structure 491tables in arbitrary file types, for example in La@TeX{}. The structure
@@ -466,7 +495,7 @@ the minor Orgstruct mode.
466@cindex FAQ 495@cindex FAQ
467There is a website for Org which provides links to the newest 496There is a website for Org which provides links to the newest
468version of Org, as well as additional information, frequently asked 497version of Org, as well as additional information, frequently asked
469questions (FAQ), links to tutorials etc. This page is located at 498questions (FAQ), links to tutorials, etc@. This page is located at
470@uref{http://orgmode.org}. 499@uref{http://orgmode.org}.
471 500
472@page 501@page
@@ -482,8 +511,8 @@ XEmacs package, please skip this section and go directly to
482@ref{Activation}.} 511@ref{Activation}.}
483 512
484If you have downloaded Org from the Web, either as a distribution @file{.zip} 513If you have downloaded Org from the Web, either as a distribution @file{.zip}
485or @file{.tar} file, or as a GIT archive, you must take the following steps 514or @file{.tar} file, or as a Git archive, you must take the following steps
486to install it: Go into the unpacked Org distribution directory and edit the 515to install it: go into the unpacked Org distribution directory and edit the
487top section of the file @file{Makefile}. You must set the name of the Emacs 516top section of the file @file{Makefile}. You must set the name of the Emacs
488binary (likely either @file{emacs} or @file{xemacs}), and the paths to the 517binary (likely either @file{emacs} or @file{xemacs}), and the paths to the
489directories where local Lisp and Info files are kept. If you don't have 518directories where local Lisp and Info files are kept. If you don't have
@@ -518,11 +547,23 @@ make
518@end example 547@end example
519 548
520@noindent If you are running Org from the distribution directory, this is 549@noindent If you are running Org from the distribution directory, this is
521all. If you want to install into the system directories, use 550all. If you want to install Org into the system directories, use (as
551administrator)
522 552
523@example 553@example
524make install 554make install
555@end example
556
557Installing Info files is system dependent, because of differences in the
558@file{install-info} program. In Debian it copies the info files into the
559correct directory and modifies the info directory file. In many other
560systems, the files need to be copied to the correct directory separately, and
561@file{install-info} then only modifies the directory file. Check your system
562documentation to find out which of the following commands you need:
563
564@example
525make install-info 565make install-info
566make install-info-debian
526@end example 567@end example
527 568
528@noindent Then add to @file{.emacs}: 569@noindent Then add to @file{.emacs}:
@@ -542,16 +583,16 @@ Do not forget to activate Org as described in the following section.
542@cindex key bindings, global 583@cindex key bindings, global
543 584
544@iftex 585@iftex
545@b{Important:} @i{If you use copy-and-paste to copy lisp code from the 586@b{Important:} @i{If you use copy-and-paste to copy Lisp code from the
546PDF documentation as viewed by some PDF viewers to your .emacs file, the 587PDF documentation as viewed by some PDF viewers to your @file{.emacs} file, the
547single quote character comes out incorrectly and the code will not work. 588single-quote character comes out incorrectly and the code will not work.
548You need to fix the single quotes by hand, or copy from Info 589You need to fix the single-quotes by hand, or copy from Info
549documentation.} 590documentation.}
550@end iftex 591@end iftex
551 592
552Add the following lines to your @file{.emacs} file. The last three lines 593Add the following lines to your @file{.emacs} file. The last three lines
553define @emph{global} keys for the commands @command{org-store-link}, 594define @emph{global} keys for the commands @command{org-store-link},
554@command{org-agenda}, and @command{org-iswitchb} - please choose suitable 595@command{org-agenda}, and @command{org-iswitchb}---please choose suitable
555keys yourself. 596keys yourself.
556 597
557@lisp 598@lisp
@@ -565,7 +606,7 @@ keys yourself.
565Furthermore, you must activate @code{font-lock-mode} in Org 606Furthermore, you must activate @code{font-lock-mode} in Org
566buffers, because significant functionality depends on font-locking being 607buffers, because significant functionality depends on font-locking being
567active. You can do this with either one of the following two lines 608active. You can do this with either one of the following two lines
568(XEmacs user must use the second option): 609(XEmacs users must use the second option):
569@lisp 610@lisp
570(global-font-lock-mode 1) ; for all buffers 611(global-font-lock-mode 1) ; for all buffers
571(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only 612(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only
@@ -580,18 +621,21 @@ like this:
580MY PROJECTS -*- mode: org; -*- 621MY PROJECTS -*- mode: org; -*-
581@end example 622@end example
582 623
624@vindex org-insert-mode-line-in-empty-file
583@noindent which will select Org mode for this buffer no matter what 625@noindent which will select Org mode for this buffer no matter what
584the file's name is. See also the variable 626the file's name is. See also the variable
585@code{org-insert-mode-line-in-empty-file}. 627@code{org-insert-mode-line-in-empty-file}.
586 628
587Many commands in Org work on the region if the region is active. To make use 629Many commands in Org work on the region if the region is @i{active}. To make
588of this, you need to have @code{transient-mark-mode} (@code{zmacs-regions} in 630use of this, you need to have @code{transient-mark-mode}
589XEmacs) turned on. In Emacs 23 this is the default, in Emacs 22 you need to 631(@code{zmacs-regions} in XEmacs) turned on. In Emacs 23 this is the default,
590do this yourself with 632in Emacs 22 you need to do this yourself with
591
592@lisp 633@lisp
593(transient-mark-mode 1) 634(transient-mark-mode 1)
594@end lisp 635@end lisp
636@noindent If you do not like @code{transient-mark-mode}, you can create an
637active region by using the mouse to select a region, or pressing
638@kbd{C-@key{SPC}} twice before moving the cursor.
595 639
596@node Feedback, Conventions, Activation, Introduction 640@node Feedback, Conventions, Activation, Introduction
597@section Feedback 641@section Feedback
@@ -601,7 +645,7 @@ do this yourself with
601@cindex author 645@cindex author
602 646
603If you find problems with Org, or if you have questions, remarks, or ideas 647If you find problems with Org, or if you have questions, remarks, or ideas
604about it, please mail to the Org mailing list @code{emacs-orgmode@@gnu.org}. 648about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.
605If you are not a member of the mailing list, your mail will be reviewed by a 649If you are not a member of the mailing list, your mail will be reviewed by a
606moderator and then passed through to the list. 650moderator and then passed through to the list.
607 651
@@ -624,21 +668,21 @@ small example file helps, along with clear information about:
624@cindex backtrace of an error 668@cindex backtrace of an error
625If working with Org produces an error with a message you don't 669If working with Org produces an error with a message you don't
626understand, you may have hit a bug. The best way to report this is by 670understand, you may have hit a bug. The best way to report this is by
627providing, in addition to what was mentioned above, a @emph{Backtrace}. 671providing, in addition to what was mentioned above, a @emph{backtrace}.
628This is information from the built-in debugger about where and how the 672This is information from the built-in debugger about where and how the
629error occurred. Here is how to produce a useful backtrace: 673error occurred. Here is how to produce a useful backtrace:
630 674
631@enumerate 675@enumerate
632@item 676@item
633Start a fresh Emacs or XEmacs, and make sure that it will load the 677Reload uncompiled versions of all Org-mode Lisp files. The backtrace
634original Lisp code in @file{org.el} instead of the compiled version in 678contains much more information if it is produced with uncompiled code.
635@file{org.elc}. The backtrace contains much more information if it is 679To do this, use
636produced with uncompiled code. To do this, either rename @file{org.elc}
637to something else before starting Emacs, or ask Emacs explicitly to load
638@file{org.el} by using the command line
639@example 680@example
640emacs -l /path/to/org.el 681C-u M-x org-reload RET
641@end example 682@end example
683@noindent
684or select @code{Org -> Refresh/Reload -> Reload Org uncompiled} from the
685menu.
642@item 686@item
643Go to the @code{Options} menu and select @code{Enter Debugger on Error} 687Go to the @code{Options} menu and select @code{Enter Debugger on Error}
644(XEmacs has this option in the @code{Troubleshooting} sub-menu). 688(XEmacs has this option in the @code{Troubleshooting} sub-menu).
@@ -677,7 +721,7 @@ special meaning are written with all capitals.
677@cindex document structure 721@cindex document structure
678@cindex structure of document 722@cindex structure of document
679 723
680Org is based on outline mode and provides flexible commands to 724Org is based on Outline mode and provides flexible commands to
681edit the structure of the document. 725edit the structure of the document.
682 726
683@menu 727@menu
@@ -690,6 +734,7 @@ edit the structure of the document.
690* Sparse trees:: Matches embedded in context 734* Sparse trees:: Matches embedded in context
691* Plain lists:: Additional structure within an entry 735* Plain lists:: Additional structure within an entry
692* Drawers:: Tucking stuff away 736* Drawers:: Tucking stuff away
737* Blocks:: Folding blocks
693* Footnotes:: How footnotes are defined in Org's syntax 738* Footnotes:: How footnotes are defined in Org's syntax
694* Orgstruct mode:: Structure editing outside Org 739* Orgstruct mode:: Structure editing outside Org
695@end menu 740@end menu
@@ -706,12 +751,13 @@ of this structure is achieved by folding (hiding) large parts of the
706document to show only the general document structure and the parts 751document to show only the general document structure and the parts
707currently being worked on. Org greatly simplifies the use of 752currently being worked on. Org greatly simplifies the use of
708outlines by compressing the entire show/hide functionality into a single 753outlines by compressing the entire show/hide functionality into a single
709command @command{org-cycle}, which is bound to the @key{TAB} key. 754command, @command{org-cycle}, which is bound to the @key{TAB} key.
710 755
711@node Headlines, Visibility cycling, Outlines, Document Structure 756@node Headlines, Visibility cycling, Outlines, Document Structure
712@section Headlines 757@section Headlines
713@cindex headlines 758@cindex headlines
714@cindex outline tree 759@cindex outline tree
760@vindex org-special-ctrl-a/e
715 761
716Headlines define the structure of an outline tree. The headlines in 762Headlines define the structure of an outline tree. The headlines in
717Org start with one or more stars, on the left margin@footnote{See 763Org start with one or more stars, on the left margin@footnote{See
@@ -731,8 +777,9 @@ of @kbd{C-a} and @kbd{C-e} in headlines.}. For example:
731 777
732@noindent Some people find the many stars too noisy and would prefer an 778@noindent Some people find the many stars too noisy and would prefer an
733outline that has whitespace followed by a single star as headline 779outline that has whitespace followed by a single star as headline
734starters. @ref{Clean view} describes a setup to realize this. 780starters. @ref{Clean view}, describes a setup to realize this.
735 781
782@vindex org-cycle-separator-lines
736An empty line after the end of a subtree is considered part of it and 783An empty line after the end of a subtree is considered part of it and
737will be hidden when the subtree is folded. However, if you leave at 784will be hidden when the subtree is folded. However, if you leave at
738least two empty lines, one empty line will remain visible after folding 785least two empty lines, one empty line will remain visible after folding
@@ -766,6 +813,8 @@ Org uses just two commands, bound to @key{TAB} and
766'-----------------------------------' 813'-----------------------------------'
767@end example 814@end example
768 815
816@vindex org-cycle-emulate-tab
817@vindex org-cycle-global-at-bob
769The cursor must be on a headline for this to work@footnote{see, however, 818The cursor must be on a headline for this to work@footnote{see, however,
770the option @code{org-cycle-emulate-tab}.}. When the cursor is at the 819the option @code{org-cycle-emulate-tab}.}. When the cursor is at the
771beginning of the buffer and the first line is not a headline, then 820beginning of the buffer and the first line is not a headline, then
@@ -821,8 +870,13 @@ negative then go up that many levels. With a @kbd{C-u} prefix, do not remove
821the previously used indirect buffer. 870the previously used indirect buffer.
822@end table 871@end table
823 872
873@vindex org-startup-folded
874@cindex @code{overview}, STARTUP keyword
875@cindex @code{content}, STARTUP keyword
876@cindex @code{showall}, STARTUP keyword
877
824When Emacs first visits an Org file, the global state is set to 878When Emacs first visits an Org file, the global state is set to
825OVERVIEW, i.e. only the top level headlines are visible. This can be 879OVERVIEW, @ie only the top level headlines are visible. This can be
826configured through the variable @code{org-startup-folded}, or on a 880configured through the variable @code{org-startup-folded}, or on a
827per-file basis by adding one of the following lines anywhere in the 881per-file basis by adding one of the following lines anywhere in the
828buffer: 882buffer:
@@ -833,6 +887,7 @@ buffer:
833#+STARTUP: showall 887#+STARTUP: showall
834@end example 888@end example
835 889
890@cindex property, VISIBILITY
836@noindent 891@noindent
837Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties 892Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties
838and Columns}) will get their visibility adapted accordingly. Allowed values 893and Columns}) will get their visibility adapted accordingly. Allowed values
@@ -841,7 +896,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and
841@table @kbd 896@table @kbd
842@kindex C-u C-u @key{TAB} 897@kindex C-u C-u @key{TAB}
843@item C-u C-u @key{TAB} 898@item C-u C-u @key{TAB}
844Switch back to the startup visibility of the buffer, i.e. whatever is 899Switch back to the startup visibility of the buffer, @ie whatever is
845requested by startup options and @samp{VISIBILITY} properties in individual 900requested by startup options and @samp{VISIBILITY} properties in individual
846entries. 901entries.
847@end table 902@end table
@@ -874,6 +929,7 @@ Backward to higher level heading.
874Jump to a different place without changing the current outline 929Jump to a different place without changing the current outline
875visibility. Shows the document structure in a temporary buffer, where 930visibility. Shows the document structure in a temporary buffer, where
876you can use the following keys to find your destination: 931you can use the following keys to find your destination:
932@vindex org-goto-auto-isearch
877@example 933@example
878@key{TAB} @r{Cycle visibility.} 934@key{TAB} @r{Cycle visibility.}
879@key{down} / @key{up} @r{Next/previous visible headline.} 935@key{down} / @key{up} @r{Next/previous visible headline.}
@@ -886,7 +942,9 @@ u @r{One level up.}
8860-9 @r{Digit argument.} 9420-9 @r{Digit argument.}
887q @r{Quit} 943q @r{Quit}
888@end example 944@end example
889See also the variable@code{org-goto-interface}. 945@vindex org-goto-interface
946@noindent
947See also the variable @code{org-goto-interface}.
890@end table 948@end table
891 949
892@node Structure editing, Archiving, Motion, Document Structure 950@node Structure editing, Archiving, Motion, Document Structure
@@ -904,6 +962,7 @@ See also the variable@code{org-goto-interface}.
904@table @kbd 962@table @kbd
905@kindex M-@key{RET} 963@kindex M-@key{RET}
906@item M-@key{RET} 964@item M-@key{RET}
965@vindex org-M-RET-may-split-line
907Insert new heading with same level as current. If the cursor is in a 966Insert new heading with same level as current. If the cursor is in a
908plain list item, a new item is created (@pxref{Plain lists}). To force 967plain list item, a new item is created (@pxref{Plain lists}). To force
909creation of a new headline, use a prefix argument, or first press @key{RET} 968creation of a new headline, use a prefix argument, or first press @key{RET}
@@ -914,7 +973,7 @@ customize the variable @code{org-M-RET-may-split-line}.}. If the
914command is used at the beginning of a headline, the new headline is 973command is used at the beginning of a headline, the new headline is
915created before the current line. If at the beginning of any other line, 974created before the current line. If at the beginning of any other line,
916the content of that line is made the new heading. If the command is 975the content of that line is made the new heading. If the command is
917used at the end of a folded subtree (i.e. behind the ellipses at the end 976used at the end of a folded subtree (@ie behind the ellipses at the end
918of a headline), then a headline like the current one will be inserted 977of a headline), then a headline like the current one will be inserted
919after the end of the subtree. 978after the end of the subtree.
920@kindex C-@key{RET} 979@kindex C-@key{RET}
@@ -924,7 +983,9 @@ current heading, the new heading is placed after the body instead of before
924it. This command works from anywhere in the entry. 983it. This command works from anywhere in the entry.
925@kindex M-S-@key{RET} 984@kindex M-S-@key{RET}
926@item M-S-@key{RET} 985@item M-S-@key{RET}
927Insert new TODO entry with same level as current heading. 986@vindex org-treat-insert-todo-heading-as-state-change
987Insert new TODO entry with same level as current heading. See also the
988variable @code{org-treat-insert-todo-heading-as-state-change}.
928@kindex C-S-@key{RET} 989@kindex C-S-@key{RET}
929@item C-S-@key{RET} 990@item C-S-@key{RET}
930Insert new TODO entry with same level as current heading. Like 991Insert new TODO entry with same level as current heading. Like
@@ -951,7 +1012,7 @@ level).
951Move subtree down (swap with next subtree of same level). 1012Move subtree down (swap with next subtree of same level).
952@kindex C-c C-x C-w 1013@kindex C-c C-x C-w
953@item C-c C-x C-w 1014@item C-c C-x C-w
954Kill subtree, i.e. remove it from buffer but save in kill ring. 1015Kill subtree, @ie remove it from buffer but save in kill ring.
955With a numeric prefix argument N, kill N sequential subtrees. 1016With a numeric prefix argument N, kill N sequential subtrees.
956@kindex C-c C-x M-w 1017@kindex C-c C-x M-w
957@item C-c C-x M-w 1018@item C-c C-x M-w
@@ -965,6 +1026,8 @@ also be specified with a numeric prefix argument, or by yanking after a
965headline marker like @samp{****}. 1026headline marker like @samp{****}.
966@kindex C-y 1027@kindex C-y
967@item C-y 1028@item C-y
1029@vindex org-yank-adjusted-subtrees
1030@vindex org-yank-folded-subtrees
968Depending on the variables @code{org-yank-adjusted-subtrees} and 1031Depending on the variables @code{org-yank-adjusted-subtrees} and
969@code{org-yank-folded-subtrees}, Org's internal @code{yank} command will 1032@code{org-yank-folded-subtrees}, Org's internal @code{yank} command will
970paste subtrees folded and in a clever way, using the same command as @kbd{C-c 1033paste subtrees folded and in a clever way, using the same command as @kbd{C-c
@@ -975,6 +1038,14 @@ previously visible. Any prefix argument to this command will force a normal
975force a normal yank is @kbd{C-u C-y}. If you use @code{yank-pop} after a 1038force a normal yank is @kbd{C-u C-y}. If you use @code{yank-pop} after a
976yank, it will yank previous kill items plainly, without adjustment and 1039yank, it will yank previous kill items plainly, without adjustment and
977folding. 1040folding.
1041@kindex C-c C-x c
1042@item C-c C-x c
1043Clone a subtree by making a number of sibling copies of it. You will be
1044prompted for the number of copies to make, and you can also specify if any
1045timestamps in the entry should be shifted. This can be useful, for example,
1046to create a number of tasks related to a series of lectures to prepare. For
1047more details, see the docstring of the command
1048@code{org-clone-subtree-with-time-shift}.
978@kindex C-c C-w 1049@kindex C-c C-w
979@item C-c C-w 1050@item C-c C-w
980Refile entry or region to a different location. @xref{Refiling notes}. 1051Refile entry or region to a different location. @xref{Refiling notes}.
@@ -983,18 +1054,19 @@ Refile entry or region to a different location. @xref{Refiling notes}.
983Sort same-level entries. When there is an active region, all entries in the 1054Sort same-level entries. When there is an active region, all entries in the
984region will be sorted. Otherwise the children of the current headline are 1055region will be sorted. Otherwise the children of the current headline are
985sorted. The command prompts for the sorting method, which can be 1056sorted. The command prompts for the sorting method, which can be
986alphabetically, numerically, by time (using the first time stamp in each 1057alphabetically, numerically, by time (first timestamp with active preferred,
987entry), by priority, or by TODO keyword (in the sequence the keywords have 1058creation time, scheduled time, deadline time), by priority, by TODO keyword
988been defined in the setup). Reverse sorting is possible as well. You can 1059(in the sequence the keywords have been defined in the setup) or by the value
989also supply your own function to extract the sorting key. With a @kbd{C-u} 1060of a property. Reverse sorting is possible as well. You can also supply
990prefix, sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, 1061your own function to extract the sorting key. With a @kbd{C-u} prefix,
991duplicate entries will also be removed. 1062sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, duplicate
1063entries will also be removed.
992@kindex C-x n s 1064@kindex C-x n s
993@item C-x n s 1065@item C-x n s
994Narrow buffer to current subtree. 1066Narrow buffer to current subtree.
995@kindex C-x n w 1067@kindex C-x n w
996@item C-x n w 1068@item C-x n w
997Widen buffer to remove a narrowing. 1069Widen buffer to remove narrowing.
998@kindex C-c * 1070@kindex C-c *
999@item C-c * 1071@item C-c *
1000Turn a normal line or plain list item into a headline (so that it becomes a 1072Turn a normal line or plain list item into a headline (so that it becomes a
@@ -1007,8 +1079,8 @@ headline, remove the stars from all headlines in the region.
1007 1079
1008@cindex region, active 1080@cindex region, active
1009@cindex active region 1081@cindex active region
1010@cindex Transient mark mode 1082@cindex transient mark mode
1011When there is an active region (Transient mark mode), promotion and 1083When there is an active region (Transient Mark mode), promotion and
1012demotion work on all headlines in the region. To select a region of 1084demotion work on all headlines in the region. To select a region of
1013headlines, it is best to place both point and mark at the beginning of a 1085headlines, it is best to place both point and mark at the beginning of a
1014line, mark at the beginning of the first headline, and point at the line 1086line, mark at the beginning of the first headline, and point at the line
@@ -1039,25 +1111,33 @@ A headline that is marked with the ARCHIVE tag (@pxref{Tags}) stays at
1039its location in the outline tree, but behaves in the following way: 1111its location in the outline tree, but behaves in the following way:
1040@itemize @minus 1112@itemize @minus
1041@item 1113@item
1114@vindex org-cycle-open-archived-trees
1042It does not open when you attempt to do so with a visibility cycling 1115It does not open when you attempt to do so with a visibility cycling
1043command (@pxref{Visibility cycling}). You can force cycling archived 1116command (@pxref{Visibility cycling}). You can force cycling archived
1044subtrees with @kbd{C-@key{TAB}}, or by setting the option 1117subtrees with @kbd{C-@key{TAB}}, or by setting the option
1045@code{org-cycle-open-archived-trees}. Also normal outline commands like 1118@code{org-cycle-open-archived-trees}. Also normal outline commands like
1046@code{show-all} will open archived subtrees. 1119@code{show-all} will open archived subtrees.
1047@item 1120@item
1121@vindex org-sparse-tree-open-archived-trees
1048During sparse tree construction (@pxref{Sparse trees}), matches in 1122During sparse tree construction (@pxref{Sparse trees}), matches in
1049archived subtrees are not exposed, unless you configure the option 1123archived subtrees are not exposed, unless you configure the option
1050@code{org-sparse-tree-open-archived-trees}. 1124@code{org-sparse-tree-open-archived-trees}.
1051@item 1125@item
1126@vindex org-agenda-skip-archived-trees
1052During agenda view construction (@pxref{Agenda Views}), the content of 1127During agenda view construction (@pxref{Agenda Views}), the content of
1053archived trees is ignored unless you configure the option 1128archived trees is ignored unless you configure the option
1054@code{org-agenda-skip-archived-trees}, in which case these trees will always 1129@code{org-agenda-skip-archived-trees}, in which case these trees will always
1055be included. In the agenda you can press the @kbd{v} key to get archives 1130be included. In the agenda you can press the @kbd{v} key to get archives
1056temporarily included. 1131temporarily included.
1057@item 1132@item
1133@vindex org-export-with-archived-trees
1058Archived trees are not exported (@pxref{Exporting}), only the headline 1134Archived trees are not exported (@pxref{Exporting}), only the headline
1059is. Configure the details using the variable 1135is. Configure the details using the variable
1060@code{org-export-with-archived-trees}. 1136@code{org-export-with-archived-trees}.
1137@item
1138@vindex org-columns-skip-arrchived-trees
1139Archived trees are excluded from column view unless the variable
1140@code{org-columns-skip-arrchived-trees} is configured to @code{nil}.
1061@end itemize 1141@end itemize
1062 1142
1063The following commands help managing the ARCHIVE tag: 1143The following commands help managing the ARCHIVE tag:
@@ -1096,12 +1176,15 @@ the entry with the heading @samp{Archive} and the tag @samp{ARCHIVE}
1096(@pxref{ARCHIVE tag}). The entry becomes a child of that sibling and in this 1176(@pxref{ARCHIVE tag}). The entry becomes a child of that sibling and in this
1097way retains a lot of its original context, including inherited tags and 1177way retains a lot of its original context, including inherited tags and
1098approximate position in the outline. 1178approximate position in the outline.
1179@kindex C-c $
1099@kindex C-c C-x C-s 1180@kindex C-c C-x C-s
1181@itemx C-c $
1100@item C-c C-x C-s 1182@item C-c C-x C-s
1183@vindex org-archive-location
1101Archive the subtree starting at the cursor position to the location 1184Archive the subtree starting at the cursor position to the location
1102given by @code{org-archive-location}. Context information that could be 1185given by @code{org-archive-location}. Context information that could be
1103lost like the file name, the category, inherited tags, and the TODO 1186lost, like the file name, the category, inherited tags, and the TODO
1104state will be store as properties in the entry. 1187state will be stored as properties in the entry.
1105@kindex C-u C-c C-x C-s 1188@kindex C-u C-c C-x C-s
1106@item C-u C-c C-x C-s 1189@item C-u C-c C-x C-s
1107Check if any direct children of the current headline could be moved to 1190Check if any direct children of the current headline could be moved to
@@ -1125,17 +1208,20 @@ using this method is @emph{strongly} deprecated as it is incompatible
1125with the outline structure of the document. The correct method for 1208with the outline structure of the document. The correct method for
1126setting multiple archive locations in a buffer is using properties.}: 1209setting multiple archive locations in a buffer is using properties.}:
1127 1210
1211@cindex #+ARCHIVE
1128@example 1212@example
1129#+ARCHIVE: %s_done:: 1213#+ARCHIVE: %s_done::
1130@end example 1214@end example
1131 1215
1216@cindex property, ARCHIVE
1132@noindent 1217@noindent
1133If you would like to have a special ARCHIVE location for a single entry 1218If you would like to have a special ARCHIVE location for a single entry
1134or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the 1219or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the
1135location as the value (@pxref{Properties and Columns}). 1220location as the value (@pxref{Properties and Columns}).
1136 1221
1222@vindex org-archive-save-context-info
1137When a subtree is moved, it receives a number of special properties that 1223When a subtree is moved, it receives a number of special properties that
1138record context information like the file from where the entry came, it's 1224record context information like the file from where the entry came, its
1139outline path the archiving time etc. Configure the variable 1225outline path the archiving time etc. Configure the variable
1140@code{org-archive-save-context-info} to adjust the amount of information 1226@code{org-archive-save-context-info} to adjust the amount of information
1141added. 1227added.
@@ -1147,6 +1233,10 @@ added.
1147@cindex folding, sparse trees 1233@cindex folding, sparse trees
1148@cindex occur, command 1234@cindex occur, command
1149 1235
1236@vindex org-show-hierarchy-above
1237@vindex org-show-following-heading
1238@vindex org-show-siblings
1239@vindex org-show-entry-below
1150An important feature of Org mode is the ability to construct @emph{sparse 1240An important feature of Org mode is the ability to construct @emph{sparse
1151trees} for selected information in an outline tree, so that the entire 1241trees} for selected information in an outline tree, so that the entire
1152document is folded as much as possible, but the selected information is made 1242document is folded as much as possible, but the selected information is made
@@ -1165,19 +1255,21 @@ commands can be accessed through a dispatcher:
1165This prompts for an extra key to select a sparse-tree creating command. 1255This prompts for an extra key to select a sparse-tree creating command.
1166@kindex C-c / r 1256@kindex C-c / r
1167@item C-c / r 1257@item C-c / r
1258@vindex org-remove-highlights-with-change
1168Occur. Prompts for a regexp and shows a sparse tree with all matches. If 1259Occur. Prompts for a regexp and shows a sparse tree with all matches. If
1169the match is in a headline, the headline is made visible. If the match is in 1260the match is in a headline, the headline is made visible. If the match is in
1170the body of an entry, headline and body are made visible. In order to 1261the body of an entry, headline and body are made visible. In order to
1171provide minimal context, also the full hierarchy of headlines above the match 1262provide minimal context, also the full hierarchy of headlines above the match
1172is shown, as well as the headline following the match. Each match is also 1263is shown, as well as the headline following the match. Each match is also
1173highlighted; the highlights disappear when the buffer is changed by an 1264highlighted; the highlights disappear when the buffer is changed by an
1174editing command@footnote{depending on the option 1265editing command@footnote{This depends on the option
1175@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. 1266@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}.
1176When called with a @kbd{C-u} prefix argument, previous highlights are kept, 1267When called with a @kbd{C-u} prefix argument, previous highlights are kept,
1177so several calls to this command can be stacked. 1268so several calls to this command can be stacked.
1178@end table 1269@end table
1179 1270
1180@noindent 1271@noindent
1272@vindex org-agenda-custom-commands
1181For frequently used sparse trees of specific search strings, you can 1273For frequently used sparse trees of specific search strings, you can
1182use the variable @code{org-agenda-custom-commands} to define fast 1274use the variable @code{org-agenda-custom-commands} to define fast
1183keyboard access to specific sparse trees. These commands will then be 1275keyboard access to specific sparse trees. These commands will then be
@@ -1236,6 +1328,7 @@ separator @samp{ :: } to separate the description @emph{term} from the
1236description. 1328description.
1237@end itemize 1329@end itemize
1238 1330
1331@vindex org-empty-line-terminates-plain-lists
1239Items belonging to the same list must have the same indentation on the first 1332Items belonging to the same list must have the same indentation on the first
1240line. In particular, if an ordered list reaches number @samp{10.}, then the 1333line. In particular, if an ordered list reaches number @samp{10.}, then the
12412--digit numbers must be written left-aligned with the other numbers in the 13342--digit numbers must be written left-aligned with the other numbers in the
@@ -1261,16 +1354,17 @@ Here is an example:
1261 Important actors in this film are: 1354 Important actors in this film are:
1262 - @b{Elijah Wood} :: He plays Frodo 1355 - @b{Elijah Wood} :: He plays Frodo
1263 - @b{Sean Austin} :: He plays Sam, Frodo's friend. I still remember 1356 - @b{Sean Austin} :: He plays Sam, Frodo's friend. I still remember
1264 him very well from his role as Mikey Walsh in the Goonies. 1357 him very well from his role as Mikey Walsh in @i{The Goonies}.
1265@end group 1358@end group
1266@end example 1359@end example
1267 1360
1268Org supports these lists by tuning filling and wrapping commands to 1361Org supports these lists by tuning filling and wrapping commands to deal with
1269deal with them correctly@footnote{Org only changes the filling 1362them correctly@footnote{Org only changes the filling settings for Emacs. For
1270settings for Emacs. For XEmacs, you should use Kyle E. Jones' 1363XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on,
1271@file{filladapt.el}. To turn this on, put into @file{.emacs}: 1364put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them
1272@code{(require 'filladapt)}}, and by exporting them properly 1365properly (@pxref{Exporting}). Since indentation is what governs the
1273(@pxref{Exporting}). 1366structure of these lists, many structural constructs like @code{#+BEGIN_...}
1367blocks can be indented to signal that they should be part of a list item.
1274 1368
1275The following commands act on items when the cursor is in the first line 1369The following commands act on items when the cursor is in the first line
1276of an item (the line with the bullet or number). 1370of an item (the line with the bullet or number).
@@ -1278,16 +1372,19 @@ of an item (the line with the bullet or number).
1278@table @kbd 1372@table @kbd
1279@kindex @key{TAB} 1373@kindex @key{TAB}
1280@item @key{TAB} 1374@item @key{TAB}
1281Items can be folded just like headline levels if you set the variable 1375@vindex org-cycle-include-plain-lists
1282@code{org-cycle-include-plain-lists}. The level of an item is then 1376Items can be folded just like headline levels. Normally this works only if
1283given by the indentation of the bullet/number. Items are always 1377the cursor is on a plain list item. For more details, see the variable
1284subordinate to real headlines, however; the hierarchies remain 1378@code{org-cycle-include-plain-lists}. to @code{integrate}, plain list items
1285completely separated. 1379will be treated like low-level. The level of an item is then given by the
1380indentation of the bullet/number. Items are always subordinate to real
1381headlines, however; the hierarchies remain completely separated.
1286 1382
1287If @code{org-cycle-include-plain-lists} has not been set, @key{TAB} 1383If @code{org-cycle-include-plain-lists} has not been set, @key{TAB}
1288fixes the indentation of the current line in a heuristic way. 1384fixes the indentation of the current line in a heuristic way.
1289@kindex M-@key{RET} 1385@kindex M-@key{RET}
1290@item M-@key{RET} 1386@item M-@key{RET}
1387@vindex org-M-RET-may-split-line
1291Insert new item at current level. With a prefix argument, force a new 1388Insert new item at current level. With a prefix argument, force a new
1292heading (@pxref{Structure editing}). If this command is used in the middle 1389heading (@pxref{Structure editing}). If this command is used in the middle
1293of a line, the line is @emph{split} and the rest of the line becomes the new 1390of a line, the line is @emph{split} and the rest of the line becomes the new
@@ -1305,6 +1402,7 @@ Insert a new item with a checkbox (@pxref{Checkboxes}).
1305@item S-@key{up} 1402@item S-@key{up}
1306@itemx S-@key{down} 1403@itemx S-@key{down}
1307@cindex shift-selection-mode 1404@cindex shift-selection-mode
1405@vindex org-support-shift-select
1308Jump to the previous/next item in the current list, but only if 1406Jump to the previous/next item in the current list, but only if
1309@code{org-support-shift-select} is off. If not, you can still use paragraph 1407@code{org-support-shift-select} is off. If not, you can still use paragraph
1310jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite 1408jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite
@@ -1341,19 +1439,30 @@ region when calling this, all lines will be converted to list items. If the
1341first line already was a list item, any item markers will be removed from the 1439first line already was a list item, any item markers will be removed from the
1342list. Finally, even without an active region, a normal line will be 1440list. Finally, even without an active region, a normal line will be
1343converted into a list item. 1441converted into a list item.
1442@kindex C-c *
1443@item C-c *
1444Turn a plain list item into a headline (so that it becomes a subheading at
1445its location). @xref{Structure editing}, for a detailed explanation.
1344@kindex S-@key{left} 1446@kindex S-@key{left}
1345@kindex S-@key{right} 1447@kindex S-@key{right}
1346@item S-@key{left}/@key{right} 1448@item S-@key{left}/@key{right}
1449@vindex org-support-shift-select
1347This command also cycles bullet styles when the cursor in on the bullet or 1450This command also cycles bullet styles when the cursor in on the bullet or
1348anywhere in an item line, details depending on 1451anywhere in an item line, details depending on
1349@code{org-support-shift-select}. 1452@code{org-support-shift-select}.
1453@kindex C-c ^
1454@item C-c ^
1455Sort the plain list. You will be prompted for the sorting method:
1456numerically, alphabetically, by time, or by custom function.
1350@end table 1457@end table
1351 1458
1352@node Drawers, Footnotes, Plain lists, Document Structure 1459@node Drawers, Blocks, Plain lists, Document Structure
1353@section Drawers 1460@section Drawers
1354@cindex drawers 1461@cindex drawers
1462@cindex #+DRAWERS
1355@cindex visibility cycling, drawers 1463@cindex visibility cycling, drawers
1356 1464
1465@vindex org-drawers
1357Sometimes you want to keep information associated with an entry, but you 1466Sometimes you want to keep information associated with an entry, but you
1358normally don't want to see it. For this, Org mode has @emph{drawers}. 1467normally don't want to see it. For this, Org mode has @emph{drawers}.
1359Drawers need to be configured with the variable 1468Drawers need to be configured with the variable
@@ -1370,24 +1479,44 @@ look like this:
1370 After the drawer. 1479 After the drawer.
1371@end example 1480@end example
1372 1481
1373Visibility cycling (@pxref{Visibility cycling}) on the headline will 1482Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and
1374hide and show the entry, but keep the drawer collapsed to a single line. 1483show the entry, but keep the drawer collapsed to a single line. In order to
1375In order to look inside the drawer, you need to move the cursor to the 1484look inside the drawer, you need to move the cursor to the drawer line and
1376drawer line and press @key{TAB} there. Org mode uses a drawer for 1485press @key{TAB} there. Org mode uses the @code{PROPERTIES} drawer for
1377storing properties (@pxref{Properties and Columns}), and another one for 1486storing properties (@pxref{Properties and Columns}), and you can also arrange
1378storing clock times (@pxref{Clocking work time}). 1487for state change notes (@pxref{Tracking TODO state changes}) and clock times
1488(@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}.
1379 1489
1380@node Footnotes, Orgstruct mode, Drawers, Document Structure 1490@node Blocks, Footnotes, Drawers, Document Structure
1491@section Blocks
1492
1493@vindex org-hide-block-startup
1494@cindex blocks, folding
1495Org-mode uses begin...end blocks for various purposes from including source
1496code examples (@pxref{Literal examples}) to capturing time logging
1497information (@pxref{Clocking work time}). These blocks can be folded and
1498unfolded by pressing TAB in the begin line. You can also get all blocks
1499folded at startup by configuring the variable @code{org-hide-block-startup}
1500or on a per-file basis by using
1501
1502@cindex @code{hideblocks}, STARTUP keyword
1503@cindex @code{nohideblocks}, STARTUP keyword
1504@example
1505#+STARTUP: hideblocks
1506#+STARTUP: nohideblocks
1507@end example
1508
1509@node Footnotes, Orgstruct mode, Blocks, Document Structure
1381@section Footnotes 1510@section Footnotes
1382@cindex footnotes 1511@cindex footnotes
1383 1512
1384Org-mode supports the creation of footnotes. In contrast to the 1513Org mode supports the creation of footnotes. In contrast to the
1385@file{footnote.el} package, Org-mode's footnotes are designed for work on a 1514@file{footnote.el} package, Org mode's footnotes are designed for work on a
1386larger document, not only for one-off documents like emails. The basic 1515larger document, not only for one-off documents like emails. The basic
1387syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is 1516syntax is similar to the one used by @file{footnote.el}, @ie a footnote is
1388defined in a paragraph that is started by a footnote marker in square 1517defined in a paragraph that is started by a footnote marker in square
1389brackets in column 0, no indentation allowed. If you need a paragraph break 1518brackets in column 0, no indentation allowed. If you need a paragraph break
1390inside a footnote, use the LaTeX idiom @samp{\par}. The footnote reference 1519inside a footnote, use the La@TeX{} idiom @samp{\par}. The footnote reference
1391is simply the marker in square brackets, inside text. For example: 1520is simply the marker in square brackets, inside text. For example:
1392 1521
1393@example 1522@example
@@ -1396,20 +1525,22 @@ The Org homepage[fn:1] now looks a lot better than it used to.
1396[fn:1] The link is: http://orgmode.org 1525[fn:1] The link is: http://orgmode.org
1397@end example 1526@end example
1398 1527
1399Org-mode extends the number-based syntax to @emph{named} footnotes and 1528Org mode extends the number-based syntax to @emph{named} footnotes and
1400optional inline definition. Using plain numbers as markers (as 1529optional inline definition. Using plain numbers as markers (as
1401@file{footnote.el} does) is supported for backward compatibility, but not 1530@file{footnote.el} does) is supported for backward compatibility, but not
1402encouraged because of possible conflicts with LaTeX snippets @pxref{Embedded 1531encouraged because of possible conflicts with La@TeX{} snippets (@pxref{Embedded
1403LaTeX}. Here are the valid references: 1532LaTeX}). Here are the valid references:
1404 1533
1405@table @code 1534@table @code
1406@item [1] 1535@item [1]
1407A plain numeric footnote marker. 1536A plain numeric footnote marker. Compatible with @file{footnote.el}, but not
1537recommended because somthing like @samp{[1]} could easily be part of a code
1538snippet.
1408@item [fn:name] 1539@item [fn:name]
1409A named footnote reference, where @code{name} is a unique label word, or, for 1540A named footnote reference, where @code{name} is a unique label word, or, for
1410simplicity of automatic creation, a number. 1541simplicity of automatic creation, a number.
1411@item [fn:: This is the inline definition of this footnote] 1542@item [fn:: This is the inline definition of this footnote]
1412A LaTeX-like anonymous footnote where the definition is given directly at the 1543A La@TeX{}-like anonymous footnote where the definition is given directly at the
1413reference point. 1544reference point.
1414@item [fn:name: a definition] 1545@item [fn:name: a definition]
1415An inline definition of a footnote, which also specifies a name for the note. 1546An inline definition of a footnote, which also specifies a name for the note.
@@ -1417,7 +1548,8 @@ Since Org allows multiple references to the same note, you can then use
1417@code{[fn:name]} to create additional references. 1548@code{[fn:name]} to create additional references.
1418@end table 1549@end table
1419 1550
1420Footnote labels can be created automatically, or you create names yourself. 1551@vindex org-footnote-auto-label
1552Footnote labels can be created automatically, or you can create names yourself.
1421This is handled by the variable @code{org-footnote-auto-label} and its 1553This is handled by the variable @code{org-footnote-auto-label} and its
1422corresponding @code{#+STARTUP} keywords, see the docstring of that variable 1554corresponding @code{#+STARTUP} keywords, see the docstring of that variable
1423for details. 1555for details.
@@ -1432,6 +1564,9 @@ The footnote action command.
1432When the cursor is on a footnote reference, jump to the definition. When it 1564When the cursor is on a footnote reference, jump to the definition. When it
1433is at a definition, jump to the (first) reference. 1565is at a definition, jump to the (first) reference.
1434 1566
1567@vindex org-footnote-define-inline
1568@vindex org-footnote-section
1569@vindex org-footnote-auto-adjust
1435Otherwise, create a new footnote. Depending on the variable 1570Otherwise, create a new footnote. Depending on the variable
1436@code{org-footnote-define-inline}@footnote{The corresponding in-buffer 1571@code{org-footnote-define-inline}@footnote{The corresponding in-buffer
1437setting is: @code{#+STARTUP: fninline} or @code{#+STARTUP: nofninline}}, the 1572setting is: @code{#+STARTUP: fninline} or @code{#+STARTUP: nofninline}}, the
@@ -1445,7 +1580,13 @@ options is offered:
1445s @r{Sort the footnote definitions by reference sequence. During editing,} 1580s @r{Sort the footnote definitions by reference sequence. During editing,}
1446 @r{Org makes no effort to sort footnote definitions into a particular} 1581 @r{Org makes no effort to sort footnote definitions into a particular}
1447 @r{sequence. If you want them sorted, use this command, which will} 1582 @r{sequence. If you want them sorted, use this command, which will}
1448 @r{also move entries according to @code{org-footnote-section}.} 1583 @r{also move entries according to @code{org-footnote-section}. Automatic}
1584 @r{sorting after each insertion/deletion can be configured using the}
1585 @r{variable @code{org-footnote-auto-adjust}.}
1586r @r{Renumber the simple @code{fn:N} footnotes. Automatic renumbering}
1587 @r{after each insertion/deletion can be configured using the variable}
1588 @r{@code{org-footnote-auto-adjust}.}
1589S @r{Short for first @code{r}, then @code{s} action.}
1449n @r{Normalize the footnotes by collecting all definitions (including} 1590n @r{Normalize the footnotes by collecting all definitions (including}
1450 @r{inline definitions) into a special section, and then numbering them} 1591 @r{inline definitions) into a special section, and then numbering them}
1451 @r{in sequence. The references will then also be numbers. This is} 1592 @r{in sequence. The references will then also be numbers. This is}
@@ -1455,6 +1596,11 @@ n @r{Normalize the footnotes by collecting all definitions (including}
1455d @r{Delete the footnote at point, and all definitions of and references} 1596d @r{Delete the footnote at point, and all definitions of and references}
1456 @r{to it.} 1597 @r{to it.}
1457@end example 1598@end example
1599Depending on the variable @code{org-footnote-auto-adjust}@footnote{the
1600corresponding in-buffer options are @code{fnadjust} and @code{nofnadjust}.},
1601renumbering and sorting footnotes can be automatic after each insertion or
1602deletion.
1603
1458@kindex C-c C-c 1604@kindex C-c C-c
1459@item C-c C-c 1605@item C-c C-c
1460If the cursor is on a footnote reference, jump to the definition. If it is a 1606If the cursor is on a footnote reference, jump to the definition. If it is a
@@ -1463,7 +1609,7 @@ location with a prefix argument, offer the same menu as @kbd{C-c C-x f}.
1463@kindex C-c C-o 1609@kindex C-c C-o
1464@kindex mouse-1 1610@kindex mouse-1
1465@kindex mouse-2 1611@kindex mouse-2
1466@item C-c C-c @r{or} mouse-1/2 1612@item C-c C-o @r{or} mouse-1/2
1467Footnote labels are also links to the corresponding definition/reference, and 1613Footnote labels are also links to the corresponding definition/reference, and
1468you can use the usual commands to follow these links. 1614you can use the usual commands to follow these links.
1469@end table 1615@end table
@@ -1474,22 +1620,24 @@ you can use the usual commands to follow these links.
1474@cindex minor mode for structure editing 1620@cindex minor mode for structure editing
1475 1621
1476If you like the intuitive way the Org mode structure editing and list 1622If you like the intuitive way the Org mode structure editing and list
1477formatting works, you might want to use these commands in other modes 1623formatting works, you might want to use these commands in other modes like
1478like Text mode or Mail mode as well. The minor mode Orgstruct mode 1624Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes
1479makes this possible. You can always toggle the mode with @kbd{M-x 1625this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or
1480orgstruct-mode}. To turn it on by default, for example in Mail mode, 1626turn it on by default, for example in Mail mode, with one of:
1481use
1482 1627
1483@lisp 1628@lisp
1484(add-hook 'mail-mode-hook 'turn-on-orgstruct) 1629(add-hook 'mail-mode-hook 'turn-on-orgstruct)
1630(add-hook 'mail-mode-hook 'turn-on-orgstruct++)
1485@end lisp 1631@end lisp
1486 1632
1487When this mode is active and the cursor is on a line that looks to 1633When this mode is active and the cursor is on a line that looks to Org like a
1488Org like a headline of the first line of a list item, most 1634headline or the first line of a list item, most structure editing commands
1489structure editing commands will work, even if the same keys normally 1635will work, even if the same keys normally have different functionality in the
1490have different functionality in the major mode you are using. If the 1636major mode you are using. If the cursor is not in one of those special
1491cursor is not in one of those special lines, Orgstruct mode lurks 1637lines, Orgstruct mode lurks silently in the shadow. When you use
1492silently in the shadow. 1638@code{orgstruct++-mode}, Org will also export indentation and autofill
1639settings into that mode, and detect item context after the first line of an
1640item.
1493 1641
1494@node Tables, Hyperlinks, Document Structure, Top 1642@node Tables, Hyperlinks, Document Structure, Top
1495@chapter Tables 1643@chapter Tables
@@ -1509,14 +1657,14 @@ calculator).
1509 1657
1510@menu 1658@menu
1511* Built-in table editor:: Simple tables 1659* Built-in table editor:: Simple tables
1512* Narrow columns:: Stop wasting space in tables 1660* Column width and alignment:: Overrule the automatic settings
1513* Column groups:: Grouping to trigger vertical lines 1661* Column groups:: Grouping to trigger vertical lines
1514* Orgtbl mode:: The table editor as minor mode 1662* Orgtbl mode:: The table editor as minor mode
1515* The spreadsheet:: The table editor has spreadsheet capabilities 1663* The spreadsheet:: The table editor has spreadsheet capabilities
1516* Org Plot:: Plotting from org tables 1664* Org-Plot:: Plotting from org tables
1517@end menu 1665@end menu
1518 1666
1519@node Built-in table editor, Narrow columns, Tables, Tables 1667@node Built-in table editor, Column width and alignment, Tables, Tables
1520@section The built-in table editor 1668@section The built-in table editor
1521@cindex table editor, built-in 1669@cindex table editor, built-in
1522 1670
@@ -1550,6 +1698,8 @@ create the above table, you would only type
1550fields. Even faster would be to type @code{|Name|Phone|Age} followed by 1698fields. Even faster would be to type @code{|Name|Phone|Age} followed by
1551@kbd{C-c @key{RET}}. 1699@kbd{C-c @key{RET}}.
1552 1700
1701@vindex org-enable-table-editor
1702@vindex org-table-auto-blank-field
1553When typing text into a field, Org treats @key{DEL}, 1703When typing text into a field, Org treats @key{DEL},
1554@key{Backspace}, and all character keys in a special way, so that 1704@key{Backspace}, and all character keys in a special way, so that
1555inserting and deleting avoids shifting other fields. Also, when 1705inserting and deleting avoids shifting other fields. Also, when
@@ -1594,6 +1744,13 @@ Re-align, move to previous field.
1594Re-align the table and move down to next row. Creates a new row if 1744Re-align the table and move down to next row. Creates a new row if
1595necessary. At the beginning or end of a line, @key{RET} still does 1745necessary. At the beginning or end of a line, @key{RET} still does
1596NEWLINE, so it can be used to split a table. 1746NEWLINE, so it can be used to split a table.
1747@c
1748@kindex M-a
1749@item M-a
1750Move to beginning of the current table field, or on to the previous field.
1751@kindex M-e
1752@item M-e
1753Move to end of the current table field, or on to the next field.
1597 1754
1598@tsubheading{Column and row editing} 1755@tsubheading{Column and row editing}
1599@kindex M-@key{left} 1756@kindex M-@key{left}
@@ -1650,9 +1807,9 @@ argument, alphabetic sorting will be case-sensitive.
1650@tsubheading{Regions} 1807@tsubheading{Regions}
1651@kindex C-c C-x M-w 1808@kindex C-c C-x M-w
1652@item C-c C-x M-w 1809@item C-c C-x M-w
1653Copy a rectangular region from a table to a special clipboard. Point 1810Copy a rectangular region from a table to a special clipboard. Point and
1654and mark determine edge fields of the rectangle. The process ignores 1811mark determine edge fields of the rectangle. If there is no active region,
1655horizontal separator lines. 1812copy just the current field. The process ignores horizontal separator lines.
1656@c 1813@c
1657@kindex C-c C-x C-w 1814@kindex C-c C-x C-w
1658@item C-c C-x C-w 1815@item C-c C-x C-w
@@ -1683,7 +1840,7 @@ field is made blank, and the content is appended to the field above.
1683@cindex calculations, in tables 1840@cindex calculations, in tables
1684@cindex region, active 1841@cindex region, active
1685@cindex active region 1842@cindex active region
1686@cindex Transient mark mode 1843@cindex transient mark mode
1687@kindex C-c + 1844@kindex C-c +
1688@item C-c + 1845@item C-c +
1689Sum the numbers in the current column, or in the rectangle defined by 1846Sum the numbers in the current column, or in the rectangle defined by
@@ -1692,24 +1849,26 @@ be inserted with @kbd{C-y}.
1692@c 1849@c
1693@kindex S-@key{RET} 1850@kindex S-@key{RET}
1694@item S-@key{RET} 1851@item S-@key{RET}
1852@vindex org-table-copy-increment
1695When current field is empty, copy from first non-empty field above. When not 1853When current field is empty, copy from first non-empty field above. When not
1696empty, copy current field down to next row and move cursor along with it. 1854empty, copy current field down to next row and move cursor along with it.
1697Depending on the variable @code{org-table-copy-increment}, integer field 1855Depending on the variable @code{org-table-copy-increment}, integer field
1698values will be incremented during copy. Integers that are too large will not 1856values will be incremented during copy. Integers that are too large will not
1699be incremented. Also, a @code{0} prefix argument temporarily disables the 1857be incremented. Also, a @code{0} prefix argument temporarily disables the
1700increment. This key is also used by CUA mode (@pxref{Cooperation}). 1858increment. This key is also used by shift-selection and related modes
1859(@pxref{Conflicts}).
1701 1860
1702@tsubheading{Miscellaneous} 1861@tsubheading{Miscellaneous}
1703@kindex C-c ` 1862@kindex C-c `
1704@item C-c ` 1863@item C-c `
1705Edit the current field in a separate window. This is useful for fields 1864Edit the current field in a separate window. This is useful for fields that
1706that are not fully visible (@pxref{Narrow columns}). When called with a 1865are not fully visible (@pxref{Column width and alignment}). When called with
1707@kbd{C-u} prefix, just make the full field visible, so that it can be 1866a @kbd{C-u} prefix, just make the full field visible, so that it can be
1708edited in place. 1867edited in place.
1709@c 1868@c
1710@item M-x org-table-import 1869@item M-x org-table-import
1711Import a file as a table. The table should be TAB- or whitespace 1870Import a file as a table. The table should be TAB or whitespace
1712separated. Useful, for example, to import a spreadsheet table or data 1871separated. Use, for example, to import a spreadsheet table or data
1713from a database, because these programs generally can write 1872from a database, because these programs generally can write
1714TAB-separated text files. This command works by inserting the file into 1873TAB-separated text files. This command works by inserting the file into
1715the buffer and then converting the region to a table. Any prefix 1874the buffer and then converting the region to a table. Any prefix
@@ -1721,14 +1880,15 @@ buffer, selecting the pasted text with @kbd{C-x C-x} and then using the
1721@kbd{C-c |} command (see above under @i{Creation and conversion}). 1880@kbd{C-c |} command (see above under @i{Creation and conversion}).
1722@c 1881@c
1723@item M-x org-table-export 1882@item M-x org-table-export
1724Export the table, by default as a TAB-separated file. Useful for data 1883@vindex org-table-export-default-format
1884Export the table, by default as a TAB-separated file. Use for data
1725exchange with, for example, spreadsheet or database programs. The format 1885exchange with, for example, spreadsheet or database programs. The format
1726used to export the file can be configured in the variable 1886used to export the file can be configured in the variable
1727@code{org-table-export-default-format}. You may also use properties 1887@code{org-table-export-default-format}. You may also use properties
1728@code{TABLE_EXPORT_FILE} and @code{TABLE_EXPORT_FORMAT} to specify the file 1888@code{TABLE_EXPORT_FILE} and @code{TABLE_EXPORT_FORMAT} to specify the file
1729name and the format for table export in a subtree. Org supports quite 1889name and the format for table export in a subtree. Org supports quite
1730general formats for exported tables. The exporter format is the same as the 1890general formats for exported tables. The exporter format is the same as the
1731format used by Orgtbl radio tables, see @ref{Translator functions} for a 1891format used by Orgtbl radio tables, see @ref{Translator functions}, for a
1732detailed description. 1892detailed description.
1733@end table 1893@end table
1734 1894
@@ -1743,11 +1903,15 @@ it off with
1743@noindent Then the only table command that still works is 1903@noindent Then the only table command that still works is
1744@kbd{C-c C-c} to do a manual re-align. 1904@kbd{C-c C-c} to do a manual re-align.
1745 1905
1746@node Narrow columns, Column groups, Built-in table editor, Tables 1906@node Column width and alignment, Column groups, Built-in table editor, Tables
1747@section Narrow columns 1907@section Column width and alignment
1748@cindex narrow columns in tables 1908@cindex narrow columns in tables
1909@cindex alignment in tables
1910
1911The width of columns is automatically determined by the table editor. And
1912also the alignment of a column is determined automatically from the fraction
1913of number-like versus non-number fields in the column.
1749 1914
1750The width of columns is automatically determined by the table editor.
1751Sometimes a single field or a few fields need to carry more text, 1915Sometimes a single field or a few fields need to carry more text,
1752leading to inconveniently wide columns. To limit@footnote{This feature 1916leading to inconveniently wide columns. To limit@footnote{This feature
1753does not work on XEmacs.} the width of a column, one field anywhere in 1917does not work on XEmacs.} the width of a column, one field anywhere in
@@ -1771,12 +1935,13 @@ value.
1771@noindent 1935@noindent
1772Fields that are wider become clipped and end in the string @samp{=>}. 1936Fields that are wider become clipped and end in the string @samp{=>}.
1773Note that the full text is still in the buffer, it is only invisible. 1937Note that the full text is still in the buffer, it is only invisible.
1774To see the full text, hold the mouse over the field - a tool-tip window 1938To see the full text, hold the mouse over the field---a tool-tip window
1775will show the full content. To edit such a field, use the command 1939will show the full content. To edit such a field, use the command
1776@kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will 1940@kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will
1777open a new window with the full field. Edit it and finish with @kbd{C-c 1941open a new window with the full field. Edit it and finish with @kbd{C-c
1778C-c}. 1942C-c}.
1779 1943
1944@vindex org-startup-align-all-tables
1780When visiting a file containing a table with narrowed columns, the 1945When visiting a file containing a table with narrowed columns, the
1781necessary character hiding has not yet happened, and the table needs to 1946necessary character hiding has not yet happened, and the table needs to
1782be aligned before it looks nice. Setting the option 1947be aligned before it looks nice. Setting the option
@@ -1789,7 +1954,12 @@ on a per-file basis with:
1789#+STARTUP: noalign 1954#+STARTUP: noalign
1790@end example 1955@end example
1791 1956
1792@node Column groups, Orgtbl mode, Narrow columns, Tables 1957If you would like to overrule the automatic alignment of number-rich columns
1958to the right and of string-rich column to the left, you and use @samp{<r>} or
1959@samp{<l>} in a similar fashion. You may also combine alignment and field
1960width like this: @samp{<l10>}.
1961
1962@node Column groups, Orgtbl mode, Column width and alignment, Tables
1793@section Column groups 1963@section Column groups
1794@cindex grouping columns in tables 1964@cindex grouping columns in tables
1795 1965
@@ -1845,7 +2015,7 @@ construct La@TeX{} tables with the underlying ease and power of
1845Orgtbl mode, including spreadsheet capabilities. For details, see 2015Orgtbl mode, including spreadsheet capabilities. For details, see
1846@ref{Tables in arbitrary syntax}. 2016@ref{Tables in arbitrary syntax}.
1847 2017
1848@node The spreadsheet, Org Plot, Orgtbl mode, Tables 2018@node The spreadsheet, Org-Plot, Orgtbl mode, Tables
1849@section The spreadsheet 2019@section The spreadsheet
1850@cindex calculations, in tables 2020@cindex calculations, in tables
1851@cindex spreadsheet capabilities 2021@cindex spreadsheet capabilities
@@ -1894,26 +2064,24 @@ combination like @code{B3}, meaning the 2nd field in the 3rd row.
1894@noindent 2064@noindent
1895Org also uses another, more general operator that looks like this: 2065Org also uses another, more general operator that looks like this:
1896@example 2066@example
1897@@row$column 2067@@@var{row}$@var{column}
1898@end example 2068@end example
1899 2069
1900@noindent 2070@noindent
1901Column references can be absolute like @samp{1}, @samp{2},...@samp{N}, 2071Column references can be absolute like @samp{1}, @samp{2},...@samp{@var{N}},
1902or relative to the current column like @samp{+1} or @samp{-2}. 2072or relative to the current column like @samp{+1} or @samp{-2}.
1903 2073
1904The row specification only counts data lines and ignores horizontal 2074The row specification only counts data lines and ignores horizontal
1905separator lines (hlines). You can use absolute row numbers 2075separator lines (hlines). You can use absolute row numbers
1906@samp{1}...@samp{N}, and row numbers relative to the current row like 2076@samp{1}...@samp{@var{N}}, and row numbers relative to the current row like
1907@samp{+3} or @samp{-1}. Or specify the row relative to one of the 2077@samp{+3} or @samp{-1}. Or specify the row relative to one of the
1908hlines: @samp{I} refers to the first hline@footnote{Note that only 2078hlines: @samp{I} refers to the first hline@footnote{Note that only
1909hlines are counted that @emph{separate} table lines. If the table 2079hlines are counted that @emph{separate} table lines. If the table
1910starts with a hline above the header, it does not count.}, @samp{II} to 2080starts with a hline above the header, it does not count.}, @samp{II} to
1911the second etc. @samp{-I} refers to the first such line above the 2081the second, etc@. @samp{-I} refers to the first such line above the
1912current line, @samp{+I} to the first such line below the current line. 2082current line, @samp{+I} to the first such line below the current line.
1913You can also write @samp{III+2} which is the second data line after the 2083You can also write @samp{III+2} which is the second data line after the
1914third hline in the table. Relative row numbers like @samp{-3} will not 2084third hline in the table.
1915cross hlines if the current line is too close to the hline. Instead,
1916the value directly at the hline is used.
1917 2085
1918@samp{0} refers to the current row and column. Also, if you omit 2086@samp{0} refers to the current row and column. Also, if you omit
1919either the column or the row part of the reference, the current 2087either the column or the row part of the reference, the current
@@ -1926,8 +2094,8 @@ Org's references with @emph{signed} numbers are floating
1926references because the same reference operator can reference different 2094references because the same reference operator can reference different
1927fields depending on the field being calculated by the formula. 2095fields depending on the field being calculated by the formula.
1928 2096
1929As a special case references like @samp{$LR5} and @samp{$LR12} can be used to 2097As a special case, references like @samp{$LR5} and @samp{$LR12} can be used
1930refer in a stable way to the 5th and 12th field in the last row of the 2098to refer in a stable way to the 5th and 12th field in the last row of the
1931table. 2099table.
1932 2100
1933Here are a few examples: 2101Here are a few examples:
@@ -1972,7 +2140,9 @@ see the @samp{E} mode switch below). If there are no non-empty fields,
1972@cindex references, named 2140@cindex references, named
1973@cindex name, of column or field 2141@cindex name, of column or field
1974@cindex constants, in calculations 2142@cindex constants, in calculations
2143@cindex #+CONSTANTS
1975 2144
2145@vindex org-table-formula-constants
1976@samp{$name} is interpreted as the name of a column, parameter or 2146@samp{$name} is interpreted as the name of a column, parameter or
1977constant. Constants are defined globally through the variable 2147constant. Constants are defined globally through the variable
1978@code{org-table-formula-constants}, and locally (for the file) through a 2148@code{org-table-formula-constants}, and locally (for the file) through a
@@ -1983,13 +2153,15 @@ line like
1983@end example 2153@end example
1984 2154
1985@noindent 2155@noindent
2156@vindex constants-unit-system
2157@pindex constants.el
1986Also properties (@pxref{Properties and Columns}) can be used as 2158Also properties (@pxref{Properties and Columns}) can be used as
1987constants in table formulas: For a property @samp{:Xyz:} use the name 2159constants in table formulas: for a property @samp{:Xyz:} use the name
1988@samp{$PROP_Xyz}, and the property will be searched in the current 2160@samp{$PROP_Xyz}, and the property will be searched in the current
1989outline entry and in the hierarchy above it. If you have the 2161outline entry and in the hierarchy above it. If you have the
1990@file{constants.el} package, it will also be used to resolve constants, 2162@file{constants.el} package, it will also be used to resolve constants,
1991including natural constants like @samp{$h} for Planck's constant, and 2163including natural constants like @samp{$h} for Planck's constant, and
1992units like @samp{$km} for kilometers@footnote{@file{Constant.el} can 2164units like @samp{$km} for kilometers@footnote{@file{constants.el} can
1993supply the values of constants in two different unit systems, @code{SI} 2165supply the values of constants in two different unit systems, @code{SI}
1994and @code{cgs}. Which one is used depends on the value of the variable 2166and @code{cgs}. Which one is used depends on the value of the variable
1995@code{constants-unit-system}. You can use the @code{#+STARTUP} options 2167@code{constants-unit-system}. You can use the @code{#+STARTUP} options
@@ -2005,6 +2177,7 @@ numbers.
2005@cindex references, to a different table 2177@cindex references, to a different table
2006@cindex name, of column or field 2178@cindex name, of column or field
2007@cindex constants, in calculations 2179@cindex constants, in calculations
2180@cindex #+TBLNAME
2008 2181
2009You may also reference constants, fields and ranges from a different table, 2182You may also reference constants, fields and ranges from a different table,
2010either in the current file or even in a different file. The syntax is 2183either in the current file or even in a different file. The syntax is
@@ -2018,7 +2191,8 @@ where NAME can be the name of a table in the current file as set by a
2018@code{#+TBLNAME: NAME} line before the table. It can also be the ID of an 2191@code{#+TBLNAME: NAME} line before the table. It can also be the ID of an
2019entry, even in a different file, and the reference then refers to the first 2192entry, even in a different file, and the reference then refers to the first
2020table in that entry. REF is an absolute field or range reference as 2193table in that entry. REF is an absolute field or range reference as
2021described above, valid in the referenced table. 2194described above for example @code{@@3$3} or @code{$somename}, valid in the
2195referenced table.
2022 2196
2023@node Formula syntax for Calc, Formula syntax for Lisp, References, The spreadsheet 2197@node Formula syntax for Calc, Formula syntax for Lisp, References, The spreadsheet
2024@subsection Formula syntax for Calc 2198@subsection Formula syntax for Calc
@@ -2040,11 +2214,12 @@ like @samp{vmean} and @samp{vsum}.
2040 2214
2041@cindex format specifier 2215@cindex format specifier
2042@cindex mode, for @file{calc} 2216@cindex mode, for @file{calc}
2217@vindex org-calc-default-modes
2043A formula can contain an optional mode string after a semicolon. This 2218A formula can contain an optional mode string after a semicolon. This
2044string consists of flags to influence Calc and other modes during 2219string consists of flags to influence Calc and other modes during
2045execution. By default, Org uses the standard Calc modes (precision 2220execution. By default, Org uses the standard Calc modes (precision
204612, angular units degrees, fraction and symbolic modes off). The display 222112, angular units degrees, fraction and symbolic modes off). The display
2047format, however, has been changed to @code{(float 5)} to keep tables 2222format, however, has been changed to @code{(float 8)} to keep tables
2048compact. The default settings can be configured using the variable 2223compact. The default settings can be configured using the variable
2049@code{org-calc-default-modes}. 2224@code{org-calc-default-modes}.
2050 2225
@@ -2056,6 +2231,7 @@ F S @r{fraction and symbolic modes}
2056N @r{interpret all fields as numbers, use 0 for non-numbers} 2231N @r{interpret all fields as numbers, use 0 for non-numbers}
2057T @r{force text interpretation} 2232T @r{force text interpretation}
2058E @r{keep empty fields in ranges} 2233E @r{keep empty fields in ranges}
2234L @r{literal}
2059@end example 2235@end example
2060 2236
2061@noindent 2237@noindent
@@ -2088,22 +2264,22 @@ if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty}
2088 2264
2089It is also possible to write a formula in Emacs Lisp; this can be useful 2265It is also possible to write a formula in Emacs Lisp; this can be useful
2090for string manipulation and control structures, if Calc's 2266for string manipulation and control structures, if Calc's
2091functionality is not enough. If a formula starts with a single quote 2267functionality is not enough. If a formula starts with a single-quote
2092followed by an opening parenthesis, then it is evaluated as a lisp form. 2268followed by an opening parenthesis, then it is evaluated as a Lisp form.
2093The evaluation should return either a string or a number. Just as with 2269The evaluation should return either a string or a number. Just as with
2094@file{calc} formulas, you can specify modes and a printf format after a 2270@file{calc} formulas, you can specify modes and a printf format after a
2095semicolon. With Emacs Lisp forms, you need to be conscious about the way 2271semicolon. With Emacs Lisp forms, you need to be conscious about the way
2096field references are interpolated into the form. By default, a 2272field references are interpolated into the form. By default, a
2097reference will be interpolated as a Lisp string (in double quotes) 2273reference will be interpolated as a Lisp string (in double-quotes)
2098containing the field. If you provide the @samp{N} mode switch, all 2274containing the field. If you provide the @samp{N} mode switch, all
2099referenced elements will be numbers (non-number fields will be zero) and 2275referenced elements will be numbers (non-number fields will be zero) and
2100interpolated as Lisp numbers, without quotes. If you provide the 2276interpolated as Lisp numbers, without quotes. If you provide the
2101@samp{L} flag, all fields will be interpolated literally, without quotes. 2277@samp{L} flag, all fields will be interpolated literally, without quotes.
2102I.e., if you want a reference to be interpreted as a string by the Lisp 2278@Ie{}, if you want a reference to be interpreted as a string by the Lisp
2103form, enclose the reference operator itself in double quotes, like 2279form, enclose the reference operator itself in double-quotes, like
2104@code{"$3"}. Ranges are inserted as space-separated fields, so you can 2280@code{"$3"}. Ranges are inserted as space-separated fields, so you can
2105embed them in list or vector syntax. A few examples, note how the 2281embed them in list or vector syntax. A few examples, note how the
2106@samp{N} mode is used when we do computations in lisp. 2282@samp{N} mode is used when we do computations in Lisp.
2107 2283
2108@example 2284@example
2109@r{Swap the first two characters of the content of column 1} 2285@r{Swap the first two characters of the content of column 1}
@@ -2125,15 +2301,16 @@ press @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in
2125the field, the formula will be stored as the formula for this field, 2301the field, the formula will be stored as the formula for this field,
2126evaluated, and the current field replaced with the result. 2302evaluated, and the current field replaced with the result.
2127 2303
2304@cindex #+TBLFM
2128Formulas are stored in a special line starting with @samp{#+TBLFM:} 2305Formulas are stored in a special line starting with @samp{#+TBLFM:}
2129directly below the table. If you typed the equation in the 4th field of 2306directly below the table. If you typed the equation in the 4th field of
2130the 3rd data line in the table, the formula will look like 2307the 3rd data line in the table, the formula will look like
2131@samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows 2308@samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows
2132with the appropriate commands, @i{absolute references} (but not relative 2309with the appropriate commands, @i{absolute references} (but not relative
2133ones) in stored formulas are modified in order to still reference the 2310ones) in stored formulas are modified in order to still reference the
2134same field. Of cause this is not true if you edit the table structure 2311same field. Of course this is not true if you edit the table structure
2135with normal editing commands - then you must fix the equations yourself. 2312with normal editing commands---then you must fix the equations yourself.
2136The left hand side of a formula may also be a named field (@pxref{Advanced 2313The left-hand side of a formula may also be a named field (@pxref{Advanced
2137features}), or a last-row reference like @samp{$LR3}. 2314features}), or a last-row reference like @samp{$LR3}.
2138 2315
2139Instead of typing an equation into the field, you may also use the 2316Instead of typing an equation into the field, you may also use the
@@ -2143,8 +2320,8 @@ following command
2143@kindex C-u C-c = 2320@kindex C-u C-c =
2144@item C-u C-c = 2321@item C-u C-c =
2145Install a new formula for the current field. The command prompts for a 2322Install a new formula for the current field. The command prompts for a
2146formula, with default taken from the @samp{#+TBLFM:} line, applies 2323formula with default taken from the @samp{#+TBLFM:} line, applies
2147it to the current field and stores it. 2324it to the current field, and stores it.
2148@end table 2325@end table
2149 2326
2150@node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet 2327@node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet
@@ -2154,20 +2331,21 @@ it to the current field and stores it.
2154 2331
2155Often in a table, the same formula should be used for all fields in a 2332Often in a table, the same formula should be used for all fields in a
2156particular column. Instead of having to copy the formula to all fields 2333particular column. Instead of having to copy the formula to all fields
2157in that column, Org allows to assign a single formula to an entire 2334in that column, Org allows you to assign a single formula to an entire
2158column. If the table contains horizontal separator hlines, everything 2335column. If the table contains horizontal separator hlines, everything
2159before the first such line is considered part of the table @emph{header} 2336before the first such line is considered part of the table @emph{header}
2160and will not be modified by column formulas. 2337and will not be modified by column formulas.
2161 2338
2162To assign a formula to a column, type it directly into any field in the 2339To assign a formula to a column, type it directly into any field in the
2163column, preceded by an equal sign, like @samp{=$1+$2}. When you press 2340column, preceded by an equal sign, like @samp{=$1+$2}. When you press
2164@key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the 2341@key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the field,
2165field, the formula will be stored as the formula for the current column, 2342the formula will be stored as the formula for the current column, evaluated
2166evaluated and the current field replaced with the result. If the field 2343and the current field replaced with the result. If the field contains only
2167contains only @samp{=}, the previously stored formula for this column is 2344@samp{=}, the previously stored formula for this column is used. For each
2168used. For each column, Org will only remember the most recently 2345column, Org will only remember the most recently used formula. In the
2169used formula. In the @samp{TBLFM:} line, column formulas will look like 2346@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The left-hand
2170@samp{$4=$1+$2}. 2347side of a column formula cannot currently be the name of column, it
2348must be the numeric column reference.
2171 2349
2172Instead of typing an equation into the field, you may also use the 2350Instead of typing an equation into the field, you may also use the
2173following command: 2351following command:
@@ -2178,7 +2356,7 @@ following command:
2178Install a new formula for the current column and replace current field with 2356Install a new formula for the current column and replace current field with
2179the result of the formula. The command prompts for a formula, with default 2357the result of the formula. The command prompts for a formula, with default
2180taken from the @samp{#+TBLFM} line, applies it to the current field and 2358taken from the @samp{#+TBLFM} line, applies it to the current field and
2181stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command 2359stores it. With a numeric prefix argument(@eg @kbd{C-5 C-c =}) the command
2182will apply it to that many consecutive fields in the current column. 2360will apply it to that many consecutive fields in the current column.
2183@end table 2361@end table
2184 2362
@@ -2187,6 +2365,7 @@ will apply it to that many consecutive fields in the current column.
2187@cindex formula editing 2365@cindex formula editing
2188@cindex editing, of table formulas 2366@cindex editing, of table formulas
2189 2367
2368@vindex org-table-use-standard-references
2190You can edit individual formulas in the minibuffer or directly in the 2369You can edit individual formulas in the minibuffer or directly in the
2191field. Org can also prepare a special buffer with all active 2370field. Org can also prepare a special buffer with all active
2192formulas of a table. When offering a formula for editing, Org 2371formulas of a table. When offering a formula for editing, Org
@@ -2201,7 +2380,7 @@ if possible. If you prefer to only work with the internal format (like
2201@item C-c = 2380@item C-c =
2202@itemx C-u C-c = 2381@itemx C-u C-c =
2203Edit the formula associated with the current column/field in the 2382Edit the formula associated with the current column/field in the
2204minibuffer. See @ref{Column formulas} and @ref{Field formulas}. 2383minibuffer. See @ref{Column formulas}, and @ref{Field formulas}.
2205@kindex C-u C-u C-c = 2384@kindex C-u C-u C-c =
2206@item C-u C-u C-c = 2385@item C-u C-u C-c =
2207Re-insert the active formula (either a 2386Re-insert the active formula (either a
@@ -2215,7 +2394,7 @@ referenced by the reference at the cursor position in the formula.
2215@kindex C-c @} 2394@kindex C-c @}
2216@item C-c @} 2395@item C-c @}
2217Toggle the display of row and column numbers for a table, using 2396Toggle the display of row and column numbers for a table, using
2218overlays. These are updated each time the table is aligned, you can 2397overlays. These are updated each time the table is aligned; you can
2219force it with @kbd{C-c C-c}. 2398force it with @kbd{C-c C-c}.
2220@kindex C-c @{ 2399@kindex C-c @{
2221@item C-c @{ 2400@item C-c @{
@@ -2244,13 +2423,13 @@ Toggle all references in the formula editor between standard (like
2244@code{B3}) and internal (like @code{@@3$2}). 2423@code{B3}) and internal (like @code{@@3$2}).
2245@kindex @key{TAB} 2424@kindex @key{TAB}
2246@item @key{TAB} 2425@item @key{TAB}
2247Pretty-print or indent lisp formula at point. When in a line containing 2426Pretty-print or indent Lisp formula at point. When in a line containing
2248a lisp formula, format the formula according to Emacs Lisp rules. 2427a Lisp formula, format the formula according to Emacs Lisp rules.
2249Another @key{TAB} collapses the formula back again. In the open 2428Another @key{TAB} collapses the formula back again. In the open
2250formula, @key{TAB} re-indents just like in Emacs lisp mode. 2429formula, @key{TAB} re-indents just like in Emacs Lisp mode.
2251@kindex M-@key{TAB} 2430@kindex M-@key{TAB}
2252@item M-@key{TAB} 2431@item M-@key{TAB}
2253Complete Lisp symbols, just like in Emacs lisp mode. 2432Complete Lisp symbols, just like in Emacs Lisp mode.
2254@kindex S-@key{up} 2433@kindex S-@key{up}
2255@kindex S-@key{down} 2434@kindex S-@key{down}
2256@kindex S-@key{left} 2435@kindex S-@key{left}
@@ -2258,7 +2437,7 @@ Complete Lisp symbols, just like in Emacs lisp mode.
2258@item S-@key{up}/@key{down}/@key{left}/@key{right} 2437@item S-@key{up}/@key{down}/@key{left}/@key{right}
2259Shift the reference at point. For example, if the reference is 2438Shift the reference at point. For example, if the reference is
2260@code{B3} and you press @kbd{S-@key{right}}, it will become @code{C3}. 2439@code{B3} and you press @kbd{S-@key{right}}, it will become @code{C3}.
2261This also works for relative references, and for hline references. 2440This also works for relative references and for hline references.
2262@kindex M-S-@key{up} 2441@kindex M-S-@key{up}
2263@kindex M-S-@key{down} 2442@kindex M-S-@key{down}
2264@item M-S-@key{up}/@key{down} 2443@item M-S-@key{up}/@key{down}
@@ -2275,14 +2454,14 @@ Turn the coordinate grid in the table on and off.
2275@end table 2454@end table
2276 2455
2277Making a table field blank does not remove the formula associated with 2456Making a table field blank does not remove the formula associated with
2278the field, because that is stored in a different line (the @samp{TBLFM} 2457the field, because that is stored in a different line (the @samp{#+TBLFM}
2279line) - during the next recalculation the field will be filled again. 2458line)---during the next recalculation the field will be filled again.
2280To remove a formula from a field, you have to give an empty reply when 2459To remove a formula from a field, you have to give an empty reply when
2281prompted for the formula, or to edit the @samp{#+TBLFM} line. 2460prompted for the formula, or to edit the @samp{#+TBLFM} line.
2282 2461
2283@kindex C-c C-c 2462@kindex C-c C-c
2284You may edit the @samp{#+TBLFM} directly and re-apply the changed 2463You may edit the @samp{#+TBLFM} directly and re-apply the changed
2285equations with @kbd{C-c C-c} in that line, or with the normal 2464equations with @kbd{C-c C-c} in that line or with the normal
2286recalculation commands in the table. 2465recalculation commands in the table.
2287 2466
2288@subsubheading Debugging formulas 2467@subsubheading Debugging formulas
@@ -2301,8 +2480,8 @@ field. Detailed information will be displayed.
2301@cindex updating, table 2480@cindex updating, table
2302 2481
2303Recalculation of a table is normally not automatic, but needs to be 2482Recalculation of a table is normally not automatic, but needs to be
2304triggered by a command. See @ref{Advanced features} for a way to make 2483triggered by a command. See @ref{Advanced features}, for a way to make
2305recalculation at least semi-automatically. 2484recalculation at least semi-automatic.
2306 2485
2307In order to recalculate a line of a table or the entire table, use the 2486In order to recalculate a line of a table or the entire table, use the
2308following commands: 2487following commands:
@@ -2366,7 +2545,7 @@ makes use of these features:
2366@end group 2545@end group
2367@end example 2546@end example
2368 2547
2369@noindent @b{Important}: Please note that for these special tables, 2548@noindent @b{Important}: please note that for these special tables,
2370recalculating the table with @kbd{C-u C-c *} will only affect rows that 2549recalculating the table with @kbd{C-u C-c *} will only affect rows that
2371are marked @samp{#} or @samp{*}, and fields that have a formula assigned 2550are marked @samp{#} or @samp{*}, and fields that have a formula assigned
2372to the field itself. The column formulas are not applied in rows with 2551to the field itself. The column formulas are not applied in rows with
@@ -2410,8 +2589,8 @@ Do not export this line. Useful for lines that contain the narrowing
2410@samp{<N>} markers. 2589@samp{<N>} markers.
2411@end table 2590@end table
2412 2591
2413Finally, just to whet your appetite on what can be done with the 2592Finally, just to whet your appetite for what can be done with the
2414fantastic @file{calc} package, here is a table that computes the Taylor 2593fantastic @file{calc.el} package, here is a table that computes the Taylor
2415series of degree @code{n} at location @code{x} for a couple of 2594series of degree @code{n} at location @code{x} for a couple of
2416functions. 2595functions.
2417 2596
@@ -2431,16 +2610,16 @@ functions.
2431@end group 2610@end group
2432@end example 2611@end example
2433 2612
2434@page 2613@node Org-Plot, , The spreadsheet, Tables
2435@node Org Plot, , The spreadsheet, Tables 2614@section Org-Plot
2436@section Org Plot
2437@cindex graph, in tables 2615@cindex graph, in tables
2438@cindex plot tables using gnuplot 2616@cindex plot tables using gnuplot
2617@cindex #+PLOT
2439 2618
2440Org Plot can produce 2D and 3D graphs of information stored in org tables 2619Org-Plot can produce 2D and 3D graphs of information stored in org tables
2441using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode} 2620using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode}
2442@uref{http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html}. To see 2621@uref{http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html}. To see
2443this in action ensure that you have both Gnuplot and Gnuplot-mode installed 2622this in action, ensure that you have both Gnuplot and Gnuplot mode installed
2444on your system, then call @code{org-plot/gnuplot} on the following table. 2623on your system, then call @code{org-plot/gnuplot} on the following table.
2445 2624
2446@example 2625@example
@@ -2456,18 +2635,18 @@ on your system, then call @code{org-plot/gnuplot} on the following table.
2456@end group 2635@end group
2457@end example 2636@end example
2458 2637
2459Notice that Org Plot is smart enough to apply the tables headers as labels. 2638Notice that Org Plot is smart enough to apply the table's headers as labels.
2460Further control over the labels, type, content, and appearance of plots can 2639Further control over the labels, type, content, and appearance of plots can
2461be exercised through the @code{#+Plot:} lines preceding a table. See below 2640be exercised through the @code{#+PLOT:} lines preceding a table. See below
2462for a complete list of Org plot options. For more information and examples 2641for a complete list of Org-plot options. For more information and examples
2463see the org-plot tutorial at 2642see the Org-plot tutorial at
2464@uref{http://orgmode.org/worg/org-tutorials/org-plot.php}. 2643@uref{http://orgmode.org/worg/org-tutorials/org-plot.php}.
2465 2644
2466@subsubheading Plot Options 2645@subsubheading Plot Options
2467 2646
2468@table @code 2647@table @code
2469@item set 2648@item set
2470Specify any @file{gnuplot} option to be set when graphing. 2649Specify any @command{gnuplot} option to be set when graphing.
2471 2650
2472@item title 2651@item title
2473Specify the title of the plot. 2652Specify the title of the plot.
@@ -2476,9 +2655,9 @@ Specify the title of the plot.
2476Specify which column of the table to use as the @code{x} axis. 2655Specify which column of the table to use as the @code{x} axis.
2477 2656
2478@item deps 2657@item deps
2479Specify the columns to graph as a lisp style list, surrounded by parenthesis 2658Specify the columns to graph as a Lisp style list, surrounded by parentheses
2480and separated by spaces for example @code{dep:(3 4)} to graph the third and 2659and separated by spaces for example @code{dep:(3 4)} to graph the third and
2481fourth columns (defaults to graphing all other columns aside from the ind 2660fourth columns (defaults to graphing all other columns aside from the @code{ind}
2482column). 2661column).
2483 2662
2484@item type 2663@item type
@@ -2486,32 +2665,32 @@ Specify whether the plot will be @code{2d}, @code{3d}, or @code{grid}.
2486 2665
2487@item with 2666@item with
2488Specify a @code{with} option to be inserted for every col being plotted 2667Specify a @code{with} option to be inserted for every col being plotted
2489(e.g. @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). 2668(@eg @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...).
2490Defaults to @code{lines}. 2669Defaults to @code{lines}.
2491 2670
2492@item file 2671@item file
2493If you want to plot to a file specify the @code{"path/to/desired/output-file"}. 2672If you want to plot to a file, specify @code{"@var{path/to/desired/output-file}"}.
2494 2673
2495@item labels 2674@item labels
2496List of labels to be used for the deps (defaults to column headers if they 2675List of labels to be used for the deps (defaults to the column headers if
2497exist). 2676they exist).
2498 2677
2499@item line 2678@item line
2500Specify an entire line to be inserted in the gnuplot script. 2679Specify an entire line to be inserted in the Gnuplot script.
2501 2680
2502@item map 2681@item map
2503When plotting @code{3d} or @code{grid} types, set this to @code{t} to graph a 2682When plotting @code{3d} or @code{grid} types, set this to @code{t} to graph a
2504flat mapping rather than a @code{3d} slope. 2683flat mapping rather than a @code{3d} slope.
2505 2684
2506@item timefmt 2685@item timefmt
2507Specify format of org-mode timestamps as they will be parsed by gnuplot. 2686Specify format of Org-mode timestamps as they will be parsed by Gnuplot.
2508Defaults to @samp{%Y-%m-%d-%H:%M:%S}. 2687Defaults to @samp{%Y-%m-%d-%H:%M:%S}.
2509 2688
2510@item script 2689@item script
2511If you want total control you can specify a script file (place the file name 2690If you want total control, you can specify a script file (place the file name
2512between double quotes) which will be used to plot. Before plotting, every 2691between double-quotes) which will be used to plot. Before plotting, every
2513instance of @code{$datafile} in the specified script will be replaced with 2692instance of @code{$datafile} in the specified script will be replaced with
2514the path to the generated data file. Note even if you set this option you 2693the path to the generated data file. Note: even if you set this option, you
2515may still want to specify the plot type, as that can impact the content of 2694may still want to specify the plot type, as that can impact the content of
2516the data file. 2695the data file.
2517@end table 2696@end table
@@ -2546,6 +2725,7 @@ clickable links. The general link format, however, looks like this:
2546[[link][description]] @r{or alternatively} [[link]] 2725[[link][description]] @r{or alternatively} [[link]]
2547@end example 2726@end example
2548 2727
2728@noindent
2549Once a link in the buffer is complete (all brackets present), Org 2729Once a link in the buffer is complete (all brackets present), Org
2550will change the display so that @samp{description} is displayed instead 2730will change the display so that @samp{description} is displayed instead
2551of @samp{[[link][description]]} and @samp{link} is displayed instead of 2731of @samp{[[link][description]]} and @samp{link} is displayed instead of
@@ -2570,14 +2750,24 @@ internal structure of all links, use the menu entry
2570@cindex links, internal 2750@cindex links, internal
2571@cindex targets, for links 2751@cindex targets, for links
2572 2752
2573If the link does not look like a URL, it is considered to be internal in 2753@cindex property, CUSTOM_ID
2574the current file. Links such as @samp{[[My Target]]} or @samp{[[My 2754If the link does not look like a URL, it is considered to be internal in the
2575Target][Find my target]]} lead to a text search in the current file. 2755current file. The most important case is a link like
2576The link can be followed with @kbd{C-c C-o} when the cursor is on the 2756@samp{[[#my-custom-id]]} which will link to the entry with the
2577link, or with a mouse click (@pxref{Handling links}). The preferred 2757@code{CUSTOM_ID} property @samp{my-custom-id}. Such custom IDs are very good
2578match for such a link is a dedicated target: the same string in double 2758for HTML export (@pxref{HTML export}) where they produce pretty section
2579angular brackets. Targets may be located anywhere; sometimes it is 2759links. You are responsible yourself to make sure these custom IDs are unique
2580convenient to put them into a comment line. For example 2760in a file.
2761
2762Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]}
2763lead to a text search in the current file.
2764
2765The link can be followed with @kbd{C-c C-o} when the cursor is on the link,
2766or with a mouse click (@pxref{Handling links}). Links to custom IDs will
2767point to the corresponding headline. The preferred match for a text link is
2768a @i{dedicated target}: the same string in double angular brackets. Targets
2769may be located anywhere; sometimes it is convenient to put them into a
2770comment line. For example
2581 2771
2582@example 2772@example
2583# <<My Target>> 2773# <<My Target>>
@@ -2589,12 +2779,16 @@ text before the first headline is usually not exported, so the first such
2589target should be after the first headline, or in the line directly before the 2779target should be after the first headline, or in the line directly before the
2590first headline.}. 2780first headline.}.
2591 2781
2592If no dedicated target exists, Org will search for the words in the 2782If no dedicated target exists, Org will search for the words in the link. In
2593link. In the above example the search would be for @samp{my target}. 2783the above example the search would be for @samp{my target}. Links starting
2594Links starting with a star like @samp{*My Target} restrict the search to 2784with a star like @samp{*My Target} restrict the search to
2595headlines. When searching, Org mode will first try an exact match, but 2785headlines@footnote{To insert a link targeting a headline, in-buffer
2596then move on to more and more lenient searches. For example, the link 2786completion can be used. Just type a star followed by a few optional letters
2597@samp{[[*My Targets]]} will find any of the following: 2787into the buffer and press @kbd{M-@key{TAB}}. All headlines in the current
2788buffer will be offered as completions. @xref{Handling links}, for more
2789commands creating links.}. When searching, Org mode will first try an
2790exact match, but then move on to more and more lenient searches. For
2791example, the link @samp{[[*My Targets]]} will find any of the following:
2598 2792
2599@example 2793@example
2600** My targets 2794** My targets
@@ -2602,11 +2796,6 @@ then move on to more and more lenient searches. For example, the link
2602** my 20 targets are 2796** my 20 targets are
2603@end example 2797@end example
2604 2798
2605To insert a link targeting a headline, in-buffer completion can be used.
2606Just type a star followed by a few optional letters into the buffer and
2607press @kbd{M-@key{TAB}}. All headlines in the current buffer will be
2608offered as completions. @xref{Handling links}, for more commands
2609creating links.
2610 2799
2611Following a link pushes a mark onto Org's own mark ring. You can 2800Following a link pushes a mark onto Org's own mark ring. You can
2612return to the previous position with @kbd{C-c &}. Using this command 2801return to the previous position with @kbd{C-c &}. Using this command
@@ -2650,7 +2839,7 @@ cursor on or at a target.
2650@cindex USENET links 2839@cindex USENET links
2651@cindex SHELL links 2840@cindex SHELL links
2652@cindex Info links 2841@cindex Info links
2653@cindex elisp links 2842@cindex Elisp links
2654 2843
2655Org supports links to files, websites, Usenet and email messages, 2844Org supports links to files, websites, Usenet and email messages,
2656BBDB database entries and links to both IRC conversations and their 2845BBDB database entries and links to both IRC conversations and their
@@ -2664,9 +2853,9 @@ file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
2664/home/dominik/images/jupiter.jpg @r{same as above} 2853/home/dominik/images/jupiter.jpg @r{same as above}
2665file:papers/last.pdf @r{file, relative path} 2854file:papers/last.pdf @r{file, relative path}
2666./papers/last.pdf @r{same as above} 2855./papers/last.pdf @r{same as above}
2667file:projects.org @r{another org file} 2856file:projects.org @r{another Org file}
2668file:projects.org::some words @r{text search in org file} 2857file:projects.org::some words @r{text search in Org file}
2669file:projects.org::*task title @r{heading search in org file} 2858file:projects.org::*task title @r{heading search in Org file}
2670id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID} 2859id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID}
2671news:comp.emacs @r{Usenet link} 2860news:comp.emacs @r{Usenet link}
2672mailto:adent@@galaxy.net @r{Mail link} 2861mailto:adent@@galaxy.net @r{Mail link}
@@ -2684,7 +2873,7 @@ gnus:group#id @r{Gnus article link}
2684bbdb:R.*Stallman @r{BBDB link (with regexp)} 2873bbdb:R.*Stallman @r{BBDB link (with regexp)}
2685irc:/irc.com/#emacs/bob @r{IRC link} 2874irc:/irc.com/#emacs/bob @r{IRC link}
2686shell:ls *.org @r{A shell command} 2875shell:ls *.org @r{A shell command}
2687elisp:org-agenda @r{Interactive elisp command} 2876elisp:org-agenda @r{Interactive Elisp command}
2688elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} 2877elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate}
2689@end example 2878@end example
2690 2879
@@ -2703,12 +2892,12 @@ button. If there is no description at all and the link points to an
2703image, 2892image,
2704that image will be inlined into the exported HTML file. 2893that image will be inlined into the exported HTML file.
2705 2894
2706@cindex angular brackets, around links 2895@cindex square brackets, around links
2707@cindex plain text external links 2896@cindex plain text external links
2708Org also finds external links in the normal text and activates them 2897Org also finds external links in the normal text and activates them
2709as links. If spaces must be part of the link (for example in 2898as links. If spaces must be part of the link (for example in
2710@samp{bbdb:Richard Stallman}), or if you need to remove ambiguities 2899@samp{bbdb:Richard Stallman}), or if you need to remove ambiguities
2711about the end of the link, enclose them in angular brackets. 2900about the end of the link, enclose them in square brackets.
2712 2901
2713@node Handling links, Using links outside Org, External links, Hyperlinks 2902@node Handling links, Using links outside Org, External links, Hyperlinks
2714@section Handling links 2903@section Handling links
@@ -2724,58 +2913,87 @@ insert it into an Org file, and to follow the link.
2724Store a link to the current location. This is a @emph{global} command (you 2913Store a link to the current location. This is a @emph{global} command (you
2725must create the key binding yourself) which can be used in any buffer to 2914must create the key binding yourself) which can be used in any buffer to
2726create a link. The link will be stored for later insertion into an Org 2915create a link. The link will be stored for later insertion into an Org
2727buffer (see below). 2916buffer (see below). What kind of link will be created depends on the current
2917buffer:
2728 2918
2919@b{Org-mode buffers}@*
2729For Org files, if there is a @samp{<<target>>} at the cursor, the link points 2920For Org files, if there is a @samp{<<target>>} at the cursor, the link points
2730to the target. Otherwise it points to the current headline, either by text 2921to the target. Otherwise it points to the current headline, which will also
2731(unsafe), or, if @file{org-id.el} is loaded and @code{org-link-to-org-use-id} 2922be the description.
2732is set, by ID property. 2923
2733 2924@vindex org-link-to-org-use-id
2734For VM, Rmail, Wanderlust, MH-E, Gnus and BBDB buffers, the link will 2925@cindex property, CUSTOM_ID
2735indicate the current article/entry. For W3 and W3M buffers, the link goes to 2926@cindex property, ID
2736the current URL. For IRC links, if you set the variable 2927If the headline has a @code{CUSTOM_ID} property, a link to this custom ID
2737@code{org-irc-link-to-logs} to non-nil then @kbd{C-c l} will store a 2928will be stored. In addition or alternatively (depending on the value of
2738@samp{file:/} style link to the relevant point in the logs for the current 2929@code{org-link-to-org-use-id}), a globally unique @code{ID} property will be
2739conversation. Otherwise an @samp{irc:/} style link to the user/channel/server 2930created and/or used to construct a link. So using this command in Org
2740under the point will be stored. 2931buffers will potentially create two links: a human-readable from the custom
2741 2932ID, and one that is globally unique and works even if the entry is moved from
2933file to file. Later, when inserting the link, you need to decide which one
2934to use.
2935
2936@b{Email/News clients: VM, Rmail, Wanderlust, MH-E, Gnus}@*
2937Pretty much all Emacs mail clients are supported. The link will point to the
2938current article, or, in some GNUS buffers, to the group. The description is
2939constructed from the author and the subject.
2940
2941@b{Web browsers: W3 and W3M}@*
2942Here the link will be the current URL, with the page title as description.
2943
2944@b{Contacts: BBDB}@*
2945Links created in a BBDB buffer will point to the current entry.
2946
2947@b{Chat: IRC}@*
2948@vindex org-irc-link-to-logs
2949For IRC links, if you set the variable @code{org-irc-link-to-logs} to
2950@code{t}, a @samp{file:/} style link to the relevant point in the logs for
2951the current conversation is created. Otherwise an @samp{irc:/} style link to
2952the user/channel/server under the point will be stored.
2953
2954@b{Other files}@*
2742For any other files, the link will point to the file, with a search string 2955For any other files, the link will point to the file, with a search string
2743(@pxref{Search options}) pointing to the contents of the current line. If 2956(@pxref{Search options}) pointing to the contents of the current line. If
2744there is an active region, the selected words will form the basis of the 2957there is an active region, the selected words will form the basis of the
2745search string. If the automatically created link is not working correctly or 2958search string. If the automatically created link is not working correctly or
2746accurately enough, you can write custom functions to select the search string 2959accurately enough, you can write custom functions to select the search string
2747and to do the search for particular file types - see @ref{Custom searches}. 2960and to do the search for particular file types---see @ref{Custom searches}.
2748The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation}. 2961The key binding @kbd{C-c l} is only a suggestion---see @ref{Installation}.
2749@c 2962@c
2750@kindex C-c C-l 2963@kindex C-c C-l
2751@cindex link completion 2964@cindex link completion
2752@cindex completion, of links 2965@cindex completion, of links
2753@cindex inserting links 2966@cindex inserting links
2754@item C-c C-l 2967@item C-c C-l
2755Insert a link. This prompts for a link to be inserted into the buffer. You 2968@vindex org-keep-stored-link-after-insertion
2756can just type a link, using text for an internal link, or one of the link 2969Insert a link@footnote{ Note that you don't have to use this command to
2757type prefixes mentioned in the examples above. All links stored during the 2970insert a link. Links in Org are plain text, and you can type or paste them
2758current session are part of the history for this prompt, so you can access 2971straight into the buffer. By using this command, the links are automatically
2759them with @key{up} and @key{down} (or @kbd{M-p/n}). Completion, on the other 2972enclosed in double brackets, and you will be asked for the optional
2760hand, will help you to insert valid link prefixes like @samp{http:} or 2973descriptive text.}. This prompts for a link to be inserted into the buffer.
2761@samp{ftp:}, including the prefixes defined through link abbreviations 2974You can just type a link, using text for an internal link, or one of the link
2762(@pxref{Link abbreviations}). The link will be inserted into the 2975type prefixes mentioned in the examples above. The link will be inserted
2763buffer@footnote{After insertion of a stored link, the link will be removed 2976into the buffer@footnote{After insertion of a stored link, the link will be
2764from the list of stored links. To keep it in the list later use, use a 2977removed from the list of stored links. To keep it in the list later use, use
2765triple @kbd{C-u} prefix argument to @kbd{C-c C-l}, or configure the option 2978a triple @kbd{C-u} prefix argument to @kbd{C-c C-l}, or configure the option
2766@code{org-keep-stored-link-after-insertion}.}, along with a descriptive text. 2979@code{org-keep-stored-link-after-insertion}.}, along with a descriptive text.
2767If some text was selected when this command is called, the selected text 2980If some text was selected when this command is called, the selected text
2768becomes the default description.@* Note that you don't have to use this 2981becomes the default description.
2769command to insert a link. Links in Org are plain text, and you can type 2982
2770or paste them straight into the buffer. By using this command, the links are 2983@b{Inserting stored links}@*
2771automatically enclosed in double brackets, and you will be asked for the 2984All links stored during the
2772optional descriptive text. 2985current session are part of the history for this prompt, so you can access
2773@c 2986them with @key{up} and @key{down} (or @kbd{M-p/n}).
2774@c If the link is a @samp{file:} link and 2987
2775@c the linked file is located in the same directory as the current file or 2988@b{Completion support}@* Completion with @key{TAB} will help you to insert
2776@c a subdirectory of it, the path of the file will be inserted relative to 2989valid link prefixes like @samp{http:} or @samp{ftp:}, including the prefixes
2777@c the current directory. 2990defined through link abbreviations (@pxref{Link abbreviations}). If you
2778@c 2991press @key{RET} after inserting only the @var{prefix}, Org will offer
2992specific completion support for some link types@footnote{This works by
2993calling a special function @code{org-PREFIX-complete-link}.} For
2994example, if you type @kbd{file @key{RET}}, file name completion (alternative
2995access: @kbd{C-u C-c C-l}, see below) will be offered, and after @kbd{bbdb
2996@key{RET}} you can complete contact names.
2779@kindex C-u C-c C-l 2997@kindex C-u C-c C-l
2780@cindex file name completion 2998@cindex file name completion
2781@cindex completion, of file names 2999@cindex completion, of file names
@@ -2783,7 +3001,7 @@ optional descriptive text.
2783When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to 3001When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
2784a file will be inserted and you may use file name completion to select 3002a file will be inserted and you may use file name completion to select
2785the name of the file. The path to the file is inserted relative to the 3003the name of the file. The path to the file is inserted relative to the
2786directory of the current org file, if the linked file is in the current 3004directory of the current Org file, if the linked file is in the current
2787directory or in a sub-directory of it, or if the path is written relative 3005directory or in a sub-directory of it, or if the path is written relative
2788to the current directory using @samp{../}. Otherwise an absolute path 3006to the current directory using @samp{../}. Otherwise an absolute path
2789is used, if possible with @samp{~/} for your home directory. You can 3007is used, if possible with @samp{~/} for your home directory. You can
@@ -2796,13 +3014,14 @@ link and description parts of the link.
2796@cindex following links 3014@cindex following links
2797@kindex C-c C-o 3015@kindex C-c C-o
2798@kindex RET 3016@kindex RET
2799@item C-c C-o 3017@item C-c C-o @r{or} @key{RET}
3018@vindex org-file-apps
2800Open link at point. This will launch a web browser for URLs (using 3019Open link at point. This will launch a web browser for URLs (using
2801@command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for 3020@command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for
2802the corresponding links, and execute the command in a shell link. When the 3021the corresponding links, and execute the command in a shell link. When the
2803cursor is on an internal link, this commands runs the corresponding search. 3022cursor is on an internal link, this commands runs the corresponding search.
2804When the cursor is on a TAG list in a headline, it creates the corresponding 3023When the cursor is on a TAG list in a headline, it creates the corresponding
2805TAGS view. If the cursor is on a time stamp, it compiles the agenda for that 3024TAGS view. If the cursor is on a timestamp, it compiles the agenda for that
2806date. Furthermore, it will visit text and remote files in @samp{file:} links 3025date. Furthermore, it will visit text and remote files in @samp{file:} links
2807with Emacs and select a suitable application for local non-text files. 3026with Emacs and select a suitable application for local non-text files.
2808Classification of files is based on file extension only. See option 3027Classification of files is based on file extension only. See option
@@ -2815,10 +3034,11 @@ opening in Emacs, use a @kbd{C-u C-u} prefix.
2815@item mouse-2 3034@item mouse-2
2816@itemx mouse-1 3035@itemx mouse-1
2817On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o} 3036On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o}
2818would. Under Emacs 22, also @kbd{mouse-1} will follow a link. 3037would. Under Emacs 22, @kbd{mouse-1} will also follow a link.
2819@c 3038@c
2820@kindex mouse-3 3039@kindex mouse-3
2821@item mouse-3 3040@item mouse-3
3041@vindex org-display-internal-link-with-indirect-buffer
2822Like @kbd{mouse-2}, but force file links to be opened with Emacs, and 3042Like @kbd{mouse-2}, but force file links to be opened with Emacs, and
2823internal links to be displayed in another window@footnote{See the 3043internal links to be displayed in another window@footnote{See the
2824variable @code{org-display-internal-link-with-indirect-buffer}}. 3044variable @code{org-display-internal-link-with-indirect-buffer}}.
@@ -2881,9 +3101,11 @@ abbreviated link looks like this
2881@end example 3101@end example
2882 3102
2883@noindent 3103@noindent
2884where the tag is optional. Such abbreviations are resolved according to 3104@vindex org-link-abbrev-alist
2885the information in the variable @code{org-link-abbrev-alist} that 3105where the tag is optional. The @i{linkword} must be a word; letter, numbers,
2886relates the linkwords to replacement text. Here is an example: 3106@samp{-}, and @samp{_} are allowed here. Abbreviations are resolved
3107according to the information in the variable @code{org-link-abbrev-alist}
3108that relates the linkwords to replacement text. Here is an example:
2887 3109
2888@lisp 3110@lisp
2889@group 3111@group
@@ -2908,14 +3130,18 @@ doing besides Emacs hacking with @code{[[ads:Dominik,C]]}.
2908If you need special abbreviations just for a single Org buffer, you 3130If you need special abbreviations just for a single Org buffer, you
2909can define them in the file with 3131can define them in the file with
2910 3132
3133@cindex #+LINK
2911@example 3134@example
2912#+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= 3135#+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id=
2913#+LINK: google http://www.google.com/search?q=%s 3136#+LINK: google http://www.google.com/search?q=%s
2914@end example 3137@end example
2915 3138
2916@noindent 3139@noindent
2917In-buffer completion @pxref{Completion} can be used after @samp{[} to 3140In-buffer completion (@pxref{Completion}) can be used after @samp{[} to
2918complete link abbreviations. 3141complete link abbreviations. You may also define a function
3142@code{org-PREFIX-complete-link} that implements special (@eg completion)
3143support for inserting such a link with @kbd{C-c C-l}. Such a function should
3144not accept any arguments, and return the full link with prefix.
2919 3145
2920@node Search options, Custom searches, Link abbreviations, Hyperlinks 3146@node Search options, Custom searches, Link abbreviations, Hyperlinks
2921@section Search options in file links 3147@section Search options in file links
@@ -2973,11 +3199,13 @@ a search for @samp{find me} in the current file, just as
2973 3199
2974The default mechanism for creating search strings and for doing the 3200The default mechanism for creating search strings and for doing the
2975actual search related to a file link may not work correctly in all 3201actual search related to a file link may not work correctly in all
2976cases. For example, BibTeX database files have many entries like 3202cases. For example, Bib@TeX{} database files have many entries like
2977@samp{year="1993"} which would not result in good search strings, 3203@samp{year="1993"} which would not result in good search strings,
2978because the only unique identification for a BibTeX entry is the 3204because the only unique identification for a Bib@TeX{} entry is the
2979citation key. 3205citation key.
2980 3206
3207@vindex org-create-file-search-functions
3208@vindex org-execute-file-search-functions
2981If you come across such a problem, you can write custom functions to set 3209If you come across such a problem, you can write custom functions to set
2982the right search string for a particular file type, and to do the search 3210the right search string for a particular file type, and to do the search
2983for the string in the file. Using @code{add-hook}, these functions need 3211for the string in the file. Using @code{add-hook}, these functions need
@@ -3044,29 +3272,33 @@ agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
3044@item C-u C-c C-t 3272@item C-u C-c C-t
3045Select a specific keyword using completion or (if it has been set up) 3273Select a specific keyword using completion or (if it has been set up)
3046the fast selection interface. For the latter, you need to assign keys 3274the fast selection interface. For the latter, you need to assign keys
3047to TODO states, see @ref{Per-file keywords} and @ref{Setting tags} for 3275to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for
3048more information. 3276more information.
3049 3277
3050@kindex S-@key{right} 3278@kindex S-@key{right}
3051@kindex S-@key{left} 3279@kindex S-@key{left}
3280@vindex org-treat-S-cursor-todo-selection-as-state-change
3052@item S-@key{right} 3281@item S-@key{right}
3053@itemx S-@key{left} 3282@itemx S-@key{left}
3054Select the following/preceding TODO state, similar to cycling. Useful 3283Select the following/preceding TODO state, similar to cycling. Useful
3055mostly if more than two TODO states are possible (@pxref{TODO 3284mostly if more than two TODO states are possible (@pxref{TODO
3056extensions}). See also @ref{Conflicts} for a discussion of the interaction 3285extensions}). See also @ref{Conflicts}, for a discussion of the interaction
3057with @code{shift-selection-mode}. 3286with @code{shift-selection-mode}. See also the variable
3287@code{org-treat-S-cursor-todo-selection-as-state-change}.
3058@kindex C-c C-v 3288@kindex C-c C-v
3059@kindex C-c / t 3289@kindex C-c / t
3060@cindex sparse tree, for TODO 3290@cindex sparse tree, for TODO
3061@item C-c C-v 3291@item C-c C-v
3062@itemx C-c / t 3292@itemx C-c / t
3063View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds 3293@vindex org-todo-keywords
3064the entire buffer, but shows all TODO items and the headings hierarchy 3294View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the
3065above them. With a prefix argument, search for a specific TODO. You will be 3295entire buffer, but shows all TODO items and the headings hierarchy above
3296them. With a prefix argument, search for a specific TODO. You will be
3066prompted for the keyword, and you can also give a list of keywords like 3297prompted for the keyword, and you can also give a list of keywords like
3067@code{KWD1|KWD2|...}. With numeric prefix argument N, show the tree for the 3298@code{KWD1|KWD2|...} to list entries that match any one of these keywords.
3068Nth keyword in the variable @code{org-todo-keywords}. With two prefix 3299With numeric prefix argument N, show the tree for the Nth keyword in the
3069arguments, find all TODO and DONE entries. 3300variable @code{org-todo-keywords}. With two prefix arguments, find all TODO
3301and DONE entries.
3070@kindex C-c a t 3302@kindex C-c a t
3071@item C-c a t 3303@item C-c a t
3072Show the global TODO list. Collects the TODO items from all agenda 3304Show the global TODO list. Collects the TODO items from all agenda
@@ -3080,6 +3312,7 @@ Insert a new TODO entry below the current one.
3080@end table 3312@end table
3081 3313
3082@noindent 3314@noindent
3315@vindex org-todo-state-tags-triggers
3083Changing a TODO state can also trigger tag changes. See the docstring of the 3316Changing a TODO state can also trigger tag changes. See the docstring of the
3084option @code{org-todo-state-tags-triggers} for details. 3317option @code{org-todo-state-tags-triggers} for details.
3085 3318
@@ -3087,6 +3320,7 @@ option @code{org-todo-state-tags-triggers} for details.
3087@section Extended use of TODO keywords 3320@section Extended use of TODO keywords
3088@cindex extended TODO keywords 3321@cindex extended TODO keywords
3089 3322
3323@vindex org-todo-keywords
3090By default, marked TODO entries have one of only two states: TODO and 3324By default, marked TODO entries have one of only two states: TODO and
3091DONE. Org mode allows you to classify TODO items in more complex ways 3325DONE. Org mode allows you to classify TODO items in more complex ways
3092with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With 3326with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With
@@ -3135,7 +3369,7 @@ define many keywords, you can use in-buffer completion
3135(@pxref{Completion}) or even a special one-key selection scheme 3369(@pxref{Completion}) or even a special one-key selection scheme
3136(@pxref{Fast access to TODO states}) to insert these words into the 3370(@pxref{Fast access to TODO states}) to insert these words into the
3137buffer. Changing a TODO state can be logged with a timestamp, see 3371buffer. Changing a TODO state can be logged with a timestamp, see
3138@ref{Tracking TODO state changes} for more information. 3372@ref{Tracking TODO state changes}, for more information.
3139 3373
3140@node TODO types, Multiple sets in one file, Workflow states, TODO extensions 3374@node TODO types, Multiple sets in one file, Workflow states, TODO extensions
3141@subsection TODO keywords as types 3375@subsection TODO keywords as types
@@ -3214,7 +3448,7 @@ These keys jump from one TODO subset to the next. In the above example,
3214@kbd{S-@key{<left>}} and @kbd{S-@key{<right>}} and walk through @emph{all} 3448@kbd{S-@key{<left>}} and @kbd{S-@key{<right>}} and walk through @emph{all}
3215keywords from all sets, so for example @kbd{S-@key{<right>}} would switch 3449keywords from all sets, so for example @kbd{S-@key{<right>}} would switch
3216from @code{DONE} to @code{REPORT} in the example above. See also 3450from @code{DONE} to @code{REPORT} in the example above. See also
3217@ref{Conflicts} for a discussion of the interaction with 3451@ref{Conflicts}, for a discussion of the interaction with
3218@code{shift-selection-mode}. 3452@code{shift-selection-mode}.
3219@end table 3453@end table
3220 3454
@@ -3224,7 +3458,7 @@ from @code{DONE} to @code{REPORT} in the example above. See also
3224If you would like to quickly change an entry to an arbitrary TODO state 3458If you would like to quickly change an entry to an arbitrary TODO state
3225instead of cycling through the states, you can set up keys for 3459instead of cycling through the states, you can set up keys for
3226single-letter access to the states. This is done by adding the section 3460single-letter access to the states. This is done by adding the section
3227key after each keyword, in parenthesis. For example: 3461key after each keyword, in parentheses. For example:
3228 3462
3229@lisp 3463@lisp
3230(setq org-todo-keywords 3464(setq org-todo-keywords
@@ -3233,10 +3467,11 @@ key after each keyword, in parenthesis. For example:
3233 (sequence "|" "CANCELED(c)"))) 3467 (sequence "|" "CANCELED(c)")))
3234@end lisp 3468@end lisp
3235 3469
3470@vindex org-fast-tag-selection-include-todo
3236If you then press @code{C-c C-t} followed by the selection key, the entry 3471If you then press @code{C-c C-t} followed by the selection key, the entry
3237will be switched to this state. @key{SPC} can be used to remove any TODO 3472will be switched to this state. @key{SPC} can be used to remove any TODO
3238keyword from an entry.@footnote{Check also the variable 3473keyword from an entry.@footnote{Check also the variable
3239@code{org-fast-tag-selection-include-todo}, it allows to change the TODO 3474@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO
3240state through the tags interface (@pxref{Setting tags}), in case you like to 3475state through the tags interface (@pxref{Setting tags}), in case you like to
3241mingle the two concepts. Note that this means you need to come up with 3476mingle the two concepts. Note that this means you need to come up with
3242unique keys across both sets of keywords.} 3477unique keys across both sets of keywords.}
@@ -3245,6 +3480,9 @@ unique keys across both sets of keywords.}
3245@subsection Setting up keywords for individual files 3480@subsection Setting up keywords for individual files
3246@cindex keyword options 3481@cindex keyword options
3247@cindex per-file keywords 3482@cindex per-file keywords
3483@cindex #+TODO
3484@cindex #+TYP_TODO
3485@cindex #+SEQ_TODO
3248 3486
3249It can be very useful to use different aspects of the TODO mechanism in 3487It can be very useful to use different aspects of the TODO mechanism in
3250different files. For file-local settings, you need to add special lines 3488different files. For file-local settings, you need to add special lines
@@ -3254,9 +3492,10 @@ need one of the following lines, starting in column zero anywhere in the
3254file: 3492file:
3255 3493
3256@example 3494@example
3257#+SEQ_TODO: TODO FEEDBACK VERIFY | DONE CANCELED 3495#+TODO: TODO FEEDBACK VERIFY | DONE CANCELED
3258@end example 3496@end example
3259or 3497@noindent (you may also write @code{#+SEQ_TODO} to be explicit about the
3498interpretation, but it means the same as @code{#+TODO}), or
3260@example 3499@example
3261#+TYP_TODO: Fred Sara Lucy Mike | DONE 3500#+TYP_TODO: Fred Sara Lucy Mike | DONE
3262@end example 3501@end example
@@ -3264,9 +3503,9 @@ or
3264A setup for using several sets in parallel would be: 3503A setup for using several sets in parallel would be:
3265 3504
3266@example 3505@example
3267#+SEQ_TODO: TODO | DONE 3506#+TODO: TODO | DONE
3268#+SEQ_TODO: REPORT BUG KNOWNCAUSE | FIXED 3507#+TODO: REPORT BUG KNOWNCAUSE | FIXED
3269#+SEQ_TODO: | CANCELED 3508#+TODO: | CANCELED
3270@end example 3509@end example
3271 3510
3272@cindex completion, of option keywords 3511@cindex completion, of option keywords
@@ -3288,6 +3527,9 @@ for the current buffer.}.
3288@subsection Faces for TODO keywords 3527@subsection Faces for TODO keywords
3289@cindex faces, for TODO keywords 3528@cindex faces, for TODO keywords
3290 3529
3530@vindex org-todo @r{(face)}
3531@vindex org-done @r{(face)}
3532@vindex org-todo-keyword-faces
3291Org mode highlights TODO keywords with special faces: @code{org-todo} 3533Org mode highlights TODO keywords with special faces: @code{org-todo}
3292for keywords indicating that an item still has to be acted upon, and 3534for keywords indicating that an item still has to be acted upon, and
3293@code{org-done} for keywords indicating that an item is finished. If 3535@code{org-done} for keywords indicating that an item is finished. If
@@ -3313,6 +3555,8 @@ necessary, define a special face and use that.
3313@cindex TODO dependencies 3555@cindex TODO dependencies
3314@cindex dependencies, of TODO states 3556@cindex dependencies, of TODO states
3315 3557
3558@vindex org-enforce-todo-dependencies
3559@cindex property, ORDERED
3316The structure of Org files (hierarchy and lists) makes it easy to define TODO 3560The structure of Org files (hierarchy and lists) makes it easy to define TODO
3317dependencies. Usually, a parent TODO task should not be marked DONE until 3561dependencies. Usually, a parent TODO task should not be marked DONE until
3318all subtasks (defined as children tasks) are marked as DONE. And sometimes 3562all subtasks (defined as children tasks) are marked as DONE. And sometimes
@@ -3341,17 +3585,25 @@ example:
3341@table @kbd 3585@table @kbd
3342@kindex C-c C-x o 3586@kindex C-c C-x o
3343@item C-c C-x o 3587@item C-c C-x o
3344Toggle the @code{ORDERED} property of the current entry. 3588@vindex org-track-ordered-property-with-tag
3589@cindex property, ORDERED
3590Toggle the @code{ORDERED} property of the current entry. A property is used
3591for this behavior because this should be local to the current entry, not
3592inherited like a tag. However, if you would like to @i{track} the value of
3593this property with a tag for better visibility, customize the variable
3594@code{org-track-ordered-property-with-tag}.
3345@kindex C-u C-u C-u C-c C-t 3595@kindex C-u C-u C-u C-c C-t
3346@item C-u C-u C-u C-c C-t 3596@item C-u C-u C-u C-c C-t
3347Change TODO state, circumventin any state blocking. 3597Change TODO state, circumventing any state blocking.
3348@end table 3598@end table
3349 3599
3600@vindex org-agenda-dim-blocked-tasks
3350If you set the variable @code{org-agenda-dim-blocked-tasks}, TODO entries 3601If you set the variable @code{org-agenda-dim-blocked-tasks}, TODO entries
3351that cannot be closed because of such dependencies will be shown in a dimmed 3602that cannot be closed because of such dependencies will be shown in a dimmed
3352font or even made invisible in agenda views (@pxref{Agenda Views}). 3603font or even made invisible in agenda views (@pxref{Agenda Views}).
3353 3604
3354@cindex checkboxes and TODO dependencies 3605@cindex checkboxes and TODO dependencies
3606@vindex org-enforce-todo-dependencies
3355You can also block changes of TODO states by looking at checkboxes 3607You can also block changes of TODO states by looking at checkboxes
3356(@pxref{Checkboxes}). If you set the variable 3608(@pxref{Checkboxes}). If you set the variable
3357@code{org-enforce-todo-checkbox-dependencies}, an entry that has unchecked 3609@code{org-enforce-todo-checkbox-dependencies}, an entry that has unchecked
@@ -3367,7 +3619,7 @@ module @file{org-depend.el}.
3367@cindex progress logging 3619@cindex progress logging
3368@cindex logging, of progress 3620@cindex logging, of progress
3369 3621
3370Org mode can automatically record a time stamp and possibly a note when 3622Org mode can automatically record a timestamp and possibly a note when
3371you mark a TODO item as DONE, or even each time you change the state of 3623you mark a TODO item as DONE, or even each time you change the state of
3372a TODO item. This system is highly configurable, settings can be on a 3624a TODO item. This system is highly configurable, settings can be on a
3373per-keyword basis and can be localized to a file or even a subtree. For 3625per-keyword basis and can be localized to a file or even a subtree. For
@@ -3413,14 +3665,27 @@ giving you an overview of what has been done.
3413 3665
3414@node Tracking TODO state changes, , Closing items, Progress logging 3666@node Tracking TODO state changes, , Closing items, Progress logging
3415@subsection Tracking TODO state changes 3667@subsection Tracking TODO state changes
3416 3668@cindex drawer, for state change recording
3417When TODO keywords are used as workflow states (@pxref{Workflow 3669
3418states}), you might want to keep track of when a state change occurred 3670@vindex org-log-states-order-reversed
3419and maybe take a note about this change. Since it is normally too much 3671@vindex org-log-into-drawer
3420to record a note for every state, Org mode expects configuration on a 3672@cindex property, LOG_INTO_DRAWER
3421per-keyword basis for this. This is achieved by adding special markers 3673When TODO keywords are used as workflow states (@pxref{Workflow states}), you
3422@samp{!} (for a time stamp) and @samp{@@} (for a note) in parenthesis 3674might want to keep track of when a state change occurred and maybe take a
3423after each keyword. For example, with the setting 3675note about this change. You can either record just a timestamp, or a
3676time-stamped note for a change. These records will be inserted after the
3677headline as an itemized list, newest first@footnote{See the variable
3678@code{org-log-states-order-reversed}}. When taking a lot of notes, you might
3679want to get the notes out of the way into a drawer (@pxref{Drawers}).
3680Customize the variable @code{org-log-into-drawer} to get this
3681behavior---the recommended drawer for this is called @code{LOGBOOK}. You can
3682also overrule the setting of this variable for a subtree by setting a
3683@code{LOG_INTO_DRAWER} property.
3684
3685Since it is normally too much to record a note for every state, Org mode
3686expects configuration on a per-keyword basis for this. This is achieved by
3687adding special markers @samp{!} (for a timestamp) and @samp{@@} (for a note)
3688in parentheses after each keyword. For example, with the setting
3424 3689
3425@lisp 3690@lisp
3426(setq org-todo-keywords 3691(setq org-todo-keywords
@@ -3428,16 +3693,17 @@ after each keyword. For example, with the setting
3428@end lisp 3693@end lisp
3429 3694
3430@noindent 3695@noindent
3696@vindex org-log-done
3431you not only define global TODO keywords and fast access keys, but also 3697you not only define global TODO keywords and fast access keys, but also
3432request that a time is recorded when the entry is turned into 3698request that a time is recorded when the entry is set to
3433DONE@footnote{It is possible that Org mode will record two time stamps 3699DONE@footnote{It is possible that Org mode will record two timestamps
3434when you are using both @code{org-log-done} and state change logging. 3700when you are using both @code{org-log-done} and state change logging.
3435However, it will never prompt for two notes - if you have configured 3701However, it will never prompt for two notes---if you have configured
3436both, the state change recording note will take precedence and cancel 3702both, the state change recording note will take precedence and cancel
3437the @samp{Closing Note}.}, and that a note is recorded when switching to 3703the @samp{Closing Note}.}, and that a note is recorded when switching to
3438WAIT or CANCELED. The setting for WAIT is even more special: The 3704WAIT or CANCELED. The setting for WAIT is even more special: the
3439@samp{!} after the slash means that in addition to the note taken when 3705@samp{!} after the slash means that in addition to the note taken when
3440entering the state, a time stamp should be recorded when @i{leaving} the 3706entering the state, a timestamp should be recorded when @i{leaving} the
3441WAIT state, if and only if the @i{target} state does not configure 3707WAIT state, if and only if the @i{target} state does not configure
3442logging for entering it. So it has no effect when switching from WAIT 3708logging for entering it. So it has no effect when switching from WAIT
3443to DONE, because DONE is configured to record a timestamp only. But 3709to DONE, because DONE is configured to record a timestamp only. But
@@ -3448,9 +3714,10 @@ configured.
3448You can use the exact same syntax for setting logging preferences local 3714You can use the exact same syntax for setting logging preferences local
3449to a buffer: 3715to a buffer:
3450@example 3716@example
3451#+SEQ_TODO: TODO(t) WAIT(w@@/!) | DONE(d!) CANCELED(c@@) 3717#+TODO: TODO(t) WAIT(w@@/!) | DONE(d!) CANCELED(c@@)
3452@end example 3718@end example
3453 3719
3720@cindex property, LOGGING
3454In order to define logging settings that are local to a subtree or a 3721In order to define logging settings that are local to a subtree or a
3455single item, define a LOGGING property in this entry. Any non-empty 3722single item, define a LOGGING property in this entry. Any non-empty
3456LOGGING property resets all logging settings to nil. You may then turn 3723LOGGING property resets all logging settings to nil. You may then turn
@@ -3509,13 +3776,17 @@ agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
3509@kindex S-@key{down} 3776@kindex S-@key{down}
3510@item S-@key{up} 3777@item S-@key{up}
3511@itemx S-@key{down} 3778@itemx S-@key{down}
3779@vindex org-priority-start-cycle-with-default
3512Increase/decrease priority of current headline@footnote{See also the option 3780Increase/decrease priority of current headline@footnote{See also the option
3513@code{org-priority-start-cycle-with-default'}.}. Note that these keys are 3781@code{org-priority-start-cycle-with-default}.}. Note that these keys are
3514also used to modify time stamps (@pxref{Creating timestamps}). See also 3782also used to modify timestamps (@pxref{Creating timestamps}). See also
3515@ref{Conflicts} for a discussion of the interaction with 3783@ref{Conflicts}, for a discussion of the interaction with
3516@code{shift-selection-mode}. 3784@code{shift-selection-mode}.
3517@end table 3785@end table
3518 3786
3787@vindex org-highest-priority
3788@vindex org-lowest-priority
3789@vindex org-default-priority
3519You can change the range of allowed priorities by setting the variables 3790You can change the range of allowed priorities by setting the variables
3520@code{org-highest-priority}, @code{org-lowest-priority}, and 3791@code{org-highest-priority}, @code{org-lowest-priority}, and
3521@code{org-default-priority}. For an individual buffer, you may set 3792@code{org-default-priority}. For an individual buffer, you may set
@@ -3523,6 +3794,7 @@ these values (highest, lowest, default) like this (please make sure that
3523the highest priority is earlier in the alphabet than the lowest 3794the highest priority is earlier in the alphabet than the lowest
3524priority): 3795priority):
3525 3796
3797@cindex #+PRIORITIES
3526@example 3798@example
3527#+PRIORITIES: A C B 3799#+PRIORITIES: A C B
3528@end example 3800@end example
@@ -3531,6 +3803,7 @@ priority):
3531@section Breaking tasks down into subtasks 3803@section Breaking tasks down into subtasks
3532@cindex tasks, breaking down 3804@cindex tasks, breaking down
3533 3805
3806@vindex org-agenda-todo-list-sublevels
3534It is often advisable to break down large tasks into smaller, manageable 3807It is often advisable to break down large tasks into smaller, manageable
3535subtasks. You can do this by creating an outline tree below a TODO item, 3808subtasks. You can do this by creating an outline tree below a TODO item,
3536with detailed subtasks on the tree@footnote{To keep subtasks out of the 3809with detailed subtasks on the tree@footnote{To keep subtasks out of the
@@ -3548,8 +3821,14 @@ be updates each time the todo status of a child changes. For example:
3548** DONE Talk to neighbor 3821** DONE Talk to neighbor
3549@end example 3822@end example
3550 3823
3551If you would like a TODO entry to automatically change to DONE when all 3824@cindex property, COOKIE_DATA
3552children are done, you can use the following setup: 3825If a heading has both checkboxes and TODO children below it, the meaning of
3826the statistics cookie become ambiguous. Set the property
3827@code{COOKIE_DATA} to either @samp{checkbox} or @samp{todo} to resolve
3828this issue.
3829
3830If you would like a TODO entry to automatically change to DONE
3831when all children are done, you can use the following setup:
3553 3832
3554@example 3833@example
3555(defun org-summary-todo (n-done n-not-done) 3834(defun org-summary-todo (n-done n-not-done)
@@ -3597,29 +3876,45 @@ checked.
3597 3876
3598@cindex statistics, for checkboxes 3877@cindex statistics, for checkboxes
3599@cindex checkbox statistics 3878@cindex checkbox statistics
3600The @samp{[2/4]} and @samp{[1/3]} in the first and second line are 3879@cindex property, COOKIE_DATA
3601cookies indicating how many checkboxes present in this entry have been 3880The @samp{[2/4]} and @samp{[1/3]} in the first and second line are cookies
3602checked off, and the total number of checkboxes are present. This can 3881indicating how many checkboxes present in this entry have been checked off,
3603give you an idea on how many checkboxes remain, even without opening a 3882and the total number of checkboxes present. This can give you an idea on how
3604folded entry. The cookies can be placed into a headline or into (the 3883many checkboxes remain, even without opening a folded entry. The cookies can
3605first line of) a plain list item. Each cookie covers all checkboxes 3884be placed into a headline or into (the first line of) a plain list item.
3606structurally below the headline/item on which the cookie appear. You 3885Each cookie covers checkboxes of direct children structurally below the
3607have to insert the cookie yourself by typing either @samp{[/]} or 3886headline/item on which the cookie appears@footnote{Set the variable
3608@samp{[%]}. With @samp{[/]} you get an @samp{n out of m} result, as in 3887@code{org-recursive-checkbox-statistics} if you want such cookies to
3609the examples above. With @samp{[%]} you get information about the 3888represent the all checkboxes below the cookie, not just the direct
3610percentage of checkboxes checked (in the above example, this would be 3889children.}. You have to insert the cookie yourself by typing either
3611@samp{[50%]} and @samp{[33%]}, respectively). 3890@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m}
3891result, as in the examples above. With @samp{[%]} you get information about
3892the percentage of checkboxes checked (in the above example, this would be
3893@samp{[50%]} and @samp{[33%]}, respectively). In a headline, a cookie can
3894count either checkboxes below the heading or TODO states of children, and it
3895will display whatever was changed last. Set the property @code{COOKIE_DATA}
3896to either @samp{checkbox} or @samp{todo} to resolve this issue.
3897
3898@cindex blocking, of checkboxes
3899@cindex checkbox blocking
3900@cindex property, ORDERED
3901If the current outline node has an @code{ORDERED} property, checkboxes must
3902be checked off in sequence, and an error will be thrown if you try to check
3903off a box while there are unchecked boxes above it.
3612 3904
3613@noindent The following commands work with checkboxes: 3905@noindent The following commands work with checkboxes:
3614 3906
3615@table @kbd 3907@table @kbd
3616@kindex C-c C-c 3908@kindex C-c C-c
3617@item C-c C-c 3909@item C-c C-c
3618Toggle checkbox at point. With a prefix argument, set it to @samp{[-]}, 3910Toggle checkbox status or (with prefix arg) checkbox presence at point. With
3619which is considered to be an intermediate state. 3911double prefix argument, set it to @samp{[-]}, which is considered to be an
3912intermediate state.
3620@kindex C-c C-x C-b 3913@kindex C-c C-x C-b
3621@item C-c C-x C-b 3914@item C-c C-x C-b
3622Toggle checkbox status or (with prefix arg) checkbox presence at point. 3915Toggle checkbox status or (with prefix arg) checkbox presence at point. With
3916double prefix argument, set it to @samp{[-]}, which is considered to be an
3917intermediate state.
3623@itemize @minus 3918@itemize @minus
3624@item 3919@item
3625If there is an active region, toggle the first checkbox in the region 3920If there is an active region, toggle the first checkbox in the region
@@ -3636,6 +3931,16 @@ If there is no active region, just toggle the checkbox at point.
3636Insert a new item with a checkbox. 3931Insert a new item with a checkbox.
3637This works only if the cursor is already in a plain list item 3932This works only if the cursor is already in a plain list item
3638(@pxref{Plain lists}). 3933(@pxref{Plain lists}).
3934@kindex C-c C-x o
3935@item C-c C-x o
3936@vindex org-track-ordered-property-with-tag
3937@cindex property, ORDERED
3938Toggle the @code{ORDERED} property of the entry, to toggle if checkboxes must
3939be checked off in sequence. A property is used for this behavior because
3940this should be local to the current entry, not inherited like a tag.
3941However, if you would like to @i{track} the value of this property with a tag
3942for better visibility, customize the variable
3943@code{org-track-ordered-property-with-tag}.
3639@kindex C-c # 3944@kindex C-c #
3640@item C-c # 3945@item C-c #
3641Update the checkbox statistics in the current outline entry. When 3946Update the checkbox statistics in the current outline entry. When
@@ -3657,13 +3962,14 @@ An excellent way to implement labels and contexts for cross-correlating
3657information is to assign @i{tags} to headlines. Org mode has extensive 3962information is to assign @i{tags} to headlines. Org mode has extensive
3658support for tags. 3963support for tags.
3659 3964
3965@vindex org-tag-faces
3660Every headline can contain a list of tags; they occur at the end of the 3966Every headline can contain a list of tags; they occur at the end of the
3661headline. Tags are normal words containing letters, numbers, @samp{_}, and 3967headline. Tags are normal words containing letters, numbers, @samp{_}, and
3662@samp{@@}. Tags must be preceded and followed by a single colon, e.g., 3968@samp{@@}. Tags must be preceded and followed by a single colon, @eg{},
3663@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}. 3969@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}.
3664Tags will by default get a bold face with the same color as the headline. 3970Tags will by default be in bold face with the same color as the headline.
3665You may specify special faces for specific tags using the variable 3971You may specify special faces for specific tags using the variable
3666@code{org-tag-faces}, much in the same way as you can do for TODO keywords 3972@code{org-tag-faces}, in much the same way as you can for TODO keywords
3667(@pxref{Faces for TODO keywords}). 3973(@pxref{Faces for TODO keywords}).
3668 3974
3669@menu 3975@menu
@@ -3692,18 +3998,22 @@ well. For example, in the list
3692the final heading will have the tags @samp{:work:}, @samp{:boss:}, 3998the final heading will have the tags @samp{:work:}, @samp{:boss:},
3693@samp{:notes:}, and @samp{:action:} even though the final heading is not 3999@samp{:notes:}, and @samp{:action:} even though the final heading is not
3694explicitly marked with those tags. You can also set tags that all entries in 4000explicitly marked with those tags. You can also set tags that all entries in
3695a file should inherit as if these tags would be defined in a hypothetical 4001a file should inherit just as if these tags were defined in a hypothetical
3696level zero that surrounds the entire file. 4002level zero that surrounds the entire file.
3697 4003
4004@cindex #+FILETAGS
3698@example 4005@example
3699#+FILETAGS: :Peter:Boss:Secret: 4006#+FILETAGS: :Peter:Boss:Secret:
3700@end example 4007@end example
3701 4008
3702@noindent 4009@noindent
4010@vindex org-use-tag-inheritance
4011@vindex org-tags-exclude-from-inheritance
3703To limit tag inheritance to specific tags, or to turn it off entirely, use 4012To limit tag inheritance to specific tags, or to turn it off entirely, use
3704the variables @code{org-use-tag-inheritance} and 4013the variables @code{org-use-tag-inheritance} and
3705@code{org-tags-exclude-from-inheritance}. 4014@code{org-tags-exclude-from-inheritance}.
3706 4015
4016@vindex org-tags-match-list-sublevels
3707When a headline matches during a tags search while tag inheritance is turned 4017When a headline matches during a tags search while tag inheritance is turned
3708on, all the sublevels in the same tree will (for a simple match form) match 4018on, all the sublevels in the same tree will (for a simple match form) match
3709as well@footnote{This is only true if the search does not involve more 4019as well@footnote{This is only true if the search does not involve more
@@ -3726,6 +4036,7 @@ also a special command for inserting tags:
3726@kindex C-c C-q 4036@kindex C-c C-q
3727@item C-c C-q 4037@item C-c C-q
3728@cindex completion, of tags 4038@cindex completion, of tags
4039@vindex org-tags-column
3729Enter new tags for the current headline. Org mode will either offer 4040Enter new tags for the current headline. Org mode will either offer
3730completion or a special single-key interface for setting tags, see 4041completion or a special single-key interface for setting tags, see
3731below. After pressing @key{RET}, the tags will be inserted and aligned 4042below. After pressing @key{RET}, the tags will be inserted and aligned
@@ -3738,12 +4049,14 @@ demotion, and TODO state changes (@pxref{TODO basics}).
3738When the cursor is in a headline, this does the same as @kbd{C-c C-q}. 4049When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
3739@end table 4050@end table
3740 4051
4052@vindex org-tag-alist
3741Org will support tag insertion based on a @emph{list of tags}. By 4053Org will support tag insertion based on a @emph{list of tags}. By
3742default this list is constructed dynamically, containing all tags 4054default this list is constructed dynamically, containing all tags
3743currently used in the buffer. You may also globally specify a hard list 4055currently used in the buffer. You may also globally specify a hard list
3744of tags with the variable @code{org-tag-alist}. Finally you can set 4056of tags with the variable @code{org-tag-alist}. Finally you can set
3745the default tags for a given file with lines like 4057the default tags for a given file with lines like
3746 4058
4059@cindex #+TAGS
3747@example 4060@example
3748#+TAGS: @@work @@home @@tennisclub 4061#+TAGS: @@work @@home @@tennisclub
3749#+TAGS: laptop car pc sailboat 4062#+TAGS: laptop car pc sailboat
@@ -3757,6 +4070,17 @@ in a specific file, add an empty TAGS option line to that file:
3757#+TAGS: 4070#+TAGS:
3758@end example 4071@end example
3759 4072
4073@vindex org-tag-persistent-alist
4074If you have a preferred set of tags that you would like to use in every file,
4075in addition to those defined on a per-file basis by TAGS option lines, then
4076you may specify a list of tags with the variable
4077@code{org-tag-persistent-alist}. You may turn this off on a per-file basis
4078by adding a STARTUP option line to that file:
4079
4080@example
4081#+STARTUP: noptag
4082@end example
4083
3760By default Org mode uses the standard minibuffer completion facilities for 4084By default Org mode uses the standard minibuffer completion facilities for
3761entering tags. However, it also implements another, quicker, tag selection 4085entering tags. However, it also implements another, quicker, tag selection
3762method called @emph{fast tag selection}. This allows you to select and 4086method called @emph{fast tag selection}. This allows you to select and
@@ -3771,15 +4095,30 @@ like:
3771(setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l))) 4095(setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l)))
3772@end lisp 4096@end lisp
3773 4097
3774@noindent If the tag is only relevant to the file you are working on then you 4098@noindent If the tag is only relevant to the file you are working on, then you
3775can, instead, set the TAGS option line as: 4099can instead set the TAGS option line as:
3776 4100
3777@example 4101@example
3778#+TAGS: @@work(w) @@home(h) @@tennisclub(t) laptop(l) pc(p) 4102#+TAGS: @@work(w) @@home(h) @@tennisclub(t) laptop(l) pc(p)
3779@end example 4103@end example
3780 4104
4105@noindent The tags interface will show the available tags in a splash
4106window. If you want to start a new line after a specific tag, insert
4107@samp{\n} into the tag list
4108
4109@example
4110#+TAGS: @@work(w) @@home(h) @@tennisclub(t) \n laptop(l) pc(p)
4111@end example
4112
4113@noindent or write them in two lines:
4114
4115@example
4116#+TAGS: @@work(w) @@home(h) @@tennisclub(t)
4117#+TAGS: laptop(l) pc(p)
4118@end example
4119
3781@noindent 4120@noindent
3782You can also group together tags that are mutually exclusive. By using 4121You can also group together tags that are mutually exclusive by using
3783braces, as in: 4122braces, as in:
3784 4123
3785@example 4124@example
@@ -3793,9 +4132,10 @@ and @samp{@@tennisclub} should be selected. Multiple such groups are allowed.
3793these lines to activate any changes. 4132these lines to activate any changes.
3794 4133
3795@noindent 4134@noindent
3796To set these mutually exclusive groups in the variable @code{org-mode-alist} 4135To set these mutually exclusive groups in the variable @code{org-tags-alist},
3797you must use the dummy tags @code{:startgroup} and @code{:endgroup} instead 4136you must use the dummy tags @code{:startgroup} and @code{:endgroup} instead
3798of the braces. The previous example would be set globally by the following 4137of the braces. Similarly, you can use @code{:newline} to indicate a line
4138break. The previous example would be set globally by the following
3799configuration: 4139configuration:
3800 4140
3801@lisp 4141@lisp
@@ -3851,10 +4191,11 @@ alternatively with @kbd{C-c C-c C-c w}. Adding the non-predefined tag
3851@samp{Sarah} could be done with @kbd{C-c C-c @key{TAB} S a r a h 4191@samp{Sarah} could be done with @kbd{C-c C-c @key{TAB} S a r a h
3852@key{RET} @key{RET}}. 4192@key{RET} @key{RET}}.
3853 4193
3854If you find that most of the time, you need only a single key press to 4194@vindex org-fast-tag-selection-single-key
4195If you find that most of the time you need only a single key press to
3855modify your list of tags, set the variable 4196modify your list of tags, set the variable
3856@code{org-fast-tag-selection-single-key}. Then you no longer have to 4197@code{org-fast-tag-selection-single-key}. Then you no longer have to
3857press @key{RET} to exit fast tag selection - it will immediately exit 4198press @key{RET} to exit fast tag selection---it will immediately exit
3858after the first change. If you then occasionally need more keys, press 4199after the first change. If you then occasionally need more keys, press
3859@kbd{C-c} to turn off auto-exit for the current tag selection process 4200@kbd{C-c} to turn off auto-exit for the current tag selection process
3860(in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c 4201(in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c
@@ -3872,9 +4213,9 @@ information into special lists.
3872 4213
3873@table @kbd 4214@table @kbd
3874@kindex C-c \ 4215@kindex C-c \
3875@kindex C-c / T 4216@kindex C-c / m
3876@item C-c \ 4217@item C-c \
3877@itemx C-c / T 4218@itemx C-c / m
3878Create a sparse tree with all headlines matching a tags search. With a 4219Create a sparse tree with all headlines matching a tags search. With a
3879@kbd{C-u} prefix argument, ignore headlines that are not a TODO line. 4220@kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
3880@kindex C-c a m 4221@kindex C-c a m
@@ -3883,81 +4224,20 @@ Create a global list of tag matches from all agenda files.
3883@xref{Matching tags and properties}. 4224@xref{Matching tags and properties}.
3884@kindex C-c a M 4225@kindex C-c a M
3885@item C-c a M 4226@item C-c a M
4227@vindex org-tags-match-list-sublevels
3886Create a global list of tag matches from all agenda files, but check 4228Create a global list of tag matches from all agenda files, but check
3887only TODO items and force checking subitems (see variable 4229only TODO items and force checking subitems (see variable
3888@code{org-tags-match-list-sublevels}). 4230@code{org-tags-match-list-sublevels}).
3889@end table 4231@end table
3890 4232
3891@cindex Boolean logic, for tag searches 4233These commands all prompt for a match string which allows basic Boolean logic
3892A @i{tags} search string can use Boolean operators @samp{&} for AND and 4234like @samp{+boss+urgent-project1}, to find entries with tags @samp{boss} and
3893@samp{|} for OR. @samp{&} binds more strongly than @samp{|}. 4235@samp{urgent}, but not @samp{project1}, or @samp{Kathy|Sally} to find entries
3894Parenthesis are currently not implemented. A tag may also be preceded 4236which are tagged, like @samp{Kathy} or @samp{Sally}. The full syntax of the search
3895by @samp{-}, to select against it, and @samp{+} is syntactic sugar for 4237string is rich and allows also matching against TODO keywords, entry levels
3896positive selection. The AND operator @samp{&} is optional when @samp{+} 4238and properties. For a complete description with many examples, see
3897or @samp{-} is present. Examples: 4239@ref{Matching tags and properties}.
3898 4240
3899@table @samp
3900@item +work-boss
3901Select headlines tagged @samp{:work:}, but discard those also tagged
3902@samp{:boss:}.
3903@item work|laptop
3904Selects lines tagged @samp{:work:} or @samp{:laptop:}.
3905@item work|laptop&night
3906Like before, but require the @samp{:laptop:} lines to be tagged also
3907@samp{:night:}.
3908@end table
3909
3910@cindex TODO keyword matching, with tags search
3911You may also test for TODO keywords (@pxref{TODO extensions}) and properties
3912(@pxref{Properties and Columns}) at the same time as matching tags. For a
3913guide on how to match properties, see @ref{Property searches}. To match a
3914specific TODO keyword, include an expression like @samp{+TODO="NEXT"} as one
3915of the terms in a tags search.
3916
3917There is also the possibility to end the tags part of the match (which may
3918include several terms connected with @samp{|}) with a @samp{/} and then
3919specify a Boolean expression just for TODO keywords. The syntax is then
3920similar to the tag matches, but should be applied with consideration: For
3921example, a positive selection on several TODO keywords can not meaningfully
3922be combined with boolean AND. However, @emph{negative selection} combined
3923with AND can be meaningful. To make sure that only lines are checked that
3924actually have any TODO keyword (resulting in a speed-up), use @kbd{C-c a M},
3925or equivalently start the TODO part after the slash with @samp{!}. Examples:
3926
3927@table @samp
3928@item work+TODO="WAITING"
3929Select @samp{:work:}-tagged TODO lines with the specific TODO
3930keyword @samp{WAITING}.
3931@item work+TODO="WAITING"|home+TODO="WAITING"
3932Waiting tasks both at work and at home.
3933@item work/WAITING
3934Same as the first example.
3935@item work/!-WAITING-NEXT
3936Select @samp{:work:}-tagged TODO lines that are neither @samp{WAITING}
3937nor @samp{NEXT}
3938@item work/!+WAITING|+NEXT
3939Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
3940@samp{NEXT}.
3941@end table
3942
3943@cindex regular expressions, with tags search
3944Any element of the tag/todo match can be a regular expression - in this
3945case it must be enclosed in curly braces. For example,
3946@samp{work+@{^boss.*@}} matches headlines that contain the tag
3947@samp{:work:} and any tag @i{starting} with @samp{boss}. You may also use a
3948regular expression in @samp{TODO=@{^W@}} which would match TODO keywords
3949starting with the letter @samp{W}.
3950
3951@cindex level, require for tags/property match
3952@cindex category, require for tags/property match
3953You can also require a headline to be of a certain level or category, by
3954writing instead of any TAG an expression like @samp{LEVEL=3} or
3955@samp{CATEGORY="work"}, respectively. For example, a search
3956@samp{+LEVEL=3+boss/-DONE} lists all level three headlines that have the
3957tag @samp{boss} and are @emph{not} marked with the TODO keyword DONE.
3958
3959Accessing TODO, LEVEL, and CATEGORY during a search is fast. Accessing any
3960other properties will slow down the search.
3961 4241
3962@node Properties and Columns, Dates and Times, Tags, Top 4242@node Properties and Columns, Dates and Times, Tags, Top
3963@chapter Properties and Columns 4243@chapter Properties and Columns
@@ -3968,12 +4248,12 @@ are two main applications for properties in Org mode. First, properties
3968are like tags, but with a value. Second, you can use properties to 4248are like tags, but with a value. Second, you can use properties to
3969implement (very basic) database capabilities in an Org buffer. For 4249implement (very basic) database capabilities in an Org buffer. For
3970an example of the first application, imagine maintaining a file where 4250an example of the first application, imagine maintaining a file where
3971you document bugs and plan releases of a piece of software. Instead of 4251you document bugs and plan releases for a piece of software. Instead of
3972using tags like @code{:release_1:}, @code{:release_2:}, one can use a 4252using tags like @code{:release_1:}, @code{:release_2:}, one can use a
3973property, say @code{:Release:}, that in different subtrees has different 4253property, say @code{:Release:}, that in different subtrees has different
3974values, such as @code{1.0} or @code{2.0}. For an example of the second 4254values, such as @code{1.0} or @code{2.0}. For an example of the second
3975application of properties, imagine keeping track of your music CDs, 4255application of properties, imagine keeping track of your music CDs,
3976where properties could be things such as the album artist, date of 4256where properties could be things such as the album, artist, date of
3977release, number of tracks, and so on. 4257release, number of tracks, and so on.
3978 4258
3979Properties can be conveniently edited and viewed in column view 4259Properties can be conveniently edited and viewed in column view
@@ -4006,7 +4286,7 @@ first, and the value after it. Here is an example:
4006 :Title: Goldberg Variations 4286 :Title: Goldberg Variations
4007 :Composer: J.S. Bach 4287 :Composer: J.S. Bach
4008 :Artist: Glen Gould 4288 :Artist: Glen Gould
4009 :Publisher: Deutsche Grammphon 4289 :Publisher: Deutsche Grammophon
4010 :NDisks: 1 4290 :NDisks: 1
4011 :END: 4291 :END:
4012@end example 4292@end example
@@ -4029,11 +4309,13 @@ publishers and the number of disks in a box like this:
4029 4309
4030If you want to set properties that can be inherited by any entry in a 4310If you want to set properties that can be inherited by any entry in a
4031file, use a line like 4311file, use a line like
4032 4312@cindex property, _ALL
4313@cindex #+PROPERTY
4033@example 4314@example
4034#+PROPERTY: NDisks_ALL 1 2 3 4 4315#+PROPERTY: NDisks_ALL 1 2 3 4
4035@end example 4316@end example
4036 4317
4318@vindex org-global-properties
4037Property values set with the global variable 4319Property values set with the global variable
4038@code{org-global-properties} can be inherited by all entries in all 4320@code{org-global-properties} can be inherited by all entries in all
4039Org files. 4321Org files.
@@ -4077,24 +4359,40 @@ nearest column format definition.
4077@section Special properties 4359@section Special properties
4078@cindex properties, special 4360@cindex properties, special
4079 4361
4080Special properties provide alternative access method to Org mode 4362Special properties provide an alternative access method to Org mode
4081features discussed in the previous chapters, like the TODO state or the 4363features, like the TODO state or the priority of an entry, discussed in the
4082priority of an entry. This interface exists so that you can include 4364previous chapters. This interface exists so that you can include
4083these states into columns view (@pxref{Column view}), or to use them in 4365these states in a column view (@pxref{Column view}), or to use them in
4084queries. The following property names are special and should not be 4366queries. The following property names are special and should not be
4085used as keys in the properties drawer: 4367used as keys in the properties drawer:
4086 4368
4369@cindex property, special, TODO
4370@cindex property, special, TAGS
4371@cindex property, special, ALLTAGS
4372@cindex property, special, CATEGORY
4373@cindex property, special, PRIORITY
4374@cindex property, special, DEADLINE
4375@cindex property, special, SCHEDULED
4376@cindex property, special, CLOSED
4377@cindex property, special, TIMESTAMP
4378@cindex property, special, TIMESTAMP_IA
4379@cindex property, special, CLOCKSUM
4380@c guessing that ITEM is needed in this area; also, should this list be sorted?
4381@cindex property, special, ITEM
4087@example 4382@example
4088TODO @r{The TODO keyword of the entry.} 4383TODO @r{The TODO keyword of the entry.}
4089TAGS @r{The tags defined directly in the headline.} 4384TAGS @r{The tags defined directly in the headline.}
4090ALLTAGS @r{All tags, including inherited ones.} 4385ALLTAGS @r{All tags, including inherited ones.}
4386CATEGORY @r{The category of an entry.}
4091PRIORITY @r{The priority of the entry, a string with a single letter.} 4387PRIORITY @r{The priority of the entry, a string with a single letter.}
4092DEADLINE @r{The deadline time string, without the angular brackets.} 4388DEADLINE @r{The deadline time string, without the angular brackets.}
4093SCHEDULED @r{The scheduling time stamp, without the angular brackets.} 4389SCHEDULED @r{The scheduling timestamp, without the angular brackets.}
4094TIMESTAMP @r{The first keyword-less time stamp in the entry.} 4390CLOSED @r{When was this entry closed?}
4095TIMESTAMP_IA @r{The first inactive time stamp in the entry.} 4391TIMESTAMP @r{The first keyword-less timestamp in the entry.}
4392TIMESTAMP_IA @r{The first inactive timestamp in the entry.}
4096CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} 4393CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}}
4097 @r{must be run first to compute the values.} 4394 @r{must be run first to compute the values.}
4395ITEM @r{The content of the entry.}
4098@end example 4396@end example
4099 4397
4100@node Property searches, Property inheritance, Special properties, Properties and Columns 4398@node Property searches, Property inheritance, Special properties, Properties and Columns
@@ -4103,51 +4401,28 @@ CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}
4103@cindex searching, of properties 4401@cindex searching, of properties
4104 4402
4105To create sparse trees and special lists with selection based on properties, 4403To create sparse trees and special lists with selection based on properties,
4106the same commands are used as for tag searches (@pxref{Tag searches}), and 4404the same commands are used as for tag searches (@pxref{Tag searches}).
4107the same logic applies. For example, here is a search string: 4405@table @kbd
4108 4406@kindex C-c \
4109@example 4407@kindex C-c / m
4110+work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 \ 4408@item C-c \
4111 +With=@{Sarah\|Denny@}+SCHEDULED>="<2008-10-11>" 4409@itemx C-c / m
4112@end example 4410Create a sparse tree with all matching entries. With a
4113 4411@kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
4114@noindent 4412@kindex C-c a m
4115The type of comparison will depend on how the comparison value is written: 4413@item C-c a m
4116@itemize @minus 4414Create a global list of tag/property matches from all agenda files.
4117@item 4415@xref{Matching tags and properties}.
4118If the comparison value is a plain number, a numerical comparison is done, 4416@kindex C-c a M
4119and the allowed operators are @samp{<}, @samp{=}, @samp{>}, @samp{<=}, 4417@item C-c a M
4120@samp{>=}, and @samp{<>}. 4418@vindex org-tags-match-list-sublevels
4121@item 4419Create a global list of tag matches from all agenda files, but check
4122If the comparison value is enclosed in double 4420only TODO items and force checking of subitems (see variable
4123quotes, a string comparison is done, and the same operators are allowed. 4421@code{org-tags-match-list-sublevels}).
4124@item 4422@end table
4125If the comparison value is enclosed in double quotes @emph{and} angular
4126brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
4127assumed to be date/time specifications in the standard Org way, and the
4128comparison will be done accordingly. Special values that will be recognized
4129are @code{"<now>"} for now (including time), and @code{"<today>"}, and
4130@code{"<tomorrow>"} for these days at 0:00 hours, i.e. without a time
4131specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
4132@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
4133respectively, can be used.
4134@item
4135If the comparison value is enclosed
4136in curly braces, a regexp match is performed, with @samp{=} meaning that the
4137regexp matches the property value, and @samp{<>} meaning that it does not
4138match.
4139@end itemize
4140
4141So the search string in the example finds entries tagged @samp{:work:} but
4142not @samp{:boss:}, which also have a priority value @samp{A}, a
4143@samp{:Coffee:} property with the value @samp{unlimited}, an @samp{Effort}
4144property that is numerically smaller than 2, a @samp{:With:} property that is
4145matched by the regular expression @samp{Sarah\|Denny}, and that are scheduled
4146on or after October 11, 2008.
4147 4423
4148You can configure Org mode to use property inheritance during a search, but 4424The syntax for the search string is described in @ref{Matching tags and
4149beware that this can slow down searches considerably. See @ref{Property 4425properties}.
4150inheritance} for details.
4151 4426
4152There is also a special command for creating sparse trees based on a 4427There is also a special command for creating sparse trees based on a
4153single property: 4428single property:
@@ -4167,13 +4442,14 @@ a regular expression and matched against the property values.
4167@cindex properties, inheritance 4442@cindex properties, inheritance
4168@cindex inheritance, of properties 4443@cindex inheritance, of properties
4169 4444
4170The outline structure of Org mode documents lends itself for an 4445@vindex org-use-property-inheritance
4171inheritance model of properties: If the parent in a tree has a certain 4446The outline structure of Org-mode documents lends itself for an
4447inheritance model of properties: if the parent in a tree has a certain
4172property, the children can inherit this property. Org mode does not 4448property, the children can inherit this property. Org mode does not
4173turn this on by default, because it can slow down property searches 4449turn this on by default, because it can slow down property searches
4174significantly and is often not needed. However, if you find inheritance 4450significantly and is often not needed. However, if you find inheritance
4175useful, you can turn it on by setting the variable 4451useful, you can turn it on by setting the variable
4176@code{org-use-property-inheritance}. It may be set to @code{t}, to make 4452@code{org-use-property-inheritance}. It may be set to @code{t} to make
4177all properties inherited from the parent, to a list of properties 4453all properties inherited from the parent, to a list of properties
4178that should be inherited, or to a regular expression that matches 4454that should be inherited, or to a regular expression that matches
4179inherited properties. 4455inherited properties.
@@ -4181,6 +4457,7 @@ inherited properties.
4181Org mode has a few properties for which inheritance is hard-coded, at 4457Org mode has a few properties for which inheritance is hard-coded, at
4182least for the special applications for which they are used: 4458least for the special applications for which they are used:
4183 4459
4460@cindex property, COLUMNS
4184@table @code 4461@table @code
4185@item COLUMNS 4462@item COLUMNS
4186The @code{:COLUMNS:} property defines the format of column view 4463The @code{:COLUMNS:} property defines the format of column view
@@ -4189,12 +4466,15 @@ where a @code{:COLUMNS:} property is defined is used as the starting
4189point for a column view table, independently of the location in the 4466point for a column view table, independently of the location in the
4190subtree from where columns view is turned on. 4467subtree from where columns view is turned on.
4191@item CATEGORY 4468@item CATEGORY
4469@cindex property, CATEGORY
4192For agenda view, a category set through a @code{:CATEGORY:} property 4470For agenda view, a category set through a @code{:CATEGORY:} property
4193applies to the entire subtree. 4471applies to the entire subtree.
4194@item ARCHIVE 4472@item ARCHIVE
4473@cindex property, ARCHIVE
4195For archiving, the @code{:ARCHIVE:} property may define the archive 4474For archiving, the @code{:ARCHIVE:} property may define the archive
4196location for the entire subtree (@pxref{Moving subtrees}). 4475location for the entire subtree (@pxref{Moving subtrees}).
4197@item LOGGING 4476@item LOGGING
4477@cindex property, LOGGING
4198The LOGGING property may define logging settings for an entry or a 4478The LOGGING property may define logging settings for an entry or a
4199subtree (@pxref{Tracking TODO state changes}). 4479subtree (@pxref{Tracking TODO state changes}).
4200@end table 4480@end table
@@ -4203,7 +4483,7 @@ subtree (@pxref{Tracking TODO state changes}).
4203@section Column view 4483@section Column view
4204 4484
4205A great way to view and edit properties in an outline tree is 4485A great way to view and edit properties in an outline tree is
4206@emph{column view}. In column view, each outline item is turned into a 4486@emph{column view}. In column view, each outline node is turned into a
4207table row. Columns in this table provide access to properties of the 4487table row. Columns in this table provide access to properties of the
4208entries. Org mode implements columns by overlaying a tabular structure 4488entries. Org mode implements columns by overlaying a tabular structure
4209over the headline of each item. While the headlines have been turned 4489over the headline of each item. While the headlines have been turned
@@ -4240,6 +4520,7 @@ done by defining a column format line.
4240 4520
4241To define a column format for an entire file, use a line like 4521To define a column format for an entire file, use a line like
4242 4522
4523@cindex #+COLUMNS
4243@example 4524@example
4244#+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO 4525#+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
4245@end example 4526@end example
@@ -4267,7 +4548,7 @@ A column definition sets the attributes of a column. The general
4267definition looks like this: 4548definition looks like this:
4268 4549
4269@example 4550@example
4270 %[width]property[(title)][@{summary-type@}] 4551 %[@var{width}]@var{property}[(@var{title})][@{@var{summary-type}@}]
4271@end example 4552@end example
4272 4553
4273@noindent 4554@noindent
@@ -4275,21 +4556,27 @@ Except for the percent sign and the property name, all items are
4275optional. The individual parts have the following meaning: 4556optional. The individual parts have the following meaning:
4276 4557
4277@example 4558@example
4278width @r{An integer specifying the width of the column in characters.} 4559@var{width} @r{An integer specifying the width of the column in characters.}
4279 @r{If omitted, the width will be determined automatically.} 4560 @r{If omitted, the width will be determined automatically.}
4280property @r{The property that should be edited in this column.} 4561@var{property} @r{The property that should be edited in this column.}
4281(title) @r{The header text for the column. If omitted, the} 4562(title) @r{The header text for the column. If omitted, the}
4282 @r{property name is used.} 4563 @r{property name is used.}
4283@{summary-type@} @r{The summary type. If specified, the column values for} 4564@{@var{summary-type}@} @r{The summary type. If specified, the column values for}
4284 @r{parent nodes are computed from the children.} 4565 @r{parent nodes are computed from the children.}
4285 @r{Supported summary types are:} 4566 @r{Supported summary types are:}
4286 @{+@} @r{Sum numbers in this column.} 4567 @{+@} @r{Sum numbers in this column.}
4287 @{+;%.1f@} @r{Like @samp{+}, but format result with @samp{%.1f}.} 4568 @{+;%.1f@} @r{Like @samp{+}, but format result with @samp{%.1f}.}
4288 @{$@} @r{Currency, short for @samp{+;%.2f}.} 4569 @{$@} @r{Currency, short for @samp{+;%.2f}.}
4289 @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.} 4570 @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.}
4290 @{X@} @r{Checkbox status, [X] if all children are [X].} 4571 @{X@} @r{Checkbox status, @samp{[X]} if all children are @samp{[X]}.}
4291 @{X/@} @r{Checkbox status, [n/m].} 4572 @{X/@} @r{Checkbox status, @samp{[n/m]}.}
4292 @{X%@} @r{Checkbox status, [n%].} 4573 @{X%@} @r{Checkbox status, @samp{[n%]}.}
4574 @{min@} @r{Smallest number in column.}
4575 @{max@} @r{Largest number.}
4576 @{mean@} @r{Arithmetic mean of numbers.}
4577 @{:min@} @r{Smallest time value in column.}
4578 @{:max@} @r{Largest time value.}
4579 @{:mean@} @r{Arithmetic mean of time values.}
4293@end example 4580@end example
4294 4581
4295@noindent 4582@noindent
@@ -4297,15 +4584,16 @@ Here is an example for a complete columns definition, along with allowed
4297values. 4584values.
4298 4585
4299@example 4586@example
4300:COLUMNS: %20ITEM %9Approved(Approved?)@{X@} %Owner %11Status \@footnote{Please note that the COLUMNS definition must be on a single line - it is wrapped here only because of formatting constraints.} 4587:COLUMNS: %20ITEM %9Approved(Approved?)@{X@} %Owner %11Status \@footnote{Please note that the COLUMNS definition must be on a single line---it is wrapped here only because of formatting constraints.}
4301 %10Time_Estimate@{:@} %CLOCKSUM 4588 %10Time_Estimate@{:@} %CLOCKSUM
4302:Owner_ALL: Tammy Mark Karl Lisa Don 4589:Owner_ALL: Tammy Mark Karl Lisa Don
4303:Status_ALL: "In progress" "Not started yet" "Finished" "" 4590:Status_ALL: "In progress" "Not started yet" "Finished" ""
4304:Approved_ALL: "[ ]" "[X]" 4591:Approved_ALL: "[ ]" "[X]"
4305@end example 4592@end example
4306 4593
4594@noindent
4307The first column, @samp{%25ITEM}, means the first 25 characters of the 4595The first column, @samp{%25ITEM}, means the first 25 characters of the
4308item itself, i.e. of the headline. You probably always should start the 4596item itself, @ie of the headline. You probably always should start the
4309column definition with the @samp{ITEM} specifier. The other specifiers 4597column definition with the @samp{ITEM} specifier. The other specifiers
4310create columns @samp{Owner} with a list of names as allowed values, for 4598create columns @samp{Owner} with a list of names as allowed values, for
4311@samp{Status} with four different possible values, and for a checkbox 4599@samp{Status} with four different possible values, and for a checkbox
@@ -4326,13 +4614,16 @@ in the subtree.
4326@tsubheading{Turning column view on and off} 4614@tsubheading{Turning column view on and off}
4327@kindex C-c C-x C-c 4615@kindex C-c C-x C-c
4328@item C-c C-x C-c 4616@item C-c C-x C-c
4329Create the column view for the local environment. This command searches 4617@vindex org-columns-default-format
4330the hierarchy, up from point, for a @code{:COLUMNS:} property that defines 4618Turn on column view. If the cursor is before the first headline in the file,
4331a format. When one is found, the column view table is established for 4619column view is turned on for the entire file, using the @code{#+COLUMNS}
4332the entire tree, starting from the entry that contains the @code{:COLUMNS:} 4620definition. If the cusor is somewhere inside the outline, this command
4333property. If none is found, the format is taken from the @code{#+COLUMNS} 4621searches the hierarchy, up from point, for a @code{:COLUMNS:} property that
4334line or from the variable @code{org-columns-default-format}, and column 4622defines a format. When one is found, the column view table is established
4335view is established for the current entry and its subtree. 4623for the tree starting at the entry that contains the @code{:COLUMNS:}
4624property. If no such property is found, the format is taken from the
4625@code{#+COLUMNS} line or from the variable @code{org-columns-default-format},
4626and column view is established for the current entry and its subtree.
4336@kindex r 4627@kindex r
4337@item r 4628@item r
4338Recreate the column view, to include recent changes made in the buffer. 4629Recreate the column view, to include recent changes made in the buffer.
@@ -4393,10 +4684,10 @@ Delete the current column.
4393 4684
4394Since column view is just an overlay over a buffer, it cannot be 4685Since column view is just an overlay over a buffer, it cannot be
4395exported or printed directly. If you want to capture a column view, use 4686exported or printed directly. If you want to capture a column view, use
4396this @code{columnview} dynamic block (@pxref{Dynamic blocks}). The frame 4687a @code{columnview} dynamic block (@pxref{Dynamic blocks}). The frame
4397of this block looks like this: 4688of this block looks like this:
4398 4689
4399@cindex #+BEGIN: columnview 4690@cindex #+BEGIN, columnview
4400@example 4691@example
4401* The column view 4692* The column view
4402#+BEGIN: columnview :hlines 1 :id "label" 4693#+BEGIN: columnview :hlines 1 :id "label"
@@ -4408,29 +4699,30 @@ of this block looks like this:
4408 4699
4409@table @code 4700@table @code
4410@item :id 4701@item :id
4411This is most important parameter. Column view is a feature that is 4702This is the most important parameter. Column view is a feature that is
4412often localized to a certain (sub)tree, and the capture block might be 4703often localized to a certain (sub)tree, and the capture block might be
4413in a different location in the file. To identify the tree whose view to 4704at a different location in the file. To identify the tree whose view to
4414capture, you can use 3 values: 4705capture, you can use 4 values:
4706@cindex property, ID
4415@example 4707@example
4416local @r{use the tree in which the capture block is located} 4708local @r{use the tree in which the capture block is located}
4417global @r{make a global view, including all headings in the file} 4709global @r{make a global view, including all headings in the file}
4418"file:path-to-file" 4710"file:@var{path-to-file}"
4419 @r{run column view at the top of this file} 4711 @r{run column view at the top of this file}
4420"ID" @r{call column view in the tree that has an @code{:ID:}} 4712"@var{ID}" @r{call column view in the tree that has an @code{:ID:}}
4421 @r{property with the value @i{label}. You can use} 4713 @r{property with the value @i{label}. You can use}
4422 @r{@kbd{M-x org-id-copy} to create a globally unique ID for} 4714 @r{@kbd{M-x org-id-copy} to create a globally unique ID for}
4423 @r{the current entry and copy it to the kill-ring.} 4715 @r{the current entry and copy it to the kill-ring.}
4424@end example 4716@end example
4425@item :hlines 4717@item :hlines
4426When @code{t}, insert a hline after every line. When a number N, insert 4718When @code{t}, insert an hline after every line. When a number @var{N}, insert
4427a hline before each headline with level @code{<= N}. 4719an hline before each headline with level @code{<= @var{N}}.
4428@item :vlines 4720@item :vlines
4429When set to @code{t}, enforce column groups to get vertical lines. 4721When set to @code{t}, force column groups to get vertical lines.
4430@item :maxlevel 4722@item :maxlevel
4431When set to a number, don't capture entries below this level. 4723When set to a number, don't capture entries below this level.
4432@item :skip-empty-rows 4724@item :skip-empty-rows
4433When set to @code{t}, skip row where the only non-empty specifier of the 4725When set to @code{t}, skip rows where the only non-empty specifier of the
4434column view is @code{ITEM}. 4726column view is @code{ITEM}.
4435 4727
4436@end table 4728@end table
@@ -4442,12 +4734,12 @@ The following commands insert or update the dynamic block:
4442@kindex C-c C-x i 4734@kindex C-c C-x i
4443@item C-c C-x i 4735@item C-c C-x i
4444Insert a dynamic block capturing a column view. You will be prompted 4736Insert a dynamic block capturing a column view. You will be prompted
4445for the scope or id of the view. 4737for the scope or ID of the view.
4446@kindex C-c C-c 4738@kindex C-c C-c
4447@item C-c C-c 4739@item C-c C-c
4448@kindex C-c C-x C-u 4740@kindex C-c C-x C-u
4449@itemx C-c C-x C-u 4741@itemx C-c C-x C-u
4450Update dynamical block at point. The cursor needs to be in the 4742Update dynamic block at point. The cursor needs to be in the
4451@code{#+BEGIN} line of the dynamic block. 4743@code{#+BEGIN} line of the dynamic block.
4452@kindex C-u C-c C-x C-u 4744@kindex C-u C-c C-x C-u
4453@item C-u C-c C-x C-u 4745@item C-u C-c C-x C-u
@@ -4456,10 +4748,18 @@ you have several clock table blocks in a buffer.
4456@end table 4748@end table
4457 4749
4458You can add formulas to the column view table and you may add plotting 4750You can add formulas to the column view table and you may add plotting
4459instructions in front of the table - these will survive an update of the 4751instructions in front of the table---these will survive an update of the
4460block. If there is a @code{#+TBLFM:} after the table, the table will 4752block. If there is a @code{#+TBLFM:} after the table, the table will
4461actually be recalculated automatically after an update. 4753actually be recalculated automatically after an update.
4462 4754
4755An alternative way to capture and process property values into a table is
4756provided by Eric Schulte's @file{org-collector.el} which is a contributed
4757package@footnote{Contributed packages are not part of Emacs, but are
4758distributed with the main distribution of Org (visit
4759@uref{http://orgmode.org}).}. It provides a general API to collect
4760properties from entries in a certain scope, and arbitrary Lisp expressions to
4761process these values before inserting them into a table or a dynamic block.
4762
4463@node Property API, , Column view, Properties and Columns 4763@node Property API, , Column view, Properties and Columns
4464@section The Property API 4764@section The Property API
4465@cindex properties, API 4765@cindex properties, API
@@ -4474,8 +4774,8 @@ property API}.
4474@chapter Dates and Times 4774@chapter Dates and Times
4475@cindex dates 4775@cindex dates
4476@cindex times 4776@cindex times
4477@cindex time stamps 4777@cindex timestamp
4478@cindex date stamps 4778@cindex date stamp
4479 4779
4480To assist project planning, TODO items can be labeled with a date and/or 4780To assist project planning, TODO items can be labeled with a date and/or
4481a time. The specially formatted string carrying the date and time 4781a time. The specially formatted string carrying the date and time
@@ -4495,40 +4795,40 @@ is used in a much wider sense.
4495 4795
4496 4796
4497@node Timestamps, Creating timestamps, Dates and Times, Dates and Times 4797@node Timestamps, Creating timestamps, Dates and Times, Dates and Times
4498@section Timestamps, deadlines and scheduling 4798@section Timestamps, deadlines, and scheduling
4499@cindex time stamps 4799@cindex timestamps
4500@cindex ranges, time 4800@cindex ranges, time
4501@cindex date stamps 4801@cindex date stamps
4502@cindex deadlines 4802@cindex deadlines
4503@cindex scheduling 4803@cindex scheduling
4504 4804
4505A time stamp is a specification of a date (possibly with time or a range 4805A timestamp is a specification of a date (possibly with a time or a range
4506of times) in a special format, either @samp{<2003-09-16 Tue>} or 4806of times) in a special format, either @samp{<2003-09-16 Tue>} or
4507@samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue 4807@samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue
450812:00-12:30>}@footnote{This is the standard ISO date/time format. To 480812:00-12:30>}@footnote{This is the standard ISO date/time format. To
4509use an alternative format, see @ref{Custom time format}.}. A time stamp 4809use an alternative format, see @ref{Custom time format}.}. A timestamp
4510can appear anywhere in the headline or body of an Org tree entry. Its 4810can appear anywhere in the headline or body of an Org tree entry. Its
4511presence causes entries to be shown on specific dates in the agenda 4811presence causes entries to be shown on specific dates in the agenda
4512(@pxref{Weekly/daily agenda}). We distinguish: 4812(@pxref{Weekly/daily agenda}). We distinguish:
4513 4813
4514@table @var 4814@table @var
4515@item Plain time stamp; Event; Appointment 4815@item Plain timestamp; Event; Appointment
4516@cindex timestamp 4816@cindex timestamp
4517A simple time stamp just assigns a date/time to an item. This is just 4817A simple timestamp just assigns a date/time to an item. This is just
4518like writing down an appointment or event in a paper agenda. In the 4818like writing down an appointment or event in a paper agenda. In the
4519timeline and agenda displays, the headline of an entry associated with a 4819timeline and agenda displays, the headline of an entry associated with a
4520plain time stamp will be shown exactly on that date. 4820plain timestamp will be shown exactly on that date.
4521 4821
4522@example 4822@example
4523* Meet Peter at the movies <2006-11-01 Wed 19:15> 4823* Meet Peter at the movies <2006-11-01 Wed 19:15>
4524* Discussion on climate change <2006-11-02 Thu 20:00-22:00> 4824* Discussion on climate change <2006-11-02 Thu 20:00-22:00>
4525@end example 4825@end example
4526 4826
4527@item Time stamp with repeater interval 4827@item Timestamp with repeater interval
4528@cindex timestamp, with repeater interval 4828@cindex timestamp, with repeater interval
4529A time stamp may contain a @emph{repeater interval}, indicating that it 4829A timestamp may contain a @emph{repeater interval}, indicating that it
4530applies not only on the given date, but again and again after a certain 4830applies not only on the given date, but again and again after a certain
4531interval of N days (d), weeks (w), months(m), or years(y). The 4831interval of N days (d), weeks (w), months (m), or years (y). The
4532following will show up in the agenda every Wednesday: 4832following will show up in the agenda every Wednesday:
4533 4833
4534@example 4834@example
@@ -4548,7 +4848,7 @@ package. For example
4548@item Time/Date range 4848@item Time/Date range
4549@cindex timerange 4849@cindex timerange
4550@cindex date range 4850@cindex date range
4551Two time stamps connected by @samp{--} denote a range. The headline 4851Two timestamps connected by @samp{--} denote a range. The headline
4552will be shown on the first and last day of the range, and on any dates 4852will be shown on the first and last day of the range, and on any dates
4553that are displayed and fall in the range. Here is an example: 4853that are displayed and fall in the range. Here is an example:
4554 4854
@@ -4557,11 +4857,11 @@ that are displayed and fall in the range. Here is an example:
4557 <2004-08-23 Mon>--<2004-08-26 Thu> 4857 <2004-08-23 Mon>--<2004-08-26 Thu>
4558@end example 4858@end example
4559 4859
4560@item Inactive time stamp 4860@item Inactive timestamp
4561@cindex timestamp, inactive 4861@cindex timestamp, inactive
4562@cindex inactive timestamp 4862@cindex inactive timestamp
4563Just like a plain time stamp, but with square brackets instead of 4863Just like a plain timestamp, but with square brackets instead of
4564angular ones. These time stamps are inactive in the sense that they do 4864angular ones. These timestamps are inactive in the sense that they do
4565@emph{not} trigger an entry to show up in the agenda. 4865@emph{not} trigger an entry to show up in the agenda.
4566 4866
4567@example 4867@example
@@ -4575,32 +4875,35 @@ angular ones. These time stamps are inactive in the sense that they do
4575@cindex creating timestamps 4875@cindex creating timestamps
4576@cindex timestamps, creating 4876@cindex timestamps, creating
4577 4877
4578For Org mode to recognize time stamps, they need to be in the specific 4878For Org mode to recognize timestamps, they need to be in the specific
4579format. All commands listed below produce time stamps in the correct 4879format. All commands listed below produce timestamps in the correct
4580format. 4880format.
4581 4881
4582@table @kbd 4882@table @kbd
4583@kindex C-c . 4883@kindex C-c .
4584@item C-c . 4884@item C-c .
4585Prompt for a date and insert a corresponding time stamp. When the cursor is 4885Prompt for a date and insert a corresponding timestamp. When the cursor is
4586at an existing time stamp in the buffer, the command is used to modify this 4886at an existing timestamp in the buffer, the command is used to modify this
4587timestamp instead of inserting a new one. When this command is used twice in 4887timestamp instead of inserting a new one. When this command is used twice in
4588succession, a time range is inserted. 4888succession, a time range is inserted.
4589@c 4889@c
4590@kindex C-u C-c .
4591@item C-u C-c .
4592Like @kbd{C-c .}, but use the alternative format which contains date
4593and time. The default time can be rounded to multiples of 5 minutes,
4594see the option @code{org-time-stamp-rounding-minutes}.
4595@c
4596@kindex C-c ! 4890@kindex C-c !
4597@item C-c ! 4891@item C-c !
4598Like @kbd{C-c .}, but insert an inactive time stamp that will not cause 4892Like @kbd{C-c .}, but insert an inactive timestamp that will not cause
4599an agenda entry. 4893an agenda entry.
4600@c 4894@c
4895@kindex C-u C-c .
4896@kindex C-u C-c !
4897@item C-u C-c .
4898@itemx C-u C-c !
4899@vindex org-time-stamp-rounding-minutes
4900Like @kbd{C-c .} and @kbd{C-c !}, but use the alternative format which
4901contains date and time. The default time can be rounded to multiples of 5
4902minutes, see the option @code{org-time-stamp-rounding-minutes}.
4903@c
4601@kindex C-c < 4904@kindex C-c <
4602@item C-c < 4905@item C-c <
4603Insert a time stamp corresponding to the cursor date in the Calendar. 4906Insert a timestamp corresponding to the cursor date in the Calendar.
4604@c 4907@c
4605@kindex C-c > 4908@kindex C-c >
4606@item C-c > 4909@item C-c >
@@ -4610,7 +4913,7 @@ instead.
4610@c 4913@c
4611@kindex C-c C-o 4914@kindex C-c C-o
4612@item C-c C-o 4915@item C-c C-o
4613Access the agenda for the date given by the time stamp or -range at 4916Access the agenda for the date given by the timestamp or -range at
4614point (@pxref{Weekly/daily agenda}). 4917point (@pxref{Weekly/daily agenda}).
4615@c 4918@c
4616@kindex S-@key{left} 4919@kindex S-@key{left}
@@ -4618,17 +4921,20 @@ point (@pxref{Weekly/daily agenda}).
4618@item S-@key{left} 4921@item S-@key{left}
4619@itemx S-@key{right} 4922@itemx S-@key{right}
4620Change date at cursor by one day. These key bindings conflict with 4923Change date at cursor by one day. These key bindings conflict with
4621CUA mode (@pxref{Conflicts}). 4924shift-selection and related modes (@pxref{Conflicts}).
4622@c 4925@c
4623@kindex S-@key{up} 4926@kindex S-@key{up}
4624@kindex S-@key{down} 4927@kindex S-@key{down}
4625@item S-@key{up} 4928@item S-@key{up}
4626@itemx S-@key{down} 4929@itemx S-@key{down}
4627Change the item under the cursor in a timestamp. The cursor can be on a 4930Change the item under the cursor in a timestamp. The cursor can be on a
4628year, month, day, hour or minute. Note that if the cursor is in a 4931year, month, day, hour or minute. When the timestamp contains a time range
4629headline and not at a time stamp, these same keys modify the priority of 4932like @samp{15:30-16:30}, modifying the first time will also shift the second,
4630an item. (@pxref{Priorities}). The key bindings also conflict with 4933shifting the time block with constant length. To change the length, modify
4631CUA mode (@pxref{Conflicts}). 4934the second time. Note that if the cursor is in a headline and not at a
4935timestamp, these same keys modify the priority of an item.
4936(@pxref{Priorities}). The key bindings also conflict with shift-selection and
4937related modes (@pxref{Conflicts}).
4632@c 4938@c
4633@kindex C-c C-y 4939@kindex C-c C-y
4634@cindex evaluate time range 4940@cindex evaluate time range
@@ -4649,6 +4955,7 @@ the following column).
4649@cindex date, reading in minibuffer 4955@cindex date, reading in minibuffer
4650@cindex time, reading in minibuffer 4956@cindex time, reading in minibuffer
4651 4957
4958@vindex org-read-date-prefer-future
4652When Org mode prompts for a date/time, the default is shown as an ISO 4959When Org mode prompts for a date/time, the default is shown as an ISO
4653date, and the prompt therefore seems to ask for an ISO date. But it 4960date, and the prompt therefore seems to ask for an ISO date. But it
4654will in fact accept any string containing some date and/or time 4961will in fact accept any string containing some date and/or time
@@ -4657,10 +4964,10 @@ can, for example, use @kbd{C-y} to paste a (possibly multi-line) string
4657copied from an email message. Org mode will find whatever information 4964copied from an email message. Org mode will find whatever information
4658is in there and derive anything you have not specified from the 4965is in there and derive anything you have not specified from the
4659@emph{default date and time}. The default is usually the current date 4966@emph{default date and time}. The default is usually the current date
4660and time, but when modifying an existing time stamp, or when entering 4967and time, but when modifying an existing timestamp, or when entering
4661the second stamp of a range, it is taken from the stamp in the buffer. 4968the second stamp of a range, it is taken from the stamp in the buffer.
4662When filling in information, Org mode assumes that most of the time you 4969When filling in information, Org mode assumes that most of the time you
4663will want to enter a date in the future: If you omit the month/year and 4970will want to enter a date in the future: if you omit the month/year and
4664the given day/month is @i{before} today, it will assume that you mean a 4971the given day/month is @i{before} today, it will assume that you mean a
4665future date@footnote{See the variable 4972future date@footnote{See the variable
4666@code{org-read-date-prefer-future}.}. 4973@code{org-read-date-prefer-future}.}.
@@ -4686,11 +4993,11 @@ w4 --> ISO week for of the current year @b{2006}
4686 4993
4687Furthermore you can specify a relative date by giving, as the 4994Furthermore you can specify a relative date by giving, as the
4688@emph{first} thing in the input: a plus/minus sign, a number and a 4995@emph{first} thing in the input: a plus/minus sign, a number and a
4689letter [dwmy] to indicate change in days weeks, months, years. With a 4996letter ([dwmy]) to indicate change in days, weeks, months, or years. With a
4690single plus or minus, the date is always relative to today. With a 4997single plus or minus, the date is always relative to today. With a
4691double plus or minus, it is relative to the default date. If instead of 4998double plus or minus, it is relative to the default date. If instead of
4692a single letter, you use the abbreviation of day name, the date will be 4999a single letter, you use the abbreviation of day name, the date will be
4693the nth such day. E.g. 5000the nth such day. @Eg
4694 5001
4695@example 5002@example
4696+0 --> today 5003+0 --> today
@@ -4699,14 +5006,17 @@ the nth such day. E.g.
4699+4 --> same as above 5006+4 --> same as above
4700+2w --> two weeks from today 5007+2w --> two weeks from today
4701++5 --> five days from default date 5008++5 --> five days from default date
4702+2tue --> second tuesday from now. 5009+2tue --> second Tuesday from now.
4703@end example 5010@end example
4704 5011
5012@vindex parse-time-months
5013@vindex parse-time-weekdays
4705The function understands English month and weekday abbreviations. If 5014The function understands English month and weekday abbreviations. If
4706you want to use unabbreviated names and/or other languages, configure 5015you want to use unabbreviated names and/or other languages, configure
4707the variables @code{parse-time-months} and @code{parse-time-weekdays}. 5016the variables @code{parse-time-months} and @code{parse-time-weekdays}.
4708 5017
4709@cindex calendar, for selecting date 5018@cindex calendar, for selecting date
5019@vindex org-popup-calendar-for-date-prompt
4710Parallel to the minibuffer prompt, a calendar is popped up@footnote{If 5020Parallel to the minibuffer prompt, a calendar is popped up@footnote{If
4711you don't need/want the calendar, configure the variable 5021you don't need/want the calendar, configure the variable
4712@code{org-popup-calendar-for-date-prompt}.}. When you exit the date 5022@code{org-popup-calendar-for-date-prompt}.}. When you exit the date
@@ -4734,6 +5044,7 @@ M-S-@key{right}/@key{left} @r{One month forward/backward.}
4734@key{RET} @r{Choose date in calendar.} 5044@key{RET} @r{Choose date in calendar.}
4735@end example 5045@end example
4736 5046
5047@vindex org-read-date-display-live
4737The actions of the date/time prompt may seem complex, but I assure you they 5048The actions of the date/time prompt may seem complex, but I assure you they
4738will grow on you, and you will start getting annoyed by pretty much any other 5049will grow on you, and you will start getting annoyed by pretty much any other
4739way of entering a date/time out there. To help you understand what is going 5050way of entering a date/time out there. To help you understand what is going
@@ -4747,6 +5058,8 @@ minibuffer@footnote{If you find this distracting, turn the display of with
4747@cindex time format, custom 5058@cindex time format, custom
4748@cindex date format, custom 5059@cindex date format, custom
4749 5060
5061@vindex org-display-custom-times
5062@vindex org-time-stamp-custom-formats
4750Org mode uses the standard ISO notation for dates and times as it is 5063Org mode uses the standard ISO notation for dates and times as it is
4751defined in ISO 8601. If you cannot get used to this and require another 5064defined in ISO 8601. If you cannot get used to this and require another
4752representation of date and time to keep you happy, you can get it by 5065representation of date and time to keep you happy, you can get it by
@@ -4761,28 +5074,28 @@ Toggle the display of custom formats for dates and times.
4761 5074
4762@noindent 5075@noindent
4763Org mode needs the default format for scanning, so the custom date/time 5076Org mode needs the default format for scanning, so the custom date/time
4764format does not @emph{replace} the default format - instead it is put 5077format does not @emph{replace} the default format---instead it is put
4765@emph{over} the default format using text properties. This has the 5078@emph{over} the default format using text properties. This has the
4766following consequences: 5079following consequences:
4767@itemize @bullet 5080@itemize @bullet
4768@item 5081@item
4769You cannot place the cursor onto a time stamp anymore, only before or 5082You cannot place the cursor onto a timestamp anymore, only before or
4770after. 5083after.
4771@item 5084@item
4772The @kbd{S-@key{up}/@key{down}} keys can no longer be used to adjust 5085The @kbd{S-@key{up}/@key{down}} keys can no longer be used to adjust
4773each component of a time stamp. If the cursor is at the beginning of 5086each component of a timestamp. If the cursor is at the beginning of
4774the stamp, @kbd{S-@key{up}/@key{down}} will change the stamp by one day, 5087the stamp, @kbd{S-@key{up}/@key{down}} will change the stamp by one day,
4775just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the 5088just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the
4776time will be changed by one minute. 5089time will be changed by one minute.
4777@item 5090@item
4778If the time stamp contains a range of clock times or a repeater, these 5091If the timestamp contains a range of clock times or a repeater, these
4779will not be overlayed, but remain in the buffer as they were. 5092will not be overlayed, but remain in the buffer as they were.
4780@item 5093@item
4781When you delete a time stamp character-by-character, it will only 5094When you delete a timestamp character-by-character, it will only
4782disappear from the buffer after @emph{all} (invisible) characters 5095disappear from the buffer after @emph{all} (invisible) characters
4783belonging to the ISO timestamp have been removed. 5096belonging to the ISO timestamp have been removed.
4784@item 5097@item
4785If the custom time stamp format is longer than the default and you are 5098If the custom timestamp format is longer than the default and you are
4786using dates in tables, table alignment will be messed up. If the custom 5099using dates in tables, table alignment will be messed up. If the custom
4787format is shorter, things do work as expected. 5100format is shorter, things do work as expected.
4788@end itemize 5101@end itemize
@@ -4791,7 +5104,7 @@ format is shorter, things do work as expected.
4791@node Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and Times 5104@node Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and Times
4792@section Deadlines and scheduling 5105@section Deadlines and scheduling
4793 5106
4794A time stamp may be preceded by special keywords to facilitate planning: 5107A timestamp may be preceded by special keywords to facilitate planning:
4795 5108
4796@table @var 5109@table @var
4797@item DEADLINE 5110@item DEADLINE
@@ -4800,6 +5113,7 @@ A time stamp may be preceded by special keywords to facilitate planning:
4800Meaning: the task (most likely a TODO item, though not necessarily) is supposed 5113Meaning: the task (most likely a TODO item, though not necessarily) is supposed
4801to be finished on that date. 5114to be finished on that date.
4802 5115
5116@vindex org-deadline-warning-days
4803On the deadline date, the task will be listed in the agenda. In 5117On the deadline date, the task will be listed in the agenda. In
4804addition, the agenda for @emph{today} will carry a warning about the 5118addition, the agenda for @emph{today} will carry a warning about the
4805approaching or missed deadline, starting 5119approaching or missed deadline, starting
@@ -4822,12 +5136,13 @@ period of 5 days @code{DEADLINE: <2004-02-29 Sun -5d>}.
4822Meaning: you are planning to start working on that task on the given 5136Meaning: you are planning to start working on that task on the given
4823date. 5137date.
4824 5138
5139@vindex org-agenda-skip-scheduled-if-done
4825The headline will be listed under the given date@footnote{It will still 5140The headline will be listed under the given date@footnote{It will still
4826be listed on that date after it has been marked DONE. If you don't like 5141be listed on that date after it has been marked DONE. If you don't like
4827this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In 5142this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In
4828addition, a reminder that the scheduled date has passed will be present 5143addition, a reminder that the scheduled date has passed will be present
4829in the compilation for @emph{today}, until the entry is marked DONE. 5144in the compilation for @emph{today}, until the entry is marked DONE.
4830I.e., the task will automatically be forwarded until completed. 5145@Ie the task will automatically be forwarded until completed.
4831 5146
4832@example 5147@example
4833*** TODO Call Trillian for a date on New Years Eve. 5148*** TODO Call Trillian for a date on New Years Eve.
@@ -4838,15 +5153,15 @@ I.e., the task will automatically be forwarded until completed.
4838@b{Important:} Scheduling an item in Org mode should @i{not} be 5153@b{Important:} Scheduling an item in Org mode should @i{not} be
4839understood in the same way that we understand @i{scheduling a meeting}. 5154understood in the same way that we understand @i{scheduling a meeting}.
4840Setting a date for a meeting is just a simple appointment, you should 5155Setting a date for a meeting is just a simple appointment, you should
4841mark this entry with a simple plain time stamp, to get this item shown 5156mark this entry with a simple plain timestamp, to get this item shown
4842on the date where it applies. This is a frequent mis-understanding from 5157on the date where it applies. This is a frequent misunderstanding by
4843Org-users. In Org mode, @i{scheduling} means setting a date when you 5158Org users. In Org mode, @i{scheduling} means setting a date when you
4844want to start working on an action item. 5159want to start working on an action item.
4845@end table 5160@end table
4846 5161
4847You may use time stamps with repeaters in scheduling and deadline 5162You may use timestamps with repeaters in scheduling and deadline
4848entries. Org mode will issue early and late warnings based on the 5163entries. Org mode will issue early and late warnings based on the
4849assumption that the time stamp represents the @i{nearest instance} of 5164assumption that the timestamp represents the @i{nearest instance} of
4850the repeater. However, the use of diary sexp entries like 5165the repeater. However, the use of diary sexp entries like
4851@c 5166@c
4852@code{<%%(diary-float t 42)>} 5167@code{<%%(diary-float t 42)>}
@@ -4864,7 +5179,7 @@ sexp entry matches.
4864@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling 5179@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling
4865@subsection Inserting deadlines or schedules 5180@subsection Inserting deadlines or schedules
4866 5181
4867The following commands allow to quickly insert a deadline or to schedule 5182The following commands allow you to quickly insert a deadline or to schedule
4868an item: 5183an item:
4869 5184
4870@table @kbd 5185@table @kbd
@@ -4876,15 +5191,6 @@ happen in the line directly following the headline. When called with a
4876prefix arg, an existing deadline will be removed from the entry. 5191prefix arg, an existing deadline will be removed from the entry.
4877@c FIXME Any CLOSED timestamp will be removed.???????? 5192@c FIXME Any CLOSED timestamp will be removed.????????
4878@c 5193@c
4879@kindex C-c / d
4880@cindex sparse tree, for deadlines
4881@item C-c / d
4882Create a sparse tree with all deadlines that are either past-due, or
4883which will become due within @code{org-deadline-warning-days}.
4884With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
4885prefix, check that many days. For example, @kbd{C-1 C-c / d} shows
4886all deadlines due tomorrow.
4887@c
4888@kindex C-c C-s 5194@kindex C-c C-s
4889@item C-c C-s 5195@item C-c C-s
4890Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will 5196Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
@@ -4900,23 +5206,44 @@ Mark the current entry for agenda action. After you have marked the entry
4900like this, you can open the agenda or the calendar to find an appropriate 5206like this, you can open the agenda or the calendar to find an appropriate
4901date. With the cursor on the selected date, press @kbd{k s} or @kbd{k d} to 5207date. With the cursor on the selected date, press @kbd{k s} or @kbd{k d} to
4902schedule the marked item. 5208schedule the marked item.
5209@c
5210@kindex C-c / d
5211@cindex sparse tree, for deadlines
5212@item C-c / d
5213@vindex org-deadline-warning-days
5214Create a sparse tree with all deadlines that are either past-due, or
5215which will become due within @code{org-deadline-warning-days}.
5216With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
5217prefix, check that many days. For example, @kbd{C-1 C-c / d} shows
5218all deadlines due tomorrow.
5219@c
5220@kindex C-c / b
5221@item C-c / b
5222Sparse tree for deadlines and scheduled items before a given date.
5223@c
5224@kindex C-c / a
5225@item C-c / a
5226Sparse tree for deadlines and scheduled items after a given date.
4903@end table 5227@end table
4904 5228
4905@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling 5229@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling
4906@subsection Repeated tasks 5230@subsection Repeated tasks
5231@cindex tasks, repeated
5232@cindex repeated tasks
4907 5233
4908Some tasks need to be repeated again and again. Org mode helps to 5234Some tasks need to be repeated again and again. Org mode helps to
4909organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED, 5235organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED,
4910or plain time stamp. In the following example 5236or plain timestamp. In the following example
4911@example 5237@example
4912** TODO Pay the rent 5238** TODO Pay the rent
4913 DEADLINE: <2005-10-01 Sat +1m> 5239 DEADLINE: <2005-10-01 Sat +1m>
4914@end example 5240@end example
4915the @code{+1m} is a repeater; the intended interpretation is that the 5241@noindent
4916task has a deadline on <2005-10-01> and repeats itself every (one) month 5242the @code{+1m} is a repeater; the intended interpretation is that the task
4917starting from that time. If you need both a repeater and a special 5243has a deadline on <2005-10-01> and repeats itself every (one) month starting
4918warning period in a deadline entry, the repeater comes first and the 5244from that time. If you need both a repeater and a special warning period in
4919warning period last: @code{DEADLINE: <2005-10-01 Sat +1m -3d>}. 5245a deadline entry, the repeater should come first and the warning period last:
5246@code{DEADLINE: <2005-10-01 Sat +1m -3d>}.
4920 5247
4921Deadlines and scheduled items produce entries in the agenda when they 5248Deadlines and scheduled items produce entries in the agenda when they
4922are over-due, so it is important to be able to mark such an entry as 5249are over-due, so it is important to be able to mark such an entry as
@@ -4926,7 +5253,7 @@ agenda. The problem with this is, however, that then also the
4926@emph{next} instance of the repeated entry will not be active. Org mode 5253@emph{next} instance of the repeated entry will not be active. Org mode
4927deals with this in the following way: When you try to mark such an entry 5254deals with this in the following way: When you try to mark such an entry
4928DONE (using @kbd{C-c C-t}), it will shift the base date of the repeating 5255DONE (using @kbd{C-c C-t}), it will shift the base date of the repeating
4929time stamp by the repeater interval, and immediately set the entry state 5256timestamp by the repeater interval, and immediately set the entry state
4930back to TODO. In the example above, setting the state to DONE would 5257back to TODO. In the example above, setting the state to DONE would
4931actually switch the date like this: 5258actually switch the date like this:
4932 5259
@@ -4935,6 +5262,7 @@ actually switch the date like this:
4935 DEADLINE: <2005-11-01 Tue +1m> 5262 DEADLINE: <2005-11-01 Tue +1m>
4936@end example 5263@end example
4937 5264
5265@vindex org-log-repeat
4938A timestamp@footnote{You can change this using the option 5266A timestamp@footnote{You can change this using the option
4939@code{org-log-repeat}, or the @code{#+STARTUP} options @code{logrepeat}, 5267@code{org-log-repeat}, or the @code{#+STARTUP} options @code{logrepeat},
4940@code{lognoterepeat}, and @code{nologrepeat}. With @code{lognoterepeat}, you 5268@code{lognoterepeat}, and @code{nologrepeat}. With @code{lognoterepeat}, you
@@ -4946,7 +5274,7 @@ visible in the agenda when checking past dates, but all future instances
4946will be visible. 5274will be visible.
4947 5275
4948With the @samp{+1m} cookie, the date shift will always be exactly one 5276With the @samp{+1m} cookie, the date shift will always be exactly one
4949month. So if you have not payed the rent for three months, marking this 5277month. So if you have not paid the rent for three months, marking this
4950entry DONE will still keep it as an overdue deadline. Depending on the 5278entry DONE will still keep it as an overdue deadline. Depending on the
4951task, this may not be the best way to handle it. For example, if you 5279task, this may not be the best way to handle it. For example, if you
4952forgot to call you father for 3 weeks, it does not make sense to call 5280forgot to call you father for 3 weeks, it does not make sense to call
@@ -4969,42 +5297,80 @@ special repeaters markers with @samp{++} and @samp{.+}. For example:
4969@end example 5297@end example
4970 5298
4971You may have both scheduling and deadline information for a specific 5299You may have both scheduling and deadline information for a specific
4972task - just make sure that the repeater intervals on both are the same. 5300task---just make sure that the repeater intervals on both are the same.
5301
5302An alternative to using a repeater is to create a number of copies of a task
5303subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was
5304created for this purpose, it is described in @ref{Structure editing}.
5305
4973 5306
4974@node Clocking work time, Effort estimates, Deadlines and scheduling, Dates and Times 5307@node Clocking work time, Effort estimates, Deadlines and scheduling, Dates and Times
4975@section Clocking work time 5308@section Clocking work time
4976 5309
4977Org mode allows you to clock the time you spent on specific tasks in a 5310Org mode allows you to clock the time you spend on specific tasks in a
4978project. When you start working on an item, you can start the clock. 5311project. When you start working on an item, you can start the clock.
4979When you stop working on that task, or when you mark the task done, the 5312When you stop working on that task, or when you mark the task done, the
4980clock is stopped and the corresponding time interval is recorded. It 5313clock is stopped and the corresponding time interval is recorded. It
4981also computes the total time spent on each subtree of a project. 5314also computes the total time spent on each subtree of a project.
4982 5315
5316Normally, the clock does not survive exiting and re-entering Emacs, but you
5317can arrange for the clock information to persist across Emacs sessions with
5318
5319@lisp
5320(setq org-clock-persist t)
5321(org-clock-persistence-insinuate)
5322@end lisp
5323
4983@table @kbd 5324@table @kbd
4984@kindex C-c C-x C-i 5325@kindex C-c C-x C-i
4985@item C-c C-x C-i 5326@item C-c C-x C-i
5327@vindex org-clock-into-drawer
4986Start the clock on the current item (clock-in). This inserts the CLOCK 5328Start the clock on the current item (clock-in). This inserts the CLOCK
4987keyword together with a timestamp. If this is not the first clocking of 5329keyword together with a timestamp. If this is not the first clocking of
4988this item, the multiple CLOCK lines will be wrapped into a 5330this item, the multiple CLOCK lines will be wrapped into a
4989@code{:CLOCK:} drawer (see also the variable 5331@code{:LOGBOOK:} drawer (see also the variable
4990@code{org-clock-into-drawer}). When called with a @kbd{C-u} prefix argument, 5332@code{org-clock-into-drawer}). When called with a @kbd{C-u} prefix argument,
4991select the task from a list of recently clocked tasks. With two @kbd{C-u 5333select the task from a list of recently clocked tasks. With two @kbd{C-u
4992C-u} prefixes, clock into the task at point and mark it as the default task. 5334C-u} prefixes, clock into the task at point and mark it as the default task.
4993The default task will always be available when selecting a clocking task, 5335The default task will always be available when selecting a clocking task,
4994with letter @kbd{d}. 5336with letter @kbd{d}.@*
5337@cindex property: CLOCK_MODELINE_TOTAL
5338@cindex property: LAST_REPEAT
5339@vindex org-clock-modeline-total
5340While the clock is running, the current clocking time is shown in the mode
5341line, along with the title of the task. The clock time shown will be all
5342time ever clocked for this task and its children. If the task has an effort
5343estimate (@pxref{Effort estimates}), the mode line displays the current
5344clocking time against it@footnote{To add an effort estimate ``on the fly'',
5345hook a function doing this to @code{org-clock-in-prepare-hook}.} If the task
5346is a repeating one (@pxref{Repeated tasks}), only the time since the last
5347reset of the task @footnote{as recorded by the @code{LAST_REPEAT} property}
5348will be shown. More control over what time is shown can be exercised with
5349the @code{CLOCK_MODELINE_TOTAL} property. It may have the values
5350@code{current} to show only the current clocking instance, @code{today} to
5351show all time clocked on this tasks today (see also the variable
5352@code{org-extend-today-until}), @code{all} to include all time, or
5353@code{auto} which is the default@footnote{See also the variable
5354@code{org-clock-modeline-total}.}.@* Clicking with @kbd{mouse-1} onto the
5355mode line entry will pop up a menu with clocking options.
4995@kindex C-c C-x C-o 5356@kindex C-c C-x C-o
4996@item C-c C-x C-o 5357@item C-c C-x C-o
5358@vindex org-log-note-clock-out
4997Stop the clock (clock-out). This inserts another timestamp at the same 5359Stop the clock (clock-out). This inserts another timestamp at the same
4998location where the clock was last started. It also directly computes 5360location where the clock was last started. It also directly computes
4999the resulting time in inserts it after the time range as @samp{=> 5361the resulting time in inserts it after the time range as @samp{=>
5000HH:MM}. See the variable @code{org-log-note-clock-out} for the 5362HH:MM}. See the variable @code{org-log-note-clock-out} for the
5001possibility to record an additional note together with the clock-out 5363possibility to record an additional note together with the clock-out
5002time stamp@footnote{The corresponding in-buffer setting is: 5364timestamp@footnote{The corresponding in-buffer setting is:
5003@code{#+STARTUP: lognoteclock-out}}. 5365@code{#+STARTUP: lognoteclock-out}}.
5366@kindex C-c C-x C-e
5367@item C-c C-x C-e
5368Update the effort estimate for the current clock task.
5004@kindex C-c C-y 5369@kindex C-c C-y
5005@item C-c C-y 5370@kindex C-c C-c
5006Recompute the time interval after changing one of the time stamps. This 5371@item C-c C-y @ @ @r{or}@ @ C-c C-c
5007is only necessary if you edit the time stamps directly. If you change 5372Recompute the time interval after changing one of the timestamps. This
5373is only necessary if you edit the timestamps directly. If you change
5008them with @kbd{S-@key{cursor}} keys, the update is automatic. 5374them with @kbd{S-@key{cursor}} keys, the update is automatic.
5009@kindex C-c C-t 5375@kindex C-c C-t
5010@item C-c C-t 5376@item C-c C-t
@@ -5021,6 +5387,7 @@ Jump to the entry that contains the currently running clock. With a
5021tasks. 5387tasks.
5022@kindex C-c C-x C-d 5388@kindex C-c C-x C-d
5023@item C-c C-x C-d 5389@item C-c C-x C-d
5390@vindex org-remove-highlights-with-change
5024Display time summaries for each subtree in the current buffer. This 5391Display time summaries for each subtree in the current buffer. This
5025puts overlays at the end of each headline, showing the total time 5392puts overlays at the end of each headline, showing the total time
5026recorded under that heading, including the time of any subheadings. You 5393recorded under that heading, including the time of any subheadings. You
@@ -5030,11 +5397,11 @@ when you change the buffer (see variable
5030@kindex C-c C-x C-r 5397@kindex C-c C-x C-r
5031@item C-c C-x C-r 5398@item C-c C-x C-r
5032Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock 5399Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock
5033report as an Org mode table into the current file. When the cursor is 5400report as an Org-mode table into the current file. When the cursor is
5034at an existing clock table, just update it. When called with a prefix 5401at an existing clock table, just update it. When called with a prefix
5035argument, jump to the first clock report in the current document and 5402argument, jump to the first clock report in the current document and
5036update it. 5403update it.
5037@cindex #+BEGIN: clocktable 5404@cindex #+BEGIN, clocktable
5038@example 5405@example
5039#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file 5406#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
5040#+END: clocktable 5407#+END: clocktable
@@ -5044,12 +5411,12 @@ If such a block already exists at point, its content is replaced by the
5044new table. The @samp{BEGIN} line can specify options: 5411new table. The @samp{BEGIN} line can specify options:
5045@example 5412@example
5046:maxlevel @r{Maximum level depth to which times are listed in the table.} 5413:maxlevel @r{Maximum level depth to which times are listed in the table.}
5047:emphasize @r{When @code{t}, emphasize level one and level two items} 5414:emphasize @r{When @code{t}, emphasize level one and level two items.}
5048:scope @r{The scope to consider. This can be any of the following:} 5415:scope @r{The scope to consider. This can be any of the following:}
5049 nil @r{the current buffer or narrowed region} 5416 nil @r{the current buffer or narrowed region}
5050 file @r{the full current buffer} 5417 file @r{the full current buffer}
5051 subtree @r{the subtree where the clocktable is located} 5418 subtree @r{the subtree where the clocktable is located}
5052 treeN @r{the surrounding level N tree, for example @code{tree3}} 5419 tree@var{N} @r{the surrounding level @var{N} tree, for example @code{tree3}}
5053 tree @r{the surrounding level 1 tree} 5420 tree @r{the surrounding level 1 tree}
5054 agenda @r{all agenda files} 5421 agenda @r{all agenda files}
5055 ("file"..) @r{scan these files} 5422 ("file"..) @r{scan these files}
@@ -5062,30 +5429,33 @@ new table. The @samp{BEGIN} line can specify options:
5062 2007-12 @r{December 2007} 5429 2007-12 @r{December 2007}
5063 2007-W50 @r{ISO-week 50 in 2007} 5430 2007-W50 @r{ISO-week 50 in 2007}
5064 2007 @r{the year 2007} 5431 2007 @r{the year 2007}
5065 today, yesterday, today-N @r{a relative day} 5432 today, yesterday, today-@var{N} @r{a relative day}
5066 thisweek, lastweek, thisweek-N @r{a relative week} 5433 thisweek, lastweek, thisweek-@var{N} @r{a relative week}
5067 thismonth, lastmonth, thismonth-N @r{a relative month} 5434 thismonth, lastmonth, thismonth-@var{N} @r{a relative month}
5068 thisyear, lastyear, thisyear-N @r{a relative year} 5435 thisyear, lastyear, thisyear-@var{N} @r{a relative year}
5069 @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.} 5436 @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.}
5070:tstart @r{A time string specifying when to start considering times} 5437:tstart @r{A time string specifying when to start considering times.}
5071:tend @r{A time string specifying when to stop considering times} 5438:tend @r{A time string specifying when to stop considering times.}
5072:step @r{@code{week} or @code{day}, to split the table into chunks.} 5439:step @r{@code{week} or @code{day}, to split the table into chunks.}
5073 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} 5440 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.}
5074:link @r{Link the item headlines in the table to their origins} 5441:link @r{Link the item headlines in the table to their origins.}
5075:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} 5442:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.}
5076 @r{As a special case, @samp{:formula %} adds column with % time.} 5443 @r{As a special case, @samp{:formula %} adds a column with % time.}
5077 @r{If you do not specify a formula here, any existing formula} 5444 @r{If you do not specify a formula here, any existing formula.}
5078 @r{below the clock table will survive updates and be evaluated.} 5445 @r{below the clock table will survive updates and be evaluated.}
5446:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,}
5447 @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.}
5079@end example 5448@end example
5080So to get a clock summary of the current level 1 tree, for the current 5449To get a clock summary of the current level 1 tree, for the current
5081day, you could write 5450day, you could write
5082@example 5451@example
5083#+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t 5452#+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t
5084#+END: clocktable 5453#+END: clocktable
5085@end example 5454@end example
5455@noindent
5086and to use a specific time range you could write@footnote{Note that all 5456and to use a specific time range you could write@footnote{Note that all
5087parameters must be specified in a single line - the line is broken here 5457parameters must be specified in a single line---the line is broken here
5088only to fit it onto the manual.} 5458only to fit it into the manual.}
5089@example 5459@example
5090#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>" 5460#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
5091 :tend "<2006-08-10 Thu 12:00>" 5461 :tend "<2006-08-10 Thu 12:00>"
@@ -5100,7 +5470,7 @@ A summary of the current subtree with % times would be
5100@item C-c C-c 5470@item C-c C-c
5101@kindex C-c C-x C-u 5471@kindex C-c C-x C-u
5102@itemx C-c C-x C-u 5472@itemx C-c C-x C-u
5103Update dynamical block at point. The cursor needs to be in the 5473Update dynamic block at point. The cursor needs to be in the
5104@code{#+BEGIN} line of the dynamic block. 5474@code{#+BEGIN} line of the dynamic block.
5105@kindex C-u C-c C-x C-u 5475@kindex C-u C-c C-x C-u
5106@item C-u C-c C-x C-u 5476@item C-u C-c C-x C-u
@@ -5123,6 +5493,8 @@ worked on or closed during a day.
5123@section Effort estimates 5493@section Effort estimates
5124@cindex effort estimates 5494@cindex effort estimates
5125 5495
5496@cindex property, Effort
5497@vindex org-effort-property
5126If you want to plan your work in a very detailed way, or if you need to 5498If you want to plan your work in a very detailed way, or if you need to
5127produce offers with quotations of the estimated work effort, you may want to 5499produce offers with quotations of the estimated work effort, you may want to
5128assign effort estimates to entries. If you are also clocking your work, you 5500assign effort estimates to entries. If you are also clocking your work, you
@@ -5141,6 +5513,8 @@ you want to clock your time). For a specific buffer you can use
5141@end example 5513@end example
5142 5514
5143@noindent 5515@noindent
5516@vindex org-global-properties
5517@vindex org-columns-default-format
5144or, even better, you can set up these values globally by customizing the 5518or, even better, you can set up these values globally by customizing the
5145variables @code{org-global-properties} and @code{org-columns-default-format}. 5519variables @code{org-global-properties} and @code{org-columns-default-format}.
5146In particular if you want to use this setup also in the agenda, a global 5520In particular if you want to use this setup also in the agenda, a global
@@ -5151,6 +5525,7 @@ mode, and to use @kbd{S-@key{right}} and @kbd{S-@key{left}} to change the
5151value. The values you enter will immediately be summed up in the hierarchy. 5525value. The values you enter will immediately be summed up in the hierarchy.
5152In the column next to it, any clocked time will be displayed. 5526In the column next to it, any clocked time will be displayed.
5153 5527
5528@vindex org-agenda-columns-add-appointments-to-effort-sum
5154If you switch to column view in the daily/weekly agenda, the effort column 5529If you switch to column view in the daily/weekly agenda, the effort column
5155will summarize the estimated work effort for each day@footnote{Please note 5530will summarize the estimated work effort for each day@footnote{Please note
5156the pitfalls of summing hierarchical data in a flat list (@pxref{Agenda 5531the pitfalls of summing hierarchical data in a flat list (@pxref{Agenda
@@ -5189,8 +5564,8 @@ Once the timer list is started, you can also use @kbd{M-@key{RET}} to insert
5189new timer items. 5564new timer items.
5190@kindex C-c C-x , 5565@kindex C-c C-x ,
5191@item C-c C-x , 5566@item C-c C-x ,
5192Pause the timer, or continue it if it is already paused. With prefix 5567Pause the timer, or continue it if it is already paused.
5193argument, stop it entirely. 5568@c removed the sentence because it is redundant to the following item
5194@kindex C-u C-c C-x , 5569@kindex C-u C-c C-x ,
5195@item C-u C-c C-x , 5570@item C-u C-c C-x ,
5196Stop the timer. After this, you can only start a new timer, not continue the 5571Stop the timer. After this, you can only start a new timer, not continue the
@@ -5213,39 +5588,42 @@ not started at exactly the right moment.
5213 5588
5214An important part of any organization system is the ability to quickly 5589An important part of any organization system is the ability to quickly
5215capture new ideas and tasks, and to associate reference material with them. 5590capture new ideas and tasks, and to associate reference material with them.
5216Org uses the @file{remember} package to create tasks, and stores files 5591Org uses the @file{remember.el} package to create tasks, and stores files
5217related to a task (@i{attachments}) in a special directory. 5592related to a task (@i{attachments}) in a special directory.
5218 5593
5219@menu 5594@menu
5220* Remember:: Capture new tasks/ideas with little interruption 5595* Remember:: Capture new tasks/ideas with little interruption
5221* Attachments:: Add files to tasks. 5596* Attachments:: Add files to tasks.
5597* RSS Feeds:: Getting input from RSS feeds
5598* Protocols:: External (@eg Browser) access to Emacs and Org
5222@end menu 5599@end menu
5223 5600
5224@node Remember, Attachments, Capture, Capture 5601@node Remember, Attachments, Capture, Capture
5225@section Remember 5602@section Remember
5226@cindex @file{remember.el} 5603@cindex @file{remember.el}
5227 5604
5228The @i{Remember} package by John Wiegley lets you store quick notes with 5605The Remember package by John Wiegley lets you store quick notes with little
5229little interruption of your work flow. See 5606interruption of your work flow. It is an excellent way to add new notes and
5230@uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more 5607tasks to Org files. The @code{remember.el} package is part of Emacs 23, not
5231information. It is an excellent way to add new notes and tasks to 5608Emacs 22. See @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for
5232Org files. Org significantly expands the possibilities of 5609more information.
5233@i{remember}: You may define templates for different note types, and 5610
5234associate target files and headlines with specific templates. It also 5611Org significantly expands the possibilities of Remember: you may define
5235allows you to select the location where a note should be stored 5612templates for different note types, and associate target files and headlines
5236interactively, on the fly. 5613with specific templates. It also allows you to select the location where a
5614note should be stored interactively, on the fly.
5237 5615
5238@menu 5616@menu
5239* Setting up Remember:: Some code for .emacs to get things going 5617* Setting up Remember for Org:: Some code for .emacs to get things going
5240* Remember templates:: Define the outline of different note types 5618* Remember templates:: Define the outline of different note types
5241* Storing notes:: Directly get the note to where it belongs 5619* Storing notes:: Directly get the note to where it belongs
5242* Refiling notes:: Moving a note or task to a project 5620* Refiling notes:: Moving a note or task to a project
5243@end menu 5621@end menu
5244 5622
5245@node Setting up Remember, Remember templates, Remember, Remember 5623@node Setting up Remember for Org, Remember templates, Remember, Remember
5246@subsection Setting up Remember 5624@subsection Setting up Remember for Org
5247 5625
5248The following customization will tell @i{remember} to use org files as 5626The following customization will tell Remember to use Org files as
5249target, and to create annotations compatible with Org links. 5627target, and to create annotations compatible with Org links.
5250 5628
5251@example 5629@example
@@ -5255,33 +5633,34 @@ target, and to create annotations compatible with Org links.
5255(define-key global-map "\C-cr" 'org-remember) 5633(define-key global-map "\C-cr" 'org-remember)
5256@end example 5634@end example
5257 5635
5636@noindent
5258The last line binds the command @code{org-remember} to a global 5637The last line binds the command @code{org-remember} to a global
5259key@footnote{Please select your own key, @kbd{C-c r} is only a 5638key@footnote{Please select your own key, @kbd{C-c r} is only a
5260suggestion.}. @code{org-remember} basically just calls @code{remember}, 5639suggestion.}. @code{org-remember} basically just calls Remember,
5261but it makes a few things easier: If there is an active region, it will 5640but it makes a few things easier: if there is an active region, it will
5262automatically copy the region into the remember buffer. It also allows 5641automatically copy the region into the Remember buffer. It also allows
5263to jump to the buffer and location where remember notes are being 5642to jump to the buffer and location where Remember notes are being
5264stored: Just call @code{org-remember} with a prefix argument. If you 5643stored: just call @code{org-remember} with a prefix argument. If you
5265use two prefix arguments, Org jumps to the location where the last 5644use two prefix arguments, Org jumps to the location where the last
5266remember note was stored. 5645remember note was stored.
5267 5646
5268The remember buffer will actually use @code{org-mode} as its major mode, so 5647The Remember buffer will actually use @code{org-mode} as its major mode, so
5269that all editing features of Org-mode are available. In addition to this, a 5648that all editing features of Org mode are available. In addition to this, a
5270minor mode @code{org-remember-mode} is turned on, for the single purpose that 5649minor mode @code{org-remember-mode} is turned on, for the single purpose that
5271you can use its keymap @code{org-remember-mode-map} to overwrite some of 5650you can use its keymap @code{org-remember-mode-map} to overwrite some of
5272Org-mode's key bindings. 5651Org mode's key bindings.
5273 5652
5274You can also call @code{org-remember} in a special way from the agenda, 5653You can also call @code{org-remember} in a special way from the agenda,
5275using the @kbd{k r} key combination. With this access, any time stamps 5654using the @kbd{k r} key combination. With this access, any timestamps
5276inserted by the selected remember template (see below) will default to 5655inserted by the selected Remember template (see below) will default to
5277the cursor date in the agenda, rather than to the current date. 5656the cursor date in the agenda, rather than to the current date.
5278 5657
5279@node Remember templates, Storing notes, Setting up Remember, Remember 5658@node Remember templates, Storing notes, Setting up Remember for Org, Remember
5280@subsection Remember templates 5659@subsection Remember templates
5281@cindex templates, for remember 5660@cindex templates, for Remember
5282 5661
5283In combination with Org, you can use templates to generate 5662In combination with Org, you can use templates to generate
5284different types of @i{remember} notes. For example, if you would like 5663different types of Remember notes. For example, if you would like
5285to use one template to create general TODO entries, another one for 5664to use one template to create general TODO entries, another one for
5286journal entries, and a third one for collecting random ideas, you could 5665journal entries, and a third one for collecting random ideas, you could
5287use: 5666use:
@@ -5293,21 +5672,23 @@ use:
5293 ("Idea" ?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas"))) 5672 ("Idea" ?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas")))
5294@end example 5673@end example
5295 5674
5675@vindex org-remember-default-headline
5676@vindex org-directory
5296@noindent In these entries, the first string is just a name, and the 5677@noindent In these entries, the first string is just a name, and the
5297character specifies how to select the template. It is useful if the 5678character specifies how to select the template. It is useful if the
5298character is also the first letter of the name. The next string specifies 5679character is also the first letter of the name. The next string specifies
5299the template. Two more (optional) strings give the file in which, and the 5680the template. Two more (optional) strings give the file in which, and the
5300headline under which the new note should be stored. The file (if not present 5681headline under which, the new note should be stored. The file (if not present
5301or @code{nil}) defaults to @code{org-default-notes-file}, the heading to 5682or @code{nil}) defaults to @code{org-default-notes-file}, the heading to
5302@code{org-remember-default-headline}. If the file name is not an absolute 5683@code{org-remember-default-headline}. If the file name is not an absolute
5303path, it will be interpreted relative to @code{org-directory}. The heading 5684path, it will be interpreted relative to @code{org-directory}. The heading
5304can also be the symbols @code{top} or @code{bottom} to send note as level 1 5685can also be the symbols @code{top} or @code{bottom} to send notes as level 1
5305entries to the beginning or end of the file, respectively. 5686entries to the beginning or end of the file, respectively.
5306 5687
5307An optional sixth element specifies the contexts in which the user can select 5688An optional sixth element specifies the contexts in which the user can select
5308the template. This element can be a list of major modes or a function. 5689the template. This element can be a list of major modes or a function.
5309@code{org-remember} will first check whether the function returns @code{t} or 5690@code{org-remember} will first check whether the function returns @code{t} or
5310if we are in any of the listed major mode, and exclude templates for which 5691if we are in any of the listed major modes, and exclude templates for which
5311this condition is not fulfilled. Templates that do not specify this element 5692this condition is not fulfilled. Templates that do not specify this element
5312at all, or that use @code{nil} or @code{t} as a value will always be 5693at all, or that use @code{nil} or @code{t} as a value will always be
5313selectable. 5694selectable.
@@ -5321,6 +5702,7 @@ So for example:
5321 ("Idea" ?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas"))) 5702 ("Idea" ?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas")))
5322@end example 5703@end example
5323 5704
5705@noindent
5324The first template will only be available when invoking @code{org-remember} 5706The first template will only be available when invoking @code{org-remember}
5325from an buffer in @code{emacs-lisp-mode}. The second template will only be 5707from an buffer in @code{emacs-lisp-mode}. The second template will only be
5326available when the function @code{my-check} returns @code{t}. The third 5708available when the function @code{my-check} returns @code{t}. The third
@@ -5331,14 +5713,14 @@ something, Org will prompt for a key to select the template (if you have
5331more than one template) and then prepare the buffer like 5713more than one template) and then prepare the buffer like
5332@example 5714@example
5333* TODO 5715* TODO
5334 [[file:link to where you called remember]] 5716 [[file:@var{link to where you called remember}]]
5335@end example 5717@end example
5336 5718
5337@noindent 5719@noindent
5338During expansion of the template, special @kbd{%}-escapes allow dynamic 5720During expansion of the template, special @kbd{%}-escapes allow dynamic
5339insertion of content: 5721insertion of content:
5340@example 5722@example
5341%^@{prompt@} @r{prompt the user for a string and replace this sequence with it.} 5723%^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.}
5342 @r{You may specify a default value and a completion table with} 5724 @r{You may specify a default value and a completion table with}
5343 @r{%^@{prompt|default|completion2|completion3...@}} 5725 @r{%^@{prompt|default|completion2|completion3...@}}
5344 @r{The arrow keys access a prompt-specific history.} 5726 @r{The arrow keys access a prompt-specific history.}
@@ -5346,9 +5728,9 @@ insertion of content:
5346%A @r{like @code{%a}, but prompt for the description part} 5728%A @r{like @code{%a}, but prompt for the description part}
5347%i @r{initial content, the region when remember is called with C-u.} 5729%i @r{initial content, the region when remember is called with C-u.}
5348 @r{The entire text will be indented like @code{%i} itself.} 5730 @r{The entire text will be indented like @code{%i} itself.}
5349%t @r{time stamp, date only} 5731%t @r{timestamp, date only}
5350%T @r{time stamp with date and time} 5732%T @r{timestamp with date and time}
5351%u, %U @r{like the above, but inactive time stamps} 5733%u, %U @r{like the above, but inactive timestamps}
5352%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}} 5734%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}}
5353 @r{You may define a prompt like @code{%^@{Birthday@}t}} 5735 @r{You may define a prompt like @code{%^@{Birthday@}t}}
5354%n @r{user name (taken from @code{user-full-name})} 5736%n @r{user name (taken from @code{user-full-name})}
@@ -5360,10 +5742,10 @@ insertion of content:
5360%k @r{title of currently clocked task} 5742%k @r{title of currently clocked task}
5361%K @r{link to currently clocked task} 5743%K @r{link to currently clocked task}
5362%^G @r{prompt for tags, with completion all tags in all agenda files.} 5744%^G @r{prompt for tags, with completion all tags in all agenda files.}
5363%^@{prop@}p @r{Prompt the user for a value for property @code{prop}} 5745%^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}}
5364%:keyword @r{specific information for certain link types, see below} 5746%:keyword @r{specific information for certain link types, see below}
5365%[pathname] @r{insert the contents of the file given by @code{pathname}} 5747%[@var{file}] @r{insert the contents of the file given by @var{file}}
5366%(sexp) @r{evaluate elisp @code{(sexp)} and replace with the result} 5748%(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result}
5367%! @r{immediately store note after completing the template} 5749%! @r{immediately store note after completing the template}
5368 @r{(skipping the @kbd{C-c C-c} that normally triggers storing)} 5750 @r{(skipping the @kbd{C-c C-c} that normally triggers storing)}
5369%& @r{jump to target location immediately after storing note} 5751%& @r{jump to target location immediately after storing note}
@@ -5376,6 +5758,7 @@ hyperlink types}), any property you store with
5376@code{org-store-link-props} can be accessed in remember templates in a 5758@code{org-store-link-props} can be accessed in remember templates in a
5377similar way.}: 5759similar way.}:
5378 5760
5761@vindex org-from-is-user-regexp
5379@example 5762@example
5380Link type | Available keywords 5763Link type | Available keywords
5381-------------------+---------------------------------------------- 5764-------------------+----------------------------------------------
@@ -5406,29 +5789,31 @@ template that will be filled with the previous context information.
5406@node Storing notes, Refiling notes, Remember templates, Remember 5789@node Storing notes, Refiling notes, Remember templates, Remember
5407@subsection Storing notes 5790@subsection Storing notes
5408 5791
5409When you are finished preparing a note with @i{remember}, you have to press 5792@vindex org-remember-clock-out-on-exit
5793When you are finished preparing a note with Remember, you have to press
5410@kbd{C-c C-c} to file the note away. If you have started the clock in the 5794@kbd{C-c C-c} to file the note away. If you have started the clock in the
5411remember buffer, you will first be asked if you want to clock out 5795Remember buffer, you will first be asked if you want to clock out
5412now@footnote{To avoid this query, configure the variable 5796now@footnote{To avoid this query, configure the variable
5413@code{org-remember-clock-out-on-exit}.}. If you answer @kbd{n}, the clock 5797@code{org-remember-clock-out-on-exit}.}. If you answer @kbd{n}, the clock
5414will continue to run after the note was filed away. 5798will continue to run after the note was filed away.
5415 5799
5416The handler will then store the note in the file and under the headline 5800The handler will then store the note in the file and under the headline
5417specified in the template, or it will use the default file and headlines. 5801specified in the template, or it will use the default file and headline.
5418The window configuration will be restored, sending you back to the working 5802The window configuration will be restored, sending you back to the working
5419context before the call to @code{remember}. To re-use the location found 5803context before the call to Remember. To re-use the location found
5420during the last call to @code{remember}, exit the remember buffer with 5804during the last call to Remember, exit the Remember buffer with
5421@kbd{C-0 C-c C-c}, i.e. specify a zero prefix argument to @kbd{C-c C-c}. 5805@kbd{C-0 C-c C-c}, @ie specify a zero prefix argument to @kbd{C-c C-c}.
5422Another special case is @kbd{C-2 C-c C-c} which files the note as a child of 5806Another special case is @kbd{C-2 C-c C-c} which files the note as a child of
5423the currently clocked item. 5807the currently clocked item.
5424 5808
5809@vindex org-remember-store-without-prompt
5425If you want to store the note directly to a different place, use 5810If you want to store the note directly to a different place, use
5426@kbd{C-1 C-c C-c} instead to exit remember@footnote{Configure the 5811@kbd{C-1 C-c C-c} instead to exit Remember@footnote{Configure the
5427variable @code{org-remember-store-without-prompt} to make this behavior 5812variable @code{org-remember-store-without-prompt} to make this behavior
5428the default.}. The handler will then first prompt for a target file - 5813the default.}. The handler will then first prompt for a target file---if
5429if you press @key{RET}, the value specified for the template is used. 5814you press @key{RET}, the value specified for the template is used.
5430Then the command offers the headings tree of the selected file, with the 5815Then the command offers the headings tree of the selected file, with the
5431cursor position at the default headline (if you had specified one in the 5816cursor position at the default headline (if you specified one in the
5432template). You can either immediately press @key{RET} to get the note 5817template). You can either immediately press @key{RET} to get the note
5433placed there. Or you can use the following keys to find a different 5818placed there. Or you can use the following keys to find a different
5434location: 5819location:
@@ -5444,6 +5829,7 @@ u @r{One level up.}
5444Pressing @key{RET} or @key{left} or @key{right} 5829Pressing @key{RET} or @key{left} or @key{right}
5445then leads to the following result. 5830then leads to the following result.
5446 5831
5832@vindex org-reverse-note-order
5447@multitable @columnfractions 0.2 0.15 0.65 5833@multitable @columnfractions 0.2 0.15 0.65
5448@item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted} 5834@item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
5449@item on headline @tab @key{RET} @tab as sublevel of the heading at cursor, first or last 5835@item on headline @tab @key{RET} @tab as sublevel of the heading at cursor, first or last
@@ -5456,7 +5842,7 @@ then leads to the following result.
5456@end multitable 5842@end multitable
5457 5843
5458Before inserting the text into a tree, the function ensures that the text has 5844Before inserting the text into a tree, the function ensures that the text has
5459a headline, i.e. a first line that starts with a @samp{*}. If not, a 5845a headline, @ie a first line that starts with a @samp{*}. If not, a
5460headline is constructed from the current date. If you have indented the text 5846headline is constructed from the current date. If you have indented the text
5461of the note below the headline, the indentation will be adapted if inserting 5847of the note below the headline, the indentation will be adapted if inserting
5462the note into the tree requires demotion from level 1. 5848the note into the tree requires demotion from level 1.
@@ -5468,13 +5854,18 @@ the note into the tree requires demotion from level 1.
5468Remember is usually used to quickly capture notes and tasks into one or 5854Remember is usually used to quickly capture notes and tasks into one or
5469a few capture lists. When reviewing the captured data, you may want to 5855a few capture lists. When reviewing the captured data, you may want to
5470refile some of the entries into a different list, for example into a 5856refile some of the entries into a different list, for example into a
5471project. Cutting, finding the right location and then pasting the note 5857project. Cutting, finding the right location, and then pasting the note
5472is cumbersome. To simplify this process, you can use the following 5858is cumbersome. To simplify this process, you can use the following
5473special command: 5859special command:
5474 5860
5475@table @kbd 5861@table @kbd
5476@kindex C-c C-w 5862@kindex C-c C-w
5477@item C-c C-w 5863@item C-c C-w
5864@vindex org-reverse-note-order
5865@vindex org-refile-targets
5866@vindex org-refile-use-outline-path
5867@vindex org-outline-path-complete-in-steps
5868@vindex org-refile-allow-creating-parent-nodes
5478Refile the entry or region at point. This command offers possible locations 5869Refile the entry or region at point. This command offers possible locations
5479for refiling the entry and lets you select one with completion. The item (or 5870for refiling the entry and lets you select one with completion. The item (or
5480all items in the region) is filed below the target heading as a subitem. 5871all items in the region) is filed below the target heading as a subitem.
@@ -5485,7 +5876,9 @@ targets, but you can have more complex definitions across a number of files.
5485See the variable @code{org-refile-targets} for details. If you would like to 5876See the variable @code{org-refile-targets} for details. If you would like to
5486select a location via a file-path-like completion along the outline path, see 5877select a location via a file-path-like completion along the outline path, see
5487the variables @code{org-refile-use-outline-path} and 5878the variables @code{org-refile-use-outline-path} and
5488@code{org-outline-path-complete-in-steps}. 5879@code{org-outline-path-complete-in-steps}. If you would like to be able to
5880create new nodes as new parents for for refiling on the fly, check the
5881variable @code{org-refile-allow-creating-parent-nodes}.
5489@kindex C-u C-c C-w 5882@kindex C-u C-c C-w
5490@item C-u C-c C-w 5883@item C-u C-c C-w
5491Use the refile interface to jump to a heading. 5884Use the refile interface to jump to a heading.
@@ -5494,10 +5887,12 @@ Use the refile interface to jump to a heading.
5494Jump to the location where @code{org-refile} last moved a tree to. 5887Jump to the location where @code{org-refile} last moved a tree to.
5495@end table 5888@end table
5496 5889
5497@node Attachments, , Remember, Capture 5890
5891@node Attachments, RSS Feeds, Remember, Capture
5498@section Attachments 5892@section Attachments
5499@cindex attachments 5893@cindex attachments
5500 5894
5895@vindex org-attach-directory
5501It is often useful to associate reference material with an outline node/task. 5896It is often useful to associate reference material with an outline node/task.
5502Small chunks of plain text can simply be stored in the subtree of a project. 5897Small chunks of plain text can simply be stored in the subtree of a project.
5503Hyperlinks (@pxref{Hyperlinks}) can be used to establish associations with 5898Hyperlinks (@pxref{Hyperlinks}) can be used to establish associations with
@@ -5506,13 +5901,13 @@ source code files belonging to a project. Another method is @i{attachments},
5506which are files located in a directory belonging to an outline node. Org 5901which are files located in a directory belonging to an outline node. Org
5507uses directories named by the unique ID of each entry. These directories are 5902uses directories named by the unique ID of each entry. These directories are
5508located in the @file{data} directory which lives in the same directory where 5903located in the @file{data} directory which lives in the same directory where
5509your org-file lives@footnote{If you move entries or Org-files from one 5904your Org file lives@footnote{If you move entries or Org files from one
5510directory to the next, you may want to configure @code{org-attach-directory} 5905directory to another, you may want to configure @code{org-attach-directory}
5511to contain an absolute path.}. If you initialize this directory with 5906to contain an absolute path.}. If you initialize this directory with
5512@code{git-init}, Org will automatically commit changes when it sees them. 5907@code{git init}, Org will automatically commit changes when it sees them.
5513The attachment system has been contributed to Org by John Wiegley. 5908The attachment system has been contributed to Org by John Wiegley.
5514 5909
5515In cases where this seems better, you can also attach a directory of your 5910In cases where it seems better to do so, you can also attach a directory of your
5516choice to an entry. You can also make children inherit the attachment 5911choice to an entry. You can also make children inherit the attachment
5517directory from a parent, so that an entire subtree uses the same attached 5912directory from a parent, so that an entire subtree uses the same attached
5518directory. 5913directory.
@@ -5530,6 +5925,7 @@ to select a command:
5530@table @kbd 5925@table @kbd
5531@kindex C-c C-a a 5926@kindex C-c C-a a
5532@item a 5927@item a
5928@vindex org-attach-method
5533Select a file and move it into the task's attachment directory. The file 5929Select a file and move it into the task's attachment directory. The file
5534will be copied, moved, or linked, depending on @code{org-attach-method}. 5930will be copied, moved, or linked, depending on @code{org-attach-method}.
5535Note that hard links are not supported on all systems. 5931Note that hard links are not supported on all systems.
@@ -5552,6 +5948,7 @@ attachments yourself.
5552 5948
5553@kindex C-c C-a o 5949@kindex C-c C-a o
5554@item o 5950@item o
5951@vindex org-file-apps
5555Open current task's attachment. If there are more than one, prompt for a 5952Open current task's attachment. If there are more than one, prompt for a
5556file name first. Opening will follow the rules set by @code{org-file-apps}. 5953file name first. Opening will follow the rules set by @code{org-file-apps}.
5557For more details, see the information on following hyperlinks 5954For more details, see the information on following hyperlinks
@@ -5567,7 +5964,7 @@ Open the current task's attachment directory.
5567 5964
5568@kindex C-c C-a F 5965@kindex C-c C-a F
5569@item F 5966@item F
5570Also open the directory, but force using @code{dired} in Emacs. 5967Also open the directory, but force using @command{dired} in Emacs.
5571 5968
5572@kindex C-c C-a d 5969@kindex C-c C-a d
5573@item d 5970@item d
@@ -5576,20 +5973,80 @@ Select and delete a single attachment.
5576@kindex C-c C-a D 5973@kindex C-c C-a D
5577@item D 5974@item D
5578Delete all of a task's attachments. A safer way is to open the directory in 5975Delete all of a task's attachments. A safer way is to open the directory in
5579dired and delete from there. 5976@command{dired} and delete from there.
5580 5977
5581@kindex C-c C-a s 5978@kindex C-c C-a s
5582@item C-c C-a s 5979@item C-c C-a s
5980@cindex property, ATTACH_DIR
5583Set a specific directory as the entry's attachment directory. This works by 5981Set a specific directory as the entry's attachment directory. This works by
5584putting the directory path into the @code{ATTACH_DIR} property. 5982putting the directory path into the @code{ATTACH_DIR} property.
5585 5983
5586@kindex C-c C-a i 5984@kindex C-c C-a i
5587@item C-c C-a i 5985@item C-c C-a i
5986@cindex property, ATTACH_DIR_INHERIT
5588Set the @code{ATTACH_DIR_INHERIT} property, so that children will use the 5987Set the @code{ATTACH_DIR_INHERIT} property, so that children will use the
5589same directory for attachments as the parent. 5988same directory for attachments as the parent does.
5989@end table
5590@end table 5990@end table
5991
5992@node RSS Feeds, Protocols, Attachments, Capture
5993@section RSS feeds
5994@cindex RSS feeds
5995
5996Org has the capability to add and change entries based on information found in
5997RSS feeds. You could use this to make a task out of each new podcast in a
5998podcast feed. Or you could use a phone-based note-creating service on the
5999web to import tasks into Org. To access feeds, you need to configure the
6000variable @code{org-feed-alist}. The docstring of this variable has detailed
6001information. Here is just an example:
6002
6003@example
6004(setq org-feed-alist
6005 '(("ReQall" "http://www.reqall.com/user/feeds/rss/a1b2c3....."
6006 "~/org/feeds.org" "ReQall Entries")
6007@end example
6008@noindent
6009will configure that new items from the feed provided by @file{reqall.com}
6010will result in new entries in the file @file{~/org/feeds.org} under the
6011heading @samp{ReQall Entries}, whenever the following command is used:
6012
6013@table @kbd
6014@kindex C-c C-x g
6015@item C-c C-x g
6016Collect items from the feeds configured in @code{org-feed-alist} and act upon
6017them.
6018@kindex C-c C-x G
6019@item C-c C-x G
6020Prompt for a feed name and go to the inbox configured for this feed.
5591@end table 6021@end table
5592 6022
6023Under the same headline, Org will create a drawer @samp{FEEDSTATUS} in which
6024it will store information about the status of items in the feed, to avoid
6025adding the same item several times. You should add @samp{FEEDSTATUS} to the
6026list of drawers in that file:
6027
6028@example
6029#+DRAWERS: LOGBOOK PROPERTIES FEEDSTATUS
6030@end example
6031
6032For more information, see @file{org-feed.el} and the docstring of
6033@code{org-feed-alist}.
6034
6035@node Protocols, , RSS Feeds, Capture
6036@section Protocols for external access
6037@cindex protocols, for external access
6038@cindex emacsserver
6039
6040You can set up Org for handling protocol calls from outside applications that
6041are passed to Emacs through the @file{emacsserver}. For example, you can
6042configure bookmarks in your web browser to send a link to the current page to
6043Org and create a note from it using Remember (@pxref{Remember}). Or you
6044could create a bookmark that will tell Emacs to open the local source file of
6045a remote website you are looking at with the browser. See
6046@uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed
6047documentation and setup instructions.
6048
6049
5593@node Agenda Views, Embedded LaTeX, Capture, Top 6050@node Agenda Views, Embedded LaTeX, Capture, Top
5594@chapter Agenda Views 6051@chapter Agenda Views
5595@cindex agenda views 6052@cindex agenda views
@@ -5600,7 +6057,7 @@ files. To get an overview of open action items, or of events that are
5600important for a particular date, this information must be collected, 6057important for a particular date, this information must be collected,
5601sorted and displayed in an organized way. 6058sorted and displayed in an organized way.
5602 6059
5603Org can select items based on various criteria, and display them 6060Org can select items based on various criteria and display them
5604in a separate buffer. Seven different view types are provided: 6061in a separate buffer. Seven different view types are provided:
5605 6062
5606@itemize @bullet 6063@itemize @bullet
@@ -5611,14 +6068,14 @@ for specific dates,
5611a @emph{TODO list} that covers all unfinished 6068a @emph{TODO list} that covers all unfinished
5612action items, 6069action items,
5613@item 6070@item
5614a @emph{match view}, showings headlines based on the tags, properties and 6071a @emph{match view}, showings headlines based on the tags, properties, and
5615TODO state associated with them, 6072TODO state associated with them,
5616@item 6073@item
5617a @emph{timeline view} that shows all events in a single Org file, 6074a @emph{timeline view} that shows all events in a single Org file,
5618in time-sorted view, 6075in time-sorted view,
5619@item 6076@item
5620a @emph{keyword search view} that shows all entries from multiple files 6077a @emph{keyword search view} that shows all entries from multiple files
5621that contain specified keywords. 6078that contain specified keywords,
5622@item 6079@item
5623a @emph{stuck projects view} showing projects that currently don't move 6080a @emph{stuck projects view} showing projects that currently don't move
5624along, and 6081along, and
@@ -5633,6 +6090,8 @@ buffer}. This buffer is read-only, but provides commands to visit the
5633corresponding locations in the original Org files, and even to 6090corresponding locations in the original Org files, and even to
5634edit these files remotely. 6091edit these files remotely.
5635 6092
6093@vindex org-agenda-window-setup
6094@vindex org-agenda-restore-windows-after-quit
5636Two variables control how the agenda buffer is displayed and whether the 6095Two variables control how the agenda buffer is displayed and whether the
5637window configuration is restored when the agenda exits: 6096window configuration is restored when the agenda exits:
5638@code{org-agenda-window-setup} and 6097@code{org-agenda-window-setup} and
@@ -5645,6 +6104,7 @@ window configuration is restored when the agenda exits:
5645* Presentation and sorting:: How agenda items are prepared for display 6104* Presentation and sorting:: How agenda items are prepared for display
5646* Agenda commands:: Remote editing of Org trees 6105* Agenda commands:: Remote editing of Org trees
5647* Custom agenda views:: Defining special searches and views 6106* Custom agenda views:: Defining special searches and views
6107* Exporting Agenda Views::
5648* Agenda column view:: Using column view for collected entries 6108* Agenda column view:: Using column view for collected entries
5649@end menu 6109@end menu
5650 6110
@@ -5653,6 +6113,7 @@ window configuration is restored when the agenda exits:
5653@cindex agenda files 6113@cindex agenda files
5654@cindex files for agenda 6114@cindex files for agenda
5655 6115
6116@vindex org-agenda-files
5656The information to be shown is normally collected from all @emph{agenda 6117The information to be shown is normally collected from all @emph{agenda
5657files}, the files listed in the variable 6118files}, the files listed in the variable
5658@code{org-agenda-files}@footnote{If the value of that variable is not a 6119@code{org-agenda-files}@footnote{If the value of that variable is not a
@@ -5661,8 +6122,8 @@ maintained in that external file.}. If a directory is part of this list,
5661all files with the extension @file{.org} in this directory will be part 6122all files with the extension @file{.org} in this directory will be part
5662of the list. 6123of the list.
5663 6124
5664Thus even if you only work with a single Org file, this file should 6125Thus, even if you only work with a single Org file, that file should
5665be put into that list@footnote{When using the dispatcher, pressing 6126be put into the list@footnote{When using the dispatcher, pressing
5666@kbd{<} before selecting a command will actually limit the command to 6127@kbd{<} before selecting a command will actually limit the command to
5667the current file, and ignore @code{org-agenda-files} until the next 6128the current file, and ignore @code{org-agenda-files} until the next
5668dispatcher command.}. You can customize @code{org-agenda-files}, but 6129dispatcher command.}. You can customize @code{org-agenda-files}, but
@@ -5693,9 +6154,9 @@ buffers.
5693The Org menu contains the current list of files and can be used 6154The Org menu contains the current list of files and can be used
5694to visit any of them. 6155to visit any of them.
5695 6156
5696If you would like to focus the agenda temporarily onto a file not in 6157If you would like to focus the agenda temporarily on a file not in
5697this list, or onto just one file in the list or even only a subtree in a 6158this list, or on just one file in the list, or even on only a subtree in a
5698file, this can be done in different ways. For a single agenda command, 6159file, then this can be done in different ways. For a single agenda command,
5699you may press @kbd{<} once or several times in the dispatcher 6160you may press @kbd{<} once or several times in the dispatcher
5700(@pxref{Agenda dispatcher}). To restrict the agenda scope for an 6161(@pxref{Agenda dispatcher}). To restrict the agenda scope for an
5701extended period, use the following commands: 6162extended period, use the following commands:
@@ -5715,26 +6176,26 @@ Remove the permanent restriction created by @kbd{C-c C-x <}.
5715@end table 6176@end table
5716 6177
5717@noindent 6178@noindent
5718When working with @file{Speedbar}, you can use the following commands in 6179When working with @file{speedbar.el}, you can use the following commands in
5719the Speedbar frame: 6180the Speedbar frame:
5720@table @kbd 6181@table @kbd
5721@kindex < 6182@kindex <
5722@item < @r{in the speedbar frame} 6183@item < @r{in the speedbar frame}
5723Permanently restrict the agenda to the item at the cursor in the 6184Permanently restrict the agenda to the item---either an Org file or a subtree
5724Speedbar frame, either an Org file or a subtree in such a file. 6185in such a file---at the cursor in the Speedbar frame.
5725If there is a window displaying an agenda view, the new restriction takes 6186If there is a window displaying an agenda view, the new restriction takes
5726effect immediately. 6187effect immediately.
5727@kindex > 6188@kindex >
5728@item > @r{in the speedbar frame} 6189@item > @r{in the speedbar frame}
5729Lift the restriction again. 6190Lift the restriction.
5730@end table 6191@end table
5731 6192
5732@node Agenda dispatcher, Built-in agenda views, Agenda files, Agenda Views 6193@node Agenda dispatcher, Built-in agenda views, Agenda files, Agenda Views
5733@section The agenda dispatcher 6194@section The agenda dispatcher
5734@cindex agenda dispatcher 6195@cindex agenda dispatcher
5735@cindex dispatching agenda commands 6196@cindex dispatching agenda commands
5736The views are created through a dispatcher that should be bound to a 6197The views are created through a dispatcher, which should be bound to a
5737global key, for example @kbd{C-c a} (@pxref{Installation}). In the 6198global key---for example @kbd{C-c a} (@pxref{Installation}). In the
5738following we will assume that @kbd{C-c a} is indeed how the dispatcher 6199following we will assume that @kbd{C-c a} is indeed how the dispatcher
5739is accessed and list keyboard access to commands accordingly. After 6200is accessed and list keyboard access to commands accordingly. After
5740pressing @kbd{C-c a}, an additional letter is required to execute a 6201pressing @kbd{C-c a}, an additional letter is required to execute a
@@ -5753,8 +6214,9 @@ Create the timeline view for the current buffer (@pxref{Timeline}).
5753Create a list of entries selected by a boolean expression of keywords 6214Create a list of entries selected by a boolean expression of keywords
5754and/or regular expressions that must or must not occur in the entry. 6215and/or regular expressions that must or must not occur in the entry.
5755@item / 6216@item /
6217@vindex org-agenda-text-search-extra-files
5756Search for a regular expression in all agenda files and additionally in 6218Search for a regular expression in all agenda files and additionally in
5757the files listed in @code{org-agenda-multi-occur-extra-files}. This 6219the files listed in @code{org-agenda-text-search-extra-files}. This
5758uses the Emacs command @code{multi-occur}. A prefix argument can be 6220uses the Emacs command @code{multi-occur}. A prefix argument can be
5759used to specify the number of context lines for each match, default is 6221used to specify the number of context lines for each match, default is
57601. 62221.
@@ -5769,7 +6231,7 @@ selecting the command.
5769If there is an active region, restrict the following agenda command to 6231If there is an active region, restrict the following agenda command to
5770the region. Otherwise, restrict it to the current subtree@footnote{For 6232the region. Otherwise, restrict it to the current subtree@footnote{For
5771backward compatibility, you can also press @kbd{0} to restrict to the 6233backward compatibility, you can also press @kbd{0} to restrict to the
5772current buffer.}. After pressing @kbd{< <}, you still need to press the 6234current region/subtree.}. After pressing @kbd{< <}, you still need to press the
5773character selecting the command. 6235character selecting the command.
5774@end table 6236@end table
5775 6237
@@ -5806,7 +6268,8 @@ paper agenda, showing all the tasks for the current week or day.
5806@cindex org-agenda, command 6268@cindex org-agenda, command
5807@kindex C-c a a 6269@kindex C-c a a
5808@item C-c a a 6270@item C-c a a
5809Compile an agenda for the current week from a list of org files. The agenda 6271@vindex org-agenda-ndays
6272Compile an agenda for the current week from a list of Org files. The agenda
5810shows the entries for each day. With a numeric prefix@footnote{For backward 6273shows the entries for each day. With a numeric prefix@footnote{For backward
5811compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be 6274compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be
5812listed before the agenda. This feature is deprecated, use the dedicated TODO 6275listed before the agenda. This feature is deprecated, use the dedicated TODO
@@ -5840,7 +6303,7 @@ agenda, you only need to customize the variable
5840@end lisp 6303@end lisp
5841 6304
5842@noindent After that, everything will happen automatically. All diary 6305@noindent After that, everything will happen automatically. All diary
5843entries including holidays, anniversaries etc will be included in the 6306entries including holidays, anniversaries, etc., will be included in the
5844agenda buffer created by Org mode. @key{SPC}, @key{TAB}, and 6307agenda buffer created by Org mode. @key{SPC}, @key{TAB}, and
5845@key{RET} can be used from the agenda buffer to jump to the diary 6308@key{RET} can be used from the agenda buffer to jump to the diary
5846file in order to edit existing diary entries. The @kbd{i} command to 6309file in order to edit existing diary entries. The @kbd{i} command to
@@ -5855,7 +6318,7 @@ faster to not use the above setting, but instead to copy or even move
5855the entries into an Org file. Org mode evaluates diary-style sexp 6318the entries into an Org file. Org mode evaluates diary-style sexp
5856entries, and does it faster because there is no overhead for first 6319entries, and does it faster because there is no overhead for first
5857creating the diary display. Note that the sexp entries must start at 6320creating the diary display. Note that the sexp entries must start at
5858the left margin, no white space is allowed before them. For example, 6321the left margin, no whitespace is allowed before them. For example,
5859the following segment of an Org file will be processed and entries 6322the following segment of an Org file will be processed and entries
5860will be made in the agenda: 6323will be made in the agenda:
5861 6324
@@ -5868,24 +6331,60 @@ will be made in the agenda:
5868%%(diary-anniversary 2 10 1869) Mahatma Gandhi would be %d years old 6331%%(diary-anniversary 2 10 1869) Mahatma Gandhi would be %d years old
5869@end example 6332@end example
5870 6333
6334@subsubheading Anniversaries from BBDB
6335@cindex BBDB, anniversaries
6336@cindex anniversaries, from BBDB
6337
6338If you are using the Big Brothers Database to store your contacts, you will
6339very likely prefer to store anniversaries in BBDB rather than in a
6340separate Org or diary file. Org supports this and will show BBDB
6341anniversaries as part of the agenda. All you need to do is to add the
6342following to one your your agenda files:
6343
6344@example
6345* Anniversaries
6346 :PROPERTIES:
6347 :CATEGORY: Anniv
6348 :END
6349%%(org-bbdb-anniversaries)
6350@end example
6351
6352You can then go ahead and define anniversaries for a BBDB record. Basically,
6353you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB
6354record and then add the date in the format @code{YYYY-MM-DD}, followed by a
6355space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or
6356a format string). If you omit the class, it will default to @samp{birthday}.
6357Here are a few examples, the header for the file @file{org-bbdb.el} contains
6358more detailed information.
6359
6360@example
63611973-06-22
63621955-08-02 wedding
63632008-04-14 %s released version 6.01 of org-mode, %d years ago
6364@end example
6365
6366After a change to BBDB, or for the first agenda display during an Emacs
6367session, the agenda display will suffer a short delay as Org updates its
6368hash with anniversaries. However, from then on things will be very fast---much
6369faster in fact than a long list of @samp{%%(diary-anniversary)} entries
6370in an Org or Diary file.
6371
5871@subsubheading Appointment reminders 6372@subsubheading Appointment reminders
5872@cindex @file{appt.el} 6373@cindex @file{appt.el}
5873@cindex appointment reminders 6374@cindex appointment reminders
5874 6375
5875Org can interact with Emacs appointments notification facility. 6376Org can interact with Emacs appointments notification facility. To add all
5876 6377the appointments of your agenda files, use the command
5877To add all the appointments of your agenda files, use the command 6378@code{org-agenda-to-appt}. This command also lets you filter through the
5878@code{org-agenda-to-appt}. This commands also lets you filter through 6379list of your appointments and add only those belonging to a specific category
5879the list of your appointments and add only those belonging to a specific 6380or matching a regular expression. See the docstring for details.
5880category or matching a regular expression. See the docstring for
5881details.
5882 6381
5883@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views 6382@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views
5884@subsection The global TODO list 6383@subsection The global TODO list
5885@cindex global TODO list 6384@cindex global TODO list
5886@cindex TODO list, global 6385@cindex TODO list, global
5887 6386
5888The global TODO list contains all unfinished TODO items, formatted and 6387The global TODO list contains all unfinished TODO items formatted and
5889collected into a single place. 6388collected into a single place.
5890 6389
5891@table @kbd 6390@table @kbd
@@ -5898,11 +6397,12 @@ the TODO entries directly from that buffer (@pxref{Agenda commands}).
5898@kindex C-c a T 6397@kindex C-c a T
5899@item C-c a T 6398@item C-c a T
5900@cindex TODO keyword matching 6399@cindex TODO keyword matching
6400@vindex org-todo-keywords
5901Like the above, but allows selection of a specific TODO keyword. You 6401Like the above, but allows selection of a specific TODO keyword. You
5902can also do this by specifying a prefix argument to @kbd{C-c a t}. With 6402can also do this by specifying a prefix argument to @kbd{C-c a t}. With
5903a @kbd{C-u} prefix you are prompted for a keyword, and you may also 6403a @kbd{C-u} prefix you are prompted for a keyword, and you may also
5904specify several keywords by separating them with @samp{|} as boolean OR 6404specify several keywords by separating them with @samp{|} as the boolean OR
5905operator. With a numeric prefix, the Nth keyword in 6405operator. With a numeric prefix, the nth keyword in
5906@code{org-todo-keywords} is selected. 6406@code{org-todo-keywords} is selected.
5907@kindex r 6407@kindex r
5908The @kbd{r} key in the agenda buffer regenerates it, and you can give 6408The @kbd{r} key in the agenda buffer regenerates it, and you can give
@@ -5923,11 +6423,17 @@ keywords. This list can become very long. There are two ways to keep
5923it more compact: 6423it more compact:
5924@itemize @minus 6424@itemize @minus
5925@item 6425@item
5926Some people view a TODO item that has been @emph{scheduled} for 6426@vindex org-agenda-todo-ignore-scheduled
5927execution (@pxref{Timestamps}) as no longer @emph{open}. Configure the 6427@vindex org-agenda-todo-ignore-deadlines
5928variable @code{org-agenda-todo-ignore-scheduled} to exclude scheduled 6428@vindex org-agenda-todo-ignore-with-date
5929items from the global TODO list. 6429Some people view a TODO item that has been @emph{scheduled} for execution or
5930@item 6430have a @emph{deadline} (@pxref{Timestamps}) as no longer @emph{open}.
6431Configure the variables @code{org-agenda-todo-ignore-scheduled},
6432@code{org-agenda-todo-ignore-deadlines}, and/or
6433@code{org-agenda-todo-ignore-with-date} to exclude such items from the
6434global TODO list.
6435@item
6436@vindex org-agenda-todo-list-sublevels
5931TODO items may have sublevels to break up the task into subtasks. In 6437TODO items may have sublevels to break up the task into subtasks. In
5932such cases it may be enough to list only the highest level TODO headline 6438such cases it may be enough to list only the highest level TODO headline
5933and omit the sublevels from the global list. Configure the variable 6439and omit the sublevels from the global list. Configure the variable
@@ -5941,9 +6447,11 @@ and omit the sublevels from the global list. Configure the variable
5941@cindex tags view 6447@cindex tags view
5942@cindex match view 6448@cindex match view
5943 6449
5944If headlines in the agenda files are marked with @emph{tags} 6450If headlines in the agenda files are marked with @emph{tags} (@pxref{Tags}),
5945(@pxref{Tags}), you can select headlines based on the tags that apply 6451or have properties (@pxref{Properties and Columns}), you can select headlines
5946to them and collect them into an agenda buffer. 6452based on this metadata and collect them into an agenda buffer. The match
6453syntax described here also applies when creating sparse trees with @kbd{C-c /
6454m}.
5947 6455
5948@table @kbd 6456@table @kbd
5949@kindex C-c a m 6457@kindex C-c a m
@@ -5955,15 +6463,144 @@ expression with tags, like @samp{+work+urgent-withboss} or
5955define a custom command for it (@pxref{Agenda dispatcher}). 6463define a custom command for it (@pxref{Agenda dispatcher}).
5956@kindex C-c a M 6464@kindex C-c a M
5957@item C-c a M 6465@item C-c a M
5958Like @kbd{C-c a m}, but only select headlines that are also TODO items 6466@vindex org-tags-match-list-sublevels
5959and force checking subitems (see variable 6467@vindex org-agenda-tags-todo-honor-ignore-options
5960@code{org-tags-match-list-sublevels}). Matching specific TODO keywords 6468Like @kbd{C-c a m}, but only select headlines that are also TODO items and
5961together with a tags match is also possible, see @ref{Tag searches}. 6469force checking subitems (see variable @code{org-tags-match-list-sublevels}).
6470To exclude scheduled/deadline items, see the variable
6471@code{org-agenda-tags-todo-honor-ignore-options}. Matching specific TODO
6472keywords together with a tags match is also possible, see @ref{Tag searches}.
5962@end table 6473@end table
5963 6474
5964The commands available in the tags list are described in @ref{Agenda 6475The commands available in the tags list are described in @ref{Agenda
5965commands}. 6476commands}.
5966 6477
6478@subsubheading Match syntax
6479
6480@cindex Boolean logic, for tag/property searches
6481A search string can use Boolean operators @samp{&} for AND and @samp{|} for
6482OR. @samp{&} binds more strongly than @samp{|}. Parentheses are currently
6483not implemented. Each element in the search is either a tag, a regular
6484expression matching tags, or an expression like @code{PROPERTY OPERATOR
6485VALUE} with a comparison operator, accessing a property value. Each element
6486may be preceded by @samp{-}, to select against it, and @samp{+} is syntactic
6487sugar for positive selection. The AND operator @samp{&} is optional when
6488@samp{+} or @samp{-} is present. Here are some examples, using only tags.
6489
6490@table @samp
6491@item +work-boss
6492Select headlines tagged @samp{:work:}, but discard those also tagged
6493@samp{:boss:}.
6494@item work|laptop
6495Selects lines tagged @samp{:work:} or @samp{:laptop:}.
6496@item work|laptop+night
6497Like before, but require the @samp{:laptop:} lines to be tagged also
6498@samp{:night:}.
6499@end table
6500
6501@cindex regular expressions, with tags search
6502Instead of a tag, you may also specify a regular expression enclosed in curly
6503braces. For example,
6504@samp{work+@{^boss.*@}} matches headlines that contain the tag
6505@samp{:work:} and any tag @i{starting} with @samp{boss}.
6506
6507@cindex TODO keyword matching, with tags search
6508@cindex level, require for tags/property match
6509@cindex category, require for tags/property match
6510@vindex org-odd-levels-only
6511You may also test for properties (@pxref{Properties and Columns}) at the same
6512time as matching tags. The properties may be real properties, or special
6513properties that represent other metadata (@pxref{Special properties}). For
6514example, the ``property'' @code{TODO} represents the TODO keyword of the
6515entry. Or, the ``property'' @code{LEVEL} represents the level of an entry.
6516So a search @samp{+LEVEL=3+boss-TODO="DONE"} lists all level three headlines
6517that have the tag @samp{boss} and are @emph{not} marked with the TODO keyword
6518DONE. In buffers with @code{org-odd-levels-only} set, @samp{LEVEL} does not
6519count the number of stars, but @samp{LEVEL=2} will correspond to 3 stars etc.
6520
6521Here are more examples:
6522@table @samp
6523@item work+TODO="WAITING"
6524Select @samp{:work:}-tagged TODO lines with the specific TODO
6525keyword @samp{WAITING}.
6526@item work+TODO="WAITING"|home+TODO="WAITING"
6527Waiting tasks both at work and at home.
6528@end table
6529
6530When matching properties, a number of different operators can be used to test
6531the value of a property. Here is a complex example:
6532
6533@example
6534+work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 \
6535 +With=@{Sarah\|Denny@}+SCHEDULED>="<2008-10-11>"
6536@end example
6537
6538@noindent
6539The type of comparison will depend on how the comparison value is written:
6540@itemize @minus
6541@item
6542If the comparison value is a plain number, a numerical comparison is done,
6543and the allowed operators are @samp{<}, @samp{=}, @samp{>}, @samp{<=},
6544@samp{>=}, and @samp{<>}.
6545@item
6546If the comparison value is enclosed in double-quotes,
6547a string comparison is done, and the same operators are allowed.
6548@item
6549If the comparison value is enclosed in double-quotes @emph{and} angular
6550brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
6551assumed to be date/time specifications in the standard Org way, and the
6552comparison will be done accordingly. Special values that will be recognized
6553are @code{"<now>"} for now (including time), and @code{"<today>"}, and
6554@code{"<tomorrow>"} for these days at 0:00 hours, @ie without a time
6555specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
6556@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
6557respectively, can be used.
6558@item
6559If the comparison value is enclosed
6560in curly braces, a regexp match is performed, with @samp{=} meaning that the
6561regexp matches the property value, and @samp{<>} meaning that it does not
6562match.
6563@end itemize
6564
6565So the search string in the example finds entries tagged @samp{:work:} but
6566not @samp{:boss:}, which also have a priority value @samp{A}, a
6567@samp{:Coffee:} property with the value @samp{unlimited}, an @samp{Effort}
6568property that is numerically smaller than 2, a @samp{:With:} property that is
6569matched by the regular expression @samp{Sarah\|Denny}, and that are scheduled
6570on or after October 11, 2008.
6571
6572Accessing TODO, LEVEL, and CATEGORY during a search is fast. Accessing any
6573other properties will slow down the search. However, once you have paid the
6574price by accessing one property, testing additional properties is cheap
6575again.
6576
6577You can configure Org mode to use property inheritance during a search, but
6578beware that this can slow down searches considerably. See @ref{Property
6579inheritance}, for details.
6580
6581For backward compatibility, and also for typing speed, there is also a
6582different way to test TODO states in a search. For this, terminate the
6583tags/property part of the search string (which may include several terms
6584connected with @samp{|}) with a @samp{/} and then specify a Boolean
6585expression just for TODO keywords. The syntax is then similar to that for
6586tags, but should be applied with care: for example, a positive
6587selection on several TODO keywords cannot meaningfully be combined with
6588boolean AND. However, @emph{negative selection} combined with AND can be
6589meaningful. To make sure that only lines are checked that actually have any
6590TODO keyword (resulting in a speed-up), use @kbd{C-c a M}, or equivalently
6591start the TODO part after the slash with @samp{!}. Examples:
6592
6593@table @samp
6594@item work/WAITING
6595Same as @samp{work+TODO="WAITING"}
6596@item work/!-WAITING-NEXT
6597Select @samp{:work:}-tagged TODO lines that are neither @samp{WAITING}
6598nor @samp{NEXT}
6599@item work/!+WAITING|+NEXT
6600Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
6601@samp{NEXT}.
6602@end table
6603
5967@node Timeline, Keyword search, Matching tags and properties, Built-in agenda views 6604@node Timeline, Keyword search, Matching tags and properties, Built-in agenda views
5968@subsection Timeline for a single file 6605@subsection Timeline for a single file
5969@cindex timeline, single file 6606@cindex timeline, single file
@@ -5976,7 +6613,7 @@ to give an overview over events in a project.
5976@table @kbd 6613@table @kbd
5977@kindex C-c a L 6614@kindex C-c a L
5978@item C-c a L 6615@item C-c a L
5979Show a time-sorted view of the org file, with all time-stamped items. 6616Show a time-sorted view of the Org file, with all time-stamped items.
5980When called with a @kbd{C-u} prefix, all unfinished TODO entries 6617When called with a @kbd{C-u} prefix, all unfinished TODO entries
5981(scheduled or not) are also listed under the current date. 6618(scheduled or not) are also listed under the current date.
5982@end table 6619@end table
@@ -6010,6 +6647,7 @@ and @code{wifi}, but not the keyword @code{ethernet}, and which are also
6010not matched by the regular expression @code{8\.11[bg]}, meaning to 6647not matched by the regular expression @code{8\.11[bg]}, meaning to
6011exclude both 8.11b and 8.11g. 6648exclude both 8.11b and 8.11g.
6012 6649
6650@vindex org-agenda-text-search-extra-files
6013Note that in addition to the agenda files, this command will also search 6651Note that in addition to the agenda files, this command will also search
6014the files listed in @code{org-agenda-text-search-extra-files}. 6652the files listed in @code{org-agenda-text-search-extra-files}.
6015@end table 6653@end table
@@ -6030,6 +6668,7 @@ projects and define next actions for them.
6030List projects that are stuck. 6668List projects that are stuck.
6031@kindex C-c a ! 6669@kindex C-c a !
6032@item C-c a ! 6670@item C-c a !
6671@vindex org-stuck-projects
6033Customize the variable @code{org-stuck-projects} to define what a stuck 6672Customize the variable @code{org-stuck-projects} to define what a stuck
6034project is and how to find it. 6673project is and how to find it.
6035@end table 6674@end table
@@ -6047,9 +6686,10 @@ and TODO indicate next actions. The tag @@SHOP indicates shopping and
6047is a next action even without the NEXT tag. Finally, if the project 6686is a next action even without the NEXT tag. Finally, if the project
6048contains the special word IGNORE anywhere, it should not be listed 6687contains the special word IGNORE anywhere, it should not be listed
6049either. In this case you would start by identifying eligible projects 6688either. In this case you would start by identifying eligible projects
6050with a tags/todo match @samp{+PROJECT/-MAYBE-DONE}, and then check for 6689with a tags/todo match@footnote{@xref{Tag searches}.}
6051TODO, NEXT, @@SHOP, and IGNORE in the subtree to identify projects that 6690@samp{+PROJECT/-MAYBE-DONE}, and then check for TODO, NEXT, @@SHOP, and
6052are not stuck. The correct customization for this is 6691IGNORE in the subtree to identify projects that are not stuck. The
6692correct customization for this is
6053 6693
6054@lisp 6694@lisp
6055(setq org-stuck-projects 6695(setq org-stuck-projects
@@ -6057,11 +6697,14 @@ are not stuck. The correct customization for this is
6057 "\\<IGNORE\\>")) 6697 "\\<IGNORE\\>"))
6058@end lisp 6698@end lisp
6059 6699
6700Note that if a project is identified as non-stuck, the subtree of this entry
6701will still be searched for stuck projects.
6060 6702
6061@node Presentation and sorting, Agenda commands, Built-in agenda views, Agenda Views 6703@node Presentation and sorting, Agenda commands, Built-in agenda views, Agenda Views
6062@section Presentation and sorting 6704@section Presentation and sorting
6063@cindex presentation, of agenda items 6705@cindex presentation, of agenda items
6064 6706
6707@vindex org-agenda-prefix-format
6065Before displaying items in an agenda view, Org mode visually prepares 6708Before displaying items in an agenda view, Org mode visually prepares
6066the items and sorts them. Each item occupies a single line. The line 6709the items and sorts them. Each item occupies a single line. The line
6067starts with a @emph{prefix} that contains the @emph{category} 6710starts with a @emph{prefix} that contains the @emph{category}
@@ -6083,7 +6726,7 @@ associated with the item.
6083The category is a broad label assigned to each agenda item. By default, 6726The category is a broad label assigned to each agenda item. By default,
6084the category is simply derived from the file name, but you can also 6727the category is simply derived from the file name, but you can also
6085specify it with a special line in the buffer, like this@footnote{For 6728specify it with a special line in the buffer, like this@footnote{For
6086backward compatibility, the following also works: If there are several 6729backward compatibility, the following also works: if there are several
6087such lines in a file, each specifies the category for the text below it. 6730such lines in a file, each specifies the category for the text below it.
6088The first category also applies to any text before the first CATEGORY 6731The first category also applies to any text before the first CATEGORY
6089line. However, using this method is @emph{strongly} deprecated as it is 6732line. However, using this method is @emph{strongly} deprecated as it is
@@ -6096,6 +6739,7 @@ property.}:
6096@end example 6739@end example
6097 6740
6098@noindent 6741@noindent
6742@cindex property, CATEGORY
6099If you would like to have a special CATEGORY for a single entry or a 6743If you would like to have a special CATEGORY for a single entry or a
6100(sub)tree, give the entry a @code{:CATEGORY:} property with the 6744(sub)tree, give the entry a @code{:CATEGORY:} property with the
6101special category you want to apply as the value. 6745special category you want to apply as the value.
@@ -6109,9 +6753,9 @@ longer than 10 characters.
6109@cindex time-of-day specification 6753@cindex time-of-day specification
6110 6754
6111Org mode checks each agenda item for a time-of-day specification. The 6755Org mode checks each agenda item for a time-of-day specification. The
6112time can be part of the time stamp that triggered inclusion into the 6756time can be part of the timestamp that triggered inclusion into the
6113agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time 6757agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
6114ranges can be specified with two time stamps, like 6758ranges can be specified with two timestamps, like
6115@c 6759@c
6116@w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}. 6760@w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
6117 6761
@@ -6149,6 +6793,8 @@ timed entries are embedded in a time grid, like
6149 20:30-22:15 Marvin escorts the Hitchhikers to the bridge 6793 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
6150@end example 6794@end example
6151 6795
6796@vindex org-agenda-use-time-grid
6797@vindex org-agenda-time-grid
6152The time grid can be turned on and off with the variable 6798The time grid can be turned on and off with the variable
6153@code{org-agenda-use-time-grid}, and can be configured with 6799@code{org-agenda-use-time-grid}, and can be configured with
6154@code{org-agenda-time-grid}. 6800@code{org-agenda-time-grid}.
@@ -6161,6 +6807,7 @@ Before being inserted into a view, the items are sorted. How this is
6161done depends on the type of view. 6807done depends on the type of view.
6162@itemize @bullet 6808@itemize @bullet
6163@item 6809@item
6810@vindex org-agenda-files
6164For the daily/weekly agenda, the items for each day are sorted. The 6811For the daily/weekly agenda, the items for each day are sorted. The
6165default order is to first collect all items containing an explicit 6812default order is to first collect all items containing an explicit
6166time-of-day specification. These entries will be shown at the beginning 6813time-of-day specification. These entries will be shown at the beginning
@@ -6173,12 +6820,15 @@ overdue scheduled or deadline items.
6173@item 6820@item
6174For the TODO list, items remain in the order of categories, but within 6821For the TODO list, items remain in the order of categories, but within
6175each category, sorting takes place according to priority 6822each category, sorting takes place according to priority
6176(@pxref{Priorities}). 6823(@pxref{Priorities}). The priority used for sorting derives from the
6824priority cookie, with additions depending on how close an item is to its due
6825or scheduled date.
6177@item 6826@item
6178For tags matches, items are not sorted at all, but just appear in the 6827For tags matches, items are not sorted at all, but just appear in the
6179sequence in which they are found in the agenda files. 6828sequence in which they are found in the agenda files.
6180@end itemize 6829@end itemize
6181 6830
6831@vindex org-agenda-sorting-strategy
6182Sorting can be customized using the variable 6832Sorting can be customized using the variable
6183@code{org-agenda-sorting-strategy}, and may also include criteria based on 6833@code{org-agenda-sorting-strategy}, and may also include criteria based on
6184the estimated effort of an entry (@pxref{Effort estimates}). 6834the estimated effort of an entry (@pxref{Effort estimates}).
@@ -6187,10 +6837,10 @@ the estimated effort of an entry (@pxref{Effort estimates}).
6187@section Commands in the agenda buffer 6837@section Commands in the agenda buffer
6188@cindex commands, in agenda buffer 6838@cindex commands, in agenda buffer
6189 6839
6190Entries in the agenda buffer are linked back to the org file or diary 6840Entries in the agenda buffer are linked back to the Org file or diary
6191file where they originate. You are not allowed to edit the agenda 6841file where they originate. You are not allowed to edit the agenda
6192buffer itself, but commands are provided to show and jump to the 6842buffer itself, but commands are provided to show and jump to the
6193original entry location, and to edit the org-files ``remotely'' from 6843original entry location, and to edit the Org files ``remotely'' from
6194the agenda buffer. In this way, all information is stored only once, 6844the agenda buffer. In this way, all information is stored only once,
6195removing the risk that your agenda and note files may diverge. 6845removing the risk that your agenda and note files may diverge.
6196 6846
@@ -6206,7 +6856,7 @@ Next line (same as @key{up} and @kbd{C-p}).
6206@kindex p 6856@kindex p
6207@item p 6857@item p
6208Previous line (same as @key{down} and @kbd{C-n}). 6858Previous line (same as @key{down} and @kbd{C-n}).
6209@tsubheading{View/Go to org file} 6859@tsubheading{View/Go to Org file}
6210@kindex mouse-3 6860@kindex mouse-3
6211@kindex @key{SPC} 6861@kindex @key{SPC}
6212@item mouse-3 6862@item mouse-3
@@ -6234,9 +6884,10 @@ Go to the original location of the item and delete other windows.
6234@c 6884@c
6235@kindex f 6885@kindex f
6236@item f 6886@item f
6887@vindex org-agenda-start-with-follow-mode
6237Toggle Follow mode. In Follow mode, as you move the cursor through 6888Toggle Follow mode. In Follow mode, as you move the cursor through
6238the agenda buffer, the other window always shows the corresponding 6889the agenda buffer, the other window always shows the corresponding
6239location in the org file. The initial setting for this mode in new 6890location in the Org file. The initial setting for this mode in new
6240agenda buffers can be set with the variable 6891agenda buffers can be set with the variable
6241@code{org-agenda-start-with-follow-mode}. 6892@code{org-agenda-start-with-follow-mode}.
6242@c 6893@c
@@ -6247,8 +6898,11 @@ numeric prefix argument N, go up to level N and then take that tree. If N is
6247negative, go up that many levels. With a @kbd{C-u} prefix, do not remove the 6898negative, go up that many levels. With a @kbd{C-u} prefix, do not remove the
6248previously used indirect buffer. 6899previously used indirect buffer.
6249@c 6900@c
6901@kindex v l
6250@kindex l 6902@kindex l
6251@item l 6903@item v l @ @r{or short} @ l
6904@vindex org-log-done
6905@vindex org-agenda-log-mode-items
6252Toggle Logbook mode. In Logbook mode, entries that were marked DONE while 6906Toggle Logbook mode. In Logbook mode, entries that were marked DONE while
6253logging was on (variable @code{org-log-done}) are shown in the agenda, as are 6907logging was on (variable @code{org-log-done}) are shown in the agenda, as are
6254entries that have been clocked on that day. You can configure the entry 6908entries that have been clocked on that day. You can configure the entry
@@ -6257,16 +6911,19 @@ types that should be included in log mode using the variable
6257all possible logbook entries, including state changes. When called with two 6911all possible logbook entries, including state changes. When called with two
6258prefix args @kbd{C-u C-u}, show only logging information, nothing else. 6912prefix args @kbd{C-u C-u}, show only logging information, nothing else.
6259@c 6913@c
6260@kindex v 6914@kindex v a
6261@item v 6915@kindex v A
6262Toggle Archives mode. In archives mode, trees that are marked 6916@item v a
6263@code{ARCHIVED} are also scanned when producing the agenda. When you call 6917@itemx v A
6264this command with a @kbd{C-u} prefix argument, even all archive files are 6918Toggle Archives mode. In Archives mode, trees that are marked
6265included. To exit archives mode, press @kbd{v} again. 6919@code{ARCHIVED} are also scanned when producing the agenda. When you use the
6920capital @kbd{A}, even all archive files are included. To exit archives mode,
6921press @kbd{v a} again.
6266@c 6922@c
6267@kindex R 6923@kindex R
6268@item R 6924@item R
6269Toggle Clockreport mode. In clockreport mode, the daily/weekly agenda will 6925@vindex org-agenda-start-with-clockreport-mode
6926Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will
6270always show a table with the clocked times for the timespan and file scope 6927always show a table with the clocked times for the timespan and file scope
6271covered by the current agenda view. The initial setting for this mode in new 6928covered by the current agenda view. The initial setting for this mode in new
6272agenda buffers can be set with the variable 6929agenda buffers can be set with the variable
@@ -6278,11 +6935,16 @@ agenda buffers can be set with the variable
6278@item o 6935@item o
6279Delete other windows. 6936Delete other windows.
6280@c 6937@c
6938@kindex v d
6281@kindex d 6939@kindex d
6940@kindex v w
6282@kindex w 6941@kindex w
6283@kindex m 6942@kindex v m
6284@kindex y 6943@kindex v y
6285@item d w m y 6944@item v d @ @r{or short} @ d
6945@itemx v w @ @r{or short} @ w
6946@itemx v m
6947@itemx v y
6286Switch to day/week/month/year view. When switching to day or week view, 6948Switch to day/week/month/year view. When switching to day or week view,
6287this setting becomes the default for subsequent agenda commands. Since 6949this setting becomes the default for subsequent agenda commands. Since
6288month and year views are slow to create, they do not become the default. 6950month and year views are slow to create, they do not become the default.
@@ -6300,13 +6962,15 @@ Toggle the inclusion of diary entries. See @ref{Weekly/daily agenda}.
6300@c 6962@c
6301@kindex G 6963@kindex G
6302@item G 6964@item G
6965@vindex org-agenda-use-time-grid
6966@vindex org-agenda-time-grid
6303Toggle the time grid on and off. See also the variables 6967Toggle the time grid on and off. See also the variables
6304@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. 6968@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
6305@c 6969@c
6306@kindex r 6970@kindex r
6307@item r 6971@item r
6308Recreate the agenda buffer, for example to reflect the changes after 6972Recreate the agenda buffer, for example to reflect the changes after
6309modification of the time stamps of items with @kbd{S-@key{left}} and 6973modification of the timestamps of items with S-@key{left} and
6310@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix 6974@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix
6311argument is interpreted to create a selective list for a specific TODO 6975argument is interpreted to create a selective list for a specific TODO
6312keyword. 6976keyword.
@@ -6318,10 +6982,12 @@ Same as @kbd{r}.
6318@kindex C-x C-s 6982@kindex C-x C-s
6319@item s 6983@item s
6320@itemx C-x C-s 6984@itemx C-x C-s
6321Save all Org buffers in the current Emacs session. 6985Save all Org buffers in the current Emacs session, and also the locations of
6986IDs.
6322@c 6987@c
6323@kindex @key{right} 6988@kindex @key{right}
6324@item @key{right} 6989@item @key{right}
6990@vindex org-agenda-ndays
6325Display the following @code{org-agenda-ndays} days. For example, if 6991Display the following @code{org-agenda-ndays} days. For example, if
6326the display covers a week, switch to the following week. With prefix 6992the display covers a week, switch to the following week. With prefix
6327arg, go forward that many times @code{org-agenda-ndays} days. 6993arg, go forward that many times @code{org-agenda-ndays} days.
@@ -6334,8 +7000,13 @@ Display the previous dates.
6334@item . 7000@item .
6335Go to today. 7001Go to today.
6336@c 7002@c
7003@kindex j
7004@item j
7005Prompt for a date and go there.
7006@c
6337@kindex C-c C-x C-c 7007@kindex C-c C-x C-c
6338@item C-c C-x C-c 7008@item C-c C-x C-c
7009@vindex org-columns-default-format
6339Invoke column view (@pxref{Column view}) in the agenda buffer. The column 7010Invoke column view (@pxref{Column view}) in the agenda buffer. The column
6340view format is taken from the entry at point, or (if there is no entry at 7011view format is taken from the entry at point, or (if there is no entry at
6341point), from the first entry in the agenda view. So whatever the format for 7012point), from the first entry in the agenda view. So whatever the format for
@@ -6343,6 +7014,11 @@ that entry would be in the original buffer (taken from a property, from a
6343@code{#+COLUMNS} line, or from the default variable 7014@code{#+COLUMNS} line, or from the default variable
6344@code{org-columns-default-format}), will be used in the agenda. 7015@code{org-columns-default-format}), will be used in the agenda.
6345 7016
7017@kindex C-c C-x >
7018@item C-c C-x >
7019Remove the restriction lock on the agenda, if it is currently restricted to a
7020file or subtree (@pxref{Agenda files}).
7021
6346@tsubheading{Secondary filtering and query editing} 7022@tsubheading{Secondary filtering and query editing}
6347@cindex filtering, by tag and effort, in agenda 7023@cindex filtering, by tag and effort, in agenda
6348@cindex tag filtering, in agenda 7024@cindex tag filtering, in agenda
@@ -6351,10 +7027,14 @@ that entry would be in the original buffer (taken from a property, from a
6351 7027
6352@kindex / 7028@kindex /
6353@item / 7029@item /
7030@vindex org-agenda-filter-preset
6354Filter the current agenda view with respect to a tag and/or effort estimates. 7031Filter the current agenda view with respect to a tag and/or effort estimates.
6355The difference between this and a custom agenda commands is that filtering is 7032The difference between this and a custom agenda command is that filtering is
6356very fast, so that you can switch quickly between different filters without 7033very fast, so that you can switch quickly between different filters without
6357having to recreate the agenda. 7034having to recreate the agenda@footnote{Custom commands can preset a filter by
7035binding the variable @code{org-agenda-filter-preset} as an option. This
7036filter will then be applied to the view and persist as a basic filter through
7037refreshes and more secondary filtering.}
6358 7038
6359You will be prompted for a tag selection letter. Pressing @key{TAB} at that 7039You will be prompted for a tag selection letter. Pressing @key{TAB} at that
6360prompt will offer use completion to select a tag (including any tags that do 7040prompt will offer use completion to select a tag (including any tags that do
@@ -6367,19 +7047,23 @@ requiring or forbidding the selected additional tag. Instead of pressing
6367@kbd{+} or @kbd{-} after @kbd{/}, you can also immediately use the @kbd{\} 7047@kbd{+} or @kbd{-} after @kbd{/}, you can also immediately use the @kbd{\}
6368command. 7048command.
6369 7049
7050@vindex org-sort-agenda-noeffort-is-high
6370In order to filter for effort estimates, you should set-up allowed 7051In order to filter for effort estimates, you should set-up allowed
6371efforts globally, for example 7052efforts globally, for example
6372@lisp 7053@lisp
6373(setq org-global-properties 7054(setq org-global-properties
6374 '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00"))) 7055 '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00")))
6375@end lisp 7056@end lisp
6376You can then filter for an effort by first typing an operator, one of @kbd{<}, 7057You can then filter for an effort by first typing an operator, one of
6377@kbd{>}, and @kbd{=}, and then the one-digit index of an effort estimate in 7058@kbd{<}, @kbd{>}, and @kbd{=}, and then the one-digit index of an effort
6378your array of allowed values, where @kbd{0} means the 10th value. The filter 7059estimate in your array of allowed values, where @kbd{0} means the 10th value.
6379will then restrict to entries with effort smaller-or-equal, equal, or 7060The filter will then restrict to entries with effort smaller-or-equal, equal,
6380larger-or-equal than the selected value. If the digits 0-9 are not used as 7061or larger-or-equal than the selected value. If the digits 0-9 are not used
6381fast access keys to tags, you can also simply press the index digit directly 7062as fast access keys to tags, you can also simply press the index digit
6382without an operator. In this case, @kbd{<} will be assumed. 7063directly without an operator. In this case, @kbd{<} will be assumed. For
7064application of the operator, entries without a defined effort will be treated
7065according to the value of @code{org-sort-agenda-noeffort-is-high}. To filter
7066for tasks without effort definition, press @kbd{?} as the operator.
6383 7067
6384@kindex \ 7068@kindex \
6385@item \ 7069@item \
@@ -6422,19 +7106,24 @@ original org file.
6422@c 7106@c
6423@kindex C-k 7107@kindex C-k
6424@item C-k 7108@item C-k
7109@vindex org-agenda-confirm-kill
6425Delete the current agenda item along with the entire subtree belonging 7110Delete the current agenda item along with the entire subtree belonging
6426to it in the original Org file. If the text to be deleted remotely 7111to it in the original Org file. If the text to be deleted remotely
6427is longer than one line, the kill needs to be confirmed by the user. See 7112is longer than one line, the kill needs to be confirmed by the user. See
6428variable @code{org-agenda-confirm-kill}. 7113variable @code{org-agenda-confirm-kill}.
6429@c 7114@c
7115@kindex C-c C-w
7116@item C-c C-w
7117Refile the entry at point.
7118@c
6430@kindex a 7119@kindex a
6431@item a 7120@item a
6432Toggle the ARCHIVE tag for the current headline. 7121Toggle the ARCHIVE tag for the current headline.
6433@c 7122@c
6434@kindex A 7123@kindex A
6435@item A 7124@item A
6436Move the subtree corresponding to the current entry to its @emph{Archive 7125Move the subtree corresponding to the current entry to its @emph{archive
6437Sibling}. 7126sibling}.
6438@c 7127@c
6439@kindex $ 7128@kindex $
6440@item $ 7129@item $
@@ -6444,6 +7133,7 @@ different file.
6444@c 7133@c
6445@kindex T 7134@kindex T
6446@item T 7135@item T
7136@vindex org-agenda-show-inherited-tags
6447Show all tags associated with the current item. This is useful if you have 7137Show all tags associated with the current item. This is useful if you have
6448turned off @code{org-agenda-show-inherited-tags}, but still want to see all 7138turned off @code{org-agenda-show-inherited-tags}, but still want to see all
6449tags of a headline occasionally. 7139tags of a headline occasionally.
@@ -6477,6 +7167,13 @@ key for this.
6477@itemx S-@key{down} 7167@itemx S-@key{down}
6478Decrease the priority of the current item. 7168Decrease the priority of the current item.
6479@c 7169@c
7170@kindex z
7171@item z
7172@vindex org-log-into-drawer
7173Add a note to the entry. This note will be recorded, and then files to the
7174same location where state change notes are put. Depending on
7175@code{org-log-into-drawer}, this maybe inside a drawer.
7176@c
6480@kindex C-c C-a 7177@kindex C-c C-a
6481@item C-c C-a 7178@item C-c C-a
6482Dispatcher for all command related to attachments. 7179Dispatcher for all command related to attachments.
@@ -6501,25 +7198,29 @@ d @r{Set the deadline of the marked entry to the date at point.}
6501s @r{Schedule the marked entry at the date at point.} 7198s @r{Schedule the marked entry at the date at point.}
6502r @r{Call @code{org-remember} with the cursor date as default date.} 7199r @r{Call @code{org-remember} with the cursor date as default date.}
6503@end example 7200@end example
7201@noindent
6504Press @kbd{r} afterward to refresh the agenda and see the effect of the 7202Press @kbd{r} afterward to refresh the agenda and see the effect of the
6505command. 7203command.
6506@c 7204@c
6507@kindex S-@key{right} 7205@kindex S-@key{right}
6508@item S-@key{right} 7206@item S-@key{right}
6509Change the time stamp associated with the current line by one day into the 7207Change the timestamp associated with the current line by one day into the
6510future. With a numeric prefix argument, change it by that many days. For 7208future. With a numeric prefix argument, change it by that many days. For
6511example, @kbd{3 6 5 S-@key{right}} will change it by a year. The stamp is 7209example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a
6512changed in the original org file, but the change is not directly reflected in 7210@kbd{C-u} prefix, change the time by one hour. If you immediately repeat the
6513the agenda buffer. Use the @kbd{r} key to update the buffer. 7211command, it will continue to change hours even without the prefix arg. With
7212a double @kbd{C-u C-u} prefix, do the same for changing minutes. The stamp
7213is changed in the original Org file, but the change is not directly reflected
7214in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer.
6514@c 7215@c
6515@kindex S-@key{left} 7216@kindex S-@key{left}
6516@item S-@key{left} 7217@item S-@key{left}
6517Change the time stamp associated with the current line by one day 7218Change the timestamp associated with the current line by one day
6518into the past. 7219into the past.
6519@c 7220@c
6520@kindex > 7221@kindex >
6521@item > 7222@item >
6522Change the time stamp associated with the current line to today. 7223Change the timestamp associated with the current line to today.
6523The key @kbd{>} has been chosen, because it is the same as @kbd{S-.} 7224The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
6524on my keyboard. 7225on my keyboard.
6525@c 7226@c
@@ -6540,6 +7241,42 @@ Cancel the currently running clock.
6540@item J 7241@item J
6541Jump to the running clock in another window. 7242Jump to the running clock in another window.
6542 7243
7244@tsubheading{Bulk remote editing selected entries}
7245@cindex remote editing, bulk, from agenda
7246
7247@kindex m
7248@item s
7249Mark the entry at point for bulk action.
7250
7251@kindex u
7252@item u
7253Unmark entry for bulk action.
7254
7255@kindex U
7256@item U
7257Unmark all marked entries for bulk action.
7258
7259@kindex B
7260@item B
7261Bulk action: act on all marked entries in the agenda. This will prompt for
7262another key to select the action to be applied:
7263@example
7264r @r{Prompt for a single refile target and move all entries. The entries}
7265 @r{will no longer be in the agenda, refresh (@kbd{g}) to bring them back.}
7266$ @r{Archive all selected entries.}
7267A @r{Archive entries by moving them to their respective archive siblings.}
7268t @r{Change TODO state. This prompts for a single TODO keyword and}
7269 @r{changes the state of all selected entries, bypassing blocking and}
7270 @r{suppressing logging notes (but not time stamps).}
7271+ @r{Add a tag to all selected entries.}
7272- @r{Remove a tag from all selected entries.}
7273s @r{Schedule all items to a new date. To shift existing schedule dates}
7274 @r{by a fixed number of days, use something starting with double plus}
7275 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.}
7276d @r{Set deadline to a specific date.}
7277@end example
7278
7279
6543@tsubheading{Calendar commands} 7280@tsubheading{Calendar commands}
6544@cindex calendar commands, from agenda 7281@cindex calendar commands, from agenda
6545@kindex c 7282@kindex c
@@ -6555,7 +7292,7 @@ date at the cursor.
6555@item i 7292@item i
6556Insert a new entry into the diary. Prompts for the type of entry 7293Insert a new entry into the diary. Prompts for the type of entry
6557(day, weekly, monthly, yearly, anniversary, cyclic) and creates a new 7294(day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
6558entry in the diary, just as @kbd{i d} etc. would do in the calendar. 7295entry in the diary, just as @kbd{i d}, etc., would do in the calendar.
6559The date is taken from the cursor position. 7296The date is taken from the cursor position.
6560@c 7297@c
6561@kindex M 7298@kindex M
@@ -6565,7 +7302,7 @@ Show the phases of the moon for the three months around current date.
6565@kindex S 7302@kindex S
6566@item S 7303@item S
6567Show sunrise and sunset times. The geographical location must be set 7304Show sunrise and sunset times. The geographical location must be set
6568with calendar variables, see documentation of the Emacs calendar. 7305with calendar variables, see the documentation for the Emacs calendar.
6569@c 7306@c
6570@kindex C 7307@kindex C
6571@item C 7308@item C
@@ -6574,7 +7311,7 @@ calendars.
6574@c 7311@c
6575@kindex H 7312@kindex H
6576@item H 7313@item H
6577Show holidays for three month around the cursor date. 7314Show holidays for three months around the cursor date.
6578 7315
6579@item M-x org-export-icalendar-combine-agenda-files 7316@item M-x org-export-icalendar-combine-agenda-files
6580Export a single iCalendar file containing entries from all agenda files. 7317Export a single iCalendar file containing entries from all agenda files.
@@ -6585,12 +7322,14 @@ This is a globally available command, and also available in the agenda menu.
6585@item C-x C-w 7322@item C-x C-w
6586@cindex exporting agenda views 7323@cindex exporting agenda views
6587@cindex agenda views, exporting 7324@cindex agenda views, exporting
6588Write the agenda view to a file. Depending on the extension of the 7325@vindex org-agenda-exporter-settings
6589selected file name, the view will be exported as HTML (extension 7326Write the agenda view to a file. Depending on the extension of the selected
6590@file{.html} or @file{.htm}), Postscript (extension @file{.ps}), or 7327file name, the view will be exported as HTML (extension @file{.html} or
6591plain text (any other extension). Use the variable 7328@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}),
6592@code{org-agenda-exporter-settings} to set options for @file{ps-print} 7329or plain text (any other extension). When called with a @kbd{C-u} prefix
6593and for @file{htmlize} to be used during export. 7330argument, immediately open the newly created file. Use the variable
7331@code{org-agenda-exporter-settings} to set options for @file{ps-print} and
7332for @file{htmlize} to be used during export.
6594 7333
6595@tsubheading{Quit and Exit} 7334@tsubheading{Quit and Exit}
6596@kindex q 7335@kindex q
@@ -6602,11 +7341,11 @@ Quit agenda, remove the agenda buffer.
6602@item x 7341@item x
6603Exit agenda, remove the agenda buffer and all buffers loaded by Emacs 7342Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
6604for the compilation of the agenda. Buffers created by the user to 7343for the compilation of the agenda. Buffers created by the user to
6605visit org files will not be removed. 7344visit Org files will not be removed.
6606@end table 7345@end table
6607 7346
6608 7347
6609@node Custom agenda views, Agenda column view, Agenda commands, Agenda Views 7348@node Custom agenda views, Exporting Agenda Views, Agenda commands, Agenda Views
6610@section Custom agenda views 7349@section Custom agenda views
6611@cindex custom agenda views 7350@cindex custom agenda views
6612@cindex agenda views, custom 7351@cindex agenda views, custom
@@ -6620,8 +7359,6 @@ dispatcher (@pxref{Agenda dispatcher}), just like the default commands.
6620* Storing searches:: Type once, use often 7359* Storing searches:: Type once, use often
6621* Block agenda:: All the stuff you need in a single buffer 7360* Block agenda:: All the stuff you need in a single buffer
6622* Setting Options:: Changing the rules 7361* Setting Options:: Changing the rules
6623* Exporting Agenda Views:: Writing agendas to files
6624* Using the agenda elsewhere:: Using agenda information in other programs
6625@end menu 7362@end menu
6626 7363
6627@node Storing searches, Block agenda, Custom agenda views, Custom agenda views 7364@node Storing searches, Block agenda, Custom agenda views, Custom agenda views
@@ -6632,6 +7369,7 @@ shortcuts for frequently used searches, either creating an agenda
6632buffer, or a sparse tree (the latter covering of course only the current 7369buffer, or a sparse tree (the latter covering of course only the current
6633buffer). 7370buffer).
6634@kindex C-c a C 7371@kindex C-c a C
7372@vindex org-agenda-custom-commands
6635Custom commands are configured in the variable 7373Custom commands are configured in the variable
6636@code{org-agenda-custom-commands}. You can customize this variable, for 7374@code{org-agenda-custom-commands}. You can customize this variable, for
6637example by pressing @kbd{C-c a C}. You can also directly set it with 7375example by pressing @kbd{C-c a C}. You can also directly set it with
@@ -6725,10 +7463,11 @@ your agenda for the current week, all TODO items that carry the tag
6725@samp{home}, and also all lines tagged with @samp{garden}. Finally the 7463@samp{home}, and also all lines tagged with @samp{garden}. Finally the
6726command @kbd{C-c a o} provides a similar view for office tasks. 7464command @kbd{C-c a o} provides a similar view for office tasks.
6727 7465
6728@node Setting Options, Exporting Agenda Views, Block agenda, Custom agenda views 7466@node Setting Options, , Block agenda, Custom agenda views
6729@subsection Setting options for custom commands 7467@subsection Setting options for custom commands
6730@cindex options, for custom agenda views 7468@cindex options, for custom agenda views
6731 7469
7470@vindex org-agenda-custom-commands
6732Org mode contains a number of variables regulating agenda construction 7471Org mode contains a number of variables regulating agenda construction
6733and display. The global variables define the behavior for all agenda 7472and display. The global variables define the behavior for all agenda
6734commands, including the custom commands. However, if you want to change 7473commands, including the custom commands. However, if you want to change
@@ -6760,6 +7499,7 @@ headline hierarchy above the match, nor the headline following the match
6760will be shown. The command @kbd{C-c a N} will do a text search limited 7499will be shown. The command @kbd{C-c a N} will do a text search limited
6761to only a single file. 7500to only a single file.
6762 7501
7502@vindex org-agenda-custom-commands
6763For command sets creating a block agenda, 7503For command sets creating a block agenda,
6764@code{org-agenda-custom-commands} has two separate spots for setting 7504@code{org-agenda-custom-commands} has two separate spots for setting
6765options. You can add options that should be valid for just a single 7505options. You can add options that should be valid for just a single
@@ -6787,29 +7527,32 @@ the results for GARDEN tags query in the opposite order,
6787@end group 7527@end group
6788@end lisp 7528@end lisp
6789 7529
6790As you see, the values and parenthesis setting is a little complex. 7530As you see, the values and parentheses setting is a little complex.
6791When in doubt, use the customize interface to set this variable - it 7531When in doubt, use the customize interface to set this variable---it
6792fully supports its structure. Just one caveat: When setting options in 7532fully supports its structure. Just one caveat: when setting options in
6793this interface, the @emph{values} are just lisp expressions. So if the 7533this interface, the @emph{values} are just Lisp expressions. So if the
6794value is a string, you need to add the double quotes around the value 7534value is a string, you need to add the double-quotes around the value
6795yourself. 7535yourself.
6796 7536
6797 7537
6798@node Exporting Agenda Views, Using the agenda elsewhere, Setting Options, Custom agenda views 7538@node Exporting Agenda Views, Agenda column view, Custom agenda views, Agenda Views
6799@subsection Exporting Agenda Views 7539@section Exporting Agenda Views
6800@cindex agenda views, exporting 7540@cindex agenda views, exporting
6801 7541
6802If you are away from your computer, it can be very useful to have a printed 7542If you are away from your computer, it can be very useful to have a printed
6803version of some agenda views to carry around. Org mode can export custom 7543version of some agenda views to carry around. Org mode can export custom
6804agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's 7544agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's
6805@file{htmlize.el}.}, Postscript, and iCalendar files. If you want to do this 7545@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the
6806only occasionally, use the command 7546ghostscript @file{ps2pdf} utility must be installed on the system. Selecting
7547a PDF file with also create the postscript file.}, and iCalendar files. If
7548you want to do this only occasionally, use the command
6807 7549
6808@table @kbd 7550@table @kbd
6809@kindex C-x C-w 7551@kindex C-x C-w
6810@item C-x C-w 7552@item C-x C-w
6811@cindex exporting agenda views 7553@cindex exporting agenda views
6812@cindex agenda views, exporting 7554@cindex agenda views, exporting
7555@vindex org-agenda-exporter-settings
6813Write the agenda view to a file. Depending on the extension of the 7556Write the agenda view to a file. Depending on the extension of the
6814selected file name, the view will be exported as HTML (extension 7557selected file name, the view will be exported as HTML (extension
6815@file{.html} or @file{.htm}), Postscript (extension @file{.ps}), 7558@file{.html} or @file{.htm}), Postscript (extension @file{.ps}),
@@ -6818,10 +7561,15 @@ Use the variable @code{org-agenda-exporter-settings} to
6818set options for @file{ps-print} and for @file{htmlize} to be used during 7561set options for @file{ps-print} and for @file{htmlize} to be used during
6819export, for example 7562export, for example
6820 7563
7564@vindex org-agenda-add-entry-text-maxlines
7565@vindex htmlize-output-type
7566@vindex ps-number-of-columns
7567@vindex ps-landscape-mode
6821@lisp 7568@lisp
6822(setq org-agenda-exporter-settings 7569(setq org-agenda-exporter-settings
6823 '((ps-number-of-columns 2) 7570 '((ps-number-of-columns 2)
6824 (ps-landscape-mode t) 7571 (ps-landscape-mode t)
7572 (org-agenda-add-entry-text-maxlines 5)
6825 (htmlize-output-type 'css))) 7573 (htmlize-output-type 'css)))
6826@end lisp 7574@end lisp
6827@end table 7575@end table
@@ -6831,8 +7579,8 @@ any custom agenda command with a list of output file names
6831@footnote{If you want to store standard views like the weekly agenda 7579@footnote{If you want to store standard views like the weekly agenda
6832or the global TODO list as well, you need to define custom commands for 7580or the global TODO list as well, you need to define custom commands for
6833them in order to be able to specify file names.}. Here is an example 7581them in order to be able to specify file names.}. Here is an example
6834that first does define custom commands for the agenda and the global 7582that first defines custom commands for the agenda and the global
6835todo list, together with a number of files to which to export them. 7583TODO list, together with a number of files to which to export them.
6836Then we define two block agenda commands and specify file names for them 7584Then we define two block agenda commands and specify file names for them
6837as well. File names can be relative to the current working directory, 7585as well. File names can be relative to the current working directory,
6838or absolute. 7586or absolute.
@@ -6861,9 +7609,9 @@ The extension of the file name determines the type of export. If it is
6861@file{.html}, Org mode will use the @file{htmlize.el} package to convert 7609@file{.html}, Org mode will use the @file{htmlize.el} package to convert
6862the buffer to HTML and save it to this file name. If the extension is 7610the buffer to HTML and save it to this file name. If the extension is
6863@file{.ps}, @code{ps-print-buffer-with-faces} is used to produce 7611@file{.ps}, @code{ps-print-buffer-with-faces} is used to produce
6864postscript output. If the extension is @file{.ics}, iCalendar export is 7612Postscript output. If the extension is @file{.ics}, iCalendar export is
6865run export over all files that were used to construct the agenda, and 7613run export over all files that were used to construct the agenda, and
6866limit the export to entries listed in the agenda now. Any other 7614limit the export to entries listed in the agenda. Any other
6867extension produces a plain ASCII file. 7615extension produces a plain ASCII file.
6868 7616
6869The export files are @emph{not} created when you use one of those 7617The export files are @emph{not} created when you use one of those
@@ -6893,8 +7641,8 @@ set options for the export commands. For example:
6893@end lisp 7641@end lisp
6894 7642
6895@noindent 7643@noindent
6896This command sets two options for the postscript exporter, to make it 7644This command sets two options for the Postscript exporter, to make it
6897print in two columns in landscape format - the resulting page can be cut 7645print in two columns in landscape format---the resulting page can be cut
6898in two and then used in a paper agenda. The remaining settings modify 7646in two and then used in a paper agenda. The remaining settings modify
6899the agenda prefix to omit category and scheduling information, and 7647the agenda prefix to omit category and scheduling information, and
6900instead include a checkbox to check off items. We also remove the tags 7648instead include a checkbox to check off items. We also remove the tags
@@ -6909,8 +7657,8 @@ From the command line you may also use
6909emacs -f org-batch-store-agenda-views -kill 7657emacs -f org-batch-store-agenda-views -kill
6910@end example 7658@end example
6911@noindent 7659@noindent
6912or, if you need to modify some parameters@footnote{Quoting may depend on the 7660or, if you need to modify some parameters@footnote{Quoting depends on the
6913system you use, please check th FAQ for examples.} 7661system you use, please check the FAQ for examples.}
6914@example 7662@example
6915emacs -eval '(org-batch-store-agenda-views \ 7663emacs -eval '(org-batch-store-agenda-views \
6916 org-agenda-ndays 30 \ 7664 org-agenda-ndays 30 \
@@ -6921,116 +7669,15 @@ emacs -eval '(org-batch-store-agenda-views \
6921@end example 7669@end example
6922@noindent 7670@noindent
6923which will create the agenda views restricted to the file 7671which will create the agenda views restricted to the file
6924@file{~/org/project.org}, without diary entries and with 30 days 7672@file{~/org/project.org}, without diary entries and with a 30-day
6925extent. 7673extent.
6926 7674
6927@node Using the agenda elsewhere, , Exporting Agenda Views, Custom agenda views 7675You can also extract agenda information in a way that allows further
6928@subsection Using agenda information outside of Org 7676processing by other programs. See @ref{Extracting agenda information}, for
6929@cindex agenda, pipe 7677more information.
6930@cindex Scripts, for agenda processing
6931
6932Org provides commands to access agenda information for the command
6933line in emacs batch mode. This extracted information can be sent
6934directly to a printer, or it can be read by a program that does further
6935processing of the data. The first of these commands is the function
6936@code{org-batch-agenda}, that produces an agenda view and sends it as
6937ASCII text to STDOUT. The command takes a single string as parameter.
6938If the string has length 1, it is used as a key to one of the commands
6939you have configured in @code{org-agenda-custom-commands}, basically any
6940key you can use after @kbd{C-c a}. For example, to directly print the
6941current TODO list, you could use
6942
6943@example
6944emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr
6945@end example
6946
6947If the parameter is a string with 2 or more characters, it is used as a
6948tags/todo match string. For example, to print your local shopping list
6949(all items with the tag @samp{shop}, but excluding the tag
6950@samp{NewYork}), you could use
6951
6952@example
6953emacs -batch -l ~/.emacs \
6954 -eval '(org-batch-agenda "+shop-NewYork")' | lpr
6955@end example
6956
6957@noindent
6958You may also modify parameters on the fly like this:
6959
6960@example
6961emacs -batch -l ~/.emacs \
6962 -eval '(org-batch-agenda "a" \
6963 org-agenda-ndays 30 \
6964 org-agenda-include-diary nil \
6965 org-agenda-files (quote ("~/org/project.org")))' \
6966 | lpr
6967@end example
6968
6969@noindent
6970which will produce a 30 day agenda, fully restricted to the Org file
6971@file{~/org/projects.org}, not even including the diary.
6972
6973If you want to process the agenda data in more sophisticated ways, you
6974can use the command @code{org-batch-agenda-csv} to get a comma-separated
6975list of values for each agenda item. Each line in the output will
6976contain a number of fields separated by commas. The fields in a line
6977are:
6978
6979@example
6980category @r{The category of the item}
6981head @r{The headline, without TODO kwd, TAGS and PRIORITY}
6982type @r{The type of the agenda entry, can be}
6983 todo @r{selected in TODO match}
6984 tagsmatch @r{selected in tags match}
6985 diary @r{imported from diary}
6986 deadline @r{a deadline}
6987 scheduled @r{scheduled}
6988 timestamp @r{appointment, selected by timestamp}
6989 closed @r{entry was closed on date}
6990 upcoming-deadline @r{warning about nearing deadline}
6991 past-scheduled @r{forwarded scheduled item}
6992 block @r{entry has date block including date}
6993todo @r{The TODO keyword, if any}
6994tags @r{All tags including inherited ones, separated by colons}
6995date @r{The relevant date, like 2007-2-14}
6996time @r{The time, like 15:00-16:50}
6997extra @r{String with extra planning info}
6998priority-l @r{The priority letter if any was given}
6999priority-n @r{The computed numerical priority}
7000@end example
7001
7002@noindent
7003Time and date will only be given if a timestamp (or deadline/scheduled)
7004lead to the selection of the item.
7005
7006A CSV list like this is very easy to use in a post processing script.
7007For example, here is a Perl program that gets the TODO list from
7008Emacs/Org and prints all the items, preceded by a checkbox:
7009
7010@example
7011@group
7012#!/usr/bin/perl
7013
7014# define the Emacs command to run
7015$cmd = "emacs -batch -l ~/.emacs -eval '(org-batch-agenda-csv \"t\")'";
7016
7017# run it and capture the output
7018$agenda = qx@{$cmd 2>/dev/null@};
7019
7020# loop over all lines
7021foreach $line (split(/\n/,$agenda)) @{
7022
7023 # get the individual values
7024 ($category,$head,$type,$todo,$tags,$date,$time,$extra,
7025 $priority_l,$priority_n) = split(/,/,$line);
7026 7678
7027 # process and print
7028 print "[ ] $head\n";
7029@}
7030@end group
7031@end example
7032 7679
7033@node Agenda column view, , Custom agenda views, Agenda Views 7680@node Agenda column view, , Exporting Agenda Views, Agenda Views
7034@section Using column view in the agenda 7681@section Using column view in the agenda
7035@cindex column view, in agenda 7682@cindex column view, in agenda
7036@cindex agenda, column view 7683@cindex agenda, column view
@@ -7052,15 +7699,18 @@ This causes the following issues:
7052 7699
7053@enumerate 7700@enumerate
7054@item 7701@item
7702@vindex org-columns-default-format
7703@vindex org-overriding-columns-format
7055Org needs to make a decision which @code{COLUMNS} format to use. Since the 7704Org needs to make a decision which @code{COLUMNS} format to use. Since the
7056entries in the agenda are collected from different files, and different files 7705entries in the agenda are collected from different files, and different files
7057may have different @code{COLUMNS} formats, this is a non-trivial problem. 7706may have different @code{COLUMNS} formats, this is a non-trivial problem.
7058Org first checks if the variable @code{org-overriding-columns-format} is 7707Org first checks if the variable @code{org-overriding-columns-format} is
7059currently set, and if yes takes the format from there. Otherwise it takes 7708currently set, and if so, takes the format from there. Otherwise it takes
7060the format associated with the first item in the agenda, or, if that item 7709the format associated with the first item in the agenda, or, if that item
7061does not have a specific format (defined in a property, or in it's file), it 7710does not have a specific format (defined in a property, or in its file), it
7062uses @code{org-columns-default-format}. 7711uses @code{org-columns-default-format}.
7063@item 7712@item
7713@cindex property, special, CLOCKSUM
7064If any of the columns has a summary type defined (@pxref{Column attributes}), 7714If any of the columns has a summary type defined (@pxref{Column attributes}),
7065turning on column view in the agenda will visit all relevant agenda files and 7715turning on column view in the agenda will visit all relevant agenda files and
7066make sure that the computations of this property are up to date. This is 7716make sure that the computations of this property are up to date. This is
@@ -7069,7 +7719,7 @@ values displayed in the agenda. In the daily/weekly agenda, the sums will
7069cover a single day, in all other views they cover the entire block. It is 7719cover a single day, in all other views they cover the entire block. It is
7070vital to realize that the agenda may show the same entry @emph{twice} (for 7720vital to realize that the agenda may show the same entry @emph{twice} (for
7071example as scheduled and as a deadline), and it may show two entries from the 7721example as scheduled and as a deadline), and it may show two entries from the
7072same hierarchy (for example a @emph{parent} and it's @emph{child}). In these 7722same hierarchy (for example a @emph{parent} and its @emph{child}). In these
7073cases, the summation in the agenda will lead to incorrect results because 7723cases, the summation in the agenda will lead to incorrect results because
7074some values will count double. 7724some values will count double.
7075@item 7725@item
@@ -7077,7 +7727,7 @@ When the column view in the agenda shows the @code{CLOCKSUM}, that is always
7077the entire clocked time for this item. So even in the daily/weekly agenda, 7727the entire clocked time for this item. So even in the daily/weekly agenda,
7078the clocksum listed in column view may originate from times outside the 7728the clocksum listed in column view may originate from times outside the
7079current view. This has the advantage that you can compare these values with 7729current view. This has the advantage that you can compare these values with
7080a column listing the planned total effort for a task - one of the major 7730a column listing the planned total effort for a task---one of the major
7081applications for column view in the agenda. If you want information about 7731applications for column view in the agenda. If you want information about
7082clocked time in the displayed period use clock table mode (press @kbd{R} in 7732clocked time in the displayed period use clock table mode (press @kbd{R} in
7083the agenda). 7733the agenda).
@@ -7085,7 +7735,7 @@ the agenda).
7085 7735
7086 7736
7087@node Embedded LaTeX, Exporting, Agenda Views, Top 7737@node Embedded LaTeX, Exporting, Agenda Views, Top
7088@chapter Embedded LaTeX 7738@chapter Embedded La@TeX{}
7089@cindex @TeX{} interpretation 7739@cindex @TeX{} interpretation
7090@cindex La@TeX{} interpretation 7740@cindex La@TeX{} interpretation
7091 7741
@@ -7104,17 +7754,17 @@ If you observe a few conventions, Org mode knows how to find it and what
7104to do with it. 7754to do with it.
7105 7755
7106@menu 7756@menu
7107* Math symbols:: TeX macros for symbols and Greek letters 7757* Math symbols:: @TeX{} macros for symbols and Greek letters
7108* Subscripts and superscripts:: Simple syntax for raising/lowering text 7758* Subscripts and superscripts:: Simple syntax for raising/lowering text
7109* LaTeX fragments:: Complex formulas made easy 7759* LaTeX fragments:: Complex formulas made easy
7110* Processing LaTeX fragments:: Previewing LaTeX processing 7760* Processing LaTeX fragments:: Previewing La@TeX{} processing
7111* CDLaTeX mode:: Speed up entering of formulas 7761* CDLaTeX mode:: Speed up entering of formulas
7112@end menu 7762@end menu
7113 7763
7114@node Math symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX 7764@node Math symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX
7115@section Math symbols 7765@section Math symbols
7116@cindex math symbols 7766@cindex math symbols
7117@cindex TeX macros 7767@cindex @TeX{} macros
7118 7768
7119You can use La@TeX{} macros to insert special symbols like @samp{\alpha} to 7769You can use La@TeX{} macros to insert special symbols like @samp{\alpha} to
7120indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion 7770indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion
@@ -7126,7 +7776,7 @@ delimiters, for example:
7126@example 7776@example
7127Angles are written as Greek letters \alpha, \beta and \gamma. 7777Angles are written as Greek letters \alpha, \beta and \gamma.
7128@end example 7778@end example
7129 7779@noindent
7130During HTML export (@pxref{HTML export}), these symbols are translated 7780During HTML export (@pxref{HTML export}), these symbols are translated
7131into the proper syntax for HTML, for the above examples this is 7781into the proper syntax for HTML, for the above examples this is
7132@samp{&alpha;} and @samp{&rarr;}, respectively. If you need such a symbol 7782@samp{&alpha;} and @samp{&rarr;}, respectively. If you need such a symbol
@@ -7149,15 +7799,16 @@ the sun is R_@{sun@} = 6.96 x 10^8 m.
7149@end example 7799@end example
7150 7800
7151To avoid interpretation as raised or lowered text, you can quote 7801To avoid interpretation as raised or lowered text, you can quote
7152@samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}. 7802@samp{^} and @samp{_} with a backslash: @samp{\^} and @samp{\_}.
7153 7803
7154During HTML export (@pxref{HTML export}), subscript and superscripts 7804During HTML export (@pxref{HTML export}), subscript and superscripts
7155are surrounded with @code{<sub>} and @code{<sup>} tags, respectively. 7805are surrounded with @code{<sub>} and @code{<sup>} tags, respectively.
7156 7806
7157@node LaTeX fragments, Processing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX 7807@node LaTeX fragments, Processing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX
7158@section LaTeX fragments 7808@section La@TeX{} fragments
7159@cindex LaTeX fragments 7809@cindex La@TeX{} fragments
7160 7810
7811@vindex org-format-latex-header
7161With symbols, sub- and superscripts, HTML is pretty much at its end when 7812With symbols, sub- and superscripts, HTML is pretty much at its end when
7162it comes to representing mathematical formulas@footnote{Yes, there is 7813it comes to representing mathematical formulas@footnote{Yes, there is
7163MathML, but that is not yet fully supported by many browsers, and there 7814MathML, but that is not yet fully supported by many browsers, and there
@@ -7205,6 +7856,7 @@ either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \].
7205@end example 7856@end example
7206 7857
7207@noindent 7858@noindent
7859@vindex org-format-latex-options
7208If you need any of the delimiter ASCII sequences for other purposes, you 7860If you need any of the delimiter ASCII sequences for other purposes, you
7209can configure the option @code{org-format-latex-options} to deselect the 7861can configure the option @code{org-format-latex-options} to deselect the
7210ones you do not wish to have interpreted by the La@TeX{} converter. 7862ones you do not wish to have interpreted by the La@TeX{} converter.
@@ -7213,7 +7865,7 @@ ones you do not wish to have interpreted by the La@TeX{} converter.
7213@section Processing LaTeX fragments 7865@section Processing LaTeX fragments
7214@cindex LaTeX fragments, preview 7866@cindex LaTeX fragments, preview
7215 7867
7216La@TeX{} fragments can be processed to produce a preview images of the 7868La@TeX{} fragments can be processed to produce preview images of the
7217typeset expressions: 7869typeset expressions:
7218 7870
7219@table @kbd 7871@table @kbd
@@ -7239,16 +7891,16 @@ setting is active:
7239@end lisp 7891@end lisp
7240 7892
7241@node CDLaTeX mode, , Processing LaTeX fragments, Embedded LaTeX 7893@node CDLaTeX mode, , Processing LaTeX fragments, Embedded LaTeX
7242@section Using CDLaTeX to enter math 7894@section Using CDLa@TeX{} to enter math
7243@cindex CDLaTeX 7895@cindex CDLa@TeX{}
7244 7896
7245CDLaTeX mode is a minor mode that is normally used in combination with a 7897CDLa@TeX{} mode is a minor mode that is normally used in combination with a
7246major La@TeX{} mode like AUCTeX in order to speed-up insertion of 7898major La@TeX{} mode like AUC@TeX{} in order to speed-up insertion of
7247environments and math templates. Inside Org mode, you can make use of 7899environments and math templates. Inside Org mode, you can make use of
7248some of the features of CDLaTeX mode. You need to install 7900some of the features of CDLa@TeX{} mode. You need to install
7249@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with 7901@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with
7250AUCTeX) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}. 7902AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
7251Don't use CDLaTeX mode itself under Org mode, but use the light 7903Don't use CDLa@TeX{} mode itself under Org mode, but use the light
7252version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it 7904version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it
7253on for the current buffer with @code{M-x org-cdlatex-mode}, or for all 7905on for the current buffer with @code{M-x org-cdlatex-mode}, or for all
7254Org files with 7906Org files with
@@ -7258,7 +7910,7 @@ Org files with
7258@end lisp 7910@end lisp
7259 7911
7260When this mode is enabled, the following features are present (for more 7912When this mode is enabled, the following features are present (for more
7261details see the documentation of CDLaTeX mode): 7913details see the documentation of CDLa@TeX{} mode):
7262@itemize @bullet 7914@itemize @bullet
7263@kindex C-c @{ 7915@kindex C-c @{
7264@item 7916@item
@@ -7279,6 +7931,7 @@ To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}.
7279@item 7931@item
7280@kindex _ 7932@kindex _
7281@kindex ^ 7933@kindex ^
7934@vindex cdlatex-simplify-sub-super-scripts
7282Pressing @kbd{_} and @kbd{^} inside a La@TeX{} fragment will insert these 7935Pressing @kbd{_} and @kbd{^} inside a La@TeX{} fragment will insert these
7283characters together with a pair of braces. If you use @key{TAB} to move 7936characters together with a pair of braces. If you use @key{TAB} to move
7284out of the braces, and if the braces surround only a single character or 7937out of the braces, and if the braces surround only a single character or
@@ -7291,7 +7944,7 @@ macros, also outside La@TeX{} fragments. If you wait more than 1.5 seconds
7291after the backquote, a help window will pop up. 7944after the backquote, a help window will pop up.
7292@item 7945@item
7293@kindex ' 7946@kindex '
7294Pressing the normal quote @kbd{'} followed by another character modifies 7947Pressing the single-quote @kbd{'} followed by another character modifies
7295the symbol before point with an accent or a font. If you wait more than 7948the symbol before point with an accent or a font. If you wait more than
72961.5 seconds after the backquote, a help window will pop up. Character 79491.5 seconds after the backquote, a help window will pop up. Character
7297modification will work only inside La@TeX{} fragments, outside the quote 7950modification will work only inside La@TeX{} fragments, outside the quote
@@ -7302,16 +7955,17 @@ is normal.
7302@chapter Exporting 7955@chapter Exporting
7303@cindex exporting 7956@cindex exporting
7304 7957
7305Org mode documents can be exported into a variety of other formats. For 7958Org-mode documents can be exported into a variety of other formats. For
7306printing and sharing of notes, ASCII export produces a readable and 7959printing and sharing of notes, ASCII export produces a readable and simple
7307simple version of an Org file. HTML export allows you to publish a 7960version of an Org file. HTML export allows you to publish a notes file on
7308notes file on the web, while the XOXO format provides a solid base for 7961the web, while the XOXO format provides a solid base for exchange with a
7309exchange with a broad range of other applications. La@TeX{} export lets 7962broad range of other applications. La@TeX{} export lets you use Org mode and
7310you use Org mode and its structured editing functions to easily create 7963its structured editing functions to easily create La@TeX{} files. DocBook
7311La@TeX{} files. To incorporate entries with associated times like 7964export makes it possible to convert Org files to many other formats using
7312deadlines or appointments into a desktop calendar program like iCal, 7965DocBook tools. To incorporate entries with associated times like deadlines
7313Org mode can also produce extracts in the iCalendar format. Currently 7966or appointments into a desktop calendar program like iCal, Org mode can also
7314Org mode only supports export, not import of these different formats. 7967produce extracts in the iCalendar format. Currently Org mode only supports
7968export, not import of these different formats.
7315 7969
7316Org supports export of selected regions when @code{transient-mark-mode} is 7970Org supports export of selected regions when @code{transient-mark-mode} is
7317enabled (default in Emacs 23). 7971enabled (default in Emacs 23).
@@ -7323,7 +7977,8 @@ enabled (default in Emacs 23).
7323* The export dispatcher:: How to access exporter commands 7977* The export dispatcher:: How to access exporter commands
7324* ASCII export:: Exporting to plain ASCII 7978* ASCII export:: Exporting to plain ASCII
7325* HTML export:: Exporting to HTML 7979* HTML export:: Exporting to HTML
7326* LaTeX and PDF export:: Exporting to LaTeX, and processing to PDF 7980* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
7981* DocBook export:: Exporting to DocBook
7327* XOXO export:: Exporting to XOXO 7982* XOXO export:: Exporting to XOXO
7328* iCalendar export:: Exporting in iCalendar format 7983* iCalendar export:: Exporting in iCalendar format
7329@end menu 7984@end menu
@@ -7331,11 +7986,11 @@ enabled (default in Emacs 23).
7331@node Markup rules, Selective export, Exporting, Exporting 7986@node Markup rules, Selective export, Exporting, Exporting
7332@section Markup rules 7987@section Markup rules
7333 7988
7334When exporting Org mode documents, the exporter tries to reflect the 7989When exporting Org-mode documents, the exporter tries to reflect the
7335structure of the document as accurately as possible in the back-end. Since 7990structure of the document as accurately as possible in the backend. Since
7336export targets like HTML or La@TeX{} allow much richer formatting, Org mode 7991export targets like HTML, La@TeX{}, or DocBook allow much richer formatting,
7337has rules how to prepare text for rich export. This section summarizes the 7992Org mode has rules on how to prepare text for rich export. This section
7338markup rule used in an Org mode buffer. 7993summarizes the markup rules used in an Org-mode buffer.
7339 7994
7340@menu 7995@menu
7341* Document title:: How the document title is determined 7996* Document title:: How the document title is determined
@@ -7348,11 +8003,12 @@ markup rule used in an Org mode buffer.
7348* Include files:: Include the contents of a file during export 8003* Include files:: Include the contents of a file during export
7349* Tables exported:: Tables are exported richly 8004* Tables exported:: Tables are exported richly
7350* Inlined images:: How to inline images during export 8005* Inlined images:: How to inline images during export
7351* Footnote markup:: 8006* Footnote markup:: ASCII representation of footnotes
7352* Emphasis and monospace:: To bold or not to bold 8007* Emphasis and monospace:: To bold or not to bold
7353* TeX macros and LaTeX fragments:: Create special, rich export. 8008* TeX macros and LaTeX fragments:: Create special, rich export.
7354* Horizontal rules:: A line across the page 8009* Horizontal rules:: A line across the page
7355* Comment lines:: Some lines will not be exported 8010* Comment lines:: Some lines will not be exported
8011* Macro replacement:: Global replacement of place holders
7356@end menu 8012@end menu
7357 8013
7358@node Document title, Headings and sections, Markup rules, Markup rules 8014@node Document title, Headings and sections, Markup rules, Markup rules
@@ -7362,6 +8018,7 @@ markup rule used in an Org mode buffer.
7362@noindent 8018@noindent
7363The title of the exported document is taken from the special line 8019The title of the exported document is taken from the special line
7364 8020
8021@cindex #+TITLE
7365@example 8022@example
7366#+TITLE: This is the title of the document 8023#+TITLE: This is the title of the document
7367@end example 8024@end example
@@ -7372,6 +8029,7 @@ non-comment line in the buffer. If no such line exists, or if you have
7372turned off exporting of the text before the first headline (see below), the 8029turned off exporting of the text before the first headline (see below), the
7373title will be the file name without extension. 8030title will be the file name without extension.
7374 8031
8032@cindex property, EXPORT_TITLE
7375If you are exporting only a subtree by marking is as the region, the heading 8033If you are exporting only a subtree by marking is as the region, the heading
7376of the subtree will become the title of the document. If the subtree has a 8034of the subtree will become the title of the document. If the subtree has a
7377property @code{EXPORT_TITLE}, that will take precedence. 8035property @code{EXPORT_TITLE}, that will take precedence.
@@ -7380,14 +8038,16 @@ property @code{EXPORT_TITLE}, that will take precedence.
7380@subheading Headings and sections 8038@subheading Headings and sections
7381@cindex headings and sections, markup rules 8039@cindex headings and sections, markup rules
7382 8040
8041@vindex org-headline-levels
7383The outline structure of the document as described in @ref{Document 8042The outline structure of the document as described in @ref{Document
7384Structure} forms the basis for defining sections of the exported document. 8043Structure}, forms the basis for defining sections of the exported document.
7385However, since the outline structure is also used for (for example) lists of 8044However, since the outline structure is also used for (for example) lists of
7386tasks, only the first three outline levels will be used as headings. Deeper 8045tasks, only the first three outline levels will be used as headings. Deeper
7387levels will become itemized lists. You can change the location of this 8046levels will become itemized lists. You can change the location of this
7388switch, globally by setting the variable @code{org-headline-levels}, or on a 8047switch globally by setting the variable @code{org-headline-levels}, or on a
7389per file basis with a line 8048per-file basis with a line
7390 8049
8050@cindex #+OPTIONS
7391@example 8051@example
7392#+OPTIONS: H:4 8052#+OPTIONS: H:4
7393@end example 8053@end example
@@ -7396,12 +8056,13 @@ per file basis with a line
7396@subheading Table of contents 8056@subheading Table of contents
7397@cindex table of contents, markup rules 8057@cindex table of contents, markup rules
7398 8058
8059@vindex org-export-with-toc
7399The table of contents is normally inserted directly before the first headline 8060The table of contents is normally inserted directly before the first headline
7400of the file. If you would like to get it to a different location, insert the 8061of the file. If you would like to get it to a different location, insert the
7401string @code{[TABLE-OF-CONTENTS]} on a line by itself at the desired 8062string @code{[TABLE-OF-CONTENTS]} on a line by itself at the desired
7402location. The depth of the table of contents is by default the same as the 8063location. The depth of the table of contents is by default the same as the
7403number of headline levels, but you can choose a smaller number or turn off 8064number of headline levels, but you can choose a smaller number, or turn off
7404the table of contents entirely by configuring the variable 8065the table of contents entirely, by configuring the variable
7405@code{org-export-with-toc}, or on a per-file basis with a line like 8066@code{org-export-with-toc}, or on a per-file basis with a line like
7406 8067
7407@example 8068@example
@@ -7416,9 +8077,10 @@ the table of contents entirely by configuring the variable
7416 8077
7417Org mode normally exports the text before the first headline, and even uses 8078Org mode normally exports the text before the first headline, and even uses
7418the first line as the document title. The text will be fully marked up. If 8079the first line as the document title. The text will be fully marked up. If
7419you need to include literal HTML or La@TeX{} code, use the special constructs 8080you need to include literal HTML, La@TeX{}, or DocBook code, use the special
7420described below in the sections for the individual exporters. 8081constructs described below in the sections for the individual exporters.
7421 8082
8083@vindex org-export-skip-text-before-1st-heading
7422Some people like to use the space before the first headline for setup and 8084Some people like to use the space before the first headline for setup and
7423internal links and therefore would like to control the exported text before 8085internal links and therefore would like to control the exported text before
7424the first headline in a different way. You can do so by setting the variable 8086the first headline in a different way. You can do so by setting the variable
@@ -7440,8 +8102,8 @@ If you still want to have some text before the first headline, use the
7440@subheading Lists 8102@subheading Lists
7441@cindex lists, markup rules 8103@cindex lists, markup rules
7442 8104
7443Plain lists as described in @ref{Plain lists} are translated to the back-ends 8105Plain lists as described in @ref{Plain lists}, are translated to the backend's
7444syntax for such lists. Most back-ends support unordered, ordered, and 8106syntax for such lists. Most backends support unordered, ordered, and
7445description lists. 8107description lists.
7446 8108
7447@node Paragraphs, Literal examples, Lists, Markup rules 8109@node Paragraphs, Literal examples, Lists, Markup rules
@@ -7454,6 +8116,7 @@ a line break within a paragraph, use @samp{\\} at the end of a line.
7454To keep the line breaks in a region, but otherwise use normal formatting, you 8116To keep the line breaks in a region, but otherwise use normal formatting, you
7455can use this construct, which can also be used to format poetry. 8117can use this construct, which can also be used to format poetry.
7456 8118
8119@cindex #+BEGIN_VERSE
7457@example 8120@example
7458#+BEGIN_VERSE 8121#+BEGIN_VERSE
7459 Great clouds overhead 8122 Great clouds overhead
@@ -7466,8 +8129,9 @@ can use this construct, which can also be used to format poetry.
7466 8129
7467When quoting a passage from another document, it is customary to format this 8130When quoting a passage from another document, it is customary to format this
7468as a paragraph that is indented on both the left and the right margin. You 8131as a paragraph that is indented on both the left and the right margin. You
7469can include quotations in Org mode documents like this: 8132can include quotations in Org-mode documents like this:
7470 8133
8134@cindex #+BEGIN_QUOTE
7471@example 8135@example
7472#+BEGIN_QUOTE 8136#+BEGIN_QUOTE
7473Everything should be made as simple as possible, 8137Everything should be made as simple as possible,
@@ -7475,11 +8139,19 @@ but not any simpler -- Albert Einstein
7475#+END_QUOTE 8139#+END_QUOTE
7476@end example 8140@end example
7477 8141
8142If you would like to center some text, do it like this:
8143@cindex #+BEGIN_CENTER
8144@example
8145#+BEGIN_CENTER
8146Everything should be made as simple as possible, \\
8147but not any simpler
8148#+END_CENTER
8149@end example
7478 8150
7479@node Literal examples, Include files, Paragraphs, Markup rules 8151@node Literal examples, Include files, Paragraphs, Markup rules
7480@subheading Literal examples 8152@subheading Literal examples
7481@cindex literal examples, markup rules 8153@cindex literal examples, markup rules
7482@cindex code line refenences, markup rules 8154@cindex code line references, markup rules
7483 8155
7484You can include literal examples that should not be subjected to 8156You can include literal examples that should not be subjected to
7485markup. Such examples will be typeset in monospace, so this is well suited 8157markup. Such examples will be typeset in monospace, so this is well suited
@@ -7492,8 +8164,10 @@ Some example from a text file.
7492#+END_EXAMPLE 8164#+END_EXAMPLE
7493@end example 8165@end example
7494 8166
7495For simplicity when using small examples, you can also start the example 8167Note that such blocks may be @i{indented} in order to align nicely with
7496lines with a colon followed by a space. There may also be additional 8168indented text and in particular with plain list structure (@pxref{Plain
8169lists}). For simplicity when using small examples, you can also start the
8170example lines with a colon followed by a space. There may also be additional
7497whitespace before the colon: 8171whitespace before the colon:
7498 8172
7499@example 8173@example
@@ -7505,7 +8179,7 @@ Here is an example
7505If the example is source code from a programming language, or any other text 8179If the example is source code from a programming language, or any other text
7506that can be marked up by font-lock in Emacs, you can ask for the example to 8180that can be marked up by font-lock in Emacs, you can ask for the example to
7507look like the fontified Emacs buffer@footnote{Currently this works only for 8181look like the fontified Emacs buffer@footnote{Currently this works only for
7508the HTML back-end, and requires the @file{htmlize.el} package version 1.34 or 8182the HTML backend, and requires the @file{htmlize.el} package version 1.34 or
7509later.}. This is done with the @samp{src} block, where you also need to 8183later.}. This is done with the @samp{src} block, where you also need to
7510specify the name of the major mode that should be used to fontify the 8184specify the name of the major mode that should be used to fontify the
7511example: 8185example:
@@ -7524,46 +8198,50 @@ switch to the end of the @code{BEGIN} line, to get the lines of the example
7524numbered. If you use a @code{+n} switch, the numbering from the previous 8198numbered. If you use a @code{+n} switch, the numbering from the previous
7525numbered snippet will be continued in the current one. In literal examples, 8199numbered snippet will be continued in the current one. In literal examples,
7526Org will interpret strings like @samp{(ref:name)} as labels, and use them as 8200Org will interpret strings like @samp{(ref:name)} as labels, and use them as
7527targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference 8201targets for special hyperlinks like @code{[[(name)]]} (@ie the reference name
7528name enclosed in single parenthesis). In HTML, hovering the mouse over such 8202enclosed in single parenthesis). In HTML, hovering the mouse over such a
7529a link will remote-highlight the corresponding code line, which is kind of 8203link will remote-highlight the corresponding code line, which is kind of
7530cool. If the example/src snippet is numbered, you can also add a @code{-r} 8204cool.
7531switch. Then labels will be @i{removed} from the source code and the links 8205
7532will be @i{replaced}@footnote{If you want to explain the use of such labels 8206You can also add a @code{-r} switch which @i{removes} the labels from the
7533themelves in org-mode example code, you can use the @code{-k} switch to make 8207source code@footnote{Adding @code{-k} to @code{-n -r} will @i{keep} the
7534sure they are not touched.} with line numbers from the code listing. Here is 8208labels in the source code while using line numbers for the links, which might
7535an example: 8209be useful to explain those in an org-mode example code.}. With the @code{-n}
8210switch, links to these references will be labeled by the line numbers from
8211the code listing, otherwise links will use the labels with no parentheses.
8212Here is an example:
7536 8213
7537@example 8214@example
7538#+BEGIN_SRC emacs-lisp -n -r 8215#+BEGIN_SRC emacs-lisp -n -r
7539(save-excursion (ref:sc) 8216(save-excursion (ref:sc)
7540 (goto-char (point-min)) (ref:jump) 8217 (goto-char (point-min)) (ref:jump)
7541#+END SRC 8218#+END_SRC
7542In line [[(sc)]] we remember the current positon. [[(jump)][Line (jump)]] 8219In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]]
7543jumps to point-min. 8220jumps to point-min.
7544@end example 8221@end example
7545 8222
8223@vindex org-coderef-label-format
7546If the syntax for the label format conflicts with the language syntax, use a 8224If the syntax for the label format conflicts with the language syntax, use a
7547@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal 8225@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal
7548-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}. 8226-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}.
7549 8227
7550HTML export also allows examples to be published as text areas, @pxref{Text 8228HTML export also allows examples to be published as text areas, @xref{Text
7551areas in HTML export}. 8229areas in HTML export}.
7552 8230
7553@table @kbd 8231@table @kbd
7554@kindex C-c ' 8232@kindex C-c '
7555@item C-c ' 8233@item C-c '
7556Edit the source code example at point in its native mode. This works by 8234Edit the source code example at point in its native mode. This works by
7557switching to an indirect buffer, narrowing the buffer and switching to the 8235switching to a temporary buffer with the source code. You need to exit by
7558other mode. You need to exit by pressing @kbd{C-c '} again@footnote{Upon 8236pressing @kbd{C-c '} again@footnote{Upon exit, lines starting with @samp{*}
7559exit, lines starting with @samp{*} or @samp{#} will get a comma prepended, to 8237or @samp{#} will get a comma prepended, to keep them from being interpreted
7560keep them from being interpreted by Org as outline nodes or special 8238by Org as outline nodes or special comments. These commas will be striped
7561comments. These commas will be striped for editing with @kbd{C-c '}, and 8239for editing with @kbd{C-c '}, and also for export.}, the edited version will
7562also for export.}. Fixed-width 8240then replace the old version in the Org buffer. Fixed-width regions
7563regions (where each line starts with a colon followed by a space) will be 8241(where each line starts with a colon followed by a space) will be edited
7564edited using @code{artist-mode}@footnote{You may select a different-mode with 8242using @code{artist-mode}@footnote{You may select a different-mode with the
7565the variable @code{org-edit-fixed-width-region-mode}.} to allow creating 8243variable @code{org-edit-fixed-width-region-mode}.} to allow creating ASCII
7566ASCII drawings easily. Using this command in an empty line will create a new 8244drawings easily. Using this command in an empty line will create a new
7567fixed-width region. 8245fixed-width region.
7568@kindex C-c l 8246@kindex C-c l
7569@item C-c l 8247@item C-c l
@@ -7580,13 +8258,13 @@ label is stored as a link @samp{(label)}, for retrieval with @kbd{C-c C-l}.
7580@cindex include files, markup rules 8258@cindex include files, markup rules
7581 8259
7582During export, you can include the content of another file. For example, to 8260During export, you can include the content of another file. For example, to
7583include your .emacs file, you could use: 8261include your @file{.emacs} file, you could use:
7584@cindex #+INCLUDE 8262@cindex #+INCLUDE
7585 8263
7586@example 8264@example
7587#+INCLUDE: "~/.emacs" src emacs-lisp 8265#+INCLUDE: "~/.emacs" src emacs-lisp
7588@end example 8266@end example
7589 8267@noindent
7590The optional second and third parameter are the markup (@samp{quote}, 8268The optional second and third parameter are the markup (@samp{quote},
7591@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the 8269@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
7592language for formatting the contents. The markup is optional, if it is not 8270language for formatting the contents. The markup is optional, if it is not
@@ -7625,10 +8303,10 @@ a caption and a label for cross references:
7625@subheading Inlined Images 8303@subheading Inlined Images
7626@cindex inlined images, markup rules 8304@cindex inlined images, markup rules
7627 8305
7628Some backends (HTML and LaTeX) allow to directly include images into the 8306Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include images
7629exported document. Org does this, if a link to an image files does not have 8307into the exported document. Org does this, if a link to an image files does
7630a description part, for example @code{[[./img/a.jpg]]}. If you wish to 8308not have a description part, for example @code{[[./img/a.jpg]]}. If you wish
7631define a caption for the image and maybe a label for internal cross 8309to define a caption for the image and maybe a label for internal cross
7632references, you can use (before, but close to the link) 8310references, you can use (before, but close to the link)
7633 8311
7634@example 8312@example
@@ -7645,9 +8323,9 @@ information.
7645@cindex footnotes, markup rules 8323@cindex footnotes, markup rules
7646@cindex @file{footnote.el} 8324@cindex @file{footnote.el}
7647 8325
7648Footnotes defined in the way descriped in @ref{Footnotes} will be exported by 8326Footnotes defined in the way described in @ref{Footnotes}, will be exported by
7649all backends. Org does allow multiple references to the same note, and 8327all backends. Org allows multiple references to the same note, and
7650different backends support this to varying degree. 8328different backends support this to varying degrees.
7651 8329
7652@node Emphasis and monospace, TeX macros and LaTeX fragments, Footnote markup, Markup rules 8330@node Emphasis and monospace, TeX macros and LaTeX fragments, Footnote markup, Markup rules
7653@subheading Emphasis and monospace 8331@subheading Emphasis and monospace
@@ -7660,25 +8338,26 @@ different backends support this to varying degree.
7660@cindex strike-through text, markup rules 8338@cindex strike-through text, markup rules
7661You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} 8339You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
7662and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text 8340and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
7663in the code and verbatim string is not processed for Org mode specific 8341in the code and verbatim string is not processed for Org-mode specific
7664syntax, it is exported verbatim. 8342syntax, it is exported verbatim.
7665 8343
7666@node TeX macros and LaTeX fragments, Horizontal rules, Emphasis and monospace, Markup rules 8344@node TeX macros and LaTeX fragments, Horizontal rules, Emphasis and monospace, Markup rules
7667@subheading @TeX{} macros and La@TeX{} fragments 8345@subheading @TeX{} macros and La@TeX{} fragments
7668@cindex LaTeX fragments, markup rules 8346@cindex La@TeX{} fragments, markup rules
7669@cindex TeX macros, markup rules 8347@cindex @TeX{} macros, markup rules
7670@cindex HTML entities 8348@cindex HTML entities
7671@cindex LaTeX entities 8349@cindex La@TeX{} entities
7672 8350
8351@vindex org-html-entities
7673A @TeX{}-like syntax is used to specify special characters. Where possible, 8352A @TeX{}-like syntax is used to specify special characters. Where possible,
7674these will be transformed into the native format of the exporter back-end. 8353these will be transformed into the native format of the exporter backend.
7675Strings like @code{\alpha} will be exported as @code{&alpha;} in the HTML 8354Strings like @code{\alpha} will be exported as @code{&alpha;} in the HTML
7676output, and as @code{$\alpha$} in the La@TeX{} output. Similarly, 8355output, and as @code{$\alpha$} in the La@TeX{} output. Similarly,
7677@code{\nbsp} will become @code{&nbsp;} in HTML and @code{~} in La@TeX{}. 8356@code{\nbsp} will become @code{&nbsp;} in HTML and @code{~} in La@TeX{}.
7678This applies for a large number of entities, with names taken from both HTML 8357This applies for a large number of entities, with names taken from both HTML
7679and La@TeX{}, see the variable @code{org-html-entities} for the complete 8358and La@TeX{}, see the variable @code{org-html-entities} for the complete
7680list. If you are unsure about a name, use @kbd{M-@key{TAB}} for completion 8359list. If you are unsure about a name, use @kbd{M-@key{TAB}} for completion
7681after having typed the backslash and maybe a few characters 8360after having typed the backslash and optionally a few characters
7682(@pxref{Completion}). 8361(@pxref{Completion}).
7683 8362
7684La@TeX{} fragments are converted into images for HTML export, and they are 8363La@TeX{} fragments are converted into images for HTML export, and they are
@@ -7694,10 +8373,11 @@ different lengths or a compact set of dots.
7694A line consisting of only dashes, and at least 5 of them, will be 8373A line consisting of only dashes, and at least 5 of them, will be
7695exported as a horizontal line (@samp{<hr/>} in HTML). 8374exported as a horizontal line (@samp{<hr/>} in HTML).
7696 8375
7697@node Comment lines, , Horizontal rules, Markup rules 8376@node Comment lines, Macro replacement, Horizontal rules, Markup rules
7698@subheading Comment lines 8377@subheading Comment lines
7699@cindex comment lines 8378@cindex comment lines
7700@cindex exporting, not 8379@cindex exporting, not
8380@cindex #+BEGIN_COMMENT
7701 8381
7702Lines starting with @samp{#} in column zero are treated as comments and will 8382Lines starting with @samp{#} in column zero are treated as comments and will
7703never be exported. Also entire subtrees starting with the word 8383never be exported. Also entire subtrees starting with the word
@@ -7710,10 +8390,33 @@ never be exported. Also entire subtrees starting with the word
7710Toggle the COMMENT keyword at the beginning of an entry. 8390Toggle the COMMENT keyword at the beginning of an entry.
7711@end table 8391@end table
7712 8392
8393@node Macro replacement, , Comment lines, Markup rules
8394@subheading Macro replacement
8395@cindex macro replacement, during export
8396@cindex #+MACRO
8397
8398You can define text snippets with
8399
8400@example
8401#+MACRO: name replacement text $1, $2 are arguments
8402@end example
8403
8404@noindent which can be referenced anywhere in the document (even in
8405code examples) with @code{@{@{@{name(arg1,arg2)@}@}@}}. In addition to
8406defined macros, @code{@{@{@{title@}@}@}}, @code{@{@{@{author@}@}@}}, etc.,
8407will reference information set by the @code{#+TITLE:}, @code{#+AUTHOR:}, and
8408similar lines. Also, @code{@{@{@{date(@var{FORMAT})@}@}@}} and
8409@code{@{@{@{modification-time(@var{FORMAT})@}@}@}} refer to current date time
8410and to the modification time of the file being exported, respectively.
8411@var{FORMAT} should be a format string understood by
8412@code{format-time-string}.
8413
7713@node Selective export, Export options, Markup rules, Exporting 8414@node Selective export, Export options, Markup rules, Exporting
7714@section Selective export 8415@section Selective export
7715@cindex export, selective by tags 8416@cindex export, selective by tags
7716 8417
8418@vindex org-export-select-tags
8419@vindex org-export-exclude-tags
7717You may use tags to select the parts of a document that should be exported, 8420You may use tags to select the parts of a document that should be exported,
7718or to exclude parts from export. This behavior is governed by two variables: 8421or to exclude parts from export. This behavior is governed by two variables:
7719@code{org-export-select-tags} and @code{org-export-exclude-tags}. 8422@code{org-export-select-tags} and @code{org-export-exclude-tags}.
@@ -7741,7 +8444,10 @@ additional information. These lines may be put anywhere in the file.
7741The whole set of lines can be inserted into the buffer with @kbd{C-c 8444The whole set of lines can be inserted into the buffer with @kbd{C-c
7742C-e t}. For individual lines, a good way to make sure the keyword is 8445C-e t}. For individual lines, a good way to make sure the keyword is
7743correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion 8446correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
7744(@pxref{Completion}). 8447(@pxref{Completion}). For a summary of other in-buffer settings not
8448specifically related to export, see @ref{In-buffer settings}.
8449In particular, note that you can place commonly-used (export) options in
8450a separate file which can be included using @code{#+SETUPFILE}.
7745 8451
7746@table @kbd 8452@table @kbd
7747@kindex C-c C-e t 8453@kindex C-c C-e t
@@ -7749,28 +8455,40 @@ correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
7749Insert template with export options, see example below. 8455Insert template with export options, see example below.
7750@end table 8456@end table
7751 8457
7752@cindex #+TITLE: 8458@cindex #+TITLE
7753@cindex #+AUTHOR: 8459@cindex #+AUTHOR
7754@cindex #+DATE: 8460@cindex #+DATE
7755@cindex #+EMAIL: 8461@cindex #+EMAIL
7756@cindex #+LANGUAGE: 8462@cindex #+DESCRIPTION
7757@cindex #+TEXT: 8463@cindex #+KEYWORDS
7758@cindex #+OPTIONS: 8464@cindex #+LANGUAGE
7759@cindex #+LINK_UP: 8465@cindex #+TEXT
7760@cindex #+LINK_HOME: 8466@cindex #+OPTIONS
7761@cindex #+EXPORT_SELECT_TAGS: 8467@cindex #+BIND
7762@cindex #+EXPORT_EXCLUDE_TAGS: 8468@cindex #+LINK_UP
7763@example 8469@cindex #+LINK_HOME
7764#+TITLE: the title to be shown (default is the buffer name) 8470@cindex #+EXPORT_SELECT_TAGS
7765#+AUTHOR: the author (default taken from @code{user-full-name}) 8471@cindex #+EXPORT_EXCLUDE_TAGS
7766#+DATE: A date, fixed, of a format string for @code{format-time-string} 8472@cindex #+LATEX_HEADER
7767#+EMAIL: his/her email address (default from @code{user-mail-address}) 8473@vindex user-full-name
7768#+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language}) 8474@vindex user-mail-address
7769#+TEXT: Some descriptive text to be inserted at the beginning. 8475@vindex org-export-default-language
7770#+TEXT: Several lines may be given. 8476@example
7771#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... 8477#+TITLE: the title to be shown (default is the buffer name)
7772#+LINK_UP: the ``up'' link of an exported page 8478#+AUTHOR: the author (default taken from @code{user-full-name})
7773#+LINK_HOME: the ``home'' link of an exported page 8479#+DATE: a date, fixed, of a format string for @code{format-time-string}
8480#+EMAIL: his/her email address (default from @code{user-mail-address})
8481#+DESCRIPTION: the page description, @eg for the XHTML meta tag
8482#+KEYWORDS: the page keywords, @eg for the XHTML meta tag
8483#+LANGUAGE: language for HTML, @eg @samp{en} (@code{org-export-default-language})
8484#+TEXT: Some descriptive text to be inserted at the beginning.
8485#+TEXT: Several lines may be given.
8486#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
8487#+BIND: lisp-var lisp-val, e.g.: org-export-latex-low-levels itemize
8488 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
8489#+LINK_UP: the ``up'' link of an exported page
8490#+LINK_HOME: the ``home'' link of an exported page
8491#+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@}
7774#+EXPORT_SELECT_TAGS: Tags that select a tree for export 8492#+EXPORT_SELECT_TAGS: Tags that select a tree for export
7775#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export 8493#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
7776@end example 8494@end example
@@ -7820,7 +8538,7 @@ creator: @r{turn on/off inclusion of creator info into exported file}
7820timestamp: @r{turn on/off inclusion creation time into exported file} 8538timestamp: @r{turn on/off inclusion creation time into exported file}
7821d: @r{turn on/off inclusion of drawers} 8539d: @r{turn on/off inclusion of drawers}
7822@end example 8540@end example
7823 8541@noindent
7824These options take effect in both the HTML and La@TeX{} export, except 8542These options take effect in both the HTML and La@TeX{} export, except
7825for @code{TeX} and @code{LaTeX}, which are respectively @code{t} and 8543for @code{TeX} and @code{LaTeX}, which are respectively @code{t} and
7826@code{nil} for the La@TeX{} export. 8544@code{nil} for the La@TeX{} export.
@@ -7828,7 +8546,8 @@ for @code{TeX} and @code{LaTeX}, which are respectively @code{t} and
7828When exporting only a single subtree by selecting it with @kbd{C-c @@} before 8546When exporting only a single subtree by selecting it with @kbd{C-c @@} before
7829calling an export command, the subtree can overrule some of the file's export 8547calling an export command, the subtree can overrule some of the file's export
7830settings with properties @code{EXPORT_FILE_NAME}, @code{EXPORT_TITLE}, 8548settings with properties @code{EXPORT_FILE_NAME}, @code{EXPORT_TITLE},
7831@code{EXPORT_TEXT}, and @code{EXPORT_OPTIONS}. 8549@code{EXPORT_TEXT}, @code{EXPORT_AUTHOR}, @code{EXPORT_DATE}, and
8550@code{EXPORT_OPTIONS}.
7832 8551
7833@node The export dispatcher, ASCII export, Export options, Exporting 8552@node The export dispatcher, ASCII export, Export options, Exporting
7834@section The export dispatcher 8553@section The export dispatcher
@@ -7843,28 +8562,30 @@ the subtrees are exported.
7843@table @kbd 8562@table @kbd
7844@kindex C-c C-e 8563@kindex C-c C-e
7845@item C-c C-e 8564@item C-c C-e
8565@vindex org-export-run-in-background
7846Dispatcher for export and publishing commands. Displays a help-window 8566Dispatcher for export and publishing commands. Displays a help-window
7847listing the additional key(s) needed to launch an export or publishing 8567listing the additional key(s) needed to launch an export or publishing
7848command. The prefix arg is passed through to the exporter. A double prefix 8568command. The prefix arg is passed through to the exporter. A double prefix
7849@kbd{C-u C-u} causes most commands to be executed in the background, in a 8569@kbd{C-u C-u} causes most commands to be executed in the background, in a
7850separate emacs process@footnote{To make this behavior the default, customize 8570separate Emacs process@footnote{To make this behavior the default, customize
7851the variable @code{org-export-run-in-background}.}. 8571the variable @code{org-export-run-in-background}.}.
7852@kindex C-c C-e v 8572@kindex C-c C-e v
7853@item C-c C-e v 8573@item C-c C-e v
7854Like @kbd{C-c C-e}, but only export the text that is currently visible 8574Like @kbd{C-c C-e}, but only export the text that is currently visible
7855(i.e. not hidden by outline visibility). 8575(@ie not hidden by outline visibility).
7856@kindex C-u C-u C-c C-e 8576@kindex C-u C-u C-c C-e
7857@item C-u C-u C-c C-e 8577@item C-u C-u C-c C-e
8578@vindex org-export-run-in-background
7858Call an the exporter, but reverse the setting of 8579Call an the exporter, but reverse the setting of
7859@code{org-export-run-in-background}, i.e. request background processing if 8580@code{org-export-run-in-background}, @ie request background processing if
7860not set, or force processing in the current Emacs process if st. 8581not set, or force processing in the current Emacs process if set.
7861@end table 8582@end table
7862 8583
7863@node ASCII export, HTML export, The export dispatcher, Exporting 8584@node ASCII export, HTML export, The export dispatcher, Exporting
7864@section ASCII export 8585@section ASCII export
7865@cindex ASCII export 8586@cindex ASCII export
7866 8587
7867ASCII export produces a simple and very readable version of an Org mode 8588ASCII export produces a simple and very readable version of an Org-mode
7868file. 8589file.
7869 8590
7870@cindex region, active 8591@cindex region, active
@@ -7873,15 +8594,19 @@ file.
7873@table @kbd 8594@table @kbd
7874@kindex C-c C-e a 8595@kindex C-c C-e a
7875@item C-c C-e a 8596@item C-c C-e a
7876Export as ASCII file. For an org file @file{myfile.org}, the ASCII file 8597@cindex property, EXPORT_FILE_NAME
8598Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file
7877will be @file{myfile.txt}. The file will be overwritten without 8599will be @file{myfile.txt}. The file will be overwritten without
7878warning. If there is an active region@footnote{this requires 8600warning. If there is an active region@footnote{This requires
7879@code{transient-mark-mode} to be turned on}, only the region will be 8601@code{transient-mark-mode} be turned on.}, only the region will be
7880exported. If the selected region is a single tree@footnote{To select the 8602exported. If the selected region is a single tree@footnote{To select the
7881current subtree, use @kbd{C-c @@}.}, the tree head will 8603current subtree, use @kbd{C-c @@}.}, the tree head will
7882become the document title. If the tree head entry has or inherits an 8604become the document title. If the tree head entry has or inherits an
7883@code{EXPORT_FILE_NAME} property, that name will be used for the 8605@code{EXPORT_FILE_NAME} property, that name will be used for the
7884export. 8606export.
8607@kindex C-c C-e A
8608@item C-c C-e A
8609Export to a temporary buffer, do not create a file.
7885@kindex C-c C-e v a 8610@kindex C-c C-e v a
7886@item C-c C-e v a 8611@item C-c C-e v a
7887Export only the visible part of the document. 8612Export only the visible part of the document.
@@ -7906,6 +8631,11 @@ the body text. Any indentation larger than this is adjusted to preserve
7906the layout relative to the first line. Should there be lines with less 8631the layout relative to the first line. Should there be lines with less
7907indentation than the first, these are left alone. 8632indentation than the first, these are left alone.
7908 8633
8634@vindex org-export-ascii-links-to-notes
8635Links will be exported in a footnote-like style, with the descriptive part in
8636the text and the link in a note before the next heading. See the variable
8637@code{org-export-ascii-links-to-notes} for details and other options.
8638
7909@node HTML export, LaTeX and PDF export, ASCII export, Exporting 8639@node HTML export, LaTeX and PDF export, ASCII export, Exporting
7910@section HTML export 8640@section HTML export
7911@cindex HTML export 8641@cindex HTML export
@@ -7918,6 +8648,7 @@ language, but with additional support for tables.
7918* HTML Export commands:: How to invoke HTML export 8648* HTML Export commands:: How to invoke HTML export
7919* Quoting HTML tags:: Using direct HTML in Org mode 8649* Quoting HTML tags:: Using direct HTML in Org mode
7920* Links:: Transformation of links for HTML 8650* Links:: Transformation of links for HTML
8651* Tables in HTML export:: How to modify the formatting of tables
7921* Images in HTML export:: How to insert figures into HTML output 8652* Images in HTML export:: How to insert figures into HTML output
7922* Text areas in HTML export:: An alternative way to show an example 8653* Text areas in HTML export:: An alternative way to show an example
7923* CSS support:: Changing the appearance of the output 8654* CSS support:: Changing the appearance of the output
@@ -7933,10 +8664,11 @@ language, but with additional support for tables.
7933@table @kbd 8664@table @kbd
7934@kindex C-c C-e h 8665@kindex C-c C-e h
7935@item C-c C-e h 8666@item C-c C-e h
7936Export as HTML file @file{myfile.html}. For an org file @file{myfile.org}, 8667@cindex property, EXPORT_FILE_NAME
8668Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org},
7937the ASCII file will be @file{myfile.html}. The file will be overwritten 8669the ASCII file will be @file{myfile.html}. The file will be overwritten
7938without warning. If there is an active region@footnote{this requires 8670without warning. If there is an active region@footnote{This requires
7939@code{transient-mark-mode} to be turned on}, only the region will be 8671@code{transient-mark-mode} be turned on.}, only the region will be
7940exported. If the selected region is a single tree@footnote{To select the 8672exported. If the selected region is a single tree@footnote{To select the
7941current subtree, use @kbd{C-c @@}.}, the tree head will become the document 8673current subtree, use @kbd{C-c @@}.}, the tree head will become the document
7942title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} 8674title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
@@ -7962,11 +8694,11 @@ the region. This is good for cut-and-paste operations.
7962@item C-c C-e v R 8694@item C-c C-e v R
7963Export only the visible part of the document. 8695Export only the visible part of the document.
7964@item M-x org-export-region-as-html 8696@item M-x org-export-region-as-html
7965Convert the region to HTML under the assumption that it was Org mode 8697Convert the region to HTML under the assumption that it was Org-mode
7966syntax before. This is a global command that can be invoked in any 8698syntax before. This is a global command that can be invoked in any
7967buffer. 8699buffer.
7968@item M-x org-replace-region-by-HTML 8700@item M-x org-replace-region-by-HTML
7969Replace the active region (assumed to be in Org mode syntax) by HTML 8701Replace the active region (assumed to be in Org-mode syntax) by HTML
7970code. 8702code.
7971@end table 8703@end table
7972 8704
@@ -7993,6 +8725,8 @@ which should be interpreted as such, mark them with @samp{@@} as in
7993simple tags. For more extensive HTML that should be copied verbatim to 8725simple tags. For more extensive HTML that should be copied verbatim to
7994the exported file use either 8726the exported file use either
7995 8727
8728@cindex #+HTML
8729@cindex #+BEGIN_HTML
7996@example 8730@example
7997#+HTML: Literal HTML code for export 8731#+HTML: Literal HTML code for export
7998@end example 8732@end example
@@ -8007,14 +8741,14 @@ All lines between these markers are exported literally
8007@end example 8741@end example
8008 8742
8009 8743
8010@node Links, Images in HTML export, Quoting HTML tags, HTML export 8744@node Links, Tables in HTML export, Quoting HTML tags, HTML export
8011@subsection Links 8745@subsection Links
8012 8746
8013@cindex links, in HTML export 8747@cindex links, in HTML export
8014@cindex internal links, in HTML export 8748@cindex internal links, in HTML export
8015@cindex external links, in HTML export 8749@cindex external links, in HTML export
8016Internal links (@pxref{Internal links}) will continue to work in HTML. This 8750Internal links (@pxref{Internal links}) will continue to work in HTML. This
8017does include automatic links created by radio targets (@pxref{Radio 8751includes automatic links created by radio targets (@pxref{Radio
8018targets}). Links to external files will still work if the target file is on 8752targets}). Links to external files will still work if the target file is on
8019the same @i{relative} path as the published Org file. Links to other 8753the same @i{relative} path as the published Org file. Links to other
8020@file{.org} files will be translated into HTML links under the assumption 8754@file{.org} files will be translated into HTML links under the assumption
@@ -8025,23 +8759,41 @@ publishing directory see @ref{Publishing links}.
8025 8759
8026If you want to specify attributes for links, you can do so using a special 8760If you want to specify attributes for links, you can do so using a special
8027@code{#+ATTR_HTML} line to define attributes that will be added to the 8761@code{#+ATTR_HTML} line to define attributes that will be added to the
8028@code{<a>} or @code{<img>} tags. Here is an example that sets @code{alt} and 8762@code{<a>} or @code{<img>} tags. Here is an example that sets @code{title}
8029@code{title} attributes for an inlined image: 8763and @code{style} attributes for a link:
8030 8764
8765@cindex #+ATTR_HTML
8031@example 8766@example
8032#+ATTR_HTML: alt="This is image A" title="Image with no action" 8767#+ATTR_HTML: title="The Org-mode homepage" style="color:red;"
8033[[./img/a.jpg]] 8768[[http://orgmode.org]]
8769@end example
8770
8771@node Tables in HTML export, Images in HTML export, Links, HTML export
8772@subsection Tables
8773@cindex tables, in HTML
8774@vindex org-export-html-table-tag
8775
8776Org-mode tables are exported to HTML using the table tag defined in
8777@code{org-export-html-table-tag}. The default setting makes tables without
8778cell borders and frame. If you would like to change this for individual
8779tables, place somthing like the following before the table:
8780
8781@cindex #+CAPTION
8782@example
8783#+CAPTION: This is a table with lines around and between cells
8784#+ATTR_HTML: border="2" rules="all" frame="all"
8034@end example 8785@end example
8035 8786
8036@node Images in HTML export, Text areas in HTML export, Links, HTML export 8787@node Images in HTML export, Text areas in HTML export, Tables in HTML export, HTML export
8037@subsection Images 8788@subsection Images
8038 8789
8039@cindex images, inline in HTML 8790@cindex images, inline in HTML
8040@cindex inlining images in HTML 8791@cindex inlining images in HTML
8792@vindex org-export-html-inline-images
8041HTML export can inline images given as links in the Org file, and 8793HTML export can inline images given as links in the Org file, and
8042it can make an image the clickable part of a link. By 8794it can make an image the clickable part of a link. By
8043default@footnote{but see the variable 8795default@footnote{But see the variable
8044@code{org-export-html-inline-images}}, images are inlined if a link does 8796@code{org-export-html-inline-images}.}, images are inlined if a link does
8045not have a description. So @samp{[[file:myimg.jpg]]} will be inlined, 8797not have a description. So @samp{[[file:myimg.jpg]]} will be inlined,
8046while @samp{[[file:myimg.jpg][the image]]} will just produce a link 8798while @samp{[[file:myimg.jpg][the image]]} will just produce a link
8047@samp{the image} that points to the image. If the description part 8799@samp{the image} that points to the image. If the description part
@@ -8054,6 +8806,16 @@ will link to a high resolution version of the image, you could use:
8054[[file:highres.jpg][file:thumb.jpg]] 8806[[file:highres.jpg][file:thumb.jpg]]
8055@end example 8807@end example
8056 8808
8809If you need to add attributes to an inlines image, use a @code{#+ATTR_HTML},
8810for example:
8811
8812@cindex #+CAPTION
8813@example
8814#+CAPTION: A black cat stalking a spider
8815#+ATTR_HTML: alt="cat/spider image" title="one second before action"
8816[[./img/a.jpg]]
8817@end example
8818
8057@noindent 8819@noindent
8058and you could use @code{http} addresses just as well. 8820and you could use @code{http} addresses just as well.
8059 8821
@@ -8084,23 +8846,50 @@ respectively. For example
8084@cindex CSS, for HTML export 8846@cindex CSS, for HTML export
8085@cindex HTML export, CSS 8847@cindex HTML export, CSS
8086 8848
8849@vindex org-export-html-todo-kwd-class-prefix
8850@vindex org-export-html-tag-class-prefix
8087You can also give style information for the exported file. The HTML exporter 8851You can also give style information for the exported file. The HTML exporter
8088assigns the following special CSS classes to appropriate parts of the 8852assigns the following special CSS classes@footnote{If the classes on TODO
8089document - your style specifications may change these, in addition to any of 8853keywords and tags lead to conflicts, use the variables
8090the standard classes like for headlines, tables etc. 8854@code{org-export-html-todo-kwd-class-prefix} and
8091@example 8855@code{org-export-html-tag-class-prefix} to make them unique.} to appropriate
8092.todo @r{TODO keywords} 8856parts of the document---your style specifications may change these, in
8093.done @r{the DONE keyword} 8857addition to any of the standard classes like for headlines, tables, etc.
8094.timestamp @r{time stamp} 8858@example
8095.timestamp-kwd @r{keyword associated with a time stamp, like SCHEDULED} 8859p.author @r{author information, including email}
8096.tag @r{tag in a headline} 8860p.date @r{publishing date}
8097.target @r{target for links} 8861p.creator @r{creator info, about org-mode version}
8098div.figure @r{how to format an inlined image} 8862.title @r{document title}
8099.linenr @r{the line number in a code example} 8863.todo @r{TODO keywords, all not-done states}
8100.code-highlighted @r{for highlighting referenced code lines} 8864.done @r{the DONE keywords, all stated the count as done}
8101@end example 8865.WAITING @r{each TODO keyword also uses a class named after itself}
8102 8866.timestamp @r{timestamp}
8103Each exported files contains a compact default style that defines these 8867.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED}
8868.timestamp-wrapper @r{span around keyword plus timestamp}
8869.tag @r{tag in a headline}
8870._HOME @r{each tag uses itself as a class, "@@" replaced by "_"}
8871.target @r{target for links}
8872.linenr @r{the line number in a code example}
8873.code-highlighted @r{for highlighting referenced code lines}
8874div.outline-N @r{div for outline level N (headline plus text))}
8875div.outline-text-N @r{extra div for text at outline level N}
8876.section-number-N @r{section number in headlines, different for each level}
8877div.figure @r{how to format an inlined image}
8878pre.src @r{formatted source code}
8879pre.example @r{normal example}
8880p.verse @r{verse paragraph}
8881div.footnotes @r{footnote section headline}
8882p.footnote @r{footnote definition paragraph, containing a footnote}
8883.footref @r{a footnote reference number (always a <sup>)}
8884.footnum @r{footnote number in footnote definition (always <sup>)}
8885@end example
8886
8887@vindex org-export-html-style-default
8888@vindex org-export-html-style-include-default
8889@vindex org-export-html-style
8890@vindex org-export-html-extra
8891@vindex org-export-html-style-default
8892Each exported file contains a compact default style that defines these
8104classes in a basic way@footnote{This style is defined in the constant 8893classes in a basic way@footnote{This style is defined in the constant
8105@code{org-export-html-style-default}, which you should not modify. To turn 8894@code{org-export-html-style-default}, which you should not modify. To turn
8106inclusion of these defaults off, customize 8895inclusion of these defaults off, customize
@@ -8110,6 +8899,7 @@ settings, or add to them by using the variables @code{org-export-html-style}
8110granular settings, like file-local settings). To set the latter variable 8899granular settings, like file-local settings). To set the latter variable
8111individually for each file, you can use 8900individually for each file, you can use
8112 8901
8902@cindex #+STYLE
8113@example 8903@example
8114#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" /> 8904#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
8115@end example 8905@end example
@@ -8125,7 +8915,8 @@ referring to an external file.
8125@node Javascript support, , CSS support, HTML export 8915@node Javascript support, , CSS support, HTML export
8126@subsection Javascript supported display of web pages 8916@subsection Javascript supported display of web pages
8127 8917
8128@emph{Sebastian Rose} has written a JavaScript program especially designed to 8918@cindex Rose, Sebastian
8919Sebastian Rose has written a JavaScript program especially designed to
8129enhance the web viewing experience of HTML files created with Org. This 8920enhance the web viewing experience of HTML files created with Org. This
8130program allows you to view large files in two different ways. The first one 8921program allows you to view large files in two different ways. The first one
8131is an @emph{Info}-like mode where each section is displayed separately and 8922is an @emph{Info}-like mode where each section is displayed separately and
@@ -8134,7 +8925,7 @@ as well, press @kbd{?} for an overview of the available keys). The second
8134view type is a @emph{folding} view much like Org provides inside Emacs. The 8925view type is a @emph{folding} view much like Org provides inside Emacs. The
8135script is available at @url{http://orgmode.org/org-info.js} and you can find 8926script is available at @url{http://orgmode.org/org-info.js} and you can find
8136the documentation for it at @url{http://orgmode.org/worg/code/org-info-js/}. 8927the documentation for it at @url{http://orgmode.org/worg/code/org-info-js/}.
8137We are serving the script from our site, but if you use it a lot, you might 8928We host the script at our site, but if you use it a lot, you might
8138not want to be dependent on @url{orgmode.org} and prefer to install a local 8929not want to be dependent on @url{orgmode.org} and prefer to install a local
8139copy on your own web server. 8930copy on your own web server.
8140 8931
@@ -8144,6 +8935,7 @@ customize-variable @key{RET} org-modules @key{RET}} to convince yourself that
8144this is indeed the case. All it then takes to make use of the program is 8935this is indeed the case. All it then takes to make use of the program is
8145adding a single line to the Org file: 8936adding a single line to the Org file:
8146 8937
8938@cindex #+INFOJS_OPT
8147@example 8939@example
8148#+INFOJS_OPT: view:info toc:nil 8940#+INFOJS_OPT: view:info toc:nil
8149@end example 8941@end example
@@ -8166,45 +8958,48 @@ sdepth: @r{Maximum headline level that will still become an independent}
8166 @r{section for info and folding modes. The default is taken from} 8958 @r{section for info and folding modes. The default is taken from}
8167 @r{@code{org-headline-levels} (= the @code{H} switch in @code{#+OPTIONS}).} 8959 @r{@code{org-headline-levels} (= the @code{H} switch in @code{#+OPTIONS}).}
8168 @r{If this is smaller than in @code{org-headline-levels}, each} 8960 @r{If this is smaller than in @code{org-headline-levels}, each}
8169 @r{info/folding section can still contain children headlines.} 8961 @r{info/folding section can still contain child headlines.}
8170toc: @r{Should the table of content @emph{initially} be visible?} 8962toc: @r{Should the table of content @emph{initially} be visible?}
8171 @r{Even when @code{nil}, you can always get to the toc with @kbd{i}.} 8963 @r{Even when @code{nil}, you can always get to the "toc" with @kbd{i}.}
8172tdepth: @r{The depth of the table of contents. The defaults are taken from} 8964tdepth: @r{The depth of the table of contents. The defaults are taken from}
8173 @r{the variables @code{org-headline-levels} and @code{org-export-with-toc}.} 8965 @r{the variables @code{org-headline-levels} and @code{org-export-with-toc}.}
8174ftoc: @r{Does the css of the page specify a fixed position for the toc?} 8966ftoc: @r{Does the css of the page specify a fixed position for the "toc"?}
8175 @r{If yes, the toc will never be displayed as a section.} 8967 @r{If yes, the toc will never be displayed as a section.}
8176ltoc: @r{Should there be short contents (children) in each section?} 8968ltoc: @r{Should there be short contents (children) in each section?}
8177 @r{Make this @code{above} it the section should be above initial text.} 8969 @r{Make this @code{above} if the section should be above initial text.}
8178mouse: @r{Headings are highlighted when the mouse is over them. Should be} 8970mouse: @r{Headings are highlighted when the mouse is over them. Should be}
8179 @r{@samp{underline} (default) or a background color like @samp{#cccccc}.} 8971 @r{@samp{underline} (default) or a background color like @samp{#cccccc}.}
8180buttons: @r{Should view-toggle buttons be everywhere? When @code{nil} (the} 8972buttons: @r{Should view-toggle buttons be everywhere? When @code{nil} (the}
8181 @r{default), only one such button will be present.} 8973 @r{default), only one such button will be present.}
8182@end example 8974@end example
8183 8975@noindent
8976@vindex org-infojs-options
8977@vindex org-export-html-use-infojs
8184You can choose default values for these options by customizing the variable 8978You can choose default values for these options by customizing the variable
8185@code{org-infojs-options}. If you always want to apply the script to your 8979@code{org-infojs-options}. If you always want to apply the script to your
8186pages, configure the variable @code{org-export-html-use-infojs}. 8980pages, configure the variable @code{org-export-html-use-infojs}.
8187 8981
8188@node LaTeX and PDF export, XOXO export, HTML export, Exporting 8982@node LaTeX and PDF export, DocBook export, HTML export, Exporting
8189@section LaTeX and PDF export 8983@section La@TeX{} and PDF export
8190@cindex LaTeX export 8984@cindex La@TeX{} export
8191@cindex PDF export 8985@cindex PDF export
8986@cindex Guerry, Bastian
8192 8987
8193Org mode contains a La@TeX{} exporter written by Bastien Guerry. With 8988Org mode contains a La@TeX{} exporter written by Bastien Guerry. With
8194further processing, this backend is also used to produce PDF output. Since 8989further processing, this backend is also used to produce PDF output. Since
8195the LaTeX output uses @file{hyperref} to implement links and cross 8990the La@TeX{} output uses @file{hyperref} to implement links and cross
8196references, the PDF output file will be fully linked. 8991references, the PDF output file will be fully linked.
8197 8992
8198@menu 8993@menu
8199* LaTeX/PDF export commands:: Which key invokes which commands 8994* LaTeX/PDF export commands:: Which key invokes which commands
8200* Quoting LaTeX code:: Incorporating literal LaTeX code 8995* Quoting LaTeX code:: Incorporating literal La@TeX{} code
8201* Sectioning structure:: Changing sectioning in LaTeX output 8996* Sectioning structure:: Changing sectioning in La@TeX{} output
8202* Tables in LaTeX export:: Options for exporting tables to LaTeX 8997* Tables in LaTeX export:: Options for exporting tables to La@TeX{}
8203* Images in LaTeX export:: How to insert figures into LaTeX output 8998* Images in LaTeX export:: How to insert figures into La@TeX{} output
8204@end menu 8999@end menu
8205 9000
8206@node LaTeX/PDF export commands, Quoting LaTeX code, LaTeX and PDF export, LaTeX and PDF export 9001@node LaTeX/PDF export commands, Quoting LaTeX code, LaTeX and PDF export, LaTeX and PDF export
8207@subsection LaTeX export commands 9002@subsection La@TeX{} export commands
8208 9003
8209@cindex region, active 9004@cindex region, active
8210@cindex active region 9005@cindex active region
@@ -8212,10 +9007,11 @@ references, the PDF output file will be fully linked.
8212@table @kbd 9007@table @kbd
8213@kindex C-c C-e l 9008@kindex C-c C-e l
8214@item C-c C-e l 9009@item C-c C-e l
8215Export as La@TeX{} file @file{myfile.tex}. For an org file 9010@cindex property EXPORT_FILE_NAME
9011Export as La@TeX{} file @file{myfile.tex}. For an Org file
8216@file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will 9012@file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will
8217be overwritten without warning. If there is an active region@footnote{this 9013be overwritten without warning. If there is an active region@footnote{This
8218requires @code{transient-mark-mode} to be turned on}, only the region will be 9014requires @code{transient-mark-mode} be turned on.}, only the region will be
8219exported. If the selected region is a single tree@footnote{To select the 9015exported. If the selected region is a single tree@footnote{To select the
8220current subtree, use @kbd{C-c @@}.}, the tree head will become the document 9016current subtree, use @kbd{C-c @@}.}, the tree head will become the document
8221title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} 9017title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME}
@@ -8237,13 +9033,14 @@ Replace the active region (assumed to be in Org mode syntax) by La@TeX{}
8237code. 9033code.
8238@kindex C-c C-e p 9034@kindex C-c C-e p
8239@item C-c C-e p 9035@item C-c C-e p
8240Export as LaTeX and then process to PDF. 9036Export as La@TeX{} and then process to PDF.
8241@kindex C-c C-e d 9037@kindex C-c C-e d
8242@item C-c C-e d 9038@item C-c C-e d
8243Export as LaTeX and then process to PDF, then open the resulting PDF file. 9039Export as La@TeX{} and then process to PDF, then open the resulting PDF file.
8244@end table 9040@end table
8245 9041
8246@cindex headline levels, for exporting 9042@cindex headline levels, for exporting
9043@vindex org-latex-low-levels
8247In the exported version, the first 3 outline levels will become 9044In the exported version, the first 3 outline levels will become
8248headlines, defining a general document structure. Additional levels 9045headlines, defining a general document structure. Additional levels
8249will be exported as description lists. The exporter can ignore them or 9046will be exported as description lists. The exporter can ignore them or
@@ -8261,14 +9058,16 @@ with a numeric prefix argument. For example,
8261creates two levels of headings and does the rest as items. 9058creates two levels of headings and does the rest as items.
8262 9059
8263@node Quoting LaTeX code, Sectioning structure, LaTeX/PDF export commands, LaTeX and PDF export 9060@node Quoting LaTeX code, Sectioning structure, LaTeX/PDF export commands, LaTeX and PDF export
8264@subsection Quoting LaTeX code 9061@subsection Quoting La@TeX{} code
8265 9062
8266Embedded La@TeX{} as described in @ref{Embedded LaTeX} will be correctly 9063Embedded La@TeX{} as described in @ref{Embedded LaTeX}, will be correctly
8267inserted into the La@TeX{} file. This includes simple macros like 9064inserted into the La@TeX{} file. This includes simple macros like
8268@samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, 9065@samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore,
8269you can add special code that should only be present in La@TeX{} export with 9066you can add special code that should only be present in La@TeX{} export with
8270the following constructs: 9067the following constructs:
8271 9068
9069@cindex #+LaTeX
9070@cindex #+BEGIN_LaTeX
8272@example 9071@example
8273#+LaTeX: Literal LaTeX code for export 9072#+LaTeX: Literal LaTeX code for export
8274@end example 9073@end example
@@ -8284,45 +9083,54 @@ All lines between these markers are exported literally
8284 9083
8285@node Sectioning structure, Tables in LaTeX export, Quoting LaTeX code, LaTeX and PDF export 9084@node Sectioning structure, Tables in LaTeX export, Quoting LaTeX code, LaTeX and PDF export
8286@subsection Sectioning structure 9085@subsection Sectioning structure
8287@cindex LaTeX class 9086@cindex La@TeX{} class
8288@cindex LaTeX sectioning structure 9087@cindex La@TeX{} sectioning structure
8289 9088
8290By default, the La@TeX{} output uses the class @code{article}. 9089By default, the La@TeX{} output uses the class @code{article}.
8291 9090
9091@vindex org-export-latex-default-class
9092@vindex org-export-latex-classes
9093@cindex #+LATEX_HEADER
9094@cindex #+LATEX_CLASS
9095@cindex property, LATEX_CLASS
8292You can change this globally by setting a different value for 9096You can change this globally by setting a different value for
8293@code{org-export-latex-default-class} or locally by adding an option like 9097@code{org-export-latex-default-class} or locally by adding an option like
8294@code{#+LaTeX_CLASS: myclass} in your file, or with a @code{:LaTeX_CLASS:} 9098@code{#+LaTeX_CLASS: myclass} in your file, or with a @code{:LaTeX_CLASS:}
8295property that applies when exporting a region containing only this (sub)tree. 9099property that applies when exporting a region containing only this (sub)tree.
8296The class should be listed in @code{org-export-latex-classes}, where you can 9100The class should be listed in @code{org-export-latex-classes}, where you can
8297also define the sectioning structure for each class, as well as defining 9101also define the sectioning structure for each class, as well as defining
8298additional classes. 9102additional classes. You can also use @code{#+LATEX_HEADER:
9103\usepackage@{xyz@}} to add lines to the header.
8299 9104
8300@node Tables in LaTeX export, Images in LaTeX export, Sectioning structure, LaTeX and PDF export 9105@node Tables in LaTeX export, Images in LaTeX export, Sectioning structure, LaTeX and PDF export
8301@subsection Tables in LaTeX export 9106@subsection Tables in La@TeX{} export
8302@cindex tables, in LaTeX export 9107@cindex tables, in La@TeX{} export
8303 9108
8304For LaTeX export of a table, you can specify a label and a caption 9109For La@TeX{} export of a table, you can specify a label and a caption
8305(@pxref{Markup rules}). You can also use the @code{ATTR_LaTeX} line to 9110(@pxref{Markup rules}). You can also use the @code{ATTR_LaTeX} line to
8306request a longtable environment for the table, so that it may span several 9111request a longtable environment for the table, so that it may span several
8307pages: 9112pages. Finally, you can set the alignment string:
8308 9113
9114@cindex #+CAPTION
9115@cindex #+LABEL
9116@cindex #+ATTR_LaTeX
8309@example 9117@example
8310#+CAPTION: A long table 9118#+CAPTION: A long table
8311#+LABEL: tbl:long 9119#+LABEL: tbl:long
8312#+ATTR_LaTeX: longtable 9120#+ATTR_LaTeX: longtable align=l|lp@{3cm@}r|l
8313| ..... | ..... | 9121| ..... | ..... |
8314| ..... | ..... | 9122| ..... | ..... |
8315@end example 9123@end example
8316 9124
8317 9125
8318@node Images in LaTeX export, , Tables in LaTeX export, LaTeX and PDF export 9126@node Images in LaTeX export, , Tables in LaTeX export, LaTeX and PDF export
8319@subsection Images in LaTeX export 9127@subsection Images in La@TeX{} export
8320@cindex images, inline in LaTeX 9128@cindex images, inline in La@TeX{}
8321@cindex inlining images in LaTeX 9129@cindex inlining images in La@TeX{}
8322 9130
8323Images that are linked to without a description part in the link, like 9131Images that are linked to without a description part in the link, like
8324@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF 9132@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF
8325output files resulting from LaTeX output. Org will use an 9133output files resulting from La@TeX{} output. Org will use an
8326@code{\includegraphics} macro to insert the image. If you have specified a 9134@code{\includegraphics} macro to insert the image. If you have specified a
8327caption and/or a label as described in @ref{Markup rules}, the figure will 9135caption and/or a label as described in @ref{Markup rules}, the figure will
8328be wrapped into a @code{figure} environment and thus become a floating 9136be wrapped into a @code{figure} environment and thus become a floating
@@ -8330,6 +9138,9 @@ element. Finally, you can use an @code{#+ATTR_LaTeX:} line to specify the
8330options that can be used in the optional argument of the 9138options that can be used in the optional argument of the
8331@code{\includegraphics} macro. 9139@code{\includegraphics} macro.
8332 9140
9141@cindex #+CAPTION
9142@cindex #+LABEL
9143@cindex #+ATTR_LaTeX
8333@example 9144@example
8334#+CAPTION: The black-body emission of the disk around HR 4049 9145#+CAPTION: The black-body emission of the disk around HR 4049
8335#+LABEL: fig:SED-HR4049 9146#+LABEL: fig:SED-HR4049
@@ -8337,20 +9148,214 @@ options that can be used in the optional argument of the
8337[[./img/sed-hr4049.pdf]] 9148[[./img/sed-hr4049.pdf]]
8338@end example 9149@end example
8339 9150
9151@vindex org-export-latex-inline-image-extensions
8340If you need references to a label created in this way, write 9152If you need references to a label created in this way, write
8341@samp{\ref@{fig:SED-HR4049@}} just like in LaTeX. The default settings will 9153@samp{\ref@{fig:SED-HR4049@}} just like in La@TeX{}. The default settings will
8342recognize files types that can be included as images during processing by 9154recognize files types that can be included as images during processing by
8343pdflatex (@file{png}, @file{jpg}, and @file{pdf} files). If you process your 9155@command{pdflatex} (@file{png}, @file{jpg}, and @file{pdf} files). If you process your
8344files in a different way, you may need to customize the variable 9156files in a different way, you may need to customize the variable
8345@code{org-export-latex-inline-image-extensions}. 9157@code{org-export-latex-inline-image-extensions}.
8346 9158
8347@node XOXO export, iCalendar export, LaTeX and PDF export, Exporting 9159@node DocBook export, XOXO export, LaTeX and PDF export, Exporting
9160@section DocBook export
9161@cindex DocBook export
9162@cindex PDF export
9163@cindex Cui, Baoqui
9164
9165Org contains a DocBook exporter written by Baoqiu Cui. Once an Org file is
9166exported to DocBook format, it can be further processed to produce other
9167formats, including PDF, HTML, man pages, etc., using many available DocBook
9168tools and stylesheets.
9169
9170Currently DocBook exporter only supports DocBook V5.0.
9171
9172@menu
9173* DocBook export commands:: How to invoke DocBook export
9174* Quoting DocBook code:: Incorporating DocBook code in Org files
9175* Recursive sections:: Recursive sections in DocBook
9176* Tables in DocBook export:: Tables are exported as HTML tables
9177* Images in DocBook export:: How to insert figures into DocBook output
9178* Special characters:: How to handle special characters
9179@end menu
9180
9181@node DocBook export commands, Quoting DocBook code, DocBook export, DocBook export
9182@subsection DocBook export commands
9183
9184@cindex region, active
9185@cindex active region
9186@cindex transient-mark-mode
9187@table @kbd
9188@kindex C-c C-e D
9189@item C-c C-e D
9190@cindex property EXPORT_FILE_NAME
9191Export as DocBook file. For an Org file, @file{myfile.org}, the DocBook XML
9192file will be @file{myfile.xml}. The file will be overwritten without
9193warning. If there is an active region@footnote{This requires
9194@code{transient-mark-mode} to be turned on}, only the region will be
9195exported. If the selected region is a single tree@footnote{To select the
9196current subtree, use @kbd{C-c @@}.}, the tree head will become the document
9197title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
9198property, that name will be used for the export.
9199@kindex C-c C-e V
9200@item C-c C-e V
9201Export as DocBook file, process to PDF, then open the resulting PDF file.
9202
9203@vindex org-export-docbook-xslt-proc-command
9204@vindex org-export-docbook-xsl-fo-proc-command
9205Note that, in order to produce PDF output based on exported DocBook file, you
9206need to have XSLT processor and XSL-FO processor software installed on your
9207system. Check variables @code{org-export-docbook-xslt-proc-command} and
9208@code{org-export-docbook-xsl-fo-proc-command}.
9209
9210@kindex C-c C-e v D
9211@item C-c C-e v D
9212Export only the visible part of the document.
9213@end table
9214
9215@node Quoting DocBook code, Recursive sections, DocBook export commands, DocBook export
9216@subsection Quoting DocBook code
9217
9218You can quote DocBook code in Org files and copy it verbatim into exported
9219DocBook file with the following constructs:
9220
9221@cindex #+DOCBOOK
9222@cindex #+BEGIN_DOCBOOK
9223@example
9224#+DOCBOOK: Literal DocBook code for export
9225@end example
9226
9227@noindent or
9228@cindex #+BEGIN_DOCBOOK
9229
9230@example
9231#+BEGIN_DOCBOOK
9232All lines between these markers are exported by DocBook exporter
9233literally.
9234#+END_DOCBOOK
9235@end example
9236
9237For example, you can use the following lines to include a DocBook warning
9238admonition. As to what this warning says, you should pay attention to the
9239document context when quoting DocBook code in Org files. You may make
9240exported DocBook XML files invalid by not quoting DocBook code correctly.
9241
9242@example
9243#+BEGIN_DOCBOOK
9244<warning>
9245 <para>You should know what you are doing when quoting DocBook XML code
9246 in your Org file. Invalid DocBook XML file may be generated by
9247 DocBook exporter if you are not careful!</para>
9248</warning>
9249#+END_DOCBOOK
9250@end example
9251
9252@node Recursive sections, Tables in DocBook export, Quoting DocBook code, DocBook export
9253@subsection Recursive sections
9254@cindex DocBook recursive sections
9255
9256DocBook exporter exports Org files as articles using the @code{article}
9257element in DocBook. Recursive sections, @ie @code{section} elements, are
9258used in exported articles. Top level headlines in Org files are exported as
9259top level sections, and lower level headlines are exported as nested
9260sections. The entire structure of Org files will be exported completely, no
9261matter how many nested levels of headlines there are.
9262
9263Using recursive sections makes it easy to port and reuse exported DocBook
9264code in other DocBook document types like @code{book} or @code{set}.
9265
9266@node Tables in DocBook export, Images in DocBook export, Recursive sections, DocBook export
9267@subsection Tables in DocBook export
9268@cindex tables, in DocBook export
9269
9270Tables in Org files are exported as HTML tables, which have been supported since
9271DocBook V4.3.
9272
9273If a table does not have a caption, an informal table is generated using the
9274@code{informaltable} element; otherwise, a formal table will be generated
9275using the @code{table} element.
9276
9277@node Images in DocBook export, Special characters, Tables in DocBook export, DocBook export
9278@subsection Images in DocBook export
9279@cindex images, inline in DocBook
9280@cindex inlining images in DocBook
9281
9282Images that are linked to without a description part in the link, like
9283@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]}, will be exported to DocBook
9284using @code{mediaobject} elements. Each @code{mediaobject} element contains
9285an @code{imageobject} that wraps an @code{imagedata} element. If you have
9286specified a caption for an image as described in @ref{Markup rules}, a
9287@code{caption} element will be added in @code{mediaobject}. If a label is
9288also specified, it will be exported as an @code{xml:id} attribute of the
9289@code{mediaobject} element.
9290
9291@vindex org-export-docbook-default-image-attributes
9292Image attributes supported by the @code{imagedata} element, like @code{align}
9293or @code{width}, can be specified in two ways: you can either customize
9294variable @code{org-export-docbook-default-image-attributes} or use the
9295@code{#+ATTR_DOCBOOK:} line. Attributes specified in variable
9296@code{org-export-docbook-default-image-attributes} are applied to all inline
9297images in the Org file to be exported (unless they are overwritten by image
9298attributes specified in @code{#+ATTR_DOCBOOK:} lines).
9299
9300The @code{#+ATTR_DOCBOOK:} line can be used to specify additional image
9301attributes or overwrite default image attributes for individual images. If
9302the same attribute appears in both the @code{#+ATTR_DOCBOOK:} line and
9303variable @code{org-export-docbook-default-image-attributes}, the former
9304overwrites the latter. Here is an example about how image attributes can be
9305set:
9306
9307@cindex #+CAPTION
9308@cindex #+LABEL
9309@cindex #+ATTR_DOCBOOK
9310@example
9311#+CAPTION: The logo of Org mode
9312#+LABEL: unicorn-svg
9313#+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%"
9314[[./img/org-mode-unicorn.svg]]
9315@end example
9316
9317@vindex org-export-docbook-inline-image-extensions
9318By default, DocBook exporter recognizes the following image file types:
9319@file{jpeg}, @file{jpg}, @file{png}, @file{gif}, and @file{svg}. You can
9320customize variable @code{org-export-docbook-inline-image-extensions} to add
9321more types to this list as long as DocBook supports them.
9322
9323@node Special characters, , Images in DocBook export, DocBook export
9324@subsection Special characters in DocBook export
9325@cindex Special characters in DocBook export
9326
9327@vindex org-export-docbook-doctype
9328@vindex org-html-entities
9329Special characters that are written in @TeX{}-like syntax, such as @code{\alpha},
9330@code{\Gamma}, and @code{\Zeta}, are supported by DocBook exporter. These
9331characters are rewritten to XML entities, like @code{&alpha;},
9332@code{&Gamma;}, and @code{&Zeta;}, based on the list saved in variable
9333@code{org-html-entities}. As long as the generated DocBook file includes the
9334corresponding entities, these special characters are recognized.
9335
9336You can customize variable @code{org-export-docbook-doctype} to include the
9337entities you need. For example, you can set variable
9338@code{org-export-docbook-doctype} to the following value to recognize all
9339special characters included in XHTML entities:
9340
9341@example
9342"<!DOCTYPE article [
9343<!ENTITY % xhtml1-symbol PUBLIC
9344\"-//W3C//ENTITIES Symbol for HTML//EN//XML\"
9345\"http://www.w3.org/2003/entities/2007/xhtml1-symbol.ent\"
9346>
9347%xhtml1-symbol;
9348]>
9349"
9350@end example
9351
9352@node XOXO export, iCalendar export, DocBook export, Exporting
8348@section XOXO export 9353@section XOXO export
8349@cindex XOXO export 9354@cindex XOXO export
8350 9355
8351Org mode contains an exporter that produces XOXO-style output. 9356Org mode contains an exporter that produces XOXO-style output.
8352Currently, this exporter only handles the general outline structure and 9357Currently, this exporter only handles the general outline structure and
8353does not interpret any additional Org mode features. 9358does not interpret any additional Org-mode features.
8354 9359
8355@table @kbd 9360@table @kbd
8356@kindex C-c C-e x 9361@kindex C-c C-e x
@@ -8365,22 +9370,27 @@ Export only the visible part of the document.
8365@section iCalendar export 9370@section iCalendar export
8366@cindex iCalendar export 9371@cindex iCalendar export
8367 9372
8368Some people like to use Org mode for keeping track of projects, but still 9373@vindex org-icalendar-include-todo
8369prefer a standard calendar application for anniversaries and appointments. 9374@vindex org-icalendar-use-deadline
8370In this case it can be useful to have deadlines and other time-stamped items 9375@vindex org-icalendar-use-scheduled
8371in Org files show up in the calendar application. Org mode can export 9376@vindex org-icalendar-categories
8372calendar information in the standard iCalendar format. If you also want to 9377Some people use Org mode for keeping track of projects, but still prefer a
8373have TODO entries included in the export, configure the variable 9378standard calendar application for anniversaries and appointments. In this
8374@code{org-icalendar-include-todo}. iCalendar export will export plain time 9379case it can be useful to show deadlines and other time-stamped items in Org
8375stamps as VEVENT, and TODO items as VTODO. It will also create events from 9380files in the calendar application. Org mode can export calendar information
8376deadlines that are in non-TODO items. Deadlines and scheduling dates in TODO 9381in the standard iCalendar format. If you also want to have TODO entries
8377items will be used to set the start and due dates for the todo 9382included in the export, configure the variable
8378entry@footnote{See the variables @code{org-icalendar-use-deadline} and 9383@code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT,
8379@code{org-icalendar-use-scheduled}.}. As categories, it will use the tags 9384and TODO items as VTODO. It will also create events from deadlines that are
8380locally defined in the heading, and the file/tree category@footnote{To add 9385in non-TODO items. Deadlines and scheduling dates in TODO items will be used
8381inherited tags or the TODO state, configure the variable 9386to set the start and due dates for the TODO entry@footnote{See the variables
8382@code{org-icalendar-categories}.}. 9387@code{org-icalendar-use-deadline} and @code{org-icalendar-use-scheduled}.}.
8383 9388As categories, it will use the tags locally defined in the heading, and the
9389file/tree category@footnote{To add inherited tags or the TODO state,
9390configure the variable @code{org-icalendar-categories}.}.
9391
9392@vindex org-icalendar-store-UID
9393@cindex property, ID
8384The iCalendar standard requires each entry to have a globally unique 9394The iCalendar standard requires each entry to have a globally unique
8385identifier (UID). Org creates these identifiers during export. If you set 9395identifier (UID). Org creates these identifiers during export. If you set
8386the variable @code{org-icalendar-store-UID}, the UID will be stored in the 9396the variable @code{org-icalendar-store-UID}, the UID will be stored in the
@@ -8398,16 +9408,23 @@ Create iCalendar entries for the current file and store them in the same
8398directory, using a file extension @file{.ics}. 9408directory, using a file extension @file{.ics}.
8399@kindex C-c C-e I 9409@kindex C-c C-e I
8400@item C-c C-e I 9410@item C-c C-e I
9411@vindex org-agenda-files
8401Like @kbd{C-c C-e i}, but do this for all files in 9412Like @kbd{C-c C-e i}, but do this for all files in
8402@code{org-agenda-files}. For each of these files, a separate iCalendar 9413@code{org-agenda-files}. For each of these files, a separate iCalendar
8403file will be written. 9414file will be written.
8404@kindex C-c C-e c 9415@kindex C-c C-e c
8405@item C-c C-e c 9416@item C-c C-e c
9417@vindex org-combined-agenda-icalendar-file
8406Create a single large iCalendar file from all files in 9418Create a single large iCalendar file from all files in
8407@code{org-agenda-files} and write it to the file given by 9419@code{org-agenda-files} and write it to the file given by
8408@code{org-combined-agenda-icalendar-file}. 9420@code{org-combined-agenda-icalendar-file}.
8409@end table 9421@end table
8410 9422
9423@vindex org-use-property-inheritance
9424@vindex org-icalendar-include-body
9425@cindex property, SUMMARY
9426@cindex property, DESCRIPTION
9427@cindex property, LOCATION
8411The export will honor SUMMARY, DESCRIPTION and LOCATION@footnote{The LOCATION 9428The export will honor SUMMARY, DESCRIPTION and LOCATION@footnote{The LOCATION
8412property can be inherited from higher in the hierarchy if you configure 9429property can be inherited from higher in the hierarchy if you configure
8413@code{org-use-property-inheritance} accordingly.} properties if the selected 9430@code{org-use-property-inheritance} accordingly.} properties if the selected
@@ -8415,37 +9432,33 @@ entries have them. If not, the summary will be derived from the headline,
8415and the description from the body (limited to 9432and the description from the body (limited to
8416@code{org-icalendar-include-body} characters). 9433@code{org-icalendar-include-body} characters).
8417 9434
8418How this calendar is best read and updated, that depends on the application 9435How this calendar is best read and updated, depends on the application
8419you are using. The FAQ covers this issue. 9436you are using. The FAQ covers this issue.
8420 9437
8421@node Publishing, Miscellaneous, Exporting, Top 9438@node Publishing, Miscellaneous, Exporting, Top
8422@chapter Publishing 9439@chapter Publishing
8423@cindex publishing 9440@cindex publishing
9441@cindex O'Toole, David
8424 9442
8425Org includes@footnote{@file{org-publish.el} is not distributed with 9443Org includes a publishing management system that allows you to configure
8426Emacs 21, if you are still using Emacs 21, you need you need to download 9444automatic HTML conversion of @emph{projects} composed of interlinked org
8427this file separately.} a publishing management system that allows you to 9445files. You can also configure Org to automatically upload your exported HTML
8428configure automatic HTML conversion of @emph{projects} composed of 9446pages and related attachments, such as images and source code files, to a web
8429interlinked org files. This system is called @emph{org-publish}. You can 9447server.
8430also configure org-publish to automatically upload your exported HTML
8431pages and related attachments, such as images and source code files, to
8432a web server. Org-publish turns Org into a web-site authoring tool.
8433 9448
8434You can also use Org-publish to convert files into La@TeX{}, or even 9449You can also use Org to convert files into PDF, or even combine HTML and PDF
8435combine HTML and La@TeX{} conversion so that files are available in both 9450conversion so that files are available in both formats on the server.
8436formats on the server@footnote{Since La@TeX{} files on a server are not
8437that helpful, you surely want to perform further conversion on them --
8438e.g. convert them to @code{PDF} format.}.
8439 9451
8440Org-publish has been contributed to Org by David O'Toole. 9452Publishing has been contributed to Org by David O'Toole.
8441 9453
8442@menu 9454@menu
8443* Configuration:: Defining projects 9455* Configuration:: Defining projects
9456* Uploading files:: How to get files up on the server
8444* Sample configuration:: Example projects 9457* Sample configuration:: Example projects
8445* Triggering publication:: Publication commands 9458* Triggering publication:: Publication commands
8446@end menu 9459@end menu
8447 9460
8448@node Configuration, Sample configuration, Publishing, Publishing 9461@node Configuration, Uploading files, Publishing, Publishing
8449@section Configuration 9462@section Configuration
8450 9463
8451Publishing needs significant configuration to specify files, destination 9464Publishing needs significant configuration to specify files, destination
@@ -8466,48 +9479,48 @@ and many other properties of a project.
8466@cindex org-publish-project-alist 9479@cindex org-publish-project-alist
8467@cindex projects, for publishing 9480@cindex projects, for publishing
8468 9481
8469Org-publish is configured almost entirely through setting the value of 9482@vindex org-publish-project-alist
8470one variable, called @code{org-publish-project-alist}. 9483Publishing is configured almost entirely through setting the value of one
8471Each element of the list configures one project, and may be in one of 9484variable, called @code{org-publish-project-alist}. Each element of the list
8472the two following forms: 9485configures one project, and may be in one of the two following forms:
8473 9486
8474@lisp 9487@lisp
8475("project-name" :property value :property value ...) 9488 ("project-name" :property value :property value ...)
8476
8477@r{or} 9489@r{or}
8478 9490 ("project-name" :components ("project-name" "project-name" ...))
8479("project-name" :components ("project-name" "project-name" ...))
8480 9491
8481@end lisp 9492@end lisp
8482 9493
8483In both cases, projects are configured by specifying property values. 9494In both cases, projects are configured by specifying property values. A
8484A project defines the set of files that will be published, as well as 9495project defines the set of files that will be published, as well as the
8485the publishing configuration to use when publishing those files. When 9496publishing configuration to use when publishing those files. When a project
8486a project takes the second form listed above, the individual members 9497takes the second form listed above, the individual members of the
8487of the ``components'' property are taken to be components of the 9498@code{:components} property are taken to be sub-projects, which group
8488project, which group together files requiring different publishing 9499together files requiring different publishing options. When you publish such
8489options. When you publish such a ``meta-project'' all the components 9500a ``meta-project'', all the components will also be published, in the
8490will also publish. The @code{:components} are published in the sequence 9501sequence given.
8491provided.
8492 9502
8493@node Sources and destinations, Selecting files, Project alist, Configuration 9503@node Sources and destinations, Selecting files, Project alist, Configuration
8494@subsection Sources and destinations for files 9504@subsection Sources and destinations for files
8495@cindex directories, for publishing 9505@cindex directories, for publishing
8496 9506
8497Most properties are optional, but some should always be set. In 9507Most properties are optional, but some should always be set. In
8498particular, org-publish needs to know where to look for source files, 9508particular, Org needs to know where to look for source files,
8499and where to put published files. 9509and where to put published files.
8500 9510
8501@multitable @columnfractions 0.3 0.7 9511@multitable @columnfractions 0.3 0.7
8502@item @code{:base-directory} 9512@item @code{:base-directory}
8503@tab Directory containing publishing source files 9513@tab Directory containing publishing source files
8504@item @code{:publishing-directory} 9514@item @code{:publishing-directory}
8505@tab Directory (possibly remote) where output files will be published. 9515@tab Directory where output files will be published. You can directly
9516publish to a webserver using a file name syntax appropriate for
9517the Emacs @file{tramp} package. Or you can publish to a local directory and
9518use external tools to upload your website (@pxref{Uploading files}).
8506@item @code{:preparation-function} 9519@item @code{:preparation-function}
8507@tab Function called before starting the publishing process, for example to 9520@tab Function called before starting the publishing process, for example, to
8508run @code{make} for updating files to be published. 9521run @code{make} for updating files to be published.
8509@item @code{:completion-function} 9522@item @code{:completion-function}
8510@tab Function called after finishing the publishing process, for example to 9523@tab Function called after finishing the publishing process, for example, to
8511change permissions of the resulting files. 9524change permissions of the resulting files.
8512@end multitable 9525@end multitable
8513@noindent 9526@noindent
@@ -8522,7 +9535,8 @@ properties
8522@multitable @columnfractions 0.25 0.75 9535@multitable @columnfractions 0.25 0.75
8523@item @code{:base-extension} 9536@item @code{:base-extension}
8524@tab Extension (without the dot!) of source files. This actually is a 9537@tab Extension (without the dot!) of source files. This actually is a
8525regular expression. 9538regular expression. Set this to the symbol @code{any} if you want to get all
9539files in @code{:base-directory}, even without extension.
8526 9540
8527@item @code{:exclude} 9541@item @code{:exclude}
8528@tab Regular expression to match file names that should not be 9542@tab Regular expression to match file names that should not be
@@ -8542,28 +9556,39 @@ Publishing means that a file is copied to the destination directory and
8542possibly transformed in the process. The default transformation is to export 9556possibly transformed in the process. The default transformation is to export
8543Org files as HTML files, and this is done by the function 9557Org files as HTML files, and this is done by the function
8544@code{org-publish-org-to-html} which calls the HTML exporter (@pxref{HTML 9558@code{org-publish-org-to-html} which calls the HTML exporter (@pxref{HTML
8545export}). But you also can publish your files in La@TeX{} by using the 9559export}). But you also can publish your content as PDF files using
8546function @code{org-publish-org-to-latex} instead, or as PDF files using 9560@code{org-publish-org-to-pdf}. If you want to publish the Org file itself,
8547@code{org-publish-org-to-pdf}. Other files like images only need to be 9561but with @i{archived}, @i{commented}, and @i{tag-excluded} trees removed, use
8548copied to the publishing destination. For non-Org files, you need to provide 9562@code{org-publish-org-to-org} and set the parameters @code{:plain-source}
8549your own publishing function: 9563and/or @code{:htmlized-source}. This will produce @file{file.org} and
9564@file{file.org.html} in the publishing
9565directory@footnote{@file{file-source.org} and @file{file-source.org.html} if
9566source and publishing directories are equal. Note that with this kind of
9567setup, you need to add @code{:exclude "-source\\.org"} to the project
9568definition in @code{org-publish-project-alist} to avoid that the published
9569source files will be considered as new org files the next time the project is
9570published.}. Other files like images only
9571need to be copied to the publishing destination, for this you may use
9572@code{org-publish-attachment}. For non-Org files, you always need to
9573specify the publishing function:
8550 9574
8551@multitable @columnfractions 0.3 0.7 9575@multitable @columnfractions 0.3 0.7
8552@item @code{:publishing-function} 9576@item @code{:publishing-function}
8553@tab Function executing the publication of a file. This may also be a 9577@tab Function executing the publication of a file. This may also be a
8554list of functions, which will all be called in turn. 9578list of functions, which will all be called in turn.
9579@item @code{:plain-source}
9580@tab Non-nil means, publish plain source.
9581@item @code{:htmlized-source}
9582@tab Non-nil means, publish htmlized source.
8555@end multitable 9583@end multitable
8556 9584
8557The function must accept two arguments: a property list containing at 9585The function must accept two arguments: a property list containing at least a
8558least a @code{:publishing-directory} property, and the name of the file 9586@code{:publishing-directory} property, and the name of the file to be
8559to be published. It should take the specified file, make the necessary 9587published. It should take the specified file, make the necessary
8560transformation (if any) and place the result into the destination folder. 9588transformation (if any) and place the result into the destination folder.
8561You can write your own publishing function, but @code{org-publish}
8562provides one for attachments (files that only need to be copied):
8563@code{org-publish-attachment}.
8564 9589
8565@node Publishing options, Publishing links, Publishing action, Configuration 9590@node Publishing options, Publishing links, Publishing action, Configuration
8566@subsection Options for the HTML/LaTeX exporters 9591@subsection Options for the HTML/La@TeX{} exporters
8567@cindex options, for publishing 9592@cindex options, for publishing
8568 9593
8569The property list can be used to set many export options for the HTML 9594The property list can be used to set many export options for the HTML
@@ -8572,6 +9597,52 @@ variables in Org. The table below lists these properties along
8572with the variable they belong to. See the documentation string for the 9597with the variable they belong to. See the documentation string for the
8573respective variable for details. 9598respective variable for details.
8574 9599
9600@vindex org-export-html-link-up
9601@vindex org-export-html-link-home
9602@vindex org-export-default-language
9603@vindex org-display-custom-times
9604@vindex org-export-headline-levels
9605@vindex org-export-with-section-numbers
9606@vindex org-export-section-number-format
9607@vindex org-export-with-toc
9608@vindex org-export-preserve-breaks
9609@vindex org-export-with-archived-trees
9610@vindex org-export-with-emphasize
9611@vindex org-export-with-sub-superscripts
9612@vindex org-export-with-special-strings
9613@vindex org-export-with-footnotes
9614@vindex org-export-with-drawers
9615@vindex org-export-with-tags
9616@vindex org-export-with-todo-keywords
9617@vindex org-export-with-priority
9618@vindex org-export-with-TeX-macros
9619@vindex org-export-with-LaTeX-fragments
9620@vindex org-export-skip-text-before-1st-heading
9621@vindex org-export-with-fixed-width
9622@vindex org-export-with-timestamps
9623@vindex org-export-author-info
9624@vindex org-export-creator-info
9625@vindex org-export-with-tables
9626@vindex org-export-highlight-first-table-line
9627@vindex org-export-html-style-include-default
9628@vindex org-export-html-style
9629@vindex org-export-html-style-extra
9630@vindex org-export-html-link-org-files-as-html
9631@vindex org-export-html-inline-images
9632@vindex org-export-html-extension
9633@vindex org-export-html-table-tag
9634@vindex org-export-html-expand
9635@vindex org-export-html-with-timestamp
9636@vindex org-export-publishing-directory
9637@vindex org-export-html-preamble
9638@vindex org-export-html-postamble
9639@vindex org-export-html-auto-preamble
9640@vindex org-export-html-auto-postamble
9641@vindex user-full-name
9642@vindex user-mail-address
9643@vindex org-export-select-tags
9644@vindex org-export-exclude-tags
9645
8575@multitable @columnfractions 0.32 0.68 9646@multitable @columnfractions 0.32 0.68
8576@item @code{:link-up} @tab @code{org-export-html-link-up} 9647@item @code{:link-up} @tab @code{org-export-html-link-up}
8577@item @code{:link-home} @tab @code{org-export-html-link-home} 9648@item @code{:link-home} @tab @code{org-export-html-link-home}
@@ -8606,6 +9677,7 @@ respective variable for details.
8606@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} 9677@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html}
8607@item @code{:inline-images} @tab @code{org-export-html-inline-images} 9678@item @code{:inline-images} @tab @code{org-export-html-inline-images}
8608@item @code{:html-extension} @tab @code{org-export-html-extension} 9679@item @code{:html-extension} @tab @code{org-export-html-extension}
9680@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration}
8609@item @code{:html-table-tag} @tab @code{org-export-html-table-tag} 9681@item @code{:html-table-tag} @tab @code{org-export-html-table-tag}
8610@item @code{:expand-quoted-html} @tab @code{org-export-html-expand} 9682@item @code{:expand-quoted-html} @tab @code{org-export-html-expand}
8611@item @code{:timestamp} @tab @code{org-export-html-with-timestamp} 9683@item @code{:timestamp} @tab @code{org-export-html-with-timestamp}
@@ -8615,18 +9687,18 @@ respective variable for details.
8615@item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble} 9687@item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble}
8616@item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble} 9688@item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble}
8617@item @code{:author} @tab @code{user-full-name} 9689@item @code{:author} @tab @code{user-full-name}
8618@item @code{:email} @tab @code{user-mail-address} 9690@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
8619@item @code{:select-tags} @tab @code{org-export-select-tags} 9691@item @code{:select-tags} @tab @code{org-export-select-tags}
8620@item @code{:exclude-tags} @tab @code{org-export-exclude-tags} 9692@item @code{:exclude-tags} @tab @code{org-export-exclude-tags}
9693@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option}
8621@end multitable 9694@end multitable
8622 9695
8623If you use several email addresses, separate them by a semi-column.
8624
8625Most of the @code{org-export-with-*} variables have the same effect in 9696Most of the @code{org-export-with-*} variables have the same effect in
8626both HTML and La@TeX{} exporters, except for @code{:TeX-macros} and 9697both HTML and La@TeX{} exporters, except for @code{:TeX-macros} and
8627@code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the 9698@code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the
8628La@TeX{} export. 9699La@TeX{} export.
8629 9700
9701@vindex org-publish-project-alist
8630When a property is given a value in @code{org-publish-project-alist}, 9702When a property is given a value in @code{org-publish-project-alist},
8631its setting overrides the value of the corresponding user variable (if 9703its setting overrides the value of the corresponding user variable (if
8632any) during publishing. Options set within a file (@pxref{Export 9704any) during publishing. Options set within a file (@pxref{Export
@@ -8638,17 +9710,20 @@ options}), however, override everything.
8638 9710
8639To create a link from one Org file to another, you would use 9711To create a link from one Org file to another, you would use
8640something like @samp{[[file:foo.org][The foo]]} or simply 9712something like @samp{[[file:foo.org][The foo]]} or simply
8641@samp{file:foo.org.} (@pxref{Hyperlinks}). Upon publishing this link 9713@samp{file:foo.org.} (@pxref{Hyperlinks}). When published, this link
8642becomes a link to @file{foo.html}. In this way, you can interlink the 9714becomes a link to @file{foo.html}. In this way, you can interlink the
8643pages of your "org web" project and the links will work as expected when 9715pages of your "org web" project and the links will work as expected when
8644you publish them to HTML. 9716you publish them to HTML. If you also publish the Org source file and want
9717to link to that, use an @code{http:} link instead of a @code{file:} link,
9718because @code{file:} links are converted to link to the corresponding
9719@file{html} file.
8645 9720
8646You may also link to related files, such as images. Provided you are 9721You may also link to related files, such as images. Provided you are careful
8647careful with relative pathnames, and provided you have also configured 9722with relative file names, and provided you have also configured Org to upload
8648@code{org-publish} to upload the related files, these links will work 9723the related files, these links will work too. See @ref{Complex example}, for
8649too. See @ref{Complex example} for an example of this usage. 9724an example of this usage.
8650 9725
8651Sometime an Org file to be published may contain links that are 9726Sometimes an Org file to be published may contain links that are
8652only valid in your production environment, but not in the publishing 9727only valid in your production environment, but not in the publishing
8653location. In this case, use the property 9728location. In this case, use the property
8654 9729
@@ -8671,16 +9746,16 @@ file is part of any project in @code{org-publish-project-alist}.
8671@cindex index, of published pages 9746@cindex index, of published pages
8672 9747
8673The following properties may be used to control publishing of an 9748The following properties may be used to control publishing of an
8674index of files or summary page for a given project. 9749index of files or a summary page for a given project.
8675 9750
8676@multitable @columnfractions 0.25 0.75 9751@multitable @columnfractions 0.25 0.75
8677@item @code{:auto-index} 9752@item @code{:auto-index}
8678@tab When non-nil, publish an index during org-publish-current-project or 9753@tab When non-nil, publish an index during @code{org-publish-current-project}
8679org-publish-all. 9754or @code{org-publish-all}.
8680 9755
8681@item @code{:index-filename} 9756@item @code{:index-filename}
8682@tab Filename for output of index. Defaults to @file{index.org} (which 9757@tab Filename for output of index. Defaults to @file{sitemap.org} (which
8683becomes @file{index.html}). 9758becomes @file{sitemap.html}).
8684 9759
8685@item @code{:index-title} 9760@item @code{:index-title}
8686@tab Title of index page. Defaults to name of file. 9761@tab Title of index page. Defaults to name of file.
@@ -8691,7 +9766,40 @@ Defaults to @code{org-publish-org-index}, which generates a plain list
8691of links to all files in the project. 9766of links to all files in the project.
8692@end multitable 9767@end multitable
8693 9768
8694@node Sample configuration, Triggering publication, Configuration, Publishing 9769@node Uploading files, Sample configuration, Configuration, Publishing
9770@section Uploading files
9771@cindex rsync
9772@cindex unison
9773
9774For those people already utilizing third party sync tools such as
9775@command{rsync} or @command{unison}, it might be preferable not to use the built in
9776@i{remote} publishing facilities of Org mode which rely heavily on
9777Tramp. Tramp, while very useful and powerful, tends not to be
9778so efficient for multiple file transfer and has been known to cause problems
9779under heavy usage.
9780
9781Specialized synchronization utilities offer several advantages. In addition
9782to timestamp comparison, they also do content and permissions/attribute
9783checks. For this reason you might prefer to publish your web to a local
9784directory (possibly even @i{in place} with your Org files) and then use
9785@file{unison} or @file{rsync} to do the synchronization with the remote host.
9786
9787Since Unison (for example) can be configured as to which files to transfer to
9788a certain remote destination, it can greatly simplify the project publishing
9789definition. Simply keep all files in the correct location, process your Org
9790files with @code{org-publish} and let the synchronization tool do the rest.
9791You do not need, in this scenario, to include attachments such as @file{jpg},
9792@file{css} or @file{gif} files in the project definition since the 3rd party
9793tool syncs them.
9794
9795Publishing to a local directory is also much faster than to a remote one, so
9796that you can afford more easily to republish entire projects. If you set
9797@code{org-publish-use-timestamps-flag} to @code{nil}, you gain the main
9798benefit of re-including any changed external files such as source example
9799files you might include with @code{#+INCLUDE}. The timestamp mechanism in
9800Org is not smart enough to detect if included files have been modified.
9801
9802@node Sample configuration, Triggering publication, Uploading files, Publishing
8695@section Sample configuration 9803@section Sample configuration
8696 9804
8697Below we provide two example configurations. The first one is a simple 9805Below we provide two example configurations. The first one is a simple
@@ -8718,20 +9826,20 @@ directory on the local machine.
8718 :table-of-contents nil 9826 :table-of-contents nil
8719 :style "<link rel=\"stylesheet\" 9827 :style "<link rel=\"stylesheet\"
8720 href=\"../other/mystyle.css\" 9828 href=\"../other/mystyle.css\"
8721 type=\"text/css\">"))) 9829 type=\"text/css\"/>")))
8722@end lisp 9830@end lisp
8723 9831
8724@node Complex example, , Simple example, Sample configuration 9832@node Complex example, , Simple example, Sample configuration
8725@subsection Example: complex publishing configuration 9833@subsection Example: complex publishing configuration
8726 9834
8727This more complicated example publishes an entire website, including 9835This more complicated example publishes an entire website, including
8728org files converted to HTML, image files, emacs lisp source code, and 9836Org files converted to HTML, image files, Emacs Lisp source code, and
8729style sheets. The publishing-directory is remote and private files are 9837style sheets. The publishing directory is remote and private files are
8730excluded. 9838excluded.
8731 9839
8732To ensure that links are preserved, care should be taken to replicate 9840To ensure that links are preserved, care should be taken to replicate
8733your directory structure on the web server, and to use relative file 9841your directory structure on the web server, and to use relative file
8734paths. For example, if your org files are kept in @file{~/org} and your 9842paths. For example, if your Org files are kept in @file{~/org} and your
8735publishable images in @file{~/images}, you'd link to an image with 9843publishable images in @file{~/images}, you'd link to an image with
8736@c 9844@c
8737@example 9845@example
@@ -8754,7 +9862,7 @@ right place on the web server, and publishing images to it.
8754 :section-numbers nil 9862 :section-numbers nil
8755 :table-of-contents nil 9863 :table-of-contents nil
8756 :style "<link rel=\"stylesheet\" 9864 :style "<link rel=\"stylesheet\"
8757 href=\"../other/mystyle.css\" type=\"text/css\">" 9865 href=\"../other/mystyle.css\" type=\"text/css\"/>"
8758 :auto-preamble t 9866 :auto-preamble t
8759 :auto-postamble nil) 9867 :auto-postamble nil)
8760 9868
@@ -8775,25 +9883,32 @@ right place on the web server, and publishing images to it.
8775@node Triggering publication, , Sample configuration, Publishing 9883@node Triggering publication, , Sample configuration, Publishing
8776@section Triggering publication 9884@section Triggering publication
8777 9885
8778Once org-publish is properly configured, you can publish with the 9886Once properly configured, Org can publish with the following commands:
8779following functions:
8780 9887
8781@table @kbd 9888@table @kbd
9889@kindex C-c C-e C
8782@item C-c C-e C 9890@item C-c C-e C
8783Prompt for a specific project and publish all files that belong to it. 9891Prompt for a specific project and publish all files that belong to it.
9892@kindex C-c C-e P
8784@item C-c C-e P 9893@item C-c C-e P
8785Publish the project containing the current file. 9894Publish the project containing the current file.
9895@kindex C-c C-e F
8786@item C-c C-e F 9896@item C-c C-e F
8787Publish only the current file. 9897Publish only the current file.
8788@item C-c C-e A 9898@kindex C-c C-e E
8789Publish all projects. 9899@item C-c C-e E
9900Publish every project.
8790@end table 9901@end table
8791 9902
8792Org uses timestamps to track when a file has changed. The above 9903@vindex org-publish-use-timestamps-flag
8793functions normally only publish changed files. You can override this and 9904Org uses timestamps to track when a file has changed. The above functions
8794force publishing of all files by giving a prefix argument. 9905normally only publish changed files. You can override this and force
9906publishing of all files by giving a prefix argument to any of the commands
9907above, or by customizing the variable @code{org-publish-use-timestamps-flag}.
9908This may be necessary in particular if files include other files via
9909@code{#+SETUPFILE:} or @code{#+INCLUDE:}.
8795 9910
8796@node Miscellaneous, Extensions, Publishing, Top 9911@node Miscellaneous, Hacking, Publishing, Top
8797@chapter Miscellaneous 9912@chapter Miscellaneous
8798 9913
8799@menu 9914@menu
@@ -8804,9 +9919,9 @@ force publishing of all files by giving a prefix argument.
8804* Clean view:: Getting rid of leading stars in the outline 9919* Clean view:: Getting rid of leading stars in the outline
8805* TTY keys:: Using Org on a tty 9920* TTY keys:: Using Org on a tty
8806* Interaction:: Other Emacs packages 9921* Interaction:: Other Emacs packages
8807* Bugs:: Things which do not work perfectly
8808@end menu 9922@end menu
8809 9923
9924
8810@node Completion, Customization, Miscellaneous, Miscellaneous 9925@node Completion, Customization, Miscellaneous, Miscellaneous
8811@section Completion 9926@section Completion
8812@cindex completion, of @TeX{} symbols 9927@cindex completion, of @TeX{} symbols
@@ -8857,7 +9972,7 @@ option keyword is already complete, pressing @kbd{M-@key{TAB}} again
8857will insert example settings for this keyword. 9972will insert example settings for this keyword.
8858@item 9973@item
8859In the line after @samp{#+STARTUP: }, complete startup keywords, 9974In the line after @samp{#+STARTUP: }, complete startup keywords,
8860i.e. valid keys for this line. 9975@ie valid keys for this line.
8861@item 9976@item
8862Elsewhere, complete dictionary words using Ispell. 9977Elsewhere, complete dictionary words using Ispell.
8863@end itemize 9978@end itemize
@@ -8892,6 +10007,7 @@ buffer, press @kbd{C-c C-c} with the cursor still in the line to
8892activate the changes immediately. Otherwise they become effective only 10007activate the changes immediately. Otherwise they become effective only
8893when the file is visited again in a new Emacs session. 10008when the file is visited again in a new Emacs session.
8894 10009
10010@vindex org-archive-location
8895@table @kbd 10011@table @kbd
8896@item #+ARCHIVE: %s_done:: 10012@item #+ARCHIVE: %s_done::
8897This line sets the archive location for the agenda file. It applies for 10013This line sets the archive location for the agenda file. It applies for
@@ -8903,10 +10019,13 @@ This line sets the category for the agenda file. The category applies
8903for all subsequent lines until the next @samp{#+CATEGORY} line, or the 10019for all subsequent lines until the next @samp{#+CATEGORY} line, or the
8904end of the file. The first such line also applies to any entries before it. 10020end of the file. The first such line also applies to any entries before it.
8905@item #+COLUMNS: %25ITEM ..... 10021@item #+COLUMNS: %25ITEM .....
10022@cindex property, COLUMNS
8906Set the default format for columns view. This format applies when 10023Set the default format for columns view. This format applies when
8907columns view is invoked in location where no @code{COLUMNS} property 10024columns view is invoked in locations where no @code{COLUMNS} property
8908applies. 10025applies.
8909@item #+CONSTANTS: name1=value1 ... 10026@item #+CONSTANTS: name1=value1 ...
10027@vindex org-table-formula-constants
10028@vindex org-table-formula
8910Set file-local values for constants to be used in table formulas. This 10029Set file-local values for constants to be used in table formulas. This
8911line set the local variable @code{org-table-formula-constants-local}. 10030line set the local variable @code{org-table-formula-constants-local}.
8912The global version of this variable is 10031The global version of this variable is
@@ -8915,33 +10034,43 @@ The global version of this variable is
8915Set tags that can be inherited by any entry in the file, including the 10034Set tags that can be inherited by any entry in the file, including the
8916top-level entries. 10035top-level entries.
8917@item #+DRAWERS: NAME1 ..... 10036@item #+DRAWERS: NAME1 .....
10037@vindex org-drawers
8918Set the file-local set of drawers. The corresponding global variable is 10038Set the file-local set of drawers. The corresponding global variable is
8919@code{org-drawers}. 10039@code{org-drawers}.
8920@item #+LINK: linkword replace 10040@item #+LINK: linkword replace
10041@vindex org-link-abbrev-alist
8921These lines (several are allowed) specify link abbreviations. 10042These lines (several are allowed) specify link abbreviations.
8922@xref{Link abbreviations}. The corresponding variable is 10043@xref{Link abbreviations}. The corresponding variable is
8923@code{org-link-abbrev-alist}. 10044@code{org-link-abbrev-alist}.
8924@item #+PRIORITIES: highest lowest default 10045@item #+PRIORITIES: highest lowest default
10046@vindex org-highest-priority
10047@vindex org-lowest-priority
10048@vindex org-default-priority
8925This line sets the limits and the default for the priorities. All three 10049This line sets the limits and the default for the priorities. All three
8926must be either letters A-Z or numbers 0-9. The highest priority must 10050must be either letters A-Z or numbers 0-9. The highest priority must
8927have a lower ASCII number that the lowest priority. 10051have a lower ASCII number that the lowest priority.
8928@item #+PROPERTY: Property_Name Value 10052@item #+PROPERTY: Property_Name Value
8929This line sets a default inheritance value for entries in the current 10053This line sets a default inheritance value for entries in the current
8930buffer, most useful for specifying the allowed values of a property. 10054buffer, most useful for specifying the allowed values of a property.
10055@cindex #+SETUPFILE
8931@item #+SETUPFILE: file 10056@item #+SETUPFILE: file
8932This line defines a file that holds more in-buffer setup. Normally this is 10057This line defines a file that holds more in-buffer setup. Normally this is
8933entirely ignored. Only when the buffer is parsed for option-setting lines 10058entirely ignored. Only when the buffer is parsed for option-setting lines
8934(i.e. when starting Org mode for a file, when pressing @kbd{C-c C-c} in a 10059(@ie when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
8935settings line, or when exporting), then the contents of this file are parsed 10060settings line, or when exporting), then the contents of this file are parsed
8936as if they had been included in the buffer. In particular, the file can be 10061as if they had been included in the buffer. In particular, the file can be
8937any other Org mode file with internal setup. You can visit the file the 10062any other Org mode file with internal setup. You can visit the file the
8938cursor is in the line with @kbd{C-c '}. 10063cursor is in the line with @kbd{C-c '}.
8939@item #+STARTUP: 10064@item #+STARTUP:
10065@cindex #+STARTUP:
8940This line sets options to be used at startup of Org mode, when an 10066This line sets options to be used at startup of Org mode, when an
8941Org file is being visited. The first set of options deals with the 10067Org file is being visited.
8942initial visibility of the outline tree. The corresponding variable for 10068
8943global default settings is @code{org-startup-folded}, with a default 10069The first set of options deals with the initial visibility of the outline
8944value @code{t}, which means @code{overview}. 10070tree. The corresponding variable for global default settings is
10071@code{org-startup-folded}, with a default value @code{t}, which means
10072@code{overview}.
10073@vindex org-startup-folded
8945@cindex @code{overview}, STARTUP keyword 10074@cindex @code{overview}, STARTUP keyword
8946@cindex @code{content}, STARTUP keyword 10075@cindex @code{content}, STARTUP keyword
8947@cindex @code{showall}, STARTUP keyword 10076@cindex @code{showall}, STARTUP keyword
@@ -8950,6 +10079,18 @@ overview @r{top-level headlines only}
8950content @r{all headlines} 10079content @r{all headlines}
8951showall @r{no folding at all, show everything} 10080showall @r{no folding at all, show everything}
8952@end example 10081@end example
10082
10083@vindex org-startup-indented
10084@cindex @code{indent}, STARTUP keyword
10085@cindex @code{noindent}, STARTUP keyword
10086Dynamic virtual indentation is controlled by the variable
10087@code{org-startup-indented}@footnote{Emacs 23 and Org-mode 6.29 are required}
10088@example
10089indent @r{start with @code{org-indent-mode} turned on}
10090noindent @r{start with @code{org-indent-mode} turned off}
10091@end example
10092
10093@vindex org-startup-align-all-tables
8953Then there are options for aligning tables upon visiting a file. This 10094Then there are options for aligning tables upon visiting a file. This
8954is useful in files containing narrowed table columns. The corresponding 10095is useful in files containing narrowed table columns. The corresponding
8955variable is @code{org-startup-align-all-tables}, with a default value 10096variable is @code{org-startup-align-all-tables}, with a default value
@@ -8960,9 +10101,12 @@ variable is @code{org-startup-align-all-tables}, with a default value
8960align @r{align all tables} 10101align @r{align all tables}
8961noalign @r{don't align tables on startup} 10102noalign @r{don't align tables on startup}
8962@end example 10103@end example
8963Logging closing and reinstating TODO items, and clock intervals 10104@vindex org-log-done
8964(variables @code{org-log-done}, @code{org-log-note-clock-out}, and 10105@vindex org-log-note-clock-out
8965@code{org-log-repeat}) can be configured using these options. 10106@vindex org-log-repeat
10107Logging the closing and reopening of TODO items and clock intervals can be
10108configured using these options (see variables @code{org-log-done},
10109@code{org-log-note-clock-out} and @code{org-log-repeat})
8966@cindex @code{logdone}, STARTUP keyword 10110@cindex @code{logdone}, STARTUP keyword
8967@cindex @code{lognotedone}, STARTUP keyword 10111@cindex @code{lognotedone}, STARTUP keyword
8968@cindex @code{nologdone}, STARTUP keyword 10112@cindex @code{nologdone}, STARTUP keyword
@@ -8981,6 +10125,8 @@ nologrepeat @r{do not record when reinstating repeating item}
8981lognoteclock-out @r{record a note when clocking out} 10125lognoteclock-out @r{record a note when clocking out}
8982nolognoteclock-out @r{don't record a note when clocking out} 10126nolognoteclock-out @r{don't record a note when clocking out}
8983@end example 10127@end example
10128@vindex org-hide-leading-stars
10129@vindex org-odd-levels-only
8984Here are the options for hiding leading stars in outline headings, and for 10130Here are the options for hiding leading stars in outline headings, and for
8985indenting outlines. The corresponding variables are 10131indenting outlines. The corresponding variables are
8986@code{org-hide-leading-stars} and @code{org-odd-levels-only}, both with a 10132@code{org-hide-leading-stars} and @code{org-odd-levels-only}, both with a
@@ -8997,13 +10143,16 @@ noindent @r{no virtual indentation according to outline level}
8997odd @r{allow only odd outline levels (1,3,...)} 10143odd @r{allow only odd outline levels (1,3,...)}
8998oddeven @r{allow all outline levels} 10144oddeven @r{allow all outline levels}
8999@end example 10145@end example
9000To turn on custom format overlays over time stamps (variables 10146@vindex org-put-time-stamp-overlays
10147@vindex org-time-stamp-overlay-formats
10148To turn on custom format overlays over timestamps (variables
9001@code{org-put-time-stamp-overlays} and 10149@code{org-put-time-stamp-overlays} and
9002@code{org-time-stamp-overlay-formats}), use 10150@code{org-time-stamp-overlay-formats}), use
9003@cindex @code{customtime}, STARTUP keyword 10151@cindex @code{customtime}, STARTUP keyword
9004@example 10152@example
9005customtime @r{overlay custom time format} 10153customtime @r{overlay custom time format}
9006@end example 10154@end example
10155@vindex constants-unit-system
9007The following options influence the table spreadsheet (variable 10156The following options influence the table spreadsheet (variable
9008@code{constants-unit-system}). 10157@code{constants-unit-system}).
9009@cindex @code{constcgs}, STARTUP keyword 10158@cindex @code{constcgs}, STARTUP keyword
@@ -9012,16 +10161,21 @@ The following options influence the table spreadsheet (variable
9012constcgs @r{@file{constants.el} should use the c-g-s unit system} 10161constcgs @r{@file{constants.el} should use the c-g-s unit system}
9013constSI @r{@file{constants.el} should use the SI unit system} 10162constSI @r{@file{constants.el} should use the SI unit system}
9014@end example 10163@end example
10164@vindex org-footnote-define-inline
10165@vindex org-footnote-auto-label
10166@vindex org-footnote-auto-adjust
9015To influence footnote settings, use the following keywords. The 10167To influence footnote settings, use the following keywords. The
9016corresponding variables are @code{org-footnote-define-inline} and 10168corresponding variables are @code{org-footnote-define-inline},
9017@code{org-footnote-auto-label}. 10169@code{org-footnote-auto-label}, and @code{org-footnote-auto-adjust}.
9018@cindex @code{fninline}, STARTUP keyword 10170@cindex @code{fninline}, STARTUP keyword
9019@cindex @code{fnnoinline}, STARTUP keyword 10171@cindex @code{nofninline}, STARTUP keyword
9020@cindex @code{fnlocal}, STARTUP keyword 10172@cindex @code{fnlocal}, STARTUP keyword
9021@cindex @code{fnprompt}, STARTUP keyword 10173@cindex @code{fnprompt}, STARTUP keyword
9022@cindex @code{fnauto}, STARTUP keyword 10174@cindex @code{fnauto}, STARTUP keyword
9023@cindex @code{fnconfirm}, STARTUP keyword 10175@cindex @code{fnconfirm}, STARTUP keyword
9024@cindex @code{fnplain}, STARTUP keyword 10176@cindex @code{fnplain}, STARTUP keyword
10177@cindex @code{fnadjust}, STARTUP keyword
10178@cindex @code{nofnadjust}, STARTUP keyword
9025@example 10179@example
9026fninline @r{define footnotes inline} 10180fninline @r{define footnotes inline}
9027fnnoinline @r{define footnotes in separate section} 10181fnnoinline @r{define footnotes in separate section}
@@ -9030,20 +10184,36 @@ fnprompt @r{prompt for footnote labels}
9030fnauto @r{create [fn:1]-like labels automatically (default)} 10184fnauto @r{create [fn:1]-like labels automatically (default)}
9031fnconfirm @r{offer automatic label for editing or confirmation} 10185fnconfirm @r{offer automatic label for editing or confirmation}
9032fnplain @r{create [1]-like labels automatically} 10186fnplain @r{create [1]-like labels automatically}
10187fnadjust @r{automatically renumber and sort footnotes}
10188nofnadjust @r{do not renumber and sort automatically}
10189@end example
10190@cindex org-hide-block-startup
10191To hide blocks on startup, use these keywords. The corresponding variable is
10192@code{org-hide-block-startup}.
10193@cindex @code{hideblocks}, STARTUP keyword
10194@cindex @code{nohideblocks}, STARTUP keyword
10195@example
10196hideblocks @r{Hide all begin/end blocks on startup}
10197nohideblocks @r{Do not hide blocks on startup}
9033@end example 10198@end example
9034@item #+TAGS: TAG1(c1) TAG2(c2) 10199@item #+TAGS: TAG1(c1) TAG2(c2)
10200@vindex org-tag-alist
9035These lines (several such lines are allowed) specify the valid tags in 10201These lines (several such lines are allowed) specify the valid tags in
9036this file, and (potentially) the corresponding @emph{fast tag selection} 10202this file, and (potentially) the corresponding @emph{fast tag selection}
9037keys. The corresponding variable is @code{org-tag-alist}. 10203keys. The corresponding variable is @code{org-tag-alist}.
9038@item #+TBLFM: 10204@item #+TBLFM:
9039This line contains the formulas for the table directly above the line. 10205This line contains the formulas for the table directly above the line.
9040@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS, #+DATE: 10206@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:,
10207@itemx #+OPTIONS:, #+BIND:
10208@itemx #+DESCRIPTION:, #+KEYWORDS:
10209@itemx #+LATEX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:,
10210@itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS:
9041These lines provide settings for exporting files. For more details see 10211These lines provide settings for exporting files. For more details see
9042@ref{Export options}. 10212@ref{Export options}.
9043@item #+SEQ_TODO: #+TYP_TODO: 10213@item #+TODO: #+SEQ_TODO: #+TYP_TODO:
10214@vindex org-todo-keywords
9044These lines set the TODO keywords and their interpretation in the 10215These lines set the TODO keywords and their interpretation in the
9045current file. The corresponding variables are @code{org-todo-keywords} 10216current file. The corresponding variable is @code{org-todo-keywords}.
9046and @code{org-todo-interpretation}.
9047@end table 10217@end table
9048 10218
9049@node The very busy C-c C-c key, Clean view, In-buffer settings, Miscellaneous 10219@node The very busy C-c C-c key, Clean view, In-buffer settings, Miscellaneous
@@ -9054,8 +10224,8 @@ and @code{org-todo-interpretation}.
9054The key @kbd{C-c C-c} has many purposes in Org, which are all 10224The key @kbd{C-c C-c} has many purposes in Org, which are all
9055mentioned scattered throughout this manual. One specific function of 10225mentioned scattered throughout this manual. One specific function of
9056this key is to add @emph{tags} to a headline (@pxref{Tags}). In many 10226this key is to add @emph{tags} to a headline (@pxref{Tags}). In many
9057other circumstances it means something like @emph{Hey Org, look 10227other circumstances it means something like @emph{``Hey Org, look
9058here and update according to what you see here}. Here is a summary of 10228here and update according to what you see here''}. Here is a summary of
9059what this means in different contexts. 10229what this means in different contexts.
9060 10230
9061@itemize @minus 10231@itemize @minus
@@ -9076,7 +10246,7 @@ the entire table.
9076If the cursor is inside a table created by the @file{table.el} package, 10246If the cursor is inside a table created by the @file{table.el} package,
9077activate that table. 10247activate that table.
9078@item 10248@item
9079If the current buffer is a remember buffer, close the note and file it. 10249If the current buffer is a Remember buffer, close the note and file it.
9080With a prefix argument, file it, without further interaction, to the 10250With a prefix argument, file it, without further interaction, to the
9081default location. 10251default location.
9082@item 10252@item
@@ -9095,7 +10265,7 @@ of the checkbox.
9095If the cursor is on a numbered item in a plain list, renumber the 10265If the cursor is on a numbered item in a plain list, renumber the
9096ordered list. 10266ordered list.
9097@item 10267@item
9098If the cursor is on the @code{#+BEGIN} line of a dynamical block, the 10268If the cursor is on the @code{#+BEGIN} line of a dynamic block, the
9099block is updated. 10269block is updated.
9100@end itemize 10270@end itemize
9101 10271
@@ -9106,13 +10276,11 @@ block is updated.
9106@cindex odd-levels-only outlines 10276@cindex odd-levels-only outlines
9107@cindex clean outline view 10277@cindex clean outline view
9108 10278
9109Some people find it noisy and distracting that the Org headlines are starting 10279Some people find it noisy and distracting that the Org headlines start with a
9110with a potentially large number of stars, and that text below the headlines 10280potentially large number of stars, and that text below the headlines is not
9111is not indented. This is not really a problem when you are writing a book 10281indented. While this is no problem when writing a book where the outline
9112where the outline headings are really section headlines. However, in a more 10282headings are really section headlines, in a more list-oriented outline,
9113list-oriented outline, it is clear that an indented structure is a lot 10283indented structure is a lot cleaner:
9114cleaner, as can be seen by comparing the two columns in the following
9115example:
9116 10284
9117@example 10285@example
9118@group 10286@group
@@ -9127,8 +10295,28 @@ more text | more text
9127@end example 10295@end example
9128 10296
9129@noindent 10297@noindent
9130It is non-trivial to make such a look work in Emacs, but Org contains three 10298If you are using Emacs 23 and at least version 6.29 of Org, this kind of view
9131separate features that, combined, achieve just that. 10299can be achieved dynamically at display time using @code{org-indent-mode}. In
10300this minor mode, all lines are prefixed for display with the necessary amount
10301of space. Also headlines are prefixed with additional stars, so that the
10302amount of indentation shifts by two@footnote{See the variable
10303@code{org-indent-indentation-per-level}.} spaces per level. All headline
10304stars but the last one are made invisible using the @code{org-hide}
10305face@footnote{Turning on @code{org-indent-mode} sets
10306@code{org-hide-leading-stars} to @code{t} and @code{org-adapt-indentation} to
10307@code{nil}.} - see below under @samp{2.} for more information on how this
10308works. You can turn on @code{org-indent-mode} for all files by customizing
10309the variable @code{org-startup-indented}, or you can turn it on for
10310individual files using
10311
10312@example
10313#+STARTUP: indent
10314@end example
10315
10316If you want a similar effect in earlier version of Emacs and/or Org, or if
10317you want the indentation to be hard space characters so that the plain text
10318file looks as similar as possible to the Emacs display, Org supports you in
10319the following way:
9132 10320
9133@enumerate 10321@enumerate
9134@item 10322@item
@@ -9141,15 +10329,13 @@ with the headline, like
9141 more text, now indented 10329 more text, now indented
9142@end example 10330@end example
9143 10331
9144A good way to get this indentation is by hand, and Org supports this with 10332@vindex org-adapt-indentation
9145paragraph filling, line wrapping, and structure editing@footnote{See also the 10333Org supports this with paragraph filling, line wrapping, and structure
9146variable @code{org-adapt-indentation}.} preserving or adapting the 10334editing@footnote{See also the variable @code{org-adapt-indentation}.},
9147indentation appropriate. A different approach would be to have a way to 10335preserving or adapting the indentation as appropriate.
9148automatically indent lines according to outline structure by adding overlays
9149or text properties. But I have not yet found a robust and efficient way to
9150do this in large files.
9151 10336
9152@item 10337@item
10338@vindex org-hide-leading-stars
9153@emph{Hiding leading stars}@* You can modify the display in such a way that 10339@emph{Hiding leading stars}@* You can modify the display in such a way that
9154all leading stars become invisible. To do this in a global way, configure 10340all leading stars become invisible. To do this in a global way, configure
9155the variable @code{org-hide-leading-stars} or change this on a per-file basis 10341the variable @code{org-hide-leading-stars} or change this on a per-file basis
@@ -9157,11 +10343,9 @@ with
9157 10343
9158@example 10344@example
9159#+STARTUP: hidestars 10345#+STARTUP: hidestars
10346#+STARTUP: showstars
9160@end example 10347@end example
9161 10348
9162@noindent
9163Note that the opposite behavior is selected with @code{showstars}.
9164
9165With hidden stars, the tree becomes: 10349With hidden stars, the tree becomes:
9166 10350
9167@example 10351@example
@@ -9174,22 +10358,24 @@ With hidden stars, the tree becomes:
9174@end example 10358@end example
9175 10359
9176@noindent 10360@noindent
9177Note that the leading stars are not truly replaced by whitespace, they 10361@vindex org-hide @r{(face)}
9178are only fontified with the face @code{org-hide} that uses the 10362The leading stars are not truly replaced by whitespace, they are only
9179background color as font color. If you are not using either white or 10363fontified with the face @code{org-hide} that uses the background color as
9180black background, you may have to customize this face to get the wanted 10364font color. If you are not using either white or black background, you may
9181effect. Another possibility is to set this font such that the extra 10365have to customize this face to get the wanted effect. Another possibility is
9182stars are @i{almost} invisible, for example using the color 10366to set this font such that the extra stars are @i{almost} invisible, for
9183@code{grey90} on a white background. 10367example using the color @code{grey90} on a white background.
9184 10368
9185@item 10369@item
10370@vindex org-odd-levels-only
9186Things become cleaner still if you skip all the even levels and use only odd 10371Things become cleaner still if you skip all the even levels and use only odd
9187levels 1, 3, 5..., effectively adding two stars to go from one outline level 10372levels 1, 3, 5..., effectively adding two stars to go from one outline level
9188to the next. In this way we get the outline view shown at the beginning of 10373to the next@footnote{When you need to specify a level for a property search
9189this section. In order to make the structure editing and export commands 10374or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc@.}. In this
9190handle this convention correctly, configure the variable 10375way we get the outline view shown at the beginning of this section. In order
9191@code{org-odd-levels-only}, or set this on a per-file basis with one of the 10376to make the structure editing and export commands handle this convention
9192following lines: 10377correctly, configure the variable @code{org-odd-levels-only}, or set this on
10378a per-file basis with one of the following lines:
9193 10379
9194@example 10380@example
9195#+STARTUP: odd 10381#+STARTUP: odd
@@ -9206,7 +10392,7 @@ org-convert-to-oddeven-levels}.
9206@section Using Org on a tty 10392@section Using Org on a tty
9207@cindex tty key bindings 10393@cindex tty key bindings
9208 10394
9209Because Org contains a large number of commands, by default much of 10395Because Org contains a large number of commands, by default many of
9210Org's core commands are bound to keys that are generally not 10396Org's core commands are bound to keys that are generally not
9211accessible on a tty, such as the cursor keys (@key{left}, @key{right}, 10397accessible on a tty, such as the cursor keys (@key{left}, @key{right},
9212@key{up}, @key{down}), @key{TAB} and @key{RET}, in particular when used 10398@key{up}, @key{down}), @key{TAB} and @key{RET}, in particular when used
@@ -9214,8 +10400,8 @@ together with modifiers like @key{Meta} and/or @key{Shift}. To access
9214these commands on a tty when special keys are unavailable, the following 10400these commands on a tty when special keys are unavailable, the following
9215alternative bindings can be used. The tty bindings below will likely be 10401alternative bindings can be used. The tty bindings below will likely be
9216more cumbersome; you may find for some of the bindings below that a 10402more cumbersome; you may find for some of the bindings below that a
9217customized work-around suits you better. For example, changing a time 10403customized workaround suits you better. For example, changing a timestamp
9218stamp is really only fun with @kbd{S-@key{cursor}} keys, whereas on a 10404is really only fun with @kbd{S-@key{cursor}} keys, whereas on a
9219tty you would rather use @kbd{C-c .} to re-insert the timestamp. 10405tty you would rather use @kbd{C-c .} to re-insert the timestamp.
9220 10406
9221@multitable @columnfractions 0.15 0.2 0.2 10407@multitable @columnfractions 0.15 0.2 0.2
@@ -9223,7 +10409,7 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp.
9223@item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab 10409@item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
9224@item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}} 10410@item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
9225@item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab 10411@item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
9226@item @kbd{M-@key{right}} @tab @kbd{C-c C-x i} @tab @kbd{@key{Esc} @key{right}} 10412@item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
9227@item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab 10413@item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
9228@item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}} 10414@item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
9229@item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab 10415@item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
@@ -9240,7 +10426,8 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp.
9240@item @kbd{C-S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab 10426@item @kbd{C-S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
9241@end multitable 10427@end multitable
9242 10428
9243@node Interaction, Bugs, TTY keys, Miscellaneous 10429
10430@node Interaction, , TTY keys, Miscellaneous
9244@section Interaction with other packages 10431@section Interaction with other packages
9245@cindex packages, interaction with other 10432@cindex packages, interaction with other
9246Org lives in the world of GNU Emacs and interacts in various ways 10433Org lives in the world of GNU Emacs and interacts in various ways
@@ -9256,50 +10443,57 @@ with other code out there.
9256 10443
9257@table @asis 10444@table @asis
9258@cindex @file{calc.el} 10445@cindex @file{calc.el}
10446@cindex Gillespie, Dave
9259@item @file{calc.el} by Dave Gillespie 10447@item @file{calc.el} by Dave Gillespie
9260Org uses the Calc package for implementing spreadsheet 10448Org uses the Calc package for implementing spreadsheet
9261functionality in its tables (@pxref{The spreadsheet}). Org 10449functionality in its tables (@pxref{The spreadsheet}). Org
9262checks for the availability of Calc by looking for the function 10450checks for the availability of Calc by looking for the function
9263@code{calc-eval} which should be autoloaded in your setup if Calc has 10451@code{calc-eval} which will have been autoloaded during setup if Calc has
9264been installed properly. As of Emacs 22, Calc is part of the Emacs 10452been installed properly. As of Emacs 22, Calc is part of the Emacs
9265distribution. Another possibility for interaction between the two 10453distribution. Another possibility for interaction between the two
9266packages is using Calc for embedded calculations. @xref{Embedded Mode, 10454packages is using Calc for embedded calculations. @xref{Embedded Mode,
9267, Embedded Mode, Calc, GNU Emacs Calc Manual}. 10455, Embedded Mode, Calc, GNU Emacs Calc Manual}.
9268@cindex @file{constants.el}
9269@item @file{constants.el} by Carsten Dominik 10456@item @file{constants.el} by Carsten Dominik
10457@cindex @file{constants.el}
10458@cindex Dominik, Carsten
10459@vindex org-table-formula-constants
9270In a table formula (@pxref{The spreadsheet}), it is possible to use 10460In a table formula (@pxref{The spreadsheet}), it is possible to use
9271names for natural constants or units. Instead of defining your own 10461names for natural constants or units. Instead of defining your own
9272constants in the variable @code{org-table-formula-constants}, install 10462constants in the variable @code{org-table-formula-constants}, install
9273the @file{constants} package which defines a large number of constants 10463the @file{constants} package which defines a large number of constants
9274and units, and lets you use unit prefixes like @samp{M} for 10464and units, and lets you use unit prefixes like @samp{M} for
9275@samp{Mega} etc. You will need version 2.0 of this package, available 10465@samp{Mega}, etc@. You will need version 2.0 of this package, available
9276at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for 10466at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for
9277the function @code{constants-get}, which has to be autoloaded in your 10467the function @code{constants-get}, which has to be autoloaded in your
9278setup. See the installation instructions in the file 10468setup. See the installation instructions in the file
9279@file{constants.el}. 10469@file{constants.el}.
9280@item @file{cdlatex.el} by Carsten Dominik 10470@item @file{cdlatex.el} by Carsten Dominik
9281@cindex @file{cdlatex.el} 10471@cindex @file{cdlatex.el}
9282Org mode can make use of the CDLaTeX package to efficiently enter 10472@cindex Dominik, Carsten
9283La@TeX{} fragments into Org files. See @ref{CDLaTeX mode}. 10473Org mode can make use of the CDLa@TeX{} package to efficiently enter
10474La@TeX{} fragments into Org files. See @ref{CDLaTeX mode}.
9284@item @file{imenu.el} by Ake Stenhoff and Lars Lindberg 10475@item @file{imenu.el} by Ake Stenhoff and Lars Lindberg
9285@cindex @file{imenu.el} 10476@cindex @file{imenu.el}
9286Imenu allows menu access to an index of items in a file. Org mode 10477Imenu allows menu access to an index of items in a file. Org mode
9287supports Imenu - all you need to do to get the index is the following: 10478supports Imenu---all you need to do to get the index is the following:
9288@lisp 10479@lisp
9289(add-hook 'org-mode-hook 10480(add-hook 'org-mode-hook
9290 (lambda () (imenu-add-to-menubar "Imenu"))) 10481 (lambda () (imenu-add-to-menubar "Imenu")))
9291@end lisp 10482@end lisp
9292By default the index is two levels deep - you can modify the depth using 10483@vindex org-imenu-depth
10484By default the index is two levels deep---you can modify the depth using
9293the option @code{org-imenu-depth}. 10485the option @code{org-imenu-depth}.
9294@item @file{remember.el} by John Wiegley 10486@item @file{remember.el} by John Wiegley
9295@cindex @file{remember.el} 10487@cindex @file{remember.el}
10488@cindex Wiegley, John
9296Org cooperates with remember, see @ref{Remember}. 10489Org cooperates with remember, see @ref{Remember}.
9297@file{Remember.el} is not part of Emacs, find it on the web. 10490@file{Remember.el} is not part of Emacs, find it on the web.
9298@item @file{speedbar.el} by Eric M. Ludlam 10491@item @file{speedbar.el} by Eric M. Ludlam
9299@cindex @file{speedbar.el} 10492@cindex @file{speedbar.el}
10493@cindex Ludlam, Eric M.
9300Speedbar is a package that creates a special frame displaying files and 10494Speedbar is a package that creates a special frame displaying files and
9301index items in files. Org mode supports Speedbar and allows you to 10495index items in files. Org mode supports Speedbar and allows you to
9302drill into Org files directly from the Speedbar. It also allows to 10496drill into Org files directly from the Speedbar. It also allows you to
9303restrict the scope of agenda commands to a file or a subtree by using 10497restrict the scope of agenda commands to a file or a subtree by using
9304the command @kbd{<} in the Speedbar frame. 10498the command @kbd{<} in the Speedbar frame.
9305@cindex @file{table.el} 10499@cindex @file{table.el}
@@ -9307,6 +10501,7 @@ the command @kbd{<} in the Speedbar frame.
9307@kindex C-c C-c 10501@kindex C-c C-c
9308@cindex table editor, @file{table.el} 10502@cindex table editor, @file{table.el}
9309@cindex @file{table.el} 10503@cindex @file{table.el}
10504@cindex Ota, Takaaki
9310 10505
9311Complex ASCII tables with automatic line wrapping, column- and 10506Complex ASCII tables with automatic line wrapping, column- and
9312row-spanning, and alignment can be created using the Emacs table 10507row-spanning, and alignment can be created using the Emacs table
@@ -9325,17 +10520,18 @@ table.el table.
9325@c 10520@c
9326@kindex C-c ~ 10521@kindex C-c ~
9327@item C-c ~ 10522@item C-c ~
9328Insert a table.el table. If there is already a table at point, this 10523Insert a @file{table.el} table. If there is already a table at point, this
9329command converts it between the table.el format and the Org mode 10524command converts it between the @file{table.el} format and the Org-mode
9330format. See the documentation string of the command 10525format. See the documentation string of the command
9331@code{org-convert-table} for the restrictions under which this is 10526@code{org-convert-table} for the restrictions under which this is
9332possible. 10527possible.
9333@end table 10528@end table
9334@file{table.el} is part of Emacs 22. 10529@file{table.el} is part of Emacs 22.
9335@cindex @file{footnote.el}
9336@item @file{footnote.el} by Steven L. Baur 10530@item @file{footnote.el} by Steven L. Baur
10531@cindex @file{footnote.el}
10532@cindex Baur, Steven L.
9337Org mode recognizes numerical footnotes as provided by this package. 10533Org mode recognizes numerical footnotes as provided by this package.
9338However, Org-mode also has its own footnote support (@pxref{Footnotes}), 10534However, Org mode also has its own footnote support (@pxref{Footnotes}),
9339which makes using @file{footnote.el} unnecessary. 10535which makes using @file{footnote.el} unnecessary.
9340@end table 10536@end table
9341 10537
@@ -9345,26 +10541,29 @@ which makes using @file{footnote.el} unnecessary.
9345@table @asis 10541@table @asis
9346 10542
9347@cindex @code{shift-selection-mode} 10543@cindex @code{shift-selection-mode}
10544@vindex org-support-shift-select
9348In Emacs 23, @code{shift-selection-mode} is on by default, meaning that 10545In Emacs 23, @code{shift-selection-mode} is on by default, meaning that
9349cursor motions combined with the shift key should start or enlarge regions. 10546cursor motions combined with the shift key should start or enlarge regions.
9350This conflicts with the use of @kbd{S-@key{cursor}} commands in Org to change 10547This conflicts with the use of @kbd{S-@key{cursor}} commands in Org to change
9351timestamps, TODO keywords, priorities, and item bullet types if the cursor is 10548timestamps, TODO keywords, priorities, and item bullet types if the cursor is
9352at such a location. By default, @kbd{S-@key{cursor}} commands outside 10549at such a location. By default, @kbd{S-@key{cursor}} commands outside
9353special contexts don't do anything, but you can customize the variable 10550special contexts don't do anything, but you can customize the variable
9354@code{org-support-shift-select}. Org-mode then tries to accommodate shift 10551@code{org-support-shift-select}. Org mode then tries to accommodate shift
9355selection by (i) using it outside of the special contexts where special 10552selection by (i) using it outside of the special contexts where special
9356commands apply, and by (ii) extending an existing active region even if the 10553commands apply, and by (ii) extending an existing active region even if the
9357cursor moves across a special context. 10554cursor moves across a special context.
9358 10555
9359@cindex @file{CUA.el}
9360@item @file{CUA.el} by Kim. F. Storm 10556@item @file{CUA.el} by Kim. F. Storm
10557@cindex @file{CUA.el}
10558@cindex Storm, Kim. F.
10559@vindex org-replace-disputed-keys
9361Key bindings in Org conflict with the @kbd{S-<cursor>} keys used by CUA mode 10560Key bindings in Org conflict with the @kbd{S-<cursor>} keys used by CUA mode
9362(as well as pc-select-mode and s-region-mode) to select and extend the 10561(as well as @code{pc-select-mode} and @code{s-region-mode}) to select and extend the
9363region. In fact, Emacs 23 has this built-in in the form of 10562region. In fact, Emacs 23 has this built-in in the form of
9364@code{shift-selection-mode}, see previous paragraph. If you are using Emacs 10563@code{shift-selection-mode}, see previous paragraph. If you are using Emacs
936523 you probably don't want to use another package for this purpose. However, 1056423, you probably don't want to use another package for this purpose. However,
9366if you prefer to leave these keys to a different package while working in 10565if you prefer to leave these keys to a different package while working in
9367Org-mode, configure the variable @code{org-replace-disputed-keys}. When set, 10566Org mode, configure the variable @code{org-replace-disputed-keys}. When set,
9368Org will move the following key bindings in Org files, and in the agenda 10567Org will move the following key bindings in Org files, and in the agenda
9369buffer (but not during date selection). 10568buffer (but not during date selection).
9370 10569
@@ -9374,187 +10573,84 @@ S-LEFT -> M-- S-RIGHT -> M-+
9374C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+ 10573C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+
9375@end example 10574@end example
9376 10575
10576@vindex org-disputed-keys
9377Yes, these are unfortunately more difficult to remember. If you want 10577Yes, these are unfortunately more difficult to remember. If you want
9378to have other replacement keys, look at the variable 10578to have other replacement keys, look at the variable
9379@code{org-disputed-keys}. 10579@code{org-disputed-keys}.
9380 10580
10581@item @file{yasnippet.el}
10582@cindex @file{yasnippet.el}
10583The way Org-mode binds the TAB key (binding to @code{[tab]} instead of
10584@code{"\t"}) overrules yasnippets' access to this key. The following code
10585fixed this problem:
10586
10587@lisp
10588(add-hook 'org-mode-hook
10589 (lambda ()
10590 (org-set-local 'yas/trigger-key [tab])
10591 (define-key yas/keymap [tab] 'yas/next-field-group)))
10592@end lisp
10593
9381@item @file{windmove.el} by Hovav Shacham 10594@item @file{windmove.el} by Hovav Shacham
9382@cindex @file{windmove.el} 10595@cindex @file{windmove.el}
9383Also this package uses the @kbd{S-<cursor>} keys, so everything written 10596This package also uses the @kbd{S-<cursor>} keys, so everything written
9384in the paragraph above about CUA mode also applies here. 10597in the paragraph above about CUA mode also applies here.
9385 10598
9386@end table 10599@end table
9387 10600
9388 10601@node Hacking, History and Acknowledgments, Miscellaneous, Top
9389@node Bugs, , Interaction, Miscellaneous
9390@section Bugs
9391@cindex bugs
9392
9393Here is a list of things that should work differently, but which I
9394have found too hard to fix.
9395
9396@itemize @bullet
9397@item
9398If a table field starts with a link, and if the corresponding table
9399column is narrowed (@pxref{Narrow columns}) to a width too small to
9400display the link, the field would look entirely empty even though it is
9401not. To prevent this, Org throws an error. The work-around is to
9402make the column wide enough to fit the link, or to add some text (at
9403least 2 characters) before the link in the same field.
9404@item
9405Narrowing table columns does not work on XEmacs, because the
9406@code{format} function does not transport text properties.
9407@item
9408Text in an entry protected with the @samp{QUOTE} keyword should not
9409autowrap.
9410@item
9411When the application called by @kbd{C-c C-o} to open a file link fails
9412(for example because the application does not exist or refuses to open
9413the file), it does so silently. No error message is displayed.
9414@item
9415Recalculating a table line applies the formulas from left to right.
9416If a formula uses @emph{calculated} fields further down the row,
9417multiple recalculation may be needed to get all fields consistent. You
9418may use the command @code{org-table-iterate} (@kbd{C-u C-c *}) to
9419recalculate until convergence.
9420@item
9421The exporters work well, but could be made more efficient.
9422@end itemize
9423
9424
9425@node Extensions, Hacking, Miscellaneous, Top
9426@appendix Extensions
9427
9428This appendix lists the extension modules that have been written for Org.
9429Many of these extensions live in the @file{contrib} directory of the Org
9430distribution, others are available somewhere on the web.
9431
9432@menu
9433* Extensions in the contrib directory:: These come with the Org distro
9434* Other extensions:: These you have to find on the web.
9435@end menu
9436
9437@node Extensions in the contrib directory, Other extensions, Extensions, Extensions
9438@section Extensions in the @file{contrib} directory
9439
9440A number of extension are distributed with Org when you download it from its
9441homepage. Please note that these extensions are @emph{not} distributed as
9442part of Emacs, so if you use Org as delivered with Emacs, you still need to
9443go to @url{http://orgmode.org} to get access to these modules.
9444
9445@table @asis
9446@item @file{org-annotate-file.el} by @i{Philip Jackson}
9447Annotate a file with org syntax, in a separate file, with links back to the
9448annotated file.
9449
9450@item @file{org-annotation-helper.el} by @i{Bastien Guerry and Daniel E. German}
9451Call @i{remember} directly from Firefox/Opera, or from Adobe Reader. When
9452activating a special link or bookmark, Emacs receives a trigger to create a
9453note with a link back to the website. Requires some setup, a detailed
9454description is in @file{contrib/packages/org-annotation-helper}.
9455
9456@item @file{org-bookmark.el} by @i{Tokuya Kameshima}
9457Support for links to Emacs bookmarks.
9458
9459@item @file{org-depend.el} by @i{Carsten Dominik}
9460TODO dependencies for Org-mode. Make TODO state changes in one entry trigger
9461changes in another, or be blocked by the state of another entry. Also,
9462easily create chains of TODO items with exactly one active item at any time.
9463
9464@item @file{org-elisp-symbol.el} by @i{Bastien Guerry}
9465Org links to emacs-lisp symbols. This can create annotated links that
9466exactly point to the definition location of a variable of function.
9467
9468@item @file{org-eval.el} by @i{Carsten Dominik}
9469The @code{<lisp>} tag, adapted from Emacs Wiki and Emacs Muse, allows text to
9470be included in a document that is the result of evaluating some code. Other
9471scripting languages like @code{perl} can be supported with this package as
9472well.
9473
9474@item @file{org-eval-light.el} by @i{Eric Schulte}
9475User-controlled evaluation of code in an Org buffer.
9476
9477@item @file{org-exp-blocks.el} by @i{Eric Schulte}
9478Preprocess user-defined blocks for export.
9479
9480@item @file{org-expiry.el} by @i{Bastien Guerry}
9481Expiry mechanism for Org entries.
9482
9483@item @file{org-indent.el} by @i{Carsten Dominik}
9484Dynamic indentation of Org outlines. The plan is to indent an outline
9485according to level, but so far this is too hard for a proper and stable
9486implementation. Still, it works somewhat.
9487
9488@item @file{org-interactive-query.el} by @i{Christopher League}
9489Interactive modification of tags queries. After running a general query in
9490Org, this package allows you to narrow down the results by adding more tags
9491or keywords.
9492
9493@item @file{org-mairix.el} by @i{Georg C. F. Greve}
9494Hook mairix search into Org for different MUAs.
9495
9496@item @file{org-man.el} by @i{Carsten Dominik}
9497Support for links to manpages in Org-mode.
9498
9499@item @file{org-mtags.el} by @i{Carsten Dominik}
9500Support for some Muse-like tags in Org-mode. This package allows you to
9501write @code{<example>} and @code{<src>} and other syntax copied from Emacs
9502Muse, right inside an Org file. The goal here is to make it easy to publish
9503the same file using either org-publish or Muse.
9504
9505@item @file{org-panel.el} by @i{Lennart Borgman}
9506Simplified and display-aided access to some Org commands.
9507
9508@item @file{org-registry.el} by @i{Bastien Guerry}
9509A registry for Org links, to find out from where links point to a given file
9510or location.
9511
9512@item @file{org2rem.el} by @i{Bastien Guerry}
9513Convert org appointments into reminders for the @file{remind} program.
9514
9515@item @file{org-screen.el} by @i{Andrew Hyatt}
9516Visit screen sessions through Org-mode links.
9517
9518@item @file{org-toc.el} by @i{Bastien Guerry}
9519Table of contents in a separate buffer, with fast access to sections and easy
9520visibility cycling.
9521
9522@item @file{orgtbl-sqlinsert.el} by @i{Jason Riedy}
9523Convert Org-mode tables to SQL insertions. Documentation for this can be
9524found on the Worg pages.
9525
9526@end table
9527
9528@node Other extensions, , Extensions in the contrib directory, Extensions
9529@section Other extensions
9530
9531@i{TO BE DONE}
9532
9533@node Hacking, History and Acknowledgments, Extensions, Top
9534@appendix Hacking 10602@appendix Hacking
10603@cindex hacking
9535 10604
9536This appendix covers some aspects where users can extend the functionality of 10605This appendix covers some aspects where users can extend the functionality of
9537Org. 10606Org.
9538 10607
9539@menu 10608@menu
10609* Hooks:: Who to reach into Org's internals
10610* Add-on packages:: Available extensions
9540* Adding hyperlink types:: New custom link types 10611* Adding hyperlink types:: New custom link types
9541* Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs 10612* Context-sensitive commands:: How to add functionality to such commands
10613* Tables in arbitrary syntax:: Orgtbl for La@TeX{} and other programs
9542* Dynamic blocks:: Automatically filled blocks 10614* Dynamic blocks:: Automatically filled blocks
9543* Special agenda views:: Customized views 10615* Special agenda views:: Customized views
10616* Extracting agenda information:: Postprocessing of agenda information
9544* Using the property API:: Writing programs that use entry properties 10617* Using the property API:: Writing programs that use entry properties
9545* Using the mapping API:: Mapping over all or selected entries 10618* Using the mapping API:: Mapping over all or selected entries
9546@end menu 10619@end menu
9547 10620
9548@node Adding hyperlink types, Tables in arbitrary syntax, Hacking, Hacking 10621@node Hooks, Add-on packages, Hacking, Hacking
10622@section Hooks
10623@cindex hooks
10624
10625Org has a large number of hook variables that can be used to add
10626functionality. This appendix about hacking is going to illustrate the
10627use of some of them. A complete list of all hooks with documentation is
10628maintained by the Worg project and can be found at
10629@uref{http://orgmode.org/worg/org-configs/org-hooks.php}.
10630
10631@node Add-on packages, Adding hyperlink types, Hooks, Hacking
10632@section Add-on packages
10633@cindex add-on packages
10634
10635A large number of add-on packages have been written by various authors.
10636These packages are not part of Emacs, but they are distributed as contributed
10637packages with the separate release available at the Org mode home page at
10638@uref{http://orgmode.org}. The list of contributed packages, along with
10639documentation about each package, is maintained by the Worg project at
10640@uref{http://orgmode.org/worg/org-contrib/}.
10641
10642
10643
10644@node Adding hyperlink types, Context-sensitive commands, Add-on packages, Hacking
9549@section Adding hyperlink types 10645@section Adding hyperlink types
9550@cindex hyperlinks, adding new types 10646@cindex hyperlinks, adding new types
9551 10647
9552Org has a large number of hyperlink types built-in 10648Org has a large number of hyperlink types built-in
9553(@pxref{Hyperlinks}). If you would like to add new link types, it 10649(@pxref{Hyperlinks}). If you would like to add new link types, Org
9554provides an interface for doing so. Let's look at an example file 10650provides an interface for doing so. Let's look at an example file,
9555@file{org-man.el} that will add support for creating links like 10651@file{org-man.el}, that will add support for creating links like
9556@samp{[[man:printf][The printf manpage]]} to show Unix manual pages inside 10652@samp{[[man:printf][The printf manpage]]} to show Unix manual pages inside
9557emacs: 10653Emacs:
9558 10654
9559@lisp 10655@lisp
9560;;; org-man.el - Support for links to manpages in Org 10656;;; org-man.el - Support for links to manpages in Org
@@ -9616,23 +10712,24 @@ The next line calls @code{org-add-link-type} to define a new link type
9616with prefix @samp{man}. The call also contains the name of a function 10712with prefix @samp{man}. The call also contains the name of a function
9617that will be called to follow such a link. 10713that will be called to follow such a link.
9618@item 10714@item
10715@vindex org-store-link-functions
9619The next line adds a function to @code{org-store-link-functions}, in 10716The next line adds a function to @code{org-store-link-functions}, in
9620order to allow the command @kbd{C-c l} to record a useful link in a 10717order to allow the command @kbd{C-c l} to record a useful link in a
9621buffer displaying a man page. 10718buffer displaying a man page.
9622@end enumerate 10719@end enumerate
9623 10720
9624The rest of the file defines the necessary variables and functions. 10721The rest of the file defines the necessary variables and functions.
9625First there is a customization variable that determines which emacs 10722First there is a customization variable that determines which Emacs
9626command should be used to display man pages. There are two options, 10723command should be used to display man pages. There are two options,
9627@code{man} and @code{woman}. Then the function to follow a link is 10724@code{man} and @code{woman}. Then the function to follow a link is
9628defined. It gets the link path as an argument - in this case the link 10725defined. It gets the link path as an argument---in this case the link
9629path is just a topic for the manual command. The function calls the 10726path is just a topic for the manual command. The function calls the
9630value of @code{org-man-command} to display the man page. 10727value of @code{org-man-command} to display the man page.
9631 10728
9632Finally the function @code{org-man-store-link} is defined. When you try 10729Finally the function @code{org-man-store-link} is defined. When you try
9633to store a link with @kbd{C-c l}, also this function will be called to 10730to store a link with @kbd{C-c l}, this function will be called to
9634try to make a link. The function must first decide if it is supposed to 10731try to make a link. The function must first decide if it is supposed to
9635create the link for this buffer type, we do this by checking the value 10732create the link for this buffer type; we do this by checking the value
9636of the variable @code{major-mode}. If not, the function must exit and 10733of the variable @code{major-mode}. If not, the function must exit and
9637return the value @code{nil}. If yes, the link is created by getting the 10734return the value @code{nil}. If yes, the link is created by getting the
9638manual topic from the buffer name and prefixing it with the string 10735manual topic from the buffer name and prefixing it with the string
@@ -9642,7 +10739,48 @@ can also set the @code{:description} property to provide a default for
9642the link description when the link is later inserted into an Org 10739the link description when the link is later inserted into an Org
9643buffer with @kbd{C-c C-l}. 10740buffer with @kbd{C-c C-l}.
9644 10741
9645@node Tables in arbitrary syntax, Dynamic blocks, Adding hyperlink types, Hacking 10742When is makes sense for your new link type, you may also define a function
10743@code{org-PREFIX-complete-link} that implements special (@eg completion)
10744support for inserting such a link with @kbd{C-c C-l}. Such a function should
10745not accept any arguments, and return the full link with prefix.
10746
10747@node Context-sensitive commands, Tables in arbitrary syntax, Adding hyperlink types, Hacking
10748@section Context-sensitive commands
10749@cindex context-sensitive commands, hooks
10750@cindex add-ons, context-sensitive commands
10751@vindex org-ctrl-c-ctrl-c-hook
10752
10753Org has several commands that act differently depending on context. The most
10754important example it the @kbd{C-c C-c} (@pxref{The very busy C-c C-c key}).
10755Also the @kbd{M-cursor} and @kbd{M-S-cursor} keys have this property.
10756
10757Add-ons can tap into this functionality by providing a function that detects
10758special context for that add-on and executes functionality appropriate for
10759the context. Here is an example from Dan Davison's @file{org-R.el} which
10760allows you to evaluate commands based on the @file{R} programming language. For
10761this package, special contexts are lines that start with @code{#+R:} or
10762@code{#+RR:}.
10763
10764@lisp
10765(defun org-R-apply-maybe ()
10766 "Detect if this is context for org-R and execute R commands."
10767 (if (save-excursion
10768 (beginning-of-line 1)
10769 (looking-at "#\\+RR?:"))
10770 (progn (call-interactively 'org-R-apply)
10771 t) ;; to signal that we took action
10772 nil)) ;; to signal that we did not
10773
10774(add-hook 'org-ctrl-c-ctrl-c-hook 'org-R-apply-maybe)
10775@end lisp
10776
10777The function first checks if the cursor is in such a line. If that is the
10778case, @code{org-R-apply} is called and the function returns @code{t} to
10779signal that action was taken, and @kbd{C-c C-c} will stop looking for other
10780contexts. If the function finds it should do nothing locally, it returns @code{nil} so that other, similar functions can have a try.
10781
10782
10783@node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking
9646@section Tables and lists in arbitrary syntax 10784@section Tables and lists in arbitrary syntax
9647@cindex tables, in other modes 10785@cindex tables, in other modes
9648@cindex lists, in other modes 10786@cindex lists, in other modes
@@ -9652,7 +10790,7 @@ Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a
9652frequent feature request has been to make it work with native tables in 10790frequent feature request has been to make it work with native tables in
9653specific languages, for example La@TeX{}. However, this is extremely 10791specific languages, for example La@TeX{}. However, this is extremely
9654hard to do in a general way, would lead to a customization nightmare, 10792hard to do in a general way, would lead to a customization nightmare,
9655and would take away much of the simplicity of the Orgtbl mode table 10793and would take away much of the simplicity of the Orgtbl-mode table
9656editor. 10794editor.
9657 10795
9658 10796
@@ -9694,6 +10832,7 @@ between these lines, replacing whatever was there before. For example:
9694Just above the source table, we put a special line that tells 10832Just above the source table, we put a special line that tells
9695Orgtbl mode how to translate this table and where to install it. For 10833Orgtbl mode how to translate this table and where to install it. For
9696example: 10834example:
10835@cindex #+ORGTBL
9697@example 10836@example
9698#+ORGTBL: SEND table_name translation_function arguments.... 10837#+ORGTBL: SEND table_name translation_function arguments....
9699@end example 10838@end example
@@ -9733,19 +10872,19 @@ language. For example, in C mode you could wrap the table between
9733@samp{/*} and @samp{*/} lines. 10872@samp{/*} and @samp{*/} lines.
9734@item 10873@item
9735Sometimes it is possible to put the table after some kind of @i{END} 10874Sometimes it is possible to put the table after some kind of @i{END}
9736statement, for example @samp{\bye} in TeX and @samp{\end@{document@}} 10875statement, for example @samp{\bye} in @TeX{} and @samp{\end@{document@}}
9737in La@TeX{}. 10876in La@TeX{}.
9738@item 10877@item
9739You can just comment the table line by line whenever you want to process 10878You can just comment the table line-by-line whenever you want to process
9740the file, and uncomment it whenever you need to edit the table. This 10879the file, and uncomment it whenever you need to edit the table. This
9741only sounds tedious - the command @kbd{M-x orgtbl-toggle-comment} does 10880only sounds tedious---the command @kbd{M-x orgtbl-toggle-comment}
9742make this comment-toggling very easy, in particular if you bind it to a 10881makes this comment-toggling very easy, in particular if you bind it to a
9743key. 10882key.
9744@end itemize 10883@end itemize
9745 10884
9746@node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax 10885@node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax
9747@subsection A LaTeX example of radio tables 10886@subsection A La@TeX{} example of radio tables
9748@cindex LaTeX, and Orgtbl mode 10887@cindex La@TeX{}, and Orgtbl mode
9749 10888
9750The best way to wrap the source table in La@TeX{} is to use the 10889The best way to wrap the source table in La@TeX{} is to use the
9751@code{comment} environment provided by @file{comment.sty}. It has to be 10890@code{comment} environment provided by @file{comment.sty}. It has to be
@@ -9757,7 +10896,7 @@ modes.} with the command @kbd{M-x orgtbl-insert-radio-table}. You will
9757be prompted for a table name, let's say we use @samp{salesfigures}. You 10896be prompted for a table name, let's say we use @samp{salesfigures}. You
9758will then get the following template: 10897will then get the following template:
9759 10898
9760@cindex #+ORGTBL: SEND 10899@cindex #+ORGTBL, SEND
9761@example 10900@example
9762% BEGIN RECEIVE ORGTBL salesfigures 10901% BEGIN RECEIVE ORGTBL salesfigures
9763% END RECEIVE ORGTBL salesfigures 10902% END RECEIVE ORGTBL salesfigures
@@ -9768,15 +10907,16 @@ will then get the following template:
9768@end example 10907@end example
9769 10908
9770@noindent 10909@noindent
10910@vindex La@TeX{}-verbatim-environments
9771The @code{#+ORGTBL: SEND} line tells Orgtbl mode to use the function 10911The @code{#+ORGTBL: SEND} line tells Orgtbl mode to use the function
9772@code{orgtbl-to-latex} to convert the table into La@TeX{} and to put it 10912@code{orgtbl-to-latex} to convert the table into La@TeX{} and to put it
9773into the receiver location with name @code{salesfigures}. You may now 10913into the receiver location with name @code{salesfigures}. You may now
9774fill in the table, feel free to use the spreadsheet features@footnote{If 10914fill in the table, feel free to use the spreadsheet features@footnote{If
9775the @samp{#+TBLFM} line contains an odd number of dollar characters, 10915the @samp{#+TBLFM} line contains an odd number of dollar characters,
9776this may cause problems with font-lock in LaTeX mode. As shown in the 10916this may cause problems with font-lock in La@TeX{} mode. As shown in the
9777example you can fix this by adding an extra line inside the 10917example you can fix this by adding an extra line inside the
9778@code{comment} environment that is used to balance the dollar 10918@code{comment} environment that is used to balance the dollar
9779expressions. If you are using AUCTeX with the font-latex library, a 10919expressions. If you are using AUC@TeX{} with the font-latex library, a
9780much better solution is to add the @code{comment} environment to the 10920much better solution is to add the @code{comment} environment to the
9781variable @code{LaTeX-verbatim-environments}.}: 10921variable @code{LaTeX-verbatim-environments}.}:
9782 10922
@@ -9800,9 +10940,9 @@ When you are done, press @kbd{C-c C-c} in the table to get the converted
9800table inserted between the two marker lines. 10940table inserted between the two marker lines.
9801 10941
9802Now let's assume you want to make the table header by hand, because you 10942Now let's assume you want to make the table header by hand, because you
9803want to control how columns are aligned etc. In this case we make sure 10943want to control how columns are aligned, etc@. In this case we make sure
9804that the table translator does skip the first 2 lines of the source 10944that the table translator skips the first 2 lines of the source
9805table, and tell the command to work as a @i{splice}, i.e. to not produce 10945table, and tell the command to work as a @i{splice}, @ie to not produce
9806header and footer commands of the target table: 10946header and footer commands of the target table:
9807 10947
9808@example 10948@example
@@ -9826,7 +10966,7 @@ Month & \multicolumn@{1@}@{c@}@{Days@} & Nr.\ sold & per day\\
9826The La@TeX{} translator function @code{orgtbl-to-latex} is already part of 10966The La@TeX{} translator function @code{orgtbl-to-latex} is already part of
9827Orgtbl mode. It uses a @code{tabular} environment to typeset the table 10967Orgtbl mode. It uses a @code{tabular} environment to typeset the table
9828and marks horizontal lines with @code{\hline}. Furthermore, it 10968and marks horizontal lines with @code{\hline}. Furthermore, it
9829interprets the following parameters (see also @ref{Translator functions}): 10969interprets the following parameters (see also @pxref{Translator functions}):
9830 10970
9831@table @code 10971@table @code
9832@item :splice nil/t 10972@item :splice nil/t
@@ -9834,7 +10974,7 @@ When set to t, return only table body lines, don't wrap them into a
9834tabular environment. Default is nil. 10974tabular environment. Default is nil.
9835 10975
9836@item :fmt fmt 10976@item :fmt fmt
9837A format to be used to wrap each field, should contain @code{%s} for the 10977A format to be used to wrap each field, it should contain @code{%s} for the
9838original field value. For example, to wrap each field value in dollars, 10978original field value. For example, to wrap each field value in dollars,
9839you could use @code{:fmt "$%s$"}. This may also be a property list with 10979you could use @code{:fmt "$%s$"}. This may also be a property list with
9840column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. 10980column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}.
@@ -9865,7 +11005,7 @@ code that produces tables during HTML export.}, these all use a generic
9865translator, @code{orgtbl-to-generic}. For example, @code{orgtbl-to-latex} 11005translator, @code{orgtbl-to-generic}. For example, @code{orgtbl-to-latex}
9866itself is a very short function that computes the column definitions for the 11006itself is a very short function that computes the column definitions for the
9867@code{tabular} environment, defines a few field and line separators and then 11007@code{tabular} environment, defines a few field and line separators and then
9868hands over to the generic translator. Here is the entire code: 11008hands processing over to the generic translator. Here is the entire code:
9869 11009
9870@lisp 11010@lisp
9871@group 11011@group
@@ -9885,7 +11025,7 @@ hands over to the generic translator. Here is the entire code:
9885 11025
9886As you can see, the properties passed into the function (variable 11026As you can see, the properties passed into the function (variable
9887@var{PARAMS}) are combined with the ones newly defined in the function 11027@var{PARAMS}) are combined with the ones newly defined in the function
9888(variable @var{PARAMS2}). The ones passed into the function (i.e. the 11028(variable @var{PARAMS2}). The ones passed into the function (@ie the
9889ones set by the @samp{ORGTBL SEND} line) take precedence. So if you 11029ones set by the @samp{ORGTBL SEND} line) take precedence. So if you
9890would like to use the La@TeX{} translator, but wanted the line endings to 11030would like to use the La@TeX{} translator, but wanted the line endings to
9891be @samp{\\[2mm]} instead of the default @samp{\\}, you could just 11031be @samp{\\[2mm]} instead of the default @samp{\\}, you could just
@@ -9899,7 +11039,7 @@ For a new language, you can either write your own converter function in
9899analogy with the La@TeX{} translator, or you can use the generic function 11039analogy with the La@TeX{} translator, or you can use the generic function
9900directly. For example, if you have a language where a table is started 11040directly. For example, if you have a language where a table is started
9901with @samp{!BTBL!}, ended with @samp{!ETBL!}, and where table lines are 11041with @samp{!BTBL!}, ended with @samp{!ETBL!}, and where table lines are
9902started with @samp{!BL!}, ended with @samp{!EL!} and where the field 11042started with @samp{!BL!}, ended with @samp{!EL!}, and where the field
9903separator is a TAB, you could call the generic translator like this (on 11043separator is a TAB, you could call the generic translator like this (on
9904a single line!): 11044a single line!):
9905 11045
@@ -9911,7 +11051,7 @@ a single line!):
9911@noindent 11051@noindent
9912Please check the documentation string of the function 11052Please check the documentation string of the function
9913@code{orgtbl-to-generic} for a full list of parameters understood by 11053@code{orgtbl-to-generic} for a full list of parameters understood by
9914that function and remember that you can pass each of them into 11054that function, and remember that you can pass each of them into
9915@code{orgtbl-to-latex}, @code{orgtbl-to-texinfo}, and any other function 11055@code{orgtbl-to-latex}, @code{orgtbl-to-texinfo}, and any other function
9916using the generic function. 11056using the generic function.
9917 11057
@@ -9922,7 +11062,7 @@ line either the symbol @code{hline} or a list of fields. The second
9922argument is the property list containing all parameters specified in the 11062argument is the property list containing all parameters specified in the
9923@samp{#+ORGTBL: SEND} line. The function must return a single string 11063@samp{#+ORGTBL: SEND} line. The function must return a single string
9924containing the formatted table. If you write a generally useful 11064containing the formatted table. If you write a generally useful
9925translator, please post it on @code{emacs-orgmode@@gnu.org} so that 11065translator, please post it on @email{emacs-orgmode@@gnu.org} so that
9926others can benefit from your work. 11066others can benefit from your work.
9927 11067
9928@node Radio lists, , Translator functions, Tables in arbitrary syntax 11068@node Radio lists, , Translator functions, Tables in arbitrary syntax
@@ -9946,12 +11086,13 @@ Use @code{ORGLST} instead of @code{ORGTBL}.
9946The available translation functions for radio lists don't take 11086The available translation functions for radio lists don't take
9947parameters. 11087parameters.
9948@item 11088@item
9949`C-c C-c' will work when pressed on the first item of the list. 11089@kbd{C-c C-c} will work when pressed on the first item of the list.
9950@end itemize 11090@end itemize
9951 11091
9952Here is a La@TeX{} example. Let's say that you have this in your 11092Here is a La@TeX{} example. Let's say that you have this in your
9953La@TeX{} file: 11093La@TeX{} file:
9954 11094
11095@cindex #+ORGLIST
9955@example 11096@example
9956% BEGIN RECEIVE ORGLST to-buy 11097% BEGIN RECEIVE ORGLST to-buy
9957% END RECEIVE ORGLST to-buy 11098% END RECEIVE ORGLST to-buy
@@ -10030,10 +11171,10 @@ The corresponding block writer function could look like this:
10030If you want to make sure that all dynamic blocks are always up-to-date, 11171If you want to make sure that all dynamic blocks are always up-to-date,
10031you could add the function @code{org-update-all-dblocks} to a hook, for 11172you could add the function @code{org-update-all-dblocks} to a hook, for
10032example @code{before-save-hook}. @code{org-update-all-dblocks} is 11173example @code{before-save-hook}. @code{org-update-all-dblocks} is
10033written in a way that is does nothing in buffers that are not in 11174written in a way such that it does nothing in buffers that are not in
10034@code{org-mode}. 11175@code{org-mode}.
10035 11176
10036@node Special agenda views, Using the property API, Dynamic blocks, Hacking 11177@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking
10037@section Special agenda views 11178@section Special agenda views
10038@cindex agenda views, user-defined 11179@cindex agenda views, user-defined
10039 11180
@@ -10074,14 +11215,19 @@ like this:
10074 (org-agenda-overriding-header "Projects waiting for something: ")))) 11215 (org-agenda-overriding-header "Projects waiting for something: "))))
10075@end lisp 11216@end lisp
10076 11217
11218@vindex org-agenda-overriding-header
10077Note that this also binds @code{org-agenda-overriding-header} to get a 11219Note that this also binds @code{org-agenda-overriding-header} to get a
10078meaningful header in the agenda view. 11220meaningful header in the agenda view.
10079 11221
11222@vindex org-odd-levels-only
11223@vindex org-agenda-skip-function
10080A general way to create custom searches is to base them on a search for 11224A general way to create custom searches is to base them on a search for
10081entries with a certain level limit. If you want to study all entries with 11225entries with a certain level limit. If you want to study all entries with
10082your custom search function, simply do a search for @samp{LEVEL>0}, and then 11226your custom search function, simply do a search for
10083use @code{org-agenda-skip-function} to select the entries you really want to 11227@samp{LEVEL>0}@footnote{Note that, when using @code{org-odd-levels-only}, a
10084have. 11228level number corresponds to order in the hierarchy, not to the number of
11229stars.}, and then use @code{org-agenda-skip-function} to select the entries
11230you really want to have.
10085 11231
10086You may also put a Lisp form into @code{org-agenda-skip-function}. In 11232You may also put a Lisp form into @code{org-agenda-skip-function}. In
10087particular, you may use the functions @code{org-agenda-skip-entry-if} 11233particular, you may use the functions @code{org-agenda-skip-entry-if}
@@ -10096,6 +11242,8 @@ Skip current entry if it has not been scheduled.
10096Skip current entry if it has a deadline. 11242Skip current entry if it has a deadline.
10097@item '(org-agenda-skip-entry-if 'scheduled 'deadline) 11243@item '(org-agenda-skip-entry-if 'scheduled 'deadline)
10098Skip current entry if it has a deadline, or if it is scheduled. 11244Skip current entry if it has a deadline, or if it is scheduled.
11245@item '(org-agenda-skip-entry-if 'timestamp)
11246Skip current entry if it has any timestamp, may also be deadline or scheduled.
10099@item '(org-agenda-skip-entry 'regexp "regular expression") 11247@item '(org-agenda-skip-entry 'regexp "regular expression")
10100Skip current entry if the regular expression matches in the entry. 11248Skip current entry if the regular expression matches in the entry.
10101@item '(org-agenda-skip-entry 'notregexp "regular expression") 11249@item '(org-agenda-skip-entry 'notregexp "regular expression")
@@ -10115,7 +11263,123 @@ like this, even without defining a special function:
10115 (org-agenda-overriding-header "Projects waiting for something: ")))) 11263 (org-agenda-overriding-header "Projects waiting for something: "))))
10116@end lisp 11264@end lisp
10117 11265
10118@node Using the property API, Using the mapping API, Special agenda views, Hacking 11266@node Extracting agenda information, Using the property API, Special agenda views, Hacking
11267@section Extracting agenda information
11268@cindex agenda, pipe
11269@cindex Scripts, for agenda processing
11270
11271@vindex org-agenda-custom-commands
11272Org provides commands to access agenda information for the command
11273line in Emacs batch mode. This extracted information can be sent
11274directly to a printer, or it can be read by a program that does further
11275processing of the data. The first of these commands is the function
11276@code{org-batch-agenda}, that produces an agenda view and sends it as
11277ASCII text to STDOUT. The command takes a single string as parameter.
11278If the string has length 1, it is used as a key to one of the commands
11279you have configured in @code{org-agenda-custom-commands}, basically any
11280key you can use after @kbd{C-c a}. For example, to directly print the
11281current TODO list, you could use
11282
11283@example
11284emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr
11285@end example
11286
11287If the parameter is a string with 2 or more characters, it is used as a
11288tags/TODO match string. For example, to print your local shopping list
11289(all items with the tag @samp{shop}, but excluding the tag
11290@samp{NewYork}), you could use
11291
11292@example
11293emacs -batch -l ~/.emacs \
11294 -eval '(org-batch-agenda "+shop-NewYork")' | lpr
11295@end example
11296
11297@noindent
11298You may also modify parameters on the fly like this:
11299
11300@example
11301emacs -batch -l ~/.emacs \
11302 -eval '(org-batch-agenda "a" \
11303 org-agenda-ndays 30 \
11304 org-agenda-include-diary nil \
11305 org-agenda-files (quote ("~/org/project.org")))' \
11306 | lpr
11307@end example
11308
11309@noindent
11310which will produce a 30-day agenda, fully restricted to the Org file
11311@file{~/org/projects.org}, not even including the diary.
11312
11313If you want to process the agenda data in more sophisticated ways, you
11314can use the command @code{org-batch-agenda-csv} to get a comma-separated
11315list of values for each agenda item. Each line in the output will
11316contain a number of fields separated by commas. The fields in a line
11317are:
11318
11319@example
11320category @r{The category of the item}
11321head @r{The headline, without TODO keyword, TAGS and PRIORITY}
11322type @r{The type of the agenda entry, can be}
11323 todo @r{selected in TODO match}
11324 tagsmatch @r{selected in tags match}
11325 diary @r{imported from diary}
11326 deadline @r{a deadline}
11327 scheduled @r{scheduled}
11328 timestamp @r{appointment, selected by timestamp}
11329 closed @r{entry was closed on date}
11330 upcoming-deadline @r{warning about nearing deadline}
11331 past-scheduled @r{forwarded scheduled item}
11332 block @r{entry has date block including date}
11333todo @r{The TODO keyword, if any}
11334tags @r{All tags including inherited ones, separated by colons}
11335date @r{The relevant date, like 2007-2-14}
11336time @r{The time, like 15:00-16:50}
11337extra @r{String with extra planning info}
11338priority-l @r{The priority letter if any was given}
11339priority-n @r{The computed numerical priority}
11340@end example
11341
11342@noindent
11343Time and date will only be given if a timestamp (or deadline/scheduled)
11344led to the selection of the item.
11345
11346A CSV list like this is very easy to use in a post-processing script.
11347For example, here is a Perl program that gets the TODO list from
11348Emacs/Org and prints all the items, preceded by a checkbox:
11349
11350@example
11351#!/usr/bin/perl
11352
11353# define the Emacs command to run
11354$cmd = "emacs -batch -l ~/.emacs -eval '(org-batch-agenda-csv \"t\")'";
11355
11356# run it and capture the output
11357$agenda = qx@{$cmd 2>/dev/null@};
11358
11359# loop over all lines
11360foreach $line (split(/\n/,$agenda)) @{
11361 # get the individual values
11362 ($category,$head,$type,$todo,$tags,$date,$time,$extra,
11363 $priority_l,$priority_n) = split(/,/,$line);
11364 # process and print
11365 print "[ ] $head\n";
11366@}
11367@end example
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382@node Using the property API, Using the mapping API, Extracting agenda information, Hacking
10119@section Using the property API 11383@section Using the property API
10120@cindex API, for properties 11384@cindex API, for properties
10121@cindex properties, API 11385@cindex properties, API
@@ -10124,15 +11388,16 @@ Here is a description of the functions that can be used to work with
10124properties. 11388properties.
10125 11389
10126@defun org-entry-properties &optional pom which 11390@defun org-entry-properties &optional pom which
10127Get all properties of the entry at point-or-marker POM. 11391Get all properties of the entry at point-or-marker POM.@*
10128This includes the TODO keyword, the tags, time strings for deadline, 11392This includes the TODO keyword, the tags, time strings for deadline,
10129scheduled, and clocking, and any additional properties defined in the 11393scheduled, and clocking, and any additional properties defined in the
10130entry. The return value is an alist, keys may occur multiple times 11394entry. The return value is an alist, keys may occur multiple times
10131if the property key was used several times. 11395if the property key was used several times.@*
10132POM may also be nil, in which case the current entry is used. 11396POM may also be nil, in which case the current entry is used.
10133If WHICH is nil or `all', get all properties. If WHICH is 11397If WHICH is nil or `all', get all properties. If WHICH is
10134`special' or `standard', only get that subclass. 11398`special' or `standard', only get that subclass.
10135@end defun 11399@end defun
11400@vindex org-use-property-inheritance
10136@defun org-entry-get pom property &optional inherit 11401@defun org-entry-get pom property &optional inherit
10137Get value of PROPERTY for entry at point-or-marker POM. By default, 11402Get value of PROPERTY for entry at point-or-marker POM. By default,
10138this only looks at properties defined locally in the entry. If INHERIT 11403this only looks at properties defined locally in the entry. If INHERIT
@@ -10197,11 +11462,22 @@ is:
10197@defun org-map-entries func &optional match scope &rest skip 11462@defun org-map-entries func &optional match scope &rest skip
10198Call FUNC at each headline selected by MATCH in SCOPE. 11463Call FUNC at each headline selected by MATCH in SCOPE.
10199 11464
10200FUNC is a function or a lisp form. The function will be called without 11465FUNC is a function or a Lisp form. The function will be called without
10201arguments, with the cursor positioned at the beginning of the headline. 11466arguments, with the cursor positioned at the beginning of the headline.
10202The return values of all calls to the function will be collected and 11467The return values of all calls to the function will be collected and
10203returned as a list. 11468returned as a list.
10204 11469
11470The call to FUNC will be wrapped into a save-excursion form, so FUNC
11471does not need to preserve point. After evaluation, the cursor will be
11472moved to the end of the line (presumably of the headline of the
11473processed entry) and search continues from there. Under some
11474circumstances, this may not produce the wanted results. For example,
11475if you have removed (@eg archived) the current (sub)tree it could
11476mean that the next entry will be skipped entirely. In such cases, you
11477can specify the position from where search should continue by making
11478FUNC set the variable `org-map-continue-from' to the desired buffer
11479position.
11480
10205MATCH is a tags/property/todo match as it is used in the agenda match view. 11481MATCH is a tags/property/todo match as it is used in the agenda match view.
10206Only headlines that are matched by this query will be considered during 11482Only headlines that are matched by this query will be considered during
10207the iteration. When MATCH is nil or t, all headlines will be 11483the iteration. When MATCH is nil or t, all headlines will be
@@ -10221,10 +11497,11 @@ agenda-with-archives
10221(file1 file2 ...) 11497(file1 file2 ...)
10222 @r{if this is a list, all files in the list will be scanned} 11498 @r{if this is a list, all files in the list will be scanned}
10223@end example 11499@end example
10224 11500@noindent
10225The remaining args are treated as settings for the skipping facilities of 11501The remaining args are treated as settings for the skipping facilities of
10226the scanner. The following items can be given here: 11502the scanner. The following items can be given here:
10227 11503
11504@vindex org-agenda-skip-function
10228@example 11505@example
10229archive @r{skip trees with the archive tag} 11506archive @r{skip trees with the archive tag}
10230comment @r{skip trees with the COMMENT keyword} 11507comment @r{skip trees with the COMMENT keyword}
@@ -10287,30 +11564,30 @@ The following example counts the number of entries with TODO keyword
10287@cindex history 11564@cindex history
10288@cindex thanks 11565@cindex thanks
10289 11566
10290Org was borne in 2003, out of frustration over the user interface 11567Org was born in 2003, out of frustration over the user interface
10291of the Emacs Outline mode. I was trying to organize my notes and 11568of the Emacs Outline mode. I was trying to organize my notes and
10292projects, and using Emacs seemed to be the natural way to go. However, 11569projects, and using Emacs seemed to be the natural way to go. However,
10293having to remember eleven different commands with two or three keys per 11570having to remember eleven different commands with two or three keys per
10294command, only to hide and show parts of the outline tree, that seemed 11571command, only to hide and show parts of the outline tree, that seemed
10295entirely unacceptable to me. Also, when using outlines to take notes, I 11572entirely unacceptable to me. Also, when using outlines to take notes, I
10296constantly want to restructure the tree, organizing it parallel to my 11573constantly wanted to restructure the tree, organizing it parallel to my
10297thoughts and plans. @emph{Visibility cycling} and @emph{structure 11574thoughts and plans. @emph{Visibility cycling} and @emph{structure
10298editing} were originally implemented in the package 11575editing} were originally implemented in the package
10299@file{outline-magic.el}, but quickly moved to the more general 11576@file{outline-magic.el}, but quickly moved to the more general
10300@file{org.el}. As this environment became comfortable for project 11577@file{org.el}. As this environment became comfortable for project
10301planning, the next step was adding @emph{TODO entries}, basic @emph{time 11578planning, the next step was adding @emph{TODO entries}, basic
10302stamps}, and @emph{table support}. These areas highlight the two main 11579@emph{timestamps}, and @emph{table support}. These areas highlighted the two main
10303goals that Org still has today: To create a new, outline-based, 11580goals that Org still has today: to be a new, outline-based,
10304plain text mode with innovative and intuitive editing features, and to 11581plain text mode with innovative and intuitive editing features, and to
10305incorporate project planning functionality directly into a notes file. 11582incorporate project planning functionality directly into a notes file.
10306 11583
10307A special thanks goes to @i{Bastien Guerry} who has not only written a large 11584A special thanks goes to @i{Bastien Guerry} who has not only written a large
10308number of extensions to Org (most of them integrated into the core by now), 11585number of extensions to Org (most of them integrated into the core by now),
10309but has also helped the development and maintenance of Org so much that he 11586but who has also helped in the development and maintenance of Org so much that he
10310should be considered the main co-contributor to this package. 11587should be considered the main co-contributor to this package.
10311 11588
10312Since the first release, literally thousands of emails to me or on 11589Since the first release, literally thousands of emails to me or to
10313@code{emacs-orgmode@@gnu.org} have provided a constant stream of bug 11590@email{emacs-orgmode@@gnu.org} have provided a constant stream of bug
10314reports, feedback, new ideas, and sometimes patches and add-on code. 11591reports, feedback, new ideas, and sometimes patches and add-on code.
10315Many thanks to everyone who has helped to improve this package. I am 11592Many thanks to everyone who has helped to improve this package. I am
10316trying to keep here a list of the people who had significant influence 11593trying to keep here a list of the people who had significant influence
@@ -10328,7 +11605,11 @@ let me know.
10328@i{Christophe Bataillon} created the great unicorn logo that we use on the 11605@i{Christophe Bataillon} created the great unicorn logo that we use on the
10329Org-mode website. 11606Org-mode website.
10330@item 11607@item
10331@i{Alex Bochannek} provided a patch for rounding time stamps. 11608@i{Alex Bochannek} provided a patch for rounding timestamps.
11609@item
11610@i{Brad Bozarth} showed how to pull RSS feed data into Org-mode files.
11611@item
11612@i{Tom Breton} wrote @file{org-choose.el}.
10332@item 11613@item
10333@i{Charles Cave}'s suggestion sparked the implementation of templates 11614@i{Charles Cave}'s suggestion sparked the implementation of templates
10334for Remember. 11615for Remember.
@@ -10336,16 +11617,20 @@ for Remember.
10336@i{Pavel Chalmoviansky} influenced the agenda treatment of items with 11617@i{Pavel Chalmoviansky} influenced the agenda treatment of items with
10337specified time. 11618specified time.
10338@item 11619@item
10339@i{Gregory Chernov} patched support for lisp forms into table 11620@i{Gregory Chernov} patched support for Lisp forms into table
10340calculations and improved XEmacs compatibility, in particular by porting 11621calculations and improved XEmacs compatibility, in particular by porting
10341@file{nouline.el} to XEmacs. 11622@file{nouline.el} to XEmacs.
10342@item 11623@item
10343@i{Sacha Chua} suggested to copy some linking code from Planner. 11624@i{Sacha Chua} suggested copying some linking code from Planner.
11625@item
11626@i{Baoqiu Cui} contributed the DocBook exporter.
10344@item 11627@item
10345@i{Eddward DeVilla} proposed and tested checkbox statistics. He also 11628@i{Eddward DeVilla} proposed and tested checkbox statistics. He also
10346came up with the idea of properties, and that there should be an API for 11629came up with the idea of properties, and that there should be an API for
10347them. 11630them.
10348@item 11631@item
11632@i{Nick Dokos} tracked down several nasty bugs.
11633@item
10349@i{Kees Dullemond} used to edit projects lists directly in HTML and so 11634@i{Kees Dullemond} used to edit projects lists directly in HTML and so
10350inspired some of the early development, including HTML export. He also 11635inspired some of the early development, including HTML export. He also
10351asked for a way to narrow wide table columns. 11636asked for a way to narrow wide table columns.
@@ -10372,9 +11657,9 @@ has been prolific with patches, ideas, and bug reports.
10372@item 11657@item
10373@i{Bernt Hansen} has driven much of the support for auto-repeating tasks, 11658@i{Bernt Hansen} has driven much of the support for auto-repeating tasks,
10374task state change logging, and the clocktable. His clear explanations have 11659task state change logging, and the clocktable. His clear explanations have
10375been critical when we started to adopt the GIT version control system. 11660been critical when we started to adopt the Git version control system.
10376@item 11661@item
10377@i{Manuel Hermenegildo} has contributed various ideas, small fixed and 11662@i{Manuel Hermenegildo} has contributed various ideas, small fixes and
10378patches. 11663patches.
10379@item 11664@item
10380@i{Phil Jackson} wrote @file{org-irc.el}. 11665@i{Phil Jackson} wrote @file{org-irc.el}.
@@ -10400,10 +11685,12 @@ basis.
10400@i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler 11685@i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler
10401happy. 11686happy.
10402@item 11687@item
10403@i{Rick Moynihan} proposed to allow multiple TODO sequences in a file 11688@i{Rick Moynihan} proposed allowing multiple TODO sequences in a file
10404and to be able to quickly restrict the agenda to a subtree. 11689and being able to quickly restrict the agenda to a subtree.
10405@item 11690@item
10406@i{Todd Neal} provided patches for links to Info files and elisp forms. 11691@i{Todd Neal} provided patches for links to Info files and Elisp forms.
11692@item
11693@i{Greg Newman} refreshed the unicorn logo into its current form.
10407@item 11694@item
10408@i{Tim O'Callaghan} suggested in-file links, search options for general 11695@i{Tim O'Callaghan} suggested in-file links, search options for general
10409file links, and TAGS. 11696file links, and TAGS.
@@ -10419,6 +11706,9 @@ links, among other things.
10419@i{Pete Phillips} helped during the development of the TAGS feature, and 11706@i{Pete Phillips} helped during the development of the TAGS feature, and
10420provided frequent feedback. 11707provided frequent feedback.
10421@item 11708@item
11709@i{Martin Pohlack} provided the code snippet to bundle character insertion
11710into bundles of 20 for undo.
11711@item
10422@i{T.V. Raman} reported bugs and suggested improvements. 11712@i{T.V. Raman} reported bugs and suggested improvements.
10423@item 11713@item
10424@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality 11714@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
@@ -10429,13 +11719,13 @@ control.
10429@i{Kevin Rogers} contributed code to access VM files on remote hosts. 11719@i{Kevin Rogers} contributed code to access VM files on remote hosts.
10430@item 11720@item
10431@i{Sebastian Rose} wrote @file{org-info.js}, a Java script for displaying 11721@i{Sebastian Rose} wrote @file{org-info.js}, a Java script for displaying
10432webpages derived from Org using an Info-like, or a folding interface with 11722webpages derived from Org using an Info-like or a folding interface with
10433single key navigation. 11723single-key navigation.
10434@item 11724@item
10435@i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a 11725@i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a
10436conflict with @file{allout.el}. 11726conflict with @file{allout.el}.
10437@item 11727@item
10438@i{Jason Riedy} generalized the send-receive mechanism for orgtbl tables with 11728@i{Jason Riedy} generalized the send-receive mechanism for Orgtbl tables with
10439extensive patches. 11729extensive patches.
10440@item 11730@item
10441@i{Philip Rooke} created the Org reference card, provided lots 11731@i{Philip Rooke} created the Org reference card, provided lots
@@ -10444,7 +11734,8 @@ of feedback, developed and applied standards to the Org documentation.
10444@i{Christian Schlauer} proposed angular brackets around links, among 11734@i{Christian Schlauer} proposed angular brackets around links, among
10445other things. 11735other things.
10446@item 11736@item
10447@i{Eric Schulte} wrote @file{org-plot.el}. 11737@i{Eric Schulte} wrote @file{org-plot.el} and contributed various patches,
11738small features and modules.
10448@item 11739@item
10449Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s 11740Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s
10450@file{organizer-mode.el}. 11741@file{organizer-mode.el}.
@@ -10502,15 +11793,24 @@ and contributed various ideas and code snippets.
10502 11793
10503 11794
10504@node Main Index, Key Index, History and Acknowledgments, Top 11795@node Main Index, Key Index, History and Acknowledgments, Top
10505@unnumbered The Main Index 11796@unnumbered Concept Index
10506 11797
10507@printindex cp 11798@printindex cp
10508 11799
10509@node Key Index, , Main Index, Top 11800@node Key Index, Variable Index, Main Index, Top
10510@unnumbered Key Index 11801@unnumbered Key Index
10511 11802
10512@printindex ky 11803@printindex ky
10513 11804
11805@node Variable Index, , Key Index, Top
11806@unnumbered Variable Index
11807
11808This is not a complete index of variables and faces, only the ones that are
11809mentioned in the manual. For a more complete list, use @kbd{M-x
11810org-customize @key{RET}} and then klick yourself through the tree.
11811
11812@printindex vr
11813
10514@bye 11814@bye
10515 11815
10516@ignore 11816@ignore