From d20518eda0766fbacf36441e71a15376b698a4e4 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 4 Sep 2019 11:14:56 +0200 Subject: [PATCH] update org-plus-contrib --- bba.org | 5 +- elpa/org-plus-contrib-20170407/ob-scala.el | 114 - elpa/org-plus-contrib-20170407/org | 22134 --------------- elpa/org-plus-contrib-20170407/org-compat.el | 575 - elpa/org-plus-contrib-20170407/org-gnus.el | 295 - elpa/org-plus-contrib-20170407/org-index.el | 3178 --- elpa/org-plus-contrib-20170407/org-macro.el | 309 - elpa/org-plus-contrib-20170407/org-macs.el | 299 - elpa/org-plus-contrib-20170407/orgcard.pdf | Bin 81692 -> 0 bytes .../COPYING | 0 .../README_ELPA | 4 +- .../dir | 0 .../etc/ORG-NEWS | 721 +- .../etc/styles/OrgOdtContentTemplate.xml | 0 .../etc/styles/OrgOdtStyles.xml | 0 .../etc/styles/README | 6 +- .../ob-C.el | 54 +- .../ob-J.el | 10 +- .../ob-R.el | 6 +- .../ob-abc.el | 24 +- elpa/org-plus-contrib-20190904/ob-arduino.el | 105 + .../ob-asymptote.el | 6 +- .../ob-awk.el | 6 +- .../ob-calc.el | 10 +- .../ob-clojure-literate.el | 350 + .../ob-clojure.el | 66 +- .../ob-comint.el | 13 +- .../ob-coq.el | 6 +- .../ob-core.el | 657 +- .../ob-csharp.el | 4 +- .../ob-css.el | 6 +- .../ob-ditaa.el | 6 +- .../ob-dot.el | 8 +- .../ob-ebnf.el | 26 +- .../ob-emacs-lisp.el | 69 +- .../ob-eukleides.el | 4 +- .../ob-eval.el | 8 +- .../ob-exp.el | 42 +- .../ob-fomus.el | 2 +- .../ob-forth.el | 10 +- .../ob-fortran.el | 11 +- .../ob-gnuplot.el | 19 +- .../ob-groovy.el | 10 +- .../ob-haskell.el | 27 +- .../ob-hledger.el | 8 +- .../ob-io.el | 6 +- .../ob-java.el | 6 +- .../ob-js.el | 124 +- .../ob-julia.el | 0 .../ob-keys.el | 6 +- .../ob-latex.el | 8 +- .../ob-ledger.el | 6 +- .../ob-lilypond.el | 16 +- .../ob-lisp.el | 10 +- .../ob-lob.el | 99 +- .../ob-lua.el | 25 +- .../ob-makefile.el | 6 +- .../ob-mathematica.el | 0 .../ob-mathomatic.el | 4 +- .../ob-matlab.el | 6 +- .../ob-maxima.el | 6 +- .../ob-mscgen.el | 6 +- .../ob-ocaml.el | 8 +- .../ob-octave.el | 24 +- .../ob-org.el | 8 +- .../ob-oz.el | 2 +- .../ob-perl.el | 6 +- elpa/org-plus-contrib-20190904/ob-php.el | 48 + .../ob-picolisp.el | 14 +- .../ob-plantuml.el | 6 +- .../ob-processing.el | 6 +- .../ob-python.el | 72 +- elpa/org-plus-contrib-20190904/ob-redis.el | 44 + .../ob-ref.el | 35 +- .../ob-ruby.el | 8 +- .../ob-sass.el | 6 +- .../ob-scheme.el | 175 +- elpa/org-plus-contrib-20190904/ob-sclang.el | 92 + .../ob-screen.el | 6 +- .../ob-sed.el | 22 +- .../ob-shell.el | 135 +- .../ob-shen.el | 6 +- elpa/org-plus-contrib-20190904/ob-smiles.el | 54 + elpa/org-plus-contrib-20190904/ob-spice.el | 182 + .../ob-sql.el | 45 +- .../ob-sqlite.el | 11 +- .../ob-stan.el | 17 +- .../ob-stata.el | 0 .../ob-table.el | 9 +- .../ob-tangle.el | 31 +- .../ob-tcl.el | 4 +- elpa/org-plus-contrib-20190904/ob-vala.el | 116 + .../ob-vbnet.el | 4 +- .../ob.el | 6 +- elpa/org-plus-contrib-20190904/org | 22565 ++++++++++++++++ .../org-agenda.el | 2216 +- .../org-annotate-file.el | 0 .../org-archive.el | 194 +- .../org-attach-embedded-images.el | 121 + .../org-attach.el | 132 +- .../org-bbdb.el | 10 +- .../org-bibtex-extras.el | 4 +- .../org-bibtex.el | 13 +- .../org-bookmark.el | 2 +- .../org-capture.el | 942 +- .../org-checklist.el | 0 .../org-choose.el | 0 .../org-clock.el | 898 +- .../org-collector.el | 7 +- .../org-colview.el | 483 +- elpa/org-plus-contrib-20190904/org-compat.el | 1011 + .../org-contacts.el | 2 +- .../org-contribdir.el | 4 +- .../org-crypt.el | 8 +- .../org-ctags.el | 9 +- .../org-datetree.el | 19 +- .../org-depend.el | 51 +- .../org-docview.el | 14 +- .../org-drill.el | 101 +- .../org-duration.el | 47 +- .../org-effectiveness.el | 4 +- .../org-eldoc.el | 2 +- .../org-element.el | 565 +- .../org-elisp-symbol.el | 2 +- .../org-entities.el | 18 +- .../org-eshell.el | 8 +- .../org-eval-light.el | 4 +- .../org-eval.el | 4 +- .../org-eww.el | 37 +- .../org-expiry.el | 2 +- .../org-faces.el | 28 +- .../org-feed.el | 34 +- .../org-footnote.el | 641 +- .../org-git-link.el | 30 +- elpa/org-plus-contrib-20190904/org-gnus.el | 270 + elpa/org-plus-contrib-20190904/org-goto.el | 314 + .../org-habit.el | 12 +- .../org-id.el | 36 +- .../org-indent.el | 163 +- .../org-info.el | 18 +- .../org-inlinetask.el | 105 +- .../org-install.el | 0 .../org-interactive-query.el | 2 +- .../org-invoice.el | 0 .../org-irc.el | 36 +- .../org-learn.el | 4 +- .../org-license.el | 4 +- .../org-link-edit.el | 129 +- .../org-lint.el | 56 +- .../org-list.el | 341 +- .../org-loaddefs.el | 1799 +- .../org-mac-iCal.el | 0 .../org-mac-link.el | 43 +- elpa/org-plus-contrib-20190904/org-macro.el | 421 + elpa/org-plus-contrib-20190904/org-macs.el | 1163 + .../org-mairix.el | 2 +- .../org-man.el | 2 +- .../org-mew.el | 4 +- .../org-mhe.el | 12 +- .../org-mobile.el | 111 +- .../org-mouse.el | 52 +- .../org-notify.el | 35 +- .../org-notmuch.el | 9 +- .../org-panel.el | 0 .../org-passwords.el | 2 +- .../org-pcomplete.el | 276 +- .../org-plot.el | 8 +- .../org-plus-contrib-pkg.el | 2 +- .../org-protocol.el | 166 +- .../org-registry.el | 0 .../org-rmail.el | 6 +- .../org-screen.el | 0 .../org-screenshot.el | 4 +- .../org-secretary.el | 0 .../org-src.el | 352 +- .../org-static-mathjax.el | 0 .../org-sudoku.el | 4 +- .../org-table.el | 1773 +- elpa/org-plus-contrib-20190904/org-tempo.el | 188 + .../org-timer.el | 64 +- .../org-toc.el | 4 +- .../org-track.el | 8 +- .../org-velocity.el | 0 .../org-version.el | 6 +- .../org-vm.el | 4 +- .../org-w3m.el | 45 +- .../org-wikinodes.el | 18 +- .../org-wl.el | 4 +- .../org.el | 9258 +++---- elpa/org-plus-contrib-20190904/orgcard.pdf | Bin 0 -> 119175 bytes .../orgtbl-sqlinsert.el | 2 +- .../ox-ascii.el | 261 +- .../ox-beamer.el | 103 +- .../ox-bibtex.el | 2 +- .../ox-confluence.el | 35 +- .../ox-deck.el | 0 .../ox-extra.el | 25 +- .../ox-freemind.el | 2 +- .../ox-groff.el | 10 +- .../ox-html.el | 525 +- .../ox-icalendar.el | 147 +- .../ox-koma-letter.el | 416 +- .../ox-latex.el | 246 +- .../ox-man.el | 28 +- .../ox-md.el | 51 +- .../ox-odt.el | 140 +- .../ox-org.el | 20 +- .../ox-publish.el | 292 +- .../ox-rss.el | 12 +- .../ox-s5.el | 17 +- .../ox-taskjuggler.el | 10 +- .../ox-texinfo.el | 646 +- .../ox.el | 837 +- 213 files changed, 42473 insertions(+), 39670 deletions(-) delete mode 100644 elpa/org-plus-contrib-20170407/ob-scala.el delete mode 100644 elpa/org-plus-contrib-20170407/org delete mode 100644 elpa/org-plus-contrib-20170407/org-compat.el delete mode 100644 elpa/org-plus-contrib-20170407/org-gnus.el delete mode 100644 elpa/org-plus-contrib-20170407/org-index.el delete mode 100644 elpa/org-plus-contrib-20170407/org-macro.el delete mode 100644 elpa/org-plus-contrib-20170407/org-macs.el delete mode 100644 elpa/org-plus-contrib-20170407/orgcard.pdf rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/COPYING (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/README_ELPA (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/dir (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/etc/ORG-NEWS (85%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/etc/styles/OrgOdtContentTemplate.xml (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/etc/styles/OrgOdtStyles.xml (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/etc/styles/README (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-C.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-J.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-R.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-abc.el (83%) create mode 100644 elpa/org-plus-contrib-20190904/ob-arduino.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-asymptote.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-awk.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-calc.el (92%) create mode 100644 elpa/org-plus-contrib-20190904/ob-clojure-literate.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-clojure.el (79%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-comint.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-coq.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-core.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-csharp.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-css.el (89%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ditaa.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-dot.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ebnf.el (79%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-emacs-lisp.el (59%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-eukleides.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-eval.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-exp.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-fomus.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-forth.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-fortran.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-gnuplot.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-groovy.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-haskell.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-hledger.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-io.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-java.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-js.el (58%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-julia.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-keys.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-latex.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ledger.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-lilypond.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-lisp.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-lob.el (61%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-lua.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-makefile.el (89%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-mathematica.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-mathomatic.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-matlab.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-maxima.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-mscgen.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ocaml.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-octave.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-org.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-oz.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-perl.el (96%) create mode 100644 elpa/org-plus-contrib-20190904/ob-php.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-picolisp.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-plantuml.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-processing.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-python.el (87%) create mode 100644 elpa/org-plus-contrib-20190904/ob-redis.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ref.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-ruby.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-sass.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-scheme.el (53%) create mode 100644 elpa/org-plus-contrib-20190904/ob-sclang.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-screen.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-sed.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-shell.el (71%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-shen.el (94%) create mode 100644 elpa/org-plus-contrib-20190904/ob-smiles.el create mode 100644 elpa/org-plus-contrib-20190904/ob-spice.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-sql.el (89%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-sqlite.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-stan.el (85%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-stata.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-table.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-tangle.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-tcl.el (97%) create mode 100644 elpa/org-plus-contrib-20190904/ob-vala.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob-vbnet.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ob.el (87%) create mode 100644 elpa/org-plus-contrib-20190904/org rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-agenda.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-annotate-file.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-archive.el (81%) create mode 100644 elpa/org-plus-contrib-20190904/org-attach-embedded-images.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-attach.el (84%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-bbdb.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-bibtex-extras.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-bibtex.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-bookmark.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-capture.el (75%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-checklist.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-choose.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-clock.el (83%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-collector.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-colview.el (82%) create mode 100644 elpa/org-plus-contrib-20190904/org-compat.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-contacts.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-contribdir.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-crypt.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-ctags.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-datetree.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-depend.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-docview.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-drill.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-duration.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-effectiveness.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-eldoc.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-element.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-elisp-symbol.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-entities.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-eshell.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-eval-light.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-eval.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-eww.el (85%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-expiry.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-faces.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-feed.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-footnote.el (67%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-git-link.el (92%) create mode 100644 elpa/org-plus-contrib-20190904/org-gnus.el create mode 100644 elpa/org-plus-contrib-20190904/org-goto.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-habit.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-id.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-indent.el (74%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-info.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-inlinetask.el (82%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-install.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-interactive-query.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-invoice.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-irc.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-learn.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-license.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-link-edit.el (73%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-lint.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-list.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-loaddefs.el (69%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mac-iCal.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mac-link.el (96%) create mode 100644 elpa/org-plus-contrib-20190904/org-macro.el create mode 100644 elpa/org-plus-contrib-20190904/org-macs.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mairix.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-man.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mew.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mhe.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mobile.el (93%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-mouse.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-notify.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-notmuch.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-panel.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-passwords.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-pcomplete.el (66%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-plot.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-plus-contrib-pkg.el (57%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-protocol.el (87%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-registry.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-rmail.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-screen.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-screenshot.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-secretary.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-src.el (81%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-static-mathjax.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-sudoku.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-table.el (81%) create mode 100644 elpa/org-plus-contrib-20190904/org-tempo.el rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-timer.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-toc.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-track.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-velocity.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-version.el (82%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-vm.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-w3m.el (82%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-wikinodes.el (96%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org-wl.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/org.el (80%) create mode 100644 elpa/org-plus-contrib-20190904/orgcard.pdf rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/orgtbl-sqlinsert.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-ascii.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-beamer.el (94%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-bibtex.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-confluence.el (92%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-deck.el (100%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-extra.el (88%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-freemind.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-groff.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-html.el (91%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-icalendar.el (90%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-koma-letter.el (68%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-latex.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-man.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-md.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-odt.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-org.el (95%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-publish.el (87%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-rss.el (97%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-s5.el (98%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-taskjuggler.el (99%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox-texinfo.el (74%) rename elpa/{org-plus-contrib-20170407 => org-plus-contrib-20190904}/ox.el (92%) diff --git a/bba.org b/bba.org index dbec69c8..bf8c4a00 100644 --- a/bba.org +++ b/bba.org @@ -133,6 +133,9 @@ from bash. (let ((path (shell-command-to-string ". ~/.bashrc >/dev/null; echo -n $ORACLE_HOME"))) (setenv "ORACLE_HOME" path) ) + (let ((path (shell-command-to-string ". ~/.bashrc >/dev/null; echo -n $PERL5LIB"))) + (setenv "PERL5LIB" path) + ) (let ((path (shell-command-to-string ". ~/.bashrc >/dev/null; echo -n $CLASSPATH"))) (setenv "CLASSPATH" path) ) @@ -861,7 +864,7 @@ Some extra functionality from the org package repository. #+BEGIN_SRC emacs-lisp :tangle yes (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20170407" t) + (add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20190904" t) )) #+END_SRC diff --git a/elpa/org-plus-contrib-20170407/ob-scala.el b/elpa/org-plus-contrib-20170407/ob-scala.el deleted file mode 100644 index 7d5f299e..00000000 --- a/elpa/org-plus-contrib-20170407/ob-scala.el +++ /dev/null @@ -1,114 +0,0 @@ -;;; ob-scala.el --- Babel Functions for Scala -*- lexical-binding: t; -*- - -;; Copyright (C) 2012-2017 Free Software Foundation, Inc. - -;; Author: Andrzej Lichnerowicz -;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: -;; Currently only supports the external execution. No session support yet. - -;;; Requirements: -;; - Scala language :: http://www.scala-lang.org/ -;; - Scala major mode :: Can be installed from Scala sources -;; https://github.com/scala/scala-dist/blob/master/tool-support/src/emacs/scala-mode.el - -;;; Code: -(require 'ob) - -(defvar org-babel-tangle-lang-exts) ;; Autoloaded -(add-to-list 'org-babel-tangle-lang-exts '("scala" . "scala")) -(defvar org-babel-default-header-args:scala '()) -(defvar org-babel-scala-command "scala" - "Name of the command to use for executing Scala code.") - -(defun org-babel-execute:scala (body params) - "Execute a block of Scala code with org-babel. This function is -called by `org-babel-execute-src-block'" - (message "executing Scala source code block") - (let* ((processed-params (org-babel-process-params params)) - (session (org-babel-scala-initiate-session (nth 0 processed-params))) - (result-params (nth 2 processed-params)) - (result-type (cdr (assq :result-type params))) - (full-body (org-babel-expand-body:generic - body params)) - (result (org-babel-scala-evaluate - session full-body result-type result-params))) - - (org-babel-reassemble-table - result - (org-babel-pick-name - (cdr (assq :colname-names params)) (cdr (assq :colnames params))) - (org-babel-pick-name - (cdr (assq :rowname-names params)) (cdr (assq :rownames params)))))) - -(defvar org-babel-scala-wrapper-method - -"var str_result :String = null; - -Console.withOut(new java.io.OutputStream() {def write(b: Int){ -}}) { - str_result = { -%s - }.toString -} - -print(str_result) -") - - -(defun org-babel-scala-evaluate - (session body &optional result-type result-params) - "Evaluate BODY in external Scala process. -If RESULT-TYPE equals `output' then return standard output as a string. -If RESULT-TYPE equals `value' then return the value of the last statement -in BODY as elisp." - (when session (error "Sessions are not (yet) supported for Scala")) - (pcase result-type - (`output - (let ((src-file (org-babel-temp-file "scala-"))) - (with-temp-file src-file (insert body)) - (org-babel-eval - (concat org-babel-scala-command " " src-file) ""))) - (`value - (let* ((src-file (org-babel-temp-file "scala-")) - (wrapper (format org-babel-scala-wrapper-method body))) - (with-temp-file src-file (insert wrapper)) - (let ((raw (org-babel-eval - (concat org-babel-scala-command " " src-file) ""))) - (org-babel-result-cond result-params - raw - (org-babel-script-escape raw))))))) - - -(defun org-babel-prep-session:scala (_session _params) - "Prepare SESSION according to the header arguments specified in PARAMS." - (error "Sessions are not (yet) supported for Scala")) - -(defun org-babel-scala-initiate-session (&optional _session) - "If there is not a current inferior-process-buffer in SESSION -then create. Return the initialized session. Sessions are not -supported in Scala." - nil) - -(provide 'ob-scala) - - - -;;; ob-scala.el ends here diff --git a/elpa/org-plus-contrib-20170407/org b/elpa/org-plus-contrib-20170407/org deleted file mode 100644 index f7a3d605..00000000 --- a/elpa/org-plus-contrib-20170407/org +++ /dev/null @@ -1,22134 +0,0 @@ -This is org, produced by makeinfo version 4.13 from org.texi. - -This manual is for Org version 9.0.5 (release_9.0.5-436-g8ba336.dirty). - - Copyright (C) 2004-2017 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with no Invariant Sections, with the Front-Cover Texts - being "A GNU Manual," and with the Back-Cover Texts as in (a) - below. A copy of the license is included in the section entitled - "GNU Free Documentation License." - - (a) The FSF's Back-Cover Text is: "You have the freedom to copy and - modify this GNU manual." - -INFO-DIR-SECTION Emacs editing modes -START-INFO-DIR-ENTRY -* Org Mode: (org). Outline-based notes management and organizer -END-INFO-DIR-ENTRY - - -File: org, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) - -Org Mode Manual -*************** - -This manual is for Org version 9.0.5 (release_9.0.5-436-g8ba336.dirty). - - Copyright (C) 2004-2017 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with no Invariant Sections, with the Front-Cover Texts - being "A GNU Manual," and with the Back-Cover Texts as in (a) - below. A copy of the license is included in the section entitled - "GNU Free Documentation License." - - (a) The FSF's Back-Cover Text is: "You have the freedom to copy and - modify this GNU manual." - -* Menu: - -* Introduction:: Getting started -* Document structure:: A tree works like your brain -* Tables:: Pure magic for quick formatting -* Hyperlinks:: Notes in context -* TODO items:: Every tree branch can be a TODO item -* Tags:: Tagging headlines and matching sets of tags -* Properties and columns:: Storing information about an entry -* Dates and times:: Making items useful for planning -* Capture - Refile - Archive:: The ins and outs for projects -* Agenda views:: Collecting information into views -* Markup:: Prepare text for rich export -* Exporting:: Sharing and publishing notes -* Publishing:: Create a web site of linked Org files -* Working with source code:: Export, evaluate, and tangle code blocks -* Miscellaneous:: All the rest which did not fit elsewhere -* Hacking:: How to hack your way around -* MobileOrg:: Viewing and capture on a mobile device -* History and acknowledgments:: How Org came into being -* GNU Free Documentation License:: The license for this documentation. -* Main Index:: An index of Org's concepts and features -* Key Index:: Key bindings and where they are described -* Command and Function Index:: Command names and some internal functions -* Variable Index:: Variables mentioned in the manual - - --- The Detailed Node Listing --- - -Introduction - -* Summary:: Brief summary of what Org does -* Installation:: Installing Org -* Activation:: How to activate Org for certain buffers -* Feedback:: Bug reports, ideas, patches etc. -* Conventions:: Typesetting conventions in the manual - -Document structure - -* Outlines:: Org is based on Outline mode -* Headlines:: How to typeset Org tree headlines -* Visibility cycling:: Show and hide, much simplified -* Motion:: Jumping to other headlines -* Structure editing:: Changing sequence and level of headlines -* Sparse trees:: Matches embedded in context -* Plain lists:: Additional structure within an entry -* Drawers:: Tucking stuff away -* Blocks:: Folding blocks -* Footnotes:: How footnotes are defined in Org's syntax -* Orgstruct mode:: Structure editing outside Org -* Org syntax:: Formal description of Org's syntax - -Visibility cycling - -* Global and local cycling:: Cycling through various visibility states -* Initial visibility:: Setting the initial visibility state -* Catching invisible edits:: Preventing mistakes when editing invisible parts - -Tables - -* Built-in table editor:: Simple tables -* Column width and alignment:: Overrule the automatic settings -* Column groups:: Grouping to trigger vertical lines -* Orgtbl mode:: The table editor as minor mode -* The spreadsheet:: The table editor has spreadsheet capabilities -* Org-Plot:: Plotting from org tables - -The spreadsheet - -* References:: How to refer to another field or range -* Formula syntax for Calc:: Using Calc to compute stuff -* Formula syntax for Lisp:: Writing formulas in Emacs Lisp -* Durations and time values:: How to compute durations and time values -* Field and range formulas:: Formula for specific (ranges of) fields -* Column formulas:: Formulas valid for an entire column -* Lookup functions:: Lookup functions for searching tables -* Editing and debugging formulas:: Fixing formulas -* Updating the table:: Recomputing all dependent fields -* Advanced features:: Field and column names, parameters and automatic recalc - -Hyperlinks - -* Link format:: How links in Org are formatted -* Internal links:: Links to other places in the current file -* External links:: URL-like links to the world -* Handling links:: Creating, inserting and following -* Using links outside Org:: Linking from my C source code? -* Link abbreviations:: Shortcuts for writing complex links -* Search options:: Linking to a specific location -* Custom searches:: When the default search is not enough - -Internal links - -* Radio targets:: Make targets trigger links in plain text - -TODO items - -* TODO basics:: Marking and displaying TODO entries -* TODO extensions:: Workflow and assignments -* Progress logging:: Dates and notes for progress -* Priorities:: Some things are more important than others -* Breaking down tasks:: Splitting a task into manageable pieces -* Checkboxes:: Tick-off lists - -Extended use of TODO keywords - -* Workflow states:: From TODO to DONE in steps -* TODO types:: I do this, Fred does the rest -* Multiple sets in one file:: Mixing it all, and still finding your way -* Fast access to TODO states:: Single letter selection of a state -* Per-file keywords:: Different files, different requirements -* Faces for TODO keywords:: Highlighting states -* TODO dependencies:: When one task needs to wait for others - -Progress logging - -* Closing items:: When was this entry marked DONE? -* Tracking TODO state changes:: When did the status change? -* Tracking your habits:: How consistent have you been? - -Tags - -* Tag inheritance:: Tags use the tree structure of the outline -* Setting tags:: How to assign tags to a headline -* Tag hierarchy:: Create a hierarchy of tags -* Tag searches:: Searching for combinations of tags - -Properties and columns - -* Property syntax:: How properties are spelled out -* Special properties:: Access to other Org mode features -* Property searches:: Matching property values -* Property inheritance:: Passing values down the tree -* Column view:: Tabular viewing and editing -* Property API:: Properties for Lisp programmers - -Column view - -* Defining columns:: The COLUMNS format property -* Using column view:: How to create and use column view -* Capturing column view:: A dynamic block for column view - -Defining columns - -* Scope of column definitions:: Where defined, where valid? -* Column attributes:: Appearance and content of a column - -Dates and times - -* Timestamps:: Assigning a time to a tree entry -* Creating timestamps:: Commands which insert timestamps -* Deadlines and scheduling:: Planning your work -* Clocking work time:: Tracking how long you spend on a task -* Effort estimates:: Planning work effort in advance -* Timers:: Notes with a running timer - -Creating timestamps - -* The date/time prompt:: How Org mode helps you entering date and time -* Custom time format:: Making dates look different - -Deadlines and scheduling - -* Inserting deadline/schedule:: Planning items -* Repeated tasks:: Items that show up again and again - -Clocking work time - -* Clocking commands:: Starting and stopping a clock -* The clock table:: Detailed reports -* Resolving idle time:: Resolving time when you've been idle - -Capture - Refile - Archive - -* Capture:: Capturing new stuff -* Attachments:: Add files to tasks -* RSS feeds:: Getting input from RSS feeds -* Protocols:: External (e.g., Browser) access to Emacs and Org -* Refile and copy:: Moving/copying a tree from one place to another -* Archiving:: What to do with finished projects - -Capture - -* Setting up capture:: Where notes will be stored -* Using capture:: Commands to invoke and terminate capture -* Capture templates:: Define the outline of different note types - -Capture templates - -* Template elements:: What is needed for a complete template entry -* Template expansion:: Filling in information about time and context -* Templates in contexts:: Only show a template in a specific context - -Archiving - -* Moving subtrees:: Moving a tree to an archive file -* Internal archiving:: Switch off a tree but keep it in the file - -Agenda views - -* Agenda files:: Files being searched for agenda information -* Agenda dispatcher:: Keyboard access to agenda views -* Built-in agenda views:: What is available out of the box? -* Presentation and sorting:: How agenda items are prepared for display -* Agenda commands:: Remote editing of Org trees -* Custom agenda views:: Defining special searches and views -* Exporting agenda views:: Writing a view to a file -* Agenda column view:: Using column view for collected entries - -The built-in agenda views - -* Weekly/daily agenda:: The calendar page with current tasks -* Global TODO list:: All unfinished action items -* Matching tags and properties:: Structured information with fine-tuned search -* Search view:: Find entries by searching for text -* Stuck projects:: Find projects you need to review - -Presentation and sorting - -* Categories:: Not all tasks are equal -* Time-of-day specifications:: How the agenda knows the time -* Sorting agenda items:: The order of things -* Filtering/limiting agenda items:: Dynamically narrow the agenda - -Custom agenda views - -* Storing searches:: Type once, use often -* Block agenda:: All the stuff you need in a single buffer -* Setting options:: Changing the rules - -Markup for rich export - -* Paragraphs:: The basic unit of text -* Emphasis and monospace:: Bold, italic, etc. -* Horizontal rules:: Make a line -* Images and tables:: Images, tables and caption mechanism -* Literal examples:: Source code examples with special formatting -* Special symbols:: Greek letters and other symbols -* Subscripts and superscripts:: Simple syntax for raising/lowering text -* Embedded LaTeX:: LaTeX can be freely used inside Org documents - -Embedded LaTeX - -* LaTeX fragments:: Complex formulas made easy -* Previewing LaTeX fragments:: What will this snippet look like? -* CDLaTeX mode:: Speed up entering of formulas - -Exporting - -* The export dispatcher:: The main exporter interface -* Export settings:: Generic export settings -* Table of contents:: The if and where of the table of contents -* Include files:: Include additional files into a document -* Macro replacement:: Use macros to create templates -* Comment lines:: What will not be exported -* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding -* Beamer export:: Exporting as a Beamer presentation -* HTML export:: Exporting to HTML -* LaTeX export:: Exporting to LaTeX, and processing to PDF -* Markdown export:: Exporting to Markdown -* OpenDocument Text export:: Exporting to OpenDocument Text -* Org export:: Exporting to Org -* Texinfo export:: Exporting to Texinfo -* iCalendar export:: Exporting to iCalendar -* Other built-in back-ends:: Exporting to a man page -* Advanced configuration:: Fine-tuning the export output -* Export in foreign buffers:: Author tables and lists in Org syntax - -Beamer export - -* Beamer export commands:: How to export Beamer documents. -* Beamer specific export settings:: Export settings for Beamer export. -* Sectioning Frames and Blocks in Beamer:: Blocks and sections in Beamer. -* Beamer specific syntax:: Syntax specific to Beamer. -* Editing support:: Helper functions for Org Beamer export. -* A Beamer Example:: An complete Beamer example. - -HTML export - -* HTML Export commands:: How to invoke HTML export -* HTML Specific export settings:: Export settings for HTML export -* HTML doctypes:: Org can export to various (X)HTML flavors -* HTML preamble and postamble:: How to insert a preamble and a postamble -* Quoting HTML tags:: Using direct HTML in Org mode -* Links in HTML export:: How links will be interpreted and formatted -* Tables in HTML export:: How to modify the formatting of tables -* Images in HTML export:: How to insert figures into HTML output -* Math formatting in HTML export:: Beautiful math also on the web -* Text areas in HTML export:: An alternative way to show an example -* CSS support:: Changing the appearance of the output -* JavaScript support:: Info and Folding in a web browser - -LaTeX export - -* LaTeX export commands:: How to export to LaTeX and PDF -* LaTeX specific export settings:: Export settings for LaTeX -* LaTeX header and sectioning:: Setting up the export file structure -* Quoting LaTeX code:: Incorporating literal LaTeX code -* Tables in LaTeX export:: Specific attributes for tables -* Images in LaTeX export:: Specific attributes for images -* Plain lists in LaTeX export:: Specific attributes for plain lists -* Source blocks in LaTeX export:: Specific attributes for source blocks -* Example blocks in LaTeX export:: Specific attributes for example blocks -* Special blocks in LaTeX export:: Specific attributes for special blocks -* Horizontal rules in LaTeX export:: Specific attributes for horizontal rules - -OpenDocument Text export - -* Pre-requisites for ODT export:: What packages ODT exporter relies on -* ODT export commands:: How to invoke ODT export -* ODT specific export settings:: Export settings for ODT -* Extending ODT export:: How to produce `doc', `pdf' files -* Applying custom styles:: How to apply custom styles to the output -* Links in ODT export:: How links will be interpreted and formatted -* Tables in ODT export:: How Tables are exported -* Images in ODT export:: How to insert images -* Math formatting in ODT export:: How LaTeX fragments are formatted -* Labels and captions in ODT export:: How captions are rendered -* Literal examples in ODT export:: How source and example blocks are formatted -* Advanced topics in ODT export:: Read this if you are a power user - -Math formatting in ODT export - -* Working with LaTeX math snippets:: How to embed LaTeX math fragments -* Working with MathML or OpenDocument formula files:: How to embed equations in native format - -Advanced topics in ODT export - -* Configuring a document converter:: How to register a document converter -* Working with OpenDocument style files:: Explore the internals -* Creating one-off styles:: How to produce custom highlighting etc -* Customizing tables in ODT export:: How to define and use Table templates -* Validating OpenDocument XML:: How to debug corrupt OpenDocument files - -Texinfo export - -* Texinfo export commands:: How to invoke Texinfo export -* Texinfo specific export settings:: Export settings for Texinfo -* Texinfo file header:: Generating the begining of a Texinfo file -* Texinfo title and copyright page:: Creating title and copyright pages -* Texinfo `Top' node:: Installing a manual in Info Top node -* Headings and sectioning structure:: Building document structure -* Indices:: Creating indices -* Quoting Texinfo code:: Incorporating literal Texinfo code -* Plain lists in Texinfo export:: Specific attributes for plain lists -* Tables in Texinfo export:: Specific attributes for tables -* Images in Texinfo export:: Specific attributes for images -* Special blocks in Texinfo export:: Specific attributes for special blocks -* A Texinfo example:: Illustrating Org to Texinfo process - -Publishing - -* Configuration:: Defining projects -* Uploading files:: How to get files up on the server -* Sample configuration:: Example projects -* Triggering publication:: Publication commands - -Configuration - -* Project alist:: The central configuration variable -* Sources and destinations:: From here to there -* Selecting files:: What files are part of the project? -* Publishing action:: Setting the function doing the publishing -* Publishing options:: Tweaking HTML/LaTeX export -* Publishing links:: Which links keep working after publishing? -* Sitemap:: Generating a list of all pages -* Generating an index:: An index that reaches across pages - -Sample configuration - -* Simple example:: One-component publishing -* Complex example:: A multi-component publishing example - -Working with source code - -* Structure of code blocks:: Code block syntax described -* Editing source code:: Language major-mode editing -* Exporting code blocks:: Export contents and/or results -* Extracting source code:: Create pure source code files -* Evaluating code blocks:: Place results of evaluation in the Org mode buffer -* Library of Babel:: Use and contribute to a library of useful code blocks -* Languages:: List of supported code block languages -* Header arguments:: Configure code block functionality -* Results of evaluation:: How evaluation results are handled -* Noweb reference syntax:: Literate programming in Org mode -* Key bindings and useful functions:: Work quickly with code blocks -* Batch execution:: Call functions from the command line - -Header arguments - -* Using header arguments:: Different ways to set header arguments -* Specific header arguments:: List of header arguments - -Using header arguments - -* System-wide header arguments:: Set globally, language-specific -* Language-specific header arguments:: Set in the Org file's headers -* Header arguments in Org mode properties:: Set in the Org file -* Language-specific mode properties:: -* Code block specific header arguments:: The most commonly used method -* Arguments in function calls:: The most specific level, takes highest priority - -Specific header arguments - -* var:: Pass arguments to `src' code blocks -* results:: Specify results type; how to collect -* file:: Specify a path for output file -* file-desc:: Specify a description for file results -* file-ext:: Specify an extension for file output -* output-dir:: Specify a directory for output file -* dir:: Specify the default directory for code block execution -* exports:: Specify exporting code, results, both, none -* tangle:: Toggle tangling; or specify file name -* mkdirp:: Toggle for parent directory creation for target files during tangling -* comments:: Toggle insertion of comments in tangled code files -* padline:: Control insertion of padding lines in tangled code files -* no-expand:: Turn off variable assignment and noweb expansion during tangling -* session:: Preserve the state of code evaluation -* noweb:: Toggle expansion of noweb references -* noweb-ref:: Specify block's noweb reference resolution target -* noweb-sep:: String to separate noweb references -* cache:: Avoid re-evaluating unchanged code blocks -* sep:: Delimiter for writing tabular results outside Org -* hlines:: Handle horizontal lines in tables -* colnames:: Handle column names in tables -* rownames:: Handle row names in tables -* shebang:: Make tangled files executable -* tangle-mode:: Set permission of tangled files -* eval:: Limit evaluation of specific code blocks -* wrap:: Mark source block evaluation results -* post:: Post processing of results of code block evaluation -* prologue:: Text to prepend to body of code block -* epilogue:: Text to append to body of code block - -Miscellaneous - -* Completion:: M-TAB guesses completions -* Easy templates:: Quick insertion of structural elements -* Speed keys:: Electric commands at the beginning of a headline -* Code evaluation security:: Org mode files evaluate inline code -* Customization:: Adapting Org to changing tastes -* In-buffer settings:: Overview of the #+KEYWORDS -* The very busy C-c C-c key:: When in doubt, press C-c C-c -* Clean view:: Getting rid of leading stars in the outline -* TTY keys:: Using Org on a tty -* Interaction:: With other Emacs packages -* org-crypt:: Encrypting Org files - -Interaction with other packages - -* Cooperation:: Packages Org cooperates with -* Conflicts:: Packages that lead to conflicts - -Hacking - -* Hooks:: How to reach into Org's internals -* Add-on packages:: Available extensions -* Adding hyperlink types:: New custom link types -* Adding export back-ends:: How to write new export back-ends -* Context-sensitive commands:: How to add functionality to such commands -* Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs -* Dynamic blocks:: Automatically filled blocks -* Special agenda views:: Customized views -* Speeding up your agendas:: Tips on how to speed up your agendas -* Extracting agenda information:: Post-processing of agenda information -* Using the property API:: Writing programs that use entry properties -* Using the mapping API:: Mapping over all or selected entries - -Tables and lists in arbitrary syntax - -* Radio tables:: Sending and receiving radio tables -* A LaTeX example:: Step by step, almost a tutorial -* Translator functions:: Copy and modify -* Radio lists:: Sending and receiving lists - -MobileOrg - -* Setting up the staging area:: For the mobile device -* Pushing to MobileOrg:: Uploading Org files and agendas -* Pulling from MobileOrg:: Integrating captured and flagged items - - -File: org, Node: Introduction, Next: Document structure, Prev: Top, Up: Top - -1 Introduction -************** - -* Menu: - -* Summary:: Brief summary of what Org does -* Installation:: Installing Org -* Activation:: How to activate Org for certain buffers -* Feedback:: Bug reports, ideas, patches etc. -* Conventions:: Typesetting conventions in the manual - - -File: org, Node: Summary, Next: Installation, Up: Introduction - -1.1 Summary -=========== - -Org is a mode for keeping notes, maintaining TODO lists, and project -planning with a fast and effective plain-text system. It also is an -authoring system with unique support for literate programming and -reproducible research. - - Org is implemented on top of Outline mode, which makes it possible -to keep the content of large files well structured. Visibility cycling -and structure editing help to work with the tree. Tables are easily -created with a built-in table editor. Plain text URL-like links -connect to websites, emails, Usenet messages, BBDB entries, and any -files related to the projects. - - Org develops organizational tasks around notes files that contain -lists or information about projects as plain text. Project planning -and task management makes use of metadata which is part of an outline -node. Based on this data, specific entries can be extracted in queries -and create dynamic agenda views that also integrate the Emacs calendar -and diary. Org can be used to implement many different project -planning schemes, such as David Allen's GTD system. - - Org files can serve as a single source authoring system with export -to many different formats such as HTML, LaTeX, Open Document, and -Markdown. New export backends can be derived from existing ones, or -defined from scratch. - - Org files can include source code blocks, which makes Org uniquely -suited for authoring technical documents with code examples. Org source -code blocks are fully functional; they can be evaluated in place and -their results can be captured in the file. This makes it possible to -create a single file reproducible research compendium. - - Org keeps simple things simple. When first fired up, it should feel -like a straightforward, easy to use outliner. Complexity is not -imposed, but a large amount of functionality is available when needed. -Org is a toolbox. Many users actually run only a (very personal) -fraction of Org's capabilities, and know that there is more whenever -they need it. - - All of this is achieved with strictly plain text files, the most -portable and future-proof file format. Org runs in Emacs. Emacs is -one of the most widely ported programs, so that Org mode is available -on every major platform. - - There is a website for Org which provides links to the newest -version of Org, as well as additional information, frequently asked -questions (FAQ), links to tutorials, etc. This page is located at -`http://orgmode.org'. - - An earlier version (7.3) of this manual is available as a paperback -book from Network Theory Ltd. -(http://www.network-theory.co.uk/org/manual/) - - -File: org, Node: Installation, Next: Activation, Prev: Summary, Up: Introduction - -1.2 Installation -================ - -Org is part of recent distributions of GNU Emacs, so you normally don't -need to install it. If, for one reason or another, you want to install -Org on top of this pre-packaged version, there are three ways to do it: - - * By using Emacs package system. - - * By downloading Org as an archive. - - * By using Org's git repository. - - We strongly recommend to stick to a single installation method. - -Using Emacs packaging system -............................ - -Recent Emacs distributions include a packaging system which lets you -install Elisp libraries. You can install Org with `M-x package-install -RET org'. - -Important: you need to do this in a session where no `.org' file has -been visited, i.e., where no Org built-in function have been loaded. -Otherwise autoload Org functions will mess up the installation. - - Then, to make sure your Org configuration is taken into account, -initialize the package system with `(package-initialize)' in your Emacs -init file before setting any Org option. If you want to use Org's -package repository, check out the Org ELPA page -(http://orgmode.org/elpa.html). - -Downloading Org as an archive -............................. - -You can download Org latest release from Org's website -(http://orgmode.org/). In this case, make sure you set the load-path -correctly in your Emacs init file: - - (add-to-list 'load-path "~/path/to/orgdir/lisp") - - The downloaded archive contains contributed libraries that are not -included in Emacs. If you want to use them, add the `contrib' -directory to your load-path: - - (add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t) - - Optionally, you can compile the files and/or install them in your -system. Run `make help' to list compilation and installation options. - -Using Org's git repository -.......................... - -You can clone Org's repository and install Org like this: - - $ cd ~/src/ - $ git clone git://orgmode.org/org-mode.git - $ make autoloads - - Note that in this case, `make autoloads' is mandatory: it defines -Org's version in `org-version.el' and Org's autoloads in -`org-loaddefs.el'. - - Remember to add the correct load-path as described in the method -above. - - You can also compile with `make', generate the documentation with -`make doc', create a local configuration with `make config' and install -Org with `make install'. Please run `make help' to get the list of -compilation/installation options. - - For more detailed explanations on Org's build system, please check -the Org Build System page on Worg -(http://orgmode.org/worg/dev/org-build-system.html). - - -File: org, Node: Activation, Next: Feedback, Prev: Installation, Up: Introduction - -1.3 Activation -============== - -Org mode buffers need font-lock to be turned on: this is the default in -Emacs(1). - - There are compatibility issues between Org mode and some other Elisp -packages, please take the time to check the list (*note Conflicts::). - - The four Org commands `org-store-link', `org-capture', `org-agenda', -and `org-iswitchb' should be accessible through global keys (i.e., -anywhere in Emacs, not just in Org buffers). Here are suggested -bindings for these keys, please modify the keys to your own liking. - (global-set-key "\C-cl" 'org-store-link) - (global-set-key "\C-ca" 'org-agenda) - (global-set-key "\C-cc" 'org-capture) - (global-set-key "\C-cb" 'org-iswitchb) - - Files with the `.org' extension use Org mode by default. To turn on -Org mode in a file that does not have the extension `.org', make the -first line of a file look like this: - - MY PROJECTS -*- mode: org; -*- - -which will select Org mode for this buffer no matter what the file's -name is. See also the variable `org-insert-mode-line-in-empty-file'. - - Many commands in Org work on the region if the region is active. To -make use of this, you need to have `transient-mark-mode' turned on, -which is the default. If you do not like `transient-mark-mode', you -can create an active region by using the mouse to select a region, or -pressing `C-' twice before moving the cursor. - - ---------- Footnotes ---------- - - (1) If you don't use font-lock globally, turn it on in Org buffer -with `(add-hook 'org-mode-hook 'turn-on-font-lock)' - - -File: org, Node: Feedback, Next: Conventions, Prev: Activation, Up: Introduction - -1.4 Feedback -============ - -If you find problems with Org, or if you have questions, remarks, or -ideas about it, please mail to the Org mailing list -. You can subscribe to the list on this web -page (https://lists.gnu.org/mailman/listinfo/emacs-orgmode). If you -are not a member of the mailing list, your mail will be passed to the -list after a moderator has approved it(1). - - For bug reports, please first try to reproduce the bug with the -latest version of Org available--if you are running an outdated -version, it is quite possible that the bug has been fixed already. If -the bug persists, prepare a report and provide as much information as -possible, including the version information of Emacs (`M-x -emacs-version ') and Org (`M-x org-version RET'), as well as the -Org related setup in the Emacs init file. The easiest way to do this -is to use the command - M-x org-submit-bug-report RET - which will put all this information into an Emacs mail buffer so -that you only need to add your description. If you are not sending the -Email from within Emacs, please copy and paste the content into your -Email program. - - Sometimes you might face a problem due to an error in your Emacs or -Org mode setup. Before reporting a bug, it is very helpful to start -Emacs with minimal customizations and reproduce the problem. Doing so -often helps you determine if the problem is with your customization or -with Org mode itself. You can start a typical minimal session with a -command like the example below. - - $ emacs -Q -l /path/to/minimal-org.el - - However if you are using Org mode as distributed with Emacs, a -minimal setup is not necessary. In that case it is sufficient to start -Emacs as `emacs -Q'. The `minimal-org.el' setup file can have contents -as shown below. - - ;;; Minimal setup to load latest 'org-mode' - - ;; activate debugging - (setq debug-on-error t - debug-on-signal nil - debug-on-quit nil) - - ;; add latest org-mode to load path - (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) - (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) - - If an error occurs, a backtrace can be very useful (see below on how -to create one). Often a small example file helps, along with clear -information about: - - 1. What exactly did you do? - - 2. What did you expect to happen? - - 3. What happened instead? - Thank you for helping to improve this program. - -How to create a useful backtrace -................................ - -If working with Org produces an error with a message you don't -understand, you may have hit a bug. The best way to report this is by -providing, in addition to what was mentioned above, a _backtrace_. -This is information from the built-in debugger about where and how the -error occurred. Here is how to produce a useful backtrace: - - 1. Reload uncompiled versions of all Org mode Lisp files. The - backtrace contains much more information if it is produced with - uncompiled code. To do this, use - C-u M-x org-reload RET - or select `Org -> Refresh/Reload -> Reload Org uncompiled' from the - menu. - - 2. Go to the `Options' menu and select `Enter Debugger on Error'. - - 3. Do whatever you have to do to hit the error. Don't forget to - document the steps you take. - - 4. When you hit the error, a `*Backtrace*' buffer will appear on the - screen. Save this buffer to a file (for example using `C-x C-w') - and attach it to your bug report. - - ---------- Footnotes ---------- - - (1) Please consider subscribing to the mailing list, in order to -minimize the work the mailing list moderators have to do. - - -File: org, Node: Conventions, Prev: Feedback, Up: Introduction - -1.5 Typesetting conventions used in this manual -=============================================== - -TODO keywords, tags, properties, etc. -..................................... - -Org mainly uses three types of keywords: TODO keywords, tags and -property names. In this manual we use the following conventions: - -`TODO' -`WAITING' - TODO keywords are written with all capitals, even if they are - user-defined. - -`boss' -`ARCHIVE' - User-defined tags are written in lowercase; built-in tags with - special meaning are written with all capitals. - -`Release' -`PRIORITY' - User-defined properties are capitalized; built-in properties with - special meaning are written with all capitals. - - Moreover, Org uses option keywords (like `#+TITLE' to set the title) -and environment keywords (like `#+BEGIN_EXPORT html' to start a `HTML' -environment). They are written in uppercase in the manual to enhance -its readability, but you can use lowercase in your Org file. - -Key bindings and commands -......................... - -The manual suggests a few global key bindings, in particular `C-c a' for -`org-agenda' and `C-c c' for `org-capture'. These are only -suggestions, but the rest of the manual assumes that these key bindings -are in place in order to list commands by key access. - - Also, the manual lists both the keys and the corresponding commands -for accessing a functionality. Org mode often uses the same key for -different functions, depending on context. The command that is bound -to such keys has a generic name, like `org-metaright'. In the manual -we will, wherever possible, give the function that is internally called -by the generic command. For example, in the chapter on document -structure, `M-' will be listed to call `org-do-demote', while in -the chapter on tables, it will be listed to call -`org-table-move-column-right'. If you prefer, you can compile the -manual without the command names by unsetting the flag `cmdnames' in -`org.texi'. - - -File: org, Node: Document structure, Next: Tables, Prev: Introduction, Up: Top - -2 Document structure -******************** - -Org is based on Outline mode and provides flexible commands to edit the -structure of the document. - -* Menu: - -* Outlines:: Org is based on Outline mode -* Headlines:: How to typeset Org tree headlines -* Visibility cycling:: Show and hide, much simplified -* Motion:: Jumping to other headlines -* Structure editing:: Changing sequence and level of headlines -* Sparse trees:: Matches embedded in context -* Plain lists:: Additional structure within an entry -* Drawers:: Tucking stuff away -* Blocks:: Folding blocks -* Footnotes:: How footnotes are defined in Org's syntax -* Orgstruct mode:: Structure editing outside Org -* Org syntax:: Formal description of Org's syntax - - -File: org, Node: Outlines, Next: Headlines, Up: Document structure - -2.1 Outlines -============ - -Org is implemented on top of Outline mode. Outlines allow a document -to be organized in a hierarchical structure, which (at least for me) is -the best representation of notes and thoughts. An overview of this -structure is achieved by folding (hiding) large parts of the document -to show only the general document structure and the parts currently -being worked on. Org greatly simplifies the use of outlines by -compressing the entire show/hide functionality into a single command, -`org-cycle', which is bound to the key. - - -File: org, Node: Headlines, Next: Visibility cycling, Prev: Outlines, Up: Document structure - -2.2 Headlines -============= - -Headlines define the structure of an outline tree. The headlines in Org -start with one or more stars, on the left margin(1) (2). For example: - - * Top level headline - ** Second level - *** 3rd level - some text - *** 3rd level - more text - - * Another top level headline - -Note that a headline named after `org-footnote-section', which defaults -to `Footnotes', is considered as special. A subtree with this headline -will be silently ignored by exporting functions. - - Some people find the many stars too noisy and would prefer an -outline that has whitespace followed by a single star as headline -starters. *note Clean view::, describes a setup to realize this. - - An empty line after the end of a subtree is considered part of it and -will be hidden when the subtree is folded. However, if you leave at -least two empty lines, one empty line will remain visible after folding -the subtree, in order to structure the collapsed view. See the -variable `org-cycle-separator-lines' to modify this behavior. - - ---------- Footnotes ---------- - - (1) See the variables `org-special-ctrl-a/e', `org-special-ctrl-k', -and `org-ctrl-k-protect-subtree' to configure special behavior of `C-a', -`C-e', and `C-k' in headlines. - - (2) Clocking only works with headings indented less than 30 stars. - - -File: org, Node: Visibility cycling, Next: Motion, Prev: Headlines, Up: Document structure - -2.3 Visibility cycling -====================== - -* Menu: - -* Global and local cycling:: Cycling through various visibility states -* Initial visibility:: Setting the initial visibility state -* Catching invisible edits:: Preventing mistakes when editing invisible parts - - -File: org, Node: Global and local cycling, Next: Initial visibility, Up: Visibility cycling - -2.3.1 Global and local cycling ------------------------------- - -Outlines make it possible to hide parts of the text in the buffer. Org -uses just two commands, bound to and `S-' to change the -visibility in the buffer. - -`' (`org-cycle') - _Subtree cycling_: Rotate current subtree among the states - - ,-> FOLDED -> CHILDREN -> SUBTREE --. - '-----------------------------------' - - The cursor must be on a headline for this to work(1). When the - cursor is at the beginning of the buffer and the first line is not - a headline, then actually runs global cycling (see - below)(2). Also when called with a prefix argument (`C-u '), - global cycling is invoked. - -`S-' (`org-global-cycle') -C-u - _Global cycling_: Rotate the entire buffer among the states - - ,-> OVERVIEW -> CONTENTS -> SHOW ALL --. - '--------------------------------------' - - When `S-' is called with a numeric prefix argument N, the - CONTENTS view up to headlines of level N will be shown. Note that - inside tables, `S-' jumps to the previous field. - -`C-u C-u ' (`org-set-startup-visibility') - Switch back to the startup visibility of the buffer (*note Initial - visibility::). - -`C-u C-u C-u ' (`outline-show-all') - Show all, including drawers. - -`C-c C-r' (`org-reveal') - Reveal context around point, showing the current entry, the - following heading and the hierarchy above. Useful for working - near a location that has been exposed by a sparse tree command - (*note Sparse trees::) or an agenda command (*note Agenda - commands::). With a prefix argument show, on each level, all - sibling headings. With a double prefix argument, also show the - entire subtree of the parent. - -`C-c C-k' (`outline-show-branches') - Expose all the headings of the subtree, CONTENT view for just one - subtree. - -`C-c ' (`outline-show-children') - Expose all direct children of the subtree. With a numeric prefix - argument N, expose all children down to level N. - -`C-c C-x b' (`org-tree-to-indirect-buffer') - Show the current subtree in an indirect buffer(3). With a numeric - prefix argument N, go up to level N and then take that tree. If N - is negative then go up that many levels. With a `C-u' prefix, do - not remove the previously used indirect buffer. - -`C-c C-x v' (`org-copy-visible') - Copy the visible text in the region into the kill ring. - - ---------- Footnotes ---------- - - (1) see, however, the option `org-cycle-emulate-tab'. - - (2) see the option `org-cycle-global-at-bob'. - - (3) The indirect buffer (*note Indirect Buffers: (emacs)Indirect -Buffers.) will contain the entire buffer, but will be narrowed to the -current tree. Editing the indirect buffer will also change the -original buffer, but without affecting visibility in that buffer. - - -File: org, Node: Initial visibility, Next: Catching invisible edits, Prev: Global and local cycling, Up: Visibility cycling - -2.3.2 Initial visibility ------------------------- - -When Emacs first visits an Org file, the global state is set to -OVERVIEW, i.e., only the top level headlines are visible(1). This can -be configured through the variable `org-startup-folded', or on a -per-file basis by adding one of the following lines anywhere in the -buffer: - - #+STARTUP: overview - #+STARTUP: content - #+STARTUP: showall - #+STARTUP: showeverything - -Furthermore, any entries with a `VISIBILITY' property (*note Properties -and columns::) will get their visibility adapted accordingly. Allowed -values for this property are `folded', `children', `content', and `all'. - -`C-u C-u ' (`org-set-startup-visibility') - Switch back to the startup visibility of the buffer, i.e., - whatever is requested by startup options and `VISIBILITY' - properties in individual entries. - - ---------- Footnotes ---------- - - (1) When `org-agenda-inhibit-startup' is non-`nil', Org will not -honor the default visibility state when first opening a file for the -agenda (*note Speeding up your agendas::). - - -File: org, Node: Catching invisible edits, Prev: Initial visibility, Up: Visibility cycling - -2.3.3 Catching invisible edits ------------------------------- - -Sometimes you may inadvertently edit an invisible part of the buffer -and be confused on what has been edited and how to undo the mistake. -Setting `org-catch-invisible-edits' to non-`nil' will help prevent -this. See the docstring of this option on how Org should catch -invisible edits and process them. - - -File: org, Node: Motion, Next: Structure editing, Prev: Visibility cycling, Up: Document structure - -2.4 Motion -========== - -The following commands jump to other headlines in the buffer. - -`C-c C-n' (`org-next-visible-heading') - Next heading. - -`C-c C-p' (`org-previous-visible-heading') - Previous heading. - -`C-c C-f' (`org-forward-same-level') - Next heading same level. - -`C-c C-b' (`org-backward-same-level') - Previous heading same level. - -`C-c C-u' (`outline-up-heading') - Backward to higher level heading. - -`C-c C-j' (`org-goto') - Jump to a different place without changing the current outline - visibility. Shows the document structure in a temporary buffer, - where you can use the following keys to find your destination: - Cycle visibility. - / Next/previous visible headline. - Select this location. - / Do a Sparse-tree search - The following keys work if you turn off `org-goto-auto-isearch' - n / p Next/previous visible headline. - f / b Next/previous headline same level. - u One level up. - 0-9 Digit argument. - q Quit - See also the option `org-goto-interface'. - - -File: org, Node: Structure editing, Next: Sparse trees, Prev: Motion, Up: Document structure - -2.5 Structure editing -===================== - -`M-' (`org-meta-return') - Insert a new heading, item or row. - - If the command is used at the _beginning_ of a line, and if there - is a heading or a plain list item (*note Plain lists::) at point, - the new heading/item is created _before_ the current line. When - used at the beginning of a regular line of text, turn that line - into a heading. - - When this command is used in the middle of a line, the line is - split and the rest of the line becomes the new item or headline. - If you do not want the line to be split, customize - `org-M-RET-may-split-line'. - - Calling the command with a `C-u' prefix unconditionally inserts a - new heading at the end of the current subtree, thus preserving its - contents. With a double `C-u C-u' prefix, the new heading is - created at the end of the parent subtree instead. - -`C-' (`org-insert-heading-respect-content') - Insert a new heading at the end of the current subtree. - -`M-S-' (`org-insert-todo-heading') - Insert new TODO entry with same level as current heading. See - also the variable `org-treat-insert-todo-heading-as-state-change'. - -`C-S-' (`org-insert-todo-heading-respect-content') - Insert new TODO entry with same level as current heading. Like - `C-', the new headline will be inserted after the current - subtree. - -`' (`org-cycle') - In a new entry with no text yet, the first demotes the entry - to become a child of the previous one. The next makes it a - parent, and so on, all the way to top level. Yet another , - and you are back to the initial level. - -`M-' (`org-do-promote') - Promote current heading by one level. - -`M-' (`org-do-demote') - Demote current heading by one level. - -`M-S-' (`org-promote-subtree') - Promote the current subtree by one level. - -`M-S-' (`org-demote-subtree') - Demote the current subtree by one level. - -`M-S-' (`org-move-subtree-up') - Move subtree up (swap with previous subtree of same level). - -`M-S-' (`org-move-subtree-down') - Move subtree down (swap with next subtree of same level). - -`M-h' (`org-mark-element') - Mark the element at point. Hitting repeatedly will mark - subsequent elements of the one just marked. E.g., hitting - on a paragraph will mark it, hitting immediately again will - mark the next one. - -`C-c @' (`org-mark-subtree') - Mark the subtree at point. Hitting repeatedly will mark - subsequent subtrees of the same level than the marked subtree. - -`C-c C-x C-w' (`org-cut-subtree') - Kill subtree, i.e., remove it from buffer but save in kill ring. - With a numeric prefix argument N, kill N sequential subtrees. - -`C-c C-x M-w' (`org-copy-subtree') - Copy subtree to kill ring. With a numeric prefix argument N, copy - the N sequential subtrees. - -`C-c C-x C-y' (`org-paste-subtree') - Yank subtree from kill ring. This does modify the level of the - subtree to make sure the tree fits in nicely at the yank position. - The yank level can also be specified with a numeric prefix - argument, or by yanking after a headline marker like `****'. - -`C-y' (`org-yank') - Depending on the options `org-yank-adjusted-subtrees' and - `org-yank-folded-subtrees', Org's internal `yank' command will - paste subtrees folded and in a clever way, using the same command - as `C-c C-x C-y'. With the default settings, no level adjustment - will take place, but the yanked tree will be folded unless doing - so would swallow text previously visible. Any prefix argument to - this command will force a normal `yank' to be executed, with the - prefix passed along. A good way to force a normal yank is `C-u - C-y'. If you use `yank-pop' after a yank, it will yank previous - kill items plainly, without adjustment and folding. - -`C-c C-x c' (`org-clone-subtree-with-time-shift') - Clone a subtree by making a number of sibling copies of it. You - will be prompted for the number of copies to make, and you can - also specify if any timestamps in the entry should be shifted. - This can be useful, for example, to create a number of tasks - related to a series of lectures to prepare. For more details, see - the docstring of the command `org-clone-subtree-with-time-shift'. - -`C-c C-w' (`org-refile') - Refile entry or region to a different location. *Note Refile and - copy::. - -`C-c ^' (`org-sort') - Sort same-level entries. When there is an active region, all - entries in the region will be sorted. Otherwise the children of - the current headline are sorted. The command prompts for the - sorting method, which can be alphabetically, numerically, by time - (first timestamp with active preferred, creation time, scheduled - time, deadline time), by priority, by TODO keyword (in the - sequence the keywords have been defined in the setup) or by the - value of a property. Reverse sorting is possible as well. You - can also supply your own function to extract the sorting key. - With a `C-u' prefix, sorting will be case-sensitive. - -`C-x n s' (`org-narrow-to-subtree') - Narrow buffer to current subtree. - -`C-x n b' (`org-narrow-to-block') - Narrow buffer to current block. - -`C-x n w' (`widen') - Widen buffer to remove narrowing. - -`C-c *' (`org-toggle-heading') - Turn a normal line or plain list item into a headline (so that it - becomes a subheading at its location). Also turn a headline into - a normal line by removing the stars. If there is an active - region, turn all lines in the region into headlines. If the first - line in the region was an item, turn only the item lines into - headlines. Finally, if the first line is a headline, remove the - stars from all headlines in the region. - - When there is an active region (Transient Mark mode), promotion and -demotion work on all headlines in the region. To select a region of -headlines, it is best to place both point and mark at the beginning of a -line, mark at the beginning of the first headline, and point at the line -just after the last headline to change. Note that when the cursor is -inside a table (*note Tables::), the Meta-Cursor keys have different -functionality. - - -File: org, Node: Sparse trees, Next: Plain lists, Prev: Structure editing, Up: Document structure - -2.6 Sparse trees -================ - -An important feature of Org mode is the ability to construct _sparse -trees_ for selected information in an outline tree, so that the entire -document is folded as much as possible, but the selected information is -made visible along with the headline structure above it(1). Just try -it out and you will see immediately how it works. - - Org mode contains several commands for creating such trees, all these -commands can be accessed through a dispatcher: - -`C-c /' (`org-sparse-tree') - This prompts for an extra key to select a sparse-tree creating - command. - -`C-c / r' or `C-c / /' (`org-occur') - Prompts for a regexp and shows a sparse tree with all matches. If - the match is in a headline, the headline is made visible. If the - match is in the body of an entry, headline and body are made - visible. In order to provide minimal context, also the full - hierarchy of headlines above the match is shown, as well as the - headline following the match. Each match is also highlighted; the - highlights disappear when the buffer is changed by an editing - command(2), or by pressing `C-c C-c'. When called with a `C-u' - prefix argument, previous highlights are kept, so several calls to - this command can be stacked. - -`M-g n' or `M-g M-n' (`next-error') - Jump to the next sparse tree match in this buffer. - -`M-g p' or `M-g M-p' (`previous-error') - Jump to the previous sparse tree match in this buffer. - -For frequently used sparse trees of specific search strings, you can -use the option `org-agenda-custom-commands' to define fast keyboard -access to specific sparse trees. These commands will then be -accessible through the agenda dispatcher (*note Agenda dispatcher::). -For example: - - (setq org-agenda-custom-commands - '(("f" occur-tree "FIXME"))) - -will define the key `C-c a f' as a shortcut for creating a sparse tree -matching the string `FIXME'. - - The other sparse tree commands select headings based on TODO -keywords, tags, or properties and will be discussed later in this -manual. - - To print a sparse tree, you can use the Emacs command -`ps-print-buffer-with-faces' which does not print invisible parts of the -document. Or you can use `C-c C-e C-v' to export only the visible part -of the document and print the resulting file. - - ---------- Footnotes ---------- - - (1) See also the variable `org-show-context-detail' to decide how -much context is shown around each match. - - (2) This depends on the option `org-remove-highlights-with-change' - - -File: org, Node: Plain lists, Next: Drawers, Prev: Sparse trees, Up: Document structure - -2.7 Plain lists -=============== - -Within an entry of the outline tree, hand-formatted lists can provide -additional structure. They also provide a way to create lists of -checkboxes (*note Checkboxes::). Org supports editing such lists, and -every exporter (*note Exporting::) can parse and format them. - - Org knows ordered lists, unordered lists, and description lists. - * _Unordered_ list items start with `-', `+', or `*'(1) as bullets. - - * _Ordered_ list items start with a numeral followed by either a - period or a right parenthesis(2), such as `1.' or `1)'(3). If you - want a list to start with a different value (e.g., 20), start the - text of the item with `[@20]'(4). Those constructs can be used in - any item of the list in order to enforce a particular numbering. - - * _Description_ list items are unordered list items, and contain the - separator ` :: ' to distinguish the description _term_ from the - description. - - Items belonging to the same list must have the same indentation on -the first line. In particular, if an ordered list reaches number -`10.', then the 2-digit numbers must be written left-aligned with the -other numbers in the list. An item ends before the next line that is -less or equally indented than its bullet/number. - - A list ends whenever every item has ended, which means before any -line less or equally indented than items at top level. It also ends -before two blank lines(5). In that case, all items are closed. Here -is an example: - - ** Lord of the Rings - My favorite scenes are (in this order) - 1. The attack of the Rohirrim - 2. Eowyn's fight with the witch king - + this was already my favorite scene in the book - + I really like Miranda Otto. - 3. Peter Jackson being shot by Legolas - - on DVD only - He makes a really funny face when it happens. - But in the end, no individual scenes matter but the film as a whole. - Important actors in this film are: - - Elijah Wood :: He plays Frodo - - Sean Astin :: He plays Sam, Frodo's friend. I still remember - him very well from his role as Mikey Walsh in The Goonies. - - Org supports these lists by tuning filling and wrapping commands to -deal with them correctly, and by exporting them properly (*note -Exporting::). Since indentation is what governs the structure of these -lists, many structural constructs like `#+BEGIN_...' blocks can be -indented to signal that they belong to a particular item. - - If you find that using a different bullet for a sub-list (than that -used for the current list-level) improves readability, customize the -variable `org-list-demote-modify-bullet'. To get a greater difference -of indentation between items and their sub-items, customize -`org-list-indent-offset'. - - The following commands act on items when the cursor is in the first -line of an item (the line with the bullet or number). Some of them -imply the application of automatic rules to keep list structure intact. -If some of these actions get in your way, configure -`org-list-automatic-rules' to disable them individually. - -`' (`org-cycle') - Items can be folded just like headline levels. Normally this - works only if the cursor is on a plain list item. For more - details, see the variable `org-cycle-include-plain-lists'. If - this variable is set to `integrate', plain list items will be - treated like low-level headlines. The level of an item is then - given by the indentation of the bullet/number. Items are always - subordinate to real headlines, however; the hierarchies remain - completely separated. In a new item with no text yet, the first - demotes the item to become a child of the previous one. - Subsequent s move the item to meaningful levels in the list - and eventually get it back to its initial position. - -`M-' (`org-insert-heading') - Insert new item at current level. With a prefix argument, force a - new heading (*note Structure editing::). If this command is used - in the middle of an item, that item is _split_ in two, and the - second part becomes the new item(6). If this command is executed - _before item's body_, the new item is created _before_ the current - one. - -`M-S-' - Insert a new item with a checkbox (*note Checkboxes::). - -`S-up' -`S-down' - Jump to the previous/next item in the current list(7), but only if - `org-support-shift-select' is off. If not, you can still use - paragraph jumping commands like `C-' and `C-' to quite - similar effect. - -`M-up' -`M-down' - Move the item including subitems up/down(8) (swap with - previous/next item of same indentation). If the list is ordered, - renumbering is automatic. - -`M-left' -`M-right' - Decrease/increase the indentation of an item, leaving children - alone. - -`M-S-' -`M-S-' - Decrease/increase the indentation of the item, including subitems. - Initially, the item tree is selected based on current indentation. - When these commands are executed several times in direct - succession, the initially selected region is used, even if the new - indentation would imply a different hierarchy. To use the new - hierarchy, break the command chain with a cursor motion or so. - - As a special case, using this command on the very first item of a - list will move the whole list. This behavior can be disabled by - configuring `org-list-automatic-rules'. The global indentation of - a list has no influence on the text _after_ the list. - -`C-c C-c' - If there is a checkbox (*note Checkboxes::) in the item line, - toggle the state of the checkbox. In any case, verify bullets and - indentation consistency in the whole list. - -`C-c -' - Cycle the entire list level through the different - itemize/enumerate bullets (`-', `+', `*', `1.', `1)') or a subset - of them, depending on `org-plain-list-ordered-item-terminator', - the type of list, and its indentation. With a numeric prefix - argument N, select the Nth bullet from this list. If there is an - active region when calling this, all selected lines are converted - to list items. With a prefix argument, selected text is changed - into a single item. If the first line already was a list item, any - item marker will be removed from the list. Finally, even without - an active region, a normal line will be converted into a list item. - -`C-c *' - Turn a plain list item into a headline (so that it becomes a - subheading at its location). *Note Structure editing::, for a - detailed explanation. - -`C-c C-*' - Turn the whole plain list into a subtree of the current heading. - Checkboxes (*note Checkboxes::) will become TODO (resp. DONE) - keywords when unchecked (resp. checked). - -`S-left/right' - This command also cycles bullet styles when the cursor in on the - bullet or anywhere in an item line, details depending on - `org-support-shift-select'. - -`C-c ^' - Sort the plain list. You will be prompted for the sorting method: - numerically, alphabetically, by time, by checked status for check - lists, or by a custom function. - - ---------- Footnotes ---------- - - (1) When using `*' as a bullet, lines must be indented or they will -be seen as top-level headlines. Also, when you are hiding leading -stars to get a clean outline view, plain list items starting with a -star may be hard to distinguish from true headlines. In short: even -though `*' is supported, it may be better to not use it for plain list -items. - - (2) You can filter out any of them by configuring -`org-plain-list-ordered-item-terminator'. - - (3) You can also get `a.', `A.', `a)' and `A)' by configuring -`org-list-allow-alphabetical'. To minimize confusion with normal text, -those are limited to one character only. Beyond that limit, bullets -will automatically fallback to numbers. - - (4) If there's a checkbox in the item, the cookie must be put -_before_ the checkbox. If you have activated alphabetical lists, you -can also use counters like `[@b]'. - - (5) See also `org-list-empty-line-terminates-plain-lists'. - - (6) If you do not want the item to be split, customize the variable -`org-M-RET-may-split-line'. - - (7) If you want to cycle around items that way, you may customize -`org-list-use-circular-motion'. - - (8) See `org-list-use-circular-motion' for a cyclic behavior. - - -File: org, Node: Drawers, Next: Blocks, Prev: Plain lists, Up: Document structure - -2.8 Drawers -=========== - -Sometimes you want to keep information associated with an entry, but you -normally don't want to see it. For this, Org mode has _drawers_. They -can contain anything but a headline and another drawer. Drawers look -like this: - - ** This is a headline - Still outside the drawer - :DRAWERNAME: - This is inside the drawer. - :END: - After the drawer. - - You can interactively insert drawers at point by calling -`org-insert-drawer', which is bound to . With an active -region, this command will put the region inside the drawer. With a -prefix argument, this command calls `org-insert-property-drawer' and add -a property drawer right below the current headline. Completion over -drawer keywords is also possible using `M-'(1). - - Visibility cycling (*note Visibility cycling::) on the headline will -hide and show the entry, but keep the drawer collapsed to a single -line. In order to look inside the drawer, you need to move the cursor -to the drawer line and press there. Org mode uses the -`PROPERTIES' drawer for storing properties (*note Properties and -columns::), and you can also arrange for state change notes (*note -Tracking TODO state changes::) and clock times (*note Clocking work -time::) to be stored in a drawer `LOGBOOK'. If you want to store a -quick note in the LOGBOOK drawer, in a similar way to state changes, use - -`C-c C-z' - Add a time-stamped note to the LOGBOOK drawer. - - You can select the name of the drawers which should be exported with -`org-export-with-drawers'. In that case, drawer contents will appear in -export output. Property drawers are not affected by this variable: -configure `org-export-with-properties' instead. - - ---------- Footnotes ---------- - - (1) Many desktops intercept `M-' to switch windows. Use -`C-M-i' or ` ' instead for completion (*note Completion::). - - -File: org, Node: Blocks, Next: Footnotes, Prev: Drawers, Up: Document structure - -2.9 Blocks -========== - -Org mode uses begin...end blocks for various purposes from including -source code examples (*note Literal examples::) to capturing time -logging information (*note Clocking work time::). These blocks can be -folded and unfolded by pressing TAB in the begin line. You can also -get all blocks folded at startup by configuring the option -`org-hide-block-startup' or on a per-file basis by using - - #+STARTUP: hideblocks - #+STARTUP: nohideblocks - - -File: org, Node: Footnotes, Next: Orgstruct mode, Prev: Blocks, Up: Document structure - -2.10 Footnotes -============== - -Org mode supports the creation of footnotes. - - A footnote is started by a footnote marker in square brackets in -column 0, no indentation allowed. It ends at the next footnote -definition, headline, or after two consecutive empty lines. The -footnote reference is simply the marker in square brackets, inside -text. Markers always start with `fn:'. For example: - - The Org homepage[fn:1] now looks a lot better than it used to. - ... - [fn:1] The link is: http://orgmode.org - - Org mode extends the number-based syntax to _named_ footnotes and -optional inline definition. Here are the valid references: - -`[fn:name]' - A named footnote reference, where `name' is a unique label word, - or, for simplicity of automatic creation, a number. - -`[fn::This is the inline definition of this footnote]' - A LaTeX-like anonymous footnote where the definition is given - directly at the reference point. - -`[fn:name:a definition]' - An inline definition of a footnote, which also specifies a name - for the note. Since Org allows multiple references to the same - note, you can then use `[fn:name]' to create additional references. - - Footnote labels can be created automatically, or you can create -names yourself. This is handled by the variable -`org-footnote-auto-label' and its corresponding `#+STARTUP' keywords. -See the docstring of that variable for details. - -The following command handles footnotes: - -`C-c C-x f' - The footnote action command. - - When the cursor is on a footnote reference, jump to the - definition. When it is at a definition, jump to the (first) - reference. - - Otherwise, create a new footnote. Depending on the option - `org-footnote-define-inline'(1), the definition will be placed - right into the text as part of the reference, or separately into - the location determined by the option `org-footnote-section'. - - When this command is called with a prefix argument, a menu of - additional options is offered: - s Sort the footnote definitions by reference sequence. During editing, - Org makes no effort to sort footnote definitions into a particular - sequence. If you want them sorted, use this command, which will - also move entries according to `org-footnote-section'. Automatic - sorting after each insertion/deletion can be configured using the - option `org-footnote-auto-adjust'. - r Renumber the simple `fn:N' footnotes. Automatic renumbering - after each insertion/deletion can be configured using the option - `org-footnote-auto-adjust'. - S Short for first `r', then `s' action. - n Normalize the footnotes by collecting all definitions (including - inline definitions) into a special section, and then numbering them - in sequence. The references will then also be numbers. - d Delete the footnote at point, and all definitions of and references - to it. - Depending on the variable `org-footnote-auto-adjust'(2), - renumbering and sorting footnotes can be automatic after each - insertion or deletion. - -`C-c C-c' - If the cursor is on a footnote reference, jump to the definition. - If it is a the definition, jump back to the reference. When - called at a footnote location with a prefix argument, offer the - same menu as `C-c C-x f'. - -`C-c C-o or mouse-1/2' - Footnote labels are also links to the corresponding - definition/reference, and you can use the usual commands to follow - these links. - -`C-c '' - -`C-c '' - Edit the footnote definition corresponding to the reference at - point in a seperate window. The window can be closed by pressing - `C-c ''. - - - ---------- Footnotes ---------- - - (1) The corresponding in-buffer setting is: `#+STARTUP: fninline' or -`#+STARTUP: nofninline' - - (2) the corresponding in-buffer options are `fnadjust' and -`nofnadjust'. - - -File: org, Node: Orgstruct mode, Next: Org syntax, Prev: Footnotes, Up: Document structure - -2.11 The Orgstruct minor mode -============================= - -If you like the intuitive way the Org mode structure editing and list -formatting works, you might want to use these commands in other modes -like Text mode or Mail mode as well. The minor mode `orgstruct-mode' -makes this possible. Toggle the mode with `M-x orgstruct-mode RET', or -turn it on by default, for example in Message mode, with one of: - - (add-hook 'message-mode-hook 'turn-on-orgstruct) - (add-hook 'message-mode-hook 'turn-on-orgstruct++) - - When this mode is active and the cursor is on a line that looks to -Org like a headline or the first line of a list item, most structure -editing commands will work, even if the same keys normally have -different functionality in the major mode you are using. If the cursor -is not in one of those special lines, Orgstruct mode lurks silently in -the shadows. - - When you use `orgstruct++-mode', Org will also export indentation and -autofill settings into that mode, and detect item context after the -first line of an item. - - You can also use Org structure editing to fold and unfold headlines -in _any_ file, provided you defined `orgstruct-heading-prefix-regexp': -the regular expression must match the local prefix to use before Org's -headlines. For example, if you set this variable to `";; "' in Emacs -Lisp files, you will be able to fold and unfold headlines in Emacs Lisp -commented lines. Some commands like `org-demote' are disabled when the -prefix is set, but folding/unfolding will work correctly. - - -File: org, Node: Org syntax, Prev: Orgstruct mode, Up: Document structure - -2.12 Org syntax -=============== - -A reference document providing a formal description of Org's syntax is -available as a draft on Worg -(http://orgmode.org/worg/dev/org-syntax.html), written and maintained -by Nicolas Goaziou. It defines Org's core internal concepts such as -`headlines', `sections', `affiliated keywords', `(greater) elements' -and `objects'. Each part of an Org file falls into one of the -categories above. - - To explore the abstract structure of an Org buffer, run this in a -buffer: - - M-: (org-element-parse-buffer) RET - - It will output a list containing the buffer's content represented as -an abstract structure. The export engine relies on the information -stored in this list. Most interactive commands (e.g., for structure -editing) also rely on the syntactic meaning of the surrounding context. - - You can check syntax in your documents using `org-lint' command. - - -File: org, Node: Tables, Next: Hyperlinks, Prev: Document structure, Up: Top - -3 Tables -******** - -Org comes with a fast and intuitive table editor. Spreadsheet-like -calculations are supported using the Emacs `calc' package (*note Calc: -(calc)Top.). - -* Menu: - -* Built-in table editor:: Simple tables -* Column width and alignment:: Overrule the automatic settings -* Column groups:: Grouping to trigger vertical lines -* Orgtbl mode:: The table editor as minor mode -* The spreadsheet:: The table editor has spreadsheet capabilities -* Org-Plot:: Plotting from org tables - - -File: org, Node: Built-in table editor, Next: Column width and alignment, Up: Tables - -3.1 The built-in table editor -============================= - -Org makes it easy to format tables in plain ASCII. Any line with `|' as -the first non-whitespace character is considered part of a table. `|' -is also the column separator(1). A table might look like this: - - | Name | Phone | Age | - |-------+-------+-----| - | Peter | 1234 | 17 | - | Anna | 4321 | 25 | - - A table is re-aligned automatically each time you press or - or `C-c C-c' inside the table. also moves to the next -field ( to the next row) and creates new table rows at the end of -the table or before horizontal lines. The indentation of the table is -set by the first line. Any line starting with `|-' is considered as a -horizontal separator line and will be expanded on the next re-align to -span the whole table width. So, to create the above table, you would -only type - - |Name|Phone|Age| - |- - -and then press to align the table and start filling in fields. -Even faster would be to type `|Name|Phone|Age' followed by `C-c '. - - When typing text into a field, Org treats , , and -all character keys in a special way, so that inserting and deleting -avoids shifting other fields. Also, when typing _immediately after the -cursor was moved into a new field with `', `S-' or `'_, -the field is automatically made blank. If this behavior is too -unpredictable for you, configure the options `org-enable-table-editor' -and `org-table-auto-blank-field'. - -Creation and conversion -....................... - -`C-c | (`org-table-create-or-convert-from-region')' - Convert the active region to a table. If every line contains at - least one TAB character, the function assumes that the material is - tab separated. If every line contains a comma, comma-separated - values (CSV) are assumed. If not, lines are split at whitespace - into fields. You can use a prefix argument to force a specific - separator: `C-u' forces CSV, `C-u C-u' forces TAB, `C-u C-u C-u' - will prompt for a regular expression to match the separator, and a - numeric argument N indicates that at least N consecutive spaces, - or alternatively a TAB will be the separator. - If there is no active region, this command creates an empty Org - table. But it is easier just to start typing, like - `|Name|Phone|Age |- '. - -Re-aligning and field motion -............................ - -`C-c C-c (`org-table-align')' - Re-align the table and don't move to another field. - -`C-c SPC (`org-table-blank-field')' - Blank the field at point. - -`TAB (`org-table-next-field')' - Re-align the table, move to the next field. Creates a new row if - necessary. - -`S- (`org-table-previous-field')' - Re-align, move to previous field. - -` (`org-table-next-row')' - Re-align the table and move down to next row. Creates a new row if - necessary. At the beginning or end of a line, still does - NEWLINE, so it can be used to split a table. - -`M-a (`org-table-beginning-of-field')' - Move to beginning of the current table field, or on to the - previous field. - -`M-e (`org-table-end-of-field')' - Move to end of the current table field, or on to the next field. - -Column and row editing -...................... - -`M- (`org-table-move-column-left')' -`M- (`org-table-move-column-right')' - Move the current column left/right. - -`M-S- (`org-table-delete-column')' - Kill the current column. - -`M-S- (`org-table-insert-column')' - Insert a new column to the left of the cursor position. - -`M- (`org-table-move-row-up')' -`M- (`org-table-move-row-down')' - Move the current row up/down. - -`M-S- (`org-table-kill-row')' - Kill the current row or horizontal line. - -`M-S- (`org-table-insert-row')' - Insert a new row above the current row. With a prefix argument, - the line is created below the current one. - -`C-c - (`org-table-insert-hline')' - Insert a horizontal line below current row. With a prefix - argument, the line is created above the current line. - -`C-c (`org-table-hline-and-move')' - Insert a horizontal line below current row, and move the cursor - into the row below that line. - -`C-c ^ (`org-table-sort-lines')' - Sort the table lines in the region. The position of point - indicates the column to be used for sorting, and the range of - lines is the range between the nearest horizontal separator lines, - or the entire table. If point is before the first column, you - will be prompted for the sorting column. If there is an active - region, the mark specifies the first line and the sorting column, - while point should be in the last line to be included into the - sorting. The command prompts for the sorting type - (alphabetically, numerically, or by time). You can sort in normal - or reverse order. You can also supply your own key extraction and - comparison functions. When called with a prefix argument, - alphabetic sorting will be case-sensitive. - -Regions -....... - -`C-c C-x M-w (`org-table-copy-region')' - Copy a rectangular region from a table to a special clipboard. - Point and mark determine edge fields of the rectangle. If there - is no active region, copy just the current field. The process - ignores horizontal separator lines. - -`C-c C-x C-w (`org-table-cut-region')' - Copy a rectangular region from a table to a special clipboard, and - blank all fields in the rectangle. So this is the "cut" operation. - -`C-c C-x C-y (`org-table-paste-rectangle')' - Paste a rectangular region into a table. The upper left corner - ends up in the current field. All involved fields will be - overwritten. If the rectangle does not fit into the present table, - the table is enlarged as needed. The process ignores horizontal - separator lines. - -`M- (`org-table-wrap-region')' - Split the current field at the cursor position and move the rest - to the line below. If there is an active region, and both point - and mark are in the same column, the text in the column is wrapped - to minimum width for the given number of lines. A numeric prefix - argument may be used to change the number of desired lines. If - there is no region, but you specify a prefix argument, the current - field is made blank, and the content is appended to the field - above. - -Calculations -............ - -`C-c + (`org-table-sum')' - Sum the numbers in the current column, or in the rectangle defined - by the active region. The result is shown in the echo area and can - be inserted with `C-y'. - -`S- (`org-table-copy-down')' - When current field is empty, copy from first non-empty field - above. When not empty, copy current field down to next row and - move cursor along with it. Depending on the option - `org-table-copy-increment', integer field values will be - incremented during copy. Integers that are too large will not be - incremented. Also, a `0' prefix argument temporarily disables the - increment. This key is also used by shift-selection and related - modes (*note Conflicts::). - -Miscellaneous -............. - -`C-c ` (`org-table-edit-field')' - Edit the current field in a separate window. This is useful for - fields that are not fully visible (*note Column width and - alignment::). When called with a `C-u' prefix, just make the full - field visible, so that it can be edited in place. When called - with two `C-u' prefixes, make the editor window follow the cursor - through the table and always show the current field. The follow - mode exits automatically when the cursor leaves the table, or when - you repeat this command with `C-u C-u C-c `'. - -`M-x org-table-import RET' - Import a file as a table. The table should be TAB or whitespace - separated. Use, for example, to import a spreadsheet table or data - from a database, because these programs generally can write - TAB-separated text files. This command works by inserting the - file into the buffer and then converting the region to a table. - Any prefix argument is passed on to the converter, which uses it - to determine the separator. - -`C-c | (`org-table-create-or-convert-from-region')' - Tables can also be imported by pasting tabular text into the Org - buffer, selecting the pasted text with `C-x C-x' and then using the - `C-c |' command (see above under Creation and conversion). - -`M-x org-table-export RET' - Export the table, by default as a TAB-separated file. Use for data - exchange with, for example, spreadsheet or database programs. The - format used to export the file can be configured in the option - `org-table-export-default-format'. You may also use properties - `TABLE_EXPORT_FILE' and `TABLE_EXPORT_FORMAT' to specify the file - name and the format for table export in a subtree. Org supports - quite general formats for exported tables. The exporter format is - the same as the format used by Orgtbl radio tables, see *note - Translator functions::, for a detailed description. - - If you don't like the automatic table editor because it gets in your -way on lines which you would like to start with `|', you can turn it -off with - - (setq org-enable-table-editor nil) - -Then the only table command that still works is `C-c C-c' to do a -manual re-align. - - ---------- Footnotes ---------- - - (1) To insert a vertical bar into a table field, use `\vert' or, -inside a word `abc\vert{}def'. - - -File: org, Node: Column width and alignment, Next: Column groups, Prev: Built-in table editor, Up: Tables - -3.2 Column width and alignment -============================== - -The width of columns is automatically determined by the table editor. -And also the alignment of a column is determined automatically from the -fraction of number-like versus non-number fields in the column. - - Sometimes a single field or a few fields need to carry more text, -leading to inconveniently wide columns. Or maybe you want to make a -table with several columns having a fixed width, regardless of content. -To set the width of a column, one field anywhere in the column may -contain just the string `' where `N' is an integer specifying the -width of the column in characters. The next re-align will then set the -width of this column to this value. - - |---+------------------------------| |---+--------| - | | | | | <6> | - | 1 | one | | 1 | one | - | 2 | two | ----\ | 2 | two | - | 3 | This is a long chunk of text | ----/ | 3 | This=> | - | 4 | four | | 4 | four | - |---+------------------------------| |---+--------| - -Fields that are wider become clipped and end in the string `=>'. Note -that the full text is still in the buffer but is hidden. To see the -full text, hold the mouse over the field--a tool-tip window will show -the full content. To edit such a field, use the command `C-c `' (that -is `C-c' followed by the grave accent). This will open a new window -with the full field. Edit it and finish with `C-c C-c'. - - When visiting a file containing a table with narrowed columns, the -necessary character hiding has not yet happened, and the table needs to -be aligned before it looks nice. Setting the option -`org-startup-align-all-tables' will realign all tables in a file upon -visiting, but also slow down startup. You can also set this option on -a per-file basis with: - - #+STARTUP: align - #+STARTUP: noalign - - If you would like to overrule the automatic alignment of number-rich -columns to the right and of string-rich columns to the left, you can -use `', `'(1) or `' in a similar fashion. You may also -combine alignment and field width like this: `'. - - Lines which only contain these formatting cookies will be removed -automatically when exporting the document. - - ---------- Footnotes ---------- - - (1) Centering does not work inside Emacs, but it does have an effect -when exporting to HTML. - - -File: org, Node: Column groups, Next: Orgtbl mode, Prev: Column width and alignment, Up: Tables - -3.3 Column groups -================= - -When Org exports tables, it does so by default without vertical lines -because that is visually more satisfying in general. Occasionally -however, vertical lines can be useful to structure a table into groups -of columns, much like horizontal lines can do for groups of rows. In -order to specify column groups, you can use a special row where the -first field contains only `/'. The further fields can either contain -`<' to indicate that this column should start a group, `>' to indicate -the end of a group, or `<>' (no space between `<' and `>') to make a -column a group of its own. Boundaries between column groups will upon -export be marked with vertical lines. Here is an example: - - | N | N^2 | N^3 | N^4 | ~sqrt(n)~ | ~sqrt[4](N)~ | - |---+-----+-----+-----+-----------+--------------| - | / | < | | > | < | > | - | 1 | 1 | 1 | 1 | 1 | 1 | - | 2 | 4 | 8 | 16 | 1.4142 | 1.1892 | - | 3 | 9 | 27 | 81 | 1.7321 | 1.3161 | - |---+-----+-----+-----+-----------+--------------| - #+TBLFM: $2=$1^2::$3=$1^3::$4=$1^4::$5=sqrt($1)::$6=sqrt(sqrt(($1))) - - It is also sufficient to just insert the column group starters after -every vertical line you would like to have: - - | N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) | - |----+-----+-----+-----+---------+------------| - | / | < | | | < | | - - -File: org, Node: Orgtbl mode, Next: The spreadsheet, Prev: Column groups, Up: Tables - -3.4 The Orgtbl minor mode -========================= - -If you like the intuitive way the Org table editor works, you might -also want to use it in other modes like Text mode or Mail mode. The -minor mode Orgtbl mode makes this possible. You can always toggle the -mode with `M-x orgtbl-mode RET'. To turn it on by default, for example -in Message mode, use - - (add-hook 'message-mode-hook 'turn-on-orgtbl) - - Furthermore, with some special setup, it is possible to maintain -tables in arbitrary syntax with Orgtbl mode. For example, it is -possible to construct LaTeX tables with the underlying ease and power of -Orgtbl mode, including spreadsheet capabilities. For details, see -*note Tables in arbitrary syntax::. - - -File: org, Node: The spreadsheet, Next: Org-Plot, Prev: Orgtbl mode, Up: Tables - -3.5 The spreadsheet -=================== - -The table editor makes use of the Emacs `calc' package to implement -spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to -derive fields from other fields. While fully featured, Org's -implementation is not identical to other spreadsheets. For example, -Org knows the concept of a _column formula_ that will be applied to all -non-header fields in a column without having to copy the formula to -each relevant field. There is also a formula debugger, and a formula -editor with features for highlighting fields in the table corresponding -to the references at the point in the formula, moving these references -by arrow keys - -* Menu: - -* References:: How to refer to another field or range -* Formula syntax for Calc:: Using Calc to compute stuff -* Formula syntax for Lisp:: Writing formulas in Emacs Lisp -* Durations and time values:: How to compute durations and time values -* Field and range formulas:: Formula for specific (ranges of) fields -* Column formulas:: Formulas valid for an entire column -* Lookup functions:: Lookup functions for searching tables -* Editing and debugging formulas:: Fixing formulas -* Updating the table:: Recomputing all dependent fields -* Advanced features:: Field and column names, parameters and automatic recalc - - -File: org, Node: References, Next: Formula syntax for Calc, Up: The spreadsheet - -3.5.1 References ----------------- - -To compute fields in the table from other fields, formulas must -reference other fields or ranges. In Org, fields can be referenced by -name, by absolute coordinates, and by relative coordinates. To find -out what the coordinates of a field are, press `C-c ?' in that field, -or press `C-c }' to toggle the display of a grid. - -Field references -................ - -Formulas can reference the value of another field in two ways. Like in -any other spreadsheet, you may reference fields with a letter/number -combination like `B3', meaning the 2nd field in the 3rd row. However, -Org prefers(1) to use another, more general representation that looks -like this: - @ROW$COLUMN - - Column specifications can be absolute like `$1', `$2',...`$N', or -relative to the current column (i.e., the column of the field which is -being computed) like `$+1' or `$-2'. `$<' and `$>' are immutable -references to the first and last column, respectively, and you can use -`$>>>' to indicate the third column from the right. - - The row specification only counts data lines and ignores horizontal -separator lines (hlines). Like with columns, you can use absolute row -numbers `@1', `@2',...`@N', and row numbers relative to the current row -like `@+3' or `@-1'. `@<' and `@>' are immutable references the first -and last(2) row in the table, respectively. You may also specify the -row relative to one of the hlines: `@I' refers to the first hline, -`@II' to the second, etc. `@-I' refers to the first such line above -the current line, `@+I' to the first such line below the current line. -You can also write `@III+2' which is the second data line after the -third hline in the table. - - `@0' and `$0' refer to the current row and column, respectively, -i.e., to the row/column for the field being computed. Also, if you omit -either the column or the row part of the reference, the current -row/column is implied. - - Org's references with _unsigned_ numbers are fixed references in the -sense that if you use the same reference in the formula for two -different fields, the same field will be referenced each time. Org's -references with _signed_ numbers are floating references because the -same reference operator can reference different fields depending on the -field being calculated by the formula. - - Here are a few examples: - - @2$3 2nd row, 3rd column (same as `C2') - $5 column 5 in the current row (same as `E&') - @2 current column, row 2 - @-1$-3 the field one row up, three columns to the left - @-I$2 field just under hline above current row, column 2 - @>$5 field in the last row, in column 5 - -Range references -................ - -You may reference a rectangular range of fields by specifying two field -references connected by two dots `..'. If both fields are in the -current row, you may simply use `$2..$7', but if at least one field is -in a different row, you need to use the general `@row$column' format at -least for the first field (i.e the reference must start with `@' in -order to be interpreted correctly). Examples: - - $1..$3 first three fields in the current row - $P..$Q range, using column names (see under Advanced) - $<<<..$>> start in third column, continue to the last but one - @2$1..@4$3 6 fields between these two fields (same as `A2..C4') - @-1$-2..@-1 3 fields in the row above, starting from 2 columns on the left - @I..II between first and second hline, short for `@I..@II' - -Range references return a vector of values that can be fed into Calc -vector functions. Empty fields in ranges are normally suppressed, so -that the vector contains only the non-empty fields. For other options -with the mode switches `E', `N' and examples *note Formula syntax for -Calc::. - -Field coordinates in formulas -............................. - -One of the very first actions during evaluation of Calc formulas and -Lisp formulas is to substitute `@#' and `$#' in the formula with the -row or column number of the field where the current result will go to. -The traditional Lisp formula equivalents are `org-table-current-dline' -and `org-table-current-column'. Examples: - -`if(@# % 2, $#, string(""))' - Insert column number on odd rows, set field to empty on even rows. - -`$2 = '(identity remote(FOO, @@#$1))' - Copy text or values of each row of column 1 of the table named - `FOO' into column 2 of the current table. - -`@3 = 2 * remote(FOO, @1$$#)' - Insert the doubled value of each column of row 1 of the table named - `FOO' into row 3 of the current table. - -For the second/third example, the table named `FOO' must have at least -as many rows/columns as the current table. Note that this is -inefficient(3) for large number of rows/columns. - -Named references -................ - -`$name' is interpreted as the name of a column, parameter or constant. -Constants are defined globally through the option -`org-table-formula-constants', and locally (for the file) through a -line like - - #+CONSTANTS: c=299792458. pi=3.14 eps=2.4e-6 - -Also properties (*note Properties and columns::) can be used as -constants in table formulas: for a property `:Xyz:' use the name -`$PROP_Xyz', and the property will be searched in the current outline -entry and in the hierarchy above it. If you have the `constants.el' -package, it will also be used to resolve constants, including natural -constants like `$h' for Planck's constant, and units like `$km' for -kilometers(4). Column names and parameters can be specified in special -table lines. These are described below, see *note Advanced features::. -All names must start with a letter, and further consist of letters and -numbers. - -Remote references -................. - -You may also reference constants, fields and ranges from a different -table, either in the current file or even in a different file. The -syntax is - - remote(NAME-OR-ID,REF) - -where NAME can be the name of a table in the current file as set by a -`#+NAME: Name' line before the table. It can also be the ID of an -entry, even in a different file, and the reference then refers to the -first table in that entry. REF is an absolute field or range reference -as described above for example `@3$3' or `$somename', valid in the -referenced table. - - Indirection of NAME-OR-ID: When NAME-OR-ID has the format -`@ROW$COLUMN' it will be substituted with the name or ID found in this -field of the current table. For example `remote($1, @>$2)' => -`remote(year_2013, @>$1)'. The format `B3' is not supported because it -can not be distinguished from a plain table name or ID. - - ---------- Footnotes ---------- - - (1) Org will understand references typed by the user as `B4', but it -will not use this syntax when offering a formula for editing. You can -customize this behavior using the option -`org-table-use-standard-references'. - - (2) For backward compatibility you can also use special names like -`$LR5' and `$LR12' to refer in a stable way to the 5th and 12th field -in the last row of the table. However, this syntax is deprecated, it -should not be used for new documents. Use `@>$' instead. - - (3) The computation time scales as O(N^2) because the table named -`FOO' is parsed for each field to be read. - - (4) `constants.el' can supply the values of constants in two -different unit systems, `SI' and `cgs'. Which one is used depends on -the value of the variable `constants-unit-system'. You can use the -`#+STARTUP' options `constSI' and `constcgs' to set this value for the -current buffer. - - -File: org, Node: Formula syntax for Calc, Next: Formula syntax for Lisp, Prev: References, Up: The spreadsheet - -3.5.2 Formula syntax for Calc ------------------------------ - -A formula can be any algebraic expression understood by the Emacs `Calc' -package. Note that `calc' has the non-standard convention that `/' has -lower precedence than `*', so that `a/b*c' is interpreted as `a/(b*c)'. -Before evaluation by `calc-eval' (*note calc-eval: (calc)Calling Calc -from Your Programs.), variable substitution takes place according to the -rules described above. The range vectors can be directly fed into the -Calc vector functions like `vmean' and `vsum'. - - A formula can contain an optional mode string after a semicolon. -This string consists of flags to influence Calc and other modes during -execution. By default, Org uses the standard Calc modes (precision 12, -angular units degrees, fraction and symbolic modes off). The display -format, however, has been changed to `(float 8)' to keep tables -compact. The default settings can be configured using the option -`org-calc-default-modes'. - -List of modes: - -`p20' - Set the internal Calc calculation precision to 20 digits. - -`n3', `s3', `e2', `f4' - Normal, scientific, engineering or fixed format of the result of - Calc passed back to Org. Calc formatting is unlimited in - precision as long as the Calc calculation precision is greater. - -`D', `R' - Degree and radian angle modes of Calc. - -`F', `S' - Fraction and symbolic modes of Calc. - -`T', `t' - Duration computations in Calc or Lisp, *note Durations and time - values::. - -`E' - If and how to consider empty fields. Without `E' empty fields in - range references are suppressed so that the Calc vector or Lisp - list contains only the non-empty fields. With `E' the empty - fields are kept. For empty fields in ranges or empty field - references the value `nan' (not a number) is used in Calc formulas - and the empty string is used for Lisp formulas. Add `N' to use 0 - instead for both formula types. For the value of a field the mode - `N' has higher precedence than `E'. - -`N' - Interpret all fields as numbers, use 0 for non-numbers. See the - next section to see how this is essential for computations with - Lisp formulas. In Calc formulas it is used only occasionally - because there number strings are already interpreted as numbers - without `N'. - -`L' - Literal, for Lisp formulas only. See the next section. - -Unless you use large integer numbers or high-precision-calculation and --display for floating point numbers you may alternatively provide a -`printf' format specifier to reformat the Calc result after it has been -passed back to Org instead of letting Calc already do the -formatting(1). A few examples: - - $1+$2 Sum of first and second field - $1+$2;%.2f Same, format result to two decimals - exp($2)+exp($1) Math functions can be used - $0;%.1f Reformat current cell to 1 decimal - ($3-32)*5/9 Degrees F -> C conversion - $c/$1/$cm Hz -> cm conversion, using `constants.el' - tan($1);Dp3s1 Compute in degrees, precision 3, display SCI 1 - sin($1);Dp3%.1e Same, but use printf specifier for display - taylor($3,x=7,2) Taylor series of $3, at x=7, second degree - - Calc also contains a complete set of logical operations, (*note -Logical Operations: (calc)Logical Operations.). For example - -`if($1 < 20, teen, string(""))' - "teen" if age $1 is less than 20, else the Org table result field - is set to empty with the empty string. - -`if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E f-1' - Sum of the first two columns. When at least one of the input - fields is empty the Org table result field is set to empty. `E' - is required to not convert empty fields to 0. `f-1' is an - optional Calc format string similar to `%.1f' but leaves empty - results empty. - -`if(typeof(vmean($1..$7)) == 12, string(""), vmean($1..$7); E' - Mean value of a range unless there is any empty field. Every - field in the range that is empty is replaced by `nan' which lets - `vmean' result in `nan'. Then `typeof == 12' detects the `nan' - from `vmean' and the Org table result field is set to empty. Use - this when the sample set is expected to never have missing values. - -`if("$1..$7" == "[]", string(""), vmean($1..$7))' - Mean value of a range with empty fields skipped. Every field in - the range that is empty is skipped. When all fields in the range - are empty the mean value is not defined and the Org table result - field is set to empty. Use this when the sample set can have a - variable size. - -`vmean($1..$7); EN' - To complete the example before: Mean value of a range with empty - fields counting as samples with value 0. Use this only when - incomplete sample sets should be padded with 0 to the full size. - - You can add your own Calc functions defined in Emacs Lisp with -`defmath' and use them in formula syntax for Calc. - - ---------- Footnotes ---------- - - (1) The `printf' reformatting is limited in precision because the -value passed to it is converted into an `integer' or `double'. The -`integer' is limited in size by truncating the signed value to 32 bits. -The `double' is limited in precision to 64 bits overall which leaves -approximately 16 significant decimal digits. - - -File: org, Node: Formula syntax for Lisp, Next: Durations and time values, Prev: Formula syntax for Calc, Up: The spreadsheet - -3.5.3 Emacs Lisp forms as formulas ----------------------------------- - -It is also possible to write a formula in Emacs Lisp. This can be -useful for string manipulation and control structures, if Calc's -functionality is not enough. - - If a formula starts with an apostrophe followed by an opening -parenthesis, then it is evaluated as a Lisp form. The evaluation -should return either a string or a number. Just as with `calc' -formulas, you can specify modes and a printf format after a semicolon. - - With Emacs Lisp forms, you need to be conscious about the way field -references are interpolated into the form. By default, a reference -will be interpolated as a Lisp string (in double-quotes) containing the -field. If you provide the `N' mode switch, all referenced elements -will be numbers (non-number fields will be zero) and interpolated as -Lisp numbers, without quotes. If you provide the `L' flag, all fields -will be interpolated literally, without quotes. I.e., if you want a -reference to be interpreted as a string by the Lisp form, enclose the -reference operator itself in double-quotes, like `"$3"'. Ranges are -inserted as space-separated fields, so you can embed them in list or -vector syntax. - - Here are a few examples--note how the `N' mode is used when we do -computations in Lisp: - -`'(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2))' - Swap the first two characters of the content of column 1. - -`'(+ $1 $2);N' - Add columns 1 and 2, equivalent to Calc's `$1+$2'. - -`'(apply '+ '($1..$4));N' - Compute the sum of columns 1 to 4, like Calc's `vsum($1..$4)'. - - -File: org, Node: Durations and time values, Next: Field and range formulas, Prev: Formula syntax for Lisp, Up: The spreadsheet - -3.5.4 Durations and time values -------------------------------- - -If you want to compute time values use the `T' flag, either in Calc -formulas or Elisp formulas: - - | Task 1 | Task 2 | Total | - |---------+----------+----------| - | 2:12 | 1:47 | 03:59:00 | - | 3:02:20 | -2:07:00 | 0.92 | - #+TBLFM: @2$3=$1+$2;T::@3$3=$1+$2;t - - Input duration values must be of the form `HH:MM[:SS]', where seconds -are optional. With the `T' flag, computed durations will be displayed -as `HH:MM:SS' (see the first formula above). With the `t' flag, -computed durations will be displayed according to the value of the -option `org-table-duration-custom-format', which defaults to `'hours' -and will display the result as a fraction of hours (see the second -formula in the example above). - - Negative duration values can be manipulated as well, and integers -will be considered as seconds in addition and subtraction. - - -File: org, Node: Field and range formulas, Next: Column formulas, Prev: Durations and time values, Up: The spreadsheet - -3.5.5 Field and range formulas ------------------------------- - -To assign a formula to a particular field, type it directly into the -field, preceded by `:=', for example `:=vsum(@II..III)'. When you press - or or `C-c C-c' with the cursor still in the field, the -formula will be stored as the formula for this field, evaluated, and the -current field will be replaced with the result. - - Formulas are stored in a special line starting with `#+TBLFM:' -directly below the table. If you type the equation in the 4th field of -the 3rd data line in the table, the formula will look like -`@3$4=$1+$2'. When inserting/deleting/swapping columns and rows with -the appropriate commands, absolute references (but not relative ones) -in stored formulas are modified in order to still reference the same -field. To avoid this, in particular in range references, anchor ranges -at the table borders (using `@<', `@>', `$<', `$>'), or at hlines using -the `@I' notation. Automatic adaptation of field references does of -course not happen if you edit the table structure with normal editing -commands--then you must fix the equations yourself. - - Instead of typing an equation into the field, you may also use the -following command - -`C-u C-c = (`org-table-eval-formula')' - Install a new formula for the current field. The command prompts - for a formula with default taken from the `#+TBLFM:' line, applies - it to the current field, and stores it. - - The left-hand side of a formula can also be a special expression in -order to assign the formula to a number of different fields. There is -no keyboard shortcut to enter such range formulas. To add them, use -the formula editor (*note Editing and debugging formulas::) or edit the -`#+TBLFM:' line directly. - -`$2=' - Column formula, valid for the entire column. This is so common - that Org treats these formulas in a special way, see *note Column - formulas::. - -`@3=' - Row formula, applies to all fields in the specified row. `@>=' - means the last row. - -`@1$2..@4$3=' - Range formula, applies to all fields in the given rectangular - range. This can also be used to assign a formula to some but not - all fields in a row. - -`$name=' - Named field, see *note Advanced features::. - - -File: org, Node: Column formulas, Next: Lookup functions, Prev: Field and range formulas, Up: The spreadsheet - -3.5.6 Column formulas ---------------------- - -When you assign a formula to a simple column reference like `$3=', the -same formula will be used in all fields of that column, with the -following very convenient exceptions: (i) If the table contains -horizontal separator hlines with rows above and below, everything -before the first such hline is considered part of the table _header_ -and will not be modified by column formulas. Therefore a header is -mandatory when you use column formulas and want to add hlines to group -rows, like for example to separate a total row at the bottom from the -summand rows above. (ii) Fields that already get a value from a -field/range formula will be left alone by column formulas. These -conditions make column formulas very easy to use. - - To assign a formula to a column, type it directly into any field in -the column, preceded by an equal sign, like `=$1+$2'. When you press - or or `C-c C-c' with the cursor still in the field, the -formula will be stored as the formula for the current column, evaluated -and the current field replaced with the result. If the field contains -only `=', the previously stored formula for this column is used. For -each column, Org will only remember the most recently used formula. In -the `#+TBLFM:' line, column formulas will look like `$4=$1+$2'. The -left-hand side of a column formula cannot be the name of column, it -must be the numeric column reference or `$>'. - - Instead of typing an equation into the field, you may also use the -following command: - -`C-c = (`org-table-eval-formula')' - Install a new formula for the current column and replace current - field with the result of the formula. The command prompts for a - formula, with default taken from the `#+TBLFM' line, applies it to - the current field and stores it. With a numeric prefix - argument(e.g., `C-5 C-c =') the command will apply it to that many - consecutive fields in the current column. - - -File: org, Node: Lookup functions, Next: Editing and debugging formulas, Prev: Column formulas, Up: The spreadsheet - -3.5.7 Lookup functions ----------------------- - -Org has three predefined Emacs Lisp functions for lookups in tables. -`(org-lookup-first VAL S-LIST R-LIST &optional PREDICATE)' - Searches for the first element `S' in list `S-LIST' for which - (PREDICATE VAL S) - is `t'; returns the value from the corresponding position in list - `R-LIST'. The default `PREDICATE' is `equal'. Note that the - parameters `VAL' and `S' are passed to `PREDICATE' in the same - order as the corresponding parameters are in the call to - `org-lookup-first', where `VAL' precedes `S-LIST'. If `R-LIST' is - `nil', the matching element `S' of `S-LIST' is returned. - -`(org-lookup-last VAL S-LIST R-LIST &optional PREDICATE)' - Similar to `org-lookup-first' above, but searches for the last - element for which `PREDICATE' is `t'. - -`(org-lookup-all VAL S-LIST R-LIST &optional PREDICATE)' - Similar to `org-lookup-first', but searches for all elements for - which `PREDICATE' is `t', and returns all corresponding values. - This function can not be used by itself in a formula, because it - returns a list of values. However, powerful lookups can be built - when this function is combined with other Emacs Lisp functions. - - If the ranges used in these functions contain empty fields, the `E' -mode for the formula should usually be specified: otherwise empty -fields will not be included in `S-LIST' and/or `R-LIST' which can, for -example, result in an incorrect mapping from an element of `S-LIST' to -the corresponding element of `R-LIST'. - - These three functions can be used to implement associative arrays, -count matching cells, rank results, group data etc. For practical -examples see this tutorial on Worg -(http://orgmode.org/worg/org-tutorials/org-lookups.html). - - -File: org, Node: Editing and debugging formulas, Next: Updating the table, Prev: Lookup functions, Up: The spreadsheet - -3.5.8 Editing and debugging formulas ------------------------------------- - -You can edit individual formulas in the minibuffer or directly in the -field. Org can also prepare a special buffer with all active formulas -of a table. When offering a formula for editing, Org converts -references to the standard format (like `B3' or `D&') if possible. If -you prefer to only work with the internal format (like `@3$2' or `$4'), -configure the option `org-table-use-standard-references'. - -`C-c = or C-u C-c = (`org-table-eval-formula')' - Edit the formula associated with the current column/field in the - minibuffer. See *note Column formulas::, and *note Field and - range formulas::. - -`C-u C-u C-c = (`org-table-eval-formula')' - Re-insert the active formula (either a field formula, or a column - formula) into the current field, so that you can edit it directly - in the field. The advantage over editing in the minibuffer is - that you can use the command `C-c ?'. - -`C-c ? (`org-table-field-info')' - While editing a formula in a table field, highlight the field(s) - referenced by the reference at the cursor position in the formula. - -`C-c }' - Toggle the display of row and column numbers for a table, using - overlays (`org-table-toggle-coordinate-overlays'). These are - updated each time the table is aligned; you can force it with `C-c - C-c'. - -`C-c {' - Toggle the formula debugger on and off - (`org-table-toggle-formula-debugger'). See below. - -`C-c ' (`org-table-edit-formulas')' - Edit all formulas for the current table in a special buffer, where - the formulas will be displayed one per line. If the current field - has an active formula, the cursor in the formula editor will mark - it. While inside the special buffer, Org will automatically - highlight any field or range reference at the cursor position. - You may edit, remove and add formulas, and use the following - commands: - - `C-c C-c or C-x C-s (`org-table-fedit-finish')' - Exit the formula editor and store the modified formulas. - With `C-u' prefix, also apply the new formulas to the entire - table. - - `C-c C-q (`org-table-fedit-abort')' - Exit the formula editor without installing changes. - - `C-c C-r (`org-table-fedit-toggle-ref-type')' - Toggle all references in the formula editor between standard - (like `B3') and internal (like `@3$2'). - - ` (`org-table-fedit-lisp-indent')' - Pretty-print or indent Lisp formula at point. When in a line - containing a Lisp formula, format the formula according to - Emacs Lisp rules. Another collapses the formula back - again. In the open formula, re-indents just like in - Emacs Lisp mode. - - `M- (`lisp-complete-symbol')' - Complete Lisp symbols, just like in Emacs Lisp mode.(1) - - `S-///' - Shift the reference at point. For example, if the reference - is `B3' and you press `S-', it will become `C3'. This - also works for relative references and for hline references. - - `M-S- (`org-table-fedit-line-up')' - `M-S- (`org-table-fedit-line-down')' - Move the test line for column formulas in the Org buffer up - and down. - - `M- (`org-table-fedit-scroll-down')' - `M- (`org-table-fedit-scroll-up')' - Scroll the window displaying the table. - - `C-c }' - Turn the coordinate grid in the table on and off. - - Making a table field blank does not remove the formula associated -with the field, because that is stored in a different line (the -`#+TBLFM' line)--during the next recalculation the field will be filled -again. To remove a formula from a field, you have to give an empty -reply when prompted for the formula, or to edit the `#+TBLFM' line. - - You may edit the `#+TBLFM' directly and re-apply the changed -equations with `C-c C-c' in that line or with the normal recalculation -commands in the table. - -Using multiple #+TBLFM lines -............................ - -You may apply the formula temporarily. This is useful when you switch -the formula. Place multiple `#+TBLFM' lines right after the table, and -then press `C-c C-c' on the formula to apply. Here is an example: - - | x | y | - |---+---| - | 1 | | - | 2 | | - #+TBLFM: $2=$1*1 - #+TBLFM: $2=$1*2 - -Pressing `C-c C-c' in the line of `#+TBLFM: $2=$1*2' yields: - - | x | y | - |---+---| - | 1 | 2 | - | 2 | 4 | - #+TBLFM: $2=$1*1 - #+TBLFM: $2=$1*2 - -Note: If you recalculate this table (with `C-u C-c *', for example), you -will get the following result of applying only the first `#+TBLFM' line. - - | x | y | - |---+---| - | 1 | 1 | - | 2 | 2 | - #+TBLFM: $2=$1*1 - #+TBLFM: $2=$1*2 - -Debugging formulas -.................. - -When the evaluation of a formula leads to an error, the field content -becomes the string `#ERROR'. If you would like see what is going on -during variable substitution and calculation in order to find a bug, -turn on formula debugging in the `Tbl' menu and repeat the calculation, -for example by pressing `C-u C-u C-c = ' in a field. Detailed -information will be displayed. - - ---------- Footnotes ---------- - - (1) Many desktops intercept `M-' to switch windows. Use -`C-M-i' or ` ' instead for completion (*note Completion::). - - -File: org, Node: Updating the table, Next: Advanced features, Prev: Editing and debugging formulas, Up: The spreadsheet - -3.5.9 Updating the table ------------------------- - -Recalculation of a table is normally not automatic, but needs to be -triggered by a command. See *note Advanced features::, for a way to -make recalculation at least semi-automatic. - - In order to recalculate a line of a table or the entire table, use -the following commands: - -`C-c * (`org-table-recalculate')' - Recalculate the current row by first applying the stored column - formulas from left to right, and all field/range formulas in the - current row. - -`C-u C-c *' -`C-u C-c C-c' - Recompute the entire table, line by line. Any lines before the - first hline are left alone, assuming that these are part of the - table header. - -`C-u C-u C-c * or C-u C-u C-c C-c (`org-table-iterate')' - Iterate the table by recomputing it until no further changes occur. - This may be necessary if some computed fields use the value of - other fields that are computed later in the calculation sequence. - -`M-x org-table-recalculate-buffer-tables RET' - Recompute all tables in the current buffer. - -`M-x org-table-iterate-buffer-tables RET' - Iterate all tables in the current buffer, in order to converge - table-to-table dependencies. - - -File: org, Node: Advanced features, Prev: Updating the table, Up: The spreadsheet - -3.5.10 Advanced features ------------------------- - -If you want the recalculation of fields to happen automatically, or if -you want to be able to assign names(1) to fields and columns, you need -to reserve the first column of the table for special marking characters. - -`C-# (`org-table-rotate-recalc-marks')' - Rotate the calculation mark in first column through the states ` ', - `#', `*', `!', `$'. When there is an active region, change all - marks in the region. - - Here is an example of a table that collects exam results of students -and makes use of these features: - - |---+---------+--------+--------+--------+-------+------| - | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note | - |---+---------+--------+--------+--------+-------+------| - | ! | | P1 | P2 | P3 | Tot | | - | # | Maximum | 10 | 15 | 25 | 50 | 10.0 | - | ^ | | m1 | m2 | m3 | mt | | - |---+---------+--------+--------+--------+-------+------| - | # | Peter | 10 | 8 | 23 | 41 | 8.2 | - | # | Sam | 2 | 4 | 3 | 9 | 1.8 | - |---+---------+--------+--------+--------+-------+------| - | | Average | | | | 25.0 | | - | ^ | | | | | at | | - | $ | max=50 | | | | | | - |---+---------+--------+--------+--------+-------+------| - #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f - -Important: please note that for these special tables, recalculating the -table with `C-u C-c *' will only affect rows that are marked `#' or -`*', and fields that have a formula assigned to the field itself. The -column formulas are not applied in rows with empty first field. - - The marking characters have the following meaning: - -`!' - The fields in this line define names for the columns, so that you - may refer to a column as `$Tot' instead of `$6'. - -`^' - This row defines names for the fields _above_ the row. With such - a definition, any formula in the table may use `$m1' to refer to - the value `10'. Also, if you assign a formula to a names field, it - will be stored as `$name=...'. - -`_' - Similar to `^', but defines names for the fields in the row - _below_. - -`$' - Fields in this row can define _parameters_ for formulas. For - example, if a field in a `$' row contains `max=50', then formulas - in this table can refer to the value 50 using `$max'. Parameters - work exactly like constants, only that they can be defined on a - per-table basis. - -`#' - Fields in this row are automatically recalculated when pressing - or or `S-' in this row. Also, this row is - selected for a global recalculation with `C-u C-c *'. Unmarked - lines will be left alone by this command. - -`*' - Selects this line for global recalculation with `C-u C-c *', but - not for automatic recalculation. Use this when automatic - recalculation slows down editing too much. - -` ' - Unmarked lines are exempt from recalculation with `C-u C-c *'. - All lines that should be recalculated should be marked with `#' or - `*'. - -`/' - Do not export this line. Useful for lines that contain the - narrowing `' markers or column group markers. - - Finally, just to whet your appetite for what can be done with the -fantastic `calc.el' package, here is a table that computes the Taylor -series of degree `n' at location `x' for a couple of functions. - - |---+-------------+---+-----+--------------------------------------| - | | Func | n | x | Result | - |---+-------------+---+-----+--------------------------------------| - | # | exp(x) | 1 | x | 1 + x | - | # | exp(x) | 2 | x | 1 + x + x^2 / 2 | - | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 | - | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 | - | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 | - | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 | - |---+-------------+---+-----+--------------------------------------| - #+TBLFM: $5=taylor($2,$4,$3);n3 - - ---------- Footnotes ---------- - - (1) Such names must start by an alphabetic character and use only -alphanumeric/underscore characters. - - -File: org, Node: Org-Plot, Prev: The spreadsheet, Up: Tables - -3.6 Org-Plot -============ - -Org-Plot can produce graphs of information stored in org tables, either -graphically or in ASCII-art. - -Graphical plots using `Gnuplot' -------------------------------- - -Org-Plot produces 2D and 3D graphs using `Gnuplot' -`http://www.gnuplot.info/' and `gnuplot-mode' -`http://xafs.org/BruceRavel/GnuplotMode'. To see this in action, ensure -that you have both Gnuplot and Gnuplot mode installed on your system, -then call `C-c " g' or `M-x org-plot/gnuplot ' on the following -table. - - #+PLOT: title:"Citas" ind:1 deps:(3) type:2d with:histograms set:"yrange [0:]" - | Sede | Max cites | H-index | - |-----------+-----------+---------| - | Chile | 257.72 | 21.39 | - | Leeds | 165.77 | 19.68 | - | Sao Paolo | 71.00 | 11.50 | - | Stockholm | 134.19 | 14.33 | - | Morelia | 257.56 | 17.67 | - - Notice that Org Plot is smart enough to apply the table's headers as -labels. Further control over the labels, type, content, and appearance -of plots can be exercised through the `#+PLOT:' lines preceding a -table. See below for a complete list of Org-plot options. The -`#+PLOT:' lines are optional. For more information and examples see -the Org-plot tutorial at -`http://orgmode.org/worg/org-tutorials/org-plot.html'. - -Plot Options -............ - -`set' - Specify any `gnuplot' option to be set when graphing. - -`title' - Specify the title of the plot. - -`ind' - Specify which column of the table to use as the `x' axis. - -`deps' - Specify the columns to graph as a Lisp style list, surrounded by - parentheses and separated by spaces for example `dep:(3 4)' to - graph the third and fourth columns (defaults to graphing all other - columns aside from the `ind' column). - -`type' - Specify whether the plot will be `2d', `3d', or `grid'. - -`with' - Specify a `with' option to be inserted for every col being plotted - (e.g., `lines', `points', `boxes', `impulses', etc...). Defaults - to `lines'. - -`file' - If you want to plot to a file, specify - `"PATH/TO/DESIRED/OUTPUT-FILE"'. - -`labels' - List of labels to be used for the `deps' (defaults to the column - headers if they exist). - -`line' - Specify an entire line to be inserted in the Gnuplot script. - -`map' - When plotting `3d' or `grid' types, set this to `t' to graph a - flat mapping rather than a `3d' slope. - -`timefmt' - Specify format of Org mode timestamps as they will be parsed by - Gnuplot. Defaults to `%Y-%m-%d-%H:%M:%S'. - -`script' - If you want total control, you can specify a script file (place - the file name between double-quotes) which will be used to plot. - Before plotting, every instance of `$datafile' in the specified - script will be replaced with the path to the generated data file. - Note: even if you set this option, you may still want to specify - the plot type, as that can impact the content of the data file. - -ASCII bar plots ---------------- - -While the cursor is on a column, typing `C-c " a' or `M-x -orgtbl-ascii-plot ' create a new column containing an ASCII-art -bars plot. The plot is implemented through a regular column formula. -When the source column changes, the bar plot may be updated by -refreshing the table, for example typing `C-u C-c *'. - - | Sede | Max cites | | - |---------------+-----------+--------------| - | Chile | 257.72 | WWWWWWWWWWWW | - | Leeds | 165.77 | WWWWWWWh | - | Sao Paolo | 71.00 | WWW; | - | Stockholm | 134.19 | WWWWWW: | - | Morelia | 257.56 | WWWWWWWWWWWH | - | Rochefourchat | 0.00 | | - #+TBLFM: $3='(orgtbl-ascii-draw $2 0.0 257.72 12) - - The formula is an elisp call: - (orgtbl-ascii-draw COLUMN MIN MAX WIDTH) - -`COLUMN' - is a reference to the source column. - -`MIN MAX' - are the minimal and maximal values displayed. Sources values - outside this range are displayed as `too small' or `too large'. - -`WIDTH' - is the width in characters of the bar-plot. It defaults to `12'. - - - -File: org, Node: Hyperlinks, Next: TODO items, Prev: Tables, Up: Top - -4 Hyperlinks -************ - -Like HTML, Org provides links inside a file, external links to other -files, Usenet articles, emails, and much more. - -* Menu: - -* Link format:: How links in Org are formatted -* Internal links:: Links to other places in the current file -* External links:: URL-like links to the world -* Handling links:: Creating, inserting and following -* Using links outside Org:: Linking from my C source code? -* Link abbreviations:: Shortcuts for writing complex links -* Search options:: Linking to a specific location -* Custom searches:: When the default search is not enough - - -File: org, Node: Link format, Next: Internal links, Up: Hyperlinks - -4.1 Link format -=============== - -Org will recognize plain URL-like links and activate them as clickable -links. The general link format, however, looks like this: - - [[link][description]] or alternatively [[link]] - -Once a link in the buffer is complete (all brackets present), Org will -change the display so that `description' is displayed instead of -`[[link][description]]' and `link' is displayed instead of `[[link]]'. -Links will be highlighted in the face `org-link', which by default is -an underlined face. You can directly edit the visible part of a link. -Note that this can be either the `link' part (if there is no -description) or the `description' part. To edit also the invisible -`link' part, use `C-c C-l' with the cursor on the link. - - If you place the cursor at the beginning or just behind the end of -the displayed text and press , you will remove the -(invisible) bracket at that location. This makes the link incomplete -and the internals are again displayed as plain text. Inserting the -missing bracket hides the link internals again. To show the internal -structure of all links, use the menu entry `Org->Hyperlinks->Literal -links'. - - -File: org, Node: Internal links, Next: External links, Prev: Link format, Up: Hyperlinks - -4.2 Internal links -================== - -If the link does not look like a URL, it is considered to be internal -in the current file. The most important case is a link like -`[[#my-custom-id]]' which will link to the entry with the `CUSTOM_ID' -property `my-custom-id'. You are responsible yourself to make sure -these custom IDs are unique in a file. - - Links such as `[[My Target]]' or `[[My Target][Find my target]]' -lead to a text search in the current file. - - The link can be followed with `C-c C-o' when the cursor is on the -link, or with a mouse click (*note Handling links::). Links to custom -IDs will point to the corresponding headline. The preferred match for -a text link is a dedicated target: the same string in double angular -brackets, like `<>'. - - If no dedicated target exists, the link will then try to match the -exact name of an element within the buffer. Naming is done with the -`#+NAME' keyword, which has to be put in the line before the element it -refers to, as in the following example - - #+NAME: My Target - | a | table | - |----+------------| - | of | four cells | - - If none of the above succeeds, Org will search for a headline that -is exactly the link text but may also include a TODO keyword and -tags(1). - - During export, internal links will be used to mark objects and -assign them a number. Marked objects will then be referenced by links -pointing to them. In particular, links without a description will -appear as the number assigned to the marked object(2). In the -following excerpt from an Org buffer - - - one item - - <>another item - Here we refer to item [[target]]. - -The last sentence will appear as `Here we refer to item 2' when -exported. - - In non-Org files, the search will look for the words in the link -text. In the above example the search would be for `my target'. - - Following a link pushes a mark onto Org's own mark ring. You can -return to the previous position with `C-c &'. Using this command -several times in direct succession goes back to positions recorded -earlier. - -* Menu: - -* Radio targets:: Make targets trigger links in plain text - - ---------- Footnotes ---------- - - (1) To insert a link targeting a headline, in-buffer completion can -be used. Just type a star followed by a few optional letters into the -buffer and press `M-'. All headlines in the current buffer will -be offered as completions. - - (2) When targeting a `#+NAME' keyword, `#+CAPTION' keyword is -mandatory in order to get proper numbering (*note Images and tables::). - - -File: org, Node: Radio targets, Up: Internal links - -4.2.1 Radio targets -------------------- - -Org can automatically turn any occurrences of certain target names in -normal text into a link. So without explicitly creating a link, the -text connects to the target radioing its position. Radio targets are -enclosed by triple angular brackets. For example, a target `<<>>' causes each occurrence of `my target' in normal text to -become activated as a link. The Org file is scanned automatically for -radio targets only when the file is first loaded into Emacs. To update -the target list during editing, press `C-c C-c' with the cursor on or -at a target. - - -File: org, Node: External links, Next: Handling links, Prev: Internal links, Up: Hyperlinks - -4.3 External links -================== - -Org supports links to files, websites, Usenet and email messages, BBDB -database entries and links to both IRC conversations and their logs. -External links are URL-like locators. They start with a short -identifying string followed by a colon. There can be no space after -the colon. The following list shows examples for each link type. - - http://www.astro.uva.nl/~dominik on the web - doi:10.1000/182 DOI for an electronic resource - file:/home/dominik/images/jupiter.jpg file, absolute path - /home/dominik/images/jupiter.jpg same as above - file:papers/last.pdf file, relative path - ./papers/last.pdf same as above - file:/myself@some.where:papers/last.pdf file, path on remote machine - /myself@some.where:papers/last.pdf same as above - file:sometextfile::NNN file, jump to line number - file:projects.org another Org file - file:projects.org::some words text search in Org file(1) - file:projects.org::*task title heading search in Org - file(2) - docview:papers/last.pdf::NNN open in doc-view mode at page - id:B7423F4D-2E8A-471B-8810-C40F074717E9 Link to heading by ID - news:comp.emacs Usenet link - mailto:adent@galaxy.net Mail link - mhe:folder MH-E folder link - mhe:folder#id MH-E message link - rmail:folder RMAIL folder link - rmail:folder#id RMAIL message link - gnus:group Gnus group link - gnus:group#id Gnus article link - bbdb:R.*Stallman BBDB link (with regexp) - irc:/irc.com/#emacs/bob IRC link - info:org#External links Info node or index link - shell:ls *.org A shell command - elisp:org-agenda Interactive Elisp command - elisp:(find-file-other-frame "Elisp.org") Elisp form to evaluate - - On top of these built-in link types, some are available through the -`contrib/' directory (*note Installation::). For example, these links -to VM or Wanderlust messages are available when you load the -corresponding libraries from the `contrib/' directory: - - vm:folder VM folder link - vm:folder#id VM message link - vm://myself@some.where.org/folder#id VM on remote machine - vm-imap:account:folder VM IMAP folder link - vm-imap:account:folder#id VM IMAP message link - wl:folder WANDERLUST folder link - wl:folder#id WANDERLUST message link - - For customizing Org to add new link types *note Adding hyperlink -types::. - - A link should be enclosed in double brackets and may contain a -descriptive text to be displayed instead of the URL (*note Link -format::), for example: - - [[http://www.gnu.org/software/emacs/][GNU Emacs]] - -If the description is a file name or URL that points to an image, HTML -export (*note HTML export::) will inline the image as a clickable -button. If there is no description at all and the link points to an -image, that image will be inlined into the exported HTML file. - - Org also finds external links in the normal text and activates them -as links. If spaces must be part of the link (for example in -`bbdb:Richard Stallman'), or if you need to remove ambiguities about -the end of the link, enclose them in square brackets. - - ---------- Footnotes ---------- - - (1) The actual behavior of the search will depend on the value of -the option `org-link-search-must-match-exact-headline'. If its value -is `nil', then a fuzzy text search will be done. If it is t, then only -the exact headline will be matched, ignoring spaces and cookies. If -the value is `query-to-create', then an exact headline will be -searched; if it is not found, then the user will be queried to create -it. - - (2) Headline searches always match the exact headline, ignoring -spaces and cookies. If the headline is not found and the value of the -option `org-link-search-must-match-exact-headline' is `query-to-create', -then the user will be queried to create it. - - -File: org, Node: Handling links, Next: Using links outside Org, Prev: External links, Up: Hyperlinks - -4.4 Handling links -================== - -Org provides methods to create a link in the correct syntax, to insert -it into an Org file, and to follow the link. - -`C-c l (`org-store-link')' - Store a link to the current location. This is a _global_ command - (you must create the key binding yourself) which can be used in - any buffer to create a link. The link will be stored for later - insertion into an Org buffer (see below). What kind of link will - be created depends on the current buffer: - - Org mode buffers - For Org files, if there is a `<>' at the cursor, the link - points to the target. Otherwise it points to the current - headline, which will also be the description(1). - - If the headline has a `CUSTOM_ID' property, a link to this custom - ID will be stored. In addition or alternatively (depending on the - value of `org-id-link-to-org-use-id'), a globally unique `ID' - property will be created and/or used to construct a link(2). So - using this command in Org buffers will potentially create two - links: a human-readable from the custom ID, and one that is - globally unique and works even if the entry is moved from file to - file. Later, when inserting the link, you need to decide which - one to use. - - Email/News clients: VM, Rmail, Wanderlust, MH-E, Gnus - Pretty much all Emacs mail clients are supported. The link will - point to the current article, or, in some GNUS buffers, to the - group. The description is constructed from the author and the - subject. - - Web browsers: Eww, W3 and W3M - Here the link will be the current URL, with the page title as - description. - - Contacts: BBDB - Links created in a BBDB buffer will point to the current entry. - - Chat: IRC - For IRC links, if you set the option `org-irc-link-to-logs' to `t', - a `file:/' style link to the relevant point in the logs for the - current conversation is created. Otherwise an `irc:/' style link - to the user/channel/server under the point will be stored. - - Other files - For any other files, the link will point to the file, with a - search string (*note Search options::) pointing to the contents of - the current line. If there is an active region, the selected - words will form the basis of the search string. If the - automatically created link is not working correctly or accurately - enough, you can write custom functions to select the search string - and to do the search for particular file types--see *note Custom - searches::. The key binding `C-c l' is only a suggestion--see - *note Installation::. - - Agenda view - When the cursor is in an agenda view, the created link points to - the entry referenced by the current line. - -`C-c C-l (`org-insert-link')' - Insert a link(3). This prompts for a link to be inserted into the - buffer. You can just type a link, using text for an internal - link, or one of the link type prefixes mentioned in the examples - above. The link will be inserted into the buffer(4), along with a - descriptive text. If some text was selected when this command is - called, the selected text becomes the default description. - - Inserting stored links - All links stored during the current session are part of the - history for this prompt, so you can access them with and - (or `M-p/n'). - - Completion support - Completion with will help you to insert valid link prefixes - like `http:' or `ftp:', including the prefixes defined through - link abbreviations (*note Link abbreviations::). If you press - after inserting only the PREFIX, Org will offer specific - completion support for some link types(5) For example, if you - type `file ', file name completion (alternative access: `C-u - C-c C-l', see below) will be offered, and after `bbdb ' you - can complete contact names. - -`C-u C-c C-l' - When `C-c C-l' is called with a `C-u' prefix argument, a link to a - file will be inserted and you may use file name completion to - select the name of the file. The path to the file is inserted - relative to the directory of the current Org file, if the linked - file is in the current directory or in a sub-directory of it, or - if the path is written relative to the current directory using - `../'. Otherwise an absolute path is used, if possible with `~/' - for your home directory. You can force an absolute path with two - `C-u' prefixes. - -`C-c C-l (with cursor on existing link)' - When the cursor is on an existing link, `C-c C-l' allows you to - edit the link and description parts of the link. - -`C-c C-o (`org-open-at-point')' - Open link at point. This will launch a web browser for URLs (using - `browse-url-at-point'), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for - the corresponding links, and execute the command in a shell link. - When the cursor is on an internal link, this command runs the - corresponding search. When the cursor is on a TAG list in a - headline, it creates the corresponding TAGS view. If the cursor - is on a timestamp, it compiles the agenda for that date. - Furthermore, it will visit text and remote files in `file:' links - with Emacs and select a suitable application for local non-text - files. Classification of files is based on file extension only. - See option `org-file-apps'. If you want to override the default - application and visit the file with Emacs, use a `C-u' prefix. If - you want to avoid opening in Emacs, use a `C-u C-u' prefix. - If the cursor is on a headline, but not on a link, offer all links - in the headline and entry text. If you want to setup the frame - configuration for following links, customize - `org-link-frame-setup'. - -`' - When `org-return-follows-link' is set, `' will also follow - the link at point. - -`mouse-2' -`mouse-1' - On links, `mouse-1' and `mouse-2' will open the link just as `C-c - C-o' would. - -`mouse-3' - Like `mouse-2', but force file links to be opened with Emacs, and - internal links to be displayed in another window(6). - -`C-c C-x C-v (`org-toggle-inline-images')' - Toggle the inline display of linked images. Normally this will - only inline images that have no description part in the link, - i.e., images that will also be inlined during export. When called - with a prefix argument, also display images that do have a link - description. You can ask for inline images to be displayed at - startup by configuring the variable - `org-startup-with-inline-images'(7). - -`C-c % (`org-mark-ring-push')' - Push the current position onto the mark ring, to be able to return - easily. Commands following an internal link do this automatically. - -`C-c & (`org-mark-ring-goto')' - Jump back to a recorded position. A position is recorded by the - commands following internal links, and by `C-c %'. Using this - command several times in direct succession moves through a ring of - previously recorded positions. - -`C-c C-x C-n (`org-next-link')' -`C-c C-x C-p (`org-previous-link')' - Move forward/backward to the next link in the buffer. At the - limit of the buffer, the search fails once, and then wraps around. - The key bindings for this are really too long; you might want to - bind this also to `C-n' and `C-p' - (add-hook 'org-load-hook - (lambda () - (define-key org-mode-map "\C-n" 'org-next-link) - (define-key org-mode-map "\C-p" 'org-previous-link))) - - ---------- Footnotes ---------- - - (1) If the headline contains a timestamp, it will be removed from -the link and result in a wrong link--you should avoid putting timestamp -in the headline. - - (2) The library `org-id.el' must first be loaded, either through -`org-customize' by enabling `org-id' in `org-modules', or by adding -`(require 'org-id)' in your Emacs init file. - - (3) Note that you don't have to use this command to insert a link. -Links in Org are plain text, and you can type or paste them straight -into the buffer. By using this command, the links are automatically -enclosed in double brackets, and you will be asked for the optional -descriptive text. - - (4) After insertion of a stored link, the link will be removed from -the list of stored links. To keep it in the list later use, use a -triple `C-u' prefix argument to `C-c C-l', or configure the option -`org-keep-stored-link-after-insertion'. - - (5) This works if a completion function is defined in the -`:complete' property of a link in `org-link-parameters'. - - (6) See the option `org-display-internal-link-with-indirect-buffer' - - (7) with corresponding `#+STARTUP' keywords `inlineimages' and -`noinlineimages' - - -File: org, Node: Using links outside Org, Next: Link abbreviations, Prev: Handling links, Up: Hyperlinks - -4.5 Using links outside Org -=========================== - -You can insert and follow links that have Org syntax not only in Org, -but in any Emacs buffer. For this, you should create two global -commands, like this (please select suitable global keys yourself): - - (global-set-key "\C-c L" 'org-insert-link-global) - (global-set-key "\C-c o" 'org-open-at-point-global) - - -File: org, Node: Link abbreviations, Next: Search options, Prev: Using links outside Org, Up: Hyperlinks - -4.6 Link abbreviations -====================== - -Long URLs can be cumbersome to type, and often many similar links are -needed in a document. For this you can use link abbreviations. An -abbreviated link looks like this - - [[linkword:tag][description]] - -where the tag is optional. The linkword must be a word, starting with -a letter, followed by letters, numbers, `-', and `_'. Abbreviations -are resolved according to the information in the variable -`org-link-abbrev-alist' that relates the linkwords to replacement text. -Here is an example: - - (setq org-link-abbrev-alist - '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=") - ("url-to-ja" . "http://translate.google.fr/translate?sl=en&tl=ja&u=%h") - ("google" . "http://www.google.com/search?q=") - ("gmap" . "http://maps.google.com/maps?q=%s") - ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1") - ("ads" . "http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?author=%s&db_key=AST"))) - - If the replacement text contains the string `%s', it will be -replaced with the tag. Using `%h' instead of `%s' will url-encode the -tag (see the example above, where we need to encode the URL parameter.) -Using `%(my-function)' will pass the tag to a custom function, and -replace it by the resulting string. - - If the replacement text doesn't contain any specifier, the tag will -simply be appended in order to create the link. - - Instead of a string, you may also specify a function that will be -called with the tag as the only argument to create the link. - - With the above setting, you could link to a specific bug with -`[[bugzilla:129]]', search the web for `OrgMode' with -`[[google:OrgMode]]', show the map location of the Free Software -Foundation `[[gmap:51 Franklin Street, Boston]]' or of Carsten office -`[[omap:Science Park 904, Amsterdam, The Netherlands]]' and find out -what the Org author is doing besides Emacs hacking with -`[[ads:Dominik,C]]'. - - If you need special abbreviations just for a single Org buffer, you -can define them in the file with - - #+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= - #+LINK: google http://www.google.com/search?q=%s - -In-buffer completion (*note Completion::) can be used after `[' to -complete link abbreviations. You may also define a function that -implements special (e.g., completion) support for inserting such a link -with `C-c C-l'. Such a function should not accept any arguments, and -return the full link with prefix. You can add a completion function to -a link like this: - - (org-link-set-parameters ``type'' :complete #'some-function) - - -File: org, Node: Search options, Next: Custom searches, Prev: Link abbreviations, Up: Hyperlinks - -4.7 Search options in file links -================================ - -File links can contain additional information to make Emacs jump to a -particular location in the file when following a link. This can be a -line number or a search option after a double(1) colon. For example, -when the command `C-c l' creates a link (*note Handling links::) to a -file, it encodes the words in the current line as a search string that -can be used to find this line back later when following the link with -`C-c C-o'. - - Here is the syntax of the different ways to attach a search to a file -link, together with an explanation: - - [[file:~/code/main.c::255]] - [[file:~/xx.org::My Target]] - [[file:~/xx.org::*My Target]] - [[file:~/xx.org::#my-custom-id]] - [[file:~/xx.org::/regexp/]] - -`255' - Jump to line 255. - -`My Target' - Search for a link target `<>', or do a text search for - `my target', similar to the search in internal links, see *note - Internal links::. In HTML export (*note HTML export::), such a - file link will become an HTML reference to the corresponding named - anchor in the linked file. - -`*My Target' - In an Org file, restrict search to headlines. - -`#my-custom-id' - Link to a heading with a `CUSTOM_ID' property - -`/regexp/' - Do a regular expression search for `regexp'. This uses the Emacs - command `occur' to list all matches in a separate window. If the - target file is in Org mode, `org-occur' is used to create a sparse - tree with the matches. - - As a degenerate case, a file link with an empty file name can be used -to search the current file. For example, `[[file:::find me]]' does a -search for `find me' in the current file, just as `[[find me]]' would. - - ---------- Footnotes ---------- - - (1) For backward compatibility, line numbers can also follow a -single colon. - - -File: org, Node: Custom searches, Prev: Search options, Up: Hyperlinks - -4.8 Custom Searches -=================== - -The default mechanism for creating search strings and for doing the -actual search related to a file link may not work correctly in all -cases. For example, BibTeX database files have many entries like -`year="1993"' which would not result in good search strings, because -the only unique identification for a BibTeX entry is the citation key. - - If you come across such a problem, you can write custom functions to -set the right search string for a particular file type, and to do the -search for the string in the file. Using `add-hook', these functions -need to be added to the hook variables -`org-create-file-search-functions' and -`org-execute-file-search-functions'. See the docstring for these -variables for more information. Org actually uses this mechanism for -BibTeX database files, and you can use the corresponding code as an -implementation example. See the file `org-bibtex.el'. - - -File: org, Node: TODO items, Next: Tags, Prev: Hyperlinks, Up: Top - -5 TODO items -************ - -Org mode does not maintain TODO lists as separate documents(1). -Instead, TODO items are an integral part of the notes file, because -TODO items usually come up while taking notes! With Org mode, simply -mark any entry in a tree as being a TODO item. In this way, -information is not duplicated, and the entire context from which the -TODO item emerged is always present. - - Of course, this technique for managing TODO items scatters them -throughout your notes file. Org mode compensates for this by providing -methods to give you an overview of all the things that you have to do. - -* Menu: - -* TODO basics:: Marking and displaying TODO entries -* TODO extensions:: Workflow and assignments -* Progress logging:: Dates and notes for progress -* Priorities:: Some things are more important than others -* Breaking down tasks:: Splitting a task into manageable pieces -* Checkboxes:: Tick-off lists - - ---------- Footnotes ---------- - - (1) Of course, you can make a document that contains only long lists -of TODO items, but this is not required. - - -File: org, Node: TODO basics, Next: TODO extensions, Up: TODO items - -5.1 Basic TODO functionality -============================ - -Any headline becomes a TODO item when it starts with the word `TODO', -for example: - - *** TODO Write letter to Sam Fortune - -The most important commands to work with TODO entries are: - -`C-c C-t (`org-todo')' - Rotate the TODO state of the current item among - - ,-> (unmarked) -> TODO -> DONE --. - '--------------------------------' - - If TODO keywords have fast access keys (see *note Fast access to - TODO states::), you will be prompted for a TODO keyword through - the fast selection interface; this is the default behavior when - `org-use-fast-todo-selection' is non-`nil'. - - The same rotation can also be done "remotely" from agenda buffers - with the `t' command key (*note Agenda commands::). - -`C-u C-c C-t' - When TODO keywords have no selection keys, select a specific - keyword using completion; otherwise force cycling through TODO - states with no prompt. When `org-use-fast-todo-selection' is set - to `prefix', use the fast selection interface. - -`S- / S-' - Select the following/preceding TODO state, similar to cycling. - Useful mostly if more than two TODO states are possible (*note - TODO extensions::). See also *note Conflicts::, for a discussion - of the interaction with `shift-selection-mode'. See also the - variable `org-treat-S-cursor-todo-selection-as-state-change'. - -`C-c / t (`org-show-todo-tree')' - View TODO items in a _sparse tree_ (*note Sparse trees::). Folds - the entire buffer, but shows all TODO items (with not-DONE state) - and the headings hierarchy above them. With a prefix argument (or - by using `C-c / T'), search for a specific TODO. You will be - prompted for the keyword, and you can also give a list of keywords - like `KWD1|KWD2|...' to list entries that match any one of these - keywords. With a numeric prefix argument N, show the tree for the - Nth keyword in the option `org-todo-keywords'. With two prefix - arguments, find all TODO states, both un-done and done. - -`C-c a t (`org-todo-list')' - Show the global TODO list. Collects the TODO items (with not-DONE - states) from all agenda files (*note Agenda views::) into a single - buffer. The new buffer will be in `agenda-mode', which provides - commands to examine and manipulate the TODO entries from the new - buffer (*note Agenda commands::). *Note Global TODO list::, for - more information. - -`S-M- (`org-insert-todo-heading')' - Insert a new TODO entry below the current one. - -Changing a TODO state can also trigger tag changes. See the docstring -of the option `org-todo-state-tags-triggers' for details. - - -File: org, Node: TODO extensions, Next: Progress logging, Prev: TODO basics, Up: TODO items - -5.2 Extended use of TODO keywords -================================= - -By default, marked TODO entries have one of only two states: TODO and -DONE. Org mode allows you to classify TODO items in more complex ways -with _TODO keywords_ (stored in `org-todo-keywords'). With special -setup, the TODO keyword system can work differently in different files. - - Note that tags are another way to classify headlines in general and -TODO items in particular (*note Tags::). - -* Menu: - -* Workflow states:: From TODO to DONE in steps -* TODO types:: I do this, Fred does the rest -* Multiple sets in one file:: Mixing it all, and still finding your way -* Fast access to TODO states:: Single letter selection of a state -* Per-file keywords:: Different files, different requirements -* Faces for TODO keywords:: Highlighting states -* TODO dependencies:: When one task needs to wait for others - - -File: org, Node: Workflow states, Next: TODO types, Up: TODO extensions - -5.2.1 TODO keywords as workflow states --------------------------------------- - -You can use TODO keywords to indicate different _sequential_ states in -the process of working on an item, for example(1): - - (setq org-todo-keywords - '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED"))) - - The vertical bar separates the TODO keywords (states that _need -action_) from the DONE states (which need _no further action_). If you -don't provide the separator bar, the last state is used as the DONE -state. With this setup, the command `C-c C-t' will cycle an entry from -TODO to FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED. -You may also use a numeric prefix argument to quickly select a specific -state. For example `C-3 C-c C-t' will change the state immediately to -VERIFY. Or you can use `S-' to go backward through the sequence. -If you define many keywords, you can use in-buffer completion (*note -Completion::) or even a special one-key selection scheme (*note Fast -access to TODO states::) to insert these words into the buffer. -Changing a TODO state can be logged with a timestamp, see *note -Tracking TODO state changes::, for more information. - - ---------- Footnotes ---------- - - (1) Changing this variable only becomes effective after restarting -Org mode in a buffer. - - -File: org, Node: TODO types, Next: Multiple sets in one file, Prev: Workflow states, Up: TODO extensions - -5.2.2 TODO keywords as types ----------------------------- - -The second possibility is to use TODO keywords to indicate different -_types_ of action items. For example, you might want to indicate that -items are for "work" or "home". Or, when you work with several people -on a single project, you might want to assign action items directly to -persons, by using their names as TODO keywords. This would be set up -like this: - - (setq org-todo-keywords '((type "Fred" "Sara" "Lucy" "|" "DONE"))) - - In this case, different keywords do not indicate a sequence, but -rather different types. So the normal work flow would be to assign a -task to a person, and later to mark it DONE. Org mode supports this -style by adapting the workings of the command `C-c C-t'(1). When used -several times in succession, it will still cycle through all names, in -order to first select the right type for a task. But when you return -to the item after some time and execute `C-c C-t' again, it will switch -from any name directly to DONE. Use prefix arguments or completion to -quickly select a specific name. You can also review the items of a -specific TODO type in a sparse tree by using a numeric prefix to `C-c / -t'. For example, to see all things Lucy has to do, you would use `C-3 -C-c / t'. To collect Lucy's items from all agenda files into a single -buffer, you would use the numeric prefix argument as well when creating -the global TODO list: `C-3 C-c a t'. - - ---------- Footnotes ---------- - - (1) This is also true for the `t' command in the agenda buffers. - - -File: org, Node: Multiple sets in one file, Next: Fast access to TODO states, Prev: TODO types, Up: TODO extensions - -5.2.3 Multiple keyword sets in one file ---------------------------------------- - -Sometimes you may want to use different sets of TODO keywords in -parallel. For example, you may want to have the basic `TODO'/`DONE', -but also a workflow for bug fixing, and a separate state indicating -that an item has been canceled (so it is not DONE, but also does not -require action). Your setup would then look like this: - - (setq org-todo-keywords - '((sequence "TODO" "|" "DONE") - (sequence "REPORT" "BUG" "KNOWNCAUSE" "|" "FIXED") - (sequence "|" "CANCELED"))) - - The keywords should all be different, this helps Org mode to keep -track of which subsequence should be used for a given entry. In this -setup, `C-c C-t' only operates within a subsequence, so it switches from -`DONE' to (nothing) to `TODO', and from `FIXED' to (nothing) to -`REPORT'. Therefore you need a mechanism to initially select the -correct sequence. Besides the obvious ways like typing a keyword or -using completion, you may also apply the following commands: - -`C-u C-u C-c C-t' -`C-S-' -`C-S-' - These keys jump from one TODO subset to the next. In the above - example, `C-u C-u C-c C-t' or `C-S-' would jump from `TODO' - or `DONE' to `REPORT', and any of the words in the second row to - `CANCELED'. Note that the `C-S-' key binding conflict with - `shift-selection-mode' (*note Conflicts::). - -`S-' -`S-' - `S-' and `S-' and walk through _all_ keywords from - all sets, so for example `S-' would switch from `DONE' to - `REPORT' in the example above. See also *note Conflicts::, for a - discussion of the interaction with `shift-selection-mode'. - - -File: org, Node: Fast access to TODO states, Next: Per-file keywords, Prev: Multiple sets in one file, Up: TODO extensions - -5.2.4 Fast access to TODO states --------------------------------- - -If you would like to quickly change an entry to an arbitrary TODO state -instead of cycling through the states, you can set up keys for -single-letter access to the states. This is done by adding the -selection character after each keyword, in parentheses(1). For example: - - (setq org-todo-keywords - '((sequence "TODO(t)" "|" "DONE(d)") - (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)") - (sequence "|" "CANCELED(c)"))) - - If you then press `C-c C-t' followed by the selection key, the entry -will be switched to this state. `SPC' can be used to remove any TODO -keyword from an entry.(2) - - ---------- Footnotes ---------- - - (1) All characters are allowed except `@^!', which have a special -meaning here. - - (2) Check also the option `org-fast-tag-selection-include-todo', it -allows you to change the TODO state through the tags interface (*note -Setting tags::), in case you like to mingle the two concepts. Note -that this means you need to come up with unique keys across both sets -of keywords. - - -File: org, Node: Per-file keywords, Next: Faces for TODO keywords, Prev: Fast access to TODO states, Up: TODO extensions - -5.2.5 Setting up keywords for individual files ----------------------------------------------- - -It can be very useful to use different aspects of the TODO mechanism in -different files. For file-local settings, you need to add special -lines to the file which set the keywords and interpretation for that -file only. For example, to set one of the two examples discussed -above, you need one of the following lines anywhere in the file: - - #+TODO: TODO FEEDBACK VERIFY | DONE CANCELED - (you may also write `#+SEQ_TODO' to be explicit about the -interpretation, but it means the same as `#+TODO'), or - #+TYP_TODO: Fred Sara Lucy Mike | DONE - - A setup for using several sets in parallel would be: - - #+TODO: TODO | DONE - #+TODO: REPORT BUG KNOWNCAUSE | FIXED - #+TODO: | CANCELED - -To make sure you are using the correct keyword, type `#+' into the -buffer and then use `M-' completion. - - Remember that the keywords after the vertical bar (or the last -keyword if no bar is there) must always mean that the item is DONE -(although you may use a different word). After changing one of these -lines, use `C-c C-c' with the cursor still in the line to make the -changes known to Org mode(1). - - ---------- Footnotes ---------- - - (1) Org mode parses these lines only when Org mode is activated -after visiting a file. `C-c C-c' with the cursor in a line starting -with `#+' is simply restarting Org mode for the current buffer. - - -File: org, Node: Faces for TODO keywords, Next: TODO dependencies, Prev: Per-file keywords, Up: TODO extensions - -5.2.6 Faces for TODO keywords ------------------------------ - -Org mode highlights TODO keywords with special faces: `org-todo' for -keywords indicating that an item still has to be acted upon, and -`org-done' for keywords indicating that an item is finished. If you -are using more than 2 different states, you might want to use special -faces for some of them. This can be done using the option -`org-todo-keyword-faces'. For example: - - (setq org-todo-keyword-faces - '(("TODO" . org-warning) ("STARTED" . "yellow") - ("CANCELED" . (:foreground "blue" :weight bold)))) - - While using a list with face properties as shown for CANCELED -_should_ work, this does not always seem to be the case. If necessary, -define a special face and use that. A string is interpreted as a -color. The option `org-faces-easy-properties' determines if that color -is interpreted as a foreground or a background color. - - -File: org, Node: TODO dependencies, Prev: Faces for TODO keywords, Up: TODO extensions - -5.2.7 TODO dependencies ------------------------ - -The structure of Org files (hierarchy and lists) makes it easy to -define TODO dependencies. Usually, a parent TODO task should not be -marked DONE until all subtasks (defined as children tasks) are marked -as DONE. And sometimes there is a logical sequence to a number of -(sub)tasks, so that one task cannot be acted upon before all siblings -above it are done. If you customize the option -`org-enforce-todo-dependencies', Org will block entries from changing -state to DONE while they have children that are not DONE. Furthermore, -if an entry has a property `ORDERED', each of its children will be -blocked until all earlier siblings are marked DONE. Here is an example: - - * TODO Blocked until (two) is done - ** DONE one - ** TODO two - - * Parent - :PROPERTIES: - :ORDERED: t - :END: - ** TODO a - ** TODO b, needs to wait for (a) - ** TODO c, needs to wait for (a) and (b) - - You can ensure an entry is never blocked by using the `NOBLOCKING' -property: - - * This entry is never blocked - :PROPERTIES: - :NOBLOCKING: t - :END: - -`C-c C-x o (`org-toggle-ordered-property')' - Toggle the `ORDERED' property of the current entry. A property is - used for this behavior because this should be local to the current - entry, not inherited like a tag. However, if you would like to - track the value of this property with a tag for better visibility, - customize the option `org-track-ordered-property-with-tag'. - -`C-u C-u C-u C-c C-t' - Change TODO state, circumventing any state blocking. - - If you set the option `org-agenda-dim-blocked-tasks', TODO entries -that cannot be closed because of such dependencies will be shown in a -dimmed font or even made invisible in agenda views (*note Agenda -views::). - - You can also block changes of TODO states by looking at checkboxes -(*note Checkboxes::). If you set the option -`org-enforce-todo-checkbox-dependencies', an entry that has unchecked -checkboxes will be blocked from switching to DONE. - - If you need more complex dependency structures, for example -dependencies between entries in different trees or files, check out the -contributed module `org-depend.el'. - - -File: org, Node: Progress logging, Next: Priorities, Prev: TODO extensions, Up: TODO items - -5.3 Progress logging -==================== - -Org mode can automatically record a timestamp and possibly a note when -you mark a TODO item as DONE, or even each time you change the state of -a TODO item. This system is highly configurable; settings can be on a -per-keyword basis and can be localized to a file or even a subtree. For -information on how to clock working time for a task, see *note Clocking -work time::. - -* Menu: - -* Closing items:: When was this entry marked DONE? -* Tracking TODO state changes:: When did the status change? -* Tracking your habits:: How consistent have you been? - - -File: org, Node: Closing items, Next: Tracking TODO state changes, Up: Progress logging - -5.3.1 Closing items -------------------- - -The most basic logging is to keep track of _when_ a certain TODO item -was finished. This is achieved with(1) - - (setq org-log-done 'time) - -Then each time you turn an entry from a TODO (not-done) state into any -of the DONE states, a line `CLOSED: [timestamp]' will be inserted just -after the headline. If you turn the entry back into a TODO item -through further state cycling, that line will be removed again. If you -turn the entry back to a non-TODO state (by pressing for -example), that line will also be removed, unless you set -`org-closed-keep-when-no-todo' to non-`nil'. If you want to record a -note along with the timestamp, use(2) - - (setq org-log-done 'note) - -You will then be prompted for a note, and that note will be stored below -the entry with a `Closing Note' heading. - - ---------- Footnotes ---------- - - (1) The corresponding in-buffer setting is: `#+STARTUP: logdone' - - (2) The corresponding in-buffer setting is: `#+STARTUP: lognotedone'. - - -File: org, Node: Tracking TODO state changes, Next: Tracking your habits, Prev: Closing items, Up: Progress logging - -5.3.2 Tracking TODO state changes ---------------------------------- - -When TODO keywords are used as workflow states (*note Workflow -states::), you might want to keep track of when a state change occurred -and maybe take a note about this change. You can either record just a -timestamp, or a time-stamped note for a change. These records will be -inserted after the headline as an itemized list, newest first(1). When -taking a lot of notes, you might want to get the notes out of the way -into a drawer (*note Drawers::). Customize `org-log-into-drawer' to -get this behavior--the recommended drawer for this is called -`LOGBOOK'(2). You can also overrule the setting of this variable for a -subtree by setting a `LOG_INTO_DRAWER' property. - - Since it is normally too much to record a note for every state, Org -mode expects configuration on a per-keyword basis for this. This is -achieved by adding special markers `!' (for a timestamp) or `@' (for a -note with timestamp) in parentheses after each keyword. For example, -with the setting - - (setq org-todo-keywords - '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) - - To record a timestamp without a note for TODO keywords configured -with `@', just type `C-c C-c' to enter a blank note when prompted. - -You not only define global TODO keywords and fast access keys, but also -request that a time is recorded when the entry is set to DONE(3), and -that a note is recorded when switching to WAIT or CANCELED. The -setting for WAIT is even more special: the `!' after the slash means -that in addition to the note taken when entering the state, a timestamp -should be recorded when leaving the WAIT state, if and only if the -target state does not configure logging for entering it. So it has no -effect when switching from WAIT to DONE, because DONE is configured to -record a timestamp only. But when switching from WAIT back to TODO, -the `/!' in the WAIT setting now triggers a timestamp even though TODO -has no logging configured. - - You can use the exact same syntax for setting logging preferences -local to a buffer: - #+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@) - - In order to define logging settings that are local to a subtree or a -single item, define a LOGGING property in this entry. Any non-empty -LOGGING property resets all logging settings to `nil'. You may then -turn on logging for this specific tree using STARTUP keywords like -`lognotedone' or `logrepeat', as well as adding state specific settings -like `TODO(!)'. For example - - * TODO Log each state with only a time - :PROPERTIES: - :LOGGING: TODO(!) WAIT(!) DONE(!) CANCELED(!) - :END: - * TODO Only log when switching to WAIT, and when repeating - :PROPERTIES: - :LOGGING: WAIT(@) logrepeat - :END: - * TODO No logging at all - :PROPERTIES: - :LOGGING: nil - :END: - - ---------- Footnotes ---------- - - (1) See the option `org-log-states-order-reversed' - - (2) Note that the `LOGBOOK' drawer is unfolded when pressing -in the agenda to show an entry--use to keep it folded here - - (3) It is possible that Org mode will record two timestamps when you -are using both `org-log-done' and state change logging. However, it -will never prompt for two notes--if you have configured both, the state -change recording note will take precedence and cancel the `Closing -Note'. - - -File: org, Node: Tracking your habits, Prev: Tracking TODO state changes, Up: Progress logging - -5.3.3 Tracking your habits --------------------------- - -Org has the ability to track the consistency of a special category of -TODOs, called "habits". A habit has the following properties: - - 1. You have enabled the `habits' module by customizing `org-modules'. - - 2. The habit is a TODO item, with a TODO keyword representing an open - state. - - 3. The property `STYLE' is set to the value `habit'. - - 4. The TODO has a scheduled date, usually with a `.+' style repeat - interval. A `++' style may be appropriate for habits with time - constraints, e.g., must be done on weekends, or a `+' style for an - unusual habit that can have a backlog, e.g., weekly reports. - - 5. The TODO may also have minimum and maximum ranges specified by - using the syntax `.+2d/3d', which says that you want to do the - task at least every three days, but at most every two days. - - 6. You must also have state logging for the `DONE' state enabled - (*note Tracking TODO state changes::), in order for historical - data to be represented in the consistency graph. If it is not - enabled it is not an error, but the consistency graphs will be - largely meaningless. - - To give you an idea of what the above rules look like in action, -here's an actual habit with some history: - - ** TODO Shave - SCHEDULED: <2009-10-17 Sat .+2d/4d> - :PROPERTIES: - :STYLE: habit - :LAST_REPEAT: [2009-10-19 Mon 00:36] - :END: - - State "DONE" from "TODO" [2009-10-15 Thu] - - State "DONE" from "TODO" [2009-10-12 Mon] - - State "DONE" from "TODO" [2009-10-10 Sat] - - State "DONE" from "TODO" [2009-10-04 Sun] - - State "DONE" from "TODO" [2009-10-02 Fri] - - State "DONE" from "TODO" [2009-09-29 Tue] - - State "DONE" from "TODO" [2009-09-25 Fri] - - State "DONE" from "TODO" [2009-09-19 Sat] - - State "DONE" from "TODO" [2009-09-16 Wed] - - State "DONE" from "TODO" [2009-09-12 Sat] - - What this habit says is: I want to shave at most every 2 days (given -by the `SCHEDULED' date and repeat interval) and at least every 4 days. -If today is the 15th, then the habit first appears in the agenda on Oct -17, after the minimum of 2 days has elapsed, and will appear overdue on -Oct 19, after four days have elapsed. - - What's really useful about habits is that they are displayed along -with a consistency graph, to show how consistent you've been at getting -that task done in the past. This graph shows every day that the task -was done over the past three weeks, with colors for each day. The -colors used are: - -`Blue' - If the task wasn't to be done yet on that day. - -`Green' - If the task could have been done on that day. - -`Yellow' - If the task was going to be overdue the next day. - -`Red' - If the task was overdue on that day. - - In addition to coloring each day, the day is also marked with an -asterisk if the task was actually done that day, and an exclamation -mark to show where the current day falls in the graph. - - There are several configuration variables that can be used to change -the way habits are displayed in the agenda. - -`org-habit-graph-column' - The buffer column at which the consistency graph should be drawn. - This will overwrite any text in that column, so it is a good idea - to keep your habits' titles brief and to the point. - -`org-habit-preceding-days' - The amount of history, in days before today, to appear in - consistency graphs. - -`org-habit-following-days' - The number of days after today that will appear in consistency - graphs. - -`org-habit-show-habits-only-for-today' - If non-`nil', only show habits in today's agenda view. This is - set to true by default. - - Lastly, pressing `K' in the agenda buffer will cause habits to -temporarily be disabled and they won't appear at all. Press `K' again -to bring them back. They are also subject to tag filtering, if you -have habits which should only be done in certain contexts, for example. - - -File: org, Node: Priorities, Next: Breaking down tasks, Prev: Progress logging, Up: TODO items - -5.4 Priorities -============== - -If you use Org mode extensively, you may end up with enough TODO items -that it starts to make sense to prioritize them. Prioritizing can be -done by placing a _priority cookie_ into the headline of a TODO item, -like this - - *** TODO [#A] Write letter to Sam Fortune - -By default, Org mode supports three priorities: `A', `B', and `C'. `A' -is the highest priority. An entry without a cookie is treated just -like priority `B'. Priorities make a difference only for sorting in -the agenda (*note Weekly/daily agenda::); outside the agenda, they have -no inherent meaning to Org mode. The cookies can be highlighted with -special faces by customizing `org-priority-faces'. - - Priorities can be attached to any outline node; they do not need to -be TODO items. - -`C-c ,' - Set the priority of the current headline (`org-priority'). The - command prompts for a priority character `A', `B' or `C'. When - you press instead, the priority cookie is removed from the - headline. The priorities can also be changed "remotely" from the - agenda buffer with the `,' command (*note Agenda commands::). - -`S- (`org-priority-up')' -`S- (`org-priority-down')' - Increase/decrease priority of current headline(1). Note that - these keys are also used to modify timestamps (*note Creating - timestamps::). See also *note Conflicts::, for a discussion of - the interaction with `shift-selection-mode'. - - You can change the range of allowed priorities by setting the options -`org-highest-priority', `org-lowest-priority', and -`org-default-priority'. For an individual buffer, you may set these -values (highest, lowest, default) like this (please make sure that the -highest priority is earlier in the alphabet than the lowest priority): - - #+PRIORITIES: A C B - - ---------- Footnotes ---------- - - (1) See also the option `org-priority-start-cycle-with-default'. - - -File: org, Node: Breaking down tasks, Next: Checkboxes, Prev: Priorities, Up: TODO items - -5.5 Breaking tasks down into subtasks -===================================== - -It is often advisable to break down large tasks into smaller, manageable -subtasks. You can do this by creating an outline tree below a TODO -item, with detailed subtasks on the tree(1). To keep the overview over -the fraction of subtasks that are already completed, insert either -`[/]' or `[%]' anywhere in the headline. These cookies will be updated -each time the TODO status of a child changes, or when pressing `C-c -C-c' on the cookie. For example: - - * Organize Party [33%] - ** TODO Call people [1/2] - *** TODO Peter - *** DONE Sarah - ** TODO Buy food - ** DONE Talk to neighbor - - If a heading has both checkboxes and TODO children below it, the -meaning of the statistics cookie become ambiguous. Set the property -`COOKIE_DATA' to either `checkbox' or `todo' to resolve this issue. - - If you would like to have the statistics cookie count any TODO -entries in the subtree (not just direct children), configure -`org-hierarchical-todo-statistics'. To do this for a single subtree, -include the word `recursive' into the value of the `COOKIE_DATA' -property. - - * Parent capturing statistics [2/20] - :PROPERTIES: - :COOKIE_DATA: todo recursive - :END: - - If you would like a TODO entry to automatically change to DONE when -all children are done, you can use the following setup: - - (defun org-summary-todo (n-done n-not-done) - "Switch entry to DONE when all subentries are done, to TODO otherwise." - (let (org-log-done org-log-states) ; turn off logging - (org-todo (if (= n-not-done 0) "DONE" "TODO")))) - - (add-hook 'org-after-todo-statistics-hook 'org-summary-todo) - - Another possibility is the use of checkboxes to identify (a -hierarchy of) a large number of subtasks (*note Checkboxes::). - - ---------- Footnotes ---------- - - (1) To keep subtasks out of the global TODO list, see the -`org-agenda-todo-list-sublevels'. - - -File: org, Node: Checkboxes, Prev: Breaking down tasks, Up: TODO items - -5.6 Checkboxes -============== - -Every item in a plain list(1) (*note Plain lists::) can be made into a -checkbox by starting it with the string `[ ]'. This feature is similar -to TODO items (*note TODO items::), but is more lightweight. -Checkboxes are not included in the global TODO list, so they are often -great to split a task into a number of simple steps. Or you can use -them in a shopping list. To toggle a checkbox, use `C-c C-c', or use -the mouse (thanks to Piotr Zielinski's `org-mouse.el'). - - Here is an example of a checkbox list. - - * TODO Organize party [2/4] - - [-] call people [1/3] - - [ ] Peter - - [X] Sarah - - [ ] Sam - - [X] order food - - [ ] think about what music to play - - [X] talk to the neighbors - - Checkboxes work hierarchically, so if a checkbox item has children -that are checkboxes, toggling one of the children checkboxes will make -the parent checkbox reflect if none, some, or all of the children are -checked. - - The `[2/4]' and `[1/3]' in the first and second line are cookies -indicating how many checkboxes present in this entry have been checked -off, and the total number of checkboxes present. This can give you an -idea on how many checkboxes remain, even without opening a folded -entry. The cookies can be placed into a headline or into (the first -line of) a plain list item. Each cookie covers checkboxes of direct -children structurally below the headline/item on which the cookie -appears(2). You have to insert the cookie yourself by typing either -`[/]' or `[%]'. With `[/]' you get an `n out of m' result, as in the -examples above. With `[%]' you get information about the percentage of -checkboxes checked (in the above example, this would be `[50%]' and -`[33%]', respectively). In a headline, a cookie can count either -checkboxes below the heading or TODO states of children, and it will -display whatever was changed last. Set the property `COOKIE_DATA' to -either `checkbox' or `todo' to resolve this issue. - - If the current outline node has an `ORDERED' property, checkboxes -must be checked off in sequence, and an error will be thrown if you try -to check off a box while there are unchecked boxes above it. - -The following commands work with checkboxes: - -`C-c C-c (`org-toggle-checkbox')' - Toggle checkbox status or (with prefix arg) checkbox presence at - point. With a single prefix argument, add an empty checkbox or - remove the current one(3). With a double prefix argument, set it - to `[-]', which is considered to be an intermediate state. - -`C-c C-x C-b (`org-toggle-checkbox')' - Toggle checkbox status or (with prefix arg) checkbox presence at - point. With double prefix argument, set it to `[-]', which is - considered to be an intermediate state. - - If there is an active region, toggle the first checkbox in - the region and set all remaining boxes to the same status as - the first. With a prefix arg, add or remove the checkbox for - all items in the region. - - - If the cursor is in a headline, toggle the state of the first - checkbox in the region between this headline and the next--so - _not_ the entire subtree--and propagate this new state to all - other checkboxes in the same area. - - - If there is no active region, just toggle the checkbox at - point. - -`M-S- (`org-insert-todo-heading')' - Insert a new item with a checkbox. This works only if the cursor - is already in a plain list item (*note Plain lists::). - -`C-c C-x o (`org-toggle-ordered-property')' - Toggle the `ORDERED' property of the entry, to toggle if - checkboxes must be checked off in sequence. A property is used - for this behavior because this should be local to the current - entry, not inherited like a tag. However, if you would like to - track the value of this property with a tag for better visibility, - customize `org-track-ordered-property-with-tag'. - -`C-c # (`org-update-statistics-cookies')' - Update the statistics cookie in the current outline entry. When - called with a `C-u' prefix, update the entire file. Checkbox - statistic cookies are updated automatically if you toggle - checkboxes with `C-c C-c' and make new ones with `M-S-'. - TODO statistics cookies update when changing TODO states. If you - delete boxes/entries or add/change them by hand, use this command - to get things back into sync. - - ---------- Footnotes ---------- - - (1) With the exception of description lists. But you can allow it -by modifying `org-list-automatic-rules' accordingly. - - (2) Set the option `org-checkbox-hierarchical-statistics' if you -want such cookies to count all checkboxes below the cookie, not just -those belonging to direct children. - - (3) `C-u C-c C-c' before the _first_ bullet in a list with no -checkbox will add checkboxes to the rest of the list. - - -File: org, Node: Tags, Next: Properties and columns, Prev: TODO items, Up: Top - -6 Tags -****** - -An excellent way to implement labels and contexts for cross-correlating -information is to assign tags to headlines. Org mode has extensive -support for tags. - - Every headline can contain a list of tags; they occur at the end of -the headline. Tags are normal words containing letters, numbers, `_', -and `@'. Tags must be preceded and followed by a single colon, e.g., -`:work:'. Several tags can be specified, as in `:work:urgent:'. Tags -will by default be in bold face with the same color as the headline. -You may specify special faces for specific tags using the option -`org-tag-faces', in much the same way as you can for TODO keywords -(*note Faces for TODO keywords::). - -* Menu: - -* Tag inheritance:: Tags use the tree structure of the outline -* Setting tags:: How to assign tags to a headline -* Tag hierarchy:: Create a hierarchy of tags -* Tag searches:: Searching for combinations of tags - - -File: org, Node: Tag inheritance, Next: Setting tags, Up: Tags - -6.1 Tag inheritance -=================== - -Tags make use of the hierarchical structure of outline trees. If a -heading has a certain tag, all subheadings will inherit the tag as -well. For example, in the list - - * Meeting with the French group :work: - ** Summary by Frank :boss:notes: - *** TODO Prepare slides for him :action: - -the final heading will have the tags `:work:', `:boss:', `:notes:', and -`:action:' even though the final heading is not explicitly marked with -all those tags. You can also set tags that all entries in a file -should inherit just as if these tags were defined in a hypothetical -level zero that surrounds the entire file. Use a line like this(1): - - #+FILETAGS: :Peter:Boss:Secret: - -To limit tag inheritance to specific tags, use -`org-tags-exclude-from-inheritance'. To turn it off entirely, use -`org-use-tag-inheritance'. - - When a headline matches during a tags search while tag inheritance -is turned on, all the sublevels in the same tree will (for a simple -match form) match as well(2). The list of matches may then become very -long. If you only want to see the first tags match in a subtree, -configure `org-tags-match-list-sublevels' (not recommended). - - Tag inheritance is relevant when the agenda search tries to match a -tag, either in the `tags' or `tags-todo' agenda types. In other agenda -types, `org-use-tag-inheritance' has no effect. Still, you may want to -have your tags correctly set in the agenda, so that tag filtering works -fine, with inherited tags. Set `org-agenda-use-tag-inheritance' to -control this: the default value includes all agenda types, but setting -this to `nil' can really speed up agenda generation. - - ---------- Footnotes ---------- - - (1) As with all these in-buffer settings, pressing `C-c C-c' -activates any changes in the line. - - (2) This is only true if the search does not involve more complex -tests including properties (*note Property searches::). - - -File: org, Node: Setting tags, Next: Tag hierarchy, Prev: Tag inheritance, Up: Tags - -6.2 Setting tags -================ - -Tags can simply be typed into the buffer at the end of a headline. -After a colon, `M-' offers completion on tags. There is also a -special command for inserting tags: - -`C-c C-q (`org-set-tags-command')' - Enter new tags for the current headline. Org mode will either - offer completion or a special single-key interface for setting - tags, see below. After pressing , the tags will be inserted - and aligned to `org-tags-column'. When called with a `C-u' - prefix, all tags in the current buffer will be aligned to that - column, just to make things look nice. TAGS are automatically - realigned after promotion, demotion, and TODO state changes (*note - TODO basics::). - -`C-c C-c (`org-set-tags-command')' - When the cursor is in a headline, this does the same as `C-c C-q'. - - Org supports tag insertion based on a _list of tags_. By default -this list is constructed dynamically, containing all tags currently -used in the buffer. You may also globally specify a hard list of tags -with the variable `org-tag-alist'. Finally you can set the default -tags for a given file with lines like - - #+TAGS: @work @home @tennisclub - #+TAGS: laptop car pc sailboat - - If you have globally defined your preferred set of tags using the -variable `org-tag-alist', but would like to use a dynamic tag list in a -specific file, add an empty TAGS option line to that file: - - #+TAGS: - - If you have a preferred set of tags that you would like to use in -every file, in addition to those defined on a per-file basis by TAGS -option lines, then you may specify a list of tags with the variable -`org-tag-persistent-alist'. You may turn this off on a per-file basis -by adding a STARTUP option line to that file: - - #+STARTUP: noptag - - By default Org mode uses the standard minibuffer completion -facilities for entering tags. However, it also implements another, -quicker, tag selection method called _fast tag selection_. This allows -you to select and deselect tags with just a single key press. For this -to work well you should assign unique, case-sensitive, letters to most -of your commonly used tags. You can do this globally by configuring -the variable `org-tag-alist' in your Emacs init file. For example, you -may find the need to tag many items in different files with `:@home:'. -In this case you can set something like: - - (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l))) - -If the tag is only relevant to the file you are working on, then you -can instead set the TAGS option line as: - - #+TAGS: @work(w) @home(h) @tennisclub(t) laptop(l) pc(p) - -The tags interface will show the available tags in a splash window. If -you want to start a new line after a specific tag, insert `\n' into the -tag list - - #+TAGS: @work(w) @home(h) @tennisclub(t) \n laptop(l) pc(p) - -or write them in two lines: - - #+TAGS: @work(w) @home(h) @tennisclub(t) - #+TAGS: laptop(l) pc(p) - -You can also group together tags that are mutually exclusive by using -braces, as in: - - #+TAGS: { @work(w) @home(h) @tennisclub(t) } laptop(l) pc(p) - -you indicate that at most one of `@work', `@home', and `@tennisclub' -should be selected. Multiple such groups are allowed. - -Don't forget to press `C-c C-c' with the cursor in one of these lines -to activate any changes. - -To set these mutually exclusive groups in the variable `org-tag-alist', -you must use the dummy tags `:startgroup' and `:endgroup' instead of -the braces. Similarly, you can use `:newline' to indicate a line -break. The previous example would be set globally by the following -configuration: - - (setq org-tag-alist '((:startgroup . nil) - ("@work" . ?w) ("@home" . ?h) - ("@tennisclub" . ?t) - (:endgroup . nil) - ("laptop" . ?l) ("pc" . ?p))) - - If at least one tag has a selection key then pressing `C-c C-c' will -automatically present you with a special interface, listing inherited -tags, the tags of the current headline, and a list of all valid tags -with corresponding keys(1). - - Pressing keys assigned to tags will add or remove them from the list -of tags in the current line. Selecting a tag in a group of mutually -exclusive tags will turn off any other tags from that group. - - In this interface, you can also use the following special keys: - -`' - Enter a tag in the minibuffer, even if the tag is not in the - predefined list. You will be able to complete on all tags present - in the buffer. You can also add several tags: just separate them - with a comma. - -`' - Clear all tags for this line. - -`' - Accept the modified set. - -`C-g' - Abort without installing changes. - -`q' - If `q' is not assigned to a tag, it aborts like `C-g'. - -`!' - Turn off groups of mutually exclusive tags. Use this to (as an - exception) assign several tags from such a group. - -`C-c' - Toggle auto-exit after the next change (see below). If you are - using expert mode, the first `C-c' will display the selection - window. - -This method lets you assign tags to a headline with very few keys. With -the above setup, you could clear the current tags and set `@home', -`laptop' and `pc' tags with just the following keys: `C-c C-c h l -p '. Switching from `@home' to `@work' would be done with `C-c -C-c w ' or alternatively with `C-c C-c C-c w'. Adding the -non-predefined tag `Sarah' could be done with `C-c C-c S a r a h - '. - - If you find that most of the time you need only a single key press to -modify your list of tags, set `org-fast-tag-selection-single-key'. -Then you no longer have to press to exit fast tag selection--it -will immediately exit after the first change. If you then occasionally -need more keys, press `C-c' to turn off auto-exit for the current tag -selection process (in effect: start selection with `C-c C-c C-c' -instead of `C-c C-c'). If you set the variable to the value `expert', -the special window is not even shown for single-key tag selection, it -comes up only when you press an extra `C-c'. - - ---------- Footnotes ---------- - - (1) Keys will automatically be assigned to tags which have no -configured keys. - - -File: org, Node: Tag hierarchy, Next: Tag searches, Prev: Setting tags, Up: Tags - -6.3 Tag hierarchy -================= - -Tags can be defined in hierarchies. A tag can be defined as a _group -tag_ for a set of other tags. The group tag can be seen as the "broader -term" for its set of tags. Defining multiple _group tags_ and nesting -them creates a tag hierarchy. - - One use-case is to create a taxonomy of terms (tags) that can be -used to classify nodes in a document or set of documents. - - When you search for a group tag, it will return matches for all -members in the group and its subgroups. In an agenda view, filtering -by a group tag will display or hide headlines tagged with at least one -of the members of the group or any of its subgroups. This makes tag -searches and filters even more flexible. - - You can set group tags by using brackets and inserting a colon -between the group tag and its related tags--beware that all whitespaces -are mandatory so that Org can parse this line correctly: - - #+TAGS: [ GTD : Control Persp ] - - In this example, `GTD' is the _group tag_ and it is related to two -other tags: `Control', `Persp'. Defining `Control' and `Persp' as -group tags creates an hierarchy of tags: - - #+TAGS: [ Control : Context Task ] - #+TAGS: [ Persp : Vision Goal AOF Project ] - - That can conceptually be seen as a hierarchy of tags: - - - GTD - - Persp - - Vision - - Goal - - AOF - - Project - - Control - - Context - - Task - - You can use the `:startgrouptag', `:grouptags' and `:endgrouptag' -keyword directly when setting `org-tag-alist' directly: - - (setq org-tag-alist '((:startgrouptag) - ("GTD") - (:grouptags) - ("Control") - ("Persp") - (:endgrouptag) - (:startgrouptag) - ("Control") - (:grouptags) - ("Context") - ("Task") - (:endgrouptag))) - - The tags in a group can be mutually exclusive if using the same -group syntax as is used for grouping mutually exclusive tags together; -using curly brackets. - - #+TAGS: { Context : @Home @Work @Call } - - When setting `org-tag-alist' you can use `:startgroup' & `:endgroup' -instead of `:startgrouptag' & `:endgrouptag' to make the tags mutually -exclusive. - - Furthermore, the members of a _group tag_ can also be regular -expressions, creating the possibility of a more dynamic and rule-based -tag structure. The regular expressions in the group must be specified -within { }. Here is an expanded example: - - #+TAGS: [ Vision : {V@.+} ] - #+TAGS: [ Goal : {G@.+} ] - #+TAGS: [ AOF : {AOF@.+} ] - #+TAGS: [ Project : {P@.+} ] - - Searching for the tag `Project' will now list all tags also including -regular expression matches for `P@.+', and similarly for tag searches on -`Vision', `Goal' and `AOF'. For example, this would work well for a -project tagged with a common project-identifier, e.g. `P@2014_OrgTags'. - - If you want to ignore group tags temporarily, toggle group tags -support with `org-toggle-tags-groups', bound to `C-c C-x q'. If you -want to disable tag groups completely, set `org-group-tags' to `nil'. - - -File: org, Node: Tag searches, Prev: Tag hierarchy, Up: Tags - -6.4 Tag searches -================ - -Once a system of tags has been set up, it can be used to collect related -information into special lists. - -`C-c / m or C-c \ (`org-match-sparse-tree')' - Create a sparse tree with all headlines matching a - tags/property/TODO search. With a `C-u' prefix argument, ignore - headlines that are not a TODO line. *Note Matching tags and - properties::. - -`C-c a m (`org-tags-view')' - Create a global list of tag matches from all agenda files. *Note - Matching tags and properties::. - -`C-c a M (`org-tags-view')' - Create a global list of tag matches from all agenda files, but - check only TODO items and force checking subitems (see the option - `org-tags-match-list-sublevels'). - - These commands all prompt for a match string which allows basic -Boolean logic like `+boss+urgent-project1', to find entries with tags -`boss' and `urgent', but not `project1', or `Kathy|Sally' to find -entries tagged as `Kathy' or `Sally'. The full syntax of the search -string is rich and allows also matching against TODO keywords, entry -levels and properties. For a complete description with many examples, -see *note Matching tags and properties::. - - -File: org, Node: Properties and columns, Next: Dates and times, Prev: Tags, Up: Top - -7 Properties and columns -************************ - -A property is a key-value pair associated with an entry. Properties -can be set so they are associated with a single entry, with every entry -in a tree, or with every entry in an Org mode file. - - There are two main applications for properties in Org mode. First, -properties are like tags, but with a value. Imagine maintaining a file -where you document bugs and plan releases for a piece of software. -Instead of using tags like `:release_1:', `:release_2:', you can use a -property, say `:Release:', that in different subtrees has different -values, such as `1.0' or `2.0'. Second, you can use properties to -implement (very basic) database capabilities in an Org buffer. Imagine -keeping track of your music CDs, where properties could be things such -as the album, artist, date of release, number of tracks, and so on. - - Properties can be conveniently edited and viewed in column view -(*note Column view::). - -* Menu: - -* Property syntax:: How properties are spelled out -* Special properties:: Access to other Org mode features -* Property searches:: Matching property values -* Property inheritance:: Passing values down the tree -* Column view:: Tabular viewing and editing -* Property API:: Properties for Lisp programmers - - -File: org, Node: Property syntax, Next: Special properties, Up: Properties and columns - -7.1 Property syntax -=================== - -Properties are key-value pairs. When they are associated with a single -entry or with a tree they need to be inserted into a special drawer -(*note Drawers::) with the name `PROPERTIES', which has to be located -right below a headline, and its planning line (*note Deadlines and -scheduling::) when applicable. Each property is specified on a single -line, with the key (surrounded by colons) first, and the value after -it. Keys are case-insensitives. Here is an example: - - * CD collection - ** Classic - *** Goldberg Variations - :PROPERTIES: - :Title: Goldberg Variations - :Composer: J.S. Bach - :Artist: Glen Gould - :Publisher: Deutsche Grammophon - :NDisks: 1 - :END: - - Depending on the value of `org-use-property-inheritance', a property -set this way will either be associated with a single entry, or the -subtree defined by the entry, see *note Property inheritance::. - - You may define the allowed values for a particular property `:Xyz:' -by setting a property `:Xyz_ALL:'. This special property is -_inherited_, so if you set it in a level 1 entry, it will apply to the -entire tree. When allowed values are defined, setting the -corresponding property becomes easier and is less prone to typing -errors. For the example with the CD collection, we can predefine -publishers and the number of disks in a box like this: - - * CD collection - :PROPERTIES: - :NDisks_ALL: 1 2 3 4 - :Publisher_ALL: "Deutsche Grammophon" Philips EMI - :END: - - If you want to set properties that can be inherited by any entry in a -file, use a line like - #+PROPERTY: NDisks_ALL 1 2 3 4 - - Contrary to properties set from a special drawer, you have to -refresh the buffer with `C-c C-c' to activate this change. - - If you want to add to the value of an existing property, append a -`+' to the property name. The following results in the property `var' -having the value "foo=1 bar=2". - #+PROPERTY: var foo=1 - #+PROPERTY: var+ bar=2 - - It is also possible to add to the values of inherited properties. -The following results in the `genres' property having the value "Classic -Baroque" under the `Goldberg Variations' subtree. - * CD collection - ** Classic - :PROPERTIES: - :GENRES: Classic - :END: - *** Goldberg Variations - :PROPERTIES: - :Title: Goldberg Variations - :Composer: J.S. Bach - :Artist: Glen Gould - :Publisher: Deutsche Grammophon - :NDisks: 1 - :GENRES+: Baroque - :END: - Note that a property can only have one entry per Drawer. - - Property values set with the global variable `org-global-properties' -can be inherited by all entries in all Org files. - -The following commands help to work with properties: - -`M- (`pcomplete')' - After an initial colon in a line, complete property keys. All - keys used in the current file will be offered as possible - completions. - -`C-c C-x p (`org-set-property')' - Set a property. This prompts for a property name and a value. If - necessary, the property drawer is created as well. - -`C-u M-x org-insert-drawer RET' - Insert a property drawer into the current entry. The drawer will - be inserted early in the entry, but after the lines with planning - information like deadlines. - -`C-c C-c (`org-property-action')' - With the cursor in a property drawer, this executes property - commands. - -`C-c C-c s (`org-set-property')' - Set a property in the current entry. Both the property and the - value can be inserted using completion. - -`S- (`org-property-next-allowed-value')' -`S- (`org-property-previous-allowed-value')' - Switch property at point to the next/previous allowed value. - -`C-c C-c d (`org-delete-property')' - Remove a property from the current entry. - -`C-c C-c D (`org-delete-property-globally')' - Globally remove a property, from all entries in the current file. - -`C-c C-c c (`org-compute-property-at-point')' - Compute the property at point, using the operator and scope from - the nearest column format definition. - - -File: org, Node: Special properties, Next: Property searches, Prev: Property syntax, Up: Properties and columns - -7.2 Special properties -====================== - -Special properties provide an alternative access method to Org mode -features, like the TODO state or the priority of an entry, discussed in -the previous chapters. This interface exists so that you can include -these states in a column view (*note Column view::), or to use them in -queries. The following property names are special and should not be -used as keys in the properties drawer: - - ALLTAGS All tags, including inherited ones. - BLOCKED "t" if task is currently blocked by children or siblings. - CLOCKSUM The sum of CLOCK intervals in the subtree. `org-clock-sum' - must be run first to compute the values in the current buffer. - CLOCKSUM_T The sum of CLOCK intervals in the subtree for today. - `org-clock-sum-today' must be run first to compute the - values in the current buffer. - CLOSED When was this entry closed? - DEADLINE The deadline time string, without the angular brackets. - FILE The filename the entry is located in. - ITEM The headline of the entry. - PRIORITY The priority of the entry, a string with a single letter. - SCHEDULED The scheduling timestamp, without the angular brackets. - TAGS The tags defined directly in the headline. - TIMESTAMP The first keyword-less timestamp in the entry. - TIMESTAMP_IA The first inactive timestamp in the entry. - TODO The TODO keyword of the entry. - - -File: org, Node: Property searches, Next: Property inheritance, Prev: Special properties, Up: Properties and columns - -7.3 Property searches -===================== - -To create sparse trees and special lists with selection based on -properties, the same commands are used as for tag searches (*note Tag -searches::). - -`C-c / m or C-c \ (`org-match-sparse-tree')' - Create a sparse tree with all matching entries. With a `C-u' - prefix argument, ignore headlines that are not a TODO line. - -`C-c a m (`org-tags-view')' - Create a global list of tag/property matches from all agenda - files. *Note Matching tags and properties::. - -`C-c a M (`org-tags-view')' - Create a global list of tag matches from all agenda files, but - check only TODO items and force checking of subitems (see the - option `org-tags-match-list-sublevels'). - - The syntax for the search string is described in *note Matching tags -and properties::. - - There is also a special command for creating sparse trees based on a -single property: - -`C-c / p' - Create a sparse tree based on the value of a property. This first - prompts for the name of a property, and then for a value. A - sparse tree is created with all entries that define this property - with the given value. If you enclose the value in curly braces, - it is interpreted as a regular expression and matched against the - property values. - - -File: org, Node: Property inheritance, Next: Column view, Prev: Property searches, Up: Properties and columns - -7.4 Property Inheritance -======================== - -The outline structure of Org mode documents lends itself to an -inheritance model of properties: if the parent in a tree has a certain -property, the children can inherit this property. Org mode does not -turn this on by default, because it can slow down property searches -significantly and is often not needed. However, if you find inheritance -useful, you can turn it on by setting the variable -`org-use-property-inheritance'. It may be set to `t' to make all -properties inherited from the parent, to a list of properties that -should be inherited, or to a regular expression that matches inherited -properties. If a property has the value `nil', this is interpreted as -an explicit undefine of the property, so that inheritance search will -stop at this value and return `nil'. - - Org mode has a few properties for which inheritance is hard-coded, at -least for the special applications for which they are used: - -`COLUMNS' - The `:COLUMNS:' property defines the format of column view (*note - Column view::). It is inherited in the sense that the level where - a `:COLUMNS:' property is defined is used as the starting point - for a column view table, independently of the location in the - subtree from where columns view is turned on. - -`CATEGORY' - For agenda view, a category set through a `:CATEGORY:' property - applies to the entire subtree. - -`ARCHIVE' - For archiving, the `:ARCHIVE:' property may define the archive - location for the entire subtree (*note Moving subtrees::). - -`LOGGING' - The LOGGING property may define logging settings for an entry or a - subtree (*note Tracking TODO state changes::). - - -File: org, Node: Column view, Next: Property API, Prev: Property inheritance, Up: Properties and columns - -7.5 Column view -=============== - -A great way to view and edit properties in an outline tree is _column -view_. In column view, each outline node is turned into a table row. -Columns in this table provide access to properties of the entries. Org -mode implements columns by overlaying a tabular structure over the -headline of each item. While the headlines have been turned into a -table row, you can still change the visibility of the outline tree. -For example, you get a compact table by switching to CONTENTS view -(`S- S-', or simply `c' while column view is active), but you -can still open, read, and edit the entry below each headline. Or, you -can switch to column view after executing a sparse tree command and in -this way get a table only for the selected items. Column view also -works in agenda buffers (*note Agenda views::) where queries have -collected selected items, possibly from a number of files. - -* Menu: - -* Defining columns:: The COLUMNS format property -* Using column view:: How to create and use column view -* Capturing column view:: A dynamic block for column view - - -File: org, Node: Defining columns, Next: Using column view, Up: Column view - -7.5.1 Defining columns ----------------------- - -Setting up a column view first requires defining the columns. This is -done by defining a column format line. - -* Menu: - -* Scope of column definitions:: Where defined, where valid? -* Column attributes:: Appearance and content of a column - - -File: org, Node: Scope of column definitions, Next: Column attributes, Up: Defining columns - -7.5.1.1 Scope of column definitions -................................... - -To define a column format for an entire file, use a line like - - #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO - - To specify a format that only applies to a specific tree, add a -`:COLUMNS:' property to the top node of that tree, for example: - - ** Top node for columns view - :PROPERTIES: - :COLUMNS: %25ITEM %TAGS %PRIORITY %TODO - :END: - - If a `:COLUMNS:' property is present in an entry, it defines columns -for the entry itself, and for the entire subtree below it. Since the -column definition is part of the hierarchical structure of the document, -you can define columns on level 1 that are general enough for all -sublevels, and more specific columns further down, when you edit a -deeper part of the tree. - - -File: org, Node: Column attributes, Prev: Scope of column definitions, Up: Defining columns - -7.5.1.2 Column attributes -......................... - -A column definition sets the attributes of a column. The general -definition looks like this: - - %[WIDTH]PROPERTY[(TITLE)][{SUMMARY-TYPE}] - -Except for the percent sign and the property name, all items are -optional. The individual parts have the following meaning: - - WIDTH An integer specifying the width of the column in characters. - If omitted, the width will be determined automatically. - PROPERTY The property that should be edited in this column. - Special properties representing meta data are allowed here - as well (*note Special properties::) - TITLE The header text for the column. If omitted, the property - name is used. - {SUMMARY-TYPE} The summary type. If specified, the column values for - parent nodes are computed from the children(1). - Supported summary types are: - {+} Sum numbers in this column. - {+;%.1f} Like `+', but format result with `%.1f'. - {$} Currency, short for `+;%.2f'. - {min} Smallest number in column. - {max} Largest number. - {mean} Arithmetic mean of numbers. - {X} Checkbox status, `[X]' if all children are `[X]'. - {X/} Checkbox status, `[n/m]'. - {X%} Checkbox status, `[n%]'. - {:} Sum times, HH:MM, plain numbers are - hours(2). - {:min} Smallest time value in column. - {:max} Largest time value. - {:mean} Arithmetic mean of time values. - {@min} Minimum age(3) (in - days/hours/mins/seconds). - {@max} Maximum age (in days/hours/mins/seconds). - {@mean} Arithmetic mean of ages (in days/hours/mins/seconds). - {est+} Add `low-high' estimates. - - The `est+' summary type requires further explanation. It is used for -combining estimates, expressed as `low-high' ranges or plain numbers. -For example, instead of estimating a particular task will take 5 days, -you might estimate it as 5-6 days if you're fairly confident you know -how much work is required, or 1-10 days if you don't really know what -needs to be done. Both ranges average at 5.5 days, but the first -represents a more predictable delivery. - - When combining a set of such estimates, simply adding the lows and -highs produces an unrealistically wide result. Instead, `est+' adds the -statistical mean and variance of the sub-tasks, generating a final -estimate from the sum. For example, suppose you had ten tasks, each of -which was estimated at 0.5 to 2 days of work. Straight addition -produces an estimate of 5 to 20 days, representing what to expect if -everything goes either extremely well or extremely poorly. In -contrast, `est+' estimates the full job more realistically, at 10-15 -days. - - Numbers are right-aligned when a format specifier with an explicit -width like `%5d' or `%5.1f' is used. - - You can also define custom summary types by setting -`org-columns-summary-types', which see. - - Here is an example for a complete columns definition, along with -allowed values. - - :COLUMNS: %25ITEM %9Approved(Approved?){X} %Owner %11Status \(4) - %10Time_Estimate{:} %CLOCKSUM %CLOCKSUM_T - :Owner_ALL: Tammy Mark Karl Lisa Don - :Status_ALL: "In progress" "Not started yet" "Finished" "" - :Approved_ALL: "[ ]" "[X]" - -The first column, `%25ITEM', means the first 25 characters of the item -itself, i.e., of the headline. You probably always should start the -column definition with the `ITEM' specifier. The other specifiers -create columns `Owner' with a list of names as allowed values, for -`Status' with four different possible values, and for a checkbox field -`Approved'. When no width is given after the `%' character, the column -will be exactly as wide as it needs to be in order to fully display all -values. The `Approved' column does have a modified title (`Approved?', -with a question mark). Summaries will be created for the -`Time_Estimate' column by adding time duration expressions like HH:MM, -and for the `Approved' column, by providing an `[X]' status if all -children have been checked. The `CLOCKSUM' and `CLOCKSUM_T' columns -are special, they lists the sums of CLOCK intervals in the subtree, -either for all clocks or just for today. - - ---------- Footnotes ---------- - - (1) If more than one summary type apply to the -property, the parent values are computed according to -the first of them. - - (2) A time can also be a duration, using effort -modifiers defined in `org-effort-durations', e.g., `3d -1h'. If any value in the column is as such, the -summary will also be an effort duration. - - (3) An age is defined as a duration since a given -time-stamp (*note Timestamps::). It can also be -expressed as days, hours, minutes and seconds, -identified by `d', `h', `m' and `s' suffixes, all -mandatory, e.g., `0d 13h 0m 10s'. - - (4) Please note that the COLUMNS definition must be on a single -line--it is wrapped here only because of formatting constraints. - - -File: org, Node: Using column view, Next: Capturing column view, Prev: Defining columns, Up: Column view - -7.5.2 Using column view ------------------------ - -Turning column view on and off -.............................. - -`C-c C-x C-c (`org-columns')' - Turn on column view. If the cursor is before the first headline - in the file, or the function called with the universal prefix - argument, column view is turned on for the entire file, using the - `#+COLUMNS' definition. If the cursor is somewhere inside the - outline, this command searches the hierarchy, up from point, for a - `:COLUMNS:' property that defines a format. When one is found, - the column view table is established for the tree starting at the - entry that contains the `:COLUMNS:' property. If no such property - is found, the format is taken from the `#+COLUMNS' line or from the - variable `org-columns-default-format', and column view is - established for the current entry and its subtree. - -`r (`org-columns-redo')' - Recreate the column view, to include recent changes made in the - buffer. - -`g (`org-columns-redo')' - Same as `r'. - -`q (`org-columns-quit')' - Exit column view. - -Editing values -.............. - -` ' - Move through the column view from field to field. - -`S-/' - Switch to the next/previous allowed value of the field. For this, - you have to have specified allowed values for a property. - -`1..9,0' - Directly select the Nth allowed value, `0' selects the 10th value. - -`n (`org-columns-next-allowed-value')' -`p (`org-columns-previous-allowed-value')' - Same as `S-/' - -`e (`org-columns-edit-value')' - Edit the property at point. For the special properties, this will - invoke the same interface that you normally use to change that - property. For example, when editing a TAGS property, the tag - completion or fast selection interface will pop up. - -`C-c C-c (`org-columns-set-tags-or-toggle')' - When there is a checkbox at point, toggle it. - -`v (`org-columns-show-value')' - View the full value of this property. This is useful if the width - of the column is smaller than that of the value. - -`a (`org-columns-edit-allowed')' - Edit the list of allowed values for this property. If the list is - found in the hierarchy, the modified value is stored there. If no - list is found, the new value is stored in the first entry that is - part of the current column view. - -Modifying the table structure -............................. - -`< (`org-columns-narrow')' -`> (`org-columns-widen')' - Make the column narrower/wider by one character. - -`S-M- (`org-columns-new')' - Insert a new column, to the left of the current column. - -`S-M- (`org-columns-delete')' - Delete the current column. - - -File: org, Node: Capturing column view, Prev: Using column view, Up: Column view - -7.5.3 Capturing column view ---------------------------- - -Since column view is just an overlay over a buffer, it cannot be -exported or printed directly. If you want to capture a column view, use -a `columnview' dynamic block (*note Dynamic blocks::). The frame of -this block looks like this: - - * The column view - #+BEGIN: columnview :hlines 1 :id "label" - - #+END: - -This dynamic block has the following parameters: - -`:id' - This is the most important parameter. Column view is a feature - that is often localized to a certain (sub)tree, and the capture - block might be at a different location in the file. To identify - the tree whose view to capture, you can use 4 values: - local use the tree in which the capture block is located - global make a global view, including all headings in the file - "file:PATH-TO-FILE" - run column view at the top of this file - "ID" call column view in the tree that has an `:ID:' - property with the value label. You can use - `M-x org-id-copy RET' to create a globally unique ID for - the current entry and copy it to the kill-ring. - -`:hlines' - When `t', insert an hline after every line. When a number N, - insert an hline before each headline with level `<= N'. - -`:vlines' - When set to `t', force column groups to get vertical lines. - -`:maxlevel' - When set to a number, don't capture entries below this level. - -`:skip-empty-rows' - When set to `t', skip rows where the only non-empty specifier of - the column view is `ITEM'. - -`:indent' - When non-`nil', indent each `ITEM' field according to its level. - - -The following commands insert or update the dynamic block: - -`C-c C-x i (`org-insert-columns-dblock')' - Insert a dynamic block capturing a column view. You will be - prompted for the scope or ID of the view. - -`C-c C-c or C-c C-x C-u (`org-dblock-update')' - Update dynamic block at point. The cursor needs to be in the - `#+BEGIN' line of the dynamic block. - -`C-u C-c C-x C-u (`org-update-all-dblocks')' - Update all dynamic blocks (*note Dynamic blocks::). This is - useful if you have several clock table blocks, column-capturing - blocks or other dynamic blocks in a buffer. - - You can add formulas to the column view table and you may add -plotting instructions in front of the table--these will survive an -update of the block. If there is a `#+TBLFM:' after the table, the -table will actually be recalculated automatically after an update. - - An alternative way to capture and process property values into a -table is provided by Eric Schulte's `org-collector.el' which is a -contributed package(1). It provides a general API to collect -properties from entries in a certain scope, and arbitrary Lisp -expressions to process these values before inserting them into a table -or a dynamic block. - - ---------- Footnotes ---------- - - (1) Contributed packages are not part of Emacs, but are distributed -with the main distribution of Org (visit `http://orgmode.org'). - - -File: org, Node: Property API, Prev: Column view, Up: Properties and columns - -7.6 The Property API -==================== - -There is a full API for accessing and changing properties. This API can -be used by Emacs Lisp programs to work with properties and to implement -features based on them. For more information see *note Using the -property API::. - - -File: org, Node: Dates and times, Next: Capture - Refile - Archive, Prev: Properties and columns, Up: Top - -8 Dates and times -***************** - -To assist project planning, TODO items can be labeled with a date and/or -a time. The specially formatted string carrying the date and time -information is called a _timestamp_ in Org mode. This may be a little -confusing because timestamp is often used to indicate when something -was created or last changed. However, in Org mode this term is used in -a much wider sense. - -* Menu: - -* Timestamps:: Assigning a time to a tree entry -* Creating timestamps:: Commands which insert timestamps -* Deadlines and scheduling:: Planning your work -* Clocking work time:: Tracking how long you spend on a task -* Effort estimates:: Planning work effort in advance -* Timers:: Notes with a running timer - - -File: org, Node: Timestamps, Next: Creating timestamps, Up: Dates and times - -8.1 Timestamps, deadlines, and scheduling -========================================= - -A timestamp is a specification of a date (possibly with a time or a -range of times) in a special format, either `<2003-09-16 Tue>'(1) or -`<2003-09-16 Tue 09:39>' or `<2003-09-16 Tue 12:00-12:30>'(2). A -timestamp can appear anywhere in the headline or body of an Org tree -entry. Its presence causes entries to be shown on specific dates in the -agenda (*note Weekly/daily agenda::). We distinguish: - -PLAIN TIMESTAMP; EVENT; APPOINTMENT - A simple timestamp just assigns a date/time to an item. This is - just like writing down an appointment or event in a paper agenda. - In the agenda display, the headline of an entry associated with a - plain timestamp will be shown exactly on that date. - - * Meet Peter at the movies - <2006-11-01 Wed 19:15> - * Discussion on climate change - <2006-11-02 Thu 20:00-22:00> - -TIMESTAMP WITH REPEATER INTERVAL - A timestamp may contain a _repeater interval_, indicating that it - applies not only on the given date, but again and again after a - certain interval of N days (d), weeks (w), months (m), or years - (y). The following will show up in the agenda every Wednesday: - - * Pick up Sam at school - <2007-05-16 Wed 12:30 +1w> - -DIARY-STYLE SEXP ENTRIES - For more complex date specifications, Org mode supports using the - special sexp diary entries implemented in the Emacs calendar/diary - package(3). For example with optional time - - * 22:00-23:00 The nerd meeting on every 2nd Thursday of the month - <%%(diary-float t 4 2)> - -TIME/DATE RANGE - Two timestamps connected by `--' denote a range. The headline - will be shown on the first and last day of the range, and on any - dates that are displayed and fall in the range. Here is an - example: - - ** Meeting in Amsterdam - <2004-08-23 Mon>--<2004-08-26 Thu> - -INACTIVE TIMESTAMP - Just like a plain timestamp, but with square brackets instead of - angular ones. These timestamps are inactive in the sense that - they do _not_ trigger an entry to show up in the agenda. - - * Gillian comes late for the fifth time - [2006-11-01 Wed] - - - ---------- Footnotes ---------- - - (1) In this simplest form, the day name is optional when you type -the date yourself. However, any dates inserted or modified by Org will -add that day name, for reading convenience. - - (2) This is inspired by the standard ISO 8601 date/time format. To -use an alternative format, see *note Custom time format::. - - (3) When working with the standard diary sexp functions, you need to -be very careful with the order of the arguments. That order depends -evilly on the variable `calendar-date-style' (or, for older Emacs -versions, `european-calendar-style'). For example, to specify a date -December 1, 2005, the call might look like `(diary-date 12 1 2005)' or -`(diary-date 1 12 2005)' or `(diary-date 2005 12 1)', depending on the -settings. This has been the source of much confusion. Org mode users -can resort to special versions of these functions like `org-date' or -`org-anniversary'. These work just like the corresponding `diary-' -functions, but with stable ISO order of arguments (year, month, day) -wherever applicable, independent of the value of `calendar-date-style'. - - -File: org, Node: Creating timestamps, Next: Deadlines and scheduling, Prev: Timestamps, Up: Dates and times - -8.2 Creating timestamps -======================= - -For Org mode to recognize timestamps, they need to be in the specific -format. All commands listed below produce timestamps in the correct -format. - -`C-c . (`org-time-stamp')' - Prompt for a date and insert a corresponding timestamp. When the - cursor is at an existing timestamp in the buffer, the command is - used to modify this timestamp instead of inserting a new one. - When this command is used twice in succession, a time range is - inserted. - -`C-c ! (`org-time-stamp-inactive')' - Like `C-c .', but insert an inactive timestamp that will not cause - an agenda entry. - -`C-u C-c .' -`C-u C-c !' - Like `C-c .' and `C-c !', but use the alternative format which - contains date and time. The default time can be rounded to - multiples of 5 minutes, see the option - `org-time-stamp-rounding-minutes'. - -`C-c C-c' - Normalize timestamp, insert/fix day name if missing or wrong. - -`C-c < (`org-date-from-calendar')' - Insert a timestamp corresponding to the cursor date in the - Calendar. - -`C-c > (`org-goto-calendar')' - Access the Emacs calendar for the current date. If there is a - timestamp in the current line, go to the corresponding date - instead. - -`C-c C-o (`org-open-at-point')' - Access the agenda for the date given by the timestamp or -range at - point (*note Weekly/daily agenda::). - -`S- (`org-timestamp-down-day')' -`S- (`org-timestamp-up-day')' - Change date at cursor by one day. These key bindings conflict with - shift-selection and related modes (*note Conflicts::). - -`S- (`org-timestamp-up')' -`S- (`org-timestamp-down-down')' - Change the item under the cursor in a timestamp. The cursor can - be on a year, month, day, hour or minute. When the timestamp - contains a time range like `15:30-16:30', modifying the first time - will also shift the second, shifting the time block with constant - length. To change the length, modify the second time. Note that - if the cursor is in a headline and not at a timestamp, these same - keys modify the priority of an item. (*note Priorities::). The - key bindings also conflict with shift-selection and related modes - (*note Conflicts::). - -`C-c C-y (`org-evaluate-time-range')' - Evaluate a time range by computing the difference between start - and end. With a prefix argument, insert result after the time - range (in a table: into the following column). - -* Menu: - -* The date/time prompt:: How Org mode helps you entering date and time -* Custom time format:: Making dates look different - - -File: org, Node: The date/time prompt, Next: Custom time format, Up: Creating timestamps - -8.2.1 The date/time prompt --------------------------- - -When Org mode prompts for a date/time, the default is shown in default -date/time format, and the prompt therefore seems to ask for a specific -format. But it will in fact accept date/time information in a variety -of formats. Generally, the information should start at the beginning -of the string. Org mode will find whatever information is in there and -derive anything you have not specified from the _default date and -time_. The default is usually the current date and time, but when -modifying an existing timestamp, or when entering the second stamp of a -range, it is taken from the stamp in the buffer. When filling in -information, Org mode assumes that most of the time you will want to -enter a date in the future: if you omit the month/year and the given -day/month is before today, it will assume that you mean a future -date(1). If the date has been automatically shifted into the future, -the time prompt will show this with `(=>F).' - - For example, let's assume that today is June 13, 2006. Here is how -various inputs will be interpreted, the items filled in by Org mode are -in bold. - - 3-2-5 => 2003-02-05 - 2/5/3 => 2003-02-05 - 14 => 2006-06-14 - 12 => 2006-07-12 - 2/5 => 2007-02-05 - Fri => nearest Friday after the default date - sep 15 => 2006-09-15 - feb 15 => 2007-02-15 - sep 12 9 => 2009-09-12 - 12:45 => 2006-06-13 12:45 - 22 sept 0:34 => 2006-09-22 00:34 - w4 => ISO week four of the current year 2006 - 2012 w4 fri => Friday of ISO week 4 in 2012 - 2012-w04-5 => Same as above - - Furthermore you can specify a relative date by giving, as the _first_ -thing in the input: a plus/minus sign, a number and a letter ([hdwmy]) -to indicate change in hours, days, weeks, months, or years. With a -single plus or minus, the date is always relative to today. With a -double plus or minus, it is relative to the default date. If instead -of a single letter, you use the abbreviation of day name, the date will -be the Nth such day, e.g.: - - +0 => today - . => today - +4d => four days from today - +4 => same as above - +2w => two weeks from today - ++5 => five days from default date - +2tue => second Tuesday from now - -wed => last Wednesday - - The function understands English month and weekday abbreviations. If -you want to use unabbreviated names and/or other languages, configure -the variables `parse-time-months' and `parse-time-weekdays'. - - Not all dates can be represented in a given Emacs implementation. -By default Org mode forces dates into the compatibility range 1970-2037 -which works on all Emacs implementations. If you want to use dates -outside of this range, read the docstring of the variable -`org-read-date-force-compatible-dates'. - - You can specify a time range by giving start and end times or by -giving a start time and a duration (in HH:MM format). Use one or two -dash(es) as the separator in the former case and use '+' as the -separator in the latter case, e.g.: - - 11am-1:15pm => 11:00-13:15 - 11am--1:15pm => same as above - 11am+2:15 => same as above - - Parallel to the minibuffer prompt, a calendar is popped up(2). When -you exit the date prompt, either by clicking on a date in the calendar, -or by pressing , the date selected in the calendar will be -combined with the information entered at the prompt. You can control -the calendar fully from the minibuffer: - - Choose date at cursor in calendar. - mouse-1 Select date by clicking on it. - S-/ One day forward/backward. - S-/ One week forward/backward. - M-S-/ One month forward/backward. - > / < Scroll calendar forward/backward by one month. - M-v / C-v Scroll calendar forward/backward by 3 months. - M-S-/ Scroll calendar forward/backward by one year. - - The actions of the date/time prompt may seem complex, but I assure -you they will grow on you, and you will start getting annoyed by pretty -much any other way of entering a date/time out there. To help you -understand what is going on, the current interpretation of your input -will be displayed live in the minibuffer(3). - - ---------- Footnotes ---------- - - (1) See the variable `org-read-date-prefer-future'. You may set -that variable to the symbol `time' to even make a time before now shift -the date to tomorrow. - - (2) If you don't need/want the calendar, configure the variable -`org-popup-calendar-for-date-prompt'. - - (3) If you find this distracting, turn the display off with -`org-read-date-display-live'. - - -File: org, Node: Custom time format, Prev: The date/time prompt, Up: Creating timestamps - -8.2.2 Custom time format ------------------------- - -Org mode uses the standard ISO notation for dates and times as it is -defined in ISO 8601. If you cannot get used to this and require another -representation of date and time to keep you happy, you can get it by -customizing the options `org-display-custom-times' and -`org-time-stamp-custom-formats'. - -`C-c C-x C-t (`org-toggle-time-stamp-overlays')' - Toggle the display of custom formats for dates and times. - -Org mode needs the default format for scanning, so the custom date/time -format does not _replace_ the default format--instead it is put _over_ -the default format using text properties. This has the following -consequences: - * You cannot place the cursor onto a timestamp anymore, only before - or after. - - * The `S-/' keys can no longer be used to adjust each - component of a timestamp. If the cursor is at the beginning of - the stamp, `S-/' will change the stamp by one day, just - like `S-/'. At the end of the stamp, the time will - be changed by one minute. - - * If the timestamp contains a range of clock times or a repeater, - these will not be overlaid, but remain in the buffer as they were. - - * When you delete a timestamp character-by-character, it will only - disappear from the buffer after _all_ (invisible) characters - belonging to the ISO timestamp have been removed. - - * If the custom timestamp format is longer than the default and you - are using dates in tables, table alignment will be messed up. If - the custom format is shorter, things do work as expected. - - -File: org, Node: Deadlines and scheduling, Next: Clocking work time, Prev: Creating timestamps, Up: Dates and times - -8.3 Deadlines and scheduling -============================ - -A timestamp may be preceded by special keywords to facilitate planning. -Both the timestamp and the keyword have to be positioned immediatly -after the task they refer to. - -DEADLINE - Meaning: the task (most likely a TODO item, though not - necessarily) is supposed to be finished on that date. - - On the deadline date, the task will be listed in the agenda. In - addition, the agenda for _today_ will carry a warning about the - approaching or missed deadline, starting - `org-deadline-warning-days' before the due date, and continuing - until the entry is marked DONE. An example: - - *** TODO write article about the Earth for the Guide - DEADLINE: <2004-02-29 Sun> - The editor in charge is [[bbdb:Ford Prefect]] - - You can specify a different lead time for warnings for a specific - deadline using the following syntax. Here is an example with a - warning period of 5 days `DEADLINE: <2004-02-29 Sun -5d>'. This - warning is deactivated if the task gets scheduled and you set - `org-agenda-skip-deadline-prewarning-if-scheduled' to `t'. - -SCHEDULED - Meaning: you are planning to start working on that task on the - given date. - - The headline will be listed under the given date(1). In addition, - a reminder that the scheduled date has passed will be present in - the compilation for _today_, until the entry is marked DONE, i.e., - the task will automatically be forwarded until completed. - - *** TODO Call Trillian for a date on New Years Eve. - SCHEDULED: <2004-12-25 Sat> - - If you want to _delay_ the display of this task in the agenda, use - `SCHEDULED: <2004-12-25 Sat -2d>': the task is still scheduled on - the 25th but will appear two days later. In case the task - contains a repeater, the delay is considered to affect all - occurrences; if you want the delay to only affect the first - scheduled occurrence of the task, use `--2d' instead. See - `org-scheduled-delay-days' and - `org-agenda-skip-scheduled-delay-if-deadline' for details on how to - control this globally or per agenda. - - Important: Scheduling an item in Org mode should not be understood - in the same way that we understand scheduling a meeting. Setting - a date for a meeting is just a simple appointment, you should mark - this entry with a simple plain timestamp, to get this item shown - on the date where it applies. This is a frequent misunderstanding - by Org users. In Org mode, scheduling means setting a date when - you want to start working on an action item. - - You may use timestamps with repeaters in scheduling and deadline -entries. Org mode will issue early and late warnings based on the -assumption that the timestamp represents the nearest instance of the -repeater. However, the use of diary sexp entries like `<%%(diary-float -t 42)>' in scheduling and deadline timestamps is limited. Org mode -does not know enough about the internals of each sexp function to issue -early and late warnings. However, it will show the item on each day -where the sexp entry matches. - -* Menu: - -* Inserting deadline/schedule:: Planning items -* Repeated tasks:: Items that show up again and again - - ---------- Footnotes ---------- - - (1) It will still be listed on that date after it has been marked -DONE. If you don't like this, set the variable -`org-agenda-skip-scheduled-if-done'. - - -File: org, Node: Inserting deadline/schedule, Next: Repeated tasks, Up: Deadlines and scheduling - -8.3.1 Inserting deadlines or schedules --------------------------------------- - -The following commands allow you to quickly insert a deadline or to -schedule an item: - -`C-c C-d (`org-deadline')' - Insert `DEADLINE' keyword along with a stamp. Any CLOSED - timestamp will be removed. When called with a prefix arg, an - existing deadline will be removed from the entry. Depending on - the variable `org-log-redeadline'(1), a note will be taken when - changing an existing deadline. - -`C-c C-s (`org-schedule')' - Insert `SCHEDULED' keyword along with a stamp. Any CLOSED - timestamp will be removed. When called with a prefix argument, - remove the scheduling date from the entry. Depending on the - variable `org-log-reschedule'(2), a note will be taken when - changing an existing scheduling time. - -`C-c / d (`org-check-deadlines')' - Create a sparse tree with all deadlines that are either past-due, - or which will become due within `org-deadline-warning-days'. With - `C-u' prefix, show all deadlines in the file. With a numeric - prefix, check that many days. For example, `C-1 C-c / d' shows - all deadlines due tomorrow. - -`C-c / b (`org-check-before-date')' - Sparse tree for deadlines and scheduled items before a given date. - -`C-c / a (`org-check-after-date')' - Sparse tree for deadlines and scheduled items after a given date. - - Note that `org-schedule' and `org-deadline' supports setting the -date by indicating a relative time: e.g., +1d will set the date to the -next day after today, and -1w will set the date to the previous week -before any current timestamp. - - ---------- Footnotes ---------- - - (1) with corresponding `#+STARTUP' keywords `logredeadline', -`lognoteredeadline', and `nologredeadline' - - (2) with corresponding `#+STARTUP' keywords `logreschedule', -`lognotereschedule', and `nologreschedule' - - -File: org, Node: Repeated tasks, Prev: Inserting deadline/schedule, Up: Deadlines and scheduling - -8.3.2 Repeated tasks --------------------- - -Some tasks need to be repeated again and again. Org mode helps to -organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED, -or plain timestamp. In the following example - ** TODO Pay the rent - DEADLINE: <2005-10-01 Sat +1m> - the `+1m' is a repeater; the intended interpretation is that the task -has a deadline on <2005-10-01> and repeats itself every (one) month -starting from that time. You can use yearly, monthly, weekly, daily -and hourly repeat cookies by using the `y/w/m/d/h' letters. If you -need both a repeater and a special warning period in a deadline entry, -the repeater should come first and the warning period last: `DEADLINE: -<2005-10-01 Sat +1m -3d>'. - - Deadlines and scheduled items produce entries in the agenda when -they are over-due, so it is important to be able to mark such an entry -as completed once you have done so. When you mark a DEADLINE or a -SCHEDULE with the TODO keyword DONE, it will no longer produce entries -in the agenda. The problem with this is, however, that then also the -_next_ instance of the repeated entry will not be active. Org mode -deals with this in the following way: When you try to mark such an -entry DONE (using `C-c C-t'), it will shift the base date of the -repeating timestamp by the repeater interval, and immediately set the -entry state back to TODO(1). In the example above, setting the state -to DONE would actually switch the date like this: - - ** TODO Pay the rent - DEADLINE: <2005-11-01 Tue +1m> - - To mark a task with a repeater as `DONE', use `C-- 1 C-c C-t' (i.e., -`org-todo' with a numeric prefix argument of -1.) - - A timestamp(2) will be added under the deadline, to keep a record -that you actually acted on the previous instance of this deadline. - - As a consequence of shifting the base date, this entry will no -longer be visible in the agenda when checking past dates, but all -future instances will be visible. - - With the `+1m' cookie, the date shift will always be exactly one -month. So if you have not paid the rent for three months, marking this -entry DONE will still keep it as an overdue deadline. Depending on the -task, this may not be the best way to handle it. For example, if you -forgot to call your father for 3 weeks, it does not make sense to call -him 3 times in a single day to make up for it. Finally, there are tasks -like changing batteries which should always repeat a certain time after -the last time you did it. For these tasks, Org mode has special -repeaters `++' and `.+'. For example: - - ** TODO Call Father - DEADLINE: <2008-02-10 Sun ++1w> - Marking this DONE will shift the date by at least one week, - but also by as many weeks as it takes to get this date into - the future. However, it stays on a Sunday, even if you called - and marked it done on Saturday. - ** TODO Empty kitchen trash - DEADLINE: <2008-02-08 Fri 20:00 ++1d> - Marking this DONE will shift the date by at least one day, and - also by as many days as it takes to get the timestamp into the - future. Since there is a time in the timestamp, the next - deadline in the future will be on today's date if you - complete the task before 20:00. - ** TODO Check the batteries in the smoke detectors - DEADLINE: <2005-11-01 Tue .+1m> - Marking this DONE will shift the date to one month after - today. - - You may have both scheduling and deadline information for a specific -task. If the repeater is set for the scheduling information only, you -probably want the repeater to be ignored after the deadline. If so, -set the variable `org-agenda-skip-scheduled-if-deadline-is-shown' to -`repeated-after-deadline'. However, any scheduling information without -a repeater is no longer relevant once the task is done, and thus, -removed upon repeating the task. If you want both scheduling and -deadline information to repeat after the same interval, set the same -repeater for both timestamps. - - An alternative to using a repeater is to create a number of copies -of a task subtree, with dates shifted in each copy. The command `C-c -C-x c' was created for this purpose, it is described in *note Structure -editing::. - - ---------- Footnotes ---------- - - (1) In fact, the target state is taken from, in this sequence, the -`REPEAT_TO_STATE' property or the variable `org-todo-repeat-to-state'. -If neither of these is specified, the target state defaults to the -first state of the TODO state sequence. - - (2) You can change this using the option `org-log-repeat', or the -`#+STARTUP' options `logrepeat', `lognoterepeat', and `nologrepeat'. -With `lognoterepeat', you will also be prompted for a note. - - -File: org, Node: Clocking work time, Next: Effort estimates, Prev: Deadlines and scheduling, Up: Dates and times - -8.4 Clocking work time -====================== - -Org mode allows you to clock the time you spend on specific tasks in a -project. When you start working on an item, you can start the clock. -When you stop working on that task, or when you mark the task done, the -clock is stopped and the corresponding time interval is recorded. It -also computes the total time spent on each subtree(1) of a project. -And it remembers a history or tasks recently clocked, so that you can -jump quickly between a number of tasks absorbing your time. - - To save the clock history across Emacs sessions, use - (setq org-clock-persist 'history) - (org-clock-persistence-insinuate) - When you clock into a new task after resuming Emacs, the incomplete -clock(2) will be found (*note Resolving idle time::) and you will be -prompted about what to do with it. - -* Menu: - -* Clocking commands:: Starting and stopping a clock -* The clock table:: Detailed reports -* Resolving idle time:: Resolving time when you've been idle - - ---------- Footnotes ---------- - - (1) Clocking only works if all headings are indented with less than -30 stars. This is a hardcoded limitation of `lmax' in `org-clock-sum'. - - (2) To resume the clock under the assumption that you have worked on -this task while outside Emacs, use `(setq org-clock-persist t)'. - - -File: org, Node: Clocking commands, Next: The clock table, Up: Clocking work time - -8.4.1 Clocking commands ------------------------ - -`C-c C-x C-i (`org-clock-in')' - Start the clock on the current item (clock-in). This inserts the - CLOCK keyword together with a timestamp. If this is not the first - clocking of this item, the multiple CLOCK lines will be wrapped - into a `:LOGBOOK:' drawer (see also the variable - `org-clock-into-drawer'). You can also overrule the setting of - this variable for a subtree by setting a `CLOCK_INTO_DRAWER' or - `LOG_INTO_DRAWER' property. When called with a `C-u' prefix - argument, select the task from a list of recently clocked tasks. - With two `C-u C-u' prefixes, clock into the task at point and mark - it as the default task; the default task will then always be - available with letter `d' when selecting a clocking task. With - three `C-u C-u C-u' prefixes, force continuous clocking by - starting the clock when the last clock stopped. - While the clock is running, the current clocking time is shown in - the mode line, along with the title of the task. The clock time - shown will be all time ever clocked for this task and its - children. If the task has an effort estimate (*note Effort - estimates::), the mode line displays the current clocking time - against it(1) If the task is a repeating one (*note Repeated - tasks::), only the time since the last reset of the task (2) will - be shown. More control over what time is shown can be exercised - with the `CLOCK_MODELINE_TOTAL' property. It may have the values - `current' to show only the current clocking instance, `today' to - show all time clocked on this task today (see also the variable - `org-extend-today-until'), `all' to include all time, or `auto' - which is the default(3). - Clicking with `mouse-1' onto the mode line entry will pop up a - menu with clocking options. - -`C-c C-x C-o (`org-clock-out')' - Stop the clock (clock-out). This inserts another timestamp at the - same location where the clock was last started. It also directly - computes the resulting time and inserts it after the time range as - `=> HH:MM'. See the variable `org-log-note-clock-out' for the - possibility to record an additional note together with the - clock-out timestamp(4). - -`C-c C-x C-x (`org-clock-in-last')' - Reclock the last clocked task. With one `C-u' prefix argument, - select the task from the clock history. With two `C-u' prefixes, - force continuous clocking by starting the clock when the last clock - stopped. - -`C-c C-x C-e (`org-clock-modify-effort-estimate')' - Update the effort estimate for the current clock task. - -`C-c C-c or C-c C-y (`org-evaluate-time-range')' - Recompute the time interval after changing one of the timestamps. - This is only necessary if you edit the timestamps directly. If - you change them with `S-' keys, the update is automatic. - -`C-S- (`org-clock-timestamps-up/down')' - On `CLOCK' log lines, increase/decrease both timestamps so that the - clock duration keeps the same. - -`S-M- (`org-timestamp-up/down')' - On `CLOCK' log lines, increase/decrease the timestamp at point and - the one of the previous (or the next clock) timestamp by the same - duration. For example, if you hit `S-M-' to increase a - clocked-out timestamp by five minutes, then the clocked-in - timestamp of the next clock will be increased by five minutes. - -`C-c C-t (`org-todo')' - Changing the TODO state of an item to DONE automatically stops the - clock if it is running in this same item. - -`C-c C-x C-q (`org-clock-cancel')' - Cancel the current clock. This is useful if a clock was started by - mistake, or if you ended up working on something else. - -`C-c C-x C-j (`org-clock-goto')' - Jump to the headline of the currently clocked in task. With a - `C-u' prefix arg, select the target task from a list of recently - clocked tasks. - -`C-c C-x C-d (`org-clock-display')' - Display time summaries for each subtree in the current buffer. - This puts overlays at the end of each headline, showing the total - time recorded under that heading, including the time of any - subheadings. You can use visibility cycling to study the tree, - but the overlays disappear when you change the buffer (see - variable `org-remove-highlights-with-change') or press `C-c C-c'. - - The `l' key may be used the agenda (*note Weekly/daily agenda::) to -show which tasks have been worked on or closed during a day. - - *Important:* note that both `org-clock-out' and `org-clock-in-last' -can have a global key binding and will not modify the window -disposition. - - ---------- Footnotes ---------- - - (1) To add an effort estimate "on the fly", hook a function doing -this to `org-clock-in-prepare-hook'. - - (2) as recorded by the `LAST_REPEAT' property - - (3) See also the variable `org-clock-modeline-total'. - - (4) The corresponding in-buffer setting is: `#+STARTUP: -lognoteclock-out' - - -File: org, Node: The clock table, Next: Resolving idle time, Prev: Clocking commands, Up: Clocking work time - -8.4.2 The clock table ---------------------- - -Org mode can produce quite complex reports based on the time clocking -information. Such a report is called a _clock table_, because it is -formatted as one or several Org tables. - -`C-c C-x C-r (`org-clock-report')' - Insert a dynamic block (*note Dynamic blocks::) containing a clock - report as an Org mode table into the current file. When the - cursor is at an existing clock table, just update it. When called - with a prefix argument, jump to the first clock report in the - current document and update it. The clock table always includes - also trees with `:ARCHIVE:' tag. - -`C-c C-c or C-c C-x C-u (`org-dblock-update')' - Update dynamic block at point. The cursor needs to be in the - `#+BEGIN' line of the dynamic block. - -`C-u C-c C-x C-u' - Update all dynamic blocks (*note Dynamic blocks::). This is - useful if you have several clock table blocks in a buffer. - -`S-' -`S- (`org-clocktable-try-shift')' - Shift the current `:block' interval and update the table. The - cursor needs to be in the `#+BEGIN: clocktable' line for this - command. If `:block' is `today', it will be shifted to `today-1' - etc. - - Here is an example of the frame for a clock table as it is inserted -into the buffer with the `C-c C-x C-r' command: - - #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file - #+END: clocktable - The `BEGIN' line specifies a number of options to define the scope, -structure, and formatting of the report. Defaults for all these -options can be configured in the variable `org-clocktable-defaults'. - -First there are options that determine which clock entries are to be -selected: - :maxlevel Maximum level depth to which times are listed in the table. - Clocks at deeper levels will be summed into the upper level. - :scope The scope to consider. This can be any of the following: - nil the current buffer or narrowed region - file the full current buffer - subtree the subtree where the clocktable is located - treeN the surrounding level N tree, for example `tree3' - tree the surrounding level 1 tree - agenda all agenda files - ("file"..) scan these files - function the list of files returned by a function of no argument - file-with-archives current file and its archives - agenda-with-archives all agenda files, including archives - :block The time block to consider. This block is specified either - absolutely, or relative to the current time and may be any of - these formats: - 2007-12-31 New year eve 2007 - 2007-12 December 2007 - 2007-W50 ISO-week 50 in 2007 - 2007-Q2 2nd quarter in 2007 - 2007 the year 2007 - today, yesterday, today-N a relative day - thisweek, lastweek, thisweek-N a relative week - thismonth, lastmonth, thismonth-N a relative month - thisyear, lastyear, thisyear-N a relative year - untilnow - Use `S-/' keys to shift the time interval. - :tstart A time string specifying when to start considering times. - Relative times like `"<-2w>"' can also be used. See - *note Matching tags and properties:: for relative time syntax. - :tend A time string specifying when to stop considering times. - Relative times like `""' can also be used. See - *note Matching tags and properties:: for relative time syntax. - :wstart The starting day of the week. The default is 1 for monday. - :mstart The starting day of the month. The default 1 is for the first - day of the month. - :step `week' or `day', to split the table into chunks. - To use this, `:block' or `:tstart', `:tend' are needed. - :stepskip0 Do not show steps that have zero time. - :fileskip0 Do not show table sections from files which did not contribute. - :tags A tags match to select entries that should contribute. See - *note Matching tags and properties:: for the match syntax. - - Then there are options which determine the formatting of the table. -These options are interpreted by the function -`org-clocktable-write-default', but you can specify your own function -using the `:formatter' parameter. - :emphasize When `t', emphasize level one and level two items. - :lang Language(1) to use for descriptive cells like "Task". - :link Link the item headlines in the table to their origins. - :narrow An integer to limit the width of the headline column in - the org table. If you write it like `50!', then the - headline will also be shortened in export. - :indent Indent each headline field according to its level. - :tcolumns Number of columns to be used for times. If this is smaller - than `:maxlevel', lower levels will be lumped into one column. - :level Should a level number column be included? - :sort A cons cell like containing the column to sort and a sorting type. - E.g., `:sort (1 . ?a)' sorts the first column alphabetically. - :compact Abbreviation for `:level nil :indent t :narrow 40! :tcolumns 1' - All are overwritten except if there is an explicit `:narrow' - :timestamp A timestamp for the entry, when available. Look for SCHEDULED, - DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order. - :properties List of properties that should be shown in the table. Each - property will get its own column. - :inherit-props When this flag is `t', the values for `:properties' will be inherited. - :formula Content of a `#+TBLFM' line to be added and evaluated. - As a special case, `:formula %' adds a column with % time. - If you do not specify a formula here, any existing formula - below the clock table will survive updates and be evaluated. - :formatter A function to format clock data and insert it into the buffer. - To get a clock summary of the current level 1 tree, for the current -day, you could write - #+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t - #+END: clocktable - and to use a specific time range you could write(2) - #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>" - :tend "<2006-08-10 Thu 12:00>" - #+END: clocktable - A range starting a week ago and ending right now could be written as - #+BEGIN: clocktable :tstart "<-1w>" :tend "" - #+END: clocktable - A summary of the current subtree with % times would be - #+BEGIN: clocktable :scope subtree :link t :formula % - #+END: clocktable - A horizontally compact representation of everything clocked during -last week would be - #+BEGIN: clocktable :scope agenda :block lastweek :compact t - #+END: clocktable - - ---------- Footnotes ---------- - - (1) Language terms can be set through the variable -`org-clock-clocktable-language-setup'. - - (2) Note that all parameters must be specified in a single line--the -line is broken here only to fit it into the manual. - - -File: org, Node: Resolving idle time, Prev: The clock table, Up: Clocking work time - -8.4.3 Resolving idle time and continuous clocking -------------------------------------------------- - -Resolving idle time -................... - -If you clock in on a work item, and then walk away from your -computer--perhaps to take a phone call--you often need to "resolve" the -time you were away by either subtracting it from the current clock, or -applying it to another one. - - By customizing the variable `org-clock-idle-time' to some integer, -such as 10 or 15, Emacs can alert you when you get back to your -computer after being idle for that many minutes(1), and ask what you -want to do with the idle time. There will be a question waiting for -you when you get back, indicating how much idle time has passed -(constantly updated with the current amount), as well as a set of -choices to correct the discrepancy: - -`k' - To keep some or all of the minutes and stay clocked in, press `k'. - Org will ask how many of the minutes to keep. Press to keep - them all, effectively changing nothing, or enter a number to keep - that many minutes. - -`K' - If you use the shift key and press `K', it will keep however many - minutes you request and then immediately clock out of that task. - If you keep all of the minutes, this is the same as just clocking - out of the current task. - -`s' - To keep none of the minutes, use `s' to subtract all the away time - from the clock, and then check back in from the moment you - returned. - -`S' - To keep none of the minutes and just clock out at the start of the - away time, use the shift key and press `S'. Remember that using - shift will always leave you clocked out, no matter which option - you choose. - -`C' - To cancel the clock altogether, use `C'. Note that if instead of - canceling you subtract the away time, and the resulting clock - amount is less than a minute, the clock will still be canceled - rather than clutter up the log with an empty entry. - - What if you subtracted those away minutes from the current clock, -and now want to apply them to a new clock? Simply clock in to any task -immediately after the subtraction. Org will notice that you have -subtracted time "on the books", so to speak, and will ask if you want -to apply those minutes to the next task you clock in on. - - There is one other instance when this clock resolution magic occurs. -Say you were clocked in and hacking away, and suddenly your cat chased -a mouse who scared a hamster that crashed into your UPS's power button! -You suddenly lose all your buffers, but thanks to auto-save you still -have your recent Org mode changes, including your last clock in. - - If you restart Emacs and clock into any task, Org will notice that -you have a dangling clock which was never clocked out from your last -session. Using that clock's starting time as the beginning of the -unaccounted-for period, Org will ask how you want to resolve that time. -The logic and behavior is identical to dealing with away time due to -idleness; it is just happening due to a recovery event rather than a -set amount of idle time. - - You can also check all the files visited by your Org agenda for -dangling clocks at any time using `M-x org-resolve-clocks RET' (or `C-c -C-x C-z'). - -Continuous clocking -................... - -You may want to start clocking from the time when you clocked out the -previous task. To enable this systematically, set -`org-clock-continuously' to `t'. Each time you clock in, Org retrieves -the clock-out time of the last clocked entry for this session, and -start the new clock from there. - - If you only want this from time to time, use three universal prefix -arguments with `org-clock-in' and two `C-u C-u' with -`org-clock-in-last'. - - ---------- Footnotes ---------- - - (1) On computers using Mac OS X, idleness is based on actual user -idleness, not just Emacs' idle time. For X11, you can install a -utility program `x11idle.c', available in the `contrib/scripts' -directory of the Org git distribution, or install the `xprintidle' -package and set it to the variable `org-clock-x11idle-program-name' if -you are running Debian, to get the same general treatment of idleness. -On other systems, idle time refers to Emacs idle time only. - - -File: org, Node: Effort estimates, Next: Timers, Prev: Clocking work time, Up: Dates and times - -8.5 Effort estimates -==================== - -If you want to plan your work in a very detailed way, or if you need to -produce offers with quotations of the estimated work effort, you may -want to assign effort estimates to entries. If you are also clocking -your work, you may later want to compare the planned effort with the -actual working time, a great way to improve planning estimates. Effort -estimates are stored in a special property `EFFORT'. You can set the -effort for an entry with the following commands: - -`C-c C-x e (`org-set-effort')' - Set the effort estimate for the current entry. With a numeric - prefix argument, set it to the Nth allowed value (see below). - This command is also accessible from the agenda with the `e' key. - -`C-c C-x C-e (`org-clock-modify-effort-estimate')' - Modify the effort estimate of the item currently being clocked. - - Clearly the best way to work with effort estimates is through column -view (*note Column view::). You should start by setting up discrete -values for effort estimates, and a `COLUMNS' format that displays these -values together with clock sums (if you want to clock your time). For -a specific buffer you can use - - #+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 - #+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort){:} %CLOCKSUM - -or, even better, you can set up these values globally by customizing the -variables `org-global-properties' and `org-columns-default-format'. In -particular if you want to use this setup also in the agenda, a global -setup may be advised. - - The way to assign estimates to individual items is then to switch to -column mode, and to use `S-' and `S-' to change the value. -The values you enter will immediately be summed up in the hierarchy. -In the column next to it, any clocked time will be displayed. - - If you switch to column view in the daily/weekly agenda, the effort -column will summarize the estimated work effort for each day(1), and -you can use this to find space in your schedule. To get an overview of -the entire part of the day that is committed, you can set the option -`org-agenda-columns-add-appointments-to-effort-sum'. The appointments -on a day that take place over a specified time interval will then also -be added to the load estimate of the day. - - Effort estimates can be used in secondary agenda filtering that is -triggered with the `/' key in the agenda (*note Agenda commands::). If -you have these estimates defined consistently, two or three key presses -will narrow down the list to stuff that fits into an available time -slot. - - ---------- Footnotes ---------- - - (1) Please note the pitfalls of summing hierarchical data in a flat -list (*note Agenda column view::). - - -File: org, Node: Timers, Prev: Effort estimates, Up: Dates and times - -8.6 Taking notes with a timer -============================= - -Org provides two types of timers. There is a relative timer that -counts up, which can be useful when taking notes during, for example, a -meeting or a video viewing. There is also a countdown timer. - - The relative and countdown are started with separate commands. - -`C-c C-x 0 (`org-timer-start')' - Start or reset the relative timer. By default, the timer is set - to 0. When called with a `C-u' prefix, prompt the user for a - starting offset. If there is a timer string at point, this is - taken as the default, providing a convenient way to restart taking - notes after a break in the process. When called with a double - prefix argument `C-u C-u', change all timer strings in the active - region by a certain amount. This can be used to fix timer strings - if the timer was not started at exactly the right moment. - -`C-c C-x ; (`org-timer-set-timer')' - Start a countdown timer. The user is prompted for a duration. - `org-timer-default-timer' sets the default countdown value. Giving - a numeric prefix argument overrides this default value. This - command is available as `;' in agenda buffers. - - Once started, relative and countdown timers are controlled with the -same commands. - -`C-c C-x . (`org-timer')' - Insert the value of the current relative or countdown timer into - the buffer. If no timer is running, the relative timer will be - started. When called with a prefix argument, the relative timer - is restarted. - -`C-c C-x - (`org-timer-item')' - Insert a description list item with the value of the current - relative or countdown timer. With a prefix argument, first reset - the relative timer to 0. - -`M- (`org-insert-heading')' - Once the timer list is started, you can also use `M-' to - insert new timer items. - -`C-c C-x , (`org-timer-pause-or-continue')' - Pause the timer, or continue it if it is already paused. - -`C-c C-x _ (`org-timer-stop')' - Stop the timer. After this, you can only start a new timer, not - continue the old one. This command also removes the timer from - the mode line. - - -File: org, Node: Capture - Refile - Archive, Next: Agenda views, Prev: Dates and times, Up: Top - -9 Capture - Refile - Archive -**************************** - -An important part of any organization system is the ability to quickly -capture new ideas and tasks, and to associate reference material with -them. Org does this using a process called capture. It also can store -files related to a task (attachments) in a special directory. Once in -the system, tasks and projects need to be moved around. Moving -completed project trees to an archive file keeps the system compact and -fast. - -* Menu: - -* Capture:: Capturing new stuff -* Attachments:: Add files to tasks -* RSS feeds:: Getting input from RSS feeds -* Protocols:: External (e.g., Browser) access to Emacs and Org -* Refile and copy:: Moving/copying a tree from one place to another -* Archiving:: What to do with finished projects - - -File: org, Node: Capture, Next: Attachments, Up: Capture - Refile - Archive - -9.1 Capture -=========== - -Capture lets you quickly store notes with little interruption of your -work flow. Org's method for capturing new items is heavily inspired by -John Wiegley excellent `remember.el' package. Up to version 6.36, Org -used a special setup for `remember.el', then replaced it with -`org-remember.el'. As of version 8.0, `org-remember.el' has been -completely replaced by `org-capture.el'. - - If your configuration depends on `org-remember.el', you need to -update it and use the setup described below. To convert your -`org-remember-templates', run the command - M-x org-capture-import-remember-templates RET - and then customize the new variable with `M-x customize-variable -org-capture-templates', check the result, and save the customization. - -* Menu: - -* Setting up capture:: Where notes will be stored -* Using capture:: Commands to invoke and terminate capture -* Capture templates:: Define the outline of different note types - - -File: org, Node: Setting up capture, Next: Using capture, Up: Capture - -9.1.1 Setting up capture ------------------------- - -The following customization sets a default target file for notes, and -defines a global key(1) for capturing new material. - - (setq org-default-notes-file (concat org-directory "/notes.org")) - (define-key global-map "\C-cc" 'org-capture) - - ---------- Footnotes ---------- - - (1) Please select your own key, `C-c c' is only a suggestion. - - -File: org, Node: Using capture, Next: Capture templates, Prev: Setting up capture, Up: Capture - -9.1.2 Using capture -------------------- - -`C-c c (`org-capture')' - Call the command `org-capture'. Note that this key binding is - global and not active by default: you need to install it. If you - have templates defined *note Capture templates::, it will offer - these templates for selection or use a new Org outline node as the - default template. It will insert the template into the target - file and switch to an indirect buffer narrowed to this new node. - You may then insert the information you want. - -`C-c C-c (`org-capture-finalize')' - Once you have finished entering information into the capture - buffer, `C-c C-c' will return you to the window configuration - before the capture process, so that you can resume your work - without further distraction. When called with a prefix arg, - finalize and then jump to the captured item. - -`C-c C-w (`org-capture-refile')' - Finalize the capture process by refiling (*note Refile and copy::) - the note to a different place. Please realize that this is a - normal refiling command that will be executed--so the cursor - position at the moment you run this command is important. If you - have inserted a tree with a parent and children, first move the - cursor back to the parent. Any prefix argument given to this - command will be passed on to the `org-refile' command. - -`C-c C-k (`org-capture-kill')' - Abort the capture process and return to the previous state. - - - You can also call `org-capture' in a special way from the agenda, -using the `k c' key combination. With this access, any timestamps -inserted by the selected capture template will default to the cursor -date in the agenda, rather than to the current date. - - To find the locations of the last stored capture, use `org-capture' -with prefix commands: - -`C-u C-c c' - Visit the target location of a capture template. You get to - select the template in the usual way. - -`C-u C-u C-c c' - Visit the last stored capture item in its buffer. - - You can also jump to the bookmark `org-capture-last-stored', which -will automatically be created unless you set `org-capture-bookmark' to -`nil'. - - To insert the capture at point in an Org buffer, call `org-capture' -with a `C-0' prefix argument. - - -File: org, Node: Capture templates, Prev: Using capture, Up: Capture - -9.1.3 Capture templates ------------------------ - -You can use templates for different types of capture items, and for -different target locations. The easiest way to create such templates is -through the customize interface. - -`C-c c C' - Customize the variable `org-capture-templates'. - - Before we give the formal description of template definitions, let's -look at an example. Say you would like to use one template to create -general TODO entries, and you want to put these entries under the -heading `Tasks' in your file `~/org/gtd.org'. Also, a date tree in the -file `journal.org' should capture journal entries. A possible -configuration would look like: - - (setq org-capture-templates - '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") - "* TODO %?\n %i\n %a") - ("j" "Journal" entry (file+olp+datetree "~/org/journal.org") - "* %?\nEntered on %U\n %i\n %a"))) - -If you then press `C-c c t', Org will prepare the template for you like -this: - * TODO - [[file:LINK TO WHERE YOU INITIATED CAPTURE]] - -During expansion of the template, `%a' has been replaced by a link to -the location from where you called the capture command. This can be -extremely useful for deriving tasks from emails, for example. You fill -in the task definition, press `C-c C-c' and Org returns you to the same -place where you started the capture process. - - To define special keys to capture to a particular template without -going through the interactive template selection, you can create your -key binding like this: - - (define-key global-map "\C-cx" - (lambda () (interactive) (org-capture nil "x"))) - -* Menu: - -* Template elements:: What is needed for a complete template entry -* Template expansion:: Filling in information about time and context -* Templates in contexts:: Only show a template in a specific context - - -File: org, Node: Template elements, Next: Template expansion, Up: Capture templates - -9.1.3.1 Template elements -......................... - -Now lets look at the elements of a template definition. Each entry in -`org-capture-templates' is a list with the following items: - -KEYS - The keys that will select the template, as a string, characters - only, for example `"a"' for a template to be selected with a - single key, or `"bt"' for selection with two keys. When using - several keys, keys using the same prefix key must be sequential in - the list and preceded by a 2-element entry explaining the prefix - key, for example - ("b" "Templates for marking stuff to buy") - If you do not define a template for the `C' key, this key will be - used to open the customize buffer for this complex variable. - -DESCRIPTION - A short string describing the template, which will be shown during - selection. - -TYPE - The type of entry, a symbol. Valid values are: - - `entry' - An Org mode node, with a headline. Will be filed as the - child of the target entry or as a top-level entry. The - target file should be an Org mode file. - - `item' - A plain list item, placed in the first plain list at the - target location. Again the target file should be an Org file. - - `checkitem' - A checkbox item. This only differs from the plain list item - by the default template. - - `table-line' - a new line in the first table at the target location. Where - exactly the line will be inserted depends on the properties - `:prepend' and `:table-line-pos' (see below). - - `plain' - Text to be inserted as it is. - -TARGET - Specification of where the captured item should be placed. In Org - mode files, targets usually define a node. Entries will become - children of this node. Other types will be added to the table or - list in the body of this node. Most target specifications contain - a file name. If that file name is the empty string, it defaults - to `org-default-notes-file'. A file can also be given as a - variable or as a function called with no argument. When an - absolute path is not specified for a target, it is taken as - relative to `org-directory'. - - Valid values are: - - `(file "path/to/file")' - Text will be placed at the beginning or end of that file. - - `(id "id of existing org entry")' - Filing as child of this entry, or in the body of the entry. - - `(file+headline "path/to/file" "node headline")' - Fast configuration if the target heading is unique in the - file. - - `(file+olp "path/to/file" "Level 1 heading" "Level 2" ...)' - For non-unique headings, the full path is safer. - - `(file+regexp "path/to/file" "regexp to find location")' - Use a regular expression to position the cursor. - - `(file+olp+datetree "path/to/file" [ "Level 1 heading" ....])' - This target(1) will create a heading in a date tree(2) for - today's date. If the optional outline path is given, the - tree will be built under the node it is pointing to, instead - of at top level. Check out the `:time-prompt' and - `:tree-type' properties below for additional options. - - `(file+function "path/to/file" function-finding-location)' - A function to find the right location in the file. - - `(clock)' - File to the entry that is currently being clocked. - - `(function function-finding-location)' - Most general way: write your own function which both visits - the file and moves point to the right location. - -TEMPLATE - The template for creating the capture item. If you leave this - empty, an appropriate default template will be used. Otherwise - this is a string with escape codes, which will be replaced - depending on time and context of the capture call. The string - with escapes may be loaded from a template file, using the special - syntax `(file "path/to/template")'. See below for more details. - -PROPERTIES - The rest of the entry is a property list of additional options. - Recognized properties are: - - `:prepend' - Normally new captured information will be appended at the - target location (last child, last table line, last list - item...). Setting this property will change that. - - `:immediate-finish' - When set, do not offer to edit the information, just file it - away immediately. This makes sense if the template only needs - information that can be added automatically. - - `:empty-lines' - Set this to the number of lines to insert before and after - the new item. Default 0, only common other value is 1. - - `:clock-in' - Start the clock in this item. - - `:clock-keep' - Keep the clock running when filing the captured entry. - - `:clock-resume' - If starting the capture interrupted a clock, restart that - clock when finished with the capture. Note that - `:clock-keep' has precedence over `:clock-resume'. When - setting both to `t', the current clock will run and the - previous one will not be resumed. - - `:time-prompt' - Prompt for a date/time to be used for date/week trees and - when filling the template. Without this property, capture - uses the current date and time. Even if this property has - not been set, you can force the same behavior by calling - `org-capture' with a `C-1' prefix argument. - - `:tree-type' - When `week', make a week tree instead of the month tree, i.e. - place the headings for each day under a heading with the - current iso week. - - `:unnarrowed' - Do not narrow the target buffer, simply show the full buffer. - Default is to narrow it so that you only see the new material. - - `:table-line-pos' - Specification of the location in the table where the new line - should be inserted. It can be a string, a variable holding a - string or a function returning a string. The string should - look like `"II-3"' meaning that the new line should become - the third line before the second horizontal separator line. - - `:kill-buffer' - If the target file was not yet visited when capture was - invoked, kill the buffer again after capture is completed. - - ---------- Footnotes ---------- - - (1) Org used to offer four different targets for date/week tree -capture. Now, Org automatically translates these to use -`file+olp+datetree', applying the `:time-prompt' and `:tree-type' -properties. Please rewrite your date/week-tree targets using -`file+olp+datetree' since the older targets are now deprecated. - - (2) A date tree is an outline structure with years on the highest -level, months or ISO-weeks as sublevels and then dates on the lowest -level. Tags are allowed in the tree structure. - - -File: org, Node: Template expansion, Next: Templates in contexts, Prev: Template elements, Up: Capture templates - -9.1.3.2 Template expansion -.......................... - -In the template itself, special `%'-escapes(1) allow dynamic insertion -of content. The templates are expanded in the order given here: - - %[FILE] Insert the contents of the file given by FILE. - %(SEXP) Evaluate Elisp SEXP and replace with the result. - For convenience, %:keyword (see below) placeholders - within the expression will be expanded prior to this. - The sexp must return a string. - %<...> The result of format-time-string on the ... format specification. - %t Timestamp, date only. - %T Timestamp, with date and time. - %u, %U Like the above, but inactive timestamps. - %i Initial content, the region when capture is called while the - region is active. - The entire text will be indented like `%i' itself. - %a Annotation, normally the link created with `org-store-link'. - %A Like `%a', but prompt for the description part. - %l Like %a, but only insert the literal link. - %c Current kill ring head. - %x Content of the X clipboard. - %k Title of the currently clocked task. - %K Link to the currently clocked task. - %n User name (taken from `user-full-name'). - %f File visited by current buffer when org-capture was called. - %F Full path of the file or directory visited by current buffer. - %:keyword Specific information for certain link types, see below. - %^g Prompt for tags, with completion on tags in target file. - %^G Prompt for tags, with completion all tags in all agenda files. - %^t Like `%t', but prompt for date. Similarly `%^T', `%^u', `%^U'. - You may define a prompt like `%^{Birthday}t'. - %^C Interactive selection of which kill or clip to use. - %^L Like `%^C', but insert as link. - %^{PROP}p Prompt the user for a value for property PROP. - %^{PROMPT} prompt the user for a string and replace this sequence with it. - You may specify a default value and a completion table with - %^{prompt|default|completion2|completion3...}. - The arrow keys access a prompt-specific history. - %\1 ... %\N Insert the text entered at the Nth %^{PROMPT}, where `N' is - a number, starting from 1. - %? After completing the template, position cursor here. - -For specific link types, the following keywords will be defined(2): - - Link type | Available keywords - ---------------------------------+---------------------------------------------- - bbdb | %:name %:company - irc | %:server %:port %:nick - vm, vm-imap, wl, mh, mew, rmail, | %:type %:subject %:message-id - gnus, notmuch | %:from %:fromname %:fromaddress - | %:to %:toname %:toaddress - | %:date (message date header field) - | %:date-timestamp (date as active timestamp) - | %:date-timestamp-inactive (date as inactive timestamp) - | %:fromto (either "to NAME" or "from NAME")(3) - gnus | %:group, for messages also all email fields - eww, w3, w3m | %:url - info | %:file %:node - calendar | %:date - -To place the cursor after template expansion use: - - %? After completing the template, position cursor here. - - ---------- Footnotes ---------- - - (1) If you need one of these sequences literally, escape the `%' -with a backslash. - - (2) If you define your own link types (*note Adding hyperlink -types::), any property you store with `org-store-link-props' can be -accessed in capture templates in a similar way. - - (3) This will always be the other, not the user. See the variable -`org-from-is-user-regexp'. - - -File: org, Node: Templates in contexts, Prev: Template expansion, Up: Capture templates - -9.1.3.3 Templates in contexts -............................. - -To control whether a capture template should be accessible from a -specific context, you can customize `org-capture-templates-contexts'. -Let's say for example that you have a capture template `"p"' for -storing Gnus emails containing patches. Then you would configure this -option like this: - - (setq org-capture-templates-contexts - '(("p" (in-mode . "message-mode")))) - - You can also tell that the command key `"p"' should refer to another -template. In that case, add this command key like this: - - (setq org-capture-templates-contexts - '(("p" "q" (in-mode . "message-mode")))) - - See the docstring of the variable for more information. - - -File: org, Node: Attachments, Next: RSS feeds, Prev: Capture, Up: Capture - Refile - Archive - -9.2 Attachments -=============== - -It is often useful to associate reference material with an outline -node/task. Small chunks of plain text can simply be stored in the -subtree of a project. Hyperlinks (*note Hyperlinks::) can establish -associations with files that live elsewhere on your computer or in the -cloud, like emails or source code files belonging to a project. -Another method is attachments, which are files located in a directory -belonging to an outline node. Org uses directories named by the unique -ID of each entry. These directories are located in the `data' -directory which lives in the same directory where your Org file -lives(1). If you initialize this directory with `git init', Org will -automatically commit changes when it sees them. The attachment system -has been contributed to Org by John Wiegley. - - In cases where it seems better to do so, you can also attach a -directory of your choice to an entry. You can also make children -inherit the attachment directory from a parent, so that an entire -subtree uses the same attached directory. - -The following commands deal with attachments: - -`C-c C-a (`org-attach')' - The dispatcher for commands related to the attachment system. - After these keys, a list of commands is displayed and you must - press an additional key to select a command: - - `a (`org-attach-attach')' - Select a file and move it into the task's attachment - directory. The file will be copied, moved, or linked, - depending on `org-attach-method'. Note that hard links are - not supported on all systems. - - `c/m/l' - Attach a file using the copy/move/link method. Note that - hard links are not supported on all systems. - - `u (`org-attach-url')' - Attach a file from URL - - `n (`org-attach-new')' - Create a new attachment as an Emacs buffer. - - `z (`org-attach-sync')' - Synchronize the current task with its attachment directory, - in case you added attachments yourself. - - `o (`org-attach-open')' - Open current task's attachment. If there is more than one, - prompt for a file name first. Opening will follow the rules - set by `org-file-apps'. For more details, see the - information on following hyperlinks (*note Handling links::). - - `O (`org-attach-open-in-emacs')' - Also open the attachment, but force opening the file in Emacs. - - `f (`org-attach-reveal')' - Open the current task's attachment directory. - - `F (`org-attach-reveal-in-emacs')' - Also open the directory, but force using `dired' in Emacs. - - `d (`org-attach-delete-one')' - Select and delete a single attachment. - - `D (`org-attach-delete-all')' - Delete all of a task's attachments. A safer way is to open - the directory in `dired' and delete from there. - - `s (`org-attach-set-directory')' - Set a specific directory as the entry's attachment directory. - This works by putting the directory path into the - `ATTACH_DIR' property. - - `i (`org-attach-set-inherit')' - Set the `ATTACH_DIR_INHERIT' property, so that children will - use the same directory for attachments as the parent does. - - ---------- Footnotes ---------- - - (1) If you move entries or Org files from one directory to another, -you may want to configure `org-attach-directory' to contain an absolute -path. - - -File: org, Node: RSS feeds, Next: Protocols, Prev: Attachments, Up: Capture - Refile - Archive - -9.3 RSS feeds -============= - -Org can add and change entries based on information found in RSS feeds -and Atom feeds. You could use this to make a task out of each new -podcast in a podcast feed. Or you could use a phone-based -note-creating service on the web to import tasks into Org. To access -feeds, configure the variable `org-feed-alist'. The docstring of this -variable has detailed information. Here is just an example: - - (setq org-feed-alist - '(("Slashdot" - "http://rss.slashdot.org/Slashdot/slashdot" - "~/txt/org/feeds.org" "Slashdot Entries"))) - -will configure that new items from the feed provided by -`rss.slashdot.org' will result in new entries in the file -`~/org/feeds.org' under the heading `Slashdot Entries', whenever the -following command is used: - -`C-c C-x g (`org-feed-update-all')' - -`C-c C-x g' - Collect items from the feeds configured in `org-feed-alist' and - act upon them. - -`C-c C-x G (`org-feed-goto-inbox')' - Prompt for a feed name and go to the inbox configured for this - feed. - - Under the same headline, Org will create a drawer `FEEDSTATUS' in -which it will store information about the status of items in the feed, -to avoid adding the same item several times. - - For more information, including how to read atom feeds, see -`org-feed.el' and the docstring of `org-feed-alist'. - - -File: org, Node: Protocols, Next: Refile and copy, Prev: RSS feeds, Up: Capture - Refile - Archive - -9.4 Protocols for external access -================================= - -You can set up Org for handling protocol calls from outside -applications that are passed to Emacs through the `emacsserver'. For -example, you can configure bookmarks in your web browser to send a link -to the current page to Org and create a note from it using capture -(*note Capture::). Or you could create a bookmark that will tell Emacs -to open the local source file of a remote website you are looking at -with the browser. See -`http://orgmode.org/worg/org-contrib/org-protocol.php' for detailed -documentation and setup instructions. - - -File: org, Node: Refile and copy, Next: Archiving, Prev: Protocols, Up: Capture - Refile - Archive - -9.5 Refile and copy -=================== - -When reviewing the captured data, you may want to refile or to copy -some of the entries into a different list, for example into a project. -Cutting, finding the right location, and then pasting the note is -cumbersome. To simplify this process, you can use the following -special command: - -`C-c M-w (`org-copy')' - Copying works like refiling, except that the original note is not - deleted. - -`C-c C-w (`org-refile')' - Refile the entry or region at point. This command offers possible - locations for refiling the entry and lets you select one with - completion. The item (or all items in the region) is filed below - the target heading as a subitem. Depending on - `org-reverse-note-order', it will be either the first or last - subitem. - By default, all level 1 headlines in the current buffer are - considered to be targets, but you can have more complex - definitions across a number of files. See the variable - `org-refile-targets' for details. If you would like to select a - location via a file-path-like completion along the outline path, - see the variables `org-refile-use-outline-path' and - `org-outline-path-complete-in-steps'. If you would like to be - able to create new nodes as new parents for refiling on the fly, - check the variable `org-refile-allow-creating-parent-nodes'. When - the variable `org-log-refile'(1) is set, a timestamp or a note - will be recorded when an entry has been refiled. - -`C-u C-c C-w' - Use the refile interface to jump to a heading. - -`C-u C-u C-c C-w (`org-refile-goto-last-stored')' - Jump to the location where `org-refile' last moved a tree to. - -`C-2 C-c C-w' - Refile as the child of the item currently being clocked. - -`C-3 C-c C-w' - Refile and keep the entry in place. Also see `org-refile-keep' to - make this the default behavior, and beware that this may result in - duplicated `ID' properties. - -`C-0 C-c C-w or C-u C-u C-u C-c C-w (`org-refile-cache-clear')' - Clear the target cache. Caching of refile targets can be turned - on by setting `org-refile-use-cache'. To make the command see new - possible targets, you have to clear the cache with this command. - - ---------- Footnotes ---------- - - (1) with corresponding `#+STARTUP' keywords `logrefile', -`lognoterefile', and `nologrefile' - - -File: org, Node: Archiving, Prev: Refile and copy, Up: Capture - Refile - Archive - -9.6 Archiving -============= - -When a project represented by a (sub)tree is finished, you may want to -move the tree out of the way and to stop it from contributing to the -agenda. Archiving is important to keep your working files compact and -global searches like the construction of agenda views fast. - -`C-c C-x C-a (`org-archive-subtree-default')' - Archive the current entry using the command specified in the - variable `org-archive-default-command'. - -* Menu: - -* Moving subtrees:: Moving a tree to an archive file -* Internal archiving:: Switch off a tree but keep it in the file - - -File: org, Node: Moving subtrees, Next: Internal archiving, Up: Archiving - -9.6.1 Moving a tree to the archive file ---------------------------------------- - -The most common archiving action is to move a project tree to another -file, the archive file. - -`C-c C-x C-s or short C-c $ (`org-archive-subtree')' - Archive the subtree starting at the cursor position to the location - given by `org-archive-location'. - -`C-u C-c C-x C-s' - Check if any direct children of the current headline could be - moved to the archive. To do this, each subtree is checked for - open TODO entries. If none are found, the command offers to move - it to the archive location. If the cursor is _not_ on a headline - when this command is invoked, the level 1 trees will be checked. - -`C-u C-u C-c C-x C-s' - As above, but check subtree for timestamps instead of TODO - entries. The command will offer to archive the subtree if it - _does_ contain a timestamp, and that timestamp is in the past. - - The default archive location is a file in the same directory as the -current file, with the name derived by appending `_archive' to the -current file name. You can also choose what heading to file archived -items under, with the possibility to add them to a datetree in a file. -For information and examples on how to specify the file and the heading, -see the documentation string of the variable `org-archive-location'. - - There is also an in-buffer option for setting this variable, for -example: - - #+ARCHIVE: %s_done:: - -If you would like to have a special ARCHIVE location for a single entry -or a (sub)tree, give the entry an `:ARCHIVE:' property with the -location as the value (*note Properties and columns::). - - When a subtree is moved, it receives a number of special properties -that record context information like the file from where the entry -came, its outline path the archiving time etc. Configure the variable -`org-archive-save-context-info' to adjust the amount of information -added. - - -File: org, Node: Internal archiving, Prev: Moving subtrees, Up: Archiving - -9.6.2 Internal archiving ------------------------- - -If you want to just switch off--for agenda views--certain subtrees -without moving them to a different file, you can use the archive tag. - - A headline that is marked with the `:ARCHIVE:' tag (*note Tags::) -stays at its location in the outline tree, but behaves in the following -way: - - It does not open when you attempt to do so with a visibility - cycling command (*note Visibility cycling::). You can force - cycling archived subtrees with `C-', or by setting the option - `org-cycle-open-archived-trees'. Also normal outline commands like - `show-all' will open archived subtrees. - - - During sparse tree construction (*note Sparse trees::), matches in - archived subtrees are not exposed, unless you configure the option - `org-sparse-tree-open-archived-trees'. - - - During agenda view construction (*note Agenda views::), the - content of archived trees is ignored unless you configure the - option `org-agenda-skip-archived-trees', in which case these trees - will always be included. In the agenda you can press `v a' to get - archives temporarily included. - - - Archived trees are not exported (*note Exporting::), only the - headline is. Configure the details using the variable - `org-export-with-archived-trees'. - - - Archived trees are excluded from column view unless the variable - `org-columns-skip-archived-trees' is configured to `nil'. - - The following commands help manage the ARCHIVE tag: - -`C-c C-x a (`org-toggle-archive-tag')' - Toggle the ARCHIVE tag for the current headline. When the tag is - set, the headline changes to a shadowed face, and the subtree - below it is hidden. - -`C-u C-c C-x a' - Check if any direct children of the current headline should be - archived. To do this, each subtree is checked for open TODO - entries. If none are found, the command offers to set the ARCHIVE - tag for the child. If the cursor is _not_ on a headline when this - command is invoked, the level 1 trees will be checked. - -`C-TAB (`org-force-cycle-archived')' - Cycle a tree even if it is tagged with ARCHIVE. - -`C-c C-x A (`org-archive-to-archive-sibling')' - Move the current entry to the _Archive Sibling_. This is a - sibling of the entry with the heading `Archive' and the tag - `ARCHIVE'. The entry becomes a child of that sibling and in this - way retains a lot of its original context, including inherited - tags and approximate position in the outline. - - -File: org, Node: Agenda views, Next: Markup, Prev: Capture - Refile - Archive, Up: Top - -10 Agenda views -*************** - -Due to the way Org works, TODO items, time-stamped items, and tagged -headlines can be scattered throughout a file or even a number of files. -To get an overview of open action items, or of events that are -important for a particular date, this information must be collected, -sorted and displayed in an organized way. - - Org can select items based on various criteria and display them in a -separate buffer. Six different view types are provided: - - * an _agenda_ that is like a calendar and shows information for - specific dates, - - * a _TODO list_ that covers all unfinished action items, - - * a _match view_, showings headlines based on the tags, properties, - and TODO state associated with them, - - * a _text search view_ that shows all entries from multiple files - that contain specified keywords, - - * a _stuck projects view_ showing projects that currently don't move - along, and - - * _custom views_ that are special searches and combinations of - different views. - -The extracted information is displayed in a special _agenda buffer_. -This buffer is read-only, but provides commands to visit the -corresponding locations in the original Org files, and even to edit -these files remotely. - - By default, the report ignores commented (*note Comment lines::) and -archived (*note Internal archiving::) entries. You can override this -by setting `org-agenda-skip-comment-trees' and -`org-agenda-skip-archived-trees' to `nil'. - - Two variables control how the agenda buffer is displayed and whether -the window configuration is restored when the agenda exits: -`org-agenda-window-setup' and `org-agenda-restore-windows-after-quit'. - -* Menu: - -* Agenda files:: Files being searched for agenda information -* Agenda dispatcher:: Keyboard access to agenda views -* Built-in agenda views:: What is available out of the box? -* Presentation and sorting:: How agenda items are prepared for display -* Agenda commands:: Remote editing of Org trees -* Custom agenda views:: Defining special searches and views -* Exporting agenda views:: Writing a view to a file -* Agenda column view:: Using column view for collected entries - - -File: org, Node: Agenda files, Next: Agenda dispatcher, Up: Agenda views - -10.1 Agenda files -================= - -The information to be shown is normally collected from all _agenda -files_, the files listed in the variable `org-agenda-files'(1). If a -directory is part of this list, all files with the extension `.org' in -this directory will be part of the list. - - Thus, even if you only work with a single Org file, that file should -be put into the list(2). You can customize `org-agenda-files', but the -easiest way to maintain it is through the following commands - -`C-c [ (`org-agenda-file-to-front')' - Add current file to the list of agenda files. The file is added to - the front of the list. If it was already in the list, it is moved - to the front. With a prefix argument, file is added/moved to the - end. - -`C-c ] (`org-remove-file')' - Remove current file from the list of agenda files. - -`C-' (`org-cycle-agenda-files')' -`C-,' - Cycle through agenda file list, visiting one file after the other. - -`M-x org-iswitchb RET' - Command to use an `iswitchb'-like interface to switch to and - between Org buffers. - -The Org menu contains the current list of files and can be used to -visit any of them. - - If you would like to focus the agenda temporarily on a file not in -this list, or on just one file in the list, or even on only a subtree -in a file, then this can be done in different ways. For a single -agenda command, you may press `<' once or several times in the -dispatcher (*note Agenda dispatcher::). To restrict the agenda scope -for an extended period, use the following commands: - -`C-c C-x < (`org-agenda-set-restriction-lock')' - Permanently restrict the agenda to the current subtree. When with - a prefix argument, or with the cursor before the first headline in - a file, the agenda scope is set to the entire file. This - restriction remains in effect until removed with `C-c C-x >', or - by typing either `<' or `>' in the agenda dispatcher. If there is - a window displaying an agenda view, the new restriction takes - effect immediately. - -`C-c C-x > (`org-agenda-remove-restriction-lock')' - Remove the permanent restriction created by `C-c C-x <'. - -When working with `speedbar.el', you can use the following commands in -the Speedbar frame: - -`< in the speedbar frame (`org-speedbar-set-agenda-restriction')' - Permanently restrict the agenda to the item--either an Org file or - a subtree in such a file--at the cursor in the Speedbar frame. If - there is a window displaying an agenda view, the new restriction - takes effect immediately. - -`> in the speedbar frame (`org-agenda-remove-restriction-lock')' - Lift the restriction. - - ---------- Footnotes ---------- - - (1) If the value of that variable is not a list, but a single file -name, then the list of agenda files will be maintained in that external -file. - - (2) When using the dispatcher, pressing `<' before selecting a -command will actually limit the command to the current file, and ignore -`org-agenda-files' until the next dispatcher command. - - -File: org, Node: Agenda dispatcher, Next: Built-in agenda views, Prev: Agenda files, Up: Agenda views - -10.2 The agenda dispatcher -========================== - -The views are created through a dispatcher, which should be bound to a -global key--for example `C-c a' (*note Activation::). In the following -we will assume that `C-c a' is indeed how the dispatcher is accessed -and list keyboard access to commands accordingly. After pressing `C-c -a', an additional letter is required to execute a command. The -dispatcher offers the following default commands: - -`a' - Create the calendar-like agenda (*note Weekly/daily agenda::). - -`t / T' - Create a list of all TODO items (*note Global TODO list::). - -`m / M' - Create a list of headlines matching a TAGS expression (*note - Matching tags and properties::). - -`s' - Create a list of entries selected by a boolean expression of - keywords and/or regular expressions that must or must not occur in - the entry. - -`/' - Search for a regular expression in all agenda files and - additionally in the files listed in - `org-agenda-text-search-extra-files'. This uses the Emacs command - `multi-occur'. A prefix argument can be used to specify the - number of context lines for each match, default is 1. - -`# / !' - Create a list of stuck projects (*note Stuck projects::). - -`<' - Restrict an agenda command to the current buffer(1). After - pressing `<', you still need to press the character selecting the - command. - -`< <' - If there is an active region, restrict the following agenda - command to the region. Otherwise, restrict it to the current - subtree(2). After pressing `< <', you still need to press the - character selecting the command. - -`*' - Toggle sticky agenda views. By default, Org maintains only a - single agenda buffer and rebuilds it each time you change the - view, to make sure everything is always up to date. If you often - switch between agenda views and the build time bothers you, you - can turn on sticky agenda buffers or make this the default by - customizing the variable `org-agenda-sticky'. With sticky - agendas, the agenda dispatcher will not recreate agenda views from - scratch, it will only switch to the selected one, and you need to - update the agenda by hand with `r' or `g' when needed. You can - toggle sticky agenda view any time with `org-toggle-sticky-agenda'. - - You can also define custom commands that will be accessible through -the dispatcher, just like the default commands. This includes the -possibility to create extended agenda buffers that contain several -blocks together, for example the weekly agenda, the global TODO list and -a number of special tags matches. *Note Custom agenda views::. - - ---------- Footnotes ---------- - - (1) For backward compatibility, you can also press `1' to restrict -to the current buffer. - - (2) For backward compatibility, you can also press `0' to restrict -to the current region/subtree. - - -File: org, Node: Built-in agenda views, Next: Presentation and sorting, Prev: Agenda dispatcher, Up: Agenda views - -10.3 The built-in agenda views -============================== - -In this section we describe the built-in views. - -* Menu: - -* Weekly/daily agenda:: The calendar page with current tasks -* Global TODO list:: All unfinished action items -* Matching tags and properties:: Structured information with fine-tuned search -* Search view:: Find entries by searching for text -* Stuck projects:: Find projects you need to review - - -File: org, Node: Weekly/daily agenda, Next: Global TODO list, Up: Built-in agenda views - -10.3.1 The weekly/daily agenda ------------------------------- - -The purpose of the weekly/daily _agenda_ is to act like a page of a -paper agenda, showing all the tasks for the current week or day. - -`C-c a a (`org-agenda-list')' - Compile an agenda for the current week from a list of Org files. - The agenda shows the entries for each day. With a numeric - prefix(1) (like `C-u 2 1 C-c a a') you may set the number of days - to be displayed. - - The default number of days displayed in the agenda is set by the -variable `org-agenda-span' (or the obsolete `org-agenda-ndays'). This -variable can be set to any number of days you want to see by default in -the agenda, or to a span name, such as `day', `week', `month' or -`year'. For weekly agendas, the default is to start on the previous -monday (see `org-agenda-start-on-weekday'). You can also set the start -date using a date shift: `(setq org-agenda-start-day "+10d")' will -start the agenda ten days from today in the future. - - Remote editing from the agenda buffer means, for example, that you -can change the dates of deadlines and appointments from the agenda -buffer. The commands available in the Agenda buffer are listed in -*note Agenda commands::. - -Calendar/Diary integration -.......................... - -Emacs contains the calendar and diary by Edward M. Reingold. The -calendar displays a three-month calendar with holidays from different -countries and cultures. The diary allows you to keep track of -anniversaries, lunar phases, sunrise/set, recurrent appointments -(weekly, monthly) and more. In this way, it is quite complementary to -Org. It can be very useful to combine output from Org with the diary. - - In order to include entries from the Emacs diary into Org mode's -agenda, you only need to customize the variable - - (setq org-agenda-include-diary t) - -After that, everything will happen automatically. All diary entries -including holidays, anniversaries, etc., will be included in the agenda -buffer created by Org mode. , , and can be used from -the agenda buffer to jump to the diary file in order to edit existing -diary entries. The `i' command to insert new entries for the current -date works in the agenda buffer, as well as the commands `S', `M', and -`C' to display Sunrise/Sunset times, show lunar phases and to convert -to other calendars, respectively. `c' can be used to switch back and -forth between calendar and agenda. - - If you are using the diary only for sexp entries and holidays, it is -faster to not use the above setting, but instead to copy or even move -the entries into an Org file. Org mode evaluates diary-style sexp -entries, and does it faster because there is no overhead for first -creating the diary display. Note that the sexp entries must start at -the left margin, no whitespace is allowed before them. For example, -the following segment of an Org file will be processed and entries will -be made in the agenda: - - * Holidays - :PROPERTIES: - :CATEGORY: Holiday - :END: - %%(org-calendar-holiday) ; special function for holiday names - - * Birthdays - :PROPERTIES: - :CATEGORY: Ann - :END: - %%(org-anniversary 1956 5 14)(2) Arthur Dent is %d years old - %%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old - -Anniversaries from BBDB -....................... - -If you are using the Big Brothers Database to store your contacts, you -will very likely prefer to store anniversaries in BBDB rather than in a -separate Org or diary file. Org supports this and will show BBDB -anniversaries as part of the agenda. All you need to do is to add the -following to one of your agenda files: - - * Anniversaries - :PROPERTIES: - :CATEGORY: Anniv - :END: - %%(org-bbdb-anniversaries) - - You can then go ahead and define anniversaries for a BBDB record. -Basically, you need to press `C-o anniversary ' with the cursor in -a BBDB record and then add the date in the format `YYYY-MM-DD' or -`MM-DD', followed by a space and the class of the anniversary -(`birthday' or `wedding', or a format string). If you omit the class, -it will default to `birthday'. Here are a few examples, the header for -the file `org-bbdb.el' contains more detailed information. - - 1973-06-22 - 06-22 - 1955-08-02 wedding - 2008-04-14 %s released version 6.01 of org mode, %d years ago - - After a change to BBDB, or for the first agenda display during an -Emacs session, the agenda display will suffer a short delay as Org -updates its hash with anniversaries. However, from then on things will -be very fast--much faster in fact than a long list of -`%%(diary-anniversary)' entries in an Org or Diary file. - - If you would like to see upcoming anniversaries with a bit of -forewarning, you can use the following instead: - - * Anniversaries - :PROPERTIES: - :CATEGORY: Anniv - :END: - %%(org-bbdb-anniversaries-future 3) - - That will give you three days' warning: on the anniversary date -itself and the two days prior. The argument is optional: if omitted, it -defaults to 7. - -Appointment reminders -..................... - -Org can interact with Emacs appointments notification facility. To add -the appointments of your agenda files, use the command -`org-agenda-to-appt'. This command lets you filter through the list of -your appointments and add only those belonging to a specific category -or matching a regular expression. It also reads a `APPT_WARNTIME' -property which will then override the value of -`appt-message-warning-time' for this appointment. See the docstring -for details. - - ---------- Footnotes ---------- - - (1) For backward compatibility, the universal prefix `C-u' causes -all TODO entries to be listed before the agenda. This feature is -deprecated, use the dedicated TODO list, or a block agenda instead -(*note Block agenda::). - - (2) `org-anniversary' is just like `diary-anniversary', but the -argument order is always according to ISO and therefore independent of -the value of `calendar-date-style'. - - -File: org, Node: Global TODO list, Next: Matching tags and properties, Prev: Weekly/daily agenda, Up: Built-in agenda views - -10.3.2 The global TODO list ---------------------------- - -The global TODO list contains all unfinished TODO items formatted and -collected into a single place. - -`C-c a t (`org-todo-list')' - Show the global TODO list. This collects the TODO items from all - agenda files (*note Agenda views::) into a single buffer. By - default, this lists items with a state the is not a DONE state. - The buffer is in `agenda-mode', so there are commands to examine - and manipulate the TODO entries directly from that buffer (*note - Agenda commands::). - -`C-c a T (`org-todo-list')' - Like the above, but allows selection of a specific TODO keyword. - You can also do this by specifying a prefix argument to `C-c a t'. - You are prompted for a keyword, and you may also specify several - keywords by separating them with `|' as the boolean OR operator. - With a numeric prefix, the Nth keyword in `org-todo-keywords' is - selected. The `r' key in the agenda buffer regenerates it, and - you can give a prefix argument to this command to change the - selected TODO keyword, for example `3 r'. If you often need a - search for a specific keyword, define a custom command for it - (*note Agenda dispatcher::). - Matching specific TODO keywords can also be done as part of a tags - search (*note Tag searches::). - - Remote editing of TODO items means that you can change the state of a -TODO entry with a single key press. The commands available in the TODO -list are described in *note Agenda commands::. - - Normally the global TODO list simply shows all headlines with TODO -keywords. This list can become very long. There are two ways to keep -it more compact: - - Some people view a TODO item that has been _scheduled_ for - execution or have a _deadline_ (*note Timestamps::) as no longer - _open_. Configure the variables - `org-agenda-todo-ignore-scheduled', - `org-agenda-todo-ignore-deadlines', - `org-agenda-todo-ignore-timestamp' and/or - `org-agenda-todo-ignore-with-date' to exclude such items from the - global TODO list. - - - TODO items may have sublevels to break up the task into subtasks. - In such cases it may be enough to list only the highest level TODO - headline and omit the sublevels from the global list. Configure - the variable `org-agenda-todo-list-sublevels' to get this behavior. - - -File: org, Node: Matching tags and properties, Next: Search view, Prev: Global TODO list, Up: Built-in agenda views - -10.3.3 Matching tags and properties ------------------------------------ - -If headlines in the agenda files are marked with _tags_ (*note Tags::), -or have properties (*note Properties and columns::), you can select -headlines based on this metadata and collect them into an agenda -buffer. The match syntax described here also applies when creating -sparse trees with `C-c / m'. - -`C-c a m (`org-tags-view')' - Produce a list of all headlines that match a given set of tags. - The command prompts for a selection criterion, which is a boolean - logic expression with tags, like `+work+urgent-withboss' or - `work|home' (*note Tags::). If you often need a specific search, - define a custom command for it (*note Agenda dispatcher::). - -`C-c a M (`org-tags-view')' - Like `C-c a m', but only select headlines that are also TODO items - in a not-DONE state and force checking subitems (see variable - `org-tags-match-list-sublevels'). To exclude scheduled/deadline - items, see the variable - `org-agenda-tags-todo-honor-ignore-options'. Matching specific - TODO keywords together with a tags match is also possible, see - *note Tag searches::. - - The commands available in the tags list are described in *note -Agenda commands::. - -Match syntax -............ - -A search string can use Boolean operators `&' for `AND' and `|' for -`OR'. `&' binds more strongly than `|'. Parentheses are not -implemented. Each element in the search is either a tag, a regular -expression matching tags, or an expression like `PROPERTY OPERATOR -VALUE' with a comparison operator, accessing a property value. Each -element may be preceded by `-', to select against it, and `+' is -syntactic sugar for positive selection. The `AND' operator `&' is -optional when `+' or `-' is present. Here are some examples, using -only tags. - -`work' - Select headlines tagged `:work:'. - -`work&boss' - Select headlines tagged `:work:' and `:boss:'. - -`+work-boss' - Select headlines tagged `:work:', but discard those also tagged - `:boss:'. - -`work|laptop' - Selects lines tagged `:work:' or `:laptop:'. - -`work|laptop+night' - Like before, but require the `:laptop:' lines to be tagged also - `:night:'. - - Instead of a tag, you may also specify a regular expression enclosed -in curly braces. For example, `work+{^boss.*}' matches headlines that -contain the tag `:work:' and any tag starting with `boss'. - - Group tags (*note Tag hierarchy::) are expanded as regular -expressions. E.g., if `:work:' is a group tag for the group -`:work:lab:conf:', then searching for `work' will search for -`{\(?:work\|lab\|conf\)}' and searching for `-work' will search for all -headlines but those with one of the tags in the group (i.e., -`-{\(?:work\|lab\|conf\)}'). - - You may also test for properties (*note Properties and columns::) at -the same time as matching tags. The properties may be real properties, -or special properties that represent other metadata (*note Special -properties::). For example, the "property" `TODO' represents the TODO -keyword of the entry and the "property" `PRIORITY' represents the -PRIORITY keyword of the entry. - - In addition to the properties mentioned above, `LEVEL' represents the -level of an entry. So a search `+LEVEL=3+boss-TODO="DONE"' lists all -level three headlines that have the tag `boss' and are _not_ marked -with the TODO keyword DONE. In buffers with `org-odd-levels-only' set, -`LEVEL' does not count the number of stars, but `LEVEL=2' will -correspond to 3 stars etc. - - Here are more examples: - -`work+TODO="WAITING"' - Select `:work:'-tagged TODO lines with the specific TODO keyword - `WAITING'. - -`work+TODO="WAITING"|home+TODO="WAITING"' - Waiting tasks both at work and at home. - - When matching properties, a number of different operators can be -used to test the value of a property. Here is a complex example: - - +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 \ - +With={Sarah\|Denny}+SCHEDULED>="<2008-10-11>" - -The type of comparison will depend on how the comparison value is -written: - - If the comparison value is a plain number, a numerical comparison - is done, and the allowed operators are `<', `=', `>', `<=', `>=', - and `<>'. - - - If the comparison value is enclosed in double-quotes, a string - comparison is done, and the same operators are allowed. - - - If the comparison value is enclosed in double-quotes _and_ angular - brackets (like `DEADLINE<="<2008-12-24 18:30>"'), both values are - assumed to be date/time specifications in the standard Org way, - and the comparison will be done accordingly. Special values that - will be recognized are `""' for now (including time), and - `""', and `""' for these days at 00:00 hours, - i.e., without a time specification. Also strings like `"<+5d>"' - or `"<-2m>"' with units `d', `w', `m', and `y' for day, week, - month, and year, respectively, can be used. - - - If the comparison value is enclosed in curly braces, a regexp - match is performed, with `=' meaning that the regexp matches the - property value, and `<>' meaning that it does not match. - - So the search string in the example finds entries tagged `:work:' but -not `:boss:', which also have a priority value `A', a `:Coffee:' -property with the value `unlimited', an `Effort' property that is -numerically smaller than 2, a `:With:' property that is matched by the -regular expression `Sarah\|Denny', and that are scheduled on or after -October 11, 2008. - - You can configure Org mode to use property inheritance during a -search, but beware that this can slow down searches considerably. See -*note Property inheritance::, for details. - - For backward compatibility, and also for typing speed, there is also -a different way to test TODO states in a search. For this, terminate -the tags/property part of the search string (which may include several -terms connected with `|') with a `/' and then specify a Boolean -expression just for TODO keywords. The syntax is then similar to that -for tags, but should be applied with care: for example, a positive -selection on several TODO keywords cannot meaningfully be combined with -boolean AND. However, _negative selection_ combined with AND can be -meaningful. To make sure that only lines are checked that actually -have any TODO keyword (resulting in a speed-up), use `C-c a M', or -equivalently start the TODO part after the slash with `!'. Using `C-c -a M' or `/!' will not match TODO keywords in a DONE state. Examples: - -`work/WAITING' - Same as `work+TODO="WAITING"' - -`work/!-WAITING-NEXT' - Select `:work:'-tagged TODO lines that are neither `WAITING' nor - `NEXT' - -`work/!+WAITING|+NEXT' - Select `:work:'-tagged TODO lines that are either `WAITING' or - `NEXT'. - - -File: org, Node: Search view, Next: Stuck projects, Prev: Matching tags and properties, Up: Built-in agenda views - -10.3.4 Search view ------------------- - -This agenda view is a general text search facility for Org mode entries. -It is particularly useful to find notes. - -`C-c a s (`org-search-view')' - This is a special search that lets you select entries by matching - a substring or specific words using a boolean logic. - For example, the search string `computer equipment' will find entries -that contain `computer equipment' as a substring. If the two words are -separated by more space or a line break, the search will still match. -Search view can also search for specific keywords in the entry, using -Boolean logic. The search string `+computer +wifi -ethernet --{8\.11[bg]}' will search for note entries that contain the keywords -`computer' and `wifi', but not the keyword `ethernet', and which are -also not matched by the regular expression `8\.11[bg]', meaning to -exclude both 8.11b and 8.11g. The first `+' is necessary to turn on -word search, other `+' characters are optional. For more details, see -the docstring of the command `org-search-view'. - - Note that in addition to the agenda files, this command will also -search the files listed in `org-agenda-text-search-extra-files'. - - -File: org, Node: Stuck projects, Prev: Search view, Up: Built-in agenda views - -10.3.5 Stuck projects ---------------------- - -If you are following a system like David Allen's GTD to organize your -work, one of the "duties" you have is a regular review to make sure -that all projects move along. A _stuck_ project is a project that has -no defined next actions, so it will never show up in the TODO lists Org -mode produces. During the review, you need to identify such projects -and define next actions for them. - -`C-c a # (`org-agenda-list-stuck-projects')' - List projects that are stuck. - -`C-c a !' - Customize the variable `org-stuck-projects' to define what a stuck - project is and how to find it. - - You almost certainly will have to configure this view before it will -work for you. The built-in default assumes that all your projects are -level-2 headlines, and that a project is not stuck if it has at least -one entry marked with a TODO keyword TODO or NEXT or NEXTACTION. - - Let's assume that you, in your own way of using Org mode, identify -projects with a tag PROJECT, and that you use a TODO keyword MAYBE to -indicate a project that should not be considered yet. Let's further -assume that the TODO keyword DONE marks finished projects, and that NEXT -and TODO indicate next actions. The tag @SHOP indicates shopping and -is a next action even without the NEXT tag. Finally, if the project -contains the special word IGNORE anywhere, it should not be listed -either. In this case you would start by identifying eligible projects -with a tags/todo match(1) `+PROJECT/-MAYBE-DONE', and then check for -TODO, NEXT, @SHOP, and IGNORE in the subtree to identify projects that -are not stuck. The correct customization for this is - - (setq org-stuck-projects - '("+PROJECT/-MAYBE-DONE" ("NEXT" "TODO") ("@SHOP") - "\\")) - - Note that if a project is identified as non-stuck, the subtree of -this entry will still be searched for stuck projects. - - ---------- Footnotes ---------- - - (1) *Note Tag searches::. - - -File: org, Node: Presentation and sorting, Next: Agenda commands, Prev: Built-in agenda views, Up: Agenda views - -10.4 Presentation and sorting -============================= - -Before displaying items in an agenda view, Org mode visually prepares -the items and sorts them. Each item occupies a single line. The line -starts with a _prefix_ that contains the _category_ (*note Categories::) -of the item and other important information. You can customize in which -column tags will be displayed through `org-agenda-tags-column'. You can -also customize the prefix using the option `org-agenda-prefix-format'. -This prefix is followed by a cleaned-up version of the outline headline -associated with the item. - -* Menu: - -* Categories:: Not all tasks are equal -* Time-of-day specifications:: How the agenda knows the time -* Sorting agenda items:: The order of things -* Filtering/limiting agenda items:: Dynamically narrow the agenda - - -File: org, Node: Categories, Next: Time-of-day specifications, Up: Presentation and sorting - -10.4.1 Categories ------------------ - -The category is a broad label assigned to each agenda item. By -default, the category is simply derived from the file name, but you can -also specify it with a special line in the buffer, like this: - - #+CATEGORY: Thesis - -If you would like to have a special CATEGORY for a single entry or a -(sub)tree, give the entry a `:CATEGORY:' property with the special -category you want to apply as the value. - -The display in the agenda buffer looks best if the category is not -longer than 10 characters. - -You can set up icons for category by customizing the -`org-agenda-category-icon-alist' variable. - - -File: org, Node: Time-of-day specifications, Next: Sorting agenda items, Prev: Categories, Up: Presentation and sorting - -10.4.2 Time-of-day specifications ---------------------------------- - -Org mode checks each agenda item for a time-of-day specification. The -time can be part of the timestamp that triggered inclusion into the -agenda, for example as in `<2005-05-10 Tue 19:00>'. Time ranges can be -specified with two timestamps, like -`<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>'. - - In the headline of the entry itself, a time(range) may also appear as -plain text (like `12:45' or a `8:30-1pm'). If the agenda integrates -the Emacs diary (*note Weekly/daily agenda::), time specifications in -diary entries are recognized as well. - - For agenda display, Org mode extracts the time and displays it in a -standard 24 hour format as part of the prefix. The example times in -the previous paragraphs would end up in the agenda like this: - - 8:30-13:00 Arthur Dent lies in front of the bulldozer - 12:45...... Ford Prefect arrives and takes Arthur to the pub - 19:00...... The Vogon reads his poem - 20:30-22:15 Marvin escorts the Hitchhikers to the bridge - - If the agenda is in single-day mode, or for the display of today, the -timed entries are embedded in a time grid, like - - 8:00...... ------------------ - 8:30-13:00 Arthur Dent lies in front of the bulldozer - 10:00...... ------------------ - 12:00...... ------------------ - 12:45...... Ford Prefect arrives and takes Arthur to the pub - 14:00...... ------------------ - 16:00...... ------------------ - 18:00...... ------------------ - 19:00...... The Vogon reads his poem - 20:00...... ------------------ - 20:30-22:15 Marvin escorts the Hitchhikers to the bridge - - The time grid can be turned on and off with the variable -`org-agenda-use-time-grid', and can be configured with -`org-agenda-time-grid'. - - -File: org, Node: Sorting agenda items, Next: Filtering/limiting agenda items, Prev: Time-of-day specifications, Up: Presentation and sorting - -10.4.3 Sorting agenda items ---------------------------- - -Before being inserted into a view, the items are sorted. How this is -done depends on the type of view. - * For the daily/weekly agenda, the items for each day are sorted. - The default order is to first collect all items containing an - explicit time-of-day specification. These entries will be shown - at the beginning of the list, as a _schedule_ for the day. After - that, items remain grouped in categories, in the sequence given by - `org-agenda-files'. Within each category, items are sorted by - priority (*note Priorities::), which is composed of the base - priority (2000 for priority `A', 1000 for `B', and 0 for `C'), - plus additional increments for overdue scheduled or deadline items. - - * For the TODO list, items remain in the order of categories, but - within each category, sorting takes place according to priority - (*note Priorities::). The priority used for sorting derives from - the priority cookie, with additions depending on how close an item - is to its due or scheduled date. - - * For tags matches, items are not sorted at all, but just appear in - the sequence in which they are found in the agenda files. - - Sorting can be customized using the variable -`org-agenda-sorting-strategy', and may also include criteria based on -the estimated effort of an entry (*note Effort estimates::). - - -File: org, Node: Filtering/limiting agenda items, Prev: Sorting agenda items, Up: Presentation and sorting - -10.4.4 Filtering/limiting agenda items --------------------------------------- - -Agenda built-in or customized commands are statically defined. Agenda -filters and limits provide two ways of dynamically narrowing down the -list of agenda entries: _filters_ and _limits_. Filters only act on the -display of the items, while limits take effect before the list of agenda -entries is built. Filters are more often used interactively, while -limits are mostly useful when defined as local variables within custom -agenda commands. - -Filtering in the agenda -....................... - -`/ (`org-agenda-filter-by-tag')' - Filter the agenda view with respect to a tag and/or effort - estimates. The difference between this and a custom agenda - command is that filtering is very fast, so that you can switch - quickly between different filters without having to recreate the - agenda.(1) - - You will be prompted for a tag selection letter; will mean - any tag at all. Pressing at that prompt will offer use - completion to select a tag (including any tags that do not have a - selection character). The command then hides all entries that do - not contain or inherit this tag. When called with prefix arg, - remove the entries that _do_ have the tag. A second `/' at the - prompt will turn off the filter and unhide any hidden entries. - Pressing `+' or `-' switches between filtering and excluding the - next tag. - - Org also supports automatic, context-aware tag filtering. If the - variable `org-agenda-auto-exclude-function' is set to a - user-defined function, that function can decide which tags should - be excluded from the agenda automatically. Once this is set, the - `/' command then accepts `RET' as a sub-option key and runs the - auto exclusion logic. For example, let's say you use a `Net' tag - to identify tasks which need network access, an `Errand' tag for - errands in town, and a `Call' tag for making phone calls. You - could auto-exclude these tags based on the availability of the - Internet, and outside of business hours, with something like this: - - (defun org-my-auto-exclude-function (tag) - (and (cond - ((string= tag "Net") - (/= 0 (call-process "/sbin/ping" nil nil nil - "-c1" "-q" "-t1" "mail.gnu.org"))) - ((or (string= tag "Errand") (string= tag "Call")) - (let ((hour (nth 2 (decode-time)))) - (or (< hour 8) (> hour 21))))) - (concat "-" tag))) - - (setq org-agenda-auto-exclude-function 'org-my-auto-exclude-function) - -`[ ] { }' - - in search view - add new search words (`[' and `]') or new regular expressions - (`{' and `}') to the query string. The opening bracket/brace - will add a positive search term prefixed by `+', indicating - that this search term must occur/match in the entry. The - closing bracket/brace will add a negative search term which - must not occur/match in the entry for it to be selected. - -`< (`org-agenda-filter-by-category')' - Filter the current agenda view with respect to the category of the - item at point. Pressing `<' another time will remove this filter. - When called with a prefix argument exclude the category of the - item at point from the agenda. - - You can add a filter preset in custom agenda commands through the - option `org-agenda-category-filter-preset'. *Note Setting - options::. - -`^ (`org-agenda-filter-by-top-headline')' - Filter the current agenda view and only display the siblings and - the parent headline of the one at point. - -`= (`org-agenda-filter-by-regexp')' - Filter the agenda view by a regular expression: only show agenda - entries matching the regular expression the user entered. When - called with a prefix argument, it will filter _out_ entries - matching the regexp. With two universal prefix arguments, it will - remove all the regexp filters, which can be accumulated. - - You can add a filter preset in custom agenda commands through the - option `org-agenda-regexp-filter-preset'. *Note Setting options::. - -`_ (`org-agenda-filter-by-effort')' - Filter the agenda view with respect to effort estimates. You - first need to set up allowed efforts globally, for example - (setq org-global-properties - '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00"))) - You can then filter for an effort by first typing an operator, one - of `<', `>', and `=', and then the one-digit index of an effort - estimate in your array of allowed values, where `0' means the 10th - value. The filter will then restrict to entries with effort - smaller-or-equal, equal, or larger-or-equal than the selected - value. For application of the operator, entries without a defined - effort will be treated according to the value of - `org-sort-agenda-noeffort-is-high'. - - When called with a prefix argument, it will remove entries - matching the condition. With two universal prefix arguments, it - will clear effort filters, which can be accumulated. - - You can add a filter preset in custom agenda commands through the - option `org-agenda-effort-filter-preset'. *Note Setting options::. - -`| (`org-agenda-filter-remove-all')' - Remove all filters in the current agenda view. - -Setting limits for the agenda -............................. - -Here is a list of options that you can set, either globally, or locally -in your custom agenda views (*note Custom agenda views::). - -`org-agenda-max-entries' - Limit the number of entries. - -`org-agenda-max-effort' - Limit the duration of accumulated efforts (as minutes). - -`org-agenda-max-todos' - Limit the number of entries with TODO keywords. - -`org-agenda-max-tags' - Limit the number of tagged entries. - - When set to a positive integer, each option will exclude entries -from other categories: for example, `(setq org-agenda-max-effort 100)' -will limit the agenda to 100 minutes of effort and exclude any entry -that has no effort property. If you want to include entries with no -effort property, use a negative value for `org-agenda-max-effort'. - - One useful setup is to use `org-agenda-max-entries' locally in a -custom command. For example, this custom command will display the next -five entries with a `NEXT' TODO keyword. - - (setq org-agenda-custom-commands - '(("n" todo "NEXT" - ((org-agenda-max-entries 5))))) - - Once you mark one of these five entry as `DONE', rebuilding the -agenda will again the next five entries again, including the first -entry that was excluded so far. - - You can also dynamically set temporary limits, which will be lost -when rebuilding the agenda: - -`~ (`org-agenda-limit-interactively')' - This prompts for the type of limit to apply and its value. - - ---------- Footnotes ---------- - - (1) Custom commands can preset a filter by binding the variable -`org-agenda-tag-filter-preset' as an option. This filter will then be -applied to the view and persist as a basic filter through refreshes and -more secondary filtering. The filter is a global property of the -entire agenda view--in a block agenda, you should only set this in the -global options section, not in the section of an individual block. - - -File: org, Node: Agenda commands, Next: Custom agenda views, Prev: Presentation and sorting, Up: Agenda views - -10.5 Commands in the agenda buffer -================================== - -Entries in the agenda buffer are linked back to the Org file or diary -file where they originate. You are not allowed to edit the agenda -buffer itself, but commands are provided to show and jump to the -original entry location, and to edit the Org files "remotely" from the -agenda buffer. In this way, all information is stored only once, -removing the risk that your agenda and note files may diverge. - - Some commands can be executed with mouse clicks on agenda lines. For -the other commands, the cursor needs to be in the desired line. - -Motion -...... - -`n (`org-agenda-next-line')' - Next line (same as and `C-n'). - -`p (`org-agenda-previous-line')' - Previous line (same as and `C-p'). - -`N (`org-agenda-next-item')' - Next item: same as next line, but only consider items. - -`P (`org-agenda-previous-item')' - Previous item: same as previous line, but only consider items. - -View/Go to Org file -................... - -` or mouse-3 (`org-agenda-show-and-scroll-up')' - Display the original location of the item in another window. With - prefix arg, make sure that drawers stay folded. - -`L (`org-agenda-recenter')' - Display original location and recenter that window. - -` or mouse-2 (`org-agenda-goto')' - Go to the original location of the item in another window. - -` (`org-agenda-switch-to')' - Go to the original location of the item and delete other windows. - -`F (`org-agenda-follow-mode')' - Toggle Follow mode. In Follow mode, as you move the cursor through - the agenda buffer, the other window always shows the corresponding - location in the Org file. The initial setting for this mode in new - agenda buffers can be set with the variable - `org-agenda-start-with-follow-mode'. - -`C-c C-x b (`org-agenda-tree-to-indirect-buffer')' - Display the entire subtree of the current item in an indirect - buffer. With a numeric prefix argument N, go up to level N and - then take that tree. If N is negative, go up that many levels. - With a `C-u' prefix, do not remove the previously used indirect - buffer. - -`C-c C-o (`org-agenda-open-link')' - Follow a link in the entry. This will offer a selection of any - links in the text belonging to the referenced Org node. If there - is only one link, it will be followed without a selection prompt. - -Change display -.............. - -`A' - Interactively select another agenda view and append it to the - current view. - -`o' - Delete other windows. - -`v d or short d (`org-agenda-day-view')' -`v w or short w (`org-agenda-week-view')' -`v t (`org-agenda-fortnight-view')' -`v m (`org-agenda-month-view')' -`v y (`org-agenda-year-view')' -`v SPC (`org-agenda-reset-view')' - Switch to day/week/month/year view. When switching to day or week - view, this setting becomes the default for subsequent agenda - refreshes. Since month and year views are slow to create, they do - not become the default. A numeric prefix argument may be used to - jump directly to a specific day of the year, ISO week, month, or - year, respectively. For example, `32 d' jumps to February 1st, `9 - w' to ISO week number 9. When setting day, week, or month view, a - year may be encoded in the prefix argument as well. For example, - `200712 w' will jump to week 12 in 2007. If such a year - specification has only one or two digits, it will be mapped to the - interval 1938-2037. `v ' will reset to what is set in - `org-agenda-span'. - -`f (`org-agenda-later')' - Go forward in time to display the following - `org-agenda-current-span' days. For example, if the display - covers a week, switch to the following week. With prefix arg, go - forward that many times `org-agenda-current-span' days. - -`b (`org-agenda-earlier')' - Go backward in time to display earlier dates. - -`. (`org-agenda-goto-today')' - Go to today. - -`j (`org-agenda-goto-date')' - Prompt for a date and go there. - -`J (`org-agenda-clock-goto')' - Go to the currently clocked-in task in the agenda buffer. - -`D (`org-agenda-toggle-diary')' - Toggle the inclusion of diary entries. See *note Weekly/daily - agenda::. - -`v l or short l (`org-agenda-log-mode')' - Toggle Logbook mode. In Logbook mode, entries that were marked - DONE while logging was on (variable `org-log-done') are shown in - the agenda, as are entries that have been clocked on that day. - You can configure the entry types that should be included in log - mode using the variable `org-agenda-log-mode-items'. When called - with a `C-u' prefix, show all possible logbook entries, including - state changes. When called with two prefix arguments `C-u C-u', - show only logging information, nothing else. `v L' is equivalent - to `C-u v l'. - -`v [ or short [ (`org-agenda-manipulate-query-add')' - Include inactive timestamps into the current view. Only for - weekly/daily agenda. - -`v a (`org-agenda-archives-mode')' -`v A (`org-agenda-archives-mode 'files')' - Toggle Archives mode. In Archives mode, trees that are marked - `ARCHIVED' are also scanned when producing the agenda. When you - use the capital `A', even all archive files are included. To exit - archives mode, press `v a' again. - -`v R or short R (`org-agenda-clockreport-mode')' - Toggle Clockreport mode. In Clockreport mode, the daily/weekly - agenda will always show a table with the clocked times for the - time span and file scope covered by the current agenda view. The - initial setting for this mode in new agenda buffers can be set - with the variable `org-agenda-start-with-clockreport-mode'. By - using a prefix argument when toggling this mode (i.e., `C-u R'), - the clock table will not show contributions from entries that are - hidden by agenda filtering(1). See also the variable - `org-clock-report-include-clocking-task'. - -`v c' - Show overlapping clock entries, clocking gaps, and other clocking - problems in the current agenda range. You can then visit clocking - lines and fix them manually. See the variable - `org-agenda-clock-consistency-checks' for information on how to - customize the definition of what constituted a clocking problem. - To return to normal agenda display, press `l' to exit Logbook mode. - -`v E or short E (`org-agenda-entry-text-mode')' - Toggle entry text mode. In entry text mode, a number of lines - from the Org outline node referenced by an agenda line will be - displayed below the line. The maximum number of lines is given by - the variable `org-agenda-entry-text-maxlines'. Calling this - command with a numeric prefix argument will temporarily modify - that number to the prefix value. - -`G (`org-agenda-toggle-time-grid')' - Toggle the time grid on and off. See also the variables - `org-agenda-use-time-grid' and `org-agenda-time-grid'. - -`r (`org-agenda-redo')' - Recreate the agenda buffer, for example to reflect the changes - after modification of the timestamps of items with `S-' and - `S-'. When the buffer is the global TODO list, a prefix - argument is interpreted to create a selective list for a specific - TODO keyword. - -`g (`org-agenda-redo')' - Same as `r'. - -`C-x C-s or short s (`org-save-all-org-buffers')' - Save all Org buffers in the current Emacs session, and also the - locations of IDs. - -`C-c C-x C-c (`org-agenda-columns')' - Invoke column view (*note Column view::) in the agenda buffer. - The column view format is taken from the entry at point, or (if - there is no entry at point), from the first entry in the agenda - view. So whatever the format for that entry would be in the - original buffer (taken from a property, from a `#+COLUMNS' line, - or from the default variable `org-columns-default-format'), will - be used in the agenda. - -`C-c C-x > (`org-agenda-remove-restriction-lock')' - Remove the restriction lock on the agenda, if it is currently - restricted to a file or subtree (*note Agenda files::). - -Secondary filtering and query editing -..................................... - - For a detailed description of these commands, *note - Filtering/limiting agenda items::. - -`/ (`org-agenda-filter-by-tag')' - Filter the agenda view with respect to a tag and/or effort - estimates. - -`< (`org-agenda-filter-by-category')' - Filter the current agenda view with respect to the category of the - item at point. - -`^ (`org-agenda-filter-by-top-headline')' - Filter the current agenda view and only display the siblings and - the parent headline of the one at point. - -`= (`org-agenda-filter-by-regexp')' - Filter the agenda view by a regular expression. - -`_ (`org-agenda-filter-by-effort')' - Filter the agenda view with respect to effort estimates. - -`| (`org-agenda-filter-remove-all')' - Remove all filters in the current agenda view. - -Remote editing -.............. - -`0--9' - Digit argument. - -`C-_ (`org-agenda-undo')' - Undo a change due to a remote editing command. The change is - undone both in the agenda buffer and in the remote buffer. - -`t (`org-agenda-todo')' - Change the TODO state of the item, both in the agenda and in the - original org file. - -`C-S- (`org-agenda-todo-nextset')' - -`C-S- (`org-agenda-todo-previousset')' - Switch to the next/previous set of TODO keywords. - -`C-k (`org-agenda-kill')' - Delete the current agenda item along with the entire subtree - belonging to it in the original Org file. If the text to be - deleted remotely is longer than one line, the kill needs to be - confirmed by the user. See variable `org-agenda-confirm-kill'. - -`C-c C-w (`org-agenda-refile')' - Refile the entry at point. - -`C-c C-x C-a or short a (`org-agenda-archive-default-with-confirmation')' - Archive the subtree corresponding to the entry at point using the - default archiving command set in `org-archive-default-command'. - When using the `a' key, confirmation will be required. - -`C-c C-x a (`org-agenda-toggle-archive-tag')' - Toggle the ARCHIVE tag for the current headline. - -`C-c C-x A (`org-agenda-archive-to-archive-sibling')' - Move the subtree corresponding to the current entry to its _archive - sibling_. - -`C-c C-x C-s or short $ (`org-agenda-archive')' - Archive the subtree corresponding to the current headline. This - means the entry will be moved to the configured archive location, - most likely a different file. - -`T (`org-agenda-show-tags')' - Show all tags associated with the current item. This is useful if - you have turned off `org-agenda-show-inherited-tags', but still - want to see all tags of a headline occasionally. - -`: (`org-agenda-set-tags')' - Set tags for the current headline. If there is an active region - in the agenda, change a tag for all headings in the region. - -`,' - Set the priority for the current item (`org-agenda-priority'). - Org mode prompts for the priority character. If you reply with - , the priority cookie is removed from the entry. - -`P (`org-agenda-show-priority')' - Display weighted priority of current item. - -`+ or S- (`org-agenda-priority-up')' - Increase the priority of the current item. The priority is - changed in the original buffer, but the agenda is not resorted. - Use the `r' key for this. - -`- or S- (`org-agenda-priority-down')' - Decrease the priority of the current item. - -`z or C-c C-z (`org-agenda-add-note')' - Add a note to the entry. This note will be recorded, and then - filed to the same location where state change notes are put. - Depending on `org-log-into-drawer', this may be inside a drawer. - -`C-c C-a (`org-attach')' - Dispatcher for all command related to attachments. - -`C-c C-s (`org-agenda-schedule')' - Schedule this item. With prefix arg remove the scheduling - timestamp - -`C-c C-d (`org-agenda-deadline')' - Set a deadline for this item. With prefix arg remove the deadline. - -`S- (`org-agenda-do-date-later')' - Change the timestamp associated with the current line by one day - into the future. If the date is in the past, the first call to - this command will move it to today. - With a numeric prefix argument, change it by that many days. For - example, `3 6 5 S-' will change it by a year. With a `C-u' - prefix, change the time by one hour. If you immediately repeat - the command, it will continue to change hours even without the - prefix arg. With a double `C-u C-u' prefix, do the same for - changing minutes. - The stamp is changed in the original Org file, but the change is - not directly reflected in the agenda buffer. Use `r' or `g' to - update the buffer. - -`S- (`org-agenda-do-date-earlier')' - Change the timestamp associated with the current line by one day - into the past. - -`> (`org-agenda-date-prompt')' - Change the timestamp associated with the current line. The key - `>' has been chosen, because it is the same as `S-.' on my - keyboard. - -`I (`org-agenda-clock-in')' - Start the clock on the current item. If a clock is running - already, it is stopped first. - -`O (`org-agenda-clock-out')' - Stop the previously started clock. - -`X (`org-agenda-clock-cancel')' - Cancel the currently running clock. - -`J (`org-agenda-clock-goto')' - Jump to the running clock in another window. - -`k (`org-agenda-capture')' - Like `org-capture', but use the date at point as the default date - for the capture template. See `org-capture-use-agenda-date' to - make this the default behavior of `org-capture'. - -Dragging agenda lines forward/backward -...................................... - -`M- (`org-agenda-drag-line-backward')' - Drag the line at point backward one line(2). With a numeric - prefix argument, drag backward by that many lines. - -`M- (`org-agenda-drag-line-forward')' - Drag the line at point forward one line. With a numeric prefix - argument, drag forward by that many lines. - -Bulk remote editing selected entries -.................................... - -`m (`org-agenda-bulk-mark')' - Mark the entry at point for bulk action. With numeric prefix - argument, mark that many successive entries. - -`* (`org-agenda-bulk-mark-all')' - Mark all visible agenda entries for bulk action. - -`u (`org-agenda-bulk-unmark')' - Unmark entry at point for bulk action. - -`U (`org-agenda-bulk-remove-all-marks')' - Unmark all marked entries for bulk action. - -`M-m (`org-agenda-bulk-toggle')' - Toggle mark of the entry at point for bulk action. - -`M-* (`org-agenda-bulk-toggle-all')' - Toggle marks of all visible entries for bulk action. - -`% (`org-agenda-bulk-mark-regexp')' - Mark entries matching a regular expression for bulk action. - -`B (`org-agenda-bulk-action')' - Bulk action: act on all marked entries in the agenda. This will - prompt for another key to select the action to be applied. The - prefix arg to `B' will be passed through to the `s' and `d' - commands, to bulk-remove these special timestamps. By default, - marks are removed after the bulk. If you want them to persist, - set `org-agenda-persistent-marks' to `t' or hit `p' at the prompt. - - `*' - Toggle persistent marks. - - `$' - Archive all selected entries. - - `A' - Archive entries by moving them to their respective archive - siblings. - - `t' - Change TODO state. This prompts for a single TODO keyword - and changes the state of all selected entries, bypassing - blocking and suppressing logging notes (but not timestamps). - - `+' - Add a tag to all selected entries. - - `-' - Remove a tag from all selected entries. - - `s' - Schedule all items to a new date. To shift existing schedule - dates by a fixed number of days, use something starting with - double plus at the prompt, for example `++8d' or `++2w'. - - `d' - Set deadline to a specific date. - - `r' - Prompt for a single refile target and move all entries. The - entries will no longer be in the agenda; refresh (`g') to - bring them back. - - `S' - Reschedule randomly into the coming N days. N will be - prompted for. With prefix arg (`C-u B S'), scatter only - across weekdays. - - `f' - Apply a function(3) to marked entries. For example, the - function below sets the CATEGORY property of the entries to - web. - - (defun set-category () - (interactive "P") - (let* ((marker (or (org-get-at-bol 'org-hd-marker) - (org-agenda-error))) - (buffer (marker-buffer marker))) - (with-current-buffer buffer - (save-excursion - (save-restriction - (widen) - (goto-char marker) - (org-back-to-heading t) - (org-set-property "CATEGORY" "web")))))) - -Calendar commands -................. - -`c (`org-agenda-goto-calendar')' - Open the Emacs calendar and move to the date at the agenda cursor. - -`c (`org-calendar-goto-agenda')' - When in the calendar, compute and show the Org mode agenda for the - date at the cursor. - -`i (`org-agenda-diary-entry')' - Insert a new entry into the diary, using the date at the cursor - and (for block entries) the date at the mark. This will add to - the Emacs diary file(4), in a way similar to the `i' command in - the calendar. The diary file will pop up in another window, where - you can add the entry. - - If you configure `org-agenda-diary-file' to point to an Org mode - file, Org will create entries (in Org mode syntax) in that file - instead. Most entries will be stored in a date-based outline tree - that will later make it easy to archive appointments from previous - months/years. The tree will be built under an entry with a - `DATE_TREE' property, or else with years as top-level entries. - Emacs will prompt you for the entry text--if you specify it, the - entry will be created in `org-agenda-diary-file' without further - interaction. If you directly press at the prompt without - typing text, the target file will be shown in another window for - you to finish the entry there. See also the `k r' command. - -`M (`org-agenda-phases-of-moon')' - Show the phases of the moon for the three months around current - date. - -`S (`org-agenda-sunrise-sunset')' - Show sunrise and sunset times. The geographical location must be - set with calendar variables, see the documentation for the Emacs - calendar. - -`C (`org-agenda-convert-date')' - Convert the date at cursor into many other cultural and historic - calendars. - -`H (`org-agenda-holidays')' - Show holidays for three months around the cursor date. - -`M-x org-icalendar-combine-agenda-files RET' - Export a single iCalendar file containing entries from all agenda - files. This is a globally available command, and also available - in the agenda menu. - -Exporting to a file -................... - -`C-x C-w (`org-agenda-write')' - Write the agenda view to a file. Depending on the extension of - the selected file name, the view will be exported as HTML (`.html' - or `.htm'), Postscript (`.ps'), PDF (`.pdf'), Org (`.org') and - plain text (any other extension). When exporting to Org, only the - body of original headlines are exported, not subtrees or inherited - tags. When called with a `C-u' prefix argument, immediately open - the newly created file. Use the variable - `org-agenda-exporter-settings' to set options for `ps-print' and - for `htmlize' to be used during export. - -Quit and Exit -............. - -`q (`org-agenda-quit')' - Quit agenda, remove the agenda buffer. - -`x (`org-agenda-exit')' - Exit agenda, remove the agenda buffer and all buffers loaded by - Emacs for the compilation of the agenda. Buffers created by the - user to visit Org files will not be removed. - - ---------- Footnotes ---------- - - (1) Only tags filtering will be respected here, effort filtering is -ignored. - - (2) Moving agenda lines does not persist after an agenda refresh and -does not modify the contributing `.org' files - - (3) You can also create persistent custom functions through -`org-agenda-bulk-custom-functions'. - - (4) This file is parsed for the agenda when -`org-agenda-include-diary' is set. - - -File: org, Node: Custom agenda views, Next: Exporting agenda views, Prev: Agenda commands, Up: Agenda views - -10.6 Custom agenda views -======================== - -Custom agenda commands serve two purposes: to store and quickly access -frequently used TODO and tags searches, and to create special composite -agenda buffers. Custom agenda commands will be accessible through the -dispatcher (*note Agenda dispatcher::), just like the default commands. - -* Menu: - -* Storing searches:: Type once, use often -* Block agenda:: All the stuff you need in a single buffer -* Setting options:: Changing the rules - - -File: org, Node: Storing searches, Next: Block agenda, Up: Custom agenda views - -10.6.1 Storing searches ------------------------ - -The first application of custom searches is the definition of keyboard -shortcuts for frequently used searches, either creating an agenda -buffer, or a sparse tree (the latter covering of course only the current -buffer). - - Custom commands are configured in the variable -`org-agenda-custom-commands'. You can customize this variable, for -example by pressing `C-c a C'. You can also directly set it with Emacs -Lisp in the Emacs init file. The following example contains all valid -agenda views: - - (setq org-agenda-custom-commands - '(("x" agenda) - ("y" agenda*) - ("w" todo "WAITING") - ("W" todo-tree "WAITING") - ("u" tags "+boss-urgent") - ("v" tags-todo "+boss-urgent") - ("U" tags-tree "+boss-urgent") - ("f" occur-tree "\\") - ("h" . "HOME+Name tags searches") ; description for "h" prefix - ("hl" tags "+home+Lisa") - ("hp" tags "+home+Peter") - ("hk" tags "+home+Kim"))) - -The initial string in each entry defines the keys you have to press -after the dispatcher command `C-c a' in order to access the command. -Usually this will be just a single character, but if you have many -similar commands, you can also define two-letter combinations where the -first character is the same in several combinations and serves as a -prefix key(1). The second parameter is the search type, followed by -the string or regular expression to be used for the matching. The -example above will therefore define: - -`C-c a x' - as a global search for agenda entries planned(2) this week/day. - -`C-c a y' - as a global search for agenda entries planned this week/day, but - only those with an hour specification like `[h]h:mm'--think of - them as appointments. - -`C-c a w' - as a global search for TODO entries with `WAITING' as the TODO - keyword - -`C-c a W' - as the same search, but only in the current buffer and displaying - the results as a sparse tree - -`C-c a u' - as a global tags search for headlines marked `:boss:' but not - `:urgent:' - -`C-c a v' - as the same search as `C-c a u', but limiting the search to - headlines that are also TODO items - -`C-c a U' - as the same search as `C-c a u', but only in the current buffer and - displaying the result as a sparse tree - -`C-c a f' - to create a sparse tree (again: current buffer only) with all - entries containing the word `FIXME' - -`C-c a h' - as a prefix command for a HOME tags search where you have to press - an additional key (`l', `p' or `k') to select a name (Lisa, Peter, - or Kim) as additional tag to match. - - Note that the `*-tree' agenda views need to be called from an Org -buffer as they operate on the current buffer only. - - ---------- Footnotes ---------- - - (1) You can provide a description for a prefix key by inserting a -cons cell with the prefix and the description. - - (2) _Planned_ means here that these entries have some planning -information attached to them, like a time-stamp, a scheduled or a -deadline string. See `org-agenda-entry-types' on how to set what -planning information will be taken into account. - - -File: org, Node: Block agenda, Next: Setting options, Prev: Storing searches, Up: Custom agenda views - -10.6.2 Block agenda -------------------- - -Another possibility is the construction of agenda views that comprise -the results of _several_ commands, each of which creates a block in the -agenda buffer. The available commands include `agenda' for the daily -or weekly agenda (as created with `C-c a a'), `alltodo' for the global -TODO list (as constructed with `C-c a t'), and the matching commands -discussed above: `todo', `tags', and `tags-todo'. Here are two -examples: - - (setq org-agenda-custom-commands - '(("h" "Agenda and Home-related tasks" - ((agenda "") - (tags-todo "home") - (tags "garden"))) - ("o" "Agenda and Office-related tasks" - ((agenda "") - (tags-todo "work") - (tags "office"))))) - -This will define `C-c a h' to create a multi-block view for stuff you -need to attend to at home. The resulting agenda buffer will contain -your agenda for the current week, all TODO items that carry the tag -`home', and also all lines tagged with `garden'. Finally the command -`C-c a o' provides a similar view for office tasks. - - -File: org, Node: Setting options, Prev: Block agenda, Up: Custom agenda views - -10.6.3 Setting options for custom commands ------------------------------------------- - -Org mode contains a number of variables regulating agenda construction -and display. The global variables define the behavior for all agenda -commands, including the custom commands. However, if you want to change -some settings just for a single custom view, you can do so. Setting -options requires inserting a list of variable names and values at the -right spot in `org-agenda-custom-commands'. For example: - - (setq org-agenda-custom-commands - '(("w" todo "WAITING" - ((org-agenda-sorting-strategy '(priority-down)) - (org-agenda-prefix-format " Mixed: "))) - ("U" tags-tree "+boss-urgent" - ((org-show-context-detail 'minimal))) - ("N" search "" - ((org-agenda-files '("~org/notes.org")) - (org-agenda-text-search-extra-files nil))))) - -Now the `C-c a w' command will sort the collected entries only by -priority, and the prefix format is modified to just say ` Mixed: ' -instead of giving the category of the entry. The sparse tags tree of -`C-c a U' will now turn out ultra-compact, because neither the headline -hierarchy above the match, nor the headline following the match will be -shown. The command `C-c a N' will do a text search limited to only a -single file. - - For command sets creating a block agenda, -`org-agenda-custom-commands' has two separate spots for setting -options. You can add options that should be valid for just a single -command in the set, and options that should be valid for all commands in -the set. The former are just added to the command entry; the latter -must come after the list of command entries. Going back to the block -agenda example (*note Block agenda::), let's change the sorting strategy -for the `C-c a h' commands to `priority-down', but let's sort the -results for GARDEN tags query in the opposite order, `priority-up'. -This would look like this: - - (setq org-agenda-custom-commands - '(("h" "Agenda and Home-related tasks" - ((agenda) - (tags-todo "home") - (tags "garden" - ((org-agenda-sorting-strategy '(priority-up))))) - ((org-agenda-sorting-strategy '(priority-down)))) - ("o" "Agenda and Office-related tasks" - ((agenda) - (tags-todo "work") - (tags "office"))))) - - As you see, the values and parentheses setting is a little complex. -When in doubt, use the customize interface to set this variable--it -fully supports its structure. Just one caveat: when setting options in -this interface, the _values_ are just Lisp expressions. So if the -value is a string, you need to add the double-quotes around the value -yourself. - - To control whether an agenda command should be accessible from a -specific context, you can customize -`org-agenda-custom-commands-contexts'. Let's say for example that you -have an agenda command `"o"' displaying a view that you only need when -reading emails. Then you would configure this option like this: - - (setq org-agenda-custom-commands-contexts - '(("o" (in-mode . "message-mode")))) - - You can also tell that the command key `"o"' should refer to another -command key `"r"'. In that case, add this command key like this: - - (setq org-agenda-custom-commands-contexts - '(("o" "r" (in-mode . "message-mode")))) - - See the docstring of the variable for more information. - - -File: org, Node: Exporting agenda views, Next: Agenda column view, Prev: Custom agenda views, Up: Agenda views - -10.7 Exporting agenda views -=========================== - -If you are away from your computer, it can be very useful to have a -printed version of some agenda views to carry around. Org mode can -export custom agenda views as plain text, HTML(1), Postscript, PDF(2), -and iCalendar files. If you want to do this only occasionally, use the -command - -`C-x C-w (`org-agenda-write')' - Write the agenda view to a file. Depending on the extension of - the selected file name, the view will be exported as HTML - (extension `.html' or `.htm'), Postscript (extension `.ps'), - iCalendar (extension `.ics'), or plain text (any other extension). - Use the variable `org-agenda-exporter-settings' to set options for - `ps-print' and for `htmlize' to be used during export, for example - - (setq org-agenda-exporter-settings - '((ps-number-of-columns 2) - (ps-landscape-mode t) - (org-agenda-add-entry-text-maxlines 5) - (htmlize-output-type 'css))) - - If you need to export certain agenda views frequently, you can -associate any custom agenda command with a list of output file names -(3). Here is an example that first defines custom commands for the -agenda and the global TODO list, together with a number of files to -which to export them. Then we define two block agenda commands and -specify file names for them as well. File names can be relative to the -current working directory, or absolute. - - (setq org-agenda-custom-commands - '(("X" agenda "" nil ("agenda.html" "agenda.ps")) - ("Y" alltodo "" nil ("todo.html" "todo.txt" "todo.ps")) - ("h" "Agenda and Home-related tasks" - ((agenda "") - (tags-todo "home") - (tags "garden")) - nil - ("~/views/home.html")) - ("o" "Agenda and Office-related tasks" - ((agenda) - (tags-todo "work") - (tags "office")) - nil - ("~/views/office.ps" "~/calendars/office.ics")))) - - The extension of the file name determines the type of export. If it -is `.html', Org mode will use the `htmlize.el' package to convert the -buffer to HTML and save it to this file name. If the extension is -`.ps', `ps-print-buffer-with-faces' is used to produce Postscript -output. If the extension is `.ics', iCalendar export is run export -over all files that were used to construct the agenda, and limit the -export to entries listed in the agenda. Any other extension produces a -plain ASCII file. - - The export files are _not_ created when you use one of those -commands interactively because this might use too much overhead. -Instead, there is a special command to produce _all_ specified files in -one step: - -`C-c a e (`org-store-agenda-views')' - Export all agenda views that have export file names associated with - them. - - You can use the options section of the custom agenda commands to also -set options for the export commands. For example: - - (setq org-agenda-custom-commands - '(("X" agenda "" - ((ps-number-of-columns 2) - (ps-landscape-mode t) - (org-agenda-prefix-format " [ ] ") - (org-agenda-with-colors nil) - (org-agenda-remove-tags t)) - ("theagenda.ps")))) - -This command sets two options for the Postscript exporter, to make it -print in two columns in landscape format--the resulting page can be cut -in two and then used in a paper agenda. The remaining settings modify -the agenda prefix to omit category and scheduling information, and -instead include a checkbox to check off items. We also remove the tags -to make the lines compact, and we don't want to use colors for the -black-and-white printer. Settings specified in -`org-agenda-exporter-settings' will also apply, but the settings in -`org-agenda-custom-commands' take precedence. - -From the command line you may also use - emacs -eval (org-batch-store-agenda-views) -kill - or, if you need to modify some parameters(4) - emacs -eval '(org-batch-store-agenda-views \ - org-agenda-span (quote month) \ - org-agenda-start-day "2007-11-01" \ - org-agenda-include-diary nil \ - org-agenda-files (quote ("~/org/project.org")))' \ - -kill - which will create the agenda views restricted to the file -`~/org/project.org', without diary entries and with a 30-day extent. - - You can also extract agenda information in a way that allows further -processing by other programs. See *note Extracting agenda -information::, for more information. - - ---------- Footnotes ---------- - - (1) You need to install Hrvoje Niksic's `htmlize.el'. - - (2) To create PDF output, the ghostscript `ps2pdf' utility must be -installed on the system. Selecting a PDF file will also create the -postscript file. - - (3) If you want to store standard views like the weekly agenda or -the global TODO list as well, you need to define custom commands for -them in order to be able to specify file names. - - (4) Quoting depends on the system you use, please check the FAQ for -examples. - - -File: org, Node: Agenda column view, Prev: Exporting agenda views, Up: Agenda views - -10.8 Using column view in the agenda -==================================== - -Column view (*note Column view::) is normally used to view and edit -properties embedded in the hierarchical structure of an Org file. It -can be quite useful to use column view also from the agenda, where -entries are collected by certain criteria. - -`C-c C-x C-c (`org-agenda-columns')' - Turn on column view in the agenda. - - To understand how to use this properly, it is important to realize -that the entries in the agenda are no longer in their proper outline -environment. This causes the following issues: - - 1. Org needs to make a decision which `COLUMNS' format to use. Since - the entries in the agenda are collected from different files, and - different files may have different `COLUMNS' formats, this is a - non-trivial problem. Org first checks if the variable - `org-agenda-overriding-columns-format' is currently set, and if - so, takes the format from there. Otherwise it takes the format - associated with the first item in the agenda, or, if that item - does not have a specific format--defined in a property, or in its - file--it uses `org-columns-default-format'. - - 2. If any of the columns has a summary type defined (*note Column - attributes::), turning on column view in the agenda will visit all - relevant agenda files and make sure that the computations of this - property are up to date. This is also true for the special - `CLOCKSUM' property. Org will then sum the values displayed in - the agenda. In the daily/weekly agenda, the sums will cover a - single day; in all other views they cover the entire block. It is - vital to realize that the agenda may show the same entry - _twice_--for example as scheduled and as a deadline--and it may - show two entries from the same hierarchy--for example a _parent_ - and its _child_. In these cases, the summation in the agenda will - lead to incorrect results because some values will count double. - - 3. When the column view in the agenda shows the `CLOCKSUM', that is - always the entire clocked time for this item. So even in the - daily/weekly agenda, the clocksum listed in column view may - originate from times outside the current view. This has the - advantage that you can compare these values with a column listing - the planned total effort for a task--one of the major applications - for column view in the agenda. If you want information about - clocked time in the displayed period use clock table mode (press - `R' in the agenda). - - 4. When the column view in the agenda shows the `CLOCKSUM_T', that is - always today's clocked time for this item. So even in the weekly - agenda, the clocksum listed in column view only originates from - today. This lets you compare the time you spent on a task for - today, with the time already spent --via `CLOCKSUM'--and with the - planned total effort for it. - - -File: org, Node: Markup, Next: Exporting, Prev: Agenda views, Up: Top - -11 Markup for rich export -************************* - -When exporting Org mode documents, the exporter tries to reflect the -structure of the document as accurately as possible in the back-end. -Since export targets like HTML and LaTeX allow much richer formatting, -Org mode has rules on how to prepare text for rich export. This -section summarizes the markup rules used in an Org mode buffer. - -* Menu: - -* Paragraphs:: The basic unit of text -* Emphasis and monospace:: Bold, italic, etc. -* Horizontal rules:: Make a line -* Images and tables:: Images, tables and caption mechanism -* Literal examples:: Source code examples with special formatting -* Special symbols:: Greek letters and other symbols -* Subscripts and superscripts:: Simple syntax for raising/lowering text -* Embedded LaTeX:: LaTeX can be freely used inside Org documents - - -File: org, Node: Paragraphs, Next: Emphasis and monospace, Up: Markup - -11.1 Paragraphs, line breaks, and quoting -========================================= - -Paragraphs are separated by at least one empty line. If you need to -enforce a line break within a paragraph, use `\\' at the end of a line. - - To preserve the line breaks, indentation and blank lines in a -region, but otherwise use normal formatting, you can use this -construct, which can also be used to format poetry. - - #+BEGIN_VERSE - Great clouds overhead - Tiny black birds rise and fall - Snow covers Emacs - - -- AlexSchroeder - #+END_VERSE - - When quoting a passage from another document, it is customary to -format this as a paragraph that is indented on both the left and the -right margin. You can include quotations in Org mode documents like -this: - - #+BEGIN_QUOTE - Everything should be made as simple as possible, - but not any simpler -- Albert Einstein - #+END_QUOTE - - If you would like to center some text, do it like this: - #+BEGIN_CENTER - Everything should be made as simple as possible, \\ - but not any simpler - #+END_CENTER - - -File: org, Node: Emphasis and monospace, Next: Horizontal rules, Prev: Paragraphs, Up: Markup - -11.2 Emphasis and monospace -=========================== - -You can make words *bold*, /italic/, _underlined_, `=verbatim=' and -`~code~', and, if you must, `+strike-through+'. Text in the code and -verbatim string is not processed for Org mode specific syntax, it is -exported verbatim. - - To turn off fontification for marked up text, you can set -`org-fontify-emphasized-text' to `nil'. To narrow down the list of -available markup syntax, you can customize `org-emphasis-alist'. To -fine tune what characters are allowed before and after the markup -characters, you can tweak `org-emphasis-regexp-components'. Beware -that changing one of the above variables will no take effect until you -reload Org, for which you may need to restart Emacs. - - -File: org, Node: Horizontal rules, Next: Images and tables, Prev: Emphasis and monospace, Up: Markup - -11.3 Horizontal rules -===================== - -A line consisting of only dashes, and at least 5 of them, will be -exported as a horizontal line. - - -File: org, Node: Images and tables, Next: Literal examples, Prev: Horizontal rules, Up: Markup - -11.4 Images and Tables -====================== - -Both the native Org mode tables (*note Tables::) and tables formatted -with the `table.el' package will be exported properly. For Org mode -tables, the lines before the first horizontal separator line will -become table header lines. You can use the following lines somewhere -before the table to assign a caption and a label for cross references, -and in the text you can refer to the object with `[[tab:basic-data]]' -(*note Internal links::): - - #+CAPTION: This is the caption for the next table (or link) - #+NAME: tab:basic-data - | ... | ...| - |-----|----| - - Optionally, the caption can take the form: - #+CAPTION[Caption for list of tables]: Caption for table. - - Some back-ends allow you to directly include images into the exported -document. Org does this, if a link to an image files does not have a -description part, for example `[[./img/a.jpg]]'. If you wish to define -a caption for the image and maybe a label for internal cross -references, make sure that the link is on a line by itself and precede -it with `#+CAPTION' and `#+NAME' as follows: - - #+CAPTION: This is the caption for the next figure link (or table) - #+NAME: fig:SED-HR4049 - [[./img/a.jpg]] - -Such images can be displayed within the buffer. *Note the discussion -of image links: Handling links. - - Even though images and tables are prominent examples of captioned -structures, the same caption mechanism can apply to many others (e.g., -LaTeX equations, source code blocks). Depending on the export -back-end, those may or may not be handled. - - -File: org, Node: Literal examples, Next: Special symbols, Prev: Images and tables, Up: Markup - -11.5 Literal examples -===================== - -You can include literal examples that should not be subjected to -markup. Such examples will be typeset in monospace, so this is well -suited for source code and similar examples. - - #+BEGIN_EXAMPLE - Some example from a text file. - #+END_EXAMPLE - - Note that such blocks may be indented in order to align nicely with -indented text and in particular with plain list structure (*note Plain -lists::). For simplicity when using small examples, you can also start -the example lines with a colon followed by a space. There may also be -additional whitespace before the colon: - - Here is an example - : Some example from a text file. - - If the example is source code from a programming language, or any -other text that can be marked up by font-lock in Emacs, you can ask for -the example to look like the fontified Emacs buffer(1). This is done -with the `src' block, where you also need to specify the name of the -major mode that should be used to fontify the example(2), see *note -Easy templates:: for shortcuts to easily insert code blocks. - - #+BEGIN_SRC emacs-lisp - (defun org-xor (a b) - "Exclusive or." - (if a (not b) b)) - #+END_SRC - - Both in `example' and in `src' snippets, you can add a `-n' switch -to the end of the `BEGIN' line, to get the lines of the example -numbered. The `-n' takes an optional numeric argument specifying the -starting line number of the block. If you use a `+n' switch, the -numbering from the previous numbered snippet will be continued in the -current one. The `+n' can also take a numeric argument. The value of -the argument will be added to the last line of the previous block to -determine the starting line number. - - #+BEGIN_SRC emacs-lisp -n 20 - ;; this will export with line number 20 - (message "This is line 21") - #+END_SRC - #+BEGIN_SRC emacs-lisp +n 10 - ;; This will be listed as line 31 - (message "This is line 32") - #+END_SRC - - In literal examples, Org will interpret strings like `(ref:name)' as -labels, and use them as targets for special hyperlinks like `[[(name)]]' -(i.e., the reference name enclosed in single parenthesis). In HTML, -hovering the mouse over such a link will remote-highlight the -corresponding code line, which is kind of cool. - - You can also add a `-r' switch which removes the labels from the -source code(3). With the `-n' switch, links to these references will -be labeled by the line numbers from the code listing, otherwise links -will use the labels with no parentheses. Here is an example: - - #+BEGIN_SRC emacs-lisp -n -r - (save-excursion (ref:sc) - (goto-char (point-min))) (ref:jump) - #+END_SRC - In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] - jumps to point-min. - - Finally, you can use `-i' to preserve the indentation of a specific -code block (*note Editing source code::). - - If the syntax for the label format conflicts with the language -syntax, use a `-l' switch to change the format, for example -`#+BEGIN_SRC pascal -n -r -l "((%s))"'. See also the variable -`org-coderef-label-format'. - - HTML export also allows examples to be published as text areas -(*note Text areas in HTML export::). - - Because the `#+BEGIN_...' and `#+END_...' patterns need to be added -so often, shortcuts are provided using the Easy templates facility -(*note Easy templates::). - -`C-c '' - Edit the source code example at point in its native mode. This - works by switching to a temporary buffer with the source code. - You need to exit by pressing `C-c '' again(4). The edited version - will then replace the old version in the Org buffer. Fixed-width - regions (where each line starts with a colon followed by a space) - will be edited using `artist-mode'(5) to allow creating ASCII - drawings easily. Using this command in an empty line will create - a new fixed-width region. - -`C-c l' - Calling `org-store-link' while editing a source code example in a - temporary buffer created with `C-c '' will prompt for a label. - Make sure that it is unique in the current buffer, and insert it - with the proper formatting like `(ref:label)' at the end of the - current line. Then the label is stored as a link `(label)', for - retrieval with `C-c C-l'. - - ---------- Footnotes ---------- - - (1) This works automatically for the HTML back-end (it requires -version 1.34 of the `htmlize.el' package, which is distributed with -Org). Fontified code chunks in LaTeX can be achieved using either the -listings -(https://www.ctan.org/tex-archive/macros/latex/contrib/listings/?lang=en) -or the minted (https://github.com/gpoore/minted) package. If you use -minted or listing, you must load the packages manually, for example by -adding the desired package to `org-latex-packages-alist'. Refer to -`org-latex-listings' for details. - - (2) Code in `src' blocks may also be evaluated either interactively -or on export. *Note Working with source code::, for more information -on evaluating code blocks. - - (3) Adding `-k' to `-n -r' will keep the labels in the source code -while using line numbers for the links, which might be useful to -explain those in an Org mode example code. - - (4) Upon exit, lines starting with `*', `,*', `#+' and `,#+' will -get a comma prepended, to keep them from being interpreted by Org as -outline nodes or special syntax. These commas will be stripped for -editing with `C-c '', and also for export. - - (5) You may select a different-mode with the variable -`org-edit-fixed-width-region-mode'. - - -File: org, Node: Special symbols, Next: Subscripts and superscripts, Prev: Literal examples, Up: Markup - -11.6 Special symbols -==================== - -You can use LaTeX-like syntax to insert special symbols--named -entities--like `\alpha' to indicate the Greek letter, or `\to' to -indicate an arrow. Completion for these symbols is available, just type -`\' and maybe a few letters, and press `M-' to see possible -completions. If you need such a symbol inside a word, terminate it with -a pair of curly brackets. For example - - Protip: Given a circle \Gamma of diameter d, the length of its circumference - is \pi{}d. - - A large number of entities is provided, with names taken from both -HTML and LaTeX; you can comfortably browse the complete list from a -dedicated buffer using the command `org-entities-help'. It is also -possible to provide your own special symbols in the variable -`org-entities-user'. - - During export, these symbols are transformed into the native format -of the exporter back-end. Strings like `\alpha' are exported as -`α' in the HTML output, and as `\(\alpha\)' in the LaTeX output. -Similarly, `\nbsp' becomes ` ' in HTML and `~' in LaTeX. - - Entities may also be used as a may to escape markup in an Org -document, e.g., `\under{}not underlined\under' exports as `_not -underlined_'. - - If you would like to see entities displayed as UTF-8 characters, use -the following command(1): - -`C-c C-x \' - Toggle display of entities as UTF-8 characters. This does not - change the buffer content which remains plain ASCII, but it - overlays the UTF-8 character for display purposes only. - - In addition to regular entities defined above, Org exports in a -special way(2) the following commonly used character combinations: `\-' -is treated as a shy hyphen, `--' and `---' are converted into dashes, -and `...' becomes a compact set of dots. - - ---------- Footnotes ---------- - - (1) You can turn this on by default by setting the variable -`org-pretty-entities', or on a per-file base with the `#+STARTUP' -option `entitiespretty'. - - (2) This behaviour can be disabled with `-' export setting (*note -Export settings::). - - -File: org, Node: Subscripts and superscripts, Next: Embedded LaTeX, Prev: Special symbols, Up: Markup - -11.7 Subscripts and superscripts -================================ - -`^' and `_' are used to indicate super- and subscripts. To increase -the readability of ASCII text, it is not necessary--but OK--to surround -multi-character sub- and superscripts with curly braces. Those are, -however, mandatory, when more than one word is involved. For example - - The radius of the sun is R_sun = 6.96 x 10^8 m. On the other hand, the - radius of Alpha Centauri is R_{Alpha Centauri} = 1.28 x R_{sun}. - - If you write a text where the underscore is often used in a different -context, Org's convention to always interpret these as subscripts can -get in your way. Configure the variable `org-use-sub-superscripts' to -change this convention. For example, when setting this variable to -`{}', `a_b' will not be interpreted as a subscript, but `a_{b}' will. - -`C-c C-x \' - In addition to showing entities as UTF-8 characters, this command - will also format sub- and superscripts in a WYSIWYM way. - - -File: org, Node: Embedded LaTeX, Prev: Subscripts and superscripts, Up: Markup - -11.8 Embedded LaTeX -=================== - -Plain ASCII is normally sufficient for almost all note taking. -Exceptions include scientific notes, which often require mathematical -symbols and the occasional formula. LaTeX(1) is widely used to -typeset scientific documents. Org mode supports embedding LaTeX code -into its files, because many academics are used to writing and reading -LaTeX source code, and because it can be readily processed to produce -pretty output for a number of export back-ends. - -* Menu: - -* LaTeX fragments:: Complex formulas made easy -* Previewing LaTeX fragments:: What will this snippet look like? -* CDLaTeX mode:: Speed up entering of formulas - - ---------- Footnotes ---------- - - (1) LaTeX is a macro system based on Donald E. Knuth's TeX system. -Many of the features described here as "LaTeX" are really from TeX, but -for simplicity I am blurring this distinction. - - -File: org, Node: LaTeX fragments, Next: Previewing LaTeX fragments, Up: Embedded LaTeX - -11.8.1 LaTeX fragments ----------------------- - -Org mode can contain LaTeX math fragments, and it supports ways to -process these for several export back-ends. When exporting to LaTeX, -the code is left as it is. When exporting to HTML, Org can use either -MathJax (http://www.mathjax.org) (*note Math formatting in HTML -export::) or transcode the math into images (see *note Previewing LaTeX -fragments::). - - LaTeX fragments don't need any special marking at all. The following -snippets will be identified as LaTeX source code: - * Environments of any kind(1). The only requirement is that the - `\begin' statement appears on a new line, at the beginning of the - line or after whitespaces only. - - * Text within the usual LaTeX math delimiters. To avoid conflicts - with currency specifications, single `$' characters are only - recognized as math delimiters if the enclosed text contains at - most two line breaks, is directly attached to the `$' characters - with no whitespace in between, and if the closing `$' is followed - by whitespace or punctuation (parentheses and quotes are - considered to be punctuation in this context). For the other - delimiters, there is no such restriction, so when in doubt, use - `\(...\)' as inline math delimiters. - -For example: - - \begin{equation} - x=\sqrt{b} - \end{equation} - - If $a^2=b$ and \( b=2 \), then the solution must be - either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \]. - - LaTeX processing can be configured with the variable -`org-export-with-latex'. The default setting is `t' which means -MathJax for HTML, and no processing for ASCII and LaTeX back-ends. You -can also set this variable on a per-file basis using one of these lines: - - #+OPTIONS: tex:t Do the right thing automatically (MathJax) - #+OPTIONS: tex:nil Do not process LaTeX fragments at all - #+OPTIONS: tex:verbatim Verbatim export, for jsMath or so - - ---------- Footnotes ---------- - - (1) When MathJax is used, only the environments recognized by -MathJax will be processed. When `dvipng' program, `dvisvgm' program or -`imagemagick' suite is used to create images, any LaTeX environment -will be handled. - - -File: org, Node: Previewing LaTeX fragments, Next: CDLaTeX mode, Prev: LaTeX fragments, Up: Embedded LaTeX - -11.8.2 Previewing LaTeX fragments ---------------------------------- - -If you have a working LaTeX installation and `dvipng', `dvisvgm' or -`convert' installed(1), LaTeX fragments can be processed to produce -images of the typeset expressions to be used for inclusion while -exporting to HTML (see *note LaTeX fragments::), or for inline -previewing within Org mode. - - You can customize the variables `org-format-latex-options' and -`org-format-latex-header' to influence some aspects of the preview. In -particular, the `:scale' (and for HTML export, `:html-scale') property -of the former can be used to adjust the size of the preview images. - -`C-c C-x C-l' - Produce a preview image of the LaTeX fragment at point and overlay - it over the source code. If there is no fragment at point, - process all fragments in the current entry (between two - headlines). When called with a prefix argument, process the - entire subtree. When called with two prefix arguments, or when - the cursor is before the first headline, process the entire buffer. - -`C-c C-c' - Remove the overlay preview images. - - You can turn on the previewing of all LaTeX fragments in a file with - - #+STARTUP: latexpreview - - To disable it, simply use - - #+STARTUP: nolatexpreview - - ---------- Footnotes ---------- - - (1) These are respectively available at -`http://sourceforge.net/projects/dvipng/', `http://dvisvgm.bplaced.net/' -and from the `imagemagick' suite. Choose the converter by setting the -variable `org-preview-latex-default-process' accordingly. - - -File: org, Node: CDLaTeX mode, Prev: Previewing LaTeX fragments, Up: Embedded LaTeX - -11.8.3 Using CDLaTeX to enter math ----------------------------------- - -CDLaTeX mode is a minor mode that is normally used in combination with a -major LaTeX mode like AUCTeX in order to speed-up insertion of -environments and math templates. Inside Org mode, you can make use of -some of the features of CDLaTeX mode. You need to install `cdlatex.el' -and `texmathp.el' (the latter comes also with AUCTeX) from -`https://staff.fnwi.uva.nl/c.dominik/Tools/cdlatex'. Don't use CDLaTeX -mode itself under Org mode, but use the light version -`org-cdlatex-mode' that comes as part of Org mode. Turn it on for the -current buffer with `M-x org-cdlatex-mode RET', or for all Org files -with - - (add-hook 'org-mode-hook 'turn-on-org-cdlatex) - - When this mode is enabled, the following features are present (for -more details see the documentation of CDLaTeX mode): - * Environment templates can be inserted with `C-c {'. - - * The key will do template expansion if the cursor is inside a - LaTeX fragment(1). For example, will expand `fr' to - `\frac{}{}' and position the cursor correctly inside the first - brace. Another will get you into the second brace. Even - outside fragments, will expand environment abbreviations at - the beginning of a line. For example, if you write `equ' at the - beginning of a line and press , this abbreviation will be - expanded to an `equation' environment. To get a list of all - abbreviations, type `M-x cdlatex-command-help RET'. - - * Pressing `_' and `^' inside a LaTeX fragment will insert these - characters together with a pair of braces. If you use to - move out of the braces, and if the braces surround only a single - character or macro, they are removed again (depending on the - variable `cdlatex-simplify-sub-super-scripts'). - - * Pressing the grave accent ``' followed by a character inserts math - macros, also outside LaTeX fragments. If you wait more than 1.5 - seconds after the grave accent, a help window will pop up. - - * Pressing the apostrophe `'' followed by another character modifies - the symbol before point with an accent or a font. If you wait - more than 1.5 seconds after the apostrophe, a help window will pop - up. Character modification will work only inside LaTeX fragments; - outside the quote is normal. - - ---------- Footnotes ---------- - - (1) Org mode has a method to test if the cursor is inside such a -fragment, see the documentation of the function -`org-inside-LaTeX-fragment-p'. - - -File: org, Node: Exporting, Next: Publishing, Prev: Markup, Up: Top - -12 Exporting -************ - -Sometimes, you may want to pretty print your notes, publish them on the -web or even share them with people not using Org. In these cases, the -Org export facilities can be used to convert your documents to a -variety of other formats, while retaining as much structure (*note -Document structure::) and markup (*note Markup::) as possible. - - Libraries responsible for such translation are called back-ends. -Org ships with the following ones - - * ascii (ASCII format) - - * beamer (LaTeX Beamer format) - - * html (HTML format) - - * icalendar (iCalendar format) - - * latex (LaTeX format) - - * md (Markdown format) - - * odt (OpenDocument Text format) - - * org (Org format) - - * texinfo (Texinfo format) - - * man (Man page format) - -More of them can be found in the `contrib/' directory (*note -Installation::) or through the Emacs packaging system(1). - - By default, the following five back-ends are loaded: `ascii', -`html', `icalendar', `latex' and `odt'. Others need to be specifically -loaded, either by customizing `org-export-backends', or by requiring -the associated library, e.g., - - (require 'ox-md) - - Eventually, you can these facilities can be used with `orgtbl-mode' -or `orgstruct-mode' in foreign buffers so you can author tables and -lists in Org syntax and convert them in place to the target language. - -* Menu: - -* The export dispatcher:: The main exporter interface -* Export settings:: Generic export settings -* Table of contents:: The if and where of the table of contents -* Include files:: Include additional files into a document -* Macro replacement:: Use macros to create templates -* Comment lines:: What will not be exported -* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding -* Beamer export:: Exporting as a Beamer presentation -* HTML export:: Exporting to HTML -* LaTeX export:: Exporting to LaTeX, and processing to PDF -* Markdown export:: Exporting to Markdown -* OpenDocument Text export:: Exporting to OpenDocument Text -* Org export:: Exporting to Org -* Texinfo export:: Exporting to Texinfo -* iCalendar export:: Exporting to iCalendar -* Other built-in back-ends:: Exporting to a man page -* Advanced configuration:: Fine-tuning the export output -* Export in foreign buffers:: Author tables and lists in Org syntax - - ---------- Footnotes ---------- - - (1) These libraries traditionnaly appear as `ox-NAME', e.g., -`ox-koma-letter' for `koma-letter' back-end. - - -File: org, Node: The export dispatcher, Next: Export settings, Up: Exporting - -12.1 The export dispatcher -========================== - -The main entry point for export related tasks is the dispatcher, a -hierarchical menu from which it is possible to select an export format -and toggle export options(1). - -`C-c C-e' (`org-export-dispatch') - Dispatch for export and publishing commands. When called with a - `C-u' prefix argument, repeat the last export command on the - current buffer while preserving toggled options. If the current - buffer hasn't changed and subtree export was activated, the - command will affect that same subtree. - - Normally the entire buffer is exported, but if there is an active -region only that part of the buffer will be exported. - - Several export options (*note Export settings::) can be toggled from -the export dispatcher with the following key combinations: - -`C-a' - Toggle asynchronous export. Asynchronous export uses an external - Emacs process that is configured with a specified initialization - file. - - While exporting asynchronously, the output is not displayed, but - stored in a place called "the export stack". This stack can be - displayed by calling the dispatcher with a double `C-u' prefix - argument, or with `&' key from the dispatcher menu. - - To make this behavior the default, customize the variable - `org-export-in-background'. - -`C-b' - Toggle body-only export. Its effect depends on the back-end used. - Typically, if the back-end has a header section (like - `...' in the HTML back-end), a body-only export will - not include this header. - -`C-s' - Toggle subtree export. The top heading becomes the document title. - - You can change the default state of this option by setting - `org-export-initial-scope'. - -`C-v' - Toggle visible-only export. Only export the text that is currently - visible, i.e., not hidden by outline visibility in the buffer. - - ---------- Footnotes ---------- - - (1) It is also possible to use a less intrusive interface by setting -`org-export-dispatch-use-expert-ui' to a non-`nil' value. In that -case, only a prompt is visible from the minibuffer. From there one can -still switch back to regular menu by pressing . - - -File: org, Node: Export settings, Next: Table of contents, Prev: The export dispatcher, Up: Exporting - -12.2 Export settings -==================== - -Export options can be set: globally with variables; for an individual -file by making variables buffer-local with in-buffer settings (*note -In-buffer settings::), by setting individual keywords, or by specifying -them in a compact form with the `#+OPTIONS' keyword; or for a tree by -setting properties (*note Properties and columns::). Options set at a -specific level override options set at a more general level. - - In-buffer settings may appear anywhere in the file, either directly -or indirectly through a file included using `#+SETUPFILE: filename' -syntax. Option keyword sets tailored to a particular back-end can be -inserted from the export dispatcher (*note The export dispatcher::) -using the `Insert template' command by pressing <#>. To insert -keywords individually, a good way to make sure the keyword is correct -is to type `#+' and then to use `M-'(1) for completion. - - The export keywords available for every back-end, and their -equivalent global variables, include: - -`AUTHOR' - The document author (`user-full-name'). - -`CREATOR' - Entity responsible for output generation - (`org-export-creator-string'). - -`DATE' - A date or a time-stamp(2). - -`EMAIL' - The email address (`user-mail-address'). - -`LANGUAGE' - The language used for translating some strings - (`org-export-default-language'). E.g., `#+LANGUAGE: fr' will tell - Org to translate _File_ (english) into _Fichier_ (french) in the - clocktable. - -`SELECT_TAGS' - The tags that select a tree for export (`org-export-select-tags'). - The default value is `:export:'. Within a subtree tagged with - `:export:', you can still exclude entries with `:noexport:' (see - below). When headlines are selectively exported with `:export:' - anywhere in a file, text before the first headline is ignored. - -`EXCLUDE_TAGS' - The tags that exclude a tree from export - (`org-export-exclude-tags'). The default value is `:noexport:'. - Entries with the `:noexport:' tag will be unconditionally excluded - from the export, even if they have an `:export:' tag. Code blocks - contained in excluded subtrees will still be executed during - export even though the subtree is not exported. - -`TITLE' - The title to be shown. You can use several such keywords for long - titles. - -`EXPORT_FILE_NAME' - The name of the output file to be generated. By default, it is - taken from the file associated to the buffer, when possible, or - asked to you otherwise. In all cases, the extension is ignored, - and a back-end specific one is added. - - - The `#+OPTIONS' keyword is a compact(3) form that recognizes the -following arguments: - -`':' - Toggle smart quotes (`org-export-with-smart-quotes'). When - activated, pairs of double quotes become primary quotes according - to the language used. Inside, pairs of single quotes become - secondary quotes. Other single quotes are treated as apostrophes. - -`*:' - Toggle emphasized text (`org-export-with-emphasize'). - -`-:' - Toggle conversion of special strings - (`org-export-with-special-strings'). - -`::' - Toggle fixed-width sections (`org-export-with-fixed-width'). - -`<:' - Toggle inclusion of any time/date active/inactive stamps - (`org-export-with-timestamps'). - -`\n:' - Toggle line-break-preservation (`org-export-preserve-breaks'). - -`^:' - Toggle TeX-like syntax for sub- and superscripts. If you write - "^:{}", `a_{b}' will be interpreted, but the simple `a_b' will be - left as it is (`org-export-with-sub-superscripts'). - -`arch:' - Configure export of archived trees. Can be set to `headline' to - only process the headline, skipping its contents - (`org-export-with-archived-trees'). - -`author:' - Toggle inclusion of author name into exported file - (`org-export-with-author'). - -`broken-links:' - Decide whether to raise an error or not when encountering a broken - internal link. When set to `mark', signal the problem clearly in - the output (`org-export-with-broken-links'). - -`c:' - Toggle inclusion of CLOCK keywords (`org-export-with-clocks'). - -`creator:' - Toggle inclusion of creator info into exported file - (`org-export-with-creator'). - -`d:' - Toggle inclusion of drawers, or list drawers to include - (`org-export-with-drawers'). - -`date:' - Toggle inclusion of a date into exported file - (`org-export-with-date'). - -`e:' - Toggle inclusion of entities (`org-export-with-entities'). - -`email:' - Toggle inclusion of the author's e-mail into exported file - (`org-export-with-email'). - -`f:' - Toggle the inclusion of footnotes (`org-export-with-footnotes'). - -`H:' - Set the number of headline levels for export - (`org-export-headline-levels'). Below that level, headlines are - treated differently. In most back-ends, they become list items. - -`inline:' - Toggle inclusion of inlinetasks (`org-export-with-inlinetasks'). - -`num:' - Toggle section-numbers (`org-export-with-section-numbers'). It - can also be set to a number `n', so only headlines at that level - or above will be numbered. Finally, irrespective of the level of - a specific headline, the numbering of it can be disabled by - setting the `UNNUMBERED' property to non-`nil'. This also affects - subheadings. - -`p:' - Toggle export of planning information (`org-export-with-planning'). - "Planning information" is the line containing the `SCHEDULED:', the - `DEADLINE:' or the `CLOSED:' cookies or a combination of them. - -`pri:' - Toggle inclusion of priority cookies (`org-export-with-priority'). - -`prop:' - Toggle inclusion of property drawers, or list properties to include - (`org-export-with-properties'). - -`stat:' - Toggle inclusion of statistics cookies - (`org-export-with-statistics-cookies'). - -`tags:' - Toggle inclusion of tags, may also be `not-in-toc' - (`org-export-with-tags'). - -`tasks:' - Toggle inclusion of tasks (TODO items), can be `nil' to remove all - tasks, `todo' to remove DONE tasks, or a list of keywords to keep - (`org-export-with-tasks'). - -`tex:' - Configure export of LaTeX fragments and environments. It may be - set to `verbatim' (`org-export-with-latex'). - -`timestamp:' - Toggle inclusion of the creation time into exported file - (`org-export-time-stamp-file'). - -`title:' - Toggle inclusion of title (`org-export-with-title'). - -`toc:' - Toggle inclusion of the table of contents, or set the level limit - (`org-export-with-toc'). - -`todo:' - Toggle inclusion of TODO keywords into exported text - (`org-export-with-todo-keywords'). - -`|:' - Toggle inclusion of tables (`org-export-with-tables'). - - - When exporting only a subtree, each of the previous keywords(4) can -be overridden locally by special node properties. These begin with -`EXPORT_', followed by the name of the keyword they supplant, unless -the keyword already beging with `EXPORT_'. For example, `DATE' and -`EXPORT_FILE_NAME' keywords become, respectively, `EXPORT_DATE' and -`EXPORT_FILE_NAME' properties. - - If `org-export-allow-bind-keywords' is non-`nil', Emacs variables -can become buffer-local during export by using the BIND keyword. Its -syntax is `#+BIND: variable value'. This is particularly useful for -in-buffer settings that cannot be changed using specific keywords. - - ---------- Footnotes ---------- - - (1) Many desktops intercept `M-TAB' to switch windows. Use `C-M-i' -or ` ' instead. - - (2) The variable `org-export-date-timestamp-format' defines how this -time-stamp will be exported. - - (3) If you want to configure many options this way, you can use -several `#+OPTIONS' lines. - - (4) With the exception of `SETUPFILE'. - - -File: org, Node: Table of contents, Next: Include files, Prev: Export settings, Up: Exporting - -12.3 Table of contents -====================== - -The table of contents is normally inserted directly before the first -headline of the file. The depth of the table is by default the same as -the number of headline levels, but you can choose a smaller number, or -turn off the table of contents entirely, by configuring the variable -`org-export-with-toc', or on a per-file basis with a line like - - #+OPTIONS: toc:2 only inlcude two levels in TOC - #+OPTIONS: toc:nil no default TOC at all - - If you would like to move the table of contents to a different -location, you should turn off the default table using -`org-export-with-toc' or `#+OPTIONS' and insert `#+TOC: headlines N' at -the desired location(s). - - #+OPTIONS: toc:nil no default TOC - ... - #+TOC: headlines 2 insert TOC here, with two headline levels - - Moreover, if you append `local' parameter, the table contains only -entries for the children of the current section(1). In this case, any -depth parameter becomes relative to the current level. - - * Section - #+TOC: headlines 1 local insert local TOC, with direct children only - - The same `TOC' keyword can also generate a list of all tables (resp. -all listings) with a caption in the document. - - #+TOC: listings build a list of listings - #+TOC: tables build a list of tables - - The headline's title usually determines its corresponding entry in a -table of contents. However, it is possible to specify an alternative -title by setting `ALT_TITLE' property accordingly. It will then be -used when building the table. - - ---------- Footnotes ---------- - - (1) For LaTeX export, this feature requires the `titletoc' package. -Note that `titletoc' must be loaded _before_ `hyperref'. Thus, you may -have to customize `org-latex-default-packages-alist'. - - -File: org, Node: Include files, Next: Macro replacement, Prev: Table of contents, Up: Exporting - -12.4 Include files -================== - -During export, you can include the content of another file. For -example, to include your `.emacs' file, you could use: - - #+INCLUDE: "~/.emacs" src emacs-lisp - -The first parameter names the the file to include. The optional second -and third parameter specify the markup (i.e., `example', `export' or -`src'), and, if the markup is either `export' or `src', the language -for formatting the contents. - - If markup is requested, the included content will be placed within an -appropriate block(1). No changes to the included content are made and -it is the responsibility of the user to ensure that the result is valid -Org syntax. For markup `example' and `src', which is requesting a -literal example, the content will be code-escaped before inclusion. - - If no markup is requested, the text will be assumed to be in Org -mode format and will be processed normally. However, footnote labels -(*note Footnotes::) in the file will be made local to that file. -Contents of the included file will belong to the same structure -(headline, item) containing the `INCLUDE' keyword. In particular, -headlines within the file will become children of the current section. -That behavior can be changed by providing an additional keyword -parameter, `:minlevel'. In that case, all headlines in the included -file will be shifted so the one with the lowest level reaches that -specified level. For example, to make a file become a sibling of the -current top-level headline, use - - #+INCLUDE: "~/my-book/chapter2.org" :minlevel 1 - - You can also include a portion of a file by specifying a lines range -using the `:lines' keyword parameter. The line at the upper end of the -range will not be included. The start and/or the end of the range may -be omitted to use the obvious defaults. - - #+INCLUDE: "~/.emacs" :lines "5-10" Include lines 5 to 10, 10 excluded - #+INCLUDE: "~/.emacs" :lines "-10" Include lines 1 to 10, 10 excluded - #+INCLUDE: "~/.emacs" :lines "10-" Include lines from 10 to EOF - - Finally, you may use a file-link to extract an object as matched by -`org-link-search'(2) (*note Search options::). If the `:only-contents' -property is non-`nil', only the contents of the requested element will -be included, omitting properties drawer and planning-line if present. -The `:lines' keyword operates locally with respect to the requested -element. Some examples: - - #+INCLUDE: "./paper.org::#theory" :only-contents t - Include the body of the heading with the custom id `theory' - #+INCLUDE: "./paper.org::mytable" Include named element. - #+INCLUDE: "./paper.org::*conclusion" :lines 1-20 - Include the first 20 lines of the headline named `conclusion'. - -`C-c '' - Visit the include file at point. - - ---------- Footnotes ---------- - - (1) While you can request paragraphs (`verse', `quote', `center'), -but this places severe restrictions on the type of content that is -permissible - - (2) Note that `org-link-search-must-match-exact-headline' is locally -bound to non-`nil'. Therefore, `org-link-search' only matches -headlines and named elements. - - -File: org, Node: Macro replacement, Next: Comment lines, Prev: Include files, Up: Exporting - -12.5 Macro replacement -====================== - -Macros replace text snippets during export. Macros are defined -globally in `org-export-global-macros', or document-wise with the -following syntax: - - #+MACRO: name replacement text $1, $2 are arguments - -which can be referenced using `{{{name(arg1, arg2)}}}'(1). - - These references, called macros, can be inserted anywhere Org markup -is recognized: paragraphs, headlines, verse blocks, tables cells and -lists. They can also be used in keywords accepting Org syntax, e.g., -`#+CAPTION', `#+TITLE', `#+AUTHOR', `#+DATE' and some others, export -back-end specific, ones. - - In addition to user-defined macros, a set of predefined macros can -be used: - -`{{{title}}}' -`{{{author}}}' -`{{{email}}}' - These macros are replaced with the information available at the - time of export. - -`{{{date}}}' -`{{{date(FORMAT)}}}' - This macro refers to the `#+DATE' keyword. FORMAT is an optional - argument to the `{{{date}}}' macro that will be used only if - `#+DATE' is a single timestamp. FORMAT should be a format string - understood by `format-time-string'. - -`{{{time(FORMAT)}}}' -`{{{modification-time(FORMAT, VC)}}}' - These macros refer to the date and time when the document is - exported and to the modification date and time, respectively. - FORMAT should be a format string understood by - `format-time-string'. If the second argument to the - `modification-time' macro is non-`nil', Org retrieves the - information from the version control system, using `vc.el', - instead of the file attributes. - -`{{{input-file}}}' - This macro refers to the filename of the exported file, if any. - -`{{{property(PROPERTY-NAME)}}}' -`{{{property(PROPERTY-NAME,SEARCH-OPTION)}}}' - This macro returns the value of property PROPERTY-NAME in current - entry. If SEARCH-OPTION (*note Search options::) refers to a - remote entry, it will be used instead. - - The surrounding brackets can be made invisible by setting -`org-hide-macro-markers' non-`nil'. - - Macro expansion takes place during the very beginning of the export -process. - - ---------- Footnotes ---------- - - (1) Since commas separate arguments, commas within arguments have to -be escaped with a backslash character. Conversely, backslash -characters before a comma, and only them, need to be escaped with -another backslash character. - - -File: org, Node: Comment lines, Next: ASCII/Latin-1/UTF-8 export, Prev: Macro replacement, Up: Exporting - -12.6 Comment lines -================== - -Lines starting with zero or more whitespace characters followed by one -`#' and a whitespace are treated as comments and, as such, are not -exported. - - Likewise, regions surrounded by `#+BEGIN_COMMENT' ... -`#+END_COMMENT' are not exported. - - Finally, a `COMMENT' keyword at the beginning of an entry, but after -any other keyword or priority cookie, comments out the entire subtree. -In this case, the subtree is not exported and no code block within it -is executed either(1). The command below helps changing the comment -status of a headline. - -`C-c ;' - Toggle the `COMMENT' keyword at the beginning of an entry. - - ---------- Footnotes ---------- - - (1) For a less drastic behavior, consider using a select tag (*note -Export settings::) instead. - - -File: org, Node: ASCII/Latin-1/UTF-8 export, Next: Beamer export, Prev: Comment lines, Up: Exporting - -12.7 ASCII/Latin-1/UTF-8 export -=============================== - -ASCII export produces a simple and very readable version of an Org mode -file, containing only plain ASCII. Latin-1 and UTF-8 export augment -the file with special characters and symbols available in these -encodings. - - Upon exporting, text is filled and justified, when appropriate, -according the text width set in `org-ascii-text-width'. - - Links are exported in a footnote-like style, with the descriptive -part in the text and the link in a note before the next heading. See -the variable `org-ascii-links-to-notes' for details and other options. - -ASCII export commands ---------------------- - -`C-c C-e t a/l/u (`org-ascii-export-to-ascii')' - Export as an ASCII file. For an Org file, `myfile.org', the ASCII - file will be `myfile.txt'. The file will be overwritten without - warning. When the original file is `myfile.txt', the resulting - file becomes `myfile.txt.txt' in order to prevent data loss. - -`C-c C-e t A/L/U (`org-ascii-export-as-ascii')' - Export to a temporary buffer. Do not create a file. - -ASCII specific export settings ------------------------------- - -ASCII export introduces a single of keywords, similar to the general -options settings described in *note Export settings::. - -`SUBTITLE' - The document subtitle. - -Header and sectioning structure -------------------------------- - -In the exported version, the first three outline levels become -headlines, defining a general document structure. Additional levels -are exported as lists. The transition can also occur at a different -level (*note Export settings::). - -Quoting ASCII text ------------------- - -You can insert text that will only appear when using `ASCII' back-end -with the following constructs: - - Text @@ascii:and additional text@@ within a paragraph. - - #+ASCII: Some text - - #+BEGIN_EXPORT ascii - All lines in this block will appear only when using this back-end. - #+END_EXPORT - -ASCII specific attributes -------------------------- - -`ASCII' back-end only understands one attribute, `:width', which -specifies the length, in characters, of a given horizontal rule. It -must be specified using an `ATTR_ASCII' line, directly preceding the -rule. - - #+ATTR_ASCII: :width 10 - ----- - -ASCII special blocks --------------------- - -In addition to `#+BEGIN_CENTER' blocks (*note Paragraphs::), it is -possible to justify contents to the left or the right of the page with -the following dedicated blocks. - - #+BEGIN_JUSTIFYLEFT - It's just a jump to the left... - #+END_JUSTIFYLEFT - - #+BEGIN_JUSTIFYRIGHT - ...and then a step to the right. - #+END_JUSTIFYRIGHT - - -File: org, Node: Beamer export, Next: HTML export, Prev: ASCII/Latin-1/UTF-8 export, Up: Exporting - -12.8 Beamer export -================== - -The LaTeX class _Beamer_ allows production of high quality -presentations using LaTeX and PDF processing. Org mode has special -support for turning an Org mode file or tree into a Beamer presentation. - -* Menu: - -* Beamer export commands:: How to export Beamer documents. -* Beamer specific export settings:: Export settings for Beamer export. -* Sectioning Frames and Blocks in Beamer:: Blocks and sections in Beamer. -* Beamer specific syntax:: Syntax specific to Beamer. -* Editing support:: Helper functions for Org Beamer export. -* A Beamer Example:: An complete Beamer example. - - -File: org, Node: Beamer export commands, Next: Beamer specific export settings, Up: Beamer export - -12.8.1 Beamer export commands ------------------------------ - -`C-c C-e l b (`org-beamer-export-to-latex')' - Export as a LaTeX file. For an Org file `myfile.org', the LaTeX - file will be `myfile.tex'. The file will be overwritten without - warning. - -`C-c C-e l B (`org-beamer-export-as-latex')' - Export to a temporary buffer. Do not create a file. - -`C-c C-e l P (`org-beamer-export-to-pdf')' - Export as LaTeX and then process to PDF. - -`C-c C-e l O' - Export as LaTeX and then process to PDF, then open the resulting - PDF file. - - -File: org, Node: Beamer specific export settings, Next: Sectioning Frames and Blocks in Beamer, Prev: Beamer export commands, Up: Beamer export - -12.8.2 Beamer specific export settings --------------------------------------- - -Beamer export introduces a number of keywords, similar to the general -options settings described in *note Export settings::. - -`BEAMER_THEME' - The Beamer theme (`org-beamer-theme'). Options can be specified - via brackets, for example: - #+BEAMER_THEME: Rochester [height=20pt] - -`BEAMER_FONT_THEME' - The Beamer font theme. - -`BEAMER_INNER_THEME' - The Beamer inner theme. - -`BEAMER_OUTER_THEME' - The Beamer outer theme. - -`BEAMER_HEADER' - Arbitrary lines inserted into the preamble, just before the - `hyperref' settings. - -`DESCRIPTION' - The document description. By default these are inserted as - metadata using `hyperref'. Document metadata can be configured via - `org-latex-hyperref-template'. Description can also be typeset as - part of the front matter via `org-latex-title-command'. You can - use several `#+DESCRIPTION' keywords if the description is is long. - -`KEYWORDS' - The keywords defining the contents of the document. By default - these are inserted as metadata using `hyperref'. Document - metadata can be configured via `org-latex-hyperref-template'. - Description can also be typeset as part of the front matter via - `org-latex-title-command'. You can use several `#+KEYWORDS' if - the description is is long. - -`SUBTITLE' - The document subtitle. This is typeset using the format string - `org-beamer-subtitle-format'. It can also access via - `org-latex-hyperref-template' or typeset as part of the front - matter via `org-latex-title-command'. - - -File: org, Node: Sectioning Frames and Blocks in Beamer, Next: Beamer specific syntax, Prev: Beamer specific export settings, Up: Beamer export - -12.8.3 Sectioning, Frames and Blocks in Beamer ----------------------------------------------- - -Any tree with not-too-deep level nesting should in principle be -exportable as a Beamer presentation. Headlines fall into three -categories: sectioning elements, frames and blocks. - - - Headlines become frames when their level is equal to - `org-beamer-frame-level' or `H' value in an `OPTIONS' line (*note - Export settings::). - - Though, if a headline in the current tree has a `BEAMER_ENV' - property set to either to `frame' or `fullframe', its level - overrides the variable. A `fullframe' is a frame with an empty - (ignored) title. - - - All frame's children become `block' environments. Special block - types can be enforced by setting headline's `BEAMER_ENV' - property(1) to an appropriate value (see - `org-beamer-environments-default' for supported values and - `org-beamer-environments-extra' for adding more). - - - As a special case, if the `BEAMER_ENV' property is set to either - `appendix', `note', `noteNH' or `againframe', the headline will - become, respectively, an appendix, a note (within frame or between - frame, depending on its level), a note with its title ignored or an - `\againframe' command. In the latter case, a `BEAMER_REF' property - is mandatory in order to refer to the frame being resumed, and - contents are ignored. - - Also, a headline with an `ignoreheading' environment will have its - contents only inserted in the output. This special value is - useful to have data between frames, or to properly close a - `column' environment. - - Headlines also support `BEAMER_ACT' and `BEAMER_OPT' properties. -The former is translated as an overlay/action specification, or a -default overlay specification when enclosed within square brackets. -The latter specifies options(2) for the current frame or block. The -export back-end will automatically wrap properties within angular or -square brackets when appropriate. - - Moreover, headlines handle the `BEAMER_COL' property. Its value -should be a decimal number representing the width of the column as a -fraction of the total text width. If the headline has no specific -environment, its title will be ignored and its contents will fill the -column created. Otherwise, the block will fill the whole column and -the title will be preserved. Two contiguous headlines with a non-`nil' -`BEAMER_COL' value share the same `columns' LaTeX environment. It will -end before the next headline without such a property. This environment -is generated automatically. Although, it can also be explicitly -created, with a special `columns' value for `BEAMER_ENV' property (if -it needs to be set up with some specific options, for example). - - ---------- Footnotes ---------- - - (1) If this property is set, the entry will also get a -`:B_environment:' tag to make this visible. This tag has no semantic -meaning, it is only a visual aid. - - (2) The `fragile' option is added automatically if it contains code -that requires a verbatim environment, though. - - -File: org, Node: Beamer specific syntax, Next: Editing support, Prev: Sectioning Frames and Blocks in Beamer, Up: Beamer export - -12.8.4 Beamer specific syntax ------------------------------ - -The Beamer back-end is an extension of the LaTeX back-end. As such, all -LaTeX specific syntax (e.g., `#+LATEX:' or `#+ATTR_LATEX:') is -recognized. See *note LaTeX export:: for more information. - - Table of contents generated from `toc:t' `OPTION' keyword are -wrapped within a `frame' environment. Those generated from a `TOC' -keyword (*note Table of contents::) are not. In that case, it is also -possible to specify options, enclosed within square brackets. - - #+TOC: headlines [currentsection] - - Beamer specific code can be inserted with the following constructs: - - #+BEAMER: \pause - - #+BEGIN_EXPORT beamer - All lines in this block will appear only when using this back-end. - #+END_BEAMER - - Text @@beamer:some code@@ within a paragraph. - - In particular, this last example can be used to add overlay -specifications to objects whose type is among `bold', `item', `link', -`radio-target' and `target', when the value is enclosed within angular -brackets and put at the beginning the object. - - A *@@beamer:<2->@@useful* feature - - Eventually, every plain list has support for `:environment', -`:overlay' and `:options' attributes through `ATTR_BEAMER' affiliated -keyword. The first one allows the use of a different environment, the -second sets overlay specifications and the last one inserts optional -arguments in current list environment. - - #+ATTR_BEAMER: :overlay +- - - item 1 - - item 2 - - -File: org, Node: Editing support, Next: A Beamer Example, Prev: Beamer specific syntax, Up: Beamer export - -12.8.5 Editing support ----------------------- - -You can turn on a special minor mode `org-beamer-mode' for faster -editing with: - - #+STARTUP: beamer - -`C-c C-b (`org-beamer-select-environment')' - In `org-beamer-mode', this key offers fast selection of a Beamer - environment or the `BEAMER_COL' property. - - -File: org, Node: A Beamer Example, Prev: Editing support, Up: Beamer export - -12.8.6 A Beamer example ------------------------ - -Here is a simple example Org document that is intended for Beamer -export. - - #+TITLE: Example Presentation - #+AUTHOR: Carsten Dominik - #+OPTIONS: H:2 toc:t num:t - #+LATEX_CLASS: beamer - #+LATEX_CLASS_OPTIONS: [presentation] - #+BEAMER_THEME: Madrid - #+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col) %8BEAMER_OPT(Opt) - - * This is the first structural section - - ** Frame 1 - *** Thanks to Eric Fraga :B_block: - :PROPERTIES: - :BEAMER_COL: 0.48 - :BEAMER_ENV: block - :END: - for the first viable Beamer setup in Org - *** Thanks to everyone else :B_block: - :PROPERTIES: - :BEAMER_COL: 0.48 - :BEAMER_ACT: <2-> - :BEAMER_ENV: block - :END: - for contributing to the discussion - **** This will be formatted as a beamer note :B_note: - :PROPERTIES: - :BEAMER_env: note - :END: - ** Frame 2 (where we will not use columns) - *** Request - Please test this stuff! - - -File: org, Node: HTML export, Next: LaTeX export, Prev: Beamer export, Up: Exporting - -12.9 HTML export -================ - -Org mode contains an HTML (XHTML 1.0 strict) exporter with extensive -HTML formatting, in ways similar to John Gruber's _markdown_ language, -but with additional support for tables. - -* Menu: - -* HTML Export commands:: How to invoke HTML export -* HTML Specific export settings:: Export settings for HTML export -* HTML doctypes:: Org can export to various (X)HTML flavors -* HTML preamble and postamble:: How to insert a preamble and a postamble -* Quoting HTML tags:: Using direct HTML in Org mode -* Links in HTML export:: How links will be interpreted and formatted -* Tables in HTML export:: How to modify the formatting of tables -* Images in HTML export:: How to insert figures into HTML output -* Math formatting in HTML export:: Beautiful math also on the web -* Text areas in HTML export:: An alternative way to show an example -* CSS support:: Changing the appearance of the output -* JavaScript support:: Info and Folding in a web browser - - -File: org, Node: HTML Export commands, Next: HTML Specific export settings, Up: HTML export - -12.9.1 HTML export commands ---------------------------- - -`C-c C-e h h (`org-html-export-to-html')' - Export as an HTML file. For an Org file `myfile.org', the HTML - file will be `myfile.html'. The file will be overwritten without - warning. `C-c C-e h o' Export as an HTML file and immediately - open it with a browser. - -`C-c C-e h H (`org-html-export-as-html')' - Export to a temporary buffer. Do not create a file. - - -File: org, Node: HTML Specific export settings, Next: HTML doctypes, Prev: HTML Export commands, Up: HTML export - -12.9.2 HTML Specific export settings ------------------------------------- - -HTML export introduces a number of keywords, similar to the general -options settings described in *note Export settings::. - -`DESCRIPTION' - The document description. This description is inserted as a HTML - meta tag. You can use several such keywords if the list is long. - -`HTML_DOCTYPE' - The document type, e.g. HTML5, (`org-html-doctype'). - -`HTML_CONTAINER' - The container, e.g. `div', used to wrap sections and elements - (`org-html-container-element'). - -`HTML_LINK_HOME' - The home link URL (`org-html-link-home'). - -`HTML_LINK_UP' - The up link URL (`org-html-link-up'). - -`HTML_MATHJAX' - Options for the MathJax (`org-html-mathjax-options'). MathJax is - used to typeset LaTeX math in HTML documents. *note Math - formatting in HTML export:: contains an example. - -`HTML_HEAD' - Arbitrary lines appended to the end of the head of the document - (`org-html-head'). - -`HTML_HEAD_EXTRA' - Arbitrary lines appended to the end of the header of the document - (`org-html-head-extra'). - -`KEYWORDS' - The keywords defining the contents of the document. This - description is inserted as a HTML meta tag. You can use several - such keywords if the list is long. - -`LATEX_HEADER' - Arbitrary lines appended to the preamble used when transcoding - LaTeX fragments to images. See *note Math formatting in HTML - export:: for details. - -`SUBTITLE' - The document subtitle. The formatting depends on whether HTML5 in - used and on the `subtitle' CSS class. - - These keywords are treated in details in the following sections. - - -File: org, Node: HTML doctypes, Next: HTML preamble and postamble, Prev: HTML Specific export settings, Up: HTML export - -12.9.3 HTML doctypes --------------------- - -Org can export to various (X)HTML flavors. - - Setting the variable `org-html-doctype' allows you to export to -different (X)HTML variants. The exported HTML will be adjusted -according to the syntax requirements of that variant. You can either -set this variable to a doctype string directly, in which case the -exporter will try to adjust the syntax automatically, or you can use a -ready-made doctype. The ready-made options are: - - * "html4-strict" - - * "html4-transitional" - - * "html4-frameset" - - * "xhtml-strict" - - * "xhtml-transitional" - - * "xhtml-frameset" - - * "xhtml-11" - - * "html5" - - * "xhtml5" - -See the variable `org-html-doctype-alist' for details. The default is -"xhtml-strict". - - HTML5 introduces several new element types. By default, Org will -not make use of these element types, but you can set -`org-html-html5-fancy' to non-`nil' (or set `html5-fancy' item in an -`OPTIONS' line), to enable a few new block-level elements. These are -created using arbitrary #+BEGIN and #+END blocks. For instance: - - #+BEGIN_aside - Lorem ipsum - #+END_aside - - Will export to: - - - - While this: - - #+ATTR_HTML: :controls controls :width 350 - #+BEGIN_video - #+HTML: - #+HTML: - Your browser does not support the video tag. - #+END_video - - Becomes: - - - - Special blocks that do not correspond to HTML5 elements (see -`org-html-html5-elements') will revert to the usual behavior, i.e., -`#+BEGIN_lederhosen' will still export to `
'. - - Headlines cannot appear within special blocks. To wrap a headline -and its contents in e.g., `
' or `
' tags, set the -`HTML_CONTAINER' property on the headline itself. - - -File: org, Node: HTML preamble and postamble, Next: Quoting HTML tags, Prev: HTML doctypes, Up: HTML export - -12.9.4 HTML preamble and postamble ----------------------------------- - -The HTML exporter lets you define a preamble and a postamble. - - The default value for `org-html-preamble' is `t', which means that -the preamble is inserted depending on the relevant format string in -`org-html-preamble-format'. - - Setting `org-html-preamble' to a string will override the default -format string. If you set it to a function, it will insert the output -of the function, which must be a string. Setting to `nil' will not -insert any preamble. - - The default value for `org-html-postamble' is `'auto', which means -that the HTML exporter will look for information about the author, the -email, the creator and the date, and build the postamble from these -values. Setting `org-html-postamble' to `t' will insert the postamble -from the relevant format string found in `org-html-postamble-format'. -Setting it to `nil' will not insert any postamble. - - -File: org, Node: Quoting HTML tags, Next: Links in HTML export, Prev: HTML preamble and postamble, Up: HTML export - -12.9.5 Quoting HTML tags ------------------------- - -Plain `<' and `>' are always transformed to `<' and `>' in HTML -export. If you want to include raw HTML code, which should only appear -in HTML export, mark it with `@@html:' as in `@@html:@@bold -text@@html:@@'. For more extensive HTML that should be copied -verbatim to the exported file use either - - #+HTML: Literal HTML code for export - -or - - #+BEGIN_EXPORT html - All lines between these markers are exported literally - #+END_EXPORT - - -File: org, Node: Links in HTML export, Next: Tables in HTML export, Prev: Quoting HTML tags, Up: HTML export - -12.9.6 Links in HTML export ---------------------------- - -Internal links (*note Internal links::) will continue to work in HTML. -This includes automatic links created by radio targets (*note Radio -targets::). Links to external files will still work if the target file -is on the same relative path as the published Org file. Links to other -`.org' files will be translated into HTML links under the assumption -that an HTML version also exists of the linked file, at the same -relative path; setting `org-html-link-org-files-as-html' to `nil' -disables this translation. `id:' links can then be used to jump to -specific entries across files. For information related to linking -files while publishing them to a publishing directory see *note -Publishing links::. - - If you want to specify attributes for links, you can do so using a -special `#+ATTR_HTML' line to define attributes that will be added to -the `' or `' tags. Here is an example that sets `title' and -`style' attributes for a link: - - #+ATTR_HTML: :title The Org mode homepage :style color:red; - [[http://orgmode.org]] - - -File: org, Node: Tables in HTML export, Next: Images in HTML export, Prev: Links in HTML export, Up: HTML export - -12.9.7 Tables in HTML export ----------------------------- - -Org mode tables are exported to HTML using the table attributes defined -in `org-html-table-default-attributes'. The default setting makes -tables without cell borders and frame. If you would like to change -this for individual tables, place something like the following before -the table: - - #+CAPTION: This is a table with lines around and between cells - #+ATTR_HTML: :border 2 :rules all :frame border - - You can also group columns in the HTML output (*note Column -groups::). - - Below is a list of options for customizing tables HTML export. - -`org-html-table-align-individual-fields' - Non-`nil' means attach style attributes for alignment to each - table field. - -`org-html-table-caption-above' - When non-`nil', place caption string at the beginning of the table. - -`org-html-table-data-tags' - The opening and ending tags for table data fields. - -`org-html-table-default-attributes' - Default attributes and values which will be used in table tags. - -`org-html-table-header-tags' - The opening and ending tags for table header fields. - -`org-html-table-row-tags' - The opening and ending tags for table rows. - -`org-html-table-use-header-tags-for-first-column' - Non-`nil' means format column one in tables with header tags. - - -File: org, Node: Images in HTML export, Next: Math formatting in HTML export, Prev: Tables in HTML export, Up: HTML export - -12.9.8 Images in HTML export ----------------------------- - -HTML export can inline images given as links in the Org file, and it -can make an image the clickable part of a link. By default(1), images -are inlined if a link does not have a description. So -`[[file:myimg.jpg]]' will be inlined, while `[[file:myimg.jpg][the -image]]' will just produce a link `the image' that points to the image. -If the description part itself is a `file:' link or a `http:' URL -pointing to an image, this image will be inlined and activated so that -clicking on the image will activate the link. For example, to include -a thumbnail that will link to a high resolution version of the image, -you could use: - - [[file:highres.jpg][file:thumb.jpg]] - - If you need to add attributes to an inlined image, use a -`#+ATTR_HTML'. In the example below we specify the `alt' and `title' -attributes to support text viewers and accessibility, and align it to -the right. - - #+CAPTION: A black cat stalking a spider - #+ATTR_HTML: :alt cat/spider image :title Action! :align right - [[./img/a.jpg]] - -You could use `http' addresses just as well. - - ---------- Footnotes ---------- - - (1) But see the variable `org-html-inline-images'. - - -File: org, Node: Math formatting in HTML export, Next: Text areas in HTML export, Prev: Images in HTML export, Up: HTML export - -12.9.9 Math formatting in HTML export -------------------------------------- - -LaTeX math snippets (*note LaTeX fragments::) can be displayed in two -different ways on HTML pages. The default is to use MathJax -(http://www.mathjax.org) which should work out of the box with Org(1). -Some MathJax display options can be configured via -`org-html-mathjax-options', or in the buffer. For example, with the -following settings, - #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler - equation labels will be displayed on the left marign and equations -will be five ems from the left margin. - -See the docstring of `org-html-mathjax-options' for all supported -variables. The MathJax template can be configure via -`org-html-mathjax-template'. - - If you prefer, you can also request that LaTeX fragments are -processed into small images that will be inserted into the browser -page. Before the availability of MathJax, this was the default method -for Org files. This method requires that the `dvipng' program, -`dvisvgm' or `imagemagick' suite is available on your system. You can -still get this processing with - - #+OPTIONS: tex:dvipng - - #+OPTIONS: tex:dvisvgm - - or: - - #+OPTIONS: tex:imagemagick - - ---------- Footnotes ---------- - - (1) By default Org loads MathJax from MathJax.org -(http://docs.mathjax.org/en/latest/start.html#using-the-mathjax-content-delivery-network-cdn). -A link to the terms of service of the MathJax CDN can be found in the -docstring of `org-html-mathjax-options'. - - -File: org, Node: Text areas in HTML export, Next: CSS support, Prev: Math formatting in HTML export, Up: HTML export - -12.9.10 Text areas in HTML export ---------------------------------- - -An alternative way to publish literal code examples in HTML is to use -text areas, where the example can even be edited before pasting it into -an application. It is triggered by `:textarea' attribute at an -`example' or `src' block. - - You may also use `:height' and `:width' attributes to specify the -height and width of the text area, which default to the number of lines -in the example, and 80, respectively. For example - - #+ATTR_HTML: :textarea t :width 40 - #+BEGIN_EXAMPLE - (defun org-xor (a b) - "Exclusive or." - (if a (not b) b)) - #+END_EXAMPLE - - -File: org, Node: CSS support, Next: JavaScript support, Prev: Text areas in HTML export, Up: HTML export - -12.9.11 CSS support -------------------- - -You can modify the CSS style definitions for the exported file. The -HTML exporter assigns the following special CSS classes(1) to -appropriate parts of the document--your style specifications may change -these, in addition to any of the standard classes like for headlines, -tables, etc. - p.author author information, including email - p.date publishing date - p.creator creator info, about org mode version - .title document title - .subtitle document subtitle - .todo TODO keywords, all not-done states - .done the DONE keywords, all states that count as done - .WAITING each TODO keyword also uses a class named after itself - .timestamp timestamp - .timestamp-kwd keyword associated with a timestamp, like SCHEDULED - .timestamp-wrapper span around keyword plus timestamp - .tag tag in a headline - ._HOME each tag uses itself as a class, "@" replaced by "_" - .target target for links - .linenr the line number in a code example - .code-highlighted for highlighting referenced code lines - div.outline-N div for outline level N (headline plus text)) - div.outline-text-N extra div for text at outline level N - .section-number-N section number in headlines, different for each level - .figure-number label like "Figure 1:" - .table-number label like "Table 1:" - .listing-number label like "Listing 1:" - div.figure how to format an inlined image - pre.src formatted source code - pre.example normal example - p.verse verse paragraph - div.footnotes footnote section headline - p.footnote footnote definition paragraph, containing a footnote - .footref a footnote reference number (always a ) - .footnum footnote number in footnote definition (always ) - .org-svg default class for a linked `.svg' image - - Each exported file contains a compact default style that defines -these classes in a basic way(2). You may overwrite these settings, or -add to them by using the variables `org-html-head' and -`org-html-head-extra'. You can override the global values of these -variables for each file by using these keywords: - - #+HTML_HEAD: - #+HTML_HEAD_EXTRA: - -For longer style definitions, you can use several such lines. You -could also directly write a `' section in this way, -without referring to an external file. - - In order to add styles to a subtree, use the `:HTML_CONTAINER_CLASS:' -property to assign a class to the tree. In order to specify CSS styles -for a particular headline, you can use the id specified in a -`:CUSTOM_ID:' property. - - ---------- Footnotes ---------- - - (1) If the classes on TODO keywords and tags lead to conflicts, use -the variables `org-html-todo-kwd-class-prefix' and -`org-html-tag-class-prefix' to make them unique. - - (2) This style is defined in the constant `org-html-style-default', -which you should not modify. To turn inclusion of these defaults off, -customize `org-html-head-include-default-style' or set `html-style' to -`nil' in an `OPTIONS' line. - - -File: org, Node: JavaScript support, Prev: CSS support, Up: HTML export - -12.9.12 JavaScript supported display of web pages -------------------------------------------------- - -Sebastian Rose has written a JavaScript program especially designed to -enhance the web viewing experience of HTML files created with Org. This -program allows you to view large files in two different ways. The -first one is an _Info_-like mode where each section is displayed -separately and navigation can be done with the `n' and `p' keys (and -some other keys as well, press `?' for an overview of the available -keys). The second view type is a _folding_ view much like Org provides -inside Emacs. The script is available at -`http://orgmode.org/org-info.js' and you can find the documentation for -it at `http://orgmode.org/worg/code/org-info-js/'. We host the script -at our site, but if you use it a lot, you might not want to be -dependent on `http://orgmode.org' and prefer to install a local copy on -your own web server. - - All it then takes to use this program is adding a single line to the -Org file: - - #+INFOJS_OPT: view:info toc:nil - -If this line is found, the HTML header will automatically contain the -code needed to invoke the script. Using the line above, you can set -the following viewing options: - - path: The path to the script. The default is to grab the script from - `http://orgmode.org/org-info.js', but you might want to have - a local copy and use a path like `../scripts/org-info.js'. - view: Initial view when the website is first shown. Possible values are: - info Info-like interface with one section per page. - overview Folding interface, initially showing only top-level. - content Folding interface, starting with all headlines visible. - showall Folding interface, all headlines and text visible. - sdepth: Maximum headline level that will still become an independent - section for info and folding modes. The default is taken from - `org-export-headline-levels' (= the `H' switch in `#+OPTIONS'). - If this is smaller than in `org-export-headline-levels', each - info/folding section can still contain child headlines. - toc: Should the table of contents _initially_ be visible? - Even when `nil', you can always get to the "toc" with `i'. - tdepth: The depth of the table of contents. The defaults are taken from - the variables `org-export-headline-levels' and `org-export-with-toc'. - ftoc: Does the CSS of the page specify a fixed position for the "toc"? - If yes, the toc will never be displayed as a section. - ltoc: Should there be short contents (children) in each section? - Make this `above' if the section should be above initial text. - mouse: Headings are highlighted when the mouse is over them. Should be - `underline' (default) or a background color like `#cccccc'. - buttons: Should view-toggle buttons be everywhere? When `nil' (the - default), only one such button will be present. - You can choose default values for these options by customizing the -variable `org-html-infojs-options'. If you always want to apply the -script to your pages, configure the variable `org-html-use-infojs'. - - -File: org, Node: LaTeX export, Next: Markdown export, Prev: HTML export, Up: Exporting - -12.10 LaTeX export -================== - -The LaTeX exporter can produce an arbitrarily complex LaTeX document of -any standard or custom document class(1). The Org LaTeX exporter is -geared towards producing fully-linked PDF output. - - As in LaTeX, blank lines are meaningful for this back-end: a -paragraph will not be started if two contiguous syntactical elements -are not separated by an empty line. - -* Menu: - -* LaTeX export commands:: How to export to LaTeX and PDF -* LaTeX specific export settings:: Export settings for LaTeX -* LaTeX header and sectioning:: Setting up the export file structure -* Quoting LaTeX code:: Incorporating literal LaTeX code -* Tables in LaTeX export:: Specific attributes for tables -* Images in LaTeX export:: Specific attributes for images -* Plain lists in LaTeX export:: Specific attributes for plain lists -* Source blocks in LaTeX export:: Specific attributes for source blocks -* Example blocks in LaTeX export:: Specific attributes for example blocks -* Special blocks in LaTeX export:: Specific attributes for special blocks -* Horizontal rules in LaTeX export:: Specific attributes for horizontal rules - - ---------- Footnotes ---------- - - (1) The LaTeX exporter can be configured to support alternative -LaTeX engines (see `org-latex-compiler'), build sequences (see -`org-latex-pdf-process'), and packages, (see -`org-latex-default-packages-alist' and `org-latex-packages-alist'). - - -File: org, Node: LaTeX export commands, Next: LaTeX specific export settings, Up: LaTeX export - -12.10.1 LaTeX export commands ------------------------------ - -`C-c C-e l l (`org-latex-export-to-latex')' - Export as a LaTeX file. For an Org file `myfile.org', the LaTeX - file will be `myfile.tex'. The file will be overwritten without - warning. - -`C-c C-e l L (`org-latex-export-as-latex')' - Export to a temporary buffer. Do not create a file. - -`C-c C-e l p (`org-latex-export-to-pdf')' - Export as LaTeX and then process to PDF. - -`C-c C-e l o' - Export as LaTeX and then process to PDF, then open the resulting - PDF file. - - The exporter supports several LaTeX engines, namely `pdflatex', -`xelatex' and `lualatex'. The default LaTeX compiler can be set via -`org-latex-compiler' or the `#+LATEX_COMPILER' keyword. It is possible -to only load some packages with certain compilers (see the docstring of -`org-latex-default-packages-alist'). The bibliography compiler may -also be set via `org-latex-bibtex-compiler'(1). - - ---------- Footnotes ---------- - - (1) You cannot set the bibliography compiler on a file basis via a -keyword. However, "smart" LaTeX compilation systems, such as -`latexmk', are usually able to select the correct bibliography compiler. - - -File: org, Node: LaTeX specific export settings, Next: LaTeX header and sectioning, Prev: LaTeX export commands, Up: LaTeX export - -12.10.2 LaTeX specific export settings --------------------------------------- - -The LaTeX exporter introduces a number of keywords, similar to the -general options settings described in *note Export settings::. - -`DESCRIPTION' - The document description. By default these are inserted as - metadata using `hyperref'. Document metadata can be configured via - `org-latex-hyperref-template'. Description can also be typeset as - part of the front matter via `org-latex-title-command'. You can - use several `#+DESCRIPTION' keywords if the description is is long. - -`LATEX_CLASS' - The predefined preamble and headline level mapping to use - (`org-latex-default-class'). Must be an element in - `org-latex-classes'. - -`LATEX_CLASS_OPTIONS' - Options given to the LaTeX document class. - -`LATEX_COMPILER' - The compiler used to produce the PDF (`org-latex-compiler'). - -`LATEX_HEADER' - Arbitrary lines added to the preamble of the document, before the - `hyperref' settings. The location can be controlled via - `org-latex-classes'. - -`LATEX_HEADER_EXTRA' - Arbitrary lines added to the preamble of the document, before the - `hyperref' settings. The location can be controlled via - `org-latex-classes'. - -`KEYWORDS' - The keywords defining the contents of the document. By default - these are inserted as metadata using `hyperref'. Document - metadata can be configured via `org-latex-hyperref-template'. - Description can also be typeset as part of the front matter via - `org-latex-title-command'. You can use several `#+KEYWORDS' if - the description is is long. - -`SUBTITLE' - The document subtitle. This is typeset according to - `org-latex-subtitle-format'. If `org-latex-subtitle-separate' is - non-`nil' it is typed as part of the `\title'-macro. It can also - access via `org-latex-hyperref-template' or typeset as part of the - front matter via `org-latex-title-command'. - - These keywords are treated in details in the following sections. - - -File: org, Node: LaTeX header and sectioning, Next: Quoting LaTeX code, Prev: LaTeX specific export settings, Up: LaTeX export - -12.10.3 LaTeX header and sectioning structure ---------------------------------------------- - -By default, the first three outline levels become headlines, defining a -general document structure. Additional levels are exported as `itemize' -or `enumerate' lists. The transition can also occur at a different -level (*note Export settings::). - - By default, the LaTeX output uses the class `article'. - - You can change this globally by setting a different value for -`org-latex-default-class' or locally by adding an option like -`#+LATEX_CLASS: myclass' in your file, or with a `EXPORT_LATEX_CLASS' -property that applies when exporting a region containing only this -(sub)tree. The class must be listed in `org-latex-classes'. This -variable defines a header template for each class(1), and allows you to -define the sectioning structure for each class. You can also define -your own classes there. - - The `LATEX_CLASS_OPTIONS' keyword or `EXPORT_LATEX_CLASS_OPTIONS' -property can specify the options for the `\documentclass' macro. These -options have to be provided, as expected by LaTeX, within square -brackets. - - You can also use the `LATEX_HEADER' and `LATEX_HEADER_EXTRA'(2) -keywords in order to add lines to the header. See the docstring of -`org-latex-classes' for more information. - - An example is shown below. - - #+LATEX_CLASS: article - #+LATEX_CLASS_OPTIONS: [a4paper] - #+LATEX_HEADER: \usepackage{xyz} - - * Headline 1 - some text - - ---------- Footnotes ---------- - - (1) Into which the values of `org-latex-default-packages-alist' and -`org-latex-packages-alist' are spliced. - - (2) Unlike `LATEX_HEADER', contents from `LATEX_HEADER_EXTRA' -keywords will not be loaded when previewing LaTeX snippets (*note -Previewing LaTeX fragments::). - - -File: org, Node: Quoting LaTeX code, Next: Tables in LaTeX export, Prev: LaTeX header and sectioning, Up: LaTeX export - -12.10.4 Quoting LaTeX code --------------------------- - -Embedded LaTeX as described in *note Embedded LaTeX::, will be correctly -inserted into the LaTeX file. Furthermore, you can add special code -that should only be present in LaTeX export with the following -constructs: - - Code within @@latex:some code@@ a paragraph. - - #+LATEX: Literal LaTeX code for export - - #+BEGIN_EXPORT latex - All lines between these markers are exported literally - #+END_EXPORT - - -File: org, Node: Tables in LaTeX export, Next: Images in LaTeX export, Prev: Quoting LaTeX code, Up: LaTeX export - -12.10.5 Tables in LaTeX export ------------------------------- - -For LaTeX export of a table, you can specify a label and a caption -(*note Images and tables::). You can also use attributes to control -table layout and contents. Valid LaTeX attributes include: - -`:mode' - Nature of table's contents. It can be set to `table', `math', - `inline-math' or `verbatim'. In particular, when in `math' or - `inline-math' mode, every cell is exported as-is and the table is - wrapped within a math environment. Also, contiguous tables - sharing the same math mode are merged within the same environment. - Default mode is determined in `org-latex-default-table-mode'. - -`:environment' - Environment used for the table. It can be set to any LaTeX table - environment, like `tabularx'(1), `longtable', `array', `tabu'(2), - `bmatrix'... It defaults to `org-latex-default-table-environment' - value. - -`:caption' - `#+CAPTION' keyword is the simplest way to set a caption for a - table (*note Images and tables::). If you need more advanced - commands for that task, you can use `:caption' attribute instead. - Its value should be raw LaTeX code. It has precedence over - `#+CAPTION'. - -`:float' -`:placement' - The `:float' specifies the float environment for the table. - Possible values are `sideways'(3), `multicolumn', `t' and `nil'. - When unspecified, a table with a caption will have a `table' - environment. Moreover, the `:placement' attribute can specify the - positioning of the float. Note: `:placement' is ignored for - `:float sideways' tables. - -`:align' -`:font' -`:width' - Set, respectively, the alignment string of the table, its font - size and its width. They only apply on regular tables. - -`:spread' - Boolean specific to the `tabu' and `longtabu' environments, and - only takes effect when used in conjunction with the `:width' - attribute. When `:spread' is non-`nil', the table will be spread - or shrunk by the value of `:width'. - -`:booktabs' -`:center' -`:rmlines' - They toggle, respectively, `booktabs' usage (assuming the package - is properly loaded), table centering and removal of every - horizontal rule but the first one (in a "table.el" table only). - In particular, `org-latex-tables-booktabs' (respectively - `org-latex-tables-centered') activates the first (respectively - second) attribute globally. - -`:math-prefix' -`:math-suffix' -`:math-arguments' - A string that will be inserted, respectively, before the table - within the math environment, after the table within the math - environment, and between the macro name and the contents of the - table. The `:math-arguments' attribute is used for matrix macros - that require more than one argument (e.g., `qbordermatrix'). - - Thus, attributes can be used in a wide array of situations, like -writing a table that will span over multiple pages, or a matrix product: - - #+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l - | ..... | ..... | - | ..... | ..... | - - #+ATTR_LATEX: :mode math :environment bmatrix :math-suffix \times - | a | b | - | c | d | - #+ATTR_LATEX: :mode math :environment bmatrix - | 1 | 2 | - | 3 | 4 | - - In the example below, LaTeX command `\bicaption{HeadingA}{HeadingB}' -will set the caption. - - #+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB} - | ..... | ..... | - | ..... | ..... | - - ---------- Footnotes ---------- - - (1) Requires adding the `tabularx' package to -`org-latex-packages-alist'. - - (2) Requires adding the `tabu' package to `org-latex-packages-alist'. - - (3) Formerly, the value was `sidewaystable'. This is deprecated -since Org 8.3. - - -File: org, Node: Images in LaTeX export, Next: Plain lists in LaTeX export, Prev: Tables in LaTeX export, Up: LaTeX export - -12.10.6 Images in LaTeX export ------------------------------- - -Images that are linked to without a description part in the link, like -`[[file:img.jpg]]' or `[[./img.jpg]]' will be inserted into the PDF -output file resulting from LaTeX processing. Org will use an -`\includegraphics' macro to insert the image(1). - - You can specify image width or height with, respectively, `:width' -and `:height' attributes. It is also possible to add any other option -with the `:options' attribute, as shown in the following example: - - #+ATTR_LATEX: :width 5cm :options angle=90 - [[./img/sed-hr4049.pdf]] - - If you need a specific command for the caption, use `:caption' -attribute. It will override standard `#+CAPTION' value, if any. - - #+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB} - [[./img/sed-hr4049.pdf]] - - If you have specified a caption as described in *note Images and -tables::, the picture will be wrapped into a `figure' environment and -thus become a floating element. You can also ask Org to export an -image as a float without specifying caption by setting the `:float' -attribute. You may also set it to: - - `t': if you want to use the standard `figure' environment. It is - used by default if you provide a caption to the image. - - - `multicolumn': if you wish to include an image which spans multiple - columns in a page. This will export the image wrapped in a - `figure*' environment. - - - `wrap': if you would like to let text flow around the image. It - will make the figure occupy the left half of the page. - - - `sideways': if you would like the image to appear alone on a - separate page rotated ninety degrees using the `sidewaysfigure' - environment. Setting this `:float' option will ignore the - `:placement' setting. - - - `nil': if you need to avoid any floating environment, even when a - caption is provided. - To modify the placement option of any floating environment, set the -`placement' attribute. - - #+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement {r}{0.4\textwidth} - [[./img/hst.png]] - - Images are centered by default. However, one can disable this -behavior by setting `:center' attribute to `nil'. To prevent any image -from being centered throughout a document, set -`org-latex-images-centered' instead. - - Eventually, if the `:comment-include' attribute is set to a -non-`nil' value, the LaTeX `\includegraphics' macro will be commented -out. - - ---------- Footnotes ---------- - - (1) In the case of TikZ (`http://sourceforge.net/projects/pgf/') -images, it will become an `\input' macro wrapped within a `tikzpicture' -environment. - - -File: org, Node: Plain lists in LaTeX export, Next: Source blocks in LaTeX export, Prev: Images in LaTeX export, Up: LaTeX export - -12.10.7 Plain lists in LaTeX export ------------------------------------ - -Plain lists accept two optional attributes: `:environment' and -`:options'. The first can be used to specify the environment. The -second can be used to specifies additional arguments to the environment. -Both attributes are illustrated in the following example: - - #+LATEX_HEADER: \usepackage[inline]{enumitem} - Some ways to say "Hello": - #+ATTR_LATEX: :environment itemize* - #+ATTR_LATEX: :options [label={}, itemjoin={,}, itemjoin*={, and}] - - Hola - - Bonjour - - Guten Tag. - - By default, LaTeX only supports four levels of nesting for lists. If -deeper nesting is needed, the `enumitem' LaTeX package can be employed, -as shown in this example: - - #+LATEX_HEADER: \usepackage{enumitem} - #+LATEX_HEADER: \renewlist{itemize}{itemize}{9} - #+LATEX_HEADER: \setlist[itemize]{label=$\circ$} - - One - - Two - - Three - - Four - - Five - - -File: org, Node: Source blocks in LaTeX export, Next: Example blocks in LaTeX export, Prev: Plain lists in LaTeX export, Up: LaTeX export - -12.10.8 Source blocks in LaTeX export -------------------------------------- - -In addition to syntax defined in *note Literal examples::, names and -captions (*note Images and tables::), source blocks also accept two -additional attributes: `:float' and `:options'. - - You may set the former to - - `t': if you want to make the source block a float. It is the - default value when a caption is provided. - - - `multicolumn': if you wish to include a source block which spans - multiple columns in a page. - - - `nil': if you need to avoid any floating environment, even when a - caption is provided. It is useful for source code that may not - fit in a single page. - - #+ATTR_LATEX: :float nil - #+BEGIN_SRC emacs-lisp - Code that may not fit in a single page. - #+END_SRC - - The latter allows to specify options relative to the package used to -highlight code in the output (e.g., `listings'). This is the local -counterpart to `org-latex-listings-options' and -`org-latex-minted-options' variables, which see. - - #+ATTR_LATEX: :options commentstyle=\bfseries - #+BEGIN_SRC emacs-lisp - (defun Fib (n) ; Count rabbits. - (if (< n 2) n (+ (Fib (- n 1)) (Fib (- n 2))))) - #+END_SRC - - -File: org, Node: Example blocks in LaTeX export, Next: Special blocks in LaTeX export, Prev: Source blocks in LaTeX export, Up: LaTeX export - -12.10.9 Example blocks in LaTeX export --------------------------------------- - -By default, when exporting to LaTeX, example blocks contents are wrapped -in a `verbatim' environment. It is possible to use a different -environment globally using an appropriate export filter (*note Advanced -configuration::). You can also change this per block using -`:environment' parameter. - - #+ATTR_LATEX: :environment myverbatim - #+BEGIN_EXAMPLE - This sentence is false. - #+END_EXAMPLE - - -File: org, Node: Special blocks in LaTeX export, Next: Horizontal rules in LaTeX export, Prev: Example blocks in LaTeX export, Up: LaTeX export - -12.10.10 Special blocks in LaTeX export ---------------------------------------- - -In LaTeX back-end, special blocks become environments of the same name. -Value of `:options' attribute will be appended as-is to that -environment's opening string. For example: - - #+BEGIN_abstract - We demonstrate how to solve the Syracuse problem. - #+END_abstract - - #+ATTR_LATEX: :options [Proof of important theorem] - #+BEGIN_proof - ... - Therefore, any even number greater than 2 is the sum of two primes. - #+END_proof - -becomes - - \begin{abstract} - We demonstrate how to solve the Syracuse problem. - \end{abstract} - - \begin{proof}[Proof of important theorem] - ... - Therefore, any even number greater than 2 is the sum of two primes. - \end{proof} - - If you need to insert a specific caption command, use `:caption' -attribute. It will override standard `#+CAPTION' value, if any. For -example: - - #+ATTR_LATEX: :caption \MyCaption{HeadingA} - #+BEGIN_proof - ... - #+END_proof - - -File: org, Node: Horizontal rules in LaTeX export, Prev: Special blocks in LaTeX export, Up: LaTeX export - -12.10.11 Horizontal rules in LaTeX export ------------------------------------------ - -Width and thickness of a given horizontal rule can be controlled with, -respectively, `:width' and `:thickness' attributes: - - #+ATTR_LATEX: :width .6\textwidth :thickness 0.8pt - ----- - - -File: org, Node: Markdown export, Next: OpenDocument Text export, Prev: LaTeX export, Up: Exporting - -12.11 Markdown export -===================== - -`md' export back-end generates Markdown syntax(1) for an Org mode -buffer. - - It is built over HTML back-end: any construct not supported by -Markdown syntax (e.g., tables) will be controlled and translated by -`html' back-end (*note HTML export::). - -Markdown export commands ------------------------- - -`C-c C-e m m (`org-md-export-to-markdown')' - Export as a text file written in Markdown syntax. For an Org file, - `myfile.org', the resulting file will be `myfile.md'. The file - will be overwritten without warning. - -`C-c C-e m M (`org-md-export-as-markdown')' - Export to a temporary buffer. Do not create a file. - -`C-c C-e m o' - Export as a text file with Markdown syntax, then open it. - -Header and sectioning structure -------------------------------- - -Markdown export can generate both `atx' and `setext' types for -headlines, according to `org-md-headline-style'. The former introduces -a hard limit of two levels, whereas the latter pushes it to six. -Headlines below that limit are exported as lists. You can also set a -soft limit before that one (*note Export settings::). - - ---------- Footnotes ---------- - - (1) Vanilla flavor, as defined at -`http://daringfireball.net/projects/markdown/'. - - -File: org, Node: OpenDocument Text export, Next: Org export, Prev: Markdown export, Up: Exporting - -12.12 OpenDocument Text export -============================== - -Org mode supports export to OpenDocument Text (ODT) format. Documents -created by this exporter use the `OpenDocument-v1.2 specification'(1) -and are compatible with LibreOffice 3.4. - -* Menu: - -* Pre-requisites for ODT export:: What packages ODT exporter relies on -* ODT export commands:: How to invoke ODT export -* ODT specific export settings:: Export settings for ODT -* Extending ODT export:: How to produce `doc', `pdf' files -* Applying custom styles:: How to apply custom styles to the output -* Links in ODT export:: How links will be interpreted and formatted -* Tables in ODT export:: How Tables are exported -* Images in ODT export:: How to insert images -* Math formatting in ODT export:: How LaTeX fragments are formatted -* Labels and captions in ODT export:: How captions are rendered -* Literal examples in ODT export:: How source and example blocks are formatted -* Advanced topics in ODT export:: Read this if you are a power user - - ---------- Footnotes ---------- - - (1) Open Document Format for Office Applications (OpenDocument) -Version 1.2 -(http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html) - - -File: org, Node: Pre-requisites for ODT export, Next: ODT export commands, Up: OpenDocument Text export - -12.12.1 Pre-requisites for ODT export -------------------------------------- - -The ODT exporter relies on the `zip' program to create the final -output. Check the availability of this program before proceeding -further. - - -File: org, Node: ODT export commands, Next: ODT specific export settings, Prev: Pre-requisites for ODT export, Up: OpenDocument Text export - -12.12.2 ODT export commands ---------------------------- - -`C-c C-e o o (`org-odt-export-to-odt')' - Export as OpenDocument Text file. - - If `org-odt-preferred-output-format' is specified, automatically - convert the exported file to that format. *Note Automatically - exporting to other formats: x-export-to-other-formats. - - For an Org file `myfile.org', the ODT file will be `myfile.odt'. - The file will be overwritten without warning. If there is an - active region,(1) only the region will be exported. If the - selected region is a single tree,(2) the tree head will become the - document title. If the tree head entry has, or inherits, an - `EXPORT_FILE_NAME' property, that name will be used for the export. - - `C-c C-e o O' Export as an OpenDocument Text file and open the - resulting file. - - If `org-odt-preferred-output-format' is specified, open the - converted file instead. *Note Automatically exporting to other - formats: x-export-to-other-formats. - - ---------- Footnotes ---------- - - (1) This requires `transient-mark-mode' to be turned on - - (2) To select the current subtree, use `C-c @' - - -File: org, Node: ODT specific export settings, Next: Extending ODT export, Prev: ODT export commands, Up: OpenDocument Text export - -12.12.3 ODT specific export settings ------------------------------------- - -The ODT exporter introduces a number of keywords, similar to the general -options settings described in *note Export settings::. - -`DESCRIPTION' - The document description. These are inserted as document - metadata. You can use several such keywords if the list is long. - -`KEYWORDS' - The keywords defining the contents of the document. These are - inserted as document metadata. You can use several such keywords - if the list is long. - -`ODT_STYLES_FILE' - The style file of the document (`org-odt-styles-file'). See *note - Applying custom styles:: for details. - -`SUBTITLE' - The document subtitle. - - -File: org, Node: Extending ODT export, Next: Applying custom styles, Prev: ODT specific export settings, Up: OpenDocument Text export - -12.12.4 Extending ODT export ----------------------------- - -The ODT exporter can interface with a variety of document converters -and supports popular converters out of the box. As a result, you can -use it to export to formats like `doc' or convert a document from one -format (say `csv') to another format (say `ods' or `xls'). - - If you have a working installation of LibreOffice, a document -converter is pre-configured for you and you can use it right away. If -you would like to use `unoconv' as your preferred converter, customize -the variable `org-odt-convert-process' to point to `unoconv'. You can -also use your own favorite converter or tweak the default settings of -the `LibreOffice' and `unoconv' converters. *Note Configuring a -document converter::. - -Automatically exporting to other formats -........................................ - -Very often, you will find yourself exporting to ODT format, only to -immediately save the exported document to other formats like `doc', -`docx', `rtf', `pdf' etc. In such cases, you can specify your -preferred output format by customizing the variable -`org-odt-preferred-output-format'. This way, the export commands -(*note Exporting to ODT: x-export-to-odt.) can be extended to export to -a format that is of immediate interest to you. - -Converting between document formats -................................... - -There are many document converters in the wild which support conversion -to and from various file formats, including, but not limited to the ODT -format. LibreOffice converter, mentioned above, is one such converter. -Once a converter is configured, you can interact with it using the -following command. - -`M-x org-odt-convert RET' - Convert an existing document from one format to another. With a - prefix argument, also open the newly produced file. - - -File: org, Node: Applying custom styles, Next: Links in ODT export, Prev: Extending ODT export, Up: OpenDocument Text export - -12.12.5 Applying custom styles ------------------------------- - -The ODT exporter ships with a set of OpenDocument styles (*note Working -with OpenDocument style files::) that ensure a well-formatted output. -These factory styles, however, may not cater to your specific tastes. -To customize the output, you can either modify the above styles files -directly, or generate the required styles using an application like -LibreOffice. The latter method is suitable for expert and non-expert -users alike, and is described here. - -Applying custom styles: the easy way -.................................... - - 1. Create a sample `example.org' file with the below settings and - export it to ODT format. - - #+OPTIONS: H:10 num:t - - 2. Open the above `example.odt' using LibreOffice. Use the `Stylist' - to locate the target styles--these typically have the `Org' - prefix--and modify those to your taste. Save the modified file - either as an OpenDocument Text (`.odt') or OpenDocument Template - (`.ott') file. - - 3. Customize the variable `org-odt-styles-file' and point it to the - newly created file. For additional configuration options *note - Overriding factory styles: x-overriding-factory-styles. - - If you would like to choose a style on a per-file basis, you can - use the `#+ODT_STYLES_FILE' option. A typical setting will look - like - - #+ODT_STYLES_FILE: "/path/to/example.ott" - - or - - #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")) - - -Using third-party styles and templates -...................................... - -You can use third-party styles and templates for customizing your -output. This will produce the desired output only if the template -provides all style names that the `ODT' exporter relies on. Unless -this condition is met, the output is going to be less than -satisfactory. So it is highly recommended that you only work with -templates that are directly derived from the factory settings. - - -File: org, Node: Links in ODT export, Next: Tables in ODT export, Prev: Applying custom styles, Up: OpenDocument Text export - -12.12.6 Links in ODT export ---------------------------- - -ODT exporter creates native cross-references for internal links. It -creates Internet-style links for all other links. - - A link with no description and destined to a regular (un-itemized) -outline heading is replaced with a cross-reference and section number -of the heading. - - A `\ref{label}'-style reference to an image, table etc. is replaced -with a cross-reference and sequence number of the labeled entity. -*Note Labels and captions in ODT export::. - - -File: org, Node: Tables in ODT export, Next: Images in ODT export, Prev: Links in ODT export, Up: OpenDocument Text export - -12.12.7 Tables in ODT export ----------------------------- - -Export of native Org mode tables (*note Tables::) and simple `table.el' -tables is supported. However, export of complex `table.el' -tables--tables that have column or row spans--is not supported. Such -tables are stripped from the exported document. - - By default, a table is exported with top and bottom frames and with -rules separating row and column groups (*note Column groups::). -Furthermore, all tables are typeset to occupy the same width. If the -table specifies alignment and relative width for its columns (*note -Column width and alignment::) then these are honored on export.(1) - - You can control the width of the table by specifying `:rel-width' -property using an `#+ATTR_ODT' line. - - For example, consider the following table which makes use of all the -rules mentioned above. - - #+ATTR_ODT: :rel-width 50 - | Area/Month | Jan | Feb | Mar | Sum | - |---------------+-------+-------+-------+-------| - | / | < | | | < | - | | | | | | - | North America | 1 | 21 | 926 | 948 | - | Middle East | 6 | 75 | 844 | 925 | - | Asia Pacific | 9 | 27 | 790 | 826 | - |---------------+-------+-------+-------+-------| - | Sum | 16 | 123 | 2560 | 2699 | - - On export, the table will occupy 50% of text area. The columns will -be sized (roughly) in the ratio of 13:5:5:5:6. The first column will -be left-aligned and rest of the columns will be right-aligned. There -will be vertical rules after separating the header and last columns -from other columns. There will be horizontal rules separating the -header and last rows from other rows. - - If you are not satisfied with the above formatting options, you can -create custom table styles and associate them with a table using the -`#+ATTR_ODT' line. *Note Customizing tables in ODT export::. - - ---------- Footnotes ---------- - - (1) The column widths are interpreted as weighted ratios with the -default weight being 1 - - -File: org, Node: Images in ODT export, Next: Math formatting in ODT export, Prev: Tables in ODT export, Up: OpenDocument Text export - -12.12.8 Images in ODT export ----------------------------- - -Embedding images -................ - -You can embed images within the exported document by providing a link -to the desired image file with no link description. For example, to -embed `img.png' do either of the following: - - [[file:img.png]] - - [[./img.png]] - -Embedding clickable images -.......................... - -You can create clickable images by providing a link whose description -is a link to an image file. For example, to embed a image -`org-mode-unicorn.png' which when clicked jumps to `http://Orgmode.org' -website, do the following - - [[http://orgmode.org][./org-mode-unicorn.png]] - -Sizing and scaling of embedded images -..................................... - -You can control the size and scale of the embedded images using the -`#+ATTR_ODT' attribute. - - The exporter specifies the desired size of the image in the final -document in units of centimeters. In order to scale the embedded -images, the exporter queries for pixel dimensions of the images using -one of a) ImageMagick's `identify' program or b) Emacs `create-image' -and `image-size' APIs(1). The pixel dimensions are subsequently -converted in to units of centimeters using `org-odt-pixels-per-inch'. -The default value of this variable is set to `display-pixels-per-inch'. -You can tweak this variable to achieve the best results. - - The examples below illustrate the various possibilities. - -Explicitly size the image - To embed `img.png' as a 10 cm x 10 cm image, do the following: - - #+ATTR_ODT: :width 10 :height 10 - [[./img.png]] - -Scale the image - To embed `img.png' at half its size, do the following: - - #+ATTR_ODT: :scale 0.5 - [[./img.png]] - -Scale the image to a specific width - To embed `img.png' with a width of 10 cm while retaining the - original height:width ratio, do the following: - - #+ATTR_ODT: :width 10 - [[./img.png]] - -Scale the image to a specific height - To embed `img.png' with a height of 10 cm while retaining the - original height:width ratio, do the following - - #+ATTR_ODT: :height 10 - [[./img.png]] - -Anchoring of images -................... - -You can control the manner in which an image is anchored by setting the -`:anchor' property of its `#+ATTR_ODT' line. You can specify one of -the following three values for the `:anchor' property: `"as-char"', -`"paragraph"' and `"page"'. - - To create an image that is anchored to a page, do the following: - #+ATTR_ODT: :anchor "page" - [[./img.png]] - - ---------- Footnotes ---------- - - (1) Use of `ImageMagick' is only desirable. However, if you -routinely produce documents that have large images or you export your -Org files that has images using a Emacs batch script, then the use of -`ImageMagick' is mandatory. - - -File: org, Node: Math formatting in ODT export, Next: Labels and captions in ODT export, Prev: Images in ODT export, Up: OpenDocument Text export - -12.12.9 Math formatting in ODT export -------------------------------------- - -The ODT exporter has special support for handling math. - -* Menu: - -* Working with LaTeX math snippets:: How to embed LaTeX math fragments -* Working with MathML or OpenDocument formula files:: How to embed equations in native format - - -File: org, Node: Working with LaTeX math snippets, Next: Working with MathML or OpenDocument formula files, Up: Math formatting in ODT export - -Working with LaTeX math snippets -................................ - -LaTeX math snippets (*note LaTeX fragments::) can be embedded in the ODT -document in one of the following ways: - - 1. MathML - - This option is activated on a per-file basis with - - #+OPTIONS: LaTeX:t - - With this option, LaTeX fragments are first converted into MathML - fragments using an external LaTeX-to-MathML converter program. The - resulting MathML fragments are then embedded as an OpenDocument - Formula in the exported document. - - You can specify the LaTeX-to-MathML converter by customizing the - variables `org-latex-to-mathml-convert-command' and - `org-latex-to-mathml-jar-file'. - - To use MathToWeb(1) as your converter, you can configure the above - variables as - - (setq org-latex-to-mathml-convert-command - "java -jar %j -unicode -force -df %o %I" - org-latex-to-mathml-jar-file - "/path/to/mathtoweb.jar") - To use LaTeXML(2) use - (setq org-latex-to-mathml-convert-command - "latexmlmath \"%i\" --presentationmathml=%o") - - You can use the following commands to quickly verify the - reliability of the LaTeX-to-MathML converter. - - `M-x org-odt-export-as-odf RET' - Convert a LaTeX math snippet to an OpenDocument formula - (`.odf') file. - - `M-x org-odt-export-as-odf-and-open RET' - Convert a LaTeX math snippet to an OpenDocument formula - (`.odf') file and open the formula file with the - system-registered application. - - 2. PNG images - - This option is activated on a per-file basis with - - #+OPTIONS: tex:dvipng - - #+OPTIONS: tex:dvisvgm - - or: - - #+OPTIONS: tex:imagemagick - - With this option, LaTeX fragments are processed into PNG or SVG - images and the resulting images are embedded in the exported - document. This method requires that the `dvipng' program, - `dvisvgm' or `imagemagick' suite be available on your system. - - ---------- Footnotes ---------- - - (1) See MathToWeb -(http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl). - - (2) See `http://dlmf.nist.gov/LaTeXML/'. - - -File: org, Node: Working with MathML or OpenDocument formula files, Prev: Working with LaTeX math snippets, Up: Math formatting in ODT export - -Working with MathML or OpenDocument formula files -................................................. - -For various reasons, you may find embedding LaTeX math snippets in an -ODT document less than reliable. In that case, you can embed a math -equation by linking to its MathML (`.mml') source or its OpenDocument -formula (`.odf') file as shown below: - - [[./equation.mml]] - - or - - [[./equation.odf]] - - -File: org, Node: Labels and captions in ODT export, Next: Literal examples in ODT export, Prev: Math formatting in ODT export, Up: OpenDocument Text export - -12.12.10 Labels and captions in ODT export ------------------------------------------- - -You can label and caption various category of objects--an inline image, -a table, a LaTeX fragment or a Math formula--using `#+LABEL' and -`#+CAPTION' lines. *Note Images and tables::. ODT exporter enumerates -each labeled or captioned object of a given category separately. As a -result, each such object is assigned a sequence number based on order -of its appearance in the Org file. - - In the exported document, a user-provided caption is augmented with -the category and sequence number. Consider the following inline image -in an Org file. - - #+CAPTION: Bell curve - #+LABEL: fig:SED-HR4049 - [[./img/a.png]] - - It could be rendered as shown below in the exported document. - - Figure 2: Bell curve - - You can modify the category component of the caption by customizing -the option `org-odt-category-map-alist'. For example, to tag all -embedded images with the string `Illustration' (instead of the default -`Figure') use the following setting: - - (setq org-odt-category-map-alist - (("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p))) - - With this, previous image will be captioned as below in the exported -document. - - Illustration 2: Bell curve - - -File: org, Node: Literal examples in ODT export, Next: Advanced topics in ODT export, Prev: Labels and captions in ODT export, Up: OpenDocument Text export - -12.12.11 Literal examples in ODT export ---------------------------------------- - -Export of literal examples (*note Literal examples::) with full -fontification is supported. Internally, the exporter relies on -`htmlfontify.el' to generate all style definitions needed for a fancy -listing. The auto-generated styles have `OrgSrc' as prefix and inherit -their color from the faces used by Emacs `font-lock' library for the -source language. - - If you prefer to use your own custom styles for fontification, you -can do so by customizing the option -`org-odt-create-custom-styles-for-srcblocks'. - - You can turn off fontification of literal examples by customizing the -option `org-odt-fontify-srcblocks'. - - -File: org, Node: Advanced topics in ODT export, Prev: Literal examples in ODT export, Up: OpenDocument Text export - -12.12.12 Advanced topics in ODT export --------------------------------------- - -If you rely heavily on ODT export, you may want to exploit the full set -of features that the exporter offers. This section describes features -that would be of interest to power users. - -* Menu: - -* Configuring a document converter:: How to register a document converter -* Working with OpenDocument style files:: Explore the internals -* Creating one-off styles:: How to produce custom highlighting etc -* Customizing tables in ODT export:: How to define and use Table templates -* Validating OpenDocument XML:: How to debug corrupt OpenDocument files - - -File: org, Node: Configuring a document converter, Next: Working with OpenDocument style files, Up: Advanced topics in ODT export - -Configuring a document converter -................................ - -The ODT exporter can work with popular converters with little or no -extra configuration from your side. *Note Extending ODT export::. If -you are using a converter that is not supported by default or if you -would like to tweak the default converter settings, proceed as below. - - 1. Register the converter - - Name your converter and add it to the list of known converters by - customizing the option `org-odt-convert-processes'. Also specify - how the converter can be invoked via command-line to effect the - conversion. - - 2. Configure its capabilities - - Specify the set of formats the converter can handle by customizing - the variable `org-odt-convert-capabilities'. Use the default - value for this variable as a guide for configuring your converter. - As suggested by the default setting, you can specify the full set - of formats supported by the converter and not limit yourself to - specifying formats that are related to just the OpenDocument Text - format. - - 3. Choose the converter - - Select the newly added converter as the preferred one by - customizing the option `org-odt-convert-process'. - - -File: org, Node: Working with OpenDocument style files, Next: Creating one-off styles, Prev: Configuring a document converter, Up: Advanced topics in ODT export - -Working with OpenDocument style files -..................................... - -This section explores the internals of the ODT exporter and the means -by which it produces styled documents. Read this section if you are -interested in exploring the automatic and custom OpenDocument styles -used by the exporter. - -a) Factory styles -................. - -The ODT exporter relies on two files for generating its output. These -files are bundled with the distribution under the directory pointed to -by the variable `org-odt-styles-dir'. The two files are: - - * `OrgOdtStyles.xml' - - This file contributes to the `styles.xml' file of the final `ODT' - document. This file gets modified for the following purposes: - 1. To control outline numbering based on user settings. - - 2. To add styles generated by `htmlfontify.el' for fontification - of code blocks. - - * `OrgOdtContentTemplate.xml' - - This file contributes to the `content.xml' file of the final `ODT' - document. The contents of the Org outline are inserted between the - `'...`' elements of this file. - - Apart from serving as a template file for the final `content.xml', - the file serves the following purposes: - 1. It contains automatic styles for formatting of tables which - are referenced by the exporter. - - 2. It contains `'...`' - elements that control how various entities--tables, images, - equations, etc.--are numbered. - -b) Overriding factory styles -............................ - -The following two variables control the location from which the ODT -exporter picks up the custom styles and content template files. You can -customize these variables to override the factory styles used by the -exporter. - - * `org-odt-styles-file' - - Use this variable to specify the `styles.xml' that will be used in - the final output. You can specify one of the following values: - - 1. A `styles.xml' file - - Use this file instead of the default `styles.xml' - - 2. A `.odt' or `.ott' file - - Use the `styles.xml' contained in the specified OpenDocument - Text or Template file - - 3. A `.odt' or `.ott' file and a subset of files contained - within them - - Use the `styles.xml' contained in the specified OpenDocument - Text or Template file. Additionally extract the specified - member files and embed those within the final `ODT' document. - - Use this option if the `styles.xml' file references - additional files like header and footer images. - - 4. `nil' - - Use the default `styles.xml' - - * `org-odt-content-template-file' - - Use this variable to specify the blank `content.xml' that will be - used in the final output. - - -File: org, Node: Creating one-off styles, Next: Customizing tables in ODT export, Prev: Working with OpenDocument style files, Up: Advanced topics in ODT export - -Creating one-off styles -....................... - -There are times when you would want one-off formatting in the exported -document. You can achieve this by embedding raw OpenDocument XML in -the Org file. The use of this feature is better illustrated with -couple of examples. - - 1. Embedding ODT tags as part of regular text - - You can inline OpenDocument syntax by enclosing it within - `@@odt:...@@' markup. For example, to highlight a region of text - do the following: - - @@odt:This is a highlighted - text@@. But this is a regular text. - - *Hint:* To see the above example in action, edit your `styles.xml' - (*note Factory styles: x-orgodtstyles-xml.) and add a custom - `Highlight' style as shown below. - - - - - - 2. Embedding a one-line OpenDocument XML - - You can add a simple OpenDocument one-liner using the `#+ODT:' - directive. For example, to force a page break do the following: - - #+ODT: - - *Hint:* To see the above example in action, edit your `styles.xml' - (*note Factory styles: x-orgodtstyles-xml.) and add a custom - `PageBreak' style as shown below. - - - - - - 3. Embedding a block of OpenDocument XML - - You can add a large block of OpenDocument XML using the - `#+BEGIN_EXPORT odt'...`#+END_EXPORT' construct. - - For example, to create a one-off paragraph that uses bold text, do - the following: - - #+BEGIN_EXPORT odt - - This paragraph is specially formatted and uses bold text. - - #+END_EXPORT - - - -File: org, Node: Customizing tables in ODT export, Next: Validating OpenDocument XML, Prev: Creating one-off styles, Up: Advanced topics in ODT export - -Customizing tables in ODT export -................................ - -You can override the default formatting of the table by specifying a -custom table style with the `#+ATTR_ODT' line. For a discussion on -default formatting of tables *note Tables in ODT export::. - - This feature closely mimics the way table templates are defined in -the OpenDocument-v1.2 specification.(1) - - To have a quick preview of this feature, install the below setting -and export the table that follows: - - (setq org-odt-table-styles - (append org-odt-table-styles - '(("TableWithHeaderRowAndColumn" "Custom" - ((use-first-row-styles . t) - (use-first-column-styles . t))) - ("TableWithFirstRowandLastRow" "Custom" - ((use-first-row-styles . t) - (use-last-row-styles . t)))))) - - #+ATTR_ODT: :style TableWithHeaderRowAndColumn - | Name | Phone | Age | - | Peter | 1234 | 17 | - | Anna | 4321 | 25 | - - In the above example, you used a template named `Custom' and -installed two table styles with the names `TableWithHeaderRowAndColumn' -and `TableWithFirstRowandLastRow'. (*Important:* The OpenDocument -styles needed for producing the above template have been pre-defined for -you. These styles are available under the section marked `Custom Table -Template' in `OrgOdtContentTemplate.xml' (*note Factory styles: -x-orgodtcontenttemplate-xml.). If you need additional templates you -have to define these styles yourselves. - - To use this feature proceed as follows: - - 1. Create a table template(2) - - A table template is nothing but a set of `table-cell' and - `paragraph' styles for each of the following table cell categories: - - - Body - - - First column - - - Last column - - - First row - - - Last row - - - Even row - - - Odd row - - - Even column - - - Odd Column - - The names for the above styles must be chosen based on the name of - the table template using a well-defined convention. - - The naming convention is better illustrated with an example. For - a table template with the name `Custom', the needed style names - are listed in the following table. - - Table cell type `table-cell' style `paragraph' style - ------------------------------------------------------------------------------- - - Body `CustomTableCell' `CustomTableParagraph' - First column `CustomFirstColumnTableCell'`CustomFirstColumnTableParagraph' - Last column `CustomLastColumnTableCell' `CustomLastColumnTableParagraph' - First row `CustomFirstRowTableCell' `CustomFirstRowTableParagraph' - Last row `CustomLastRowTableCell' `CustomLastRowTableParagraph' - Even row `CustomEvenRowTableCell' `CustomEvenRowTableParagraph' - Odd row `CustomOddRowTableCell' `CustomOddRowTableParagraph' - Even column `CustomEvenColumnTableCell' `CustomEvenColumnTableParagraph' - Odd column `CustomOddColumnTableCell' `CustomOddColumnTableParagraph' - - To create a table template with the name `Custom', define the above - styles in the - `'...`' element - of the content template file (*note Factory styles: - x-orgodtcontenttemplate-xml.). - - 2. Define a table style(3) - - To define a table style, create an entry for the style in the - variable `org-odt-table-styles' and specify the following: - - - the name of the table template created in step (1) - - - the set of cell styles in that template that are to be - activated - - For example, the entry below defines two different table styles - `TableWithHeaderRowAndColumn' and `TableWithFirstRowandLastRow' - based on the same template `Custom'. The styles achieve their - intended effect by selectively activating the individual cell - styles in that template. - - (setq org-odt-table-styles - (append org-odt-table-styles - '(("TableWithHeaderRowAndColumn" "Custom" - ((use-first-row-styles . t) - (use-first-column-styles . t))) - ("TableWithFirstRowandLastRow" "Custom" - ((use-first-row-styles . t) - (use-last-row-styles . t)))))) - - 3. Associate a table with the table style - - To do this, specify the table style created in step (2) as part of - the `ATTR_ODT' line as shown below. - - #+ATTR_ODT: :style "TableWithHeaderRowAndColumn" - | Name | Phone | Age | - | Peter | 1234 | 17 | - | Anna | 4321 | 25 | - - ---------- Footnotes ---------- - - (1) OpenDocument-v1.2 Specification -(http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html) - - (2) See the `' element of the -OpenDocument-v1.2 specification - - (3) See the attributes `table:template-name', -`table:use-first-row-styles', `table:use-last-row-styles', -`table:use-first-column-styles', `table:use-last-column-styles', -`table:use-banding-rows-styles', and `table:use-banding-column-styles' -of the `' element in the OpenDocument-v1.2 specification - - -File: org, Node: Validating OpenDocument XML, Prev: Customizing tables in ODT export, Up: Advanced topics in ODT export - -Validating OpenDocument XML -........................... - -Occasionally, you will discover that the document created by the ODT -exporter cannot be opened by your favorite application. One of the -common reasons for this is that the `.odt' file is corrupt. In such -cases, you may want to validate the document against the OpenDocument -RELAX NG Compact Syntax (RNC) schema. - - For de-compressing the `.odt' file(1): *note (emacs)File Archives::. -For general help with validation (and schema-sensitive editing) of XML -files: *note (nxml-mode)Introduction::. - - If you have ready access to OpenDocument `.rnc' files and the needed -schema-locating rules in a single folder, you can customize the variable -`org-odt-schema-dir' to point to that directory. The ODT exporter will -take care of updating the `rng-schema-locating-files' for you. - - ---------- Footnotes ---------- - - (1) `.odt' files are nothing but `zip' archives - - -File: org, Node: Org export, Next: Texinfo export, Prev: OpenDocument Text export, Up: Exporting - -12.13 Org export -================ - -`org' export back-end creates a normalized version of the Org document -in current buffer. In particular, it evaluates Babel code (*note -Evaluating code blocks::) and removes other back-ends specific contents. - -Org export commands -------------------- - -`C-c C-e O o (`org-org-export-to-org')' - Export as an Org document. For an Org file, `myfile.org', the - resulting file will be `myfile.org.org'. The file will be - overwritten without warning. - -`C-c C-e O O (`org-org-export-as-org')' - Export to a temporary buffer. Do not create a file. - -`C-c C-e O v' - Export to an Org file, then open it. - - -File: org, Node: Texinfo export, Next: iCalendar export, Prev: Org export, Up: Exporting - -12.14 Texinfo export -==================== - -`texinfo' export back-end generates Texinfo code and can compile it into -an Info file. - -* Menu: - -* Texinfo export commands:: How to invoke Texinfo export -* Texinfo specific export settings:: Export settings for Texinfo -* Texinfo file header:: Generating the begining of a Texinfo file -* Texinfo title and copyright page:: Creating title and copyright pages -* Texinfo `Top' node:: Installing a manual in Info Top node -* Headings and sectioning structure:: Building document structure -* Indices:: Creating indices -* Quoting Texinfo code:: Incorporating literal Texinfo code -* Plain lists in Texinfo export:: Specific attributes for plain lists -* Tables in Texinfo export:: Specific attributes for tables -* Images in Texinfo export:: Specific attributes for images -* Special blocks in Texinfo export:: Specific attributes for special blocks -* A Texinfo example:: Illustrating Org to Texinfo process - - -File: org, Node: Texinfo export commands, Next: Texinfo specific export settings, Up: Texinfo export - -12.14.1 Texinfo export commands -------------------------------- - -`C-c C-e i t (`org-texinfo-export-to-texinfo')' - Export as a Texinfo file. For an Org file, `myfile.org', the - resulting file will be `myfile.texi'. The file will be - overwritten without warning. - -`C-c C-e i i (`org-texinfo-export-to-info')' - Export to Texinfo and then process to an Info file(1). - - ---------- Footnotes ---------- - - (1) By setting `org-texinfo-info-process', it is possible to -generate other formats, including DocBook. - - -File: org, Node: Texinfo specific export settings, Next: Texinfo file header, Prev: Texinfo export commands, Up: Texinfo export - -12.14.2 Texinfo specific export settings ----------------------------------------- - -The Texinfo exporter introduces a number of keywords, similar to the -general options settings described in *note Export settings::. - -`SUBTITLE' - The document subtitle. - -`SUBAUTHOR' - The document subauthor. - -`TEXINFO_FILENAME' - The Texinfo filename. - -`TEXINFO_CLASS' - The class of the document (`org-texinfo-default-class'). This - must be a member of `org-texinfo-classes'. - -`TEXINFO_HEADER' - Arbitrary lines inserted at the end of the header. - -`TEXINFO_POST_HEADER' - Arbitrary lines inserted after the end of the header. - -`TEXINFO_DIR_CATEGORY' - The directory category of the document. - -`TEXINFO_DIR_TITLE' - The directory title of the document. - -`TEXINFO_DIR_DESC' - The directory description of the document. - -`TEXINFO_PRINTED_TITLE' - The printed title of the document. - - -File: org, Node: Texinfo file header, Next: Texinfo title and copyright page, Prev: Texinfo specific export settings, Up: Texinfo export - -12.14.3 Texinfo file header ---------------------------- - -Upon creating the header of a Texinfo file, the back-end guesses a name -for the Info file to be compiled. This may not be a sensible choice, -e.g., if you want to produce the final document in a different -directory. Specify an alternate path with `#+TEXINFO_FILENAME' keyword -to override the default destination. - - Along with the output file name, the header contains information -about the language (*note Export settings::) and current encoding -used(1). Insert a `#+TEXINFO_HEADER' keyword for each additional -command needed, e.g., @code{@synindex}. - - If you happen to regularly install the same set of commands, it may -be easier to define your own class in `org-texinfo-classes'. Set -`#+TEXINFO_CLASS' keyword accordingly in your document to activate it. - - ---------- Footnotes ---------- - - (1) See `org-texinfo-coding-system' for more information. - - -File: org, Node: Texinfo title and copyright page, Next: Texinfo `Top' node, Prev: Texinfo file header, Up: Texinfo export - -12.14.4 Texinfo title and copyright page ----------------------------------------- - -The default template includes a title page for hard copy output. The -title and author displayed on this page are extracted from, -respectively, `#+TITLE' and `#+AUTHOR' keywords (*note Export -settings::). It is also possible to print a different, more specific, -title with `#+TEXINFO_PRINTED_TITLE' keyword, and add subtitles with -`#+SUBTITLE' keyword. Both expect raw Texinfo code in their value. - - Likewise, information brought by `#+AUTHOR' may not be enough. You -can include other authors with several `#+SUBAUTHOR' keywords. Values -are also expected to be written in Texinfo code. - - #+AUTHOR: Jane Smith - #+SUBAUTHOR: John Doe - #+TEXINFO_PRINTED_TITLE: This Long Title@inlinefmt{tex,@*} Is Broken in @TeX{} - - Copying material is defined in a dedicated headline with a non-`nil' -`:COPYING:' property. The contents are inserted within a `@copying' -command at the beginning of the document whereas the heading itself -does not appear in the structure of the document. - - Copyright information is printed on the back of the title page. - - * Copying - :PROPERTIES: - :COPYING: t - :END: - - This is a short example of a complete Texinfo file, version 1.0. - - Copyright \copy 2016 Free Software Foundation, Inc. - - -File: org, Node: Texinfo `Top' node, Next: Headings and sectioning structure, Prev: Texinfo title and copyright page, Up: Texinfo export - -12.14.5 Texinfo `Top' node --------------------------- - -You may ultimately want to install your new Info file in your system. -You can write an appropriate entry in the top level directory -specifying its category and title with, respectively, -`#+TEXINFO_DIR_CATEGORY' and `#+TEXINFO_DIR_TITLE'. Optionally, you -can add a short description using `#+TEXINFO_DIR_DESC'. The following -example would write an entry similar to Org's in the `Top' node. - - #+TEXINFO_DIR_CATEGORY: Emacs - #+TEXINFO_DIR_TITLE: Org Mode: (org) - #+TEXINFO_DIR_DESC: Outline-based notes management and organizer - - -File: org, Node: Headings and sectioning structure, Next: Indices, Prev: Texinfo `Top' node, Up: Texinfo export - -12.14.6 Headings and sectioning structure ------------------------------------------ - -`texinfo' uses a pre-defined scheme, or class, to convert headlines into -Texinfo structuring commands. For example, a top level headline -appears as `@chapter' if it should be numbered or as `@unnumbered' -otherwise. If you need to use a different set of commands, e.g., to -start with `@part' instead of `@chapter', install a new class in -`org-texinfo-classes', then activate it with `#+TEXINFO_CLASS' keyword. -Export process defaults to `org-texinfo-default-class' when there is no -such keyword in the document. - - If a headline's level has no associated structuring command, or is -below a certain threshold (*note Export settings::), that headline -becomes a list in Texinfo output. - - As an exception, a headline with a non-`nil' `:APPENDIX:' property -becomes an appendix, independently on its level and the class used. - - Each regular sectioning structure creates a menu entry, named after -the heading. You can provide a different, e.g., shorter, title in -`:ALT_TITLE:' property (*note Table of contents::). Optionally, you can -specify a description for the item in `:DESCRIPTION:' property. E.g., - - * Controlling Screen Display - :PROPERTIES: - :ALT_TITLE: Display - :DESCRIPTION: Controlling Screen Display - :END: - - -File: org, Node: Indices, Next: Quoting Texinfo code, Prev: Headings and sectioning structure, Up: Texinfo export - -12.14.7 Indices ---------------- - -Index entries are created using dedicated keywords. `texinfo' back-end -provides one for each predefined type: `#+CINDEX', `#+FINDEX', -`#+KINDEX', `#+PINDEX', `#+TINDEX' and `#+VINDEX'. For custom indices, -you can write raw Texinfo code (*note Quoting Texinfo code::). - - #+CINDEX: Defining indexing entries - - To generate an index, you need to set the `:INDEX:' property of a -headline to an appropriate abbreviation (e.g., `cp' or `vr'). The -headline is then exported as an unnumbered chapter or section command -and the index is inserted after its contents. - - * Concept Index - :PROPERTIES: - :INDEX: cp - :END: - - -File: org, Node: Quoting Texinfo code, Next: Plain lists in Texinfo export, Prev: Indices, Up: Texinfo export - -12.14.8 Quoting Texinfo code ----------------------------- - -It is possible to insert raw Texinfo code using any of the following -constructs - - Richard @@texinfo:@sc{@@Stallman@@texinfo:}@@ commence' GNU. - - #+TEXINFO: @need800 - This paragraph is preceded by... - - #+BEGIN_EXPORT texinfo - @auindex Johnson, Mark - @auindex Lakoff, George - #+END_EXPORT - - -File: org, Node: Plain lists in Texinfo export, Next: Tables in Texinfo export, Prev: Quoting Texinfo code, Up: Texinfo export - -12.14.9 Plain lists in Texinfo export -------------------------------------- - -In Texinfo output, description lists appear as two-column tables, using -the default command `@table'. You can use `@ftable' or `@vtable'(1) -instead with `:table-type' attribute. - - In any case, these constructs require a highlighting command for -entries in the list. You can provide one with `:indic' attribute. If -you do not, it defaults to the value stored in -`org-texinfo-def-table-markup', which see. - - #+ATTR_TEXINFO: :indic @asis - - foo :: This is the text for /foo/, with no highlighting. - - ---------- Footnotes ---------- - - (1) For more information, *note (texinfo)Two-column Tables::. - - -File: org, Node: Tables in Texinfo export, Next: Images in Texinfo export, Prev: Plain lists in Texinfo export, Up: Texinfo export - -12.14.10 Tables in Texinfo export ---------------------------------- - -When exporting a table, column widths are deduced from the longest cell -in each column. You can also define them explicitly as fractions of -the line length, using `:columns' attribute. - - #+ATTR_TEXINFO: :columns .5 .5 - | a cell | another cell | - - -File: org, Node: Images in Texinfo export, Next: Special blocks in Texinfo export, Prev: Tables in Texinfo export, Up: Texinfo export - -12.14.11 Images in Texinfo export ---------------------------------- - -Images are links to files with a supported image extension and no -description. Image scaling is set with `:width' and `:height' -attributes. You can also use `:alt' to specify alternate text, as -Texinfo code. - - #+ATTR_TEXINFO: :width 1in :alt Alternate @i{text} - [[ridt.pdf]] - - -File: org, Node: Special blocks in Texinfo export, Next: A Texinfo example, Prev: Images in Texinfo export, Up: Texinfo export - -12.14.12 Special blocks ------------------------ - -In Texinfo output, special blocks become commands of the same name. -Value of `:options' attribute is added right after the beginning of the -command. For example: - - #+attr_texinfo: :options org-org-export-to-org ... - #+begin_defun - A somewhat obsessive function. - #+end_defun - -becomes - - @defun org-org-export-to-org ... - A somewhat obsessive function. - @end defun - - -File: org, Node: A Texinfo example, Prev: Special blocks in Texinfo export, Up: Texinfo export - -12.14.13 A Texinfo example --------------------------- - -Here is a thorough example. *note (texinfo)GNU Sample Texts:: for an -equivalent Texinfo code. - - #+MACRO: version 2.0 - #+MACRO: updated last updated 4 March 2014 - - #+OPTIONS: ':t toc:t author:t email:t - #+TITLE: GNU Sample {{{version}}} - #+AUTHOR: A.U. Thor - #+EMAIL: bug-sample@gnu.org - #+LANGUAGE: en - - #+TEXINFO_FILENAME: sample.info - #+TEXINFO_HEADER: @syncodeindex pg cp - - #+TEXINFO_DIR_CATEGORY: Texinfo documentation system - #+TEXINFO_DIR_TITLE: sample: (sample) - #+TEXINFO_DIR_DESC: Invoking sample - - #+TEXINFO_PRINTED_TITLE: GNU Sample - #+SUBTITLE: for version {{{version}}}, {{{updated}}} - - * Copying - :PROPERTIES: - :COPYING: t - :END: - - This manual is for GNU Sample (version {{{version}}}, - {{{updated}}}), which is an example in the Texinfo documentation. - - Copyright @@texinfo:@copyright{}@@ 2013 Free Software Foundation, - Inc. - - #+BEGIN_QUOTE - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with no Invariant Sections, with no Front-Cover Texts, - and with no Back-Cover Texts. A copy of the license is included in - the section entitled "GNU Free Documentation License". - #+END_QUOTE - - * Invoking sample - - #+PINDEX: sample - #+CINDEX: invoking @command{sample} - - This is a sample manual. There is no sample program to invoke, but - if there were, you could see its basic usage and command line - options here. - - * GNU Free Documentation License - :PROPERTIES: - :APPENDIX: t - :END: - - #+TEXINFO: @include fdl.texi - - * Index - :PROPERTIES: - :INDEX: cp - :END: - - -File: org, Node: iCalendar export, Next: Other built-in back-ends, Prev: Texinfo export, Up: Exporting - -12.15 iCalendar export -====================== - -Some people use Org mode for keeping track of projects, but still -prefer a standard calendar application for anniversaries and -appointments. In this case it can be useful to show deadlines and -other time-stamped items in Org files in the calendar application. Org -mode can export calendar information in the standard iCalendar format. -If you also want to have TODO entries included in the export, configure -the variable `org-icalendar-include-todo'. Plain timestamps are -exported as VEVENT, and TODO items as VTODO. It will also create -events from deadlines that are in non-TODO items. Deadlines and -scheduling dates in TODO items will be used to set the start and due -dates for the TODO entry(1). As categories, it will use the tags -locally defined in the heading, and the file/tree category(2). See the -variable `org-icalendar-alarm-time' for a way to assign alarms to -entries with a time. - - The iCalendar standard requires each entry to have a globally unique -identifier (UID). Org creates these identifiers during export. If you -set the variable `org-icalendar-store-UID', the UID will be stored in -the `:ID:' property of the entry and re-used next time you report this -entry. Since a single entry can give rise to multiple iCalendar -entries (as a timestamp, a deadline, a scheduled item, and as a TODO -item), Org adds prefixes to the UID, depending on what triggered the -inclusion of the entry. In this way the UID remains unique, but a -synchronization program can still figure out from which entry all the -different instances originate. - -`C-c C-e c f (`org-icalendar-export-to-ics')' - Create iCalendar entries for the current buffer and store them in - the same directory, using a file extension `.ics'. - -`C-c C-e c a (`org-icalendar-export-agenda-files')' - Like `C-c C-e c f', but do this for all files in - `org-agenda-files'. For each of these files, a separate iCalendar - file will be written. - -`C-c C-e c c (`org-icalendar-combine-agenda-files')' - Create a single large iCalendar file from all files in - `org-agenda-files' and write it to the file given by - `org-icalendar-combined-agenda-file'. - - The export will honor SUMMARY, DESCRIPTION and LOCATION(3) -properties if the selected entries have them. If not, the summary will -be derived from the headline, and the description from the body -(limited to `org-icalendar-include-body' characters). - - How this calendar is best read and updated, depends on the -application you are using. The FAQ covers this issue. - - ---------- Footnotes ---------- - - (1) See the variables `org-icalendar-use-deadline' and -`org-icalendar-use-scheduled'. - - (2) To add inherited tags or the TODO state, configure the variable -`org-icalendar-categories'. - - (3) The LOCATION property can be inherited from higher in the -hierarchy if you configure `org-use-property-inheritance' accordingly. - - -File: org, Node: Other built-in back-ends, Next: Advanced configuration, Prev: iCalendar export, Up: Exporting - -12.16 Other built-in back-ends -============================== - -On top of the aforementioned back-ends, Org comes with other built-in -ones: - - * `ox-man.el': export to a man page. - - To activate these export back-end, customize `org-export-backends' or -load them directly with e.g., `(require 'ox-man)'. This will add new -keys in the export dispatcher (*note The export dispatcher::). - - See the comment section of these files for more information on how -to use them. - - -File: org, Node: Advanced configuration, Next: Export in foreign buffers, Prev: Other built-in back-ends, Up: Exporting - -12.17 Advanced configuration -============================ - -Hooks ------ - -Two hooks are run during the first steps of the export process. The -first one, `org-export-before-processing-hook' is called before -expanding macros, Babel code and include keywords in the buffer. The -second one, `org-export-before-parsing-hook', as its name suggests, -happens just before parsing the buffer. Their main use is for heavy -duties, that is duties involving structural modifications of the -document. For example, one may want to remove every headline in the -buffer during export. The following code can achieve this: - - (defun my-headline-removal (backend) - "Remove all headlines in the current buffer. - BACKEND is the export back-end being used, as a symbol." - (org-map-entries - (lambda () (delete-region (point) (progn (forward-line) (point)))))) - - (add-hook 'org-export-before-parsing-hook 'my-headline-removal) - - Note that functions used in these hooks require a mandatory argument, -a symbol representing the back-end used. - -Filters -------- - -Filters are lists of functions applied on a specific part of the output -from a given back-end. More explicitly, each time a back-end -transforms an Org object or element into another language, all -functions within a given filter type are called in turn on the string -produced. The string returned by the last function will be the one -used in the final output. - - There are filter sets for each type of element or object, for plain -text, for the parse tree, for the export options and for the final -output. They are all named after the same scheme: -`org-export-filter-TYPE-functions', where `TYPE' is the type targeted -by the filter. Valid types are: - -body bold babel-call -center-block clock code -diary-sexp drawer dynamic-block -entity example-block export-block -export-snippet final-output fixed-width -footnote-definition footnote-reference headline -horizontal-rule inline-babel-call inline-src-block -inlinetask italic item -keyword latex-environment latex-fragment -line-break link node-property -options paragraph parse-tree -plain-list plain-text planning -property-drawer quote-block radio-target -section special-block src-block -statistics-cookie strike-through subscript -superscript table table-cell -table-row target timestamp -underline verbatim verse-block - - For example, the following snippet allows me to use non-breaking -spaces in the Org buffer and get them translated into LaTeX without -using the `\nbsp' macro (where `_' stands for the non-breaking space): - - (defun my-latex-filter-nobreaks (text backend info) - "Ensure \"_\" are properly handled in LaTeX export." - (when (org-export-derived-backend-p backend 'latex) - (replace-regexp-in-string "_" "~" text))) - - (add-to-list 'org-export-filter-plain-text-functions - 'my-latex-filter-nobreaks) - - Three arguments must be provided to a filter: the code being -changed, the back-end used, and some information about the export -process. You can safely ignore the third argument for most purposes. -Note the use of `org-export-derived-backend-p', which ensures that the -filter will only be applied when using `latex' back-end or any other -back-end derived from it (e.g., `beamer'). - -Defining filters for individual files -------------------------------------- - -You can customize the export for just a specific file by binding export -filter variables using `#+BIND'. Here is an example where we introduce -two filters, one to remove brackets from time stamps, and one to -entirely remove any strike-through text. The functions doing the -filtering are defined in an src block that allows the filter function -definitions to exist in the file itself and ensures that the functions -will be there when needed. - - #+BIND: org-export-filter-timestamp-functions (tmp-f-timestamp) - #+BIND: org-export-filter-strike-through-functions (tmp-f-strike-through) - #+begin_src emacs-lisp :exports results :results none - (defun tmp-f-timestamp (s backend info) - (replace-regexp-in-string "&[lg]t;\\|[][]" "" s)) - (defun tmp-f-strike-through (s backend info) "") - #+end_src - -Extending an existing back-end ------------------------------- - -This is obviously the most powerful customization, since the changes -happen at the parser level. Indeed, some export back-ends are built as -extensions of other ones (e.g., Markdown back-end an extension of HTML -back-end). - - Extending a back-end means that if an element type is not transcoded -by the new back-end, it will be handled by the original one. Hence you -can extend specific parts of a back-end without too much work. - - As an example, imagine we want the `ascii' back-end to display the -language used in a source block, when it is available, but only when -some attribute is non-`nil', like the following: - - #+ATTR_ASCII: :language t - - Because that back-end is lacking in that area, we are going to -create a new back-end, `my-ascii' that will do the job. - - (defun my-ascii-src-block (src-block contents info) - "Transcode a SRC-BLOCK element from Org to ASCII. - CONTENTS is nil. INFO is a plist used as a communication - channel." - (if (not (org-export-read-attribute :attr_ascii src-block :language)) - (org-export-with-backend 'ascii src-block contents info) - (concat - (format ",--[ %s ]--\n%s`----" - (org-element-property :language src-block) - (replace-regexp-in-string - "^" "| " - (org-element-normalize-string - (org-export-format-code-default src-block info))))))) - - (org-export-define-derived-backend 'my-ascii 'ascii - :translate-alist '((src-block . my-ascii-src-block))) - - The `my-ascii-src-block' function looks at the attribute above the -element. If it isn't true, it gives hand to the `ascii' back-end. -Otherwise, it creates a box around the code, leaving room for the -language. A new back-end is then created. It only changes its -behavior when translating `src-block' type element. Now, all it takes -to use the new back-end is calling the following from an Org buffer: - - (org-export-to-buffer 'my-ascii "*Org MY-ASCII Export*") - - It is obviously possible to write an interactive function for this, -install it in the export dispatcher menu, and so on. - - -File: org, Node: Export in foreign buffers, Prev: Advanced configuration, Up: Exporting - -12.18 Export in foreign buffers -=============================== - -Most built-in back-ends come with a command to convert the selected -region into a selected format and replace this region by the exported -output. Here is a list of such conversion commands: - -`org-html-convert-region-to-html' - Convert the selected region into HTML. - -`org-latex-convert-region-to-latex' - Convert the selected region into LaTeX. - -`org-texinfo-convert-region-to-texinfo' - Convert the selected region into `Texinfo'. - -`org-md-convert-region-to-md' - Convert the selected region into `MarkDown'. - - This is particularly useful for converting tables and lists in -foreign buffers. E.g., in an HTML buffer, you can turn on -`orgstruct-mode', then use Org commands for editing a list, and finally -select and convert the list with `M-x org-html-convert-region-to-html -RET'. - - -File: org, Node: Publishing, Next: Working with source code, Prev: Exporting, Up: Top - -13 Publishing -************* - -Org includes a publishing management system that allows you to configure -automatic HTML conversion of _projects_ composed of interlinked org -files. You can also configure Org to automatically upload your -exported HTML pages and related attachments, such as images and source -code files, to a web server. - - You can also use Org to convert files into PDF, or even combine HTML -and PDF conversion so that files are available in both formats on the -server. - - Publishing has been contributed to Org by David O'Toole. - -* Menu: - -* Configuration:: Defining projects -* Uploading files:: How to get files up on the server -* Sample configuration:: Example projects -* Triggering publication:: Publication commands - - -File: org, Node: Configuration, Next: Uploading files, Up: Publishing - -13.1 Configuration -================== - -Publishing needs significant configuration to specify files, destination -and many other properties of a project. - -* Menu: - -* Project alist:: The central configuration variable -* Sources and destinations:: From here to there -* Selecting files:: What files are part of the project? -* Publishing action:: Setting the function doing the publishing -* Publishing options:: Tweaking HTML/LaTeX export -* Publishing links:: Which links keep working after publishing? -* Sitemap:: Generating a list of all pages -* Generating an index:: An index that reaches across pages - - -File: org, Node: Project alist, Next: Sources and destinations, Up: Configuration - -13.1.1 The variable `org-publish-project-alist' ------------------------------------------------ - -Publishing is configured almost entirely through setting the value of -one variable, called `org-publish-project-alist'. Each element of the -list configures one project, and may be in one of the two following -forms: - - ("project-name" :property value :property value ...) - i.e., a well-formed property list with alternating keys and values - or - ("project-name" :components ("project-name" "project-name" ...)) - - In both cases, projects are configured by specifying property -values. A project defines the set of files that will be published, as -well as the publishing configuration to use when publishing those -files. When a project takes the second form listed above, the -individual members of the `:components' property are taken to be -sub-projects, which group together files requiring different publishing -options. When you publish such a "meta-project", all the components -will also be published, in the sequence given. - - -File: org, Node: Sources and destinations, Next: Selecting files, Prev: Project alist, Up: Configuration - -13.1.2 Sources and destinations for files ------------------------------------------ - -Most properties are optional, but some should always be set. In -particular, Org needs to know where to look for source files, and where -to put published files. - -`:base-directory' Directory containing publishing source files -`:publishing-directory'Directory where output files will be published. - You can directly publish to a web server using a - file name syntax appropriate for the Emacs - `tramp' package. Or you can publish to a local - directory and use external tools to upload your - website (*note Uploading files::). -`:preparation-function'Function or list of functions to be called before - starting the publishing process, for example, to - run `make' for updating files to be published. - Each preparation function is called with a single - argument, the project property list. -`:completion-function' Function or list of functions called after - finishing the publishing process, for example, to - change permissions of the resulting files. Each - completion function is called with a single - argument, the project property list. - - -File: org, Node: Selecting files, Next: Publishing action, Prev: Sources and destinations, Up: Configuration - -13.1.3 Selecting files ----------------------- - -By default, all files with extension `.org' in the base directory are -considered part of the project. This can be modified by setting the -properties -`:base-extension' Extension (without the dot!) of source files. This - actually is a regular expression. Set this to the - symbol `any' if you want to get all files in - `:base-directory', even without extension. -`:exclude' Regular expression to match file names that should - not be published, even though they have been selected - on the basis of their extension. -`:include' List of files to be included regardless of - `:base-extension' and `:exclude'. -`:recursive' non-`nil' means, check base-directory recursively for - files to publish. - - -File: org, Node: Publishing action, Next: Publishing options, Prev: Selecting files, Up: Configuration - -13.1.4 Publishing action ------------------------- - -Publishing means that a file is copied to the destination directory and -possibly transformed in the process. The default transformation is to -export Org files as HTML files, and this is done by the function -`org-html-publish-to-html', which calls the HTML exporter (*note HTML -export::). But you also can publish your content as PDF files using -`org-latex-publish-to-pdf' or as `ascii', `Texinfo', etc., using the -corresponding functions. - - If you want to publish the Org file as an `.org' file but with the -archived, commented and tag-excluded trees removed, use the function -`org-org-publish-to-org'. This will produce `file.org' and put it in -the publishing directory. If you want a htmlized version of this file, -set the parameter `:htmlized-source' to `t', it will produce -`file.org.html' in the publishing directory(1). - - Other files like images only need to be copied to the publishing -destination. For this you can use `org-publish-attachment'. For -non-org files, you always need to specify the publishing function: - -`:publishing-function' Function executing the publication of a file. - This may also be a list of functions, which will - all be called in turn. -`:htmlized-source' non-`nil' means, publish htmlized source. - - The function must accept three arguments: a property list containing -at least a `:publishing-directory' property, the name of the file to be -published and the path to the publishing directory of the output file. -It should take the specified file, make the necessary transformation -(if any) and place the result into the destination folder. - - ---------- Footnotes ---------- - - (1) If the publishing directory is the same than the source -directory, `file.org' will be exported as `file.org.org', so probably -don't want to do this. - - -File: org, Node: Publishing options, Next: Publishing links, Prev: Publishing action, Up: Configuration - -13.1.5 Options for the exporters --------------------------------- - -The property list can be used to set export options during the -publishing process. In most cases, these properties correspond to user -variables in Org. While some properties are available for all export -back-ends, most of them are back-end specific. The following sections -list properties along with the variable they belong to. See the -documentation string of these options for details. - - When a property is given a value in `org-publish-project-alist', its -setting overrides the value of the corresponding user variable (if any) -during publishing. Options set within a file (*note Export settings::), -however, override everything. - -Generic properties -.................. - -`:archived-trees' `org-export-with-archived-trees' -`:exclude-tags' `org-export-exclude-tags' -`:headline-levels' `org-export-headline-levels' -`:language' `org-export-default-language' -`:preserve-breaks' `org-export-preserve-breaks' -`:section-numbers' `org-export-with-section-numbers' -`:select-tags' `org-export-select-tags' -`:with-author' `org-export-with-author' -`:with-broken-links' `org-export-with-broken-links' -`:with-clocks' `org-export-with-clocks' -`:with-creator' `org-export-with-creator' -`:with-date' `org-export-with-date' -`:with-drawers' `org-export-with-drawers' -`:with-email' `org-export-with-email' -`:with-emphasize' `org-export-with-emphasize' -`:with-fixed-width' `org-export-with-fixed-width' -`:with-footnotes' `org-export-with-footnotes' -`:with-latex' `org-export-with-latex' -`:with-planning' `org-export-with-planning' -`:with-priority' `org-export-with-priority' -`:with-properties' `org-export-with-properties' -`:with-special-strings' `org-export-with-special-strings' -`:with-sub-superscript' `org-export-with-sub-superscripts' -`:with-tables' `org-export-with-tables' -`:with-tags' `org-export-with-tags' -`:with-tasks' `org-export-with-tasks' -`:with-timestamps' `org-export-with-timestamps' -`:with-title' `org-export-with-title' -`:with-toc' `org-export-with-toc' -`:with-todo-keywords' `org-export-with-todo-keywords' - -ASCII specific properties -......................... - -`:ascii-bullets' `org-ascii-bullets' -`:ascii-caption-above' `org-ascii-caption-above' -`:ascii-charset' `org-ascii-charset' -`:ascii-global-margin' `org-ascii-global-margin' -`:ascii-format-drawer-function' `org-ascii-format-drawer-function' -`:ascii-format-inlinetask-function' `org-ascii-format-inlinetask-function' -`:ascii-headline-spacing' `org-ascii-headline-spacing' -`:ascii-indented-line-width' `org-ascii-indented-line-width' -`:ascii-inlinetask-width' `org-ascii-inlinetask-width' -`:ascii-inner-margin' `org-ascii-inner-margin' -`:ascii-links-to-notes' `org-ascii-links-to-notes' -`:ascii-list-margin' `org-ascii-list-margin' -`:ascii-paragraph-spacing' `org-ascii-paragraph-spacing' -`:ascii-quote-margin' `org-ascii-quote-margin' -`:ascii-table-keep-all-vertical-lines' `org-ascii-table-keep-all-vertical-lines' -`:ascii-table-use-ascii-art' `org-ascii-table-use-ascii-art' -`:ascii-table-widen-columns' `org-ascii-table-widen-columns' -`:ascii-text-width' `org-ascii-text-width' -`:ascii-underline' `org-ascii-underline' -`:ascii-verbatim-format' `org-ascii-verbatim-format' - -Beamer specific properties -.......................... - -`:beamer-theme' `org-beamer-theme' -`:beamer-column-view-format' `org-beamer-column-view-format' -`:beamer-environments-extra' `org-beamer-environments-extra' -`:beamer-frame-default-options' `org-beamer-frame-default-options' -`:beamer-outline-frame-options' `org-beamer-outline-frame-options' -`:beamer-outline-frame-title' `org-beamer-outline-frame-title' -`:beamer-subtitle-format' `org-beamer-subtitle-format' - -HTML specific properties -........................ - -`:html-allow-name-attribute-in-anchors' `org-html-allow-name-attribute-in-anchors' -`:html-checkbox-type' `org-html-checkbox-type' -`:html-container' `org-html-container-element' -`:html-divs' `org-html-divs' -`:html-doctype' `org-html-doctype' -`:html-extension' `org-html-extension' -`:html-footnote-format' `org-html-footnote-format' -`:html-footnote-separator' `org-html-footnote-separator' -`:html-footnotes-section' `org-html-footnotes-section' -`:html-format-drawer-function' `org-html-format-drawer-function' -`:html-format-headline-function' `org-html-format-headline-function' -`:html-format-inlinetask-function' `org-html-format-inlinetask-function' -`:html-head-extra' `org-html-head-extra' -`:html-head-include-default-style' `org-html-head-include-default-style' -`:html-head-include-scripts' `org-html-head-include-scripts' -`:html-head' `org-html-head' -`:html-home/up-format' `org-html-home/up-format' -`:html-html5-fancy' `org-html-html5-fancy' -`:html-indent' `org-html-indent' -`:html-infojs-options' `org-html-infojs-options' -`:html-infojs-template' `org-html-infojs-template' -`:html-inline-image-rules' `org-html-inline-image-rules' -`:html-inline-images' `org-html-inline-images' -`:html-link-home' `org-html-link-home' -`:html-link-org-files-as-html' `org-html-link-org-files-as-html' -`:html-link-up' `org-html-link-up' -`:html-link-use-abs-url' `org-html-link-use-abs-url' -`:html-mathjax-options' `org-html-mathjax-options' -`:html-mathjax-template' `org-html-mathjax-template' -`:html-metadata-timestamp-format' `org-html-metadata-timestamp-format' -`:html-postamble-format' `org-html-postamble-format' -`:html-postamble' `org-html-postamble' -`:html-preamble-format' `org-html-preamble-format' -`:html-preamble' `org-html-preamble' -`:html-table-align-individual-fields' `org-html-table-align-individual-fields' -`:html-table-attributes' `org-html-table-default-attributes' -`:html-table-caption-above' `org-html-table-caption-above' -`:html-table-data-tags' `org-html-table-data-tags' -`:html-table-header-tags' `org-html-table-header-tags' -`:html-table-row-tags' `org-html-table-row-tags' -`:html-table-use-header-tags-for-first-column' `org-html-table-use-header-tags-for-first-column' -`:html-tag-class-prefix' `org-html-tag-class-prefix' -`:html-text-markup-alist' `org-html-text-markup-alist' -`:html-todo-kwd-class-prefix' `org-html-todo-kwd-class-prefix' -`:html-toplevel-hlevel' `org-html-toplevel-hlevel' -`:html-use-infojs' `org-html-use-infojs' -`:html-validation-link' `org-html-validation-link' -`:html-viewport' `org-html-viewport' -`:html-xml-declaration' `org-html-xml-declaration' - -LaTeX specific properties -......................... - -`:latex-active-timestamp-format' `org-latex-active-timestamp-format' -`:latex-caption-above' `org-latex-caption-above' -`:latex-classes' `org-latex-classes' -`:latex-class' `org-latex-default-class' -`:latex-compiler' `org-latex-compiler' -`:latex-default-figure-position' `org-latex-default-figure-position' -`:latex-default-table-environment' `org-latex-default-table-environment' -`:latex-default-table-mode' `org-latex-default-table-mode' -`:latex-diary-timestamp-format' `org-latex-diary-timestamp-format' -`:latex-footnote-defined-format' `org-latex-footnote-defined-format' -`:latex-footnote-separator' `org-latex-footnote-separator' -`:latex-format-drawer-function' `org-latex-format-drawer-function' -`:latex-format-headline-function' `org-latex-format-headline-function' -`:latex-format-inlinetask-function' `org-latex-format-inlinetask-function' -`:latex-hyperref-template' `org-latex-hyperref-template' -`:latex-image-default-height' `org-latex-image-default-height' -`:latex-image-default-option' `org-latex-image-default-option' -`:latex-image-default-width' `org-latex-image-default-width' -`:latex-images-centered' `org-latex-images-centered' -`:latex-inactive-timestamp-format' `org-latex-inactive-timestamp-format' -`:latex-inline-image-rules' `org-latex-inline-image-rules' -`:latex-link-with-unknown-path-format' `org-latex-link-with-unknown-path-format' -`:latex-listings-langs' `org-latex-listings-langs' -`:latex-listings-options' `org-latex-listings-options' -`:latex-listings' `org-latex-listings' -`:latex-minted-langs' `org-latex-minted-langs' -`:latex-minted-options' `org-latex-minted-options' -`:latex-prefer-user-labels' `org-latex-prefer-user-labels' -`:latex-subtitle-format' `org-latex-subtitle-format' -`:latex-subtitle-separate' `org-latex-subtitle-separate' -`:latex-table-scientific-notation' `org-latex-table-scientific-notation' -`:latex-tables-booktabs' `org-latex-tables-booktabs' -`:latex-tables-centered' `org-latex-tables-centered' -`:latex-text-markup-alist' `org-latex-text-markup-alist' -`:latex-title-command' `org-latex-title-command' -`:latex-toc-command' `org-latex-toc-command' - -Markdown specific properties -............................ - -`:md-footnote-format' `org-md-footnote-format' -`:md-footnotes-section' `org-md-footnotes-section' -`:md-headline-style' `org-md-headline-style' - -ODT specific properties -....................... - -`:odt-content-template-file' `org-odt-content-template-file' -`:odt-display-outline-level' `org-odt-display-outline-level' -`:odt-fontify-srcblocks' `org-odt-fontify-srcblocks' -`:odt-format-drawer-function' `org-odt-format-drawer-function' -`:odt-format-headline-function' `org-odt-format-headline-function' -`:odt-format-inlinetask-function' `org-odt-format-inlinetask-function' -`:odt-inline-formula-rules' `org-odt-inline-formula-rules' -`:odt-inline-image-rules' `org-odt-inline-image-rules' -`:odt-pixels-per-inch' `org-odt-pixels-per-inch' -`:odt-styles-file' `org-odt-styles-file' -`:odt-table-styles' `org-odt-table-styles' -`:odt-use-date-fields' `org-odt-use-date-fields' - -Texinfo specific properties -........................... - -`:texinfo-active-timestamp-format' `org-texinfo-active-timestamp-format' -`:texinfo-classes' `org-texinfo-classes' -`:texinfo-class' `org-texinfo-default-class' -`:texinfo-def-table-markup' `org-texinfo-def-table-markup' -`:texinfo-diary-timestamp-format' `org-texinfo-diary-timestamp-format' -`:texinfo-filename' `org-texinfo-filename' -`:texinfo-format-drawer-function' `org-texinfo-format-drawer-function' -`:texinfo-format-headline-function' `org-texinfo-format-headline-function' -`:texinfo-format-inlinetask-function' `org-texinfo-format-inlinetask-function' -`:texinfo-inactive-timestamp-format' `org-texinfo-inactive-timestamp-format' -`:texinfo-link-with-unknown-path-format' `org-texinfo-link-with-unknown-path-format' -`:texinfo-node-description-column' `org-texinfo-node-description-column' -`:texinfo-table-scientific-notation' `org-texinfo-table-scientific-notation' -`:texinfo-tables-verbatim' `org-texinfo-tables-verbatim' -`:texinfo-text-markup-alist' `org-texinfo-text-markup-alist' - - -File: org, Node: Publishing links, Next: Sitemap, Prev: Publishing options, Up: Configuration - -13.1.6 Links between published files ------------------------------------- - -To create a link from one Org file to another, you would use something -like `[[file:foo.org][The foo]]' or simply `file:foo.org' (*note -External links::). When published, this link becomes a link to -`foo.html'. You can thus interlink the pages of your "org web" project -and the links will work as expected when you publish them to HTML. If -you also publish the Org source file and want to link to it, use an -`http:' link instead of a `file:' link, because `file:' links are -converted to link to the corresponding `html' file. - - You may also link to related files, such as images. Provided you -are careful with relative file names, and provided you have also -configured Org to upload the related files, these links will work too. -See *note Complex example::, for an example of this usage. - - Eventually, links between published documents can contain some -search options (*note Search options::), which will be resolved to the -appropriate location in the linked file. For example, once published -to HTML, the following links all point to a dedicated anchor in -`foo.html'. - - [[file:foo.org::*heading]] - [[file:foo.org::#custom-id]] - [[file:foo.org::target]] - - -File: org, Node: Sitemap, Next: Generating an index, Prev: Publishing links, Up: Configuration - -13.1.7 Generating a sitemap ---------------------------- - -The following properties may be used to control publishing of a map of -files for a given project. - -`:auto-sitemap' When non-`nil', publish a sitemap during - `org-publish-current-project' or - `org-publish-all'. -`:sitemap-filename' Filename for output of sitemap. Defaults to - `sitemap.org' (which becomes `sitemap.html'). -`:sitemap-title' Title of sitemap page. Defaults to name of - file. -`:sitemap-format-entry' With this option one can tell how a site-map - entry is formatted in the site-map. It is a - function called with three arguments: the file - or directory name relative to base directory - of the project, the site-map style and the - current project. It is expected to return a - string. Default value turns file names into - links and use document titles as descriptions. - For specific formatting needs, one can use - `org-publish-find-date', - `org-publish-find-title' and - `org-publish-find-property', to retrieve - additional information about published - documents. -`:sitemap-function' Plug-in function to use for generation of the - sitemap. It is called with two arguments: the - title of the site-map and a representation of - the files and directories involved in the - project as a radio list (*note Radio lists::). - The latter can further be transformed using - `org-list-to-generic', `org-list-to-subtree' - and alike. Default value generates a plain - list of links to all files in the project. -`:sitemap-sort-folders' Where folders should appear in the sitemap. - Set this to `first' (default) or `last' to - display folders first or last, respectively. - When set to `ignore', folders are ignored - altogether. Any other value will mix files - and folders. This variable has no effect when - site-map style is `tree'. -`:sitemap-sort-files' How the files are sorted in the site map. Set - this to `alphabetically' (default), - `chronologically' or `anti-chronologically'. - `chronologically' sorts the files with older - date first while `anti-chronologically' sorts - the files with newer date first. - `alphabetically' sorts the files - alphabetically. The date of a file is - retrieved with `org-publish-find-date'. -`:sitemap-ignore-case' Should sorting be case-sensitive? Default - `nil'. -`:sitemap-date-format' Format string for the `format-time-string' - function that tells how a sitemap entry's date - is to be formatted. This property bypasses - `org-publish-sitemap-date-format' which - defaults to `%Y-%m-%d'. - - -File: org, Node: Generating an index, Prev: Sitemap, Up: Configuration - -13.1.8 Generating an index --------------------------- - -Org mode can generate an index across the files of a publishing project. - -`:makeindex' When non-`nil', generate in index in the file - `theindex.org' and publish it as `theindex.html'. - - The file will be created when first publishing a project with the -`:makeindex' set. The file only contains a statement `#+INCLUDE: -"theindex.inc"'. You can then build around this include statement by -adding a title, style information, etc. - - Index entries are specified with `#+INDEX' keyword. An entry that -contains an exclamation mark will create a sub item. - - * Curriculum Vitae - #+INDEX: CV - #+INDEX: Application!CV - - -File: org, Node: Uploading files, Next: Sample configuration, Prev: Configuration, Up: Publishing - -13.2 Uploading files -==================== - -For those people already utilizing third party sync tools such as -`rsync' or `unison', it might be preferable not to use the built in -remote publishing facilities of Org mode which rely heavily on Tramp. -Tramp, while very useful and powerful, tends not to be so efficient for -multiple file transfer and has been known to cause problems under heavy -usage. - - Specialized synchronization utilities offer several advantages. In -addition to timestamp comparison, they also do content and -permissions/attribute checks. For this reason you might prefer to -publish your web to a local directory (possibly even in place with your -Org files) and then use `unison' or `rsync' to do the synchronization -with the remote host. - - Since Unison (for example) can be configured as to which files to -transfer to a certain remote destination, it can greatly simplify the -project publishing definition. Simply keep all files in the correct -location, process your Org files with `org-publish' and let the -synchronization tool do the rest. You do not need, in this scenario, -to include attachments such as `jpg', `css' or `gif' files in the -project definition since the 3rd party tool syncs them. - - Publishing to a local directory is also much faster than to a remote -one, so that you can afford more easily to republish entire projects. -If you set `org-publish-use-timestamps-flag' to `nil', you gain the main -benefit of re-including any changed external files such as source -example files you might include with `#+INCLUDE:'. The timestamp -mechanism in Org is not smart enough to detect if included files have -been modified. - - -File: org, Node: Sample configuration, Next: Triggering publication, Prev: Uploading files, Up: Publishing - -13.3 Sample configuration -========================= - -Below we provide two example configurations. The first one is a simple -project publishing only a set of Org files. The second example is more -complex, with a multi-component project. - -* Menu: - -* Simple example:: One-component publishing -* Complex example:: A multi-component publishing example - - -File: org, Node: Simple example, Next: Complex example, Up: Sample configuration - -13.3.1 Example: simple publishing configuration ------------------------------------------------ - -This example publishes a set of Org files to the `public_html' -directory on the local machine. - - (setq org-publish-project-alist - '(("org" - :base-directory "~/org/" - :publishing-directory "~/public_html" - :section-numbers nil - :with-toc nil - :html-head ""))) - - -File: org, Node: Complex example, Prev: Simple example, Up: Sample configuration - -13.3.2 Example: complex publishing configuration ------------------------------------------------- - -This more complicated example publishes an entire website, including -Org files converted to HTML, image files, Emacs Lisp source code, and -style sheets. The publishing directory is remote and private files are -excluded. - - To ensure that links are preserved, care should be taken to replicate -your directory structure on the web server, and to use relative file -paths. For example, if your Org files are kept in `~/org' and your -publishable images in `~/images', you would link to an image with - file:../images/myimage.png - On the web server, the relative path to the image should be the -same. You can accomplish this by setting up an "images" folder in the -right place on the web server, and publishing images to it. - - (setq org-publish-project-alist - '(("orgfiles" - :base-directory "~/org/" - :base-extension "org" - :publishing-directory "/ssh:user@host:~/html/notebook/" - :publishing-function org-html-publish-to-html - :exclude "PrivatePage.org" ;; regexp - :headline-levels 3 - :section-numbers nil - :with-toc nil - :html-head "" - :html-preamble t) - - ("images" - :base-directory "~/images/" - :base-extension "jpg\\|gif\\|png" - :publishing-directory "/ssh:user@host:~/html/images/" - :publishing-function org-publish-attachment) - - ("other" - :base-directory "~/other/" - :base-extension "css\\|el" - :publishing-directory "/ssh:user@host:~/html/other/" - :publishing-function org-publish-attachment) - ("website" :components ("orgfiles" "images" "other")))) - - -File: org, Node: Triggering publication, Prev: Sample configuration, Up: Publishing - -13.4 Triggering publication -=========================== - -Once properly configured, Org can publish with the following commands: - -`C-c C-e P x (`org-publish')' - Prompt for a specific project and publish all files that belong to - it. - -`C-c C-e P p (`org-publish-current-project')' - Publish the project containing the current file. - -`C-c C-e P f (`org-publish-current-file')' - Publish only the current file. - -`C-c C-e P a (`org-publish-all')' - Publish every project. - - Org uses timestamps to track when a file has changed. The above -functions normally only publish changed files. You can override this -and force publishing of all files by giving a prefix argument to any of -the commands above, or by customizing the variable -`org-publish-use-timestamps-flag'. This may be necessary in particular -if files include other files via `#+SETUPFILE:' or `#+INCLUDE:'. - - -File: org, Node: Working with source code, Next: Miscellaneous, Prev: Publishing, Up: Top - -14 Working with source code -*************************** - -Source code here refers to any code typed in Org mode documents. Org -can manage source code in any Org file once such code is tagged with -begin and end markers. Working with source code begins with tagging -source code blocks. Tagged `src' code blocks are not restricted to the -preamble or the end of an Org document; they can go anywhere--with a -few exceptions, such as not inside comments and fixed width areas. -Here's a sample `src' code block in emacs-lisp: - - #+BEGIN_SRC emacs-lisp - (defun org-xor (a b) - "Exclusive or." - (if a (not b) b)) - #+END_SRC - - Org can take the code in the block between the `#+BEGIN_SRC' and -`#+END_SRC' tags, and format, compile, execute, and show the results. -Org can simplify many housekeeping tasks essential to modern code -maintenance. That's why these blocks in Org mode literature are -sometimes referred to as `live code' blocks (as compared to the static -text and documentation around it). Users can control how `live' they -want each block by tweaking the headers for compiling, execution, -extraction. - - Org's `src' code block type is one of many block types, such as -quote, export, verse, latex, example, and verbatim. This section -pertains to `src' code blocks between `#+BEGIN_SRC' and `#+END_SRC' - - For editing `src' code blocks, Org provides native Emacs major-modes. -That leverages the latest Emacs features for that source code language -mode. - - For exporting, Org can then extract `src' code blocks into compilable -source files (in a conversion process known as "tangling" in literate -programming terminology). - - For publishing, Org's back-ends can handle the `src' code blocks and -the text for output to a variety of formats with native syntax -highlighting. - - For executing the source code in the `src' code blocks, Org provides -facilities that glue the tasks of compiling, collecting the results of -the execution, and inserting them back to the Org file. Besides text -output, results may include links to other data types that Emacs can -handle: audio, video, and graphics. - - An important feature of Org's execution of the `src' code blocks is -passing variables, functions, and results between `src' blocks. Such -interoperability uses a common syntax even if these `src' blocks are in -different source code languages. The integration extends to linking the -debugger's error messages to the line in the `src' code block in the Org -file. That should partly explain why this functionality by the original -contributors, Eric Schulte and Dan Davison, was called `Org Babel'. - - In literate programming, the main appeal is code and documentation -co-existing in one file. Org mode takes this several steps further. -First by enabling execution, and then by inserting results of that -execution back into the Org file. Along the way, Org provides -extensive formatting features, including handling tables. Org handles -multiple source code languages in one file, and provides a common -syntax for passing variables, functions, and results between `src' code -blocks. - - Org mode fulfills the promise of easy verification and maintenance of -publishing reproducible research by keeping all these in the same file: -text, data, code, configuration settings of the execution environment, -the results of the execution, and associated narratives, claims, -references, and internal and external links. - - Details of Org's facilities for working with source code are shown -next. - -* Menu: - -* Structure of code blocks:: Code block syntax described -* Editing source code:: Language major-mode editing -* Exporting code blocks:: Export contents and/or results -* Extracting source code:: Create pure source code files -* Evaluating code blocks:: Place results of evaluation in the Org mode buffer -* Library of Babel:: Use and contribute to a library of useful code blocks -* Languages:: List of supported code block languages -* Header arguments:: Configure code block functionality -* Results of evaluation:: How evaluation results are handled -* Noweb reference syntax:: Literate programming in Org mode -* Key bindings and useful functions:: Work quickly with code blocks -* Batch execution:: Call functions from the command line - - -File: org, Node: Structure of code blocks, Next: Editing source code, Up: Working with source code - -14.1 Structure of code blocks -============================= - -Org offers two ways to structure source code in Org documents: in a -`src' block, and directly inline. Both specifications are shown below. - - A `src' block conforms to this structure: - - #+NAME: - #+BEGIN_SRC
- - #+END_SRC - - Org mode's templates system (*note Easy templates::) speeds up -creating `src' code blocks with just three keystrokes. Do not be -put-off by having to remember the source block syntax. Org also works -with other completion systems in Emacs, some of which predate Org and -have custom domain-specific languages for defining templates. Regular -use of templates reduces errors, increases accuracy, and maintains -consistency. - - An inline code block conforms to this structure: - - src_{} - - or - - src_[
]{} - -`#+NAME: ' - Optional. Names the `src' block so it can be called, like a - function, from other `src' blocks or inline blocks to evaluate or - to capture the results. Code from other blocks, other files, and - from table formulas (*note The spreadsheet::) can use the name to - reference a `src' block. This naming serves the same purpose as - naming Org tables. Org mode requires unique names. For duplicate - names, Org mode's behavior is undefined. - -`#+BEGIN_SRC' - -`#+END_SRC' - Mandatory. They mark the start and end of a block that Org - requires. The `#+BEGIN_SRC' line takes additional arguments, as - described next. - -`' - Mandatory for live code blocks. It is the identifier of the - source code language in the block. *Note Languages::, for - identifiers of supported languages. - -`' - Optional. Switches provide finer control of the code execution, - export, and format (see the discussion of switches in *note - Literal examples::) - -`
' - Optional. Heading arguments control many aspects of evaluation, - export and tangling of code blocks (*note Header arguments::). - Using Org's properties feature, header arguments can be - selectively applied to the entire buffer or specific sub-trees of - the Org document. - -`source code, header arguments' - -`' - Source code in the dialect of the specified language identifier. - - -File: org, Node: Editing source code, Next: Exporting code blocks, Prev: Structure of code blocks, Up: Working with source code - -14.2 Editing source code -======================== - -`C-c '' for editing the current code block. It opens a new major-mode -edit buffer containing the body of the `src' code block, ready for any -edits. `C-c '' again to close the buffer and return to the Org buffer. - - saves the buffer and updates the contents of the Org -buffer. - - Set `org-edit-src-auto-save-idle-delay' to save the base buffer after -a certain idle delay time. - - Set `org-edit-src-turn-on-auto-save' to auto-save this buffer into a -separate file using `auto-save-mode'. - - `C-c '' to close the major-mode buffer and return back to the Org -buffer. - - While editing the source code in the major-mode, the `org-src-mode' -minor mode remains active. It provides these customization variables as -described below. For even more variables, look in the customization -group `org-edit-structure'. - -`org-src-lang-modes' - If an Emacs major-mode named `-mode' exists, where `' - is the language identifier from code block's header line, then the - edit buffer uses that major-mode. Use this variable to - arbitrarily map language identifiers to major modes. - -`org-src-window-setup' - For specifying Emacs window arrangement when the new edit buffer - is created. - -`org-src-preserve-indentation' - Default is `nil'. Source code is indented. This indentation - applies during export or tangling, and depending on the context, - may alter leading spaces and tabs. When non-`nil', source code is - aligned with the leftmost column. No lines are modified during - export or tangling, which is very useful for white-space sensitive - languages, such as Python. - -`org-src-ask-before-returning-to-edit-buffer' - When `nil', Org returns to the edit buffer without further - prompts. The default prompts for a confirmation. - - Set `org-src-fontify-natively' to non-`nil' to turn on native code -fontification in the _Org_ buffer. Fontification of `src' code blocks -can give visual separation of text and code on the display page. To -further customize the appearance of `org-block' for specific languages, -customize `org-src-block-faces'. The following example shades the -background of regular blocks, and colors source blocks only for Python -and Emacs-Lisp languages. - (require 'color) - (set-face-attribute 'org-block nil :background - (color-darken-name - (face-attribute 'default :background) 3)) - - (setq org-src-block-faces '(("emacs-lisp" (:background "#EEE2FF")) - ("python" (:background "#E5FFB8")))) - - -File: org, Node: Exporting code blocks, Next: Extracting source code, Prev: Editing source code, Up: Working with source code - -14.3 Exporting code blocks -========================== - -Org can flexibly export just the _code_ from the code blocks, just the -_results_ of evaluation of the code block, _both_ the code and the -results of the code block evaluation, or _none_. Org defaults to -exporting _code_ for most languages. For some languages, such as -`ditaa', Org defaults to _results_. To export just the body of code -blocks, *note Literal examples::. To selectively export sub-trees of -an Org document, *note Exporting::. - - The `:exports' header arguments control exporting code blocks only -and not inline code: - -Header arguments: -................. - -`:exports code' - This is the default for most languages where the body of the code - block is exported. See *note Literal examples:: for more. - -`:exports results' - On export, Org includes only the results and not the code block. - After each evaluation, Org inserts the results after the end of - code block in the Org buffer. By default, Org replaces any - previous results. Org can also append results. - -`:exports both' - Org exports both the code block and the results. - -`:exports none' - Org does not export the code block nor the results. - - To stop Org from evaluating code blocks to speed exports, use the -header argument `:eval never-export' (*note eval::). To stop Org from -evaluating code blocks for greater security, set the -`org-export-use-babel' variable to `nil', but understand that header -arguments will have no effect. - - Turning off evaluation comes in handy when batch processing. For -example, markup languages for wikis, which have a high risk of -untrusted code. Stopping code block evaluation also stops evaluation -of all header arguments of the code block. This may not be desirable -in some circumstances. So during export, to allow evaluation of just -the header arguments but not any code evaluation in the source block, -set `:eval never-export' (*note eval::). - - To evaluate just the inline code blocks, set -`org-export-babel-evaluate' to `inline-only'. Isolating the option to -allow inline evaluations separate from `src' code block evaluations -during exports is not for security but for avoiding any delays due to -recalculations, such as calls to a remote database. - - Org never evaluates code blocks in commented sub-trees when exporting -(*note Comment lines::). On the other hand, Org does evaluate code -blocks in sub-trees excluded from export (*note Export settings::). - - -File: org, Node: Extracting source code, Next: Evaluating code blocks, Prev: Exporting code blocks, Up: Working with source code - -14.4 Extracting source code -=========================== - -Extracting source code from code blocks is a basic task in literate -programming. Org has features to make this easy. In literate -programming parlance, documents on creation are _woven_ with code and -documentation, and on export, the code is _tangled_ for execution by a -computer. Org facilitates weaving and tangling for producing, -maintaining, sharing, and exporting literate programming documents. -Org provides extensive customization options for extracting source code. - - When Org tangles `src' code blocks, it expands, merges, and -transforms them. Then Org recomposes them into one or more separate -files, as configured through the options. During this _tangling_ -process, Org expands variables in the source code, and resolves any -"noweb" style references (*note Noweb reference syntax::). - -Header arguments -................ - -`:tangle no' - By default, Org does not tangle the `src' code block on export. - -`:tangle yes' - Org extracts the contents of the code block for the tangled - output. By default, the output file name is the same as the Org - file but with a file extension derived from the language - identifier of the `src' code block. - -`:tangle filename' - Override the default file name with this one for the tangled - output. - -Functions -......... - -`org-babel-tangle' - Tangle the current file. Bound to `C-c C-v t'. - - With prefix argument only tangle the current `src' code block. - -`org-babel-tangle-file' - Choose a file to tangle. Bound to `C-c C-v f'. - -Hooks -..... - -`org-babel-post-tangle-hook' - This hook runs from within code tangled by `org-babel-tangle', - making it suitable for post-processing, compilation, and - evaluation of code in the tangled files. - -Jumping between code and Org -............................ - -Debuggers normally link errors and messages back to the source code. -But for tangled files, we want to link back to the Org file, not to the -tangled source file. To make this extra jump, Org uses -`org-babel-tangle-jump-to-org' function with two additional source code -block header arguments: One, set `padline' (*note padline::) to true -(the default setting). Two, set `comments' (*note comments::) to -`link', which makes Org insert links to the Org file. - - -File: org, Node: Evaluating code blocks, Next: Library of Babel, Prev: Extracting source code, Up: Working with source code - -14.5 Evaluating code blocks -=========================== - -A note about security: With code evaluation comes the risk of harm. Org -safeguards by prompting for user's permission before executing any code -in the source block. To customize this safeguard (or disable it) see -*note Code evaluation security::. - - Org captures the results of the `src' code block evaluation and -inserts them in the Org file, right after the `src' code block. The -insertion point is after a newline and the `#+RESULTS' label. Org -creates the `#+RESULTS' label if one is not already there. - - By default, Org enables only `emacs-lisp' `src' code blocks for -execution. See *note Languages:: for identifiers to enable other -languages. - - Org provides many ways to execute `src' code blocks. `C-c C-c' or -`C-c C-v e' with the point on a `src' code block(1) calls the -`org-babel-execute-src-block' function, which executes the code in the -block, collects the results, and inserts them in the buffer. - - By calling a named code block(2) from an Org mode buffer or a table. -Org can call the named `src' code blocks from the current Org mode -buffer or from the "Library of Babel" (*note Library of Babel::). -Whether inline syntax or the `#+CALL:' syntax is used, the result is -wrapped based on the variable `org-babel-inline-result-wrap', which by -default is set to `"=%s="' to produce verbatim text suitable for markup. - - The syntax for `#+CALL:' is - - #+CALL: () - #+CALL: []() - - The syntax for inline named code block is - - ... call_() ... - ... call_[]()[] ... - -`' - This is the name of the code block to be evaluated (*note - Structure of code blocks::). - -`' - Org passes arguments to the code block using standard function - call syntax. For example, a `#+CALL:' line that passes `4' to a - code block named `double', which declares the header argument - `:var n=2', would be written as `#+CALL: double(n=4)'. Note how - this function call syntax is different from the header argument - syntax. - -`' - Org passes inside header arguments to the named `src' code block - using the header argument syntax. Inside header arguments apply - to code block evaluation. For example, `[:results output]' - collects results printed to `STDOUT' during code execution of that - block. Note how this header argument syntax is different from the - function call syntax. - -`' - End header arguments affect the results returned by the code - block. For example, `:results html' wraps the results in a - `BEGIN_EXPORT html' block before inserting the results in the Org - buffer. - - For more examples of header arguments for `#+CALL:' lines, *note - Arguments in function calls::. - - ---------- Footnotes ---------- - - (1) The option `org-babel-no-eval-on-ctrl-c-ctrl-c' can be used to -remove code evaluation from the `C-c C-c' key binding. - - (2) Actually, the constructs call_() and src_{} are not -evaluated when they appear in a keyword line (i.e. lines starting with -`#+KEYWORD:', *note In-buffer settings::). - - -File: org, Node: Library of Babel, Next: Languages, Prev: Evaluating code blocks, Up: Working with source code - -14.6 Library of Babel -===================== - -The "Library of Babel" is a collection of code blocks. Like a function -library, these code blocks can be called from other Org files. This -collection is in a repository file in Org mode format in the `doc' -directory of Org mode installation. For remote code block evaluation -syntax, *note Evaluating code blocks::. - - For any user to add code to the library, first save the code in -regular `src' code blocks of an Org file, and then load the Org file -with `org-babel-lob-ingest', which is bound to `C-c C-v i'. - - -File: org, Node: Languages, Next: Header arguments, Prev: Library of Babel, Up: Working with source code - -14.7 Languages -============== - -Org supports the following languages for the `src' code blocks: - -Language Identifier Language Identifier ----------------------------------------------------------------------------- -Asymptote asymptote Awk awk -C C C++ C++ -Clojure clojure CSS css -D d ditaa ditaa -Graphviz dot Emacs Calc calc -Emacs Lisp emacs-lisp Fortran fortran -gnuplot gnuplot Haskell haskell -Java java Javascript js -LaTeX latex Ledger ledger -Lisp lisp Lilypond lilypond -Lua lua MATLAB matlab -Mscgen mscgen Objective Caml ocaml -Octave octave Org mode org -Oz oz Perl perl -Plantuml plantuml Processing.js processing -Python python R R -Ruby ruby Sass sass -Scheme scheme GNU Screen screen -Sed sed shell sh -SQL sql SQLite sqlite - - Additional documentation for some languages are at -`http://orgmode.org/worg/org-contrib/babel/languages.html'. - - By default, only `emacs-lisp' is enabled for evaluation. To enable -or disable other languages, customize the `org-babel-load-languages' -variable either through the Emacs customization interface, or by adding -code to the init file as shown next: - - In this example, evaluation is disabled for `emacs-lisp', and enabled -for `R'. - - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . nil) - (R . t))) - - Note that this is not the only way to enable a language. Org also -enables languages when loaded with `require' statement. For example, -the following enables execution of `clojure' code blocks: - - (require 'ob-clojure) - - -File: org, Node: Header arguments, Next: Results of evaluation, Prev: Languages, Up: Working with source code - -14.8 Header arguments -===================== - -Details of configuring header arguments are shown here. - -* Menu: - -* Using header arguments:: Different ways to set header arguments -* Specific header arguments:: List of header arguments - - -File: org, Node: Using header arguments, Next: Specific header arguments, Up: Header arguments - -14.8.1 Using header arguments ------------------------------ - -Since header arguments can be set in several ways, Org prioritizes them -in case of overlaps or conflicts by giving local settings a higher -priority. Header values in function calls, for example, override -header values from global defaults. - -* Menu: - -* System-wide header arguments:: Set globally, language-specific -* Language-specific header arguments:: Set in the Org file's headers -* Header arguments in Org mode properties:: Set in the Org file -* Language-specific mode properties:: -* Code block specific header arguments:: The most commonly used method -* Arguments in function calls:: The most specific level, takes highest priority - - -File: org, Node: System-wide header arguments, Next: Language-specific header arguments, Up: Using header arguments - -System-wide header arguments -............................ - -System-wide values of header arguments can be specified by adapting the -`org-babel-default-header-args' variable: - - :session => "none" - :results => "replace" - :exports => "code" - :cache => "no" - :noweb => "no" - - This example sets `:noweb' header arguments to `yes', which makes -Org expand `:noweb' references by default. - - (setq org-babel-default-header-args - (cons '(:noweb . "yes") - (assq-delete-all :noweb org-babel-default-header-args))) - - -File: org, Node: Language-specific header arguments, Next: Header arguments in Org mode properties, Prev: System-wide header arguments, Up: Using header arguments - -Language-specific header arguments -.................................. - -Each language can have separate default header arguments by customizing -the variable `org-babel-default-header-args:', where `' is -the name of the language. For details, see the language-specific online -documentation at `http://orgmode.org/worg/org-contrib/babel'. - - -File: org, Node: Header arguments in Org mode properties, Next: Language-specific mode properties, Prev: Language-specific header arguments, Up: Using header arguments - -Header arguments in Org mode properties -....................................... - -For header arguments applicable to the buffer, use `#+PROPERTY:' lines -anywhere in the Org mode file (*note Property syntax::). - - The following example sets only for `R' code blocks to `session', -making all the `R' code blocks execute in the same session. Setting -`results' to `silent' ignores the results of executions for all blocks, -not just `R' code blocks; no results inserted for any block. - - #+PROPERTY: header-args:R :session *R* - #+PROPERTY: header-args :results silent - - Header arguments set through Org's property drawers (*note Property -syntax::) apply at the sub-tree level on down. Since these property -drawers can appear anywhere in the file hierarchy, Org uses outermost -call or source block to resolve the values. Org ignores -`org-use-property-inheritance' setting. - - In this example, `:cache' defaults to `yes' for all code blocks in -the sub-tree starting with `sample header'. - - * sample header - :PROPERTIES: - :header-args: :cache yes - :END: - - Properties defined through `org-set-property' function, bound to -`C-c C-x p', apply to all active languages. They override properties -set in `org-babel-default-header-args'. - - -File: org, Node: Language-specific mode properties, Next: Code block specific header arguments, Prev: Header arguments in Org mode properties, Up: Using header arguments - -Language-specific mode properties -................................. - -Language-specific header arguments are also read from properties -`header-args:' where `' is the language identifier. For -example, - - * Heading - :PROPERTIES: - :header-args:clojure: :session *clojure-1* - :header-args:R: :session *R* - :END: - ** Subheading - :PROPERTIES: - :header-args:clojure: :session *clojure-2* - :END: - - would force separate sessions for clojure blocks in Heading and -Subheading, but use the same session for all `R' blocks. Blocks in -Subheading inherit settings from Heading. - - -File: org, Node: Code block specific header arguments, Next: Arguments in function calls, Prev: Language-specific mode properties, Up: Using header arguments - -Code block specific header arguments -.................................... - -Header arguments are most commonly set at the `src' code block level, on -the `#+BEGIN_SRC' line. Arguments set at this level take precedence -over those set in the `org-babel-default-header-args' variable, and also -those set as header properties. - - In the following example, setting `results' to `silent' makes it -ignore results of the code execution. Setting `:exports' to `code' -exports only the body of the `src' code block to HTML or LaTeX.: - - #+NAME: factorial - #+BEGIN_SRC haskell :results silent :exports code :var n=0 - fac 0 = 1 - fac n = n * fac (n-1) - #+END_SRC - - The same header arguments in an inline `src' code block: - - src_haskell[:exports both]{fac 5} - - Code block header arguments can span multiple lines using -`#+HEADER:' on each line. Note that Org currently accepts the plural -spelling of `#+HEADER:' only as a convenience for -backward-compatibility. It may be removed at some point. - - Multi-line header arguments on an unnamed `src' code block: - - #+HEADER: :var data1=1 - #+BEGIN_SRC emacs-lisp :var data2=2 - (message "data1:%S, data2:%S" data1 data2) - #+END_SRC - - #+RESULTS: - : data1:1, data2:2 - - Multi-line header arguments on a named `src' code block: - - #+NAME: named-block - #+HEADER: :var data=2 - #+BEGIN_SRC emacs-lisp - (message "data:%S" data) - #+END_SRC - - #+RESULTS: named-block - : data:2 - - -File: org, Node: Arguments in function calls, Prev: Code block specific header arguments, Up: Using header arguments - -Arguments in function calls -........................... - -Header arguments in function calls are the most specific and override -all other settings in case of an overlap. They get the highest -priority. Two `#+CALL:' examples are shown below. For the complete -syntax of `#+CALL:' lines, see *note Evaluating code blocks::. - - In this example, `:exports results' header argument is applied to the -evaluation of the `#+CALL:' line. - - #+CALL: factorial(n=5) :exports results - - In this example, `:session special' header argument is applied to the -evaluation of `factorial' code block. - - #+CALL: factorial[:session special](n=5) - - -File: org, Node: Specific header arguments, Prev: Using header arguments, Up: Header arguments - -14.8.2 Specific header arguments --------------------------------- - -Org comes with many header arguments common to all languages. New -header arguments are added for specific languages as they become -available for use in `src' code blocks. A header argument is specified -with an initial colon followed by the argument's name in lowercase. -Common header arguments are: - -* Menu: - -* var:: Pass arguments to `src' code blocks -* results:: Specify results type; how to collect -* file:: Specify a path for output file -* file-desc:: Specify a description for file results -* file-ext:: Specify an extension for file output -* output-dir:: Specify a directory for output file -* dir:: Specify the default directory for code block execution -* exports:: Specify exporting code, results, both, none -* tangle:: Toggle tangling; or specify file name -* mkdirp:: Toggle for parent directory creation for target files during tangling -* comments:: Toggle insertion of comments in tangled code files -* padline:: Control insertion of padding lines in tangled code files -* no-expand:: Turn off variable assignment and noweb expansion during tangling -* session:: Preserve the state of code evaluation -* noweb:: Toggle expansion of noweb references -* noweb-ref:: Specify block's noweb reference resolution target -* noweb-sep:: String to separate noweb references -* cache:: Avoid re-evaluating unchanged code blocks -* sep:: Delimiter for writing tabular results outside Org -* hlines:: Handle horizontal lines in tables -* colnames:: Handle column names in tables -* rownames:: Handle row names in tables -* shebang:: Make tangled files executable -* tangle-mode:: Set permission of tangled files -* eval:: Limit evaluation of specific code blocks -* wrap:: Mark source block evaluation results -* post:: Post processing of results of code block evaluation -* prologue:: Text to prepend to body of code block -* epilogue:: Text to append to body of code block - - For language-specific header arguments, see *note Languages::. - - -File: org, Node: var, Next: results, Up: Specific header arguments - -14.8.2.1 `:var' -............... - -Use `:var' for passing arguments to `src' code blocks. The specifics -of variables in `src' code blocks vary by the source language and are -covered in the language-specific documentation. The syntax for `:var', -however, is the same for all languages. This includes declaring a -variable, and assigning a default value. - - Arguments can take values as literals, or as references, or even as -Emacs Lisp code (*note Emacs Lisp evaluation of variables: var.). -References are names from the Org file from the lines `#+NAME:' or -`#+RESULTS:'. References can also refer to tables, lists, -`#+BEGIN_EXAMPLE' blocks, other types of `src' code blocks, or the -results of execution of `src' code blocks. - - For better performance, Org can cache results of evaluations. But -caching comes with severe limitations (*note cache::). - - Argument values are indexed like arrays (*note Indexable variable -values: var.). - - The following syntax is used to pass arguments to `src' code blocks -using the `:var' header argument. - - :var name=assign - - The `assign' is a literal value, such as a string `"string"', a -number `9', a reference to a table, a list, a literal example, another -code block (with or without arguments), or the results from evaluating -a code block. - - Here are examples of passing values by reference: - -"table" - an Org mode table named with either a `#+NAME:' line - - #+NAME: example-table - | 1 | - | 2 | - | 3 | - | 4 | - - #+NAME: table-length - #+BEGIN_SRC emacs-lisp :var table=example-table - (length table) - #+END_SRC - - #+RESULTS: table-length - : 4 - -"list" - a simple list named with a `#+NAME:' line. Note that only the top - level list items are passed along. Nested list items are ignored. - - #+NAME: example-list - - simple - - not - - nested - - list - - #+BEGIN_SRC emacs-lisp :var x=example-list - (print x) - #+END_SRC - - #+RESULTS: - | simple | list | - -"code block without arguments" - a code block name (from the example above), as assigned by - `#+NAME:', optionally followed by parentheses - - #+BEGIN_SRC emacs-lisp :var length=table-length() - (* 2 length) - #+END_SRC - - #+RESULTS: - : 8 - -"code block with arguments" - a `src' code block name, as assigned by `#+NAME:', followed by - parentheses and optional arguments passed within the parentheses - following the `src' code block name using standard function call - syntax - - #+NAME: double - #+BEGIN_SRC emacs-lisp :var input=8 - (* 2 input) - #+END_SRC - - #+RESULTS: double - : 16 - - #+NAME: squared - #+BEGIN_SRC emacs-lisp :var input=double(input=2) - (* input input) - #+END_SRC - - #+RESULTS: squared - : 4 - -"literal example" - a literal example block named with a `#+NAME:' line - - #+NAME: literal-example - #+BEGIN_EXAMPLE - A literal example - on two lines - #+END_EXAMPLE - - #+NAME: read-literal-example - #+BEGIN_SRC emacs-lisp :var x=literal-example - (concatenate 'string x " for you.") - #+END_SRC - - #+RESULTS: read-literal-example - : A literal example - : on two lines for you. - - -Indexable variable values -......................... - -Indexing variable values enables referencing portions of a variable. -Indexes are 0 based with negative values counting backwards from the -end. If an index is separated by `,'s then each subsequent section -will index as the next dimension. Note that this indexing occurs -_before_ other table-related header arguments are applied, such as -`:hlines', `:colnames' and `:rownames'. The following example assigns -the last cell of the first row the table `example-table' to the variable -`data': - - #+NAME: example-table - | 1 | a | - | 2 | b | - | 3 | c | - | 4 | d | - - #+BEGIN_SRC emacs-lisp :var data=example-table[0,-1] - data - #+END_SRC - - #+RESULTS: - : a - - Ranges of variable values can be referenced using two integers -separated by a `:', in which case the entire inclusive range is -referenced. For example the following assigns the middle three rows of -`example-table' to `data'. - - #+NAME: example-table - | 1 | a | - | 2 | b | - | 3 | c | - | 4 | d | - | 5 | 3 | - - #+BEGIN_SRC emacs-lisp :var data=example-table[1:3] - data - #+END_SRC - - #+RESULTS: - | 2 | b | - | 3 | c | - | 4 | d | - - To pick the entire range, use an empty index, or the single character -`*'. `0:-1' does the same thing. Example below shows how to reference -the first column only. - - #+NAME: example-table - | 1 | a | - | 2 | b | - | 3 | c | - | 4 | d | - - #+BEGIN_SRC emacs-lisp :var data=example-table[,0] - data - #+END_SRC - - #+RESULTS: - | 1 | 2 | 3 | 4 | - - Index referencing can be used for tables and code blocks. Index -referencing can handle any number of dimensions. Commas delimit -multiple dimensions, as shown below. - - #+NAME: 3D - #+BEGIN_SRC emacs-lisp - '(((1 2 3) (4 5 6) (7 8 9)) - ((10 11 12) (13 14 15) (16 17 18)) - ((19 20 21) (22 23 24) (25 26 27))) - #+END_SRC - - #+BEGIN_SRC emacs-lisp :var data=3D[1,,1] - data - #+END_SRC - - #+RESULTS: - | 11 | 14 | 17 | - -Emacs Lisp evaluation of variables -.................................. - -Emacs lisp code can set the values for variables. To differentiate a -value from lisp code, Org interprets any value starting with `(', `[', -`'' or ``' as Emacs Lisp code. The result of evaluating that code is -then assigned to the value of that variable. The following example -shows how to reliably query and pass file name of the Org mode buffer -to a code block using headers. We need reliability here because the -file's name could change once the code in the block starts executing. - - #+BEGIN_SRC sh :var filename=(buffer-file-name) :exports both - wc -w $filename - #+END_SRC - - Note that values read from tables and lists will not be mistakenly -evaluated as Emacs Lisp code, as illustrated in the following example. - - #+NAME: table - | (a b c) | - - #+HEADER: :var data=table[0,0] - #+BEGIN_SRC perl - $data - #+END_SRC - - #+RESULTS: - : (a b c) - - -File: org, Node: results, Next: file, Prev: var, Up: Specific header arguments - -14.8.2.2 `:results' -................... - -There are four classes of `:results' header arguments. Each `src' code -block can take only one option per class. - - * collection for how the results should be collected from the `src' - code block - - * type for which type of result the code block will return; affects - how Org processes and inserts results in the Org buffer - - * format for the result; affects how Org processes and inserts - results in the Org buffer - - * handling for processing results after evaluation of the `src' code - block - -Collection -.......... - -Collection options specify the results. Choose one of the options; -they are mutually exclusive. - - * `value' Default. Functional mode. Result is the value returned - by the last statement in the `src' code block. Languages like - Python may require an explicit `return' statement in the `src' - code block. Usage example: `:results value'. - - * `output' Scripting mode. Result is collected from STDOUT during - execution of the code in the `src' code block. Usage example: - `:results output'. - -Type -.... - -Type tells what result types to expect from the execution of the code -block. Choose one of the options; they are mutually exclusive. The -default behavior is to automatically determine the result type. - - * `table', `vector' Interpret the results as an Org table. If the - result is a single value, create a table with one row and one - column. Usage example: `:results value table'. - - * `list' Interpret the results as an Org list. If the result is a - single value, create a list of one element. - - * `scalar', `verbatim' Interpret literally and insert as quoted - text. Do not create a table. Usage example: `:results value - verbatim'. - - * `file' Interpret as path to a file. Inserts a link to the file. - Usage example: `:results value file'. - -Format -...... - -Format pertains to the type of the result returned by the `src' code -block. Choose one of the options; they are mutually exclusive. The -default follows from the type specified above. - - * `raw' Interpreted as raw Org mode. Inserted directly into the - buffer. Aligned if it is a table. Usage example: `:results value - raw'. - - * `org' Results enclosed in a `BEGIN_SRC org' block. For - comma-escape, either `TAB' in the block, or export the file. - Usage example: `:results value org'. - - * `html' Results enclosed in a `BEGIN_EXPORT html' block. Usage - example: `:results value html'. - - * `latex' Results enclosed in a `BEGIN_EXPORT latex' block. Usage - example: `:results value latex'. - - * `code' Result enclosed in a `src' code block. Useful for parsing. - Usage example: `:results value code'. - - * `pp' Result converted to pretty-print source code. Enclosed in a - `src' code block. Languages supported: Emacs Lisp, Python, and - Ruby. Usage example: `:results value pp'. - - * `drawer' Result wrapped in a RESULTS drawer. Useful for - containing `raw' or `org' results for later scripting and - automated processing. Usage example: `:results value drawer'. - -Handling -........ - -Handling options after collecting the results. - - * `silent' Do not insert results in the Org mode buffer, but echo - them in the minibuffer. Usage example: `:results output silent'. - - * `replace' Default. Insert results in the Org buffer. Remove - previous results. Usage example: `:results output replace'. - - * `append' Append results to the Org buffer. Latest results are at - the bottom. Does not remove previous results. Usage example: - `:results output append'. - - * `prepend' Prepend results to the Org buffer. Latest results are - at the top. Does not remove previous results. Usage example: - `:results output prepend'. - - -File: org, Node: file, Next: file-desc, Prev: results, Up: Specific header arguments - -14.8.2.3 `:file' -................ - -An external `:file' that saves the results of execution of the code -block. The `:file' is either a file name or two strings, where the -first is the file name and the second is the description. A link to -the file is inserted. It uses an Org mode style `[[file:]]' link -(*note Link format::). Some languages, such as `R', `dot', `ditaa', and -`gnuplot', automatically wrap the source code in additional boilerplate -code. Such code wrapping helps recreate the output, especially graphics -output, by executing just the `:file' contents. - - -File: org, Node: file-desc, Next: file-ext, Prev: file, Up: Specific header arguments - -14.8.2.4 `:file-desc' -..................... - -A description of the results file. Org uses this description for the -link (see *note Link format::) it inserts in the Org file. If the -`:file-desc' has no value, Org will use file name for both the "link" -and the "description" portion of the Org mode link. - - -File: org, Node: file-ext, Next: output-dir, Prev: file-desc, Up: Specific header arguments - -14.8.2.5 `:file-ext' -.................... - -File name extension for the output file. Org generates the file's -complete name, and extension by combining `:file-ext', `#+NAME:' of the -source block, and the *note output-dir:: header argument. To override -this auto generated file name, use the `:file' header argument. - - -File: org, Node: output-dir, Next: dir, Prev: file-ext, Up: Specific header arguments - -14.8.2.6 `:output-dir' -...................... - -Specifies the `:output-dir' for the results file. Org accepts an -absolute path (beginning with `/') or a relative directory (without -`/'). The value can be combined with `#+NAME:' of the source block and -*note file:: or *note file-ext:: header arguments. - - -File: org, Node: dir, Next: exports, Prev: output-dir, Up: Specific header arguments - -14.8.2.7 `:dir' and remote execution -.................................... - -While the `:file' header argument can be used to specify the path to the -output file, `:dir' specifies the default directory during `src' code -block execution. If it is absent, then the directory associated with -the current buffer is used. In other words, supplying `:dir path' -temporarily has the same effect as changing the current directory with -`M-x cd path RET', and then not supplying `:dir'. Under the surface, -`:dir' simply sets the value of the Emacs variable `default-directory'. - - When using `:dir', relative paths (for example, `:file myfile.jpg' -or `:file results/myfile.jpg') become relative to the default directory. - - For example, to save the plot file in the `Work' folder of the home -directory (notice tilde is expanded): - - #+BEGIN_SRC R :file myplot.png :dir ~/Work - matplot(matrix(rnorm(100), 10), type="l") - #+END_SRC - -Remote execution -................ - -To evaluate the `src' code block on a remote machine, supply a remote s -directory name using `Tramp' syntax. For example: - - #+BEGIN_SRC R :file plot.png :dir /scp:dand@yakuba.princeton.edu: - plot(1:10, main=system("hostname", intern=TRUE)) - #+END_SRC - - Org first captures the text results as usual for insertion in the -Org file. Then Org also inserts a link to the remote file, thanks to -Emacs `Tramp'. Org constructs the remote path to the file name from -`:dir' and `default-directory', as illustrated here: - - [[file:/scp:dand@yakuba.princeton.edu:/home/dand/plot.png][plot.png]] - -Some more warnings -.................. - - * When `:dir' is used with `:session', Org sets the starting - directory for a new session. But Org will not alter the directory - of an already existing session. - - * Do not use `:dir' with `:exports results' or with `:exports both' - to avoid Org inserting incorrect links to remote files. That is - because Org does not expand `default directory' to avoid some - underlying portability issues. - - -File: org, Node: exports, Next: tangle, Prev: dir, Up: Specific header arguments - -14.8.2.8 `:exports' -................... - -The `:exports' header argument is to specify if that part of the Org -file is exported to, say, HTML or LaTeX formats. Note that `:exports' -affects only `src' code blocks and not inline code. - - * `code' The default. The body of code is included into the - exported file. Example: `:exports code'. - - * `results' The results of evaluation of the code is included in the - exported file. Example: `:exports results'. - - * `both' Both the code and results of evaluation are included in the - exported file. Example: `:exports both'. - - * `none' Neither the code nor the results of evaluation is included - in the exported file. Whether the code is evaluated at all - depends on other options. Example: `:exports none'. - - -File: org, Node: tangle, Next: mkdirp, Prev: exports, Up: Specific header arguments - -14.8.2.9 `:tangle' -.................. - -The `:tangle' header argument specifies if the `src' code block is -exported to source file(s). - - * `tangle' Export the `src' code block to source file. The file - name for the source file is derived from the name of the Org file, - and the file extension is derived from the source code language - identifier. Example: `:tangle yes'. - - * `no' The default. Do not extract the code a source code file. - Example: `:tangle no'. - - * other Export the `src' code block to source file whose file name - is derived from any string passed to the `:tangle' header - argument. Org derives the file name as being relative to the - directory of the Org file's location. Example: `:tangle path'. - - -File: org, Node: mkdirp, Next: comments, Prev: tangle, Up: Specific header arguments - -14.8.2.10 `:mkdirp' -................... - -The `:mkdirp' header argument creates parent directories for tangled -files if the directory does not exist. `yes' enables directory creation -and `no' inhibits directory creation. - - -File: org, Node: comments, Next: padline, Prev: mkdirp, Up: Specific header arguments - -14.8.2.11 `:comments' -..................... - -Controls inserting comments into tangled files. These are above and -beyond whatever comments may already exist in the `src' code block. - - * `no' The default. Do not insert any extra comments during - tangling. - - * `link' Wrap the `src' code block in comments. Include links - pointing back to the place in the Org file from where the code was - tangled. - - * `yes' Kept for backward compatibility; same as "link". - - * `org' Nearest headline text from Org file is inserted as comment. - The exact text that is inserted is picked from the leading context - of the source block. - - * `both' Includes both "link" and "org" comment options. - - * `noweb' Includes "link" comment option, expands noweb references, - and wraps them in link comments inside the body of the `src' code - block. - - -File: org, Node: padline, Next: no-expand, Prev: comments, Up: Specific header arguments - -14.8.2.12 `:padline' -.................... - -Control insertion of newlines to pad `src' code blocks in the tangled -file. - * `yes' Default. Insert a newline before and after each `src' code - block in the tangled file. - - * `no' Do not insert newlines to pad the tangled `src' code blocks. - - -File: org, Node: no-expand, Next: session, Prev: padline, Up: Specific header arguments - -14.8.2.13 `:no-expand' -...................... - -By default Org expands `src' code blocks during tangling. The -`:no-expand' header argument turns off such expansions. Note that one -side-effect of expansion by `org-babel-expand-src-block' also assigns -values to `:var' (*note var::) variables. Expansions also replace -"noweb" references with their targets (*note Noweb reference syntax::). -Some of these expansions may cause premature assignment, hence this -option. This option makes a difference only for tangling. It has no -effect when exporting since `src' code blocks for execution have to be -expanded anyway. - - -File: org, Node: session, Next: noweb, Prev: no-expand, Up: Specific header arguments - -14.8.2.14 `:session' -.................... - -The `:session' header argument is for running multiple source code -blocks under one session. Org runs `src' code blocks with the same -session name in the same interpreter process. - - * `none' Default. Each `src' code block gets a new interpreter - process to execute. The process terminates once the block is - evaluated. - - * `other' Any string besides `none' turns that string into the name - of that session. For example, `:session mysession' names it - `mysession'. If `:session' has no argument, then the session name - is derived from the source language identifier. Subsequent blocks - with the same source code language use the same session. - Depending on the language, state variables, code from other - blocks, and the overall interpreted environment may be shared. - Some interpreted languages support concurrent sessions when - subsequent source code language blocks change session names. - - -File: org, Node: noweb, Next: noweb-ref, Prev: session, Up: Specific header arguments - -14.8.2.15 `:noweb' -.................. - -The `:noweb' header argument controls expansion of "noweb" syntax -references (*note Noweb reference syntax::). Expansions occur when -source code blocks are evaluated, tangled, or exported. - - * `no' Default. No expansion of "Noweb" syntax references in the - body of the code when evaluating, tangling, or exporting. - - * `yes' Expansion of "Noweb" syntax references in the body of the - `src' code block when evaluating, tangling, or exporting. - - * `tangle' Expansion of "Noweb" syntax references in the body of the - `src' code block when tangling. No expansion when evaluating or - exporting. - - * `no-export' Expansion of "Noweb" syntax references in the body of - the `src' code block when evaluating or tangling. No expansion - when exporting. - - * `strip-export' Expansion of "Noweb" syntax references in the body - of the `src' code block when expanding prior to evaluating or - tangling. Removes "noweb" syntax references when exporting. - - * `eval' Expansion of "Noweb" syntax references in the body of the - `src' code block only before evaluating. - -Noweb prefix lines -.................. - -Noweb insertions now honor prefix characters that appear before -`<>'. This behavior is illustrated in the following example. -Because the `<>' noweb reference appears behind the SQL comment -syntax, each line of the expanded noweb reference will be commented. - - This `src' code block: - - -- <> - - expands to: - - -- this is the - -- multi-line body of example - - Since this change will not affect noweb replacement text without -newlines in them, inline noweb references are acceptable. - - -File: org, Node: noweb-ref, Next: noweb-sep, Prev: noweb, Up: Specific header arguments - -14.8.2.16 `:noweb-ref' -...................... - -When expanding "noweb" style references, Org concatenates `src' code -blocks by matching the reference name to either the block name or the -`:noweb-ref' header argument. - - For simple concatenation, set this `:noweb-ref' header argument at -the sub-tree or file level. In the example Org file shown next, the -body of the source code in each block is extracted for concatenation to -a pure code file. - - #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh - <> - #+END_SRC - * the mount point of the fullest disk - :PROPERTIES: - :header-args: :noweb-ref fullest-disk - :END: - - ** query all mounted disks - #+BEGIN_SRC sh - df \ - #+END_SRC - - ** strip the header row - #+BEGIN_SRC sh - |sed '1d' \ - #+END_SRC - - ** output mount point of fullest disk - #+BEGIN_SRC sh - |awk '{if (u < +$5) {u = +$5; m = $6}} END {print m}' - #+END_SRC - - -File: org, Node: noweb-sep, Next: cache, Prev: noweb-ref, Up: Specific header arguments - -14.8.2.17 `:noweb-sep' -...................... - -By default a newline separates each noweb reference concatenation. To -change this newline separator, edit the `:noweb-sep' (*note -noweb-sep::) header argument. - - -File: org, Node: cache, Next: sep, Prev: noweb-sep, Up: Specific header arguments - -14.8.2.18 `:cache' -.................. - -The `:cache' header argument is for caching results of evaluating code -blocks. Caching results can avoid re-evaluating `src' code blocks that -have not changed since the previous run. To benefit from the cache and -avoid redundant evaluations, the source block must have a result -already present in the buffer, and neither the header arguments -(including the value of `:var' references) nor the text of the block -itself has changed since the result was last computed. This feature -greatly helps avoid long-running calculations. For some edge cases, -however, the cached results may not be reliable. - - The caching feature is best for when `src' blocks are pure functions, -that is functions that return the same value for the same input -arguments (*note var::), and that do not have side effects, and do not -rely on external variables other than the input arguments. Functions -that depend on a timer, file system objects, and random number -generators are clearly unsuitable for caching. - - A note of warning: when `:cache' is used for a `:session', caching -may cause unexpected results. - - When the caching mechanism tests for any source code changes, it -will not expand "noweb" style references (*note Noweb reference -syntax::). For reasons why, see -`http://thread.gmane.org/gmane.emacs.orgmode/79046'. - - The `:cache' header argument can have one of two values: `yes' or -`no'. - - * `no' Default. No caching of results; `src' code block evaluated - every time. - - * `yes' Whether to run the code or return the cached results is - determined by comparing the SHA1 hash value of the combined `src' - code block and arguments passed to it. This hash value is packed - on the `#+RESULTS:' line from previous evaluation. When hash - values match, Org does not evaluate the `src' code block. When - hash values mismatch, Org evaluates the `src' code block, inserts - the results, recalculates the hash value, and updates `#+RESULTS:' - line. - - In this example, both functions are cached. But `caller' runs only -if the result from `random' has changed since the last run. - - #+NAME: random - #+BEGIN_SRC R :cache yes - runif(1) - #+END_SRC - - #+RESULTS[a2a72cd647ad44515fab62e144796432793d68e1]: random - 0.4659510825295 - - #+NAME: caller - #+BEGIN_SRC emacs-lisp :var x=random :cache yes - x - #+END_SRC - - #+RESULTS[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller - 0.254227238707244 - - -File: org, Node: sep, Next: hlines, Prev: cache, Up: Specific header arguments - -14.8.2.19 `:sep' -................ - -The `:sep' header argument is the delimiter for saving results as tables -to files (*note file::) external to Org mode. Org defaults to tab -delimited output. The function, `org-open-at-point', which is bound to -`C-c C-o', also uses `:sep' for opening tabular results. - - -File: org, Node: hlines, Next: colnames, Prev: sep, Up: Specific header arguments - -14.8.2.20 `:hlines' -................... - -In-between each table row or below the table headings, sometimes -results have horizontal lines, which are also known as hlines. The -`:hlines' argument with the value `yes' accepts such lines. The -default is `no'. - - * `no' Strips horizontal lines from the input table. For most code, - this is desirable, or else those `hline' symbols raise unbound - variable errors. - - The default is `:hlines no'. The example shows hlines removed - from the input table. - - #+NAME: many-cols - | a | b | c | - |---+---+---| - | d | e | f | - |---+---+---| - | g | h | i | - - #+NAME: echo-table - #+BEGIN_SRC python :var tab=many-cols - return tab - #+END_SRC - - #+RESULTS: echo-table - | a | b | c | - | d | e | f | - | g | h | i | - - * `yes' For `:hlines yes', the example shows hlines unchanged. - - #+NAME: many-cols - | a | b | c | - |---+---+---| - | d | e | f | - |---+---+---| - | g | h | i | - - #+NAME: echo-table - #+BEGIN_SRC python :var tab=many-cols :hlines yes - return tab - #+END_SRC - - #+RESULTS: echo-table - | a | b | c | - |---+---+---| - | d | e | f | - |---+---+---| - | g | h | i | - - -File: org, Node: colnames, Next: rownames, Prev: hlines, Up: Specific header arguments - -14.8.2.21 `:colnames' -..................... - -The `:colnames' header argument accepts `yes', `no', or `nil' values. -The default value is `nil', which is unassigned. But this header -argument behaves differently depending on the source code language. - - * `nil' If an input table has column names (because the second row - is an hline), then Org removes the column names, processes the - table, puts back the column names, and then writes the table to - the results block. - - #+NAME: less-cols - | a | - |---| - | b | - | c | - - #+NAME: echo-table-again - #+BEGIN_SRC python :var tab=less-cols - return [[val + '*' for val in row] for row in tab] - #+END_SRC - - #+RESULTS: echo-table-again - | a | - |----| - | b* | - | c* | - - Note that column names have to accounted for when using variable - indexing (*note Indexable variable values: var.) because column - names are not removed for indexing. - - * `no' Do not pre-process column names. - - * `yes' For an input table that has no hlines, process it like the - `nil' value. That is, Org removes the column names, processes the - table, puts back the column names, and then writes the table to - the results block. - - -File: org, Node: rownames, Next: shebang, Prev: colnames, Up: Specific header arguments - -14.8.2.22 `:rownames' -..................... - -The `:rownames' header argument can take on values `yes' or `no' -values. The default is `no'. Note that `emacs-lisp' code blocks -ignore `:rownames' header argument because of the ease of -table-handling in Emacs. - - * `no' Org will not pre-process row names. - - * `yes' If an input table has row names, then Org removes the row - names, processes the table, puts back the row names, and then - writes the table to the results block. - - #+NAME: with-rownames - | one | 1 | 2 | 3 | 4 | 5 | - | two | 6 | 7 | 8 | 9 | 10 | - - #+NAME: echo-table-once-again - #+BEGIN_SRC python :var tab=with-rownames :rownames yes - return [[val + 10 for val in row] for row in tab] - #+END_SRC - - #+RESULTS: echo-table-once-again - | one | 11 | 12 | 13 | 14 | 15 | - | two | 16 | 17 | 18 | 19 | 20 | - - Note that row names have to accounted for when using variable - indexing (*note Indexable variable values: var.) because row names - are not removed for indexing. - - - -File: org, Node: shebang, Next: tangle-mode, Prev: rownames, Up: Specific header arguments - -14.8.2.23 `:shebang' -.................... - -This header argument can turn results into executable script files. By -setting the `:shebang' header argument to a string value (for example, -`:shebang "#!/bin/bash"'), Org inserts that string as the first line of -the tangled file that the `src' code block is extracted to. Org then -turns on the tangled file's executable permission. - - -File: org, Node: tangle-mode, Next: eval, Prev: shebang, Up: Specific header arguments - -14.8.2.24 `:tangle-mode' -........................ - -The `tangle-mode' header argument specifies what permissions to set for -tangled files by `set-file-modes'. For example, to make read-only -tangled file, use `:tangle-mode (identity #o444)'. To make it -executable, use `:tangle-mode (identity #o755)'. - - On `src' code blocks with `shebang' (*note shebang::) header -argument, Org will automatically set the tangled file to executable -permissions. But this can be overridden with custom permissions using -`tangle-mode' header argument. - - When multiple `src' code blocks tangle to a single file with -different and conflicting `tangle-mode' header arguments, Org's -behavior is undefined. - - -File: org, Node: eval, Next: wrap, Prev: tangle-mode, Up: Specific header arguments - -14.8.2.25 `:eval' -................. - -The `:eval' header argument can limit evaluation of specific code -blocks. It is useful for protection against evaluating untrusted `src' -code blocks by prompting for a confirmation. This protection is -independent of the `org-confirm-babel-evaluate' setting. - -`never or no' - Org will never evaluate this `src' code block. - -`query' - Org prompts the user for permission to evaluate this `src' code - block. - -`never-export or no-export' - Org will not evaluate this `src' code block when exporting, yet - the user can evaluate this source block interactively. - -`query-export' - Org prompts the user for permission to export this `src' code - block. - - If `:eval' header argument is not set for a source block, then Org -determines whether to evaluate from the `org-confirm-babel-evaluate' -variable (*note Code evaluation security::). - - -File: org, Node: wrap, Next: post, Prev: eval, Up: Specific header arguments - -14.8.2.26 `:wrap' -................. - -The `:wrap' header argument marks the results block by appending strings -to `#+BEGIN_' and `#+END_'. If no string is specified, Org wraps the -results in a `#+BEGIN/END_RESULTS' block. - - -File: org, Node: post, Next: prologue, Prev: wrap, Up: Specific header arguments - -14.8.2.27 `:post' -................. - -The `:post' header argument is for post-processing results from `src' -block evaluation. When `:post' has any value, Org binds the results to -`*this*' variable for easy passing to *note var:: header argument -specifications. That makes results available to other `src' code -blocks, or for even direct Emacs Lisp code execution. - - The following two examples illustrate `:post' header argument in -action. The first one shows how to attach `#+ATTR_LATEX:' line using -`:post'. - - #+name: attr_wrap - #+begin_src sh :var data="" :var width="\\textwidth" :results output - echo "#+ATTR_LATEX: :width $width" - echo "$data" - #+end_src - - #+header: :file /tmp/it.png - #+begin_src dot :post attr_wrap(width="5cm", data=*this*) :results drawer - digraph{ - a -> b; - b -> c; - c -> a; - } - #+end_src - - #+RESULTS: - :RESULTS: - #+ATTR_LATEX :width 5cm - [[file:/tmp/it.png]] - :END: - - The second example shows use of `:colnames' in `:post' to pass data -between `src' code blocks. - - #+name: round-tbl - #+begin_src emacs-lisp :var tbl="" fmt="%.3f" - (mapcar (lambda (row) - (mapcar (lambda (cell) - (if (numberp cell) - (format fmt cell) - cell)) - row)) - tbl) - #+end_src - - #+begin_src R :colnames yes :post round-tbl[:colnames yes](*this*) - set.seed(42) - data.frame(foo=rnorm(1)) - #+end_src - - #+RESULTS: - | foo | - |-------| - | 1.371 | - - -File: org, Node: prologue, Next: epilogue, Prev: post, Up: Specific header arguments - -14.8.2.28 `:prologue' -..................... - -The `prologue' header argument is for appending to the top of the code -block for execution. For example, a clear or reset code at the start -of new execution of a `src' code block. A `reset' for `gnuplot': -`:prologue "reset"'. See also *note epilogue::. - - (add-to-list 'org-babel-default-header-args:gnuplot - '((:prologue . "reset"))) - - -File: org, Node: epilogue, Prev: prologue, Up: Specific header arguments - -14.8.2.29 `:epilogue' -..................... - -The value of the `epilogue' header argument is for appending to the end -of the code block for execution. See also *note prologue::. - - -File: org, Node: Results of evaluation, Next: Noweb reference syntax, Prev: Header arguments, Up: Working with source code - -14.9 Results of evaluation -========================== - -How Org handles results of a code block execution depends on many header -arguments working together. Here is only a summary of these. For an -enumeration of all the header arguments that affect results, see *note -results::. - - The primary determinant is the execution context. Is it in a -`:session' or not? Orthogonal to that is if the expected result is a -`:results value' or `:results output', which is a concatenation of -output from start to finish of the `src' code block's evaluation. - - Non-session Session -`:results value' value of last value of last expression - expression -`:results output' contents of STDOUT concatenation of interpreter - output - - For `:session' and non-session, the `:results value' turns the -results into an Org mode table format. Single values are wrapped in a -one dimensional vector. Rows and columns of a table are wrapped in a -two-dimensional vector. - -14.9.1 Non-session ------------------- - -14.9.1.1 `:results value' -......................... - -Default. Org gets the value by wrapping the code in a function -definition in the language of the `src' block. That is why when using -`:results value', code should execute like a function and return a -value. For languages like Python, an explicit `return' statement is -mandatory when using `:results value'. - - This is one of four evaluation contexts where Org automatically -wraps the code in a function definition. - -14.9.1.2 `:results output' -.......................... - -For `:results output', the code is passed to an external process running -the interpreter. Org returns the contents of the standard output -stream as as text results. - -14.9.2 Session --------------- - -14.9.2.1 `:results value' -......................... - -For `:results value' from a `:session', Org passes the code to an -interpreter running as an interactive Emacs inferior process. So only -languages that provide interactive evaluation can have session support. -Not all languages provide this support, such as `C' and `ditaa'. Even -those that do support, such as `Python' and `Haskell', they impose -limitations on allowable language constructs that can run -interactively. Org inherits those limitations for those `src' code -blocks running in a `:session'. - - Org gets the value from the source code interpreter's last statement -output. Org has to use language-specific methods to obtain the value. -For example, from the variable `_' in `Python' and `Ruby', and the -value of `.Last.value' in `R'). - -14.9.2.2 `:results output' -.......................... - -For `:results output', Org passes the code to the interpreter running as -an interactive Emacs inferior process. Org concatenates whatever text -output emitted by the interpreter to return the collection as a result. -Note that this collection is not the same as collected from `STDOUT' of -a non-interactive interpreter running as an external process. Compare -for example these two blocks: - - #+BEGIN_SRC python :results output - print "hello" - 2 - print "bye" - #+END_SRC - - #+RESULTS: - : hello - : bye - - In the above non-session mode, the "2" is not printed; so does not -appear in results. - - #+BEGIN_SRC python :results output :session - print "hello" - 2 - print "bye" - #+END_SRC - - #+RESULTS: - : hello - : 2 - : bye - - In the above `:session' mode, the interactive interpreter receives -and prints "2". Results show that. - - -File: org, Node: Noweb reference syntax, Next: Key bindings and useful functions, Prev: Results of evaluation, Up: Working with source code - -14.10 Noweb reference syntax -============================ - -Org supports named blocks in "noweb" style syntax. For "noweb" literate -programming details, see `http://www.cs.tufts.edu/~nr/noweb/'). - - <> - - For the header argument `:noweb yes', Org expands "noweb" style -references in the `src' code block before evaluation. - - For the header argument `:noweb no', Org does not expand "noweb" -style references in the `src' code block before evaluation. - - The default is `:noweb no'. - - Org offers a more flexible way to resolve "noweb" style references -(*note noweb-ref::). - - Org can handle naming of _results_ block, rather than the body of the -`src' code block, using "noweb" style references. - - For "noweb" style reference, append parenthesis to the code block -name for arguments, as shown in this example: - - <> - - Note: Org defaults to `:noweb no' so as not to cause errors in -languages such as `Ruby' where "noweb" syntax is equally valid -characters. For example, `<>'. Change Org's default to `:noweb -yes' for languages where there is no risk of confusion. - - For faster tangling of large Org mode files, set -`org-babel-use-quick-and-dirty-noweb-expansion' variable to `t'. The -speedup comes at the expense of not correctly resolving inherited values -of the `:noweb-ref' header argument. - - -File: org, Node: Key bindings and useful functions, Next: Batch execution, Prev: Noweb reference syntax, Up: Working with source code - -14.11 Key bindings and useful functions -======================================= - -Many common Org mode key sequences are re-bound depending on the -context. - - Active key bindings in code blocks: - -`C-c C-c' `org-babel-execute-src-block' -`C-c C-o' `org-babel-open-src-block-result' -`M-' `org-babel-load-in-session' -`M-' `org-babel-switch-to-session' - - Active key bindings in Org mode buffer: - -`C-c C-v p' or `C-c C-v C-p' `org-babel-previous-src-block' -`C-c C-v n' or `C-c C-v C-n' `org-babel-next-src-block' -`C-c C-v e' or `C-c C-v C-e' `org-babel-execute-maybe' -`C-c C-v o' or `C-c C-v C-o' `org-babel-open-src-block-result' -`C-c C-v v' or `C-c C-v C-v' `org-babel-expand-src-block' -`C-c C-v u' or `C-c C-v C-u' `org-babel-goto-src-block-head' -`C-c C-v g' or `C-c C-v C-g' `org-babel-goto-named-src-block' -`C-c C-v r' or `C-c C-v C-r' `org-babel-goto-named-result' -`C-c C-v b' or `C-c C-v C-b' `org-babel-execute-buffer' -`C-c C-v s' or `C-c C-v C-s' `org-babel-execute-subtree' -`C-c C-v d' or `C-c C-v C-d' `org-babel-demarcate-block' -`C-c C-v t' or `C-c C-v C-t' `org-babel-tangle' -`C-c C-v f' or `C-c C-v C-f' `org-babel-tangle-file' -`C-c C-v c' or `C-c C-v C-c' `org-babel-check-src-block' -`C-c C-v j' or `C-c C-v C-j' `org-babel-insert-header-arg' -`C-c C-v l' or `C-c C-v C-l' `org-babel-load-in-session' -`C-c C-v i' or `C-c C-v C-i' `org-babel-lob-ingest' -`C-c C-v I' or `C-c C-v C-I' `org-babel-view-src-block-info' -`C-c C-v z' or `C-c C-v C-z' `org-babel-switch-to-session-with-code' -`C-c C-v a' or `C-c C-v C-a' `org-babel-sha1-hash' -`C-c C-v h' or `C-c C-v C-h' `org-babel-describe-bindings' -`C-c C-v x' or `C-c C-v C-x' `org-babel-do-key-sequence-in-edit-buffer' - - -File: org, Node: Batch execution, Prev: Key bindings and useful functions, Up: Working with source code - -14.12 Batch execution -===================== - -Org mode features, including working with source code facilities can be -invoked from the command line. This enables building shell scripts for -batch processing, running automated system tasks, and expanding Org -mode's usefulness. - - The sample script shows batch processing of multiple files using -`org-babel-tangle'. - - #!/bin/sh - # -*- mode: shell-script -*- - # - # tangle files with org-mode - # - DIR=`pwd` - FILES="" - - # wrap each argument in the code required to call tangle on it - for i in $@; do - FILES="$FILES \"$i\"" - done - - emacs -Q --batch \ - --eval "(progn - (require 'org)(require 'ob)(require 'ob-tangle) - (mapc (lambda (file) - (find-file (expand-file-name file \"$DIR\")) - (org-babel-tangle) - (kill-buffer)) '($FILES)))" 2>&1 |grep -i tangled - - -File: org, Node: Miscellaneous, Next: Hacking, Prev: Working with source code, Up: Top - -15 Miscellaneous -**************** - -* Menu: - -* Completion:: M-TAB guesses completions -* Easy templates:: Quick insertion of structural elements -* Speed keys:: Electric commands at the beginning of a headline -* Code evaluation security:: Org mode files evaluate inline code -* Customization:: Adapting Org to changing tastes -* In-buffer settings:: Overview of the #+KEYWORDS -* The very busy C-c C-c key:: When in doubt, press C-c C-c -* Clean view:: Getting rid of leading stars in the outline -* TTY keys:: Using Org on a tty -* Interaction:: With other Emacs packages -* org-crypt:: Encrypting Org files - - -File: org, Node: Completion, Next: Easy templates, Up: Miscellaneous - -15.1 Completion -=============== - -Org has in-buffer completions. Unlike minibuffer completions, which are -useful for quick command interactions, Org's in-buffer completions are -more suitable for content creation in Org documents. Type one or more -letters and invoke the hot key to complete the text in-place. -Depending on the context and the keys, Org will offer different types -of completions. No minibuffer is involved. Such mode-specific hot -keys have become an integral part of Emacs and Org provides several -shortcuts. - -`M-' - Complete word at point - * At the beginning of a headline, complete TODO keywords. - - * After `\', complete TeX symbols supported by the exporter. - - * After `*', complete headlines in the current buffer so that - they can be used in search links like `[[*find this - headline]]'. - - * After `:' in a headline, complete tags. The list of tags is - taken from the variable `org-tag-alist' (possibly set through - the `#+TAGS' in-buffer option, *note Setting tags::), or it - is created dynamically from all tags used in the current - buffer. - - * After `:' and not in a headline, complete property keys. The - list of keys is constructed dynamically from all keys used in - the current buffer. - - * After `[', complete link abbreviations (*note Link - abbreviations::). - - * After `#+', complete the special keywords like `TYP_TODO' or - file-specific `OPTIONS'. After option keyword is complete, - pressing `M-' again will insert example settings for - that option. - - * After `#+STARTUP: ', complete startup keywords. - - * When the point is anywhere else, complete dictionary words - using Ispell. - If your desktop intercepts the combo `M-' to switch windows, - use `C-M-i' or ` ' as an alternative or customize your - environment. - - -File: org, Node: Easy templates, Next: Speed keys, Prev: Completion, Up: Miscellaneous - -15.2 Easy templates -=================== - -With just a few keystrokes, Org's easy templates inserts empty pairs of -structural elements, such as `#+BEGIN_SRC' and `#+END_SRC'. Easy -templates use an expansion mechanism, which is native to Org, in a -process similar to `yasnippet' and other Emacs template expansion -packages. - - `<<>' `' `' completes the `src' code block. - - `<' `l' `' - - expands to: - - #+BEGIN_EXPORT latex - - #+END_EXPORT - - Org comes with these pre-defined easy templates: - -`s' `#+BEGIN_SRC ... #+END_SRC' -`e' `#+BEGIN_EXAMPLE ... #+END_EXAMPLE' -`q' `#+BEGIN_QUOTE ... #+END_QUOTE' -`v' `#+BEGIN_VERSE ... #+END_VERSE' -`c' `#+BEGIN_CENTER ... #+END_CENTER' -`l' `#+BEGIN_EXPORT latex ... #+END_EXPORT' -`L' `#+LATEX:' -`h' `#+BEGIN_EXPORT html ... #+END_EXPORT' -`H' `#+HTML:' -`a' `#+BEGIN_EXPORT ascii ... #+END_EXPORT' -`A' `#+ASCII:' -`i' `#+INDEX:' line -`I' `#+INCLUDE:' line - - More templates can added by customizing the variable -`org-structure-template-alist', whose docstring has additional details. - - -File: org, Node: Speed keys, Next: Code evaluation security, Prev: Easy templates, Up: Miscellaneous - -15.3 Speed keys -=============== - -Single keystrokes can execute custom commands in an Org file when the -cursor is on a headline. Without the extra burden of a meta or -modifier key, Speed Keys can speed navigation or execute custom -commands. Besides faster navigation, Speed Keys may come in handy on -small mobile devices that do not have full keyboards. Speed Keys may -also work on TTY devices known for their problems when entering Emacs -keychords. - - By default, Org has Speed Keys disabled. To activate Speed Keys, -configure the variable `org-use-speed-commands'. To trigger a Speed -Key, the cursor must be at the beginning of an Org headline, before any -of the stars. - - Org comes with a pre-defined list of Speed Keys; `?' shows currently -active Speed Keys. To add or modify Speed Keys, customize the variable, -`org-speed-commands-user'. For more details, see the variable's -docstring. - - -File: org, Node: Code evaluation security, Next: Customization, Prev: Speed keys, Up: Miscellaneous - -15.4 Code evaluation and security issues -======================================== - -Unlike plain text, running code comes with risk. Each `src' code block, -in terms of risk, is equivalent to an executable file. Org therefore -puts a few confirmation prompts by default. This is to alert the -casual user from accidentally running untrusted code. - - For users who do not run code blocks or write code regularly, Org's -default settings should suffice. However, some users may want to tweak -the prompts for fewer interruptions. To weigh the risks of automatic -execution of code blocks, here are some details about code evaluation. - - Org evaluates code in the following circumstances: - -Source code blocks - Org evaluates `src' code blocks in an Org file during export. Org - also evaluates a `src' code block with the `C-c C-c' key chord. - Users exporting or running code blocks must load files only from - trusted sources. Be weary of customizing variables that remove or - alter default security measures. - - -- User Option: org-confirm-babel-evaluate - When `t', Org prompts the user for confirmation before - executing each code block. When `nil', Org executes code - blocks without prompting the user for confirmation. When - this option is set to a custom function, Org invokes the - function with these two arguments: the source code language - and the body of the code block. The custom function must - return either a `t' or `nil', which determines if the user is - prompted. Each source code language can be handled - separately through this function argument. - - For example, this function enables execution of `ditaa' code - +blocks without prompting: - - (defun my-org-confirm-babel-evaluate (lang body) - (not (string= lang "ditaa"))) ; don't ask for ditaa - (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate) - -Following `shell' and `elisp' links - Org has two link types that can also directly evaluate code (*note - External links::). Because such code is not visible, these links - have a potential risk. Org therefore prompts the user when it - encounters such links. The customization variables are: - - -- User Option: org-confirm-shell-link-function - Function that prompts the user before executing a shell link. - - -- User Option: org-confirm-elisp-link-function - Function that prompts the user before executing an Emacs Lisp - link. - -Formulas in tables - Org executes formulas in tables (*note The spreadsheet::) either - through the _calc_ or the _Emacs Lisp_ interpreters. - - -File: org, Node: Customization, Next: In-buffer settings, Prev: Code evaluation security, Up: Miscellaneous - -15.5 Customization -================== - -Org has more than 500 variables for customization. They can be accessed -through the usual `M-x org-customize RET' command. Or through the Org -menu, `Org->Customization->Browse Org Group'. Org also has per-file -settings for some variables (*note In-buffer settings::). - - -File: org, Node: In-buffer settings, Next: The very busy C-c C-c key, Prev: Customization, Up: Miscellaneous - -15.6 Summary of in-buffer settings -================================== - -In-buffer settings start with `#+', followed by a keyword, a colon, and -then a word for each setting. Org accepts multiple settings on the same -line. Org also accepts multiple lines for a keyword. This manual -describes these settings throughout. A summary follows here. - - `C-c C-c' activates any changes to the in-buffer settings. Closing -and reopening the Org file in Emacs also activates the changes. - -`#+ARCHIVE: %s_done::' - Sets the archive location of the agenda file. This location - applies to the lines until the next `#+ARCHIVE' line, if any, in - the Org file. The first archive location in the Org file also - applies to any entries before it. The corresponding variable is - `org-archive-location'. - -`#+CATEGORY:' - Sets the category of the agenda file, which applies to the entire - document. - -`#+COLUMNS: %25ITEM ...' - Sets the default format for columns view. Org uses this format - for column views where there is no `COLUMNS' property. - -`#+CONSTANTS: name1=value1 ...' - Set file-local values for constants that table formulas can use. - This line sets the local variable - `org-table-formula-constants-local'. The global version of this - variable is `org-table-formula-constants'. - -`#+FILETAGS: :tag1:tag2:tag3:' - Set tags that all entries in the file will inherit from here, - including the top-level entries. - -`#+LINK: linkword replace' - Each line specifies one abbreviation for one link. Use multiple - `#+LINK:' lines for more, *note Link abbreviations::. The - corresponding variable is `org-link-abbrev-alist'. - -`#+PRIORITIES: highest lowest default' - This line sets the limits and the default for the priorities. All - three must be either letters A-Z or numbers 0-9. The highest - priority must have a lower ASCII number than the lowest priority. - -`#+PROPERTY: Property_Name Value' - This line sets a default inheritance value for entries in the - current buffer, most useful for specifying the allowed values of a - property. - -`#+SETUPFILE: file' - The setup file is for additional in-buffer settings. Org loads - this file and parses it for any settings in it only when Org opens - the main file. `C-c C-c' on the settings line will also parse and - load. Org also parses and loads the file during normal exporting - process. Org parses the contents of this file as if it was - included in the buffer. It can be another Org file. To visit the - file, `C-c '' while the cursor is on the line with the file name. - -`#+STARTUP:' - Startup options Org uses when first visiting a file. - - The first set of options deals with the initial visibility of the - outline tree. The corresponding variable for global default - settings is `org-startup-folded' with a default value of `t', - which is the same as `overview'. - - overview top-level headlines only - content all headlines - showall no folding of any entries - showeverything show even drawer contents - - Dynamic virtual indentation is controlled by the variable - `org-startup-indented' - indent start with `org-indent-mode' turned on - noindent start with `org-indent-mode' turned off - - Aligns tables consistently upon visiting a file; useful for - restoring narrowed table columns. The corresponding variable is - `org-startup-align-all-tables' with `nil' as default value. - - align align all tables - noalign don't align tables on startup - - Whether Org should automatically display inline images. The - corresponding variable is `org-startup-with-inline-images', with a - default value `nil' to avoid delays when visiting a file. - inlineimages show inline images - noinlineimages don't show inline images on startup - - Whether Org should automatically convert LaTeX fragments to - images. The variable `org-startup-with-latex-preview', which - controls this setting, is set to `nil' by default to avoid startup - delays. - latexpreview preview LaTeX fragments - nolatexpreview don't preview LaTeX fragments - - Logging the closing and reopening of TODO items and clock - intervals can be configured using these options (see variables - `org-log-done', `org-log-note-clock-out' and `org-log-repeat') - logdone record a timestamp when an item is marked DONE - lognotedone record timestamp and a note when DONE - nologdone don't record when items are marked DONE - logrepeat record a time when reinstating a repeating item - lognoterepeat record a note when reinstating a repeating item - nologrepeat do not record when reinstating repeating item - lognoteclock-out record a note when clocking out - nolognoteclock-out don't record a note when clocking out - logreschedule record a timestamp when scheduling time changes - lognotereschedule record a note when scheduling time changes - nologreschedule do not record when a scheduling date changes - logredeadline record a timestamp when deadline changes - lognoteredeadline record a note when deadline changes - nologredeadline do not record when a deadline date changes - logrefile record a timestamp when refiling - lognoterefile record a note when refiling - nologrefile do not record when refiling - logdrawer store log into drawer - nologdrawer store log outside of drawer - logstatesreversed reverse the order of states notes - nologstatesreversed do not reverse the order of states notes - - These options hide leading stars in outline headings, and indent - outlines. The corresponding variables are - `org-hide-leading-stars' and `org-odd-levels-only', both with a - default setting of `nil' (meaning `showstars' and `oddeven'). - hidestars hide all stars on the headline except one. - showstars show all stars on the headline - indent virtual indents according to the outline level - noindent no virtual indents - odd show odd outline levels only (1,3,...) - oddeven show all outline levels - - To turn on custom format overlays over timestamps (variables - `org-put-time-stamp-overlays' and - `org-time-stamp-overlay-formats'), use - customtime overlay custom time format - - The following options influence the table spreadsheet (variable - `constants-unit-system'). - constcgs `constants.el' should use the c-g-s unit system - constSI `constants.el' should use the SI unit system - - For footnote settings, use the following keywords. The - corresponding variables are `org-footnote-define-inline', - `org-footnote-auto-label', and `org-footnote-auto-adjust'. - fninline define footnotes inline - fnnoinline define footnotes in separate section - fnlocal define footnotes near first reference, but not inline - fnprompt prompt for footnote labels - fnauto create `[fn:1]'-like labels automatically (default) - fnconfirm offer automatic label for editing or confirmation - fnplain create `[1]'-like labels automatically - fnadjust automatically renumber and sort footnotes - nofnadjust do not renumber and sort automatically - - To hide blocks on startup, use these keywords. The corresponding - variable is `org-hide-block-startup'. - hideblocks Hide all begin/end blocks on startup - nohideblocks Do not hide blocks on startup - - The display of entities as UTF-8 characters is governed by the - variable `org-pretty-entities' and the keywords - entitiespretty Show entities as UTF-8 characters where possible - entitiesplain Leave entities plain - -`#+TAGS: TAG1(c1) TAG2(c2)' - These lines specify valid tags for this file. Org accepts - multiple tags lines. Tags could correspond to the _fast tag - selection_ keys. The corresponding variable is `org-tag-alist'. - -`#+TBLFM:' - This line is for formulas for the table directly above. A table - can have multiple `#+TBLFM:' lines. On table recalculation, Org - applies only the first `#+TBLFM:' line. For details see *note - Using multiple #+TBLFM lines:: in *note Editing and debugging - formulas::. - -`#+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+DATE:,' -`#+OPTIONS:, #+BIND:,' -`#+SELECT_TAGS:, #+EXCLUDE_TAGS:' - These lines provide settings for exporting files. For more - details see *note Export settings::. - -`#+TODO: #+SEQ_TODO: #+TYP_TODO:' - These lines set the TODO keywords and their significance to the - current file. The corresponding variable is `org-todo-keywords'. - - -File: org, Node: The very busy C-c C-c key, Next: Clean view, Prev: In-buffer settings, Up: Miscellaneous - -15.7 The very busy C-c C-c key -============================== - -The `C-c C-c' key in Org serves many purposes depending on the context. -It is probably the most over-worked, multi-purpose key combination in -Org. Its uses are well-documented through out this manual, but here is -a consolidated list for easy reference. - - - If any highlights shown in the buffer from the creation of a - sparse tree, or from clock display, remove such highlights. - - - If the cursor is in one of the special `#+KEYWORD' lines, scan the - buffer for these lines and update the information. - - - If the cursor is inside a table, realign the table. The table - realigns even if automatic table editor is turned off. - - - If the cursor is on a `#+TBLFM' line, re-apply the formulas to the - entire table. - - - If the current buffer is a capture buffer, close the note and file - it. With a prefix argument, also jump to the target location - after saving the note. - - - If the cursor is on a `<<>>', update radio targets and - corresponding links in this buffer. - - - If the cursor is on a property line or at the start or end of a - property drawer, offer property commands. - - - If the cursor is at a footnote reference, go to the corresponding - definition, and _vice versa_. - - - If the cursor is on a statistics cookie, update it. - - - If the cursor is in a plain list item with a checkbox, toggle the - status of the checkbox. - - - If the cursor is on a numbered item in a plain list, renumber the - ordered list. - - - If the cursor is on the `#+BEGIN' line of a dynamic block, the - block is updated. - - - If the cursor is at a timestamp, fix the day name in the timestamp. - - -File: org, Node: Clean view, Next: TTY keys, Prev: The very busy C-c C-c key, Up: Miscellaneous - -15.8 A cleaner outline view -=========================== - -Org's default outline with stars and no indents can become too -cluttered for short documents. For _book-like_ long documents, the -effect is not as noticeable. Org provides an alternate stars and -indentation scheme, as shown on the right in the following table. It -uses only one star and indents text to line with the heading: - - * Top level headline | * Top level headline - ** Second level | * Second level - *** 3rd level | * 3rd level - some text | some text - *** 3rd level | * 3rd level - more text | more text - * Another top level headline | * Another top level headline - -To turn this mode on, use the minor mode, `org-indent-mode'. Text lines -that are not headlines are prefixed with spaces to vertically align -with the headline text(1). - - To make more horizontal space, the headlines are shifted by two -stars. This can be configured by the -`org-indent-indentation-per-level' variable. Only one star on each -headline is visible, the rest are masked with the same font color as -the background. This font face can be configured with the `org-hide' -variable. - - Note that turning on `org-indent-mode' sets `org-hide-leading-stars' -to `t' and `org-adapt-indentation' to `nil'; `2.' below shows how this -works. - - To globally turn on `org-indent-mode' for all files, customize the -variable `org-startup-indented'. - - To turn on indenting for individual files, use `#+STARTUP' option as -follows: - - #+STARTUP: indent - - Indent on startup makes Org use hard spaces to align text with -headings as shown in examples below. - - 1. _Indentation of text below headlines_ - Indent text to align with the headline. - - *** 3rd level - more text, now indented - - Org adapts indentations with paragraph filling, line wrapping, and - structure editing(2). - - 2. _Hiding leading stars_ - Org can make leading stars invisible. For global preference, - configure the variable `org-hide-leading-stars'. For per-file - preference, use these file `#+STARTUP' options: - - #+STARTUP: hidestars - #+STARTUP: showstars - - With stars hidden, the tree is shown as: - - * Top level headline - * Second level - * 3rd level - ... - - Because Org makes the font color same as the background color to - hide to stars, sometimes `org-hide' face may need tweaking to get - the effect right. For some black and white combinations, `grey90' - on a white background might mask the stars better. - - 3. Using stars for only odd levels, 1, 3, 5, ..., can also clean up - the clutter. This removes two stars from each level(3). For Org - to properly handle this cleaner structure during edits and - exports, configure the variable `org-odd-levels-only'. To set - this per-file, use either one of the following lines: - - #+STARTUP: odd - #+STARTUP: oddeven - - To switch between single and double stars layouts, use `M-x - org-convert-to-odd-levels RET' and `M-x - org-convert-to-oddeven-levels'. - - ---------- Footnotes ---------- - - (1) The `org-indent-mode' also sets the `wrap-prefix' correctly for -indenting and wrapping long lines of headlines or text. This minor -mode handles `visual-line-mode' and directly applied settings through -`word-wrap'. - - (2) Also see the variable `org-adapt-indentation'. - - (3) Because `LEVEL=2' has 3 stars, `LEVEL=3' has 4 stars, and so on - - -File: org, Node: TTY keys, Next: Interaction, Prev: Clean view, Up: Miscellaneous - -15.9 Using Org on a tty -======================= - -Org provides alternative key bindings for TTY and modern mobile devices -that cannot handle cursor keys and complex modifier key chords. Some -of these workarounds may be more cumbersome than necessary. Users -should look into customizing these further based on their usage needs. -For example, the normal `S-' for editing timestamp might be -better with `C-c .' chord. - -Default Alternative 1 Speed Alternative 2 - key -`S-' `C-u ' `C' -`M-' `C-c C-x l' `l' ` ' -`M-S-'`C-c C-x L' `L' -`M-' `C-c C-x r' `r' ` - ' -`M-S-'`C-c C-x R' `R' -`M-' `C-c C-x u' ` ' ` ' -`M-S-' `C-c C-x U' `U' -`M-' `C-c C-x d' ` ' ` ' -`M-S-'`C-c C-x D' `D' -`S-' `C-c C-x c' ` ' -`M-' `C-c C-x m' ` ' ` ' -`M-S-' `C-c C-x M' ` ' -`S-' `C-c ' ` ' -`S-' `C-c ' ` ' -`S-' `C-c ' ` ' -`S-' `C-c ' ` ' -`C-S-'`C-c C-x ` ' - ' -`C-S-'`C-c C-x ` ' - ' - - -File: org, Node: Interaction, Next: org-crypt, Prev: TTY keys, Up: Miscellaneous - -15.10 Interaction with other packages -===================================== - -Org's compatibility and the level of interaction with other Emacs -packages are documented here. - -* Menu: - -* Cooperation:: Packages Org cooperates with -* Conflicts:: Packages that lead to conflicts - - -File: org, Node: Cooperation, Next: Conflicts, Up: Interaction - -15.10.1 Packages that Org cooperates with ------------------------------------------ - -`calc.el' by Dave Gillespie - Org uses the Calc package for tables to implement spreadsheet - functionality (*note The spreadsheet::). Org also uses Calc for - embedded calculations. *Note Embedded Mode: (calc)Embedded Mode. - -`constants.el' by Carsten Dominik - Org can use names for constants in formulas in tables. Org can - also use calculation suffixes for units, such as `M' for `Mega'. - For a standard collection of such constants, install the - `constants' package. Install version 2.0 of this package, - available at `https://staff.fnwi.uva.nl/c.dominik/Tools/'. Org - checks if the function `constants-get' has been autoloaded. - Installation instructions are in the file, `constants.el'. - -`cdlatex.el' by Carsten Dominik - Org mode can use CDLaTeX package to efficiently enter LaTeX - fragments into Org files (*note CDLaTeX mode::). - -`imenu.el' by Ake Stenhoff and Lars Lindberg - Imenu creates dynamic menus based on an index of items in a file. - Org mode supports Imenu menus. Enable it with a mode hook as - follows: - (add-hook 'org-mode-hook - (lambda () (imenu-add-to-menubar "Imenu"))) - By default the Imenu index is two levels deep. Change the index - depth using thes variable, `org-imenu-depth'. - -`speedbar.el' by Eric M. Ludlam - Speedbar package creates a special Emacs frame for displaying - files and index items in files. Org mode supports Speedbar; users - can drill into Org files directly from the Speedbar. The `<' in - the Speedbar frame tweeks the agenda commands to that file or to a - subtree. - -`table.el' by Takaaki Ota - Complex ASCII tables with automatic line wrapping, column- and - row-spanning, and alignment can be created using the Emacs table - package by Takaaki Ota. Org mode recognizes such tables and - export them properly. `C-c '' to edit these tables in a special - buffer, much like Org's `src' code blocks. Because of - interference with other Org mode functionality, Takaaki Ota tables - cannot be edited directly in the Org buffer. - `C-c ' (`org-edit-special')' - Edit a `table.el' table. Works when the cursor is in a - table.el table. - - `C-c ~ (`org-table-create-with-table.el')' - Insert a `table.el' table. If there is already a table at - point, this command converts it between the `table.el' format - and the Org mode format. See the documentation string of the - command `org-convert-table' for details. - - -File: org, Node: Conflicts, Prev: Cooperation, Up: Interaction - -15.10.2 Packages that conflict with Org mode --------------------------------------------- - - In Emacs, `shift-selection-mode' combines cursor motions with - shift key to enlarge regions. Emacs sets this mode by default. - This conflicts with Org's use of `S-' commands to change - timestamps, TODO keywords, priorities, and item bullet types, etc. - Since `S-' commands outside of specific contexts don't do - anything, Org offers the variable `org-support-shift-select' for - customization. Org mode accommodates shift selection by (i) - making it available outside of the special contexts where special - commands apply, and (ii) extending an existing active region even - if the cursor moves across a special context. - -`CUA.el' by Kim. F. Storm - Org key bindings conflict with `S-' keys used by CUA mode. - For Org to relinquish these bindings to CUA mode, configure the - variable `org-replace-disputed-keys'. When set, Org moves the - following key bindings in Org files, and in the agenda buffer (but - not during date selection). - - S-UP => M-p S-DOWN => M-n - S-LEFT => M-- S-RIGHT => M-+ - C-S-LEFT => M-S-- C-S-RIGHT => M-S-+ - - Yes, these are unfortunately more difficult to remember. To - define a different replacement keys, look at the variable - `org-disputed-keys'. - -`ecomplete.el' by Lars Magne Ingebrigtsen - Ecomplete provides "electric" address completion in address header - lines in message buffers. Sadly Orgtbl mode cuts ecompletes power - supply: No completion happens when Orgtbl mode is enabled in - message buffers while entering text in address header lines. If - one wants to use ecomplete one should _not_ follow the advice to - automagically turn on Orgtbl mode in message buffers (see *note - Orgtbl mode::), but instead--after filling in the message - headers--turn on Orgtbl mode manually when needed in the messages - body. - -`filladapt.el' by Kyle Jones - Org mode tries to do the right thing when filling paragraphs, list - items and other elements. Many users reported problems using both - `filladapt.el' and Org mode, so a safe thing to do is to disable - filladapt like this: - - (add-hook 'org-mode-hook 'turn-off-filladapt-mode) - -`yasnippet.el' - The way Org mode binds the key (binding to `[tab]' instead of - `"\t"') overrules YASnippet's access to this key. The following - code fixed this problem: - - (add-hook 'org-mode-hook - (lambda () - (setq-local yas/trigger-key [tab]) - (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand))) - - The latest version of yasnippet doesn't play well with Org mode. - If the above code does not fix the conflict, first define the - following function: - - (defun yas/org-very-safe-expand () - (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) - - Then tell Org mode to use that function: - - (add-hook 'org-mode-hook - (lambda () - (make-variable-buffer-local 'yas/trigger-key) - (setq yas/trigger-key [tab]) - (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) - (define-key yas/keymap [tab] 'yas/next-field))) - -`windmove.el' by Hovav Shacham - This package also uses the `S-' keys, so everything written - in the paragraph above about CUA mode also applies here. If you - want make the windmove function active in locations where Org mode - does not have special functionality on `S-', add this to - your configuration: - - ;; Make windmove work in org-mode: - (add-hook 'org-shiftup-final-hook 'windmove-up) - (add-hook 'org-shiftleft-final-hook 'windmove-left) - (add-hook 'org-shiftdown-final-hook 'windmove-down) - (add-hook 'org-shiftright-final-hook 'windmove-right) - -`viper.el' by Michael Kifer - Viper uses `C-c /' and therefore makes this key not access the - corresponding Org mode command `org-sparse-tree'. You need to find - another key for this command, or override the key in - `viper-vi-global-user-map' with - - (define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree) - - - -File: org, Node: org-crypt, Prev: Interaction, Up: Miscellaneous - -15.11 org-crypt.el -================== - -Org crypt encrypts the text of an Org entry, but not the headline, or -properties. Org crypt uses the Emacs EasyPG library to encrypt and -decrypt. - - Any text below a headline that has a `:crypt:' tag will be -automatically be encrypted when the file is saved. To use a different -tag, customize the `org-crypt-tag-matcher' variable. - - Suggested Org crypt settings in Emacs init file: - - (require 'org-crypt) - (org-crypt-use-before-save-magic) - (setq org-tags-exclude-from-inheritance (quote ("crypt"))) - - (setq org-crypt-key nil) - ;; GPG key to use for encryption - ;; Either the Key ID or set to nil to use symmetric encryption. - - (setq auto-save-default nil) - ;; Auto-saving does not cooperate with org-crypt.el: so you need - ;; to turn it off if you plan to use org-crypt.el quite often. - ;; Otherwise, you'll get an (annoying) message each time you - ;; start Org. - - ;; To turn it off only locally, you can insert this: - ;; - ;; # -*- buffer-auto-save-file-name: nil; -*- - - Excluding the crypt tag from inheritance prevents encrypting -previously encrypted text. - - -File: org, Node: Hacking, Next: MobileOrg, Prev: Miscellaneous, Up: Top - -Appendix A Hacking -****************** - -This appendix covers some areas where users can extend the -functionality of Org. - -* Menu: - -* Hooks:: How to reach into Org's internals -* Add-on packages:: Available extensions -* Adding hyperlink types:: New custom link types -* Adding export back-ends:: How to write new export back-ends -* Context-sensitive commands:: How to add functionality to such commands -* Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs -* Dynamic blocks:: Automatically filled blocks -* Special agenda views:: Customized views -* Speeding up your agendas:: Tips on how to speed up your agendas -* Extracting agenda information:: Post-processing of agenda information -* Using the property API:: Writing programs that use entry properties -* Using the mapping API:: Mapping over all or selected entries - - -File: org, Node: Hooks, Next: Add-on packages, Up: Hacking - -A.1 Hooks -========= - -Org has a large number of hook variables for adding functionality. This -appendix illustrates using a few. A complete list of hooks with -documentation is maintained by the Worg project at -`http://orgmode.org/worg/doc.html#hooks'. - - -File: org, Node: Add-on packages, Next: Adding hyperlink types, Prev: Hooks, Up: Hacking - -A.2 Add-on packages -=================== - -Various authors wrote a large number of add-on packages for Org. - - These packages are not part of Emacs, but they are distributed as -contributed packages with the separate release available at -`http://orgmode.org'. See the `contrib/README' file in the source code -directory for a list of contributed files. Worg page with more -information is at: `http://orgmode.org/worg/org-contrib/'. - - -File: org, Node: Adding hyperlink types, Next: Adding export back-ends, Prev: Add-on packages, Up: Hacking - -A.3 Adding hyperlink types -========================== - -Org has many built-in hyperlink types (*note Hyperlinks::), and an -interface for adding new link types. The example file, `org-man.el', -shows the process of adding Org links to Unix man pages, which look -like this: `[[man:printf][The printf manpage]]': - - ;;; org-man.el - Support for links to manpages in Org - - (require 'org) - - (org-add-link-type "man" 'org-man-open) - (add-hook 'org-store-link-functions 'org-man-store-link) - - (defcustom org-man-command 'man - "The Emacs command to be used to display a man page." - :group 'org-link - :type '(choice (const man) (const woman))) - - (defun org-man-open (path) - "Visit the manpage on PATH. - PATH should be a topic that can be thrown at the man command." - (funcall org-man-command path)) - - (defun org-man-store-link () - "Store a link to a manpage." - (when (memq major-mode '(Man-mode woman-mode)) - ;; This is a man page, we do make this link - (let* ((page (org-man-get-page-name)) - (link (concat "man:" page)) - (description (format "Manpage for %s" page))) - (org-store-link-props - :type "man" - :link link - :description description)))) - - (defun org-man-get-page-name () - "Extract the page name from the buffer name." - ;; This works for both `Man-mode' and `woman-mode'. - (if (string-match " \\(\\S-+\\)\\*" (buffer-name)) - (match-string 1 (buffer-name)) - (error "Cannot create link to this man page"))) - - (provide 'org-man) - - ;;; org-man.el ends here - -To activate links to man pages in Org, enter this in the init file: - - (require 'org-man) - -A review of `org-man.el': - 1. First, `(require 'org)' ensures `org.el' is loaded. - - 2. The `org-add-link-type' defines a new link type with `man' prefix. - The call contains the function to call that follows the link type. - - 3. The next line adds a function to `org-store-link-functions' that - records a useful link with the command `C-c l' in a buffer - displaying a man page. - - The rest of the file defines necessary variables and functions. -First is the customization variable `org-man-command'. It has two -options, `man' and `woman'. Next is a function whose argument is the -link path, which for man pages is the topic of the man command. To -follow the link, the function calls the `org-man-command' to display -the man page. - - `C-c l' constructs and stores the link. - - `C-c l' calls the function `org-man-store-link', which first checks -if the `major-mode' is appropriate. If check fails, the function -returns `nil'. Otherwise the function makes a link string by combining -the `man:' prefix with the man topic. The function then calls -`org-store-link-props' with `:type' and `:link' properties. A -`:description' property is an optional string that is displayed when the -function inserts the link in the Org buffer. - - `C-c C-l' inserts the stored link. - - To define new link types, define a function that implements -completion support with `C-c C-l'. This function should not accept any -arguments but return the appropriate prefix and complete link string. - - -File: org, Node: Adding export back-ends, Next: Context-sensitive commands, Prev: Adding hyperlink types, Up: Hacking - -A.4 Adding export back-ends -=========================== - -Org's export engine makes it easy for writing new back-ends. The -framework on which the engine was built makes it easy to derive new -back-ends from existing ones. - - The two main entry points to the export engine are: -`org-export-define-backend' and `org-export-define-derived-backend'. -To grok these functions, see `ox-latex.el' for an example of defining a -new back-end from scratch, and `ox-beamer.el' for an example of -deriving from an existing engine. - - For creating a new back-end from scratch, first set its name as a -symbol in an alist consisting of elements and export functions. To -make the back-end visible to the export dispatcher, set `:menu-entry' -keyword. For export options specific to this back-end, set the -`:options-alist'. - - For creating a new back-end from an existing one, set -`:translate-alist' to an alist of export functions. This alist -replaces the parent back-end functions. - - For complete documentation, see the Org Export Reference on Worg -(http://orgmode.org/worg/dev/org-export-reference.html). - - -File: org, Node: Context-sensitive commands, Next: Tables in arbitrary syntax, Prev: Adding export back-ends, Up: Hacking - -A.5 Context-sensitive commands -============================== - -Org has facilities for building context sensitive commands. Authors of -Org add-ons can tap into this functionality. - - Some Org commands change depending on the context. The most -important example of this behavior is the `C-c C-c' (*note The very -busy C-c C-c key::). Other examples are `M-cursor' and `M-S-cursor'. - - These context sensitive commands work by providing a function that -detects special context for that add-on and executes functionality -appropriate for that context. - - -File: org, Node: Tables in arbitrary syntax, Next: Dynamic blocks, Prev: Context-sensitive commands, Up: Hacking - -A.6 Tables and lists in arbitrary syntax -======================================== - -Because of Org's success in handling tables with Orgtbl, a frequently -asked feature is to Org's usability functions to other table formats -native to other modem's, such as LaTeX. This would be hard to do in a -general way without complicated customization nightmares. Moreover, -that would take Org away from its simplicity roots that Orgtbl has -proven. There is, however, an alternate approach to accomplishing the -same. - - This approach involves implementing a custom _translate_ function -that operates on a native Org _source table_ to produce a table in -another format. This strategy would keep the excellently working -Orgtbl simple and isolate complications, if any, confined to the -translate function. To add more alien table formats, we just add more -translate functions. Also the burden of developing custom translate -functions for new table formats will be in the hands of those who know -those formats best. - - For an example of how this strategy works, see Orgstruct mode. In -that mode, Bastien added the ability to use Org's facilities to edit -and re-structure lists. He did by turning `orgstruct-mode' on, and -then exporting the list locally to another format, such as HTML, LaTeX -or Texinfo. - -* Menu: - -* Radio tables:: Sending and receiving radio tables -* A LaTeX example:: Step by step, almost a tutorial -* Translator functions:: Copy and modify -* Radio lists:: Sending and receiving lists - - -File: org, Node: Radio tables, Next: A LaTeX example, Up: Tables in arbitrary syntax - -A.6.1 Radio tables ------------------- - -Radio tables are target locations for translated tables that are not -near their source. Org finds the target location and inserts the -translated table. - - The key to finding the target location are the magic words `BEGIN/END -RECEIVE ORGTBL'. They have to appear as comments in the current mode. -If the mode is C, then: - - /* BEGIN RECEIVE ORGTBL table_name */ - /* END RECEIVE ORGTBL table_name */ - -At the location of source, Org needs a special line to direct Orgtbl to -translate and to find the target for inserting the translated table. -For example: - #+ORGTBL: SEND table_name translation_function arguments... - -`table_name' is the table's reference name, which is also used in the -receiver lines, and the `translation_function' is the Lisp function that -translates. This line, in addition, may also contain alternating key -and value arguments at the end. The translation function gets these -values as a property list. A few standard parameters are already -recognized and acted upon before the translation function is called: - -`:skip N' - Skip the first N lines of the table. Hlines do count; include - them if they are to be skipped. - -`:skipcols (n1 n2 ...)' - List of columns to be skipped. First Org automatically discards - columns with calculation marks and then sends the table to the - translator function, which then skips columns as specified in - `skipcols'. - -To keep the source table intact in the buffer without being disturbed -when the source file is compiled or otherwise being worked on, use one -of these strategies: - - * Place the table in a block comment. For example, in C mode you - could wrap the table between `/*' and `*/' lines. - - * Put the table after an `END' statement. For example `\bye' in TeX - and `\end{document}' in LaTeX. - - * Comment and uncomment each line of the table during edits. The - `M-x orgtbl-toggle-comment RET' command makes toggling easy. - - -File: org, Node: A LaTeX example, Next: Translator functions, Prev: Radio tables, Up: Tables in arbitrary syntax - -A.6.2 A LaTeX example of radio tables -------------------------------------- - -To wrap a source table in LaTeX, use the `comment' environment provided -by `comment.sty'. To activate it, put `\usepackage{comment}' in the -document header. Orgtbl mode inserts a radio table skeleton(1) with -the command `M-x orgtbl-insert-radio-table RET', which prompts for a -table name. For example, if `salesfigures' is the name, the template -inserts: - - % BEGIN RECEIVE ORGTBL salesfigures - % END RECEIVE ORGTBL salesfigures - \begin{comment} - #+ORGTBL: SEND salesfigures orgtbl-to-latex - | | | - \end{comment} - -The line `#+ORGTBL: SEND' tells Orgtbl mode to use the function -`orgtbl-to-latex' to convert the table to LaTeX format, then insert the -table at the target (receive) location named `salesfigures'. Now the -table is ready for data entry. It can even use spreadsheet features(2): - - % BEGIN RECEIVE ORGTBL salesfigures - % END RECEIVE ORGTBL salesfigures - \begin{comment} - #+ORGTBL: SEND salesfigures orgtbl-to-latex - | Month | Days | Nr sold | per day | - |-------+------+---------+---------| - | Jan | 23 | 55 | 2.4 | - | Feb | 21 | 16 | 0.8 | - | March | 22 | 278 | 12.6 | - #+TBLFM: $4=$3/$2;%.1f - % $ (optional extra dollar to keep font-lock happy, see footnote) - \end{comment} - -After editing, `C-c C-c' inserts translated table at the target -location, between the two marker lines. - - For hand-made custom tables, note that the translator needs to skip -the first two lines of the source table. Also the command has to -_splice_ out the target table without the header and footer. - - \begin{tabular}{lrrr} - Month & \multicolumn{1}{c}{Days} & Nr.\ sold & per day\\ - % BEGIN RECEIVE ORGTBL salesfigures - % END RECEIVE ORGTBL salesfigures - \end{tabular} - % - \begin{comment} - #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 - | Month | Days | Nr sold | per day | - |-------+------+---------+---------| - | Jan | 23 | 55 | 2.4 | - | Feb | 21 | 16 | 0.8 | - | March | 22 | 278 | 12.6 | - #+TBLFM: $4=$3/$2;%.1f - \end{comment} - - The LaTeX translator function `orgtbl-to-latex' is already part of -Orgtbl mode and uses `tabular' environment by default to typeset the -table and mark the horizontal lines with `\hline'. For additional -parameters to control output, *note Translator functions::: - -`:splice nil/t' - When non-`nil', returns only table body lines; not wrapped in - tabular environment. Default is `nil'. - -`:fmt fmt' - Format to warp each field. It should contain `%s' for the original - field value. For example, to wrap each field value in dollar - symbol, you could use `:fmt "$%s$"'. Format can also wrap a - property list with column numbers and formats, for example `:fmt - (2 "$%s$" 4 "%s\\%%")'. In place of a string, a function of one - argument can be used; the function must return a formatted string. - -`:efmt efmt' - Format numbers as exponentials. The spec should have `%s' twice - for inserting mantissa and exponent, for example - `"%s\\times10^{%s}"'. This may also be a property list with - column numbers and formats, for example `:efmt (2 - "$%s\\times10^{%s}$" 4 "$%s\\cdot10^{%s}$")'. After `efmt' has - been applied to a value, `fmt' will also be applied. Functions - with two arguments can be supplied instead of strings. By default, - no special formatting is applied. - - ---------- Footnotes ---------- - - (1) By default this works only for LaTeX, HTML, and Texinfo. -Configure the variable `orgtbl-radio-table-templates' to install -templates for other export formats. - - (2) If the `#+TBLFM' line contains an odd number of dollar -characters, this may cause problems with font-lock in LaTeX mode. As -shown in the example you can fix this by adding an extra line inside the -`comment' environment that is used to balance the dollar expressions. -If you are using AUCTeX with the font-latex library, a much better -solution is to add the `comment' environment to the variable -`LaTeX-verbatim-environments'. - - -File: org, Node: Translator functions, Next: Radio lists, Prev: A LaTeX example, Up: Tables in arbitrary syntax - -A.6.3 Translator functions --------------------------- - -Orgtbl mode has built-in translator functions: `orgtbl-to-csv' -(comma-separated values), `orgtbl-to-tsv' (TAB-separated values) -`orgtbl-to-latex', `orgtbl-to-html', `orgtbl-to-texinfo', -`orgtbl-to-unicode' and `orgtbl-to-orgtbl'. They use the generic -translator, `orgtbl-to-generic', which delegates translations to various -export back-ends. - - Properties passed to the function through the `ORGTBL SEND' line take -precedence over properties defined inside the function. For example, -this overrides the default LaTeX line endings, `\\', with `\\[2mm]': - - #+ORGTBL: SEND test orgtbl-to-latex :lend " \\\\[2mm]" - - For a new language translator, define a converter function. It can -be a generic function, such as shown in this example. It marks a -beginning and ending of a table with `!BTBL!' and `!ETBL!'; a beginning -and ending of lines with `!BL!' and `!EL!'; and uses a TAB for a field -separator: - - (defun orgtbl-to-language (table params) - "Convert the orgtbl-mode TABLE to language." - (orgtbl-to-generic - table - (org-combine-plists - '(:tstart "!BTBL!" :tend "!ETBL!" :lstart "!BL!" :lend "!EL!" :sep "\t") - params))) - -The documentation for the `orgtbl-to-generic' function shows a complete -list of parameters, each of which can be passed through to -`orgtbl-to-latex', `orgtbl-to-texinfo', and any other function using -that generic function. - - For complicated translations the generic translator function could be -replaced by a custom translator function. Such a custom function must -take two arguments and return a single string containing the formatted -table. The first argument is the table whose lines are a list of -fields or the symbol `hline'. The second argument is the property list -consisting of parameters specified in the `#+ORGTBL: SEND' line. -Please share your translator functions by posting them to the Org users -mailing list, . - - -File: org, Node: Radio lists, Prev: Translator functions, Up: Tables in arbitrary syntax - -A.6.4 Radio lists ------------------ - -Call the `org-list-insert-radio-list' function to insert a radio list -template in HTML, LaTeX, and Texinfo mode documents. Sending and -receiving radio lists works is the same as for radio tables (*note -Radio tables::) except for these differences: - - - Orgstruct mode must be active. - - - Use `ORGLST' keyword instead of `ORGTBL'. - - - `C-c C-c' works only on the first list item. - - Built-in translators functions are: `org-list-to-latex', -`org-list-to-html' and `org-list-to-texinfo'. They use the -`org-list-to-generic' translator function. See its documentation for -parameters for accurate customizations of lists. Here is a LaTeX -example: - - % BEGIN RECEIVE ORGLST to-buy - % END RECEIVE ORGLST to-buy - \begin{comment} - #+ORGLST: SEND to-buy org-list-to-latex - - a new house - - a new computer - + a new keyboard - + a new mouse - - a new life - \end{comment} - - `C-c C-c' on `a new house' inserts the translated LaTeX list -in-between the BEGIN and END marker lines. - - -File: org, Node: Dynamic blocks, Next: Special agenda views, Prev: Tables in arbitrary syntax, Up: Hacking - -A.7 Dynamic blocks -================== - -Org supports _dynamic blocks_ in Org documents. They are inserted with -begin and end markers like any other `src' code block, but the contents -are updated automatically by a user function. For example, `C-c C-x -C-r' inserts a dynamic table that updates the work time (*note Clocking -work time::). - - Dynamic blocks can have names and function parameters. The syntax -is similar to `src' code block specifications: - - #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ... - - #+END: - - These command update dynamic blocks: - -`C-c C-x C-u (`org-dblock-update')' - Update dynamic block at point. - -`C-u C-c C-x C-u' - Update all dynamic blocks in the current file. - - Before updating a dynamic block, Org removes content between the -BEGIN and END markers. Org then reads the parameters on the BEGIN line -for passing to the writer function. If the function expects to access -the removed content, then Org expects an extra parameter, `:content', -on the BEGIN line. - - To syntax for calling a writer function with a named block, `myblock' -is: `org-dblock-write:myblock'. Parameters come from the BEGIN line. - - The following is an example of a dynamic block and a block writer -function that updates the time when the function was last run: - - #+BEGIN: block-update-time :format "on %m/%d/%Y at %H:%M" - - #+END: - -The dynamic block's writer function: - - (defun org-dblock-write:block-update-time (params) - (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) - (insert "Last block update at: " - (format-time-string fmt)))) - - To keep dynamic blocks up-to-date in an Org file, use the function, -`org-update-all-dblocks' in hook, such as `before-save-hook'. The -`org-update-all-dblocks' function does not run if the file is not in -Org mode. - - Dynamic blocks, like any other block, can be narrowed with -`org-narrow-to-block'. - - -File: org, Node: Special agenda views, Next: Speeding up your agendas, Prev: Dynamic blocks, Up: Hacking - -A.8 Special agenda views -======================== - -Org provides a special hook to further limit items in agenda views: -`agenda', `agenda*'(1), `todo', `alltodo', `tags', `tags-todo', -`tags-tree'. Specify a custom function that tests inclusion of every -matched item in the view. This function can also skip as much as is -needed. - - For a global condition applicable to agenda views, use the -`org-agenda-skip-function-global' variable. Org uses a global condition -with `org-agenda-skip-function' for custom searching. - - This example defines a function for a custom view showing TODO items -with WAITING status. Manually this is a multi step search process, but -with a custom view, this can be automated as follows: - - The custom function searches the subtree for the WAITING tag and -returns `nil' on match. Otherwise it gives the location from where the -search continues. - - (defun my-skip-unless-waiting () - "Skip trees that are not waiting" - (let ((subtree-end (save-excursion (org-end-of-subtree t)))) - (if (re-search-forward ":waiting:" subtree-end t) - nil ; tag found, do not skip - subtree-end))) ; tag not found, continue after end of subtree - - To use this custom function in a custom agenda command: - - (org-add-agenda-custom-command - '("b" todo "PROJECT" - ((org-agenda-skip-function 'my-skip-unless-waiting) - (org-agenda-overriding-header "Projects waiting for something: ")))) - - Note that this also binds `org-agenda-overriding-header' to a more -meaningful string suitable for the agenda view. - - Search for entries with a limit set on levels for the custom search. -This is a general appraoch to creating custom searches in Org. To -include all levels, use `LEVEL>0'(2). Then to selectively pick the -matched entries, use `org-agenda-skip-function', which also accepts Lisp -forms, such as `org-agenda-skip-entry-if' and -`org-agenda-skip-subtree-if'. For example: - -`(org-agenda-skip-entry-if 'scheduled)' - Skip current entry if it has been scheduled. - -`(org-agenda-skip-entry-if 'notscheduled)' - Skip current entry if it has not been scheduled. - -`(org-agenda-skip-entry-if 'deadline)' - Skip current entry if it has a deadline. - -`(org-agenda-skip-entry-if 'scheduled 'deadline)' - Skip current entry if it has a deadline, or if it is scheduled. - -`(org-agenda-skip-entry-if 'todo '("TODO" "WAITING"))' - Skip current entry if the TODO keyword is TODO or WAITING. - -`(org-agenda-skip-entry-if 'todo 'done)' - Skip current entry if the TODO keyword marks a DONE state. - -`(org-agenda-skip-entry-if 'timestamp)' - Skip current entry if it has any timestamp, may also be deadline - or scheduled. - -`(org-agenda-skip-entry-if 'regexp "regular expression")' - Skip current entry if the regular expression matches in the entry. - -`(org-agenda-skip-entry-if 'notregexp "regular expression")' - Skip current entry unless the regular expression matches. - -`(org-agenda-skip-subtree-if 'regexp "regular expression")' - Same as above, but check and skip the entire subtree. - - The following is an example of a search for `WAITING' without the -special function: - - (org-add-agenda-custom-command - '("b" todo "PROJECT" - ((org-agenda-skip-function '(org-agenda-skip-subtree-if - 'regexp ":waiting:")) - (org-agenda-overriding-header "Projects waiting for something: ")))) - - ---------- Footnotes ---------- - - (1) The `agenda*' view is the same as `agenda' except that it only -considers _appointments_, i.e., scheduled and deadline items that have -a time specification `[h]h:mm' in their time-stamps. - - (2) Note that, for `org-odd-levels-only', a level number corresponds -to order in the hierarchy, not to the number of stars. - - -File: org, Node: Speeding up your agendas, Next: Extracting agenda information, Prev: Special agenda views, Up: Hacking - -A.9 Speeding up your agendas -============================ - -Some agenda commands slow down when the Org files grow in size or -number. Here are tips to speed up: - - 1. Reduce the number of Org agenda files to avoid slowdowns due to - hard drive accesses. - - 2. Reduce the number of `DONE' and archived headlines so agenda - operations that skip over these can finish faster. - - 3. Do not dim blocked tasks: - (setq org-agenda-dim-blocked-tasks nil) - - 4. Stop preparing agenda buffers on startup: - (setq org-agenda-inhibit-startup nil) - - 5. Disable tag inheritance for agendas: - (setq org-agenda-use-tag-inheritance nil) - - These options can be applied to selected agenda views. For more -details about generation of agenda views, see the docstrings for the -relevant variables, and this dedicated Worg page -(http://orgmode.org/worg/agenda-optimization.html) for agenda -optimization. - - -File: org, Node: Extracting agenda information, Next: Using the property API, Prev: Speeding up your agendas, Up: Hacking - -A.10 Extracting agenda information -================================== - -Org provides commands to access agendas through Emacs batch mode. -Through this command-line interface, agendas are automated for further -processing or printing. - - `org-batch-agenda' creates an agenda view in ASCII and outputs to -STDOUT. This command takes one string parameter. When string -length=1, Org uses it as a key to `org-agenda-custom-commands'. These -are the same ones available through `C-c a'. - - This example command line directly prints the TODO list to the -printer: - - emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr - - When the string parameter length is two or more characters, Org -matches it with tags/TODO strings. For example, this example command -line prints items tagged with `shop', but excludes items tagged with -`NewYork': - - emacs -batch -l ~/.emacs \ - -eval '(org-batch-agenda "+shop-NewYork")' | lpr - -An example showing on-the-fly parameter modifications: - - emacs -batch -l ~/.emacs \ - -eval '(org-batch-agenda "a" \ - org-agenda-span (quote month) \ - org-agenda-include-diary nil \ - org-agenda-files (quote ("~/org/project.org")))' \ - | lpr - -which will produce an agenda for the next 30 days from just the -`~/org/projects.org' file. - - For structured processing of agenda output, use -`org-batch-agenda-csv' with the following fields: - - category The category of the item - head The headline, without TODO keyword, TAGS and PRIORITY - type The type of the agenda entry, can be - todo selected in TODO match - tagsmatch selected in tags match - diary imported from diary - deadline a deadline - scheduled scheduled - timestamp appointment, selected by timestamp - closed entry was closed on date - upcoming-deadline warning about nearing deadline - past-scheduled forwarded scheduled item - block entry has date block including date - todo The TODO keyword, if any - tags All tags including inherited ones, separated by colons - date The relevant date, like 2007-2-14 - time The time, like 15:00-16:50 - extra String with extra planning info - priority-l The priority letter if any was given - priority-n The computed numerical priority - -If the selection of the agenda item was based on a timestamp, including -those items with `DEADLINE' and `SCHEDULED' keywords, then Org includes -date and time in the output. - - If the selection of the agenda item was based on a timestamp (or -deadline/scheduled), then Org includes date and time in the output. - - Here is an example of a post-processing script in Perl. It takes -the CSV output from Emacs and prints with a checkbox: - - #!/usr/bin/perl - - # define the Emacs command to run - $cmd = "emacs -batch -l ~/.emacs -eval '(org-batch-agenda-csv \"t\")'"; - - # run it and capture the output - $agenda = qx{$cmd 2>/dev/null}; - - # loop over all lines - foreach $line (split(/\n/,$agenda)) { - # get the individual values - ($category,$head,$type,$todo,$tags,$date,$time,$extra, - $priority_l,$priority_n) = split(/,/,$line); - # process and print - print "[ ] $head\n"; - } - - -File: org, Node: Using the property API, Next: Using the mapping API, Prev: Extracting agenda information, Up: Hacking - -A.11 Using the property API -=========================== - -Functions for working with properties. - - -- Function: org-entry-properties &optional pom which - Get all properties of the entry at point-or-marker POM. - This includes the TODO keyword, the tags, time strings for - deadline, scheduled, and clocking, and any additional properties - defined in the entry. The return value is an alist. Keys may - occur multiple times if the property key was used several times. - POM may also be `nil', in which case the current entry is used. - If WHICH is `nil' or `all', get all properties. If WHICH is - `special' or `standard', only get that subclass. - - -- Function: org-entry-get pom property &optional inherit - Get value of `PROPERTY' for entry at point-or-marker `POM'. By - default, this only looks at properties defined locally in the - entry. If `INHERIT' is non-`nil' and the entry does not have the - property, then also check higher levels of the hierarchy. If - `INHERIT' is the symbol `selective', use inheritance if and only - if the setting of `org-use-property-inheritance' selects - `PROPERTY' for inheritance. - - -- Function: org-entry-delete pom property - Delete the property `PROPERTY' from entry at point-or-marker POM. - - -- Function: org-entry-put pom property value - Set `PROPERTY' to `VALUE' for entry at point-or-marker POM. - - -- Function: org-buffer-property-keys &optional include-specials - Get all property keys in the current buffer. - - -- Function: org-insert-property-drawer - Insert a property drawer for the current entry. - - -- Function: org-entry-put-multivalued-property pom property &rest - values - Set `PROPERTY' at point-or-marker `POM' to `VALUES'. `VALUES' - should be a list of strings. They will be concatenated, with - spaces as separators. - - -- Function: org-entry-get-multivalued-property pom property - Treat the value of the property `PROPERTY' as a - whitespace-separated list of values and return the values as a - list of strings. - - -- Function: org-entry-add-to-multivalued-property pom property value - Treat the value of the property `PROPERTY' as a - whitespace-separated list of values and make sure that `VALUE' is - in this list. - - -- Function: org-entry-remove-from-multivalued-property pom property - value - Treat the value of the property `PROPERTY' as a - whitespace-separated list of values and make sure that `VALUE' is - _not_ in this list. - - -- Function: org-entry-member-in-multivalued-property pom property - value - Treat the value of the property `PROPERTY' as a - whitespace-separated list of values and check if `VALUE' is in - this list. - - -- User Option: org-property-allowed-value-functions - Hook for functions supplying allowed values for a specific - property. The functions must take a single argument, the name of - the property, and return a flat list of allowed values. If `:ETC' - is one of the values, use the values as completion help, but allow - also other values to be entered. The functions must return `nil' - if they are not responsible for this property. - - -File: org, Node: Using the mapping API, Prev: Using the property API, Up: Hacking - -A.12 Using the mapping API -========================== - -Org has sophisticated mapping capabilities for finding entries. Org -uses this functionality internally for generating agenda views. Org -also exposes an API for executing arbitrary functions for each selected -entry. The API's main entry point is: - - -- Function: org-map-entries func &optional match scope &rest skip - Call `FUNC' at each headline selected by `MATCH' in `SCOPE'. - - `FUNC' is a function or a Lisp form. With the cursor positioned - at the beginning of the headline, call the function without - arguments. Org returns an alist of return values of calls to the - function. - - To avoid preserving point, Org wraps the call to `FUNC' in - save-excursion form. After evaluation, Org moves the cursor to - the end of the line that was just processed. Search continues - from that point forward. This may not always work as expected - under some conditions, such as if the current sub-tree was removed - by a previous archiving operation. In such rare circumstances, - Org skips the next entry entirely when it should not. To stop Org - from such skips, make `FUNC' set the variable - `org-map-continue-from' to a specific buffer position. - - `MATCH' is a tags/property/TODO match. Org iterates only matched - headlines. Org iterates over all headlines when `MATCH' is `nil' - or `t'. - - `SCOPE' determines the scope of this command. It can be any of: - - nil the current buffer, respecting the restriction if any - tree the subtree started with the entry at point - region The entries within the active region, if any - file the current buffer, without restriction - file-with-archives - the current buffer, and any archives associated with it - agenda all agenda files - agenda-with-archives - all agenda files with any archive files associated with them - (file1 file2 ...) - if this is a list, all files in the list will be scanned - The remaining args are treated as settings for the scanner's - skipping facilities. Valid args are: - - archive skip trees with the archive tag - comment skip trees with the COMMENT keyword - function or Lisp form - will be used as value for `org-agenda-skip-function', - so whenever the function returns t, FUNC - will not be called for that entry and search will - continue from the point where the function leaves it - - The mapping routine can call any arbitrary function, even functions -that change meta data or query the property API (*note Using the -property API::). Here are some handy functions: - - -- Function: org-todo &optional arg - Change the TODO state of the entry. See the docstring of the - functions for the many possible values for the argument `ARG'. - - -- Function: org-priority &optional action - Change the priority of the entry. See the docstring of this - function for the possible values for `ACTION'. - - -- Function: org-toggle-tag tag &optional onoff - Toggle the tag `TAG' in the current entry. Setting `ONOFF' to - either `on' or `off' will not toggle tag, but ensure that it is - either on or off. - - -- Function: org-promote - Promote the current entry. - - -- Function: org-demote - Demote the current entry. - - This example turns all entries tagged with `TOMORROW' into TODO -entries with keyword `UPCOMING'. Org ignores entries in comment trees -and archive trees. - - (org-map-entries - '(org-todo "UPCOMING") - "+TOMORROW" 'file 'archive 'comment) - - The following example counts the number of entries with TODO keyword -`WAITING', in all agenda files. - - (length (org-map-entries t "/+WAITING" 'agenda)) - - -File: org, Node: MobileOrg, Next: History and acknowledgments, Prev: Hacking, Up: Top - -Appendix B MobileOrg -******************** - -MobileOrg is a companion mobile app that runs on iOS and Android -devices. MobileOrg enables offline-views and capture support for an -Org mode system that is rooted on a "real" computer. MobileOrg can -record changes to existing entries. - - The iOS implementation (https://github.com/MobileOrg/) for the -_iPhone/iPod Touch/iPad_ series of devices, was started by Richard -Moreland and is now in the hands Sean Escriva. Android users should -check out MobileOrg Android -(http://wiki.github.com/matburt/mobileorg-android/) by Matt Jones. -Though the two implementations are not identical, they offer similar -features. - - This appendix describes Org's support for agenda view formats -compatible with MobileOrg. It also describes synchronizing changes, -such as to notes, between MobileOrg and the computer. - - To change tags and TODO states in MobileOrg, first customize the -variables `org-todo-keywords' and `org-tag-alist'. These should cover -all the important tags and TODO keywords, even if Org files use only -some of them. Though MobileOrg has in-buffer settings, it understands -TODO states _sets_ (*note Per-file keywords::) and _mutually exclusive_ -tags (*note Setting tags::) only for those set in these variables. - -* Menu: - -* Setting up the staging area:: For the mobile device -* Pushing to MobileOrg:: Uploading Org files and agendas -* Pulling from MobileOrg:: Integrating captured and flagged items - - -File: org, Node: Setting up the staging area, Next: Pushing to MobileOrg, Up: MobileOrg - -B.1 Setting up the staging area -=============================== - -MobileOrg needs access to a file directory on a server to interact with -Emacs. With a public server, consider encrypting the files. MobileOrg -version 1.5 supports encryption for the iPhone. Org also requires -`openssl' installed on the local computer. To turn on encryption, set -the same password in MobileOrg and in Emacs. Set the password in the -variable `org-mobile-use-encryption'(1). Note that even after -MobileOrg encrypts the file contents, the file names will remain -visible on the file systems of the local computer, the server, and the -mobile device. - - For a server to host files, consider options like Dropbox.com -(http://dropbox.com) account(2). On first connection, MobileOrg -creates a directory `MobileOrg/' on Dropbox. Pass its location to -Emacs through an init file variable as follows: - - (setq org-mobile-directory "~/Dropbox/MobileOrg") - - Org copies files to the above directory for MobileOrg. Org also -uses the same directory for sharing notes between Org and MobileOrg. - - ---------- Footnotes ---------- - - (1) If Emacs is configured for safe storing of passwords, then -configure the variable, `org-mobile-encryption-password'; please read -the docstring of that variable. - - (2) An alternative is to use webdav server. MobileOrg documentation -has details of webdav server configuration. Additional help is at FAQ -entry (http://orgmode.org/worg/org-faq.html#mobileorg_webdav). - - -File: org, Node: Pushing to MobileOrg, Next: Pulling from MobileOrg, Prev: Setting up the staging area, Up: MobileOrg - -B.2 Pushing to MobileOrg -======================== - -Org pushes files listed in `org-mobile-files' to -`org-mobile-directory'. Files include agenda files (as listed in -`org-agenda-files'). Customize `org-mobile-files' to add other files. -File names will be staged with paths relative to `org-directory', so -all files should be inside this directory(1). - - Push creates a special Org file `agendas.org' with custom agenda -views defined by the user(2). - - Org writes the file `index.org', containing links to other files. -MobileOrg reads this file first from the server to determine what other -files to download for agendas. For faster downloads, MobileOrg will -read only those files whose checksums(3) have changed. - - ---------- Footnotes ---------- - - (1) Symbolic links in `org-directory' should have the same name as -their targets. - - (2) While creating the agendas, Org mode will force ID properties on -all referenced entries, so that these entries can be uniquely -identified if MobileOrg flags them for further action. To avoid -setting properties configure the variable -`org-mobile-force-id-on-agenda-items' to `nil'. Org mode will then -rely on outline paths, assuming they are unique. - - (3) Checksums are stored automatically in the file `checksums.dat'. - - -File: org, Node: Pulling from MobileOrg, Prev: Pushing to MobileOrg, Up: MobileOrg - -B.3 Pulling from MobileOrg -========================== - -When MobileOrg synchronizes with the server, it pulls the Org files for -viewing. It then appends to the file `mobileorg.org' on the server the -captured entries, pointers to flagged and changed entries. Org -integrates its data in an inbox file format. - - 1. Org moves all entries found in `mobileorg.org'(1) and appends them - to the file pointed to by the variable - `org-mobile-inbox-for-pull'. Each captured entry and each editing - event is a top-level entry in the inbox file. - - 2. After moving the entries, Org attempts changes to MobileOrg. Some - changes are applied directly and without user interaction. - Examples include changes to tags, TODO state, headline and body - text. Entries for further action are tagged as `:FLAGGED:'. Org - marks entries with problems with an error message in the inbox. - They have to be resolved manually. - - 3. Org generates an agenda view for flagged entries for user - intervention to clean up. For notes stored in flagged entries, - MobileOrg displays them in the echo area when the cursor is on the - corresponding agenda item. - - `?' - Pressing `?' displays the entire flagged note in another - window. Org also pushes it to the kill ring. To store - flagged note as a normal note, use `? z C-y C-c C-c'. - Pressing `?' twice does these things: first it removes the - `:FLAGGED:' tag; second, it removes the flagged note from the - property drawer; third, it signals that manual editing of the - flagged entry is now finished. - - `C-c a ?' returns to the agenda view to finish processing flagged -entries. Note that these entries may not be the most recent since -MobileOrg searches files that were last pulled. To get an updated -agenda view with changes since the last pull, pull again. - - ---------- Footnotes ---------- - - (1) `mobileorg.org' will be empty after this operation. - - -File: org, Node: History and acknowledgments, Next: GNU Free Documentation License, Prev: MobileOrg, Up: Top - -Appendix C History and acknowledgments -************************************** - -C.1 From Carsten -================ - -Org was born in 2003, out of frustration over the user interface of the -Emacs Outline mode. I was trying to organize my notes and projects, -and using Emacs seemed to be the natural way to go. However, having to -remember eleven different commands with two or three keys per command, -only to hide and show parts of the outline tree, that seemed entirely -unacceptable. Also, when using outlines to take notes, I constantly -wanted to restructure the tree, organizing it paralleling my thoughts -and plans. _Visibility cycling_ and _structure editing_ were -originally implemented in the package `outline-magic.el', but quickly -moved to the more general `org.el'. As this environment became -comfortable for project planning, the next step was adding _TODO -entries_, basic _timestamps_, and _table support_. These areas -highlighted the two main goals that Org still has today: to be a new, -outline-based, plain text mode with innovative and intuitive editing -features, and to incorporate project planning functionality directly -into a notes file. - - Since the first release, literally thousands of emails to me or to - have provided a constant stream of bug reports, -feedback, new ideas, and sometimes patches and add-on code. Many -thanks to everyone who has helped to improve this package. I am trying -to keep here a list of the people who had significant influence in -shaping one or more aspects of Org. The list may not be complete, if I -have forgotten someone, please accept my apologies and let me know. - - Before I get to this list, a few special mentions are in order: - -Bastien Guerry - Bastien has written a large number of extensions to Org (most of - them integrated into the core by now), including the LaTeX - exporter and the plain list parser. His support during the early - days was central to the success of this project. Bastien also - invented Worg, helped establishing the Web presence of Org, and - sponsored hosting costs for the orgmode.org website. Bastien - stepped in as maintainer of Org between 2011 and 2013, at a time - when I desperately needed a break. - -Eric Schulte and Dan Davison - Eric and Dan are jointly responsible for the Org-babel system, - which turns Org into a multi-language environment for evaluating - code and doing literate programming and reproducible research. - This has become one of Org's killer features that define what Org - is today. - -John Wiegley - John has contributed a number of great ideas and patches directly - to Org, including the attachment system (`org-attach.el'), - integration with Apple Mail (`org-mac-message.el'), hierarchical - dependencies of TODO items, habit tracking (`org-habits.el'), and - encryption (`org-crypt.el'). Also, the capture system is really - an extended copy of his great `remember.el'. - -Sebastian Rose - Without Sebastian, the HTML/XHTML publishing of Org would be the - pitiful work of an ignorant amateur. Sebastian has pushed this - part of Org onto a much higher level. He also wrote - `org-info.js', a Java script for displaying web pages derived from - Org using an Info-like or a folding interface with single-key - navigation. - -See below for the full list of contributions! Again, please let me -know what I am missing here! - -C.2 From Bastien -================ - -I (Bastien) have been maintaining Org between 2011 and 2013. This -appendix would not be complete without adding a few more -acknowledgments and thanks. - - I am first grateful to Carsten for his trust while handing me over -the maintainership of Org. His unremitting support is what really -helped me getting more confident over time, with both the community and -the code. - - When I took over maintainership, I knew I would have to make Org more -collaborative than ever, as I would have to rely on people that are more -knowledgeable than I am on many parts of the code. Here is a list of -the persons I could rely on, they should really be considered -co-maintainers, either of the code or the community: - -Eric Schulte - Eric is maintaining the Babel parts of Org. His reactivity here - kept me away from worrying about possible bugs here and let me - focus on other parts. - -Nicolas Goaziou - Nicolas is maintaining the consistency of the deepest parts of - Org. His work on `org-element.el' and `ox.el' has been - outstanding, and it opened the doors for many new ideas and - features. He rewrote many of the old exporters to use the new - export engine, and helped with documenting this major change. - More importantly (if that's possible), he has been more than - reliable during all the work done for Org 8.0, and always very - reactive on the mailing list. - -Achim Gratz - Achim rewrote the building process of Org, turning some _ad hoc_ - tools into a flexible and conceptually clean process. He - patiently coped with the many hiccups that such a change can - create for users. - -Nick Dokos - The Org mode mailing list would not be such a nice place without - Nick, who patiently helped users so many times. It is impossible - to overestimate such a great help, and the list would not be so - active without him. - - I received support from so many users that it is clearly impossible -to be fair when shortlisting a few of them, but Org's history would not -be complete if the ones above were not mentioned in this manual. - -C.3 List of contributions -========================= - - * Russel Adams came up with the idea for drawers. - - * Suvayu Ali has steadily helped on the mailing list, providing - useful feedback on many features and several patches. - - * Luis Anaya wrote `ox-man.el'. - - * Thomas Baumann wrote `org-bbdb.el' and `org-mhe.el'. - - * Michael Brand helped by reporting many bugs and testing many - features. He also implemented the distinction between empty - fields and 0-value fields in Org's spreadsheets. - - * Christophe Bataillon created the great unicorn logo that we use on - the Org mode website. - - * Alex Bochannek provided a patch for rounding timestamps. - - * Jan Böcker wrote `org-docview.el'. - - * Brad Bozarth showed how to pull RSS feed data into Org mode files. - - * Tom Breton wrote `org-choose.el'. - - * Charles Cave's suggestion sparked the implementation of templates - for Remember, which are now templates for capture. - - * Pavel Chalmoviansky influenced the agenda treatment of items with - specified time. - - * Gregory Chernov patched support for Lisp forms into table - calculations and improved XEmacs compatibility, in particular by - porting `nouline.el' to XEmacs. - - * Sacha Chua suggested copying some linking code from Planner, and - helped make Org pupular through her blog. - - * Toby S. Cubitt contributed to the code for clock formats. - - * Baoqiu Cui contributed the first DocBook exporter. In Org 8.0, we - go a different route: you can now export to Texinfo and export the - `.texi' file to DocBook using `makeinfo'. - - * Eddward DeVilla proposed and tested checkbox statistics. He also - came up with the idea of properties, and that there should be an - API for them. - - * Nick Dokos tracked down several nasty bugs. - - * Kees Dullemond used to edit projects lists directly in HTML and so - inspired some of the early development, including HTML export. He - also asked for a way to narrow wide table columns. - - * Jason Dunsmore has been maintaining the Org-Mode server at - Rackspace for several years now. He also sponsored the hosting - costs until Rackspace started to host us for free. - - * Thomas S. Dye contributed documentation on Worg and helped - integrating the Org-Babel documentation into the manual. - - * Christian Egli converted the documentation into Texinfo format, - inspired the agenda, patched CSS formatting into the HTML - exporter, and wrote `org-taskjuggler.el', which has been rewritten - by Nicolas Goaziou as `ox-taskjuggler.el' for Org 8.0. - - * David Emery provided a patch for custom CSS support in exported - HTML agendas. - - * Sean Escriva took over MobileOrg development on the iPhone - platform. - - * Nic Ferrier contributed mailcap and XOXO support. - - * Miguel A. Figueroa-Villanueva implemented hierarchical checkboxes. - - * John Foerch figured out how to make incremental search show context - around a match in a hidden outline tree. - - * Raimar Finken wrote `org-git-line.el'. - - * Mikael Fornius works as a mailing list moderator. - - * Austin Frank works as a mailing list moderator. - - * Eric Fraga drove the development of BEAMER export with ideas and - testing. - - * Barry Gidden did proofreading the manual in preparation for the - book publication through Network Theory Ltd. - - * Niels Giesen had the idea to automatically archive DONE trees. - - * Nicolas Goaziou rewrote much of the plain list code. He also wrote - `org-element.el' and `org-export.el', which was a huge step forward - in implementing a clean framework for Org exporters. - - * Kai Grossjohann pointed out key-binding conflicts with other - packages. - - * Brian Gough of Network Theory Ltd publishes the Org mode manual as - a book. - - * Bernt Hansen has driven much of the support for auto-repeating - tasks, task state change logging, and the clocktable. His clear - explanations have been critical when we started to adopt the Git - version control system. - - * Manuel Hermenegildo has contributed various ideas, small fixes and - patches. - - * Phil Jackson wrote `org-irc.el'. - - * Scott Jaderholm proposed footnotes, control over whitespace between - folded entries, and column view for properties. - - * Matt Jones wrote MobileOrg Android. - - * Tokuya Kameshima wrote `org-wl.el' and `org-mew.el'. - - * Jonathan Leech-Pepin wrote `ox-texinfo.el'. - - * Shidai Liu ("Leo") asked for embedded LaTeX and tested it. He also - provided frequent feedback and some patches. - - * Matt Lundin has proposed last-row references for table formulas - and named invisible anchors. He has also worked a lot on the FAQ. - - * David Maus wrote `org-atom.el', maintains the issues file for Org, - and is a prolific contributor on the mailing list with competent - replies, small fixes and patches. - - * Jason F. McBrayer suggested agenda export to CSV format. - - * Max Mikhanosha came up with the idea of refiling and sticky - agendas. - - * Dmitri Minaev sent a patch to set priority limits on a per-file - basis. - - * Stefan Monnier provided a patch to keep the Emacs-Lisp compiler - happy. - - * Richard Moreland wrote MobileOrg for the iPhone. - - * Rick Moynihan proposed allowing multiple TODO sequences in a file - and being able to quickly restrict the agenda to a subtree. - - * Todd Neal provided patches for links to Info files and Elisp forms. - - * Greg Newman refreshed the unicorn logo into its current form. - - * Tim O'Callaghan suggested in-file links, search options for general - file links, and TAGS. - - * Osamu Okano wrote `orgcard2ref.pl', a Perl program to create a text - version of the reference card. - - * Takeshi Okano translated the manual and David O'Toole's tutorial - into Japanese. - - * Oliver Oppitz suggested multi-state TODO items. - - * Scott Otterson sparked the introduction of descriptive text for - links, among other things. - - * Pete Phillips helped during the development of the TAGS feature, - and provided frequent feedback. - - * Francesco Pizzolante provided patches that helped speeding up the - agenda generation. - - * Martin Pohlack provided the code snippet to bundle character - insertion into bundles of 20 for undo. - - * Rackspace.com is hosting our website for free. Thank you - Rackspace! - - * T.V. Raman reported bugs and suggested improvements. - - * Matthias Rempe (Oelde) provided ideas, Windows support, and quality - control. - - * Paul Rivier provided the basic implementation of named footnotes. - He also acted as mailing list moderator for some time. - - * Kevin Rogers contributed code to access VM files on remote hosts. - - * Frank Ruell solved the mystery of the `keymapp nil' bug, a - conflict with `allout.el'. - - * Jason Riedy generalized the send-receive mechanism for Orgtbl - tables with extensive patches. - - * Philip Rooke created the Org reference card, provided lots of - feedback, developed and applied standards to the Org documentation. - - * Christian Schlauer proposed angular brackets around links, among - other things. - - * Christopher Schmidt reworked `orgstruct-mode' so that users can - enjoy folding in non-org buffers by using Org headlines in - comments. - - * Paul Sexton wrote `org-ctags.el'. - - * Linking to VM/BBDB/Gnus was first inspired by Tom Shannon's - `organizer-mode.el'. - - * Ilya Shlyakhter proposed the Archive Sibling, line numbering in - literal examples, and remote highlighting for referenced code - lines. - - * Stathis Sideris wrote the `ditaa.jar' ASCII to PNG converter that - is now packaged into Org's `contrib' directory. - - * Daniel Sinder came up with the idea of internal archiving by - locking subtrees. - - * Dale Smith proposed link abbreviations. - - * James TD Smith has contributed a large number of patches for useful - tweaks and features. - - * Adam Spiers asked for global linking commands, inspired the link - extension system, added support for mairix, and proposed the - mapping API. - - * Ulf Stegemann created the table to translate special symbols to - HTML, LaTeX, UTF-8, Latin-1 and ASCII. - - * Andy Stewart contributed code to `org-w3m.el', to copy HTML content - with links transformation to Org syntax. - - * David O'Toole wrote `org-publish.el' and drafted the manual - chapter about publishing. - - * Jambunathan K contributed the ODT exporter and rewrote the HTML - exporter. - - * Sebastien Vauban reported many issues with LaTeX and BEAMER export - and enabled source code highlighting in Gnus. - - * Stefan Vollmar organized a video-recorded talk at the - Max-Planck-Institute for Neurology. He also inspired the creation - of a concept index for HTML export. - - * Jürgen Vollmer contributed code generating the table of contents - in HTML output. - - * Samuel Wales has provided important feedback and bug reports. - - * Chris Wallace provided a patch implementing the `QUOTE' keyword. - - * David Wainberg suggested archiving, and improvements to the linking - system. - - * Carsten Wimmer suggested some changes and helped fix a bug in - linking to Gnus. - - * Roland Winkler requested additional key bindings to make Org work - on a tty. - - * Piotr Zielinski wrote `org-mouse.el', proposed agenda blocks and - contributed various ideas and code snippets. - - * Marco Wahl wrote `org-eww.el'. - - -File: org, Node: GNU Free Documentation License, Next: Main Index, Prev: History and acknowledgments, Up: Top - -Appendix D GNU Free Documentation License -***************************************** - - Version 1.3, 3 November 2008 - - Copyright (C) 2000, 2001, 2002, 2007, 2008, 2013, 2014 Free Software Foundation, Inc. - `http://fsf.org/' - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - The "publisher" means any person or entity that distributes copies - of the Document to the public. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included in an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warranty Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense, or distribute it is void, - and will automatically terminate your rights under this License. - - However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly - and finally terminates your license, and (b) permanently, if the - copyright holder fails to notify you of the violation by some - reasonable means prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you have - received notice of violation of this License (for any work) from - that copyright holder, and you cure the violation prior to 30 days - after your receipt of the notice. - - Termination of your rights under this section does not terminate - the licenses of parties who have received copies or rights from - you under this License. If your rights have been terminated and - not permanently reinstated, receipt of a copy of some or all of - the same material does not give you any rights to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. If the Document specifies that a proxy - can decide which future versions of this License can be used, that - proxy's public statement of acceptance of a version permanently - authorizes you to choose that version for the Document. - - 11. RELICENSING - - "Massive Multiauthor Collaboration Site" (or "MMC Site") means any - World Wide Web server that publishes copyrightable works and also - provides prominent facilities for anybody to edit those works. A - public wiki that anybody can edit is an example of such a server. - A "Massive Multiauthor Collaboration" (or "MMC") contained in the - site means any set of copyrightable works thus published on the MMC - site. - - "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 - license published by Creative Commons Corporation, a not-for-profit - corporation with a principal place of business in San Francisco, - California, as well as future copyleft versions of that license - published by that same organization. - - "Incorporate" means to publish or republish a Document, in whole or - in part, as part of another Document. - - An MMC is "eligible for relicensing" if it is licensed under this - License, and if all works that were first published under this - License somewhere other than this MMC, and subsequently - incorporated in whole or in part into the MMC, (1) had no cover - texts or invariant sections, and (2) were thus incorporated prior - to November 1, 2008. - - The operator of an MMC Site may republish an MMC contained in the - site under CC-BY-SA on the same site at any time before August 1, - 2009, provided the MMC is eligible for relicensing. - - -ADDENDUM: How to use this License for your documents -==================================================== - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.3 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover - Texts. A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. - - -File: org, Node: Main Index, Next: Key Index, Prev: GNU Free Documentation License, Up: Top - -Concept index -************* - -[index] -* Menu: - -* #+ARCHIVE: Moving subtrees. (line 35) -* #+ASCII: ASCII/Latin-1/UTF-8 export. - (line 53) -* #+ATTR_ASCII: ASCII/Latin-1/UTF-8 export. - (line 64) -* #+ATTR_BEAMER: Beamer specific syntax. - (line 34) -* #+ATTR_HTML <1>: Images in HTML export. - (line 24) -* #+ATTR_HTML <2>: Tables in HTML export. - (line 12) -* #+ATTR_HTML: Links in HTML export. - (line 23) -* #+ATTR_LATEX, in example blocks: Example blocks in LaTeX export. - (line 6) -* #+ATTR_LATEX, in horizontal rules: Horizontal rules in LaTeX export. - (line 6) -* #+ATTR_LATEX, in images: Images in LaTeX export. - (line 6) -* #+ATTR_LATEX, in plain lists: Plain lists in LaTeX export. - (line 6) -* #+ATTR_LATEX, in source blocks: Source blocks in LaTeX export. - (line 6) -* #+ATTR_LATEX, in special blocks: Special blocks in LaTeX export. - (line 6) -* #+ATTR_LATEX, in tables: Tables in LaTeX export. - (line 6) -* #+ATTR_ODT <1>: Customizing tables in ODT export. - (line 6) -* #+ATTR_ODT <2>: Images in ODT export. - (line 30) -* #+ATTR_ODT: Tables in ODT export. - (line 17) -* #+ATTR_TEXINFO, in images: Images in Texinfo export. - (line 6) -* #+ATTR_TEXINFO, in plain lists: Plain lists in Texinfo export. - (line 6) -* #+ATTR_TEXINFO, in special blocks: Special blocks in Texinfo export. - (line 6) -* #+ATTR_TEXINFO, in tables: Tables in Texinfo export. - (line 6) -* #+AUTHOR: Export settings. (line 25) -* #+BEAMER: Beamer specific syntax. - (line 19) -* #+BEAMER_FONT_THEME: Beamer specific export settings. - (line 15) -* #+BEAMER_HEADER: Beamer specific export settings. - (line 24) -* #+BEAMER_INNER_THEME: Beamer specific export settings. - (line 18) -* #+BEAMER_OUTER_THEME: Beamer specific export settings. - (line 21) -* #+BEAMER_THEME: Beamer specific export settings. - (line 10) -* #+BEGIN, clocktable: The clock table. (line 36) -* #+BEGIN, columnview: Capturing column view. - (line 11) -* #+BEGIN:dynamic block: Dynamic blocks. (line 15) -* #+BEGIN_CENTER: Paragraphs. (line 31) -* #+BEGIN_COMMENT: Comment lines. (line 10) -* #+BEGIN_EXAMPLE: Literal examples. (line 8) -* #+BEGIN_EXPORT ascii: ASCII/Latin-1/UTF-8 export. - (line 53) -* #+BEGIN_EXPORT beamer: Beamer specific syntax. - (line 19) -* #+BEGIN_EXPORT html: Quoting HTML tags. (line 12) -* #+BEGIN_EXPORT latex: Quoting LaTeX code. (line 11) -* #+BEGIN_EXPORT texinfo: Quoting Texinfo code. - (line 9) -* #+BEGIN_JUSTIFYLEFT: ASCII/Latin-1/UTF-8 export. - (line 75) -* #+BEGIN_JUSTIFYRIGHT: ASCII/Latin-1/UTF-8 export. - (line 75) -* #+BEGIN_QUOTE: Paragraphs. (line 26) -* #+BEGIN_SRC <1>: Structure of code blocks. - (line 6) -* #+BEGIN_SRC: Literal examples. (line 28) -* #+BEGIN_VERSE: Paragraphs. (line 13) -* #+BIND: Export settings. (line 210) -* #+CALL: Evaluating code blocks. - (line 25) -* #+CAPTION <1>: Images in HTML export. - (line 24) -* #+CAPTION <2>: Tables in HTML export. - (line 12) -* #+CAPTION: Images and tables. (line 6) -* #+CATEGORY: Categories. (line 6) -* #+CINDEX: Indices. (line 6) -* #+COLUMNS: Scope of column definitions. - (line 8) -* #+CONSTANTS: References. (line 110) -* #+CREATOR: Export settings. (line 28) -* #+DATE: Export settings. (line 32) -* #+DESCRIPTION (Beamer): Beamer specific export settings. - (line 28) -* #+DESCRIPTION (HTML): HTML Specific export settings. - (line 10) -* #+DESCRIPTION (LaTeX): LaTeX specific export settings. - (line 10) -* #+DESCRIPTION (ODT): ODT specific export settings. - (line 10) -* #+EMAIL: Export settings. (line 35) -* #+EXCLUDE_TAGS: Export settings. (line 51) -* #+EXPORT_FILE_NAME: Export settings. (line 63) -* #+FILETAGS: Tag inheritance. (line 20) -* #+FINDEX: Indices. (line 6) -* #+HEADER:: Code block specific header arguments. - (line 30) -* #+HTML: Quoting HTML tags. (line 12) -* #+HTML_CONTAINER: HTML Specific export settings. - (line 17) -* #+HTML_DOCTYPE: HTML Specific export settings. - (line 14) -* #+HTML_HEAD <1>: CSS support. (line 49) -* #+HTML_HEAD: HTML Specific export settings. - (line 32) -* #+HTML_HEAD_EXTRA <1>: CSS support. (line 49) -* #+HTML_HEAD_EXTRA: HTML Specific export settings. - (line 36) -* #+HTML_INCLUDE_STYLE: CSS support. (line 43) -* #+HTML_LINK_HOME: HTML Specific export settings. - (line 21) -* #+HTML_LINK_UP: HTML Specific export settings. - (line 24) -* #+HTML_MATHJAX: HTML Specific export settings. - (line 27) -* #+INCLUDE: Include files. (line 7) -* #+INDEX: Generating an index. (line 16) -* #+INFOJS_OPT: JavaScript support. (line 23) -* #+KEYWORDS (Beamer): Beamer specific export settings. - (line 35) -* #+KEYWORDS (HTML): HTML Specific export settings. - (line 40) -* #+KEYWORDS (LaTeX): LaTeX specific export settings. - (line 38) -* #+KEYWORDS (ODT): ODT specific export settings. - (line 14) -* #+KINDEX: Indices. (line 6) -* #+LANGUAGE: Export settings. (line 38) -* #+LATEX: Quoting LaTeX code. (line 11) -* #+LATEX_CLASS <1>: LaTeX header and sectioning. - (line 22) -* #+LATEX_CLASS: LaTeX specific export settings. - (line 17) -* #+LATEX_CLASS_OPTIONS <1>: LaTeX header and sectioning. - (line 22) -* #+LATEX_CLASS_OPTIONS: LaTeX specific export settings. - (line 22) -* #+LATEX_COMPILER: LaTeX specific export settings. - (line 25) -* #+LATEX_HEADER <1>: LaTeX header and sectioning. - (line 27) -* #+LATEX_HEADER: LaTeX specific export settings. - (line 28) -* #+LATEX_HEADER (HTML): HTML Specific export settings. - (line 45) -* #+LATEX_HEADER_EXTRA <1>: LaTeX header and sectioning. - (line 27) -* #+LATEX_HEADER_EXTRA: LaTeX specific export settings. - (line 33) -* #+LINK: Link abbreviations. (line 49) -* #+MACRO: Macro replacement. (line 6) -* #+NAME <1>: Structure of code blocks. - (line 6) -* #+NAME <2>: Images and tables. (line 6) -* #+NAME: Internal links. (line 21) -* #+NAME, for table: References. (line 131) -* #+ODT_STYLES_FILE: Applying custom styles. - (line 28) -* #+OPTIONS: Export settings. (line 6) -* #+ORGLST: Radio lists. (line 11) -* #+ORGTBL: Radio tables. (line 19) -* #+ORGTBL, SEND: A LaTeX example. (line 13) -* #+PINDEX: Indices. (line 6) -* #+PLOT: Org-Plot. (line 6) -* #+PRIORITIES: Priorities. (line 43) -* #+PROPERTY: Property syntax. (line 44) -* #+RESULTS: Evaluating code blocks. - (line 6) -* #+SELECT_TAGS: Export settings. (line 44) -* #+SEQ_TODO: Per-file keywords. (line 6) -* #+SETUPFILE <1>: In-buffer settings. (line 52) -* #+SETUPFILE: Export settings. (line 13) -* #+STARTUP: In-buffer settings. (line 64) -* #+SUBAUTHOR <1>: Texinfo title and copyright page. - (line 13) -* #+SUBAUTHOR: Texinfo specific export settings. - (line 13) -* #+SUBTILE (HTML): HTML Specific export settings. - (line 50) -* #+SUBTITLE (ASCII): ASCII/Latin-1/UTF-8 export. - (line 37) -* #+SUBTITLE (Beamer): Beamer specific export settings. - (line 43) -* #+SUBTITLE (LaTeX): LaTeX specific export settings. - (line 46) -* #+SUBTITLE (Texinfo): Texinfo specific export settings. - (line 10) -* #+TAGS: Setting tags. (line 29) -* #+TBLFM <1>: In-buffer settings. (line 173) -* #+TBLFM <2>: Editing and debugging formulas. - (line 99) -* #+TBLFM: Field and range formulas. - (line 12) -* #+TBLFM line, multiple: Editing and debugging formulas. - (line 99) -* #+TBLFM, switching: Editing and debugging formulas. - (line 99) -* #+TEXINFO: Quoting Texinfo code. - (line 9) -* #+TEXINFO_CLASS <1>: Headings and sectioning structure. - (line 6) -* #+TEXINFO_CLASS <2>: Texinfo file header. (line 12) -* #+TEXINFO_CLASS: Texinfo specific export settings. - (line 19) -* #+TEXINFO_DIR_CATEGORY <1>: Texinfo Top node. (line 6) -* #+TEXINFO_DIR_CATEGORY: Texinfo specific export settings. - (line 29) -* #+TEXINFO_DIR_DESC <1>: Texinfo Top node. (line 6) -* #+TEXINFO_DIR_DESC: Texinfo specific export settings. - (line 35) -* #+TEXINFO_DIR_TITLE <1>: Texinfo Top node. (line 6) -* #+TEXINFO_DIR_TITLE: Texinfo specific export settings. - (line 32) -* #+TEXINFO_FILENAME <1>: Texinfo file header. (line 6) -* #+TEXINFO_FILENAME: Texinfo specific export settings. - (line 16) -* #+TEXINFO_HEADER <1>: Texinfo file header. (line 12) -* #+TEXINFO_HEADER: Texinfo specific export settings. - (line 23) -* #+TEXINFO_POST_HEADER: Texinfo specific export settings. - (line 26) -* #+TEXINFO_PRINTED_TITLE <1>: Texinfo title and copyright page. - (line 6) -* #+TEXINFO_PRINTED_TITLE: Texinfo specific export settings. - (line 38) -* #+TINDEX: Indices. (line 6) -* #+TITLE: Export settings. (line 59) -* #+TOC: Table of contents. (line 6) -* #+TODO: Per-file keywords. (line 6) -* #+TYP_TODO: Per-file keywords. (line 6) -* #+VINDEX: Indices. (line 6) -* :cache, src header argument <1>: cache. (line 6) -* :cache, src header argument: System-wide header arguments. - (line 9) -* :colnames, src header argument: colnames. (line 6) -* :comments, src header argument: comments. (line 6) -* :dir, src header argument: dir. (line 6) -* :epilogue, src header argument: epilogue. (line 6) -* :eval, src header argument: eval. (line 6) -* :exports, src header argument <1>: exports. (line 6) -* :exports, src header argument <2>: System-wide header arguments. - (line 9) -* :exports, src header argument: Exporting code blocks. - (line 20) -* :file, src header argument: file. (line 6) -* :file-ext, src header argument: file-ext. (line 6) -* :hlines, src header argument: hlines. (line 6) -* :mkdirp, src header argument: mkdirp. (line 6) -* :no-expand, src header argument: no-expand. (line 6) -* :noweb, src header argument <1>: noweb. (line 6) -* :noweb, src header argument: System-wide header arguments. - (line 9) -* :noweb-ref, src header argument: noweb-ref. (line 6) -* :noweb-sep, src header argument: noweb-sep. (line 6) -* :output-dir, src header argument: output-dir. (line 6) -* :padline, src header argument: padline. (line 6) -* :post, src header argument: post. (line 6) -* :prologue, src header argument: prologue. (line 6) -* :results, src header argument <1>: Results of evaluation. - (line 33) -* :results, src header argument <2>: results. (line 6) -* :results, src header argument: System-wide header arguments. - (line 9) -* :rownames, src header argument: rownames. (line 6) -* :sep, src header argument: sep. (line 6) -* :session, src header argument <1>: session. (line 6) -* :session, src header argument: System-wide header arguments. - (line 9) -* :shebang, src header argument: shebang. (line 6) -* :tangle, src header argument <1>: tangle. (line 6) -* :tangle, src header argument: Extracting source code. - (line 23) -* :tangle-mode, src header argument: tangle-mode. (line 6) -* :var, src header argument: var. (line 6) -* :wrap, src header argument: wrap. (line 6) -* abbreviation, links: Link abbreviations. (line 6) -* abstract, in LaTeX export: Special blocks in LaTeX export. - (line 6) -* acknowledgments: History and acknowledgments. - (line 6) -* action, for publishing: Publishing action. (line 6) -* activation: Activation. (line 6) -* active region <1>: ODT export commands. (line 6) -* active region <2>: Built-in table editor. - (line 162) -* active region: Structure editing. (line 139) -* add-on packages: Add-on packages. (line 6) -* add-ons, context-sensitive commands: Context-sensitive commands. - (line 6) -* agenda: Weekly/daily agenda. (line 6) -* agenda dispatcher: Agenda dispatcher. (line 6) -* agenda files: Agenda files. (line 6) -* agenda files, removing buffers: Agenda commands. (line 519) -* agenda views: Agenda views. (line 6) -* agenda views, custom: Custom agenda views. (line 6) -* agenda views, exporting <1>: Exporting agenda views. - (line 6) -* agenda views, exporting: Agenda commands. (line 505) -* agenda views, main example: Storing searches. (line 9) -* agenda views, optimization: Speeding up your agendas. - (line 6) -* agenda views, user-defined: Special agenda views. - (line 6) -* agenda*, as an agenda views: Storing searches. (line 9) -* agenda, as an agenda views: Storing searches. (line 9) -* agenda, column view: Agenda column view. (line 6) -* agenda, pipe: Extracting agenda information. - (line 6) -* agenda, sticky: Agenda dispatcher. (line 50) -* agenda, with block views: Block agenda. (line 6) -* align, STARTUP keyword: In-buffer settings. (line 85) -* alignment in tables: Column width and alignment. - (line 6) -* anniversaries, from BBDB: Weekly/daily agenda. (line 79) -* API, for mapping: Using the mapping API. - (line 6) -* API, for properties <1>: Using the property API. - (line 6) -* API, for properties: Property API. (line 6) -* appointment <1>: Weekly/daily agenda. (line 126) -* appointment: Timestamps. (line 14) -* appointment reminders: Weekly/daily agenda. (line 126) -* appt.el: Weekly/daily agenda. (line 126) -* archive locations: Moving subtrees. (line 25) -* archive tag: Internal archiving. (line 6) -* archived entries, in agenda views: Agenda views. (line 37) -* Archives mode: Agenda commands. (line 134) -* archiving: Archiving. (line 6) -* ASCII export: ASCII/Latin-1/UTF-8 export. - (line 6) -* Atom feeds: RSS feeds. (line 6) -* attachments: Attachments. (line 6) -* author: Feedback. (line 6) -* author, macro: Macro replacement. (line 26) -* autoload: Activation. (line 6) -* babel, languages: Languages. (line 6) -* babel, library of: Library of Babel. (line 6) -* backtrace of an error: Feedback. (line 66) -* BBDB links: External links. (line 6) -* BBDB, anniversaries: Weekly/daily agenda. (line 79) -* Beamer export: Beamer export. (line 6) -* begin block, end block: Structure of code blocks. - (line 46) -* block agenda: Block agenda. (line 6) -* blocking, of checkboxes: Checkboxes. (line 46) -* blocks, folding: Blocks. (line 6) -* bold text, markup rules: Emphasis and monospace. - (line 6) -* Boolean logic, for tag/property searches: Matching tags and properties. - (line 34) -* bug reports: Feedback. (line 6) -* C-c C-c, overview: The very busy C-c C-c key. - (line 6) -* calc package: The spreadsheet. (line 6) -* calc.el: Cooperation. (line 6) -* calculations, in tables <1>: The spreadsheet. (line 6) -* calculations, in tables: Built-in table editor. - (line 162) -* calendar commands, from agenda: Agenda commands. (line 454) -* calendar integration: Weekly/daily agenda. (line 32) -* calendar, for selecting date: The date/time prompt. - (line 76) -* capture <1>: Capture. (line 6) -* capture: Capture - Refile - Archive. - (line 6) -* capturing, from agenda: Agenda commands. (line 348) -* category: Categories. (line 6) -* category filtering, in agenda: Filtering/limiting agenda items. - (line 17) -* category, require for tags/property match: Matching tags and properties. - (line 72) -* CDLaTeX: CDLaTeX mode. (line 6) -* cdlatex.el: Cooperation. (line 21) -* center blocks: Paragraphs. (line 31) -* center image (LaTeX export): Images in LaTeX export. - (line 52) -* checkbox blocking: Checkboxes. (line 46) -* checkbox statistics: Checkboxes. (line 30) -* checkboxes: Checkboxes. (line 6) -* checkboxes and TODO dependencies: TODO dependencies. (line 52) -* children, subtree visibility state: Global and local cycling. - (line 10) -* clean outline view: Clean view. (line 6) -* clocking time: Clocking work time. (line 6) -* clocktable, dynamic block: The clock table. (line 6) -* code block, batch execution: Batch execution. (line 6) -* code block, editing: Editing source code. (line 6) -* code block, evaluating: Evaluating code blocks. - (line 6) -* code block, exporting: Exporting code blocks. - (line 6) -* code block, extracting source code: Extracting source code. - (line 6) -* code block, header arguments: Header arguments. (line 6) -* code block, key bindings: Key bindings and useful functions. - (line 6) -* code block, languages: Languages. (line 6) -* code block, library: Library of Babel. (line 6) -* code block, noweb reference: Noweb reference syntax. - (line 6) -* code block, results of evaluation: Results of evaluation. - (line 6) -* code block, structure: Structure of code blocks. - (line 6) -* code line references, markup rules: Literal examples. (line 6) -* code text, markup rules: Emphasis and monospace. - (line 6) -* column formula: Column formulas. (line 6) -* column view, for properties: Defining columns. (line 6) -* column view, in agenda: Agenda column view. (line 6) -* column, of field coordinates: References. (line 86) -* commands, in agenda buffer: Agenda commands. (line 6) -* comment lines: Comment lines. (line 6) -* comment trees: Comment lines. (line 13) -* commented entries, in agenda views: Agenda views. (line 37) -* completion, of dictionary words: Completion. (line 6) -* completion, of file names: Handling links. (line 89) -* completion, of link abbreviations: Completion. (line 6) -* completion, of links: Handling links. (line 66) -* completion, of option keywords <1>: Completion. (line 6) -* completion, of option keywords: Per-file keywords. (line 23) -* completion, of property keys: Completion. (line 6) -* completion, of tags <1>: Completion. (line 6) -* completion, of tags: Setting tags. (line 11) -* completion, of TeX symbols: Completion. (line 6) -* completion, of TODO keywords <1>: Completion. (line 6) -* completion, of TODO keywords: Workflow states. (line 15) -* constants, in calculations: References. (line 110) -* constants.el: Cooperation. (line 12) -* constcgs, STARTUP keyword: In-buffer settings. (line 143) -* constSI, STARTUP keyword: In-buffer settings. (line 143) -* content, STARTUP keyword <1>: In-buffer settings. (line 71) -* content, STARTUP keyword: Initial visibility. (line 6) -* contents, global visibility state: Global and local cycling. - (line 22) -* context-sensitive commands, hooks: Context-sensitive commands. - (line 6) -* continuous clocking: Resolving idle time. (line 78) -* convert: Configuring a document converter. - (line 6) -* converter: Configuring a document converter. - (line 6) -* coordinates, of field: References. (line 86) -* copying notes: Refile and copy. (line 6) -* copying, of subtrees: Structure editing. (line 6) -* countdown timer: Timers. (line 6) -* creating timestamps: Creating timestamps. (line 6) -* CSS, for HTML export: CSS support. (line 6) -* CUA.el: Conflicts. (line 18) -* custom agenda views: Custom agenda views. (line 6) -* custom date/time format: Custom time format. (line 6) -* custom search strings: Custom searches. (line 6) -* customization: Customization. (line 6) -* customtime, STARTUP keyword: In-buffer settings. (line 139) -* cutting, of subtrees: Structure editing. (line 6) -* cycling, in plain lists: Plain lists. (line 69) -* cycling, of agenda files: Agenda files. (line 22) -* cycling, of TODO states: TODO basics. (line 14) -* cycling, visibility: Visibility cycling. (line 6) -* daily agenda: Weekly/daily agenda. (line 6) -* dash, special symbol: Special symbols. (line 39) -* date format, custom: Custom time format. (line 6) -* date range: Timestamps. (line 42) -* date stamp: Dates and times. (line 6) -* date stamps: Timestamps. (line 6) -* date tree: Using capture. (line 9) -* date, macro: Macro replacement. (line 31) -* date, reading in minibuffer: The date/time prompt. - (line 6) -* dates: Dates and times. (line 6) -* Davison, Dan: Working with source code. - (line 6) -* DEADLINE keyword: Deadlines and scheduling. - (line 11) -* deadlines: Timestamps. (line 6) -* debugging, of table formulas: Editing and debugging formulas. - (line 132) -* demotion, of subtrees: Structure editing. (line 6) -* dependencies, of TODO states: TODO dependencies. (line 6) -* diary entries, creating from agenda: Agenda commands. (line 459) -* diary integration: Weekly/daily agenda. (line 32) -* dictionary word completion: Completion. (line 6) -* directories, for publishing: Sources and destinations. - (line 6) -* dispatching agenda commands: Agenda dispatcher. (line 6) -* display changing, in agenda: Agenda commands. (line 69) -* doc, docx, rtf: Configuring a document converter. - (line 6) -* document structure: Document structure. (line 6) -* document title: Export settings. (line 59) -* Dominik, Carsten: Cooperation. (line 12) -* DONE, final TODO keyword: Per-file keywords. (line 26) -* dragging, agenda lines: Agenda commands. (line 353) -* drawer, for properties: Property syntax. (line 6) -* drawer, for state change recording: Tracking TODO state changes. - (line 6) -* drawers: Drawers. (line 6) -* Duration, computing: Durations and time values. - (line 6) -* dvipng <1>: Working with LaTeX math snippets. - (line 47) -* dvipng: Math formatting in HTML export. - (line 6) -* dvisvgm <1>: Working with LaTeX math snippets. - (line 47) -* dvisvgm: Math formatting in HTML export. - (line 6) -* dynamic blocks: Dynamic blocks. (line 6) -* dynamic indentation: Clean view. (line 6) -* ecomplete.el: Conflicts. (line 33) -* editing tables: Tables. (line 6) -* editing, of table formulas: Editing and debugging formulas. - (line 6) -* edits, catching invisible: Catching invisible edits. - (line 6) -* effort estimates: Effort estimates. (line 6) -* effort filtering, in agenda: Filtering/limiting agenda items. - (line 17) -* Elisp links: External links. (line 6) -* ellipsis, special symbol: Special symbols. (line 39) -* ELPA: Activation. (line 6) -* emacsserver: Protocols. (line 6) -* email, macro: Macro replacement. (line 26) -* embedding images in ODT: Images in ODT export. - (line 6) -* entitiesplain, STARTUP keyword: In-buffer settings. (line 166) -* entitiespretty, STARTUP keyword <1>: In-buffer settings. (line 166) -* entitiespretty, STARTUP keyword: Special symbols. (line 34) -* escaping characters: Special symbols. (line 27) -* evaluate time range: Creating timestamps. (line 62) -* even, STARTUP keyword: In-buffer settings. (line 129) -* example blocks, in LaTeX export: Example blocks in LaTeX export. - (line 6) -* export back-end: Exporting. (line 12) -* export back-ends, built-in: Other built-in back-ends. - (line 6) -* Export, dispatcher: The export dispatcher. - (line 6) -* export, OpenDocument: OpenDocument Text export. - (line 6) -* Export, settings: Export settings. (line 6) -* Export, writing back-ends: Adding export back-ends. - (line 6) -* exporting: Exporting. (line 6) -* exporting agenda views <1>: Exporting agenda views. - (line 13) -* exporting agenda views: Agenda commands. (line 505) -* exporting, not: Comment lines. (line 6) -* extended TODO keywords: TODO extensions. (line 6) -* external archiving: Moving subtrees. (line 6) -* external links: External links. (line 6) -* external links, in HTML export: Links in HTML export. - (line 6) -* faces, for TODO keywords: Faces for TODO keywords. - (line 6) -* FAQ: Summary. (line 49) -* feedback: Feedback. (line 6) -* field coordinates: References. (line 86) -* field formula: Field and range formulas. - (line 6) -* field references: References. (line 15) -* file links: External links. (line 6) -* file links, searching: Search options. (line 6) -* file name completion: Handling links. (line 89) -* files for agenda: Agenda files. (line 6) -* files, adding to agenda list: Agenda files. (line 15) -* files, selecting for publishing: Selecting files. (line 6) -* filladapt.el: Conflicts. (line 44) -* filtering, by tag, category, top headline and effort, in agenda: Filtering/limiting agenda items. - (line 17) -* Filters, exporting: Advanced configuration. - (line 32) -* fnadjust, STARTUP keyword: In-buffer settings. (line 149) -* fnauto, STARTUP keyword: In-buffer settings. (line 149) -* fnconfirm, STARTUP keyword: In-buffer settings. (line 149) -* fninline, STARTUP keyword: In-buffer settings. (line 149) -* fnlocal, STARTUP keyword: In-buffer settings. (line 149) -* fnplain, STARTUP keyword: In-buffer settings. (line 149) -* fnprompt, STARTUP keyword: In-buffer settings. (line 149) -* folded, subtree visibility state: Global and local cycling. - (line 10) -* folding, sparse trees: Sparse trees. (line 6) -* following links: Handling links. (line 101) -* footnotes: Footnotes. (line 6) -* format specifier: Formula syntax for Calc. - (line 14) -* format, of links: Link format. (line 6) -* formatting source code, markup rules: Literal examples. (line 23) -* formula debugging: Editing and debugging formulas. - (line 132) -* formula editing: Editing and debugging formulas. - (line 6) -* formula syntax, Calc: Formula syntax for Calc. - (line 6) -* formula, for individual table field: Field and range formulas. - (line 6) -* formula, for range of fields: Field and range formulas. - (line 6) -* formula, for table column: Column formulas. (line 6) -* formula, in tables: Built-in table editor. - (line 162) -* Gillespie, Dave: Cooperation. (line 6) -* global cycling: Global and local cycling. - (line 22) -* global key bindings: Activation. (line 6) -* global TODO list: Global TODO list. (line 6) -* global visibility states: Global and local cycling. - (line 22) -* Gnus links: External links. (line 6) -* graph, in tables: Org-Plot. (line 6) -* group tags: Tag hierarchy. (line 6) -* group tags, as regular expressions: Matching tags and properties. - (line 65) -* grouping columns in tables: Column groups. (line 6) -* habits: Tracking your habits. - (line 6) -* hacking: Hacking. (line 6) -* header, for LaTeX files: LaTeX header and sectioning. - (line 6) -* headline navigation: Motion. (line 6) -* headline tagging: Tags. (line 6) -* headline, promotion and demotion: Structure editing. (line 6) -* headlines: Headlines. (line 6) -* hide text: Visibility cycling. (line 6) -* hideblocks, STARTUP keyword <1>: In-buffer settings. (line 161) -* hideblocks, STARTUP keyword: Blocks. (line 13) -* hidestars, STARTUP keyword: In-buffer settings. (line 129) -* hiding leading stars: Clean view. (line 6) -* history: History and acknowledgments. - (line 6) -* hooks: Hooks. (line 6) -* horizontal rules, in ASCII export: ASCII/Latin-1/UTF-8 export. - (line 64) -* horizontal rules, in LaTeX export: Horizontal rules in LaTeX export. - (line 6) -* horizontal rules, markup rules: Horizontal rules. (line 6) -* HTML entities: Special symbols. (line 6) -* HTML export: HTML export. (line 6) -* HTML export, CSS: CSS support. (line 6) -* HTML, and Orgtbl mode: Translator functions. - (line 6) -* HTML5, export new elements: HTML doctypes. (line 36) -* hyperlinks: Hyperlinks. (line 6) -* hyperlinks, adding new types: Adding hyperlink types. - (line 6) -* iCalendar export: iCalendar export. (line 6) -* identify, ImageMagick: Images in ODT export. - (line 33) -* idle, resolve, dangling: Resolving idle time. (line 9) -* image, centering (LaTeX export): Images in LaTeX export. - (line 52) -* imagemagick <1>: Working with LaTeX math snippets. - (line 47) -* imagemagick: Math formatting in HTML export. - (line 6) -* images, embedding in ODT: Images in ODT export. - (line 6) -* images, inline in HTML: Images in HTML export. - (line 6) -* images, inline in LaTeX: Images in LaTeX export. - (line 6) -* images, inlining: Handling links. (line 136) -* imenu.el: Cooperation. (line 25) -* in-buffer settings: In-buffer settings. (line 6) -* inactive timestamp: Timestamps. (line 51) -* include files, during export: Include files. (line 6) -* indent, STARTUP keyword: In-buffer settings. (line 76) -* indentation, in source blocks <1>: Editing source code. (line 38) -* indentation, in source blocks: Literal examples. (line 72) -* index, in a publishing project: Generating an index. (line 6) -* Info links: External links. (line 6) -* inheritance, of properties: Property inheritance. - (line 6) -* inheritance, of tags: Tag inheritance. (line 6) -* inlined images, markup rules: Images and tables. (line 22) -* inlineimages, STARTUP keyword <1>: In-buffer settings. (line 90) -* inlineimages, STARTUP keyword: Handling links. (line 136) -* inlining images: Handling links. (line 136) -* inlining images in HTML: Images in HTML export. - (line 6) -* inlining images in LaTeX: Images in LaTeX export. - (line 6) -* input file, macro: Macro replacement. (line 47) -* inserting links: Handling links. (line 66) -* insertion, of templates: Easy templates. (line 6) -* installation: Installation. (line 6) -* internal links: Internal links. (line 6) -* internal links, in HTML export: Links in HTML export. - (line 6) -* introduction: Introduction. (line 6) -* iPhone: MobileOrg. (line 6) -* IRC links: External links. (line 6) -* italic text, markup rules: Emphasis and monospace. - (line 6) -* jumping, to headlines: Motion. (line 6) -* key bindings, global: Activation. (line 6) -* keyword options: Per-file keywords. (line 6) -* LaTeX class: LaTeX header and sectioning. - (line 6) -* LaTeX entities: Special symbols. (line 6) -* LaTeX export: LaTeX export. (line 6) -* LaTeX fragments: LaTeX fragments. (line 6) -* LaTeX fragments, preview: Previewing LaTeX fragments. - (line 6) -* LaTeX header: LaTeX header and sectioning. - (line 6) -* LaTeX interpretation: Embedded LaTeX. (line 6) -* LaTeX sectioning structure: LaTeX header and sectioning. - (line 6) -* LaTeX, and Orgtbl mode: A LaTeX example. (line 6) -* latexpreview, STARTUP keyword: In-buffer settings. (line 97) -* Latin-1 export: ASCII/Latin-1/UTF-8 export. - (line 6) -* level, require for tags/property match: Matching tags and properties. - (line 72) -* LibreOffice <1>: Extending ODT export. - (line 11) -* LibreOffice: OpenDocument Text export. - (line 6) -* limits, in agenda: Filtering/limiting agenda items. - (line 118) -* link abbreviations: Link abbreviations. (line 6) -* link abbreviations, completion of: Completion. (line 6) -* link completion: Handling links. (line 66) -* link format: Link format. (line 6) -* links, external: External links. (line 6) -* links, finding next/previous: Handling links. (line 156) -* links, handling: Handling links. (line 6) -* links, in HTML export: Links in HTML export. - (line 6) -* links, in ODT export: Links in ODT export. (line 6) -* links, internal: Internal links. (line 6) -* links, publishing: Publishing links. (line 6) -* links, radio targets: Radio targets. (line 6) -* links, returning to: Handling links. (line 149) -* linter: Org syntax. (line 24) -* Lisp forms, as table formulas: Formula syntax for Lisp. - (line 6) -* list of listings: Table of contents. (line 6) -* list of tables: Table of contents. (line 6) -* lists, in other modes: Tables in arbitrary syntax. - (line 6) -* lists, ordered: Plain lists. (line 6) -* lists, plain: Plain lists. (line 6) -* literal examples, markup rules: Literal examples. (line 6) -* logdone, STARTUP keyword: In-buffer settings. (line 103) -* logdrawer, STARTUP keyword: In-buffer settings. (line 103) -* logging, of progress: Progress logging. (line 6) -* lognoteclock-out, STARTUP keyword: In-buffer settings. (line 103) -* lognotedone, STARTUP keyword: In-buffer settings. (line 103) -* lognoteredeadline, STARTUP keyword: In-buffer settings. (line 103) -* lognoterefile, STARTUP keyword: In-buffer settings. (line 103) -* lognoterepeat, STARTUP keyword: In-buffer settings. (line 103) -* lognotereschedule, STARTUP keyword: In-buffer settings. (line 103) -* logredeadline, STARTUP keyword: In-buffer settings. (line 103) -* logrefile, STARTUP keyword: In-buffer settings. (line 103) -* logrepeat, STARTUP keyword: In-buffer settings. (line 103) -* logreschedule, STARTUP keyword: In-buffer settings. (line 103) -* logstatesreversed, STARTUP keyword: In-buffer settings. (line 103) -* lookup functions in tables: Lookup functions. (line 6) -* Ludlam, Eric M.: Cooperation. (line 34) -* macro replacement, during export: Macro replacement. (line 6) -* maintainer: Feedback. (line 6) -* mapping entries, API: Using the mapping API. - (line 6) -* mark ring: Handling links. (line 145) -* Markdown export: Markdown export. (line 6) -* marking characters, tables: Advanced features. (line 39) -* match view: Matching tags and properties. - (line 6) -* matching, of properties: Matching tags and properties. - (line 6) -* matching, of tags: Matching tags and properties. - (line 6) -* matching, tags: Tags. (line 6) -* math symbols: Special symbols. (line 6) -* MathJax: Math formatting in HTML export. - (line 6) -* MathML: Working with LaTeX math snippets. - (line 9) -* MH-E links: External links. (line 6) -* minor mode for structure editing: Orgstruct mode. (line 6) -* minor mode for tables: Orgtbl mode. (line 6) -* MobileOrg: MobileOrg. (line 6) -* mode, for calc: Formula syntax for Calc. - (line 14) -* modification time, macro: Macro replacement. (line 38) -* motion commands in agenda: Agenda commands. (line 19) -* motion, between headlines: Motion. (line 6) -* name, of column or field: References. (line 110) -* named references: References. (line 110) -* names as TODO keywords: TODO types. (line 6) -* narrow columns in tables: Column width and alignment. - (line 6) -* noalign, STARTUP keyword: In-buffer settings. (line 85) -* nofnadjust, STARTUP keyword: In-buffer settings. (line 149) -* nofninline, STARTUP keyword: In-buffer settings. (line 149) -* nohideblocks, STARTUP keyword <1>: In-buffer settings. (line 161) -* nohideblocks, STARTUP keyword: Blocks. (line 13) -* noindent, STARTUP keyword: In-buffer settings. (line 76) -* noinlineimages, STARTUP keyword <1>: In-buffer settings. (line 90) -* noinlineimages, STARTUP keyword: Handling links. (line 136) -* nolatexpreview, STARTUP keyword: In-buffer settings. (line 97) -* nologdone, STARTUP keyword: In-buffer settings. (line 103) -* nologdrawer, STARTUP keyword: In-buffer settings. (line 103) -* nolognoteclock-out, STARTUP keyword: In-buffer settings. (line 103) -* nologredeadline, STARTUP keyword: In-buffer settings. (line 103) -* nologrefile, STARTUP keyword: In-buffer settings. (line 103) -* nologrepeat, STARTUP keyword: In-buffer settings. (line 103) -* nologreschedule, STARTUP keyword: In-buffer settings. (line 103) -* nologstatesreversed, STARTUP keyword: In-buffer settings. (line 103) -* occur, command: Sparse trees. (line 6) -* occur-tree: Storing searches. (line 9) -* odd, STARTUP keyword: In-buffer settings. (line 129) -* odd-levels-only outlines: Clean view. (line 6) -* ODT: OpenDocument Text export. - (line 6) -* ODT_STYLES_FILE: ODT specific export settings. - (line 19) -* OpenDocument: OpenDocument Text export. - (line 6) -* option keyword completion: Completion. (line 6) -* options, for custom agenda views: Setting options. (line 6) -* options, for customization: Customization. (line 6) -* options, for publishing: Publishing options. (line 6) -* ordered lists: Plain lists. (line 6) -* Org entities: Special symbols. (line 6) -* Org export: Org export. (line 6) -* Org mode, turning on: Activation. (line 21) -* Org syntax: Org syntax. (line 6) -* org-agenda, command: Weekly/daily agenda. (line 9) -* org-capture-last-stored: Using capture. (line 50) -* org-crypt.el: org-crypt. (line 6) -* org-decrypt-entry: org-crypt. (line 6) -* org-hide-block-startup: In-buffer settings. (line 160) -* org-insert-drawer <1>: Property syntax. (line 90) -* org-insert-drawer: Drawers. (line 6) -* org-list-insert-radio-list: Radio lists. (line 6) -* org-pretty-entities: In-buffer settings. (line 165) -* org-publish-project-alist: Project alist. (line 6) -* Orgstruct mode: Orgstruct mode. (line 6) -* Orgtbl mode <1>: Tables in arbitrary syntax. - (line 6) -* Orgtbl mode: Orgtbl mode. (line 6) -* Ota, Takaaki: Cooperation. (line 41) -* Outline mode: Outlines. (line 6) -* outline tree: Headlines. (line 6) -* outlines: Outlines. (line 6) -* overview, global visibility state: Global and local cycling. - (line 22) -* overview, STARTUP keyword <1>: In-buffer settings. (line 71) -* overview, STARTUP keyword: Initial visibility. (line 6) -* packages, interaction with other: Interaction. (line 6) -* paragraphs, markup rules: Paragraphs. (line 6) -* pasting, of subtrees: Structure editing. (line 6) -* PDF export: LaTeX export. (line 6) -* per-file keywords: Per-file keywords. (line 6) -* plain lists: Plain lists. (line 6) -* plain lists, in LaTeX export: Plain lists in LaTeX export. - (line 6) -* plain text external links: External links. (line 69) -* plot tables using Gnuplot: Org-Plot. (line 6) -* presentation, of agenda items: Presentation and sorting. - (line 6) -* print edition: Summary. (line 52) -* printing sparse trees: Sparse trees. (line 53) -* priorities: Priorities. (line 6) -* priorities, of agenda items: Sorting agenda items. - (line 6) -* progress logging: Progress logging. (line 6) -* projects, for publishing: Project alist. (line 6) -* promotion, of subtrees: Structure editing. (line 6) -* proof, in LaTeX export: Special blocks in LaTeX export. - (line 6) -* properties: Properties and columns. - (line 6) -* properties, API <1>: Using the property API. - (line 6) -* properties, API: Property API. (line 6) -* properties, column view: Defining columns. (line 6) -* properties, inheritance: Property inheritance. - (line 6) -* properties, searching: Property searches. (line 6) -* properties, special: Special properties. (line 6) -* property EXPORT_FILE_NAME: ODT export commands. (line 7) -* property syntax: Property syntax. (line 6) -* property, +: Property syntax. (line 52) -* property, _ALL: Property syntax. (line 44) -* property, ALT_TITLE: Table of contents. (line 37) -* property, APPENDIX: Headings and sectioning structure. - (line 19) -* property, ARCHIVE <1>: Moving subtrees. (line 37) -* property, ARCHIVE: Property inheritance. - (line 34) -* property, ATTACH_DIR: Attachments. (line 74) -* property, ATTACH_DIR_INHERIT: Attachments. (line 79) -* property, BEAMER_ACT: Sectioning Frames and Blocks in Beamer. - (line 38) -* property, BEAMER_COL: Sectioning Frames and Blocks in Beamer. - (line 45) -* property, BEAMER_ENV: Sectioning Frames and Blocks in Beamer. - (line 14) -* property, BEAMER_OPT: Sectioning Frames and Blocks in Beamer. - (line 38) -* property, BEAMER_REF: Sectioning Frames and Blocks in Beamer. - (line 25) -* property, CATEGORY <1>: Categories. (line 12) -* property, CATEGORY: Property inheritance. - (line 30) -* property, COLUMNS <1>: In-buffer settings. (line 26) -* property, COLUMNS: Property inheritance. - (line 22) -* property, COOKIE_DATA <1>: Checkboxes. (line 30) -* property, COOKIE_DATA: Breaking down tasks. (line 21) -* property, COPYING: Texinfo title and copyright page. - (line 21) -* property, CUSTOM_ID <1>: Handling links. (line 21) -* property, CUSTOM_ID: Internal links. (line 6) -* property, DESCRIPTION <1>: iCalendar export. (line 46) -* property, DESCRIPTION: Headings and sectioning structure. - (line 22) -* property, Effort: Effort estimates. (line 6) -* property, EXPORT_LATEX_CLASS: LaTeX header and sectioning. - (line 22) -* property, EXPORT_LATEX_CLASS_OPTIONS: LaTeX header and sectioning. - (line 22) -* property, ID <1>: iCalendar export. (line 21) -* property, ID <2>: Capturing column view. - (line 22) -* property, ID: Handling links. (line 21) -* property, INDEX: Indices. (line 13) -* property, LOCATION: iCalendar export. (line 46) -* property, LOG_INTO_DRAWER <1>: Clocking commands. (line 7) -* property, LOG_INTO_DRAWER: Tracking TODO state changes. - (line 6) -* property, LOGGING <1>: Property inheritance. - (line 38) -* property, LOGGING: Tracking TODO state changes. - (line 45) -* property, macro: Macro replacement. (line 51) -* property, ORDERED <1>: Checkboxes. (line 46) -* property, ORDERED: TODO dependencies. (line 6) -* property, special, ALLTAGS: Special properties. (line 13) -* property, special, BLOCKED: Special properties. (line 13) -* property, special, CLOCKSUM <1>: Agenda column view. (line 28) -* property, special, CLOCKSUM: Special properties. (line 13) -* property, special, CLOCKSUM_T <1>: Agenda column view. (line 51) -* property, special, CLOCKSUM_T: Special properties. (line 13) -* property, special, CLOSED: Special properties. (line 13) -* property, special, DEADLINE: Special properties. (line 13) -* property, special, FILE: Special properties. (line 13) -* property, special, ITEM: Special properties. (line 13) -* property, special, PRIORITY: Special properties. (line 13) -* property, special, SCHEDULED: Special properties. (line 13) -* property, special, TAGS: Special properties. (line 13) -* property, special, TIMESTAMP: Special properties. (line 13) -* property, special, TIMESTAMP_IA: Special properties. (line 13) -* property, special, TODO: Special properties. (line 13) -* property, SUMMARY: iCalendar export. (line 46) -* property, UNNUMBERED: Export settings. (line 148) -* property, VISIBILITY: Initial visibility. (line 17) -* property: CLOCK_MODELINE_TOTAL: Clocking commands. (line 20) -* property: LAST_REPEAT: Clocking commands. (line 20) -* protocols, for external access: Protocols. (line 6) -* publishing: Publishing. (line 6) -* query editing, in agenda: Filtering/limiting agenda items. - (line 17) -* quote blocks: Paragraphs. (line 26) -* radio lists: Radio lists. (line 6) -* radio tables: Radio tables. (line 6) -* radio targets: Radio targets. (line 6) -* range formula: Field and range formulas. - (line 6) -* range references: References. (line 63) -* ranges, time: Timestamps. (line 6) -* recomputing table fields: Updating the table. (line 6) -* references: References. (line 6) -* references, named: References. (line 110) -* references, remote: References. (line 131) -* references, to a different table: References. (line 131) -* references, to fields: References. (line 15) -* references, to ranges: References. (line 63) -* refiling notes: Refile and copy. (line 6) -* region, active <1>: ODT export commands. (line 6) -* region, active <2>: Built-in table editor. - (line 162) -* region, active: Structure editing. (line 139) -* regular expressions, with tags search: Matching tags and properties. - (line 61) -* relative timer: Timers. (line 6) -* reminders: Weekly/daily agenda. (line 126) -* remote editing, bulk, from agenda: Agenda commands. (line 364) -* remote editing, from agenda: Agenda commands. (line 227) -* remote editing, undo: Agenda commands. (line 228) -* remote references: References. (line 131) -* repeated tasks: Repeated tasks. (line 6) -* report, of clocked time: The clock table. (line 6) -* resolve idle time: Resolving idle time. (line 9) -* revealing context: Global and local cycling. - (line 38) -* RMAIL links: External links. (line 6) -* Rose, Sebastian: JavaScript support. (line 6) -* row, of field coordinates: References. (line 86) -* RSS feeds: RSS feeds. (line 6) -* rsync: Uploading files. (line 6) -* SCHEDULED keyword: Deadlines and scheduling. - (line 31) -* scheduling: Timestamps. (line 6) -* Schulte, Eric: Working with source code. - (line 6) -* Scripts, for agenda processing: Extracting agenda information. - (line 6) -* search option in file links: Search options. (line 6) -* search strings, custom: Custom searches. (line 6) -* search view: Search view. (line 6) -* searching for tags: Tag searches. (line 6) -* searching, for text: Search view. (line 6) -* searching, of properties: Property searches. (line 6) -* sectioning structure, for LaTeX export: LaTeX header and sectioning. - (line 6) -* set startup visibility, command: Global and local cycling. - (line 33) -* setting tags: Setting tags. (line 6) -* SHELL links: External links. (line 6) -* shift-selection-mode <1>: Conflicts. (line 6) -* shift-selection-mode: Plain lists. (line 94) -* show all, command: Global and local cycling. - (line 35) -* show all, global visibility state: Global and local cycling. - (line 22) -* show branches, command: Global and local cycling. - (line 47) -* show children, command: Global and local cycling. - (line 51) -* show hidden text: Visibility cycling. (line 6) -* showall, STARTUP keyword <1>: In-buffer settings. (line 71) -* showall, STARTUP keyword: Initial visibility. (line 6) -* showeverything, STARTUP keyword <1>: In-buffer settings. (line 71) -* showeverything, STARTUP keyword: Initial visibility. (line 6) -* showstars, STARTUP keyword: In-buffer settings. (line 129) -* shy hyphen, special symbol: Special symbols. (line 39) -* sitemap, of published pages: Sitemap. (line 6) -* sorting, of agenda items: Sorting agenda items. - (line 6) -* sorting, of plain list: Plain lists. (line 154) -* sorting, of subtrees: Structure editing. (line 6) -* source blocks, in LaTeX export: Source blocks in LaTeX export. - (line 6) -* source code, batch execution: Batch execution. (line 6) -* source code, block header arguments: Header arguments. (line 6) -* source code, block structure: Structure of code blocks. - (line 6) -* source code, editing: Editing source code. (line 6) -* source code, evaluating: Evaluating code blocks. - (line 6) -* source code, exporting: Exporting code blocks. - (line 6) -* source code, extracting: Extracting source code. - (line 6) -* source code, inline: Structure of code blocks. - (line 24) -* source code, language: Structure of code blocks. - (line 51) -* source code, languages: Languages. (line 6) -* source code, library: Library of Babel. (line 6) -* source code, noweb reference: Noweb reference syntax. - (line 6) -* source code, results of evaluation: Results of evaluation. - (line 6) -* source code, switches: Structure of code blocks. - (line 56) -* source code, working with: Working with source code. - (line 6) -* sparse tree, for deadlines: Inserting deadline/schedule. - (line 24) -* sparse tree, for TODO: TODO basics. (line 41) -* sparse tree, tag based: Tags. (line 6) -* sparse trees: Sparse trees. (line 6) -* special blocks, in ASCII export: ASCII/Latin-1/UTF-8 export. - (line 75) -* special blocks, in LaTeX export: Special blocks in LaTeX export. - (line 6) -* special keywords: In-buffer settings. (line 6) -* special symbols: Special symbols. (line 6) -* special symbols, in-buffer display: Special symbols. (line 31) -* speed keys: Speed keys. (line 6) -* speedbar.el: Cooperation. (line 34) -* spreadsheet capabilities: The spreadsheet. (line 6) -* square brackets, around links: External links. (line 69) -* statistics, for checkboxes: Checkboxes. (line 30) -* statistics, for TODO items: Breaking down tasks. (line 6) -* storing links: Handling links. (line 10) -* Storm, Kim. F.: Conflicts. (line 18) -* strike-through text, markup rules: Emphasis and monospace. - (line 6) -* structure editing: Structure editing. (line 6) -* structure of document: Document structure. (line 6) -* styles, custom <1>: Working with OpenDocument style files. - (line 6) -* styles, custom: Applying custom styles. - (line 6) -* sublevels, inclusion into tags match: Tag inheritance. (line 6) -* sublevels, inclusion into TODO list: Global TODO list. (line 35) -* subscript: Subscripts and superscripts. - (line 6) -* SUBTITLE (ODT): ODT specific export settings. - (line 23) -* subtree cycling: Global and local cycling. - (line 10) -* subtree visibility states: Global and local cycling. - (line 10) -* subtree, cut and paste: Structure editing. (line 6) -* subtree, subtree visibility state: Global and local cycling. - (line 10) -* subtrees, cut and paste: Structure editing. (line 6) -* summary: Summary. (line 6) -* superscript: Subscripts and superscripts. - (line 6) -* syntax checker: Org syntax. (line 24) -* syntax, noweb: Noweb reference syntax. - (line 6) -* syntax, of formulas: Formula syntax for Calc. - (line 6) -* table editor, built-in: Built-in table editor. - (line 6) -* table editor, table.el: Cooperation. (line 41) -* table lookup functions: Lookup functions. (line 6) -* table of contents: Table of contents. (line 6) -* table.el: Cooperation. (line 38) -* tables: Tables. (line 6) -* tables, in HTML: Tables in HTML export. - (line 6) -* tables, in LaTeX export: Tables in LaTeX export. - (line 6) -* tables, in ODT export <1>: Customizing tables in ODT export. - (line 6) -* tables, in ODT export: Tables in ODT export. - (line 6) -* tables, in other modes: Tables in arbitrary syntax. - (line 6) -* tables, markup rules: Images and tables. (line 6) -* tag completion: Completion. (line 6) -* tag filtering, in agenda: Filtering/limiting agenda items. - (line 17) -* tag hierarchy: Tag hierarchy. (line 6) -* tag inheritance: Tag inheritance. (line 6) -* tag searches: Tag searches. (line 6) -* tags: Tags. (line 6) -* tags view: Matching tags and properties. - (line 6) -* tags, as an agenda view: Storing searches. (line 9) -* tags, groups: Tag hierarchy. (line 6) -* tags, setting: Setting tags. (line 6) -* tags-todo: Storing searches. (line 9) -* tags-tree: Storing searches. (line 9) -* tangling: Extracting source code. - (line 6) -* targets, for links: Internal links. (line 6) -* targets, radio: Radio targets. (line 6) -* tasks, breaking down: Breaking down tasks. (line 6) -* tasks, repeated: Repeated tasks. (line 6) -* template insertion: Easy templates. (line 6) -* template, custom <1>: Working with OpenDocument style files. - (line 6) -* template, custom: Applying custom styles. - (line 6) -* templates, for Capture: Capture templates. (line 6) -* TeX interpretation: Embedded LaTeX. (line 6) -* TeX symbol completion: Completion. (line 6) -* Texinfo export: Texinfo export. (line 6) -* text areas, in HTML: Text areas in HTML export. - (line 6) -* text search: Search view. (line 6) -* thanks: History and acknowledgments. - (line 6) -* time clocking: Clocking work time. (line 6) -* time format, custom: Custom time format. (line 6) -* time grid: Time-of-day specifications. - (line 26) -* Time, computing: Durations and time values. - (line 6) -* time, macro: Macro replacement. (line 38) -* time, reading in minibuffer: The date/time prompt. - (line 6) -* time-of-day specification: Time-of-day specifications. - (line 6) -* timerange: Timestamps. (line 42) -* times: Dates and times. (line 6) -* timestamp <1>: Timestamps. (line 14) -* timestamp: Dates and times. (line 6) -* timestamp, inactive: Timestamps. (line 51) -* timestamp, with repeater interval: Timestamps. (line 25) -* timestamps: Timestamps. (line 6) -* timestamps, creating: Creating timestamps. (line 6) -* title, macro: Macro replacement. (line 26) -* TODO dependencies: TODO dependencies. (line 6) -* TODO dependencies, NOBLOCKING: TODO dependencies. (line 6) -* TODO items: TODO items. (line 6) -* TODO keyword matching: Global TODO list. (line 18) -* TODO keyword matching, with tags search: Matching tags and properties. - (line 72) -* TODO keyword sets: Multiple sets in one file. - (line 6) -* TODO keywords completion: Completion. (line 6) -* TODO list, global: Global TODO list. (line 6) -* TODO types: TODO types. (line 6) -* TODO workflow: Workflow states. (line 6) -* todo, as an agenda view: Storing searches. (line 9) -* todo-tree: Storing searches. (line 9) -* top headline filtering, in agenda: Filtering/limiting agenda items. - (line 17) -* transient mark mode <1>: Built-in table editor. - (line 162) -* transient mark mode: Structure editing. (line 139) -* transient-mark-mode: ODT export commands. (line 6) -* translator function: Translator functions. - (line 6) -* trees, sparse: Sparse trees. (line 6) -* trees, visibility: Visibility cycling. (line 6) -* tty key bindings: TTY keys. (line 6) -* types as TODO keywords: TODO types. (line 6) -* underlined text, markup rules: Emphasis and monospace. - (line 6) -* undoing remote-editing events: Agenda commands. (line 228) -* unison: Uploading files. (line 6) -* unoconv: Extending ODT export. - (line 11) -* updating, table: Updating the table. (line 6) -* URL links: External links. (line 6) -* USENET links: External links. (line 6) -* UTF-8 export: ASCII/Latin-1/UTF-8 export. - (line 6) -* variables, for customization: Customization. (line 6) -* vectors, in table calculations: Formula syntax for Calc. - (line 11) -* verbatim blocks, in LaTeX export: Example blocks in LaTeX export. - (line 6) -* verbatim text, markup rules: Emphasis and monospace. - (line 6) -* verse blocks: Paragraphs. (line 13) -* viper.el: Conflicts. (line 91) -* visibility cycling: Visibility cycling. (line 6) -* visibility cycling, drawers: Drawers. (line 6) -* visibility, initialize: Initial visibility. (line 6) -* visible text, printing: Sparse trees. (line 53) -* VM links: External links. (line 42) -* WANDERLUST links: External links. (line 42) -* weekly agenda: Weekly/daily agenda. (line 6) -* windmove.el: Conflicts. (line 78) -* workflow states as TODO keywords: Workflow states. (line 6) -* yasnippet.el: Conflicts. (line 52) -* zip: Pre-requisites for ODT export. - (line 6) - - -File: org, Node: Key Index, Next: Command and Function Index, Prev: Main Index, Up: Top - -Key index -********* - -[index] -* Menu: - -* $: Agenda commands. (line 262) -* %: Agenda commands. (line 381) -* ': CDLaTeX mode. (line 43) -* *: Agenda commands. (line 366) -* +: Agenda commands. (line 284) -* ,: Agenda commands. (line 276) -* -: Agenda commands. (line 289) -* .: Agenda commands. (line 102) -* / <1>: Agenda commands. (line 203) -* /: Filtering/limiting agenda items. - (line 17) -* :: Agenda commands. (line 272) -* ;: Timers. (line 6) -* < <1>: Agenda commands. (line 207) -* < <2>: Filtering/limiting agenda items. - (line 67) -* < <3>: Agenda files. (line 57) -* < <4>: The date/time prompt. - (line 82) -* <: Using column view. (line 71) -* <1>: Agenda commands. (line 42) -* <2>: The date/time prompt. - (line 82) -* <3>: Setting tags. (line 117) -* <4>: Handling links. (line 122) -* : Built-in table editor. - (line 69) -* <1>: Agenda commands. (line 34) -* : Setting tags. (line 114) -* <1>: CDLaTeX mode. (line 23) -* <2>: Agenda commands. (line 39) -* <3>: Setting tags. (line 108) -* <4>: Editing and debugging formulas. - (line 57) -* <5>: Plain lists. (line 68) -* <6>: Structure editing. (line 35) -* : Global and local cycling. - (line 10) -* = <1>: Agenda commands. (line 215) -* =: Filtering/limiting agenda items. - (line 81) -* > <1>: Agenda commands. (line 325) -* > <2>: Agenda files. (line 61) -* > <3>: The date/time prompt. - (line 82) -* >: Using column view. (line 71) -* ?: Pulling from MobileOrg. - (line 28) -* [ <1>: Agenda commands. (line 126) -* [: Filtering/limiting agenda items. - (line 57) -* ]: Filtering/limiting agenda items. - (line 57) -* ^ <1>: CDLaTeX mode. (line 33) -* ^ <2>: Agenda commands. (line 211) -* ^: Filtering/limiting agenda items. - (line 77) -* _ <1>: CDLaTeX mode. (line 33) -* _ <2>: Agenda commands. (line 218) -* _: Filtering/limiting agenda items. - (line 91) -* `: CDLaTeX mode. (line 39) -* a: Agenda commands. (line 250) -* A: Agenda commands. (line 69) -* a: Using column view. (line 60) -* B: Agenda commands. (line 384) -* b: Agenda commands. (line 99) -* C: Agenda commands. (line 487) -* c: Agenda commands. (line 454) -* C-#: Advanced features. (line 10) -* C-': Agenda files. (line 22) -* C-,: Agenda files. (line 22) -* C-0 C-c C-w: Refile and copy. (line 47) -* C-: Structure editing. (line 23) -* C-_: Agenda commands. (line 228) -* C-c !: Creating timestamps. (line 15) -* C-c #: Checkboxes. (line 85) -* C-c $: Moving subtrees. (line 9) -* C-c %: Handling links. (line 142) -* C-c &: Handling links. (line 146) -* C-c ' <1>: Cooperation. (line 48) -* C-c ' <2>: Editing source code. (line 6) -* C-c ' <3>: Include files. (line 58) -* C-c ' <4>: Literal examples. (line 87) -* C-c ' <5>: Editing and debugging formulas. - (line 36) -* C-c ': Footnotes. (line 85) -* C-c * <1>: Updating the table. (line 13) -* C-c * <2>: Plain lists. (line 139) -* C-c *: Structure editing. (line 128) -* C-c +: Built-in table editor. - (line 162) -* C-c ,: Priorities. (line 24) -* C-c - <1>: Built-in table editor. - (line 105) -* C-c -: Plain lists. (line 127) -* C-c .: Creating timestamps. (line 10) -* C-c / <1>: Conflicts. (line 91) -* C-c /: Sparse trees. (line 15) -* C-c / /: Sparse trees. (line 17) -* C-c / a: Inserting deadline/schedule. - (line 31) -* C-c / b: Inserting deadline/schedule. - (line 28) -* C-c / d: Inserting deadline/schedule. - (line 21) -* C-c / m <1>: Property searches. (line 10) -* C-c / m: Tag searches. (line 9) -* C-c / p: Property searches. (line 29) -* C-c / r: Sparse trees. (line 17) -* C-c / t: TODO basics. (line 38) -* C-c ;: Comment lines. (line 19) -* C-c <: Creating timestamps. (line 29) -* C-c : Built-in table editor. - (line 109) -* C-c : Global and local cycling. - (line 51) -* C-c = <1>: Editing and debugging formulas. - (line 13) -* C-c =: Column formulas. (line 32) -* C-c >: Creating timestamps. (line 33) -* C-c ?: Editing and debugging formulas. - (line 22) -* C-c @: Structure editing. (line 65) -* C-c [: Agenda files. (line 15) -* C-c \ <1>: Property searches. (line 10) -* C-c \: Tag searches. (line 9) -* C-c ]: Agenda files. (line 19) -* C-c ^ <1>: Built-in table editor. - (line 113) -* C-c ^ <2>: Plain lists. (line 154) -* C-c ^: Structure editing. (line 107) -* C-c `: Built-in table editor. - (line 180) -* C-c a: Conventions. (line 35) -* C-c a !: Stuck projects. (line 14) -* C-c a #: Stuck projects. (line 13) -* C-c a ?: Pulling from MobileOrg. - (line 37) -* C-c a a: Weekly/daily agenda. (line 9) -* C-c a C: Storing searches. (line 9) -* C-c a e: Exporting agenda views. - (line 64) -* C-c a M: Matching tags and properties. - (line 17) -* C-c a m: Matching tags and properties. - (line 12) -* C-c a M: Property searches. (line 16) -* C-c a m: Property searches. (line 12) -* C-c a M: Tag searches. (line 17) -* C-c a m: Tag searches. (line 13) -* C-c a s: Search view. (line 9) -* C-c a T: Global TODO list. (line 15) -* C-c a t <1>: Global TODO list. (line 9) -* C-c a t: TODO basics. (line 49) -* C-c c <1>: Using capture. (line 6) -* C-c c: Conventions. (line 35) -* C-c c C: Capture templates. (line 10) -* C-c C-*: Plain lists. (line 144) -* C-c C-a <1>: Agenda commands. (line 297) -* C-c C-a: Attachments. (line 26) -* C-c C-a a: Attachments. (line 31) -* C-c C-a c: Attachments. (line 37) -* C-c C-a D: Attachments. (line 69) -* C-c C-a d: Attachments. (line 66) -* C-c C-a F: Attachments. (line 63) -* C-c C-a f: Attachments. (line 60) -* C-c C-a i: Attachments. (line 78) -* C-c C-a l: Attachments. (line 37) -* C-c C-a m: Attachments. (line 37) -* C-c C-a n: Attachments. (line 44) -* C-c C-a O: Attachments. (line 57) -* C-c C-a o: Attachments. (line 51) -* C-c C-a s: Attachments. (line 73) -* C-c C-a u: Attachments. (line 41) -* C-c C-a z: Attachments. (line 47) -* C-c C-b <1>: Editing support. (line 11) -* C-c C-b: Motion. (line 15) -* C-c C-c <1>: Cooperation. (line 41) -* C-c C-c <2>: The very busy C-c C-c key. - (line 6) -* C-c C-c <3>: Key bindings and useful functions. - (line 11) -* C-c C-c <4>: Evaluating code blocks. - (line 20) -* C-c C-c <5>: Previewing LaTeX fragments. - (line 23) -* C-c C-c <6>: Using capture. (line 15) -* C-c C-c <7>: The clock table. (line 16) -* C-c C-c <8>: Clocking commands. (line 51) -* C-c C-c <9>: Creating timestamps. (line 26) -* C-c C-c <10>: Capturing column view. - (line 54) -* C-c C-c <11>: Using column view. (line 53) -* C-c C-c <12>: Property syntax. (line 92) -* C-c C-c <13>: Setting tags. (line 20) -* C-c C-c <14>: Checkboxes. (line 52) -* C-c C-c <15>: Editing and debugging formulas. - (line 47) -* C-c C-c <16>: Built-in table editor. - (line 58) -* C-c C-c <17>: Footnotes. (line 74) -* C-c C-c: Plain lists. (line 122) -* C-c C-c c: Property syntax. (line 110) -* C-c C-c D: Property syntax. (line 107) -* C-c C-c d: Property syntax. (line 104) -* C-c C-c s: Property syntax. (line 96) -* C-c C-d <1>: Agenda commands. (line 304) -* C-c C-d: Inserting deadline/schedule. - (line 9) -* C-c C-e: The export dispatcher. - (line 10) -* C-c C-e c a: iCalendar export. (line 34) -* C-c C-e c c: iCalendar export. (line 39) -* C-c C-e c f: iCalendar export. (line 32) -* C-c C-e C-v: Sparse trees. (line 53) -* C-c C-e h H: HTML Export commands. - (line 10) -* C-c C-e h h: HTML Export commands. - (line 6) -* C-c C-e i i: Texinfo export commands. - (line 9) -* C-c C-e i t: Texinfo export commands. - (line 6) -* C-c C-e l B: Beamer export commands. - (line 9) -* C-c C-e l b: Beamer export commands. - (line 6) -* C-c C-e l L: LaTeX export commands. - (line 9) -* C-c C-e l l: LaTeX export commands. - (line 6) -* C-c C-e l p: LaTeX export commands. - (line 12) -* C-c C-e l P: Beamer export commands. - (line 12) -* C-c C-e m M: Markdown export. (line 19) -* C-c C-e m m: Markdown export. (line 16) -* C-c C-e O O: Org export. (line 16) -* C-c C-e O o: Org export. (line 13) -* C-c C-e o o: ODT export commands. (line 6) -* C-c C-e P a: Triggering publication. - (line 16) -* C-c C-e P f: Triggering publication. - (line 13) -* C-c C-e P p: Triggering publication. - (line 10) -* C-c C-e P x: Triggering publication. - (line 8) -* C-c C-e t A/L/U: ASCII/Latin-1/UTF-8 export. - (line 25) -* C-c C-e t a/l/u: ASCII/Latin-1/UTF-8 export. - (line 21) -* C-c C-f: Motion. (line 12) -* C-c C-j: Motion. (line 21) -* C-c C-k <1>: Using capture. (line 31) -* C-c C-k: Global and local cycling. - (line 47) -* C-c C-l: Handling links. (line 65) -* C-c C-n: Motion. (line 8) -* C-c C-o <1>: Key bindings and useful functions. - (line 11) -* C-c C-o <2>: Agenda commands. (line 61) -* C-c C-o <3>: Creating timestamps. (line 38) -* C-c C-o <4>: Handling links. (line 101) -* C-c C-o: Footnotes. (line 78) -* C-c C-p: Motion. (line 9) -* C-c C-q <1>: Setting tags. (line 10) -* C-c C-q: Editing and debugging formulas. - (line 50) -* C-c C-r <1>: Editing and debugging formulas. - (line 53) -* C-c C-r: Global and local cycling. - (line 38) -* C-c C-s <1>: Agenda commands. (line 300) -* C-c C-s: Inserting deadline/schedule. - (line 16) -* C-c C-t <1>: Clocking commands. (line 67) -* C-c C-t: TODO basics. (line 13) -* C-c C-u: Motion. (line 18) -* C-c C-v a: Key bindings and useful functions. - (line 36) -* C-c C-v b: Key bindings and useful functions. - (line 25) -* C-c C-v c: Key bindings and useful functions. - (line 30) -* C-c C-v C-a: Key bindings and useful functions. - (line 36) -* C-c C-v C-b: Key bindings and useful functions. - (line 25) -* C-c C-v C-c: Key bindings and useful functions. - (line 30) -* C-c C-v C-d: Key bindings and useful functions. - (line 27) -* C-c C-v C-e: Key bindings and useful functions. - (line 19) -* C-c C-v C-f: Key bindings and useful functions. - (line 29) -* C-c C-v C-g: Key bindings and useful functions. - (line 23) -* C-c C-v C-h: Key bindings and useful functions. - (line 37) -* C-c C-v C-I: Key bindings and useful functions. - (line 34) -* C-c C-v C-i: Key bindings and useful functions. - (line 33) -* C-c C-v C-j: Key bindings and useful functions. - (line 31) -* C-c C-v C-l: Key bindings and useful functions. - (line 32) -* C-c C-v C-n: Key bindings and useful functions. - (line 18) -* C-c C-v C-o: Key bindings and useful functions. - (line 20) -* C-c C-v C-p: Key bindings and useful functions. - (line 18) -* C-c C-v C-r: Key bindings and useful functions. - (line 24) -* C-c C-v C-s: Key bindings and useful functions. - (line 26) -* C-c C-v C-t: Key bindings and useful functions. - (line 28) -* C-c C-v C-u: Key bindings and useful functions. - (line 22) -* C-c C-v C-v: Key bindings and useful functions. - (line 21) -* C-c C-v C-x: Key bindings and useful functions. - (line 38) -* C-c C-v C-z: Key bindings and useful functions. - (line 35) -* C-c C-v d: Key bindings and useful functions. - (line 27) -* C-c C-v e: Key bindings and useful functions. - (line 19) -* C-c C-v f: Key bindings and useful functions. - (line 29) -* C-c C-v g: Key bindings and useful functions. - (line 23) -* C-c C-v h: Key bindings and useful functions. - (line 37) -* C-c C-v I: Key bindings and useful functions. - (line 34) -* C-c C-v i <1>: Key bindings and useful functions. - (line 33) -* C-c C-v i: Library of Babel. (line 12) -* C-c C-v j: Key bindings and useful functions. - (line 31) -* C-c C-v l: Key bindings and useful functions. - (line 32) -* C-c C-v n: Key bindings and useful functions. - (line 18) -* C-c C-v o: Key bindings and useful functions. - (line 20) -* C-c C-v p: Key bindings and useful functions. - (line 18) -* C-c C-v r: Key bindings and useful functions. - (line 24) -* C-c C-v s: Key bindings and useful functions. - (line 26) -* C-c C-v t <1>: Key bindings and useful functions. - (line 28) -* C-c C-v t: Extracting source code. - (line 36) -* C-c C-v u: Key bindings and useful functions. - (line 22) -* C-c C-v v: Key bindings and useful functions. - (line 21) -* C-c C-v x: Key bindings and useful functions. - (line 38) -* C-c C-v z: Key bindings and useful functions. - (line 35) -* C-c C-w <1>: Agenda commands. (line 247) -* C-c C-w <2>: Refile and copy. (line 14) -* C-c C-w <3>: Using capture. (line 22) -* C-c C-w: Structure editing. (line 103) -* C-c C-x ,: Timers. (line 44) -* C-c C-x -: Timers. (line 35) -* C-c C-x .: Timers. (line 31) -* C-c C-x 0: Timers. (line 12) -* C-c C-x ;: Timers. (line 20) -* C-c C-x <: Agenda files. (line 42) -* C-c C-x > <1>: Agenda commands. (line 193) -* C-c C-x >: Agenda files. (line 49) -* C-c C-x \ <1>: Subscripts and superscripts. - (line 20) -* C-c C-x \: Special symbols. (line 34) -* C-c C-x _: Timers. (line 47) -* C-c C-x A: Agenda commands. (line 258) -* C-c C-x a: Agenda commands. (line 255) -* C-c C-x A: Internal archiving. (line 50) -* C-c C-x a: Internal archiving. (line 37) -* C-c C-x b <1>: Agenda commands. (line 52) -* C-c C-x b: Global and local cycling. - (line 55) -* C-c C-x c: Structure editing. (line 95) -* C-c C-x C-a <1>: Agenda commands. (line 250) -* C-c C-x C-a: Archiving. (line 11) -* C-c C-x C-b: Checkboxes. (line 56) -* C-c C-x C-c <1>: Agenda column view. (line 11) -* C-c C-x C-c <2>: Agenda commands. (line 182) -* C-c C-x C-c: Using column view. (line 9) -* C-c C-x C-d: Clocking commands. (line 80) -* C-c C-x C-e <1>: Effort estimates. (line 17) -* C-c C-x C-e: Clocking commands. (line 48) -* C-c C-x C-i: Clocking commands. (line 6) -* C-c C-x C-j: Clocking commands. (line 75) -* C-c C-x C-l: Previewing LaTeX fragments. - (line 17) -* C-c C-x C-n: Handling links. (line 152) -* C-c C-x C-o: Clocking commands. (line 34) -* C-c C-x C-p: Handling links. (line 152) -* C-c C-x C-q: Clocking commands. (line 71) -* C-c C-x C-r: The clock table. (line 10) -* C-c C-x C-s <1>: Agenda commands. (line 262) -* C-c C-x C-s: Moving subtrees. (line 9) -* C-c C-x C-t: Custom time format. (line 12) -* C-c C-x C-u <1>: Dynamic blocks. (line 21) -* C-c C-x C-u <2>: The clock table. (line 16) -* C-c C-x C-u: Capturing column view. - (line 54) -* C-c C-x C-v: Handling links. (line 133) -* C-c C-x C-w <1>: Built-in table editor. - (line 136) -* C-c C-x C-w: Structure editing. (line 69) -* C-c C-x C-x: Clocking commands. (line 42) -* C-c C-x C-y <1>: Built-in table editor. - (line 140) -* C-c C-x C-y: Structure editing. (line 77) -* C-c C-x d: Drawers. (line 6) -* C-c C-x e: Effort estimates. (line 14) -* C-c C-x f: Footnotes. (line 41) -* C-c C-x G: RSS feeds. (line 27) -* C-c C-x g: RSS feeds. (line 23) -* C-c C-x i: Capturing column view. - (line 52) -* C-c C-x M-w <1>: Built-in table editor. - (line 132) -* C-c C-x M-w: Structure editing. (line 73) -* C-c C-x o <1>: Checkboxes. (line 77) -* C-c C-x o: TODO dependencies. (line 37) -* C-c C-x p <1>: Header arguments in Org mode properties. - (line 31) -* C-c C-x p: Property syntax. (line 83) -* C-c C-x q: Tag hierarchy. (line 86) -* C-c C-x v: Global and local cycling. - (line 61) -* C-c C-y <1>: Clocking commands. (line 51) -* C-c C-y: Creating timestamps. (line 59) -* C-c C-z <1>: Agenda commands. (line 292) -* C-c C-z: Drawers. (line 35) -* C-c l <1>: Literal examples. (line 95) -* C-c l: Handling links. (line 9) -* C-c M-w: Refile and copy. (line 12) -* C-c SPC: Built-in table editor. - (line 59) -* C-c { <1>: CDLaTeX mode. (line 21) -* C-c {: Editing and debugging formulas. - (line 32) -* C-c |: Built-in table editor. - (line 41) -* C-c }: Editing and debugging formulas. - (line 26) -* C-c ~: Cooperation. (line 50) -* C-k: Agenda commands. (line 241) -* C-M-i: Completion. (line 47) -* C-S- <1>: Agenda commands. (line 239) -* C-S-: Multiple sets in one file. - (line 25) -* C-S-: Structure editing. (line 30) -* C-S- <1>: Agenda commands. (line 236) -* C-S-: Multiple sets in one file. - (line 25) -* C-S-: Clocking commands. (line 56) -* C-TAB: Internal archiving. (line 47) -* C-u C-c !: Creating timestamps. (line 19) -* C-u C-c *: Updating the table. (line 16) -* C-u C-c .: Creating timestamps. (line 19) -* C-u C-c = <1>: Editing and debugging formulas. - (line 13) -* C-u C-c =: Field and range formulas. - (line 27) -* C-u C-c c: Using capture. (line 43) -* C-u C-c C-c: Updating the table. (line 19) -* C-u C-c C-l: Handling links. (line 86) -* C-u C-c C-t: TODO basics. (line 27) -* C-u C-c C-w: Refile and copy. (line 33) -* C-u C-c C-x a: Internal archiving. (line 40) -* C-u C-c C-x C-s: Moving subtrees. (line 11) -* C-u C-c C-x C-u <1>: Dynamic blocks. (line 22) -* C-u C-c C-x C-u <2>: The clock table. (line 20) -* C-u C-c C-x C-u: Capturing column view. - (line 58) -* C-u C-u <1>: Initial visibility. (line 21) -* C-u C-u : Global and local cycling. - (line 33) -* C-u C-u C-c *: Updating the table. (line 22) -* C-u C-u C-c =: Editing and debugging formulas. - (line 16) -* C-u C-u C-c c: Using capture. (line 45) -* C-u C-u C-c C-c: Updating the table. (line 22) -* C-u C-u C-c C-t: Multiple sets in one file. - (line 25) -* C-u C-u C-c C-w: Refile and copy. (line 36) -* C-u C-u C-c C-x C-s: Moving subtrees. (line 18) -* C-u C-u C-u : Global and local cycling. - (line 35) -* C-u C-u C-u C-c C-t: TODO dependencies. (line 42) -* C-v: The date/time prompt. - (line 82) -* C-x C-s <1>: Agenda commands. (line 178) -* C-x C-s: Editing and debugging formulas. - (line 47) -* C-x C-w <1>: Exporting agenda views. - (line 12) -* C-x C-w: Agenda commands. (line 504) -* C-x n b: Structure editing. (line 122) -* C-x n s: Structure editing. (line 119) -* C-x n w: Structure editing. (line 125) -* C-y: Structure editing. (line 83) -* D: Agenda commands. (line 111) -* d: Agenda commands. (line 74) -* E: Agenda commands. (line 156) -* e: Using column view. (line 47) -* f: Agenda commands. (line 93) -* F: Agenda commands. (line 45) -* g: Agenda commands. (line 175) -* G: Agenda commands. (line 164) -* g: Using column view. (line 24) -* H: Agenda commands. (line 491) -* i: Agenda commands. (line 459) -* I: Agenda commands. (line 330) -* J: Agenda commands. (line 108) -* j: Agenda commands. (line 105) -* k: Agenda commands. (line 343) -* l: Agenda commands. (line 115) -* L: Agenda commands. (line 36) -* M: Agenda commands. (line 478) -* m: Agenda commands. (line 364) -* M-*: Agenda commands. (line 378) -* M- <1>: Agenda commands. (line 357) -* M- <2>: Editing and debugging formulas. - (line 77) -* M- <3>: Built-in table editor. - (line 94) -* M-: Plain lists. (line 97) -* M- <1>: Built-in table editor. - (line 86) -* M- <2>: Plain lists. (line 103) -* M-: Structure editing. (line 41) -* M- <1>: Timers. (line 40) -* M- <2>: Built-in table editor. - (line 147) -* M- <3>: Plain lists. (line 79) -* M-: Structure editing. (line 6) -* M- <1>: Built-in table editor. - (line 86) -* M- <2>: Plain lists. (line 103) -* M-: Structure editing. (line 44) -* M- <1>: Completion. (line 15) -* M- <2>: Property syntax. (line 80) -* M- <3>: Setting tags. (line 6) -* M- <4>: Per-file keywords. (line 23) -* M-: Editing and debugging formulas. - (line 64) -* M- <1>: Agenda commands. (line 353) -* M- <2>: Editing and debugging formulas. - (line 77) -* M- <3>: Built-in table editor. - (line 94) -* M-: Plain lists. (line 97) -* M-a: Built-in table editor. - (line 74) -* M-down: Key bindings and useful functions. - (line 13) -* M-e: Built-in table editor. - (line 78) -* M-g M-n: Sparse trees. (line 29) -* M-g M-p: Sparse trees. (line 32) -* M-g n: Sparse trees. (line 29) -* M-g p: Sparse trees. (line 32) -* M-h: Structure editing. (line 59) -* M-m: Agenda commands. (line 375) -* M-S- <1>: The date/time prompt. - (line 82) -* M-S- <2>: Editing and debugging formulas. - (line 72) -* M-S- <3>: Built-in table editor. - (line 101) -* M-S-: Structure editing. (line 56) -* M-S- <1>: The date/time prompt. - (line 82) -* M-S- <2>: Built-in table editor. - (line 88) -* M-S- <3>: Plain lists. (line 108) -* M-S-: Structure editing. (line 47) -* M-S- <1>: Checkboxes. (line 74) -* M-S- <2>: Plain lists. (line 89) -* M-S-: Structure editing. (line 26) -* M-S- <1>: The date/time prompt. - (line 82) -* M-S- <2>: Built-in table editor. - (line 91) -* M-S- <3>: Plain lists. (line 108) -* M-S-: Structure editing. (line 50) -* M-S- <1>: The date/time prompt. - (line 82) -* M-S- <2>: Editing and debugging formulas. - (line 72) -* M-S- <3>: Built-in table editor. - (line 98) -* M-S-: Structure editing. (line 53) -* M-up: Key bindings and useful functions. - (line 12) -* M-v: The date/time prompt. - (line 82) -* M-x org-iswitchb: Agenda files. (line 26) -* mouse-1 <1>: The date/time prompt. - (line 82) -* mouse-1 <2>: Handling links. (line 124) -* mouse-1: Footnotes. (line 78) -* mouse-2 <1>: Agenda commands. (line 39) -* mouse-2 <2>: Handling links. (line 124) -* mouse-2: Footnotes. (line 78) -* mouse-3 <1>: Agenda commands. (line 34) -* mouse-3: Handling links. (line 129) -* N: Agenda commands. (line 23) -* n <1>: Agenda commands. (line 19) -* n: Using column view. (line 43) -* O: Agenda commands. (line 334) -* o: Agenda commands. (line 71) -* P: Agenda commands. (line 26) -* p <1>: Agenda commands. (line 20) -* p: Using column view. (line 43) -* q <1>: Agenda commands. (line 518) -* q: Using column view. (line 27) -* r: Agenda commands. (line 168) -* R: Agenda commands. (line 137) -* r <1>: Global TODO list. (line 23) -* r: Using column view. (line 20) -* S: Agenda commands. (line 482) -* s: Agenda commands. (line 178) -* S- <1>: Agenda commands. (line 289) -* S- <2>: The date/time prompt. - (line 82) -* S- <3>: Creating timestamps. (line 47) -* S- <4>: Priorities. (line 28) -* S- <5>: Editing and debugging formulas. - (line 67) -* S-: Plain lists. (line 90) -* S- <1>: Agenda commands. (line 321) -* S- <2>: The clock table. (line 24) -* S- <3>: The date/time prompt. - (line 82) -* S- <4>: Creating timestamps. (line 42) -* S- <5>: Using column view. (line 36) -* S- <6>: Property syntax. (line 100) -* S- <7>: Multiple sets in one file. - (line 32) -* S- <8>: TODO basics. (line 33) -* S- <9>: Editing and debugging formulas. - (line 67) -* S-: Plain lists. (line 149) -* S-: Built-in table editor. - (line 165) -* S- <1>: Agenda commands. (line 307) -* S- <2>: The clock table. (line 24) -* S- <3>: The date/time prompt. - (line 82) -* S- <4>: Creating timestamps. (line 42) -* S- <5>: Using column view. (line 36) -* S- <6>: Property syntax. (line 100) -* S- <7>: Multiple sets in one file. - (line 32) -* S- <8>: TODO basics. (line 33) -* S- <9>: Editing and debugging formulas. - (line 67) -* S-: Plain lists. (line 149) -* S- <1>: Built-in table editor. - (line 66) -* S-: Global and local cycling. - (line 22) -* S- <1>: Agenda commands. (line 284) -* S- <2>: The date/time prompt. - (line 82) -* S- <3>: Creating timestamps. (line 47) -* S- <4>: Priorities. (line 28) -* S-: Editing and debugging formulas. - (line 67) -* S-M-: Using column view. (line 76) -* S-M-: TODO basics. (line 57) -* S-M-: Using column view. (line 73) -* S-M-: Clocking commands. (line 60) -* T: Agenda commands. (line 267) -* t: Agenda commands. (line 232) -* TAB: Built-in table editor. - (line 62) -* U: Agenda commands. (line 372) -* u: Agenda commands. (line 369) -* v: Using column view. (line 56) -* v [: Agenda commands. (line 126) -* v A: Agenda commands. (line 133) -* v a: Agenda commands. (line 130) -* v c: Agenda commands. (line 148) -* v d: Agenda commands. (line 74) -* v E: Agenda commands. (line 156) -* v L: Agenda commands. (line 118) -* v l: Agenda commands. (line 115) -* v m: Agenda commands. (line 79) -* v R: Agenda commands. (line 137) -* v SPC: Agenda commands. (line 81) -* v t: Agenda commands. (line 78) -* v w: Agenda commands. (line 77) -* v y: Agenda commands. (line 80) -* w: Agenda commands. (line 77) -* x: Agenda commands. (line 519) -* X: Agenda commands. (line 337) -* z: Agenda commands. (line 292) -* {: Filtering/limiting agenda items. - (line 57) -* | <1>: Agenda commands. (line 221) -* |: Filtering/limiting agenda items. - (line 112) -* }: Filtering/limiting agenda items. - (line 57) -* ~: Filtering/limiting agenda items. - (line 154) - - -File: org, Node: Command and Function Index, Next: Variable Index, Prev: Key Index, Up: Top - -Command and function index -************************** - -[index] -* Menu: - -* lisp-complete-symbol: Editing and debugging formulas. - (line 64) -* next-error: Sparse trees. (line 29) -* org-agenda <1>: Conventions. (line 35) -* org-agenda: Activation. (line 6) -* org-agenda-add-note: Agenda commands. (line 292) -* org-agenda-archive: Agenda commands. (line 262) -* org-agenda-archive-default-with-confirmation: Agenda commands. - (line 250) -* org-agenda-archive-to-archive-sibling: Agenda commands. (line 258) -* org-agenda-archives-mode: Agenda commands. (line 130) -* org-agenda-archives-mode 'files: Agenda commands. (line 133) -* org-agenda-bulk-action: Agenda commands. (line 384) -* org-agenda-bulk-mark: Agenda commands. (line 364) -* org-agenda-bulk-mark-all: Agenda commands. (line 366) -* org-agenda-bulk-mark-regexp: Agenda commands. (line 381) -* org-agenda-bulk-remove-all-marks: Agenda commands. (line 372) -* org-agenda-bulk-toggle: Agenda commands. (line 375) -* org-agenda-bulk-toggle-all: Agenda commands. (line 378) -* org-agenda-bulk-unmark: Agenda commands. (line 369) -* org-agenda-capture: Agenda commands. (line 343) -* org-agenda-clock-cancel: Agenda commands. (line 337) -* org-agenda-clock-goto: Agenda commands. (line 108) -* org-agenda-clock-in: Agenda commands. (line 330) -* org-agenda-clock-out: Agenda commands. (line 334) -* org-agenda-clockreport-mode: Agenda commands. (line 137) -* org-agenda-columns <1>: Agenda column view. (line 11) -* org-agenda-columns: Agenda commands. (line 182) -* org-agenda-convert-date: Agenda commands. (line 487) -* org-agenda-date-prompt: Agenda commands. (line 325) -* org-agenda-day-view: Agenda commands. (line 74) -* org-agenda-deadline: Agenda commands. (line 304) -* org-agenda-diary-entry: Agenda commands. (line 459) -* org-agenda-do-date-earlier: Agenda commands. (line 321) -* org-agenda-do-date-later: Agenda commands. (line 307) -* org-agenda-drag-line-backward: Agenda commands. (line 353) -* org-agenda-drag-line-forward: Agenda commands. (line 357) -* org-agenda-earlier: Agenda commands. (line 99) -* org-agenda-entry-text-mode: Agenda commands. (line 156) -* org-agenda-exit: Agenda commands. (line 519) -* org-agenda-file-to-front: Agenda files. (line 15) -* org-agenda-filter-by-category <1>: Agenda commands. (line 207) -* org-agenda-filter-by-category: Filtering/limiting agenda items. - (line 67) -* org-agenda-filter-by-effort <1>: Agenda commands. (line 218) -* org-agenda-filter-by-effort: Filtering/limiting agenda items. - (line 91) -* org-agenda-filter-by-regexp <1>: Agenda commands. (line 215) -* org-agenda-filter-by-regexp: Filtering/limiting agenda items. - (line 81) -* org-agenda-filter-by-tag <1>: Agenda commands. (line 203) -* org-agenda-filter-by-tag: Filtering/limiting agenda items. - (line 17) -* org-agenda-filter-by-top-headline <1>: Agenda commands. (line 211) -* org-agenda-filter-by-top-headline: Filtering/limiting agenda items. - (line 77) -* org-agenda-filter-remove-all <1>: Agenda commands. (line 221) -* org-agenda-filter-remove-all: Filtering/limiting agenda items. - (line 112) -* org-agenda-follow-mode: Agenda commands. (line 45) -* org-agenda-fortnight-view: Agenda commands. (line 78) -* org-agenda-goto: Agenda commands. (line 39) -* org-agenda-goto-calendar: Agenda commands. (line 454) -* org-agenda-goto-date: Agenda commands. (line 105) -* org-agenda-goto-today: Agenda commands. (line 102) -* org-agenda-holidays: Agenda commands. (line 491) -* org-agenda-kill: Agenda commands. (line 241) -* org-agenda-later: Agenda commands. (line 93) -* org-agenda-limit-interactively: Filtering/limiting agenda items. - (line 154) -* org-agenda-list: Weekly/daily agenda. (line 9) -* org-agenda-list-stuck-projects: Stuck projects. (line 13) -* org-agenda-log-mode: Agenda commands. (line 115) -* org-agenda-manipulate-query-add: Agenda commands. (line 126) -* org-agenda-month-view: Agenda commands. (line 79) -* org-agenda-next-item: Agenda commands. (line 23) -* org-agenda-next-line: Agenda commands. (line 19) -* org-agenda-open-link: Agenda commands. (line 61) -* org-agenda-phases-of-moon: Agenda commands. (line 478) -* org-agenda-previous-item: Agenda commands. (line 26) -* org-agenda-previous-line: Agenda commands. (line 20) -* org-agenda-priority-down: Agenda commands. (line 289) -* org-agenda-priority-up: Agenda commands. (line 284) -* org-agenda-quit: Agenda commands. (line 518) -* org-agenda-recenter: Agenda commands. (line 36) -* org-agenda-redo: Agenda commands. (line 168) -* org-agenda-refile: Agenda commands. (line 247) -* org-agenda-remove-restriction-lock <1>: Agenda commands. (line 193) -* org-agenda-remove-restriction-lock: Agenda files. (line 49) -* org-agenda-reset-view: Agenda commands. (line 81) -* org-agenda-schedule: Agenda commands. (line 300) -* org-agenda-set-restriction-lock: Agenda files. (line 42) -* org-agenda-set-tags: Agenda commands. (line 272) -* org-agenda-show-and-scroll-up: Agenda commands. (line 34) -* org-agenda-show-priority: Agenda commands. (line 281) -* org-agenda-show-tags: Agenda commands. (line 267) -* org-agenda-sunrise-sunset: Agenda commands. (line 482) -* org-agenda-switch-to: Agenda commands. (line 42) -* org-agenda-todo: Agenda commands. (line 232) -* org-agenda-todo-nextset: Agenda commands. (line 236) -* org-agenda-todo-previousset: Agenda commands. (line 239) -* org-agenda-toggle-archive-tag: Agenda commands. (line 255) -* org-agenda-toggle-diary: Agenda commands. (line 111) -* org-agenda-toggle-time-grid: Agenda commands. (line 164) -* org-agenda-tree-to-indirect-buffer: Agenda commands. (line 52) -* org-agenda-undo: Agenda commands. (line 228) -* org-agenda-week-view: Agenda commands. (line 77) -* org-agenda-write <1>: Exporting agenda views. - (line 12) -* org-agenda-write: Agenda commands. (line 504) -* org-agenda-year-view: Agenda commands. (line 80) -* org-archive-subtree: Moving subtrees. (line 9) -* org-archive-subtree-default: Archiving. (line 11) -* org-archive-to-archive-sibling: Internal archiving. (line 50) -* org-ascii-export-as-ascii: ASCII/Latin-1/UTF-8 export. - (line 25) -* org-ascii-export-to-ascii: ASCII/Latin-1/UTF-8 export. - (line 21) -* org-attach <1>: Agenda commands. (line 297) -* org-attach: Attachments. (line 26) -* org-attach-attach: Attachments. (line 31) -* org-attach-delete-all: Attachments. (line 69) -* org-attach-delete-one: Attachments. (line 66) -* org-attach-new: Attachments. (line 44) -* org-attach-open: Attachments. (line 51) -* org-attach-open-in-emacs: Attachments. (line 57) -* org-attach-reveal: Attachments. (line 60) -* org-attach-reveal-in-emacs: Attachments. (line 63) -* org-attach-set-directory: Attachments. (line 73) -* org-attach-set-inherit: Attachments. (line 78) -* org-attach-sync: Attachments. (line 47) -* org-attach-url: Attachments. (line 41) -* org-backward-same-level: Motion. (line 15) -* org-beamer-export-as-latex: Beamer export commands. - (line 9) -* org-beamer-export-to-latex: Beamer export commands. - (line 6) -* org-beamer-export-to-pdf: Beamer export commands. - (line 12) -* org-beamer-select-environment: Editing support. (line 11) -* org-buffer-property-keys: Using the property API. - (line 34) -* org-calendar-goto-agenda: Agenda commands. (line 455) -* org-capture <1>: Using capture. (line 6) -* org-capture <2>: Conventions. (line 35) -* org-capture: Activation. (line 6) -* org-capture-finalize: Using capture. (line 15) -* org-capture-kill: Using capture. (line 31) -* org-capture-refile: Using capture. (line 22) -* org-check-after-date: Inserting deadline/schedule. - (line 31) -* org-check-before-date: Inserting deadline/schedule. - (line 28) -* org-check-deadlines: Inserting deadline/schedule. - (line 21) -* org-clock-cancel: Clocking commands. (line 71) -* org-clock-display: Clocking commands. (line 80) -* org-clock-goto: Clocking commands. (line 75) -* org-clock-in: Clocking commands. (line 6) -* org-clock-in-last: Clocking commands. (line 42) -* org-clock-modify-effort-estimate <1>: Effort estimates. (line 17) -* org-clock-modify-effort-estimate: Clocking commands. (line 48) -* org-clock-out: Clocking commands. (line 34) -* org-clock-report: The clock table. (line 10) -* org-clock-timestamps-up/down: Clocking commands. (line 56) -* org-clocktable-try-shift: The clock table. (line 24) -* org-clone-subtree-with-time-shift: Structure editing. (line 95) -* org-columns: Using column view. (line 9) -* org-columns-delete: Using column view. (line 76) -* org-columns-edit-allowed: Using column view. (line 60) -* org-columns-edit-value: Using column view. (line 47) -* org-columns-narrow: Using column view. (line 71) -* org-columns-new: Using column view. (line 73) -* org-columns-next-allowed-value: Using column view. (line 43) -* org-columns-previous-allowed-value: Using column view. (line 43) -* org-columns-quit: Using column view. (line 27) -* org-columns-redo: Using column view. (line 20) -* org-columns-set-tags-or-toggle: Using column view. (line 53) -* org-columns-show-value: Using column view. (line 56) -* org-columns-widen: Using column view. (line 71) -* org-compute-property-at-point: Property syntax. (line 110) -* org-copy: Refile and copy. (line 12) -* org-copy-subtree: Structure editing. (line 73) -* org-copy-visible: Global and local cycling. - (line 61) -* org-cut-subtree: Structure editing. (line 69) -* org-cycle <1>: Plain lists. (line 68) -* org-cycle <2>: Structure editing. (line 35) -* org-cycle: Global and local cycling. - (line 10) -* org-cycle-agenda-files: Agenda files. (line 22) -* org-date-from-calendar: Creating timestamps. (line 29) -* org-dblock-update <1>: Dynamic blocks. (line 21) -* org-dblock-update <2>: The clock table. (line 16) -* org-dblock-update: Capturing column view. - (line 54) -* org-deadline: Inserting deadline/schedule. - (line 9) -* org-delete-property: Property syntax. (line 104) -* org-delete-property-globally: Property syntax. (line 107) -* org-demote: Using the mapping API. - (line 78) -* org-demote-subtree: Structure editing. (line 50) -* org-do-demote: Structure editing. (line 44) -* org-do-promote: Structure editing. (line 41) -* org-edit-special: Cooperation. (line 48) -* org-entities-help: Special symbols. (line 16) -* org-entry-add-to-multivalued-property: Using the property API. - (line 51) -* org-entry-delete: Using the property API. - (line 28) -* org-entry-get: Using the property API. - (line 19) -* org-entry-get-multivalued-property: Using the property API. - (line 46) -* org-entry-member-in-multivalued-property: Using the property API. - (line 63) -* org-entry-properties: Using the property API. - (line 9) -* org-entry-put: Using the property API. - (line 31) -* org-entry-put-multivalued-property: Using the property API. - (line 41) -* org-entry-remove-from-multivalued-property: Using the property API. - (line 57) -* org-evaluate-time-range <1>: Clocking commands. (line 51) -* org-evaluate-time-range: Creating timestamps. (line 59) -* org-export-dispatch: The export dispatcher. - (line 10) -* org-feed-goto-inbox: RSS feeds. (line 27) -* org-feed-update-all: RSS feeds. (line 23) -* org-force-cycle-archived: Internal archiving. (line 47) -* org-forward-same-level: Motion. (line 12) -* org-global-cycle: Global and local cycling. - (line 22) -* org-goto: Motion. (line 21) -* org-goto-calendar: Creating timestamps. (line 33) -* org-html-export-as-html: HTML Export commands. - (line 10) -* org-html-export-to-html: HTML Export commands. - (line 6) -* org-icalendar-combine-agenda-files: iCalendar export. (line 39) -* org-icalendar-export-agenda-files: iCalendar export. (line 34) -* org-icalendar-export-to-ics: iCalendar export. (line 32) -* org-insert-columns-dblock: Capturing column view. - (line 52) -* org-insert-heading <1>: Timers. (line 40) -* org-insert-heading: Plain lists. (line 79) -* org-insert-heading-respect-content: Structure editing. (line 23) -* org-insert-link: Handling links. (line 65) -* org-insert-property-drawer: Using the property API. - (line 18) -* org-insert-todo-heading <1>: Checkboxes. (line 74) -* org-insert-todo-heading <2>: TODO basics. (line 57) -* org-insert-todo-heading: Structure editing. (line 26) -* org-insert-todo-heading-respect-content: Structure editing. (line 30) -* org-iswitchb: Activation. (line 6) -* org-latex-export-as-latex: LaTeX export commands. - (line 9) -* org-latex-export-to-latex: LaTeX export commands. - (line 6) -* org-latex-export-to-pdf: LaTeX export commands. - (line 12) -* org-lookup-all: Lookup functions. (line 22) -* org-lookup-first: Lookup functions. (line 8) -* org-lookup-last: Lookup functions. (line 18) -* org-map-entries: Using the mapping API. - (line 12) -* org-mark-element: Structure editing. (line 59) -* org-mark-ring-goto: Handling links. (line 146) -* org-mark-ring-push: Handling links. (line 142) -* org-mark-subtree: Structure editing. (line 65) -* org-match-sparse-tree <1>: Property searches. (line 10) -* org-match-sparse-tree: Tag searches. (line 9) -* org-md-export-as-markdown: Markdown export. (line 19) -* org-md-export-to-markdown: Markdown export. (line 16) -* org-meta-return: Structure editing. (line 6) -* org-move-subtree-down: Structure editing. (line 56) -* org-move-subtree-up: Structure editing. (line 53) -* org-narrow-to-block: Structure editing. (line 122) -* org-narrow-to-subtree: Structure editing. (line 119) -* org-next-link: Handling links. (line 152) -* org-next-visible-heading: Motion. (line 8) -* org-occur: Sparse trees. (line 17) -* org-odt-export-to-odt: ODT export commands. (line 6) -* org-open-at-point <1>: Creating timestamps. (line 38) -* org-open-at-point: Handling links. (line 101) -* org-org-export-as-org: Org export. (line 16) -* org-org-export-to-org: Org export. (line 13) -* org-paste-subtree: Structure editing. (line 77) -* org-previous-link: Handling links. (line 152) -* org-previous-visible-heading: Motion. (line 9) -* org-priority <1>: Using the mapping API. - (line 66) -* org-priority: Priorities. (line 24) -* org-priority-down: Priorities. (line 28) -* org-priority-up: Priorities. (line 28) -* org-promote: Using the mapping API. - (line 75) -* org-promote-subtree: Structure editing. (line 47) -* org-property-action: Property syntax. (line 92) -* org-property-next-allowed-value: Property syntax. (line 100) -* org-property-previous-allowed-value: Property syntax. (line 100) -* org-publish: Triggering publication. - (line 8) -* org-publish-all: Triggering publication. - (line 16) -* org-publish-current-file: Triggering publication. - (line 13) -* org-publish-current-project: Triggering publication. - (line 10) -* org-refile <1>: Refile and copy. (line 14) -* org-refile: Structure editing. (line 103) -* org-refile-cache-clear: Refile and copy. (line 47) -* org-refile-goto-last-stored: Refile and copy. (line 36) -* org-remove-file: Agenda files. (line 19) -* org-reveal: Global and local cycling. - (line 38) -* org-save-all-org-buffers: Agenda commands. (line 178) -* org-schedule: Inserting deadline/schedule. - (line 16) -* org-search-view: Search view. (line 9) -* org-set-effort: Effort estimates. (line 14) -* org-set-property: Property syntax. (line 83) -* org-set-startup-visibility <1>: Initial visibility. (line 21) -* org-set-startup-visibility: Global and local cycling. - (line 33) -* org-set-tags-command: Setting tags. (line 10) -* org-show-todo-tree: TODO basics. (line 38) -* org-sort: Structure editing. (line 107) -* org-sparse-tree: Sparse trees. (line 15) -* org-speedbar-set-agenda-restriction: Agenda files. (line 57) -* org-store-agenda-views: Exporting agenda views. - (line 64) -* org-store-link <1>: Handling links. (line 9) -* org-store-link: Activation. (line 6) -* org-table-align: Built-in table editor. - (line 58) -* org-table-beginning-of-field: Built-in table editor. - (line 74) -* org-table-blank-field: Built-in table editor. - (line 59) -* org-table-copy-down: Built-in table editor. - (line 165) -* org-table-copy-region: Built-in table editor. - (line 132) -* org-table-create-or-convert-from-region: Built-in table editor. - (line 41) -* org-table-create-with-table.el: Cooperation. (line 50) -* org-table-cut-region: Built-in table editor. - (line 136) -* org-table-delete-column: Built-in table editor. - (line 88) -* org-table-edit-field: Built-in table editor. - (line 180) -* org-table-edit-formulas: Editing and debugging formulas. - (line 36) -* org-table-end-of-field: Built-in table editor. - (line 78) -* org-table-eval-formula <1>: Editing and debugging formulas. - (line 13) -* org-table-eval-formula <2>: Column formulas. (line 32) -* org-table-eval-formula: Field and range formulas. - (line 27) -* org-table-export: Built-in table editor. - (line 205) -* org-table-fedit-abort: Editing and debugging formulas. - (line 50) -* org-table-fedit-finish: Editing and debugging formulas. - (line 47) -* org-table-fedit-line-down: Editing and debugging formulas. - (line 72) -* org-table-fedit-line-up: Editing and debugging formulas. - (line 72) -* org-table-fedit-lisp-indent: Editing and debugging formulas. - (line 57) -* org-table-fedit-ref-down: Editing and debugging formulas. - (line 67) -* org-table-fedit-ref-left: Editing and debugging formulas. - (line 67) -* org-table-fedit-ref-right: Editing and debugging formulas. - (line 67) -* org-table-fedit-ref-up: Editing and debugging formulas. - (line 67) -* org-table-fedit-scroll-down: Editing and debugging formulas. - (line 77) -* org-table-fedit-scroll-up: Editing and debugging formulas. - (line 77) -* org-table-fedit-toggle-ref-type: Editing and debugging formulas. - (line 53) -* org-table-field-info: Editing and debugging formulas. - (line 22) -* org-table-hline-and-move: Built-in table editor. - (line 109) -* org-table-insert-column: Built-in table editor. - (line 91) -* org-table-insert-hline: Built-in table editor. - (line 105) -* org-table-insert-row: Built-in table editor. - (line 101) -* org-table-iterate: Updating the table. (line 22) -* org-table-iterate-buffer-tables: Updating the table. (line 33) -* org-table-kill-row: Built-in table editor. - (line 98) -* org-table-move-column-left: Built-in table editor. - (line 86) -* org-table-move-column-right: Built-in table editor. - (line 86) -* org-table-move-row-down: Built-in table editor. - (line 94) -* org-table-move-row-up: Built-in table editor. - (line 94) -* org-table-next-field: Built-in table editor. - (line 62) -* org-table-next-row: Built-in table editor. - (line 69) -* org-table-paste-rectangle: Built-in table editor. - (line 140) -* org-table-previous-field: Built-in table editor. - (line 66) -* org-table-recalculate: Updating the table. (line 13) -* org-table-recalculate-buffer-tables: Updating the table. (line 30) -* org-table-rotate-recalc-marks: Advanced features. (line 10) -* org-table-sort-lines: Built-in table editor. - (line 113) -* org-table-sum: Built-in table editor. - (line 162) -* org-table-toggle-coordinate-overlays: Editing and debugging formulas. - (line 26) -* org-table-toggle-formula-debugger: Editing and debugging formulas. - (line 32) -* org-table-wrap-region: Built-in table editor. - (line 147) -* org-tags-view <1>: Matching tags and properties. - (line 12) -* org-tags-view <2>: Property searches. (line 12) -* org-tags-view: Tag searches. (line 13) -* org-texinfo-export-to-info: Texinfo export commands. - (line 9) -* org-texinfo-export-to-texinfo: Texinfo export commands. - (line 6) -* org-time-stamp: Creating timestamps. (line 10) -* org-time-stamp-inactive: Creating timestamps. (line 15) -* org-timer: Timers. (line 31) -* org-timer-item: Timers. (line 35) -* org-timer-pause-or-continue: Timers. (line 44) -* org-timer-set-timer: Timers. (line 20) -* org-timer-start: Timers. (line 12) -* org-timer-stop: Timers. (line 47) -* org-timestamp-down-day: Creating timestamps. (line 42) -* org-timestamp-down-down: Creating timestamps. (line 47) -* org-timestamp-up: Creating timestamps. (line 47) -* org-timestamp-up-day: Creating timestamps. (line 42) -* org-timestamp-up/down: Clocking commands. (line 60) -* org-todo <1>: Using the mapping API. - (line 62) -* org-todo <2>: Clocking commands. (line 67) -* org-todo: TODO basics. (line 13) -* org-todo-list <1>: Global TODO list. (line 9) -* org-todo-list: TODO basics. (line 49) -* org-toggle-archive-tag: Internal archiving. (line 37) -* org-toggle-checkbox: Checkboxes. (line 52) -* org-toggle-heading: Structure editing. (line 128) -* org-toggle-inline-images: Handling links. (line 133) -* org-toggle-ordered-property <1>: Checkboxes. (line 77) -* org-toggle-ordered-property: TODO dependencies. (line 37) -* org-toggle-tag: Using the mapping API. - (line 70) -* org-toggle-time-stamp-overlays: Custom time format. (line 12) -* org-tree-to-indirect-buffer: Global and local cycling. - (line 55) -* org-update-all-dblocks: Capturing column view. - (line 58) -* org-update-statistics-cookies: Checkboxes. (line 85) -* org-yank: Structure editing. (line 83) -* outline-show-all: Global and local cycling. - (line 35) -* outline-show-branches: Global and local cycling. - (line 47) -* outline-show-children: Global and local cycling. - (line 51) -* outline-up-heading: Motion. (line 18) -* pcomplete: Property syntax. (line 80) -* previous-error: Sparse trees. (line 32) -* widen: Structure editing. (line 125) - - -File: org, Node: Variable Index, Prev: Command and Function Index, Up: Top - -Variable index -************** - -This is not a complete index of variables and faces, only the ones that -are mentioned in the manual. For a complete list, use `M-x -org-customize '. - -[index] -* Menu: - -* cdlatex-simplify-sub-super-scripts: CDLaTeX mode. (line 33) -* constants-unit-system <1>: In-buffer settings. (line 142) -* constants-unit-system: References. (line 117) -* htmlize-output-type: Exporting agenda views. - (line 20) -* LaTeX-verbatim-environments: A LaTeX example. (line 20) -* org-adapt-indentation: Clean view. (line 52) -* org-agenda-add-entry-text-maxlines: Exporting agenda views. - (line 20) -* org-agenda-bulk-custom-functions: Agenda commands. (line 364) -* org-agenda-category-filter-preset: Filtering/limiting agenda items. - (line 68) -* org-agenda-clock-consistency-checks: Agenda commands. (line 151) -* org-agenda-columns-add-appointments-to-effort-sum: Effort estimates. - (line 41) -* org-agenda-confirm-kill: Agenda commands. (line 244) -* org-agenda-custom-commands <1>: Extracting agenda information. - (line 6) -* org-agenda-custom-commands <2>: Setting options. (line 6) -* org-agenda-custom-commands <3>: Storing searches. (line 9) -* org-agenda-custom-commands: Sparse trees. (line 37) -* org-agenda-custom-commands-contexts: Setting options. (line 61) -* org-agenda-diary-file: Agenda commands. (line 462) -* org-agenda-dim-blocked-tasks <1>: Speeding up your agendas. - (line 15) -* org-agenda-dim-blocked-tasks: TODO dependencies. (line 47) -* org-agenda-effort-filter-preset: Filtering/limiting agenda items. - (line 92) -* org-agenda-entry-text-maxlines: Agenda commands. (line 159) -* org-agenda-exporter-settings <1>: Exporting agenda views. - (line 13) -* org-agenda-exporter-settings: Agenda commands. (line 505) -* org-agenda-files <1>: iCalendar export. (line 37) -* org-agenda-files <2>: Sorting agenda items. - (line 8) -* org-agenda-files: Agenda files. (line 6) -* org-agenda-inhibit-startup <1>: Speeding up your agendas. - (line 18) -* org-agenda-inhibit-startup: Initial visibility. (line 6) -* org-agenda-log-mode-items: Agenda commands. (line 118) -* org-agenda-max-effort: Filtering/limiting agenda items. - (line 118) -* org-agenda-max-entries: Filtering/limiting agenda items. - (line 118) -* org-agenda-max-tags: Filtering/limiting agenda items. - (line 118) -* org-agenda-max-todos: Filtering/limiting agenda items. - (line 118) -* org-agenda-ndays: Weekly/daily agenda. (line 15) -* org-agenda-overriding-header: Special agenda views. - (line 38) -* org-agenda-prefix-format: Presentation and sorting. - (line 6) -* org-agenda-regexp-filter-preset: Filtering/limiting agenda items. - (line 82) -* org-agenda-restore-windows-after-quit: Agenda views. (line 42) -* org-agenda-show-inherited-tags <1>: Speeding up your agendas. - (line 21) -* org-agenda-show-inherited-tags: Agenda commands. (line 270) -* org-agenda-skip-archived-trees <1>: Agenda views. (line 37) -* org-agenda-skip-archived-trees: Internal archiving. (line 22) -* org-agenda-skip-comment-trees: Agenda views. (line 37) -* org-agenda-skip-deadline-prewarning-if-scheduled: Deadlines and scheduling. - (line 14) -* org-agenda-skip-function <1>: Using the mapping API. - (line 49) -* org-agenda-skip-function: Special agenda views. - (line 6) -* org-agenda-skip-function-global: Special agenda views. - (line 6) -* org-agenda-skip-scheduled-delay-if-deadline: Deadlines and scheduling. - (line 42) -* org-agenda-skip-scheduled-if-deadline-is-shown: Repeated tasks. - (line 72) -* org-agenda-skip-scheduled-if-done: Deadlines and scheduling. - (line 34) -* org-agenda-sorting-strategy: Sorting agenda items. - (line 27) -* org-agenda-span <1>: Agenda commands. (line 82) -* org-agenda-span: Weekly/daily agenda. (line 15) -* org-agenda-start-day: Weekly/daily agenda. (line 15) -* org-agenda-start-on-weekday: Weekly/daily agenda. (line 15) -* org-agenda-start-with-clockreport-mode: Agenda commands. (line 140) -* org-agenda-start-with-entry-text-mode: Agenda commands. (line 159) -* org-agenda-start-with-follow-mode: Agenda commands. (line 48) -* org-agenda-sticky: Agenda dispatcher. (line 50) -* org-agenda-tag-filter-preset: Filtering/limiting agenda items. - (line 18) -* org-agenda-tags-column: Presentation and sorting. - (line 6) -* org-agenda-tags-todo-honor-ignore-options: Matching tags and properties. - (line 20) -* org-agenda-text-search-extra-files <1>: Search view. (line 24) -* org-agenda-text-search-extra-files: Agenda dispatcher. (line 29) -* org-agenda-time-grid <1>: Agenda commands. (line 167) -* org-agenda-time-grid: Time-of-day specifications. - (line 41) -* org-agenda-todo-ignore-deadlines: Global TODO list. (line 38) -* org-agenda-todo-ignore-scheduled: Global TODO list. (line 38) -* org-agenda-todo-ignore-timestamp: Global TODO list. (line 38) -* org-agenda-todo-ignore-with-date: Global TODO list. (line 38) -* org-agenda-todo-list-sublevels <1>: Global TODO list. (line 47) -* org-agenda-todo-list-sublevels: Breaking down tasks. (line 6) -* org-agenda-use-tag-inheritance <1>: Speeding up your agendas. - (line 21) -* org-agenda-use-tag-inheritance: Tag inheritance. (line 32) -* org-agenda-use-time-grid <1>: Agenda commands. (line 167) -* org-agenda-use-time-grid: Time-of-day specifications. - (line 41) -* org-agenda-window-setup: Agenda views. (line 42) -* org-archive-default-command <1>: Agenda commands. (line 253) -* org-archive-default-command: Archiving. (line 12) -* org-archive-location <1>: In-buffer settings. (line 14) -* org-archive-location: Moving subtrees. (line 10) -* org-archive-save-context-info: Moving subtrees. (line 41) -* org-ascii-links-to-notes: ASCII/Latin-1/UTF-8 export. - (line 14) -* org-ascii-text-width: ASCII/Latin-1/UTF-8 export. - (line 11) -* org-attach-directory: Attachments. (line 6) -* org-attach-method: Attachments. (line 32) -* org-babel-default-header-args <1>: Header arguments in Org mode properties. - (line 31) -* org-babel-default-header-args: System-wide header arguments. - (line 6) -* org-beamer-environments-default: Sectioning Frames and Blocks in Beamer. - (line 19) -* org-beamer-environments-extra: Sectioning Frames and Blocks in Beamer. - (line 19) -* org-beamer-frame-level: Sectioning Frames and Blocks in Beamer. - (line 10) -* org-beamer-subtitle-format: Beamer specific export settings. - (line 43) -* org-beamer-theme: Beamer specific export settings. - (line 10) -* org-calc-default-modes: Formula syntax for Calc. - (line 14) -* org-capture-bookmark: Using capture. (line 50) -* org-capture-templates-contexts: Templates in contexts. - (line 6) -* org-capture-use-agenda-date: Agenda commands. (line 348) -* org-catch-invisible-edits: Catching invisible edits. - (line 6) -* org-checkbox-hierarchical-statistics: Checkboxes. (line 30) -* org-clock-continuously <1>: Resolving idle time. (line 78) -* org-clock-continuously: Clocking commands. (line 7) -* org-clock-idle-time: Resolving idle time. (line 14) -* org-clock-into-drawer: Clocking commands. (line 7) -* org-clock-modeline-total: Clocking commands. (line 20) -* org-clock-report-include-clocking-task: Agenda commands. (line 140) -* org-clock-x11idle-program-name: Resolving idle time. (line 9) -* org-clocktable-defaults: The clock table. (line 38) -* org-closed-keep-when-no-todo: Closing items. (line 11) -* org-coderef-label-format: Literal examples. (line 75) -* org-columns-default-format <1>: Agenda column view. (line 18) -* org-columns-default-format <2>: Agenda commands. (line 185) -* org-columns-default-format <3>: Effort estimates. (line 31) -* org-columns-default-format: Using column view. (line 10) -* org-columns-skip-archived-trees: Internal archiving. (line 32) -* org-columns-summary-types: Column attributes. (line 65) -* org-confirm-babel-evaluate: Code evaluation security. - (line 26) -* org-confirm-elisp-link-function: Code evaluation security. - (line 53) -* org-confirm-shell-link-function: Code evaluation security. - (line 50) -* org-create-file-search-functions: Custom searches. (line 12) -* org-ctrl-c-ctrl-c-hook: Context-sensitive commands. - (line 6) -* org-ctrl-k-protect-subtree: Headlines. (line 6) -* org-cycle-emulate-tab: Global and local cycling. - (line 16) -* org-cycle-global-at-bob: Global and local cycling. - (line 16) -* org-cycle-include-plain-lists: Plain lists. (line 69) -* org-cycle-open-archived-trees: Internal archiving. (line 12) -* org-cycle-separator-lines: Headlines. (line 26) -* org-deadline-warning-days <1>: Inserting deadline/schedule. - (line 24) -* org-deadline-warning-days: Deadlines and scheduling. - (line 14) -* org-default-notes-file <1>: Template elements. (line 49) -* org-default-notes-file: Setting up capture. (line 9) -* org-default-priority <1>: In-buffer settings. (line 45) -* org-default-priority: Priorities. (line 37) -* org-display-custom-times: Custom time format. (line 6) -* org-display-internal-link-with-indirect-buffer: Handling links. - (line 132) -* org-disputed-keys: Conflicts. (line 28) -* org-done (face): Faces for TODO keywords. - (line 6) -* org-edit-footnote-reference: Footnotes. (line 85) -* org-edit-src-auto-save-idle-delay: Editing source code. (line 6) -* org-edit-src-turn-on-auto-save: Editing source code. (line 6) -* org-emphasis-alist: Emphasis and monospace. - (line 6) -* org-emphasis-regexp-components: Emphasis and monospace. - (line 6) -* org-enable-table-editor: Built-in table editor. - (line 30) -* org-enforce-todo-dependencies: TODO dependencies. (line 6) -* org-entities-user: Special symbols. (line 16) -* org-execute-file-search-functions: Custom searches. (line 12) -* org-export-allow-bind-keywords: Export settings. (line 210) -* org-export-async-init-file: The export dispatcher. - (line 24) -* org-export-backends <1>: Other built-in back-ends. - (line 6) -* org-export-backends: Exporting. (line 38) -* org-export-before-parsing-hook: Advanced configuration. - (line 9) -* org-export-before-processing-hook: Advanced configuration. - (line 9) -* org-export-creator-string <1>: HTML preamble and postamble. - (line 6) -* org-export-creator-string: Export settings. (line 28) -* org-export-date-timestamp-format: Export settings. (line 32) -* org-export-default-language: Export settings. (line 38) -* org-export-dispatch-use-expert-ui: The export dispatcher. - (line 6) -* org-export-exclude-tags: Export settings. (line 51) -* org-export-global-macros: Macro replacement. (line 6) -* org-export-headline-levels: Export settings. (line 140) -* org-export-in-background: The export dispatcher. - (line 33) -* org-export-initial-scope: The export dispatcher. - (line 43) -* org-export-preserve-breaks: Export settings. (line 93) -* org-export-select-tags: Export settings. (line 44) -* org-export-time-stamp-file <1>: HTML preamble and postamble. - (line 6) -* org-export-time-stamp-file: Export settings. (line 185) -* org-export-use-babel: Exporting code blocks. - (line 36) -* org-export-with-archived-trees <1>: Export settings. (line 101) -* org-export-with-archived-trees: Internal archiving. (line 28) -* org-export-with-author: Export settings. (line 106) -* org-export-with-broken-links: Export settings. (line 110) -* org-export-with-clocks: Export settings. (line 115) -* org-export-with-creator: Export settings. (line 118) -* org-export-with-date: Export settings. (line 126) -* org-export-with-drawers <1>: Export settings. (line 122) -* org-export-with-drawers: Drawers. (line 38) -* org-export-with-email: Export settings. (line 133) -* org-export-with-entities: Export settings. (line 130) -* org-export-with-fixed-width: Export settings. (line 86) -* org-export-with-footnotes: Export settings. (line 137) -* org-export-with-inlinetasks: Export settings. (line 145) -* org-export-with-latex <1>: Export settings. (line 181) -* org-export-with-latex: LaTeX fragments. (line 38) -* org-export-with-planning: Export settings. (line 156) -* org-export-with-priority: Export settings. (line 161) -* org-export-with-properties <1>: Export settings. (line 164) -* org-export-with-properties: Drawers. (line 38) -* org-export-with-section-numbers: Export settings. (line 148) -* org-export-with-smart-quotes: Export settings. (line 73) -* org-export-with-special-strings: Export settings. (line 82) -* org-export-with-statistics-cookies: Export settings. (line 168) -* org-export-with-sub-superscripts: Export settings. (line 96) -* org-export-with-tables: Export settings. (line 200) -* org-export-with-tags: Export settings. (line 172) -* org-export-with-tasks: Export settings. (line 176) -* org-export-with-timestamps: Export settings. (line 89) -* org-export-with-title: Export settings. (line 189) -* org-export-with-toc <1>: Table of contents. (line 6) -* org-export-with-toc: Export settings. (line 192) -* org-export-with-todo-keywords: Export settings. (line 196) -* org-fast-tag-selection-include-todo: Fast access to TODO states. - (line 16) -* org-fast-tag-selection-single-key: Setting tags. (line 143) -* org-file-apps <1>: Attachments. (line 52) -* org-file-apps: Handling links. (line 104) -* org-fontify-emphasized-text: Emphasis and monospace. - (line 6) -* org-footnote-auto-adjust <1>: In-buffer settings. (line 147) -* org-footnote-auto-adjust: Footnotes. (line 48) -* org-footnote-auto-label <1>: In-buffer settings. (line 147) -* org-footnote-auto-label: Footnotes. (line 34) -* org-footnote-define-inline <1>: In-buffer settings. (line 147) -* org-footnote-define-inline: Footnotes. (line 48) -* org-footnote-section <1>: Footnotes. (line 48) -* org-footnote-section: Headlines. (line 18) -* org-format-latex-header <1>: Previewing LaTeX fragments. - (line 12) -* org-format-latex-header: LaTeX fragments. (line 6) -* org-format-latex-options: Previewing LaTeX fragments. - (line 12) -* org-from-is-user-regexp: Template expansion. (line 49) -* org-global-properties <1>: Effort estimates. (line 31) -* org-global-properties: Property syntax. (line 75) -* org-goto-auto-isearch: Motion. (line 26) -* org-goto-interface: Motion. (line 37) -* org-group-tags: Tag hierarchy. (line 86) -* org-hide (face): Clean view. (line 70) -* org-hide-block-startup: Blocks. (line 6) -* org-hide-leading-stars <1>: Clean view. (line 55) -* org-hide-leading-stars: In-buffer settings. (line 126) -* org-hierarchical-todo-statistics: Breaking down tasks. (line 25) -* org-highest-priority <1>: In-buffer settings. (line 45) -* org-highest-priority: Priorities. (line 37) -* org-html-container-element: HTML Specific export settings. - (line 17) -* org-html-doctype <1>: HTML doctypes. (line 8) -* org-html-doctype: HTML Specific export settings. - (line 14) -* org-html-doctype-alist: HTML doctypes. (line 8) -* org-html-head <1>: CSS support. (line 43) -* org-html-head: HTML Specific export settings. - (line 32) -* org-html-head-extra <1>: CSS support. (line 43) -* org-html-head-extra: HTML Specific export settings. - (line 36) -* org-html-head-include-default-style: CSS support. (line 43) -* org-html-html5-elements: HTML doctypes. (line 69) -* org-html-html5-fancy: HTML doctypes. (line 36) -* org-html-infojs-options: JavaScript support. (line 54) -* org-html-inline-images: Images in HTML export. - (line 6) -* org-html-link-home: HTML Specific export settings. - (line 21) -* org-html-link-org-files-as-html: Links in HTML export. - (line 6) -* org-html-link-up: HTML Specific export settings. - (line 24) -* org-html-mathjax-options: HTML Specific export settings. - (line 27) -* org-html-postamble: HTML preamble and postamble. - (line 6) -* org-html-postamble-format: HTML preamble and postamble. - (line 6) -* org-html-preamble: HTML preamble and postamble. - (line 6) -* org-html-preamble-format: HTML preamble and postamble. - (line 6) -* org-html-style-default: CSS support. (line 43) -* org-html-table-align-individual-fields: Tables in HTML export. - (line 20) -* org-html-table-caption-above: Tables in HTML export. - (line 24) -* org-html-table-data-tags: Tables in HTML export. - (line 27) -* org-html-table-default-attributes: Tables in HTML export. - (line 6) -* org-html-table-header-tags: Tables in HTML export. - (line 33) -* org-html-table-row-tags: Tables in HTML export. - (line 36) -* org-html-table-use-header-tags-for-first-column: Tables in HTML export. - (line 39) -* org-html-tag-class-prefix: CSS support. (line 6) -* org-html-todo-kwd-class-prefix: CSS support. (line 6) -* org-html-use-infojs: JavaScript support. (line 54) -* org-html-validation-link: HTML preamble and postamble. - (line 6) -* org-icalendar-alarm-time: iCalendar export. (line 6) -* org-icalendar-categories: iCalendar export. (line 6) -* org-icalendar-combined-agenda-file: iCalendar export. (line 42) -* org-icalendar-include-body: iCalendar export. (line 46) -* org-icalendar-include-todo: iCalendar export. (line 6) -* org-icalendar-store-UID: iCalendar export. (line 21) -* org-icalendar-use-deadline: iCalendar export. (line 6) -* org-icalendar-use-scheduled: iCalendar export. (line 6) -* org-id-link-to-org-use-id: Handling links. (line 21) -* org-imenu-depth: Cooperation. (line 30) -* org-insert-mode-line-in-empty-file: Activation. (line 27) -* org-irc-link-to-logs: Handling links. (line 45) -* org-keep-stored-link-after-insertion: Handling links. (line 66) -* org-latex-bibtex-compiler: LaTeX export commands. - (line 21) -* org-latex-classes <1>: LaTeX header and sectioning. - (line 13) -* org-latex-classes: LaTeX specific export settings. - (line 17) -* org-latex-compiler <1>: LaTeX specific export settings. - (line 25) -* org-latex-compiler: LaTeX export commands. - (line 21) -* org-latex-default-class <1>: LaTeX header and sectioning. - (line 13) -* org-latex-default-class: LaTeX specific export settings. - (line 17) -* org-latex-default-packages-alist <1>: LaTeX header and sectioning. - (line 13) -* org-latex-default-packages-alist: LaTeX export commands. - (line 21) -* org-latex-default-table-environment: Tables in LaTeX export. - (line 19) -* org-latex-default-table-mode: Tables in LaTeX export. - (line 11) -* org-latex-images-centered: Images in LaTeX export. - (line 52) -* org-latex-listings: Literal examples. (line 23) -* org-latex-listings-options: Source blocks in LaTeX export. - (line 26) -* org-latex-minted-options: Source blocks in LaTeX export. - (line 26) -* org-latex-packages-alist: LaTeX header and sectioning. - (line 13) -* org-latex-subtitle-format: LaTeX specific export settings. - (line 46) -* org-latex-subtitle-separate: LaTeX specific export settings. - (line 46) -* org-latex-tables-booktabs: Tables in LaTeX export. - (line 55) -* org-latex-tables-centered: Tables in LaTeX export. - (line 55) -* org-latex-to-mathml-convert-command: Working with LaTeX math snippets. - (line 20) -* org-latex-to-mathml-jar-file: Working with LaTeX math snippets. - (line 20) -* org-link-abbrev-alist <1>: In-buffer settings. (line 40) -* org-link-abbrev-alist: Link abbreviations. (line 12) -* org-link-frame-setup: Handling links. (line 104) -* org-link-parameters: Handling links. (line 66) -* org-list-allow-alphabetical: Plain lists. (line 14) -* org-list-automatic-rules <1>: Checkboxes. (line 6) -* org-list-automatic-rules: Plain lists. (line 62) -* org-list-demote-modify-bullet: Plain lists. (line 56) -* org-list-empty-line-terminates-plain-lists: Plain lists. (line 30) -* org-list-indent-offset: Plain lists. (line 56) -* org-list-use-circular-motion: Plain lists. (line 94) -* org-log-done <1>: In-buffer settings. (line 101) -* org-log-done <2>: Agenda commands. (line 118) -* org-log-done: Tracking TODO state changes. - (line 29) -* org-log-into-drawer <1>: Agenda commands. (line 295) -* org-log-into-drawer: Tracking TODO state changes. - (line 6) -* org-log-note-clock-out <1>: In-buffer settings. (line 101) -* org-log-note-clock-out: Clocking commands. (line 37) -* org-log-refile: Refile and copy. (line 17) -* org-log-repeat <1>: In-buffer settings. (line 101) -* org-log-repeat: Repeated tasks. (line 37) -* org-log-states-order-reversed: Tracking TODO state changes. - (line 6) -* org-lowest-priority <1>: In-buffer settings. (line 45) -* org-lowest-priority: Priorities. (line 37) -* org-M-RET-may-split-line <1>: Plain lists. (line 82) -* org-M-RET-may-split-line: Structure editing. (line 7) -* org-md-headline-style: Markdown export. (line 30) -* org-odd-levels-only <1>: Special agenda views. - (line 41) -* org-odd-levels-only <2>: Clean view. (line 75) -* org-odd-levels-only <3>: In-buffer settings. (line 126) -* org-odd-levels-only: Matching tags and properties. - (line 72) -* org-odt-category-map-alist: Labels and captions in ODT export. - (line 25) -* org-odt-convert: Extending ODT export. - (line 39) -* org-odt-convert-capabilities: Configuring a document converter. - (line 20) -* org-odt-convert-process: Configuring a document converter. - (line 30) -* org-odt-convert-processes: Configuring a document converter. - (line 13) -* org-odt-create-custom-styles-for-srcblocks: Literal examples in ODT export. - (line 17) -* org-odt-fontify-srcblocks: Literal examples in ODT export. - (line 13) -* org-odt-pixels-per-inch: Images in ODT export. - (line 33) -* org-odt-preferred-output-format <1>: Extending ODT export. - (line 22) -* org-odt-preferred-output-format: ODT export commands. (line 9) -* org-odt-schema-dir: Validating OpenDocument XML. - (line 16) -* org-odt-styles-file <1>: Applying custom styles. - (line 28) -* org-odt-styles-file: ODT specific export settings. - (line 19) -* org-odt-table-styles: Customizing tables in ODT export. - (line 13) -* org-outline-path-complete-in-steps: Refile and copy. (line 17) -* org-overriding-columns-format: Agenda column view. (line 18) -* org-plain-list-ordered-item-terminator: Plain lists. (line 14) -* org-popup-calendar-for-date-prompt: The date/time prompt. - (line 76) -* org-preview-latex-default-process: Previewing LaTeX fragments. - (line 6) -* org-priority-faces: Priorities. (line 13) -* org-priority-start-cycle-with-default: Priorities. (line 32) -* org-property-allowed-value-functions: Using the property API. - (line 68) -* org-publish-project-alist <1>: Publishing options. (line 13) -* org-publish-project-alist: Project alist. (line 6) -* org-publish-use-timestamps-flag: Triggering publication. - (line 21) -* org-put-time-stamp-overlays: In-buffer settings. (line 137) -* org-read-date-display-live: The date/time prompt. - (line 91) -* org-read-date-force-compatible-dates: The date/time prompt. - (line 61) -* org-read-date-prefer-future: The date/time prompt. - (line 6) -* org-refile-allow-creating-parent-nodes: Refile and copy. (line 17) -* org-refile-keep: Refile and copy. (line 17) -* org-refile-targets: Refile and copy. (line 17) -* org-refile-use-cache: Refile and copy. (line 17) -* org-refile-use-outline-path: Refile and copy. (line 17) -* org-remove-highlights-with-change <1>: Clocking commands. (line 83) -* org-remove-highlights-with-change: Sparse trees. (line 20) -* org-replace-disputed-keys: Conflicts. (line 18) -* org-return-follows-link: Handling links. (line 123) -* org-reverse-note-order: Refile and copy. (line 17) -* org-scheduled-delay-days: Deadlines and scheduling. - (line 42) -* org-show-context-detail: Sparse trees. (line 6) -* org-sort-agenda-noeffort-is-high: Filtering/limiting agenda items. - (line 92) -* org-sparse-tree-open-archived-trees: Internal archiving. (line 18) -* org-special-ctrl-a/e: Headlines. (line 6) -* org-special-ctrl-k: Headlines. (line 6) -* org-speed-commands-user: Speed keys. (line 6) -* org-startup-align-all-tables <1>: In-buffer settings. (line 81) -* org-startup-align-all-tables: Column width and alignment. - (line 33) -* org-startup-folded <1>: Speeding up your agendas. - (line 18) -* org-startup-folded <2>: In-buffer settings. (line 71) -* org-startup-folded: Initial visibility. (line 6) -* org-startup-indented: In-buffer settings. (line 76) -* org-startup-with-inline-images <1>: In-buffer settings. (line 88) -* org-startup-with-inline-images: Handling links. (line 136) -* org-startup-with-latex-preview <1>: In-buffer settings. (line 94) -* org-startup-with-latex-preview: Previewing LaTeX fragments. - (line 28) -* org-store-link-functions: Adding hyperlink types. - (line 61) -* org-stuck-projects: Stuck projects. (line 17) -* org-support-shift-select <1>: Conflicts. (line 6) -* org-support-shift-select: Plain lists. (line 94) -* org-table-auto-blank-field: Built-in table editor. - (line 30) -* org-table-copy-increment: Built-in table editor. - (line 168) -* org-table-duration-custom-format: Durations and time values. - (line 6) -* org-table-export-default-format: Built-in table editor. - (line 205) -* org-table-formula: In-buffer settings. (line 30) -* org-table-formula-constants <1>: Cooperation. (line 12) -* org-table-formula-constants <2>: In-buffer settings. (line 30) -* org-table-formula-constants: References. (line 110) -* org-table-use-standard-references <1>: Editing and debugging formulas. - (line 6) -* org-table-use-standard-references: References. (line 17) -* org-tag-alist <1>: In-buffer settings. (line 171) -* org-tag-alist: Setting tags. (line 23) -* org-tag-faces: Tags. (line 10) -* org-tag-persistent-alist: Setting tags. (line 38) -* org-tags-column: Setting tags. (line 11) -* org-tags-exclude-from-inheritance: Tag inheritance. (line 22) -* org-tags-match-list-sublevels <1>: Matching tags and properties. - (line 20) -* org-tags-match-list-sublevels <2>: Property searches. (line 19) -* org-tags-match-list-sublevels <3>: Tag searches. (line 20) -* org-tags-match-list-sublevels: Tag inheritance. (line 26) -* org-texinfo-classes <1>: Headings and sectioning structure. - (line 6) -* org-texinfo-classes: Texinfo file header. (line 12) -* org-texinfo-coding-system: Texinfo file header. (line 12) -* org-texinfo-def-table-markup: Plain lists in Texinfo export. - (line 10) -* org-texinfo-default-class <1>: Headings and sectioning structure. - (line 6) -* org-texinfo-default-class: Texinfo specific export settings. - (line 19) -* org-texinfo-info-process: Texinfo export commands. - (line 6) -* org-time-stamp-custom-formats: Custom time format. (line 6) -* org-time-stamp-overlay-formats: In-buffer settings. (line 137) -* org-time-stamp-rounding-minutes: Creating timestamps. (line 23) -* org-todo (face): Faces for TODO keywords. - (line 6) -* org-todo-keyword-faces: Faces for TODO keywords. - (line 6) -* org-todo-keywords <1>: In-buffer settings. (line 189) -* org-todo-keywords <2>: Global TODO list. (line 18) -* org-todo-keywords <3>: TODO extensions. (line 6) -* org-todo-keywords: TODO basics. (line 41) -* org-todo-repeat-to-state: Repeated tasks. (line 19) -* org-todo-state-tags-triggers: TODO basics. (line 62) -* org-track-ordered-property-with-tag <1>: Checkboxes. (line 80) -* org-track-ordered-property-with-tag: TODO dependencies. (line 38) -* org-treat-insert-todo-heading-as-state-change: Structure editing. - (line 29) -* org-treat-S-cursor-todo-selection-as-state-change: TODO basics. - (line 34) -* org-use-fast-todo-selection: TODO basics. (line 14) -* org-use-property-inheritance <1>: Using the property API. - (line 18) -* org-use-property-inheritance <2>: Header arguments in Org mode properties. - (line 17) -* org-use-property-inheritance <3>: iCalendar export. (line 46) -* org-use-property-inheritance: Property inheritance. - (line 6) -* org-use-speed-commands: Speed keys. (line 6) -* org-use-sub-superscripts: Subscripts and superscripts. - (line 14) -* org-use-tag-inheritance: Tag inheritance. (line 22) -* org-yank-adjusted-subtrees: Structure editing. (line 86) -* org-yank-folded-subtrees: Structure editing. (line 86) -* orgstruct-heading-prefix-regexp: Orgstruct mode. (line 26) -* parse-time-months: The date/time prompt. - (line 57) -* parse-time-weekdays: The date/time prompt. - (line 57) -* ps-landscape-mode: Exporting agenda views. - (line 20) -* ps-number-of-columns: Exporting agenda views. - (line 20) -* user-full-name: Export settings. (line 25) -* user-mail-address: Export settings. (line 35) - - - -Tag Table: -Node: Top900 -Node: Introduction24537 -Node: Summary24978 -Node: Installation27674 -Node: Activation30370 -Ref: Activation-Footnote-131890 -Node: Feedback32012 -Ref: Feedback-Footnote-135667 -Node: Conventions35794 -Node: Document structure37831 -Node: Outlines38822 -Node: Headlines39451 -Ref: Headlines-Footnote-140653 -Ref: Headlines-Footnote-240829 -Node: Visibility cycling40900 -Node: Global and local cycling41279 -Ref: Global and local cycling-Footnote-143963 -Ref: Global and local cycling-Footnote-244021 -Ref: Global and local cycling-Footnote-344071 -Node: Initial visibility44340 -Ref: Initial visibility-Footnote-145375 -Node: Catching invisible edits45556 -Node: Motion46021 -Node: Structure editing47348 -Node: Sparse trees53950 -Ref: Sparse trees-Footnote-156460 -Ref: Sparse trees-Footnote-256571 -Node: Plain lists56642 -Ref: Plain lists-Footnote-164057 -Ref: Plain lists-Footnote-264411 -Ref: Plain lists-Footnote-364507 -Ref: Plain lists-Footnote-464754 -Ref: Plain lists-Footnote-564925 -Ref: Plain lists-Footnote-664988 -Ref: Plain lists-Footnote-765088 -Ref: Plain lists-Footnote-865190 -Node: Drawers65256 -Ref: Drawers-Footnote-167120 -Node: Blocks67256 -Node: Footnotes67815 -Ref: Footnotes-Footnote-171759 -Ref: Footnotes-Footnote-271856 -Node: Orgstruct mode71933 -Node: Org syntax73563 -Node: Tables74536 -Node: Built-in table editor75177 -Ref: Built-in table editor-Footnote-184929 -Node: Column width and alignment85029 -Ref: Column width and alignment-Footnote-187590 -Node: Column groups87687 -Node: Orgtbl mode89258 -Node: The spreadsheet90067 -Node: References91527 -Ref: References-Footnote-198245 -Ref: References-Footnote-298467 -Ref: References-Footnote-398736 -Ref: References-Footnote-498849 -Node: Formula syntax for Calc99139 -Ref: Formula syntax for Calc-Footnote-1104286 -Node: Formula syntax for Lisp104610 -Node: Durations and time values106345 -Node: Field and range formulas107423 -Node: Column formulas109820 -Node: Lookup functions111908 -Node: Editing and debugging formulas113831 -Ref: Using multiple #+TBLFM lines118092 -Ref: Editing and debugging formulas-Footnote-1119341 -Node: Updating the table119477 -Node: Advanced features120833 -Ref: Advanced features-Footnote-1125314 -Node: Org-Plot125420 -Node: Hyperlinks129614 -Node: Link format130371 -Node: Internal links131630 -Ref: Internal links-Footnote-1133925 -Ref: Internal links-Footnote-2134165 -Node: Radio targets134303 -Node: External links134970 -Ref: External links-Footnote-1138894 -Ref: External links-Footnote-2139312 -Node: Handling links139568 -Ref: Handling links-Footnote-1147432 -Ref: Handling links-Footnote-2147591 -Ref: Handling links-Footnote-3147773 -Ref: Handling links-Footnote-4148068 -Ref: Handling links-Footnote-5148314 -Ref: Handling links-Footnote-6148433 -Ref: Handling links-Footnote-7148505 -Node: Using links outside Org148589 -Node: Link abbreviations149074 -Node: Search options151843 -Ref: Search options-Footnote-1153725 -Node: Custom searches153806 -Node: TODO items154816 -Ref: TODO items-Footnote-1155924 -Node: TODO basics156038 -Node: TODO extensions158862 -Node: Workflow states159892 -Ref: Workflow states-Footnote-1161193 -Node: TODO types161286 -Ref: TODO types-Footnote-1162884 -Node: Multiple sets in one file162953 -Node: Fast access to TODO states164807 -Ref: Fast access to TODO states-Footnote-1165680 -Ref: Fast access to TODO states-Footnote-2165764 -Node: Per-file keywords166057 -Ref: Per-file keywords-Footnote-1167428 -Node: Faces for TODO keywords167629 -Node: TODO dependencies168670 -Node: Progress logging171005 -Node: Closing items171717 -Ref: Closing items-Footnote-1172694 -Ref: Closing items-Footnote-2172763 -Node: Tracking TODO state changes172837 -Ref: Tracking TODO state changes-Footnote-1175873 -Ref: Tracking TODO state changes-Footnote-2175928 -Ref: Tracking TODO state changes-Footnote-3176068 -Node: Tracking your habits176356 -Node: Priorities180590 -Ref: Priorities-Footnote-1182562 -Node: Breaking down tasks182631 -Ref: Breaking down tasks-Footnote-1184610 -Node: Checkboxes184706 -Ref: Checkboxes-Footnote-1189333 -Ref: Checkboxes-Footnote-2189457 -Ref: Checkboxes-Footnote-3189631 -Node: Tags189751 -Node: Tag inheritance190807 -Ref: Tag inheritance-Footnote-1192622 -Ref: Tag inheritance-Footnote-2192722 -Node: Setting tags192848 -Ref: Setting tags-Footnote-1199159 -Node: Tag hierarchy199242 -Node: Tag searches202610 -Node: Properties and columns203892 -Node: Property syntax205328 -Node: Special properties209670 -Node: Property searches211315 -Node: Property inheritance212750 -Node: Column view214566 -Node: Defining columns215801 -Node: Scope of column definitions216179 -Node: Column attributes217084 -Ref: Column attributes-Footnote-1221878 -Ref: Column attributes-Footnote-2222034 -Ref: Column attributes-Footnote-3222247 -Ref: Column attributes-Footnote-4222530 -Node: Using column view222663 -Node: Capturing column view225588 -Ref: Capturing column view-Footnote-1228665 -Node: Property API228801 -Node: Dates and times229155 -Node: Timestamps230062 -Ref: Timestamps-Footnote-1232462 -Ref: Timestamps-Footnote-2232648 -Ref: Timestamps-Footnote-3232779 -Node: Creating timestamps233548 -Node: The date/time prompt236372 -Ref: The date/time prompt-Footnote-1240954 -Ref: The date/time prompt-Footnote-2241117 -Ref: The date/time prompt-Footnote-3241223 -Node: Custom time format241317 -Node: Deadlines and scheduling243039 -Ref: Deadlines and scheduling-Footnote-1246519 -Node: Inserting deadline/schedule246674 -Ref: Inserting deadline/schedule-Footnote-1248474 -Ref: Inserting deadline/schedule-Footnote-2248582 -Node: Repeated tasks248690 -Ref: Repeated tasks-Footnote-1253093 -Ref: Repeated tasks-Footnote-2253342 -Node: Clocking work time253541 -Ref: Clocking work time-Footnote-1254726 -Ref: Clocking work time-Footnote-2254870 -Node: Clocking commands255008 -Ref: Clocking commands-Footnote-1259913 -Ref: Clocking commands-Footnote-2260020 -Ref: Clocking commands-Footnote-3260070 -Ref: Clocking commands-Footnote-4260128 -Node: The clock table260206 -Ref: The clock table-Footnote-1267741 -Ref: The clock table-Footnote-2267835 -Node: Resolving idle time267960 -Ref: Resolving idle time-Footnote-1271807 -Node: Effort estimates272275 -Ref: Effort estimates-Footnote-1275028 -Node: Timers275135 -Node: Capture - Refile - Archive277427 -Node: Capture278417 -Node: Setting up capture279485 -Ref: Setting up capture-Footnote-1279894 -Node: Using capture279960 -Node: Capture templates282368 -Node: Template elements284333 -Ref: Template elements-Footnote-1290910 -Ref: Template elements-Footnote-2291227 -Node: Template expansion291414 -Ref: Template expansion-Footnote-1295404 -Ref: Template expansion-Footnote-2295491 -Ref: Template expansion-Footnote-3295673 -Node: Templates in contexts295771 -Node: Attachments296593 -Ref: Attachments-Footnote-1300040 -Node: RSS feeds300190 -Node: Protocols301667 -Node: Refile and copy302382 -Ref: Refile and copy-Footnote-1304804 -Node: Archiving304900 -Node: Moving subtrees305600 -Node: Internal archiving307624 -Node: Agenda views310256 -Node: Agenda files312584 -Ref: Agenda files-Footnote-1315387 -Ref: Agenda files-Footnote-2315536 -Node: Agenda dispatcher315729 -Ref: Agenda dispatcher-Footnote-1318560 -Ref: Agenda dispatcher-Footnote-2318654 -Node: Built-in agenda views318756 -Node: Weekly/daily agenda319340 -Ref: Weekly/daily agenda-Footnote-1325074 -Ref: Weekly/daily agenda-Footnote-2325301 -Node: Global TODO list325476 -Node: Matching tags and properties328004 -Node: Search view334956 -Node: Stuck projects336269 -Ref: Stuck projects-Footnote-1338329 -Node: Presentation and sorting338359 -Node: Categories339316 -Node: Time-of-day specifications340045 -Node: Sorting agenda items342014 -Node: Filtering/limiting agenda items343583 -Ref: Filtering/limiting agenda items-Footnote-1350731 -Node: Agenda commands351146 -Ref: Agenda commands-Footnote-1372137 -Ref: Agenda commands-Footnote-2372218 -Ref: Agenda commands-Footnote-3372337 -Ref: Agenda commands-Footnote-4372437 -Node: Custom agenda views372520 -Node: Storing searches373161 -Ref: Storing searches-Footnote-1376113 -Ref: Storing searches-Footnote-2376230 -Node: Block agenda376478 -Node: Setting options377716 -Node: Exporting agenda views381305 -Ref: Exporting agenda views-Footnote-1386206 -Ref: Exporting agenda views-Footnote-2386264 -Ref: Exporting agenda views-Footnote-3386420 -Ref: Exporting agenda views-Footnote-4386607 -Node: Agenda column view386689 -Node: Markup389761 -Node: Paragraphs390748 -Node: Emphasis and monospace391914 -Node: Horizontal rules392756 -Node: Images and tables393007 -Node: Literal examples394714 -Ref: Literal examples-Footnote-1399223 -Ref: Literal examples-Footnote-2399756 -Ref: Literal examples-Footnote-3399925 -Ref: Literal examples-Footnote-4400104 -Ref: Literal examples-Footnote-5400354 -Node: Special symbols400448 -Ref: Special symbols-Footnote-1402377 -Ref: Special symbols-Footnote-2402532 -Node: Subscripts and superscripts402622 -Node: Embedded LaTeX403726 -Ref: Embedded LaTeX-Footnote-1404540 -Node: LaTeX fragments404730 -Ref: LaTeX fragments-Footnote-1406810 -Node: Previewing LaTeX fragments407033 -Ref: Previewing LaTeX fragments-Footnote-1408462 -Node: CDLaTeX mode408708 -Ref: CDLaTeX mode-Footnote-1411208 -Node: Exporting411356 -Ref: Exporting-Footnote-1413935 -Node: The export dispatcher414045 -Ref: The export dispatcher-Footnote-1416084 -Node: Export settings416347 -Ref: Export settings-Footnote-1423891 -Ref: Export settings-Footnote-2423989 -Ref: Export settings-Footnote-3424091 -Ref: Export settings-Footnote-4424186 -Node: Table of contents424229 -Ref: Table of contents-Footnote-1425980 -Node: Include files426178 -Ref: Include files-Footnote-1429099 -Ref: Include files-Footnote-2429249 -Node: Macro replacement429415 -Ref: Macro replacement-Footnote-1431666 -Node: Comment lines431896 -Ref: Comment lines-Footnote-1432702 -Node: ASCII/Latin-1/UTF-8 export432802 -Node: Beamer export435580 -Node: Beamer export commands436338 -Node: Beamer specific export settings437013 -Node: Sectioning Frames and Blocks in Beamer438797 -Ref: Sectioning Frames and Blocks in Beamer-Footnote-1441753 -Ref: Sectioning Frames and Blocks in Beamer-Footnote-2441916 -Node: Beamer specific syntax442034 -Node: Editing support443665 -Node: A Beamer Example444096 -Node: HTML export445374 -Node: HTML Export commands446518 -Node: HTML Specific export settings447064 -Node: HTML doctypes448849 -Node: HTML preamble and postamble451063 -Node: Quoting HTML tags452111 -Node: Links in HTML export452750 -Node: Tables in HTML export453961 -Node: Images in HTML export455397 -Ref: Images in HTML export-Footnote-1456687 -Node: Math formatting in HTML export456742 -Ref: Math formatting in HTML export-Footnote-1458133 -Node: Text areas in HTML export458393 -Node: CSS support459175 -Ref: CSS support-Footnote-1462347 -Ref: CSS support-Footnote-2462519 -Node: JavaScript support462761 -Node: LaTeX export466142 -Ref: LaTeX export-Footnote-1467428 -Node: LaTeX export commands467672 -Ref: LaTeX export commands-Footnote-1468774 -Node: LaTeX specific export settings468980 -Node: LaTeX header and sectioning471152 -Ref: LaTeX header and sectioning-Footnote-1472785 -Ref: LaTeX header and sectioning-Footnote-2472897 -Node: Quoting LaTeX code473060 -Node: Tables in LaTeX export473660 -Ref: Tables in LaTeX export-Footnote-1477270 -Ref: Tables in LaTeX export-Footnote-2477348 -Ref: Tables in LaTeX export-Footnote-3477422 -Node: Images in LaTeX export477506 -Ref: Images in LaTeX export-Footnote-1480122 -Node: Plain lists in LaTeX export480276 -Node: Source blocks in LaTeX export481392 -Node: Example blocks in LaTeX export482789 -Node: Special blocks in LaTeX export483425 -Node: Horizontal rules in LaTeX export484606 -Node: Markdown export484995 -Ref: Markdown export-Footnote-1486293 -Node: OpenDocument Text export486379 -Ref: OpenDocument Text export-Footnote-1487570 -Node: Pre-requisites for ODT export487714 -Node: ODT export commands488042 -Ref: x-export-to-odt488246 -Ref: ODT export commands-Footnote-1489245 -Ref: ODT export commands-Footnote-2489305 -Node: ODT specific export settings489356 -Node: Extending ODT export490198 -Ref: x-export-to-other-formats491186 -Ref: x-convert-to-other-formats491696 -Node: Applying custom styles492153 -Node: Links in ODT export494277 -Node: Tables in ODT export494924 -Ref: Tables in ODT export-Footnote-1497060 -Node: Images in ODT export497153 -Ref: Images in ODT export-Footnote-1499879 -Node: Math formatting in ODT export500112 -Node: Working with LaTeX math snippets500576 -Ref: Working with LaTeX math snippets-Footnote-1502795 -Ref: Working with LaTeX math snippets-Footnote-2502871 -Node: Working with MathML or OpenDocument formula files502916 -Node: Labels and captions in ODT export503470 -Node: Literal examples in ODT export504928 -Node: Advanced topics in ODT export505792 -Node: Configuring a document converter506548 -Ref: x-odt-converter-capabilities507320 -Node: Working with OpenDocument style files507901 -Ref: x-factory-styles508377 -Ref: x-orgodtstyles-xml508615 -Ref: x-orgodtcontenttemplate-xml508942 -Ref: x-overriding-factory-styles509598 -Ref: x-org-odt-styles-file509878 -Ref: x-org-odt-content-template-file510759 -Node: Creating one-off styles510900 -Node: Customizing tables in ODT export513121 -Ref: Customizing tables in ODT export-Footnote-1518098 -Ref: Customizing tables in ODT export-Footnote-2518202 -Ref: Customizing tables in ODT export-Footnote-3518290 -Node: Validating OpenDocument XML518605 -Ref: Validating OpenDocument XML-Footnote-1519604 -Node: Org export519656 -Node: Texinfo export520420 -Node: Texinfo export commands521520 -Ref: Texinfo export commands-Footnote-1522055 -Node: Texinfo specific export settings522163 -Node: Texinfo file header523197 -Ref: Texinfo file header-Footnote-1524199 -Node: Texinfo title and copyright page524261 -Node: Texinfo `Top' node525734 -Node: Headings and sectioning structure526473 -Node: Indices527928 -Node: Quoting Texinfo code528721 -Node: Plain lists in Texinfo export529213 -Ref: Plain lists in Texinfo export-Footnote-1529969 -Node: Tables in Texinfo export530035 -Node: Images in Texinfo export530497 -Node: Special blocks in Texinfo export530993 -Node: A Texinfo example531569 -Node: iCalendar export533588 -Ref: iCalendar export-Footnote-1536320 -Ref: iCalendar export-Footnote-2536410 -Ref: iCalendar export-Footnote-3536510 -Node: Other built-in back-ends536647 -Node: Advanced configuration537237 -Node: Export in foreign buffers544212 -Node: Publishing545169 -Node: Configuration546037 -Node: Project alist546800 -Node: Sources and destinations547941 -Node: Selecting files549464 -Node: Publishing action550465 -Ref: Publishing action-Footnote-1552294 -Node: Publishing options552451 -Node: Publishing links565601 -Node: Sitemap566953 -Node: Generating an index570681 -Node: Uploading files571463 -Node: Sample configuration573227 -Node: Simple example573716 -Node: Complex example574363 -Node: Triggering publication576414 -Node: Working with source code577410 -Node: Structure of code blocks581860 -Node: Editing source code584347 -Node: Exporting code blocks587106 -Node: Extracting source code589711 -Node: Evaluating code blocks592155 -Ref: Evaluating code blocks-Footnote-1595276 -Ref: Evaluating code blocks-Footnote-2595402 -Node: Library of Babel595588 -Node: Languages596267 -Node: Header arguments598664 -Node: Using header arguments599021 -Node: System-wide header arguments599827 -Node: Language-specific header arguments600522 -Node: Header arguments in Org mode properties601042 -Node: Language-specific mode properties602485 -Node: Code block specific header arguments603305 -Node: Arguments in function calls604956 -Node: Specific header arguments605716 -Node: var608398 -Node: results614980 -Node: file618879 -Node: file-desc619544 -Node: file-ext619942 -Node: output-dir620359 -Node: dir620757 -Node: exports622878 -Node: tangle623750 -Node: mkdirp624595 -Node: comments624909 -Node: padline625865 -Node: no-expand626256 -Node: session626968 -Node: noweb628045 -Node: noweb-ref629843 -Node: noweb-sep630931 -Node: cache631235 -Node: sep633833 -Node: hlines634224 -Node: colnames635706 -Node: rownames637110 -Node: shebang638299 -Node: tangle-mode638777 -Node: eval639561 -Node: wrap640545 -Node: post640852 -Node: prologue642587 -Node: epilogue643083 -Node: Results of evaluation643341 -Node: Noweb reference syntax647062 -Node: Key bindings and useful functions648582 -Node: Batch execution650621 -Node: Miscellaneous651659 -Node: Completion652498 -Node: Easy templates654541 -Node: Speed keys655726 -Node: Code evaluation security656734 -Node: Customization659539 -Node: In-buffer settings659965 -Node: The very busy C-c C-c key669192 -Node: Clean view671023 -Ref: Clean view-Footnote-1674422 -Ref: Clean view-Footnote-2674645 -Ref: Clean view-Footnote-3674700 -Node: TTY keys674772 -Node: Interaction676197 -Node: Cooperation676594 -Node: Conflicts679313 -Node: org-crypt683822 -Node: Hacking685074 -Node: Hooks686060 -Node: Add-on packages686378 -Node: Adding hyperlink types686906 -Node: Adding export back-ends690267 -Node: Context-sensitive commands691487 -Node: Tables in arbitrary syntax692168 -Node: Radio tables693831 -Node: A LaTeX example695904 -Ref: A LaTeX example-Footnote-1699617 -Ref: A LaTeX example-Footnote-2699783 -Node: Translator functions700218 -Node: Radio lists702324 -Node: Dynamic blocks703474 -Node: Special agenda views705520 -Ref: x-agenda-skip-entry-regexp708345 -Ref: Special agenda views-Footnote-1709110 -Ref: Special agenda views-Footnote-2709305 -Node: Speeding up your agendas709433 -Node: Extracting agenda information710477 -Node: Using the property API714301 -Node: Using the mapping API717626 -Node: MobileOrg721593 -Node: Setting up the staging area723153 -Ref: Setting up the staging area-Footnote-1724355 -Ref: Setting up the staging area-Footnote-2724524 -Node: Pushing to MobileOrg724731 -Ref: Pushing to MobileOrg-Footnote-1725610 -Ref: Pushing to MobileOrg-Footnote-2725696 -Ref: Pushing to MobileOrg-Footnote-3726055 -Node: Pulling from MobileOrg726127 -Ref: Pulling from MobileOrg-Footnote-1728147 -Node: History and acknowledgments728207 -Node: GNU Free Documentation License743392 -Node: Main Index768582 -Node: Key Index859819 -Node: Command and Function Index912407 -Node: Variable Index947358 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/org-plus-contrib-20170407/org-compat.el b/elpa/org-plus-contrib-20170407/org-compat.el deleted file mode 100644 index 8106c5e2..00000000 --- a/elpa/org-plus-contrib-20170407/org-compat.el +++ /dev/null @@ -1,575 +0,0 @@ -;;; org-compat.el --- Compatibility Code for Older Emacsen -*- lexical-binding: t; -*- - -;; Copyright (C) 2004-2017 Free Software Foundation, Inc. - -;; Author: Carsten Dominik -;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org -;; -;; This file is part of GNU Emacs. -;; -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;;; Commentary: - -;; This file contains code needed for compatibility with older -;; versions of GNU Emacs. - -;;; Code: - -(require 'cl-lib) -(require 'org-macs) - -(declare-function org-at-table.el-p "org" (&optional table-type)) -(declare-function org-element-at-point "org-element" ()) -(declare-function org-element-type "org-element" (element)) -(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading)) -(declare-function org-link-set-parameters "org" (type &rest rest)) -(declare-function org-table-end (&optional table-type)) -(declare-function outline-next-heading "outline" ()) -(declare-function table--at-cell-p "table" (position &optional object at-column)) - -(defvar org-table-any-border-regexp) -(defvar org-table-dataline-regexp) -(defvar org-table-tab-recognizes-table.el) -(defvar org-table1-hline-regexp) - -;;; Emacs < 25.1 compatibility - -(when (< emacs-major-version 25) - (defalias 'outline-hide-entry 'hide-entry) - (defalias 'outline-hide-sublevels 'hide-sublevels) - (defalias 'outline-hide-subtree 'hide-subtree) - (defalias 'outline-show-all 'show-all) - (defalias 'outline-show-branches 'show-branches) - (defalias 'outline-show-children 'show-children) - (defalias 'outline-show-entry 'show-entry) - (defalias 'outline-show-subtree 'show-subtree) - (defalias 'xref-find-definitions 'find-tag) - (defalias 'format-message 'format) - (defalias 'gui-get-selection 'x-get-selection)) - -(unless (fboundp 'directory-name-p) - (defun directory-name-p (name) - "Return non-nil if NAME ends with a directory separator character." - (let ((len (length name)) - (lastc ?.)) - (if (> len 0) - (setq lastc (aref name (1- len)))) - (or (= lastc ?/) - (and (memq system-type '(windows-nt ms-dos)) - (= lastc ?\\)))))) - -(unless (fboundp 'directory-files-recursively) - (defun directory-files-recursively (dir regexp &optional include-directories) - "Return list of all files under DIR that have file names matching REGEXP. -This function works recursively. Files are returned in \"depth first\" -order, and files from each directory are sorted in alphabetical order. -Each file name appears in the returned list in its absolute form. -Optional argument INCLUDE-DIRECTORIES non-nil means also include in the -output directories whose names match REGEXP." - (let ((result nil) - (files nil) - ;; When DIR is "/", remote file names like "/method:" could - ;; also be offered. We shall suppress them. - (tramp-mode (and tramp-mode (file-remote-p (expand-file-name dir))))) - (dolist (file (sort (file-name-all-completions "" dir) - 'string<)) - (unless (member file '("./" "../")) - (if (directory-name-p file) - (let* ((leaf (substring file 0 (1- (length file)))) - (full-file (expand-file-name leaf dir))) - ;; Don't follow symlinks to other directories. - (unless (file-symlink-p full-file) - (setq result - (nconc result (directory-files-recursively - full-file regexp include-directories)))) - (when (and include-directories - (string-match regexp leaf)) - (setq result (nconc result (list full-file))))) - (when (string-match regexp file) - (push (expand-file-name file dir) files))))) - (nconc result (nreverse files))))) - - -;;; Obsolete aliases (remove them once the next major release is released). - -;;;; XEmacs compatibility, now removed. -(define-obsolete-function-alias 'org-activate-mark 'activate-mark) -(define-obsolete-function-alias 'org-add-hook 'add-hook "Org 9.0") -(define-obsolete-function-alias 'org-bound-and-true-p 'bound-and-true-p "Org 9.0") -(define-obsolete-function-alias 'org-decompose-region 'decompose-region "Org 9.0") -(define-obsolete-function-alias 'org-defvaralias 'defvaralias "Org 9.0") -(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "Org 9.0") -(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "Org 9.0") -(define-obsolete-function-alias 'org-float-time 'float-time "Org 9.0") -(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "Org 9.0") -(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "Org 9.0") -(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "Org 9.0") -(define-obsolete-function-alias 'org-looking-back 'looking-back "Org 9.0") -(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-no-properties "Org 9.0") -(define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0") -(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0") - -(defmacro org-re (s) - "Replace posix classes in regular expression S." - (declare (debug (form)) - (obsolete "you can safely remove it." "Org 9.0")) - s) - -;;;; Functions from cl-lib that Org used to have its own implementation of. -(define-obsolete-function-alias 'org-count 'cl-count "Org 9.0") -(define-obsolete-function-alias 'org-every 'cl-every "Org 9.0") -(define-obsolete-function-alias 'org-find-if 'cl-find-if "Org 9.0") -(define-obsolete-function-alias 'org-reduce 'cl-reduce "Org 9.0") -(define-obsolete-function-alias 'org-remove-if 'cl-remove-if "Org 9.0") -(define-obsolete-function-alias 'org-remove-if-not 'cl-remove-if-not "Org 9.0") -(define-obsolete-function-alias 'org-some 'cl-some "Org 9.0") -(define-obsolete-function-alias 'org-floor* 'cl-floor "Org 9.0") - -(defun org-sublist (list start end) - "Return a section of LIST, from START to END. -Counting starts at 1." - (cl-subseq list (1- start) end)) -(make-obsolete 'org-sublist - "use cl-subseq (note the 0-based counting)." - "Org 9.0") - - -;;;; Functions available since Emacs 24.3 -(define-obsolete-function-alias 'org-buffer-narrowed-p 'buffer-narrowed-p "Org 9.0") -(define-obsolete-function-alias 'org-called-interactively-p 'called-interactively-p "Org 9.0") -(define-obsolete-function-alias 'org-char-to-string 'char-to-string "Org 9.0") -(define-obsolete-function-alias 'org-delete-directory 'delete-directory "Org 9.0") -(define-obsolete-function-alias 'org-format-seconds 'format-seconds "Org 9.0") -(define-obsolete-function-alias 'org-link-escape-browser 'url-encode-url "Org 9.0") -(define-obsolete-function-alias 'org-no-warnings 'with-no-warnings "Org 9.0") -(define-obsolete-function-alias 'org-number-sequence 'number-sequence "Org 9.0") -(define-obsolete-function-alias 'org-pop-to-buffer-same-window 'pop-to-buffer-same-window "Org 9.0") -(define-obsolete-function-alias 'org-string-match-p 'string-match-p "Org 9.0") - -;;;; Functions and variables from previous releases now obsolete. -(define-obsolete-function-alias 'org-element-remove-indentation - 'org-remove-indentation "Org 9.0") -(define-obsolete-variable-alias 'org-latex-create-formula-image-program - 'org-preview-latex-default-process "Org 9.0") -(define-obsolete-variable-alias 'org-latex-preview-ltxpng-directory - 'org-preview-latex-image-directory "Org 9.0") -(define-obsolete-function-alias 'org-table-p 'org-at-table-p "Org 9.0") -(define-obsolete-function-alias 'org-on-heading-p 'org-at-heading-p "Org 9.0") -(define-obsolete-function-alias 'org-at-regexp-p 'org-in-regexp "Org 8.3") -(define-obsolete-function-alias 'org-image-file-name-regexp - 'image-file-name-regexp "Org 9.0") -(define-obsolete-function-alias 'org-completing-read-no-i - 'completing-read "Org 9.0") -(define-obsolete-function-alias 'org-icompleting-read - 'completing-read "Org 9.0") -(define-obsolete-function-alias 'org-iread-file-name 'read-file-name "Org 9.0") -(define-obsolete-function-alias 'org-days-to-time - 'org-time-stamp-to-now "Org 8.2") -(define-obsolete-variable-alias 'org-agenda-ignore-drawer-properties - 'org-agenda-ignore-properties "Org 9.0") -(define-obsolete-function-alias 'org-preview-latex-fragment - 'org-toggle-latex-fragment "Org 8.3") -(define-obsolete-function-alias 'org-export-get-genealogy - 'org-element-lineage "Org 9.0") -(define-obsolete-variable-alias 'org-latex-with-hyperref - 'org-latex-hyperref-template "Org 9.0") -(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "Org 9.0") -(define-obsolete-variable-alias 'org-export-htmlized-org-css-url - 'org-org-htmlized-css-url "Org 8.2") -(define-obsolete-function-alias 'org-list-parse-list 'org-list-to-lisp "Org 9.0") -(define-obsolete-function-alias 'org-agenda-todayp - 'org-agenda-today-p "Org 9.0") -(define-obsolete-function-alias 'org-babel-examplize-region - 'org-babel-examplify-region "Org 9.0") -(define-obsolete-variable-alias 'org-babel-capitalize-example-region-markers - 'org-babel-uppercase-example-markers "Org 9.1") - -(define-obsolete-function-alias 'org-babel-trim 'org-trim "Org 9.0") -(define-obsolete-variable-alias 'org-html-style 'org-html-head "24.4") -(define-obsolete-function-alias 'org-insert-columns-dblock - 'org-columns-insert-dblock "Org 9.0") -(define-obsolete-variable-alias 'org-export-babel-evaluate - 'org-export-use-babel "Org 9.1") - -(defun org-in-fixed-width-region-p () - "Non-nil if point in a fixed-width region." - (save-match-data - (eq 'fixed-width (org-element-type (org-element-at-point))))) -(make-obsolete 'org-in-fixed-width-region-p - "use `org-element' library" - "Org 9.0") - -(defun org-compatible-face (inherits specs) - "Make a compatible face specification. -If INHERITS is an existing face and if the Emacs version supports -it, just inherit the face. If INHERITS is not given and SPECS -is, use SPECS to define the face." - (declare (indent 1)) - (if (facep inherits) - (list (list t :inherit inherits)) - specs)) -(make-obsolete 'org-compatible-face "you can remove it." "Org 9.0") - -(defun org-add-link-type (type &optional follow export) - "Add a new TYPE link. -FOLLOW and EXPORT are two functions. - -FOLLOW should take the link path as the single argument and do whatever -is necessary to follow the link, for example find a file or display -a mail message. - -EXPORT should format the link path for export to one of the export formats. -It should be a function accepting three arguments: - - path the path of the link, the text after the prefix (like \"http:\") - desc the description of the link, if any - format the export format, a symbol like `html' or `latex' or `ascii'. - -The function may use the FORMAT information to return different values -depending on the format. The return value will be put literally into -the exported file. If the return value is nil, this means Org should -do what it normally does with links which do not have EXPORT defined. - -Org mode has a built-in default for exporting links. If you are happy with -this default, there is no need to define an export function for the link -type. For a simple example of an export function, see `org-bbdb.el'. - -If TYPE already exists, update it with the arguments. -See `org-link-parameters' for documentation on the other parameters." - (org-link-set-parameters type :follow follow :export export) - (message "Created %s link." type)) - -(make-obsolete 'org-add-link-type "use `org-link-set-parameters' instead." "Org 9.0") - -(defun org-table-recognize-table.el () - "If there is a table.el table nearby, recognize it and move into it." - (when (and org-table-tab-recognizes-table.el (org-at-table.el-p)) - (beginning-of-line) - (unless (or (looking-at org-table-dataline-regexp) - (not (looking-at org-table1-hline-regexp))) - (forward-line) - (when (looking-at org-table-any-border-regexp) - (forward-line -2))) - (if (re-search-forward "|" (org-table-end t) t) - (progn - (require 'table) - (if (table--at-cell-p (point)) t - (message "recognizing table.el table...") - (table-recognize-table) - (message "recognizing table.el table...done"))) - (error "This should not happen")))) - -;; Not used by Org core since commit 6d1e3082, Feb 2010. -(make-obsolete 'org-table-recognize-table.el - "please notify the org mailing list if you use this function." - "Org 9.0") - -(defun org-remove-angle-brackets (s) - (org-unbracket-string "<" ">" s)) -(make-obsolete 'org-remove-angle-brackets 'org-unbracket-string "Org 9.0") - -(defun org-remove-double-quotes (s) - (org-unbracket-string "\"" "\"" s)) -(make-obsolete 'org-remove-double-quotes 'org-unbracket-string "Org 9.0") - -(defcustom org-publish-sitemap-file-entry-format "%t" - "Format string for site-map file entry. -You could use brackets to delimit on what part the link will be. - -%t is the title. -%a is the author. -%d is the date formatted using `org-publish-sitemap-date-format'." - :group 'org-export-publish - :type 'string) -(make-obsolete-variable - 'org-publish-sitemap-file-entry-format - "set `:sitemap-format-entry' in `org-publish-project-alist' instead." - "Org 9.1") - -(defvar org-agenda-skip-regexp) -(defun org-agenda-skip-entry-when-regexp-matches () - "Check if the current entry contains match for `org-agenda-skip-regexp'. -If yes, it returns the end position of this entry, causing agenda commands -to skip the entry but continuing the search in the subtree. This is a -function that can be put into `org-agenda-skip-function' for the duration -of a command." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) - (let ((end (save-excursion (org-end-of-subtree t))) - skip) - (save-excursion - (setq skip (re-search-forward org-agenda-skip-regexp end t))) - (and skip end))) - -(defun org-agenda-skip-subtree-when-regexp-matches () - "Check if the current subtree contains match for `org-agenda-skip-regexp'. -If yes, it returns the end position of this tree, causing agenda commands -to skip this subtree. This is a function that can be put into -`org-agenda-skip-function' for the duration of a command." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) - (let ((end (save-excursion (org-end-of-subtree t))) - skip) - (save-excursion - (setq skip (re-search-forward org-agenda-skip-regexp end t))) - (and skip end))) - -(defun org-agenda-skip-entry-when-regexp-matches-in-subtree () - "Check if the current subtree contains match for `org-agenda-skip-regexp'. -If yes, it returns the end position of the current entry (NOT the tree), -causing agenda commands to skip the entry but continuing the search in -the subtree. This is a function that can be put into -`org-agenda-skip-function' for the duration of a command. An important -use of this function is for the stuck project list." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) - (let ((end (save-excursion (org-end-of-subtree t))) - (entry-end (save-excursion (outline-next-heading) (1- (point)))) - skip) - (save-excursion - (setq skip (re-search-forward org-agenda-skip-regexp end t))) - (and skip entry-end))) - -(define-obsolete-function-alias 'org-minutes-to-clocksum-string - 'org-duration-from-minutes "Org 9.1") - -(define-obsolete-function-alias 'org-hh:mm-string-to-minutes - 'org-duration-to-minutes "Org 9.1") - -(define-obsolete-function-alias 'org-duration-string-to-minutes - 'org-duration-to-minutes "Org 9.1") - -(make-obsolete-variable 'org-time-clocksum-format - "set `org-duration-format' instead." "Org 9.1") - -(make-obsolete-variable 'org-time-clocksum-use-fractional - "set `org-duration-format' instead." "Org 9.1") - -(make-obsolete-variable 'org-time-clocksum-fractional-format - "set `org-duration-format' instead." "Org 9.1") - -(make-obsolete-variable 'org-time-clocksum-use-effort-durations - "set `org-duration-units' instead." "Org 9.1") - - -;;;; Obsolete link types - -(eval-after-load 'org - '(progn - (org-link-set-parameters "file+emacs") ;since Org 9.0 - (org-link-set-parameters "file+sys"))) ;since Org 9.0 - - - -;;; Miscellaneous functions - -(defun org-version-check (version feature level) - (let* ((v1 (mapcar 'string-to-number (split-string version "[.]"))) - (v2 (mapcar 'string-to-number (split-string emacs-version "[.]"))) - (rmaj (or (nth 0 v1) 99)) - (rmin (or (nth 1 v1) 99)) - (rbld (or (nth 2 v1) 99)) - (maj (or (nth 0 v2) 0)) - (min (or (nth 1 v2) 0)) - (bld (or (nth 2 v2) 0))) - (if (or (< maj rmaj) - (and (= maj rmaj) - (< min rmin)) - (and (= maj rmaj) - (= min rmin) - (< bld rbld))) - (if (eq level :predicate) - ;; just return if we have the version - nil - (let ((msg (format "Emacs %s or greater is recommended for %s" - version feature))) - (display-warning 'org msg level) - t)) - t))) - -(defun org-get-x-clipboard (value) - "Get the value of the X or Windows clipboard." - (cond ((and (eq window-system 'x) - (fboundp 'gui-get-selection)) ;Silence byte-compiler. - (org-no-properties - (ignore-errors - (or (gui-get-selection value 'UTF8_STRING) - (gui-get-selection value 'COMPOUND_TEXT) - (gui-get-selection value 'STRING) - (gui-get-selection value 'TEXT))))) - ((and (eq window-system 'w32) (fboundp 'w32-get-clipboard-data)) - (w32-get-clipboard-data)))) - -(defun org-add-props (string plist &rest props) - "Add text properties to entire string, from beginning to end. -PLIST may be a list of properties, PROPS are individual properties and values -that will be added to PLIST. Returns the string that was modified." - (add-text-properties - 0 (length string) (if props (append plist props) plist) string) - string) -(put 'org-add-props 'lisp-indent-function 2) - -(defun org-fit-window-to-buffer (&optional window max-height min-height - shrink-only) - "Fit WINDOW to the buffer, but only if it is not a side-by-side window. -WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are -passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call -`shrink-window-if-larger-than-buffer' instead, the height limit is -ignored in this case." - (cond ((if (fboundp 'window-full-width-p) - (not (window-full-width-p window)) - ;; do nothing if another window would suffer - (> (frame-width) (window-width window)))) - ((and (fboundp 'fit-window-to-buffer) (not shrink-only)) - (fit-window-to-buffer window max-height min-height)) - ((fboundp 'shrink-window-if-larger-than-buffer) - (shrink-window-if-larger-than-buffer window))) - (or window (selected-window))) - -;; `set-transient-map' is only in Emacs >= 24.4 -(defalias 'org-set-transient-map - (if (fboundp 'set-transient-map) - 'set-transient-map - 'set-temporary-overlay-map)) - -;;; Region compatibility - -(defvar org-ignore-region nil - "Non-nil means temporarily disable the active region.") - -(defun org-region-active-p () - "Non-nil when the region active. -Unlike to `use-region-p', this function also checks -`org-ignore-region'." - (and (not org-ignore-region) (use-region-p))) - -(defun org-cursor-to-region-beginning () - (when (and (org-region-active-p) - (> (point) (region-beginning))) - (exchange-point-and-mark))) - -;;; Invisibility compatibility - -(defun org-remove-from-invisibility-spec (arg) - "Remove elements from `buffer-invisibility-spec'." - (if (fboundp 'remove-from-invisibility-spec) - (remove-from-invisibility-spec arg) - (if (consp buffer-invisibility-spec) - (setq buffer-invisibility-spec - (delete arg buffer-invisibility-spec))))) - -(defun org-in-invisibility-spec-p (arg) - "Is ARG a member of `buffer-invisibility-spec'?" - (if (consp buffer-invisibility-spec) - (member arg buffer-invisibility-spec))) - -(defun org-move-to-column (column &optional force _buffer) - "Move to column COLUMN. -Pass COLUMN and FORCE to `move-to-column'." - (let ((buffer-invisibility-spec - (if (listp buffer-invisibility-spec) - (remove '(org-filtered) buffer-invisibility-spec) - buffer-invisibility-spec))) - (move-to-column column force))) - -(defmacro org-find-library-dir (library) - `(file-name-directory (or (locate-library ,library) ""))) - -(defun org-count-lines (s) - "How many lines in string S?" - (let ((start 0) (n 1)) - (while (string-match "\n" s start) - (setq start (match-end 0) n (1+ n))) - (if (and (> (length s) 0) (= (aref s (1- (length s))) ?\n)) - (setq n (1- n))) - n)) - -(defun org-kill-new (string &rest args) - (remove-text-properties 0 (length string) '(line-prefix t wrap-prefix t) - string) - (apply 'kill-new string args)) - -;; `font-lock-ensure' is only available from 24.4.50 on -(defalias 'org-font-lock-ensure - (if (fboundp 'font-lock-ensure) - #'font-lock-ensure - (lambda (&optional _beg _end) - (with-no-warnings (font-lock-fontify-buffer))))) - -;; `file-local-name' was added in Emacs 26.1. -(defalias 'org-babel-local-file-name - (if (fboundp 'file-local-name) - 'file-local-name - (lambda (file) - "Return the local name component of FILE." - (or (file-remote-p file 'localname) file)))) - -(defmacro org-no-popups (&rest body) - "Suppress popup windows. -Let-bind some variables to nil around BODY to achieve the desired -effect, which variables to use depends on the Emacs version." - (if (org-version-check "24.2.50" "" :predicate) - `(let (pop-up-frames display-buffer-alist) - ,@body) - `(let (pop-up-frames special-display-buffer-names special-display-regexps special-display-function) - ,@body))) - -;;;###autoload -(defmacro org-check-version () - "Try very hard to provide sensible version strings." - (let* ((org-dir (org-find-library-dir "org")) - (org-version.el (concat org-dir "org-version.el")) - (org-fixup.el (concat org-dir "../mk/org-fixup.el"))) - (if (require 'org-version org-version.el 'noerror) - '(progn - (autoload 'org-release "org-version.el") - (autoload 'org-git-version "org-version.el")) - (if (require 'org-fixup org-fixup.el 'noerror) - '(org-fixup) - ;; provide fallback definitions and complain - (warn "Could not define org version correctly. Check installation!") - '(progn - (defun org-release () "N/A") - (defun org-git-version () "N/A !!check installation!!")))))) - -(defmacro org-with-silent-modifications (&rest body) - (if (fboundp 'with-silent-modifications) - `(with-silent-modifications ,@body) - `(org-unmodified ,@body))) -(def-edebug-spec org-with-silent-modifications (body)) - -;; Functions for Emacs < 24.4 compatibility -(defun org-define-error (name message) - "Define NAME as a new error signal. -MESSAGE is a string that will be output to the echo area if such -an error is signaled without being caught by a `condition-case'. -Implements `define-error' for older emacsen." - (if (fboundp 'define-error) (define-error name message) - (put name 'error-conditions - (copy-sequence (cons name (get 'error 'error-conditions)))))) - -(unless (fboundp 'string-suffix-p) - ;; From Emacs subr.el. - (defun string-suffix-p (suffix string &optional ignore-case) - "Return non-nil if SUFFIX is a suffix of STRING. -If IGNORE-CASE is non-nil, the comparison is done without paying -attention to case differences." - (let ((start-pos (- (length string) (length suffix)))) - (and (>= start-pos 0) - (eq t (compare-strings suffix nil nil - string start-pos nil ignore-case)))))) - -(provide 'org-compat) - -;;; org-compat.el ends here diff --git a/elpa/org-plus-contrib-20170407/org-gnus.el b/elpa/org-plus-contrib-20170407/org-gnus.el deleted file mode 100644 index b9d09895..00000000 --- a/elpa/org-plus-contrib-20170407/org-gnus.el +++ /dev/null @@ -1,295 +0,0 @@ -;;; org-gnus.el --- Support for Links to Gnus Groups and Messages -*- lexical-binding: t; -*- - -;; Copyright (C) 2004-2017 Free Software Foundation, Inc. - -;; Author: Carsten Dominik -;; Tassilo Horn -;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org -;; -;; This file is part of GNU Emacs. -;; -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;;; Commentary: - -;; This file implements links to Gnus groups and messages from within Org. -;; Org mode loads this module by default - if this is not what you want, -;; configure the variable `org-modules'. - -;;; Code: - -(require 'org) -(require 'gnus-util) -(eval-when-compile (require 'gnus-sum)) - -;; Declare external functions and variables - -(declare-function message-fetch-field "message" (header &optional not-all)) -(declare-function message-narrow-to-head-1 "message" nil) -(declare-function gnus-summary-last-subject "gnus-sum" nil) -(declare-function nnvirtual-map-article "nnvirtual" (article)) - -;; Customization variables - -(defvaralias 'org-usenet-links-prefer-google 'org-gnus-prefer-web-links) - -(defcustom org-gnus-prefer-web-links nil - "If non-nil, `org-store-link' creates web links to Google groups or Gmane. -\\When nil, Gnus will be used for such links. -Using a prefix argument to the command `\\[org-store-link]' (`org-store-link') -negates this setting for the duration of the command." - :group 'org-link-store - :type 'boolean) - -(defcustom org-gnus-nnimap-query-article-no-from-file nil - "If non-nil, `org-gnus-follow-link' will try to translate -Message-Ids to article numbers by querying the .overview file. -Normally, this translation is done by querying the IMAP server, -which is usually very fast. Unfortunately, some (maybe badly -configured) IMAP servers don't support this operation quickly. -So if following a link to a Gnus article takes ages, try setting -this variable to t." - :group 'org-link-store - :version "24.1" - :type 'boolean) - -(defcustom org-gnus-no-server nil - "Should Gnus be started using `gnus-no-server'?" - :group 'org-gnus - :version "24.4" - :package-version '(Org . "8.0") - :type 'boolean) - -;; Install the link type -(org-link-set-parameters "gnus" :follow #'org-gnus-open :store #'org-gnus-store-link) - -;; Implementation - -(defun org-gnus-nnimap-cached-article-number (group server message-id) - "Return cached article number (uid) of message in GROUP on SERVER. -MESSAGE-ID is the message-id header field that identifies the -message. If the uid is not cached, return nil." - (with-temp-buffer - (let ((nov (and (fboundp 'nnimap-group-overview-filename) - ;; nnimap-group-overview-filename was removed from - ;; Gnus in September 2010, and therefore should - ;; only be present in Emacs 23.1. - (nnimap-group-overview-filename group server)))) - (when (and nov (file-exists-p nov)) - (mm-insert-file-contents nov) - (set-buffer-modified-p nil) - (goto-char (point-min)) - (catch 'found - (while (search-forward message-id nil t) - (let ((hdr (split-string (thing-at-point 'line) "\t"))) - (if (string= (nth 4 hdr) message-id) - (throw 'found (nth 0 hdr)))))))))) - -(defun org-gnus-group-link (group) - "Create a link to the Gnus group GROUP. -If GROUP is a newsgroup and `org-gnus-prefer-web-links' is -non-nil, create a link to groups.google.com or gmane.org. -Otherwise create a link to the group inside Gnus. - -If `org-store-link' was called with a prefix arg the meaning of -`org-gnus-prefer-web-links' is reversed." - (let ((unprefixed-group (replace-regexp-in-string "^[^:]+:" "" group))) - (if (and (string-prefix-p "nntp" group) ;; Only for nntp groups - (org-xor current-prefix-arg - org-gnus-prefer-web-links)) - (concat (if (string-match "gmane" unprefixed-group) - "http://news.gmane.org/" - "http://groups.google.com/group/") - unprefixed-group) - (concat "gnus:" group)))) - -(defun org-gnus-article-link (group newsgroups message-id x-no-archive) - "Create a link to a Gnus article. -The article is specified by its MESSAGE-ID. Additional -parameters are the Gnus GROUP, the NEWSGROUPS the article was -posted to and the X-NO-ARCHIVE header value of that article. - -If GROUP is a newsgroup and `org-gnus-prefer-web-links' is -non-nil, create a link to groups.google.com or gmane.org. -Otherwise create a link to the article inside Gnus. - -If `org-store-link' was called with a prefix arg the meaning of -`org-gnus-prefer-web-links' is reversed." - (if (and (org-xor current-prefix-arg org-gnus-prefer-web-links) - newsgroups ;; Make web links only for nntp groups - (not x-no-archive)) ;; and if X-No-Archive isn't set. - (format (if (string-match "gmane\\." newsgroups) - "http://mid.gmane.org/%s" - "http://groups.google.com/groups/search?as_umsgid=%s") - (org-fixup-message-id-for-http message-id)) - (concat "gnus:" group "#" message-id))) - -(defun org-gnus-store-link () - "Store a link to a Gnus folder or message." - (cond - ((eq major-mode 'gnus-group-mode) - (let* ((group (cond ((fboundp 'gnus-group-group-name) ; depending on Gnus - (gnus-group-group-name)) ; version - ((fboundp 'gnus-group-name) - (gnus-group-name)) - (t "???"))) - desc link) - (when group - (org-store-link-props :type "gnus" :group group) - (setq desc (org-gnus-group-link group) - link desc) - (org-add-link-props :link link :description desc) - link))) - - ((memq major-mode '(gnus-summary-mode gnus-article-mode)) - (let* ((group gnus-newsgroup-name) - (header (with-current-buffer gnus-summary-buffer - (gnus-summary-article-header))) - (from (mail-header-from header)) - (message-id (org-unbracket-string "<" ">" (mail-header-id header))) - (date (org-trim (mail-header-date header))) - (subject (copy-sequence (mail-header-subject header))) - (to (cdr (assq 'To (mail-header-extra header)))) - newsgroups x-no-archive desc link) - (cl-case (car (gnus-find-method-for-group gnus-newsgroup-name)) - (nnvirtual - (setq group (car (nnvirtual-map-article - (gnus-summary-article-number))))) - (nnir - (setq group (nnir-article-group (gnus-summary-article-number))))) - ;; Remove text properties of subject string to avoid Emacs bug - ;; #3506 - (set-text-properties 0 (length subject) nil subject) - - ;; Fetching an article is an expensive operation; newsgroup and - ;; x-no-archive are only needed for web links. - (when (org-xor current-prefix-arg org-gnus-prefer-web-links) - ;; Make sure the original article buffer is up-to-date - (save-window-excursion (gnus-summary-select-article)) - (setq to (or to (gnus-fetch-original-field "To")) - newsgroups (gnus-fetch-original-field "Newsgroups") - x-no-archive (gnus-fetch-original-field "x-no-archive"))) - (org-store-link-props :type "gnus" :from from :date date :subject subject - :message-id message-id :group group :to to) - (setq desc (org-email-link-description) - link (org-gnus-article-link - group newsgroups message-id x-no-archive)) - (org-add-link-props :link link :description desc) - link)) - ((eq major-mode 'message-mode) - (setq org-store-link-plist nil) ; reset - (save-excursion - (save-restriction - (message-narrow-to-headers) - (and (not (message-fetch-field "Message-ID")) - (message-generate-headers '(Message-ID))) - (goto-char (point-min)) - (re-search-forward "^Message-ID: *.*$" nil t) - (put-text-property (match-beginning 0) (match-end 0) 'message-deletable nil) - (let ((gcc (car (last - (message-unquote-tokens - (message-tokenize-header (mail-fetch-field "gcc" nil t) " ,"))))) - (id (org-unbracket-string "<" ">" (mail-fetch-field "Message-ID"))) - (to (mail-fetch-field "To")) - (from (mail-fetch-field "From")) - (subject (mail-fetch-field "Subject")) - desc link - newsgroup xarchive) ; those are always nil for gcc - (and (not gcc) - (error "Can not create link: No Gcc header found")) - (org-store-link-props :type "gnus" :from from :subject subject - :message-id id :group gcc :to to) - (setq desc (org-email-link-description) - link (org-gnus-article-link - gcc newsgroup id xarchive)) - (org-add-link-props :link link :description desc) - link)))))) - -(defun org-gnus-open-nntp (path) - "Follow the nntp: link specified by PATH." - (let* ((spec (split-string path "/")) - (server (split-string (nth 2 spec) "@")) - (group (nth 3 spec)) - (article (nth 4 spec))) - (org-gnus-follow-link - (format "nntp+%s:%s" (or (cdr server) (car server)) group) - article))) - -(defun org-gnus-open (path) - "Follow the Gnus message or folder link specified by PATH." - (let (group article) - (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) - (error "Error in Gnus link")) - (setq group (match-string 1 path) - article (match-string 3 path)) - (when group - (setq group (org-no-properties group))) - (when article - (setq article (org-no-properties article))) - (org-gnus-follow-link group article))) - -(defun org-gnus-follow-link (&optional group article) - "Follow a Gnus link to GROUP and ARTICLE." - (require 'gnus) - (funcall (cdr (assq 'gnus org-link-frame-setup))) - (if gnus-other-frame-object (select-frame gnus-other-frame-object)) - (setq group (org-no-properties group)) - (setq article (org-no-properties article)) - (cond ((and group article) - (gnus-activate-group group) - (condition-case nil - (let* ((method (gnus-find-method-for-group group)) - (backend (car method)) - (server (cadr method))) - (cond - ((eq backend 'nndoc) - (if (gnus-group-read-group t nil group) - (gnus-summary-goto-article article nil t) - (message "Couldn't follow gnus link. %s" - "The summary couldn't be opened."))) - (t - (let ((articles 1) - group-opened) - (when (and (eq backend 'nnimap) - org-gnus-nnimap-query-article-no-from-file) - (setq article - (or (org-gnus-nnimap-cached-article-number - (nth 1 (split-string group ":")) - server (concat "<" article ">")) article))) - (while (and (not group-opened) - ;; stop on integer overflows - (> articles 0)) - (setq group-opened (gnus-group-read-group - articles t group) - articles (if (< articles 16) - (1+ articles) - (* articles 2)))) - (if group-opened - (gnus-summary-goto-article article nil t) - (message "Couldn't follow gnus link. %s" - "The summary couldn't be opened.")))))) - (quit (message "Couldn't follow gnus link. %s" - "The linked group is empty.")))) - (group (gnus-group-jump-to-group group)))) - -(defun org-gnus-no-new-news () - "Like `\\[gnus]' but doesn't check for new news." - (if (not (gnus-alive-p)) (if org-gnus-no-server (gnus-no-server) (gnus)))) - -(provide 'org-gnus) - - -;;; org-gnus.el ends here diff --git a/elpa/org-plus-contrib-20170407/org-index.el b/elpa/org-plus-contrib-20170407/org-index.el deleted file mode 100644 index 8742b45d..00000000 --- a/elpa/org-plus-contrib-20170407/org-index.el +++ /dev/null @@ -1,3178 +0,0 @@ -;;; org-index.el --- A personal adaptive index for org - -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. - -;; Author: Marc Ihm -;; Version: 5.3.0 -;; Keywords: outlines index - -;; This file is not part of GNU Emacs. - -;;; License: - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Purpose: -;; -;; Fast search for selected org nodes and things outside of org. -;; -;; org-index creates and updates an index table with keywords; each line -;; either points to a heading in org, references something outside or -;; carries a snippet of text to yank. When searching the index, the set -;; of matching lines is updated with every keystroke; results are sorted -;; by usage count and date, so that frequently used entries appear first -;; in the list of results. -;; -;; References are decorated numbers (e.g. 'R237' or '--455--'); they are -;; well suited to be used outside of org, e.g. in folder names, ticket -;; systems or on printed documents. -;; -;; On first invocation org-index will assist you in creating the index -;; table. -;; -;; To start using your index, invoke subcommands 'add', 'ref' and 'yank' -;; to create entries and 'occur' to find them. -;; -;; -;; Setup: -;; -;; - Place this file in a directory of your load-path, -;; e.g. org-mode/contrib/lisp. -;; -;; - Add these lines to your .emacs: -;; -;; (require 'org-index) -;; -;; - Restart your Emacs to make this effective. -;; -;; - Invoke `org-index'; on first run it will assist in creating your -;; index table. -;; -;; - Optionally invoke `M-x org-customize', group 'Org Index', to tune -;; some settings, e.g. the global prefix key 'C-c i'. -;; -;; -;; Further information: -;; -;; - Watch the screencast at http://2484.de/org-index.html. -;; -;; - See the documentation of `org-index', which can also be read by -;; invoking `org-index' and choosing the command help or '?'. -;; -;; -;; Updates: -;; -;; The latest published version of this file can always be found at: -;; -;; http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-index.el;hb=HEAD -;; -;; Development version under: -;; -;; https://github.com/marcIhm/org-index - -;;; Change Log: - -;; [2017-03-26 Su] Version 5.3.0 -;; - Focused can now be on a list of nodes (instead of a single one) -;; - Cleaned up undeclared dependencies -;; -;; [2017-02-18 Sa] Version 5.2.3 -;; - New command 'focus' -;; - Speeded up org-index--parse-table with the stored property "max-ref" -;; - Speeded up org-index--on with search -;; - Added org-index-prepare-when-idle -;; - Fixed compatibility issue with emacs 24 (font-lock-ensure) -;; - Added more customizations -;; - Bugfixes -;; -;; [2016-10-19 We] Version 5.1.4 -;; - Bugfixes -;; -;; [2016-08-26 Fr] Version 5.1.3 -;; - Offering help during query for subcommands -;; - Removed org-index-default-keybindings -;; - Renamed subcommand multi-occur to find-ref -;; - Subcommands add needs no longer be invoked from heading -;; - Many Bugfixes -;; -;; [2015-12-29 Tu] Version 5.0.2 -;; - New commands yank, column and edit -;; - New column tags -;; - All columns are now required -;; - References are now optional -;; - Subcommand enter has been renamed to index -;; - Subcommands kill and edit can be invoked from an occur buffer -;; - Many Bugfixes -;; - Added link to screencast -;; -;; [2015-08-20 Th] Version 4.3.0 -;; - Configuration is done now via standard customize -;; - New sorting strategy 'mixed' -;; - Silenced some compiler warnings -;; -;; [2015-03-18 We] Version 4.2.1 -;; - No garbage in kill-ring -;; - No recentering after add -;; -;; [2015-03-08 Su] Version 4.2.0 -;; - Reference numbers for subcommands can be passed as a prefix argument -;; - New variable org-index-default-keybindings-list with a list of -;; default keybindings for org-index-default-keybindings -;; - Added new column level -;; - removed flags get-category-on-add and get-heading-on-add -;; -;; [2015-02-26 Th] to [2015-03-05 Th] Version 4.0.0 to 4.1.2 -;; - Removed command "leave"; rather go back with org-mark-ring-goto -;; - Renamed column "link" to "id" -;; - Added maintainance options to find duplicate rows, to check ids, -;; update index or remove property org-index-ref from nodes -;; - Shortened versin history -;; -;; [2014-12-08 Mo] to [2015-01-31 Sa] Version 3.0.0 to 3.2.0: -;; - Complete sorting of index only occurs in idle-timer -;; - New command "maintain" with some subcommands -;; - Rewrote command "occur" with overlays in an indirect buffer -;; - Command "add" updates index, if node is already present -;; - New commands "add" and "delete" to easily add and remove -;; the current node to or from your index. -;; - New command "example" to create an example index. -;; - Several new flags that are explained within index node. -;; - Removed commands "reuse", "missing", "put", "goto", -;; "update", "link", "fill", "unhighlight" -;; - New function `org-index-default-keybindings' -;; -;; [2012-12-07 Fr] to [2014-04-26 Sa] Version 2.0.0 to 2.4.3: -;; - New functions org-index-new-line and org-index-get-line -;; offer access to org-index from other lisp programs -;; - Regression tests with ert -;; - Renamed from "org-favtable" to "org-index" -;; - Added an assistant to set up the index table -;; - occur is now incremental, searching as you type -;; - Integrated with org-mark-ring-goto -;; - Added full support for ids -;; - Renamed the package from "org-reftable" to "org-favtable" -;; - Additional columns are required (e.g. "link"). Error messages will -;; guide you -;; - Ask user explicitly, which command to invoke -;; - Renamed the package from "org-refer-by-number" to "org-reftable" -;; -;; [2011-12-10 Sa] to [2012-09-22 Sa] Version Version 1.2.0 to 1.5.0: -;; - New command "sort" to sort a buffer or region by reference number -;; - New commands "highlight" and "unhighlight" to mark references -;; - New command "head" to find a headline with a reference number -;; - New commands occur and multi-occur -;; - Started this Change Log - -;;; Code: - -(require 'org-table) -(require 'org-id) -(require 'cl-lib) -(require 'widget) - -;; Version of this package -(defvar org-index-version "5.3.0" "Version of `org-index', format is major.minor.bugfix, where \"major\" are incompatible changes and \"minor\" are new features.") - -;; customizable options -(defgroup org-index nil - "Options concerning the optional index for org." - :tag "Org Index" - :group 'org) - -(defcustom org-index-id nil - "Id of the Org-mode node, which contains the index table." - :group 'org-index) - -(defcustom org-index-sort-by 'mixed - "Strategy for sorting index table (and whence entries in occur). -Valid values are: - -last-access Sort index by date and time of last access; show - more recent entries first. -count Sort by usage count; more often used entries first. -mixed First, show all index entries, which have been - used today; sort them by last access. Then show - older entries sorted by usage count." - :group 'org-index - :set (lambda (s v) - (set-default s v) - (if (and org-index-id - org-index--buffer - (functionp 'org-index--sort-silent)) - (org-index--sort-silent))) - :initialize 'custom-initialize-default - :type '(choice - (const last-accessed) - (const count) - (const mixed))) - -(defcustom org-index-dispatch-key "i" - "Key to invoke ‘org-index-dispatch’, which is the central entry function for ‘org-index’." - :group 'org-index - :initialize 'custom-initialize-set - :set (lambda (var val) - (set-default var val) - (global-set-key org-index-dispatch-key 'org-index-dispatch)) - :type 'key-sequence) - -(defcustom org-index-idle-delay 68 - "Delay in seconds after which buffer will sorted or fontified when Emacs is idle." - :group 'org-index - :type 'integer) - -(defcustom org-index-prepare-when-idle nil - "Fontify and sort index-table when idle to make first call faster. -You only need this if your index has grown so large, that first -invocation of `org-index' needs a noticable amount of time." - :group 'org-index - :initialize 'custom-initialize-set - :set (lambda (var val) - (set-default var val) - (when val - (setq org-index--align-interactive 200) - (run-with-idle-timer org-index-idle-delay nil 'org-index--idle-prepare))) - :type 'boolean) - -(defcustom org-index-yank-after-add 'ref - "Specifies which column should be yanked after adding a new index row. -Valid values are some columns of index table." - :group 'org-index - :type '(choice - (const ref) - (const category) - (const keywords))) - -(defcustom org-index-copy-heading-to-keywords t - "When adding a new node to index: Copy heading to keywords-column ?" - :group 'org-index - :type '(choice (const :tag "Yes" t) - (const :tag "No" nil))) - -(defcustom org-index-strip-ref-and-date-from-heading t - "When adding a node to index: strip leading ref or timestamps ? - -This can be useful, if you have the habit of adding refs and -dates to the start of your headings; then, if you change your -heading and want to update your index, you do not need to remove -those pieces." - :group 'org-index - :type '(choice (const :tag "Yes" t) - (const :tag "No" nil))) - -(defcustom org-index-edit-on-add '(category keywords) - "List of columns to edit when adding a new row." - :group 'org-index - :type '(repeat (choice - (const category) - (const keywords)))) - -(defcustom org-index-edit-on-yank '(keywords yank) - "List of columns to edit when adding new text to yank." - :group 'org-index - :type '(repeat (choice - (const yank) - (const category) - (const keywords)))) - -(defcustom org-index-edit-on-ref '(category keywords) - "List of columns to edit when adding new ref." - :group 'org-index - :type '(repeat (choice - (const category) - (const keywords)))) - -;; Variables to hold the configuration of the index table -(defvar org-index--maxrefnum nil "Maximum number from reference table, e.g. 153.") -(defvar org-index--head nil "Header before number (e.g. 'R').") -(defvar org-index--tail nil "Tail after number (e.g. '}' or ')'.") -(defvar org-index--numcols nil "Number of columns in index table.") -(defvar org-index--ref-regex nil "Regular expression to match a reference.") -(defvar org-index--ref-format nil "Format, that can print a reference.") -(defvar org-index--columns nil "Columns of index-table.") -(defvar org-index--buffer nil "Buffer of index table.") -(defvar org-index--point nil "Position at start of headline of index table.") -(defvar org-index--below-hline nil "Position of first cell in first line below hline.") -(defvar org-index--saved-positions nil "Saved positions within current buffer and index buffer; filled by ‘org-index--save-positions’.") -(defvar org-index--headings nil "Headlines of index-table as a string.") -(defvar org-index--headings-visible nil "Visible part of headlines of index-table as a string.") -(defvar org-index--ids-focused-nodes nil "Ids of focused node (if any).") -(defvar org-index--id-last-goto-focus nil "Id of last node, that has been jumped to.") - -;; Variables to hold context and state -(defvar org-index--last-fingerprint nil "Fingerprint of last line created.") -(defvar org-index--category-before nil "Category of node before.") -(defvar org-index--active-region nil "Active region, initially. I.e. what has been marked.") -(defvar org-index--below-cursor nil "Word below cursor.") -(defvar org-index--within-index-node nil "True, if we are within node of the index table.") -(defvar org-index--within-occur nil "True, if we are within the occur-buffer.") -(defvar org-index--message-text nil "Text that was issued as an explanation; helpful for regression tests.") -(defvar org-index--occur-help-text nil "Text for help in occur buffer.") -(defvar org-index--occur-help-overlay nil "Overlay for help in occur buffer.") -(defvar org-index--occur-stack nil "Stack with overlays for hiding lines.") -(defvar org-index--occur-tail-overlay nil "Overlay to cover invisible lines.") -(defvar org-index--occur-lines-collected 0 "Number of lines collected in occur buffer; helpful for tests.") -(defvar org-index--last-sort-assumed nil "Last column, the index has been sorted after (best guess).") -(defvar org-index--sort-timer nil "Timer to sort index in correct order.") -(defvar org-index--aligned 0 "For this Emacs session: remember number of table lines aligned.") -(defvar org-index--align-interactive most-positive-fixnum "Number of rows to align in ‘org-index--parse-table’.") -(defvar org-index--edit-widgets nil "List of widgets used to edit.") -(defvar org-index--context-index nil "Position and line used for index in edit buffer.") -(defvar org-index--context-occur nil "Position and line used for occur in edit buffer.") -(defvar org-index--context-node nil "Buffer and position for node in edit buffer.") -(defvar org-index--short-help-buffer-name "*org-index commands*" "Name of buffer to display short help.") -(defvar org-index--display-short-help nil "True, if short help should be displayed.") -(defvar org-index--short-help-displayed nil "True, if short help message has been displayed.") -(defvar org-index--minibuffer-saved-key nil "Temporarily save entry of minibuffer keymap.") - -;; static information for this program package -(defconst org-index--commands '(occur add kill head ping index ref yank column edit help short-help focus set-focus example sort find-ref highlight maintain) "List of commands available.") -(defconst org-index--valid-headings '(ref id created last-accessed count keywords category level yank tags) "All valid headings.") -(defconst org-index--occur-buffer-name "*org-index-occur*" "Name of occur buffer.") -(defconst org-index--edit-buffer-name "*org-index-edit*" "Name of edit buffer.") -(defvar org-index--short-help-text nil "Cache for result of `org-index--get-short-help-text.") -(defvar org-index--shortcut-chars nil "Cache for result of `org-index--get-shortcut-chars.") - - -(defmacro org-index--on (column value &rest body) - "Execute the forms in BODY with point on index line whose COLUMN is VALUE. -The value returned is the value of the last form in BODY or nil, -if VALUE cannot be found." - (declare (indent 2) (debug t)) - (let ((pointvar (make-symbol "point")) ; avoid clash with same-named variables in body - (foundvar (make-symbol "found")) - (retvar (make-symbol "ret"))) - `(save-current-buffer - (let ((,pointvar (point)) - ,foundvar - ,retvar) - - (set-buffer org-index--buffer) - - (setq ,foundvar (org-index--go ,column ,value)) - (when ,foundvar - (setq ,retvar (progn ,@body))) - - (goto-char ,pointvar) - - ,retvar)))) - - -(defun org-index (&optional command search-ref arg) - "Fast search-index for selected org nodes and things outside of org. - -This function creates and updates an index table with keywords; -each line either points to a heading in org, references something -outside or carries a snippet of text to yank. The index table is -searched for keywords by means of an incremental occur; results -are sorted by usage count and date, so that frequently used -entries appear first. - -References are decorated numbers (e.g. 'R237' or '--455--'); they are -well suited to be used outside of org, e.g. in folder names, ticket -systems or on printed documents. - -On first invocation this function will help to create a dedicated node -for its index table. - -To start building up your index, use subcommands 'add', 'ref' and -'yank' to create entries and use 'occur' to find them. - -This is version 5.3.0 of org-index.el. - - -The function `org-index' is the only interactive function of this -package and its main entry point; it will present you with a list -of subcommands to choose from: - -\(Note the one-letter shortcuts, e.g. [o]; used like `\\[org-index-dispatch] o'.) - - occur: [o] Incrementally show matching lines from index. - Result is updated after every keystroke. You may enter a - list of words seperated by space or comma (`,'), to select - lines that contain all of the given words. - - add: [a] Add the current node to index. - So that (e.g.) it can be found through the subcommand - 'occur'. Update index, if node is already present. - - kill: [k] Kill (delete) the current node from index. - Can be invoked from index, from occur or from a headline. - - head: [h] Search for heading, by ref or from index line. - If invoked from within index table, go to associated - node (if any), otherwise ask for ref to search. - - index: [i] Enter index table and maybe go to a specific reference. - Use `org-mark-ring-goto' (\\[org-mark-ring-goto]) to go back. - - ping: [p] Echo line from index table for current node. - If current node is not in index, than search among its - parents. - - ref: [r] Create a new index line with a reference. - This line will not be associated with a node. - - yank: [y] Store a new string, that can be yanked from occur. - The index line will not be associated with a node. - - column: [c] From within index table: read char and jump to column. - Shortcut for column movement; stays within one index line. - - edit: [e] Present current line in edit buffer. - Can be invoked from index, from occur or from a headline. - - help: Show complete help text of `org-index'. - - focus: [f] Return to first focused node; repeat to see them all. - With prefix: reverse order. You Need to set-focus before. - The focused nodes are kept in a short list and can be found - by hitting a single key; they need not be part of the index - though. This can be useful, if you work in one or few nodes, - but make frequent excursions to others, which are part of the - index. - - set-focus: [F] Set focus to current node, with prefix: append. - To truncate the list of focused nodes, just focus on a single - node; to remove current node from focus list supply a double - prefix. - - short-help: [?] Show one-line description of each subcommand. - I.e. show this list but only first sentence each. - - example: Create an example index, that will not be saved. - May serve as an example. - - sort: Sort lines in index, in region or buffer. - Region or buffer can be sorted by contained reference; Index - by count, reference or last access. - - find-ref: Search for given reference in all org-buffers. - A wrapper to employ Emacs standard `multi-occur' function; - asks for reference. - - highlight: Highlight or unhighlight all references. - Operates on active region or whole buffer. Call with prefix - argument (`C-u') to remove highlights. - - maintain: Index maintainance. - Offers some choices to check, update or fix your index. - -If you invoke `org-index' for the first time, an assistant will be -invoked, that helps you to create your own index. - -Invoke `org-customize' to tweak the behaviour of `org-index'. - -This includes the global key `org-index-dispatch-key' to invoke -the most important subcommands with one additional key. - -A numeric prefix argument is used as a reference number for -commands, that need one (e.g. 'head') or to modify their -behaviour (e.g. 'focus'). - -Use from elisp: Optional argument COMMAND is a symbol naming the -command to execute. SEARCH-REF specifies a reference to search -for, if needed. ARG allows passing in a prefix argument as in -interactive calls." - - (interactive "i\ni\nP") - - (let (search-id ; id to search for - search-fingerprint ; fingerprint to search for - sort-what ; sort what ? - kill-new-text ; text that will be appended to kill ring - message-text) ; text that will be issued as an explanation - - (catch 'new-index - - ;; - ;; Initialize and parse - ;; - - ;; creates index table, if necessary - (org-index--verify-id) - - ;; Get configuration of index table - (org-index--parse-table org-index--align-interactive t) - - ;; store context information - (org-index--retrieve-context) - - - ;; - ;; Arrange for proper sorting of index - ;; - - ;; lets assume, that it has been sorted this way (we try hard to make sure) - (unless org-index--last-sort-assumed (setq org-index--last-sort-assumed org-index-sort-by)) - ;; rearrange for index beeing sorted into default sort order after 300 secs of idle time - (unless org-index--sort-timer - (setq org-index--sort-timer - (run-with-idle-timer org-index-idle-delay t 'org-index--sort-silent))) - - - ;; - ;; Find out, what we are supposed to do - ;; - - ;; Check or read command - (if (and command (not (eq command 'short-help))) - (unless (memq command org-index--commands) - (error "Unknown command '%s' passed as argument, valid choices are any of these symbols: %s" - command (mapconcat 'symbol-name org-index--commands ","))) - - ;; read command; if requested display help in read-loop - (setq org-index--display-short-help (eq command 'short-help)) - (setq command (org-index--read-command)) - (setq org-index--display-short-help nil)) - - ;; - ;; Get search string, if required; process possible sources one after - ;; another (lisp argument, prefix argument, user input). - ;; - - ;; Try prefix, if no lisp argument given - (if (and (not search-ref) - (numberp arg)) - (setq search-ref (format "%s%d%s" org-index--head arg org-index--tail))) - - ;; These actions really need a search string and may even prompt for it - (when (memq command '(index head find-ref)) - - ;; search from surrounding text ? - (unless search-ref - (if org-index--within-index-node - - (if (org-at-table-p) - (setq search-ref (org-index--get-or-set-field 'ref))) - - (if (and org-index--below-cursor - (string-match (concat "\\(" org-index--ref-regex "\\)") - org-index--below-cursor)) - (setq search-ref (match-string 1 org-index--below-cursor))))) - - ;; If we still do not have a search string, ask user explicitly - (unless search-ref - (if (eq command 'index) - (let ((r (org-index--read-search-for-index))) - (setq search-ref (cl-first r)) - (setq search-id (cl-second r)) - (setq search-fingerprint (cl-third r))) - (unless (and (eq command 'head) - org-index--within-index-node - (org-at-table-p)) - (setq search-ref (read-from-minibuffer "Search reference number: "))))) - - ;; Clean up search string - (when search-ref - (setq search-ref (org-trim search-ref)) - (if (string-match "^[0-9]+$" search-ref) - (setq search-ref (concat org-index--head search-ref org-index--tail))) - (if (string= search-ref "") (setq search-ref nil))) - - (if (and (not search-ref) - (not (eq command 'index)) - (not (and (eq command 'head) - org-index--within-index-node - (org-at-table-p)))) - (error "Command %s needs a reference number" command))) - - - ;; - ;; Command sort needs to know in advance, what to sort for - ;; - - (when (eq command 'sort) - (setq sort-what (intern (org-completing-read "You may sort:\n - index : your index table by various columns\n - region : the active region by contained reference\n - buffer : the whole current buffer\nPlease choose what to sort: " (list "index" "region" "buffer") nil t)))) - - - ;; - ;; Enter table - ;; - - ;; Arrange for beeing able to return - (when (and (memq command '(occur head index example sort maintain focus)) - (not (string= (buffer-name) org-index--occur-buffer-name))) - (org-mark-ring-push)) - - ;; These commands will leave user in index table after they are finished - (when (or (memq command '(index maintain)) - (and (eq command 'sort) - (eq sort-what 'index))) - - (pop-to-buffer-same-window org-index--buffer) - (goto-char org-index--point) - (org-index--unfold-buffer)) - - - ;; - ;; Actually do, what is requested - ;; - - (cond - - ((eq command 'help) - - ;; bring up help-buffer for this function - (describe-function 'org-index)) - - - ((eq command 'short-help) - - (org-index--display-short-help)) - - - ((eq command 'find-ref) - - ;; Construct list of all org-buffers - (let (org-buffers) - (dolist (buff (buffer-list)) - (set-buffer buff) - (if (string= major-mode "org-mode") - (setq org-buffers (cons buff org-buffers)))) - - ;; Do multi-occur - (multi-occur org-buffers (org-index--make-guarded-search search-ref)) - - ;; Present results - (if (get-buffer "*Occur*") - (progn - (setq message-text (format "Found '%s'" search-ref)) - (other-window 1) - (toggle-truncate-lines 1)) - (setq message-text (format "Did not find '%s'" search-ref))))) - - - ((eq command 'add) - - (let ((r (org-index--do-add-or-update (if (equal arg '(4)) t nil) - (if (numberp arg) arg nil)))) - (setq message-text (car r)) - (setq kill-new-text (cdr r)))) - - - ((eq command 'kill) - (setq message-text (org-index--do-kill))) - - - ((eq command 'head) - - (if (and org-index--within-index-node - (org-at-table-p)) - (setq search-id (org-index--get-or-set-field 'id))) - - (if (and (not search-id) search-ref) - (setq search-id (org-index--id-from-ref search-ref))) - - (setq message-text - (if search-id - (org-index--find-id search-id) - "Current line has no id"))) - - - ((eq command 'index) - - (goto-char org-index--below-hline) - - (setq message-text - - (if search-ref - (if (org-index--go 'ref search-ref) - (progn - (org-index--update-current-line) - (org-table-goto-column (org-index--column-num 'ref)) - (format "Found index line '%s'" search-ref)) - (format "Did not find index line with reference '%s'" search-ref)) - - (if search-id - (if (org-index--go 'id search-id) - (progn - (org-index--update-current-line) - (org-table-goto-column (org-index--column-num 'ref)) - (format "Found index line '%s'" (org-index--get-or-set-field 'ref))) - (format "Did not find index line with id '%s'" search-id)) - - (if search-fingerprint - (if (org-index--go 'fingerprint org-index--last-fingerprint) - (progn - (org-index--update-current-line) - (beginning-of-line) - (format "Found latest index line")) - (format "Did not find index line")) - - ;; simply go into table - "At index table")))) - - (recenter)) - - - ((eq command 'ping) - - (let ((moved-up 0) id info reached-top done) - - (unless (string= major-mode "org-mode") (error "No node at point")) - ;; take id from current node or reference - (setq id (if search-ref - (org-index--id-from-ref search-ref) - (org-id-get))) - - ;; move up until we find a node in index - (save-excursion - (outline-back-to-heading) - (while (not done) - (if id - (setq info (org-index--on 'id id - (mapcar (lambda (x) (org-index--get-or-set-field x)) - (list 'keywords 'count 'created 'last-accessed 'category 'ref))))) - - (setq reached-top (= (org-outline-level) 1)) - - (if (or info reached-top) - (setq done t) - (outline-up-heading 1 t) - (cl-incf moved-up)) - - (setq id (org-id-get)))) - - (if info - (progn - (setq message-text - (apply 'format - (append (list "'%s'%s has been accessed %s times between %s and %s; category is '%s', reference is '%s'" - (pop info) - (if (> moved-up 0) (format " (parent node, %d level up)" moved-up) "")) - info))) - (setq kill-new-text (car (last info)))) - (setq message-text "Neither this node nor any of its parents is part of index")))) - - - ((eq command 'occur) - - (set-buffer org-index--buffer) - (org-index--do-occur)) - - - ((eq command 'ref) - - (let (args newref) - - (setq args (org-index--collect-values-from-user org-index-edit-on-ref)) - (setq newref (org-index--get-save-maxref)) - (setq args (plist-put args 'ref newref)) - (apply 'org-index--do-new-line args) - - (setq kill-new-text newref) - - (setq message-text (format "Added new row with ref '%s'" newref)))) - - - ((eq command 'yank) - - (let (args) - - (setq args (org-index--collect-values-from-user org-index-edit-on-yank)) - (if (plist-get args 'yank) - (plist-put args 'yank (replace-regexp-in-string "|" "\\vert" (plist-get args 'yank) nil 'literal))) - (setq args (plist-put args 'category "yank")) - (apply 'org-index--do-new-line args) - - (setq message-text "Added new row with text to yank"))) - - - ((eq command 'column) - - (if (and org-index--within-index-node - (org-at-table-p)) - (let (char col num) - (setq char (read-char "Please specify, which column to go to (r=ref, k=keywords, c=category, y=yank): ")) - (unless (memq char (list ?r ?k ?c ?y)) - (error (format "Invalid char '%c', cannot goto this column" char))) - (setq col (cdr (assoc char '((?r . ref) (?k . keywords) (?c . category) (?y . yank))))) - (setq num (org-index--column-num col)) - (if num - (progn - (org-table-goto-column num) - (setq message-text (format "At column %s" (symbol-name col)))) - - (error (format "Column '%s' is not present" col)))) - (error "Need to be in index table to go to a specific column"))) - - - ((eq command 'edit) - - (setq message-text (org-index--do-edit))) - - - ((eq command 'sort) - - (let ((sorts (list "count" "last-accessed" "mixed" "id" "ref")) - sort groups-and-counts) - - (cond - ((eq sort-what 'index) - (setq sort - (intern - (completing-read - "Please choose column to sort index table: " - (cl-copy-list sorts) - nil t nil nil (symbol-name org-index-sort-by)))) - - (org-index--do-sort-index sort) - (org-table-goto-column (org-index--column-num (if (eq sort 'mixed) 'last-access sort))) - ;; When saving index, it should again be sorted correctly - (with-current-buffer org-index--buffer - (add-hook 'before-save-hook 'org-index--sort-silent t)) - - (setq message-text - (format - (concat "Your index has been sorted temporarily by %s and will be sorted again by %s after %d seconds of idle time" - (if groups-and-counts - "; %d groups with equal %s and a total of %d lines have been found" - "")) - (symbol-name sort) - org-index-sort-by - org-index-idle-delay - (cl-second groups-and-counts) - (symbol-name sort) - (cl-third groups-and-counts)))) - - ((memq sort-what '(region buffer)) - (org-index--do-sort-lines sort-what) - (setq message-text (format "Sorted %s by contained references" sort-what)))))) - - - ((eq command 'highlight) - - (let ((where "buffer")) - (save-excursion - (save-restriction - (when (and transient-mark-mode - mark-active) - (narrow-to-region (region-beginning) (region-end)) - (setq where "region")) - - (if arg - (progn - (unhighlight-regexp org-index--ref-regex) - (setq message-text (format "Removed highlights for references in %s" where))) - (highlight-regexp org-index--ref-regex 'isearch) - (setq message-text (format "Highlighted references in %s" where))))))) - - - ((eq command 'focus) - (setq message-text (org-index--goto-focus arg))) - - - ((eq command 'set-focus) - (setq message-text (org-index--set-focus arg))) - - - ((eq command 'maintain) - (setq message-text (org-index--do-maintain))) - - - ((eq command 'example) - - (if (y-or-n-p "This assistant will help you to create a temporary index with detailed comments.\nDo you want to proceed ? ") - (org-index--create-index t))) - - - ((not command) (setq message-text "No command given")) - - - (t (error "Unknown subcommand '%s'" command))) - - - ;; tell, what we have done and what can be yanked - (if kill-new-text (setq kill-new-text - (substring-no-properties kill-new-text))) - (if (string= kill-new-text "") (setq kill-new-text nil)) - (let ((m (concat - message-text - (if (and message-text kill-new-text) - " and r" - (if kill-new-text "R" "")) - (if kill-new-text (format "eady to yank '%s'." kill-new-text) (if message-text "." ""))))) - (unless (string= m "") - (message m) - (setq org-index--message-text m))) - (if kill-new-text (kill-new kill-new-text))))) - - -(defun org-index-dispatch (&optional arg) - "Read additional chars and call subcommands of `org-index'. -Can be bound in global keyboard map as central entry point. -Optional argument ARG is passed on." - (interactive "P") - (let (char command) - (if (sit-for 1) - (message "org-index (? for detailed prompt) -")) - (setq char (key-description (read-key-sequence nil))) - (if (string= char "C-g") (keyboard-quit)) - (if (string= char "SPC") (setq char "?")) - (setq command (cdr (assoc char (org-index--get-shortcut-chars)))) - (unless command - (message "No subcommand for '%s'; switching to detailed prompt" char) - (sit-for 1) - (setq command 'short-help)) - (org-index command nil arg))) - - -(defun org-index-new-line (&rest keys-values) - "Create a new line within the index table, returning its reference. - -The function takes a varying number of argument pairs; each pair -is a symbol for an existing column heading followed by its value. -The return value is the new reference. - -Example: - - (message \"Created reference %s\" - (org-index-new-line 'keywords \"foo bar\" 'category \"baz\")) - -Optional argument KEYS-VALUES specifies content of new line." - - (let ((ref (plist-get keys-values 'ref))) - (org-index--verify-id) - (org-index--parse-table) - (if (not (memq ref '(t nil))) - (error "Column 'ref' accepts only 't' or 'nil'")) - (when ref - (setq ref (org-index--get-save-maxref)) - (setq keys-values (plist-put keys-values 'ref ref))) - - (apply 'org-index--do-new-line keys-values) - ref)) - - -(defun org-index--read-command (&optional with-short-help) - "Read subcommand for ‘org-index’ from minibuffer. -Optional argument WITH-SHORT-HELP displays help screen upfront." - (let (minibuffer-scroll-window - minibuffer-setup-fun - command) - (setq org-index--short-help-displayed nil) - (add-hook 'minibuffer-setup-hook 'org-index--minibuffer-setup-function) - (add-hook 'minibuffer-exit-hook 'org-index--minibuffer-exit-function) - (unwind-protect - (setq command - (intern - (completing-read - (concat - "Please choose" - (if org-index--display-short-help "" " (? for short help)") - ": ") - (mapcar 'symbol-name org-index--commands) nil t))) - (remove-hook 'minibuffer-setup-hook 'org-index--minibuffer-setup-function) - (remove-hook 'minibuffer-exit-hook 'org-index--minibuffer-exit-function) - (when org-index--short-help-displayed - (quit-windows-on org-index--short-help-buffer-name))) - command)) - - -(defun org-index--minibuffer-setup-function () - "Prepare minibuffer for `org-index--read-command'." - (setq org-index--minibuffer-saved-key (local-key-binding (kbd "?"))) - (local-set-key (kbd "?") 'org-index--display-short-help) - (if org-index--display-short-help (org-index--display-short-help))) - - -(defun org-index--minibuffer-exit-function () - "Restore minibuffer after `org-index--read-command'." - (local-set-key (kbd "?") org-index--minibuffer-saved-key) - (setq org-index--minibuffer-saved-key nil)) - - -(defun org-index--display-short-help () - "Helper function to show help in minibuffer." - (interactive) - - (with-temp-buffer-window - org-index--short-help-buffer-name nil nil - (setq org-index--short-help-displayed t) - (princ "Short help; all subcommands of `org-index', shortcuts in []\n") - (princ (org-index--get-short-help-text))) - (with-current-buffer org-index--short-help-buffer-name - (let ((inhibit-read-only t) - height-before height-after win) - (setq win (get-buffer-window)) - (setq height-before (window-height win)) - (shrink-window-if-larger-than-buffer win) - (setq height-after (window-height win)) - (goto-char (point-min)) - (end-of-line) - (insert - (if (> height-before height-after) - "." - (concat ", " - (substitute-command-keys "\\[scroll-other-window]") - " to scroll:"))) - (goto-char (point-min))))) - - -(defun org-index--get-short-help-text () - "Extract text for short help message from long help." - (or org-index--short-help-text - (with-temp-buffer - (insert (documentation 'org-index)) - (goto-char (point-min)) - (search-forward (concat " " (symbol-name (cl-first org-index--commands)) ": ")) - (forward-line 0) - (kill-region (point-min) (point)) - (search-forward (concat " " (symbol-name (car (last org-index--commands))) ": ")) - (forward-line 1) - (kill-region (point) (point-max)) - (keep-lines "^ [-a-z]+:" (point-min) (point-max)) - (align-regexp (point-min) (point-max) "\\(\\s-*\\):") - (goto-char (point-min)) - (while (re-search-forward "\\. *$" nil t) - (replace-match "" nil nil)) - (goto-char (point-min)) - (re-search-forward "short-help") - (end-of-line) - (insert " (this text)") - (goto-char (point-min)) - (unless (= (line-number-at-pos (point-max)) (1+ (length org-index--commands))) - (error "Internal error, unable to properly extract one-line descriptions of subcommands")) - (setq org-index--short-help-text (buffer-string))))) - - -(defun org-index--get-shortcut-chars () - "Collect shortcut chars from short help message." - (or org-index--shortcut-chars - (with-temp-buffer - (insert (org-index--get-short-help-text)) - (goto-char (point-min)) - (while (< (point) (point-max)) - (when (looking-at "^ \\([-a-z]+\\)[ \t]+: +\\[\\([a-z?]\\)\\] ") - (setq org-index--shortcut-chars - (cons (cons (match-string 2) (intern (match-string 1))) - org-index--shortcut-chars))) - (forward-line 1)) - (unless (> (length org-index--shortcut-chars) 0) - (error "Internal error, did not find shortcut chars")) - org-index--shortcut-chars))) - - -(defun org-index--goto-focus (arg) - "Goto focus node, one after the other; with ARG: reverse." - (if org-index--ids-focused-nodes - (let ((maybe-reverse (lambda (&rest x) (if (equal arg '(4)) (reverse x) x))) - last-id next-ids marker) - (setq last-id (or org-index--id-last-goto-focus - (last org-index--ids-focused-nodes))) - (setq next-id - (car (or (cdr-safe (member last-id - (apply maybe-reverse - (append org-index--ids-focused-nodes - org-index--ids-focused-nodes)))) - (apply maybe-reverse org-index--ids-focused-nodes)))) - (or (setq marker (org-id-find next-id 'marker)) - (error "Could not find focus-node with id %s" next-id)) - (setq org-index--id-last-goto-focus next-id) - (pop-to-buffer-same-window (marker-buffer marker)) - (goto-char (marker-position marker)) - (org-index--unfold-buffer) - (move-marker marker nil) - (if (cdr org-index--ids-focused-nodes) - (format "Jumped to %s focus-node (out of %d)" - (if (equal arg '(4)) "previous" "next") - (length org-index--ids-focused-nodes)) - "Jumped to single focus-node")) - "No nodes in focus, use set-focus")) - - -(defun org-index--set-focus (arg) - "Set focus node, with prefix ARG, append to list, with double prefix: delete." - (let (id text) - - (setq text - (cond - - ((not arg) - (setq id (org-id-get-create)) - (setq org-index--ids-focused-nodes (list id)) - "Focus has been set on current node (1 node in focus)") - - ((equal arg '(4)) - (setq id (org-id-get-create)) - (unless (member id org-index--ids-focused-nodes) - (setq org-index--ids-focused-nodes (cons id org-index--ids-focused-nodes))) - (setq org-index--id-last-goto-focus id) - "Current node has been appended to list of focused nodes (%d node%s in focus)") - - ((equal arg '(16)) - (setq id (org-id-get)) - (if (and id (member id org-index--ids-focused-nodes)) - (progn - (setq org-index--id-last-goto-focus - (or (car-safe (cdr-safe (member id (reverse (append org-index--ids-focused-nodes - org-index--ids-focused-nodes))))) - org-index--id-last-goto-focus)) - (setq org-index--ids-focused-nodes (delete id org-index--ids-focused-nodes)) - "Current node has been removed from list of focused nodes (%d node%s in focus)") - "Current node has not been in list of focused nodes (%d node%s in focus)")))) - - (with-current-buffer org-index--buffer - (org-entry-put org-index--point "ids-focused-nodes" (string-join org-index--ids-focused-nodes " "))) - - (format text (length org-index--ids-focused-nodes) (if (cdr org-index--ids-focused-nodes) "s" "")))) - - -(defun org-index--do-edit () - "Perform command edit." - (let ((maxlen 0) cols-vals buffer-keymap field-keymap keywords-pos val) - - (setq org-index--context-node nil) - (setq org-index--context-occur nil) - - ;; change to index, if whithin occur - (if org-index--within-occur - (let ((pos (get-text-property (point) 'org-index-lbp))) - (org-index--occur-test-stale pos) - (setq org-index--context-occur (cons (point) (org-index--line-in-canonical-form))) - (set-buffer org-index--buffer) - (goto-char pos)) - - ;; change to index, if still not within - (if (not org-index--within-index-node) - (let ((id (org-id-get))) - (setq org-index--context-node (cons (current-buffer) (point))) - (set-buffer org-index--buffer) - (unless (and id (org-index--go 'id id)) - (setq org-index--context-node nil) - (error "This node is not in index"))))) - - ;; retrieve current content of index line - (dolist (col (mapcar 'car (reverse org-index--columns))) - (if (> (length (symbol-name col)) maxlen) - (setq maxlen (length (symbol-name col)))) - (setq val (org-index--get-or-set-field col)) - (if (and val (eq col 'yank)) (setq val (replace-regexp-in-string (regexp-quote "\\vert") "|" val nil 'literal))) - (setq cols-vals (cons (cons col val) - cols-vals))) - - ;; we need two different keymaps - (setq buffer-keymap (make-sparse-keymap)) - (set-keymap-parent buffer-keymap widget-keymap) - (define-key buffer-keymap (kbd "C-c C-c") 'org-index--edit-accept) - (define-key buffer-keymap (kbd "C-c C-k") 'org-index--edit-abort) - - (setq field-keymap (make-sparse-keymap)) - (set-keymap-parent field-keymap widget-field-keymap) - (define-key field-keymap (kbd "C-c C-c") 'org-index--edit-accept) - (define-key field-keymap (kbd "C-c C-k") 'org-index--edit-abort) - - ;; prepare buffer - (setq org-index--context-index (cons (point) (org-index--line-in-canonical-form))) - (if (get-buffer org-index--edit-buffer-name) (kill-buffer org-index--edit-buffer-name)) - (switch-to-buffer (get-buffer-create org-index--edit-buffer-name)) - - ;; create and fill widgets - (setq org-index--edit-widgets nil) - (widget-insert "Edit this line from index; type C-c C-c when done, C-c C-k to abort.\n\n") - (dolist (col-val cols-vals) - (if (eq (car col-val) 'keywords) (setq keywords-pos (point))) - (setq org-index--edit-widgets (cons - (cons (car col-val) - (widget-create 'editable-field - :format (format (format "%%%ds: %%%%v" maxlen) (symbol-name (car col-val))) - :keymap field-keymap - (or (cdr col-val) ""))) - org-index--edit-widgets))) - - (widget-setup) - (goto-char keywords-pos) - (beginning-of-line) - (forward-char (+ maxlen 2)) - (use-local-map buffer-keymap) - "Editing a single line from index")) - - -(defun org-index--edit-accept () - "Function to accept editing in Edit buffer." - (interactive) - - (let ((obuf (get-buffer org-index--occur-buffer-name)) - val line) - - ;; Time might have passed - (org-index--refresh-parse-table) - - (with-current-buffer org-index--buffer - - ;; check, if buffer has become stale - (save-excursion - (goto-char (car org-index--context-index)) - (unless (string= (cdr org-index--context-index) - (org-index--line-in-canonical-form)) - (switch-to-buffer org-index--edit-buffer-name) - (error "Index table has changed: Cannot find line, that this buffer is editing"))) - - (pop-to-buffer-same-window org-index--buffer) - (goto-char (car org-index--context-index)) - - ;; write back line to index - (dolist (col-widget org-index--edit-widgets) - (setq val (widget-value (cdr col-widget))) - (if (eq (car col-widget) 'yank) (setq val (replace-regexp-in-string "|" (regexp-quote "\\vert") val))) - (org-index--get-or-set-field (car col-widget) val)) - - (setq line (org-index--align-and-fontify-current-line)) - (beginning-of-line)) - - ;; write line to occur if appropriate - (if org-index--context-occur - (if obuf - (if (string= (cdr org-index--context-index) - (cdr org-index--context-occur)) - (progn - (pop-to-buffer-same-window obuf) - (goto-char (car org-index--context-occur)) - (beginning-of-line) - (let ((inhibit-read-only t)) - (delete-region (line-beginning-position) (line-end-position)) - (insert line) - (put-text-property (line-beginning-position) (line-end-position) - 'org-index-lbp (car org-index--context-index)))) - (error "Occur buffer and index buffer do not match any longer")) - (message "Occur buffer has gone, cannot switch back.")) - (setq org-index--context-occur nil)) - - ;; return to node, if invoked from there - (when org-index--context-node - (pop-to-buffer-same-window (car org-index--context-node)) - (goto-char (cdr org-index--context-node))) - - ;; clean up - (kill-buffer org-index--edit-buffer-name) - (setq org-index--context-index nil) - (setq org-index--edit-widgets nil) - (beginning-of-line) - (message "Index line has been edited."))) - - -(defun org-index--edit-abort () - "Function to abort editing in Edit buffer." - (interactive) - (kill-buffer org-index--edit-buffer-name) - (setq org-index--context-index nil) - (setq org-index--edit-widgets nil) - (beginning-of-line) - (message "Edit aborted.")) - - -(defun org-index--do-new-line (&rest keys-values) - "Do the work for `org-index-new-line'. -Optional argument KEYS-VALUES specifies content of new line." - - (org-index--retrieve-context) - (with-current-buffer org-index--buffer - (goto-char org-index--point) - - ;; check arguments early; they might come from userland - (let ((kvs keys-values) - k v) - (while kvs - (setq k (car kvs)) - (setq v (cadr kvs)) - (if (or (not (symbolp k)) - (and (symbolp v) (not (eq v t)) (not (eq v nil)))) - (error "Arguments must be alternation of key and value")) - (unless (org-index--column-num k) - (error "Unknown column or column not defined in table: '%s'" (symbol-name k))) - (setq kvs (cddr kvs)))) - - (let (yank) - ;; create new line - (org-index--create-new-line) - - ;; fill columns - (let ((kvs keys-values) - k v) - (while kvs - (setq k (car kvs)) - (setq v (cadr kvs)) - (org-table-goto-column (org-index--column-num k)) - (insert (org-trim (or v ""))) - (setq kvs (cddr kvs)))) - - ;; align and fontify line - (org-index--promote-current-line) - (org-index--align-and-fontify-current-line) - - ;; remember fingerprint to be able to return - (setq org-index--last-fingerprint (org-index--get-or-set-field 'fingerprint)) - - ;; get column to yank - (setq yank (org-index--get-or-set-field org-index-yank-after-add)) - - yank))) - - -(defun org-index-get-line (column value) - "Retrieve an existing line within the index table by ref or id. -Return its contents as a property list. - -The function `plist-get' may be used to retrieve specific elements -from the result. - -Example: - - (plist-get (org-index-get-line 'ref \"R12\") 'count) - -retrieves the value of the count-column for reference number 12. - -Argument COLUMN is a symbol, either ref or id, -argument VALUE specifies the value to search for." - ;; check arguments - (unless (memq column '(ref id keywords 'yank)) - (error "Argument column can only be 'ref', 'id', 'keywords' or 'yank'")) - - (unless value - (error "Need a value to search for")) - - (org-index--verify-id) - (org-index--parse-table) - - (org-index--get-line column value)) - - -(defun org-index--get-line (column value) - "Find a line by ID, return its contents. -Argument COLUMN and VALUE specify line to get." - (let (content) - (org-index--on - column value - (mapc (lambda (x) - (if (and (numberp (cdr x)) - (> (cdr x) 0)) - (setq content (cons (car x) (cons (or (org-index--get-or-set-field (car x)) "") content))))) - (reverse org-index--columns))) - content)) - - -(defun org-index--ref-from-id (id) - "Get reference from line ID." - (org-index--on 'id id (org-index--get-or-set-field 'ref))) - - -(defun org-index--id-from-ref (ref) - "Get id from line REF." - (org-index--on 'ref ref (org-index--get-or-set-field 'id))) - - -(defun org-index--get-fingerprint () - "Get fingerprint of current line." - (replace-regexp-in-string - "\\s " "" - (mapconcat (lambda (x) (org-index--get-or-set-field x)) '(id ref yank keywords created) ""))) - - -(defun org-index--read-search-for-index () - "Special input routine for command index." - - ;; Accept single char commands or switch to reading a sequence of digits - (let (char prompt search-ref search-id search-fingerprint) - - ;; start with short prompt but give more help on next iteration - (setq prompt "Please specify, where to go in index (0-9,.,space,backspace,return or ? for short help) - ") - - ;; read one character - (while (not (memq char (append (number-sequence ?0 ?9) (list ?\d ?\b ?\r ?\j ?\s ?.)))) - (setq char (read-char prompt)) - (setq prompt "Go to specific position in index table. Digits specify a reference number, goes to top of index, or to last line created and or `.' to index line of current node. Please choose - ")) - - (if (memq char (number-sequence ?0 ?9)) - ;; read rest of digits - (setq search-ref (read-from-minibuffer "Search reference number: " (char-to-string char)))) - ;; decode single chars - (if (memq char '(?\r ?\n ?.)) (setq search-id (org-id-get))) - (if (memq char '(?\d ?\b)) (setq search-fingerprint org-index--last-fingerprint)) - - (list search-ref search-id search-fingerprint))) - - -(defun org-index--verify-id () - "Check, that we have a valid id." - - ;; Check id - (unless org-index-id - (let ((answer (org-completing-read "Cannot find an index (org-index-id is not set). You may:\n - read-help : to learn more about org-index\n - create-index : invoke an assistant to create an initial index\nPlease choose: " (list "read-help" "create-index") nil t nil nil "read-help"))) - (if (string= answer "create-index") - (org-index--create-missing-index "Variable org-index-id is not set, so probably no index table has been created yet.") - (describe-function 'org-index) - (throw 'new-index nil)))) - - ;; Find node - (let (marker) - (setq marker (org-id-find org-index-id 'marker)) - (unless marker (org-index--create-missing-index "Cannot find the node with id \"%s\" (as specified by variable org-index-id)." org-index-id)) - ; Try again with new node - (setq marker (org-id-find org-index-id 'marker)) - (unless marker (error "Could not create node")) - (setq org-index--buffer (marker-buffer marker) - org-index--point (marker-position marker)) - (move-marker marker nil))) - - -(defun org-index--retrieve-context () - "Collect context information before starting with command." - - ;; Get the content of the active region or the word under cursor - (setq org-index--active-region - (if (and transient-mark-mode mark-active) - (buffer-substring (region-beginning) (region-end)) - nil)) - (setq org-index--below-cursor (thing-at-point 'symbol)) - - ;; get category of current node - (setq org-index--category-before - (save-excursion ; workaround: org-get-category does not give category when at end of buffer - (beginning-of-line) - (org-get-category (point) t))) - - ;; Find out, if we are within index table or occur buffer - (setq org-index--within-index-node (string= (org-id-get) org-index-id)) - (setq org-index--within-occur (string= (buffer-name) org-index--occur-buffer-name))) - - -(defun org-index--parse-table (&optional num-lines-to-format check-sort-mixed) - "Parse content of index table. -Optional argument NUM-LINES-TO-FORMAT limits formatting effort and duration. -Optional argument CHECK-SORT-MIXED triggers resorting if mixed and stale." - - (let (ref-field - ref-num - initial-point - end-of-headings - start-of-headings) - - (unless num-lines-to-format (setq num-lines-to-format 0)) - - (with-current-buffer org-index--buffer - - (setq initial-point (point)) - - (org-index--go-below-hline) - (org-reveal) - - ;; if table is sorted mixed and it was sorted correctly yesterday, it could still be wrong today; so check - (when (and check-sort-mixed (eq org-index-sort-by 'mixed)) - (goto-char org-index--below-hline) - (let (count-first-line count-second-line) - (setq count-first-line (string-to-number (concat (org-index--get-or-set-field 'count) " 0"))) - (forward-line) - (setq count-second-line (string-to-number (concat (org-index--get-or-set-field 'count) " 0"))) - (forward-line -1) - (if (and (string< (org-index--get-or-set-field 'last-accessed) - (org-index--get-mixed-time)) - (< count-first-line count-second-line)) - (org-index--do-sort-index org-index-sort-by))) - (org-index--go-below-hline)) - - ;; align and fontify table once for this emacs session - (when (> num-lines-to-format org-index--aligned) - (org-index--go-below-hline) - (message "Aligning and fontifying %s lines of index table (once per emacs session)..." - (if (= num-lines-to-format most-positive-fixnum) "all" (format "%d" num-lines-to-format))) - (save-restriction - (let (from to) - (forward-line -3) - (setq from (point)) - (setq to (org-table-end)) - (when (< num-lines-to-format most-positive-fixnum) - (forward-line (+ 3 num-lines-to-format)) - (narrow-to-region from (point)) - (setq to (min (point) to))) - (goto-char org-index--below-hline) - (org-table-align) - (setq to (min (point-max) to)) - (font-lock-fontify-region from to))) - (setq org-index--aligned num-lines-to-format) - (org-index--go-below-hline) - (message "Done.")) - - (beginning-of-line) - - ;; get headings to display during occur - (setq end-of-headings (point)) - (goto-char (org-table-begin)) - (setq start-of-headings (point)) - (setq org-index--headings-visible (substring-no-properties (org-index--copy-visible start-of-headings end-of-headings))) - (setq org-index--headings (buffer-substring start-of-headings end-of-headings)) - - ;; count columns - (org-table-goto-column 100) - (setq org-index--numcols (- (org-table-current-column) 1)) - - ;; go to top of table - (goto-char (org-table-begin)) - - ;; parse line of headings - (org-index--parse-headings) - - ;; read property or go through table to find maximum number - (goto-char org-index--below-hline) - (setq ref-field (or (org-entry-get org-index--point "max-ref") - (org-index--migrate-maxref-to-property))) - - (unless org-index--head (org-index--get-decoration-from-ref-field ref-field)) - (setq org-index--maxrefnum (org-index--extract-refnum ref-field)) - - ;; Get ids of focused node (if any) - (setq org-index--ids-focused-nodes (split-string (or (org-entry-get nil "ids-focused-nodes") ""))) - (org-entry-delete (point) "id-focused-node") ; migrate (kind of) from previous versions - - ;; save position below hline - (org-index--go-below-hline) - ;; go back to initial position - (goto-char initial-point)))) - - -(defun org-index--get-decoration-from-ref-field (ref-field) - "Extract decoration from a REF-FIELD." - (unless (string-match "^\\([^0-9]*\\)\\([0-9]+\\)\\([^0-9]*\\)$" ref-field) - (org-index--report-index-error - "Reference in index table ('%s') does not contain a number" ref-field)) - - ;; These are the decorations used within the first ref of index - (setq org-index--head (match-string 1 ref-field)) - (setq org-index--tail (match-string 3 ref-field)) - (setq org-index--ref-regex (concat (regexp-quote org-index--head) - "\\([0-9]+\\)" - (regexp-quote org-index--tail))) - (setq org-index--ref-format (concat org-index--head "%d" org-index--tail))) - - -(defun org-index--extract-refnum (ref-field) - "Extract the number from a complete reference REF-FIELD like 'R102'." - (unless (string-match org-index--ref-regex ref-field) - (org-index--report-index-error - "Reference '%s' is not formatted properly (does not match '%s')" ref-field org-index--ref-regex)) - (string-to-number (match-string 1 ref-field))) - - -(defun org-index--migrate-maxref-to-property () - "One-time migration: No property; need to go through whole table once to find max." - (org-index--go-below-hline) - (let (ref-field ref-num ref) - (message "One-time migration to set index-property maxref...") - (unless org-index--maxrefnum (setq org-index--maxrefnum 0)) - (while (org-at-table-p) - (setq ref-field (org-index--get-or-set-field 'ref)) - (when ref-field - (unless org-index--head (org-index--get-decoration-from-ref-field ref-field)) - (setq ref-num (org-index--extract-refnum ref-field)) - (if (> ref-num org-index--maxrefnum) (setq org-index--maxrefnum ref-num))) - (forward-line)) - (unless org-index--maxrefnum - (org-index--report-index-error "No reference found in property max-ref and none in index")) - (setq ref (org-index--get-save-maxref t)) - (org-index--go-below-hline) - (message "Done.") - ref)) - - -(defun org-index--get-save-maxref (&optional no-inc) - "Get next reference, increment number and store it in index. -Optional argument NO-INC skips automatic increment on maxref." - (let (ref) - (unless no-inc (setq org-index--maxrefnum (1+ org-index--maxrefnum))) - (setq ref (format org-index--ref-format org-index--maxrefnum)) - (with-current-buffer org-index--buffer - (org-entry-put org-index--point "max-ref" ref)) - ref)) - - -(defun org-index--refresh-parse-table () - "Fast refresh of selected results of parsing index table." - - (setq org-index--point (marker-position (org-id-find org-index-id 'marker))) - (with-current-buffer org-index--buffer - (save-excursion - (org-index--go-below-hline)))) - - -(defun org-index--do-maintain () - "Choose among and perform some tasks to maintain index." - (let ((check-what) (max-mini-window-height 1.0) message-text) - (setq check-what (intern (org-completing-read "These checks and fixes are available:\n - statistics : compute statistics about index table\n - check : check ids by visiting their nodes\n - duplicates : check index for duplicate rows (ref or id)\n - clean : remove obsolete property org-index-id\n - update : update content of index lines, with an id \nPlease choose: " (list "statistics" "check" "duplicates" "clean" "update") nil t nil nil "statistics"))) - (message nil) - - (cond - ((eq check-what 'check) - (setq message-text (or (org-index--check-ids) - "No problems found"))) - - ((eq check-what 'statistics) - (setq message-text (org-index--do-statistics))) - - ((eq check-what 'duplicates) - (setq message-text (org-index--find-duplicates))) - - ((eq check-what 'clean) - (let ((lines 0)) - (org-map-entries - (lambda () - (when (org-entry-get (point) "org-index-ref") - (cl-incf lines) - (org-entry-delete (point) "org-index-ref"))) - nil 'agenda) - (setq message-text (format "Removed property 'org-index-ref' from %d lines" lines)))) - - ((eq check-what 'update) - (if (y-or-n-p "Updating your index will overwrite certain columns with content from the associated heading and category. If unsure, you may try this for a single, already existing line of your index by invoking `add'. Are you SURE to proceed for ALL INDEX LINES ? ") - (setq message-text (org-index--update-all-lines)) - (setq message-text "Canceled.")))) - message-text)) - - -(defun org-index--get-mixed-time () - "Get timestamp for sorting order mixed." - (format-time-string - (org-time-stamp-format t t) - (apply 'encode-time (append '(0 0 0) (nthcdr 3 (decode-time)))))) - - -(defun org-index--do-sort-index (sort) - "Sort index table according to SORT." - - (let ((is-modified (buffer-modified-p)) - top - bottom - mixed-time) - - (unless buffer-read-only - - (message "Sorting index table for %s..." (symbol-name sort)) - (undo-boundary) - - (let ((message-log-max nil)) ; we have just issued a message, dont need those of sort-subr - - ;; if needed for mixed sort - (if (eq sort 'mixed) - (setq mixed-time (org-index--get-mixed-time))) - - ;; get boundaries of table - (org-index--go-below-hline) - (forward-line 0) - (setq top (point)) - (goto-char (org-table-end)) - - ;; kill all empty rows at bottom - (while (progn - (forward-line -1) - (org-table-goto-column 1) - (and - (not (org-index--get-or-set-field 'ref)) - (not (org-index--get-or-set-field 'id)) - (not (org-index--get-or-set-field 'yank)))) - (org-table-kill-row)) - (forward-line 1) - (setq bottom (point)) - - ;; sort lines - (save-restriction - (narrow-to-region top bottom) - (goto-char top) - (sort-subr t - 'forward-line - 'end-of-line - (lambda () - (org-index--get-sort-key sort t mixed-time)) - nil - 'string<) - (goto-char (point-min)) - - ;; restore modification state - (set-buffer-modified-p is-modified))) - - (setq org-index--last-sort-assumed sort)))) - - -(defun org-index--do-sort-lines (what) - "Sort lines in WHAT according to contained reference." - (save-restriction - (cond - ((eq what 'region) - (if (region-active-p) - (narrow-to-region (region-beginning) (region-end)) - (error "No active region, cannot sort"))) - ((eq what 'buffer) - (unless (y-or-n-p "Sort whole current buffer ? ") - (error "Canceled")) - (narrow-to-region (point-min) (point-max)))) - - (goto-char (point-min)) - (sort-subr nil 'forward-line 'end-of-line - (lambda () - (if (looking-at (concat ".*" - (org-index--make-guarded-search org-index--ref-regex 'dont-quote))) - (string-to-number (match-string 1)) - 0))))) - - -(defun org-index--go-below-hline () - "Move below hline in index-table." - - (let ((errstring (format "index table within node %s" org-index-id))) - - (goto-char org-index--point) - - ;; go to heading of node - (while (not (org-at-heading-p)) (forward-line -1)) - (forward-line 1) - - ;; go to first table, but make sure we do not get into another node - (while (and (not (org-at-table-p)) - (not (org-at-heading-p)) - (not (eobp))) - (forward-line)) - - ;; check, if there really is a table - (unless (org-at-table-p) - (org-index--create-missing-index "Cannot find %s." errstring)) - - ;; go just after hline - (while (and (not (org-at-table-hline-p)) - (org-at-table-p)) - (forward-line)) - (forward-line) - - ;; and check - (unless (org-at-table-p) - (org-index--report-index-error "Cannot find a hline within %s" errstring)) - - (org-table-goto-column 1) - (setq org-index--below-hline (point)))) - - -(defun org-index--parse-headings () - "Parse headings of index table." - - (let (field ;; field content - field-symbol) ;; and as a symbol - - (setq org-index--columns nil) - - ;; For each column - (dotimes (col org-index--numcols) - - (setq field (substring-no-properties (downcase (org-trim (org-table-get-field (+ col 1)))))) - - (if (string= field "") - (error "Heading of column cannot be empty")) - (if (and (not (string= (substring field 0 1) ".")) - (not (member (intern field) org-index--valid-headings))) - (error "Column name '%s' is not a valid heading (custom headings may start with a dot, e.g. '.foo')" field)) - - (setq field-symbol (intern field)) - - ;; check if heading has already appeared - (if (assoc field-symbol org-index--columns) - (org-index--report-index-error - "'%s' appears two times as column heading" (downcase field)) - ;; add it to list at front, reverse later - (setq org-index--columns (cons (cons field-symbol (+ col 1)) org-index--columns))))) - - (setq org-index--columns (reverse org-index--columns)) - - ;; check if all necessary headings have appeared - (mapc (lambda (head) - (unless (cdr (assoc head org-index--columns)) - (org-index--report-index-error "No column has heading '%s'" head))) - org-index--valid-headings)) - - -(defun org-index--create-missing-index (&rest reasons) - "Create a new empty index table with detailed explanation. Argument REASONS explains why." - - (org-index--ask-before-create-index "Cannot find index table: " - "new permanent" "." - reasons) - (org-index--create-index)) - - -(defun org-index--report-index-error (&rest reasons) - "Report an error (explained by REASONS) with the existing index and offer to create a valid one to compare with." - - (when org-index--buffer - (pop-to-buffer-same-window org-index--buffer) - (goto-char org-index--below-hline) - (org-reveal t)) - (org-index--ask-before-create-index "The existing index contains this error: " - "temporary" ", to compare with." - reasons) - (org-index--create-index t t)) - - -(defun org-index--ask-before-create-index (explanation type for-what reasons) - ; checkdoc-params: (explanation type for-what reasons) - "Ask the user before creating an index or throw error. Arguments specify bits of issued message." - (let (reason prompt) - - (setq reason (apply 'format reasons)) - - (setq prompt (concat explanation reason "\n" - "However, this assistant can help you to create a " - type " index with detailed comments" for-what "\n\n" - "Do you want to proceed ?")) - - (unless (let ((max-mini-window-height 1.0)) - (y-or-n-p prompt)) - (error (concat explanation reason))))) - - -(defun org-index--create-index (&optional temporary compare) - "Create a new empty index table with detailed explanation. -specify flag TEMPORARY for th new table temporary, maybe COMPARE it with existing index." - (let (buffer - title - firstref - id) - - (if temporary - (let ((file-name (concat temporary-file-directory "org-index--example-index.org")) - (buffer-name "*org-index-example-index*")) - (setq buffer (get-buffer-create buffer-name)) - (with-current-buffer buffer - ;; but it needs a file for its index to be found - (unless (string= (buffer-file-name) file-name) - (set-visited-file-name file-name)) - (rename-buffer buffer-name) ; name is change by line above - - (erase-buffer) - (org-mode))) - - (setq buffer (get-buffer (org-completing-read "Please choose the buffer, where the new node for the index table should be created; the new node will be inserted at its end.\n\nBuffer: " (mapcar 'buffer-name (org-buffer-list)))))) - - (setq title (read-from-minibuffer "Please enter the title of the index node (leave empty for default 'index'): ")) - (if (string= title "") (setq title "index")) - - (while (progn - (setq firstref (read-from-minibuffer "Please enter your first reference-number. This is an integer number preceeded by some and optionally followed by some non-numeric chars; e.g. 'R1', '-1-' or '#1#' (and your initial number does not need to be '1'). The format of your reference-numbers only needs to make sense for yourself, so that you can spot it easily in your texts or write it on a piece of paper; it should however not already appear frequently within your existing notes, to avoid too many false hits when searching.\n\nPlease choose (leave empty for default 'R1'): ")) - (if (string= firstref "") (setq firstref "R1")) - (let (desc) - (when (string-match "[[:blank:]]" firstref) - (setq desc "Contains whitespace")) - (when (string-match "[[:cntrl:]]" firstref) - (setq desc "Contains control characters")) - (unless (string-match "^[^0-9]+[0-9]+[^0-9]*$" firstref) - ;; firstref not okay, report details - (setq desc - (cond ((string= firstref "") "is empty") - ((not (string-match "^[^0-9]+" firstref)) "starts with a digit") - ((not (string-match "^[^0-9]+[0-9]+" firstref)) "does not contain a number") - ((not (string-match "^[^0-9]+[0-9]+[^0-9]*$" firstref)) "contains more than one sequence of digits") - - ))) - (if desc - (progn - (read-from-minibuffer (format "Your input '%s' does not meet the requirements because it %s.\nPlease hit RET and try again: " firstref desc)) - t) - nil)))) - - (with-current-buffer buffer - (goto-char (point-max)) - (insert (format "* %s %s\n" firstref title)) - (org-entry-put org-index--point "max-ref" firstref) - (if temporary - (insert " - Below you find your temporary index table, which WILL NOT LAST LONGER - THAN YOUR CURRENT EMACS SESSION; please use it only for evaluation. -") - (insert " - Below you find your initial index table, which will grow over time. -")) - (insert " You may start using it by adding some lines. Just - move to another heading within org, invoke `org-index' and - choose the command 'add'. After adding a few nodes, try the - command 'occur' to search among them. - - To gain further insight you may invoke the subcommand 'help', or - (same content) read the help of `org-index'. - - Within the index table below, the sequence of columns does not - matter. You may reorder them in any way you like. You may also - add your own columns, which should start with a dot - (e.g. '.my-column'). - - Invoke `org-customize' to tweak the behaviour of org-index - (see the group org-index). - - This node needs not be a top level node; its name is completely - at your choice; it is found through its ID only. -") - (unless temporary - (insert " - Remark: These lines of explanation can be removed at any time. -")) - - (setq id (org-id-get-create)) - (insert (format " - - | ref | category | keywords | tags | count | level | last-accessed | created | id | yank | - | | | | | | | | | <4> | <4> | - |-----+----------+----------+------+-------+-------+---------------+---------+-----+------| - | %s | | %s | | | | | %s | %s | | - -" - firstref - title - (with-temp-buffer (org-insert-time-stamp nil nil t)) - id)) - - ;; make sure, that node can be found - (org-id-add-location id (buffer-file-name)) - (setq buffer-save-without-query t) - (basic-save-buffer) - - (while (not (org-at-table-p)) (forward-line -1)) - (unless buffer-read-only (org-table-align)) - (while (not (org-at-heading-p)) (forward-line -1)) - - ;; read back some info about new index - (let ((org-index-id id)) - (org-index--verify-id)) - - ;; remember at least for this session - (setq org-index-id id) - - ;; present results to user - (if temporary - (progn - ;; Present existing and temporary index together - (when compare - (pop-to-buffer-same-window org-index--buffer) - (goto-char org-index--point) - (org-index--unfold-buffer) - (delete-other-windows) - (select-window (split-window-vertically))) - ;; show new index - (pop-to-buffer-same-window buffer) - (org-id-goto id) - (org-index--unfold-buffer) - (if compare - (progn - (message "Please compare your existing index (upper window) and a temporary new one (lower window) to fix your index") - (throw 'new-index nil)) - (message "This is your new temporary index, use command add to populate, occur to search."))) - (progn - ;; Only show the new index - (pop-to-buffer-same-window buffer) - (delete-other-windows) - (org-id-goto id) - (org-index--unfold-buffer) - (if (y-or-n-p "This is your new index table. It is already set for this Emacs session, so you may try it out. Do you want to save its id to make it available for future Emacs sessions too ? ") - (progn - (customize-save-variable 'org-index-id id) - (message "Saved org-index-id '%s' to %s." id (or custom-file - user-init-file)) - (throw 'new-index nil)) - (let (sq) - (setq sq (format "(setq org-index-id \"%s\")" id)) - (kill-new sq) - (message "Did not make the id of this new index permanent; you may want to put\n\n %s\n\ninto your own initialization; it is copied already, just yank it." sq) - (throw 'new-index nil)))))))) - - -(defun org-index--unfold-buffer () - "Helper function to unfold buffer." - (org-show-context) - (org-show-subtree) - (recenter 1) - (save-excursion - (org-back-to-heading) - (forward-line) ;; on property drawer - (org-cycle))) - - -(defun org-index--update-line (&optional ref-or-id-or-pos) - "Update columns count and last-accessed in line REF-OR-ID-OR-POS." - - (let (initial) - - (with-current-buffer org-index--buffer - (unless buffer-read-only - - ;; search reference or id, if given (or assume, that we are already positioned right) - (when ref-or-id-or-pos - (setq initial (point)) - (goto-char org-index--below-hline) - (while (and (org-at-table-p) - (not (if (integerp ref-or-id-or-pos) - (and (>= ref-or-id-or-pos (line-beginning-position)) - (< ref-or-id-or-pos (line-end-position))) - (or (string= ref-or-id-or-pos (org-index--get-or-set-field 'ref)) - (string= ref-or-id-or-pos (org-index--get-or-set-field 'id)))))) - (forward-line))) - - (if (not (org-at-table-p)) - (error "Did not find reference or id '%s'" ref-or-id-or-pos) - (org-index--update-current-line)) - - (if initial (goto-char initial)))))) - - -(defun org-index--update-current-line () - "Update current lines columns count and last-accessed." - (let (newcount (count-field (org-index--get-or-set-field 'count))) - - ;; update count field only if number or empty - (when (or (not count-field) - (string-match "^[0-9]+$" count-field)) - (setq newcount (+ 1 (string-to-number (or count-field "0")))) - (org-index--get-or-set-field 'count - (number-to-string newcount))) - - ;; update timestamp - (org-table-goto-column (org-index--column-num 'last-accessed)) - (org-table-blank-field) - (org-insert-time-stamp nil t t) - - ;; move line according to new content - (org-index--promote-current-line) - (org-index--align-and-fontify-current-line))) - - -(defun org-index--align-and-fontify-current-line (&optional num) - "Make current line (or NUM lines) blend well among others." - (let (lines) - ;; get current content - (unless num (setq num 1)) - (setq lines (delete-and-extract-region (line-beginning-position) (line-end-position num))) - ;; create minimum table with fixed-width columns to align and fontify new line - (insert (with-temp-buffer - (org-set-font-lock-defaults) - (insert org-index--headings-visible) - ;; fill columns, so that aligning cannot shrink them - (goto-char (point-min)) - (search-forward "|") - (while (search-forward " " (line-end-position) t) - (replace-match "." nil t)) - (goto-char (point-min)) - (while (search-forward ".|." (line-end-position) t) - (replace-match " | " nil t)) - (goto-char (point-min)) - (while (search-forward "|." (line-end-position) t) - (replace-match "| " nil t)) - (goto-char (point-max)) - (insert lines) - (forward-line 0) - (let ((start (point))) - (while (re-search-forward "^\s +|-" nil t) - (replace-match "| -")) - (goto-char start)) - (org-mode) - (org-table-align) - (font-lock-fontify-region (point-min) (point-max)) - (goto-char (point-max)) - (if (eq -1 (skip-chars-backward "\n")) - (delete-char 1)) - (forward-line (- 1 num)) - (buffer-substring (line-beginning-position) (line-end-position num)))) - lines)) - - -(defun org-index--promote-current-line () - "Move current line up in table according to changed sort fields." - (let (begin end key - (to-skip 0)) - - (forward-line 0) ; stay at beginning of line - - (setq key (org-index--get-sort-key)) - (setq begin (point)) - (setq end (line-beginning-position 2)) - - (forward-line -1) - (while (and (org-at-table-p) - (not (org-at-table-hline-p)) - (string< (org-index--get-sort-key) key)) - - (cl-incf to-skip) - (forward-line -1)) - (forward-line 1) - - ;; insert line at new position - (when (> to-skip 0) - (insert (delete-and-extract-region begin end)) - (forward-line -1)))) - - -(defun org-index--get-sort-key (&optional sort with-ref mixed-time) - "Get value for sorting from column SORT, optional WITH-REF; if mixes use MIXED-TIME." - (let (ref - ref-field - key) - - (unless sort (setq sort org-index--last-sort-assumed)) ; use default value - - (when (or with-ref - (eq sort 'ref)) - ;; get reference with leading zeroes, so it can be - ;; sorted as text - (setq ref-field (org-index--get-or-set-field 'ref)) - (if ref-field - (progn - (string-match org-index--ref-regex ref-field) - (setq ref (format - "%06d" - (string-to-number - (match-string 1 ref-field))))) - (setq ref "000000"))) - - (setq key - (cond - ((eq sort 'count) - (format "%08d" (string-to-number (or (org-index--get-or-set-field 'count) "")))) - ((eq sort 'mixed) - (let ((last-accessed (org-index--get-or-set-field 'last-accessed))) - (unless mixed-time (setq mixed-time (org-index--get-mixed-time))) - (concat - (if (string< mixed-time last-accessed) last-accessed mixed-time) - (format "%08d" (string-to-number (or (org-index--get-or-set-field 'count) "")))))) - ((eq sort 'ref) - ref) - ((memq sort '(id last-accessed created)) - (org-index--get-or-set-field sort)) - (t (error "This is a bug: unmatched case '%s'" sort)))) - - (if with-ref (setq key (concat key ref))) - - key)) - - -(defun org-index--get-or-set-field (key &optional value) - "Retrieve field KEY from index table or set it to VALUE." - (let (field) - (save-excursion - (if (eq key 'fingerprint) - (progn - (if value (error "Internal error, pseudo-column fingerprint cannot be set")) - (setq field (org-index--get-fingerprint))) - (setq field (org-trim (org-table-get-field (cdr (assoc key org-index--columns)) value)))) - (if (string= field "") (setq field nil)) - - (org-no-properties field)))) - - -(defun org-index--column-num (key) - "Return number of column KEY." - (if (numberp key) - key - (cdr (assoc key org-index--columns)))) - - -(defun org-index--make-guarded-search (ref &optional dont-quote) - "Make robust search string from REF; DONT-QUOTE it, if requested." - (concat "\\_<" (if dont-quote ref (regexp-quote ref)) "\\_>")) - - -(defun org-index--find-duplicates () - "Find duplicate references or ids in index table." - (let (ref-duplicates id-duplicates) - - (setq ref-duplicates (org-index--find-duplicates-helper 'ref)) - (setq id-duplicates (org-index--find-duplicates-helper 'id)) - (goto-char org-index--below-hline) - (if (or ref-duplicates id-duplicates) - (progn - ;; show results - (pop-to-buffer-same-window - (get-buffer-create "*org-index-duplicates*")) - (when ref-duplicates - (insert "These references appear more than once:\n") - (mapc (lambda (x) (insert " " x "\n")) ref-duplicates) - (insert "\n\n")) - (when id-duplicates - (insert "These ids appear more than once:\n") - (mapc (lambda (x) (insert " " x "\n")) id-duplicates)) - - "Some references or ids are duplicates") - "No duplicate references or ids found"))) - - -(defun org-index--find-duplicates-helper (column) - "Helper for `org-index--find-duplicates': Go through table and count given COLUMN." - (let (counts duplicates field found) - - ;; go through table - (goto-char org-index--below-hline) - (while (org-at-table-p) - - ;; get column - (setq field (org-index--get-or-set-field column)) - - ;; and increment - (setq found (assoc field counts)) - (if found - (cl-incf (cdr found)) - (setq counts (cons (cons field 1) counts))) - - (forward-line)) - - (mapc (lambda (x) (if (and (> (cdr x) 1) - (car x)) - (setq duplicates (cons (car x) duplicates)))) counts) - - duplicates)) - - -(defun org-index--do-statistics () - "Compute statistics about index table." - (let ((total-lines 0) (total-refs 0) - ref ref-field min max message) - - ;; go through table - (goto-char org-index--below-hline) - (while (org-at-table-p) - - ;; get ref - (setq ref-field (org-index--get-or-set-field 'ref)) - - (when ref-field - (string-match org-index--ref-regex ref-field) - (setq ref (string-to-number (match-string 1 ref-field))) - - ;; record min and max - (if (or (not min) (< ref min)) (setq min ref)) - (if (or (not max) (> ref max)) (setq max ref)) - - (setq total-refs (1+ total-refs))) - - ;; count - (setq total-lines (1+ total-lines)) - - (forward-line)) - - (setq message (format "%d Lines in index table. First reference is %s, last %s; %d of them are used (%d percent)" - total-lines - (format org-index--ref-format min) - (format org-index--ref-format max) - total-refs - (truncate (* 100 (/ (float total-refs) (1+ (- max min))))))) - - (goto-char org-index--below-hline) - message)) - - -(defun org-index--do-add-or-update (&optional create-ref tag-with-ref) - "For current node or current line in index, add or update in index table. -CREATE-REF and TAG-WITH-REF if given." - - (let* (id id-from-index ref args yank ret) - - (org-index--save-positions) - (unless (or org-index--within-index-node - org-index--within-occur) - (org-back-to-heading)) - - ;; try to do the same things from within index and from outside - (if org-index--within-index-node - - (progn - (unless (org-at-table-p) - (error "Within index node but not on table")) - - (setq id (org-index--get-or-set-field 'id)) - (setq ref (org-index--get-or-set-field 'ref)) - (setq args (org-index--collect-values-for-add-update-remote id)) - (org-index--write-fields args) - (setq yank (org-index--get-or-set-field org-index-yank-after-add)) - - (setq ret - (if ref - (cons (format "Updated index line %s" ref) yank) - (cons "Updated index line" nil)))) - - (setq id (org-id-get-create)) - (org-index--refresh-parse-table) - (setq id-from-index (org-index--on 'id id id)) - (setq ref (org-index--on 'id id (org-index--get-or-set-field 'ref))) - - (if tag-with-ref - (org-toggle-tag (format "%s%d%s" org-index--head tag-with-ref org-index--tail) 'on)) - (setq args (org-index--collect-values-for-add-update id)) - - (when (and create-ref - (not ref)) - (setq ref (org-index--get-save-maxref)) - (setq args (plist-put args 'ref ref))) - - - (if id-from-index - ;; already have an id in index, find it and update fields - (progn - - (org-index--on - 'id id - (org-index--write-fields args) - (setq yank (org-index--get-or-set-field org-index-yank-after-add))) - - (setq ret - (if ref - (cons (format "Updated index line %s" ref) yank) - (cons "Updated index line" nil)))) - - ;; no id here, create new line in index - (if ref (setq args (plist-put args 'ref ref))) - (setq yank (apply 'org-index--do-new-line args)) - - (setq ret - (if ref - (cons - (format "Added new index line %s" ref) - (concat yank " ")) - (cons - "Added new index line" - nil))))) - - (org-index--restore-positions) - - ret)) - - -(defun org-index--check-ids () - "Check, that ids really point to a node." - - (let ((lines 0) - id ids marker) - - (goto-char org-index--below-hline) - - (catch 'problem - (while (org-at-table-p) - - (when (setq id (org-index--get-or-set-field 'id)) - - ;; check for double ids - (when (member id ids) - (org-table-goto-column (org-index--column-num 'id)) - (throw 'problem "This id appears twice in index; please use command 'maintain' to check for duplicate ids")) - (cl-incf lines) - (setq ids (cons id ids)) - - ;; check, if id is valid - (setq marker (org-id-find id t)) - (unless marker - (org-table-goto-column (org-index--column-num 'id)) - (throw 'problem "This id cannot be found"))) - - (forward-line)) - - (goto-char org-index--below-hline) - nil))) - - -(defun org-index--update-all-lines () - "Update all lines of index at once." - - (let ((lines 0) - id ref kvs) - - ;; check for double ids - (or - (org-index--check-ids) - - (progn - (goto-char org-index--below-hline) - (while (org-at-table-p) - - ;; update single line - (when (setq id (org-index--get-or-set-field 'id)) - (setq ref (org-index--get-or-set-field 'ref)) - (setq kvs (org-index--collect-values-for-add-update-remote id)) - (org-index--write-fields kvs) - (cl-incf lines)) - (forward-line)) - - (goto-char org-index--below-hline) - (org-table-align) - (format "Updated %d lines" lines))))) - - -(defun org-index--collect-values-for-add-update (id &optional silent category) - "Collect values for adding or updating line specified by ID, do not ask if SILENT, use CATEGORY, if given." - - (let ((args (list 'id id)) - content) - - (dolist (col (mapcar 'car org-index--columns)) - - (setq content "") - - (cond - ((eq col 'keywords) - (if org-index-copy-heading-to-keywords - (setq content (nth 4 (org-heading-components)))) - - ;; Shift ref and timestamp ? - (if org-index-strip-ref-and-date-from-heading - (dotimes (i 2) - (if (or (string-match (concat "^\\s-*" org-index--ref-regex) content) - (string-match (concat "^\\s-*" org-ts-regexp-both) content)) - (setq content (substring content (match-end 0))))))) - - ((eq col 'category) - (setq content (or category org-index--category-before))) - - ((eq col 'level) - (setq content (number-to-string (org-outline-level)))) - - ((eq col 'tags) - (setq content (org-get-tags-string)))) - - (unless (string= content "") - (setq args (plist-put args col content)))) - - (if (not silent) - (let ((args-edited (org-index--collect-values-from-user org-index-edit-on-add args))) - (setq args (append args-edited args)))) - - args)) - - -(defun org-index--collect-values-for-add-update-remote (id) - "Wrap `org-index--collect-values-for-add-update' by prior moving to remote node identified by ID." - - (let (marker point args) - - (setq marker (org-id-find id t)) - ;; enter buffer and collect information - (with-current-buffer (marker-buffer marker) - (setq point (point)) - (goto-char marker) - (setq args (org-index--collect-values-for-add-update id t (org-get-category (point) t))) - (goto-char point)) - - args)) - - -(defun org-index--collect-values-from-user (cols &optional defaults) - "Collect values for adding a new line. -Argument COLS gives list of columns to edit. -Optional argument DEFAULTS gives default values." - - (let (content args) - - (dolist (col cols) - - (setq content "") - - (setq content (read-from-minibuffer - (format "Enter text for column '%s': " (symbol-name col)) - (plist-get col defaults))) - - (unless (string= content "") - (setq args (plist-put args col content)))) - args)) - - -(defun org-index--write-fields (kvs) - "Update current line with values from KVS (keys-values)." - (while kvs - (org-index--get-or-set-field (car kvs) (org-trim (cadr kvs))) - (setq kvs (cddr kvs)))) - - -(defun org-index--do-kill () - "Perform command kill from within occur, index or node." - - (let (id ref chars-deleted-index text-deleted-from pos-in-index) - - (org-index--save-positions) - (unless (or org-index--within-index-node - org-index--within-occur) - (org-back-to-heading)) - - ;; Collect information: What should be deleted ? - (if (or org-index--within-occur - org-index--within-index-node) - - (progn - (if org-index--within-index-node - ;; In index - (setq pos-in-index (point)) - ;; In occur - (setq pos-in-index (get-text-property (point) 'org-index-lbp)) - (org-index--occur-test-stale pos-in-index) - (set-buffer org-index--buffer) - (goto-char pos-in-index)) - ;; In Index (maybe moved there) - (setq id (org-index--get-or-set-field 'id)) - (setq ref (org-index--get-or-set-field 'ref))) - - ;; At a headline - (setq id (org-entry-get (point) "ID")) - (setq ref (org-index--ref-from-id id)) - (setq pos-in-index (org-index--on 'id id (point))) - (unless pos-in-index (error "This node is not in index"))) - - ;; Remark: Current buffer is not certain here, but we have all the information to delete - - ;; Delete from node - (when id - (let ((m (org-id-find id 'marker))) - (set-buffer (marker-buffer m)) - (goto-char m) - (move-marker m nil) - (unless (string= (org-id-get) id) - (error "Could not find node with id %s" id))) - - (org-index--delete-any-ref-from-tags) - (if ref (org-index--delete-ref-from-heading ref)) - (setq text-deleted-from (cons "node" text-deleted-from))) - - ;; Delete from index - (set-buffer org-index--buffer) - (unless pos-in-index "Internal error, pos-in-index should be defined here") - (goto-char pos-in-index) - (setq chars-deleted-index (length (delete-and-extract-region (line-beginning-position) (line-beginning-position 2)))) - (setq text-deleted-from (cons "index" text-deleted-from)) - - ;; Delete from occur only if we started there, accept that it will be stale otherwise - (if org-index--within-occur - (let ((inhibit-read-only t)) - (set-buffer org-index--occur-buffer-name) - (delete-region (line-beginning-position) (line-beginning-position 2)) - ;; correct positions - (while (org-at-table-p) - (put-text-property (line-beginning-position) (line-end-position) 'org-index-lbp - (- (get-text-property (point) 'org-index-lbp) chars-deleted-index)) - (forward-line)) - (setq text-deleted-from (cons "occur" text-deleted-from)))) - - (org-index--restore-positions) - (concat "Deleted from: " (mapconcat 'identity (sort text-deleted-from 'string<) ",")))) - - -(defun org-index--save-positions () - "Save current buffer and positions in index- and current buffer; not in occur-buffer." - - (let (cur-buf cur-mrk idx-pnt idx-mrk) - (setq cur-buf (current-buffer)) - (setq cur-mrk (point-marker)) - (set-buffer org-index--buffer) - (if (string= (org-id-get) org-index-id) - (setq idx-pnt (point)) - (setq idx-mrk (point-marker))) - (set-buffer cur-buf) - (setq org-index--saved-positions (list cur-buf cur-mrk idx-pnt idx-mrk)))) - - -(defun org-index--restore-positions () - "Restore positions as saved by `org-index--save-positions'." - - (cl-multiple-value-bind - (cur-buf cur-mrk idx-pnt idx-mrk buf) - org-index--saved-positions - (setq buf (current-buffer)) - (set-buffer cur-buf) - (goto-char cur-mrk) - (set-buffer org-index--buffer) - (goto-char (or idx-pnt idx-mrk)) - (set-buffer buf)) - (setq org-index--saved-positions nil)) - - -(defun org-index--delete-ref-from-heading (ref) - "Delete given REF from current heading." - (save-excursion - (end-of-line) - (let ((end (point))) - (beginning-of-line) - (when (search-forward ref end t) - (delete-char (- (length ref))) - (just-one-space))))) - - -(defun org-index--delete-any-ref-from-tags () - "Delete any reference from list of tags." - (let (new-tags) - (mapc (lambda (tag) - (unless (string-match org-index--ref-regex tag) - (setq new-tags (cons tag new-tags) ))) - (org-get-tags)) - (org-set-tags-to new-tags))) - - -(defun org-index--go (column value) - "Position cursor on index line where COLUMN equals VALUE. -Return t or nil, leave point on line or at top of table, needs to be in buffer initially." - (let (found) - - (unless (eq (current-buffer) org-index--buffer) - (error "This is a bug: Not in index buffer")) - - (unless value - (error "Cannot search for nil")) - - (if (string= value "") - (error "Cannot search for empty string")) - - (if (<= (length value) 2) - (warn "Searching for short string '%s' will be slow" value)) - - (goto-char org-index--below-hline) - (forward-line 0) - (save-restriction - (narrow-to-region (point) (org-table-end)) - (while (and (not found) - (search-forward value nil t)) - (setq found (string= value (org-index--get-or-set-field column))))) - - ;; return value - (if found - t - (goto-char org-index--below-hline) - nil))) - - -(defun org-index--find-id (id &optional other) - "Perform command head: Find node with REF or ID and present it. -If OTHER in separate window." - - (let (message marker) - - (setq marker (org-id-find id t)) - - (if marker - (progn - (org-index--update-line id) - (if other - (progn - (pop-to-buffer (marker-buffer marker))) - (pop-to-buffer-same-window (marker-buffer marker))) - - (goto-char marker) - (org-reveal t) - (org-show-entry) - (recenter) - (unless (string= (org-id-get) id) - (setq message (format "Could not go to node with id %s (narrowed ?)" id))) - (setq message "Found headline")) - (setq message (format "Did not find node with %s" id))) - message)) - - -(defun org-index--do-occur () - "Perform command occur." - (let ((word "") ; last word to search for growing and shrinking on keystrokes - (prompt "Search for: ") - (these-commands " NOTE: If you invoke the org-index subcommands edit or kill from within the occur buffer, the index is updated accordingly.") - (lines-wanted (window-body-height)) - (lines-found 0) ; number of lines found - words ; list words that should match - occur-buffer - begin ; position of first line - help-text ; cons with help text short and long - search-text ; description of text to search for - done ; true, if loop is done - in-c-backspace ; true, while processing C-backspace - help-overlay ; Overlay with help text - last-point ; Last position before end of search - initial-frame ; Frame when starting occur - key ; input from user in various forms - key-sequence - key-sequence-raw) - - - ;; make and show buffer - (if (get-buffer org-index--occur-buffer-name) - (kill-buffer org-index--occur-buffer-name)) - (setq occur-buffer (make-indirect-buffer org-index--buffer org-index--occur-buffer-name)) - (pop-to-buffer-same-window occur-buffer) - (setq initial-frame (selected-frame)) - - ;; avoid modifying direct buffer - (setq buffer-read-only t) - (toggle-truncate-lines 1) - (setq font-lock-keywords-case-fold-search t) - (setq case-fold-search t) - - ;; reset stack and overlays - (setq org-index--occur-stack nil) - (setq org-index--occur-tail-overlay nil) - - ;; narrow to table rows and one line before - (goto-char org-index--below-hline) - (forward-line 0) - (setq begin (point)) - (forward-line -1) - (narrow-to-region (point) (org-table-end)) - (forward-line) - - ;; initialize help text - (setq help-text (cons - (concat - (propertize "Incremental occur" 'face 'org-todo) - (propertize "; ? toggles help and headlines.\n" 'face 'org-agenda-dimmed-todo-face)) - (concat - (propertize - (org-index--wrap - (concat - "Normal keys add to search word; or start additional word; erases last char, last word; jumps to heading, jumps to heading in other window, jumps to matching line in index; all other keys end search." these-commands "\n")) - 'face 'org-agenda-dimmed-todo-face) - org-index--headings))) - - ;; insert overlays for help text and to cover unsearched lines - (setq help-overlay (make-overlay (point-min) begin)) - (overlay-put help-overlay 'display (car help-text)) - (setq org-index--occur-tail-overlay (make-overlay (point-max) (point-max))) - (overlay-put org-index--occur-tail-overlay 'invisible t) - - (while (not done) - - (if in-c-backspace - (setq key "") - (setq search-text (mapconcat 'identity (reverse (cons word words)) ",")) - - ;; read key, if selected frame has not changed - (if (eq initial-frame (selected-frame)) - (progn - (setq key-sequence - (let ((echo-keystrokes 0) - (full-prompt (format "%s%s%s" - prompt - search-text - (if (string= search-text "") "" " ")))) - (read-key-sequence full-prompt nil nil t t))) - (setq key (key-description key-sequence)) - (setq key-sequence-raw (this-single-command-raw-keys))) - (setq done t) - (setq key-sequence nil) - (setq key nil) - (setq key-sequence-raw nil))) - - - (cond - - - ((string= key "") - (setq in-c-backspace t)) - - - ((member key (list "" "DEL")) ; erase last char - - (if (= (length word) 0) - - ;; nothing more to delete from current word; try next - (progn - (setq word (car words)) - (setq words (cdr words)) - (setq in-c-backspace nil)) - - ;; unhighlight longer match - (unhighlight-regexp (regexp-quote word)) - - ;; some chars are left; shorten word - (setq word (substring word 0 -1)) - (when (= (length word) 0) ; when nothing left, use next word from list - (setq word (car words)) - (setq words (cdr words)) - (setq in-c-backspace nil)) - - ;; free top list of overlays and remove list - (setq lines-found (or (org-index--unhide) lines-wanted)) - (move-overlay org-index--occur-tail-overlay - (if org-index--occur-stack (cdr (assoc :end-of-visible (car org-index--occur-stack))) - (point-max)) - (point-max)) - - - ;; highlight shorter word - (unless (= (length word) 0) - (highlight-regexp (regexp-quote word) 'isearch)) - - ;; make sure, point is still visible - (goto-char begin))) - - - ((member key (list "SPC" ",")) ; space or comma: enter an additional search word - - ;; push current word and clear, no need to change display - (unless (string= word "") - (setq words (cons word words)) - (setq word ""))) - - - ((string= key "?") ; question mark: toggle display of headlines and help - (setq help-text (cons (cdr help-text) (car help-text))) - (overlay-put help-overlay 'display (car help-text))) - - ((and (= (length key) 1) - (aref printable-chars (elt key 0))) ; any printable char: add to current search word - - ;; unhighlight short word - (unless (= (length word) 0) - (unhighlight-regexp (regexp-quote word))) - - ;; add to word - (setq word (concat word key)) - - ;; make overlays to hide lines, that do not match longer word any more - (goto-char begin) - (setq lines-found (org-index--hide-with-overlays (cons word words) lines-wanted)) - (move-overlay org-index--occur-tail-overlay - (if org-index--occur-stack (cdr (assoc :end-of-visible (car org-index--occur-stack))) - (point-max)) - (point-max)) - - (goto-char begin) - - ;; highlight longer word - (highlight-regexp (regexp-quote word) 'isearch) - - ;; make sure, point is on a visible line - (line-move -1 t) - (line-move 1 t)) - - ;; anything else terminates input loop - (t (setq done t)))) - - ;; put back input event, that caused the loop to end - (unless (string= key "C-g") - (setq unread-command-events (listify-key-sequence key-sequence-raw)) - (message key)) - - ;; postprocessing - (setq last-point (point)) - - ;; For performance reasons do not show matching lines for rest of table. So no code here. - - ;; make permanent copy - ;; copy visible lines - (let ((lines-collected 0) - keymap line all-lines all-lines-lbp header-lines lbp) - - (setq cursor-type t) - (goto-char begin) - - ;; collect all visible lines - (while (and (not (eobp)) - (< lines-collected lines-wanted)) - ;; skip over invisible lines - (while (and (invisible-p (point)) - (not (eobp))) - (goto-char (1+ (overlay-end (car (overlays-at (point))))))) - (setq lbp (line-beginning-position)) - (setq line (buffer-substring-no-properties lbp (line-end-position))) - (unless (string= line "") - (cl-incf lines-collected) - (setq all-lines (cons (concat line - "\n") - all-lines)) - (setq all-lines-lbp (cons lbp all-lines-lbp))) - (forward-line 1)) - - (kill-buffer org-index--occur-buffer-name) ; cannot keep this buffer; might become stale soon - - ;; create new buffer - (setq occur-buffer (get-buffer-create org-index--occur-buffer-name)) - (pop-to-buffer-same-window occur-buffer) - (insert org-index--headings) - (setq header-lines (line-number-at-pos)) - - ;; insert into new buffer - (save-excursion - (apply 'insert (reverse all-lines)) - (if (= lines-collected lines-wanted) - (insert "\n(more lines omitted)\n"))) - (setq org-index--occur-lines-collected lines-collected) - - (org-mode) - (setq truncate-lines t) - (if all-lines (org-index--align-and-fontify-current-line (length all-lines))) - (when (fboundp 'font-lock-ensure) - (font-lock-ensure) - (font-lock-flush)) - (when all-lines-lbp - (while (not (org-at-table-p)) - (forward-line -1)) - (while all-lines-lbp - (put-text-property (line-beginning-position) (line-end-position) 'org-index-lbp (car all-lines-lbp)) - (setq all-lines-lbp (cdr all-lines-lbp)) - (forward-line -1))) - - ;; prepare help text - (goto-char (point-min)) - (forward-line (1- header-lines)) - (setq org-index--occur-help-overlay (make-overlay (point-min) (point))) - (setq org-index--occur-help-text - (cons - (org-index--wrap - (propertize "Search is done; ? toggles help and headlines.\n" 'face 'org-agenda-dimmed-todo-face)) - (concat - (org-index--wrap - (propertize - (format - (concat "Search is done." - (if (< lines-collected lines-wanted) - " Showing all %d matches for " - " Showing one window of matches for ") - "\"" search-text - "\". jumps to heading, jumps to heading in other window, jumps to matching line in index, increments count.\n" these-commands "\n") - (length all-lines)) - 'face 'org-agenda-dimmed-todo-face)) - org-index--headings))) - - (overlay-put org-index--occur-help-overlay 'display (car org-index--occur-help-text)) - - ;; highlight words - (setq case-fold-search t) - (setq font-lock-keywords-case-fold-search t) - (mapc (lambda (w) (unless (or (not w) (string= w "")) (highlight-regexp (regexp-quote w) 'isearch))) - (cons word words)) - - (setq buffer-read-only t) - - ;; install keyboard-shortcuts - (setq keymap (make-sparse-keymap)) - (set-keymap-parent keymap org-mode-map) - - (mapc (lambda (x) (define-key keymap (kbd x) - (lambda () (interactive) - (message "%s" (org-index--occur-action))))) - (list "" "RET")) - - (define-key keymap (kbd "") - (lambda () (interactive) - (message (org-index--occur-action t)))) - - (define-key keymap (kbd "SPC") - (lambda () (interactive) - (org-index--refresh-parse-table) - ;; increment in index - (let ((ref (org-index--get-or-set-field 'ref)) - count) - (org-index--on - 'ref ref - (setq count (+ 1 (string-to-number (org-index--get-or-set-field 'count)))) - (org-index--get-or-set-field 'count (number-to-string count)) - (org-index--promote-current-line) - (org-index--align-and-fontify-current-line)) - ;; increment in this buffer - (let ((inhibit-read-only t)) - (org-index--get-or-set-field 'count (number-to-string count))) - (message "Incremented count to %d" count)))) - - (define-key keymap (kbd "") - (lambda () (interactive) - (let ((pos (get-text-property (point) 'org-index-lbp))) - (org-index--refresh-parse-table) - (org-index--occur-test-stale pos) - (pop-to-buffer org-index--buffer) - (goto-char pos) - (org-reveal t) - (org-index--update-current-line) - (beginning-of-line)))) - - (define-key keymap (kbd "?") - (lambda () (interactive) - (org-index--refresh-parse-table) - (setq-local org-index--occur-help-text (cons (cdr org-index--occur-help-text) (car org-index--occur-help-text))) - (overlay-put org-index--occur-help-overlay 'display (car org-index--occur-help-text)))) - - (use-local-map keymap)))) - - -(defun org-index--occur-test-stale (pos) - "Test, if current line in occur buffer has become stale at POS." - (let (here there) - (org-index--refresh-parse-table) - (setq here (org-index--line-in-canonical-form)) - (with-current-buffer org-index--buffer - (goto-char pos) - (setq there (org-index--line-in-canonical-form))) - (unless (string= here there) - (error "Occur buffer has become stale")))) - - -(defun org-index--line-in-canonical-form () - "Return current line in its canonical form." - (org-trim (substring-no-properties (replace-regexp-in-string "\s +" " " (buffer-substring (line-beginning-position) (line-beginning-position 2)))))) - - -(defun org-index--wrap (text) - "Wrap TEXT at fill column." - (with-temp-buffer - (insert text) - (fill-region (point-min) (point-max) nil t) - (buffer-string))) - - -(defun org-index--occur-action (&optional other) - "Helper for `org-index--occur', find heading with ref or id; if OTHER, in other window; or copy yank column." - (if (org-at-table-p) - (let ((id (org-index--get-or-set-field 'id)) - (ref (org-index--get-or-set-field 'ref)) - (yank (org-index--get-or-set-field 'yank))) - (if id - (org-index--find-id id other) - (if ref - (progn - (org-mark-ring-goto) - (format "Found reference %s (no node is associated)" ref)) - (if yank - (progn - (org-index--update-line (get-text-property (point) 'org-index-lbp)) - (setq yank (replace-regexp-in-string (regexp-quote "\\vert") "|" yank nil 'literal)) - (kill-new yank) - (org-mark-ring-goto) - (if (string= (substring yank 0 3) "http") - (progn - (browse-url yank) - (format "Opened '%s' in browser (and copied it too)" yank)) - (format "Copied '%s' (no node is associated)" yank))) - (error "Internal error, this line contains neither id, nor reference, nor text to yank"))))) - (message "Not at table"))) - - -(defun org-index--hide-with-overlays (words lines-wanted) - "Hide text that is currently visible and does not match WORDS by creating overlays; leave LINES-WANTED lines visible." - (let ((lines-found 0) - (end-of-visible (point)) - overlay overlays start matched) - - ;; main loop - (while (and (not (eobp)) - (< lines-found lines-wanted)) - - ;; skip invisible lines - (while (and (not (eobp)) - (and - (invisible-p (point)) - (< (point) (overlay-start org-index--occur-tail-overlay)))) - (goto-char (overlay-end (car (overlays-at (point)))))) - - ;; find stretch of lines, that are currently visible but should be invisible now - (setq matched nil) - (setq start (point)) - (while (and (not (eobp)) - (not - (and - (invisible-p (point)) - (< (point) (overlay-start org-index--occur-tail-overlay)))) - (not (and (org-index--test-words words) - (setq matched t)))) ; for its side effect - (forward-line 1)) - - ;; create overlay to hide this stretch - (when (< start (point)) ; avoid creating an empty overlay - (setq overlay (make-overlay start (point))) - (overlay-put overlay 'invisible t) - (setq overlays (cons overlay overlays))) - - ;; skip and count line, that matched - (when matched - (forward-line 1) - (setq end-of-visible (point)) - (cl-incf lines-found))) - - ;; put new list on top of stack - (setq org-index--occur-stack - (cons (list (cons :overlays overlays) - (cons :end-of-visible end-of-visible) - (cons :lines lines-found)) - org-index--occur-stack)) - - lines-found)) - - -(defun org-index--unhide () - "Unhide text that does has been hidden by `org-index--hide-with-overlays'." - (when org-index--occur-stack - ;; delete overlays and make visible again - (mapc (lambda (y) - (delete-overlay y)) - (cdr (assoc :overlays (car org-index--occur-stack)))) - ;; remove from stack - (setq org-index--occur-stack (cdr org-index--occur-stack)) - ;; return number of lines, that are now visible - (if org-index--occur-stack (cdr (assoc :lines (car org-index--occur-stack)))))) - - -(defun org-index--test-words (words) - "Test current line for match against WORDS." - (let (line) - (setq line (downcase (buffer-substring (line-beginning-position) (line-beginning-position 2)))) - (catch 'not-found - (dolist (w words) - (or (cl-search w line) - (throw 'not-found nil))) - t))) - - -(defun org-index--create-new-line () - "Do the common work for `org-index-new-line' and `org-index'." - - ;; insert ref or id as last or first line, depending on sort-column - (goto-char org-index--below-hline) - (if (eq org-index-sort-by 'count) - (progn - (goto-char (org-table-end)) - (forward-line -1) - (org-table-insert-row t)) - (org-table-insert-row)) - - ;; insert some of the standard values - (org-table-goto-column (org-index--column-num 'created)) - (org-insert-time-stamp nil nil t) - (org-table-goto-column (org-index--column-num 'count)) - (insert "1")) - - -(defun org-index--sort-silent () - "Sort index for default column to remove any effects of temporary sorting." - (save-excursion - (org-index--verify-id) - (org-index--parse-table) - (with-current-buffer org-index--buffer - (save-excursion - (goto-char org-index--below-hline) - (org-index--do-sort-index org-index-sort-by) - (remove-hook 'before-save-hook 'org-index--sort-silent))))) - - -(defun org-index--idle-prepare () - "For parsing table when idle." - (org-index--verify-id) - (org-index--parse-table most-positive-fixnum t)) - - -(defun org-index--copy-visible (beg end) - "Copy the visible parts of the region between BEG and END without adding it to `kill-ring'; copy of `org-copy-visible'." - (let (snippets s) - (save-excursion - (save-restriction - (narrow-to-region beg end) - (setq s (goto-char (point-min))) - (while (not (= (point) (point-max))) - (goto-char (org-find-invisible)) - (push (buffer-substring s (point)) snippets) - (setq s (goto-char (org-find-visible)))))) - (apply 'concat (nreverse snippets)))) - - -(provide 'org-index) - -;; Local Variables: -;; fill-column: 75 -;; comment-column: 50 -;; End: - -;;; org-index.el ends here diff --git a/elpa/org-plus-contrib-20170407/org-macro.el b/elpa/org-plus-contrib-20170407/org-macro.el deleted file mode 100644 index 71e917b7..00000000 --- a/elpa/org-plus-contrib-20170407/org-macro.el +++ /dev/null @@ -1,309 +0,0 @@ -;;; org-macro.el --- Macro Replacement Code for Org -*- lexical-binding: t; -*- - -;; Copyright (C) 2013-2017 Free Software Foundation, Inc. - -;; Author: Nicolas Goaziou -;; Keywords: outlines, hypermedia, calendar, wp - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Macros are expanded with `org-macro-replace-all', which relies -;; internally on `org-macro-expand'. - -;; Default templates for expansion are stored in the buffer-local -;; variable `org-macro-templates'. This variable is updated by -;; `org-macro-initialize-templates', which recursively calls -;; `org-macro--collect-macros' in order to read setup files. - -;; Argument in macros are separated with commas. Proper escaping rules -;; are implemented in `org-macro-escape-arguments' and arguments can -;; be extracted from a string with `org-macro-extract-arguments'. - -;; Along with macros defined through #+MACRO: keyword, default -;; templates include the following hard-coded macros: -;; {{{time(format-string)}}}, {{{property(node-property)}}}, -;; {{{input-file}}} and {{{modification-time(format-string)}}}. - -;; Upon exporting, "ox.el" will also provide {{{author}}}, {{{date}}}, -;; {{{email}}} and {{{title}}} macros. - -;;; Code: -(require 'cl-lib) -(require 'org-macs) -(require 'org-compat) - -(declare-function org-element-at-point "org-element" ()) -(declare-function org-element-context "org-element" (&optional element)) -(declare-function org-element-map "org-element" - (data types fun &optional info first-match no-recursion - with-affiliated)) -(declare-function org-element-parse-buffer "org-element" - (&optional granularity visible-only)) -(declare-function org-element-property "org-element" (property element)) -(declare-function org-element-type "org-element" (element)) -(declare-function org-file-contents "org" (file &optional noerror)) -(declare-function org-mode "org" ()) -(declare-function vc-backend "vc-hooks" (f)) -(declare-function vc-call "vc-hooks" (fun file &rest args) t) -(declare-function vc-exec-after "vc-dispatcher" (code)) - -;;; Variables - -(defvar-local org-macro-templates nil - "Alist containing all macro templates in current buffer. -Associations are in the shape of (NAME . TEMPLATE) where NAME -stands for macro's name and template for its replacement value, -both as strings. This is an internal variable. Do not set it -directly, use instead: - - #+MACRO: name template") - -;;; Functions - -(defun org-macro--collect-macros () - "Collect macro definitions in current buffer and setup files. -Return an alist containing all macro templates found." - (letrec ((collect-macros - (lambda (files templates) - ;; Return an alist of macro templates. FILES is a list - ;; of setup files names read so far, used to avoid - ;; circular dependencies. TEMPLATES is the alist - ;; collected so far. - (let ((case-fold-search t)) - (org-with-wide-buffer - (goto-char (point-min)) - (while (re-search-forward - "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t) - (let ((element (org-element-at-point))) - (when (eq (org-element-type element) 'keyword) - (let ((val (org-element-property :value element))) - (if (equal (org-element-property :key element) "MACRO") - ;; Install macro in TEMPLATES. - (when (string-match - "^\\(.*?\\)\\(?:\\s-+\\(.*\\)\\)?\\s-*$" val) - (let* ((name (match-string 1 val)) - (template (or (match-string 2 val) "")) - (old-cell (assoc name templates))) - (if old-cell (setcdr old-cell template) - (push (cons name template) templates)))) - ;; Enter setup file. - (let ((file (expand-file-name - (org-unbracket-string "\"" "\"" val)))) - (unless (member file files) - (with-temp-buffer - (setq default-directory - (file-name-directory file)) - (org-mode) - (insert (org-file-contents file 'noerror)) - (setq templates - (funcall collect-macros (cons file files) - templates))))))))))) - templates)))) - (funcall collect-macros nil nil))) - -(defun org-macro-initialize-templates () - "Collect macro templates defined in current buffer. -Templates are stored in buffer-local variable -`org-macro-templates'. In addition to buffer-defined macros, the -function installs the following ones: \"property\", -\"time\". and, if the buffer is associated to a file, -\"input-file\" and \"modification-time\"." - (let* ((templates (org-macro--collect-macros)) - (update-templates - (lambda (cell) - (let ((old-template (assoc (car cell) templates))) - (if old-template (setcdr old-template (cdr cell)) - (push cell templates)))))) - ;; Install hard-coded macros. - (mapc update-templates - (list (cons "property" - "(eval (save-excursion - (let ((l \"$2\")) - (when (org-string-nw-p l) - (condition-case _ - (let ((org-link-search-must-match-exact-headline t)) - (org-link-search l nil t)) - (error - (error \"Macro property failed: cannot find location %s\" - l))))) - (org-entry-get nil \"$1\" 'selective)))") - (cons "time" "(eval (format-time-string \"$1\"))"))) - (let ((visited-file (buffer-file-name (buffer-base-buffer)))) - (when (and visited-file (file-exists-p visited-file)) - (mapc update-templates - (list (cons "input-file" (file-name-nondirectory visited-file)) - (cons "modification-time" - (format "(eval (format-time-string \"$1\" (or (and (org-string-nw-p \"$2\") (org-macro--vc-modified-time %s)) '%s)))" - (prin1-to-string visited-file) - (prin1-to-string - (nth 5 (file-attributes visited-file))))))))) - (setq org-macro-templates templates))) - -(defun org-macro-expand (macro templates) - "Return expanded MACRO, as a string. -MACRO is an object, obtained, for example, with -`org-element-context'. TEMPLATES is an alist of templates used -for expansion. See `org-macro-templates' for a buffer-local -default value. Return nil if no template was found." - (let ((template - ;; Macro names are case-insensitive. - (cdr (assoc-string (org-element-property :key macro) templates t)))) - (when template - (let ((value (replace-regexp-in-string - "\\$[0-9]+" - (lambda (arg) - (or (nth (1- (string-to-number (substring arg 1))) - (org-element-property :args macro)) - ;; No argument: remove place-holder. - "")) - template nil 'literal))) - ;; VALUE starts with "(eval": it is a s-exp, `eval' it. - (when (string-match "\\`(eval\\>" value) - (setq value (eval (read value)))) - ;; Return string. - (format "%s" (or value "")))))) - -(defun org-macro-replace-all (templates &optional finalize keywords) - "Replace all macros in current buffer by their expansion. - -TEMPLATES is an alist of templates used for expansion. See -`org-macro-templates' for a buffer-local default value. - -If optional arg FINALIZE is non-nil, raise an error if a macro is -found in the buffer with no definition in TEMPLATES. - -Optional argument KEYWORDS, when non-nil is a list of keywords, -as strings, where macro expansion is allowed." - (org-with-wide-buffer - (goto-char (point-min)) - (let ((properties-regexp - (format "\\`EXPORT_%s\\+?\\'" (regexp-opt keywords))) - record) - (while (re-search-forward "{{{[-A-Za-z0-9_]" nil t) - (let* ((datum (save-match-data (org-element-context))) - (type (org-element-type datum)) - (macro - (cond - ((eq type 'macro) datum) - ;; In parsed keywords and associated node properties, - ;; force macro recognition. - ((or (and (eq type 'keyword) - (member (org-element-property :key datum) keywords)) - (and (eq type 'node-property) - (string-match-p - properties-regexp - (org-element-property :key datum)))) - (save-restriction - (narrow-to-region (match-beginning 0) (line-end-position)) - (org-element-map (org-element-parse-buffer) 'macro - #'identity nil t)))))) - (when macro - (let* ((value (org-macro-expand macro templates)) - (begin (org-element-property :begin macro)) - (signature (list begin - macro - (org-element-property :args macro)))) - ;; Avoid circular dependencies by checking if the same - ;; macro with the same arguments is expanded at the same - ;; position twice. - (cond ((member signature record) - (error "Circular macro expansion: %s" - (org-element-property :key macro))) - (value - (push signature record) - (delete-region - begin - ;; Preserve white spaces after the macro. - (progn (goto-char (org-element-property :end macro)) - (skip-chars-backward " \t") - (point))) - ;; Leave point before replacement in case of - ;; recursive expansions. - (save-excursion (insert value))) - (finalize - (error "Undefined Org macro: %s; aborting" - (org-element-property :key macro))))))))))) - -(defun org-macro-escape-arguments (&rest args) - "Build macro's arguments string from ARGS. -ARGS are strings. Return value is a string with arguments -properly escaped and separated with commas. This is the opposite -of `org-macro-extract-arguments'." - (let ((s "")) - (dolist (arg (reverse args) (substring s 1)) - (setq s - (concat - "," - (replace-regexp-in-string - "\\(\\\\*\\)," - (lambda (m) - (concat (make-string (1+ (* 2 (length (match-string 1 m)))) ?\\) - ",")) - ;; If a non-terminal argument ends on backslashes, make - ;; sure to also escape them as they will be followed by - ;; a comma. - (concat arg (and (not (equal s "")) - (string-match "\\\\+\\'" arg) - (match-string 0 arg))) - nil t) - s))))) - -(defun org-macro-extract-arguments (s) - "Extract macro arguments from string S. -S is a string containing comma separated values properly escaped. -Return a list of arguments, as strings. This is the opposite of -`org-macro-escape-arguments'." - ;; Do not use `org-split-string' since empty strings are - ;; meaningful here. - (split-string - (replace-regexp-in-string - "\\(\\\\*\\)," - (lambda (str) - (let ((len (length (match-string 1 str)))) - (concat (make-string (/ len 2) ?\\) - (if (zerop (mod len 2)) "\000" ",")))) - s nil t) - "\000")) - -(defun org-macro--vc-modified-time (file) - (save-window-excursion - (when (vc-backend file) - (let ((buf (get-buffer-create " *org-vc*")) - (case-fold-search t) - date) - (unwind-protect - (progn - (vc-call print-log file buf nil nil 1) - (with-current-buffer buf - (vc-exec-after - (lambda () - (goto-char (point-min)) - (when (re-search-forward "Date:?[ \t]*" nil t) - (let ((time (parse-time-string - (buffer-substring - (point) (line-end-position))))) - (when (cl-some #'identity time) - (setq date (apply #'encode-time time)))))))) - (let ((proc (get-buffer-process buf))) - (while (and proc (accept-process-output proc .5 nil t))))) - (kill-buffer buf)) - date)))) - - -(provide 'org-macro) -;;; org-macro.el ends here diff --git a/elpa/org-plus-contrib-20170407/org-macs.el b/elpa/org-plus-contrib-20170407/org-macs.el deleted file mode 100644 index e4b39a2c..00000000 --- a/elpa/org-plus-contrib-20170407/org-macs.el +++ /dev/null @@ -1,299 +0,0 @@ -;;; org-macs.el --- Top-level Definitions for Org -*- lexical-binding: t; -*- - -;; Copyright (C) 2004-2017 Free Software Foundation, Inc. - -;; Author: Carsten Dominik -;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org -;; -;; This file is part of GNU Emacs. -;; -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;;; Commentary: - -;; This file contains macro definitions, defsubst definitions, other -;; stuff needed for compilation and top-level forms in Org mode, as -;; well lots of small functions that are not Org mode specific but -;; simply generally useful stuff. - -;;; Code: - -(defmacro org-with-gensyms (symbols &rest body) - (declare (debug (sexp body)) (indent 1)) - `(let ,(mapcar (lambda (s) - `(,s (make-symbol (concat "--" (symbol-name ',s))))) - symbols) - ,@body)) - -(defun org-string-nw-p (s) - "Return S if S is a string containing a non-blank character. -Otherwise, return nil." - (and (stringp s) - (string-match-p "[^ \r\t\n]" s) - s)) - -(defun org-not-nil (v) - "If V not nil, and also not the string \"nil\", then return V. -Otherwise return nil." - (and v (not (equal v "nil")) v)) - -(defmacro org-preserve-lc (&rest body) - (declare (debug (body))) - (org-with-gensyms (line col) - `(let ((,line (org-current-line)) - (,col (current-column))) - (unwind-protect - (progn ,@body) - (org-goto-line ,line) - (org-move-to-column ,col))))) - -;; Use `org-with-silent-modifications' to ignore cosmetic changes and -;; `org-unmodified' to ignore real text modifications -(defmacro org-unmodified (&rest body) - "Run BODY while preserving the buffer's `buffer-modified-p' state." - (declare (debug (body))) - (org-with-gensyms (was-modified) - `(let ((,was-modified (buffer-modified-p))) - (unwind-protect - (let ((buffer-undo-list t) - (inhibit-modification-hooks t)) - ,@body) - (set-buffer-modified-p ,was-modified))))) - -(defmacro org-without-partial-completion (&rest body) - (declare (debug (body))) - `(if (and (boundp 'partial-completion-mode) - partial-completion-mode - (fboundp 'partial-completion-mode)) - (unwind-protect - (progn - (partial-completion-mode -1) - ,@body) - (partial-completion-mode 1)) - ,@body)) - -(defmacro org-with-point-at (pom &rest body) - "Move to buffer and point of point-or-marker POM for the duration of BODY." - (declare (debug (form body)) (indent 1)) - (org-with-gensyms (mpom) - `(let ((,mpom ,pom)) - (save-excursion - (if (markerp ,mpom) (set-buffer (marker-buffer ,mpom))) - (org-with-wide-buffer - (goto-char (or ,mpom (point))) - ,@body))))) - -(defmacro org-with-remote-undo (buffer &rest body) - "Execute BODY while recording undo information in two buffers." - (declare (debug (form body)) (indent 1)) - (org-with-gensyms (cline cmd buf1 buf2 undo1 undo2 c1 c2) - `(let ((,cline (org-current-line)) - (,cmd this-command) - (,buf1 (current-buffer)) - (,buf2 ,buffer) - (,undo1 buffer-undo-list) - (,undo2 (with-current-buffer ,buffer buffer-undo-list)) - ,c1 ,c2) - ,@body - (when org-agenda-allow-remote-undo - (setq ,c1 (org-verify-change-for-undo - ,undo1 (with-current-buffer ,buf1 buffer-undo-list)) - ,c2 (org-verify-change-for-undo - ,undo2 (with-current-buffer ,buf2 buffer-undo-list))) - (when (or ,c1 ,c2) - ;; make sure there are undo boundaries - (and ,c1 (with-current-buffer ,buf1 (undo-boundary))) - (and ,c2 (with-current-buffer ,buf2 (undo-boundary))) - ;; remember which buffer to undo - (push (list ,cmd ,cline ,buf1 ,c1 ,buf2 ,c2) - org-agenda-undo-list)))))) - -(defmacro org-no-read-only (&rest body) - "Inhibit read-only for BODY." - (declare (debug (body))) - `(let ((inhibit-read-only t)) ,@body)) - -(defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t - rear-nonsticky t mouse-map t fontified t - org-emphasis t) - "Properties to remove when a string without properties is wanted.") - -(defsubst org-no-properties (s &optional restricted) - "Remove all text properties from string S. -When RESTRICTED is non-nil, only remove the properties listed -in `org-rm-props'." - (if restricted (remove-text-properties 0 (length s) org-rm-props s) - (set-text-properties 0 (length s) nil s)) - s) - -(defsubst org-get-alist-option (option key) - (cond ((eq key t) t) - ((eq option t) t) - ((assoc key option) (cdr (assoc key option))) - (t (let ((r (cdr (assq 'default option)))) - (if (listp r) (delq nil r) r))))) - -(defsubst org-check-external-command (cmd &optional use no-error) - "Check if external program CMD for USE exists, error if not. -When the program does exist, return its path. -When it does not exist and NO-ERROR is set, return nil. -Otherwise, throw an error. The optional argument USE can describe what this -program is needed for, so that the error message can be more informative." - (or (executable-find cmd) - (if no-error - nil - (error "Can't find `%s'%s" cmd - (if use (format " (%s)" use) ""))))) - -(defsubst org-last (list) - "Return the last element of LIST." - (car (last list))) - -(defun org-let (list &rest body) - (eval (cons 'let (cons list body)))) -(put 'org-let 'lisp-indent-function 1) - -(defun org-let2 (list1 list2 &rest body) - (eval (cons 'let (cons list1 (list (cons 'let (cons list2 body))))))) -(put 'org-let2 'lisp-indent-function 2) - -(defsubst org-call-with-arg (command arg) - "Call COMMAND interactively, but pretend prefix arg was ARG." - (let ((current-prefix-arg arg)) (call-interactively command))) - -(defsubst org-current-line (&optional pos) - (save-excursion - (and pos (goto-char pos)) - ;; works also in narrowed buffer, because we start at 1, not point-min - (+ (if (bolp) 1 0) (count-lines 1 (point))))) - -(defsubst org-goto-line (N) - (save-restriction - (widen) - (goto-char (point-min)) - (forward-line (1- N)))) - -(defsubst org-current-line-string (&optional to-here) - (buffer-substring (point-at-bol) (if to-here (point) (point-at-eol)))) - -(defsubst org-pos-in-match-range (pos n) - (and (match-beginning n) - (<= (match-beginning n) pos) - (>= (match-end n) pos))) - -(defun org-match-line (regexp) - "Match REGEXP at the beginning of the current line." - (save-excursion - (beginning-of-line) - (looking-at regexp))) - -(defun org-plist-delete (plist property) - "Delete PROPERTY from PLIST. -This is in contrast to merely setting it to 0." - (let (p) - (while plist - (if (not (eq property (car plist))) - (setq p (plist-put p (car plist) (nth 1 plist)))) - (setq plist (cddr plist))) - p)) - -(defmacro org-save-outline-visibility (use-markers &rest body) - "Save and restore outline visibility around BODY. -If USE-MARKERS is non-nil, use markers for the positions. -This means that the buffer may change while running BODY, -but it also means that the buffer should stay alive -during the operation, because otherwise all these markers will -point nowhere." - (declare (debug (form body)) (indent 1)) - (org-with-gensyms (data) - `(let ((,data (org-outline-overlay-data ,use-markers))) - (unwind-protect - (prog1 (progn ,@body) - (org-set-outline-overlay-data ,data)) - (when ,use-markers - (dolist (c ,data) - (when (markerp (car c)) (move-marker (car c) nil)) - (when (markerp (cdr c)) (move-marker (cdr c) nil)))))))) - -(defmacro org-with-wide-buffer (&rest body) - "Execute body while temporarily widening the buffer." - (declare (debug (body))) - `(save-excursion - (save-restriction - (widen) - ,@body))) - -(defmacro org-with-limited-levels (&rest body) - "Execute BODY with limited number of outline levels." - (declare (debug (body))) - `(progn - (defvar org-called-with-limited-levels) - (defvar org-outline-regexp) - (defvar outline-regexp) - (defvar org-outline-regexp-bol) - (let* ((org-called-with-limited-levels t) - (org-outline-regexp (org-get-limited-outline-regexp)) - (outline-regexp org-outline-regexp) - (org-outline-regexp-bol (concat "^" org-outline-regexp))) - ,@body))) - -(defvar org-outline-regexp) ; defined in org.el -(defvar org-odd-levels-only) ; defined in org.el -(defvar org-inlinetask-min-level) ; defined in org-inlinetask.el -(defun org-get-limited-outline-regexp () - "Return outline-regexp with limited number of levels. -The number of levels is controlled by `org-inlinetask-min-level'" - (cond ((not (derived-mode-p 'org-mode)) - outline-regexp) - ((not (featurep 'org-inlinetask)) - org-outline-regexp) - (t - (let* ((limit-level (1- org-inlinetask-min-level)) - (nstars (if org-odd-levels-only - (1- (* limit-level 2)) - limit-level))) - (format "\\*\\{1,%d\\} " nstars))))) - -(defmacro org-eval-in-environment (environment form) - (declare (debug (form form)) (indent 1)) - `(eval (list 'let ,environment ',form))) - -(defun org-make-parameter-alist (flat) - "Return alist based on FLAT. -FLAT is a list with alternating symbol names and values. The -returned alist is a list of lists with the symbol name in car and -the value in cdr." - (when flat - (cons (list (car flat) (cadr flat)) - (org-make-parameter-alist (cddr flat))))) - -;;;###autoload -(defmacro org-load-noerror-mustsuffix (file) - "Load FILE with optional arguments NOERROR and MUSTSUFFIX." - `(load ,file 'noerror nil nil 'mustsuffix)) - -(defun org-unbracket-string (pre post string) - "Remove PRE/POST from the beginning/end of STRING. -Both PRE and POST must be pre-/suffixes of STRING, or neither is -removed." - (if (and (string-prefix-p pre string) - (string-suffix-p post string)) - (substring string (length pre) (- (length post))) - string)) - -(provide 'org-macs) - -;;; org-macs.el ends here diff --git a/elpa/org-plus-contrib-20170407/orgcard.pdf b/elpa/org-plus-contrib-20170407/orgcard.pdf deleted file mode 100644 index 61a694a3848ba0d128af5102638c7fb0bf8e5444..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 81692 zcmeFYWmKHavM7wZI|=Tt0}R1Ja0u@1?k>SKxVyW%CP>iW65KTq9D)Q0b_d9NcJ_C^ zbJt$?{=Hc%HT6_iS9M8u7xm0g$_a}yvN8b>C?}@-<`LLQSV(LQEJ%2H5t!c_+n73; zkpMV=EF{nW5ST^Ht(=S@mB zTK7xq+Sber`+218xYf8_duOV4rAdc11L21qSU>&Su0y(1FCHJ&DqP#}`k;dm%=ZsL z$9H@>8yG)W1^C2_A;ebic!ry;rbr(T>rbj53_9#hrN}ijINNwHB04Wk5SKWTVuy85 zP%FaXc#l4uFR{<1ZPiJJ6EIz$57Z!4d*SOfMh;xj&Wh~feJ@(*{uwcWvT)nc>zuh` z8GKMDY8)BwMS%m3{z|Y@P%AU&TbrIx5*{UzbbHrf&H%1@+Ic+Gas7^ceIIvcrTpkd z9Q6<^e^Ne@$!!OETrLCW{8HcjLbvOYyWnoxPPu`d%_eC|1~KD8{-b#L#hcN|-w_pk zkong)LK$6w{X1$nP_)@X%Lzu8V;N>T^@z%j+Q})89$rl(U)EoFf61r!zj07H4YM!{ zlj?`-gR0i)SQM+*Yi4-YgPi9jOdzd+fHdlwbhLS9j;77jz`9Y!L<2XMc`{_sFUqtx zff^2Vj_5u)8NI9yp3lMK;;>W|$Kiw5$)hSgpn`q~rZp`LA;Q(3oVNx3P&SV9%oyEmFx)Cxu4@`j^FUFM+u z&hnCIT=4UDKC&pMHJ7D<8J49Xl=Bx6H?o8pvpEiSLWST7NR_9Nm;H3nlDNOG-pO9| zI_EH5O_e>?gt5!U#g~#@zN$RGC;7k=Wq7SK_ey8h7;{c~@aW=zqSDz)BuzEvY?s2p zb530~ek^DVA#=fzU(iOrBtyn+;)aVHB%VXJ- zc{k6q?Er~BlK{h%2jqG!Xo59Ij*2b>Tij%7d6CZ8UrL>%Knp&<@xZ;i{=>`|(lnwP7?NUXG3(5$n9Lj;dQpm(FQ&vXPT5gc! zCe4c-uaOL0m>k^m75@xYx~x~7R2WS9JA9wR*)G*=hQ)hNt9@$4G{rUbmTI0&B}dc} zwacW?Z(CS;&1s!BlML+Ogl-SfRQ)%bW1g)oQ(B?0B=AGFSel|xk?&WCX8k)%=W|`H zE@06eyM01*@cg@1r|iY#)tl@^x!BGN;|`%>s8EF!;Nk#geS$lOy2h)KqP>${++wY> z?dmljulY>uqaD6weqjhDZTRu}-B+vuxAHC6zO$oBaq*?KGCCF~0FM9g**f%XGZR!K zo6?M=fzfhIuVGfs{e34Hf{) zD~O9}NZGFXzP(~jI8Wmcn`Dd&U)0~NDxuAdm)f(#E{N=4bFZQXY`SWOo1G(3%?KBYn?%f9)KnHX z6Kb0_*UKN9s6;en9f2Wzi$_@A1pmB+hPkUy4F$mzV5*tGb!P=RXa_7?cy0CZh%N_H z>wRB~d! zV26i6%W?7LyxDt~TSd49NfdO_$o0w5JwmE}j^V({DT4XgUW0OBpnMvXN9$XvSq0Y<#0fiBKJd`+iiMp+ zGX5l`q!aEq`-NfQ(B^vHvoh~9PrSfiUT7p~$mk>b46oodJMBEEK4m%%>pC50ZexdO zFA$bb{(ehl#GLP$!CzddTzV|X$%9!zq-^f`DkX}dkEq^+60%dGf3T5u=)$yPiRMl& zvw=x!HM2wT8+bs%y>FE0Le0h4x=NT^0L+BF1X zE()_Ctst(T{CEr7eg=QV z0G{JpwB+Dzsp53Xc5!jc_?$1BW1@;1`s(CFtrwq>w;;*KPrf`rqH2>!PHs@M%o@^Z zU!x&Z|EvgR_Ggi|h}#Lx`az!jOVyWVPK~=uY&uPVGvb zk{%I=f*Hb<9r)ipg996z(?F2s_#zX(GrP%8jx_+Iuy^x7dm${F*61 z4=KXRJ$Pl2NAi`B5|@*xOLFj$cnl9s{!eiuL|T6iB8q%#U~Kt2W#ojqqnhZUfX*d+ zm_n3I7*RCn%-diqI(N1d}%S9>7~U8Z(5t#Y@%$u=!djHu1H>?{_R&8t7q;uE0`8lbGVICCSQ*H^|FM| zTgXyvm@%<6qKtAJM?zSoA*IGr35-wdTi$oFyd|ygU~7g3iwo^h1FEQdkrQy4+uz=< zxkMCFUfpD&w)JsU3~;|9T#5-#JOS49W1^whU8Z~ujhGciEmUk>VCX;tRkPgH$TaR9 zpF@MngMa1o)Tkc4L6+~MI*phbeC(8%6 zjqxnp)X`DRRUL<~y_Y@V(MRL_E)8|9^31Kn7tBbX=-s=1lx2RT=__%gl*{PWGAzLS z?V$AKw%5-0f_f`&iC6CI>uehHX&FP4LF9((Lq4m{HB8G$wBcEEW*llVP7~q6AkR$d z!!k5%P^(zFkf2Tf<-_SsxaOJ3M6|A!7T#Cf@5s2gxH;1>`u6>rxp<35b+D0vDBDtX z!GX+Tw7t7$1_`{3LaHstP>#K5wbo7V1@l@iFek*@&)(T)ipH?$L(>ex%cZTZ_8}g9 zw{3kdPN8Hr*a~)|C{$RsUzGRjfG4|#?D*R*kZpl4XHV-Qv_!Q9_Co_3gn}m`spoqM zttqX?J!vpS^I{j*90scQ(@lj|^6upR9d%~2yutS$H|`mEZn39a0TQQ&moxR*S$^)d zCcj1yA;=DYSxICJ=;7FAd)>BkNDavPq^bwM4yxzz*m8k!raqP9Z1w!rY+9YuT2k*S zEZ5ou3pzooTxUp;Sih)DDD328rjh#cWS4*bag!yF)tZtQE0LW1SfZ*)XTg>eSoA(# zMqkOlI{ot1f$i~K|J_w5m5vdaMSCR}rp9!@8yo+0jjucg>+Gw2C&W z0{qexY3MGCb7{0{GZD?<0~KX?4CT~odeN}6e%TWfyk$T`+Mc;lI<((1L~m1o`G0(PQ$ z>cpdT`BrRm&?6ED=02&?Nf|ZHRik=pJFlM4(=%x(hofrWJGK6>L#Z7QTJ z__C(gxVAaEXY%6_Q|QDtuh;t3FJouUcMU8-x9_Xx&s)~j8!1K$SMxt>X<8Fkia8?p zZz|o;joP9Zl_!6lY@9)$%XJmbCes{FuM(P;J*M-1ZL2$jkoo<69pt4_lMHQ{m)$w^ z;-Cu@TBX zv#8BGUxX@#VxypGTO#3uOo_l;{oa1cibJJh|BCeTaD?%jZ1qsym7`v2$b!WK`ZTfq zR#|GEY4a*i5&!EndYu$#4l8m+0Z`JBz5`HF2%3FdDIB?4R31cntk;pn|Q&HI}w4CbTD!s1`A~W%X zSgfK6p1<*vK_q2L<2ip)23gJ~T^mEV148r)k@-&^4eNkKepP)YxlcB?=O3bGuyD&z zkNZR0(XYM5x<8P*kPQ`uuc6C-8OF>wTvwo{KR09Q;F~OO5!-OVIOWElXN-lBFF;KD z{n$TFa2uqfDgKQkYh8dkWTCb2+=$nbF&O9{Li=$KGMO6vU9jEj2SGBQFYqqRpFbGH zaZty;@5V$KNEvwlHBlfcuPpxT`}~Dxa$w7-F~bzXF0OiqF#FOVV}tEE4hB%q5>~8@ zHXu{!x;U7!avf>edYe`=73>hG32QL(?R)Ln^h3pQbYN;$ErA`+cNGlg6P~u^b_l5$ z=5MZ*VGG|6o1uL8tR=kBFBXaKcLS;~v~*P3IF558W&)&-)7y^#kCDdrGJ)zGt=dUZ zb2EhfEt5`}vkdx{&>6@Beh5h!$Ms;J#Je=4z@&hB{TQlP>^Jf-f`_6%OEKxu3T@xn z3B_i%G0884E9#KSgL^53^$0>`=O8wq zYG}U%YbW{ZVriom^Ie&q(LGf3nXA`ciFElPgvx)3;E5HfCQ2UlVY{%(GgY@n8^^Pe zYs9~!390@O&FjCqYbI`qAB#CiHEOeN2Q2rFWnPrkxK1jBAw*;jo5lj%jd&z)z~U4O zoZ5^8KB646-<5fDmQc$z3|?`|b(>^o^*&NiOYOQv3`3;xCU;y*ViI_pwyuKyP`19d zma2D%|NO%SSk<;Y=Q(1~ZvuO=nk{U4y1u@iweg$n{_)$}EfF&}!D-?&$}9a5W@dL~ z4XjswQ^q{oh{~|Ru6hQ7OB!taKgWt3;_AHRb7ywNj^{7T8B&z5Z33hiUTF<#C9N>H zxE{#yKBmA)9+SPh?0W=T{tcuD zKvEn)(@9ugxcT`>{^)yp{-;GH3eo}URe>5(9IPaOC$S)uorL2bjE#iz56VHp^#^0) zBmw?2&P~Go2W90TVSQSL0tu*}#VqGwYp7`KM4|~YMp%@DS;^SVi9{RJ>iVxmJSqEU z75_BK09>s9X`^gL>%eh|6XS99OE*`0sw6u)ZAYnAHGAk`fqDG=kCOIu2_8o*c&Q3n zh3%fChg--RFgSiA|GL|a4sk4Ki10pxt7g>Gqy5+SnTA?;O(qLf?zNv=?T|*hkM4cJ zmwF~%>y1(5$xpVHRmQp_NK)rGI8HJ|EyE6X4TiErMYEp%XJlgv4n3(14WCTrGSM}V ztv7%Pv#GWgE#LY^8aT#Hd#kFLtNlt)DHpNdD#wUMOfVu8yAfSkzR8TxB9{9`=^Ryh z!P-c4k!ETvM@CY&To<0#k-P%lzWJqQh}CDnNwNjq&|;pY2oSZAniegVpU+^r;k2U$ z(?QcpF`9EUGRH6%0*jE46N4O+Cscakc!6fBOo}2wNG)F_pLPCbA}0%RvB9&9-RY+x8men6I|m~79?8wxOw)lJ-xin zU2a-2UOP4n!zB~Z^vlTO8#sUTF}`B8bVxSk`8DTc^1h4!@#1{&!J%Hsz>26BdJ>lmt}M-ONo3za%=D<6CG#iq7CIvzN*f9aI(6#fv|E#l@RA65a{_$wzCS`EY%(*e6GV!~RN-E?C z^1OjB6=i`ux;!(qlb)HlP_# zH_MoHIZ14@PCD7Se8b=ShZ`t?VVK0sXED?lEEd|GtNN2B6xIbaJGB`i(GQPL7=0k5 zW&Ny29&8_Dr`Wc%G1$;s7Y?0jEH3}kVJN~nmIx{$$ghk!tVOPO<+Z8bW9dXqru2k% z>5rc#SFk~9Lhv6A9#7=LKq9|Uw;I?De7WE+30@*js^Y3 zhu7~Xn3^fkPPVdERzD_3qmmW=aUOend7ROA3jrE<{IF|40*}g)0y9}V-UDNxwDcvP zW3fZ9A?$bjtfbH~(^~*zgq}q;ww!KG@4mL3EUe*xa9mnH@ZF~@828oAMacYziPOXm zRgJ_dT(T+B`BEqX0oroRuf8NgGTo_39K?;h z%JMpCpYaPlNq=~}-iug0^|Za$#o$>*6iz0W3_ti6QFMPEf9(kJT% zE85#U9B+R1{Gf+&_~XBbuocq}sy6IV0&+zc2RZBaUL(ljCCaXAzU^$jzj99jiQ=Vr9V6~hq* zKi2X5BwxuDtU6))C~oB}V?azjKRK&t=Fq2Mrcx=J&@yQpxM$Jv*qzH73NMJ4muChm z6cE^w$la5s=&L4cN|c8w;j6Q7Cn&*Y3_XP*vGD^Tx|Ne|84;~su22%0ZIA%+>I01l zTNp?87Ex?M>5qq&NKC3>Uj{h<;0$HU9>9K4t1sy&Sfr7Fj}uLJXVjFgBW7PK3$cUM zlTD#E`arQLQ*7xG)jzQAwoFit48tAQXFS6?j={!-ZC=b zc@|LDjMTCl)R4~Ii*lm*a8f@BGnrt}D8gLdP6T8A5d(TrhfIVdHf0Z%5?r5N*K(AN z-W{*7WOiAhp3e(~GS)!6_F!e8K_Y5ZO|lyuOyUG8cUW&UzcZRujMj@jl^ln7d^~LN z2V^eKnqG!S&kP>oSf-1nmQ;(4NA$@&009N+(~X5GSqLT9Mk-m6q;m1iZBDuKi`_ND z_~JEql#D^gSRa{JDfz5`qP2ilJV45{)-6q z2_#``!3vsOQiKGrrI6LQ2GHf_2!ckYPZg5;fstx?dcJ|t7PKo7TX{^V9~TncIW5q=IDu3%gGPhdy$XZ1=s3bQ(uhSh3uI2Z9%)6t;4-WH!vZCz}TKMz`}xI>p)d#{~> z6r-iOoW&$`uGrE)_^|NN@C$6-LUp#7s%z*gc2UAN3CIrFdm}m= zAKUo?ax3AWxQHd1Hbit25;Lv_^pwZpUHufuap-`JE)K?!1d>~=19V%-d+W}!Gyi4MEArh zHpeqj67!B8`q@DBrqYsG7N^Hn{hi0hv^nVw-AEo7(jm%hI`u$l33r!k>W_CS#=2z6 z$AF)LO-rhU;z~aw_#)~2!l`3t4c1zOzm^B@F5l^9In}@ zv1=$Fi+)QYr)jQoO{@$**;jWy6fX0gi)m~~0^8%_T_du3SXxm$XScT?M!uG;f8Cl0 z{+q>FTG`Y7>TQ;vb>Kz#MT#?6m2bLg2VLc}=eq9?g(aw3Ss??izH_VZxO7aMZb~kw zw#Oe;l%vWN@nxPjZH5G=wb-1GZ;wq&%yPP_%etzYWewTK^)9@_!cVdAFe6Dk$wUxtytm&_ z#NT6r_t(~avQ1QU{+@@kgB#xBQ32*ei(m$KY9*2*E31OiI4qN*WiwsnXrFMPg>`Uf zIptZ_AyS4CXYTkBg6!LZDaPdMgC*Ml2yAK;Tekl2&X5g_Rra!@aJo@=iq5r5ecHr0 zKW5Vrr*ukIcF}-%WQ)K|d^{5s%lH(|FAJg*u((GoAHyK%>P0=iJe2&O~VVP}7r;2Z613=Sb93iKjv z_xlo^3q6{*`;kPzIdQ)g@2(IU%M3#q-f`Y7iJFho@gnvp6hZG2&FN>~m&2f>6$xp# z;|sV4l;fTxU&B1y|MP&GqIvcBTUx=oR0PGq@Xo7-mdAUWDcYfay2qhEZ-00Ty!(q&_ErUtlwyF?$ zG(>G!WRY9ASfZAGi!D|Uf5X8O!0H}bBzn?A3u39WTNq%*jx9?DOTA0;Jm3JqxXXr7}e8m6b=qCeCWR2LBxG|aN0 zNGA(=ndka{OUb#f(;Q2uWt^WKgw z9Sw$_3LQIb5nqP1d=yF5)!rt(b|F%?yw`V%%Z;V-+PUsCI||IK_L_7Lh-`av+TW4T zbOe{yLCDMw80eD{Al~{|?(An*+JQc%-m~I+#Xu8(<8fi3FQheuUL;D`7~zeWOJoR_ zf387Y^lno=Nao$oxsY$LxdgNfqyZZuOgdY|)~|}QG%?dqCGvP*UN zKsLLIzxr+D?L4rld--Gkd!p|XxfG`bFoFstUKm6DyC2GB>IXiwVcw!D4|~(f$Q#B# zBn_xRm|?71D|STN@#4BYcNv)vl&Ad$(L7TyKNaK>Kx)uJ?#`74&RxtHA{gmF3_ zDX%l;8~lro)3n7RT{*8gxM0Rg1DwD8->9J!ymLQySjcHGpM8D z0OUYO*xjW~m;$w`XeVK!j!4cRLBD3rmFoBMvKhyiC27S5n z@T^4n;`{?m@)r2s;CPW6Y?RiP&qfN5w|&}ChuOgp?JgQ_y!N(G@BJ)3YgA8pwcEhN zfNQDPHUsFf?X|55PW;T-_{p8M{Ixy~k2V5MTC*K@(9ZH{4Fmq__Z6oN@JTVdEh!gO z490Wuft)wWfZ-az=|20C9X0VJnhNm=(P(Ey%BQqeJuzRR-SYc&b2P`hK)0zJ5y#8# zIM%-q7Uk>2L*{W=SWc5~KPVf#W_$%m>P$!Srn!bJxnpRi6jw<2EtcAqhs3Pg2^kXjKAVNq@EJZK@41 zOj%X+By`{vp{4S3x`!jD^l*LGoR2-Qtx{RLLmk((kNfYvE7rfi@AUuMykdRsD*apc z>Z#!c>Sz6*wy*x~m;Imgum07kVix@$dRbf~Ag2Gkm-W;md+OwAva+$UF|lbs`RVDI z^{Hj{JOE_lWCD=}=djY$O~2AQR{R6?~ENHw1!w2OCgG|I&ZWMU-&vT!qT zk#Mnbfqcuw0&0P>vyi-S0a%}%2y!J5WI9`6HR*$wUA<5ab?q4$h~raDkqmwQ{ktgMtO%1~38t70Rd1 z?QMj{-DqSKmp-oe_AaN2mpnM z8?-ji%Ae=5f;3>%D#|uwue9^_h1$^46&+vuvVn2|R8$|zOIminjoaM>>r=$W|3`$Bi zkc6i+25>yt`?S-!K@npo;bMRC7Aq@={KCKuiUTOm**QSQzTn)f93aM*U;#mHWhLPT zg`5L4`XrW>?fLY0d3b?bFZuZ5i)Y`y*z;ol-?lxyI^g&t`cDj>bAsb}+x%PnpXvWZ z?I|}o0Z*Irh4N4AUJ~jhVP5cOCJvS-Qvtx|lza~3pVWIEeR121xM%oZ3Cs5Mdg0~l z;Q+nrAOWy)f}F+vjB~O+?d<;>_#)?T2>Nc+Q!<0X%k>AoP=KKG0JIr7SU>>;f(`{x zWI!?DA_1~K#eoa>l)l`cmoXs9GbaG>v@to^08ezbCuv+9>>$X>!p-tuOn*c_i}-_s z90c+!7sr38`J?z*DCnkn()>4x3l!pi_s8G9`P;HTetH(o0rL7kYF==5(3S;JUOf8D z^Jnf09kgvhfqwQnD+}n*eOck(?3~Xm03a)f5dZ`Q>KXgP_dNFEwimu<_^%-Uc{_!m z`S&gK|M36kf&ah*|H`62H6ns0Co4DTsNewYG*C7541vI>!}JBRflfSD(7pY1>i+NL zbAdQPnG7l;Ku5y!iOt3NRCc^nQ7;s3P(ARptwCqnQ`PZwLA@w=fiFxiivPy{<^;T4 z)X(q_&tG!bL6-*GADJ(s|2OdOwY}hfjA3~?yEvZV3+2UluIJn4kJ-%daRZ*aK=%9Rif=`#*pR9WxeKCmR8GnJ#+W(cYfBujHW$beW_X3|X>Zvw( zu4X`z0nZ070CXKa)gAx-|EcN#jXVd2gPRMaA5;#590~+geJ?XuS)OktR@P_E7drbN zsi1TGxkh=>^(6ZR`z=OIr&N2k3zROPWa8ie*~rEAoL($X+k+c)Cjp-89FFIi+@M4TB_Q`xQa>dT z=;Mh62+By%^yl091qVKtPA`rJK5;ykt}lvNS%FV=^`BKd`;Y6{UoY!_@!h|y|Jy2# z=Nj*6_DgJD6mWq4@Bp1WplkFcHZRma^PZ`kpfU+m$v=DMB^G~Xf;|6%y>I}yo@@tz zN(vBsj?mwuFTQ%=e1`wZxc~kQ3{cq(;N08lWC_=^dB}iKCJX<%g12 zaQoYjsG5&_EfwXJl^7Gp*&C0I3XjyN4fS^=)z?(?=lCbu|Ebp#?0udm#Bw-LEE1_6Bs~TL6-U$KnZuJ3Jv(> zDllC%stb2%evA7qa`9epSGxaZPHqBn%=}RdNy8HLVfb1=h47&uw;kmzHQGFm(eWAe z(7nJnAL2uS_6c|3eURMLm`_?xR;IPzSdtI++pBF^9%7~8zLke+Kts38eFpw7Tj^O(jK(mUXrWUS#BFB54~7=-lv5*y4SRLhQje~ZFtIE9~Wa=Q*7 zAGV16CFBl6w8PZRlz3~)_G5t4c7}DK9<2YmVc~~1*VYQsxCz_QFp|hX6y&J(1iFf4 z&&VY!amCrizPNdujK1!y`=fjoLi|NPUqSXX%Zi7M^GbHW4RnJsyA?!gj6G?Om`gt2(V2g4Zpvs<8m!C^uN>h|-umkjzivXura z9`#tIMwGvvN?EP@yz+zCXo^&Lc^)546Pq3{%Vi(*UNpg?X3eJVw3K&L3NAT9(4(p& zn3TT$;?AVG?S4@nKJJF3IVQQ^sSmv`@a^0VvwdwjfT?OVJ;1{%abvL;t|vC0z)bZ6 zeIF+7W;7(`FeW}as(7wTIt%j-8h=3ZEdYa=mfMBFfq^4{smFXJ8WnHnL{h%}_^#6q`X4nJFl9Ow$O z55BSckvA0{8R=_TBrhQ}G);4=JXxwYxMRCMI(YJ1%gd4RQf1GoQ;s3>0B&Jot|Or9 zuDnVPa7&3vHY_|=Q&faTCm7T0`McKl+W)*4A67fzf+fq!Kq4nWZvHX z9dprzVm~1-CyIUg=cH9i@~hQM^1!R~{NpPwn7f#->!kJzE3D|#&?BXq(!my#S)r76 z(m8_F7Xk1Ha@F*mH$iy0_gAN|8LyGjQ*(;ta&PY?-tei*%N;|%?paS(G_g``PB_6` zo!(HFndam-}eG*qxXp0zI=cGO-LZteLOfKpJoHw;b@$)-FJbLaR@7kN>kVK^AdTjm=)>jg5mn>$`*rCE+s z6Qr)oEAZk-F1LAw7VBi}-8-4r`{aXBOh4`rwc8f@XzbM}2iR~K~LKk6{FiF>ew z5AR7*Zdy0KvfqwGBHk{316xcRsA7P_#*BR<7JUw#I-Fg3Wz5|5qy2+Y;m_&HeVjPY z`(O27<3mgB90IPO7a4=5AP@!b93l;SfbPr@iImK}_#LsUH2B2_J*uy#V`xP8&%7S--s*GD z3xaERnrPH<^(AX{0S?z(6*oQ9mTFMz{heafCVE`Sq#JZX*S@?3wu-*kDIOOl ztYx1e1Er777}yuJB*GEcPhv=Vwyt5z)BnEWO(w*0-AVh!y2B2a3*<;X9g0PmkrW0^ zf_z*>(;3akV50LbrstR)9l3j{YQ43GG#T~qeRO$)?z^vk?17DaTkR%HpXLrd;JZ6X zUd2o4;Dt5CBgv+`R;K$#l&6>WZi$ThhI#E?>BB}K6$YlHoPqbAuT*=XJXtWhY_!s@ zWgSl>^tejaA>m}*`$AUspIqnbwRDtT2X@X)I;-C;8|XWmJ-x18;n^K#UMUREs$|LC zTUuQ~ZS~h@exvoypRoO{(pForT!noSA2dFgWvlmJ5Pd4y*ilUxF_aAZR#=J8<1>1>MBfZvOqgD} zP6%hqkhECzs~n4HJVG6}zwq^*MYKW7*T&VR&BpH?tvq4@sB~1~P@a?7NA5ZYP{E0-q~siC{t) z5XkS9m#4St8(VDm1|+Bu3LW@lCYB@{Ro#>!avLHfs!^s6$Ww|jPuC2J{4nS;Y889T z`0UgPRB*3bhcC4q{j<3@+kcVs#>c!fu{|_aZCA;<3G};cv=#*DwxDC4^1PA7y=&d~ zYMsPA{Rr#@v}no{t)Zj3#w-jqe&ahT(18vC-jW%q2fA!*c9Cq@#&T?AF41ATyVjmQ z?(zZA5Nr3*pp_|mNq3l+PeU{^~}s>Am%g}gZMipzw}92=S& zbHpSZcmnQf2O7%xP4uV<(Z|m{7Mh}8{g*Ep0%vg1DT6Z#!&-#!>A%!EnQesueyVWF z&cQJZShPXc8`A`LO4V|I>1M~zc(nW==g}iwYA`hgY#Y8At6XEc4*xz>qA(_3Oz1+K8wpUU zL#F*~m*Sx7b#QeX{d*gMvJlu!jG*=%pWIA>col9nb)KF?HeDvFM>|=1^fjJAPh{6v z5V?%RUDDg)tCQks+pU6_zOGx((QJ7wH{Y=IPIw#qC9Dq~9Fe=DoL@Y}$aH2Rs7a^d zYv_mcU(2eTe8U0DGl`ga{JPaFYa=Obs7F|KlmFv_Oq`E&i9@o(hBW=Kh-3mS6|9OX z7+>6(u|hIyo*qnq*|F1l>=;GKd~;8!qT-%*UtH>&2yG&olqCjBnm++Ebwr(z7UyN@ zbv=tX%aPzH==)RIGmUC`fe{_kERAfe(6`qs9hwah%=VEAKe*p}Prolj`K>O;vUWUr z*5uqZ=Nhzyu1W0{+6|*=&EH6C|D7A|>Vh`!^U>wQS0S=pno|)8#cX$DFX5t?`h10x z8QTjj+!kl`tAPIfMUNhd7O9ED_jCPhm{)wSyNt$^{9-fv*c-QZukR1P0QHv-mxKm? zXZaShDBW?#= z!&HfOc?Y*|ohW&y3gRjBw>TZL8h|BFkJ^ZRw`voKCR+aKt!6e9tp28C#CN6(YfL=s z;ZRZ6eJ*g&P5`Zuz2deVeamUjQRIuyQMt9@V~MXO>{}6nKCdIj4J8nKP4cEvePvC8SC~Y-bCXLM1J`7V?LTAeP>_;DbN*9s{#9WX+D6}}iha?kCv*fw>zcCu@7B9y=R_c?i9-WdKM2q=THnKDl!X4n)} zT!QUv{i(DHbow8VTC0(ase_#E!aAiP)Jv+zH-iY9gw_!&Y0H7%5vHhq-8wsF#4Mmp z&r0%7k&`FywdWC;io~jeT@i4~S5qlY8~pkmPwz&xHor7#BnC8E!dcmuWLGBbIHb1+fn z%n9MI^o{#$Omy_x4#I0|1&@(MBi`Io@H$rcb1 z1fFa#PFmo`uK3a%av1m$0gd%%3 zpI?M~x;3h%RgT!iB>7>O;l(WTEcUYZGtg&F4Fp~d>!PbS3g(1m15KdUZ4Gl#C>d3w<%>;8 zn#%;Trve+tKw>ineHgfQyIO3HvpWi8x-FV8Td@ExdZr%3@kGw@E%&TM?le6 zQe}?}6xsV95?98gF}A-Q0q zLtK-BnzS_vu5t46sq-17W~g%s{Eh4tTdglnlPJeEqcCMgS{lX!rx}5HMyodH1=*v#N(59Q*Vt* zy`cZ9+;MTkSL`|)Bx`OIDm8g^f&}F#U)*;~3v+_@Jb|PaOzCMC=$xZ{x`tnvX?DJM zq< zk#kM1WQtbpDqQew==ZE#{6m6Pvl%MBzbdFDP$ zhI9VMZ+qwb&algl?H};Vg@2u0*)z+sq(~AdeKZ$Zsh${<{~|Z5ChH!CL(#a0v`2{Q zaFTJ%;lZ76qXuK;wLqEuvkY#+Yl`Nh6L7j~gi9{V5aKou;X}(<9B+94l@&XyKf=})|zynrb5;2*{X-zs5*=`6ULmRO`?hHfK@+|pE zGIA@oj<%Mu;&qwZh`3`~EMi)tJ{_?XLI~Yu(56T#DQnb}O(3`%cBRbf_>UuO&D}`> zN>i1Rl+)XYkN)p1tDqF$7bhfV{wfyrzl;^XrMckON7Khy>EPXd)LP>5+)Aa{(EYvE_;GXs6#V53#z+6S<}wpvUkHFO-0m`_P@S$R-&nM)LkZ0HMJm63@W zX;L~AEHJr7g{Dx|rv0uQD$Caz>SjoW+4d=mC2xKG(^|N>tOJ>$c+A`?Go^C1$AT}4pH+C%;)lSH1rOZ@({=r7 zWj1^DR{JA?m-RN#Ji3YI)oZAt-H864CK31c?14(BX9%#F5J;JAaltAOZp3BIG!#>|c)3>1^Fv$M)QBr)Q}z?B zobO) z2Q~o#`H&UykHpk)?U)5VED2wcotpyYS=lC5v|GQ{kBeee^urylc%E0jPVmfg2x(V} z(xJ@JWEOpMQ?|KqWb!Hx*uh60>KzAdH)qZ`nP>i*gKT)j=!#lGBF2`%9=3AO>8Px;b3rC}bnkb5Ys8qi1b*y)&9g5?uc4c`}P zR^;STjP3;matfsi&UI`C?jIbbHa|5Cc$9uiMD@xw_$}!mT^BPFuU|_N9%W5VDjz-4 zG}E98SLN;R!4fYrf7_&Uh<@#|JcnhRE5E%7xHNUin9~Uc_ylM&Qp&tDV`oh%vc}9F3JRu|OyhO>XK%>l~J6~)O32@#ivd1NZF4e}tK5_eq$r0uzn zUgef!j!@0?U`tFzO%2h^tmgfWz-Q=p44AEG@Z$|o@GaKo)!UIR+EJ$qw<}@@w>nca z8?q>&zHhu&UF{`0cY1=7OlOShDQcC`o0IuOxw*YwyBqoz#}2Lw1V^#i|1fH>rjV*h zpGc&L!t2W?>gV8UJSG&*YbAqY6LbggHIoq%n=&l#{ZiiXm|5pLP$1D84?acLhpFZ; z-s5Lf;#$YkkY~RgO0*UuE08up_p4 z2l02RfJ_UuaDAx`X*q4(|03-iqa*p-bsbFXWMbRt*tTukoY=N)+qN}vGO=yjI`egw)V{h_O_`@SBtAIJgC)>}d4X2Olq9NTIp1^vrB&%hA=y0%}K zS{!GW$51BKNs5tetbBy1C_0?19?K2;rQ2ffXBu1siJ|Xx?bD=AFArm+^S{b1 zzz#&H(L*NU*A}VzqVP$fFU)=i9A=WCg^j1fUmTcmNG_QW8deu94E8Z&LAA<2SjnQ_ zgQs)F%z1a}6M`rPp$Yut290<*N&<58yZfz026V3WN*SDYoMclx&LA9kFT*XCd z+^udzO{+S8JEj)q0IuLdt2yQW76FDdI~bFxRxlzAhm(x&vCcfupx-mB!!OTOz?ez( z`*AZD^h`upSs%RzL0=wypkaEoM{X}S3TnNz$jO;$eYa;&@3K=wJO+_3Xl$6H7tDBl zs;p6eD0@c$t2LNWWolUZyb|K?J(tJ0`YFlNHtQGN6OOfzNUh$B1uI7Ew^ci8;hdrq zxYPnNEq!IHQ6|g*H4BMG=uuaM-eyRqMRhi7K+Fj8#_hUydUsmRRBM(wgZF|K`Tgt; zslE%LB41SSIwTlF9r?=LISiH3XWgQ7B&$eWjBa-7VW{}S?=1}SKXP(iSBn~50%M7n zB6+OP8zq=O<@x_!gwv*1y@W$KEsLT$58o(Mz!4>T$uO6eJHV-5V$WnOwLTAgIcpv1 zRz;G;ekOP@PtH9P8UHpL_Q?7mqpgZXrS5^!HEJZ09YIzgmyz^nFm@3PQw(hq#bnib z$}*L(Gh6^;r_>y}i3bHGuc>qnrRr~zie@&(D#?>u;nC`SC7{K$`sgOBaS$wiFD9je-0OXbd0Wsjxz-~*$3XaZdB|ayq_MH0toisKbP>xtqGdhu z5S`~|u4JA-E^32%AKss1^8tP?62^C09goV|u6t zxp=-73;3TxlmfhJ(=21r;1V=`y*v!jovYid*pT#cc(lp!n;LYbUyP(|Ou<)b>5QXs zL#1~lYq1ZUg2aza;ORv9bl;cB<@BXi*-2XlPN}%pW@bKFynu|C9IFkp3m;$)h$a0c z{2LfP`ahtt`)j7uvQVI`oj5~*2X75(w!A3~toF+bEf`16#)gQTtNR0+Sh40l=dS2` zU3YJ{>A;|)ty1?fN`}-N)ip^MU4~ZrUnmU2*{XJx;O$jQ>hLiXy*;;;-pg1?GGc18 zHt<7gOy~J3>eW7{d(0FXy`WAtn#@{DX9iV)9_lKCpW#%_AM+F=w9d z5^{ODGNiF$<`kKFRm|*mX$xfscR(mfDX?WON~_y;D)(X@hHV{WEiG`5eRhOicwB|T zjb4|js4JdGRVdHloT?MrMuBO6*uVe&^zOaFZCRmHAo?v>qFR@KP+ZLK%74BGQiX~u zVy&Yuo?SIqFGsMzrx*EakSDqYbnTtm{o+H|$XWigt{pLK>Gc3zE@FCIxUJ&OO?u&I z5?r7YHywX85{IeMY+C|)U6MKgl*T=*N3gskNl9(>m0`)kj<#a*bU*hRH|pI?=nd+2 z_CJpvw(#KPqhBIE zuh@r0C%PNcquQ{0&kcYME6#l4QYYQ$4YvEYqz&5Y^==3`>HULrmE=7>6G?^lCcuRT6ljA@yeo;xg+e(5e>YLJI5fSh7zZk z2b?g4sb-EQz4XeyORb9%T>V)2k=nOd4e&X%7@wQ!RcMwz7Kba7Sea5;*~>S~d~Qj< zD-swk#tp+?TqODN;&hD9;u5XLEu}A7D%Rd5(;yYrevr0vaq__(u}zM2a}_i`g{nv6 zM8d9|zKHp3fY8fD)GmfL26RYX9i8wrBStqneclk&AkxI1CYm;pQhx%ebO*exEFdQ( z_=>7*WyP^pS%Y%>$(UbNC?zK{jw)LXg!d}kuSc})HHCcN7*_!yi zEskiQ4^4;fDFZy9JQNqE&K(PR#@}Q5>e}pUTcvI{4`P@g;AVoH37i-lpzl$-P=4ND zU#@*9o487PpBZ!R^QzEt}&mKd+d)QtdJfI?p z!P#6p33~LE+LTIqf8Loz6pAvWMUsSe#j-nQv*A9zCHvLxPt{mnjkr)wk}V_AW3~e7#UmjTz{cV|@`{z%9Z7B4>k8 zRmEpMVz2@~3c0*}g983meSvtwHX%Wx#3anD<|ZI3s_j+mw-tFOTfcrJI)}{|(D8uV zB4RksKo6RSMI4IuLY^l4@aQd6Cm!mAXOXJvYE&CO$Bk6S3uvU$>i(nM zEw%Ek1$f}5n{~8Aa`~Kg=a1k=)6SYfzd|2IO!ykT`@zAIhns1-4xBDnnZqPX=({k8 z?(M_a5pGxZ33&J#ZDpg-h>Q*yj~(#!4;mHsQJvsi@#!quAz^9zu9oe*d)9*uc-skS z%_?jg-?STMXNM}NZoA8D{JVav6fCypsr|dYF&ipB5bcSZ~5HwvSAQFnV%nx@w5Y*0#siC_u!^=@Z zZ}SbFRy028>A##|eay@o+6_`v-uoc(S^V5-{kvuNleh;~@(!2^o?Z%gNwwjB&)q#s zAj2lHtr%nA*zI1H5|A4TNG#~0F3e(z4UbqkIt2#>DJob28@O; zApfC0qNMfLLu!GQ;Ol`{B9f7>dT!jJPms1~RmD>#tSgs2^kS5@foj1W$plgwW~HEg zQ0Tw3MuhXN%_H~Lb43nSm=fqfLWB{@>xe*uEExgb3j93_I~^akvhO~m3m(c~McDWz&lycr=)HjwpPyQMxblJg-{NUfFHDQ26mrO?%+_HZkRO@6M9+?NDp zZ;J|P*H6HSH=E=Q#z z@&e#zNp!cXR>Ml-N$9zFr1YMKN#gTiulhbtd6`#wzb|r9a5d(MWwab;kV$Nhd*nVn zW>G_()bFpRGecYT5=q2O9Muo$7pKPr=lx(#wg#P0l~~1^i|}{<9l_GP1!vYiPvwNB ze+x8Z=yca^wvL_KY)<)LK^$0)s}LEM9_mwZj3guXrfK@eP^z=BxL(bPZL({Z-mPXg zAoVCV-fVsbOIgcBqt1XM2s8|GA(@(^IS%-a{R)PGqS1&X7v{L#Z_5dU$IOy+7;Qb+ z6Ct;T)-6*me&6DPeCJ_zmZBoGBf@2F_NqL}2uZ0d+j@)~ThtAY zzF3d>w(>-_adLD(Wwp_L$%LkB&CB+ca3?9`Rc0#@Ut=8}U4syFnkPb^iV&0PJnjk- zan_yIc1%*RsFqkt>=$})&F`SCvsd7^VI0$G9zBPZ-SzM#YC&BOv9O0j+gN{ng1e5e zKbMZ=qI(W)xFs57>QZ`wTW4|2TW{xtp7VUZb@8LH6rx!*9&ODN-15RKkF;vODCH+J zmcqpYBR)pr659AC!&K)eKVIvAKo#>v&%e@O(>MY)$ z_p3ISRC3lBEn$bvd(-sF9UO`gETkv3s!9eCHR#H$YNrL+=~*ihZz#TSYWz*dESc-3 zCeJ@*!U}x9_mzriC`H`^jCWYnOw4L=1Ed{w5L8me_E5V>U=q@y<9X z%~ZHkQS2wXZW)MoyjCpGD*o2p7&m_=(6w_ruy<{yZnC-yYA_wleqs}4?NX~La(jsS ze?{Sol#m+mkEIq&&zm2AN->=WZdNMVoC%a#NmG6JIWesfpYP|#$<3^rJ1aEcpZED^jh5k` zMF}SZYYQU*TQh5uf5MtdP9`?0e-HF`Mg2cs#LWE9G0Y8q{p04M00;mC0YU&_fCxYo zAO?^CNCRX5vH&@NJU|hk1W*R30@MKN00V#_zzARrFaekXOf3Lr0CRx3yS=%IEx-a` z1+WI#0Biwv06SX~fIYzeALp30iK)}SAN~60qXK>b9088j29D+cCxDZy9l#mj0&oSm z0o*D7{oVgc@l6Q+mh}ERZNm>8+R2Kk}nkpj#?yu zh&X-GJ=6N=wY}{)mHVt~#WT}U`&i?8qG#T1oC?mN>4%DwUvsg6vq1!;;fyIn2*d_~ zj>gkn#e{JJ?GQ8$tkX{fWNTnx>(`XY;ui|jM@uk3O)x+jCV~*>9OTX+RAr+LEZs2a ziwXr&gxfcbC`Iry58kO6n2X@5?#CLaE~lnoUyUvfkcFqG-?SdNHV~&idR-$I#*qK; z6daHMjSeuHz7^!p$a?^xNm(*6|4lCaDBM$S64%Nq7$KOxpg1EaVg!L$SvNY+kCuVG z1$*HK5Mt>sU-8f9LulKlCoKNZ-kNVK@$W=%PX3GTFFXH2(8(#(3s`yAAO6|--#V5+ zUn4TVXTN+qC^|td2~+0etvu=d&T|omM1c38z%2x{X>EX1`90BZwjJnyK5RpWm4DLq zQC61})fA4u&8&ZLm4XHF>o|Aoe{a31-EL2QW+F8@gt&o3wX?UiwIKzEZTsd(e^;h* zFU%qR@F!aG*8>7_asl@+AbbK5_yEGU1^NLE;tA5118E=&Usg!H2MNT0#OIe>$h4#f zP~u1IqkLC8!AAzSAODsL2+Ml26Fgx4CMC25Dt)rs1GYc=Akzgpp4c9O*jf0L0RfWz z^o6QN$m-iB`LWaVA`|A5@{P<#WOiyEyVCkC+}7R(l$FPaXz=4J8nU6`EgDjQdK7;c zQskTuao7AFaCb{Q3S$cT)rd*-bnG6~wuv8B*Z2*JbO!HRMj-sxq6T0Y;X}*^e+NaP zn)W3qsGYzM!^l0y5Bp>P_bIF^Ujo6w{a7RdX6|qPppfP5m);3#;{B7;!D#@j{_(Du zH3|ZNk3TMV;`*Di$;r_LTuA5pON-wN+ZUA zd{!gQq$(4Ih4*37#W0kHlyDtAwt}<1Y7u)&*%)d6GXGk^b3>s`*!9IyjsgdQgVc0# z`?|e%YvRtfn4Wt=@p&zHRy!DHrg>>GHfSV0#*&~wf$4J*UeJGH8U+aF(W zBsrU2{l`Q6iNH9gs7TxnCuHP5&V<%;=lfqkX2J6 zX)~+hBm(xWEvX7GzCV5?jqh<$JLHUQfVg^j{=G<)&*ni+nIbX=_7YrHyrEb2Ty{C^ zejv%zQ=&8s&YDg9RaiH54GW*AXBx$$%(xKNs&#yp6Axum*kx*od;vdY=Cc5=XYYW= zk>XfzQu#haj+Q#8epDgGci_=Zu%W$~3D1}HE9;u4WFh5oC(Ud`G62m~)Dq1l55 z8{13Sx5hX5=hv&)wfviPF1f%Y)47GsOzfv#!UqXkRvhjy_7DTj*>e%jttdTJR4zr2xgnEe8c_=Trch zDr1cJ3RrCF!uYQQHGJiwcg&OZw(1WHpw-vsW5Bugpk~-eT%z=&D6p3Ytm-`%mBlL? zcHYF~St46ukz6f(9y!aSpXa#JS%$kZEeg|lk}E;0-4Wc9)^W5Rc(t&;^BX4Ee2CT_ zkxl_(x(8{FB*Pw)&_bJYANE_Uuq4Jcp-MBOVV2Tz)1vmF>0eAJI!Kl$=anOA2|`#r@@2v9xYkxM-Frt!B?3j^L&b@?#8M_>QPoI82s~`{0UM z7?P+kYstKZeGIe9(y6T&jrNK!Tk)!fH7d6~!?a6^D8xl{3@e-F+u{5|G&33w%NU#R zm!AhgN0nt(uJ1_mMs~L38SiltABk7QRo5X+{P$7#`}kn25N@;EPQ;X^7bqV$?rO=E zM?PO6ATE}Diw+zV0VGf5T{4rYaSv2oLRF`g$8jegdm8Se?y6!FU-6VvD?X|?RW&Q2 zZVeme{6w=6C4QWpv=uc3e0S=eDL+eE3JWz0lL0P)ALC9j&$4(n;>m@0b%Umr!aptA28utEP zQA>3V?KsAvd8*_xdOo>GHFNpG)jCR7iXB@{GG>n~G#&XcCO}n&=xu1pw*pXy4ayY4BTOoQ^pIUB}IrFQ~@+XB1Mrf0p zM3_l)*p^H&vCsre56|8HXCD@#95o!H=i2;J4Q!#)a_T9Br<33)p2s6cnOl-yn2!Rm zXKBNmI};iSk#fRSjw*@8$3qCaq@B0)Hk~VngJ4)F943mrr%7DI9lQs<=Bi{B1WAhN zSlyPUI*6vuELJyffpsnwi+g)T<2t42>5J2qyzLn%jv6i5rkCHEHdiC*B|%a4eNe+@ zy}ot`992d62!(5joGj8}s0?@c>*bq}pO4=g*`o$pyZKas(^jp<{v|10)knntJHS|hM{wM_YB z)znJ?ToKPLjoO#toMDk{yO56XUP>qan z5rb=D6Wyrr&@{!zuJ;VYZ33;i{?5Qb%_Ya5g!f zc{!Keww$+wZA;`6{@W6%_@y{O?~F5D0N#w}-dMBa&nFbc{0GYvEpTS09TT>Tv=+N8 zvP}-T*ADinM{Y$PBBi3MuQMEiC$6nWm7%_jIakEzY5BPLB5i|3oPUtLlTjkyT4XHH z`TSQI6qMh*!O+)@Q5)ogaqy|zW4vD8AIPiLSGbaUHkQ=w+Gtp~mZ;^pC77G5XFwdN zr%4ch`SWYUO7?Wq~PtML+BJGXvRbiJ9C6#X0FuMSMflr-C=qN<6c80e|6(Wtd`N~d zbq;xr0Zt@~){w_T%zA)bbkXh6Zq60De`3xHiPXo?G$95Y6263NpQ6)Lc)R`Fe$ena zVA>fZeQEdHPE7?ul#G|70)S~cU*vW~1LN!UQlNHMsU+gE)do%8CGQseJJrp@p@lBS zH~7;l^gJIZ9n*(KPfz3~J%&0^wd0aJVK1GqaeaJmsz$^IH%5;HIs+&4NZ#B}^T7dU z?zOrk4CKs7V|GGL*wcJ7-V+@rCh<0sUiQ=InAke{iq{~tbMMvEnN)%N^4uWLiu8zTKA4U-sX5rC9 zeC@1zd98wRE3sRGEEZH&8i(SyE`Jhoe=PSWaU<3S7|1;u_(Zj-K_g#BG<4TMsI+k@XRZScJ#U8S%RCHs|R6z`7^ao2{7oO$sUeM&v zmq2X~Au^xRVuLo}`0|=xdJ_L}m5IN(bJ_)l(LhSzH*tOP>D2I~0Uhbr4(M zB#<5@8WqvGlIN}NSsz7jN_2!dahYy>StA`hs-1I-$OAAAWm6MO@l<_TeIx&77Zyo^eX+mw8^Zi75vzmOca2Jf;$;-}XWv8oRIuSo!^0s0zwmMZC8-cui9V zCAv%2Qv+f_*O{`piMYXF-*#`J4r` z(W=%yWU<9qkAPK9A%i;OZwYHE*A=71+#>S^K83cBS_x0_1+pEFnN7;;+QfrVdSh`B zkRB->%lrrr1%K%Ar{C+>YjJrbz^0aNp;#1O;$>d8xeO^aMz-8P%6kgO9DDeQbu-SQ zP%+5Ry-y>xS&JDjpK!$<|8k#TOKHZ;dy{hNY}UdfsOC-cB^5N~3gcYzZj;)#;^*hK zR&5n{)D_MaZ8l>lxP=N0u*iSktuQ}trD6Kq$iQ!Ymwc0!=zI8$pu~ykpv3{RR(%4b zZyMnsPyMqz#VV~jD}CX%z^W54ZlW?91C+4M@69uwh}eWVM~11P^RwDFOF$glVm2O@ zYZF63V+~o5_wz`2HZ!ndwmvEf2~|Dk#tjQ=s`L$3(~o>3&sPlf7Pk)yERr%J;5I{i4OB1NK`Sd*TaV?gxaz8Rf5JvBJfGuD_;T zp5x~n^mfPJ;%$eI%oaf|wNw?J7r7>!my}ko&8w>ien)HwHh216n`ytg(VcSHm49_n z&7a+rm9nF@vz;c_Bwmp8*=LjPNWhxHEGKneT4c1>--wn5G^yt#uC+Bp4RlF}IJGh= z=j;b~8vGiKFE4($f0o5;o&nd;5-u=lH1~vq3XoNbD*A{u{iSH!--KdMQb-oKaaS zQ$%Z_T%^c_H)T~77umbCBXZxzG*193iF0MtU>ucU$D|Av)tz6oA8sBmizK+H7XeDQ zH1HAT$MX>aEAvuAV0;=1WY(L?dTe-(IAT}Om$~MaB`JbAp~@oH)1Q=q2z4~>xN6#G z12|KFu=gSd;wj-#*B%RcegYG(IGM+$K_~XH1>Vi{hL3N&@nRI+pmA5imB#CZT;GNM z*bj0uip{XAlR&n5=X4y6_q$HAAYNlJ^1kY#AzGWh0to`u;FQDv{@t=`UzE%t>UWA1dP(y;732I$MAstV zv;Jb~j`{#A^;xKoozE(3tE%P4K@s9g^f;R*hn5ggkt^StL5zSxwuvz+M^t3 zKO2=)rLs~lTbgkPNs$L`Fsy!-orn-bn?~+x zDJgDKwBYr{#rR!kQThP2Y;q@f4es5MPQrIeClh+iZHLP{l$TIhbOwroA3F!#g*lPZ z$gazCR2(zdgZQLU7imL_36rMgjQDEH9KCFWh(eE2efJ=^LSEyoqD(*2ExLA79XGUM zREes9h!%`vj|?kVryf;L zLtpBwv~E1w&oHEkhS)qnBEdVsdTGot^LL4?QW2xyLcdZ>#VVoNuBJ5hdgbem@|KFi z#ycu6?SNNw8wYH3_(^EcG$(iJvCo*MV`85qY^!j*9Uo(|Fy+9zE;%K(1Uf>UZDRXl zTiD{?u%5~K2A_;z>y`q%_5BeqwSt_p-x%%1lE&!)G*|F;qYzGWPntH9)W!irxa5i` zX`F$DOm=aGHL4T^wyqIMYZO+^QC&h|^UuU@#=7s6ZlyCZb;vXEHn@6{6&B1ijBBg3 z2z>5vq2!LvDGqx~=949wpinTf2D26j1&Jri++^8;ickS3J}5!ZhQ-`){v7atVv8#dyQ3Y;Eu%6VbKcFS8;4VW=etqye z1U1>Xr6Uy9>NAx+ulCUMbs7--CIAlm06&jdtPLJ`^a(L&t}mqjsV~=?w12mjFF?oY zjJix)D)x%auCC7|e)keXK<`;%KyS3(HrI&HMpT}pXcH#F9oK($$s7D}#o9e@D4n|b zVu4A!T?bDFCt>6Hol3K;{*fMof{{qI+8+!Hd_f#4ASpqx4ZT!&MaiRRLT+qd2^mqX z3EyxL8L;<2Sr&||(+A5NIJVcro*af`01{O*-MLz&e3A&`sZ)!)GGl-{4=$n3ht|S= zPpW;b{d7`i7)>H0D4S;P>5T_dV)jyC<1?RPo)E+K%eY9-H*+5>1bs&nyuI9}%C0pi z_<~fCt|4YRr_w7+&nHkuHygNZ9(`DS<5$a0GegMuQvdw1Tv~>M8NkomH4*HGO1Fy3 zw$z`Uw~e-jm6hQNsi0>JWiyRDLoaHfj4dF$aBtq}@fQ;0CGk~m?<{?{&gp)m!Lgw3 z%U0EC`lZp+;j!4`*k%+a3eCHLKM~R5(iN2_bsk~3+SFaT$-(irZ3fpaG+YHU2vNR09g4ZB`=hsjYA}x{`%dk63a9tU7G)7QZ z)bITG#hPo^hFMlzW(fQ+VK=Pz_11$AuYD3>vAI$O1o3ieOn;ie2S9EeZ`IIOK-Kb=G=KIaHTb~z*4RWpDLbbA(TJN6pulack$3I>=56Yl z=dgE-u^;~89)Tk#8(vPd`qBv;$b6@d=9^I&jNkUN8tLnoPoPM50`j^6H;jKrVLz+1 zo{}~3Ay+0mvdfPB9cv|;F=xZXo47`Y)qwcw4GjZJ?+U1E;7p0)8O46@+>m#MMUG|o zIxU)d85nG7rhygiU??F;u(lr;9xX}{&^RVER1C>kh`L}^<*sK%WQCUOM>(SBU@c5V zdI@$u?M^GX3&jHV%tZ`6j1+uE`DXzupLnV4$o6sJhU)(4TB+T$%DR`EqL@X}YWw#v zP^J4zAo}aV)MkW98Dz3RoukCcFSZfmbVPqf;@sZKsrl*ybUw`}^W3R36X9Pjq8*4@ z$6^&DFa@L;a`@=1FO^_A)uQwIV6Z3gTL`L?jOQgX;9Q6&+DeTdcjs>xP8t$vW3~LZ zh&PJX2lH72X}j#)Y`PxK8dnb{pWOwJb^baar{!CwG>sII0PE==4R%wCF|DN77e*+~ zFSEg1orO%#Jfi&dewbVtmc*A7*A*xo;sKIAIjJbDUr)c6(y+wh+{vQ>FumBl6J`|) zXfaCTqS12jA;b|uNd6lwg`#dL0u8PE_p7C)*~LBRP=u57a`<|(iv_Y8%%xqOnK|XF z?2)m|0j4ntlHK9a{dkt+S%9T!R6GBW=ElqdHE%1mazU7On+^>^P7FNoQ}Yt-wwl#p zsdaLC@fj^|;*qOOICRHe-otMU!-w?v7cr;FfTU5zB=Q$(%x10qa8WOF@DnMBR8&vk zirKd_RpxB;cm?>AyXqqQ;6A+S4bf^-tp!?#*s?NuCj#+&-drv{gx{ebi*pKqMkJ%n zf`@9_1t>QG7}caevifiCAL#snR4IE`LN-cJ9PQ zewTEz)~m+h3>5GERI)H7mg3t&iDgl!goUnM0ja$by-fcNgb_uE*E1L9kiHOmEQWt4 z4eRS|^>R{T&ai@5@YK`g1#w1cme&D5>e2?LuBJZ1M?ylx7uJGdo>WXID*vc(dzMz< zjl9c95KO*cVb~8#Wr60bNYPq%s~5{sA=EE7I(~(_9Ybz?kJ!{D4K9Xr-0Uj4am`t$ z$D1DsMzKwXpuoPt4y3uDEftI;=eY;+-?ntuo#`7j4YALJqsI+H%{9L*W$t=uo! zJ6{2U-y?vdF_LFXBcnV_H~Ed~sScT&L6zHqqxPvpS8fpQ14|?J8+Nx3>{aL5NkZeV z9c6`3i#H-y3(LM0O+B2+03MJLM2bq&Z=*;3oKc4(a=Mq>%ByY&SwVtNb!o2E+v7qs zjb*Pfw9T9+jyE%!*tI?KIaW8TWJvOOXd+#`!-b+&j!+xV;K|`a&dvDVVPBya+&8UUrVZV!{8ef+)pAJ!_(&#Q_c&q~F9I z@-O4PnxMW|@ScfSNeX%n>IzBWGfvBdu4^qcipC_*n&J`%FQ{4}bTv9{83q%b7Q1dTLA@}_T z(LdZXIzBWq5c)f2FA$d}tD3f28@OrD$rsfDRQOV0dWl~N!mpsb5_J@>0GPQMv@Fnn zi9ij3%&#mPm;bUBl@5p{4rcU~XEX~cI2l#n7S0JQ&7YV$78G>uY9cWSjjbc(#UmSoqH1>_4^i4~5Xlhn!Z26taZ5;b0 zx3sXeHogCS*#8t`TSH*xN3?=-aB;I;yq4!%MHw(zy?OD?MSX5*X$JSxxvmKmSp5r1 zqf=a?GjLL+O2=On2u6tu{m-^TT;Qv3rl0ltHd@-EGbyP_^2zsChHt5|bTzIv3pdU; z>SyJXovF9M=oY(HC+LGln!36=VQ^gU_lMbwUNs4>pT46N#Hhp00Z1ArSEffE|1?+- zJFspQkQIbu92d|5{O!c#0gy{D4KRPpU;hxWi|FgQ(Ju#(G?8!Ue;h-mx4z+-V0|=? zf>l7Kr|5%T|rs}O7H0H0q(f8O~*4T8_-U{9({k-8nL0;Xh=A?5*-uao!``q-tWz06;m@I$Htu$*i692(@ zg4o?{@$?LkH9tJXFEknJ5CP>V4GevyYC^{H45K!d=Xtxv_Gk!bZ*wkUyks5}JS$rr zTcDrI9v|QsQ03DnAs?ug{qedMMA-ZXkn7L2v9*CpbV$mB`LUIYHajwwv(M=C!rH3O zVrOS&f`v*eG$VkegORzo_GGV?JVnDjwk3?4dqq#3mTf#vx+)mY&ekBXvl+KP@w1H) zn=#{B=*G*6MwDas-DW+n(*2~8%^eRZG~(SU>dy(>hTC-_^dc_S$4Z}s>v#0^3DVM; zCe8@!hFxjD3Ymk8VQQ`huB@ldZo8=j-T=ABVC6=5skK&)HgpUWIa{(yor>LvuT7q|9YroCMQ^(s#oa3}-Htory(;QjC`csaE2I!GUS2-9 zk%|*J(1ArGmlEQJB^TdLk>iSHRw~PToxq3n-Pf2`S(6-d>yU~jqBxxwIj5#g0&SXU zX48^iTKitL(;0~8L|~JqOR}|MQ#jc*E`gR?N{JMMs;tYD>jEYDtlj;#0+s#jLyqjV{#$nemWcxe12+0F4oH` zW=GH|K2kMQ*EkmLYnD@I3X>W+B*>a+x-CqxI4saSrrmK&?q6SP{AOz09Whobt1BB1 zk{kvn?&-u06n#)7RW-IQFFWlBcDlyfSH_IK29p$gFC;f?lPaVD zne`}Rb@C2)J*{o`MC<~8%;xcVfFl&-3gq_}v{^sSv~rvHOnjP4v;s*ks^WW-Bhr+B znR~8{{fxnyqn?_)tpj3{?66!E@yf&`Unls`-BnmXDZ-G5O#qr?{pBg5qw9jf;pwey z#Y?>GFxXK_0rT-89WQ&oxJJ+IpPj1?AARO^tOj%KG~HkxW0LV&jQg-EQ7aE3^w_!Pp_iVI2<-Jakx>Uyp^k z(L!o3F0>D>(TOuPh(hHb|F~2O2`XGK=y~%wcdJeX1U(;hclYL zwPG{a$vdsJ`ptZV-ki#saKJgouMVl2FI{7GUO~W=@1ppUUL#8pxF`5LmTR9iaFB_l*ui*j%>R_Alb{p*&W75Q(KUuJQL+U)(7Y3ui@~92k!-Z z?)?2F;|prtMiRL20^R(>R`J%X zEq0H{E%>U7&!`*PK3op7%QEtPn-h08XDMO9+w$ZgJ9|`Wk26q{p~|&uPMV0rYOrx?El+NLBH5 zvymh?Wki9fb_SJ}j(Q`S{n$DwbOAbIa_o(o&xc9=oP#ELvYe+4I8vN4e%f!9^UCxm zQ&7#4PI2#Y!Na%k6~E3B>)}h)dlv)?9$7+QSmS?}$%&Dm*fbskBERsEV&*APxI}zrIsIKAx}a@XP(a7+>GzMqmOiiteb8R2BvEr1Nv# z>*y94n)wMtNbpLFlN_#)U*JnmxSDZnN+Yyw+!?vGXYA6?Lm8vK(J;QdCx>D`F>C!t zf}TTRQP`PsnP9C$v|H|8)iX4pC7^@3_Rn6jj4LOUw~`O$r{t)?JQhd+3eUDgxyq(Z z0Xb2?=JVS|XE%`lmFf4ys|U)kP znEx0Pr0Y-twO8q0@_o5KlCOy)D1#+!!6ZNC&|zGWw7~^I8MY<_`yh;E>fXtj=X8*S)*u8j*c{hak30Laamdp+{Nd>>6;>A6$1sVG5!&%=hD{HDBHzpz}HSi zsA0!c^kw5#_oN%&%PD{iYir$YGX5r$0UVcxgx>E{JDHpU$bU!4Q0~xK7s?$rk80NJ zZQ3Y*oTdr@!Rer%u?E9r^^NO4@cf?PI&3rF@RN%tk=feXiapUvjC`hW+ zuAWr`P4eM*+))1Bq1Xo;PB5Tnc42AiCDy5Y6>KKTtj%pQQJXB zTZnA<8#a|Fka z-*h~tPxr-~F~VK954F=U`x}tM+WLlJ+nEArT_n;}9IIohSe7TaM#b%@2^q_5{iwzD zGn;vkM2m^S_PDSZ!^OXEmoj?q!r^3QWjqcSbd8&!Le#h?78qU=90XC<^mz1CWb`$I zIYYgPbO+u#nabE6dH*ccYf`EZ)#Nnna$iF~BDX}S2+b&MQIorwO;Hj7IoxRFuLSWsT7%yJXYC9P3F>KN+7llvM|o0 zYqI13gVtozK|+{J3fg;~*{fbk5&txHvSd&>E@#$hEBC{h`5=MyQuM>adHIJxYI03S zUb&R3&yH*MOhY(Kl+xSLg(JN?K``>e9(vJfgb40B8Ayj6>mzFfN{bye)3H)R^A*&# zM+~#><~h~ceau(LBXb)!q-dw(iiTy#(jjOjrsVpV>4N&uBVJ@p^Cgv!YJ4+wHRzp{?FKwM$8p8%n=DpTZi*j+|RoAj|eOE7jg# zE6uSa3+zZ2KdgdHeVc^-j=#dN_?jR#=*|k}9Sw9)V-WPeClOFyRq_PmH;(rL z>AIzTaH$9{JySZBAuoXo={-6Ww@)6k+EC0m)gABi1RduM>fYVQQ<-qCywotPHidP= zV=&wej{Oa)026%>6SXPfSF&+KUE>;EaHE7}F!;WU2LZ#-=?~8FBOX6g7|Y65q)8{F z!Vm;jIy3KfIjw7JCw!~aS$5?BNNv9EZz$C!&I`fZ@0LCdJUJ$}w*gF{PogKumC@}H0xbGq`NwXS)*qj<`UlW~}aQh57j2-o-L6>5Mo3~;` z2d}EFx6fuL)F;Ef%Kau&xpt&&IWGUl&5{visn9t(O~n6dL-YYb^EfgP(2R|CN4 z{dF;~Xxv5W(!-949KrfYV?<6n(+lAd^*rR{wWI;(gsZh1Yg&;~%5T8FwgB3P4)w?y zWqI`Bvjzn{6)!Nwxmu3vowBxo-kt z=V$k9iVBK>y0Z=36@G|6uH$VnvDC1>0rYwr$(CZQHij zUbb!9w(Y%a+q(Pj)7|M#PHws$Dzhr}RP|Cb8Q&N#40ADZZ3Y=&eh=gEJAP{?QitH~ zPMywOyYMBnY-Qg~4E%BA{N@+dXuD%+5fYmeo~RLb<2Sv7^o%$NHfkfv)n0N>Fa^wV z$PJ!!@$Sruh2}(X!#T|r5edBx|0eextBV7=-f1Z@piO?XK)Mfodr0y-WW!z~R}=kV zlRj}48tGjNU-MT7#zmSrG9?=N&0tDIKd2n|AiOf)ABZ0ABP-52)7IVk#w7?@+-ZV! zFx8*Ch-Y3p^!pyjl8O!!#b0amF%w-N-zrXND*y&Rvzyk&8xo8`vQrJpo+IIMFWuFB zIdBJ}v2686RdGcZz}oz2_SG(@Mb>fB&TCjFTlvJo3+N)%4F01MJI5E6T;EVWq-K>L?p}E6lJkYXi?%pJ%oga(B9UXXtc4bpEeE{>JHIF2C%}1mP z06g!S5FtYKy>zJ=j9R`PaM-OUi=%2Cw<=q{Q7V&RLb-5PPI!%_Kwg|SH-)u8X@*jc zcXioWXNzLMqj!Jx1@oc3Es)_v;rj**&X#E4(m7z?ZNs*cbN$r;hT35Rs)4y~cC2ye z;C}RDLa1GhBDZF%#AaI)GzIt9AY?$s}seX%4q%~+*iwsj4=eO9n_7CJ7T*4b_R|&$!=eLx< z@kOy4Pn7=A1Ic7yXtj;DZB@7)n&VS%Ozn5i06N@BN7@JT>*&|F0xrk#Qu3s7GuFO= zBbQMeG+^GeHRh|W^Nw4$Wf&g-IomKXvGZFzd&_CjEQ7w_y<=vtY%xULr<=8rNTuA| zI!{$;eH!1%u(9Ba3Q;cr${Eq?=WfKBwjmwvuqQgkcscLWx^v{!AIeE^;u=|c{bSKc zS5rv5Gd6{YuXMK>Ti5>dnKD0O&$r@;V?Cou(u+<|C?Z3L3yZm5*>e*deldpH$^?tB zh#4h%69T5@O~R>}w~>OeSykq{unp`o0)kgDgI4XSy)rwbSh$ko_tJt=Ho?MD=$}Qr z;rES}%h*o-d)_e^UU4>!XQysZr;C7}_ZDP%3T=G1=6XK@DVlDwSC_QwM^kY5xD>z_ zg^Yj?xKz1F0Y4qS5x_TU(l6YT?e2J@@R~08$3W=m+uqi2YnGv+w$1n|DQAlROQ=-9 zS~robyt!**p04ZdNj5@Rx(W4hx-e_y5qoC|R~G;7K!!nPWGim~(vlYV3OZ2KP@{q^ zl+pn`DYZo10pAj%_6d7epbR}CD40fAi-{s_rq!%?fA?fWUh~6}vvrsDd$>h&C{j9W z1)go1=f!&s(nHVbyqFnPVsV(7=4hY=0*il%j(Ssl0>u1wDq`@w2Si; zY%&mp^e6%r;QlFGJrbuw3LirYwMUM|5fvU$O-{1%^LS5K{3#ITn>zRf9byg?Jh+Sp zvZ&g7G|J8;m+zv7Y1_LCW$apdXoE1X22l9D>U3enIq@eIH6wNtnYE*4y$d64>ZDGs z#QQEVZ^2d0dRHGRE*!;wKHHJF_Oeh@&rG>**po(~G8A@wmXJSmBU$}-#tEK_*HtP# z@?(~jYFAM*mLMcoJxO5G=M1=yS#@b0_ORHPnBh4-htQ3?q<|H%u~qqf0D+`aZWX$y z5&786!Bm@W523)}L++r7M^^pX8EgQOh$TxTdniFijn)33ml$94F=SB9I8Z+IAl;Wz zesr^vF3r3_Dzd7Ya<+cU)N6+Ig*y0QQe^1GGJk`Qh~|$bR~7=~Y=Yd2p#|Oh7bJg| z_Bcd~dUy-L0a`v|Ja^{n7+*<|wAu@oW2wAq^oor13&nt4dLp8Z3yaf6`r8v&)-HEI z^}S^qFyMX!awI=yZsB*)(&5%=A>`P_6tA%bg{%$TXySmlKH_c4q(`8kO8Y)zOv6!9Yv8xs&)dM?iC*7V+0rM;vq?aAh7oNLA>`?nL*;X(2s^HPRQ23+_F zCqjO;$A8A=?F}&R@ zHi&YUaAL|>y$v&5?AaBW{Ok{x+1&@=-<C(dM?iP+!Ct1ta1pF~WUBep=qb=H78^?jg?A-ZHMuab*rCu_-~mNd7=X|*4Gnk-8Je;)xCo{4b(Tp zsj#Xn^b=3KmTx69j%R>P6F35_}@s{|{; zmoBAM`_v3yVZ|8joNIdLx^e&BkzY7DW`Nmo6H!)Ze5Z?+CTT15+nSwp)+rciV8*GR zKR=y#rV`r6zq=uV8T&xHz#*%^4^6(x^V9-X$nymLNB36NRc4}u{vdlI>}0!padz4D z*?Dl=X|=x9XT3WO31OacGK4m2%?cw~ido#l8PmP#pgDb3Ws;tB)3W%vD&R0f;K@Pb z@{z6l_o$||XBGP;AXm`O3ZL&zF#^z2+WjwFoBST`oHSgbUCC1PM_DmK4} zS*-(tZS2M2CIJPAsoMx80o1?oZcSn6y4iA}*I|Q(-=_^6jS31G9>f9a@nXC+QbS*V z3LVq-8>_zQI(uxaQzEL@?x zKFKS|C-DMh6GO3X9TCxq6dG19vH0*cXGaeRkHdixx^A1u{l2h$6BrrKA8L%ajGtA- zL;{uRv~Sg-xP`K9aCwMYg@6AwBz$|S?X)c z3iznWykq*G+Q_!}-JoD-ReSuGRVG8hU{5Comd4v{F>NS_)gwqDKd6jH%aor#1l@&f zEYfOYCNP)J@j}TE*JTD)km-LKs3a|1MdS*l7MgYV`66eik3Es>kL++Z6LYl&hfqt7eOu`Q1H-79* z&CPrBD1Ev5=VMT$_ni>PdJr)+Pj5hTGBWZ#6lw<6{oycM5>Fx6Zec#-wDF>_hNrVg z{&87c1y@f$4tQX}VA0bWp!PeB5A^7vH@Y@Nk}S{fcSPb693f~Qw7OqGX3G;#WEdlB zuOGnLDZSFAO4U2dF^e-``UXM^SykE$c5Yu^Q!2y$%W;;wJI;S4l21HCjSZ53Pmmqs2_cfP46I@W6AtTq&tRZ442 z$P8O$sXyx0IkTJ;Q*r&${O`>KVvToqpMas9>ZYM>9*@PjZWvtWQn!C;a-y`>r0s|T z1~|@}=tm`jVif9SdSn4u8kinzTGViUh`R);Tsj(w?^UD8wT386FLYM5s1G zIM6wW?JlAo*S|!2@q-;@By4v$VDrgPr|H9H3uR1*eQ&~j^0Jn&03|%S&t?gdhX4)i zlSJ@Nb%Hy8MXlnm$iL0?D6Oi}`T;Tk|KM0Aja2)M$bss)9dcd+gY2n{Z#6fdKq zUR+f|-SmdXB6{5TnokWux0{e@CTM};yoYQI^xx&VzhqYV@M}B$Y*>=uzk+1l1ieJG zv?GXU9|)kjI!$9nvj9;d%fMo1IastETv^ixw!579?x^1$$qQBBWmbxVUg2yZ^s{S|Z(*LXi|39%y%9^60l5+pp zC8d9i&VQ$~_?K+`pEe85e{tLYUv!E2|H)>-@$a$!O)fDr{@*eS;r~`+q53}r7Di5n z#@41T|3gjjKiB^yr!c1fFSN+=7kpcwz9qW{Zu@$dax+PIiH5&Y*nxR{EV8r%P?oAL2MIlDNS8rnkr8xQ(Vh)t)l z6?%ZQ9mM|c_P-<8`|t*VrJWljNZY|3>EA8L8-$}L?xxrHjemxV`|vKc31!tPbXd-Y zM5>c2cT1mpqbJ;7y3DWN6M0aD2y_~dc{^)(quDUk`d0z2a)i_>VyL&Fdd3N7pn zOwRWv01&`|04e@N*??4Lvu1L3W~DH9)6)RT)X3-o4H=;+xIBmaUd7kb*MQl-Y+0RL zU$+Ta8A;3%C;?C;iC6%M7FPD)Pax@;8AHre>%mqTfyrOLgcrYLX%3)3sDEsJCE+s{ zex0pMtU;f?@|?Z3!PU{3$pgB3Dl(F`e_dBtKHFG4nU$&4w|>2;u8lyNnGjo>05Sp7 ze{36_QtKZWm{l8{7#l#+u>o^teoWb$n7{jo1dKn^K*VHSVMR3|H~noN^~I&c)ZFN- za^Zd@KjLot(%*9gn;aV-0M3{g85kLZaRm8)KeK**DM{_jjqI&V!8_ruZ~%zO$%*AX z=6e7Tx%;y)4NT3gP5>Dm0nSZL>YLmFLjeSc??KbIxCeflWZ>KYithMJ{gJ@~6pwN^ z0RI%;4ucw?c$3=!6utRJBtiC5+{;Y^h)uW~0WwJSAX5h@e&h(OnC?QV=-&KW9RFvr z|8If%E3A`$A$1EO|Ibj><*;5=0UE&Tl0%>w!?(=9lkDr`X^iP zb#ij!WE&L4;7cwa5rZ2uV?DhCU}jo(=eqj0;rG+|J`Y$yoa`24(bDMHUKKzDX>Bq6Tt;H98Y#Jmp?A$*dbvdPi7s2A_DGgjAd*hSrmrz`NKKzcK zksu+T8knW=n;LAn>76^sX!>{1AFgJ{^e6bG)?XdOwD}EMu#$Gy8=z)jacN+2`i34p ze&&K6#MST{J!sYN5j|)W=nGn~=u4WD*#hr2V?(gOP0j80x+#ciqhk~6_c2rRt7I<^ z?Ru9r$Z7Kz^0NBY#pP!^7z;n9J3%?Ux!L`Cmv5PB#Ofz-b%XO`V{Cj;zWStkg_>xekhNd&lhufhubn0WPfOOF~1*H~SVfk13bn5D9 z*(8nFfaI!JR69$T=1;WEj+GbM+zE;3VVsh#0q+1OpDgn#F{j~X{7 z0UC=^cRkjEdb~fT&z!lLKr)3-APar?{=r-A=Qm;r)X&>NIctd*KxBj*7G3`zj`_B6Z>Q8z9^CF|bWh7xP-YDj$ zP@N2UL7cf`r^~G3%MHMw$M9$**VkoSoHIW`sJ&4l<3Bs-N)sDRTuo;jw1i1{&!QOb z`!t;V=qW_*ZlY1k7zRp$S~Fz|?&1-9%Hpodu}Y$5C6NwkZR;BTBjW7Ye`YXA0TnQ> zW6hn!^^_H>wJ)uTDS9RSos}aQ3_k@NEg?%2kz*&Q{=zK{Onj zF^cjSh=juQ3;(%LHvd-1dUg|~wBKtKY!pF?w!CuEo$$thyj5|V+kYY>Bt~;C`TEST zYIr+gVXN+hLn)FeBr1in~O0C|ND1KI*-g2`fEF7`W`2g79A4@{>`a!sfaf9RrZ~bj;^Q3flO^_KCnlgdc1* z(hCDLV^hnbS(i1LN^4|{Pp3AJTP4O!1X!ij{|9c<@*TWNt@Tb}bjHtp)9Yf#FK2E} z{UnCxQe;`l*^$&YT|Z78;8=5()2u4hE_61e2&&KPP;C>Si0rV-P@L7fgBMv)d<&#} zm{PqA{AG9B7gJ!h9`A9@K-^hYw823 zv0M#5a#(pmT@vtbqtBx}NY)O*C8VnX;ryi+KHNbC0AR!I1X?Jc=Cm+wxgiX1j&`yR zrvfoqcS_vRBkgTlC$ED-Gp9^Fj&q%NZb2L$z7|T~(_~tk_QK1f-Gc_&JH4RjFkzv7 zm2iYmm?$>BL7qi1VU`eJmEGL|NbhkBORo?SOX+(-9RuU?Vy?PKFEa-WNWB3k>}o(j zB5OD{3xMZoLIC=%9Hj9N<7L?=Mp*AQ96b#QIj3Zvo|B>a9(MB(6-W`3czcx$j&ez& zZN56OFFWL`i=x74a03QQurgLK@EqjhRG?;Z2I0h?Mf`+ z#n9y66D|NLBSPLJuBMKVk_Dh4m-*sC-lHEw}x zFW-zd7$LDn!IHz5XS(5Ql`_>(4F(lcn5Vu%bERb24>kU zWy8`-d`&3twgx$3a8#8zKSvGoYRPGkqKQX?5 zFsLg=EYH(Izpr!oi13;CgK&{((4CVHa^6`KuTkyjnP%mip?k@NWe*`jos<9{m67bE>i3JlgV2n zjr#d9_$Okq?sRZhpmDiJ!kk`7&Q~@~tb?}I4z}td9r>1$w3lm1A#!s|`M4iCA>o%l zwbX`2V~|&XNSF1U#akLHqlCl8*|2dP#3x73jx!pzWN_T-UgGgx0{|h#v(faopFDV9 zqQ6PN#>kyW*^2HD-AElj6Gc4WnmC#hn&+E7yIh$wJQPS?-f)}0KW;lEglg;I}O%qvStITEJ5gCWnNWs>Bkxl2o7sHYlU=Z9rx}js-4*CoSNmRb{70y|{hnH&M9t^ksD3sp^@}YWMY!~XY ztXXTA15+z7i6#@TJAm#h@yq(#TswW!N5KHVo3FAH@huzoK5PCIWXc)W2~;~cS)&!Z z$aDJ)1P2WFN5%T4WIjV?sP8nD@t%Fe$@EPq!f)G%sk#NOtq;L&_Sv=id1_jd9fgcl zU>xVEo5Nwi#DEBd8`~74?kc`&m_jV+ts&bDqMAzXB6NCYgQ@5xEy))t-gR0CnZrg@ z0~>|I81Gxf<#?Z>CiV_RXn{r)Op@TMM^p9-khThYC#FSF)tGa zSYH0Gur+(Nb>{MbKh-?7h9ZgAk#`6{|JsdENl;jeFcuiVKF0D-w7Dk%9qv2kG-tyy zjY3;STDsBaKTC3u%~0^WP~ZmfW*+h2g^f+@uJ>M3iu&rQ;1mjS9HB zydTp5+A7SkQA##R;K5ay2laiU@h|LA(8yia3(yO6Pm*n?^0g45yc!{plG>GozjZ2J zWy%o?;$QB7!hgwz%~>_R&h!b|sxka0pdcE_2>e^}NvIBg2}(MI_9p=SIZ*SNDn5eS z-#hUcv7^UBBgz-F4$Um%yq0)p2s4F2kXFfT_qFt?nmFE=xQH3%Pt#R zJcbkoneZ{`;w&t)(z~nrD<0?ZOt)64Pb=`spNJbDkz)8=Zer}4zt_3f|2Amhlp`Xb zoM0bbUUblmBKpZqstd{KqDzkncT?}3oK8R$#ObKe+;~PAh>43Yh4Ygzl%t!JX{FP& z%90@`>~l5C%n_Vx7`VM(JI8)Ii2}o?EmGWg4l7xbsLYkOcSal)AG5a1<=vu{8W?5w zLMbdm)>=)$9G@PJdhhyh7Na}{6f7RP0DLn;6(KxKZ!EAL+|8i4F&F?!57?Ud=m+{Y zIC5QACy~bG{8AT`Vs~khTJ65;Tu_{O7$%13<2Bo z;VP-4;QCd4aWBV`cMrym8oeD7^8wY0pYNE&gi*GTkyEX+(o5{C%~0zvGS4FQ1Dg6S z*%Kh=+r#r{hHi~OYmEanQ(Yes~M~8OMM~Ca7-F<>O6fhSCFr#FWx!) z0s@WFYQoRkgcFW~DzB*Y-5Y8%ZJ*h}){G8T7N$SDT?`PSwnR}1Tdt{VPsuB2dPQ5WXl&63dV{za!5h9{i> z*$>KfMOXhU_Yr5WC2cBt1Az5kN>!B;)MFot6_f0y9GB5Njn-@~dd_Gi2qU}p8kFd{ zJ2Rqgkm01%`Z%~Yl6@sIi1{61HdPz$5-|qa&WiR8X_u{`N3QKM6|xVP?6vD z?~Zml1$G2;LtAxBBZk*6mau?UdtL#q=CpGgWlMhyqucUm#Q|~Z1mcA9B^Zc5YSW{- zXHpJbiqhInJXki14D&VmO`n+rjdLsPl@z zvp?KDYaY~=d#QFEDgXln3`cOeo~5;|TWH(E+e?`JAp6o%{O1ub8`jMF%p@=1aC}Vg z@L|L03)~Y{Q~QL`FGAr;o8wEN=MBA*Wg5+VucJqHxY5AI^k})zw5DdPS@(&spi*k3 zxthW`m`$0n>J{mDB2LXc#mKRjlZ<-Xkj&oB49qhyQVCtOi*OipF^)bs9&l-=-2Ihi z`N0ru5)#Un4$g!;mEYq9ld++e9-<3V2J=4ayFW=o_ei}Zh)YLv|AzHR4mG2Kj|!m$ zYlR503!+Ul=}TR>Vcj+OHn9S* zHBU0BeFS8cN2QvJ&z!|;&Wzr-l3!)Jso2)yy4rgyA>MfuY}?S`d=px0yJ}HEWuHoi z+FmiGNa|FXKOA=?a#4LG$TF2@ANW_B70HBzpU6ftVm9)5301sVF8ElCdujiVXSL;R z3!Ybbis&U9xOlFdtObd^>V(2CCM?yNk!+F>)9ORPEcIx|!WEJUv%FhM8@R8XMd;ZF zH6BS{T>YXt&8nhwLp$448PIpBB$^r!yU`#|{CTAfYP&Cypn-FqeYNaWqY#D`t2>b2 z*dJUQAFZwfR4++TnDlZ4=VXa;4iW(Dx_}m*0#}@ZkmiM$>c_AVX`AUWV74rrj<_W2 zQ&4HJkZFa_19%HAj z8p$SaF#?9ck#?&*GfQSV``dsQySi_nLb_>fYi-_j<{G5+(U+CvpztGIU>3OCvL`s0(1I6in#-Hh1}&<@N9w#f13>FJ}?JD z-9cTeVhbj(t)v+j*Z%S0=jj!}rq%8654hp-;g7R|CME1$3=XPvC7rQhDZ7rrfaF8l zKV-4KQJfG<0n=ky&M*!O(3>(aUKpFi^P*0va~l$4Z8`PIp}0T(wq$X~H^aIvY-cc4+o268cFA~!;x^SMyUNNR=w<#w$Zn{mN$ zm&Jq4MLvC{SOX>=vHNX7r%+xE&09N$3r{Pm0zbysMz2zeZYuqt%p`~E$zUyG-xh3G z$P+C2;f3xXD+)?E|G*qhzpAx+@~p($tCqsqw0om7i?L+*m1t=iK#mh-OIjBYqj%cW zSWdAEU<=LYk~D%VqXO{#H>ssC_+MjdUPn4*5s*lV8cWSfFGvnNH2s*kkc!!VogHK2 zsawx3x9&y*pedvT$sfM} zZQE(o+Mc}}UD~d%8+M*}N8C1Ki}dr)r;9?)hzcYIs-Bog0fbs3BdUK6I#-@SRdtjk z1mGPpzJp3&3zzkwsA>4N(n6z*dBPTnwfxUWf8#!<-K)7=Ew^qZ`ghuFa}wsJDAn!l zPRN43BZbk6j+W(J{wUG>&heb!ytqvz>d-itSlXQ^6o_131oGc2pqS?c{z}>37rwq1 z(8{owWzQHKG$UTA-R|I985cv0M$Pw4qEmsG9^s>n3^5kNCL5q_2J7Gz>XhF8nd^n1 z)=ThpHE1l9^QAicFY>sd*7q}yyCIoY$0J-5=5(oH(URGUmpS>ffyB(F- z{O>~$cX5Ww193ROCQl>6Q#uoTPb3v`{LeX!CXJrITX%|n1_P?a16`w>9dV)%TnvCp zq=3y}*HTtj<9P@D1)a87=Jo3ZJ5)-5qFqy2tjmhJkJxKZk>^nH-%`7t@rt9bnC9E;YRD`Fo!=+t#BC`~A76 zOYH~&tK@D}XD_V7eL~qzQr}9(hj>id6HsNT{kLo7!&s%2K3y^qpDTSnot1K309ONf z#EY9Fa+`Y{US5^ib?HVn=$-9&ql2~!qM|L`?-b_K76`i9fbnx!JHBd zjCWM3SUAgzLdjR&st~VwVR&hWr~G0cHO?o|z%+ZG?xCa8cE9C^ABg_N$$-|XdT|v^ zj}m4iY#N08;;waLFp z!eD6KkC5aHeKhDtR&0CF1!*WGb_7&dxTfJ&;K25YDfHF0rf)k)+>MpL&dZKzmR<_-OuPh)VLjqaqKiVs|wfGEcSn$Tf_7w^)B<*XsO0 z1DFRcvlgh>du`1gJp|PaYJy|MW)UX`YrNGb%j!=gd8%^M6XOzMbxNG$b;(vlx$vOT zURZOG-WnI`o|xE03$`2)G=UL`9$#!zYC2#L^LwvpQ|+3Rr^e|-8o0~^x$M**WUC{NG{ifaUKE+H4P(dp z4o2obNhjgK9f`15CLZ}|PQQ61)g(qL_N%2}|C-ya9{c9)pMz9^i9405%-nXm0LtJt zU0}rwaO2k=LVOU|ZSm$LhhXhu(R>q_E2ZW}!`x5wMa!Lmqv5M}PBWRfrnIIp^ibsO z647ee)}N%-vORM~U_c+J>bH20&;iP%`_Cmk2piSg&;F{s`C;Ztel8Y=La%IGM8Yu- zT0h)AWnmxiTXd)18Xr2>AG#kddTHz$_mbHv%VuQ4ce3b6w5L;5qiLsIeY`Rz&TN~zZN zbslG>;RlU1OH$<|eLO>oLZuHRTSKz#d#a#`p}o%2*gfx6hZmfM3u=oHBIvxu`Tw4MR{BzlL`j4tfK|Z{-0Gs(xE)Zd=Z$FKUQRDVmbM zL_VP3D1K8Kbn^0{q9WoupvlXxg{?FHJ;zDJqcCre=tyOZSS)}`z>5Abl>H@{S(Ns~ znQekPlDa@1Fr_r1S;>Tb_B0jVGs?m?<7$vaE&ox-3XIb^M8aWl_PF#}ZN2^XgIj@$ z+D`X@3+q0hgR*~N2I<%2iRNbuf0Hhk^@_e125?``9K7FJcK87!Q)XGvjC%#lza~8x{N>3}DE-VK;2sP)sfYUE7DqgZ5C zBO!EtS4mmLFff)Ivx$WEy#NET9KBo`w~8a)nfmi}5%y?LWMGq-@L-Nfu7V9L|Da5_ z{pMF--jHe>5nsaYaX16~ob^xk|8i8Cxlt{bK{6Ol-kwM&)91U@2AGww>r_%=tWroe zP3q;|vMNWeajj$Z(XgiM25&^U@IA6wMTqM|wEg}$W-Q67zv>Yi~WY6$#9#qeC09m4T1)>w<$~V!PX-Xa}>JlsD>5>5( zad7h*Z_?Y11+%ycf>K1IXB8GfAuGf`mBi{@iFkwvl-LqR3U&ZZsK0(WMtf-RZ0l}e zxr1LzaLR@uie*+VIm_=X{UTWI9b@CYj-;)I&bBj&_epxp7E&_A>%ZO~$7$}_< z0$-|*q1BWZ4Kmk~C3dU0Y$6OgIr0`X({GSA@}Zzc+&|?S8lqIo5?`O3uWRTZB_KoV z>7$eZ2x_T)r zV_hbEsJbY_ZyTZ#$`}jWD*JP}MwZr^9%fl9(W48Eg=iIulipeSE0K#eaXkN-O6O)O zP@!X?DPdBFLmA-~lZv`gos2(A<#6zALnQalZAa;#;VSm)pofJ};KlkJm(g}E;Xu87 z6_s-&H|h8l+HOA1kdm*z8_F6EpP%weMA+I1D-p@qPMnrtqN5R!c*vN|WT7U{w}dg5 z>VJe^D224{GlwSR@)8G}TI!s-RKvI_i5d&2718okUBZ^KKecXK13Ync)oDMEai5Ok z(Y;Ta1a9Q9Z1NtG@eD?u)F@4czaZheEjL0CuW3O3oHi!pqj#DctGx=Ao66=JF;SUm@MOUP;m@kp_3ND$^%_(9D@QA-gyVfJ z7|5=wDNqX-ild`PvK$~X$AxIT`~|K`ekon&7#TOwA-NvZR!N^&hzO&bR|hs_`B0&u z#?!!4$6I?X@n8cG(ZoE2qjNqq^Mw|Fr0(XE>I-^5mXw`~Y{>9A#*a&uThrlbY@D-Y z)dBlRCam3U;0&^gdctnpk{q%Q{NA$!v$D!0Mv-eN!rFvFzXcJ>(_Po}cOPfd+afc{ z+BL~gUzM0Hcp2!@L-e{WzR>y&hf;b6KsIHTgKm{4p!ai`ub=htxoQZUHf6swdkzA6 zcaly0q{?2=OpD4NF&WXy(xtEbF=I|!%26wrIxl-D-bZnOZ?2S1u$kydRbBV_?HQ0% zH||B2i$4+$Hb=FuxVB}ZWZiBUK{fJmiA=PBiLv<)es^dPh?zZ$>xe}h-C^Pb9{r~a z+T9S~*Uq$t4`Zj5uT6h9<7iF5pM3B2H#rPc79<#Cf#Yf^tvaDt=0P6)jyWeM<|!$# z^y@=ZBSu+BLS_oGvMcBNR`%HkZM-a;6}W2ZDoGj~e#~tC;6RIFon9Z9RjSOyS<7_2 zyAf$QDsyKc)jlCII{T$A$E5PKU4G=wiETx`Qs$8BVXZfyPz5asm#Blb!V-~D3=A^7 z*<3iO`ODc}YhN$^IPhI-DS5KLuLEW-~-WH<5(C&RQC|}14KEloVztb z+}6|Z#rAvsxG-Ma42CJLD+g8;PL00u{~|4uemAJW-i6qv#fSWKn%gxmPse|p=tFy(yvjC++$IHwy5t#+i;C@qE*I@x$t4qB70LP;O9i73 zO^pw~wChnI)c+Zp8jERabkIuI%_ZyqEv!}+S7DcI>^BD@Ce@I9^RY5ei(q2Xp0yOg z=3yvWHVw#>xyLFD+Ut)PlabFeXf;b`y^jo)#=DAhAPv9EI;<}D8dh>IJcUku0+?Ed zU%fx#j}bZaZNArZ)D^oX)%L0i#CX87*XlE%@P8M6+uA&Gf*iRW&aGeLPoqF zB+%3{HhD-oGZH@Gb?mHiM;swvOlxm^;{GzDyuqgWaPng9%y0n%rQ)q39w%&yn;vCw z%@`=eYbaiMVQ1GEaHVXCHadGjf><%TNy6S6G(JrMpN*t^P(Mw?>ilvt)ah@?)3;8; z1Tw{eO>voc^Aj3SZ_*RjlY;sNtEy`()Pv0kDgM_KoK@%@TOr9R8jDh2hCkJ=lA8vm zo=?hb+df-U?xkl_Qxs}4fHS$L%gylCc0hL@L*<>FhTmr3>yLW-sh9m2D_oS_X4P$+ zSBhe>t}--sun2kIsLe?4mbdmHEfz~+H}?g~veu9>&+95H)8Pb`XTJjSQBh2g;h_9r zIPC_z!6IcoI9r#tstoVeijwhNMB1ajLRumv4`X@p<`4t=+GCzO^qfl1b%Qzz>FtcY zORCs0}r32J*;WRje-D72NPo?< zI>|#}rh=_>Cb|!oVnj-;oC%VLp>iteK;DZg)&m7};vi_buPE-o(o{2)R=giS)#4EM zri1c@C~2xrwK{1-;6(nNk8byud5O6+e0+=tvRUTs1v*XngXB9{t|s21JeMNFHUrlG z6NOWkZPiEin*e607X{}h9r0T#+FB~8?ZS|$!coxXz$i>{2@PFdQ>-j-pA-dkX{S1* zQqT=2=;VM0=QgAM3tUW!NgZ~yA2Dc5y`27Vu}2aLXiROqKYJafItKO6ZLQBHX#7DI z$YUoZxz~O@M{|O!QG7?>!xoUrzLibOQ5kGuwTU*@h8Y|FafbH1Ltq6JxY&ScxfaV~ zTa*0T<&qYeA-c#r!p&)}#i~f#PwXC*xz}a{UyYqL8Lz!zK|iZm^TgI$49a!bc?2Yl z_hff!YqHNk5k6BpuNytTaZUkSJbWXIO{8wNdn1e(W6<-Yoj2ncGCJbL%!qoiP%;m! zNZ9IcymOjuJ5qV?L@l#Kc}#;Cys#u+TC=MXN0$9drRsUPQk#Q46ko34HAoV4ZgUkn zxnWqU)=t;1&b_o$k;`$7A4KkFU}8YRKnqmW2^~U0LhMr1ry}BOhx>4m^}R5L(5##9 zLik11C=51s;DyIl{b9Yp7_qMK_Lo{wn#_kAuathyEx7th5Lzk9qjbsYU(Zo?(^D1k zzi^w}>?l&^eRjE8I(r{5zsuO!RYp7rgB2$SUEq1MyQxFQCi0(OTDz;Y&>HyriBk1j zqU4G~G#n)#p!i<@GCIvDobFFegBt;B^gH$k&rUHsI4!UXAj}POHZl1aq-uUa!?8|g zO5)mhy-{d_P9xBE@a%gXH#QSI2f4TgGCmE3Ewn`d7nX7`}}c8Fsbyc%Rj zk42bSVll;NqF6(%mb7M-TuJCjlKY%7P`3nyy#w84=y%-3P!(5d&pOm+(PZk6l^Mry znMe#xXM2ZY`gJB3gR;bq4DKGUWU*cWH!-No#(&6;NicfM6ur!>D_c{RR|c|GORR^r zWBjR0sXZr$d-hq|;dR}SW%7JW1&IqDJ=^PwvjzTG-!g0{mMlMw0;l(o&+Eu9{eP^z zV~}hCmbP2APT4$V+qP}n_9<7LvTfV8ZQJ%K+qb&s>zVGE?mK?r_FIJNu;!s{0v#vR8{qx6Q1 z&*!~5cV|Lr%qKl4T_ZL&`phvb+MHihl1430s-*pn%KfEiDgK;gCkYn|st507?S0?T z&K=*@c$h0XY}nIx%$JAdDaGfMiH#!x>3ri)hAhk|`k$eJvzSXv9Iy~_GSV56ZE;jk7j*$tT zYPViiUrO=0h07mhsnxXy5KEKx@2)0$*8|tD(+(a{<0bvZb3-G*p*!OhJ&$ zJGXcp^N`J98^z00HF)(x1}e*B7(q7X2rnzHYTME8XO)muNW2#lm3d6d1ER>17%*sn z9|iSqUVe0vwfYyeI&r`g+S}BXWLg=#1?Js*=y&cg=z8p!=i}&MMuT;z6y~DGS;|Nv zox3S=+7w!SGXcytIIXQkTBR(H;zAG_-!Ax41f5H~r#~yLI(-@96R<;kNi=ek9Si6V zNxYQolM%xkhbwmp_kcZ)J9a*XDc4n)lL@A5F~v+-vOR32)ho@L+EC@H)Pq{j-aWVn zh_F}_S_mHk@6=rV`JOzVTdYVT=4GViSwT(J|-9 z1cxX7RBwtBj|nETu1yqDN{VHhH(XUb7n3sb@BGDnHS^R~XKF7$r&(1Io6>V|EU+of z^R(Lu33@2M8mSQ=y?y=0>lxgV^ziL?F+zffN9SFK6f{oQHpy^2cVL(Fx$4&murn3b zM94^6`249V*_oj-s@MSXAl4hTXYh}xf0d#|E^5vR5zQ?275kghrgJR1 z6>O#uq~>XjlNKQQ3_?y8h7F{}lTMztSxLWvbc;thN8})BTnvX8vr0`2hX2WX0bB)M zwA7YRP~@aT1tN#j#teOkbReEPE+}(^&(zuXIH>!j%Y+B~Ns;HD-6v~le(1+iHb2PX zG@7A3XsxIuDszwAP>Iey%=VZ)d>S%znt>1;zSEQb67L4yFYEuNLz`b^;ba3Ys#QHz!g~QN2{ot&yPGT z7uHnX*Sy1$WqI_MeZV_|*^U$o?hR_4k%yv2RbY6c z%pEPimBs&W#Fx2)p|iD#m9g7@gTIVyt*rDNzD>u*_RjiNw8n0RR{GX|(H{Rb^V;Np zU||;jDM0=!7-r*aZD8!+Xm0wy2$Ajn101ubwRg64GBz@>`YV?9w}b!S(*An%PyEUM z4KVw*DAWG>ACTE!nX-R?%ozUe*Z*76HY@XY4*1^~GZyCmOx^wm!i=7k;or^KR#b+8 zSaOycm6dQFpQfB;USMocuzQ4!Vp61AVBAqqcBYY#rW&1?b`+-)Z&aXbXkb#Zqmovo zV^XH0Yi3|*U|`u*P_~<*Euk8dnkJKs#ac1LRwbpa3Q=yjH!-Bmp{7@ zTVVqLiE@&L5{y%VKiEuc8WbOC(ZTVd5=B8lk^Sl0A@GF+XxnehC;`@uN+!}_T6#1i zF0vT90whO9M~YmiTSsUKNriA^&pSnh@Y|WhpkjfIqx7^m^|WxBbM?5C_|!is$yxDb zIhJO5rg~OTu_IJ2;}v4kkRw#$Q*vUG6XY_W;l)RVIh>&Azx0An-oQX!*xfAz4N$1i zVp3975f#*9%Jh8YV2-c|pL^&i#wz4OSY{aM=s+ky1kfo_Cux>D4&D6d3~t z^6~~GXn=F%MT&}`7K5Nt-N{Q)ph{8rz|YSQ50e2J$p8e4R0ycML!gmMgNC49M^lAI z*-J-r*eC%<9rRy^M#;PLG?s<ZuR>2Alu*#p*vunciM>^Et2LbLiee zXEl_uBs!<^7LGf8rnJ=hBHa23GTo7YCLcEuPRpuFPg zeihY-t#{XPn)$eZtX-7spH9)adw=9mZfn)*F+z(zywEA8N#fxs8H%uW(%9c+3JgfNqKHNim!>_;tHx+zvF}5X&C9QReu3zl^rS|lb z-w)zJ>}a&y$CbJ@<=cpu;=I#Up+5rlaE2BZxHip-)y$(yh_Gy{bzN^i-0jYijYp^S zG_jodr`o}JPaimX?QPF-s{=BOP2t!Yd4spm5?J$Qx;%>%nw5$Cw{?@$4)3$usUl=D zqjn)@AMX%KV(E=GGWRQM0`IeynPaGPPf+%H^gCVq)23tBT}6jieYc3tuVD>08l%nF zfpLQH2L|5hPCGtNTZ`4!<*?gh4U*7{Y3cg5qgI=_ z%2Jjtel1S4(=yvh`X6!KOE-7=AN#BE$B$X$sf0Qj$ z%J!*a-?$FIO;N4o*Nf@Z_kNpIbA$`OR5nw8dCMN|USQJmEYi;_kWN53QgLc|a9GJ~ zYo3neZ`ylQUScxbW_5E2Uq}1*5ru;;PEsU2HGx)tx#`p`w2VwYT#Sia-j7C8WKM(s zaudeuj(58^_Syx$vL1tfoB#xf>|zD~pL{dpcX7kFHL&=%_-1K21sMVH?>4BY{x1M$ zCVXmkCN})PaJcxaY%Kq!X84Akzu{zkJ27K(Q!^)gmcM|@LdK4U#x_p))b#A%aId(N zzLmKlzm2Jt@%NeU6N*m8)++ey|C(?%{BB!T-(atuyMxo;BgKq=DenJJ?V0}WBLB16 zvwq{!f2;Ov|K(WthicD6$MWx1`$`3KIV4kbT%!*E%v{_Yza)4%lwNEsh-Ca^69BBL z5Py7^QJPVMIxJSmK0O3c;ofklkQ{#~H5$-TY(hd&a-~`R!|yX8$`o?gpabR53-)0? zoZH!6*~jkNPpijo=tDdLMbHAj^E`o683<5~;5R_}_%s1(*_gokBZc&dMRv~hi7nvq zIXNL(N(KP-0HY$glP%%p33o(B^2Ma6y-PFbN8jVc|J7iCVBiK@Rq{tF5sRjW`) z93LMcVZcl!jH*poT)yv}FqgKVt_1}VVmJstHfk`iyug{~ z=NgOUGMJVSJ~|DURu;3bIATrUW#GKd!eHLia1SRO4IQalN{{m_4 zvO;D(MeTtqIRWz2ydrt11W9EmjG%Jl`JLsj<1+~%5k_iuUvtq)e|$~cn%Y{$FHtgu z*q>pP#kvTIbH^Mo`EkOtVoE~u4M=&7Z~cnnd$$HGMvVv4#=}eI9anf9Ct$fKBVh-xwo7mj~Y+2ii9yn9G5HA7x$yroKe%?GU-@z*UcP` zpUh5AMIYW*AGdnkcDo|*ySL7d+F_e;!o}Ip3OG-evN%D|KvSEF{HAW|L3jP`A}Tq! zEu9+SbUF-?--<*Xw+pT%G7sUqb9VFerW1o)Tbg;L)EtkM4>WnRx}BD>;GfrdzC_?R z*@de|irpBu6Dx7n`bYWhV%IO$@G{Y`P{ibPjZ0qDk z&#t!8wkktW47GvelXyMrx0qAzmCwq(Z5n$$oU%l;z61_&VHf z_se$R&-pJ`Rh#m3u1Ce|TFcFTb$IYb>g_5P;c&|a&iR7#4j?ywBP#lh3d(HuHXDAu z7cmzRrxBrW{SBAuU)rNOoka``bY7CpF50Xio3XWjeu-DL3AG!VUm5#sXMp?nV->2l z`A{`kBaNtA4n|AtMNi-~9e_b(qM~9jh+?9j1@WGU?Fki(tcS;5s$= z;0p8=X|Qv*BmksNtc*6SntIgPGqh$w#Os&?@sTOJdL$lS(3-cJjCaL`3!!tThI@O> zo$7G)XOhkcGeXy)Fbq3t-TEHxmG*-tL*c&C21On%b;1@?pDg`t=sLpnM^78{$FTLM zzxl8#gX3^8^qMC0*+L{kGQbJSNFb+ehKlMPuz2%@=@&MN{5C>1)h?SMvY2+dC0;erb8xzxK6%b$|CA+`-Pw zj89L`_U#;EW&gj>*x1v*SPXx4*Qrf9P+25efaR ziT|y?v9q)OSASz-WdFXh|9I=~8yqto(|_b;;Qt$e8S$=Mi{W3x^`eg|durhr z^z_6)retAqA_M>v@4Clyu1F-dlB9=t=J_+n3zWao{y4shpLKR-^e3rjg6MQ7E z_u_=!zHI|UvW&YP z4Cc4H141sunQ7hfl|Y@b&&-@>Z>LW`+(HCBz9lK%f8sPPNn zs0ZLDX4Ew(zUPgp8b58!*uEnfk8p2qihA=MEt@DdV$zPQhV zeebha5w<}ez&Dc}pM0KRm+%8V2~WIaQMN~KSYIB26cp&&0P>I!d`j5<+2m@dATdF{ z{-3h=6IkKGIriOOKi&!6CuPLmFYpn%AkYsF*uY5ecGH#+)PKo#>eWODjf4~Bv+W6v zf1qL98l*ek!sM?E0V;wV<9>MkQZ-`NK1-4zMz{odnb^v~Ucu1=>i7!nN>39fqn-b4 z1>R(CD7tcYpv_t7Av3Y|bGc45e`E^zs<%THdem_fw#JF)O@+$-bl`dQle>B6b2>hG zez$|NG@(g0%}EjA===`St5}zr4m4#n4_7690(j_7{PA&BzZv5UW))oaK4eI;OWl%7 zcJ&9@+cjif%L|V3cw3o)+FZ9tEHrw)V%_cnT#PsJjp9%0%<;HoR!6d>&s=`F2SewC76*8aQkS{S7 z!(zd9=|nEwsqyOS1&7s+C%sBAOm1({wCSO)CGx{*%aswYq8IwqP;0UwnN+U5XB8Q7 zolvQZ)rKg*|9r?{2C|DKOy$XX;pt*`oOU|Y_#2V|+1O$s&PV`%dTWi7FtvqElogY5SVS?f>(^DNR5R%Q z^Y;`QH5r2J`6bCm3HUJZ_rV*CnM=EP6-+J97JTh5HoT|5<1Hby&p8`JTkM)KEO%-eiPHyMm zyflrIdI-({)PSDgH|r^SqgUoMS(lL*oiRm-FeGt_^UN(Y{>%zoNy8A4Q7*~020spj zNo(-p?!2o*HJoGnH?K+=!;kHQDsJEx3%f99g=Ju>4xiQWXIIZER`9t(AX3m=Bu;h_ zH!fG(^OtVYHKqB{ugy-cE_bkMqvbxte@4J`0k}Uzqp$Nzuiga$DwF{oG+F$K!4BGc zH1qPV^`b9%?Afe{OU8xsKP%JU0-f_jTC znc^d4YJBj;qQ`QHwkZCS3e;K_uZL2`*y<$D-gd#voqRNaN^&+tMCJDZYUh>mXMgEk zyvRD-7zwsaR$eAKe&7{KeQ&4q8a6got$Ht#)y|7!?X+|q7YEiQ3rzBCE8F&rB=H8C za!G6QirYQeE1u58oTZeP;(Ly7s;Yw@u}8X7KuTb8WZvaZ-jJM?+c{r+!`|Ok6A-ec zJ;mKt-Bg8{nMwVz7KimSNI^v*fuFV;`{m{A%Cf{EksMYM%N_5W*^1GX>sYP{xU7MI% zkQMg0x(<3ZWh$-n*wi00VJpN%ZGMsE?Y(XqWvDo62Uv+TK&MIvcU-&^;m7(ToF|6} z#|nPY(gp0>i$rdI7;dR$!r`W&xy`4u@XaIUU1RVo7)Nkf<(y=P$SCGhb*WHx+6h76 z=@|kA;MA#&LJN@j_AoCDKt&DAym3m8;&dAptZJ$^!wLpe(TWl92*lx}C8ItKQ3|+& zk~S%S@iMU#%@UFj{jR5RDceL|$u*_Co)tZv-vmX^63^g=gv@j3xiyk&jl%}st%k&d zjGL(ztSH5iKR50zh2+H%=uOrqP-40qlR2WLSEA#MGFi_BQQb92#=xeZEAw!k>*y17 zmyhl<#V9MA!8y!N$C6};K^|NknudOP5ZcHtib3dhcUOz+aM&!UDm;Bh%1`iiG5am! zYeYGzXqn=qc2xF0ZM_;xbZ+Pnpon+6QL+|Ypp1EShkBEo+`8bXY1_U8DO5kq?g2qE zzN`3zZN(qEn+drE70P@23|57j67Mx|0&gHkueYk1Q_&E96q z9+8@+S$Slis}8F<;#BMq?<8$g!bMp9K9yI|Pnd%>z4j1Zn)}lr`RX0ng-Rgb@k4x?wR_1j2P0>z)vku$6v%Y3n_NAd}}< z@S(Vr77r*OLfgS15xkMoafr6oK0sibt)hrk@?oqIpqRT!?J5=o&r0m-BSpVRA9dZD zDGNLkaTWej6IoYJL{2KHh2ubZ&) z{Z11Fx<=@4`za?rTd}9@ zY%!8@{(ScQ&rzXRtRL@-DQ=AX+MFk_lC5lR034Zbf2!8UOO|i@w^$hpJ@T{oNCmp8 z5uH|tqG%Vm5*_c;@}h5y={b;3jhbA650F|1s%#?mB+#_>p{l{Gyfhirtc5qs-`E=! z?nEj-k!(GI_7##a9nRVkt(Sptx^I6lPkYFRhp*6(Yhr6t8@#@kqKDF!-USK?o|#Vp zL37~?_a=sL9p_V-_ItXHlLNP(Y0{R`O`LbNSJNv%K?R5ubb|O7pv>zOHBuh_6pVoH ze&%h+Zfd%Z(1`I|$|g-ImwvOiwvseV>v}b)#$;|QkFtaofe?QkS!NTkVq?xU99}Ws zs3(H!!EAA0o}PowHkRLPsb zW8lRe!O`EGx**C(U?}ngeSse|E8JvlE~DDqSXDCaz+x$z)?&D)62UE*??1AtWopiC zuj*%>-cwlp8C-YWbPAk4aS65`SvU7wIazmh3@e)6aC}dyEN5-GefZWK_(ZL#H8EMB zemmw0n}2yRN7}WsTZ?&4Es?COG}k#v?!;WznHiw;S`)T3IjeqP5DmzaC&(w7IANhy zJ&8HGu#;?Rq?J9JsBYEYu7Ae&DU-+XVnem-y7!`0q*mNJ;9u^l#;PJ}-n<33Vpdgd zr9_abeo#@rqw8khtX9tRc9^4vbkyeDX{p?`O-*&R{F$T+rXzOOOoDO7|5h@%skeJB z)QZq?Ui5D6iVGYcwL@EZut6%>6Y+T3x|~Z*d64NKQ3-ySeCI!x!P*$2nim!9Vk5P= zVHE2$8Zl)qphD7BPLGz=OZh-W*Hn5gt_3fwu|5(9%Y~bGIq52Js_*b(YQv3_;;c`B!pz;tO zt7l+NM{0;syGC(-K&yLnu^LS4F(TH=IYlU z3ats|6zhtsL4RKKL*q}^qY_z}N&lE|PouD0IYZNX8O#X9OsFL8r9TeNFc-vOwx|ta zUvHK?18m;xm`;dcL*5%7&Nuae{Q_R29M>}H#PNzJrUA88uLXp0iltkorqLk!VnB*D zS6Y&__q#x%aCDtQe=Lv4Z&iu-p?aBys5?^`>CQ^RVJmVbLxC!!DdG+8nbykQ#hrHP zw&FZI9@{Pf@irLG!D+60OvbMMwT>8G(lmUpkRQ^c!~L`h&wJqE_$2f~|%fnFpz=~o?Q`!1RwOsXw_ZrxF z*xb{Z5(Vdi!40*if-{rjhfaCDxWxLtuT9DML`gW^JdVp^7jYrqg5tFJW6Q(Deh+Hh zM@&s;MoP=|WCwEO@7+kGM4qU@Yv%**@!f(NcdFnotR>E>>99OXsh*3m>K9f;FC6yUJq{VoEe|0z`EPTbB8i)zp70jKIW+ycs>onGOUSB?Ojs7eQ1SB0qz0nWHcF3;Zrd=Iyo&6m>cMc_D5JY;$&IJZYM!uy zR8np=xA*wnxmvEbqzLqU=kQUv<0i#e<25RNI8L6sjotvD!giZ$Uxb23IMPe)Vj>{2 z&uaO)DwL^|FB1uwd5ouwz^p4<>g@x^`)j1mU$ei`REp;ou~ur^1Ql4R;ZN&3kvhku zf9}Kwz6ux-DtPkOdj67dK4e(5k9|ycstr^-<9KnL+hG1)Wyu7fSO7sdXHE>HkrMpsHK@JQw+)LLa?ObF`eA?$Uncb zzwaD-FVOB#^gDUI=B*vdWL#w&T;&1cT1CB z+Ew%C&tyE#kCX9oi|3uQQ6ym-bD>@2SA}rCW=;;XA1#A&)D`ojpL8G#v+Wbs$a6F! zcM;2qTv|7=MP@4&611*GS=BOadqG&-tzu`%pMv%2v%O!yoT%di|70%u|HZ{FA}%ke zs_{J+RTBSKb5Z913^e}#wfFLO5BymF^#ecQ??B_f=+}+DH&V=K&1tP@t!e+VTJnGP zM;vG!zaxj8Y2E%|So+^3>x}yIuXJTZc|936xE#H=P=_Tf{ z?<`?VS97YCc97+rnU?nN7g#a~Bq9|Xh^$@n&ZP`nW~zI((b1a+&1a3u#hQn8DTPhR zXyRgu@Fcbrp90)t)dU|ZJ|3TzymlryfRVmnUJ&ji;H(6f)>89L z_AWpjoDBjYG&X{kd~WRm$$_@|W^D4CP>J#3_e_i}py&bB)zpa^d{B!mZEXNvKW;aq zrtg1Iw+3Wr_v8UM>BZgy)Ce(xduY=7VvJyiK4b#3p+Zy~e8J0qookIvE7AOLL^*(wbD{%gU;nBuMLpSGL*_S8v2poor#QE;vNWc!u+@hK zs`*H-bBL|G1xY2>Y)#Vu(#qWA`^w{gH2EqA)N1k}*Go)7NmfuYes|^kYApKR8oDaG zJbaFx-yZtv`%X^N!ZxLp?eSniWnsZzL3qFO=|27XrkXtz!5Jw%uDR^&fg>_ABRgYy z0suv{0Pyg8#I9vRi0lpU?fKxcxh(0b!SkZiy?^z#g2VnJ3-U7CO z)CRxsaRJH)@CKmu65qi)je%<k_W)|fKKU~MR9bl+^UTA?b>O<>m$wyF)E??0mAMjqc z!SC^^dwk|u@Rz^pjt`%Mzp`O>_R>ECT6z$rajbfu`glX_KTZDp`9y{p0lS>ZmazAQ zHaOC=d}}tjE~)=4g?+L;H~{M+{agiB0mik^-0y}O2dfHx(M7N_xETg@o85cjhI-|M zQd`R&v-gKKI6X9jtos@Vno$1$?NzA!^50>vd4cwK{343Q$|#^789c0Zwk!Ocg9gER zha3cbG`2PVA~lDzGxK2OjNe|a7}SmHVPz`s$D7s5hV!`q0_qLr_*4fQwqtSuTm4d{ zW%v8i|7wrN)`Q%kX8~RPG9LS&of_Mf?Plu@bZ&5dqol`Av44$!wmkrIc=<5;NJYHd zE(kdHfhPdJ@>%&p1p@KMx>L>e-BEal90uJw0II8h&87zq|H_UB02zMYPk_#7C@*9@ zk*#d$8MJ?}d$t5#30~Jl*pPkd#%HS<);$LASihtF_VhiVfi(BNMYGkA+Q!^<3x0IV z2BxG06vH#3`KD$D;PilI3EJrBbbm20Iy-_jk3ZT9@_Fcxgb0M_~ zxjvUgNM?ev6PrwZt~s-=O+MNX&vi|x+^^Xev_P{9SlVW_@*MdqrDGY;yqZ zLhs)O3I<~x8PW^rkI@Q_K;#IHoK07j`rfSjK^8U~DZ+J36(kukuxu$;=??y=kDm+x zr_ANfQr){Rod#rnY$MGR))XBabA!|tjVp~qrx8MFXz`Zpe8{vTn+sbL{F&=6jg~;gd)~ z4HqY<;)9Xz*u5D*DZor~rl8k#s6w=n{tuxPRGga(K968UPOV=gnl~v3l&6pf#ET80lB3e38>4|_LUo+kUA({mJ zz&&Q4G@mewa|l^8yO#{1xds2NYlq76&frX*4+y&n?1}aXoSjL@9nxl^o{cSy>BHZL zg2;dnH<58V*rteEEa!!Oh^CK2lrDGiYBGg6$>}jGmQl;v+iJdvC7lMf>vd9`6Bp+^ zt3ZBt(ro2t!(aG&MKh+!!U$K&{iCZsuS@sAxAOK(!pS#W=$K9*>>)IADLUH%T3fz~ z!@oOstE$28E8&$=5kdRwXL+34J*V;kXnlDnoh+C^^GgN3czW zqt;NX#3EXHT--^fJB!6^#=8eYwjLI6oEBAxgzOn?XwuWJOUTJ!!_f~dHv2`$F(rMe zBgJFv@FSL&^Jm+9H*viSCZ4qX9pvCE8F?5>`YJMS%35BR{sdc&?P;-;01~MUmuQ?$ zV>-3xAOt#7@EzZuF)WEUfBsZ~@zcDl7uwGD4VpqW39@B(y-1o?1F@h~M-+x}O^JXd}y|Bf(SnnXgUqXOr>vEEIMV zNUM(iRU)*gO==yS`E|ei#13R=&Ys+S{s!;4%6N5Zf^L()GUPW3=CI69o%bmivD>1> zp4lH2Q@HNA_OyHY`-juOyrH+-bJC5dr4t330-pLO$2F0t5ncw;qBN$YJOcDfBDv{*(AF%|{q?oQPGygf`=0MTkAud`drW)6h6n|X!2~(TP zm5k!181lTh{j0)un>`;Ej`@q)zrAZem+gL_Y4sF;N9rvvr)Lbj9s^<~TO->h6^VU+sQ)?6WN)ea4(*yMpMa(nynYF;!1CqFLIZ+ z&oZaJb;fisz>Xyr7&iF1cRWBt&Hx(*I3daMbVtkKN)i}_+ik90xu@`sPS)6_@= zh*F-}3;7njF3bpM4zJ`Jh_I55MZyI36JtVNMXNUG+++{Z#(FcaP$(80LBBZ*>(8FzI zn41GNaY$^+`k)gtEk{UTMY^nQg}n+5e6xaA_?-m`Mud=jHZBLNu^4pnrkQBL( zEU&v}otuT6#2rY(RDJ01Sx52= z)|#}c;9dEYt>DkeqkLoQ-_)ix$<& zysX2!%ey1Cb$8r)77NA97eRB;OL+af#5eE}-etRbQ&=tg%kx4}jnzsALM5=ag~?Tl zv89tiT)U9CO-5KNHBL!Fj`f9x)f58>cX1GxKOzIYi_|G`Jr4NsQ&tQi_mmPPk(USD zUWMg8p@KbAx!!Tync#fpRQpsB%>z^p!OcSt^)m+sPmbBMss@W>7{7XD(x&~2On}}= z|3rt;t=hFiM^j}Tpx%;(M{!M|v}CAt?7NmI!>fzzXW3O}&G}IqG%DS^;nDLOD?!!W z9Y0A)1d3jHVq>HVMMhpw2IwY}bxmZ;!@$EtKF|o7GF=6werF`Up6==jcv4aFN=>LR zRJ-t1k3%p10nK)PA8qkP=dv%y7tcc^yPuX_%g718I#0%8{xu+5dOu}M2Du!hy=wqq zmc%GeBJg65U^MkTy-Vi-C0LlL33l-%M?;HICTiQ{>fncV$z3E-Ny61lIzEG)7xTH0 zXT#RNBN)-{tU-LXW$e!mVoCYF3GgIH$Y9wq!yjBJO3eUkQU|yXJpJoBHa}XL!wN0>?d_Ce z7Z9_h`{D9p8mlKQuh7Y-Gl)m=Hs2K9lfHL>9u`&dq6`;QLH@DCf{!?j&X}|Oz$u7N ztZ|mKt{(={ViPU)6wKaHyi)9fzYP7SWZT56#Dfem{JUnYg2X6wYH7gwkPYgGKe_Wy z4X+C#xjMsmq>jQq3XrTPVJO?T3}hnlNtBk>J#zu_&>)_GtB1H{muS`0_BGUTn^TDj z7qp2XPt0m*xGYhp=Rpi;hO;?@&~}oV%O}o}A7o{+)M<~4#Y-Y88kh)~e}fPk+_!aL zkEhidGF#iHW)NkEa`4i^^_%d(3py)ia28H{ z>-@rZxuU6}6#jv`-22`R*U;U+dxvu$nroungbf;b;I8e z0$H?L&R$1aD$QW+dB+ObYfj3sH4dEo6OdR7LR7a40$W$L!;jx_$G7f& zL;c*(;)(xfOT<@3?zI?Ly8nJdlvkcLV^sc^IqdD(&4Bc*lEho0>IVh}{3S_}_D5&^ zjw#>D*h7S|W?Bpx>xHYYnU65QCeOXp)jh@pd833tW1>wb!tT#AEUT0BNx?)CotU?< zTgmbjYp)T|*XZ#qN@4ni&m5S}%U$yf$fAjxtmqq^ZaYY+?9EYQOzNv04KoOa63`3% zLITn<$b&w-pql4K#>FjPzEzN^TeDAenXm-Ffi_<8+FI}~5j))$gbX}$7=CX;lRST1 zO`+2ePriHF;WTkbu5;LVJVJe+{=-nnY3K`zDh!D9Kuo(u6vu1eCT^5GyM%b(D?w=j z7}z|_i31hNO9*B(Xc;vb{$U4ZD6r^lIZ1DS+7la?smbx!FPG~)`zy6{KZNibV@OZNng%oC(C2~qDJcjpo{CE zez!z-0v(y1aA;dKYj-gVb$|9h(mtouTOqQ<<2&1`g4dt}Ahpl#Q&t*ex{;hELYioA2YF)aA6w-oWjf%s|Aa;|)UhtzgKIv4NtiVLS!9Laj97fJ;%zJ7osu=PxXI_$b>dutR%rDGHX)Rt6t zk1?UzYOCM-i84g>kGCWvq79bsuY!fmDkT5 zq+JK&vwE4Re$x!NpNegzi}3JaDu{rH5EAcNBzyS(QQ_mVTn&^_toAiYXd zX=zSZHN=WMKp0nVMls~OkKnvyMZU1V;DRWQ9wq>jah{=r-x%tMmX3BwqvT!Is7Fus z4#PfIS0B4iLUt2D;5_aCjC|;u7tw9)I#~z|j1qqWCbCNZ6aIoJxv4?&Ana zTE@O1OoiO?6Q$J|^algshame#IF-ZkiOyo#AQ)xSnvHnHv#LAjY-JG;hOsGpT{H2% zuc=~qHaJ4lZOVJsQdfYtlx*L0KSBBBeMGVoAZ=xJ2AvIDsjhx$(WGX3_z3paA0wz1YJpe)=3|s4kic=ED5pd zF=;xUjDvQYYo+gNCqG93ykBDI?ywEcotkfbv5kSe1jifNl@VDB@3O#FgYH|BY;6=% z5f`+`OK}~yhO8a1uwIqpUpr>))M)UA3(MnY6233v^GVg8~YNb#5jKz?Vo{X_E&+FWqL`rHdjmu4g%`R zEP%w;I+iT>puE(bRqcs|xik%pPdrMo_{_>J$-`Y^4D!Re>h4I&$_c;UA`L|WJaq^< z$aH8;x4Zk!`w!)W2C2-I$5{ z2W^B+FJ*G1TZAT_;CcH+D(YeC}SM6ab#_Kzt(V><*z-c8&V|9Sn@Evlre@W*W# zk6d+VaRTy1HcN_BvRTes6L=uXZx2sJl1Nd=W#HrSZ47TVC!J$$tyb~em^#zK9kLrN zqdKo7-)&KXqbKZC3rz%w(X@z$V#q<4T7rG(%O+hVK+rTI6;OYRlP;UBJ(5a4FW{Zw6^0b+HAt}NyMhXj^);uhoi2RY;b#qKc-dzjY^b3tSfiq?zzLgPs$1SV$NpH`#x>1xC^K)6(a0xA`#u&Z2OvFHf<}SLZube z0ShV^SaJ4V78uoO7mHRAr?hH(@glDqN$#O}Kyq6MUe4XN%_gagaymlG{#z2OzdPcy zK|Qpp6Nh^QqHHitO(DrTY<k6_wRxd9y`$zr=M zZ>WonuX$Ul->Q*B$b7?>&*A#V3b}_|O`Ao>elzX6g%K_`R#$tH4*KB03F=0g@qWm- zUQq?w?bdDc1fjyfFS`N*K?)Ick~PmWh+Z+t&{-_a(@OhTlvETYKkgDAu)`r#6JOXK z+sX*FhlR5YN|WI6+u*^5)|*T}1M?M^&6Jl3*bZ$@AT~(%-aF=%=Q{&?o-UJiX_SAo z9$MZja#KYzwP*$!)Tax5qdorUZfUp#T{-`qz3relY9z5>;CElP7@pL7!+$= z$}i>0aAA`MrY7hgA|B)yoDH+Ro%HqdAh#R}4HCo|h&LZUc z5(A8nDUUzZ3$(D_FwHfht_FAev{;}SUF}lC5(UyZ!fLqxiqLwPhS+c?P8w^&I@Vm6 zi2B@3KSm_knkLvWwW?B=zyk&9^pwqIZAUt?o{RUl+~e-q7;XMliNQIzZlnANdI6=z&Wl<|Sdlm@E2-&l2h#9RO#yw7af!me$^kf$NJ7wqM9) znRya8MS<6$l#XYWg}?1LUrD}@tlV|wmZxJbnAGJ6^uGV$K!Ld_plW4d)%`&%^zgZK zA{(WuTwTi=PRLok)55*SPXV9a}QVR6HHiyzKg4f>}ygX@S(`!k}X6wT56=lNbf}QIN#dfzbG3DIyExL?;1?j z+YiFi*UrXrXx#x^8S zh3E0H5Hqr{X?i$Pi9OHWA;GAR# z&E2nUM^Q1{+4f-XI2ZHD}8gSUQ+;0noS3 zCTWwRZjq>0#Y~<@;7BQx_s;6c(~{g$)tP9o#BJT+3iO62Dy-9D6ou~`d(nD9p8Ae1Oq=`w z@!PDbd{|!<>53P77Zavg@|LE2JWyEPXd@g;krwRaS~28rfw6urg?X08di5#z9Rd&+ zwQ$6*y%~lpG`a1K$b;SCo- z;e5$b`&MUu2G<8Xya!C!x=tTg+6kMb-uXpUTcUEUI<;<4TBtfOLrr z-7y6W5|R?qAT83}3|#^ek_yrxjdXWNNq4s}fYK->Ao?3T_nf16?)}}nAO4uV=H2`K z?)9#BZFqRrXB9~pqh{}O?5JLoDQpq3=sDTA7MMG|*C90(p-Ylm+*LUw7T>;d^CDyM zmdwJ}rWMTU+)wTY(;vt&=bPP`V!Oxe&G4JOw!8FI43bCH(5v@hq_e$_IOx%AJ%=po z6(d}>#KHGT$s+auGmC9h@Th`&bh}ltnerXDmLGDIRC^c95Tni`VcH%FI}t8QVfCcS zn$zne8LUFgD6rS~irDg{(+kSWf?Oick|c^MYm4gY0biG2E|B-#Zr++kzm3;FM>2%i zex;`jUXCCLVT}?86d&VSjFd~+}TBu0<5K-x_BrPI>vn@@n ztKBNSc@T0tSw@lU3m9s&Xxtc!SGGYK^ogkE8@tCFrNBtE#plJzD`+`wcJH?^SHKPT z6IVa_Dfnz5{{kD7bH&`iyQA`k;^l@01l5J?Saq2ZEPe7KYM<}TvyIktRVf4$g!<-t z8Z^mbh+IL^#0hS1UbbB9KrWZC-^_}(blsS!Hprk<@F`mhzoG*rIgfzILzdk`9jw%2UpZa43Aru(cy(~*j^0l;ScdfjwIyS)rqt$BO3f3kh5Vumn{xPEtdfNEs1#KNZ47VGXizlgLw3=y?DG$77wgwiqWEYiTq6-`$ zaS0pk*#1YBFnQ1U1Cyvuxu;bo&OxC|>lX}bP0f?CBL81W07j0oFes#qOD17{)H{ z5w9iclPx!-4M$Rnl%^jA*vvR{lHBSqH$dQBpW&e!;YmSyV90(613(*qAkX_H#s$u}A5&_0tn4$vYK<*aI?mswvb zxtc@{4)5cVqQU0o)qVmX^`D>rCEuY%mJV7qyW*FKS{MhR?H4Dc4{2 z)UowrCyY4RSJ4XqPUDDuPTPcL@Qz2+G396CIH}3*nq>EIe|~?<*xxMy-oiVqY^)O` zxt4`ztUlzl5m~2N6si&^IdAA!8h3&2b;ix;qFsNYrJ8m>^+V${qV4e8F01BIt)5C_ z!00P|7Dm9$m*OcXY$?=q04+ClJ}aRP z(KDwQxn!w&Aq4mn;10qBWa7A1E7SXFm#vE<2~K?|-YzSYlG*ZQ#~Dq`8$n3dD->LY z#9Xkx7?!ID7~)_YQ*5@{FO811CIBh4hlJf<|8mNjliRv%<00*K?VyXwyHx;MMZKI| z@OIwGrx3i%zrY`U>N4E#a*J4-ci{2t!r4}7M>fZTMD14+dUTX*rO%afHiAT$kaq>! zMHap)pYO+HGgUnodF0|J*6nZ(4^4euFm4$T%#120w=Fjia8#OC_9cv+8?Lg>QSfYF z%ev3$6N>cnBGui;iJ$IAI#6ihif|4Y2?O1@V~ch)CEgE@Pzj~-)Vm6o=Nr<8+`vkm z=i&J3EJWgd7csdmhc)8k?>_Vkz zW1g{GaePpJKLPakY9sT4kw5n!koSV?}}{Ftpu(d=eQ^N9YdY;(+k zw5DXLyw~1YIAwzfRbQWHjo-{0WPIi3VKxG;y3%cUY-2ijYOPq0J?j;#4 zC>Dy+q`(@bNU65s>+9PBaD6nkJFk6y;O*4nw8&8%e{Kp-Y$mIYdC4zO_Vt5ES$#4M z*(gZ-)z&8K0kKu1j~C^4@jQJ#nNvr}di$HP(B1Iz2$9qD|r0ctM|_8Z=!y0@cU zTXu`3pMB|j@7m|h>n73D-)c>a*DHH9!zL=u7PSZU$M}tm66krx-|ys{ zX|owQsHGjI0o8WYw-rb*uO!`hpx`g66z|85@*>_<)N4TWBspm=tnzd9?rO?60OLSu zlP=4vgM0Fh?P=1C*Kbu%CGyV~tK}wWr@e3v2YDnsO;#8ne;HR#;zcxfmw`>8B^5#R`Y#0jCQ&Vl4;ZtAXEv-kNV!mzJ5oKVDWf&+Dag*zTyL zlKb{8s&|dWZ=9-AQ^=>ElIq4w-v^xwh4p6VrLSj>DehG~R;?p42s7S2<(j%jB;V}L zJT-#e>gJ}QoK8et4m%A{xRJSxEA3uxi_s0PvtH=74?H@s%U^B6lOeu!LoVbovjeW6 z=hSzo^X z)ScK}ksL+Fe8ezgY#zN-J?Z)3Uc(lu(sunfGNF~RHiCJ$F?0OcNRfewz~0@@_Q{BQ zs3is$+pqNwKWqz358{|}HT&K6{J19iX7%wMPaZ~-lrpqQAz9&90!!P5n0H^V7oH6) z{p&hF+^U-W+sVgzB+Tzr;X8ZUJZ|1^-?wjXp|*#iq25r8 zJMv_*6+NjEsyYy~pVhPpKfYhyIF(zjDb=0LZ{s;_#M{-duEbavmOx0=!MUMc&65F@ z#nNS{g+uRgJiVnuvD$O4OrFqzHHYU#b>yKIjEZ&-57`>gwU|V>H<+OaLCX_YUe{q^ zjaR_%bxe+wP%QY_4pxyo5glffQ4odqlkK_^RUU)058azFV!|sgdm$wz*VA1#n{_!( zSRVG`S{boxpWHoA1V;B-!j#$i0+TK7&$oMoA_ZJLIvZN-*Y^8p@QT zD+Rq49*+9>uz53CDuZ*VQ*iUgmfrpLJM7M6i)yM4XE*8vUhjcSiB9Q+ zg~^A{Z>_U@cFa;ZO^sqNpcfy;AP~-{g$2`m7T7yfr7=p;9ZPl_({Fxp!=g>$bq*r1 z(QmLn6KyB~M}DRF$vj5dY7Xo!es1Pu#zX*AWg~B5*>hMuUoRT{c3ap8Eu%991Aa}n zUz!zr?Jnn8*m@DBKN)u0#Sl?sMq?+=(&v?4x%8M>pYI)S(&E{+lRsG4vFQbJ%O~2a zNl%u`eMepTK37v^SiwXg80Znv&ke(4Xk*!~^rDB+6F$c&ip+Co1PZ&n1N9Zor5Kqt z-<2Z4s>TWY_$Ex`5xE!R0Po(CtOD(w1{{sn#Rht{u?74GAe>lrDS^yZFVoje*}mwS zEOC5^iMn947b@%nGuN^qZ`?Z#NY>xdXej6kvmG5%)>P}P2-;3Hn~y=4XGFViM~k#AIUs|fY)@k{8oTvL zrd3=243@mEU5d6W-%Y~cz%OJP$E+%-I`YS;dV3to4pxrO8pmB2##dan8#OcDmz|vp zF+Cks3W8c^QH8{kc2PS_t%o(+bzd7HP}knu0GE?k%&q4aw$?#o zZU|&A?m>``uIns^kT{nIAv&z8f$WUaOS z&Nz%WA$+$8J#rb>WyJhi<$EmimF6mISU|>)Hmuq6vlEJxOkD4IqtGo8659+XpTitW zbYz9o%wsxvQs!kj`S#b`fc4tuoZ$LwsaoF%Ojq`=Q64@bRwv~#?Lnl3J)%t1w|Qy} zR&ZGg5n|t+D)BiK^AjnQo+Rb^SFJYOyd$xB7%tN*tnFUPa3Iz@M7zZ2J~!GoVBH28 zf8XaaQ#xac$h08pCB;g67&-WbfXs5OM-$*p)8cxDSrGVbZznV`x^Zx8?1_^Z7 zxSUMP{+Ykxn3sO+DekW8J!5(6TtO-NH$jvc8(#iyok=~-Z6X~{yD$w?9&A(=z&v^lYOe;?A&$x_QIMpSBH-<5aD0yJE-VYwK;t&A4wBOVA9 z`qauNF7d#lrs}SPI4{q-6+!{rnl&DA9 zrXRGcmY*DMFJ$BtlcOS8I;{CnBXhXR!qHvqE{MCUXj4Xkhxg^~`+Gy_8^zpy&CRt8 zcjd2{Eg!m8Ww6{a{i^2b5ann)S4U)cSDytRF5G;PQUl zZD8PmmgOL@#7v^0tJ7mcF_s)%l?C58JeaiTpIeT>(K&wQHg3}KUg}Gc z)XSoly=Y63aEwnfItl}0xc&VeVpf()FN{ugPE0b^5{|Tos9^TwQ#AG(LM5T$omsMm z!(CSK7D3@C#29JzWLxP==dbKuq<9zGirTVpCKU`bdnlfgt$#2vH`yjhPbL3&&GsJR zj`HNkw|R7gjQcY^oln5WPXVJ7LpI3_c)Gh|%emj^m08h~$>|iqKzx#uReLl- zHkWu$$@Tl)L%hxEHYS3vnhH$mZel#YJ7*ND{@5~NV}-&SbWeDbE|r?wA3c&>p|bis zWK&1k{RubIjlv8^?p*S2Pd65Zn|rdsKC83m_FIg47%7R$DrjkRwI2t{J`WfscoF-2 zGTY~U-{50Q=RHsDHL#GXpXwmW7G6ywd{IQ}ge}&X_S$VGNuBDg+y$Es6}-x>l!QhWagnmK&y@8PleRy9bzn zHzSm^do^WRSOZ1A;&IroV^DW5c}@D3&3nR4y`s|%87Jr@Zz6Q3M3d=mK3tQvhlpr} zqA0BgFzwbSWk-w3;4lNM2wl=Q8haE8`Kg#w4Y&k}eR=3c9nSlAlix)j2dDQ=a6aqA zHN;VbcaPU7!>v{$jKkHfFrOffZpU`gym)Zu@!9CBs<^?3P7e8#WT};1-D1{ZUpp1f zt_QL5C(zyxsVPGzlw+yh`s5r<*Ylq?wlS?8sQCmotjVE484Y9g(`4Z_ETm5D;$&ABDb^g0$L-FR6O3j+ea(^uutF!O~ zT+S)P>43~cZdX%qdElEW(_S0u#y$LcK?k{v=e*=O9aO`mbYeBgXYqF?~#rxn?!cEKQFncEVeJO}`6=T)$y@ z%E$3h+t@Z&LjHZy*46|O`-gWKfHcQAD%WsPLqDSXwT6BB=-Hyozrbtm(f^*YCI5n$ z#+;mj4s~CQ(!VQ&mk+g9 zTO7|Jc_besp&@}W(qe}8K@sof}xlU#iH!pNhK+r+sRA&ctS_ZGW=opl@s_9 zI{B}QVTVoOmgthko#Ag8#XJ@bV>x;iVda(dNKM#%JZ*!w)U#iw>*=AsO*}kKpr+HE z6>GkQ!-56aA9rGTA%UzB*%~8J^ftvG3I$p z6AY2*!X*O1a`JH0{3^z8F37ZikC}W|7HGTRpC}u_o{W2LLgPaG&d7FDLc|h&A<*X) zy@wr}wTDGoZ$TTXejMQ6CblfBnrSh4!>?pp)jj4F&ce!ecZo1u+|fbkIJ<>?GYyC2 zJuOE-iBDR?zU1P*9Th3xfKeMoTiG3cq3H~V*eTJC=PCvaIq}gru9C6kRa`1@eLD2` z6q>JYK8O&}r%^#Y6ToTeO{bwdnJ*!yj3C~;T_wUyaF3A}Cl>QYdORX7mrJp<#x6A3 zkj3XqfRj!SXg7yIgPt_()XVZKtFHx9L0c}jo~mP@A4E;n96WrR_M&V^(3Bz{OJOI> z-hGfVR)EVY-jLOXF}%N2TrXaB#~*Z~qLJlRJ!VZn$f;EDgqszx+A7rp`eDLiBYk6`w+?z?Of*rkyZB7 z?|AvNq80y8ehK@D)b{^j=^jXnNy;f-mS3v=oAS%c>PsZ;6pDnn@xXq9((wS1Y}21; ztCy#L(N;kqB|}0bWc)XmT;J&uO|EZf>1d_zXomdc@B>tC{DS~~i7ZE=!I8k&|41*lwX(HAg3GO~ z^^ujK{|;Gh%4OEK$q0upSAp4Q~O_Pc_<~PEc-*tWpH1Sa#^MP zs}$tq|0o4`xubrT^3Mg%|H&;Xni3My@<=JlmsH~`O8&V0Pfmd#(Zv6#1jKzs$v-0~ z|C5qm`waZ5|55@*p8TogkC+k?0vOvEAq8Olb1ME%%X6h3{)&*_ zVixkV5+De<A{MapkM3;tz!K!1A$blC>u=j{Xhy)TBMzNxVz z@_k|pM2Qb?inW!3TZ~!?W+?-%!O~2S>0!Jn)W~BAcQ)H?YM`m>Zvp7G98_3HI zK{nvv0|FsHE#wF}TcdyfrK*Fzot?1}fJ;)}%F!69O;tjJQxa}vWuR|kb2+`LnYkkX z`SXVi0Nl~s#uQ*>ZeV9?XJ=*Xzz%qH+1tX_1_0(n&Ig5o{-u-y#0dg0s~a1D!~ndU zP);5efTf*2GHn{`1DyZ5RWBKoB4ARV_d;1a{T;AS7)5 zs{cR`2=~=Fz(8Ie5uzBlldMhy%0*czH#5k&DU)76Xbx zMIbzUKv5p3C`eoqBqkyOgGmSh{{JDm03jhPM<;y;ryqNokDCYCIEsNmLO~Mi{{V)7 BpppOp diff --git a/elpa/org-plus-contrib-20170407/COPYING b/elpa/org-plus-contrib-20190904/COPYING similarity index 100% rename from elpa/org-plus-contrib-20170407/COPYING rename to elpa/org-plus-contrib-20190904/COPYING diff --git a/elpa/org-plus-contrib-20170407/README_ELPA b/elpa/org-plus-contrib-20190904/README_ELPA similarity index 92% rename from elpa/org-plus-contrib-20170407/README_ELPA rename to elpa/org-plus-contrib-20190904/README_ELPA index be893243..7640a449 100644 --- a/elpa/org-plus-contrib-20170407/README_ELPA +++ b/elpa/org-plus-contrib-20190904/README_ELPA @@ -1,10 +1,10 @@ This is the Emacs Org project, an Emacs library for organizing your life. The homepage of Org is at: - http://orgmode.org + https://orgmode.org Installations instructions are at: - http://orgmode.org/org.html#Installation + https://orgmode.org/org.html#Installation This distribution contains an ELPA packaged version of Org. "ELPA" stands for the "Emacs Lisp Package Archive". diff --git a/elpa/org-plus-contrib-20170407/dir b/elpa/org-plus-contrib-20190904/dir similarity index 100% rename from elpa/org-plus-contrib-20170407/dir rename to elpa/org-plus-contrib-20190904/dir diff --git a/elpa/org-plus-contrib-20170407/etc/ORG-NEWS b/elpa/org-plus-contrib-20190904/etc/ORG-NEWS similarity index 85% rename from elpa/org-plus-contrib-20170407/etc/ORG-NEWS rename to elpa/org-plus-contrib-20190904/etc/ORG-NEWS index 51c516fb..5ce1e791 100644 --- a/elpa/org-plus-contrib-20170407/etc/ORG-NEWS +++ b/elpa/org-plus-contrib-20190904/etc/ORG-NEWS @@ -1,13 +1,426 @@ -ORG NEWS -- history of user-visible changes. -*- org -*- +ORG NEWS -- history of user-visible changes. -*- mode: org; coding: utf-8 -*- -#+LINK: doc http://orgmode.org/worg/doc.html#%s -#+LINK: git http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=%s +#+STARTUP: overview -Copyright (C) 2012-2017 Free Software Foundation, Inc. +#+LINK: doc https://orgmode.org/worg/doc.html#%s +#+LINK: git https://code.orgmode.org/bzg/org-mode/commit/%s + +Copyright (C) 2012-2019 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Org bug reports to mailto:emacs-orgmode@gnu.org. +* Version 9.2 +** Incompatible changes +*** Removal of OrgStruct mode mode and radio lists + +OrgStruct minor mode and radio lists mechanism (~org-list-send-list~ +and ~org-list-radio-lists-templates~) are removed from the code base. + +Note that only radio /lists/ have been removed, not radio tables. + +If you want to manipulate lists like in Org in other modes, we suggest +to use orgalist.el, which you can install from GNU ELPA. + +If you want to use Org folding outside of Org buffers, you can have a +look at the outshine package in the MELPA repository. + +*** Change in the structure template expansion + +Org 9.2 comes with a new template expansion mechanism, combining +~org-insert-structure-template~ bound to ~C-c C-,~. + +If you customized the ~org-structure-template-alist~ option manually, +you probably need to udpate it, see the docstring for accepted values. + +If you prefer using previous patterns, e.g. => + ,#+END_SRC +#+END_SRC + +should become + +#+BEGIN_SRC org + ,#+NAME: foo + ,#+BEGIN_SRC emacs-lisp :noweb-ref bar + 1 + ,#+END_SRC + + ,#+BEGIN_SRC emacs-lisp :noweb-ref bar + 2 + ,#+END_SRC + + ,#+BEGIN_SRC emacs-lisp :noweb yes + <> + ,#+END_SRC +#+END_SRC + +*** Default/accepted values of ~org-calendar-to-agenda-key~ + +The default value and accepted value of ~org-calendar-to-agenda-key~ +changed. This is an excerpt of the new docstring: + +: When set to ‘default’, bind the function to ‘c’, but only if it is +: available in the Calendar keymap. This is the default choice because +: ‘c’ can then be used to switch back and forth between agenda and calendar. +: +: When nil, ‘org-calendar-goto-agenda’ is not bound to any key. + +Check the full docstring for more. + +*** Change the signature of the ~org-set-effort~ function + +Here is the new docstring: + +: (org-set-effort &optional INCREMENT VALUE) +: +: Set the effort property of the current entry. +: If INCREMENT is non-nil, set the property to the next allowed +: value. Otherwise, if optional argument VALUE is provided, use +: it. Eventually, prompt for the new value if none of the previous +: variables is set. + +*** Placeholders in =(eval ...)= macros are always strings + +Within =(eval ...)= macros, =$1=-like placeholders are always replaced +with a string. As a consequence, they must not be enclosed within +quotes. As an illustration, consider the following, now valid, +examples: + +#+begin_example + ,#+macro: join (eval (concat $1 $2)) + ,#+macro: sum (eval (+ (string-to-number $1) (string-to-number $2))) + + {{{join(a,b)}}} => ab + {{{sum(1,2)}}} => 3 +#+end_example + +However, there is no change in non-eval macros: + +#+begin_example + ,#+macro: disp argument: $1 + + {{{disp(text)}}} => argument: text +#+end_example + +*** =align= STARTUP value no longer narrow table columns + +Columns narrowing (or shrinking) is now dynamic. See [[*Dynamically +narrow table columns]] for details. In particular, it is decoupled from +aligning. + +If you need to automatically shrink columns upon opening an Org +document, use =shrink= value instead, or in addition to align: + +#+BEGIN_EXAMPLE +,#+STARTUP: align shrink +#+END_EXAMPLE + +*** ~org-get-tags~ meaning change + +Function ~org-get-tags~ used to return local tags to the current +headline. It now returns all the inherited tags in addition to the +local tags. In order to get the old behaviour back, you can use: + +: (org-get-tags nil t) + +*** Alphabetic sorting in tables and lists + +When sorting alphabetically, ~org-table-sort-lines~ and ~org-sort-list~ +now sort according to the locale’s collation rules instead of by +code-point. + +*** Change the name of the :tags clocktable option to :match + +The =:match= (renamed from =:tags=) option allows to limit clock entries +to those matching a todo-tags matcher. + +The old =:tags= option can be set to =t= to display a headline's tags in a +dedicated column. + +This is consistent with the naming of =org-dblock-write:columnview= +options, where =:match= is also used as a headlines filter. + +** New features +*** Add ~:results link~ support for Babel + +With this output format, create a link to the file specified in +~:file~ header argument, without actually writing any result to it: + +#+begin_example +,#+begin_src shell :dir "data/tmp" :results link :file "crackzor_1.0.c.gz" +wget -c "http://ben.akrin.com/crackzor/crackzor_1.0.c.gz" +,#+end_src + +,#+results: +[[file:data/tmp/crackzor_1.0.c.gz]] +#+end_example + +*** Add ~:session~ support of ob-js for js-comint +#+begin_src js :session "*Javascript REPL*" +console.log("stardiviner") +#+end_src +*** Add ~:session~ support of ob-js for Indium +#+begin_src js :session "*JS REPL*" +console.log("stardiviner") +#+end_src +*** Add ~:session~ support of ob-js for skewer-mode +#+begin_src js :session "*skewer-repl*" +console.log("stardiviner") +#+end_src +*** Add support for links to LaTeX equations in HTML export +Use MathJax links when enabled (by ~org-html-with-latex~), otherwise +add a label to the rendered equation. +*** Org Tempo may used for snippet expansion of structure template. +See manual and the commentary section in ~org-tempo.el~ for details. +*** Exclude unnumbered headlines from table of contents +Set their =UNNUMBERED= property to the special =notoc= value. See +manual for details. +*** ~org-archive~ functions update status cookies + +Archiving headers through ~org-archive-subtree~ and +~org-archive-to-archive-sibling~ such as the ones listed below: + +#+BEGIN_SRC org + ,* Top [1/2] + ,** DONE Completed + ,** TODO Working +#+END_SRC + +Will update the status cookie in the top level header. + +*** Disable =org-agenda-overriding-header= by setting to empty string + +The ~org-agenda-overriding-header~ inserted into agenda views can now +be disabled by setting it to an empty string. + +*** Dynamically narrow table columns + +With ~C-c TAB~, it is now possible to narrow a column to the width +specified by a width cookie in the column, or to 1 character if there +is no such cookie. The same keybinding expands a narrowed column to +its previous state. + +Editing the column automatically expands the whole column to its full +size. + +*** =org-columns-summary-types= entries can take an optional COLLECT function + +You can use this to make collection of a property from an entry +conditional on another entry. E.g. given this configuration: + +#+BEGIN_SRC emacs-lisp + (defun custom/org-collect-confirmed (property) + "Return `PROPERTY' for `CONFIRMED' entries" + (let ((prop (org-entry-get nil property)) + (confirmed (org-entry-get nil "CONFIRMED"))) + (if (and prop (string= "[X]" confirmed)) + prop + "0"))) + + (setq org-columns-summary-types + '(("X+" org-columns--summary-sum + custom/org-collect-confirmed))) +#+END_SRC + +You can have a file =bananas.org= containing: + +#+BEGIN_SRC org + ,#+columns: %ITEM %CONFIRMED %Bananas{+} %Bananas(Confirmed Bananas){X+} + + ,* All shipments + ,** Shipment 1 + :PROPERTIES: + :CONFIRMED: [X] + :Bananas: 4 + :END: + + ,** Shipment 2 + :PROPERTIES: + :CONFIRMED: [ ] + :BANANAS: 7 + :END: +#+END_SRC + +... and when going to the top of that file and entering column view +you should expect to see something like: + +| ITEM | CONFIRMED | Bananas | Confirmed Bananas | +|---------------+-----------+---------+-------------------| +| All shipments | | 11 | 4 | +| Shipment 1 | [X] | 4 | 4 | +| Shipment 2 | [ ] | 7 | 7 | + +#+BEGIN_EXAMPLE + ,#+STARTUP: shrink +#+END_EXAMPLE +*** Allow to filter by tags/property when capturing colview + +You can now use =:match= to filter entries using a todo/tags/properties +matcher. + +*** Add support for Oracle's database alias in Babel blocks +=ob-sql= library already support running SQL blocks against an Oracle +database using ~sqlplus~. Now it's possible to use alias names +defined in =TNSNAMES= file instead of specifying full connection +parameters. See example bellow. + +#+BEGIN_SRC org + you can use the previous full connection parameters + ,#+BEGIN_SRC sql :engine oracle :dbuser me :dbpassword my_insecure_password :database my_db_name :dbhost my_db_host :dbport 1521 + select sysdate from dual; + ,#+END_SRC + + or the alias defined in your TNSNAMES file + ,#+BEGIN_SRC sql :engine oracle :dbuser me :dbpassword my_insecure_password :database my_tns_alias + select sysdate from dual; + ,#+END_SRC +#+END_SRC + +*** ~org-agenda-set-restriction-lock~ toggle agenda restriction at point + +You can set an agenda restriction lock with =C-x C-x <= or with =<= at the +beginning of a headline when using Org speed commands. Now, if there +is already a restriction at point, hitting =<= again (or =C-x C-x <=) will +remove it. + +** New commands and functions + +*** ~org-insert-structure-template~ + +This function can be used to wrap existing text of Org elements in +a #+BEGIN_FOO/#+END_FOO block. Bound to C-c C-x w by default. + +*** ~org-export-excluded-from-toc-p~ + +See docstring for details. + +*** ~org-timestamp-to-time~ +*** ~org-timestamp-from-string~ +*** ~org-timestamp-from-time~ +*** ~org-attach-dired-to-subtree~ + +See docstring for details. + +*** ~org-toggle-narrow-to-subtree~ + +Toggle the narrowing state of the buffer: when in a narrowed state, +widen, otherwise call ~org-narrow-to-subtree~ to narrow. + +This is attached to the "s" speed command, so that hitting "s" twice +will go back to the widen state. + +*** ~org-browse-news~ + +Browse https://orgmode.org/Changes.html to let users read informations +about the last major release. + +There is a new menu entry for this in the "Documentation" menu item. + +*** ~org-info-find-node~ + +From an Org file or an agenda switch to a suitable info page depending +on the context. + +The function is bound to =C-c C-x I=. + +** Removed commands and functions +*** ~org-outline-overlay-data~ +Use ~org-save-outline-visibility~ instead. +*** ~org-set-outline-overlay-data~ +Use ~org-save-outline-visibility~ instead. +*** ~org-get-string-indentation~ +It was not used throughout the code base. +*** ~org-fix-indentation~ +It was not used throughout code base. +*** ~org-context-p~ +Use ~org-element-at-point~ instead. +*** ~org-preserve-lc~ +It is no longer used in the code base. +*** ~org-try-structure-completion~ +Org Tempo may be used as a replacement. See details above. +** Removed options + +*** org-babel-use-quick-and-dirty-noweb-expansion + +See [[*Change to Noweb expansion][Change to Noweb expansion]] for explanations. + +** Miscellaneous + +*** New default value for ~org-texinfo-table-scientific-notation~ + +It is now nil, which means numbers in scientific notation are not +handled specially by default. + +*** New default value for ~org-latex-table-scientific-notation~ + +It is now nil, which means numbers in scientific notation are not +handled specially by default. + +*** New face: ~org-upcoming-distant-deadline~ + +It is meant to be used as the face for distant deadlines, see +~org-agenda-deadline-faces~ + +*** ~org-paste-subtree~ no longer breaks sections + +Unless point is at the beginning of a headline, ~org-paste-subtree~ +now pastes the tree before the next visible headline. If you need to +break the section, use ~org-yank~ instead. + +*** ~org-table-insert-column~ inserts a column to the right + +It used to insert it on the left. With this change, +~org-table-insert-column~ and ~org-table-delete-column~ are +reciprocal. + +*** ~org-publish-resolve-external-link~ accepts a new optional argument. +*** ~org-irc.el~ now supports exporting =irc:= links properly + +Previously, irc links were exported by ~ox-md~ and ~ox-html~ as normal +file links, which lead to them being broken in web browsers. Now both +of these exporters will properly export to =irc:= links, which will +open properly in irc clients from web browsers. + +*** ~org-comment-dwim~ (bound to =M-;=) now comments headings, if point is on a heading +*** Add support for open source block in window below + +Set option ~org-src-window-setup~ to ~split-window-below~. + +*** Alphabetic sorting in headings and tags now uses the locale’s sorting rules + +When sorting alphabetically, ~org-sort-entries~ and +~org-tags-sort-function~ now sort according to the locale’s collation +rules instead of by code-point. +*** New speed command "k" to kill (cut) the subtree at point * Version 9.1 ** Incompatible changes @@ -21,6 +434,12 @@ them, consider modifying ~org-duration-format~ instead. Variable ~org-time-clocksum-use-effort-durations~ is also obsolete. Consider setting ~org-duration-units~ instead. +*** ~org-at-timestamp-p~ optional argument accepts different values + +See docstrings for the allowed values. For backward compatibility, +~(org-at-timestamp-p t)~ is still supported, but should be updated +accordingly. + *** ~org-capture-templates~ no longer accepts S-expressions as file names Since functions are allowed there, a straightforward way to migrate @@ -43,6 +462,10 @@ You can now find them here : - https://github.com/sabof/org-bullets - https://github.com/org-mime/org-mime +*** Change ~org-texinfo-classes~ value +The value cannot support functions to create sectioning commands +anymore. Also, the sectioning commands should include commands for +appendices. See the docstring for more information. *** Removal of ~:sitemap-sans-extension~ The publishing property is no longer recognized, as a consequence of @@ -75,7 +498,40 @@ list as their first argument. The optional argument is now a string to extract the repeater from. See docstring for details. +*** Change signature for ~org-time-string-to-time~ +See docstring for changes. + +*** Change order of items in ~org-agenda-time-grid~ +~org-agenda-time-grid~ gained an extra item to allow users to customize +the string displayed after times in the agenda. See docstring for +details. + +*** ~tags-todo~ custom searches now include DONE keywords + +Use "/!" markup when filtering TODO keywords to get only not-done TODO +keywords. + +*** ~org-split-string~ returns ~("")~ when called on an empty string +It used to return nil. +*** Removal of =ob-scala.el= + +See [[https://github.com/ensime/emacs-scala-mode/issues/114][this github issue]]. + +You can use =ob-scala.el= as packaged in scala-mode, available from the +MELPA repository. + ** New features +*** iCalendar export uses inheritance for TIMEZONE and LOCATION properties +Both these properties can be inherited during iCalendar export, +depending on the value of ~org-use-property-inheritance~. +*** iCalendar export respects a TIMEZONE property +Set the TIMEZONE property on an entry to specify a time zone for that +entry only during iCalendar export. The property value should be +specified as in "Europe/London". +*** ~org-attach~ can move directory contents +When setting a new directory for an entry, org-attach offers to move +files over from the old directory. Using a prefix arg will reset the +directory to old, ID based one. *** New Org duration library This new library implements tools to read and print time durations in various formats (e.g., "H:MM", or "1d 2h 3min"...). @@ -89,6 +545,11 @@ docstrings. **** New variable : ~org-deadline-past-days~ See docstring for details. **** Binding C-c C-x < for ~org-agenda-set-restriction-lock-from-agenda~ +**** New auto-align default setting for =org-agenda-tags-column= + +=org-agenda-tags-column= can now be set to =auto=, which will +automatically align tags to the right edge of the window. This is now +the default setting. *** New value for ~org-publish-sitemap-sort-folders~ The new ~ignore~ value effectively allows toggling inclusion of @@ -96,6 +557,24 @@ directories in published site-maps. *** Babel +**** Scheme: support for tables +**** Scheme: new variable: ~org-babel-scheme-null-to~ + +This new custom option allows you to use an empty list or null symbol to +format the table output, initially assigned to ~hlines~. + +**** Scheme: new header ~:prologue~ + +A new block code header has been created for Org Babel that enables +developers to prepend code to the scheme block being processed. + +Multiple ~:prologue~ headers can be added each of them using a string +with the content to be added. + +The scheme blocks are prepared by surrounding the code in the block +with a let form. The content of the ~:prologue~ headers are prepended +before this let form. + **** Support for hledger accounting reports added **** Clojure: new setting ~org-babel-clojure-sync-nrepl-timeout~ @@ -137,15 +616,15 @@ value of the code will be displayed in the results section. **** Maxima: new headers ~:prologue~ and ~:epilogue~ Babel options ~:prologue~ and ~:epilogue~ have been implemented for -Maxima src blocks which prepend and append, respectively, the given +Maxima source blocks which prepend and append, respectively, the given code strings. This can be useful for specifying formatting settings which would add clutter to exported code. For instance, you can use this ~:prologue "fpprintprec: 2; linel: 50;"~ for presenting Maxima results in a beamer presentation. **** PlantUML: add support for header arguments -[[http://plantuml.com/][Plantuml]] source blocks now support the [[http://orgmode.org/manual/prologue.html#prologue][~:prologue~]], [[http://orgmode.org/manual/epilogue.html#epilogue][~:epilogue~]] and -[[http://orgmode.org/manual/var.html#var][~:var~]] header arguments. +[[http://plantuml.com/][Plantuml]] source blocks now support the [[https://orgmode.org/manual/prologue.html#prologue][~:prologue~]], [[https://orgmode.org/manual/epilogue.html#epilogue][~:epilogue~]] and +[[https://orgmode.org/manual/var.html#var][~:var~]] header arguments. **** SQL: new engine added ~sqsh~ @@ -177,6 +656,33 @@ To use =vertica= in an sql =SRC_BLK= set the =:engine= like this: SELECT * FROM nodes; ,#+END_SRC #+END_EXAMPLE +**** C++: New header ~:namespaces~ + +The new ~:namespaces~ export option can be used to specify namespaces +to be used within a C++ org source block. Its usage is similar to +~:includes~, in that it can accept multiple, space-separated +namespaces to use. This header is equivalent to adding ~using +namespace ;~ in the source block. Here is a "Hello World" in C++ +using ~:namespaces~: + +#+begin_example + ,#+BEGIN_SRC C++ :results output :namespaces std :includes + cout << "Hello World" << endl; + ,#+END_SRC +#+end_example + +**** Support for Vala language + +[[https://wiki.gnome.org/Projects/Vala][Vala]] language blocks support two special header arguments: + +- ~:flags~ passes arguments to the compiler +- ~:cmdline~ passes commandline arguments to the generated executable + +Support for [[https://orgmode.org/manual/var.html#var][~:var~]] does not exist yet, also there is no [[https://orgmode.org/manual/session.html#session][~:session~]] +support because Vala is a compiled language. + +The Vala compiler binary can be changed via the ~defcustom~ +~org-babel-vala-compiler~. *** New ~function~ scope argument for the Clock Table Added a nullary function that returns a list of files as a possible @@ -186,19 +692,28 @@ argument for the scope of the clock table. Global table of contents are generated using vanilla Markdown syntax instead of HTML. Also #+TOC keyword, including local table of contents, are now supported. -**** Add Slovanian translations +**** Add Slovenian translations **** Implement ~org-export-insert-image-links~ This new function is meant to be used in back-ends supporting images as descriptions of links, a.k.a. image links. See its docstring for details. +**** New macro : ~{{{n}}}~ +This macro creates and increment multiple counters in a document. See +manual for details. **** Add global macros through ~org-export-global-macros~ With this variable, one can define macros available for all documents. **** New keyword ~#+EXPORT_FILE_NAME~ -Simiralry to ~:EXPORT_FILE_NAME:~ property, this keyword allows the +Similarly to ~:EXPORT_FILE_NAME:~ property, this keyword allows the user to specify the name of the output file upon exporting the document. This also has an effect on publishing. **** Horizontal rules are no longer ignored in LaTeX table math mode **** Use ~compilation-mode~ for compilation output +**** Plain lists accept a new ~:separator~ attribute in Texinfo + +The new ~:separator~ attribute splits a tag from a description list +item into multiple parts. This allows to have two-column tables with +multiple entries in the first column. See manual for more details. + **** ~latex-environment~ elements support ~caption~ keywords for LaTeX export *** ~org-edit-special~ can edit LaTeX environments @@ -219,6 +734,28 @@ This allow to use a different title than entry title. Using ~C-c C-a u~ prompts for a URL pointing to a file to be attached to the document. +*** New option for ~org-refile-use-outline-path~ +~org-refile-use-outline-path~ now supports the setting ~buffer-name~, +which causes refile targets to be prefixed with the buffer’s +name. This is particularly useful when used in conjunction with +~uniquify.el~. + +*** ~org-file-contents~ now allows the FILE argument to be a URL. +This allows ~#+SETUPFILE:~ to accept a URL instead of a local file +path. The URL contents are auto-downloaded and saved to a temporary +cache ~org--file-cache~. A new optional argument ~NOCACHE~ is added +to ~org-file-contents~. + +*** ~org-mode-restart~ now resets the newly added ~org--file-cache~. +Using ~C-c C-c~ on any keyword (like ~#+SETUPFILE~) will reset the +that file cache. + +*** New option : ~org-table-duration-hour-zero-padding~ +This variable allow computed durations in tables to be zero-padded. + +*** New mode switch for table formulas : =U= +This mode omits seconds in durations. + ** Removed functions *** Org Timeline @@ -250,6 +787,11 @@ Use ~org-duration-to-minutes~ instead. Use ~org-duration-to-minutes~ instead. +*** ~org-gnus-nnimap-cached-article-number~ is removed. + +This function relied on ~nnimap-group-overview-filename~, which was +removed from Gnus circa September 2010. + ** Removed options *** ~org-agenda-repeating-timestamp-show-all~ is removed. @@ -258,11 +800,33 @@ For an equivalent to a ~nil~ value, set ~org-agenda-show-future-repeats~ to nil and ~org-agenda-prefer-last-repeat~ to ~t~. +*** ~org-gnus-nnimap-query-article-no-from-file~ is removed. + +This variable has no effect, as it was relying on a function that was +removed from Gnus circa September 2010. + +*** ~org-usenet-links-prefer-google~ is obsolete. + +Use ~org-gnus-prefer-web-links~ instead. + *** ~org-publish-sitemap-file-entry-format~ is deprecated One can provide new ~:sitemap-format-entry~ property for a function equivalent to the removed format string. +*** ~org-enable-table-editor~ is removed. + +Setting it to a ~nil~ value broke some other features (e.g., speed +keys). + +*** ~org-export-use-babel~ cannot be set to ~inline-only~ + +The variable is now a boolean. + +*** ~org-texinfo-def-table-markup~ is obsolete + +Use ~org-texinfo-table-default-markup~ instead. + ** New functions *** ~org-publish-find-property~ @@ -280,6 +844,24 @@ Call ~org-agenda-set-restriction-lock~ from the agenda. ** Miscellaneous +*** The Library of Babel now on Worg + +The library-of-babel.org used to be accessible from the =doc/= +directory, distributed with Org’s core. It is now accessible +from the Worg community-driven documentation [[https://orgmode.org/worg/library-of-babel.html][here]]. + +If you want to contribute to it, please see [[https://orgmode.org/worg/org-contribute.html][how to contribute]]. + +*** Allow multiple columns view + +Columns view is not limited to a single buffer anymore. +*** Org Attach obeys ~dired-dwim-target~ + +When a Dired buffer is opened next to the Org document being edited, +the prompt for file to attach can start in the Dired buffer's +directory if `dired-dwim-target' in non-nil. + +*** ~org-fill-paragraph~ can now fill a whole region *** More specific anniversary descriptions Anniversary descriptions (used in the agenda view, for instance) @@ -297,7 +879,7 @@ far away in the future. *** Save point before opening a file with an unknown search option When following a file link with a search option (e.g., =::#custom-id=) -that doesn't exist in the target file, save positon before raising an +that doesn't exist in the target file, save position before raising an error. As a consequence, it is possible to jump back to the original document with ~org-mark-ring-goto~ (default binding =C-c &=). @@ -309,7 +891,24 @@ See docstring for details. This variable is a ~defcustom~ and replaces the variable ~org-babel-capitalize-example-region-markers~, which is a ~defvar~ and -is now obselete. +is now obsolete. +*** =INCLUDE= keywords in commented trees are now ignored. +*** Default value for ~org-texinfo-text-markup-alist~ changed. + +Now ~=...=~ markup uses ~@samp{}~ instead of ~@verb{}~. You can use +~@verb{}~ again by customizing the variable. +*** Texinfo exports example blocks as ~@example~ +*** Texinfo exports inline source blocks as ~@code{}~ +*** Texinfo default table markup is ~@asis~ +It used to be ~@samp~ but ~@asis~ is neutral and, therefore, more +suitable as a default value. +*** Texinfo default process includes ~--no-split~ option +*** New entities : ~\dollar~ and ~\USD~ +*** Support for date style URLs in =org-protocol://open-source= + URLs like =https://cool-blog.com/2017/05/20/cool-post/= are + covered by rewrite rules. + +*** Add (C) =COMMENT= support to ~org-structure-template-alist~ * Version 9.0 @@ -323,7 +922,7 @@ above is suggested. *** XEmacs support has been dropped Incomplete compatibility layer with XEmacs has been removed. If you -want to take over maintainance of this compatibility, please contact +want to take over maintenance of this compatibility, please contact our mailing list. *** New syntax for export blocks @@ -420,7 +1019,7 @@ exists. *** ~org-file-apps~ no longer accepts S-expressions as commands The variable now accepts functions of two arguments instead of plain -S-expressions. Replacing a S-expresion with an appropriate function +S-expressions. Replacing an S-expression with an appropriate function is straightforward. For example : ("pdf" . (foo)) @@ -460,7 +1059,7 @@ should be written instead ,* Headline :PROPERTIES: :header-args: :exports code -:header-args: :var a=1 b=2 +:header-args+: :var a=1 b=2 :header-args+: :var c=3 :END: #+END_EXAMPLE @@ -501,7 +1100,7 @@ entries are added to last in the date tree. *** New ~vbar~ entity -~\vbar~ or ~\vbar{}~ will be exported unconditionnally as a =|=, +~\vbar~ or ~\vbar{}~ will be exported unconditionally as a =|=, unlike to existing ~\vert~, which is expanded as ~|~ when using a HTML derived export back-end. @@ -611,7 +1210,7 @@ Evaluating a Stan block can produce two different results. that does not end in ".stan". For more information and usage examples, visit -http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html +https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html **** Support for Oracle databases via ~sqlplus~ @@ -882,7 +1481,7 @@ is that spaces are allowed within the path. *** ~:preparation-function~ called earlier during publishing Functions in this list are called before any file is associated to the -current projet. Thus, they can be used to generate to be published +current project. Thus, they can be used to generate to be published Org files. *** Function ~org-remove-indentation~ changes. @@ -943,7 +1542,7 @@ where local file =emacs.html= is referenced. For most folks this file does not exist. Thus the new behavior is to generate this HTML link instead: -: emacs#List Buffers +: emacs#List Buffers All emacs related info links are similarly translated plus few other =gnu.org= manuals. @@ -1116,9 +1715,9 @@ docstring for more information. ** New features -*** Default lexical evaluation of emacs-lisp src blocks +*** Default lexical evaluation of emacs-lisp source blocks -Emacs-lisp src blocks in babel are now evaluated using lexical +Emacs-lisp source blocks in Babel are now evaluated using lexical scoping. There is a new header to control this behavior. The default results in an eval with lexical scoping. @@ -1171,7 +1770,7 @@ don't have to be distinct on a heading. Grouptags had to previously be defined with { }. This syntax is already used for exclusive tags and Grouptags need their own, -non-exclusive syntax. This behaviour is achieved with [ ]. Note: { } +non-exclusive syntax. This behavior is achieved with [ ]. Note: { } can still be used also for Grouptags but then only one of the given tags can be used on the headline at the same time. Example: @@ -1235,9 +1834,9 @@ Check the documentation for more details. Thanks to Jarmo Hurri for this feature. -*** New behaviour for ~org-toggle-latex-fragment~ +*** New behavior for ~org-toggle-latex-fragment~ -The new behaviour is the following: +The new behavior is the following: - With a double prefix argument or with a single prefix argument when point is before the first headline, toggle overlays in the whole @@ -1289,7 +1888,7 @@ a source block. *** New option in ASCII export Plain lists can have an extra margin by setting ~org-ascii-list-margin~ -variable to an appopriate integer. +variable to an appropriate integer. *** New blocks in ASCII export @@ -1325,7 +1924,7 @@ more features. See docstring for details. *** New filter: ~org-export-filter-body-functions~ Functions in this filter are applied on the body of the exported -document, befor wrapping it within the template. +document, before wrapping it within the template. *** New :environment parameter when exporting example blocks to LaTeX @@ -1390,7 +1989,7 @@ property is inherited by children. *** Tables can be sorted with an arbitrary function -It is now possible to specify a function, both programatically, +It is now possible to specify a function, both programmatically, through a new optional argument, and interactively with ~f~ or ~F~ keys, to sort a table. @@ -1436,10 +2035,10 @@ leading spaces within table cells. Org uses the MathJax CDN by default. See the manual and the docstring of ~org-html-mathjax-options~ for details. -*** New behaviour in `org-export-options-alist' +*** New behavior in `org-export-options-alist' When defining a back-end, it is now possible to specify to give -`parse' behaviour on a keyword. It is equivalent to call +`parse' behavior on a keyword. It is equivalent to call `org-element-parse-secondary-string' on the value. However, parsed =KEYWORD= is automatically associated to an @@ -1558,7 +2157,7 @@ everywhere in the buffer, possibly corrupting URLs. *** Removed option =org-babel-sh-command= This undocumented option defaulted to the value of =shell-file-name= at -the time of loading =ob-shell=. The new behaviour is to use the value +the time of loading =ob-shell=. The new behavior is to use the value of =shell-file-name= directly when the shell langage is =shell=. To chose a different shell, either customize =shell-file-name= or bind this variable locally. @@ -1779,7 +2378,7 @@ This allows to specify the names of automatic bookmarks. *** New option [[doc:org-agenda-ignore-drawer-properties][org-agenda-ignore-drawer-properties]] This allows more flexibility when optimizing the agenda generation. -See http://orgmode.org/worg/agenda-optimization.html for details. +See https://orgmode.org/worg/agenda-optimization.html for details. *** New option: [[doc:org-html-link-use-abs-url][org-html-link-use-abs-url]] to force using absolute URLs This is an export/publishing option, and should be used either within @@ -1802,7 +2401,7 @@ This enables SVG generation from latex code blocks. *** New option: [[doc:org-habit-show-done-always-green][org-habit-show-done-always-green]] -See [[http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00214.html][this message]] from Max Mikhanosha. +See [[https://lists.gnu.org/r/emacs-orgmode/2013-05/msg00214.html][this message]] from Max Mikhanosha. *** New option: [[doc:org-babel-inline-result-wrap][org-babel-inline-result-wrap]] @@ -1863,7 +2462,7 @@ instructions: When in doubt, run =M-x org-version RET= and see if you have a mixed-up installation. -See http://orgmode.org/org.html#Installation for details. +See https://orgmode.org/org.html#Installation for details. ** Incompatible changes @@ -1876,7 +2475,7 @@ you will have to update them. Below is a list of changes for which you need to take action. -See http://orgmode.org/worg/org-8.0.html for the most recent version of +See https://orgmode.org/worg/org-8.0.html for the most recent version of this list and for detailed instructions on how to migrate. **** New export engine @@ -1898,7 +2497,7 @@ corresponding files start with the =ox-= prefix. If you customized an export back-end (like HTML or LaTeX), you will need to rename some options so that your customization is not lost. Typically, an option starting with =org-export-html-= is now named =org-html-=. See the -manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg page]] for directions. +manual for details and check [[https://orgmode.org/worg/org-8.0.html][this Worg page]] for directions. **** New syntax for #+ATTR_HTML/LaTeX/... options @@ -1959,7 +2558,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p ~ox-taskjuggler.el~ by Nicolas Goaziou and others. Also, the Taskjuggler exporter now uses TJ3 by default. John Hendy - wrote [[http://orgmode.org/worg/org-tutorials/org-taskjuggler3.html][a tutorial on Worg]] for the TJ3 export. + wrote [[https://orgmode.org/worg/org-tutorials/org-taskjuggler3.html][a tutorial on Worg]] for the TJ3 export. ** New packages in core @@ -1978,7 +2577,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p *** ~ox-texinfo.el~ by Jonathan Leech-Pepin - =ox-texinfo.el= allows you to export Org files to [[http://www.gnu.org/software/texinfo/][Texinfo]] files. + =ox-texinfo.el= allows you to export Org files to [[https://www.gnu.org/software/texinfo/][Texinfo]] files. ** New packages in contrib @@ -2005,7 +2604,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p Display bullets instead of stars for headlines. - Also see [[http://orgmode.org/worg/org-faq.html#sec-8-12][this updated FAQ]] on how to display another character than "*" + Also see [[https://orgmode.org/worg/org-faq.html#sec-8-12][this updated FAQ]] on how to display another character than "*" for starting headlines. *** ~org-favtable.el~ by Marc-Oliver Ihm @@ -2013,7 +2612,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p ~org-favtable.el~ helps you to create and update a table of favorite locations in org, keeping the most frequently visited lines right at the top. This table is called "favtable". See the documentation on - [[http://orgmode.org/worg/org-contrib/org-favtable.html][Worg]]. + [[https://orgmode.org/worg/org-contrib/org-favtable.html][Worg]]. *** ~ox-confluence.el~ by Sébastien Delafond @@ -2031,7 +2630,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p *** ~ox-groff.el~ by Luis Anaya and Nicolas Goaziou - The [[http://www.gnu.org/software/groff/][groff]] (GNU troff) software is a typesetting package which reads + The [[https://www.gnu.org/software/groff/][groff]] (GNU troff) software is a typesetting package which reads plain text mixed with formatting commands and produces formatted output. @@ -2054,7 +2653,7 @@ manual for details and check [[http://orgmode.org/worg/org-8.0.html][this Worg p **** New export generic options -If you use Org exporter, we advise you to re-read [[http://orgmode.org/org.html#Exporting][the manual section about +If you use Org exporter, we advise you to re-read [[https://orgmode.org/org.html#Exporting][the manual section about it]]. It has been updated and includes new options. Among the new/updated export options, three are of particular importance: @@ -2429,7 +3028,7 @@ of those tags.) You can use group tags for sparse tree in an Org buffer, for creating agenda views, and for filtering. -See http://orgmode.org/org.html#Tag-groups for details. +See https://orgmode.org/org.html#Tag-groups for details. *** Links @@ -2437,7 +3036,7 @@ See http://orgmode.org/org.html#Tag-groups for details. Org knows how to store links from Org buffers, from info files and from other Emacs buffers. Org can be taught how to store links from any buffer -through new link protocols (see [[http://orgmode.org/org.html#Adding-hyperlink-types]["Adding hyperlink types"]] in the manual.) +through new link protocols (see [[https://orgmode.org/org.html#Adding-hyperlink-types]["Adding hyperlink types"]] in the manual.) Sometimes you want Org to ignore added link protocols and store the link as if the protocol was not known. @@ -2461,7 +3060,7 @@ with-description and without-description links when inserting them. When storing a link to a headline like -: * See [[http://orgmode.org][Org website]] +: * See [[https://orgmode.org][Org website]] [[doc:org-store-link][org-store-link]] used to convert the square brackets into curly brackets. It does not anymore, taking the link description or the link path, when @@ -2477,7 +3076,7 @@ those other formulas. **** You now use "nan" for empty fields in Calc formulas If empty fields are of interest, it is recommended to reread the section -[[http://orgmode.org/org.html#Formula-syntax-for-Calc][3.5.2 Formula syntax for Calc]] of the manual because the description for the +[[https://orgmode.org/org.html#Formula-syntax-for-Calc][3.5.2 Formula syntax for Calc]] of the manual because the description for the mode strings has been clarified and new examples have been added towards the end. @@ -2496,7 +3095,7 @@ There are now three lookup functions: - [[doc:org-loopup-last][org-loopup-last]] - [[doc:org-loopup-all][org-loopup-all]] -See [[http://orgmode.org/org.html#Lookup-functions][the manual]] for details. +See [[https://orgmode.org/org.html#Lookup-functions][the manual]] for details. *** Startup keywords These new startup keywords are now available: @@ -2618,7 +3217,7 @@ instead of requiring each Babel library one by one. - New option [[doc:org-gnus-no-server][org-gnus-no-server]] to start Gnus with =gnus-no-server= - Org is now distributed with =htmlize.el= version 1.43 - ~org-drill.el~ has been updated to version 2.3.7 -- ~org-mac-iCal.el~ now supports MacOSX version up to 10.8 +- ~org-mac-iCal.el~ now supports OS X versions up to 10.8 - Various improvements to ~org-contacts.el~ and =orgpan.el= ** Outside Org @@ -2627,7 +3226,7 @@ instead of requiring each Babel library one by one. David (and others) translated the Org compact guide in spanish: -You can read the [[http://orgmode.org/worg/orgguide/orgguide.es.pdf][PDF guide]]. +You can read the [[https://orgmode.org/worg/orgguide/orgguide.es.pdf][PDF guide]]. *** ~poporg.el~ and ~outorg.el~ @@ -2638,7 +3237,7 @@ Org-mode available. ~outorg.el~ comes together with ~outshine.el~ and ~navi-mode.el~, two more libraries by Thorsten Jolitz with the goal to give source-code buffers the /look & feel/ of Org-mode buffers while greatly improving navigation and structure editing. A detailed description can be -found here: http://orgmode.org/worg/org-tutorials/org-outside-org.html +found here: https://orgmode.org/worg/org-tutorials/org-outside-org.html Here are two screencasts demonstrating Thorsten's tools: @@ -2707,15 +3306,15 @@ in most environments. You can now add the Org ELPA repository like this: #+BEGIN_SRC emacs-lisp -(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) +(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) #+END_SRC It contains both the =org-*.tar= package (the core Org distribution, also -available through http://elpa.gnu.org) and the =org-plus*.tar= package (the +available through https://elpa.gnu.org) and the =org-plus*.tar= package (the extended Org distribution, with non-GNU packages from the =contrib/= directory.) -See http://orgmode.org/elpa/ +See https://orgmode.org/elpa/ ** Overview of the new keybindings @@ -2731,7 +3330,7 @@ See http://orgmode.org/elpa/ | =C-c C-x E= | =E= | [[doc::org-inc-effort][org-inc-effort]] | | | =#= | [[doc::org-toggle-comment][org-toggle-comment]] | | | =:= | [[doc::org-columns][org-columns]] | - | | =W= | Set =APPT_WARNTIME= | + | | =W= | Set =APPT_WARNTIME= | | =k= | | [[doc::org-agenda-capture][org-agenda-capture]] | | C-c , | , | [[doc::org-priority][org-priority]] | @@ -2739,7 +3338,7 @@ See http://orgmode.org/elpa/ *** =org-eshell.el= by Konrad Hinsen is now in Org - =org-eshell.el= allows you to create links from [[http://www.gnu.org/software/emacs/manual/html_node/eshell/index.html][Eshell]]. + =org-eshell.el= allows you to create links from [[https://www.gnu.org/software/emacs/manual/html_node/eshell/index.html][Eshell]]. *** Support for execution of Scala code blocks (see ob-scala.el) *** Support for execution of IO code blocks (see ob-io.el) @@ -2898,7 +3497,7 @@ See http://orgmode.org/elpa/ **** New =todo-unblocked= and =nottodo-unblocked= skip conditions - See the [[http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f426da][git commit]] for more explanations. + See the [[https://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f426da][git commit]] for more explanations. **** Allow category filtering in the agenda @@ -3215,7 +3814,7 @@ See http://orgmode.org/elpa/ Thanks to Carsten for implementing this. **** ODT: Add support for ODT export in org-bbdb.el -**** ODT: Add support for indented tables (see [[http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e9fd33][this commit]] for details) +**** ODT: Add support for indented tables (see [[https://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e9fd33][this commit]] for details) **** ODT: Improve the conversion from ODT to other formats **** ASCII: Swap the level-1/level-2 characters to underline the headlines **** Support for Chinese, simplified Chinese, Russian, Ukrainian and Japanese @@ -3339,7 +3938,7 @@ that Calc formulas can operate on them. =org-export-html-scripts= is now a variable, so that you can adapt the code and the license to your needs. - See http://www.gnu.org/philosophy/javascript-trap.html for + See https://www.gnu.org/philosophy/javascript-trap.html for explanations on why these changes were necessary. * Version 7.8.11 @@ -3348,7 +3947,7 @@ that Calc formulas can operate on them. *** Emacs 21 support has been dropped - Do not use Org mode 7.xx with Emacs 21, use [[http://orgmode.org/org-6.36c.zip][version 6.36c]] instead. + Do not use Org mode 7.xx with Emacs 21, use [[https://orgmode.org/org-6.36c.zip][version 6.36c]] instead. *** XEmacs support requires the XEmacs development version @@ -3498,7 +4097,7 @@ that Calc formulas can operate on them. This replaces the earlier system org-remember. The manual only describes org-capture, but for people who prefer to continue to use org-remember, we keep a static copy of the former manual - section [[http://orgmode.org/org-remember.pdf][chapter about remember]]. + section [[https://orgmode.org/org-remember.pdf][chapter about remember]]. The new system has a technically cleaner implementation and more possibilities for capturing different types of data. See @@ -3562,7 +4161,7 @@ that Calc formulas can operate on them. **** org-taskjuggler.el (Christian Egli) Christian Egli's /org-taskjuggler.el/ module is now part of Org. - He also wrote a [[http://orgmode.org/worg/org-tutorials/org-taskjuggler.php][tutorial]] for it. + He also wrote a [[https://orgmode.org/worg/org-tutorials/org-taskjuggler.php][tutorial]] for it. **** org-ctags.el (Paul Sexton) @@ -3782,7 +4381,7 @@ that Calc formulas can operate on them. Org-mode documents or subtrees can now be converted directly in to BEAMER presentation. Turning a tree into a simple presentations is straight forward, and there is also quite some - support to make richer presentations as well. See the [[http://orgmode.org/manual/Beamer-class-export.html#Beamer-class-export][BEAMER + support to make richer presentations as well. See the [[https://orgmode.org/manual/Beamer-class-export.html#Beamer-class-export][BEAMER section]] in the manual for more details. Thanks to everyone who has contributed to the discussion about @@ -4124,4 +4723,4 @@ that Calc formulas can operate on them. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GNU Emacs. If not, see . + along with GNU Emacs. If not, see . diff --git a/elpa/org-plus-contrib-20170407/etc/styles/OrgOdtContentTemplate.xml b/elpa/org-plus-contrib-20190904/etc/styles/OrgOdtContentTemplate.xml similarity index 100% rename from elpa/org-plus-contrib-20170407/etc/styles/OrgOdtContentTemplate.xml rename to elpa/org-plus-contrib-20190904/etc/styles/OrgOdtContentTemplate.xml diff --git a/elpa/org-plus-contrib-20170407/etc/styles/OrgOdtStyles.xml b/elpa/org-plus-contrib-20190904/etc/styles/OrgOdtStyles.xml similarity index 100% rename from elpa/org-plus-contrib-20170407/etc/styles/OrgOdtStyles.xml rename to elpa/org-plus-contrib-20190904/etc/styles/OrgOdtStyles.xml diff --git a/elpa/org-plus-contrib-20170407/etc/styles/README b/elpa/org-plus-contrib-20190904/etc/styles/README similarity index 88% rename from elpa/org-plus-contrib-20170407/etc/styles/README rename to elpa/org-plus-contrib-20190904/etc/styles/README index d04f4349..496ccb05 100644 --- a/elpa/org-plus-contrib-20170407/etc/styles/README +++ b/elpa/org-plus-contrib-20190904/etc/styles/README @@ -1,7 +1,7 @@ The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the following copyright information: -Copyright (C) 2010-2014 Free Software Foundation, Inc. +Copyright (C) 2010-2019 Free Software Foundation, Inc. These files are part of GNU Emacs. @@ -16,12 +16,12 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . +along with GNU Emacs. If not, see . Author: Jambunathan K Keywords: outlines, hypermedia, calendar, wp -Homepage: http://orgmode.org +Homepage: https://orgmode.org Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-C.el b/elpa/org-plus-contrib-20190904/ob-C.el similarity index 92% rename from elpa/org-plus-contrib-20170407/ob-C.el rename to elpa/org-plus-contrib-20190904/ob-C.el index 795bcb2b..92d034fa 100644 --- a/elpa/org-plus-contrib-20170407/ob-C.el +++ b/elpa/org-plus-contrib-20190904/ob-C.el @@ -1,11 +1,11 @@ ;;; ob-C.el --- Babel Functions for C and Similar Languages -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Thierry Banel ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -34,11 +34,9 @@ (require 'cc-mode) (require 'ob) - +(require 'org-macs) (declare-function org-entry-get "org" (pom property &optional inherit literal-nil)) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("C++" . "cpp")) @@ -46,6 +44,19 @@ (defvar org-babel-default-header-args:C '()) +(defconst org-babel-header-args:C '((includes . :any) + (defines . :any) + (main . :any) + (flags . :any) + (cmdline . :any) + (libs . :any)) + "C/C++-specific header arguments.") + +(defconst org-babel-header-args:C++ + (append '((namespaces . :any)) + org-babel-header-args:C) + "C++-specific header arguments.") + (defcustom org-babel-C-compiler "gcc" "Command used to compile a C source code file into an executable. May be either a command in the path, like gcc @@ -125,7 +136,8 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." (pcase org-babel-c-variant (`c ".c") (`cpp ".cpp") (`d ".d")))) (tmp-bin-file ;not used for D - (org-babel-temp-file "C-bin-" org-babel-exeext)) + (org-babel-process-file-name + (org-babel-temp-file "C-bin-" org-babel-exeext))) (cmdline (cdr (assq :cmdline params))) (cmdline (if cmdline (concat " " cmdline) "")) (flags (cdr (assq :flags params))) @@ -151,7 +163,7 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." (pcase org-babel-c-variant (`c org-babel-C-compiler) (`cpp org-babel-C++-compiler)) - (org-babel-process-file-name tmp-bin-file) + tmp-bin-file flags (org-babel-process-file-name tmp-src-file) libs) @@ -195,15 +207,18 @@ its header arguments." (colnames (cdr (assq :colname-names params))) (main-p (not (string= (cdr (assq :main params)) "no"))) (includes (org-babel-read - (or (cdr (assq :includes params)) - (org-entry-get nil "includes" t)) + (cdr (assq :includes params)) nil)) (defines (org-babel-read - (or (cdr (assq :defines params)) - (org-entry-get nil "defines" t)) - nil))) + (cdr (assq :defines params)) + nil)) + (namespaces (org-babel-read + (cdr (assq :namespaces params)) + nil))) (when (stringp includes) (setq includes (split-string includes))) + (when (stringp namespaces) + (setq namespaces (split-string namespaces))) (when (stringp defines) (let ((y nil) (result (list t))) @@ -223,6 +238,11 @@ its header arguments." (mapconcat (lambda (inc) (format "#define %s" inc)) (if (listp defines) defines (list defines)) "\n") + ;; namespaces + (mapconcat + (lambda (inc) (format "using namespace %s;" inc)) + namespaces + "\n") ;; variables (mapconcat 'org-babel-C-var-to-C vars "\n") ;; table sizes @@ -278,12 +298,12 @@ its header arguments." (defun org-babel-prep-session:C (_session _params) "This function does nothing as C is a compiled language with no support for sessions" - (error "C is a compiled languages -- no support for sessions")) + (error "C is a compiled language -- no support for sessions")) (defun org-babel-load-session:C (_session _body _params) "This function does nothing as C is a compiled language with no support for sessions" - (error "C is a compiled languages -- no support for sessions")) + (error "C is a compiled language -- no support for sessions")) ;; helper functions @@ -353,8 +373,8 @@ FORMAT can be either a format string or a function which is called with VAL." (pcase (org-babel-C-val-to-base-type v) (`stringp (setq type 'stringp)) (`floatp - (if (or (not type) (eq type 'integerp)) - (setq type 'floatp))) + (when (or (not type) (eq type 'integerp)) + (setq type 'floatp))) (`integerp (unless type (setq type 'integerp))))) val) diff --git a/elpa/org-plus-contrib-20170407/ob-J.el b/elpa/org-plus-contrib-20190904/ob-J.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-J.el rename to elpa/org-plus-contrib-20190904/ob-J.el index eba4bc63..498cd59e 100644 --- a/elpa/org-plus-contrib-20170407/ob-J.el +++ b/elpa/org-plus-contrib-20190904/ob-J.el @@ -1,10 +1,10 @@ ;;; ob-J.el --- Babel Functions for J -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2019 Free Software Foundation, Inc. ;; Author: Oleh Krehel ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -31,8 +31,8 @@ ;;; Code: (require 'ob) +(require 'org-macs) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function j-console-ensure-session "ext:j-console" ()) (defcustom org-babel-J-command "jconsole" @@ -89,7 +89,7 @@ This function is called by `org-babel-execute-src-block'" (org-babel-J-eval-string full-body))))) (defun org-babel-J-eval-string (str) - "Sends STR to the `j-console-cmd' session and exectues it." + "Sends STR to the `j-console-cmd' session and executes it." (let ((session (j-console-ensure-session))) (with-current-buffer (process-buffer session) (goto-char (point-max)) diff --git a/elpa/org-plus-contrib-20170407/ob-R.el b/elpa/org-plus-contrib-20190904/ob-R.el similarity index 99% rename from elpa/org-plus-contrib-20170407/ob-R.el rename to elpa/org-plus-contrib-20190904/ob-R.el index 60990535..9e738a8a 100644 --- a/elpa/org-plus-contrib-20170407/ob-R.el +++ b/elpa/org-plus-contrib-20190904/ob-R.el @@ -1,11 +1,11 @@ ;;; ob-R.el --- Babel Functions for R -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research, R, statistics -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-abc.el b/elpa/org-plus-contrib-20190904/ob-abc.el similarity index 83% rename from elpa/org-plus-contrib-20170407/ob-abc.el rename to elpa/org-plus-contrib-20190904/ob-abc.el index 0ce503d3..43ee1d99 100644 --- a/elpa/org-plus-contrib-20170407/ob-abc.el +++ b/elpa/org-plus-contrib-20190904/ob-abc.el @@ -1,28 +1,26 @@ ;;; ob-abc.el --- Org Babel Functions for ABC -*- lexical-binding: t; -*- -;; Copyright (C) 2013-2017 Free Software Foundation, Inc. +;; Copyright (C) 2013-2019 Free Software Foundation, Inc. ;; Author: William Waites ;; Keywords: literate programming, music ;; Homepage: http://www.tardis.ed.ac.uk/wwaites ;; Version: 0.01 -;;; License: +;; This file is part of GNU Emacs. -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -49,7 +47,7 @@ (value (cdr pair))) (setq body (replace-regexp-in-string - (concat "\$" (regexp-quote name)) + (concat "\\$" (regexp-quote name)) (if (stringp value) value (format "%S" value)) body)))) vars) @@ -61,7 +59,7 @@ (message "executing Abc source code block") (let* ((cmdline (cdr (assq :cmdline params))) (out-file (let ((file (cdr (assq :file params)))) - (if file (replace-regexp-in-string "\.pdf$" ".ps" file) + (if file (replace-regexp-in-string "\\.pdf$" ".ps" file) (error "abc code block requires :file header argument")))) (in-file (org-babel-temp-file "abc-")) (render (concat "abcm2ps" " " cmdline diff --git a/elpa/org-plus-contrib-20190904/ob-arduino.el b/elpa/org-plus-contrib-20190904/ob-arduino.el new file mode 100644 index 00000000..57a15ffa --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-arduino.el @@ -0,0 +1,105 @@ +;;; ob-arduino.el --- Org-mode Babel support for Arduino. +;; +;; Authors: stardiviner +;; Package-Requires: ((emacs "24.4") (org "24.1")) +;; Package-Version: 1.0 +;; Keywords: arduino org babel +;; homepage: https://github.com/stardiviner/arduino-mode +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . +;; +;;; Commentary: +;; +;; Like the following src block, press =[C-c C-c]= to upload to Arduino board. +;; +;; #+begin_src arduino +;; // the setup function runs once when you press reset or power the board +;; void setup() { +;; // initialize digital pin LED_BUILTIN as an output. +;; pinMode(LED_BUILTIN, OUTPUT); +;; } +;; +;; // the loop function runs over and over again forever +;; void loop() { +;; digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) +;; delay(100); // wait for 0.1 second +;; digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW +;; delay(100); // wait for 0.1 second +;; } +;; #+end_src +;; +;;; Code: + +(require 'org) +(require 'ob) +(require 'arduino-mode) + +(defgroup ob-arduino nil + "org-mode blocks for Arduino." + :group 'org) + +(defcustom ob-arduino:program "arduino" + "Default Arduino program name." + :group 'ob-arduino + :type 'string) + +(defcustom ob-arduino:port "/dev/ttyACM0" + "Default Arduino port." + :group 'ob-arduino + :type 'string) + +(defcustom ob-arduino:board "arduino:avr:uno" + "Default Arduino board." + :group 'ob-arduino + :type 'string) + + +(defvar org-babel-default-header-args:sclang nil) + +;;;###autoload +(defun org-babel-execute:arduino (body params) + "org-babel arduino hook." + (let* ((port (cdr (assoc :port params))) + (board (cdr (assoc :board params))) + (cmd (mapconcat 'identity (list + ob-arduino:program "--upload" + (if port (concat "--port " port)) + (if board (concat "--board " board)) + ) " ")) + (code (org-babel-expand-body:generic body params)) + (src-file (org-babel-temp-file "ob-arduino-" ".ino"))) + ;; delete all `ob-arduino' temp files, otherwise arduino will compile all + ;; ob-arduino temp files, and report error. + (mapc + (lambda (f) + (unless (file-directory-p f) + (delete-file (expand-file-name f org-babel-temporary-directory)))) + (directory-files + (file-name-directory (org-babel-temp-file "ob-arduino-" ".ino")) + nil ".ino")) + ;; specify file for arduino command. + (with-temp-file src-file + (insert code)) + (org-babel-eval + (concat ob-arduino:program + " " "--upload" + " " (if port (concat "--port " port)) + " " (if board (concat "--board " board)) + " " src-file) + "" ; pass empty string "" as `BODY' to `org-babel--shell-command-on-region' + ;; to fix command `arduino' don't accept string issue. + ) + )) + + +;;;###autoload +(eval-after-load 'org + '(add-to-list 'org-src-lang-modes '("arduino" . arduino))) + + + + +(provide 'ob-arduino) + +;;; ob-arduino.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-asymptote.el b/elpa/org-plus-contrib-20190904/ob-asymptote.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-asymptote.el rename to elpa/org-plus-contrib-20190904/ob-asymptote.el index 1dbf4842..667d3e10 100644 --- a/elpa/org-plus-contrib-20170407/ob-asymptote.el +++ b/elpa/org-plus-contrib-20190904/ob-asymptote.el @@ -1,10 +1,10 @@ ;;; ob-asymptote.el --- Babel Functions for Asymptote -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-awk.el b/elpa/org-plus-contrib-20190904/ob-awk.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-awk.el rename to elpa/org-plus-contrib-20190904/ob-awk.el index 2db4eeae..4c0dbbc6 100644 --- a/elpa/org-plus-contrib-20170407/ob-awk.el +++ b/elpa/org-plus-contrib-20190904/ob-awk.el @@ -1,10 +1,10 @@ ;;; ob-awk.el --- Babel Functions for Awk -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-calc.el b/elpa/org-plus-contrib-20190904/ob-calc.el similarity index 92% rename from elpa/org-plus-contrib-20170407/ob-calc.el rename to elpa/org-plus-contrib-20190904/ob-calc.el index d4b7260c..d888f988 100644 --- a/elpa/org-plus-contrib-20170407/ob-calc.el +++ b/elpa/org-plus-contrib-20190904/ob-calc.el @@ -1,10 +1,10 @@ ;;; ob-calc.el --- Babel Functions for Calc -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -27,6 +27,7 @@ ;;; Code: (require 'ob) +(require 'org-macs) (require 'calc) (require 'calc-trail) (require 'calc-store) @@ -34,10 +35,9 @@ (declare-function calc-store-into "calc-store" (&optional var)) (declare-function calc-recall "calc-store" (&optional var)) (declare-function math-evaluate-expr "calc-ext" (x)) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-default-header-args:calc nil - "Default arguments for evaluating an calc source block.") + "Default arguments for evaluating a calc source block.") (defun org-babel-expand-body:calc (body _params) "Expand BODY according to PARAMS, return the expanded body." body) diff --git a/elpa/org-plus-contrib-20190904/ob-clojure-literate.el b/elpa/org-plus-contrib-20190904/ob-clojure-literate.el new file mode 100644 index 00000000..4c4d38a0 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-clojure-literate.el @@ -0,0 +1,350 @@ +;;; ob-clojure-literate.el --- Clojure's Org-mode Literate Programming. + +;; Authors: stardiviner +;; Package-Requires: ((emacs "24.4") (org "9") (cider "0.16.0") (dash "2.12.0")) +;; Package-Version: 1.1 +;; Keywords: tools +;; homepage: https://github.com/stardiviner/ob-clojure-literate + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: +;; +;; Auto setup ob-clojure-literate scaffold and jack-in Clojure project. +;; +;; Usage: +;; +;; [M-x ob-clojure-literate-mode] to toggle this minor mode. + +;;; Code: + +(require 'ob-clojure) +(require 'cider) + +(defgroup ob-clojure-literate nil + "Clojure's Org-mode Literate Programming." + :prefix "ob-clojure-literate-" + :group 'ob-babel) + +;;;###autoload +(defcustom ob-clojure-literate-auto-jackin-p nil + "Auto jack in ob-clojure project. +Don't auto jack in by default for not rude." + :type 'boolean + :group 'ob-clojure-literate) + +(defcustom ob-clojure-literate-project-location nil + "The location for `ob-clojure-literate' scaffold project. +If it is nil, then `cider-jack-in' will jack-in outside of Clojure project. +If it is a directory, `ob-clojure-literate' will try to create Clojure project automatically." + :type 'string + :group 'ob-clojure-literate) + +(defvar ob-clojure-literate-session nil) +(defvar ob-clojure-literate-original-ns nil) +(defvar ob-clojure-literate-session-ns nil) +(defvar ob-clojure-literate-cider-connections nil) + +(defcustom ob-clojure-literate-default-session "*cider-repl localhost*" + "The default session name for `ob-clojure-literate'." + :type 'string + :group 'ob-clojure-literate) + +(defun ob-clojure-literate-any-connection-p () + "Return t if have any CIDER connection." + (and + ;; handle the case `cider-jack-in' is not finished creating connection, but `ob-clojure-literate-mode' is enabled. + (not (null (cider-connections))) + (not (null ob-clojure-literate-session)) ; before mode enabled, it is nil. + (not (string-empty-p ob-clojure-literate-session)) ; after disable, it is "". + )) + +(defun ob-clojure-literate-get-session-list () + "Return a list of available started CIDER REPL sessions list." + (mapcar #'buffer-name + ;; for multiple connections case. + ;; get global value instead of buffer local. + (default-value 'cider-connections))) + +;;; Do not allow "ob-clojure" project session name. +(defun ob-clojure-literate-set-session () + "Set session name for buffer local." + ;; if default session is the only one in connections list. + (if (and (= (length (ob-clojure-literate-get-session-list)) 1) + (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list))) + (setq-local ob-clojure-literate-session ob-clojure-literate-default-session) + ;; if have any connections, choose one from them. + (if (ob-clojure-literate-any-connection-p) + (setq-local ob-clojure-literate-session + (completing-read "Choose ob-clojure-literate :session : " + (ob-clojure-literate-get-session-list))) + ;; if none, set to default session name to fix `ob-clojure-literate-mode' + ;; is enabled before `cider-jack-in' generated connections. + (setq-local ob-clojure-literate-session + ob-clojure-literate-default-session)))) + +;;;###autoload +(defun ob-clojure-literate-specify-session () + "Specify ob-clojure header argument :session with value selected from a list of available sessions." + (interactive) + (let ((lang (nth 0 (org-babel-get-src-block-info)))) + (if (and (string= lang "clojure") ; only in clojure src block. + (car (seq-filter ; only when :session is not specified yet. + (lambda (header-argument) + (if (eq (car header-argument) :session) + (not (null (cdr header-argument))))) + (nth 2 (org-babel-get-src-block-info))))) + (org-babel-insert-header-arg + "session" + (format "\"%s\"" + (completing-read + "Choose :session for ob-clojure-literate: " + (ob-clojure-literate-get-session-list)))) + (message "This function only used in `clojure' src block."))) + ) + +;;; Auto start CIDER REPL session in a complete Leiningen project environment for Org-mode Babel to jack-in. +;;;###autoload +(defun ob-clojure-literate-auto-jackin () + "Auto setup ob-clojure-literate scaffold and jack-in Clojure project." + (interactive) + (cond + ;; jack-in outside of Clojure project. + ((null ob-clojure-literate-project-location) + (if (member (get-buffer "*cider-repl localhost*") cider-connections) + (message "CIDER default session already launched.") + (cider-jack-in nil))) + ((not (null ob-clojure-literate-project-location)) + (unless (file-directory-p (expand-file-name ob-clojure-literate-project-location)) + (make-directory ob-clojure-literate-project-location t) + (let ((default-directory ob-clojure-literate-project-location)) + (shell-command "lein new ob-clojure"))) + (unless (or + (and (cider-connected-p) + (if (not (null ob-clojure-literate-session)) + (seq-contains cider-connections (get-buffer ob-clojure-literate-session)))) + cider-connections + (ob-clojure-literate-any-connection-p)) + ;; return back to original file. + (if (not (and (= (length (ob-clojure-literate-get-session-list)) 1) + (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list)))) + (save-window-excursion + (find-file (expand-file-name (concat ob-clojure-literate-project-location "ob-clojure/src/ob_clojure/core.clj"))) + (with-current-buffer "core.clj" + (cider-jack-in)))))))) + +(defun ob-clojure-literate-set-local-cider-connections (toggle?) + "Set buffer local `cider-connections' for `ob-clojure-literate-mode' `TOGGLE?'." + (if toggle? + (progn + (setq ob-clojure-literate-cider-connections cider-connections) + (unless (local-variable-if-set-p 'cider-connections) + (make-local-variable 'cider-connections)) + (setq-local cider-connections ob-clojure-literate-cider-connections)) + ;; store/restore emptied CIDER connections by `ob-clojure-literate-enable'. + (kill-local-variable 'cider-connections) ; kill local variable so that I can get the original global variable value. + ;; Empty all CIDER connections to avoid `cider-current-connection' return any connection. + ;; FIXME: when try to enable, `cider-connections' is local and nil. + ;; (if (and (= (length (ob-clojure-literate-get-session-list)) 1) + ;; (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list)))) + ;; (unless (local-variable-if-set-p 'cider-connections) + ;; (make-local-variable 'cider-connections)) + ;; (setq-local cider-connections '()) + )) + +(defun ob-clojure-literate-set-ns (body params) + "Fix the issue that `cider-current-ns' try to invoke `clojure-find-ns' to extract ns from buffer." + ;; TODO: Is it possible to find ns in `body'? + (when (ob-clojure-literate-any-connection-p) + (setq ob-clojure-literate-original-ns (cider-current-ns)) + (with-current-buffer ob-clojure-literate-session + (setq ob-clojure-literate-session-ns cider-buffer-ns)) + (setq-local cider-buffer-ns (or (cdr (assq :ns params)) + ob-clojure-literate-session-ns))) + (message (format "ob-clojure-literate: current CIDER ns is [%s]." cider-buffer-ns))) + +(defun ob-clojure-literate-set-local-session (toggle?) + "Set buffer local `org-babel-default-header-args:clojure' for `ob-clojure-literate-mode' `TOGGLE?'." + (if toggle? + (progn + ;; set local default session for ob-clojure. + (setq ob-clojure-literate-session (ob-clojure-literate-set-session)) + (unless (local-variable-if-set-p 'org-babel-default-header-args:clojure) + (make-local-variable 'org-babel-default-header-args:clojure)) + (add-to-list 'org-babel-default-header-args:clojure + `(:session . ,ob-clojure-literate-session)) + ) + ;; remove :session from buffer local default header arguments list. + (unless (local-variable-if-set-p 'org-babel-default-header-args:clojure) + (make-local-variable 'org-babel-default-header-args:clojure)) + (setq org-babel-default-header-args:clojure + (delq t + (mapcar + (lambda (cons) (if (eq (car cons) :session) t cons)) + org-babel-default-header-args:clojure))))) + +;;; Support `org-babel-initiate-session' / [C-c C-v z] to initialize Clojure session. + +(defun org-babel-clojure-initiate-session (&optional session _params) + "Initiate a session named SESSION according to PARAMS." + (when (and session (not (string= session "none"))) + (save-window-excursion + (unless (org-babel-comint-buffer-livep session) + ;; CIDER jack-in to the Clojure project directory. + (cond + ((eq org-babel-clojure-backend 'cider) + (require 'cider) + (let ((session-buffer (save-window-excursion + (cider-jack-in t) + (current-buffer)))) + (if (org-babel-comint-buffer-livep session-buffer) + (progn (sit-for .25) session-buffer)))) + ((eq org-babel-clojure-backend 'slime) + (error "Session evaluation with SLIME is not supported")) + (t + (error "Session initiate failed"))) + ) + (get-buffer session) + ))) + +(defun org-babel-prep-session:clojure (session params) + "Prepare SESSION according to the header arguments specified in PARAMS." + (let* ((session (org-babel-clojure-initiate-session session)) + (var-lines (org-babel-variable-assignments:clojure params))) + (when session + (org-babel-comint-in-buffer session + (mapc (lambda (var) + (insert var) (comint-send-input nil t) + (org-babel-comint-wait-for-output session) + (sit-for .1) (goto-char (point-max))) var-lines))) + session)) + +(defun org-babel-clojure-var-to-clojure (var) + "Convert src block's `VAR' to Clojure variable." + (if (listp var) + (replace-regexp-in-string "(" "'(" var) + (cond + ((stringp var) + ;; wrap org-babel passed in header argument value with quote in Clojure. + (format "\"%s\"" var)) + (t + (format "%s" var)))) + ) + +(defun org-babel-variable-assignments:clojure (params) + "Return a list of Clojure statements assigning the block's variables in `PARAMS'." + (mapcar + (lambda (pair) + (format "(def %s %s)" + (car pair) + (org-babel-clojure-var-to-clojure (cdr pair)))) + (org-babel--get-vars params))) + +;;; Support header arguments :results graphics :file "image.png" by inject Clojure code. +(defun ob-clojure-literate-inject-code (args) + "Inject Clojure code into `BODY' in `ARGS'. +It is used to change Clojure currently working directory in a FAKE way. +And generate inline graphics image file link result. +Use header argument like this: + +:results graphics :file \"incanter-plot.png\" + +Then you need to assign image variable to this :file value like: +(def incanter-plot (histogram (sample-normal 1000))) + +*NOTE*: Currently only support Incanter's `save' function. +" + (let* ((body (nth 0 args)) + (params (nth 1 args)) + (dir (cdr (assq :dir params))) + (default-directory (and (buffer-file-name) (file-name-directory (buffer-file-name)))) + (directory (and dir (file-name-as-directory (expand-file-name dir)))) + (result-type (cdr (assq :results params))) + (file (cdr (assq :file params))) + (file-name (and file (file-name-base file))) + ;; TODO: future support `:graphics-file' to avoid collision. + (graphics-result (member "graphics" (cdr (assq :result-params params)))) + ;; (graphics-file (cdr (assq :graphics-file params))) + ;; (graphics-name (file-name-base graphics-file)) + (prepend-to-body (lambda (code) + (setq body (concat code "\n" body)))) + (append-to-body (lambda (code) + (setq body (concat body "\n" code "\n")))) + ) + (when directory + (unless (file-directory-p (expand-file-name directory)) + (warn (format "Target directory %s does not exist, please create it." dir)))) + (when file + (funcall append-to-body + (format "(save %s \"%s\")" file-name (concat directory file))) + ) + (list body params) ; return modified argument list + )) + +;;; support :results graphics :dir "data/image" :file "incanter-plot.png" +(defun ob-clojure-literate-support-graphics-result (result) + "Support :results graphics :dir \"data/images\" :file \"incanter-plot.png\" +reset `RESULT' to `nil'." + (let* ((params (nth 2 info)) + (graphics-result (member "graphics" (cdr (assq :result-params params))))) + (if graphics-result + (setq result nil)) + result)) + + +(defvar ob-clojure-literate-mode-map + (let ((map (make-sparse-keymap))) + map) + "Keymap for `ob-clojure-literate-mode'.") + +(define-key org-babel-map (kbd "M-s") 'ob-clojure-literate-specify-session) +(define-key org-babel-map (kbd "M-j") 'ob-clojure-literate-auto-jackin) +;; (define-key org-babel-map (kbd "M-e") 'cider-eval-last-sexp) +;; (define-key org-babel-map (kbd "M-d") 'cider-doc) + +;;;###autoload +(defun ob-clojure-literate-enable () + "Enable Org-mode buffer locally for `ob-clojure-literate'." + (when (and (not (null cider-connections)) ; only enable `ob-clojure-literate-mode' when has CIDER connections. + (equal major-mode 'org-mode)) ; `ob-clojure-literate-mode' only works in `org-mode'. + (ob-clojure-literate-set-local-cider-connections ob-clojure-literate-mode) + (ob-clojure-literate-set-local-session ob-clojure-literate-mode) + (advice-add 'org-babel-execute:clojure :before #'ob-clojure-literate-set-ns) + (advice-add 'org-babel-expand-body:clojure :filter-args #'ob-clojure-literate-inject-code) + (advice-add 'org-babel-execute:clojure :filter-return #'ob-clojure-literate-support-graphics-result) + (message "ob-clojure-literate minor mode enabled."))) + +;;;###autoload +(defun ob-clojure-literate-disable () + "Disable Org-mode buffer locally for `ob-clojure-literate'." + (advice-remove 'org-babel-execute:clojure #'ob-clojure-literate-set-ns) + (advice-remove 'org-babel-expand-body:clojure #'ob-clojure-literate-inject-code) + (advice-remove 'org-babel-execute:clojure #'ob-clojure-literate-support-graphics-result) + (setq-local cider-buffer-ns ob-clojure-literate-original-ns) + (ob-clojure-literate-set-local-cider-connections ob-clojure-literate-mode) + (ob-clojure-literate-set-local-session ob-clojure-literate-mode) + (message "ob-clojure-literate minor mode disabled.")) + +;;;###autoload +(if ob-clojure-literate-auto-jackin-p (ob-clojure-literate-auto-jackin)) + +;;;###autoload +(define-minor-mode ob-clojure-literate-mode + "A minor mode to toggle `ob-clojure-literate'." + :require 'ob-clojure-literate + :init-value nil + :lighter " clj-lp" + :group 'ob-clojure-literate + :keymap ob-clojure-literate-mode-map + :global nil + (if ob-clojure-literate-mode + (ob-clojure-literate-enable) + (ob-clojure-literate-disable)) + ) + + + +(provide 'ob-clojure-literate) + +;;; ob-clojure-literate.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-clojure.el b/elpa/org-plus-contrib-20190904/ob-clojure.el similarity index 79% rename from elpa/org-plus-contrib-20170407/ob-clojure.el rename to elpa/org-plus-contrib-20190904/ob-clojure.el index ada35a4b..6407a674 100644 --- a/elpa/org-plus-contrib-20170407/ob-clojure.el +++ b/elpa/org-plus-contrib-20190904/ob-clojure.el @@ -1,11 +1,11 @@ ;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson ;; ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -41,20 +41,19 @@ ;;; Code: (require 'cl-lib) (require 'ob) +(require 'org-macs) (declare-function cider-current-connection "ext:cider-client" (&optional type)) (declare-function cider-current-ns "ext:cider-client" ()) (declare-function nrepl--merge "ext:nrepl-client" (dict1 dict2)) (declare-function nrepl-dict-get "ext:nrepl-client" (dict key)) (declare-function nrepl-dict-put "ext:nrepl-client" (dict key value)) -(declare-function nrepl-request:eval "ext:nrepl-client" - (input callback connection &optional session ns line column additional-params)) -(declare-function nrepl-sync-request:eval "ext:nrepl-client" - (input connection session &optional ns)) -(declare-function org-trim "org" (s &optional keep-lead)) +(declare-function nrepl-request:eval "ext:nrepl-client" (input callback connection &optional ns line column additional-params tooling)) +(declare-function nrepl-sync-request:eval "ext:nrepl-client" (input connection &optional ns tooling)) (declare-function slime-eval "ext:slime" (sexp &optional package)) (defvar nrepl-sync-request-timeout) +(defvar cider-buffer-ns) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj")) @@ -80,19 +79,40 @@ If the value is nil, timeout is disabled." (const :tag "cider" cider) (const :tag "SLIME" slime))) +(defcustom org-babel-clojure-default-ns "user" + "Default Clojure namespace for source block when finding ns failed." + :type 'string + :group 'org-babel) + +(defun org-babel-clojure-cider-current-ns () + "Like `cider-current-ns' except `cider-find-ns'." + (or cider-buffer-ns + (let ((repl-buf (cider-current-connection))) + (and repl-buf (buffer-local-value 'cider-buffer-ns repl-buf))) + org-babel-clojure-default-ns)) + (defun org-babel-expand-body:clojure (body params) "Expand BODY according to PARAMS, return the expanded body." (let* ((vars (org-babel--get-vars params)) + (ns (or (cdr (assq :ns params)) + (org-babel-clojure-cider-current-ns))) (result-params (cdr (assq :result-params params))) - (print-level nil) (print-length nil) - (body (org-trim - (if (null vars) (org-trim body) - (concat "(let [" - (mapconcat - (lambda (var) - (format "%S (quote %S)" (car var) (cdr var))) - vars "\n ") - "]\n" body ")"))))) + (print-level nil) + (print-length nil) + (body + (org-trim + (format "(ns %s)\n%s" + ;; Source block specified namespace :ns. + ns + ;; Variables binding. + (if (null vars) (org-trim body) + (format "(let [%s]\n%s)" + (mapconcat + (lambda (var) + (format "%S (quote %S)" (car var) (cdr var))) + vars + "\n ") + body)))))) (if (or (member "code" result-params) (member "pp" result-params)) (format "(clojure.pprint/pprint (do %s))" body) @@ -102,9 +122,9 @@ If the value is nil, timeout is disabled." "Execute a block of Clojure code with Babel. The underlying process performed by the code block can be output using the :show-process parameter." - (let ((expanded (org-babel-expand-body:clojure body params)) - (response (list 'dict)) - result) + (let* ((expanded (org-babel-expand-body:clojure body params)) + (response (list 'dict)) + result) (cl-case org-babel-clojure-backend (cider (require 'cider) @@ -117,8 +137,7 @@ using the :show-process parameter." (let ((nrepl-sync-request-timeout org-babel-clojure-sync-nrepl-timeout)) (nrepl-sync-request:eval expanded - (cider-current-connection) - (cider-current-ns)))) + (cider-current-connection)))) (setq result (concat (nrepl-dict-get response @@ -152,8 +171,7 @@ using the :show-process parameter." (nrepl--merge response resp) ;; Update the status of the nREPL output session. (setq status (nrepl-dict-get response "status"))) - (cider-current-connection) - (cider-current-ns)) + (cider-current-connection)) ;; Wait until the nREPL code finished to be processed. (while (not (member "done" status)) diff --git a/elpa/org-plus-contrib-20170407/ob-comint.el b/elpa/org-plus-contrib-20190904/ob-comint.el similarity index 92% rename from elpa/org-plus-contrib-20170407/ob-comint.el rename to elpa/org-plus-contrib-20190904/ob-comint.el index cc60f4e4..aa0d341d 100644 --- a/elpa/org-plus-contrib-20170407/ob-comint.el +++ b/elpa/org-plus-contrib-20190904/ob-comint.el @@ -1,10 +1,10 @@ ;;; ob-comint.el --- Babel Functions for Interaction with Comint Buffers -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -33,11 +33,10 @@ (require 'ob-core) (require 'org-compat) (require 'comint) -(require 'tramp) (defun org-babel-comint-buffer-livep (buffer) "Check if BUFFER is a comint buffer with a live process." - (let ((buffer (if buffer (get-buffer buffer)))) + (let ((buffer (when buffer (get-buffer buffer)))) (and buffer (buffer-live-p buffer) (get-buffer-process buffer) buffer))) (defmacro org-babel-comint-in-buffer (buffer &rest body) @@ -148,10 +147,6 @@ FILE exists at end of evaluation." (process-send-string (get-buffer-process buffer) (if (= (aref string (1- (length string))) ?\n) string (concat string "\n"))) - ;; From Tramp 2.1.19 the following cache flush is not necessary - (when (file-remote-p default-directory) - (with-parsed-tramp-file-name default-directory nil - (tramp-flush-directory-property v ""))) (while (not (file-exists-p file)) (sit-for (or period 0.25)))) (provide 'ob-comint) diff --git a/elpa/org-plus-contrib-20170407/ob-coq.el b/elpa/org-plus-contrib-20190904/ob-coq.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-coq.el rename to elpa/org-plus-contrib-20190904/ob-coq.el index 93d2b1f7..26682c18 100644 --- a/elpa/org-plus-contrib-20170407/ob-coq.el +++ b/elpa/org-plus-contrib-20190904/ob-coq.el @@ -1,10 +1,10 @@ ;;; ob-coq.el --- Babel Functions for Coq -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-core.el b/elpa/org-plus-contrib-20190904/ob-core.el similarity index 88% rename from elpa/org-plus-contrib-20170407/ob-core.el rename to elpa/org-plus-contrib-20190904/ob-core.el index d64f7b1e..fe658ecf 100644 --- a/elpa/org-plus-contrib-20170407/ob-core.el +++ b/elpa/org-plus-contrib-20190904/ob-core.el @@ -1,11 +1,11 @@ ;;; ob-core.el --- Working with Code Blocks -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Code: (require 'cl-lib) @@ -35,6 +35,7 @@ (defvar org-babel-library-of-babel) (defvar org-edit-src-content-indentation) +(defvar org-link-file-path-type) (defvar org-src-lang-modes) (defvar org-src-preserve-indentation) @@ -47,10 +48,8 @@ (declare-function org-babel-ref-resolve "ob-ref" (ref)) (declare-function org-babel-ref-split-args "ob-ref" (arg-string)) (declare-function org-babel-tangle-comment-links "ob-tangle" (&optional info)) -(declare-function org-completing-read "org" (&rest args)) (declare-function org-current-level "org" ()) (declare-function org-cycle "org" (&optional arg)) -(declare-function org-do-remove-indentation "org" (&optional n)) (declare-function org-edit-src-code "org-src" (&optional code edit-buffer-name)) (declare-function org-edit-src-exit "org-src" ()) (declare-function org-element-at-point "org-element" ()) @@ -60,9 +59,6 @@ (declare-function org-element-type "org-element" (element)) (declare-function org-entry-get "org" (pom property &optional inherit literal-nil)) (declare-function org-escape-code-in-region "org-src" (beg end)) -(declare-function org-get-indentation "org" (&optional line)) -(declare-function org-get-indentation "org" (&optional line)) -(declare-function org-in-regexp "org" (regexp &optional nlines visually)) (declare-function org-indent-line "org" ()) (declare-function org-list-get-list-end "org-list" (item struct prevs)) (declare-function org-list-prevs-alist "org-list" (struct)) @@ -74,27 +70,18 @@ (declare-function org-mark-ring-push "org" (&optional pos buffer)) (declare-function org-narrow-to-subtree "org" ()) (declare-function org-next-block "org" (arg &optional backward block-regexp)) -(declare-function org-number-sequence "org-compat" (from &optional to inc)) (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer)) -(declare-function org-outline-overlay-data "org" (&optional use-markers)) (declare-function org-previous-block "org" (arg &optional block-regexp)) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-reverse-string "org" (string)) -(declare-function org-set-outline-overlay-data "org" (data)) (declare-function org-show-context "org" (&optional key)) -(declare-function org-split-string "org" (string &optional separators)) -(declare-function org-src-coderef-format "org-src" (element)) +(declare-function org-src-coderef-format "org-src" (&optional element)) (declare-function org-src-coderef-regexp "org-src" (fmt &optional label)) (declare-function org-table-align "org-table" ()) (declare-function org-table-end "org-table" (&optional table-type)) (declare-function org-table-import "org-table" (file arg)) (declare-function org-table-to-lisp "org-table" (&optional txt)) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function org-unescape-code-in-string "org-src" (s)) -(declare-function org-uniquify "org" (list)) (declare-function orgtbl-to-generic "org-table" (table params)) (declare-function orgtbl-to-orgtbl "org-table" (table params)) -(declare-function outline-show-all "outline" ()) (declare-function tramp-compat-make-temp-file "tramp-compat" (filename &optional dir-flag)) (defgroup org-babel nil @@ -188,9 +175,14 @@ This string must include a \"%s\" which will be replaced by the results." :safe #'booleanp) (defun org-babel-noweb-wrap (&optional regexp) - (concat org-babel-noweb-wrap-start - (or regexp "\\([^ \t\n].+?[^ \t]\\|[^ \t\n]\\)") - org-babel-noweb-wrap-end)) + "Return regexp matching a Noweb reference. + +Match any reference, or only those matching REGEXP, if non-nil. + +When matching, reference is stored in match group 1." + (concat (regexp-quote org-babel-noweb-wrap-start) + (or regexp "\\([^ \t\n]\\(?:.*?[^ \t\n]\\)?\\)") + (regexp-quote org-babel-noweb-wrap-end))) (defvar org-babel-src-name-regexp "^[ \t]*#\\+name:[ \t]*" @@ -242,11 +234,9 @@ should be asked whether to allow evaluation." (query (or (equal eval "query") (and export (equal eval "query-export")) (if (functionp org-confirm-babel-evaluate) - (save-excursion - (goto-char (nth 5 info)) - (funcall org-confirm-babel-evaluate - ;; language, code block body - (nth 0 info) (nth 1 info))) + (funcall org-confirm-babel-evaluate + ;; Language, code block body. + (nth 0 info) (nth 1 info)) org-confirm-babel-evaluate)))) (cond (noeval nil) @@ -367,7 +357,7 @@ a window into the `org-babel-get-src-block-info' function." ;;;###autoload (defun org-babel-expand-src-block-maybe () "Conditionally expand a source block. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-expand-src-block'." (interactive) (org-babel-when-in-src-block @@ -376,7 +366,7 @@ then run `org-babel-expand-src-block'." ;;;###autoload (defun org-babel-load-in-session-maybe () "Conditionally load a source block in a session. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-load-in-session'." (interactive) (org-babel-when-in-src-block @@ -387,7 +377,7 @@ then run `org-babel-load-in-session'." ;;;###autoload (defun org-babel-pop-to-session-maybe () "Conditionally pop to a session. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-switch-to-session'." (interactive) (org-babel-when-in-src-block @@ -420,7 +410,7 @@ then run `org-babel-switch-to-session'." (post . :any) (prologue . :any) (results . ((file list vector table scalar verbatim) - (raw html latex org code pp drawer) + (raw html latex org code pp drawer link graphics) (replace silent none append prepend) (output value))) (rownames . ((no yes))) @@ -536,7 +526,7 @@ to raise errors for all languages.") "Hook for functions to be called after `org-babel-execute-src-block'") (defun org-babel-named-src-block-regexp-for-name (&optional name) - "This generates a regexp used to match a src block named NAME. + "This generates a regexp used to match a source block named NAME. If NAME is nil, match any name. Matched name is then put in match group 9. Other match groups are defined in `org-babel-src-block-regexp'." @@ -570,7 +560,7 @@ Remove final newline character and spurious indentation." ;;; functions (defvar org-babel-current-src-block-location nil - "Marker pointing to the src block currently being executed. + "Marker pointing to the source block currently being executed. This may also point to a call line or an inline code block. If multiple blocks are being executed (e.g., in chained execution through use of the :var header argument) this marker points to @@ -581,9 +571,10 @@ the outer-most code block.") (defun org-babel-get-src-block-info (&optional light datum) "Extract information from a source block or inline source block. -Optional argument LIGHT does not resolve remote variable -references; a process which could likely result in the execution -of other code blocks. +When optional argument LIGHT is non-nil, Babel does not resolve +remote variable references; a process which could likely result +in the execution of other code blocks, and do not evaluate Lisp +values in parameters. By default, consider the block at point. However, when optional argument DATUM is provided, extract information from that parsed @@ -614,8 +605,9 @@ a list with the following pattern: ;; properties applicable to its location within ;; the document. (org-with-point-at (org-element-property :begin datum) - (org-babel-params-from-properties lang)) - (mapcar #'org-babel-parse-header-arguments + (org-babel-params-from-properties lang light)) + (mapcar (lambda (h) + (org-babel-parse-header-arguments h light)) (cons (org-element-property :parameters datum) (org-element-property :header datum))))) (or (org-element-property :switches datum) "") @@ -658,7 +650,7 @@ block." (let* ((params (nth 2 info)) (cache (let ((c (cdr (assq :cache params)))) (and (not arg) c (string= "yes" c)))) - (new-hash (and cache (org-babel-sha1-hash info))) + (new-hash (and cache (org-babel-sha1-hash info :eval))) (old-hash (and cache (org-babel-current-result-hash))) (current-cache (and new-hash (equal new-hash old-hash)))) (cond @@ -710,10 +702,16 @@ block." (let ((file (cdr (assq :file params)))) ;; If non-empty result and :file then write to :file. (when file - (when result + ;; If `:results' are special types like `link' or + ;; `graphics', don't write result to `:file'. Only + ;; insert a link to `:file'. + (when (and result + (not (or (member "link" result-params) + (member "graphics" result-params)))) (with-temp-file file (insert (org-babel-format-result - result (cdr (assq :sep params)))))) + result + (cdr (assq :sep params)))))) (setq result file)) ;; Possibly perform post process provided its ;; appropriate. Dynamically bind "*this*" to the @@ -984,13 +982,24 @@ with a prefix argument then this is passed on to (defmacro org-babel-do-in-edit-buffer (&rest body) "Evaluate BODY in edit buffer if there is a code block at point. Return t if a code block was found at point, nil otherwise." - `(let ((org-src-window-setup 'switch-invisibly)) - (when (and (org-babel-where-is-src-block-head) + (declare (debug (body))) + `(let* ((element (org-element-at-point)) + ;; This function is not supposed to move point. However, + ;; `org-edit-src-code' always moves point back into the + ;; source block. It is problematic if the point was before + ;; the code, e.g., on block's opening line. In this case, + ;; we want to restore this location after executing BODY. + (outside-position + (and (<= (line-beginning-position) + (org-element-property :post-affiliated element)) + (point-marker))) + (org-src-window-setup 'switch-invisibly)) + (when (and (org-babel-where-is-src-block-head element) (org-edit-src-code)) (unwind-protect (progn ,@body) - (org-edit-src-exit)) + (org-edit-src-exit) + (when outside-position (goto-char outside-position))) t))) -(def-edebug-spec org-babel-do-in-edit-buffer (body)) (defun org-babel-do-key-sequence-in-edit-buffer (key) "Read key sequence and execute the command in edit buffer. @@ -1014,30 +1023,32 @@ evaluation mechanisms." ;;;###autoload (defun org-babel-open-src-block-result (&optional re-run) - "If `point' is on a src block then open the results of the -source code block, otherwise return nil. With optional prefix -argument RE-RUN the source-code block is evaluated even if -results already exist." + "Open results of source block at point. + +If `point' is on a source block then open the results of the source +code block, otherwise return nil. With optional prefix argument +RE-RUN the source-code block is evaluated even if results already +exist." (interactive "P") - (let ((info (org-babel-get-src-block-info 'light))) - (when info - (save-excursion - ;; go to the results, if there aren't any then run the block - (goto-char (or (and (not re-run) (org-babel-where-is-src-block-result)) - (progn (org-babel-execute-src-block) - (org-babel-where-is-src-block-result)))) - (end-of-line 1) - (while (looking-at "[\n\r\t\f ]") (forward-char 1)) - ;; open the results - (if (looking-at org-bracket-link-regexp) - ;; file results - (org-open-at-point) - (let ((r (org-babel-format-result - (org-babel-read-result) (cdr (assq :sep (nth 2 info)))))) - (pop-to-buffer (get-buffer-create "*Org-Babel Results*")) - (delete-region (point-min) (point-max)) - (insert r))) - t)))) + (pcase (org-babel-get-src-block-info 'light) + (`(,_ ,_ ,arguments ,_ ,_ ,start ,_) + (save-excursion + ;; Go to the results, if there aren't any then run the block. + (goto-char start) + (goto-char (or (and (not re-run) (org-babel-where-is-src-block-result)) + (progn (org-babel-execute-src-block) + (org-babel-where-is-src-block-result)))) + (end-of-line) + (skip-chars-forward " \r\t\n") + ;; Open the results. + (if (looking-at org-bracket-link-regexp) (org-open-at-point) + (let ((r (org-babel-format-result (org-babel-read-result) + (cdr (assq :sep arguments))))) + (pop-to-buffer (get-buffer-create "*Org Babel Results*")) + (erase-buffer) + (insert r))) + t)) + (_ nil))) ;;;###autoload (defmacro org-babel-map-src-blocks (file &rest body) @@ -1217,11 +1228,14 @@ the current subtree." (widen)))) ;;;###autoload -(defun org-babel-sha1-hash (&optional info) - "Generate an sha1 hash based on the value of info." +(defun org-babel-sha1-hash (&optional info context) + "Generate a sha1 hash based on the value of INFO. +CONTEXT specifies the context of evaluation. It can be `:eval', +`:export', `:tangle'. A nil value means `:eval'." (interactive) (let ((print-level nil) - (info (or info (org-babel-get-src-block-info)))) + (info (or info (org-babel-get-src-block-info))) + (context (or context :eval))) (setf (nth 2 info) (sort (copy-sequence (nth 2 info)) (lambda (a b) (string< (car a) (car b))))) @@ -1249,8 +1263,9 @@ the current subtree." ;; expanded body (lang (nth 0 info)) (params (nth 2 info)) - (body (if (org-babel-noweb-p params :eval) - (org-babel-expand-noweb-references info) (nth 1 info))) + (body (if (org-babel-noweb-p params context) + (org-babel-expand-noweb-references info) + (nth 1 info))) (expand-cmd (intern (concat "org-babel-expand-body:" lang))) (assignments-cmd (intern (concat "org-babel-variable-assignments:" lang))) @@ -1419,57 +1434,101 @@ portions of results lines." (lambda () (add-hook 'change-major-mode-hook 'org-babel-show-result-all 'append 'local))) -(defvar org-file-properties) -(defun org-babel-params-from-properties (&optional lang) - "Retrieve parameters specified as properties. -Return a list of association lists of source block params +(defun org-babel-params-from-properties (&optional lang no-eval) + "Retrieve source block parameters specified as properties. + +LANG is the language of the source block, as a string. When +optional argument NO-EVAL is non-nil, do not evaluate Lisp values +in parameters. + +Return a list of association lists of source block parameters specified in the properties of the current outline entry." (save-match-data (list - ;; header arguments specified with the header-args property at + ;; Header arguments specified with the header-args property at ;; point of call. (org-babel-parse-header-arguments - (org-entry-get org-babel-current-src-block-location - "header-args" - 'inherit)) - (and lang ; language-specific header arguments at point of call + (org-entry-get (point) "header-args" 'inherit) + no-eval) + ;; Language-specific header arguments at point of call. + (and lang (org-babel-parse-header-arguments - (org-entry-get org-babel-current-src-block-location - (concat "header-args:" lang) - 'inherit)))))) + (org-entry-get (point) (concat "header-args:" lang) 'inherit) + no-eval))))) (defun org-babel-balanced-split (string alts) "Split STRING on instances of ALTS. -ALTS is a cons of two character options where each option may be -either the numeric code of a single character or a list of -character alternatives. For example to split on balanced -instances of \"[ \t]:\" set ALTS to ((32 9) . 58)." - (let* ((matches (lambda (ch spec) (if (listp spec) (member ch spec) (equal spec ch)))) - (matched (lambda (ch last) - (if (consp alts) - (and (funcall matches ch (cdr alts)) - (funcall matches last (car alts))) - (funcall matches ch alts)))) - (balance 0) (last 0) - quote partial lst) - (mapc (lambda (ch) ; split on [], (), "" balanced instances of [ \t]: - (setq balance (+ balance - (cond ((or (equal 91 ch) (equal 40 ch)) 1) - ((or (equal 93 ch) (equal 41 ch)) -1) - (t 0)))) - (when (and (equal 34 ch) (not (equal 92 last))) - (setq quote (not quote))) - (setq partial (cons ch partial)) - (when (and (= balance 0) (not quote) (funcall matched ch last)) - (setq lst (cons (apply #'string (nreverse - (if (consp alts) - (cddr partial) - (cdr partial)))) - lst)) - (setq partial nil)) - (setq last ch)) - (string-to-list string)) - (nreverse (cons (apply #'string (nreverse partial)) lst)))) +ALTS is a character, or cons of two character options where each +option may be either the numeric code of a single character or +a list of character alternatives. For example, to split on +balanced instances of \"[ \t]:\", set ALTS to ((32 9) . 58)." + (with-temp-buffer + (insert string) + (goto-char (point-min)) + (let ((splitp (lambda (past next) + ;; Non-nil when there should be a split after NEXT + ;; character. PAST is the character before NEXT. + (pcase alts + (`(,(and first (pred consp)) . ,(and second (pred consp))) + (and (memq past first) (memq next second))) + (`(,first . ,(and second (pred consp))) + (and (eq past first) (memq next second))) + (`(,(and first (pred consp)) . ,second) + (and (memq past first) (eq next second))) + (`(,first . ,second) + (and (eq past first) (eq next second))) + ((pred (eq next)) t) + (_ nil)))) + (partial nil) + (result nil)) + (while (not (eobp)) + (cond + ((funcall splitp (char-before) (char-after)) + ;; There is a split after point. If ALTS is two-folds, + ;; remove last parsed character as it belongs to ALTS. + (when (consp alts) (pop partial)) + ;; Include elements parsed so far in RESULTS and flush + ;; partial parsing. + (when partial + (push (apply #'string (nreverse partial)) result) + (setq partial nil)) + (forward-char)) + ((memq (char-after) '(?\( ?\[)) + ;; Include everything between balanced brackets. + (let* ((origin (point)) + (after (char-after)) + (openings (list after))) + (forward-char) + (while (and openings (re-search-forward "[]()]" nil t)) + (pcase (char-before) + ((and match (or ?\[ ?\()) (push match openings)) + (?\] (when (eq ?\[ (car openings)) (pop openings))) + (_ (when (eq ?\( (car openings)) (pop openings))))) + (if (null openings) + (setq partial + (nconc (nreverse (string-to-list + (buffer-substring origin (point)))) + partial)) + ;; Un-balanced bracket. Backtrack. + (push after partial) + (goto-char (1+ origin))))) + ((and (eq ?\" (char-after)) (not (eq ?\\ (char-before)))) + ;; Include everything from current double quote to next + ;; non-escaped double quote. + (let ((origin (point))) + (if (re-search-forward "[^\\]\"" nil t) + (setq partial + (nconc (nreverse (string-to-list + (buffer-substring origin (point)))) + partial)) + ;; No closing double quote. Backtrack. + (push ?\" partial) + (forward-char)))) + (t (push (char-after) partial) + (forward-char)))) + ;; Add pending parsing and return result. + (when partial (push (apply #'string (nreverse partial)) result)) + (nreverse result)))) (defun org-babel-join-splits-near-ch (ch list) "Join splits where \"=\" is on either end of the split." @@ -1483,9 +1542,11 @@ instances of \"[ \t]:\" set ALTS to ((32 9) . 58)." (cons el acc)))) list :initial-value nil)))) -(defun org-babel-parse-header-arguments (arg-string) - "Parse a string of header arguments returning an alist." - (when (> (length arg-string) 0) +(defun org-babel-parse-header-arguments (string &optional no-eval) + "Parse header arguments in STRING. +When optional argument NO-EVAL is non-nil, do not evaluate Lisp +in parameters. Return an alist." + (when (org-string-nw-p string) (org-babel-parse-multiple-vars (delq nil (mapcar @@ -1494,10 +1555,12 @@ instances of \"[ \t]:\" set ALTS to ((32 9) . 58)." "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" arg) (cons (intern (match-string 1 arg)) - (org-babel-read (org-babel-chomp (match-string 2 arg)))) + (org-babel-read (org-babel-chomp (match-string 2 arg)) + no-eval)) (cons (intern (org-babel-chomp arg)) nil))) - (let ((raw (org-babel-balanced-split arg-string '((32 9) . 58)))) - (cons (car raw) (mapcar (lambda (r) (concat ":" r)) (cdr raw))))))))) + (let ((raw (org-babel-balanced-split string '((32 9) . 58)))) + (cons (car raw) + (mapcar (lambda (r) (concat ":" r)) (cdr raw))))))))) (defun org-babel-parse-multiple-vars (header-arguments) "Expand multiple variable assignments behind a single :var keyword. @@ -1719,19 +1782,25 @@ NAME, or nil if no such block exists. Set match data according to `org-babel-named-src-block-regexp'." (save-excursion (goto-char (point-min)) - (ignore-errors - (org-next-block 1 nil (org-babel-named-src-block-regexp-for-name name))))) + (let ((regexp (org-babel-named-src-block-regexp-for-name name))) + (or (and (looking-at regexp) + (progn (goto-char (match-beginning 1)) + (line-beginning-position))) + (ignore-errors (org-next-block 1 nil regexp)))))) (defun org-babel-src-block-names (&optional file) "Returns the names of source blocks in FILE or the current buffer." - (when file (find-file file)) - (save-excursion - (goto-char (point-min)) - (let ((re (org-babel-named-src-block-regexp-for-name)) - names) - (while (ignore-errors (org-next-block 1 nil re)) - (push (match-string-no-properties 9) names)) - names))) + (with-current-buffer (if file (find-file-noselect file) (current-buffer)) + (org-with-point-at 1 + (let ((regexp "^[ \t]*#\\+begin_src ") + (case-fold-search t) + (names nil)) + (while (re-search-forward regexp nil t) + (let ((element (org-element-at-point))) + (when (eq 'src-block (org-element-type element)) + (let ((name (org-element-property :name element))) + (when name (push name names)))))) + names)))) ;;;###autoload (defun org-babel-goto-named-result (name) @@ -1791,7 +1860,7 @@ With optional prefix argument ARG, jump backward ARG many source blocks." ;;;###autoload (defun org-babel-mark-block () - "Mark current src block." + "Mark current source block." (interactive) (let ((head (org-babel-where-is-src-block-head))) (when head @@ -1822,7 +1891,7 @@ region is not active then the point is demarcated." (save-excursion (goto-char place) (let ((lang (nth 0 info)) - (indent (make-string (org-get-indentation) ?\s))) + (indent (make-string (current-indentation) ?\s))) (when (string-match "^[[:space:]]*$" (buffer-substring (point-at-bol) (point-at-eol))) @@ -2152,10 +2221,10 @@ code ---- the results are extracted in the syntax of the source optional LANG argument. list ---- the results are rendered as a list. This option not - allowed for inline src blocks. + allowed for inline source blocks. table --- the results are rendered as a table. This option not - allowed for inline src blocks. + allowed for inline source blocks. INFO may provide the values of these header arguments (in the `header-arguments-alist' see the docstring for @@ -2219,7 +2288,7 @@ INFO may provide the values of these header arguments (in the (goto-char (org-element-property :end inline)) (skip-chars-backward " \t")) (unless inline - (setq indent (org-get-indentation)) + (setq indent (current-indentation)) (forward-line 1)) (setq beg (point)) (cond @@ -2236,29 +2305,29 @@ INFO may provide the values of these header arguments (in the ((member "prepend" result-params))) ; already there (setq results-switches (if results-switches (concat " " results-switches) "")) - (let ((wrap (lambda (start finish &optional no-escape no-newlines - inline-start inline-finish) - (when inline - (setq start inline-start) - (setq finish inline-finish) - (setq no-newlines t)) - (goto-char end) - (insert (concat finish (unless no-newlines "\n"))) - (goto-char beg) - (insert (concat start (unless no-newlines "\n"))) - (unless no-escape - (org-escape-code-in-region (min (point) end) end)) - (goto-char end) - (unless no-newlines (goto-char (point-at-eol))) - (setq end (point-marker)))) + (let ((wrap + (lambda (start finish &optional no-escape no-newlines + inline-start inline-finish) + (when inline + (setq start inline-start) + (setq finish inline-finish) + (setq no-newlines t)) + (let ((before-finish (marker-position end))) + (goto-char end) + (insert (concat finish (unless no-newlines "\n"))) + (goto-char beg) + (insert (concat start (unless no-newlines "\n"))) + (unless no-escape + (org-escape-code-in-region + (min (point) before-finish) before-finish)) + (goto-char end)))) (tabulablep (lambda (r) ;; Non-nil when result R can be turned into ;; a table. - (and (listp r) - (null (cdr (last r))) + (and (proper-list-p r) (cl-every - (lambda (e) (or (atom e) (null (cdr (last e))))) + (lambda (e) (or (atom e) (proper-list-p e))) result))))) ;; insert results based on type (cond @@ -2304,28 +2373,28 @@ INFO may provide the values of these header arguments (in the (insert (org-macro-escape-arguments (org-babel-chomp result "\n")))) (t (goto-char beg) (insert result))) - (setq end (point-marker)) + (setq end (copy-marker (point) t)) ;; possibly wrap result (cond ((assq :wrap (nth 2 info)) - (let ((name (or (cdr (assq :wrap (nth 2 info))) "RESULTS"))) - (funcall wrap (concat "#+BEGIN_" name) - (concat "#+END_" (car (org-split-string name))) + (let ((name (or (cdr (assq :wrap (nth 2 info))) "results"))) + (funcall wrap (concat "#+begin_" name) + (concat "#+end_" (car (split-string name))) nil nil (concat "{{{results(@@" name ":") "@@)}}}"))) ((member "html" result-params) - (funcall wrap "#+BEGIN_EXPORT html" "#+END_EXPORT" nil nil + (funcall wrap "#+begin_export html" "#+end_export" nil nil "{{{results(@@html:" "@@)}}}")) ((member "latex" result-params) - (funcall wrap "#+BEGIN_EXPORT latex" "#+END_EXPORT" nil nil + (funcall wrap "#+begin_export latex" "#+end_export" nil nil "{{{results(@@latex:" "@@)}}}")) ((member "org" result-params) (goto-char beg) (when (org-at-table-p) (org-cycle)) - (funcall wrap "#+BEGIN_SRC org" "#+END_SRC" nil nil + (funcall wrap "#+begin_src org" "#+end_src" nil nil "{{{results(src_org{" "})}}}")) ((member "code" result-params) (let ((lang (or lang "none"))) - (funcall wrap (format "#+BEGIN_SRC %s%s" lang results-switches) - "#+END_SRC" nil nil + (funcall wrap (format "#+begin_src %s%s" lang results-switches) + "#+end_src" nil nil (format "{{{results(src_%s[%s]{" lang results-switches) "})}}}"))) ((member "raw" result-params) @@ -2334,18 +2403,19 @@ INFO may provide the values of these header arguments (in the ;; Stay backward compatible with <7.9.2 (member "wrap" result-params)) (goto-char beg) (when (org-at-table-p) (org-cycle)) - (funcall wrap ":RESULTS:" ":END:" 'no-escape nil + (funcall wrap ":results:" ":end:" 'no-escape nil "{{{results(" ")}}}")) ((and inline (member "file" result-params)) (funcall wrap nil nil nil nil "{{{results(" ")}}}")) ((and (not (funcall tabulablep result)) (not (member "file" result-params))) (let ((org-babel-inline-result-wrap - ;; Hard code {{{results(...)}}} on top of customization. + ;; Hard code {{{results(...)}}} on top of + ;; customization. (format "{{{results(%s)}}}" org-babel-inline-result-wrap))) - (org-babel-examplify-region beg end results-switches inline) - (setq end (point)))))) + (org-babel-examplify-region + beg end results-switches inline))))) ;; Possibly indent results in par with #+results line. (when (and (not inline) (numberp indent) (> indent 0) ;; In this case `table-align' does the work @@ -2358,6 +2428,7 @@ INFO may provide the values of these header arguments (in the (message "Code block returned no value.") (message "Code block produced no output.")) (message "Code block evaluation complete."))) + (set-marker end nil) (when outside-scope (narrow-to-region visible-beg visible-end)) (set-marker visible-beg nil) (set-marker visible-end nil))))))) @@ -2371,8 +2442,11 @@ INFO may provide the values of these header arguments (in the (goto-char location) (when (looking-at (concat org-babel-result-regexp ".*$")) (delete-region - (if keep-keyword (1+ (match-end 0)) (1- (match-beginning 0))) - (progn (forward-line 1) (org-babel-result-end)))))))) + (if keep-keyword (line-beginning-position 2) + (save-excursion + (skip-chars-backward " \r\t\n") + (line-beginning-position 2))) + (progn (forward-line) (org-babel-result-end)))))))) (defun org-babel-remove-inline-result (&optional datum) "Remove the result of the current inline-src-block or babel call. @@ -2409,39 +2483,41 @@ in the buffer." (defun org-babel-result-end () "Return the point at the end of the current set of results." - (save-excursion - (cond - ((org-at-table-p) (progn (goto-char (org-table-end)) (point))) - ((org-at-item-p) (let* ((struct (org-list-struct)) - (prvs (org-list-prevs-alist struct))) - (org-list-get-list-end (point-at-bol) struct prvs))) - ((let ((case-fold-search t)) (looking-at "^\\([ \t]*\\):results:")) - (progn (re-search-forward (concat "^" (match-string 1) ":END:")) - (forward-char 1) (point))) - (t - (let ((case-fold-search t)) - (if (looking-at (concat "[ \t]*#\\+begin_\\([^ \t\n\r]+\\)")) - (progn (re-search-forward (concat "[ \t]*#\\+end_" (match-string 1)) - nil t) - (forward-char 1)) - (while (looking-at "[ \t]*\\(: \\|:$\\|\\[\\[\\)") - (forward-line 1)))) - (point))))) + (cond ((looking-at-p "^[ \t]*$") (point)) ;no result + ((looking-at-p (format "^[ \t]*%s[ \t]*$" org-bracket-link-regexp)) + (line-beginning-position 2)) + (t + (let ((element (org-element-at-point))) + (if (memq (org-element-type element) + ;; Possible results types. + '(drawer example-block export-block fixed-width item + plain-list src-block table)) + (save-excursion + (goto-char (min (point-max) ;for narrowed buffers + (org-element-property :end element))) + (skip-chars-backward " \r\t\n") + (line-beginning-position 2)) + (point)))))) (defun org-babel-result-to-file (result &optional description) - "Convert RESULT into an `org-mode' link with optional DESCRIPTION. + "Convert RESULT into an Org link with optional DESCRIPTION. If the `default-directory' is different from the containing file's directory then expand relative links." (when (stringp result) - (format "[[file:%s]%s]" - (if (and default-directory - buffer-file-name - (not (string= (expand-file-name default-directory) - (expand-file-name - (file-name-directory buffer-file-name))))) - (expand-file-name result default-directory) - result) - (if description (concat "[" description "]") "")))) + (let ((same-directory? + (and buffer-file-name + (not (string= (expand-file-name default-directory) + (expand-file-name + (file-name-directory buffer-file-name))))))) + (format "[[file:%s]%s]" + (if (and default-directory buffer-file-name same-directory?) + (if (eq org-link-file-path-type 'adaptive) + (file-relative-name + (expand-file-name result default-directory) + (file-name-directory (buffer-file-name))) + (expand-file-name result default-directory)) + result) + (if description (concat "[" description "]") ""))))) (defun org-babel-examplify-region (beg end &optional results-switches inline) "Comment out region using the inline `==' or `: ' org example quote." @@ -2479,7 +2555,7 @@ file's directory then expand relative links." (unless (eq (org-element-type element) 'src-block) (error "Not in a source block")) (goto-char (org-babel-where-is-src-block-head element)) - (let* ((ind (org-get-indentation)) + (let* ((ind (current-indentation)) (body-start (line-beginning-position 2)) (body (org-element-normalize-string (if (or org-src-preserve-indentation @@ -2606,12 +2682,6 @@ parameters when merging lists." ;; Return merged params. params)) -(defvar org-babel-use-quick-and-dirty-noweb-expansion nil - "Set to true to use regular expressions to expand noweb references. -This results in much faster noweb reference expansion but does -not properly allow code blocks to inherit the \":noweb-ref\" -header argument from buffer or subtree wide properties.") - (defun org-babel-noweb-p (params context) "Check if PARAMS require expansion in CONTEXT. CONTEXT may be one of :tangle, :export or :eval." @@ -2658,16 +2728,8 @@ block but are passed literally to the \"example-block\"." (body (nth 1 info)) (ob-nww-start org-babel-noweb-wrap-start) (ob-nww-end org-babel-noweb-wrap-end) - (comment (string= "noweb" (cdr (assq :comments (nth 2 info))))) - (rx-prefix (concat "\\(" org-babel-src-name-regexp "\\|" - ":noweb-ref[ \t]+" "\\)")) (new-body "") (nb-add (lambda (text) (setq new-body (concat new-body text)))) - (c-wrap (lambda (text) - (with-temp-buffer - (funcall (intern (concat lang "-mode"))) - (comment-region (point) (progn (insert text) (point))) - (org-trim (buffer-string))))) index source-name evaluate prefix) (with-temp-buffer (setq-local org-babel-noweb-wrap-start ob-nww-start) @@ -2699,58 +2761,74 @@ block but are passed literally to the \"example-block\"." (let ((raw (org-babel-ref-resolve source-name))) (if (stringp raw) raw (format "%S" raw))) (or - ;; Retrieve from the library of babel. - (nth 2 (assoc (intern source-name) - org-babel-library-of-babel)) + ;; Retrieve from the Library of Babel. + (nth 2 (assoc-string source-name org-babel-library-of-babel)) ;; Return the contents of headlines literally. (save-excursion (when (org-babel-ref-goto-headline-id source-name) - (org-babel-ref-headline-body))) + (org-babel-ref-headline-body))) ;; Find the expansion of reference in this buffer. - (let ((rx (concat rx-prefix source-name "[ \t\n]")) - expansion) - (save-excursion - (goto-char (point-min)) - (if org-babel-use-quick-and-dirty-noweb-expansion - (while (re-search-forward rx nil t) - (let* ((i (org-babel-get-src-block-info 'light)) - (body (org-babel-expand-noweb-references i)) - (sep (or (cdr (assq :noweb-sep (nth 2 i))) - "\n")) - (full (if comment - (let ((cs (org-babel-tangle-comment-links i))) - (concat (funcall c-wrap (car cs)) "\n" - body "\n" - (funcall c-wrap (cadr cs)))) - body))) - (setq expansion (cons sep (cons full expansion))))) - (org-babel-map-src-blocks nil - (let ((i (org-babel-get-src-block-info 'light))) - (when (equal (or (cdr (assq :noweb-ref (nth 2 i))) - (nth 4 i)) - source-name) - (let* ((body (org-babel-expand-noweb-references i)) - (sep (or (cdr (assq :noweb-sep (nth 2 i))) - "\n")) - (full (if comment - (let ((cs (org-babel-tangle-comment-links i))) - (concat (funcall c-wrap (car cs)) "\n" - body "\n" - (funcall c-wrap (cadr cs)))) - body))) - (setq expansion - (cons sep (cons full expansion))))))))) - (and expansion - (mapconcat #'identity (nreverse (cdr expansion)) ""))) + (save-excursion + (goto-char (point-min)) + (let* ((name-regexp + (org-babel-named-src-block-regexp-for-name + source-name)) + (comment + (string= "noweb" + (cdr (assq :comments (nth 2 info))))) + (c-wrap + (lambda (s) + ;; Comment, according to LANG mode, + ;; string S. Return new string. + (with-temp-buffer + (funcall (intern (concat lang "-mode"))) + (comment-region (point) + (progn (insert s) (point))) + (org-trim (buffer-string))))) + (expand-body + (lambda (i) + ;; Expand body of code blocked + ;; represented by block info I. + (let ((b (if (org-babel-noweb-p (nth 2 i) :eval) + (org-babel-expand-noweb-references i) + (nth 1 i)))) + (if (not comment) b + (let ((cs (org-babel-tangle-comment-links i))) + (concat (funcall c-wrap (car cs)) "\n" + b "\n" + (funcall c-wrap (cadr cs))))))))) + (if (re-search-forward name-regexp nil t) + ;; Found a source block named SOURCE-NAME. + ;; Assume it is unique; do not look after + ;; `:noweb-ref' header argument. + (funcall expand-body + (org-babel-get-src-block-info 'light)) + ;; Though luck. We go into the long process + ;; of checking each source block and expand + ;; those with a matching Noweb reference. + (let ((expansion nil)) + (org-babel-map-src-blocks nil + (let* ((info (org-babel-get-src-block-info 'light)) + (parameters (nth 2 info))) + (when (equal source-name + (cdr (assq :noweb-ref parameters))) + (push (funcall expand-body info) expansion) + (push (or (cdr (assq :noweb-sep parameters)) + "\n") + expansion)))) + (when expansion + (mapconcat #'identity + (nreverse (cdr expansion)) + "")))))) ;; Possibly raise an error if named block doesn't exist. (if (or org-babel-noweb-error-all-langs (member lang org-babel-noweb-error-langs)) - (error "%s" (concat - (org-babel-noweb-wrap source-name) - "could not be resolved (see " - "`org-babel-noweb-error-langs')")) + (error "%s could not be resolved (see \ +`org-babel-noweb-error-langs')" + (org-babel-noweb-wrap source-name)) ""))) - "[\n\r]") (concat "\n" prefix)))))) + "[\n\r]") + (concat "\n" prefix)))))) (funcall nb-add (buffer-substring index (point-max)))) new-body)) @@ -2854,51 +2932,47 @@ Otherwise if CELL looks like lisp (meaning it starts with a lisp, otherwise return it unmodified as a string. Optional argument INHIBIT-LISP-EVAL inhibits lisp evaluation for situations in which is it not appropriate." - (if (and (stringp cell) (not (equal cell ""))) - (or (org-babel--string-to-number cell) - (if (and (not inhibit-lisp-eval) - (or (member (substring cell 0 1) '("(" "'" "`" "[")) - (string= cell "*this*"))) - (eval (read cell) t) - (if (string= (substring cell 0 1) "\"") - (read cell) - (progn (set-text-properties 0 (length cell) nil cell) cell)))) - cell)) + (cond ((not (org-string-nw-p cell)) cell) + ((org-babel--string-to-number cell)) + ((and (not inhibit-lisp-eval) + (or (memq (string-to-char cell) '(?\( ?' ?` ?\[)) + (string= cell "*this*"))) + (eval (read cell) t)) + ((eq (string-to-char cell) ?\") (read cell)) + (t (org-no-properties cell)))) (defun org-babel--string-to-number (string) "If STRING represents a number return its value. - Otherwise return nil." - (when (string-match "\\`-?[0-9]*\\.?[0-9]*\\'" string) - (string-to-number string))) -(define-obsolete-function-alias 'org-babel-number-p 'org-babel--string-to-number "Org 9.0") + (and (string-match-p "\\`-?[0-9]*\\.?[0-9]*\\'" string) + (string-to-number string))) (defun org-babel-import-elisp-from-file (file-name &optional separator) "Read the results located at FILE-NAME into an elisp table. If the table is trivial, then return it as a scalar." - (let (result) - (save-window-excursion - (with-temp-buffer - (condition-case err - (progn - (org-table-import file-name separator) - (delete-file file-name) - (setq result (mapcar (lambda (row) - (mapcar #'org-babel-string-read row)) - (org-table-to-lisp)))) - (error (message "Error reading results: %s" err) nil))) - (if (null (cdr result)) ;; if result is trivial vector, then scalarize it - (if (consp (car result)) - (if (null (cdr (car result))) - (caar result) - result) - (car result)) - result)))) + (save-window-excursion + (let ((result + (with-temp-buffer + (condition-case err + (progn + (org-table-import file-name separator) + (delete-file file-name) + (delq nil + (mapcar (lambda (row) + (and (not (eq row 'hline)) + (mapcar #'org-babel-string-read row))) + (org-table-to-lisp)))) + (error (message "Error reading results: %s" err) nil))))) + (pcase result + (`((,scalar)) scalar) + (`((,_ ,_ . ,_)) result) + (`(,scalar) scalar) + (_ result))))) (defun org-babel-string-read (cell) "Strip nested \"s from around strings." (org-babel-read (or (and (stringp cell) - (string-match "\\\"\\(.+\\)\\\"" cell) + (string-match "\"\\(.+\\)\"" cell) (match-string 1 cell)) cell) t)) @@ -3079,7 +3153,8 @@ after the babel API for OLD-type source blocks is fully defined. Callers of this function will probably want to add an entry to `org-src-lang-modes' as well." (dolist (fn '("execute" "expand-body" "prep-session" - "variable-assignments" "load-session")) + "variable-assignments" "load-session" + "edit-prep")) (let ((sym (intern-soft (concat "org-babel-" fn ":" old)))) (when (and sym (fboundp sym)) (defalias (intern (concat "org-babel-" fn ":" new)) sym)))) @@ -3090,10 +3165,6 @@ Callers of this function will probably want to add an entry to (when (and sym (boundp sym)) (defvaralias (intern (concat "org-babel-" var ":" new)) sym))))) -(defun org-babel-strip-quotes (string) - "Strip \\\"s from around a string, if applicable." - (org-unbracket-string "\"" "\"" string)) - (provide 'ob-core) ;; Local variables: diff --git a/elpa/org-plus-contrib-20170407/ob-csharp.el b/elpa/org-plus-contrib-20190904/ob-csharp.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-csharp.el rename to elpa/org-plus-contrib-20190904/ob-csharp.el index c4aa046e..526a3ae0 100644 --- a/elpa/org-plus-contrib-20170407/ob-csharp.el +++ b/elpa/org-plus-contrib-20190904/ob-csharp.el @@ -1,10 +1,10 @@ ;;; ob-csharp.el --- org-babel functions for csharp evaluation -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2018 Free Software Foundation, Inc. ;; Author: thomas "at" friendlyvillagers.com based on ob-java.el by Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob-css.el b/elpa/org-plus-contrib-20190904/ob-css.el similarity index 89% rename from elpa/org-plus-contrib-20170407/ob-css.el rename to elpa/org-plus-contrib-20190904/ob-css.el index 4203b125..ce663b26 100644 --- a/elpa/org-plus-contrib-20170407/ob-css.el +++ b/elpa/org-plus-contrib-20190904/ob-css.el @@ -1,10 +1,10 @@ ;;; ob-css.el --- Babel Functions for CSS -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-ditaa.el b/elpa/org-plus-contrib-20190904/ob-ditaa.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-ditaa.el rename to elpa/org-plus-contrib-20190904/ob-ditaa.el index 89b5d246..c8a5e018 100644 --- a/elpa/org-plus-contrib-20170407/ob-ditaa.el +++ b/elpa/org-plus-contrib-20190904/ob-ditaa.el @@ -1,10 +1,10 @@ ;;; ob-ditaa.el --- Babel Functions for ditaa -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-dot.el b/elpa/org-plus-contrib-20190904/ob-dot.el similarity index 91% rename from elpa/org-plus-contrib-20170407/ob-dot.el rename to elpa/org-plus-contrib-20190904/ob-dot.el index 81442bfc..73a16738 100644 --- a/elpa/org-plus-contrib-20170407/ob-dot.el +++ b/elpa/org-plus-contrib-20190904/ob-dot.el @@ -1,10 +1,10 @@ ;;; ob-dot.el --- Babel Functions for dot -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -69,6 +69,8 @@ This function is called by `org-babel-execute-src-block'." (cmdline (or (cdr (assq :cmdline params)) (format "-T%s" (file-name-extension out-file)))) (cmd (or (cdr (assq :cmd params)) "dot")) + (coding-system-for-read 'utf-8) ;use utf-8 with sub-processes + (coding-system-for-write 'utf-8) (in-file (org-babel-temp-file "dot-"))) (with-temp-file in-file (insert (org-babel-expand-body:dot body params))) diff --git a/elpa/org-plus-contrib-20170407/ob-ebnf.el b/elpa/org-plus-contrib-20190904/ob-ebnf.el similarity index 79% rename from elpa/org-plus-contrib-20170407/ob-ebnf.el rename to elpa/org-plus-contrib-20190904/ob-ebnf.el index 410570bc..5ed9319e 100644 --- a/elpa/org-plus-contrib-20170407/ob-ebnf.el +++ b/elpa/org-plus-contrib-20190904/ob-ebnf.el @@ -1,33 +1,31 @@ ;;; ob-ebnf.el --- Babel Functions for EBNF -*- lexical-binding: t; -*- -;; Copyright (C) 2013-2017 Free Software Foundation, Inc. +;; Copyright (C) 2013-2019 Free Software Foundation, Inc. ;; Author: Michael Gauland ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; Version: 1.00 -;;; License: +;; This file is part of GNU Emacs. -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Org-Babel support for using ebnf2ps to generate encapsulated postscript -;;; railroad diagrams. It recogises these arguments: +;;; railroad diagrams. It recognizes these arguments: ;;; ;;; :file is required; it must include the extension '.eps.' All the rules ;;; in the block will be drawn in the same file. This is done by @@ -35,7 +33,7 @@ ;;; documentation for ebnf-eps-buffer for more information). ;;; ;;; :style specifies a value in ebnf-style-database. This provides the -;;; ability to customise the output. The style can also specify the +;;; ability to customize the output. The style can also specify the ;;; grammar syntax (by setting ebnf-syntax); note that only ebnf, ;;; iso-ebnf, and yacc are supported by this file. diff --git a/elpa/org-plus-contrib-20170407/ob-emacs-lisp.el b/elpa/org-plus-contrib-20190904/ob-emacs-lisp.el similarity index 59% rename from elpa/org-plus-contrib-20170407/ob-emacs-lisp.el rename to elpa/org-plus-contrib-20190904/ob-emacs-lisp.el index c0bd12a8..cd86f4a2 100644 --- a/elpa/org-plus-contrib-20170407/ob-emacs-lisp.el +++ b/elpa/org-plus-contrib-20190904/ob-emacs-lisp.el @@ -1,10 +1,10 @@ ;;; ob-emacs-lisp.el --- Babel Functions for Emacs-lisp Code -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,14 +19,20 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Org-Babel support for evaluating emacs-lisp code ;;; Code: -(require 'ob) + +(require 'ob-core) + +(declare-function org-babel--get-vars "ob" (params)) +(declare-function org-babel-result-cond "ob" (result-params scalar-form &rest table-forms)) +(declare-function org-babel-reassemble-table "ob" (table colnames rownames)) +(declare-function org-babel-pick-name "ob" (names selector)) (defconst org-babel-header-args:emacs-lisp '((lexical . :any)) "Emacs-lisp specific header arguments.") @@ -34,48 +40,45 @@ (defvar org-babel-default-header-args:emacs-lisp '((:lexical . "no")) "Default arguments for evaluating an emacs-lisp source block. -A value of \"yes\" or t causes src blocks to be eval'd using +A value of \"yes\" or t causes source blocks to be eval'd using lexical scoping. It can also be an alist mapping symbols to their value. It is used as the optional LEXICAL argument to `eval', which see.") (defun org-babel-expand-body:emacs-lisp (body params) "Expand BODY according to PARAMS, return the expanded body." - (let* ((vars (org-babel--get-vars params)) - (result-params (cdr (assq :result-params params))) - (print-level nil) (print-length nil) - (body (if (> (length vars) 0) - (concat "(let (" - (mapconcat - (lambda (var) - (format "%S" (print `(,(car var) ',(cdr var))))) - vars "\n ") - ")\n" body "\n)") - (concat body "\n")))) - (if (or (member "code" result-params) - (member "pp" result-params)) - (concat "(pp " body ")") body))) + (let ((vars (org-babel--get-vars params)) + (print-level nil) + (print-length nil)) + (if (null vars) (concat body "\n") + (format "(let (%s)\n%s\n)" + (mapconcat + (lambda (var) + (format "%S" (print `(,(car var) ',(cdr var))))) + vars "\n ") + body)))) (defun org-babel-execute:emacs-lisp (body params) "Execute a block of emacs-lisp code with Babel." (save-window-excursion (let* ((lexical (cdr (assq :lexical params))) - (result - (eval (read (format (if (member "output" - (cdr (assq :result-params params))) - "(with-output-to-string %s)" - "(progn %s)") - (org-babel-expand-body:emacs-lisp - body params))) - - (if (listp lexical) - lexical - (member lexical '("yes" "t")))))) - (org-babel-result-cond (cdr (assq :result-params params)) + (result-params (cdr (assq :result-params params))) + (body (format (if (member "output" result-params) + "(with-output-to-string %s\n)" + "(progn %s\n)") + (org-babel-expand-body:emacs-lisp body params))) + (result (eval (read (if (or (member "code" result-params) + (member "pp" result-params)) + (concat "(pp " body ")") + body)) + (if (listp lexical) + lexical + (member lexical '("yes" "t")))))) + (org-babel-result-cond result-params (let ((print-level nil) (print-length nil)) - (if (or (member "scalar" (cdr (assq :result-params params))) - (member "verbatim" (cdr (assq :result-params params)))) + (if (or (member "scalar" result-params) + (member "verbatim" result-params)) (format "%S" result) (format "%s" result))) (org-babel-reassemble-table diff --git a/elpa/org-plus-contrib-20170407/ob-eukleides.el b/elpa/org-plus-contrib-20190904/ob-eukleides.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-eukleides.el rename to elpa/org-plus-contrib-20190904/ob-eukleides.el index d3ad993e..b6ed7fb5 100644 --- a/elpa/org-plus-contrib-20170407/ob-eukleides.el +++ b/elpa/org-plus-contrib-20190904/ob-eukleides.el @@ -1,10 +1,10 @@ ;;; ob-eukleides.el --- Org-babel functions for eukleides evaluation -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2018 Free Software Foundation, Inc. ;; Author: Luis Anaya ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob-eval.el b/elpa/org-plus-contrib-20190904/ob-eval.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-eval.el rename to elpa/org-plus-contrib-20190904/ob-eval.el index 324cf5fb..8d5b7ed2 100644 --- a/elpa/org-plus-contrib-20170407/ob-eval.el +++ b/elpa/org-plus-contrib-20190904/ob-eval.el @@ -1,10 +1,10 @@ ;;; ob-eval.el --- Babel Functions for External Code Evaluation -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -120,7 +120,7 @@ function in various versions of Emacs. (delete-file input-file)) (when (and error-file (file-exists-p error-file)) - (when (< 0 (nth 7 (file-attributes error-file))) + (when (< 0 (file-attribute-size (file-attributes error-file))) (with-current-buffer (get-buffer-create error-buffer) (let ((pos-from-end (- (point-max) (point)))) (or (bobp) diff --git a/elpa/org-plus-contrib-20170407/ob-exp.el b/elpa/org-plus-contrib-20190904/ob-exp.el similarity index 93% rename from elpa/org-plus-contrib-20170407/ob-exp.el rename to elpa/org-plus-contrib-20190904/ob-exp.el index d966cd91..177104b0 100644 --- a/elpa/org-plus-contrib-20170407/ob-exp.el +++ b/elpa/org-plus-contrib-20190904/ob-exp.el @@ -1,11 +1,11 @@ ;;; ob-exp.el --- Exportation of Babel Source Blocks -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Code: (require 'ob-core) @@ -33,7 +33,6 @@ (declare-function org-escape-code-in-string "org-src" (s)) (declare-function org-export-copy-buffer "ox" ()) (declare-function org-fill-template "org" (template alist)) -(declare-function org-get-indentation "org" (&optional line)) (declare-function org-in-commented-heading-p "org" (&optional no-inheritance)) (defvar org-src-preserve-indentation) @@ -41,14 +40,12 @@ (defcustom org-export-use-babel t "Switch controlling code evaluation and header processing during export. When set to nil no code will be evaluated as part of the export -process and no header arguments will be obeyed. When set to -`inline-only', only inline code blocks will be executed. Users -who wish to avoid evaluating code on export should use the header -argument `:eval never-export'." +process and no header arguments will be obeyed. Users who wish +to avoid evaluating code on export should use the header argument +`:eval never-export'." :group 'org-babel :version "24.1" :type '(choice (const :tag "Never" nil) - (const :tag "Only inline code" inline-only) (const :tag "Always" t)) :safe #'null) @@ -60,9 +57,13 @@ returned is the value of the last form in BODY. Assume that point is at the beginning of the Babel block." (declare (indent 1) (debug body)) `(let ((source (get-text-property (point) 'org-reference))) - (with-current-buffer org-babel-exp-reference-buffer + ;; Source blocks created during export process (e.g., by other + ;; source blocks) are not referenced. In this case, do not move + ;; point at all. + (with-current-buffer (if source org-babel-exp-reference-buffer + (current-buffer)) (org-with-wide-buffer - (goto-char source) + (when source (goto-char source)) ,@body)))) (defun org-babel-exp-src-block () @@ -83,7 +84,7 @@ none ---- do not display either code or results upon export Assume point is at block opening line." (interactive) (save-excursion - (let* ((info (org-babel-get-src-block-info 'light)) + (let* ((info (org-babel-get-src-block-info)) (lang (nth 0 info)) (raw-params (nth 2 info)) hash) @@ -106,7 +107,7 @@ Assume point is at block opening line." (symbol-value lang-headers)) (append (org-babel-params-from-properties lang) (list raw-params))))))) - (setf hash (org-babel-sha1-hash info))) + (setf hash (org-babel-sha1-hash info :export))) (org-babel-exp-do-export info 'block hash))))) (defcustom org-babel-exp-call-line-template @@ -132,9 +133,7 @@ this template." (when org-export-use-babel (save-window-excursion (let ((case-fold-search t) - (regexp (if (eq org-export-use-babel 'inline-only) - "\\(call\\|src\\)_" - "\\(call\\|src\\)_\\|^[ \t]*#\\+\\(BEGIN_SRC\\|CALL:\\)")) + (regexp "\\(call\\|src\\)_\\|^[ \t]*#\\+\\(BEGIN_SRC\\|CALL:\\)") ;; Get a pristine copy of current buffer so Babel ;; references are properly resolved and source block ;; context is preserved. @@ -210,9 +209,9 @@ this template." (progn (goto-char end) (skip-chars-forward " \t") (point))) - ;; Otherwise: remove inline src block but - ;; preserve following white spaces. Then - ;; insert value. + ;; Otherwise: remove inline source block + ;; but preserve following white spaces. + ;; Then insert value. (delete-region begin end) (insert replacement))))) ((or `babel-call `inline-babel-call) @@ -244,7 +243,7 @@ this template." (insert rep)))) (`src-block (let ((match-start (copy-marker (match-beginning 0))) - (ind (org-get-indentation))) + (ind (current-indentation))) ;; Take care of matched block: compute ;; replacement string. In particular, a nil ;; REPLACEMENT means the block is left as-is @@ -282,7 +281,8 @@ this template." (set-marker begin nil) (set-marker end nil))))) (kill-buffer org-babel-exp-reference-buffer) - (remove-text-properties (point-min) (point-max) '(org-reference))))))) + (remove-text-properties (point-min) (point-max) + '(org-reference nil))))))) (defun org-babel-exp-do-export (info type &optional hash) "Return a string with the exported content of a code block. diff --git a/elpa/org-plus-contrib-20170407/ob-fomus.el b/elpa/org-plus-contrib-20190904/ob-fomus.el similarity index 98% rename from elpa/org-plus-contrib-20170407/ob-fomus.el rename to elpa/org-plus-contrib-20190904/ob-fomus.el index 30f292f3..6ff27b60 100644 --- a/elpa/org-plus-contrib-20170407/ob-fomus.el +++ b/elpa/org-plus-contrib-20190904/ob-fomus.el @@ -4,7 +4,7 @@ ;; Author: Torsten Anders ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob-forth.el b/elpa/org-plus-contrib-20190904/ob-forth.el similarity index 91% rename from elpa/org-plus-contrib-20170407/ob-forth.el rename to elpa/org-plus-contrib-20190904/ob-forth.el index 152cf727..2d61de31 100644 --- a/elpa/org-plus-contrib-20170407/ob-forth.el +++ b/elpa/org-plus-contrib-20190904/ob-forth.el @@ -1,10 +1,10 @@ ;;; ob-forth.el --- Babel Functions for Forth -*- lexical-binding: t; -*- -;; Copyright (C) 2014-2017 Free Software Foundation, Inc. +;; Copyright (C) 2014-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, forth -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -33,9 +33,9 @@ ;;; Code: (require 'ob) +(require 'org-macs) (declare-function forth-proc "ext:gforth" ()) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-default-header-args:forth '((:session . "yes")) "Default header arguments for forth code blocks.") @@ -53,7 +53,7 @@ This function is called by `org-babel-execute-src-block'" (defun org-babel-forth-session-execute (body params) (require 'forth-mode) (let ((proc (forth-proc)) - (rx " \\(\n:\\|compiled\n\\\|ok\n\\)") + (rx " \\(\n:\\|compiled\n\\|ok\n\\)") (result-start)) (with-current-buffer (process-buffer (forth-proc)) (mapcar (lambda (line) diff --git a/elpa/org-plus-contrib-20170407/ob-fortran.el b/elpa/org-plus-contrib-20190904/ob-fortran.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-fortran.el rename to elpa/org-plus-contrib-20190904/ob-fortran.el index d059245b..f1285f6a 100644 --- a/elpa/org-plus-contrib-20170407/ob-fortran.el +++ b/elpa/org-plus-contrib-20190904/ob-fortran.el @@ -1,11 +1,11 @@ ;;; ob-fortran.el --- Babel Functions for Fortran -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2019 Free Software Foundation, Inc. ;; Authors: Sergey Litvinov ;; Eric Schulte ;; Keywords: literate programming, reproducible research, fortran -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. ;; @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -28,13 +28,12 @@ ;;; Code: (require 'ob) +(require 'org-macs) (require 'cc-mode) (require 'cl-lib) (declare-function org-entry-get "org" (pom property &optional inherit literal-nil)) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("fortran" . "F90")) @@ -109,7 +108,7 @@ its header arguments." "Wrap body in a \"program ... end program\" block if none exists." (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body)) (let ((vars (org-babel--get-vars params))) - (if vars (error "Cannot use :vars if `program' statement is present")) + (when vars (error "Cannot use :vars if `program' statement is present")) body) (format "program main\n%s\nend program main\n" body))) diff --git a/elpa/org-plus-contrib-20170407/ob-gnuplot.el b/elpa/org-plus-contrib-20190904/ob-gnuplot.el similarity index 93% rename from elpa/org-plus-contrib-20170407/ob-gnuplot.el rename to elpa/org-plus-contrib-20190904/ob-gnuplot.el index a62303ff..cc4c3cb2 100644 --- a/elpa/org-plus-contrib-20170407/ob-gnuplot.el +++ b/elpa/org-plus-contrib-20190904/ob-gnuplot.el @@ -1,10 +1,10 @@ ;;; ob-gnuplot.el --- Babel Functions for Gnuplot -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -39,9 +39,9 @@ ;;; Code: (require 'ob) +(require 'org-macs) -(declare-function org-time-string-to-time "org" (s &optional buffer pos)) -(declare-function org-combine-plists "org" (&rest plists)) +(declare-function org-time-string-to-time "org" (s)) (declare-function orgtbl-to-generic "org-table" (table params)) (declare-function gnuplot-mode "ext:gnuplot-mode" ()) (declare-function gnuplot-send-string-to-gnuplot "ext:gnuplot-mode" (str txt)) @@ -116,6 +116,8 @@ code." (timefmt (cdr (assq :timefmt params))) (time-ind (or (cdr (assq :timeind params)) (when timefmt 1))) + (directory (and (buffer-file-name) + (file-name-directory (buffer-file-name)))) (add-to-body (lambda (text) (setq body (concat text "\n" body))))) ;; append header argument settings to body (when title (funcall add-to-body (format "set title '%s'" title))) @@ -161,7 +163,10 @@ code." (format "\\$%s" (car pair)) (cdr pair) body))) vars) (when prologue (funcall add-to-body prologue)) - (when epilogue (setq body (concat body "\n" epilogue)))) + (when epilogue (setq body (concat body "\n" epilogue))) + ;; Setting the directory needs to be done first so that + ;; subsequent 'output' directive goes to the right place. + (when directory (funcall add-to-body (format "cd '%s'" directory)))) body)) (defun org-babel-execute:gnuplot (body params) @@ -187,7 +192,7 @@ This function is called by `org-babel-execute-src-block'." script-file (if (member system-type '(cygwin windows-nt ms-dos)) t nil))))) - (message output)) + (message "%s" output)) (with-temp-buffer (insert (concat body "\n")) (gnuplot-mode) diff --git a/elpa/org-plus-contrib-20170407/ob-groovy.el b/elpa/org-plus-contrib-20190904/ob-groovy.el similarity index 93% rename from elpa/org-plus-contrib-20170407/ob-groovy.el rename to elpa/org-plus-contrib-20190904/ob-groovy.el index 69993c0f..fe3a072f 100644 --- a/elpa/org-plus-contrib-20170407/ob-groovy.el +++ b/elpa/org-plus-contrib-20190904/ob-groovy.el @@ -1,10 +1,10 @@ ;;; ob-groovy.el --- Babel Functions for Groovy -*- lexical-binding: t; -*- -;; Copyright (C) 2013-2017 Free Software Foundation, Inc. +;; Copyright (C) 2013-2019 Free Software Foundation, Inc. ;; Author: Miro Bezjak ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Currently only supports the external execution. No session support yet. @@ -84,12 +84,12 @@ in BODY as elisp." (when session (error "Sessions are not (yet) supported for Groovy")) (pcase result-type (`output - (let ((src-file (org-babel-temp-file "groovy-"))) + (let ((src-file (org-babel-temp-file "groovy_"))) (progn (with-temp-file src-file (insert body)) (org-babel-eval (concat org-babel-groovy-command " " src-file) "")))) (`value - (let* ((src-file (org-babel-temp-file "groovy-")) + (let* ((src-file (org-babel-temp-file "groovy_")) (wrapper (format org-babel-groovy-wrapper-method body))) (with-temp-file src-file (insert wrapper)) (let ((raw (org-babel-eval diff --git a/elpa/org-plus-contrib-20170407/ob-haskell.el b/elpa/org-plus-contrib-20190904/ob-haskell.el similarity index 92% rename from elpa/org-plus-contrib-20170407/ob-haskell.el rename to elpa/org-plus-contrib-20190904/ob-haskell.el index ecce6dcd..a683b110 100644 --- a/elpa/org-plus-contrib-20170407/ob-haskell.el +++ b/elpa/org-plus-contrib-20190904/ob-haskell.el @@ -1,10 +1,10 @@ ;;; ob-haskell.el --- Babel Functions for Haskell -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -40,10 +40,9 @@ ;;; Code: (require 'ob) +(require 'org-macs) (require 'comint) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function haskell-mode "ext:haskell-mode" ()) (declare-function run-haskell "ext:inf-haskell" (&optional arg)) (declare-function inferior-haskell-load-file @@ -59,24 +58,32 @@ (defvar org-babel-haskell-eoe "\"org-babel-haskell-eoe\"") +(defvar haskell-prompt-regexp) + (defun org-babel-execute:haskell (body params) "Execute a block of Haskell code." + (require 'inf-haskell) + (add-hook 'inferior-haskell-hook + (lambda () + (setq-local comint-prompt-regexp + (concat haskell-prompt-regexp "\\|^λ?> ")))) (let* ((session (cdr (assq :session params))) (result-type (cdr (assq :result-type params))) (full-body (org-babel-expand-body:generic body params (org-babel-variable-assignments:haskell params))) (session (org-babel-haskell-initiate-session session params)) + (comint-preoutput-filter-functions + (cons 'ansi-color-filter-apply comint-preoutput-filter-functions)) (raw (org-babel-comint-with-output (session org-babel-haskell-eoe t full-body) (insert (org-trim full-body)) (comint-send-input nil t) (insert org-babel-haskell-eoe) (comint-send-input nil t))) - (results (mapcar - #'org-babel-strip-quotes - (cdr (member org-babel-haskell-eoe - (reverse (mapcar #'org-trim raw))))))) + (results (mapcar #'org-strip-quotes + (cdr (member org-babel-haskell-eoe + (reverse (mapcar #'org-trim raw))))))) (org-babel-reassemble-table (let ((result (pcase result-type @@ -151,7 +158,7 @@ constructs (header arguments, no-web syntax etc...) are ignored." (interactive "P") (let* ((contents (buffer-string)) (haskell-regexp - (concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)?[\r\n]" + (concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)[\r\n]" "\\([^\000]*?\\)[\r\n][ \t]*#\\+end_src.*")) (base-name (file-name-sans-extension (buffer-file-name))) (tmp-file (org-babel-temp-file "haskell-")) diff --git a/elpa/org-plus-contrib-20170407/ob-hledger.el b/elpa/org-plus-contrib-20190904/ob-hledger.el similarity index 90% rename from elpa/org-plus-contrib-20170407/ob-hledger.el rename to elpa/org-plus-contrib-20190904/ob-hledger.el index 371b9c6b..4fb1f694 100644 --- a/elpa/org-plus-contrib-20170407/ob-hledger.el +++ b/elpa/org-plus-contrib-20190904/ob-hledger.el @@ -1,10 +1,10 @@ -;; ob-ledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*- +;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Simon Michael ;; Keywords: literate programming, reproducible research, plain text accounting -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-io.el b/elpa/org-plus-contrib-20190904/ob-io.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-io.el rename to elpa/org-plus-contrib-20190904/ob-io.el index 5dd61109..b0d5b512 100644 --- a/elpa/org-plus-contrib-20170407/ob-io.el +++ b/elpa/org-plus-contrib-20190904/ob-io.el @@ -1,10 +1,10 @@ ;;; ob-io.el --- Babel Functions for Io -*- lexical-binding: t; -*- -;; Copyright (C) 2012-2017 Free Software Foundation, Inc. +;; Copyright (C) 2012-2019 Free Software Foundation, Inc. ;; Author: Andrzej Lichnerowicz ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Currently only supports the external execution. No session support yet. diff --git a/elpa/org-plus-contrib-20170407/ob-java.el b/elpa/org-plus-contrib-20190904/ob-java.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-java.el rename to elpa/org-plus-contrib-20190904/ob-java.el index 7e720231..b055f85e 100644 --- a/elpa/org-plus-contrib-20170407/ob-java.el +++ b/elpa/org-plus-contrib-20190904/ob-java.el @@ -1,10 +1,10 @@ ;;; ob-java.el --- Babel Functions for Java -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-js.el b/elpa/org-plus-contrib-20190904/ob-js.el similarity index 58% rename from elpa/org-plus-contrib-20170407/ob-js.el rename to elpa/org-plus-contrib-20190904/ob-js.el index 91be6b07..7b83c3e6 100644 --- a/elpa/org-plus-contrib-20170407/ob-js.el +++ b/elpa/org-plus-contrib-20190904/ob-js.el @@ -1,10 +1,10 @@ ;;; ob-js.el --- Babel Functions for Javascript -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -41,6 +41,11 @@ (require 'ob) (declare-function run-mozilla "ext:moz" (arg)) +(declare-function httpd-start "ext:simple-httpd" ()) +(declare-function run-skewer "ext:skewer-mode" ()) +(declare-function skewer-repl "ext:skewer-repl" ()) +(declare-function indium-run-node "ext:indium-nodejs" (command)) +(declare-function indium-eval "ext:indium-interaction" (string &optional callback)) (defvar org-babel-default-header-args:js '() "Default header arguments for js code blocks.") @@ -52,7 +57,12 @@ "Name of command used to evaluate js blocks." :group 'org-babel :version "24.1" - :type 'string) + :type '(choice (const "node") + (const "mozrepl") + (const "skewer-mode") + (const "indium") + (const "js-comint")) + :safe #'stringp) (defvar org-babel-js-function-wrapper "require('sys').print(require('sys').inspect(function(){\n%s\n}()));" @@ -62,22 +72,13 @@ "Execute a block of Javascript code with org-babel. This function is called by `org-babel-execute-src-block'" (let* ((org-babel-js-cmd (or (cdr (assq :cmd params)) org-babel-js-cmd)) + (session (cdr (assq :session params))) (result-type (cdr (assq :result-type params))) (full-body (org-babel-expand-body:generic body params (org-babel-variable-assignments:js params))) - (result (if (not (string= (cdr (assq :session params)) "none")) - ;; session evaluation - (let ((session (org-babel-prep-session:js - (cdr (assq :session params)) params))) - (nth 1 - (org-babel-comint-with-output - (session (format "%S" org-babel-js-eoe) t body) - (mapc - (lambda (line) - (insert (org-babel-chomp line)) - (comint-send-input nil t)) - (list body (format "%S" org-babel-js-eoe)))))) - ;; external evaluation + (result (cond + ;; no session specified, external evaluation + ((string= session "none") (let ((script-file (org-babel-temp-file "js-script-"))) (with-temp-file script-file (insert @@ -87,7 +88,24 @@ This function is called by `org-babel-execute-src-block'" full-body))) (org-babel-eval (format "%s %s" org-babel-js-cmd - (org-babel-process-file-name script-file)) ""))))) + (org-babel-process-file-name script-file)) ""))) + ;; Indium Node REPL. Separate case because Indium + ;; REPL is not inherited from Comint mode. + ((string= session "*JS REPL*") + (require 'indium-repl) + (unless (get-buffer session) + (indium-run-node org-babel-js-cmd)) + (indium-eval full-body)) + ;; session evaluation + (t + (let ((session (org-babel-prep-session:js + (cdr (assq :session params)) params))) + (nth 1 + (org-babel-comint-with-output + (session (format "%S" org-babel-js-eoe) t body) + (dolist (code (list body (format "%S" org-babel-js-eoe))) + (insert (org-babel-chomp code)) + (comint-send-input nil t))))))))) (org-babel-result-cond (cdr (assq :result-params params)) result (org-babel-js-read result)))) @@ -123,11 +141,13 @@ specifying a variable of the same value." (var-lines (org-babel-variable-assignments:js params))) (when session (org-babel-comint-in-buffer session - (sit-for .5) (goto-char (point-max)) - (mapc (lambda (var) - (insert var) (comint-send-input nil t) - (org-babel-comint-wait-for-output session) - (sit-for .1) (goto-char (point-max))) var-lines))) + (goto-char (point-max)) + (dolist (var var-lines) + (insert var) + (comint-send-input nil t) + (org-babel-comint-wait-for-output session) + (sit-for .1) + (goto-char (point-max))))) session)) (defun org-babel-variable-assignments:js (params) @@ -137,25 +157,47 @@ specifying a variable of the same value." (car pair) (org-babel-js-var-to-js (cdr pair)))) (org-babel--get-vars params))) -(defun org-babel-js-initiate-session (&optional session) - "If there is not a current inferior-process-buffer in SESSION +(defun org-babel-js-initiate-session (&optional session _params) + "If there is not a current inferior-process-buffer in `SESSION' then create. Return the initialized session." - (unless (string= session "none") - (cond - ((string= "mozrepl" org-babel-js-cmd) - (require 'moz) - (let ((session-buffer (save-window-excursion - (run-mozilla nil) - (rename-buffer session) - (current-buffer)))) - (if (org-babel-comint-buffer-livep session-buffer) - (progn (sit-for .25) session-buffer) - (sit-for .5) - (org-babel-js-initiate-session session)))) - ((string= "node" org-babel-js-cmd ) - (error "Session evaluation with node.js is not supported")) - (t - (error "Sessions are only supported with mozrepl add \":cmd mozrepl\""))))) + (cond + ((string= session "none") + (warn "Session evaluation of ob-js is not supported")) + ((string= "*skewer-repl*" session) + (require 'skewer-repl) + (let ((session-buffer (get-buffer "*skewer-repl*"))) + (if (and session-buffer + (org-babel-comint-buffer-livep (get-buffer session-buffer)) + (comint-check-proc session-buffer)) + session-buffer + ;; start skewer REPL. + (httpd-start) + (run-skewer) + (skewer-repl) + session-buffer))) + ((string= "*Javascript REPL*" session) + (require 'js-comint) + (let ((session-buffer "*Javascript REPL*")) + (if (and (org-babel-comint-buffer-livep (get-buffer session-buffer)) + (comint-check-proc session-buffer)) + session-buffer + (call-interactively 'run-js) + (sit-for .5) + session-buffer))) + ((string= "mozrepl" org-babel-js-cmd) + (require 'moz) + (let ((session-buffer (save-window-excursion + (run-mozilla nil) + (rename-buffer session) + (current-buffer)))) + (if (org-babel-comint-buffer-livep session-buffer) + (progn (sit-for .25) session-buffer) + (sit-for .5) + (org-babel-js-initiate-session session)))) + ((string= "node" org-babel-js-cmd ) + (error "Session evaluation with node.js is not supported")) + (t + (error "Sessions are only supported with mozrepl add \":cmd mozrepl\"")))) (provide 'ob-js) diff --git a/elpa/org-plus-contrib-20170407/ob-julia.el b/elpa/org-plus-contrib-20190904/ob-julia.el similarity index 100% rename from elpa/org-plus-contrib-20170407/ob-julia.el rename to elpa/org-plus-contrib-20190904/ob-julia.el diff --git a/elpa/org-plus-contrib-20170407/ob-keys.el b/elpa/org-plus-contrib-20190904/ob-keys.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-keys.el rename to elpa/org-plus-contrib-20190904/ob-keys.el index f5fb9101..627648d2 100644 --- a/elpa/org-plus-contrib-20170407/ob-keys.el +++ b/elpa/org-plus-contrib-20190904/ob-keys.el @@ -1,10 +1,10 @@ ;;; ob-keys.el --- Key Bindings for Babel -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-latex.el b/elpa/org-plus-contrib-20190904/ob-latex.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-latex.el rename to elpa/org-plus-contrib-20190904/ob-latex.el index 763ffb16..adf83d46 100644 --- a/elpa/org-plus-contrib-20170407/ob-latex.el +++ b/elpa/org-plus-contrib-20190904/ob-latex.el @@ -1,10 +1,10 @@ ;;; ob-latex.el --- Babel Functions for LaTeX -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -31,12 +31,12 @@ ;;; Code: (require 'ob) +(require 'org-macs) (declare-function org-create-formula-image "org" (string tofile options buffer &optional type)) (declare-function org-latex-compile "ox-latex" (texfile &optional snippet)) (declare-function org-latex-guess-inputenc "ox-latex" (header)) (declare-function org-splice-latex-header "org" (tpl def-pkg pkg snippets-p &optional extra)) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("latex" . "tex")) diff --git a/elpa/org-plus-contrib-20170407/ob-ledger.el b/elpa/org-plus-contrib-20190904/ob-ledger.el similarity index 93% rename from elpa/org-plus-contrib-20170407/ob-ledger.el rename to elpa/org-plus-contrib-20190904/ob-ledger.el index c02069e2..56599298 100644 --- a/elpa/org-plus-contrib-20170407/ob-ledger.el +++ b/elpa/org-plus-contrib-20190904/ob-ledger.el @@ -1,10 +1,10 @@ ;;; ob-ledger.el --- Babel Functions for Ledger -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-lilypond.el b/elpa/org-plus-contrib-20190904/ob-lilypond.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-lilypond.el rename to elpa/org-plus-contrib-20190904/ob-lilypond.el index 37a7a6b5..c795d9c4 100644 --- a/elpa/org-plus-contrib-20170407/ob-lilypond.el +++ b/elpa/org-plus-contrib-20190904/ob-lilypond.el @@ -1,10 +1,10 @@ ;;; ob-lilypond.el --- Babel Functions for Lilypond -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Martyn Jago ;; Keywords: babel language, literate programming -;; Homepage: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html +;; Homepage: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; This file is part of GNU Emacs. @@ -19,12 +19,12 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Installation, ob-lilypond documentation, and examples are available at -;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html +;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; ;; Lilypond documentation can be found at ;; http://lilypond.org/manuals.html @@ -33,7 +33,9 @@ ;;; Code: (require 'ob) -(require 'outline) + +(declare-function org-show-all "org" (&optional types)) + (defalias 'lilypond-mode 'LilyPond-mode) (add-to-list 'org-babel-tangle-lang-exts '("LilyPond" . "ly")) @@ -89,7 +91,7 @@ you can leave the string empty on this case." (string :tag "Lilypond ") (string :tag "PDF Viewer ") (string :tag "MIDI Player")) - :version "24.3" + :version "24.4" :package-version '(Org . "8.2.7") :set (lambda (_symbol value) @@ -264,7 +266,7 @@ LINE is the erroneous line" (setq case-fold-search nil) (if (search-forward line nil t) (progn - (outline-show-all) + (org-show-all) (set-mark (point)) (goto-char (- (point) (length line)))) (goto-char temp)))) diff --git a/elpa/org-plus-contrib-20170407/ob-lisp.el b/elpa/org-plus-contrib-20190904/ob-lisp.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-lisp.el rename to elpa/org-plus-contrib-20190904/ob-lisp.el index 1e381d0c..e717fc34 100644 --- a/elpa/org-plus-contrib-20170407/ob-lisp.el +++ b/elpa/org-plus-contrib-20190904/ob-lisp.el @@ -1,12 +1,12 @@ ;;; ob-lisp.el --- Babel Functions for Common Lisp -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Joel Boehland ;; Eric Schulte ;; David T. O'Toole ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -21,7 +21,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -37,10 +37,10 @@ ;;; Code: (require 'ob) +(require 'org-macs) (declare-function sly-eval "ext:sly" (sexp &optional package)) (declare-function slime-eval "ext:slime" (sexp &optional package)) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("lisp" . "lisp")) @@ -54,7 +54,7 @@ Valid values include `slime-eval' and `sly-eval'." :group 'org-babel :version "26.1" :package-version '(Org . "9.0") - :type 'function) + :type 'symbol) (defcustom org-babel-lisp-dir-fmt "(let ((*default-pathname-defaults* #P%S\n)) %%s\n)" diff --git a/elpa/org-plus-contrib-20170407/ob-lob.el b/elpa/org-plus-contrib-20190904/ob-lob.el similarity index 61% rename from elpa/org-plus-contrib-20170407/ob-lob.el rename to elpa/org-plus-contrib-20190904/ob-lob.el index b6f50d33..a6194c4b 100644 --- a/elpa/org-plus-contrib-20170407/ob-lob.el +++ b/elpa/org-plus-contrib-20190904/ob-lob.el @@ -1,11 +1,11 @@ ;;; ob-lob.el --- Functions Supporting the Library of Babel -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Code: (require 'cl-lib) @@ -53,12 +53,16 @@ should not be inherited from a source block.") (let* ((info (org-babel-get-src-block-info 'light)) (source-name (nth 4 info))) (when source-name - (setq source-name (intern source-name) - org-babel-library-of-babel - (cons (cons source-name info) - (assq-delete-all source-name org-babel-library-of-babel)) - lob-ingest-count (1+ lob-ingest-count))))) - (message "%d src block%s added to Library of Babel" + (setf (nth 1 info) + (if (org-babel-noweb-p (nth 2 info) :eval) + (org-babel-expand-noweb-references info) + (nth 1 info))) + (let ((source (intern source-name))) + (setq org-babel-library-of-babel + (cons (cons source info) + (assq-delete-all source org-babel-library-of-babel)))) + (cl-incf lob-ingest-count)))) + (message "%d source block%s added to Library of Babel" lob-ingest-count (if (> lob-ingest-count 1) "s" "")) lob-ingest-count)) @@ -75,44 +79,54 @@ if so then run the appropriate source block from the Library." (org-babel-execute-src-block nil info) t))) -(defun org-babel-lob--src-info (name) - "Return internal representation for Babel data named NAME. -NAME is a string. This function looks into the current document +(defun org-babel-lob--src-info (ref) + "Return internal representation for Babel data referenced as REF. +REF is a string. This function looks into the current document for a Babel call or source block. If none is found, it looks -after NAME in the Library of Babel. Eventually, if that also -fails, it returns nil." - ;; During export, look into the pristine copy of the document being - ;; exported instead of the current one, which could miss some data. - (with-current-buffer (or org-babel-exp-reference-buffer (current-buffer)) - (org-with-wide-buffer - (goto-char (point-min)) - (catch :found - (let ((case-fold-search t) - (regexp (org-babel-named-data-regexp-for-name name))) - (while (re-search-forward regexp nil t) - (let ((element (org-element-at-point))) - (when (equal name (org-element-property :name element)) - (throw :found - (pcase (org-element-type element) - (`src-block (org-babel-get-src-block-info t element)) - (`babel-call (org-babel-lob-get-info element)) - ;; Non-executable data found. Since names are - ;; supposed to be unique throughout a document, - ;; bail out. - (_ nil)))))) - ;; No element named NAME in buffer. Try Library of Babel. - (cdr (assoc-string name org-babel-library-of-babel))))))) +after REF in the Library of Babel." + (let ((name ref) + (file nil)) + ;; Extract the remote file, if specified in the reference. + (when (string-match "\\`\\(.+\\):\\(.+\\)\\'" ref) + (setq file (match-string 1 ref)) + (setq name (match-string 2 ref))) + ;; During export, look into the pristine copy of the document + ;; being exported instead of the current one, which could miss + ;; some data. + (with-current-buffer (cond (file (find-file-noselect file t)) + (org-babel-exp-reference-buffer) + (t (current-buffer))) + (org-with-point-at 1 + (catch :found + (let ((case-fold-search t) + (regexp (org-babel-named-data-regexp-for-name name))) + (while (re-search-forward regexp nil t) + (let ((element (org-element-at-point))) + (when (equal name (org-element-property :name element)) + (throw :found + (pcase (org-element-type element) + (`src-block (org-babel-get-src-block-info t element)) + (`babel-call (org-babel-lob-get-info element)) + ;; Non-executable data found. Since names + ;; are supposed to be unique throughout + ;; a document, bail out. + (_ nil)))))) + (cdr (assoc-string ref org-babel-library-of-babel)))))))) ;;;###autoload (defun org-babel-lob-get-info (&optional datum) "Return internal representation for Library of Babel function call. -Consider DATUM, when provided, or element at point. Return nil -when not on an appropriate location. Otherwise return a list -compatible with `org-babel-get-src-block-info', which see." + +Consider DATUM, when provided, or element at point otherwise. + +Return nil when not on an appropriate location. Otherwise return +a list compatible with `org-babel-get-src-block-info', which +see." (let* ((context (or datum (org-element-context))) - (type (org-element-type context))) + (type (org-element-type context)) + (reference (org-element-property :call context))) (when (memq type '(babel-call inline-babel-call)) - (pcase (org-babel-lob--src-info (org-element-property :call context)) + (pcase (org-babel-lob--src-info reference) (`(,language ,body ,header ,_ ,_ ,_ ,coderef) (let ((begin (org-element-property (if (eq type 'inline-babel-call) :begin @@ -124,9 +138,8 @@ compatible with `org-babel-get-src-block-info', which see." header org-babel-default-lob-header-args (append - (org-with-wide-buffer - (goto-char begin) - (org-babel-params-from-properties language)) + (org-with-point-at begin + (org-babel-params-from-properties language)) (list (org-babel-parse-header-arguments (org-element-property :inside-header context)) diff --git a/elpa/org-plus-contrib-20170407/ob-lua.el b/elpa/org-plus-contrib-20190904/ob-lua.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-lua.el rename to elpa/org-plus-contrib-20190904/ob-lua.el index fa60b0ee..70d328ec 100644 --- a/elpa/org-plus-contrib-20170407/ob-lua.el +++ b/elpa/org-plus-contrib-20190904/ob-lua.el @@ -1,10 +1,10 @@ ;;; ob-lua.el --- Org Babel functions for Lua evaluation -*- lexical-binding: t; -*- -;; Copyright (C) 2014, 2016, 2017 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2016-2019 Free Software Foundation, Inc. ;; Authors: Dieter Schoen ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,13 +19,13 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;; Requirements: ;; for session support, lua-mode is needed. ;; lua-mode is not part of GNU Emacs/orgmode, but can be obtained ;; from marmalade or melpa. -;; The source respository is here: +;; The source repository is here: ;; https://github.com/immerrr/lua-mode ;; However, sessions are not yet working. @@ -34,10 +34,9 @@ ;;; Code: (require 'ob) +(require 'org-macs) (require 'cl-lib) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function lua-shell "ext:lua-mode" (&optional argprompt)) (declare-function lua-toggle-shells "ext:lua-mode" (arg)) (declare-function run-lua "ext:lua" (cmd &optional dedicated show)) @@ -49,7 +48,7 @@ (defcustom org-babel-lua-command "lua" "Name of the command for executing Lua code." - :version "24.5" + :version "26.1" :package-version '(Org . "8.3") :group 'org-babel :type 'string) @@ -58,21 +57,21 @@ "Preferred lua mode for use in running lua interactively. This will typically be 'lua-mode." :group 'org-babel - :version "24.5" + :version "26.1" :package-version '(Org . "8.3") :type 'symbol) (defcustom org-babel-lua-hline-to "None" "Replace hlines in incoming tables with this when translating to lua." :group 'org-babel - :version "24.5" + :version "26.1" :package-version '(Org . "8.3") :type 'string) (defcustom org-babel-lua-None-to 'hline "Replace 'None' in lua tables with this before returning." :group 'org-babel - :version "24.5" + :version "26.1" :package-version '(Org . "8.3") :type 'symbol) @@ -149,7 +148,7 @@ specifying a variable of the same value." (if (eq var 'hline) org-babel-lua-hline-to (format - (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S") + (if (and (stringp var) (string-match "[\n\r]" var)) "[=[%s]=]" "%S") (if (stringp var) (substring-no-properties var) var))))) (defun org-babel-lua-table-or-string (results) @@ -291,13 +290,13 @@ last statement in BODY, as elisp." (let ((raw (pcase result-type (`output (org-babel-eval org-babel-lua-command - (concat (if preamble (concat preamble "\n")) + (concat preamble (and preamble "\n") body))) (`value (let ((tmp-file (org-babel-temp-file "lua-"))) (org-babel-eval org-babel-lua-command (concat - (if preamble (concat preamble "\n") "") + preamble (and preamble "\n") (format (if (member "pp" result-params) org-babel-lua-pp-wrapper-method diff --git a/elpa/org-plus-contrib-20170407/ob-makefile.el b/elpa/org-plus-contrib-20190904/ob-makefile.el similarity index 89% rename from elpa/org-plus-contrib-20170407/ob-makefile.el rename to elpa/org-plus-contrib-20190904/ob-makefile.el index 2aa04fd2..938d17bd 100644 --- a/elpa/org-plus-contrib-20170407/ob-makefile.el +++ b/elpa/org-plus-contrib-20190904/ob-makefile.el @@ -1,11 +1,11 @@ ;;; ob-makefile.el --- Babel Functions for Makefile -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Thomas S. Dye ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-mathematica.el b/elpa/org-plus-contrib-20190904/ob-mathematica.el similarity index 100% rename from elpa/org-plus-contrib-20170407/ob-mathematica.el rename to elpa/org-plus-contrib-20190904/ob-mathematica.el diff --git a/elpa/org-plus-contrib-20170407/ob-mathomatic.el b/elpa/org-plus-contrib-20190904/ob-mathomatic.el similarity index 98% rename from elpa/org-plus-contrib-20170407/ob-mathomatic.el rename to elpa/org-plus-contrib-20190904/ob-mathomatic.el index c62e1818..6196001c 100644 --- a/elpa/org-plus-contrib-20170407/ob-mathomatic.el +++ b/elpa/org-plus-contrib-20190904/ob-mathomatic.el @@ -1,13 +1,13 @@ ;;; ob-mathomatic.el --- Org-babel functions for mathomatic evaluation -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2018 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Eric Schulte ;; Luis Anaya (Mathomatic) ;; Keywords: literate programming, reproducible research, mathomatic -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob-matlab.el b/elpa/org-plus-contrib-20190904/ob-matlab.el similarity index 88% rename from elpa/org-plus-contrib-20170407/ob-matlab.el rename to elpa/org-plus-contrib-20190904/ob-matlab.el index 23cfa36d..4ad188ad 100644 --- a/elpa/org-plus-contrib-20170407/ob-matlab.el +++ b/elpa/org-plus-contrib-20190904/ob-matlab.el @@ -1,10 +1,10 @@ ;;; ob-matlab.el --- Babel support for Matlab -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-maxima.el b/elpa/org-plus-contrib-20190904/ob-maxima.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-maxima.el rename to elpa/org-plus-contrib-20190904/ob-maxima.el index 350f66b7..c8f3a61f 100644 --- a/elpa/org-plus-contrib-20170407/ob-maxima.el +++ b/elpa/org-plus-contrib-20190904/ob-maxima.el @@ -1,11 +1,11 @@ ;;; ob-maxima.el --- Babel Functions for Maxima -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Eric Schulte ;; Keywords: literate programming, reproducible research, maxima -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-mscgen.el b/elpa/org-plus-contrib-20190904/ob-mscgen.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-mscgen.el rename to elpa/org-plus-contrib-20190904/ob-mscgen.el index 5c9dccc6..86fcc284 100644 --- a/elpa/org-plus-contrib-20170407/ob-mscgen.el +++ b/elpa/org-plus-contrib-20190904/ob-mscgen.el @@ -1,10 +1,10 @@ ;;; ob-msc.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; diff --git a/elpa/org-plus-contrib-20170407/ob-ocaml.el b/elpa/org-plus-contrib-20190904/ob-ocaml.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-ocaml.el rename to elpa/org-plus-contrib-20190904/ob-ocaml.el index 7997ff03..0c0ffe44 100644 --- a/elpa/org-plus-contrib-20170407/ob-ocaml.el +++ b/elpa/org-plus-contrib-20190904/ob-ocaml.el @@ -1,10 +1,10 @@ ;;; ob-ocaml.el --- Babel Functions for Ocaml -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -37,11 +37,11 @@ ;;; Code: (require 'ob) (require 'comint) +(require 'org-macs) (declare-function tuareg-run-caml "ext:tuareg" ()) (declare-function tuareg-run-ocaml "ext:tuareg" ()) (declare-function tuareg-interactive-send-input "ext:tuareg" ()) -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("ocaml" . "ml")) diff --git a/elpa/org-plus-contrib-20170407/ob-octave.el b/elpa/org-plus-contrib-20190904/ob-octave.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-octave.el rename to elpa/org-plus-contrib-20190904/ob-octave.el index 90735b11..d334fa51 100644 --- a/elpa/org-plus-contrib-20170407/ob-octave.el +++ b/elpa/org-plus-contrib-20190904/ob-octave.el @@ -1,10 +1,10 @@ ;;; ob-octave.el --- Babel Functions for Octave and Matlab -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -30,10 +30,10 @@ ;;; Code: (require 'ob) +(require 'org-macs) (declare-function matlab-shell "ext:matlab-mode") (declare-function matlab-shell-run-region "ext:matlab-mode") -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-default-header-args:matlab '()) (defvar org-babel-default-header-args:octave '()) @@ -237,13 +237,11 @@ value of the last statement in BODY, as elisp." (`output (setq results (if matlabp - (cdr (reverse (delq "" (mapcar - #'org-babel-strip-quotes - (mapcar #'org-trim raw))))) + (cdr (reverse (delq "" (mapcar #'org-strip-quotes + (mapcar #'org-trim raw))))) (cdr (member org-babel-octave-eoe-output - (reverse (mapcar - #'org-babel-strip-quotes - (mapcar #'org-trim raw))))))) + (reverse (mapcar #'org-strip-quotes + (mapcar #'org-trim raw))))))) (mapconcat #'identity (reverse results) "\n"))))) (defun org-babel-octave-import-elisp-from-file (file-name) @@ -254,9 +252,9 @@ This removes initial blank and comment lines and then calls (with-temp-file temp-file (insert-file-contents file-name) (re-search-forward "^[ \t]*[^# \t]" nil t) - (if (< (setq beg (point-min)) - (setq end (point-at-bol))) - (delete-region beg end))) + (when (< (setq beg (point-min)) + (setq end (point-at-bol))) + (delete-region beg end))) (org-babel-import-elisp-from-file temp-file '(16)))) (provide 'ob-octave) diff --git a/elpa/org-plus-contrib-20170407/ob-org.el b/elpa/org-plus-contrib-20190904/ob-org.el similarity index 91% rename from elpa/org-plus-contrib-20170407/ob-org.el rename to elpa/org-plus-contrib-20190904/ob-org.el index 5683b96f..def25096 100644 --- a/elpa/org-plus-contrib-20170407/ob-org.el +++ b/elpa/org-plus-contrib-20190904/ob-org.el @@ -1,10 +1,10 @@ ;;; ob-org.el --- Babel Functions for Org Code Blocks -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -34,7 +34,7 @@ (defvar org-babel-default-header-args:org '((:results . "raw silent") (:exports . "code")) - "Default arguments for evaluating a org source block.") + "Default arguments for evaluating an org source block.") (defvar org-babel-org-default-header "#+TITLE: default empty header\n" diff --git a/elpa/org-plus-contrib-20170407/ob-oz.el b/elpa/org-plus-contrib-20190904/ob-oz.el similarity index 99% rename from elpa/org-plus-contrib-20170407/ob-oz.el rename to elpa/org-plus-contrib-20190904/ob-oz.el index 9beadeb0..626c4f31 100644 --- a/elpa/org-plus-contrib-20170407/ob-oz.el +++ b/elpa/org-plus-contrib-20190904/ob-oz.el @@ -4,7 +4,7 @@ ;; Author: Torsten Anders and Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; Version: 0.02 ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob-perl.el b/elpa/org-plus-contrib-20190904/ob-perl.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-perl.el rename to elpa/org-plus-contrib-20190904/ob-perl.el index 62df8c55..810271f5 100644 --- a/elpa/org-plus-contrib-20170407/ob-perl.el +++ b/elpa/org-plus-contrib-20190904/ob-perl.el @@ -1,11 +1,11 @@ ;;; ob-perl.el --- Babel Functions for Perl -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Dan Davison ;; Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20190904/ob-php.el b/elpa/org-plus-contrib-20190904/ob-php.el new file mode 100644 index 00000000..1befbd24 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-php.el @@ -0,0 +1,48 @@ +;;; ob-php.el --- Execute PHP within org-mode blocks. +;; Copyright 2016 stardiviner + +;; Author: stardiviner +;; Maintainer: stardiviner +;; Keywords: org babel php +;; URL: https://github.com/stardiviner/ob-php +;; Created: 04th May 2016 +;; Version: 0.0.1 +;; Package-Requires: ((org "8")) + +;;; Commentary: +;; +;; Execute PHP within org-mode blocks. + +;;; Code: +(require 'org) +(require 'ob) + +(defgroup ob-php nil + "org-mode blocks for PHP." + :group 'org) + +(defcustom ob-php:inf-php-buffer "*php*" + "Default PHP inferior buffer." + :group 'ob-php + :type 'string) + +;;;###autoload +(defun org-babel-execute:php (body params) + "Orgmode Babel PHP evaluate function for `BODY' with `PARAMS'." + (let* ((cmd "php") + (body (concat ""))) + (org-babel-eval cmd body) + )) + +;;;###autoload +(eval-after-load "org" + '(add-to-list 'org-src-lang-modes '("php" . php))) + +(defvar org-babel-default-header-args:php '()) + +(add-to-list 'org-babel-default-header-args:php + '(:results . "output")) + +(provide 'ob-php) + +;;; ob-php.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-picolisp.el b/elpa/org-plus-contrib-20190904/ob-picolisp.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-picolisp.el rename to elpa/org-plus-contrib-20190904/ob-picolisp.el index f5773815..c0f01257 100644 --- a/elpa/org-plus-contrib-20170407/ob-picolisp.el +++ b/elpa/org-plus-contrib-20190904/ob-picolisp.el @@ -1,11 +1,11 @@ ;;; ob-picolisp.el --- Babel Functions for Picolisp -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Authors: Thorsten Jolitz ;; Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -35,13 +35,13 @@ ;; (http://picolisp.com/5000/-2.html). PicoLisp is included in some ;; GNU/Linux Distributions, and can be downloaded here: ;; http://software-lab.de/down.html. It ships with a picolisp-mode and -;; a inferior-picolisp-mode for Emacs (to be found in the /lib/el/ +;; an inferior-picolisp-mode for Emacs (to be found in the /lib/el/ ;; directory). ;; Although it might seem more natural to use Emacs Lisp for most -;; Lisp-based programming tasks inside Org-Mode, an Emacs library -;; written in Emacs Lisp, PicoLisp has at least two outstanding -;; features that make it a valuable addition to Org-Babel: +;; Lisp-based programming tasks inside Org, an Emacs library written +;; in Emacs Lisp, PicoLisp has at least two outstanding features that +;; make it a valuable addition to Org Babel: ;; PicoLisp _is_ an object-oriented database with a Prolog-based query ;; language implemented in PicoLisp (Pilog). Database objects are diff --git a/elpa/org-plus-contrib-20170407/ob-plantuml.el b/elpa/org-plus-contrib-20190904/ob-plantuml.el similarity index 96% rename from elpa/org-plus-contrib-20170407/ob-plantuml.el rename to elpa/org-plus-contrib-20190904/ob-plantuml.el index 70c8d787..91229a29 100644 --- a/elpa/org-plus-contrib-20170407/ob-plantuml.el +++ b/elpa/org-plus-contrib-20190904/ob-plantuml.el @@ -1,10 +1,10 @@ ;;; ob-plantuml.el --- Babel Functions for Plantuml -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-processing.el b/elpa/org-plus-contrib-20190904/ob-processing.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-processing.el rename to elpa/org-plus-contrib-20190904/ob-processing.el index a18a53cb..97ab88cb 100644 --- a/elpa/org-plus-contrib-20170407/ob-processing.el +++ b/elpa/org-plus-contrib-20190904/ob-processing.el @@ -1,10 +1,10 @@ ;;; ob-processing.el --- Babel functions for processing -*- lexical-binding: t; -*- -;; Copyright (C) 2015-2017 Free Software Foundation, Inc. +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. ;; Author: Jarmo Hurri (adapted from ob-asymptote.el written by Eric Schulte) ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-python.el b/elpa/org-plus-contrib-20190904/ob-python.el similarity index 87% rename from elpa/org-plus-contrib-20170407/ob-python.el rename to elpa/org-plus-contrib-20190904/ob-python.el index b838a48b..d4ee230e 100644 --- a/elpa/org-plus-contrib-20170407/ob-python.el +++ b/elpa/org-plus-contrib-20190904/ob-python.el @@ -1,11 +1,11 @@ ;;; ob-python.el --- Babel Functions for Python -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -28,9 +28,8 @@ ;;; Code: (require 'ob) +(require 'org-macs) -(declare-function org-remove-indentation "org" ) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function py-shell "ext:python-mode" (&optional argprompt)) (declare-function py-toggle-shells "ext:python-mode" (arg)) (declare-function run-python "ext:python" (&optional cmd dedicated show)) @@ -73,15 +72,16 @@ This will typically be either `python' or `python-mode'." (defun org-babel-execute:python (body params) "Execute a block of Python code with Babel. This function is called by `org-babel-execute-src-block'." - (let* ((session (org-babel-python-initiate-session + (let* ((org-babel-python-command + (or (cdr (assq :python params)) + org-babel-python-command)) + (session (org-babel-python-initiate-session (cdr (assq :session params)))) (result-params (cdr (assq :result-params params))) (result-type (cdr (assq :result-type params))) (return-val (when (and (eq result-type 'value) (not session)) (cdr (assq :return params)))) (preamble (cdr (assq :preamble params))) - (org-babel-python-command - (or (cdr (assq :python params)) org-babel-python-command)) (full-body (org-babel-expand-body:generic (concat body (if return-val (format "\nreturn %s" return-val) "")) @@ -238,6 +238,15 @@ def main(): open('%s', 'w').write( pprint.pformat(main()) )") +(defconst org-babel-python--exec-tmpfile + (concat + "__org_babel_python_fname = '%s'; " + "__org_babel_python_fh = open(__org_babel_python_fname); " + "exec(compile(" + "__org_babel_python_fh.read(), __org_babel_python_fname, 'exec'" + ")); " + "__org_babel_python_fh.close()")) + (defun org-babel-python-evaluate (session body &optional result-type result-params preamble) "Evaluate BODY as Python code." @@ -256,13 +265,13 @@ last statement in BODY, as elisp." (let ((raw (pcase result-type (`output (org-babel-eval org-babel-python-command - (concat (if preamble (concat preamble "\n")) + (concat preamble (and preamble "\n") body))) (`value (let ((tmp-file (org-babel-temp-file "python-"))) (org-babel-eval org-babel-python-command (concat - (if preamble (concat preamble "\n") "") + preamble (and preamble "\n") (format (if (member "pp" result-params) org-babel-python-pp-wrapper-method @@ -298,23 +307,42 @@ last statement in BODY, as elisp." (list (format "open('%s', 'w').write(str(_))" (org-babel-process-file-name tmp-file 'noquote))))))) + (last-indent 0) (input-body (lambda (body) - (mapc (lambda (line) (insert line) (funcall send-wait)) - (split-string body "[\r\n]")) + (dolist (line (split-string body "[\r\n]")) + ;; Insert a blank line to end an indent + ;; block. + (let ((curr-indent (string-match "\\S-" line))) + (if curr-indent + (progn + (when (< curr-indent last-indent) + (insert "") + (funcall send-wait)) + (setq last-indent curr-indent)) + (setq last-indent 0))) + (insert line) + (funcall send-wait)) (funcall send-wait))) (results (pcase result-type (`output - (mapconcat - #'org-trim - (butlast - (org-babel-comint-with-output - (session org-babel-python-eoe-indicator t body) - (funcall input-body body) - (funcall send-wait) (funcall send-wait) - (insert org-babel-python-eoe-indicator) - (funcall send-wait)) - 2) "\n")) + (let ((body (if (string-match-p ".\n+." body) ; Multiline + (let ((tmp-src-file (org-babel-temp-file + "python-"))) + (with-temp-file tmp-src-file (insert body)) + (format org-babel-python--exec-tmpfile + tmp-src-file)) + body))) + (mapconcat + #'org-trim + (butlast + (org-babel-comint-with-output + (session org-babel-python-eoe-indicator t body) + (funcall input-body body) + (funcall send-wait) (funcall send-wait) + (insert org-babel-python-eoe-indicator) + (funcall send-wait)) + 2) "\n"))) (`value (let ((tmp-file (org-babel-temp-file "python-"))) (org-babel-comint-with-output diff --git a/elpa/org-plus-contrib-20190904/ob-redis.el b/elpa/org-plus-contrib-20190904/ob-redis.el new file mode 100644 index 00000000..340b0502 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-redis.el @@ -0,0 +1,44 @@ +;;; ob-redis.el --- Execute Redis queries within org-mode blocks. +;; Copyright 2016 stardiviner + +;; Author: stardiviner +;; Maintainer: stardiviner +;; Keywords: org babel redis +;; URL: https://github.com/stardiviner/ob-redis +;; Created: 28th Feb 2016 +;; Version: 0.0.1 +;; Package-Requires: ((org "8")) + +;;; Commentary: +;; +;; Execute Redis queries within org-mode blocks. + +;;; Code: +(require 'org) +(require 'ob) + +(defgroup ob-redis nil + "org-mode blocks for Redis." + :group 'org) + +(defcustom ob-redis:default-db "127.0.0.1:6379" + "Default Redis database." + :group 'ob-redis + :type 'string) + +;;;###autoload +(defun org-babel-execute:redis (body params) + "org-babel redis hook." + (let* ((db (or (cdr (assoc :db params)) + ob-redis:default-db)) + (cmd (mapconcat 'identity (list "redis-cli") " "))) + (org-babel-eval cmd body) + )) + +;;;###autoload +(eval-after-load "org" + '(add-to-list 'org-src-lang-modes '("redis" . redis))) + +(provide 'ob-redis) + +;;; ob-redis.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-ref.el b/elpa/org-plus-contrib-20190904/ob-ref.el similarity index 90% rename from elpa/org-plus-contrib-20170407/ob-ref.el rename to elpa/org-plus-contrib-20190904/ob-ref.el index f30f49bf..8c066f71 100644 --- a/elpa/org-plus-contrib-20170407/ob-ref.el +++ b/elpa/org-plus-contrib-20190904/ob-ref.el @@ -1,11 +1,11 @@ ;;; ob-ref.el --- Babel Functions for Referencing External Data -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Dan Davison ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -37,8 +37,8 @@ ;; - resource-id :: the id or name of the resource -;; So an example of a simple src block referencing table data in the -;; same file would be +;; So an example of a simple source block referencing table data in +;; the same file would be ;; #+NAME: sandbox ;; | 1 | 2 | 3 | @@ -50,6 +50,7 @@ ;;; Code: (require 'ob-core) +(require 'org-macs) (require 'cl-lib) (declare-function org-babel-lob-get-info "ob-lob" (&optional datum)) @@ -63,26 +64,22 @@ (declare-function org-in-commented-heading-p "org" (&optional no-inheritance)) (declare-function org-narrow-to-subtree "org" ()) (declare-function org-show-context "org" (&optional key)) -(declare-function org-trim "org" (s &optional keep-lead)) - -(defvar org-babel-ref-split-regexp - "[ \f\t\n\r\v]*\\(.+?\\)[ \f\t\n\r\v]*=[ \f\t\n\r\v]*\\(.+\\)[ \f\t\n\r\v]*") (defvar org-babel-update-intermediate nil "Update the in-buffer results of code blocks executed to resolve references.") (defun org-babel-ref-parse (assignment) "Parse a variable ASSIGNMENT in a header argument. + If the right hand side of the assignment has a literal value -return that value, otherwise interpret as a reference to an -external resource and find its value using -`org-babel-ref-resolve'. Return a list with two elements. The -first element of the list will be the name of the variable, and -the second will be an emacs-lisp representation of the value of -the variable." - (when (string-match org-babel-ref-split-regexp assignment) - (let ((var (match-string 1 assignment)) - (ref (match-string 2 assignment))) +return that value, otherwise interpret it as a reference to an +external resource and find its value using `org-babel-ref-resolve'. + +Return a list with two elements: the name of the variable, and an +Emacs Lisp representation of the value of the variable." + (when (string-match "\\(.+?\\)=" assignment) + (let ((var (org-trim (match-string 1 assignment))) + (ref (org-trim (substring assignment (match-end 0))))) (cons (intern var) (let ((out (save-excursion (when org-babel-current-src-block-location @@ -131,7 +128,7 @@ the variable." ;; if ref is indexed grab the indices -- beware nested indices (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 (match-beginning 0)))) - (= (cl-count ?( str) (cl-count ?) str)))) + (= (cl-count ?\( str) (cl-count ?\) str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) ;; assign any arguments to pass to source block diff --git a/elpa/org-plus-contrib-20170407/ob-ruby.el b/elpa/org-plus-contrib-20190904/ob-ruby.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-ruby.el rename to elpa/org-plus-contrib-20190904/ob-ruby.el index d0557835..32af8c58 100644 --- a/elpa/org-plus-contrib-20170407/ob-ruby.el +++ b/elpa/org-plus-contrib-20190904/ob-ruby.el @@ -1,10 +1,10 @@ ;;; ob-ruby.el --- Babel Functions for Ruby -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -37,8 +37,8 @@ ;;; Code: (require 'ob) +(require 'org-macs) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function run-ruby "ext:inf-ruby" (&optional command name)) (declare-function xmp "ext:rcodetools" (&optional option)) diff --git a/elpa/org-plus-contrib-20170407/ob-sass.el b/elpa/org-plus-contrib-20190904/ob-sass.el similarity index 93% rename from elpa/org-plus-contrib-20170407/ob-sass.el rename to elpa/org-plus-contrib-20190904/ob-sass.el index a9a2a9f0..b19314c6 100644 --- a/elpa/org-plus-contrib-20170407/ob-sass.el +++ b/elpa/org-plus-contrib-20190904/ob-sass.el @@ -1,10 +1,10 @@ ;;; ob-sass.el --- Babel Functions for the Sass CSS generation language -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-scheme.el b/elpa/org-plus-contrib-20190904/ob-scheme.el similarity index 53% rename from elpa/org-plus-contrib-20170407/ob-scheme.el rename to elpa/org-plus-contrib-20190904/ob-scheme.el index cd8c3860..ceef8e3a 100644 --- a/elpa/org-plus-contrib-20170407/ob-scheme.el +++ b/elpa/org-plus-contrib-20190904/ob-scheme.el @@ -1,11 +1,11 @@ ;;; ob-scheme.el --- Babel Functions for Scheme -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Michael Gauland ;; Keywords: literate programming, reproducible research, scheme -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -32,7 +32,7 @@ ;;; Requirements: ;; - a working scheme implementation -;; (e.g. guile http://www.gnu.org/software/guile/guile.html) +;; (e.g. guile https://www.gnu.org/software/guile/guile.html) ;; ;; - for session based evaluation geiser is required, which is available from ;; ELPA. @@ -40,41 +40,56 @@ ;;; Code: (require 'ob) (require 'geiser nil t) +(require 'geiser-impl nil t) (defvar geiser-repl--repl) ; Defined in geiser-repl.el (defvar geiser-impl--implementation) ; Defined in geiser-impl.el (defvar geiser-default-implementation) ; Defined in geiser-impl.el (defvar geiser-active-implementations) ; Defined in geiser-impl.el +(defvar geiser-debug-show-debug-p) ; Defined in geiser-debug.el +(defvar geiser-debug-jump-to-debug-p) ; Defined in geiser-debug.el +(defvar geiser-repl-use-other-window) ; Defined in geiser-repl.el +(defvar geiser-repl-window-allow-split) ; Defined in geiser-repl.el (declare-function run-geiser "ext:geiser-repl" (impl)) (declare-function geiser-mode "ext:geiser-mode" ()) (declare-function geiser-eval-region "ext:geiser-mode" (start end &optional and-go raw nomsg)) (declare-function geiser-repl-exit "ext:geiser-repl" (&optional arg)) +(declare-function geiser-eval--retort-output "ext:geiser-eval" (ret)) +(declare-function geiser-eval--retort-result-str "ext:geiser-eval" (ret prefix)) + +(defcustom org-babel-scheme-null-to 'hline + "Replace `null' and empty lists in scheme tables with this before returning." + :group 'org-babel + :version "26.1" + :package-version '(Org . "9.1") + :type 'symbol) (defvar org-babel-default-header-args:scheme '() "Default header arguments for scheme code blocks.") (defun org-babel-expand-body:scheme (body params) "Expand BODY according to PARAMS, return the expanded body." - (let ((vars (org-babel--get-vars params))) - (if (> (length vars) 0) - (concat "(let (" - (mapconcat - (lambda (var) (format "%S" (print `(,(car var) ',(cdr var))))) - vars "\n ") - ")\n" body ")") - body))) - - -(defvar org-babel-scheme-repl-map (make-hash-table :test 'equal) + (let ((vars (org-babel--get-vars params)) + (prepends (cdr (assq :prologue params)))) + (concat (and prepends (concat prepends "\n")) + (if (null vars) body + (format "(let (%s)\n%s\n)" + (mapconcat + (lambda (var) + (format "%S" (print `(,(car var) ',(cdr var))))) + vars + "\n ") + body))))) + + +(defvar org-babel-scheme-repl-map (make-hash-table :test #'equal) "Map of scheme sessions to session names.") (defun org-babel-scheme-cleanse-repl-map () "Remove dead buffers from the REPL map." (maphash - (lambda (x y) - (when (not (buffer-name y)) - (remhash x org-babel-scheme-repl-map))) + (lambda (x y) (unless (buffer-name y) (remhash x org-babel-scheme-repl-map))) org-babel-scheme-repl-map)) (defun org-babel-scheme-get-session-buffer (session-name) @@ -97,10 +112,9 @@ (or buffer (progn (run-geiser impl) - (if name - (progn - (rename-buffer name t) - (org-babel-scheme-set-session-buffer name (current-buffer)))) + (when name + (rename-buffer name t) + (org-babel-scheme-set-session-buffer name (current-buffer))) (current-buffer))))) (defun org-babel-scheme-make-session-name (buffer name impl) @@ -112,12 +126,9 @@ If the session is unnamed (nil), generate a name. If the session is `none', use nil for the session name, and org-babel-scheme-execute-with-geiser will use a temporary session." - (let ((result - (cond ((not name) - (concat buffer " " (symbol-name impl) " REPL")) - ((string= name "none") nil) - (name)))) - result)) + (cond ((not name) (concat buffer " " (symbol-name impl) " REPL")) + ((string= name "none") nil) + (name))) (defmacro org-babel-scheme-capture-current-message (&rest body) "Capture current message in both interactive and noninteractive mode" @@ -145,37 +156,46 @@ is true; otherwise returns the last value." (with-temp-buffer (insert (format ";; -*- geiser-scheme-implementation: %s -*-" impl)) (newline) - (insert (if output - (format "(with-output-to-string (lambda () %s))" code) - code)) + (insert code) (geiser-mode) - (let ((repl-buffer (save-current-buffer - (org-babel-scheme-get-repl impl repl)))) - (when (not (eq impl (org-babel-scheme-get-buffer-impl - (current-buffer)))) - (message "Implementation mismatch: %s (%s) %s (%s)" impl (symbolp impl) - (org-babel-scheme-get-buffer-impl (current-buffer)) - (symbolp (org-babel-scheme-get-buffer-impl - (current-buffer))))) - (setq geiser-repl--repl repl-buffer) - (setq geiser-impl--implementation nil) - (setq result (org-babel-scheme-capture-current-message - (geiser-eval-region (point-min) (point-max)))) - (setq result - (if (and (stringp result) (equal (substring result 0 3) "=> ")) - (replace-regexp-in-string "^=> " "" result) - "\"An error occurred.\"")) - (when (not repl) - (save-current-buffer (set-buffer repl-buffer) - (geiser-repl-exit)) - (set-process-query-on-exit-flag (get-buffer-process repl-buffer) nil) - (kill-buffer repl-buffer)) - (setq result (if (or (string= result "#") - (string= result "#")) - nil - result)))) + (let ((geiser-repl-window-allow-split nil) + (geiser-repl-use-other-window nil)) + (let ((repl-buffer (save-current-buffer + (org-babel-scheme-get-repl impl repl)))) + (when (not (eq impl (org-babel-scheme-get-buffer-impl + (current-buffer)))) + (message "Implementation mismatch: %s (%s) %s (%s)" impl (symbolp impl) + (org-babel-scheme-get-buffer-impl (current-buffer)) + (symbolp (org-babel-scheme-get-buffer-impl + (current-buffer))))) + (setq geiser-repl--repl repl-buffer) + (setq geiser-impl--implementation nil) + (let ((geiser-debug-jump-to-debug-p nil) + (geiser-debug-show-debug-p nil)) + (let ((ret (geiser-eval-region (point-min) (point-max)))) + (setq result (if output + (geiser-eval--retort-output ret) + (geiser-eval--retort-result-str ret ""))))) + (when (not repl) + (save-current-buffer (set-buffer repl-buffer) + (geiser-repl-exit)) + (set-process-query-on-exit-flag (get-buffer-process repl-buffer) nil) + (kill-buffer repl-buffer))))) result)) +(defun org-babel-scheme--table-or-string (results) + "Convert RESULTS into an appropriate elisp value. +If the results look like a list or tuple, then convert them into an +Emacs-lisp table, otherwise return the results as a string." + (let ((res (org-babel-script-escape results))) + (cond ((listp res) + (mapcar (lambda (el) + (if (or (null el) (eq el 'null)) + org-babel-scheme-null-to + el)) + res)) + (t res)))) + (defun org-babel-execute:scheme (body params) "Execute a block of Scheme code with org-babel. This function is called by `org-babel-execute-src-block'" @@ -184,24 +204,31 @@ This function is called by `org-babel-execute-src-block'" "^ ?\\*\\([^*]+\\)\\*" "\\1" (buffer-name source-buffer)))) (save-excursion - (org-babel-reassemble-table - (let* ((result-type (cdr (assq :result-type params))) - (impl (or (when (cdr (assq :scheme params)) - (intern (cdr (assq :scheme params)))) - geiser-default-implementation - (car geiser-active-implementations))) - (session (org-babel-scheme-make-session-name - source-buffer-name (cdr (assq :session params)) impl)) - (full-body (org-babel-expand-body:scheme body params))) - (org-babel-scheme-execute-with-geiser - full-body ; code - (string= result-type "output") ; output? - impl ; implementation - (and (not (string= session "none")) session))) ; session - (org-babel-pick-name (cdr (assq :colname-names params)) - (cdr (assq :colnames params))) - (org-babel-pick-name (cdr (assq :rowname-names params)) - (cdr (assq :rownames params))))))) + (let* ((result-type (cdr (assq :result-type params))) + (impl (or (when (cdr (assq :scheme params)) + (intern (cdr (assq :scheme params)))) + geiser-default-implementation + (car geiser-active-implementations))) + (session (org-babel-scheme-make-session-name + source-buffer-name (cdr (assq :session params)) impl)) + (full-body (org-babel-expand-body:scheme body params)) + (result-params (cdr (assq :result-params params))) + (result + (org-babel-scheme-execute-with-geiser + full-body ; code + (string= result-type "output") ; output? + impl ; implementation + (and (not (string= session "none")) session)))) ; session + (let ((table + (org-babel-reassemble-table + result + (org-babel-pick-name (cdr (assq :colname-names params)) + (cdr (assq :colnames params))) + (org-babel-pick-name (cdr (assq :rowname-names params)) + (cdr (assq :rownames params)))))) + (org-babel-result-cond result-params + result + (org-babel-scheme--table-or-string table))))))) (provide 'ob-scheme) diff --git a/elpa/org-plus-contrib-20190904/ob-sclang.el b/elpa/org-plus-contrib-20190904/ob-sclang.el new file mode 100644 index 00000000..dcd4b6f7 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-sclang.el @@ -0,0 +1,92 @@ +;;; ob-sclang.el --- SCLang support for Org-mode Babel +;;; -*- coding: utf-8 -*- + +;; Copyright (C) 2017-2018 Free Software Foundation, Inc. + +;; Authors: stardiviner +;; Package-Version: 0.1 +;; Keywords: babel sclang + +;; This file is not part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; `ob-sclang' requires `sclang' from SuperCollider. +;; Usually SuperCollider dependencies for Emacs are at /usr/share/emacs/site-lisp/SuperCollider/ +;; You can install SuperCollider following this article: +;; https://github.com/supercollider/supercollider#building-the-source-code + +;; Usage: + +;; Support to evaluate sclang Org-mode src block with function `sclang-eval-string'. + +;; For example: + +;; #+BEGIN_SRC sclang :results none +;; "Hello World".postln; +;; #+END_SRC +;; +;; *NOTE* Temporary output to org-babel result output is not supported. +;; Because `sclang-eval-string' will send output to Sclang Post Buffer. +;; And command line `sclang' execute will not automatically stop after finished execution. +;; +;; #+BEGIN_SRC sclang :results none +;; // modulate a sine frequency and a noise amplitude with another sine +;; // whose frequency depends on the horizontal mouse pointer position +;; { +;; var x = SinOsc.ar(MouseX.kr(1, 100)); +;; SinOsc.ar(300 * x + 800, 0, 0.1) +;; + +;; PinkNoise.ar(0.1 * x + 0.1) +;; }.play; +;; #+END_SRC + + +;;; Code: +;;; ---------------------------------------------------------------------------- +(require 'org) +(require 'ob) + +(require 'sclang) + +(defgroup ob-sclang nil + "org-mode blocks for SuperCollider SCLang." + :group 'org) + +;;;###autoload +(defun org-babel-execute:sclang (body params) + "Org-mode Babel sclang hook for evaluate `BODY' with `PARAMS'." + (unless (or (equal (buffer-name) sclang-post-buffer) + (sclang-get-process)) + (sclang-start)) + (sclang-eval-string body t)) + +(defvar org-babel-default-header-args:sclang nil) + +(setq org-babel-default-header-args:sclang + '((:session . "*SCLang:Workspace*") + ;; TODO: temporary can't find way to let sclang output to stdout for org-babel. + (:output . "none"))) + +(eval-after-load "org" + '(progn + (add-to-list 'org-src-lang-modes '("sclang" . sclang)))) + +;;; ---------------------------------------------------------------------------- + +(provide 'ob-sclang) + +;;; ob-sclang.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-screen.el b/elpa/org-plus-contrib-20190904/ob-screen.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-screen.el rename to elpa/org-plus-contrib-20190904/ob-screen.el index 554f8c43..a3d79841 100644 --- a/elpa/org-plus-contrib-20170407/ob-screen.el +++ b/elpa/org-plus-contrib-20190904/ob-screen.el @@ -1,10 +1,10 @@ ;;; ob-screen.el --- Babel Support for Interactive Terminal -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20170407/ob-sed.el b/elpa/org-plus-contrib-20190904/ob-sed.el similarity index 88% rename from elpa/org-plus-contrib-20170407/ob-sed.el rename to elpa/org-plus-contrib-20190904/ob-sed.el index 733c7e19..be4cff48 100644 --- a/elpa/org-plus-contrib-20170407/ob-sed.el +++ b/elpa/org-plus-contrib-20190904/ob-sed.el @@ -1,27 +1,25 @@ ;;; ob-sed.el --- Babel Functions for Sed Scripts -*- lexical-binding: t; -*- -;; Copyright (C) 2015-2017 Free Software Foundation, Inc. +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. ;; Author: Bjarte Johansen ;; Keywords: literate programming, reproducible research -;; Version: 0.1.0 +;; Version: 0.1.1 ;; This file is part of GNU Emacs. -;;; License: - -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -81,7 +79,7 @@ function is called by `org-babel-execute-src-block'." (cmd (mapconcat #'identity (remq nil (list org-babel-sed-command - (format "--file=\"%s\"" code-file) + (format "-f \"%s\"" code-file) cmd-line in-file)) " "))) diff --git a/elpa/org-plus-contrib-20170407/ob-shell.el b/elpa/org-plus-contrib-20190904/ob-shell.el similarity index 71% rename from elpa/org-plus-contrib-20170407/ob-shell.el rename to elpa/org-plus-contrib-20190904/ob-shell.el index 9c22af83..66c28f7f 100644 --- a/elpa/org-plus-contrib-20170407/ob-shell.el +++ b/elpa/org-plus-contrib-20190904/ob-shell.el @@ -1,10 +1,10 @@ ;;; ob-shell.el --- Babel Functions for Shell Evaluation -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -27,6 +27,7 @@ ;;; Code: (require 'ob) +(require 'org-macs) (require 'shell) (require 'cl-lib) @@ -36,7 +37,6 @@ (declare-function org-babel-comint-buffer-livep "ob-comint" (buffer)) (declare-function org-babel-comint-with-output "ob-comint" (meta &rest body) t) -(declare-function org-trim "org" (s &optional keep-lead)) (declare-function orgtbl-to-generic "org-table" (table params)) (defvar org-babel-default-header-args:shell '()) @@ -57,10 +57,11 @@ is modified outside the Customize interface." 'org-babel-variable-assignments:shell ,(format "Return list of %s statements assigning to the block's \ variables." - name))))) + name))) + (eval `(defvar ,(intern (concat "org-babel-default-header-args:" name)) '())))) (defcustom org-babel-shell-names - '("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh") + '("sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh") "List of names of shell supported by babel shell code blocks. Call `org-babel-shell-initialize' when modifying this variable outside the Customize interface." @@ -140,11 +141,13 @@ This function is called by `org-babel-execute-src-block'." (defun org-babel--variable-assignments:bash (varname values &optional sep hline) "Represents the parameters as useful Bash shell variables." - (if (listp values) - (if (and (listp (car values)) (= 1 (length (car values)))) - (org-babel--variable-assignments:bash_array varname values sep hline) - (org-babel--variable-assignments:bash_assoc varname values sep hline)) - (org-babel--variable-assignments:sh-generic varname values sep hline))) + (pcase values + (`((,_ ,_ . ,_) . ,_) ;two-dimensional array + (org-babel--variable-assignments:bash_assoc varname values sep hline)) + (`(,_ . ,_) ;simple list + (org-babel--variable-assignments:bash_array varname values sep hline)) + (_ ;scalar value + (org-babel--variable-assignments:sh-generic varname values sep hline)))) (defun org-babel-variable-assignments:shell (params) "Return list of shell statements assigning the block's variables." @@ -204,62 +207,60 @@ var of the same value." If RESULT-TYPE equals `output' then return a list of the outputs of the statements in BODY, if RESULT-TYPE equals `value' then return the value of the last statement in BODY." - (let ((results - (cond - ((or stdin cmdline) ; external shell script w/STDIN - (let ((script-file (org-babel-temp-file "sh-script-")) - (stdin-file (org-babel-temp-file "sh-stdin-")) - (shebang (cdr (assq :shebang params))) - (padline (not (string= "no" (cdr (assq :padline params)))))) - (with-temp-file script-file - (when shebang (insert (concat shebang "\n"))) - (when padline (insert "\n")) - (insert body)) - (set-file-modes script-file #o755) - (with-temp-file stdin-file (insert (or stdin ""))) - (with-temp-buffer - (call-process-shell-command - (concat (if shebang script-file - (format "%s %s" shell-file-name script-file)) - (and cmdline (concat " " cmdline))) - stdin-file - (current-buffer)) - (buffer-string)))) - (session ; session evaluation - (mapconcat - #'org-babel-sh-strip-weird-long-prompt - (mapcar - #'org-trim - (butlast - (org-babel-comint-with-output - (session org-babel-sh-eoe-output t body) - (mapc - (lambda (line) - (insert line) - (comint-send-input nil t) - (while (save-excursion - (goto-char comint-last-input-end) - (not (re-search-forward - comint-prompt-regexp nil t))) - (accept-process-output - (get-buffer-process (current-buffer))))) - (append - (split-string (org-trim body) "\n") - (list org-babel-sh-eoe-indicator)))) - 2)) "\n")) - ('otherwise ; external shell script - (if (and (cdr (assq :shebang params)) - (> (length (cdr (assq :shebang params))) 0)) - (let ((script-file (org-babel-temp-file "sh-script-")) - (shebang (cdr (assq :shebang params))) - (padline (not (equal "no" (cdr (assq :padline params)))))) - (with-temp-file script-file - (when shebang (insert (concat shebang "\n"))) - (when padline (insert "\n")) - (insert body)) - (set-file-modes script-file #o755) - (org-babel-eval script-file "")) - (org-babel-eval shell-file-name (org-trim body))))))) + (let* ((shebang (cdr (assq :shebang params))) + (results + (cond + ((or stdin cmdline) ; external shell script w/STDIN + (let ((script-file (org-babel-temp-file "sh-script-")) + (stdin-file (org-babel-temp-file "sh-stdin-")) + (padline (not (string= "no" (cdr (assq :padline params)))))) + (with-temp-file script-file + (when shebang (insert shebang "\n")) + (when padline (insert "\n")) + (insert body)) + (set-file-modes script-file #o755) + (with-temp-file stdin-file (insert (or stdin ""))) + (with-temp-buffer + (call-process-shell-command + (concat (if shebang script-file + (format "%s %s" shell-file-name script-file)) + (and cmdline (concat " " cmdline))) + stdin-file + (current-buffer)) + (buffer-string)))) + (session ; session evaluation + (mapconcat + #'org-babel-sh-strip-weird-long-prompt + (mapcar + #'org-trim + (butlast + (org-babel-comint-with-output + (session org-babel-sh-eoe-output t body) + (dolist (line (append (split-string (org-trim body) "\n") + (list org-babel-sh-eoe-indicator))) + (insert line) + (comint-send-input nil t) + (while (save-excursion + (goto-char comint-last-input-end) + (not (re-search-forward + comint-prompt-regexp nil t))) + (accept-process-output + (get-buffer-process (current-buffer)))))) + 2)) + "\n")) + ;; External shell script, with or without a predefined + ;; shebang. + ((org-string-nw-p shebang) + (let ((script-file (org-babel-temp-file "sh-script-")) + (padline (not (equal "no" (cdr (assq :padline params)))))) + (with-temp-file script-file + (insert shebang "\n") + (when padline (insert "\n")) + (insert body)) + (set-file-modes script-file #o755) + (org-babel-eval script-file ""))) + (t + (org-babel-eval shell-file-name (org-trim body)))))) (when results (let ((result-params (cdr (assq :result-params params)))) (org-babel-result-cond result-params diff --git a/elpa/org-plus-contrib-20170407/ob-shen.el b/elpa/org-plus-contrib-20190904/ob-shen.el similarity index 94% rename from elpa/org-plus-contrib-20170407/ob-shen.el rename to elpa/org-plus-contrib-20190904/ob-shen.el index 6bf36c64..af3bd2ba 100644 --- a/elpa/org-plus-contrib-20170407/ob-shen.el +++ b/elpa/org-plus-contrib-20190904/ob-shen.el @@ -1,10 +1,10 @@ ;;; ob-shen.el --- Babel Functions for Shen -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, shen -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/elpa/org-plus-contrib-20190904/ob-smiles.el b/elpa/org-plus-contrib-20190904/ob-smiles.el new file mode 100644 index 00000000..ef2ab152 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-smiles.el @@ -0,0 +1,54 @@ +;;; ob-smiles.el --- Org-mode Babel support for SMILES. +;;; -*- coding: utf-8 -*- + +;; Keywords: org babel SMILES +;; Version: 0.0.1 +;; Package-Requires: ((smiles-mode "0.0.1") (org "8")) + +;;; Commentary: + +;;; I copy code from: +;;; http://kitchingroup.cheme.cmu.edu/blog/2016/03/26/A-molecule-link-for-org-mode + +;; Author: John Kitchin [jkitchin@andrew.cmu.edu] +;; Maintainer: stardiviner [numbchild@gmail.com] + +;;; Code: + +;; Org-mode Babel +(defun org-babel-execute:smiles (body params) + "Execute SMILES babel `BODY' with `PARAMS'." + (shell-command-to-string + (format "obabel -:\"%s\" -osvg 2> /dev/null" body))) + +;; Org-mode link +(defun molecule-jump (name) + "Jump to molecule `NAME' definition." + (org-mark-ring-push) + (org-open-link-from-string (format "[[%s]]" path))) + +(defun molecule-export (path desc backend) + "Export molecule to HTML format on `PATH' with `DESC' and `BACKEND'." + (let ((name (save-window-excursion + (molecule-jump path) + (org-element-property :name (org-element-context))))) + (cond + ((eq 'html backend) + (format "%s" name name))))) + +(org-add-link-type + "molecule" + 'molecule-jump + 'molecule-export) + +;; org-mode element +(org-element-map (org-element-parse-buffer) + 'src-block + (lambda (src) + (when (string= "smiles" (org-element-property :language src)) + (org-element-property :name src)))) + + +(provide 'ob-smiles) + +;;; ob-smiles.el ends here diff --git a/elpa/org-plus-contrib-20190904/ob-spice.el b/elpa/org-plus-contrib-20190904/ob-spice.el new file mode 100644 index 00000000..24ef3c87 --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-spice.el @@ -0,0 +1,182 @@ +;;; ob-spice.el --- org-babel functions for spice evaluation +;;; -*- coding: utf-8 -*- + +;; Author: Tiago Oliveira Weber +;; Maintainer: stardiviner (numbchild@gmail.com) +;; Version: 0.4 +;; Package-Requires: ((spice-mode "0.0.1") (org "8")) +;; Homepage: http://tiagoweber.github.io + +;; License: GPL v3, or any later version +;; +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Org-Babel support for evaluating spice script. +;; Inspired by Ian Yang's org-export-blocks-format-plantuml (http://www.emacswiki.org/emacs/org-export-blocks-format-plantuml.el) + +;;; Requirements: +;; +;; - ngspice + +;;; Code: +(require 'ob) + +(add-to-list 'org-babel-tangle-lang-exts '("spice" . "cir")) + +(defun ob-spice-concat (wordlist) + "Concatenate elements of a `WORDLIST' into a string separated by spaces." + ;; example of usage + ;; (ob-spice-concat '("This" "is" "a" "long" "journey")) + (setq newtext (car wordlist)) ; first word is without space before + (setq wordlist (rest wordlist)) ; exclude the first word from the list + (dolist (word wordlist newtext) ; loop through the list and concatenate the values + (setq newtext (concat newtext " " word)))) + +(defun org-babel-expand-body:spice (body params) + "Expand BODY according to PARAMS, return the expanded body." + (let* ((vars (mapcar #'cdr (org-babel-get-header params :var)))) + (setq newbody ""); + (setq bodylinelist (split-string body "\n")) + (dolist (line bodylinelist newbody) + (progn ;loop through list of lines + (setq wordlist (split-string line " ")) + (setq firstword 1) + (dolist (word wordlist) + (progn ;loop through the words + (if (string-match "\\$\\(.*\\)\\[\\(.*\\)\\]" word) + (progn + ;; if matchs a vector variable format + (setq varname (match-string 1 word)) + (setq varindex (match-string 2 word)) + ;; search varname in vars and use the value of varindex to word + (setq newword + (nth (string-to-number varindex) + (car (assoc-default varname vars + (lambda (key candidate) + (string= key candidate)))))) + (if (not (eq newword nil)) + (if (not (stringp newword)) + (setq word (number-to-string newword)) + (setq word newword))) + ) + ) ; end of (if (string-match "\\$\\(.*\\)\\[\\(.*\\)\\]" word)) + (if (string-match "\\$\\(.*\\)\\." word) ; if variable has a dot in the end + (progn + ;; if matchs a non-vector variable format + (setq varname (match-string 1 word)) + (setq newword + (assoc-default varname vars + (lambda (key candidate) + (string= key candidate)))) + (if (not (eq newword nil)) + (progn + (if (not (stringp newword)) + (setq newword (number-to-string newword))) + (setq word (replace-match (concat newword ".") nil nil word)) + ;(setq word word) + ) + )) + );; end of (if (string-match "\\$\\(.*\\)\\." word) + (if (string-match "\\$\\(.*\\)" word) + (progn + ;; if matchs a non-vector variable format + (setq varname (match-string 1 word)) + (setq newword + (assoc-default varname vars + (lambda (key candidate) + (string= key candidate)))) + (if (not (eq newword nil)) + (if (not (stringp newword)) + (setq word (number-to-string newword)) + (setq word newword) + )) + ) + ) ; end of (if (string-match "\\$\\(.*\\)" word) + + + (setq newbody (concat newbody + (if (not (eq firstword 1)) " ") + word)) + (setq firstword 0) + ) ; end of (progn + ) ; end of (dolist (word wordlist)) + + (setq newbody (concat newbody "\n")) + ) ; end of (progn ;; loop through list of lines ... ) + ) ; end of (dolist (line bodylinelist) ...function ...) + )) + +;;;###autoload +(defun org-babel-execute:spice (body params) + "Execute a block of Spice code `BODY' with org-babel and `PARAMS'." + (let ((body (org-babel-expand-body:spice body params)) + (vars (mapcar #'cdr (org-babel-get-header params :var)))) + + ;;****************************** + ;; clean temporary files + (mapc (lambda (pair) + (when (string= (car pair) "file") + (setq textfile (concat (cdr pair) ".txt")) + (setq imagefile (concat (cdr pair) ".png")) + ) + ) + vars) + ;; (if (file-readable-p textfile) (delete-file textfile)) + ;; (if (file-readable-p imagefile) (delete-file imagefile)) + ;;******************************* + + (org-babel-eval "ngspice -b " body) + + ;; loop through all pairs (elements) of the list vars and set text and image file if finds "file" var + (mapc (lambda (pair) + (when (string= (car pair) "file") + (setq textfile (concat (cdr pair) ".txt")) + (setq imagefile (concat (cdr pair) ".png")))) + vars) + ;; produce results + ;; THE FOLLOWING WAS COMMENTED TEMPORARILY + ;; (concat + ;; (if (file-readable-p textfile) + ;; (get-string-from-file textfile)) + ;; (if (file-readable-p imagefile) + ;; (concat '"#+ATTR_HTML: :width 600px \n [[file:./" imagefile "]]") + ;; ) + ;; ) + + ;; ;; Get measurement values from text-file by splitting comma separated values + (if (file-readable-p textfile) + (progn + (setq rawtext (get-string-from-file textfile)) + ;;(setq rawtext (replace-regexp-in-string "\n" "" rawtext)) + (setq rawtext (replace-regexp-in-string "\n" "" rawtext)) + (setq result (split-string rawtext ",")))) + (if (file-readable-p imagefile) + (progn + ;; test if result exist already + ;;(if (boundp 'result) + (add-to-list 'result (concat '"[[file:./" imagefile "]]") t) ;; add imagefile to last entry + ;;(concat '"[[file:./" imagefile "]]") + ;;) + )) + result + ;; Produce output like '(test test2) + ;;'(test test2) + + ) + ) + +(provide 'ob-spice) +;;; ob-spice.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-sql.el b/elpa/org-plus-contrib-20190904/ob-sql.el similarity index 89% rename from elpa/org-plus-contrib-20170407/ob-sql.el rename to elpa/org-plus-contrib-20190904/ob-sql.el index ec0427f4..2a581889 100644 --- a/elpa/org-plus-contrib-20170407/ob-sql.el +++ b/elpa/org-plus-contrib-20190904/ob-sql.el @@ -1,10 +1,10 @@ ;;; ob-sql.el --- Babel Functions for SQL -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -111,11 +111,27 @@ Pass nil to omit that arg." (when database (concat "-d" database)))))) (defun org-babel-sql-dbstring-oracle (host port user password database) - "Make Oracle command line args for database connection." - (format "%s/%s@%s:%s/%s" user password host port database)) + "Make Oracle command line arguments for database connection. + +If HOST and PORT are nil then don't pass them. This allows you +to use names defined in your \"TNSNAMES\" file. So you can +connect with + + /@:/ + +or + + /@ + +using its alias." + (cond ((and user password database host port) + (format "%s/%s@%s:%s/%s" user password host port database)) + ((and user password database) + (format "%s/%s@%s" user password database)) + (t (user-error "Missing information to connect to database")))) (defun org-babel-sql-dbstring-mssql (host user password database) - "Make sqlcmd commmand line args for database connection. + "Make sqlcmd command line args for database connection. `sqlcmd' is the preferred command line tool to access Microsoft SQL Server on Windows and Linux platform." (mapconcat #'identity @@ -127,7 +143,7 @@ SQL Server on Windows and Linux platform." " ")) (defun org-babel-sql-dbstring-sqsh (host user password database) - "Make sqsh commmand line args for database connection. + "Make sqsh command line args for database connection. \"sqsh\" is one method to access Sybase or MS SQL via Linux platform" (mapconcat #'identity (delq nil @@ -149,14 +165,14 @@ SQL Server on Windows and Linux platform." " ")) (defun org-babel-sql-convert-standard-filename (file) - "Convert the file name to OS standard. + "Convert FILE to OS standard file name. If in Cygwin environment, uses Cygwin specific function to -convert the file name. Otherwise, uses Emacs' standard conversion -function." - (format "\"%s\"" - (if (fboundp 'cygwin-convert-file-name-to-windows) - (cygwin-convert-file-name-to-windows file) - (convert-standard-filename file)))) +convert the file name. In a Windows-NT environment, do nothing. +Otherwise, use Emacs' standard conversion function." + (cond ((fboundp 'cygwin-convert-file-name-to-windows) + (format "%S" (cygwin-convert-file-name-to-windows file))) + ((string= "windows-nt" system-type) file) + (t (format "%S" (convert-standard-filename file))))) (defun org-babel-execute:sql (body params) "Execute a block of Sql code with Babel. @@ -241,6 +257,7 @@ SET NEWPAGE 0 SET TAB OFF SET SPACE 0 SET LINESIZE 9999 +SET TRIMOUT ON TRIMSPOOL ON SET ECHO OFF SET FEEDBACK OFF SET VERIFY OFF diff --git a/elpa/org-plus-contrib-20170407/ob-sqlite.el b/elpa/org-plus-contrib-20190904/ob-sqlite.el similarity index 92% rename from elpa/org-plus-contrib-20170407/ob-sqlite.el rename to elpa/org-plus-contrib-20190904/ob-sqlite.el index 8094019d..04bf4fe2 100644 --- a/elpa/org-plus-contrib-20170407/ob-sqlite.el +++ b/elpa/org-plus-contrib-20190904/ob-sqlite.el @@ -1,10 +1,10 @@ ;;; ob-sqlite.el --- Babel Functions for SQLite Databases -*- lexical-binding: t; -*- -;; Copyright (C) 2010-2017 Free Software Foundation, Inc. +;; Copyright (C) 2010-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -123,10 +123,7 @@ This function is called by `org-babel-execute-src-block'." (if (listp val) (let ((data-file (org-babel-temp-file "sqlite-data-"))) (with-temp-file data-file - (insert (orgtbl-to-csv - val '(:fmt (lambda (el) (if (stringp el) - el - (format "%S" el))))))) + (insert (orgtbl-to-csv val nil))) data-file) (if (stringp val) val (format "%S" val)))) body))) diff --git a/elpa/org-plus-contrib-20170407/ob-stan.el b/elpa/org-plus-contrib-20190904/ob-stan.el similarity index 85% rename from elpa/org-plus-contrib-20170407/ob-stan.el rename to elpa/org-plus-contrib-20190904/ob-stan.el index 40dd0efa..47b871d1 100644 --- a/elpa/org-plus-contrib-20170407/ob-stan.el +++ b/elpa/org-plus-contrib-20190904/ob-stan.el @@ -1,10 +1,10 @@ ;;; ob-stan.el --- Babel Functions for Stan -*- lexical-binding: t; -*- -;; Copyright (C) 2015-2017 Free Software Foundation, Inc. +;; Copyright (C) 2015-2019 Free Software Foundation, Inc. ;; Author: Kyle Meyer ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -39,7 +39,7 @@ ;; that does not end in ".stan". ;; ;; For more information and usage examples, visit -;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html +;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-stan.html ;; ;; [1] http://mc-stan.org/ @@ -49,11 +49,12 @@ (defcustom org-babel-stan-cmdstan-directory nil "CmdStan source directory. -'make' will be called from this directory to compile the Stan -block. When nil, executing Stan blocks dumps the content to a -plain text file." +Call \"make\" from this directory to compile the Stan block. +When nil, executing Stan blocks dumps the content to a file." :group 'org-babel - :type 'string) + :type '(choice + (directory :tag "Compilation directory") + (const :tag "Dump to a file" nil))) (defvar org-babel-default-header-args:stan '((:results . "file"))) diff --git a/elpa/org-plus-contrib-20170407/ob-stata.el b/elpa/org-plus-contrib-20190904/ob-stata.el similarity index 100% rename from elpa/org-plus-contrib-20170407/ob-stata.el rename to elpa/org-plus-contrib-20190904/ob-stata.el diff --git a/elpa/org-plus-contrib-20170407/ob-table.el b/elpa/org-plus-contrib-20190904/ob-table.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ob-table.el rename to elpa/org-plus-contrib-20190904/ob-table.el index 4de8936d..42eecea1 100644 --- a/elpa/org-plus-contrib-20170407/ob-table.el +++ b/elpa/org-plus-contrib-20190904/ob-table.el @@ -1,10 +1,10 @@ ;;; ob-table.el --- Support for Calling Babel Functions from Tables -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -54,8 +54,7 @@ ;;; Code: (require 'ob-core) - -(declare-function org-trim "org" (s &optional keep-lead)) +(require 'org-macs) (defun org-babel-table-truncate-at-newline (string) "Replace newline character with ellipses. diff --git a/elpa/org-plus-contrib-20170407/ob-tangle.el b/elpa/org-plus-contrib-20190904/ob-tangle.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-tangle.el rename to elpa/org-plus-contrib-20190904/ob-tangle.el index b33fcaee..dbab56f7 100644 --- a/elpa/org-plus-contrib-20170407/ob-tangle.el +++ b/elpa/org-plus-contrib-20190904/ob-tangle.el @@ -1,10 +1,10 @@ ;;; ob-tangle.el --- Extract Source Code From Org Files -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -40,14 +40,12 @@ (declare-function org-element-type "org-element" (element)) (declare-function org-fill-template "org" (template alist)) (declare-function org-heading-components "org" ()) +(declare-function org-id-find "org-id" (id &optional markerp)) (declare-function org-in-commented-heading-p "org" (&optional no-inheritance)) (declare-function org-link-escape "org" (text &optional table merge)) (declare-function org-open-link-from-string "org" (s &optional arg reference-buffer)) -(declare-function org-remove-indentation "org" (code &optional n)) -(declare-function org-store-link "org" (arg)) -(declare-function org-trim "org" (s &optional keep-lead)) +(declare-function org-store-link "org" (arg &optional interactive?)) (declare-function outline-previous-heading "outline" ()) -(declare-function org-id-find "org-id" (id &optional markerp)) (defvar org-link-types-re) @@ -196,6 +194,7 @@ Return a list whose CAR is the tangled file name." "Tangle FILENAME and place the results in PUB-DIR." (unless (file-exists-p pub-dir) (make-directory pub-dir t)) + (setq pub-dir (file-name-as-directory pub-dir)) (mapc (lambda (el) (copy-file el pub-dir t)) (org-babel-tangle-file filename))) ;;;###autoload @@ -408,7 +407,8 @@ can be used to limit the collected code blocks by target file." (if by-lang (setcdr by-lang (cons block (cdr by-lang))) (push (cons src-lang (list block)) blocks))))))) ;; Ensure blocks are in the correct order. - (mapcar (lambda (b) (cons (car b) (nreverse (cdr b)))) blocks))) + (mapcar (lambda (b) (cons (car b) (nreverse (cdr b)))) + (nreverse blocks)))) (defun org-babel-tangle-single-block (block-counter &optional only-this-block) "Collect the tangled source for current block. @@ -493,10 +493,9 @@ non-nil, return the full association list to be used by link) source-name params - (org-unescape-code-in-string - (if org-src-preserve-indentation - (org-trim body t) - (org-trim (org-remove-indentation body)))) + (if org-src-preserve-indentation + (org-trim body t) + (org-trim (org-remove-indentation body))) comment))) (if only-this-block (list (cons src-lang (list result))) @@ -583,10 +582,12 @@ which enable the original code blocks to be found." (t (org-babel-next-src-block (1- n))))) (org-babel-goto-named-src-block block-name)) (goto-char (org-babel-where-is-src-block-head)) - ;; Preserve location of point within the source code in tangled - ;; code file. (forward-line 1) - (forward-char (- mid body-start)) + ;; Try to preserve location of point within the source code in + ;; tangled code file. + (let ((offset (- mid body-start))) + (when (> end (+ offset (point))) + (forward-char offset))) (setq target-char (point))) (org-src-switch-to-buffer target-buffer t) (goto-char target-char) diff --git a/elpa/org-plus-contrib-20170407/ob-tcl.el b/elpa/org-plus-contrib-20190904/ob-tcl.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-tcl.el rename to elpa/org-plus-contrib-20190904/ob-tcl.el index c76b138c..45708adf 100644 --- a/elpa/org-plus-contrib-20170407/ob-tcl.el +++ b/elpa/org-plus-contrib-20190904/ob-tcl.el @@ -1,13 +1,13 @@ ;;; ob-tcl.el --- Org-babel functions for tcl evaluation -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2018 Free Software Foundation, Inc. ;; Authors: Dan Davison ;; Eric Schulte ;; Luis Anaya (tcl) ;; ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20190904/ob-vala.el b/elpa/org-plus-contrib-20190904/ob-vala.el new file mode 100644 index 00000000..85868d8e --- /dev/null +++ b/elpa/org-plus-contrib-20190904/ob-vala.el @@ -0,0 +1,116 @@ +;;; ob-vala.el --- Babel functions for Vala evaluation -*- lexical-binding: t; -*- + +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. + +;; Author: Christian Garbs +;; Keywords: literate programming, reproducible research +;; Homepage: https://orgmode.org + +;;; License: + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; ob-vala.el provides Babel support for the Vala language +;; (see http://live.gnome.org/Vala for details) + +;;; Requirements: + +;; - Vala compiler binary (valac) +;; - Vala development environment (Vala libraries etc.) +;; +;; vala-mode.el is nice to have for code formatting, but is not needed +;; for ob-vala.el + +;;; Code: + +(require 'ob) +(require 'org-macs) + +;; File extension. +(add-to-list 'org-babel-tangle-lang-exts '("vala" . "vala")) + +;; Header arguments empty by default. +(defvar org-babel-default-header-args:vala '()) + +(defcustom org-babel-vala-compiler "valac" + "Command used to compile a C source code file into an executable. +May be either a command in the path, like \"valac\" +or an absolute path name, like \"/usr/local/bin/valac\". +Parameters may be used like this: \"valac -v\"" + :group 'org-babel + :version "26.1" + :package-version '(Org . "9.1") + :type 'string) + +;; This is the main function which is called to evaluate a code +;; block. +;; +;; - run Vala compiler and create a binary in a temporary file +;; - compiler/linker flags can be set via :flags header argument +;; - if compilation succeeded, run the binary +;; - commandline parameters to the binary can be set via :cmdline +;; header argument +;; - stdout will be parsed as RESULT (control via :result-params +;; header argument) +;; +;; There is no session support because Vala is a compiled language. +;; +;; This function is heavily based on ob-C.el +(defun org-babel-execute:vala (body params) + "Execute a block of Vala code with Babel. +This function is called by `org-babel-execute-src-block'." + (message "executing Vala source code block") + (let* ((tmp-src-file (org-babel-temp-file + "vala-src-" + ".vala")) + (tmp-bin-file (org-babel-temp-file "vala-bin-" org-babel-exeext)) + (cmdline (cdr (assq :cmdline params))) + (flags (cdr (assq :flags params)))) + (with-temp-file tmp-src-file (insert body)) + (org-babel-eval + (format "%s %s -o %s %s" + org-babel-vala-compiler + (mapconcat #'identity + (if (listp flags) flags (list flags)) " ") + (org-babel-process-file-name tmp-bin-file) + (org-babel-process-file-name tmp-src-file)) "") + (when (file-executable-p tmp-bin-file) + (let ((results + (org-trim + (org-babel-eval + (concat tmp-bin-file (if cmdline (concat " " cmdline) "")) "")))) + (org-babel-reassemble-table + (org-babel-result-cond (cdr (assq :result-params params)) + (org-babel-read results) + (let ((tmp-file (org-babel-temp-file "vala-"))) + (with-temp-file tmp-file (insert results)) + (org-babel-import-elisp-from-file tmp-file))) + (org-babel-pick-name + (cdr (assq :colname-names params)) (cdr (assq :colnames params))) + (org-babel-pick-name + (cdr (assq :rowname-names params)) (cdr (assq :rownames params)))))))) + +(defun org-babel-prep-session:vala (_session _params) + "Prepare a session. +This function does nothing as Vala is a compiled language with no +support for sessions." + (error "Vala is a compiled language -- no support for sessions")) + +(provide 'ob-vala) + +;;; ob-vala.el ends here diff --git a/elpa/org-plus-contrib-20170407/ob-vbnet.el b/elpa/org-plus-contrib-20190904/ob-vbnet.el similarity index 97% rename from elpa/org-plus-contrib-20170407/ob-vbnet.el rename to elpa/org-plus-contrib-20190904/ob-vbnet.el index b0f26880..f9a762e6 100644 --- a/elpa/org-plus-contrib-20170407/ob-vbnet.el +++ b/elpa/org-plus-contrib-20190904/ob-vbnet.el @@ -1,10 +1,10 @@ ;;; ob-vbnet.el --- org-babel functions for VB.Net evaluation -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2018 Free Software Foundation, Inc. ;; Author: thomas "at" friendlyvillagers.com based on ob-java.el by Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is not part of GNU Emacs. diff --git a/elpa/org-plus-contrib-20170407/ob.el b/elpa/org-plus-contrib-20190904/ob.el similarity index 87% rename from elpa/org-plus-contrib-20170407/ob.el rename to elpa/org-plus-contrib-20190904/ob.el index 736f5887..86d6928b 100644 --- a/elpa/org-plus-contrib-20170407/ob.el +++ b/elpa/org-plus-contrib-20190904/ob.el @@ -1,10 +1,10 @@ ;;; ob.el --- Working with Code Blocks in Org -*- lexical-binding: t; -*- -;; Copyright (C) 2009-2017 Free Software Foundation, Inc. +;; Copyright (C) 2009-2019 Free Software Foundation, Inc. ;; Authors: Eric Schulte ;; Keywords: literate programming, reproducible research -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Code: (require 'org-macs) diff --git a/elpa/org-plus-contrib-20190904/org b/elpa/org-plus-contrib-20190904/org new file mode 100644 index 00000000..f8b2052f --- /dev/null +++ b/elpa/org-plus-contrib-20190904/org @@ -0,0 +1,22565 @@ +This is org, produced by makeinfo version 6.3 from org.texi. + +This manual is for Org version 9.2. + + Copyright © 2004–2019 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, with the Front-Cover Texts + being “A GNU Manual,” and with the Back-Cover Texts as in (a) + below. A copy of the license is included in the section entitled + “GNU Free Documentation License.” + + (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and + modify this GNU manual.” + +INFO-DIR-SECTION Emacs editing modes +START-INFO-DIR-ENTRY +* Org Mode: (org). Outline-based notes management and organizer. +END-INFO-DIR-ENTRY + + +File: org, Node: Top, Next: Introduction, Up: (dir) + +The Org Manual +************** + +This manual is for Org version 9.2. + + Copyright © 2004–2019 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, with the Front-Cover Texts + being “A GNU Manual,” and with the Back-Cover Texts as in (a) + below. A copy of the license is included in the section entitled + “GNU Free Documentation License.” + + (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and + modify this GNU manual.” + +* Menu: + +* Introduction:: Getting started. +* Document Structure:: A tree works like your brain. +* Tables:: Pure magic for quick formatting. +* Hyperlinks:: Notes in context. +* TODO Items:: Every tree branch can be a TODO item. +* Tags:: Tagging headlines and matching sets of tags. +* Properties and Columns:: Storing information about an entry. +* Dates and Times:: Making items useful for planning. +* Capture, Refile, Archive: Capture Refile Archive. The ins and outs for projects. +* Agenda Views:: Collecting information into views. +* Markup for Rich Contents:: Compose beautiful documents. +* Exporting:: Sharing and publishing notes. +* Publishing:: Create a web site of linked Org files. +* Working with Source Code:: Export, evaluate, and tangle code blocks. +* Miscellaneous:: All the rest which did not fit elsewhere. +* Hacking:: How to hack your way around. +* History and Acknowledgments:: How Org came into being. +* GNU Free Documentation License:: The license for this documentation. +* Main Index:: An index of Org’s concepts and features. +* Key Index:: Key bindings and where they are described. +* Command and Function Index:: Command names and some internal functions. +* Variable Index:: Variables mentioned in the manual. + +— The Detailed Node Listing — + +Introduction + +* Summary:: Brief summary of what Org does. +* Installation:: Installing Org. +* Activation:: How to activate Org for certain buffers. +* Feedback:: Bug reports, ideas, patches, etc. +* Conventions:: Typesetting conventions used in this manual. + +Document Structure + +* Headlines:: How to typeset Org tree headlines. +* Visibility Cycling:: Show and hide, much simplified. +* Motion:: Jumping to other headlines. +* Structure Editing:: Changing sequence and level of headlines. +* Sparse Trees:: Matches embedded in context. +* Plain Lists:: Additional structure within an entry. +* Drawers:: Tucking stuff away. +* Blocks:: Folding blocks. +* Creating Footnotes:: How footnotes are defined in Org’s syntax. + +Visibility Cycling + +* Global and local cycling:: Cycling through various visibility states. +* Initial visibility:: Setting the initial visibility state. +* Catching invisible edits:: Preventing mistakes when editing invisible parts. + +Tables + +* Built-in Table Editor:: Simple tables. +* Column Width and Alignment:: Overrule the automatic settings. +* Column Groups:: Grouping to trigger vertical lines. +* Orgtbl Mode:: The table editor as minor mode. +* The Spreadsheet:: The table editor has spreadsheet capabilities. +* Org Plot:: Plotting from Org tables. + +The Spreadsheet + +* References:: How to refer to another field or range. +* Formula syntax for Calc:: Using Calc to compute stuff. +* Formula syntax for Lisp:: Writing formulas in Emacs Lisp. +* Durations and time values:: How to compute durations and time values. +* Field and range formulas:: Formula for specific (ranges of) fields. +* Column formulas:: Formulas valid for an entire column. +* Lookup functions:: Lookup functions for searching tables. +* Editing and debugging formulas:: Fixing formulas. +* Updating the table:: Recomputing all dependent fields. +* Advanced features:: Field and column names, automatic recalculation... + +Hyperlinks + +* Link Format:: How links in Org are formatted. +* Internal Links:: Links to other places in the current file. +* Radio Targets:: Make targets trigger links in plain text. +* External Links:: URL-like links to the world. +* Handling Links:: Creating, inserting and following. +* Using Links Outside Org:: Linking from my C source code? +* Link Abbreviations:: Shortcuts for writing complex links. +* Search Options:: Linking to a specific location. +* Custom Searches:: When the default search is not enough. + +TODO Items + +* TODO Basics:: Marking and displaying TODO entries. +* TODO Extensions:: Workflow and assignments. +* Progress Logging:: Dates and notes for progress. +* Priorities:: Some things are more important than others. +* Breaking Down Tasks:: Splitting a task into manageable pieces. +* Checkboxes:: Tick-off lists. + +TODO Extensions + +* Workflow states:: From TODO to DONE in steps. +* TODO types:: I do this, Fred does the rest. +* Multiple sets in one file:: Mixing it all, still finding your way. +* Fast access to TODO states:: Single letter selection of state. +* Per-file keywords:: Different files, different requirements. +* Faces for TODO keywords:: Highlighting states. +* TODO dependencies:: When one task needs to wait for others. + +Progress Logging + +* Closing items:: When was this entry marked DONE? +* Tracking TODO state changes:: When did the status change? +* Tracking your habits:: How consistent have you been? + +Tags + +* Tag Inheritance:: Tags use the tree structure of an outline. +* Setting Tags:: How to assign tags to a headline. +* Tag Hierarchy:: Create a hierarchy of tags. +* Tag Searches:: Searching for combinations of tags. + +Properties and Columns + +* Property Syntax:: How properties are spelled out. +* Special Properties:: Access to other Org mode features. +* Property Searches:: Matching property values. +* Property Inheritance:: Passing values down a tree. +* Column View:: Tabular viewing and editing. + +Column View + +* Defining columns:: The COLUMNS format property. +* Using column view:: How to create and use column view. +* Capturing column view:: A dynamic block for column view. + +Defining columns + +* Scope of column definitions:: Where defined, where valid? +* Column attributes:: Appearance and content of a column. + +Dates and Times + +* Timestamps:: Assigning a time to a tree entry. +* Creating Timestamps:: Commands to insert timestamps. +* Deadlines and Scheduling:: Planning your work. +* Clocking Work Time:: Tracking how long you spend on a task. +* Effort Estimates:: Planning work effort in advance. +* Timers:: Notes with a running timer. + +Creating Timestamps + +* The date/time prompt:: How Org mode helps you enter dates and times. +* Custom time format:: Making dates look different. + +Deadlines and Scheduling + +* Inserting deadline/schedule:: Planning items. +* Repeated tasks:: Items that show up again and again. + +Clocking Work Time + +* Clocking commands:: Starting and stopping a clock. +* The clock table:: Detailed reports. +* Resolving idle time:: Resolving time when you’ve been idle. + +Capture, Refile, Archive + +* Capture:: Capturing new stuff. +* Attachments:: Add files to tasks. +* RSS Feeds:: Getting input from RSS feeds. +* Protocols:: External access to Emacs and Org. +* Refile and Copy:: Moving/copying a tree from one place to another. +* Archiving:: What to do with finished products. + +Capture + +* Setting up capture:: Where notes will be stored. +* Using capture:: Commands to invoke and terminate capture. +* Capture templates:: Define the outline of different note types. + +Capture templates + +* Template elements:: What is needed for a complete template entry. +* Template expansion:: Filling in information about time and context. +* Templates in contexts:: Only show a template in a specific context. + +Protocols + +* store-link protocol:: Store a link, push URL to kill-ring. +* capture protocol:: Fill a buffer with external information. +* open-source protocol:: Edit published contents. + +Archiving + +* Moving subtrees:: Moving a tree to an archive file. +* Internal archiving:: Switch off a tree but keep it in the file. + +Agenda Views + +* Agenda Files:: Files being searched for agenda information. +* Agenda Dispatcher:: Keyboard access to agenda views. +* Built-in Agenda Views:: What is available out of the box? +* Presentation and Sorting:: How agenda items are prepared for display. +* Agenda Commands:: Remote editing of Org trees. +* Custom Agenda Views:: Defining special searches and views. +* Exporting Agenda Views:: Writing a view to a file. +* Agenda Column View:: Using column view for collected entries. + +Built-in Agenda Views + +* Weekly/daily agenda:: The calendar page with current tasks. +* Global TODO list:: All unfinished action items. +* Matching tags and properties:: Structured information with fine-tuned search. +* Search view:: Find entries by searching for text. +* Stuck projects:: Find projects you need to review. + +Presentation and Sorting + +* Categories:: Not all tasks are equal. +* Time-of-day specifications:: How the agenda knows the time. +* Sorting of agenda items:: The order of things. +* Filtering/limiting agenda times:: Dynamically narrow the agenda. + +Custom Agenda Views + +* Storing searches:: Type once, use often. +* Block agenda:: All the stuff you need in a single buffer. +* Setting options:: Changing the rules. + +Markup for Rich Contents + +* Paragraphs:: The basic unit of text. +* Emphasis and Monospace:: Bold, italic, etc. +* Subscripts and Superscripts:: Simple syntax for raising/lowering text. +* Special Symbols:: Greek letters and other symbols. +* Embedded LaTeX:: LaTeX can be freely used inside Org documents. +* Literal Examples:: Source code examples with special formatting. +* Images:: Display an image. +* Captions:: Describe tables, images... +* Horizontal Rules:: Make a line. + +Embedded LaTeX + +* LaTeX fragments:: Complex formulas made easy. +* Previewing LaTeX fragments:: What will this snippet look like? +* CDLaTeX mode:: Speed up entering of formulas. + +Exporting + +* The Export Dispatcher:: The main interface. +* Export Settings:: Common export settings. +* Table of Contents:: The if and where of the table of contents. +* Include Files:: Include additional files into a document. +* Macro Replacement:: Use macros to create templates. +* Comment Lines:: What will not be exported. +* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding. +* Beamer Export:: +* HTML Export:: Exporting to HTML. +* LaTeX Export:: Exporting to LaTeX and processing to PDF. +* Markdown Export:: Exporting to Markdown. +* OpenDocument Text Export:: Exporting to OpenDocument Text. +* Org Export:: Exporting to Org. +* Texinfo Export:: Exporting to Texinfo. +* iCalendar Export:: Exporting to iCalendar. +* Other Built-in Back-ends:: Exporting to a man page. +* Advanced Export Configuration:: Fine-tuning the export output. +* Export in Foreign Buffers:: Author tables and lists in Org syntax. + +Beamer Export + +* Beamer export commands:: For creating Beamer documents. +* Beamer specific export settings:: For customizing Beamer export. +* Frames and Blocks in Beamer:: For composing Beamer slides. +* Beamer specific syntax:: For using in Org documents. +* Editing support:: Editing support. +* A Beamer example:: A complete presentation. + +HTML Export + +* HTML export commands:: Invoking HTML export. +* HTML specific export settings:: Settings for HTML export. +* HTML doctypes:: Exporting various (X)HTML flavors. +* HTML preamble and postamble:: Inserting preamble and postamble. +* Quoting HTML tags:: Using direct HTML in Org files. +* Links in HTML export:: Inserting and formatting links. +* Tables in HTML export:: How to modify the formatting of tables. +* Images in HTML export:: How to insert figures into HTML output. +* Math formatting in HTML export:: Beautiful math also on the web. +* Text areas in HTML export:: An alternate way to show an example. +* CSS support:: Changing the appearance of the output. +* JavaScript support:: Info and folding in a web browser. + +LaTeX Export + +* LaTeX/PDF export commands:: For producing LaTeX and PDF documents. +* LaTeX specific export settings:: Unique to this LaTeX back-end. +* LaTeX header and sectioning:: Setting up the export file structure. +* Quoting LaTeX code:: Incorporating literal LaTeX code. +* Tables in LaTeX export:: Options for exporting tables to LaTeX. +* Images in LaTeX export:: How to insert figures into LaTeX output. +* Plain lists in LaTeX export:: Attributes specific to lists. +* Source blocks in LaTeX export:: Attributes specific to source code blocks. +* Example blocks in LaTeX export:: Attributes specific to example blocks. +* Special blocks in LaTeX export:: Attributes specific to special blocks. +* Horizontal rules in LaTeX export:: Attributes specific to horizontal rules. + +OpenDocument Text Export + +* Pre-requisites for ODT export:: Required packages. +* ODT export commands:: Invoking export. +* ODT specific export settings:: Configuration options. +* Extending ODT export:: Producing DOC, PDF files. +* Applying custom styles:: Styling the output. +* Links in ODT export:: Handling and formatting links. +* Tables in ODT export:: Org tables conversions. +* Images in ODT export:: Inserting images. +* Math formatting in ODT export:: Formatting LaTeX fragments. +* Labels and captions in ODT export:: Rendering objects. +* Literal examples in ODT export:: For source code and example blocks. +* Advanced topics in ODT export:: For power users. + +Math formatting in ODT export + +* LaTeX math snippets:: Embedding in LaTeX format. +* MathML and OpenDocument formula files:: Embedding in native format. + +Texinfo Export + +* Texinfo export commands:: Invoking commands. +* Texinfo specific export settings:: Setting the environment. +* Texinfo file header:: Generating the header. +* Texinfo title and copyright page:: Creating preamble pages. +* Info directory file:: Installing a manual in Info file hierarchy. +* Headings and sectioning structure:: Building document structure. +* Indices:: Creating indices. +* Quoting Texinfo code:: Incorporating literal Texinfo code. +* Plain lists in Texinfo export:: List attributes. +* Tables in Texinfo export:: Table attributes. +* Images in Texinfo export:: Image attributes. +* Quotations in Texinfo export:: Quote block attributes. +* Special blocks in Texinfo export:: Special block attributes. +* A Texinfo example:: Processing Org to Texinfo. + +Publishing + +* Configuration:: Defining projects. +* Uploading Files:: How to get files up on the server. +* Sample Configuration:: Example projects. +* Triggering Publication:: Publication commands. + +Configuration + +* Project alist:: The central configuration variable. +* Sources and destinations:: From here to there. +* Selecting files:: What files are part of the project? +* Publishing action:: Setting the function doing the publishing. +* Publishing options:: Tweaking HTML/LaTeX export. +* Publishing links:: Which links keep working after publishing? +* Site map:: Generating a list of all pages. +* Generating an index:: An index that reaches across pages. + +Sample Configuration + +* Simple example:: One-component publishing. +* Complex example:: A multi-component publishing example. + +Working with Source Code + +* Structure of Code Blocks:: Code block syntax described. +* Using Header Arguments:: Different ways to set header arguments. +* Environment of a Code Block:: Arguments, sessions, working directory... +* Evaluating Code Blocks:: Place results of evaluation in the Org buffer. +* Results of Evaluation:: Choosing a results type, post-processing... +* Exporting Code Blocks:: Export contents and/or results. +* Extracting Source Code:: Create pure source code files. +* Languages:: List of supported code block languages. +* Editing Source Code:: Language major-mode editing. +* Noweb Reference Syntax:: Literate programming in Org mode. +* Library of Babel:: Use and contribute to a library of useful code blocks. +* Key bindings and Useful Functions:: Work quickly with code blocks. +* Batch Execution:: Call functions from the command line. + +Miscellaneous + +* Completion:: ‘M-’ guesses completions. +* Structure Templates:: Quick insertion of structural elements. +* Escape Character:: +* Speed Keys:: Electric commands at the beginning of a headline. +* Code Evaluation Security:: Org files evaluate in-line code. +* Customization:: Adapting Org to your taste. +* In-buffer Settings:: Overview of keywords. +* The Very Busy C-c C-c Key:: When in doubt, press ‘C-c C-c’. +* Clean View:: Getting rid of leading stars in the outline. +* TTY Keys:: Using Org on a tty. +* Documentation Access:: Read documentation about current syntax. +* Interaction:: With other Emacs packages. +* Org Crypt:: Encrypting Org files. +* Org Mobile:: Viewing and capture on a mobile device. +* Org Syntax:: Formal description of Org’s syntax. + +Interaction + +* Cooperation:: Packages Org cooperates with. +* Conflicts:: Packages that lead to conflicts. + +Org Mobile + +* Setting up the staging area:: For the mobile device. +* Pushing to the mobile application:: Uploading Org files and agendas. +* Pulling from the mobile application:: Integrating captured and flagged items. + +Hacking + +* Hooks: Hooks (2). How to reach into Org’s internals. +* Add-on Packages:: Available extensions. +* Adding Hyperlink Types:: New custom link types. +* Adding Export Back-ends:: How to write new export back-ends. +* Tables in Arbitrary Syntax:: Orgtbl for LaTeX and other programs. +* Dynamic Blocks:: Automatically filled blocks. +* Special Agenda Views:: Customized views. +* Speeding Up Your Agendas:: Tips on how to speed up your agendas. +* Extracting Agenda Information:: Post-processing agenda information. +* Using the Property API:: Writing programs that use entry properties. +* Using the Mapping API:: Mapping over all or selected entries. + +Tables in Arbitrary Syntax + +* Radio tables:: Sending and receiving radio tables. +* A LaTeX example:: Step by step, almost a tutorial. +* Translator functions:: Copy and modify. + + + +File: org, Node: Introduction, Next: Document Structure, Prev: Top, Up: Top + +1 Introduction +************** + +* Menu: + +* Summary:: Brief summary of what Org does. +* Installation:: Installing Org. +* Activation:: How to activate Org for certain buffers. +* Feedback:: Bug reports, ideas, patches, etc. +* Conventions:: Typesetting conventions used in this manual. + + +File: org, Node: Summary, Next: Installation, Up: Introduction + +1.1 Summary +=========== + +Org is a mode for keeping notes, maintaining TODO lists, and project +planning with a fast and effective plain-text markup language. It also +is an authoring system with unique support for literate programming and +reproducible research. + + Org is implemented on top of Outline mode, which makes it possible to +keep the content of large files well structured. Visibility cycling and +structure editing help to work with the tree. Tables are easily created +with a built-in table editor. Plain text URL-like links connect to +websites, emails, Usenet messages, BBDB entries, and any files related +to the projects. + + Org develops organizational tasks around notes files that contain +lists or information about projects as plain text. Project planning and +task management make use of metadata which is part of an outline node. +Based on this data, specific entries can be extracted in queries and +create dynamic _agenda views_ that also integrate the Emacs calendar and +diary. Org can be used to implement many different project planning +schemes, such as David Allen’s GTD system. + + Org files can serve as a single source authoring system with export +to many different formats such as HTML, LaTeX, Open Document, and +Markdown. New export backends can be derived from existing ones, or +defined from scratch. + + Org files can include source code blocks, which makes Org uniquely +suited for authoring technical documents with code examples. Org source +code blocks are fully functional; they can be evaluated in place and +their results can be captured in the file. This makes it possible to +create a single file reproducible research compendium. + + Org keeps simple things simple. When first fired up, it should feel +like a straightforward, easy to use outliner. Complexity is not +imposed, but a large amount of functionality is available when needed. +Org is a toolbox. Many users actually run only a—very personal—fraction +of Org’s capabilities, and know that there is more whenever they need +it. + + All of this is achieved with strictly plain text files, the most +portable and future-proof file format. Org runs in Emacs. Emacs is one +of the most widely ported programs, so that Org mode is available on +every major platform. + + There is a website for Org which provides links to the newest version +of Org, as well as additional information, frequently asked questions +(FAQ), links to tutorials, etc. This page is located at +. + + An earlier version (7.3) of this manual is available as a paperback +book from Network Theory Ltd. +(http://www.network-theory.co.uk/org/manual/). + + +File: org, Node: Installation, Next: Activation, Prev: Summary, Up: Introduction + +1.2 Installation +================ + +Org is included in all recent distributions of GNU Emacs, so you +probably do not need to install it. Most users will simply activate Org +and begin exploring its many features. + + If, for one reason or another, you want to install Org on top of this +pre-packaged version, there are three ways to do it: + + • by using the Emacs package system; + • by downloading Org as an archive; or + • by using Org’s git repository. + + We *strongly recommend* sticking to a single installation method. + +Using Emacs packaging system +---------------------------- + +Recent Emacs distributions include a packaging system which lets you +install Elisp libraries. You can install Org with ‘M-x package-install + org’. + + Important: You need to do this in a session where no ‘.org’ file + has been visited, i.e., where no Org built-in function have been + loaded. Otherwise autoload Org functions will mess up the + installation. + + If you want to use Org’s package repository, check out the Org ELPA +page (https://orgmode.org/elpa.html). + +Downloading Org as an archive +----------------------------- + +You can download Org latest release from Org’s website +(https://orgmode.org/). In this case, make sure you set the load-path +correctly in your Emacs init file: + + (add-to-list 'load-path "~/path/to/orgdir/lisp") + + The downloaded archive contains contributed libraries that are not +included in Emacs. If you want to use them, add the ‘contrib/’ +directory to your load-path: + + (add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t) + + Optionally, you can compile the files and/or install them in your +system. Run ‘make help’ to list compilation and installation options. + +Using Org’s git repository +-------------------------- + +You can clone Org’s repository and install Org like this: + + $ cd ~/src/ + $ git clone git@code.orgmode.org:bzg/org-mode.git + $ cd org-mode/ + $ make autoloads + + Note that in this case, ‘make autoloads’ is mandatory: it defines +Org’s version in ‘org-version.el’ and Org’s autoloads in +‘org-loaddefs.el’. + + Remember to add the correct load-path as described in the method +above. + + You can also compile with ‘make’, generate the documentation with +‘make doc’, create a local configuration with ‘make config’ and install +Org with ‘make install’. Please run ‘make help’ to get the list of +compilation/installation options. + + For more detailed explanations on Org’s build system, please check +the Org Build System page on Worg +(https://orgmode.org/worg/dev/org-build-system.html). + + +File: org, Node: Activation, Next: Feedback, Prev: Installation, Up: Introduction + +1.3 Activation +============== + +Org mode buffers need Font Lock to be turned on: this is the default in +Emacs(1). + + There are compatibility issues between Org mode and some other Elisp +packages (see *note Conflicts::). Please take the time to check the +list. + + For a better experience, the three Org commands ‘org-store-link’, +‘org-capture’ and ‘org-agenda’ ought to be accessible anywhere in Emacs, +not just in Org buffers. To that effect, you need to bind them to +globally available keys, like the ones reserved for users (see *note +(elisp)Key Binding Conventions::). Here are suggested bindings, please +modify the keys to your own liking. + + (global-set-key (kbd "C-c l") 'org-store-link) + (global-set-key (kbd "C-c a") 'org-agenda) + (global-set-key (kbd "C-c c") 'org-capture) + + Files with the ‘.org’ extension use Org mode by default. To turn on +Org mode in a file that does not have the extension ‘.org’, make the +first line of a file look like this: + + MY PROJECTS -*- mode: org; -*- + +which selects Org mode for this buffer no matter what the file’s name +is. See also the variable ‘org-insert-mode-line-in-empty-file’. + + Many commands in Org work on the region if the region is _active_. +To make use of this, you need to have ‘transient-mark-mode’ turned on, +which is the default. If you do not like ‘transient-mark-mode’, you can +create an active region by using the mouse to select a region, or +pressing ‘C-’ twice before moving point. + + ---------- Footnotes ---------- + + (1) If you do not use Font Lock globally turn it on in Org buffer +with ‘(add-hook 'org-mode-hook 'turn-on-font-lock)’. + + +File: org, Node: Feedback, Next: Conventions, Prev: Activation, Up: Introduction + +1.4 Feedback +============ + +If you find problems with Org, or if you have questions, remarks, or +ideas about it, please send an email to the Org mailing list +. You can subscribe to the list from this web +page (https://lists.gnu.org/mailman/listinfo/emacs-orgmode). If you are +not a member of the mailing list, your mail will be passed to the list +after a moderator has approved it(1). + + For bug reports, please first try to reproduce the bug with the +latest version of Org available—if you are running an outdated version, +it is quite possible that the bug has been fixed already. If the bug +persists, prepare a report and provide as much information as possible, +including the version information of Emacs (‘M-x emacs-version’) and Org +(‘M-x org-version’), as well as the Org related setup in the Emacs init +file. The easiest way to do this is to use the command + + M-x org-submit-bug-report + +which puts all this information into an Emacs mail buffer so that you +only need to add your description. If you are not sending the Email +from within Emacs, please copy and paste the content into your Email +program. + + Sometimes you might face a problem due to an error in your Emacs or +Org mode setup. Before reporting a bug, it is very helpful to start +Emacs with minimal customizations and reproduce the problem. Doing so +often helps you determine if the problem is with your customization or +with Org mode itself. You can start a typical minimal session with a +command like the example below. + + $ emacs -Q -l /path/to/minimal-org.el + + However if you are using Org mode as distributed with Emacs, a +minimal setup is not necessary. In that case it is sufficient to start +Emacs as ‘emacs -Q’. The ‘minimal-org.el’ setup file can have contents +as shown below. + + ;;; Minimal setup to load latest `org-mode'. + + ;; Activate debugging. + (setq debug-on-error t + debug-on-signal nil + debug-on-quit nil) + + ;; Add latest Org mode to load path. + (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) + (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) + + If an error occurs, a “backtrace” can be very useful—see below on how +to create one. Often a small example file helps, along with clear +information about: + + 1. What exactly did you do? + 2. What did you expect to happen? + 3. What happened instead? + + Thank you for helping to improve this program. + +How to create a useful backtrace +-------------------------------- + +If working with Org produces an error with a message you do not +understand, you may have hit a bug. The best way to report this is by +providing, in addition to what was mentioned above, a backtrace. This +is information from the built-in debugger about where and how the error +occurred. Here is how to produce a useful backtrace: + + 1. Reload uncompiled versions of all Org mode Lisp files. The + backtrace contains much more information if it is produced with + uncompiled code. To do this, use + + C-u M-x org-reload + + or, from the menu: Org → Refresh/Reload → Reload Org uncompiled. + + 2. Then, activate the debugger: + + M-x toggle-debug-or-error + + or, from the menu: Options → Enter Debugger on Error. + + 3. Do whatever you have to do to hit the error. Do not forget to + document the steps you take. + + 4. When you hit the error, a ‘*Backtrace*’ buffer appears on the + screen. Save this buffer to a file—for example using ‘C-x C-w’—and + attach it to your bug report. + + ---------- Footnotes ---------- + + (1) Please consider subscribing to the mailing list in order to +minimize the work the mailing list moderators have to do. + + +File: org, Node: Conventions, Prev: Feedback, Up: Introduction + +1.5 Typesetting Conventions Used in this Manual +=============================================== + +TODO keywords, tags, properties, etc. +------------------------------------- + +Org uses various syntactical elements: TODO keywords, tags, property +names, keywords, blocks, etc. In this manual we use the following +conventions: + +‘TODO’ +‘WAITING’ + TODO keywords are written with all capitals, even if they are + user-defined. + +‘boss’ +‘ARCHIVE’ + Tags are case-sensitive. User-defined tags are written in + lowercase; built-in tags with special meaning are written as they + should appear in the document, usually with all capitals. + +‘Release’ +‘PRIORITY’ + User-defined properties are capitalized; built-in properties with + special meaning are written with all capitals. + +‘TITLE’ +‘BEGIN’ ... ‘END’ + Keywords and blocks are written in uppercase to enhance their + readability, but you can use lowercase in your Org files. + +Key bindings and commands +------------------------- + +The manual lists both the keys and the corresponding commands for +accessing a functionality. Org mode often uses the same key for +different functions, depending on context. The command that is bound to +such keys has a generic name, like ‘org-metaright’. In the manual we +will, wherever possible, give the function that is internally called by +the generic command. For example, in the chapter on document structure, +‘M-’ will be listed to call ‘org-do-demote’, while in the chapter +on tables, it will be listed to call ‘org-table-move-column-right’. + + +File: org, Node: Document Structure, Next: Tables, Prev: Introduction, Up: Top + +2 Document Structure +******************** + +Org is an outliner. Outlines allow a document to be organized in a +hierarchical structure, which, least for me, is the best representation +of notes and thoughts. An overview of this structure is achieved by +folding, i.e., hiding large parts of the document to show only the +general document structure and the parts currently being worked on. Org +greatly simplifies the use of outlines by compressing the entire show +and hide functionalities into a single command, ‘org-cycle’, which is +bound to the ‘’ key. + +* Menu: + +* Headlines:: How to typeset Org tree headlines. +* Visibility Cycling:: Show and hide, much simplified. +* Motion:: Jumping to other headlines. +* Structure Editing:: Changing sequence and level of headlines. +* Sparse Trees:: Matches embedded in context. +* Plain Lists:: Additional structure within an entry. +* Drawers:: Tucking stuff away. +* Blocks:: Folding blocks. +* Creating Footnotes:: How footnotes are defined in Org’s syntax. + + +File: org, Node: Headlines, Next: Visibility Cycling, Up: Document Structure + +2.1 Headlines +============= + +Headlines define the structure of an outline tree. The headlines in Org +start with one or more stars, on the left margin(1). For example: + + * Top level headline + ** Second level + *** Third level + some text + *** Third level + more text + * Another top level headline + + The name defined in ‘org-footnote-section’ is reserved. Do not use +it as a title for your own headings. + + Some people find the many stars too noisy and would prefer an outline +that has whitespace followed by a single star as headline starters. See +*note Clean View::. + + An empty line after the end of a subtree is considered part of it and +is hidden when the subtree is folded. However, if you leave at least +two empty lines, one empty line remains visible after folding the +subtree, in order to structure the collapsed view. See the variable +‘org-cycle-separator-lines’ to modify this behavior. + + ---------- Footnotes ---------- + + (1) See the variables ‘org-special-ctrl-a/e’, ‘org-special-ctrl-k’, +and ‘org-ctrl-k-protect-subtree’ to configure special behavior of ‘C-a’, +‘C-e’, and ‘C-k’ in headlines. Note also that clocking only works with +headings indented less than 30 stars. + + +File: org, Node: Visibility Cycling, Next: Motion, Prev: Headlines, Up: Document Structure + +2.2 Visibility Cycling +====================== + +* Menu: + +* Global and local cycling:: Cycling through various visibility states. +* Initial visibility:: Setting the initial visibility state. +* Catching invisible edits:: Preventing mistakes when editing invisible parts. + + +File: org, Node: Global and local cycling, Next: Initial visibility, Up: Visibility Cycling + +2.2.1 Global and local cycling +------------------------------ + +Outlines make it possible to hide parts of the text in the buffer. Org +uses just two commands, bound to ‘’ and ‘S-’ to change the +visibility in the buffer. + +‘’ (‘org-cycle’) + _Subtree cycling_: Rotate current subtree among the states + + ,-> FOLDED -> CHILDREN -> SUBTREE --. + '-----------------------------------' + + Point must be on a headline for this to work(1). + +‘S-’ (‘org-global-cycle’) +‘C-u ’ + _Global cycling_: Rotate the entire buffer among the states + + ,-> OVERVIEW -> CONTENTS -> SHOW ALL --. + '--------------------------------------' + + When ‘S-’ is called with a numeric prefix argument N, the + CONTENTS view up to headlines of level N are shown. Note that + inside tables (see *note Tables::), ‘S-’ jumps to the previous + field instead. + + You can run global cycling using ‘’ only if point is at the + very beginning of the buffer, but not on a headline, and + ‘org-cycle-global-at-bob’ is set to a non-‘nil’ value. + +‘C-u C-u ’ (‘org-set-startup-visibility’) + Switch back to the startup visibility of the buffer (see *note + Initial visibility::). + +‘C-u C-u C-u ’ (‘outline-show-all’) + Show all, including drawers. + +‘C-c C-r’ (‘org-reveal’) + Reveal context around point, showing the current entry, the + following heading and the hierarchy above. Useful for working near + a location that has been exposed by a sparse tree command (see + *note Sparse Trees::) or an agenda command (see *note Agenda + Commands::). With a prefix argument show, on each level, all + sibling headings. With a double prefix argument, also show the + entire subtree of the parent. + +‘C-c C-k’ (‘outline-show-branches’) + Expose all the headings of the subtree, CONTENTS view for just one + subtree. + +‘C-c ’ (‘outline-show-children’) + Expose all direct children of the subtree. With a numeric prefix + argument N, expose all children down to level N. + +‘C-c C-x b’ (‘org-tree-to-indirect-buffer’) + Show the current subtree in an indirect buffer(2). With a numeric + prefix argument, N, go up to level N and then take that tree. If N + is negative then go up that many levels. With a ‘C-u’ prefix, do + not remove the previously used indirect buffer. + +‘C-c C-x v’ (‘org-copy-visible’) + Copy the _visible_ text in the region into the kill ring. + + ---------- Footnotes ---------- + + (1) See, however, the option ‘org-cycle-emulate-tab’. + + (2) The indirect buffer contains the entire buffer, but is narrowed +to the current tree. Editing the indirect buffer also changes the +original buffer, but without affecting visibility in that buffer. For +more information about indirect buffers, see *note GNU Emacs Manual: +(emacs)Indirect Buffers. + + +File: org, Node: Initial visibility, Next: Catching invisible edits, Prev: Global and local cycling, Up: Visibility Cycling + +2.2.2 Initial visibility +------------------------ + +When Emacs first visits an Org file, the global state is set to +OVERVIEW, i.e., only the top level headlines are visible(1). This can +be configured through the variable ‘org-startup-folded’, or on a +per-file basis by adding one of the following lines anywhere in the +buffer: + + #+STARTUP: overview + #+STARTUP: content + #+STARTUP: showall + #+STARTUP: showeverything + + Furthermore, any entries with a ‘VISIBILITY’ property (see *note +Properties and Columns::) get their visibility adapted accordingly. +Allowed values for this property are ‘folded’, ‘children’, ‘content’, +and ‘all’. + +‘C-u C-u ’ (‘org-set-startup-visibility’) + Switch back to the startup visibility of the buffer, i.e., whatever + is requested by startup options and ‘VISIBILITY’ properties in + individual entries. + + ---------- Footnotes ---------- + + (1) When ‘org-agenda-inhibit-startup’ is non-‘nil’, Org does not +honor the default visibility state when first opening a file for the +agenda (see *note Speeding Up Your Agendas::). + + +File: org, Node: Catching invisible edits, Prev: Initial visibility, Up: Visibility Cycling + +2.2.3 Catching invisible edits +------------------------------ + +Sometimes you may inadvertently edit an invisible part of the buffer and +be confused on what has been edited and how to undo the mistake. +Setting ‘org-catch-invisible-edits’ to non-‘nil’ helps preventing this. +See the docstring of this option on how Org should catch invisible edits +and process them. + + +File: org, Node: Motion, Next: Structure Editing, Prev: Visibility Cycling, Up: Document Structure + +2.3 Motion +========== + +The following commands jump to other headlines in the buffer. + +‘C-c C-n’ (‘org-next-visible-heading’) + Next heading. + +‘C-c C-p’ (‘org-previous-visible-heading’) + Previous heading. + +‘C-c C-f’ (‘org-forward-heading-same-level’) + Next heading same level. + +‘C-c C-b’ (‘org-backward-heading-same-level’) + Previous heading same level. + +‘C-c C-u’ (‘outline-up-heading’) + Backward to higher level heading. + +‘C-c C-j’ (‘org-goto’) + Jump to a different place without changing the current outline + visibility. Shows the document structure in a temporary buffer, + where you can use the following keys to find your destination: + + ‘’ Cycle visibility. + ‘’ / ‘’ Next/previous visible headline. + ‘’ Select this location. + ‘/’ Do a Sparse-tree search + + The following keys work if you turn off ‘org-goto-auto-isearch’ + + ‘n’ / ‘p’ Next/previous visible headline. + ‘f’ / ‘b’ Next/previous headline same level. + ‘u’ One level up. + ‘0’ ... ‘9’ Digit argument. + ‘q’ Quit. + + See also the variable ‘org-goto-interface’. + + +File: org, Node: Structure Editing, Next: Sparse Trees, Prev: Motion, Up: Document Structure + +2.4 Structure Editing +===================== + +‘M-’ (‘org-meta-return’) + Insert a new heading, item or row. + + If the command is used at the _beginning_ of a line, and if there + is a heading or a plain list item (see *note Plain Lists::) at + point, the new heading/item is created _before_ the current line. + When used at the beginning of a regular line of text, turn that + line into a heading. + + When this command is used in the middle of a line, the line is + split and the rest of the line becomes the new item or headline. + If you do not want the line to be split, customize + ‘org-M-RET-may-split-line’. + + Calling the command with a ‘C-u’ prefix unconditionally inserts a + new heading at the end of the current subtree, thus preserving its + contents. With a double ‘C-u C-u’ prefix, the new heading is + created at the end of the parent subtree instead. + +‘C-’ (‘org-insert-heading-respect-content’) + Insert a new heading at the end of the current subtree. + +‘M-S-’ (‘org-insert-todo-heading’) + Insert new TODO entry with same level as current heading. See also + the variable ‘org-treat-insert-todo-heading-as-state-change’. + +‘C-S-’ (‘org-insert-todo-heading-respect-content’) + Insert new TODO entry with same level as current heading. Like + ‘C-’, the new headline is inserted after the current subtree. + +‘’ (‘org-cycle’) + In a new entry with no text yet, the first ‘’ demotes the + entry to become a child of the previous one. The next ‘’ + makes it a parent, and so on, all the way to top level. Yet + another ‘’, and you are back to the initial level. + +‘M-’ (‘org-do-promote’) + Promote current heading by one level. + +‘M-’ (‘org-do-demote’) + Demote current heading by one level. + +‘M-S-’ (‘org-promote-subtree’) + Promote the current subtree by one level. + +‘M-S-’ (‘org-demote-subtree’) + Demote the current subtree by one level. + +‘M-’ (‘org-move-subtree-up’) + Move subtree up, i.e., swap with previous subtree of same level. + +‘M-’ (‘org-move-subtree-down’) + Move subtree down, i.e., swap with next subtree of same level. + +‘C-c @’ (‘org-mark-subtree’) + Mark the subtree at point. Hitting repeatedly marks subsequent + subtrees of the same level as the marked subtree. + +‘C-c C-x C-w’ (‘org-cut-subtree’) + Kill subtree, i.e., remove it from buffer but save in kill ring. + With a numeric prefix argument N, kill N sequential subtrees. + +‘C-c C-x M-w’ (‘org-copy-subtree’) + Copy subtree to kill ring. With a numeric prefix argument N, copy + the N sequential subtrees. + +‘C-c C-x C-y’ (‘org-paste-subtree’) + Yank subtree from kill ring. This does modify the level of the + subtree to make sure the tree fits in nicely at the yank position. + The yank level can also be specified with a numeric prefix + argument, or by yanking after a headline marker like ‘****’. + +‘C-y’ (‘org-yank’) + Depending on the variables ‘org-yank-adjusted-subtrees’ and + ‘org-yank-folded-subtrees’, Org’s internal ‘yank’ command pastes + subtrees folded and in a clever way, using the same command as ‘C-c + C-x C-y’. With the default settings, no level adjustment takes + place, but the yanked tree is folded unless doing so would swallow + text previously visible. Any prefix argument to this command + forces a normal ‘yank’ to be executed, with the prefix passed + along. A good way to force a normal yank is ‘C-u C-y’. If you use + ‘yank-pop’ after a yank, it yanks previous kill items plainly, + without adjustment and folding. + +‘C-c C-x c’ (‘org-clone-subtree-with-time-shift’) + Clone a subtree by making a number of sibling copies of it. You + are prompted for the number of copies to make, and you can also + specify if any timestamps in the entry should be shifted. This can + be useful, for example, to create a number of tasks related to a + series of lectures to prepare. For more details, see the docstring + of the command ‘org-clone-subtree-with-time-shift’. + +‘C-c C-w’ (‘org-refile’) + Refile entry or region to a different location. See *note Refile + and Copy::. + +‘C-c ^’ (‘org-sort’) + Sort same-level entries. When there is an active region, all + entries in the region are sorted. Otherwise the children of the + current headline are sorted. The command prompts for the sorting + method, which can be alphabetically, numerically, by time—first + timestamp with active preferred, creation time, scheduled time, + deadline time—by priority, by TODO keyword—in the sequence the + keywords have been defined in the setup—or by the value of a + property. Reverse sorting is possible as well. You can also + supply your own function to extract the sorting key. With a ‘C-u’ + prefix, sorting is case-sensitive. + +‘C-x n s’ (‘org-narrow-to-subtree’) + Narrow buffer to current subtree. + +‘C-x n b’ (‘org-narrow-to-block’) + Narrow buffer to current block. + +‘C-x n w’ (‘widen’) + Widen buffer to remove narrowing. + +‘C-c *’ (‘org-toggle-heading’) + Turn a normal line or plain list item into a headline—so that it + becomes a subheading at its location. Also turn a headline into a + normal line by removing the stars. If there is an active region, + turn all lines in the region into headlines. If the first line in + the region was an item, turn only the item lines into headlines. + Finally, if the first line is a headline, remove the stars from all + headlines in the region. + + When there is an active region—i.e., when Transient Mark mode is +active—promotion and demotion work on all headlines in the region. To +select a region of headlines, it is best to place both point and mark at +the beginning of a line, mark at the beginning of the first headline, +and point at the line just after the last headline to change. Note that +when point is inside a table (see *note Tables::), the Meta-Cursor keys +have different functionality. + + +File: org, Node: Sparse Trees, Next: Plain Lists, Prev: Structure Editing, Up: Document Structure + +2.5 Sparse Trees +================ + +An important feature of Org mode is the ability to construct _sparse +trees_ for selected information in an outline tree, so that the entire +document is folded as much as possible, but the selected information is +made visible along with the headline structure above it(1). Just try it +out and you will see immediately how it works. + + Org mode contains several commands creating such trees, all these +commands can be accessed through a dispatcher: + +‘C-c /’ (‘org-sparse-tree’) + This prompts for an extra key to select a sparse-tree creating + command. + +‘C-c / r’ or ‘C-c / /’ (‘org-occur’) + Prompts for a regexp and shows a sparse tree with all matches. If + the match is in a headline, the headline is made visible. If the + match is in the body of an entry, headline and body are made + visible. In order to provide minimal context, also the full + hierarchy of headlines above the match is shown, as well as the + headline following the match. Each match is also highlighted; the + highlights disappear when the buffer is changed by an editing + command, or by pressing ‘C-c C-c’(2). When called with a ‘C-u’ + prefix argument, previous highlights are kept, so several calls to + this command can be stacked. + +‘M-g n’ or ‘M-g M-n’ (‘next-error’) + Jump to the next sparse tree match in this buffer. + +‘M-g p’ or ‘M-g M-p’ (‘previous-error’) + Jump to the previous sparse tree match in this buffer. + + For frequently used sparse trees of specific search strings, you can +use the variable ‘org-agenda-custom-commands’ to define fast keyboard +access to specific sparse trees. These commands will then be accessible +through the agenda dispatcher (see *note Agenda Dispatcher::). For +example: + + (setq org-agenda-custom-commands + '(("f" occur-tree "FIXME"))) + +defines the key ‘f’ as a shortcut for creating a sparse tree matching +the string ‘FIXME’. + + The other sparse tree commands select headings based on TODO +keywords, tags, or properties and are discussed later in this manual. + + To print a sparse tree, you can use the Emacs command +‘ps-print-buffer-with-faces’ which does not print invisible parts of the +document. Or you can use the command ‘C-c C-e v’ to export only the +visible part of the document and print the resulting file. + + ---------- Footnotes ---------- + + (1) See also the variable ‘org-show-context-detail’ to decide how +much context is shown around each match. + + (2) This depends on the option ‘org-remove-highlights-with-change’. + + +File: org, Node: Plain Lists, Next: Drawers, Prev: Sparse Trees, Up: Document Structure + +2.6 Plain Lists +=============== + +Within an entry of the outline tree, hand-formatted lists can provide +additional structure. They also provide a way to create lists of +checkboxes (see *note Checkboxes::). Org supports editing such lists, +and every exporter (see *note Exporting::) can parse and format them. + + Org knows ordered lists, unordered lists, and description lists. + + • _Unordered_ list items start with ‘-’, ‘+’, or ‘*’(1) as bullets. + + • _Ordered_ list items start with a numeral followed by either a + period or a right parenthesis(2), such as ‘1.’ or ‘1)’(3) If you + want a list to start with a different value—e.g., 20—start the text + of the item with ‘[@20]’(4). Those constructs can be used in any + item of the list in order to enforce a particular numbering. + + • _Description_ list items are unordered list items, and contain the + separator ‘::’ to distinguish the description _term_ from the + description. + + Items belonging to the same list must have the same indentation on +the first line. In particular, if an ordered list reaches number ‘10.’, +then the 2-digit numbers must be written left-aligned with the other +numbers in the list. An item ends before the next line that is less or +equally indented than its bullet/number. + + A list ends whenever every item has ended, which means before any +line less or equally indented than items at top level. It also ends +before two blank lines. In that case, all items are closed. Here is an +example: + + * Lord of the Rings + My favorite scenes are (in this order) + 1. The attack of the Rohirrim + 2. Eowyn's fight with the witch king + + this was already my favorite scene in the book + + I really like Miranda Otto. + 3. Peter Jackson being shot by Legolas + - on DVD only + He makes a really funny face when it happens. + But in the end, no individual scenes matter but the film as a whole. + Important actors in this film are: + - Elijah Wood :: He plays Frodo + - Sean Astin :: He plays Sam, Frodo's friend. I still remember him + very well from his role as Mikey Walsh in /The Goonies/. + + Org supports these lists by tuning filling and wrapping commands to +deal with them correctly, and by exporting them properly (see *note +Exporting::). Since indentation is what governs the structure of these +lists, many structural constructs like ‘#+BEGIN_’ blocks can be indented +to signal that they belong to a particular item. + + If you find that using a different bullet for a sub-list—than that +used for the current list-level—improves readability, customize the +variable ‘org-list-demote-modify-bullet’. To get a greater difference +of indentation between items and theirs sub-items, customize +‘org-list-indent-offset’. + + The following commands act on items when point is in the first line +of an item—the line with the bullet or number. Some of them imply the +application of automatic rules to keep list structure intact. If some +of these actions get in your way, configure ‘org-list-automatic-rules’ +to disable them individually. + +‘’ (‘org-cycle’) + Items can be folded just like headline levels. Normally this works + only if point is on a plain list item. For more details, see the + variable ‘org-cycle-include-plain-lists’. If this variable is set + to ‘integrate’, plain list items are treated like low-level + headlines. The level of an item is then given by the indentation + of the bullet/number. Items are always subordinate to real + headlines, however; the hierarchies remain completely separated. + In a new item with no text yet, the first ‘’ demotes the item + to become a child of the previous one. Subsequent ‘’s move + the item to meaningful levels in the list and eventually get it + back to its initial position. + +‘M-’ (‘org-insert-heading’) + Insert new item at current level. With a prefix argument, force a + new heading (see *note Structure Editing::). If this command is + used in the middle of an item, that item is _split_ in two, and the + second part becomes the new item(5). If this command is executed + _before item’s body_, the new item is created _before_ the current + one. + +‘M-S-’ + Insert a new item with a checkbox (see *note Checkboxes::). + +‘S-’ +‘S-’ + Jump to the previous/next item in the current list, but only if + ‘org-support-shift-select’ is off(6). If not, you can still use + paragraph jumping commands like ‘C-’ and ‘C-’ to quite + similar effect. + +‘M-’ +‘M-’ + Move the item including subitems up/down(7), i.e., swap with + previous/next item of same indentation. If the list is ordered, + renumbering is automatic. + +‘M-’ +‘M-’ + Decrease/increase the indentation of an item, leaving children + alone. + +‘M-S-’ +‘M-S-’ + Decrease/increase the indentation of the item, including subitems. + Initially, the item tree is selected based on current indentation. + When these commands are executed several times in direct + succession, the initially selected region is used, even if the new + indentation would imply a different hierarchy. To use the new + hierarchy, break the command chain by moving point. + + As a special case, using this command on the very first item of a + list moves the whole list. This behavior can be disabled by + configuring ‘org-list-automatic-rules’. The global indentation of + a list has no influence on the text _after_ the list. + +‘C-c C-c’ + If there is a checkbox (see *note Checkboxes::) in the item line, + toggle the state of the checkbox. In any case, verify bullets and + indentation consistency in the whole list. + +‘C-c -’ + Cycle the entire list level through the different itemize/enumerate + bullets (‘-’, ‘+’, ‘*’, ‘1.’, ‘1)’) or a subset of them, depending + on ‘org-plain-list-ordered-item-terminator’, the type of list, and + its indentation. With a numeric prefix argument N, select the Nth + bullet from this list. If there is an active region when calling + this, selected text is changed into an item. With a prefix + argument, all lines are converted to list items. If the first line + already was a list item, any item marker is removed from the list. + Finally, even without an active region, a normal line is converted + into a list item. + +‘C-c *’ + Turn a plain list item into a headline—so that it becomes a + subheading at its location. See *note Structure Editing::, for a + detailed explanation. + +‘C-c C-*’ + Turn the whole plain list into a subtree of the current heading. + Checkboxes (see *note Checkboxes::) become TODO, respectively DONE, + keywords when unchecked, respectively checked. + +‘S-’ +‘S-’ + This command also cycles bullet styles when point is in on the + bullet or anywhere in an item line, details depending on + ‘org-support-shift-select’. + +‘C-c ^’ + Sort the plain list. Prompt for the sorting method: numerically, + alphabetically, by time, or by custom function. + + ---------- Footnotes ---------- + + (1) When using ‘*’ as a bullet, lines must be indented so that they +are not interpreted as headlines. Also, when you are hiding leading +stars to get a clean outline view, plain list items starting with a star +may be hard to distinguish from true headlines. In short: even though +‘*’ is supported, it may be better to not use it for plain list items. + + (2) You can filter out any of them by configuring +‘org-plain-list-ordered-item-terminator’. + + (3) You can also get ‘a.’, ‘A.’, ‘a)’ and ‘A)’ by configuring +‘org-list-allow-alphabetical’. To minimize confusion with normal text, +those are limited to one character only. Beyond that limit, bullets +automatically become numbers. + + (4) If there’s a checkbox in the item, the cookie must be put +_before_ the checkbox. If you have activated alphabetical lists, you +can also use counters like ‘[@b]’. + + (5) If you do not want the item to be split, customize the variable +‘org-M-RET-may-split-line’. + + (6) If you want to cycle around items that way, you may customize +‘org-list-use-circular-motion’. + + (7) See ‘org-list-use-circular-motion’ for a cyclic behavior. + + +File: org, Node: Drawers, Next: Blocks, Prev: Plain Lists, Up: Document Structure + +2.7 Drawers +=========== + +Sometimes you want to keep information associated with an entry, but you +normally do not want to see it. For this, Org mode has _drawers_. They +can contain anything but a headline and another drawer. Drawers look +like this: + + ** This is a headline + Still outside the drawer + :DRAWERNAME: + This is inside the drawer. + :END: + After the drawer. + + You can interactively insert a drawer at point by calling +‘org-insert-drawer’, which is bound to ‘C-c C-x d’. With an active +region, this command puts the region inside the drawer. With a prefix +argument, this command calls ‘org-insert-property-drawer’, which creates +a ‘PROPERTIES’ drawer right below the current headline. Org mode uses +this special drawer for storing properties (see *note Properties and +Columns::). You cannot use it for anything else. + + Completion over drawer keywords is also possible using ‘M-’(1). + + Visibility cycling (see *note Visibility Cycling::) on the headline +hides and shows the entry, but keep the drawer collapsed to a single +line. In order to look inside the drawer, you need to move point to the +drawer line and press ‘’ there. + + You can also arrange for state change notes (see *note Tracking TODO +state changes::) and clock times (see *note Clocking Work Time::) to be +stored in a ‘LOGBOOK’ drawer. If you want to store a quick note there, +in a similar way to state changes, use + +‘C-c C-z’ + Add a time-stamped note to the ‘LOGBOOK’ drawer. + + ---------- Footnotes ---------- + + (1) Many desktops intercept ‘M-’ to switch windows. Use ‘C-M-i’ +or ‘ ’ instead. + + +File: org, Node: Blocks, Next: Creating Footnotes, Prev: Drawers, Up: Document Structure + +2.8 Blocks +========== + +Org mode uses ‘#+BEGIN’ ... ‘#+END’ blocks for various purposes from +including source code examples (see *note Literal Examples::) to +capturing time logging information (see *note Clocking Work Time::). +These blocks can be folded and unfolded by pressing ‘’ in the +‘#+BEGIN’ line. You can also get all blocks folded at startup by +configuring the variable ‘org-hide-block-startup’ or on a per-file basis +by using + + #+STARTUP: hideblocks + #+STARTUP: nohideblocks + + +File: org, Node: Creating Footnotes, Prev: Blocks, Up: Document Structure + +2.9 Creating Footnotes +====================== + +Org mode supports the creation of footnotes. + + A footnote is started by a footnote marker in square brackets in +column 0, no indentation allowed. It ends at the next footnote +definition, headline, or after two consecutive empty lines. The +footnote reference is simply the marker in square brackets, inside text. +Markers always start with ‘fn:’. For example: + + The Org homepage[fn:1] now looks a lot better than it used to. + ... + [fn:1] The link is: https://orgmode.org + + Org mode extends the number-based syntax to _named_ footnotes and +optional inline definition. Here are the valid references: + +‘[fn:NAME]’ + A named footnote reference, where NAME is a unique label word, or, + for simplicity of automatic creation, a number. + +‘[fn:: This is the inline definition of this footnote]’ + A LaTeX-like anonymous footnote where the definition is given + directly at the reference point. + +‘[fn:NAME: a definition]’ + An inline definition of a footnote, which also specifies a name for + the note. Since Org allows multiple references to the same note, + you can then use ‘[fn:NAME]’ to create additional references. + + Footnote labels can be created automatically, or you can create names +yourself. This is handled by the variable ‘org-footnote-auto-label’ and +its corresponding ‘STARTUP’ keywords. See the docstring of that +variable for details. + + The following command handles footnotes: + +‘C-c C-x f’ + The footnote action command. + + When point is on a footnote reference, jump to the definition. + When it is at a definition, jump to the—first—reference. + + Otherwise, create a new footnote. Depending on the variable + ‘org-footnote-define-inline’(1), the definition is placed right + into the text as part of the reference, or separately into the + location determined by the variable ‘org-footnote-section’. + + When this command is called with a prefix argument, a menu of + additional options is offered: + + ‘s’ Sort the footnote definitions by reference sequence. + ‘r’ Renumber the simple ‘fn:N’ footnotes. + ‘S’ Short for first ‘r’, then ‘s’ action. + ‘n’ Rename all footnotes into a ‘fn:1’ ... ‘fn:n’ sequence. + ‘d’ Delete the footnote at point, including definition and + references. + + Depending on the variable ‘org-footnote-auto-adjust’(2), + renumbering and sorting footnotes can be automatic after each + insertion or deletion. + +‘C-c C-c’ + If point is on a footnote reference, jump to the definition. If it + is at the definition, jump back to the reference. When called at a + footnote location with a prefix argument, offer the same menu as + ‘C-c C-x f’. + +‘C-c C-o’ or ‘mouse-1/2’ + Footnote labels are also links to the corresponding definition or + reference, and you can use the usual commands to follow these + links. + + ---------- Footnotes ---------- + + (1) The corresponding in-buffer setting is: ‘#+STARTUP: fninline’ or +‘#+STARTUP: nofninline’. + + (2) The corresponding in-buffer options are ‘#+STARTUP: fnadjust’ and +‘#+STARTUP: nofnadjust’. + + +File: org, Node: Tables, Next: Hyperlinks, Prev: Document Structure, Up: Top + +3 Tables +******** + +Org comes with a fast and intuitive table editor. Spreadsheet-like +calculations are supported using the Emacs Calc package (see *note GNU +Emacs Calculator Manual: (calc)Top.). + +* Menu: + +* Built-in Table Editor:: Simple tables. +* Column Width and Alignment:: Overrule the automatic settings. +* Column Groups:: Grouping to trigger vertical lines. +* Orgtbl Mode:: The table editor as minor mode. +* The Spreadsheet:: The table editor has spreadsheet capabilities. +* Org Plot:: Plotting from Org tables. + + +File: org, Node: Built-in Table Editor, Next: Column Width and Alignment, Up: Tables + +3.1 Built-in Table Editor +========================= + +Org makes it easy to format tables in plain ASCII. Any line with ‘|’ as +the first non-whitespace character is considered part of a table. ‘|’ +is also the column separator(1). Moreover, a line starting with ‘|-’ is +a horizontal rule. It separates rows explicitely. Rows before the +first horizontal rule are header lines. A table might look like this: + + | Name | Phone | Age | + |-------+-------+-----| + | Peter | 1234 | 17 | + | Anna | 4321 | 25 | + + A table is re-aligned automatically each time you press ‘’, +‘’ or ‘C-c C-c’ inside the table. ‘’ also moves to the next +field—‘’ to the next row—and creates new table rows at the end of +the table or before horizontal lines. The indentation of the table is +set by the first line. Horizontal rules are automatically expanded on +every re-align to span the whole table width. So, to create the above +table, you would only type + + |Name|Phone|Age| + |- + +and then press ‘’ to align the table and start filling in fields. +Even faster would be to type ‘|Name|Phone|Age’ followed by ‘C-c ’. + + When typing text into a field, Org treats ‘DEL’, ‘Backspace’, and all +character keys in a special way, so that inserting and deleting avoids +shifting other fields. Also, when typing _immediately_ after point was +moved into a new field with ‘’, ‘S-’ or ‘’, the field is +automatically made blank. If this behavior is too unpredictable for +you, configure the option ‘org-table-auto-blank-field’. + +Creation and conversion +----------------------- + +‘C-c |’ (‘org-table-create-or-convert-from-region’) + Convert the active region to table. If every line contains at + least one ‘’ character, the function assumes that the material + is tab separated. If every line contains a comma, comma-separated + values (CSV) are assumed. If not, lines are split at whitespace + into fields. You can use a prefix argument to force a specific + separator: ‘C-u’ forces CSV, ‘C-u C-u’ forces ‘’, ‘C-u C-u + C-u’ prompts for a regular expression to match the separator, and a + numeric argument N indicates that at least N consecutive spaces, or + alternatively a ‘’ will be the separator. + + If there is no active region, this command creates an empty Org + table. But it is easier just to start typing, like ‘| N a m e | P + h o n e | A g e | - ’. + +Re-aligning and field motion +---------------------------- + +‘C-c C-c’ (‘org-table-align’) + Re-align the table without moving point. + +‘’ (‘org-table-next-field’) + Re-align the table, move to the next field. Creates a new row if + necessary. + +‘C-c ’ (‘org-table-blank-field’) + Blank the field at point. + +‘S-’ (‘org-table-previous-field’) + Re-align, move to previous field. + +‘’ (‘org-table-next-row’) + Re-align the table and move down to next row. Creates a new row if + necessary. At the beginning or end of a line, ‘’ still + inserts a new line, so it can be used to split a table. + +‘M-a’ (‘org-table-beginning-of-field’) + Move to beginning of the current table field, or on to the previous + field. + +‘M-e’ (‘org-table-end-of-field’) + Move to end of the current table field, or on to the next field. + +Column and row editing +---------------------- + +‘M-’ (‘org-table-move-column-left’) + Move the current column left. + +‘M-’ (‘org-table-move-column-right’) + Move the current column right. + +‘M-S-’ (‘org-table-delete-column’) + Kill the current column. + +‘M-S-’ (‘org-table-insert-column’) + Insert a new column to the left of point position. + +‘M-’ (‘org-table-move-row-up’) + Move the current row up. + +‘M-’ (‘org-table-move-row-down’) + Move the current row down. + +‘M-S-’ (‘org-table-kill-row’) + Kill the current row or horizontal line. + +‘M-S-’ (‘org-table-insert-row’) + Insert a new row above the current row. With a prefix argument, + the line is created below the current one. + +‘C-c -’ (‘org-table-insert-hline’) + Insert a horizontal line below current row. With a prefix + argument, the line is created above the current line. + +‘C-c ’ (‘org-table-hline-and-move’) + Insert a horizontal line below current row, and move point into the + row below that line. + +‘C-c ^’ (‘org-table-sort-lines’) + Sort the table lines in the region. The position of point + indicates the column to be used for sorting, and the range of lines + is the range between the nearest horizontal separator lines, or the + entire table. If point is before the first column, you are + prompted for the sorting column. If there is an active region, the + mark specifies the first line and the sorting column, while point + should be in the last line to be included into the sorting. The + command prompts for the sorting type, alphabetically, numerically, + or by time. You can sort in normal or reverse order. You can also + supply your own key extraction and comparison functions. When + called with a prefix argument, alphabetic sorting is + case-sensitive. + +Regions +------- + +‘C-c C-x M-w’ (‘org-table-copy-region’) + Copy a rectangular region from a table to a special clipboard. + Point and mark determine edge fields of the rectangle. If there is + no active region, copy just the current field. The process ignores + horizontal separator lines. + +‘C-c C-x C-w’ (‘org-table-cut-region’) + Copy a rectangular region from a table to a special clipboard, and + blank all fields in the rectangle. So this is the “cut” operation. + +‘C-c C-x C-y’ (‘org-table-paste-rectangle’) + Paste a rectangular region into a table. The upper left corner + ends up in the current field. All involved fields are overwritten. + If the rectangle does not fit into the present table, the table is + enlarged as needed. The process ignores horizontal separator + lines. + +‘M-’ (‘org-table-wrap-region’) + Split the current field at point position and move the rest to the + line below. If there is an active region, and both point and mark + are in the same column, the text in the column is wrapped to + minimum width for the given number of lines. A numeric prefix + argument may be used to change the number of desired lines. If + there is no region, but you specify a prefix argument, the current + field is made blank, and the content is appended to the field + above. + +Calculations +------------ + +‘C-c +’ (‘org-table-sum’) + Sum the numbers in the current column, or in the rectangle defined + by the active region. The result is shown in the echo area and can + be inserted with ‘C-y’. + +‘S-’ (‘org-table-copy-down’) + When current field is empty, copy from first non-empty field above. + When not empty, copy current field down to next row and move point + along with it. Depending on the variable + ‘org-table-copy-increment’, integer field values can be incremented + during copy. Integers that are too large are not incremented, + however. Also, a ‘0’ prefix argument temporarily disables the + increment. This key is also used by shift-selection and related + modes (see *note Conflicts::). + +Miscellaneous +------------- + +‘C-c `’ (‘org-table-edit-field’) + Edit the current field in a separate window. This is useful for + fields that are not fully visible (see *note Column Width and + Alignment::). When called with a ‘C-u’ prefix, just make the full + field visible, so that it can be edited in place. When called with + two ‘C-u’ prefixes, make the editor window follow point through the + table and always show the current field. The follow mode exits + automatically when point leaves the table, or when you repeat this + command with ‘C-u C-u C-c `’. + +‘M-x org-table-import’ + Import a file as a table. The table should be TAB or whitespace + separated. Use, for example, to import a spreadsheet table or data + from a database, because these programs generally can write + TAB-separated text files. This command works by inserting the file + into the buffer and then converting the region to a table. Any + prefix argument is passed on to the converter, which uses it to + determine the separator. + +‘C-c |’ (‘org-table-create-or-convert-from-region’) + Tables can also be imported by pasting tabular text into the Org + buffer, selecting the pasted text with ‘C-x C-x’ and then using the + ‘C-c |’ command (see *note Creation and conversion::). + +‘M-x org-table-export’ + Export the table, by default as a TAB-separated file. Use for data + exchange with, for example, spreadsheet or database programs. The + format used to export the file can be configured in the variable + ‘org-table-export-default-format’. You may also use properties + ‘TABLE_EXPORT_FILE’ and ‘TABLE_EXPORT_FORMAT’ to specify the file + name and the format for table export in a subtree. Org supports + quite general formats for exported tables. The exporter format is + the same as the format used by Orgtbl radio tables, see *note + Translator functions::, for a detailed description. + + ---------- Footnotes ---------- + + (1) To insert a vertical bar into a table field, use ‘\vert’ or, +inside a word ‘abc\vert{}def’. + + +File: org, Node: Column Width and Alignment, Next: Column Groups, Prev: Built-in Table Editor, Up: Tables + +3.2 Column Width and Alignment +============================== + +The width of columns is automatically determined by the table editor. +The alignment of a column is determined automatically from the fraction +of number-like versus non-number fields in the column. + + Editing a field may modify alignment of the table. Moving a +contiguous row or column—i.e., using ‘’ or ‘’—automatically +re-aligns it. If you want to disable this behavior, set +‘org-table-automatic-realign’ to ‘nil’. In any case, you can always +align manually a table: + +‘C-c C-c’ (‘org-table-align’) + Align the current table. + + Setting the option ‘org-startup-align-all-tables’ re-aligns all +tables in a file upon visiting it. You can also set this option on a +per-file basis with: + + #+STARTUP: align + #+STARTUP: noalign + + Sometimes a single field or a few fields need to carry more text, +leading to inconveniently wide columns. Maybe you want to hide away +several columns or display them with a fixed width, regardless of +content, as shown in the following example. + + |---+---------------------+--------| |---+-------…|…| + | | <6> | | | | <6> …|…| + | 1 | one | some | ----\ | 1 | one …|…| + | 2 | two | boring | ----/ | 2 | two …|…| + | 3 | This is a long text | column | | 3 | This i…|…| + |---+---------------------+--------| |---+-------…|…| + + To set the width of a column, one field anywhere in the column may +contain just the string ‘’ where N specifies the width as a number of +characters. You control displayed width of columns with the following +tools: + +‘C-c ’ (‘org-table-toggle-column-width’) + Shrink or expand current column. + + If a width cookie specifies a width W for the column, shrinking it + displays the first W visible characters only. Otherwise, the + column is shrunk to a single character. + + When called before the first column or after the last one, ask for + a list of column ranges to operate on. + +‘C-u C-c ’ (‘org-table-shrink’) + Shrink all columns with a column width. Expand the others. + +‘C-u C-u C-c ’ (‘org-table-expand’) + Expand all columns. + + To see the full text of a shrunk field, hold the mouse over it: a +tool-tip window then shows the full contents of the field. +Alternatively, ‘C-h .’ (‘display-local-help’) reveals them, too. For +convenience, any change near the shrunk part of a column expands it. + + Setting the option ‘org-startup-shrink-all-tables’ shrinks all +columns containing a width cookie in a file the moment it is visited. +You can also set this option on a per-file basis with: + + #+STARTUP: shrink + + If you would like to overrule the automatic alignment of number-rich +columns to the right and of string-rich columns to the left, you can use +‘’, ‘’ or ‘’ in a similar fashion. You may also combine +alignment and field width like this: ‘’. + + Lines which only contain these formatting cookies are removed +automatically upon exporting the document. + + +File: org, Node: Column Groups, Next: Orgtbl Mode, Prev: Column Width and Alignment, Up: Tables + +3.3 Column Groups +================= + +When Org exports tables, it does so by default without vertical lines +because that is visually more satisfying in general. Occasionally +however, vertical lines can be useful to structure a table into groups +of columns, much like horizontal lines can do for groups of rows. In +order to specify column groups, you can use a special row where the +first field contains only ‘/’. The further fields can either contain +‘<’ to indicate that this column should start a group, ‘>’ to indicate +the end of a column, or ‘<>’ (no space between ‘<’ and ‘>’) to make a +column a group of its own. Upon export, boundaries between column +groups are marked with vertical lines. Here is an example: + + | N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) | + |---+-----+-----+-----+---------+------------| + | / | < | | > | < | > | + | 1 | 1 | 1 | 1 | 1 | 1 | + | 2 | 4 | 8 | 16 | 1.4142 | 1.1892 | + | 3 | 9 | 27 | 81 | 1.7321 | 1.3161 | + |---+-----+-----+-----+---------+------------| + #+TBLFM: $2=$1^2::$3=$1^3::$4=$1^4::$5=sqrt($1)::$6=sqrt(sqrt(($1))) + + It is also sufficient to just insert the column group starters after +every vertical line you would like to have: + + | N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) | + |---+-----+-----+-----+---------+------------| + | / | < | | | < | | + + +File: org, Node: Orgtbl Mode, Next: The Spreadsheet, Prev: Column Groups, Up: Tables + +3.4 The Orgtbl Minor Mode +========================= + +If you like the intuitive way the Org table editor works, you might also +want to use it in other modes like Text mode or Mail mode. The minor +mode Orgtbl mode makes this possible. You can always toggle the mode +with ‘M-x orgtbl-mode’. To turn it on by default, for example in +Message mode, use + + (add-hook 'message-mode-hook 'turn-on-orgtbl) + + Furthermore, with some special setup, it is possible to maintain +tables in arbitrary syntax with Orgtbl mode. For example, it is +possible to construct LaTeX tables with the underlying ease and power of +Orgtbl mode, including spreadsheet capabilities. For details, see *note +Tables in Arbitrary Syntax::. + + +File: org, Node: The Spreadsheet, Next: Org Plot, Prev: Orgtbl Mode, Up: Tables + +3.5 The Spreadsheet +=================== + +The table editor makes use of the Emacs Calc package to implement +spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to +derive fields from other fields. While fully featured, Org’s +implementation is not identical to other spreadsheets. For example, Org +knows the concept of a _column formula_ that will be applied to all +non-header fields in a column without having to copy the formula to each +relevant field. There is also a formula debugger, and a formula editor +with features for highlighting fields in the table corresponding to the +references at point in the formula, moving these references by arrow +keys. + +* Menu: + +* References:: How to refer to another field or range. +* Formula syntax for Calc:: Using Calc to compute stuff. +* Formula syntax for Lisp:: Writing formulas in Emacs Lisp. +* Durations and time values:: How to compute durations and time values. +* Field and range formulas:: Formula for specific (ranges of) fields. +* Column formulas:: Formulas valid for an entire column. +* Lookup functions:: Lookup functions for searching tables. +* Editing and debugging formulas:: Fixing formulas. +* Updating the table:: Recomputing all dependent fields. +* Advanced features:: Field and column names, automatic recalculation... + + +File: org, Node: References, Next: Formula syntax for Calc, Up: The Spreadsheet + +3.5.1 References +---------------- + +To compute fields in the table from other fields, formulas must +reference other fields or ranges. In Org, fields can be referenced by +name, by absolute coordinates, and by relative coordinates. To find out +what the coordinates of a field are, press ‘C-c ?’ in that field, or +press ‘C-c }’ to toggle the display of a grid. + +Field references +................ + +Formulas can reference the value of another field in two ways. Like in +any other spreadsheet, you may reference fields with a letter/number +combination like ‘B3’, meaning the second field in the third row. +However, Org prefers to use another, more general representation that +looks like this:(1) + + @ROW$COLUMN + + Column specifications can be absolute like ‘$1’, ‘$2’, ..., ‘$N’, or +relative to the current column, i.e., the column of the field which is +being computed, like ‘$+1’ or ‘$-2’. ‘$<’ and ‘$>’ are immutable +references to the first and last column, respectively, and you can use +‘$>>>’ to indicate the third column from the right. + + The row specification only counts data lines and ignores horizontal +separator lines, or “hlines”. Like with columns, you can use absolute +row numbers ‘@1’, ‘@2’, ..., ‘@N’, and row numbers relative to the +current row like ‘@+3’ or ‘@-1’. ‘@<’ and ‘@>’ are immutable references +the first and last row in the table, respectively. You may also specify +the row relative to one of the hlines: ‘@I’ refers to the first hline, +‘@II’ to the second, etc. ‘@-I’ refers to the first such line above the +current line, ‘@+I’ to the first such line below the current line. You +can also write ‘@III+2’ which is the second data line after the third +hline in the table. + + ‘@0’ and ‘$0’ refer to the current row and column, respectively, +i.e., to the row/column for the field being computed. Also, if you omit +either the column or the row part of the reference, the current +row/column is implied. + + Org’s references with _unsigned_ numbers are fixed references in the +sense that if you use the same reference in the formula for two +different fields, the same field is referenced each time. Org’s +references with _signed_ numbers are floating references because the +same reference operator can reference different fields depending on the +field being calculated by the formula. + + Here are a few examples: + +‘@2$3’ 2nd row, 3rd column (same as ‘C2’) +‘$5’ column 5 in the current row (same as ‘E&’) +‘@2’ current column, row 2 +‘@-1$-3’ field one row up, three columns to the left +‘@-I$2’ field just under hline above current row, column 2 +‘@>$5’ field in the last row, in column 5 + +Range references +................ + +You may reference a rectangular range of fields by specifying two field +references connected by two dots ‘..’. If both fields are in the +current row, you may simply use ‘$2..$7’, but if at least one field is +in a different row, you need to use the general ‘@ROW$COLUMN’ format at +least for the first field, i.e., the reference must start with ‘@’ in +order to be interpreted correctly. Examples: + +‘$1..$3’ first three fields in the current row +‘$P..$Q’ range, using column names (see + *note Advanced features::) +‘$<<<..$>>’ start in third column, continue to the last but one +‘@2$1..@4$3’ six fields between these two fields (same as ‘A2..C4’) +‘@-1$-2..@-1’ 3 fields in the row above, starting from 2 columns on + the left +‘@I..II’ between first and second hline, short for ‘@I..@II’ + +Range references return a vector of values that can be fed into Calc +vector functions. Empty fields in ranges are normally suppressed, so +that the vector contains only the non-empty fields. For other options +with the mode switches ‘E’, ‘N’ and examples, see *note Formula syntax +for Calc::. + +Field coordinates in formulas +............................. + +One of the very first actions during evaluation of Calc formulas and +Lisp formulas is to substitute ‘@#’ and ‘$#’ in the formula with the row +or column number of the field where the current result will go to. The +traditional Lisp formula equivalents are ‘org-table-current-dline’ and +‘org-table-current-column’. Examples: + +‘if(@# % 2, $#, string(""))’ + Insert column number on odd rows, set field to empty on even rows. + +‘$2 = '(identity remote(FOO, @@#$1))’ + Copy text or values of each row of column 1 of the table named FOO + into column 2 of the current table. + +‘@3 = 2 * remote(FOO, @@1$$#)’ + Insert the doubled value of each column of row 1 of the table named + FOO into row 3 of the current table. + +For the second and third examples, table FOO must have at least as many +rows or columns as the current table. Note that this is inefficient(2) +for large number of rows. + +Named references +................ + +‘$name’ is interpreted as the name of a column, parameter or constant. +Constants are defined globally through the variable +‘org-table-formula-constants’, and locally—for the file—through a line +like this example: + + #+CONSTANTS: c=299792458. pi=3.14 eps=2.4e-6 + + Also, properties (see *note Properties and Columns::) can be used as +constants in table formulas: for a property ‘Xyz’ use the name +‘$PROP_Xyz’, and the property will be searched in the current outline +entry and in the hierarchy above it. If you have the ‘constants.el’ +package, it will also be used to resolve constants, including natural +constants like ‘$h’ for Planck’s constant, and units like ‘$km’ for +kilometers(3). Column names and parameters can be specified in special +table lines. These are described below, see *note Advanced features::. +All names must start with a letter, and further consist of letters and +numbers. + +Remote references +................. + +You may also reference constants, fields and ranges from a different +table, either in the current file or even in a different file. The +syntax is + + remote(NAME,REF) + +where NAME can be the name of a table in the current file as set by a +‘#+NAME:’ line before the table. It can also be the ID of an entry, +even in a different file, and the reference then refers to the first +table in that entry. REF is an absolute field or range reference as +described above for example ‘@3$3’ or ‘$somename’, valid in the +referenced table. + + When NAME has the format ‘@ROW$COLUMN’, it is substituted with the +name or ID found in this field of the current table. For example +‘remote($1, @@>$2)’ ⇒ ‘remote(year_2013, @@>$1)’. The format ‘B3’ is +not supported because it can not be distinguished from a plain table +name or ID. + + ---------- Footnotes ---------- + + (1) Org understands references typed by the user as ‘B4’, but it does +not use this syntax when offering a formula for editing. You can +customize this behavior using the variable +‘org-table-use-standard-references’. + + (2) The computation time scales as O(N^2) because table FOO is parsed +for each field to be copied. + + (3) The file ‘constants.el’ can supply the values of constants in two +different unit systems, ‘SI’ and ‘cgs’. Which one is used depends on +the value of the variable ‘constants-unit-system’. You can use the +‘STARTUP’ options ‘constSI’ and ‘constcgs’ to set this value for the +current buffer. + + +File: org, Node: Formula syntax for Calc, Next: Formula syntax for Lisp, Prev: References, Up: The Spreadsheet + +3.5.2 Formula syntax for Calc +----------------------------- + +A formula can be any algebraic expression understood by the Emacs Calc +package. Note that Calc has the non-standard convention that ‘/’ has +lower precedence than ‘*’, so that ‘a/b*c’ is interpreted as +‘(a/(b*c))’. Before evaluation by ‘calc-eval’ (see *note Calling Calc +from Your Lisp Programs: (calc)Calling Calc from Your Programs.), +variable substitution takes place according to the rules described +above. + + The range vectors can be directly fed into the Calc vector functions +like ‘vmean’ and ‘vsum’. + + A formula can contain an optional mode string after a semicolon. +This string consists of flags to influence Calc and other modes during +execution. By default, Org uses the standard Calc modes (precision 12, +angular units degrees, fraction and symbolic modes off). The display +format, however, has been changed to ‘(float 8)’ to keep tables compact. +The default settings can be configured using the variable +‘org-calc-default-modes’. + +‘p20’ + Set the internal Calc calculation precision to 20 digits. + +‘n3’, ‘s3’, ‘e2’, ‘f4’ + Normal, scientific, engineering or fixed format of the result of + Calc passed back to Org. Calc formatting is unlimited in precision + as long as the Calc calculation precision is greater. + +‘D’, ‘R’ + Degree and radian angle modes of Calc. + +‘F’, ‘S’ + Fraction and symbolic modes of Calc. + +‘T’, ‘t’, ‘U’ + Duration computations in Calc or Lisp, *note Durations and time + values::. + +‘E’ + If and how to consider empty fields. Without ‘E’ empty fields in + range references are suppressed so that the Calc vector or Lisp + list contains only the non-empty fields. With ‘E’ the empty fields + are kept. For empty fields in ranges or empty field references the + value ‘nan’ (not a number) is used in Calc formulas and the empty + string is used for Lisp formulas. Add ‘N’ to use 0 instead for + both formula types. For the value of a field the mode ‘N’ has + higher precedence than ‘E’. + +‘N’ + Interpret all fields as numbers, use 0 for non-numbers. See the + next section to see how this is essential for computations with + Lisp formulas. In Calc formulas it is used only occasionally + because there number strings are already interpreted as numbers + without ‘N’. + +‘L’ + Literal, for Lisp formulas only. See the next section. + + Unless you use large integer numbers or high-precision calculation +and display for floating point numbers you may alternatively provide a +‘printf’ format specifier to reformat the Calc result after it has been +passed back to Org instead of letting Calc already do the formatting(1). +A few examples: + +‘$1+$2’ Sum of first and second field +‘$1+$2;%.2f’ Same, format result to two decimals +‘exp($2)+exp($1)’ Math functions can be used +‘$0;%.1f’ Reformat current cell to 1 decimal +‘($3-32)*5/9’ Degrees F → C conversion +‘$c/$1/$cm’ Hz → cm conversion, using ‘constants.el’ +‘tan($1);Dp3s1’ Compute in degrees, precision 3, display SCI 1 +‘sin($1);Dp3%.1e’ Same, but use ‘printf’ specifier for display +‘vmean($2..$7)’ Compute column range mean, using vector function +‘vmean($2..$7);EN’ Same, but treat empty fields as 0 +‘taylor($3,x=7,2)’ Taylor series of $3, at x=7, second degree + + Calc also contains a complete set of logical operations (see *note +Logical Operations: (calc)Logical Operations.). For example + +‘if($1 < 20, teen, string(""))’ + ‘"teen"’ if age ‘$1’ is less than 20, else the Org table result + field is set to empty with the empty string. + +‘if("$1" =​= "nan" || "$2" =​= "nan", string(""), $1 + $2); E f-1’ + Sum of the first two columns. When at least one of the input + fields is empty the Org table result field is set to empty. ‘E’ is + required to not convert empty fields to 0. ‘f-1’ is an optional + Calc format string similar to ‘%.1f’ but leaves empty results + empty. + +‘if(typeof(vmean($1..$7)) =​= 12, string(""), vmean($1..$7); E’ + Mean value of a range unless there is any empty field. Every field + in the range that is empty is replaced by ‘nan’ which lets ‘vmean’ + result in ‘nan’. Then ‘typeof =’ 12= detects the ‘nan’ from + ‘vmean’ and the Org table result field is set to empty. Use this + when the sample set is expected to never have missing values. + +‘if("$1..$7" =​= "[]", string(""), vmean($1..$7))’ + Mean value of a range with empty fields skipped. Every field in + the range that is empty is skipped. When all fields in the range + are empty the mean value is not defined and the Org table result + field is set to empty. Use this when the sample set can have a + variable size. + +‘vmean($1..$7); EN’ + To complete the example before: Mean value of a range with empty + fields counting as samples with value 0. Use this only when + incomplete sample sets should be padded with 0 to the full size. + + You can add your own Calc functions defined in Emacs Lisp with +‘defmath’ and use them in formula syntax for Calc. + + ---------- Footnotes ---------- + + (1) The printf reformatting is limited in precision because the value +passed to it is converted into an “integer” or “double”. The “integer” +is limited in size by truncating the signed value to 32 bits. The +“double” is limited in precision to 64 bits overall which leaves +approximately 16 significant decimal digits. + + +File: org, Node: Formula syntax for Lisp, Next: Durations and time values, Prev: Formula syntax for Calc, Up: The Spreadsheet + +3.5.3 Emacs Lisp forms as formulas +---------------------------------- + +It is also possible to write a formula in Emacs Lisp. This can be +useful for string manipulation and control structures, if Calc’s +functionality is not enough. + + If a formula starts with a single-quote followed by an opening +parenthesis, then it is evaluated as a Lisp form. The evaluation should +return either a string or a number. Just as with Calc formulas, you can +specify modes and a ‘printf’ format after a semicolon. + + With Emacs Lisp forms, you need to be conscious about the way field +references are interpolated into the form. By default, a reference is +interpolated as a Lisp string (in double-quotes) containing the field. +If you provide the ‘N’ mode switch, all referenced elements are +numbers—non-number fields will be zero—and interpolated as Lisp numbers, +without quotes. If you provide the ‘L’ flag, all fields are +interpolated literally, without quotes. For example, if you want a +reference to be interpreted as a string by the Lisp form, enclose the +reference operator itself in double-quotes, like ‘"$3"’. Ranges are +inserted as space-separated fields, so you can embed them in list or +vector syntax. + + Here are a few examples—note how the ‘N’ mode is used when we do +computations in Lisp: + +‘'(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2))’ + Swap the first two characters of the content of column 1. + +‘'(+ $1 $2);N’ + Add columns 1 and 2, equivalent to Calc’s ‘$1+$2’. + +‘'(apply '+ '($1..$4));N’ + Compute the sum of columns 1 to 4, like Calc’s ‘vsum($1..$4)’. + + +File: org, Node: Durations and time values, Next: Field and range formulas, Prev: Formula syntax for Lisp, Up: The Spreadsheet + +3.5.4 Durations and time values +------------------------------- + +If you want to compute time values use the ‘T’, ‘t’, or ‘U’ flag, either +in Calc formulas or Elisp formulas: + + | Task 1 | Task 2 | Total | + |---------+----------+----------| + | 2:12 | 1:47 | 03:59:00 | + | 2:12 | 1:47 | 03:59 | + | 3:02:20 | -2:07:00 | 0.92 | + #+TBLFM: @2$3=$1+$2;T::@3$3=$1+$2;U::@4$3=$1+$2;t + + Input duration values must be of the form ‘HH:MM[:SS]’, where seconds +are optional. With the ‘T’ flag, computed durations are displayed as +‘HH:MM:SS’ (see the first formula above). With the ‘U’ flag, seconds +are omitted so that the result is only ‘HH:MM’ (see second formula +above). Zero-padding of the hours field depends upon the value of the +variable ‘org-table-duration-hour-zero-padding’. + + With the ‘t’ flag, computed durations are displayed according to the +value of the option ‘org-table-duration-custom-format’, which defaults +to ‘hours’ and displays the result as a fraction of hours (see the third +formula in the example above). + + Negative duration values can be manipulated as well, and integers are +considered as seconds in addition and subtraction. + + +File: org, Node: Field and range formulas, Next: Column formulas, Prev: Durations and time values, Up: The Spreadsheet + +3.5.5 Field and range formulas +------------------------------ + +To assign a formula to a particular field, type it directly into the +field, preceded by ‘:=’, for example ‘vsum(@II..III)’. When you press +‘’ or ‘’ or ‘C-c C-c’ with point still in the field, the +formula is stored as the formula for this field, evaluated, and the +current field is replaced with the result. + + Formulas are stored in a special ‘TBLFM’ keyword located directly +below the table. If you type the equation in the fourth field of the +third data line in the table, the formula looks like ‘@3$4=$1+$2’. When +inserting/deleting/swapping column and rows with the appropriate +commands, _absolute references_ (but not relative ones) in stored +formulas are modified in order to still reference the same field. To +avoid this from happening, in particular in range references, anchor +ranges at the table borders (using ‘@<’, ‘@>’, ‘$<’, ‘$>’), or at hlines +using the ‘@I’ notation. Automatic adaptation of field references does +not happen if you edit the table structure with normal editing +commands—you must fix the formulas yourself. + + Instead of typing an equation into the field, you may also use the +following command + +‘C-u C-c =’ (‘org-table-eval-formula’) + Install a new formula for the current field. The command prompts + for a formula with default taken from the ‘TBLFM’ keyword, applies + it to the current field, and stores it. + + The left-hand side of a formula can also be a special expression in +order to assign the formula to a number of different fields. There is +no keyboard shortcut to enter such range formulas. To add them, use the +formula editor (see *note Editing and debugging formulas::) or edit the +‘TBLFM’ keyword directly. + +‘$2=’ + Column formula, valid for the entire column. This is so common + that Org treats these formulas in a special way, see *note Column + formulas::. + +‘@3=’ + Row formula, applies to all fields in the specified row. ‘@>=’ + means the last row. + +‘@1$2..@4$3=’ + Range formula, applies to all fields in the given rectangular + range. This can also be used to assign a formula to some but not + all fields in a row. + +‘$NAME=’ + Named field, see *note Advanced features::. + + +File: org, Node: Column formulas, Next: Lookup functions, Prev: Field and range formulas, Up: The Spreadsheet + +3.5.6 Column formulas +--------------------- + +When you assign a formula to a simple column reference like ‘$3=’, the +same formula is used in all fields of that column, with the following +very convenient exceptions: (i) If the table contains horizontal +separator hlines with rows above and below, everything before the first +such hline is considered part of the table _header_ and is not modified +by column formulas. Therefore a header is mandatory when you use column +formulas and want to add hlines to group rows, like for example to +separate a total row at the bottom from the summand rows above. (ii) +Fields that already get a value from a field/range formula are left +alone by column formulas. These conditions make column formulas very +easy to use. + + To assign a formula to a column, type it directly into any field in +the column, preceded by an equal sign, like ‘=$1+$2’. When you press +‘’ or ‘’ or ‘C-c C-c’ with point still in the field, the +formula is stored as the formula for the current column, evaluated and +the current field replaced with the result. If the field contains only +‘=’, the previously stored formula for this column is used. For each +column, Org only remembers the most recently used formula. In the +‘TBLFM’ keyword, column formulas look like ‘$4=$1+$2’. The left-hand +side of a column formula can not be the name of column, it must be the +numeric column reference or ‘$>’. + + Instead of typing an equation into the field, you may also use the +following command: + +‘C-c =’ (‘org-table-eval-formula’) + Install a new formula for the current column and replace current + field with the result of the formula. The command prompts for a + formula, with default taken from the ‘TBLFM’ keyword, applies it to + the current field and stores it. With a numeric prefix argument, + e.g., ‘C-5 C-c =’, the command applies it to that many consecutive + fields in the current column. + + +File: org, Node: Lookup functions, Next: Editing and debugging formulas, Prev: Column formulas, Up: The Spreadsheet + +3.5.7 Lookup functions +---------------------- + +Org has three predefined Emacs Lisp functions for lookups in tables. + +‘(org-lookup-first VAL S-LIST R-LIST &optional PREDICATE)’ + Searches for the first element S in list S-LIST for which + (PREDICATE VAL S) + is non-‘nil’; returns the value from the corresponding position in + list R-LIST. The default PREDICATE is ‘equal’. Note that the + parameters VAL and S are passed to PREDICATE in the same order as + the corresponding parameters are in the call to ‘org-lookup-first’, + where VAL precedes S-LIST. If R-LIST is ‘nil’, the matching + element S of S-LIST is returned. + +‘(org-lookup-last VAL S-LIST R-LIST &optional PREDICATE)’ + Similar to ‘org-lookup-first’ above, but searches for the _last_ + element for which PREDICATE is non-‘nil’. + +‘(org-lookup-all VAL S-LIST R-LIST &optional PREDICATE)’ + Similar to ‘org-lookup-first’, but searches for _all_ elements for + which PREDICATE is non-‘nil’, and returns _all_ corresponding + values. This function can not be used by itself in a formula, + because it returns a list of values. However, powerful lookups can + be built when this function is combined with other Emacs Lisp + functions. + + If the ranges used in these functions contain empty fields, the ‘E’ +mode for the formula should usually be specified: otherwise empty fields +are not included in S-LIST and/or R-LIST which can, for example, result +in an incorrect mapping from an element of S-LIST to the corresponding +element of R-LIST. + + These three functions can be used to implement associative arrays, +count matching cells, rank results, group data, etc. For practical +examples see this tutorial on Worg +(https://orgmode.org/worg/org-tutorials/org-lookups.html). + + +File: org, Node: Editing and debugging formulas, Next: Updating the table, Prev: Lookup functions, Up: The Spreadsheet + +3.5.8 Editing and debugging formulas +------------------------------------ + +You can edit individual formulas in the minibuffer or directly in the +field. Org can also prepare a special buffer with all active formulas +of a table. When offering a formula for editing, Org converts +references to the standard format (like ‘B3’ or ‘D&’) if possible. If +you prefer to only work with the internal format (like ‘@3$2’ or ‘$4’), +configure the variable ‘org-table-use-standard-references’. + +‘C-c =’ or ‘C-u C-c =’ (‘org-table-eval-formula’) + Edit the formula associated with the current column/field in the + minibuffer. See *note Column formulas::, and *note Field and range + formulas::. + +‘C-u C-u C-c =’ (‘org-table-eval-formula’) + Re-insert the active formula (either a field formula, or a column + formula) into the current field, so that you can edit it directly + in the field. The advantage over editing in the minibuffer is that + you can use the command ‘C-c ?’. + +‘C-c ?’ (‘org-table-field-info’) + While editing a formula in a table field, highlight the field(s) + referenced by the reference at point position in the formula. + +‘C-c }’ (‘org-table-toggle-coordinate-overlays’) + Toggle the display of row and column numbers for a table, using + overlays. These are updated each time the table is aligned; you + can force it with ‘C-c C-c’. + +‘C-c {’ (‘org-table-toggle-formula-debugger’) + Toggle the formula debugger on and off. See below. + +‘C-c '’ (‘org-table-edit-formulas’) + Edit all formulas for the current table in a special buffer, where + the formulas are displayed one per line. If the current field has + an active formula, point in the formula editor marks it. While + inside the special buffer, Org automatically highlights any field + or range reference at point position. You may edit, remove and add + formulas, and use the following commands: + + ‘C-c C-c’ or ‘C-x C-s’ (‘org-table-fedit-finish’) + Exit the formula editor and store the modified formulas. With + ‘C-u’ prefix, also apply the new formulas to the entire table. + + ‘C-c C-q’ (‘org-table-fedit-abort’) + Exit the formula editor without installing changes. + + ‘C-c C-r’ (‘org-table-fedit-toggle-ref-type’) + Toggle all references in the formula editor between standard + (like ‘B3’) and internal (like ‘@3$2’). + + ‘’ (‘org-table-fedit-lisp-indent’) + Pretty-print or indent Lisp formula at point. When in a line + containing a Lisp formula, format the formula according to + Emacs Lisp rules. Another ‘’ collapses the formula back + again. In the open formula, ‘’ re-indents just like in + Emacs Lisp mode. + + ‘M-’ (‘lisp-complete-symbol’) + Complete Lisp symbols, just like in Emacs Lisp mode. + + ‘S-’, ‘S-’, ‘S-’, ‘S-’ + Shift the reference at point. For example, if the reference + is ‘B3’ and you press ‘S-’, it becomes ‘C3’. This also + works for relative references and for hline references. + + ‘M-S-’ (‘org-table-fedit-line-up’) + Move the test line for column formulas up in the Org buffer. + + ‘M-S-’ (‘org-table-fedit-line-down’) + Move the test line for column formulas down in the Org buffer. + + ‘M-’ (‘org-table-fedit-scroll-up’) + Scroll up the window displaying the table. + + ‘M-’ (‘org-table-fedit-scroll-down’) + Scroll down the window displaying the table. + + ‘C-c }’ + Turn the coordinate grid in the table on and off. + + Making a table field blank does not remove the formula associated +with the field, because that is stored in a different line—the ‘TBLFM’ +keyword line. During the next recalculation, the field will be filled +again. To remove a formula from a field, you have to give an empty +reply when prompted for the formula, or to edit the ‘TBLFM’ keyword. + + You may edit the ‘TBLFM’ keyword directly and re-apply the changed +equations with ‘C-c C-c’ in that line or with the normal recalculation +commands in the table. + +Using multiple ‘TBLFM’ lines +............................ + +You may apply the formula temporarily. This is useful when you want to +switch the formula applied to the table. Place multiple ‘TBLFM’ +keywords right after the table, and then press ‘C-c C-c’ on the formula +to apply. Here is an example: + + | x | y | + |---+---| + | 1 | | + | 2 | | + #+TBLFM: $2=$1*1 + #+TBLFM: $2=$1*2 + +Pressing ‘C-c C-c’ in the line of ‘#+TBLFM: $2=$1*2’ yields: + + | x | y | + |---+---| + | 1 | 2 | + | 2 | 4 | + #+TBLFM: $2=$1*1 + #+TBLFM: $2=$1*2 + +If you recalculate this table, with ‘C-u C-c *’, for example, you get +the following result from applying only the first ‘TBLFM’ keyword. + + | x | y | + |---+---| + | 1 | 1 | + | 2 | 2 | + #+TBLFM: $2=$1*1 + #+TBLFM: $2=$1*2 + +Debugging formulas +.................. + +When the evaluation of a formula leads to an error, the field content +becomes the string ‘#ERROR’. If you would like to see what is going on +during variable substitution and calculation in order to find a bug, +turn on formula debugging in the Tbl menu and repeat the calculation, +for example by pressing ‘C-u C-u C-c = ’ in a field. Detailed +information are displayed. + + +File: org, Node: Updating the table, Next: Advanced features, Prev: Editing and debugging formulas, Up: The Spreadsheet + +3.5.9 Updating the table +------------------------ + +Recalculation of a table is normally not automatic, but needs to be +triggered by a command. To make recalculation at least semi-automatic, +see *note Advanced features::. + + In order to recalculate a line of a table or the entire table, use +the following commands: + +‘C-c *’ (‘org-table-recalculate’) + Recalculate the current row by first applying the stored column + formulas from left to right, and all field/range formulas in the + current row. + +‘C-u C-c *’ or ‘C-u C-c C-c’ + Recompute the entire table, line by line. Any lines before the + first hline are left alone, assuming that these are part of the + table header. + +‘C-u C-u C-c *’ or ‘C-u C-u C-c C-c’ (‘org-table-iterate’) + Iterate the table by recomputing it until no further changes occur. + This may be necessary if some computed fields use the value of + other fields that are computed _later_ in the calculation sequence. + +‘M-x org-table-recalculate-buffer-tables’ + Recompute all tables in the current buffer. + +‘M-x org-table-iterate-buffer-tables’ + Iterate all tables in the current buffer, in order to converge + table-to-table dependencies. + + +File: org, Node: Advanced features, Prev: Updating the table, Up: The Spreadsheet + +3.5.10 Advanced features +------------------------ + +If you want the recalculation of fields to happen automatically, or if +you want to be able to assign _names_(1) to fields and columns, you need +to reserve the first column of the table for special marking characters. + +‘C-#’ (‘org-table-rotate-recalc-marks’) + Rotate the calculation mark in first column through the states ‘#’, + ‘*’, ‘!’, ‘$’. When there is an active region, change all marks in + the region. + + Here is an example of a table that collects exam results of students +and makes use of these features: + + |---+---------+--------+--------+--------+-------+------| + | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note | + |---+---------+--------+--------+--------+-------+------| + | ! | | P1 | P2 | P3 | Tot | | + | # | Maximum | 10 | 15 | 25 | 50 | 10.0 | + | ^ | | m1 | m2 | m3 | mt | | + |---+---------+--------+--------+--------+-------+------| + | # | Peter | 10 | 8 | 23 | 41 | 8.2 | + | # | Sam | 2 | 4 | 3 | 9 | 1.8 | + |---+---------+--------+--------+--------+-------+------| + | | Average | | | | 25.0 | | + | ^ | | | | | at | | + | $ | max=50 | | | | | | + |---+---------+--------+--------+--------+-------+------| + #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f + + Important: Please note that for these special tables, recalculating + the table with ‘C-u C-c *’ only affects rows that are marked ‘#’ or + ‘*’, and fields that have a formula assigned to the field itself. + The column formulas are not applied in rows with empty first field. + + The marking characters have the following meaning: + +‘!’ + The fields in this line define names for the columns, so that you + may refer to a column as ‘$Tot’ instead of ‘$6’. + +‘^’ + This row defines names for the fields _above_ the row. With such a + definition, any formula in the table may use ‘$m1’ to refer to the + value ‘10’. Also, if you assign a formula to a names field, it is + stored as ‘$name = ...’. + +‘_’ + Similar to ‘^’, but defines names for the fields in the row + _below_. + +‘$’ + Fields in this row can define _parameters_ for formulas. For + example, if a field in a ‘$’ row contains ‘max=50’, then formulas + in this table can refer to the value 50 using ‘$max’. Parameters + work exactly like constants, only that they can be defined on a + per-table basis. + +‘#’ + Fields in this row are automatically recalculated when pressing + ‘’ or ‘’ or ‘S-’ in this row. Also, this row is + selected for a global recalculation with ‘C-u C-c *’. Unmarked + lines are left alone by this command. + +‘*’ + Selects this line for global recalculation with ‘C-u C-c *’, but + not for automatic recalculation. Use this when automatic + recalculation slows down editing too much. + +‘/’ + Do not export this line. Useful for lines that contain the + narrowing ‘’ markers or column group markers. + + Finally, just to whet your appetite for what can be done with the +fantastic Calc package, here is a table that computes the Taylor series +of degree n at location x for a couple of functions. + + |---+-------------+---+-----+--------------------------------------| + | | Func | n | x | Result | + |---+-------------+---+-----+--------------------------------------| + | # | exp(x) | 1 | x | 1 + x | + | # | exp(x) | 2 | x | 1 + x + x^2 / 2 | + | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 | + | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 | + | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 | + | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 | + |---+-------------+---+-----+--------------------------------------| + #+TBLFM: $5=taylor($2,$4,$3);n3 + + ---------- Footnotes ---------- + + (1) Such names must start with an alphabetic character and use only +alphanumeric/underscore characters. + + +File: org, Node: Org Plot, Prev: The Spreadsheet, Up: Tables + +3.6 Org Plot +============ + +Org Plot can produce graphs of information stored in Org tables, either +graphically or in ASCII art. + +Graphical plots using Gnuplot +----------------------------- + +Org Plot can produce 2D and 3D graphs of information stored in Org +tables using Gnuplot (http://www.gnuplot.info/) and Gnuplot mode +(http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html). To see +this in action, ensure that you have both Gnuplot and Gnuplot mode +installed on your system, then call ‘C-c " g’ or ‘M-x org-plot/gnuplot’ +on the following table. + + #+PLOT: title:"Citas" ind:1 deps:(3) type:2d with:histograms set:"yrange [0:]" + | Sede | Max cites | H-index | + |-----------+-----------+---------| + | Chile | 257.72 | 21.39 | + | Leeds | 165.77 | 19.68 | + | Sao Paolo | 71.00 | 11.50 | + | Stockholm | 134.19 | 14.33 | + | Morelia | 257.56 | 17.67 | + + Notice that Org Plot is smart enough to apply the table’s headers as +labels. Further control over the labels, type, content, and appearance +of plots can be exercised through the ‘PLOT’ keyword preceding a table. +See below for a complete list of Org Plot options. For more information +and examples see the Org Plot tutorial +(https://orgmode.org/worg/org-tutorials/org-plot.html). + +Plot options +............ + +‘set’ + Specify any Gnuplot option to be set when graphing. + +‘title’ + Specify the title of the plot. + +‘ind’ + Specify which column of the table to use as the ‘x’ axis. + +‘deps’ + Specify the columns to graph as a Lisp style list, surrounded by + parentheses and separated by spaces for example ‘dep:(3 4)’ to + graph the third and fourth columns. Defaults to graphing all other + columns aside from the ‘ind’ column. + +‘type’ + Specify whether the plot is ‘2d’, ‘3d’, or ‘grid’. + +‘with’ + Specify a ‘with’ option to be inserted for every column being + plotted, e.g., ‘lines’, ‘points’, ‘boxes’, ‘impulses’. Defaults to + ‘lines’. + +‘file’ + If you want to plot to a file, specify + ‘"path/to/desired/output-file"’. + +‘labels’ + List of labels to be used for the ‘deps’. Defaults to the column + headers if they exist. + +‘line’ + Specify an entire line to be inserted in the Gnuplot script. + +‘map’ + When plotting ‘3d’ or ‘grid’ types, set this to ‘t’ to graph a flat + mapping rather than a ‘3d’ slope. + +‘timefmt’ + Specify format of Org mode timestamps as they will be parsed by + Gnuplot. Defaults to ‘%Y-%m-%d-%H:%M:%S’. + +‘script’ + If you want total control, you can specify a script file—place the + file name between double-quotes—which will be used to plot. Before + plotting, every instance of ‘$datafile’ in the specified script + will be replaced with the path to the generated data file. Note: + even if you set this option, you may still want to specify the plot + type, as that can impact the content of the data file. + +ASCII bar plots +--------------- + +While point is on a column, typing ‘C-c `` a’ or ‘M-x orgtbl-ascii-plot’ +create a new column containing an ASCII-art bars plot. The plot is +implemented through a regular column formula. When the source column +changes, the bar plot may be updated by refreshing the table, for +example typing ‘C-u C-c *’. + + | Sede | Max cites | | + |---------------+-----------+--------------| + | Chile | 257.72 | WWWWWWWWWWWW | + | Leeds | 165.77 | WWWWWWWh | + | Sao Paolo | 71.00 | WWW; | + | Stockholm | 134.19 | WWWWWW: | + | Morelia | 257.56 | WWWWWWWWWWWH | + | Rochefourchat | 0.00 | | + #+TBLFM: $3='(orgtbl-ascii-draw $2 0.0 257.72 12) + + The formula is an Elisp call. + + -- Function: orgtbl-ascii-draw value min max &optional width + Draw an ASCII bar in a table. + + VALUE is the value to plot. + + MIN is the value displayed as an empty bar. MAX is the value + filling all the WIDTH. Sources values outside this range are + displayed as ‘too small’ or ‘too large’. + + WIDTH is the number of characters of the bar plot. It defaults to + ‘12’. + + +File: org, Node: Hyperlinks, Next: TODO Items, Prev: Tables, Up: Top + +4 Hyperlinks +************ + +Like HTML, Org provides support for links inside a file, external links +to other files, Usenet articles, emails, and much more. + +* Menu: + +* Link Format:: How links in Org are formatted. +* Internal Links:: Links to other places in the current file. +* Radio Targets:: Make targets trigger links in plain text. +* External Links:: URL-like links to the world. +* Handling Links:: Creating, inserting and following. +* Using Links Outside Org:: Linking from my C source code? +* Link Abbreviations:: Shortcuts for writing complex links. +* Search Options:: Linking to a specific location. +* Custom Searches:: When the default search is not enough. + + +File: org, Node: Link Format, Next: Internal Links, Up: Hyperlinks + +4.1 Link Format +=============== + +Org recognizes plain URIs, possibly wrapped within angle brackets(1), +and activate them as clickable links. + + The general link format, however, looks like this: + + [[LINK][DESCRIPTION]] + +or alternatively + + [[LINK]] + + The LINK part cannot contain ‘[’ and ‘]’ characters. You can replace +them with their percent-encoded counterparts, which are, respectively, +‘%5B’ and ‘%5D’. You also need to encode ‘%’ characters as ‘%25’. +Optionally, it may also come handy to encode consecutive spaces as +‘%20’. + + Org takes for granted that such links are correctly escaped. +Luckily, functions inserting links (see *note Handling Links::) take +care of this. You really need to bother about it only when inserting +manually a URI within square brackets. + + Once a link in the buffer is complete, with all brackets present, Org +changes the display so that ‘DESCRIPTION’ is displayed instead of +‘[[LINK][DESCRIPTION]]’ and ‘LINK’ is displayed instead of ‘[[LINK]]’. +Links are highlighted in the ‘org-link’ face, which, by default, is an +underlined face. + + You can directly edit the visible part of a link. This can be either +the LINK part, if there is no description, or the DESCRIPTION part +otherwise. To also edit the invisible LINK part, use ‘C-c C-l’ with +point on the link (see *note Handling Links::). + + If you place point at the beginning or just behind the end of the +displayed text and press ‘’, you remove the—invisible—bracket at +that location(2). This makes the link incomplete and the internals are +again displayed as plain text. Inserting the missing bracket hides the +link internals again. To show the internal structure of all links, use +the menu: Org → Hyperlinks → Literal links. + + ---------- Footnotes ---------- + + (1) Plain URIs are recognized only for a well-defined set of schemes. +See *note External Links::. Unlike URI syntax, they cannot contain +parenthesis or white spaces, either. URIs within angle brackets have no +such limitation. + + (2) More accurately, the precise behavior depends on how point +arrived there—see *note Invisible Text: (elisp)Invisible Text. + + +File: org, Node: Internal Links, Next: Radio Targets, Prev: Link Format, Up: Hyperlinks + +4.2 Internal Links +================== + +If the link does not look like a URL, it is considered to be internal in +the current file. The most important case is a link like +‘[[#my-custom-id]]’ which links to the entry with the ‘CUSTOM_ID’ +property ‘my-custom-id’. You are responsible yourself to make sure +these custom IDs are unique in a file. + + Links such as ‘[[My Target]]’ or ‘[[My Target][Find my target]]’ lead +to a text search in the current file. + + The link can be followed with ‘C-c C-o’ when point is on the link, or +with a mouse click (see *note Handling Links::). Links to custom IDs +point to the corresponding headline. The preferred match for a text +link is a _dedicated target_: the same string in double angular +brackets, like ‘<>’. + + If no dedicated target exists, the link tries to match the exact name +of an element within the buffer. Naming is done with the ‘NAME’ +keyword, which has to be put in the line before the element it refers +to, as in the following example + + #+NAME: My Target + | a | table | + |----+------------| + | of | four cells | + + If none of the above succeeds, Org searches for a headline that is +exactly the link text but may also include a TODO keyword and tags(1). + + During export, internal links are used to mark objects and assign +them a number. Marked objects are then referenced by links pointing to +them. In particular, links without a description appear as the number +assigned to the marked object(2). In the following excerpt from an Org +buffer + + 1. one item + 2. <>another item + Here we refer to item [[target]]. + +The last sentence will appear as ‘Here we refer to item 2’ when +exported. + + In non-Org files, the search looks for the words in the link text. +In the above example the search would be for ‘target’. + + Following a link pushes a mark onto Org’s own mark ring. You can +return to the previous position with ‘C-c &’. Using this command +several times in direct succession goes back to positions recorded +earlier. + + ---------- Footnotes ---------- + + (1) To insert a link targeting a headline, in-buffer completion can +be used. Just type a star followed by a few optional letters into the +buffer and press ‘M-’. All headlines in the current buffer are +offered as completions. + + (2) When targeting a ‘NAME’ keyword, the ‘CAPTION’ keyword is +mandatory in order to get proper numbering (see *note Captions::). + + +File: org, Node: Radio Targets, Next: External Links, Prev: Internal Links, Up: Hyperlinks + +4.3 Radio Targets +================= + +Org can automatically turn any occurrences of certain target names in +normal text into a link. So without explicitly creating a link, the +text connects to the target radioing its position. Radio targets are +enclosed by triple angular brackets. For example, a target ‘<<>>’ causes each occurrence of ‘my target’ in normal text to +become activated as a link. The Org file is scanned automatically for +radio targets only when the file is first loaded into Emacs. To update +the target list during editing, press ‘C-c C-c’ with point on or at a +target. + + +File: org, Node: External Links, Next: Handling Links, Prev: Radio Targets, Up: Hyperlinks + +4.4 External Links +================== + +Org supports links to files, websites, Usenet and email messages, BBDB +database entries and links to both IRC conversations and their logs. +External links are URL-like locators. They start with a short +identifying string followed by a colon. There can be no space after the +colon. The following list shows examples for each link type. + +‘http://www.astro.uva.nl/=dominik’ on the web +‘doi:10.1000/182’ DOI for an electronic resource +‘file:/home/dominik/images/jupiter.jpg’ file, absolute path +‘/home/dominik/images/jupiter.jpg’ same as above +‘file:papers/last.pdf’ file, relative path +‘./papers/last.pdf’ same as above +‘file:/ssh:me@some.where:papers/last.pdf’ file, path on remote machine +‘/ssh:me@some.where:papers/last.pdf’ same as above +‘file:sometextfile::NNN’ file, jump to line number +‘file:projects.org’ another Org file +‘file:projects.org::some words’ text search in Org file(1) +‘file:projects.org::*task title’ heading search in Org file +‘file+sys:/path/to/file’ open via OS, like double-click +‘file+emacs:/path/to/file’ force opening by Emacs +‘docview:papers/last.pdf::NNN’ open in doc-view mode at page +‘id:B7423F4D-2E8A-471B-8810-C40F074717E9’ link to heading by ID +‘news:comp.emacs’ Usenet link +‘mailto:adent@galaxy.net’ mail link +‘mhe:folder’ MH-E folder link +‘mhe:folder#id’ MH-E message link +‘rmail:folder’ Rmail folder link +‘rmail:folder#id’ Rmail message link +‘gnus:group’ Gnus group link +‘gnus:group#id’ Gnus article link +‘bbdb:R.*Stallman’ BBDB link (with regexp) +‘irc:/irc.com/#emacs/bob’ IRC link +‘info:org#External links’ Info node link +‘shell:ls *.org’ shell command +‘elisp:org-agenda’ interactive Elisp command +‘elisp:(find-file "Elisp.org")’ Elisp form to evaluate + + On top of these built-in link types, additional ones are available +through the ‘contrib/’ directory (see *note Installation::). For +example, these links to VM or Wanderlust messages are available when you +load the corresponding libraries from the ‘contrib/’ directory: + +‘vm:folder’ VM folder link +‘vm:folder#id’ VM message link +‘vm://myself@some.where.org/folder#id’ VM on remote machine +‘vm-imap:account:folder’ VM IMAP folder link +‘vm-imap:account:folder#id’ VM IMAP message link +‘wl:folder’ Wanderlust folder link +‘wl:folder#id’ Wanderlust message link + + For information on customizing Org to add new link types, see *note +Adding Hyperlink Types::. + + A link should be enclosed in double brackets and may contain +descriptive text to be displayed instead of the URL (see *note Link +Format::), for example: + + [[http://www.gnu.org/software/emacs/][GNU Emacs]] + + If the description is a file name or URL that points to an image, +HTML export (see *note HTML Export::) inlines the image as a clickable +button. If there is no description at all and the link points to an +image, that image is inlined into the exported HTML file. + + Org also finds external links in the normal text and activates them +as links. If spaces must be part of the link (for example in +‘bbdb:Richard Stallman’), or if you need to remove ambiguities about the +end of the link, enclose the link in square or angular brackets. + + ---------- Footnotes ---------- + + (1) The actual behavior of the search depends on the value of the +variable ‘org-link-search-must-match-exact-headline’. If its value is +‘nil’, then a fuzzy text search is done. If it is ‘t’, then only the +exact headline is matched, ignoring spaces and statistic cookies. If +the value is ‘query-to-create’, then an exact headline is searched; if +it is not found, then the user is queried to create it. + + +File: org, Node: Handling Links, Next: Using Links Outside Org, Prev: External Links, Up: Hyperlinks + +4.5 Handling Links +================== + +Org provides methods to create a link in the correct syntax, to insert +it into an Org file, and to follow the link. + + The main function is ‘org-store-link’, called with ‘M-x +org-store-link’. Because of its importance, we suggest to bind it to a +widely available key (see *note Activation::). It stores a link to the +current location. The link is stored for later insertion into an Org +buffer—see below. The kind of link that is created depends on the +current buffer: + +_Org mode buffers_ + For Org files, if there is a ‘<>’ at point, the link points + to the target. Otherwise it points to the current headline, which + is also the description(1). + + If the headline has a ‘CUSTOM_ID’ property, store a link to this + custom ID. In addition or alternatively, depending on the value of + ‘org-id-link-to-org-use-id’, create and/or use a globally unique + ‘ID’ property for the link(2). So using this command in Org + buffers potentially creates two links: a human-readable link from + the custom ID, and one that is globally unique and works even if + the entry is moved from file to file. Later, when inserting the + link, you need to decide which one to use. + +_Email/News clients: VM, Rmail, Wanderlust, MH-E, Gnus_ + Pretty much all Emacs mail clients are supported. The link points + to the current article, or, in some Gnus buffers, to the group. + The description is constructed according to the variable + ‘org-email-link-description-format’. By default, it refers to the + addressee and the subject, possibly truncated. + +_Web browsers: W3, W3M and EWW_ + Here the link is the current URL, with the page title as the + description. + +_Contacts: BBDB_ + Links created in a BBDB buffer point to the current entry. + +_Chat: IRC_ + For IRC links, if the variable ‘org-irc-link-to-logs’ is non-‘nil’, + create a ‘file’ style link to the relevant point in the logs for + the current conversation. Otherwise store an ‘irc’ style link to + the user/channel/server under the point. + +_Other files_ + For any other file, the link points to the file, with a search + string (see *note Search Options::) pointing to the contents of the + current line. If there is an active region, the selected words + form the basis of the search string. You can write custom Lisp + functions to select the search string and perform the search for + particular file types (see *note Custom Searches::). + + You can also define dedicated links to other files. See *note + Adding Hyperlink Types::. + +_Agenda view_ + When point is in an agenda view, the created link points to the + entry referenced by the current line. + + From an Org buffer, the following commands create, navigate or, more +generally, act on links. + +‘C-c C-l’ (‘org-insert-link’) + Insert a link(3). This prompts for a link to be inserted into the + buffer. You can just type a link, using text for an internal link, + or one of the link type prefixes mentioned in the examples above. + The link is inserted into the buffer, along with a descriptive + text(4). If some text was selected at this time, it becomes the + default description. + + _Inserting stored links_ + All links stored during the current session are part of the + history for this prompt, so you can access them with ‘’ + and ‘’ (or ‘M-p’, ‘M-n’). + + _Completion support_ + Completion with ‘’ helps you to insert valid link + prefixes like ‘http’ or ‘ftp’, including the prefixes defined + through link abbreviations (see *note Link Abbreviations::). + If you press ‘’ after inserting only the prefix, Org + offers specific completion support for some link types(5). + For example, if you type ‘f i l e ’—alternative access: + ‘C-u C-c C-l’, see below—Org offers file name completion, and + after ‘b b d b ’ you can complete contact names. + +‘C-u C-c C-l’ + When ‘C-c C-l’ is called with a ‘C-u’ prefix argument, insert a + link to a file. You may use file name completion to select the + name of the file. The path to the file is inserted relative to the + directory of the current Org file, if the linked file is in the + current directory or in a sub-directory of it, or if the path is + written relative to the current directory using ‘../’. Otherwise + an absolute path is used, if possible with ‘~/’ for your home + directory. You can force an absolute path with two ‘C-u’ prefixes. + +‘C-c C-l’ (with point on existing link) + When point is on an existing link, ‘C-c C-l’ allows you to edit the + link and description parts of the link. + +‘C-c C-o’ (‘org-open-at-point’) + Open link at point. This launches a web browser for URL (using + ‘browse-url-at-point’), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for + the corresponding links, and execute the command in a shell link. + When point is on an internal link, this command runs the + corresponding search. When point is on the tags part of a + headline, it creates the corresponding tags view (see *note + Matching tags and properties::). If point is on a timestamp, it + compiles the agenda for that date. Furthermore, it visits text and + remote files in ‘file’ links with Emacs and select a suitable + application for local non-text files. Classification of files is + based on file extension only. See option ‘org-file-apps’. If you + want to override the default application and visit the file with + Emacs, use a ‘C-u’ prefix. If you want to avoid opening in Emacs, + use a ‘C-u C-u’ prefix. + + If point is on a headline, but not on a link, offer all links in + the headline and entry text. If you want to setup the frame + configuration for following links, customize + ‘org-link-frame-setup’. + +‘’ + When ‘org-return-follows-link’ is set, ‘’ also follows the + link at point. + +‘mouse-2’ or ‘mouse-1’ + On links, ‘mouse-1’ and ‘mouse-2’ opens the link just as ‘C-c C-o’ + does. + +‘mouse-3’ + Like ‘mouse-2’, but force file links to be opened with Emacs, and + internal links to be displayed in another window(6). + +‘C-c %’ (‘org-mark-ring-push’) + Push the current position onto the Org mark ring, to be able to + return easily. Commands following an internal link do this + automatically. + +‘C-c &’ (‘org-mark-ring-goto’) + Jump back to a recorded position. A position is recorded by the + commands following internal links, and by ‘C-c %’. Using this + command several times in direct succession moves through a ring of + previously recorded positions. + +‘C-c C-x C-n’ (‘org-next-link’) +‘C-c C-x C-p’ (‘org-previous-link’) + Move forward/backward to the next link in the buffer. At the limit + of the buffer, the search fails once, and then wraps around. The + key bindings for this are really too long; you might want to bind + this also to ‘M-n’ and ‘M-p’. + + (add-hook 'org-load-hook + (lambda () + (define-key org-mode-map "\M-n" 'org-next-link) + (define-key org-mode-map "\M-p" 'org-previous-link))) + + ---------- Footnotes ---------- + + (1) If the headline contains a timestamp, it is removed from the +link, which results in a wrong link—you should avoid putting a timestamp +in the headline. + + (2) The Org Id library must first be loaded, either through +‘org-customize’, by enabling ‘id’ in ‘org-modules’, or by adding +‘(require 'org-id)’ in your Emacs init file. + + (3) Note that you do not have to use this command to insert a link. +Links in Org are plain text, and you can type or paste them straight +into the buffer. By using this command, the links are automatically +enclosed in double brackets, and you will be asked for the optional +descriptive text. + + (4) After insertion of a stored link, the link will be removed from +the list of stored links. To keep it in the list for later use, use a +triple ‘C-u’ prefix argument to ‘C-c C-l’, or configure the option +‘org-keep-stored-link-after-insertion’. + + (5) This works if a function has been defined in the ‘:complete’ +property of a link in ‘org-link-parameters’. + + (6) See the variable +‘org-display-internal-link-with-indirect-buffer’. + + +File: org, Node: Using Links Outside Org, Next: Link Abbreviations, Prev: Handling Links, Up: Hyperlinks + +4.6 Using Links Outside Org +=========================== + +You can insert and follow links that have Org syntax not only in Org, +but in any Emacs buffer. For this, Org provides two functions: +‘org-insert-link-global’ and ‘org-open-at-point-global’. + + You might want to bind them to globally available keys. See *note +Activation:: for some advice. + + +File: org, Node: Link Abbreviations, Next: Search Options, Prev: Using Links Outside Org, Up: Hyperlinks + +4.7 Link Abbreviations +====================== + +Long URL can be cumbersome to type, and often many similar links are +needed in a document. For this you can use link abbreviations. An +abbreviated link looks like this + + [[linkword:tag][description]] + +where the tag is optional. The _linkword_ must be a word, starting with +a letter, followed by letters, numbers, ‘-’, and ‘_’. Abbreviations are +resolved according to the information in the variable +‘org-link-abbrev-alist’ that relates the linkwords to replacement text. +Here is an example: + + (setq org-link-abbrev-alist + '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=") + ("url-to-ja" . "http://translate.google.fr/translate?sl=en&tl=ja&u=%h") + ("google" . "http://www.google.com/search?q=") + ("gmap" . "http://maps.google.com/maps?q=%s") + ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1") + ("ads" . "https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\""))) + + If the replacement text contains the string ‘%s’, it is replaced with +the tag. Using ‘%h’ instead of ‘%s’ percent-encodes the tag (see the +example above, where we need to encode the URL parameter). Using +‘%(my-function)’ passes the tag to a custom Lisp function, and replace +it by the resulting string. + + If the replacement text do not contain any specifier, it is simply +appended to the string in order to create the link. + + Instead of a string, you may also specify a Lisp function to create +the link. Such a function will be called with the tag as the only +argument. + + With the above setting, you could link to a specific bug with +‘[[bugzilla:129]]’, search the web for ‘OrgMode’ with +‘[[google:OrgMode]]’, show the map location of the Free Software +Foundation ‘[[gmap:51 Franklin Street, Boston]]’ or of Carsten office +‘[[omap:Science Park 904, Amsterdam, The Netherlands]]’ and find out +what the Org author is doing besides Emacs hacking with +‘[[ads:Dominik,C]]’. + + If you need special abbreviations just for a single Org buffer, you +can define them in the file with + + #+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= + #+LINK: google http://www.google.com/search?q=%s + + In-buffer completion (see *note Completion::) can be used after ‘[’ +to complete link abbreviations. You may also define a Lisp function +that implements special (e.g., completion) support for inserting such a +link with ‘C-c C-l’. Such a function should not accept any arguments, +and should return the full link with a prefix. You can set the link +completion function like this: + + (org-link-set-parameter "type" :complete #'some-completion-function) + + +File: org, Node: Search Options, Next: Custom Searches, Prev: Link Abbreviations, Up: Hyperlinks + +4.8 Search Options in File Links +================================ + +File links can contain additional information to make Emacs jump to a +particular location in the file when following a link. This can be a +line number or a search option after a double colon(1). For example, +when the command ‘org-store-link’ creates a link (see *note Handling +Links::) to a file, it encodes the words in the current line as a search +string that can be used to find this line back later when following the +link with ‘C-c C-o’. + + Here is the syntax of the different ways to attach a search to a file +link, together with explanations for each: + + [[file:~/code/main.c::255]] + [[file:~/xx.org::My Target]] + [[file:~/xx.org::*My Target]] + [[file:~/xx.org::#my-custom-id]] + [[file:~/xx.org::/regexp/]] + +‘255’ + Jump to line 255. + +‘My Target’ + Search for a link target ‘<>’, or do a text search for + ‘my target’, similar to the search in internal links, see *note + Internal Links::. In HTML export (see *note HTML Export::), such a + file link becomes a HTML reference to the corresponding named + anchor in the linked file. + +‘*My Target’ + In an Org file, restrict search to headlines. + +‘#my-custom-id’ + Link to a heading with a ‘CUSTOM_ID’ property + +‘/REGEXP/’ + Do a regular expression search for REGEXP. This uses the Emacs + command ‘occur’ to list all matches in a separate window. If the + target file is in Org mode, ‘org-occur’ is used to create a sparse + tree with the matches. + + As a degenerate case, a file link with an empty file name can be used +to search the current file. For example, ‘[[file:::find me]]’ does a +search for ‘find me’ in the current file, just as ‘[[find me]]’ would. + + ---------- Footnotes ---------- + + (1) For backward compatibility, line numbers can also follow a single +colon. + + +File: org, Node: Custom Searches, Prev: Search Options, Up: Hyperlinks + +4.9 Custom Searches +=================== + +The default mechanism for creating search strings and for doing the +actual search related to a file link may not work correctly in all +cases. For example, BibTeX database files have many entries like +‘year="1993"’ which would not result in good search strings, because the +only unique identification for a BibTeX entry is the citation key. + + If you come across such a problem, you can write custom functions to +set the right search string for a particular file type, and to do the +search for the string in the file. Using ‘add-hook’, these functions +need to be added to the hook variables +‘org-create-file-search-functions’ and +‘org-execute-file-search-functions’. See the docstring for these +variables for more information. Org actually uses this mechanism for +BibTeX database files, and you can use the corresponding code as an +implementation example. See the file ‘org-bibtex.el’. + + +File: org, Node: TODO Items, Next: Tags, Prev: Hyperlinks, Up: Top + +5 TODO Items +************ + +Org mode does not maintain TODO lists as separate documents(1). +Instead, TODO items are an integral part of the notes file, because TODO +items usually come up while taking notes! With Org mode, simply mark +any entry in a tree as being a TODO item. In this way, information is +not duplicated, and the entire context from which the TODO item emerged +is always present. + + Of course, this technique for managing TODO items scatters them +throughout your notes file. Org mode compensates for this by providing +methods to give you an overview of all the things that you have to do. + +* Menu: + +* TODO Basics:: Marking and displaying TODO entries. +* TODO Extensions:: Workflow and assignments. +* Progress Logging:: Dates and notes for progress. +* Priorities:: Some things are more important than others. +* Breaking Down Tasks:: Splitting a task into manageable pieces. +* Checkboxes:: Tick-off lists. + + ---------- Footnotes ---------- + + (1) Of course, you can make a document that contains only long lists +of TODO items, but this is not required. + + +File: org, Node: TODO Basics, Next: TODO Extensions, Up: TODO Items + +5.1 Basic TODO Functionality +============================ + +Any headline becomes a TODO item when it starts with the word ‘TODO’, +for example: + + *** TODO Write letter to Sam Fortune + + The most important commands to work with TODO entries are: + +‘C-c C-t’ (‘org-todo’) + Rotate the TODO state of the current item among + + ,-> (unmarked) -> TODO -> DONE --. + '--------------------------------' + + If TODO keywords have fast access keys (see *note Fast access to + TODO states::), prompt for a TODO keyword through the fast + selection interface; this is the default behavior when + ‘org-use-fast-todo-selection’ is non-‘nil’. + + The same rotation can also be done “remotely” from the agenda + buffer with the ‘t’ command key (see *note Agenda Commands::). + +‘C-u C-c C-t’ + When TODO keywords have no selection keys, select a specific + keyword using completion; otherwise force cycling through TODO + states with no prompt. When ‘org-use-fast-todo-selection’ is set + to ‘prefix’, use the fast selection interface. + +‘S-’ ‘S-’ + Select the following/preceding TODO state, similar to cycling. + Useful mostly if more than two TODO states are possible (see *note + TODO Extensions::). See also *note Conflicts::, for a discussion + of the interaction with ‘shift-selection-mode’. See also the + variable ‘org-treat-S-cursor-todo-selection-as-state-change’. + +‘C-c / t’ (‘org-show-todo-tree’) + View TODO items in a _sparse tree_ (see *note Sparse Trees::). + Folds the entire buffer, but shows all TODO items—with not-DONE + state—and the headings hierarchy above them. With a prefix + argument, or by using ‘C-c / T’, search for a specific TODO. You + are prompted for the keyword, and you can also give a list of + keywords like ‘KWD1|KWD2|...’ to list entries that match any one of + these keywords. With a numeric prefix argument N, show the tree + for the Nth keyword in the variable ‘org-todo-keywords’. With two + prefix arguments, find all TODO states, both un-done and done. + +‘M-x org-agenda t’ (‘org-todo-list’) + Show the global TODO list. Collects the TODO items (with not-DONE + states) from all agenda files (see *note Agenda Views::) into a + single buffer. The new buffer is in Org Agenda mode, which + provides commands to examine and manipulate the TODO entries from + the new buffer (see *note Agenda Commands::). See *note Global + TODO list::, for more information. + +‘S-M-’ (‘org-insert-todo-heading’) + Insert a new TODO entry below the current one. + + Changing a TODO state can also trigger tag changes. See the +docstring of the option ‘org-todo-state-tags-triggers’ for details. + + +File: org, Node: TODO Extensions, Next: Progress Logging, Prev: TODO Basics, Up: TODO Items + +5.2 Extended Use of TODO Keywords +================================= + +By default, marked TODO entries have one of only two states: TODO and +DONE. Org mode allows you to classify TODO items in more complex ways +with _TODO keywords_ (stored in ‘org-todo-keywords’). With special +setup, the TODO keyword system can work differently in different files. + + Note that _tags_ are another way to classify headlines in general and +TODO items in particular (see *note Tags::). + +* Menu: + +* Workflow states:: From TODO to DONE in steps. +* TODO types:: I do this, Fred does the rest. +* Multiple sets in one file:: Mixing it all, still finding your way. +* Fast access to TODO states:: Single letter selection of state. +* Per-file keywords:: Different files, different requirements. +* Faces for TODO keywords:: Highlighting states. +* TODO dependencies:: When one task needs to wait for others. + + +File: org, Node: Workflow states, Next: TODO types, Up: TODO Extensions + +5.2.1 TODO keywords as workflow states +-------------------------------------- + +You can use TODO keywords to indicate different _sequential_ states in +the process of working on an item, for example(1): + + (setq org-todo-keywords + '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED"))) + + The vertical bar separates the TODO keywords (states that _need +action_) from the DONE states (which need _no further action_). If you +do not provide the separator bar, the last state is used as the DONE +state. + + With this setup, the command ‘C-c C-t’ cycles an entry from ‘TODO’ to +‘FEEDBACK’, then to ‘VERIFY’, and finally to ‘DONE’ and ‘DELEGATED’. +You may also use a numeric prefix argument to quickly select a specific +state. For example ‘C-3 C-c C-t’ changes the state immediately to +‘VERIFY’. Or you can use ‘S-’ to go backward through the +sequence. If you define many keywords, you can use in-buffer completion +(see *note Completion::) or even a special one-key selection scheme (see +*note Fast access to TODO states::) to insert these words into the +buffer. Changing a TODO state can be logged with a timestamp, see *note +Tracking TODO state changes::, for more information. + + ---------- Footnotes ---------- + + (1) Changing the variable ‘org-todo-keywords’ only becomes effective +after restarting Org mode in a buffer. + + +File: org, Node: TODO types, Next: Multiple sets in one file, Prev: Workflow states, Up: TODO Extensions + +5.2.2 TODO keywords as types +---------------------------- + +The second possibility is to use TODO keywords to indicate different +_types_ of action items. For example, you might want to indicate that +items are for “work” or “home”. Or, when you work with several people +on a single project, you might want to assign action items directly to +persons, by using their names as TODO keywords. This would be set up +like this: + + (setq org-todo-keywords '((type "Fred" "Sara" "Lucy" "|" "DONE"))) + + In this case, different keywords do not indicate a sequence, but +rather different types. So the normal work flow would be to assign a +task to a person, and later to mark it DONE. Org mode supports this +style by adapting the workings of the command ‘C-c C-t’(1). When used +several times in succession, it still cycles through all names, in order +to first select the right type for a task. But when you return to the +item after some time and execute ‘C-c C-t’ again, it will switch from +any name directly to ‘DONE’. Use prefix arguments or completion to +quickly select a specific name. You can also review the items of a +specific TODO type in a sparse tree by using a numeric prefix to ‘C-c / +t’. For example, to see all things Lucy has to do, you would use ‘C-3 +C-c / t’. To collect Lucy’s items from all agenda files into a single +buffer, you would use the numeric prefix argument as well when creating +the global TODO list: ‘C-3 M-x org-agenda t’. + + ---------- Footnotes ---------- + + (1) This is also true for the ‘t’ command in the agenda buffer. + + +File: org, Node: Multiple sets in one file, Next: Fast access to TODO states, Prev: TODO types, Up: TODO Extensions + +5.2.3 Multiple keyword sets in one file +--------------------------------------- + +Sometimes you may want to use different sets of TODO keywords in +parallel. For example, you may want to have the basic TODO/DONE, but +also a workflow for bug fixing, and a separate state indicating that an +item has been canceled—so it is not DONE, but also does not require +action. Your setup would then look like this: + + (setq org-todo-keywords + '((sequence "TODO" "|" "DONE") + (sequence "REPORT" "BUG" "KNOWNCAUSE" "|" "FIXED") + (sequence "|" "CANCELED"))) + + The keywords should all be different, this helps Org mode keep track +of which subsequence should be used for a given entry. In this setup, +‘C-c C-t’ only operates within a sub-sequence, so it switches from +‘DONE’ to (nothing) to ‘TODO’, and from ‘FIXED’ to (nothing) to +‘REPORT’. Therefore you need a mechanism to initially select the +correct sequence. In addition to typing a keyword or using completion +(see *note Completion::), you may also apply the following commands: + +‘C-u C-u C-c C-t’ +‘C-S-’ +‘C-S-’ + These keys jump from one TODO sub-sequence to the next. In the + above example, ‘C-u C-u C-c C-t’ or ‘C-S-’ would jump from + ‘TODO’ or ‘DONE’ to ‘REPORT’, and any of the words in the second + row to ‘CANCELED’. Note that the ‘C-S-’ key binding conflict with + ‘shift-selection-mode’ (see *note Conflicts::). + +‘S-’ +‘S-’ + ‘S-’ and ‘S-’ walk through _all_ keywords from all + sub-sequences, so for example ‘S-’ would switch from ‘DONE’ + to ‘REPORT’ in the example above. For a discussion of the + interaction with ‘shift-selection-mode’, see *note Conflicts::. + + +File: org, Node: Fast access to TODO states, Next: Per-file keywords, Prev: Multiple sets in one file, Up: TODO Extensions + +5.2.4 Fast access to TODO states +-------------------------------- + +If you would like to quickly change an entry to an arbitrary TODO state +instead of cycling through the states, you can set up keys for +single-letter access to the states. This is done by adding the +selection character after each keyword, in parentheses(1). For example: + + (setq org-todo-keywords + '((sequence "TODO(t)" "|" "DONE(d)") + (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)") + (sequence "|" "CANCELED(c)"))) + + If you then press ‘C-c C-t’ followed by the selection key, the entry +is switched to this state. ‘’ can be used to remove any TODO +keyword from an entry(2). + + ---------- Footnotes ---------- + + (1) All characters are allowed except ‘@’, ‘^’ and ‘!’, which have a +special meaning here. + + (2) Check also the variable ‘org-fast-tag-selection-include-todo’, it +allows you to change the TODO state through the tags interface (see +*note Setting Tags::), in case you like to mingle the two concepts. +Note that this means you need to come up with unique keys across both +sets of keywords. + + +File: org, Node: Per-file keywords, Next: Faces for TODO keywords, Prev: Fast access to TODO states, Up: TODO Extensions + +5.2.5 Setting up keywords for individual files +---------------------------------------------- + +It can be very useful to use different aspects of the TODO mechanism in +different files. For file-local settings, you need to add special lines +to the file which set the keywords and interpretation for that file +only. For example, to set one of the two examples discussed above, you +need one of the following lines, starting in column zero anywhere in the +file: + + #+TODO: TODO FEEDBACK VERIFY | DONE CANCELED + + You may also write ‘#+SEQ_TODO’ to be explicit about the +interpretation, but it means the same as ‘#+TODO’, or + + #+TYP_TODO: Fred Sara Lucy Mike | DONE + + A setup for using several sets in parallel would be: + + #+TODO: TODO | DONE + #+TODO: REPORT BUG KNOWNCAUSE | FIXED + #+TODO: | CANCELED + + To make sure you are using the correct keyword, type ‘#+’ into the +buffer and then use ‘M-’ to complete it (see *note Completion::). + + Remember that the keywords after the vertical bar—or the last keyword +if no bar is there—must always mean that the item is DONE, although you +may use a different word. After changing one of these lines, use ‘C-c +C-c’ with point still in the line to make the changes known to Org +mode(1). + + ---------- Footnotes ---------- + + (1) Org mode parses these lines only when Org mode is activated after +visiting a file. ‘C-c C-c’ with point in a line starting with ‘#+’ is +simply restarting Org mode for the current buffer. + + +File: org, Node: Faces for TODO keywords, Next: TODO dependencies, Prev: Per-file keywords, Up: TODO Extensions + +5.2.6 Faces for TODO keywords +----------------------------- + +Org mode highlights TODO keywords with special faces: ‘org-todo’ for +keywords indicating that an item still has to be acted upon, and +‘org-done’ for keywords indicating that an item is finished. If you are +using more than two different states, you might want to use special +faces for some of them. This can be done using the variable +‘org-todo-keyword-faces’. For example: + + (setq org-todo-keyword-faces + '(("TODO" . org-warning) ("STARTED" . "yellow") + ("CANCELED" . (:foreground "blue" :weight bold)))) + + While using a list with face properties as shown for ‘CANCELED’ +_should_ work, this does not always seem to be the case. If necessary, +define a special face and use that. A string is interpreted as a color. +The variable ‘org-faces-easy-properties’ determines if that color is +interpreted as a foreground or a background color. + + +File: org, Node: TODO dependencies, Prev: Faces for TODO keywords, Up: TODO Extensions + +5.2.7 TODO dependencies +----------------------- + +The structure of Org files—hierarchy and lists—makes it easy to define +TODO dependencies. Usually, a parent TODO task should not be marked +DONE until all TODO subtasks, or children tasks, are marked as DONE. +Sometimes there is a logical sequence to (sub)tasks, so that one subtask +cannot be acted upon before all siblings above it have been marked DONE. +If you customize the variable ‘org-enforce-todo-dependencies’, Org +blocks entries from changing state to DONE while they have TODO children +that are not DONE. Furthermore, if an entry has a property ‘ORDERED’, +each of its TODO children is blocked until all earlier siblings are +marked DONE. Here is an example: + + * TODO Blocked until (two) is done + ** DONE one + ** TODO two + + * Parent + :PROPERTIES: + :ORDERED: t + :END: + ** TODO a + ** TODO b, needs to wait for (a) + ** TODO c, needs to wait for (a) and (b) + + You can ensure an entry is never blocked by using the ‘NOBLOCKING’ +property (see *note Properties and Columns::): + + * This entry is never blocked + :PROPERTIES: + :NOBLOCKING: t + :END: + +‘C-c C-x o’ (‘org-toggle-ordered-property’) + Toggle the ‘ORDERED’ property of the current entry. A property is + used for this behavior because this should be local to the current + entry, not inherited from entries above like a tag (see *note + Tags::). However, if you would like to _track_ the value of this + property with a tag for better visibility, customize the variable + ‘org-track-ordered-property-with-tag’. + +‘C-u C-u C-u C-c C-t’ + Change TODO state, regardless of any state blocking. + + If you set the variable ‘org-agenda-dim-blocked-tasks’, TODO entries +that cannot be marked DONE because of unmarked children are shown in a +dimmed font or even made invisible in agenda views (see *note Agenda +Views::). + + You can also block changes of TODO states by using checkboxes (see +*note Checkboxes::). If you set the variable +‘org-enforce-todo-checkbox-dependencies’, an entry that has unchecked +checkboxes is blocked from switching to DONE. + + If you need more complex dependency structures, for example +dependencies between entries in different trees or files, check out the +contributed module ‘org-depend.el’. + + +File: org, Node: Progress Logging, Next: Priorities, Prev: TODO Extensions, Up: TODO Items + +5.3 Progress Logging +==================== + +Org mode can automatically record a timestamp and optionally a note when +you mark a TODO item as DONE, or even each time you change the state of +a TODO item. This system is highly configurable, settings can be on a +per-keyword basis and can be localized to a file or even a subtree. For +information on how to clock working time for a task, see *note Clocking +Work Time::. + +* Menu: + +* Closing items:: When was this entry marked DONE? +* Tracking TODO state changes:: When did the status change? +* Tracking your habits:: How consistent have you been? + + +File: org, Node: Closing items, Next: Tracking TODO state changes, Up: Progress Logging + +5.3.1 Closing items +------------------- + +The most basic logging is to keep track of _when_ a certain TODO item +was marked DONE. This can be achieved with(1) + + (setq org-log-done 'time) + +Then each time you turn an entry from a TODO (not-done) state into any +of the DONE states, a line ‘CLOSED: [timestamp]’ is inserted just after +the headline. If you turn the entry back into a TODO item through +further state cycling, that line is removed again. If you turn the +entry back to a non-TODO state (by pressing ‘C-c C-t ’ for +example), that line is also removed, unless you set +‘org-closed-keep-when-no-todo’ to non-‘nil’. If you want to record a +note along with the timestamp, use(2) + + (setq org-log-done 'note) + +You are then be prompted for a note, and that note is stored below the +entry with a ‘Closing Note’ heading. + + ---------- Footnotes ---------- + + (1) The corresponding in-buffer setting is: ‘#+STARTUP: logdone’. + + (2) The corresponding in-buffer setting is: ‘#+STARTUP: lognotedone’. + + +File: org, Node: Tracking TODO state changes, Next: Tracking your habits, Prev: Closing items, Up: Progress Logging + +5.3.2 Tracking TODO state changes +--------------------------------- + +When TODO keywords are used as workflow states (see *note *Workflow +states: Workflow states.), you might want to keep track of when a state +change occurred and maybe take a note about this change. You can either +record just a timestamp, or a time-stamped note. These records are +inserted after the headline as an itemized list, newest first(1). When +taking a lot of notes, you might want to get the notes out of the way +into a drawer (see *note Drawers::). Customize the variable +‘org-log-into-drawer’ to get this behavior—the recommended drawer for +this is called ‘LOGBOOK’(2). You can also overrule the setting of this +variable for a subtree by setting a ‘LOG_INTO_DRAWER’ property. + + Since it is normally too much to record a note for every state, Org +mode expects configuration on a per-keyword basis for this. This is +achieved by adding special markers ‘!’ (for a timestamp) or ‘@’ (for a +note with timestamp) in parentheses after each keyword. For example, +with the setting + + (setq org-todo-keywords + '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) + +to record a timestamp without a note for TODO keywords configured with +‘@’, just type ‘C-c C-c’ to enter a blank note when prompted. + + You not only define global TODO keywords and fast access keys, but +also request that a time is recorded when the entry is set to ‘DONE’, +and that a note is recorded when switching to ‘WAIT’ or ‘CANCELED’(3). +The setting for ‘WAIT’ is even more special: the ‘!’ after the slash +means that in addition to the note taken when entering the state, a +timestamp should be recorded when _leaving_ the ‘WAIT’ state, if and +only if the _target_ state does not configure logging for entering it. +So it has no effect when switching from ‘WAIT’ to ‘DONE’, because ‘DONE’ +is configured to record a timestamp only. But when switching from +‘WAIT’ back to ‘TODO’, the ‘/!’ in the ‘WAIT’ setting now triggers a +timestamp even though ‘TODO’ has no logging configured. + + You can use the exact same syntax for setting logging preferences +local to a buffer: + + #+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@) + + In order to define logging settings that are local to a subtree or a +single item, define a ‘LOGGING’ property in this entry. Any non-empty +‘LOGGING’ property resets all logging settings to ‘nil’. You may then +turn on logging for this specific tree using ‘STARTUP’ keywords like +‘lognotedone’ or ‘logrepeat’, as well as adding state specific settings +like ‘TODO(!)’. For example: + + * TODO Log each state with only a time + :PROPERTIES: + :LOGGING: TODO(!) WAIT(!) DONE(!) CANCELED(!) + :END: + * TODO Only log when switching to WAIT, and when repeating + :PROPERTIES: + :LOGGING: WAIT(@) logrepeat + :END: + * TODO No logging at all + :PROPERTIES: + :LOGGING: nil + :END: + + ---------- Footnotes ---------- + + (1) See the variable ‘org-log-states-order-reversed’. + + (2) Note that the ‘LOGBOOK’ drawer is unfolded when pressing ‘’ +in the agenda to show an entry—use ‘C-u ’ to keep it folded here. + + (3) It is possible that Org mode records two timestamps when you are +using both ‘org-log-done’ and state change logging. However, it never +prompts for two notes: if you have configured both, the state change +recording note takes precedence and cancel the closing note. + + +File: org, Node: Tracking your habits, Prev: Tracking TODO state changes, Up: Progress Logging + +5.3.3 Tracking your habits +-------------------------- + +Org has the ability to track the consistency of a special category of +TODO, called “habits.” To use habits, you have to enable the ‘habits’ +module by customizing the variable ‘org-modules’. + + A habit has the following properties: + + 1. The habit is a TODO item, with a TODO keyword representing an open + state. + + 2. The property ‘STYLE’ is set to the value ‘habit’ (see *note + Properties and Columns::). + + 3. The TODO has a scheduled date, usually with a ‘.+’ style repeat + interval. A ‘++’ style may be appropriate for habits with time + constraints, e.g., must be done on weekends, or a ‘+’ style for an + unusual habit that can have a backlog, e.g., weekly reports. + + 4. The TODO may also have minimum and maximum ranges specified by + using the syntax ‘.+2d/3d’, which says that you want to do the task + at least every three days, but at most every two days. + + 5. State logging for the DONE state is enabled (see *note Tracking + TODO state changes::), in order for historical data to be + represented in the consistency graph. If it is not enabled it is + not an error, but the consistency graphs are largely meaningless. + + To give you an idea of what the above rules look like in action, +here’s an actual habit with some history: + + ** TODO Shave + SCHEDULED: <2009-10-17 Sat .+2d/4d> + :PROPERTIES: + :STYLE: habit + :LAST_REPEAT: [2009-10-19 Mon 00:36] + :END: + - State "DONE" from "TODO" [2009-10-15 Thu] + - State "DONE" from "TODO" [2009-10-12 Mon] + - State "DONE" from "TODO" [2009-10-10 Sat] + - State "DONE" from "TODO" [2009-10-04 Sun] + - State "DONE" from "TODO" [2009-10-02 Fri] + - State "DONE" from "TODO" [2009-09-29 Tue] + - State "DONE" from "TODO" [2009-09-25 Fri] + - State "DONE" from "TODO" [2009-09-19 Sat] + - State "DONE" from "TODO" [2009-09-16 Wed] + - State "DONE" from "TODO" [2009-09-12 Sat] + + What this habit says is: I want to shave at most every 2 days—given +by the ‘SCHEDULED’ date and repeat interval—and at least every 4 days. +If today is the 15th, then the habit first appears in the agenda (see +*note Agenda Views::) on Oct 17, after the minimum of 2 days has +elapsed, and will appear overdue on Oct 19, after four days have +elapsed. + + What’s really useful about habits is that they are displayed along +with a consistency graph, to show how consistent you’ve been at getting +that task done in the past. This graph shows every day that the task +was done over the past three weeks, with colors for each day. The +colors used are: + +Blue + If the task was not to be done yet on that day. +Green + If the task could have been done on that day. +Yellow + If the task was going to be overdue the next day. +Red + If the task was overdue on that day. + + In addition to coloring each day, the day is also marked with an +asterisk if the task was actually done that day, and an exclamation mark +to show where the current day falls in the graph. + + There are several configuration variables that can be used to change +the way habits are displayed in the agenda. + +‘org-habit-graph-column’ + The buffer column at which the consistency graph should be drawn. + This overwrites any text in that column, so it is a good idea to + keep your habits’ titles brief and to the point. + +‘org-habit-preceding-days’ + The amount of history, in days before today, to appear in + consistency graphs. + +‘org-habit-following-days’ + The number of days after today that appear in consistency graphs. + +‘org-habit-show-habits-only-for-today’ + If non-‘nil’, only show habits in today’s agenda view. The default + value is ‘t’. + + Lastly, pressing ‘K’ in the agenda buffer causes habits to +temporarily be disabled and do not appear at all. Press ‘K’ again to +bring them back. They are also subject to tag filtering, if you have +habits which should only be done in certain contexts, for example. + + +File: org, Node: Priorities, Next: Breaking Down Tasks, Prev: Progress Logging, Up: TODO Items + +5.4 Priorities +============== + +If you use Org mode extensively, you may end up with enough TODO items +that it starts to make sense to prioritize them. Prioritizing can be +done by placing a _priority cookie_ into the headline of a TODO item, +like this + + *** TODO [#A] Write letter to Sam Fortune + + By default, Org mode supports three priorities: ‘A’, ‘B’, and ‘C’. +‘A’ is the highest priority. An entry without a cookie is treated as +equivalent if it had priority ‘B’. Priorities make a difference only +for sorting in the agenda (see *note Weekly/daily agenda::); outside the +agenda, they have no inherent meaning to Org mode. The cookies are +displayed with the face defined by the variable ‘org-priority-faces’, +which can be customized. + + Priorities can be attached to any outline node; they do not need to +be TODO items. + +‘C-c ,’ (‘org-priority’) + Set the priority of the current headline. The command prompts for + a priority character ‘A’, ‘B’ or ‘C’. When you press ‘’ + instead, the priority cookie, if one is set, is removed from the + headline. The priorities can also be changed “remotely” from the + agenda buffer with the ‘,’ command (see *note Agenda Commands::). + +‘S-’ (‘org-priority-up’) +‘S-’ (‘org-priority-down’) + Increase/decrease the priority of the current headline(1). Note + that these keys are also used to modify timestamps (see *note + Creating Timestamps::). See also *note Conflicts::, for a + discussion of the interaction with ‘shift-selection-mode’. + + You can change the range of allowed priorities by setting the +variables ‘org-highest-priority’, ‘org-lowest-priority’, and +‘org-default-priority’. For an individual buffer, you may set these +values (highest, lowest, default) like this (please make sure that the +highest priority is earlier in the alphabet than the lowest priority): + + #+PRIORITIES: A C B + + ---------- Footnotes ---------- + + (1) See also the option ‘org-priority-start-cycle-with-default’. + + +File: org, Node: Breaking Down Tasks, Next: Checkboxes, Prev: Priorities, Up: TODO Items + +5.5 Breaking Down Tasks into Subtasks +===================================== + +It is often advisable to break down large tasks into smaller, manageable +subtasks. You can do this by creating an outline tree below a TODO +item, with detailed subtasks on the tree(1). To keep an overview of the +fraction of subtasks that have already been marked DONE, insert either +‘[/]’ or ‘[%]’ anywhere in the headline. These cookies are updated each +time the TODO status of a child changes, or when pressing ‘C-c C-c’ on +the cookie. For example: + + * Organize Party [33%] + ** TODO Call people [1/2] + *** TODO Peter + *** DONE Sarah + ** TODO Buy food + ** DONE Talk to neighbor + + If a heading has both checkboxes and TODO children below it, the +meaning of the statistics cookie become ambiguous. Set the property +‘COOKIE_DATA’ to either ‘checkbox’ or ‘todo’ to resolve this issue. + + If you would like to have the statistics cookie count any TODO +entries in the subtree (not just direct children), configure the +variable ‘org-hierarchical-todo-statistics’. To do this for a single +subtree, include the word ‘recursive’ into the value of the +‘COOKIE_DATA’ property. + + * Parent capturing statistics [2/20] + :PROPERTIES: + :COOKIE_DATA: todo recursive + :END: + + If you would like a TODO entry to automatically change to DONE when +all children are done, you can use the following setup: + + (defun org-summary-todo (n-done n-not-done) + "Switch entry to DONE when all subentries are done, to TODO otherwise." + (let (org-log-done org-log-states) ; turn off logging + (org-todo (if (= n-not-done 0) "DONE" "TODO")))) + + (add-hook 'org-after-todo-statistics-hook 'org-summary-todo) + + Another possibility is the use of checkboxes to identify (a hierarchy +of) a large number of subtasks (see *note Checkboxes::). + + ---------- Footnotes ---------- + + (1) To keep subtasks out of the global TODO list, see the option +‘org-agenda-todo-list-sublevels’. + + +File: org, Node: Checkboxes, Prev: Breaking Down Tasks, Up: TODO Items + +5.6 Checkboxes +============== + +Every item in a plain list(1) (see *note Plain Lists::) can be made into +a checkbox by starting it with the string ‘[ ]’. This feature is +similar to TODO items (see *note TODO Items::), but is more lightweight. +Checkboxes are not included into the global TODO list, so they are often +great to split a task into a number of simple steps. Or you can use +them in a shopping list. To toggle a checkbox, use ‘C-c C-c’, or use +the mouse (thanks to Piotr Zielinski’s ‘org-mouse.el’). + + Here is an example of a checkbox list. + + * TODO Organize party [2/4] + - [-] call people [1/3] + - [ ] Peter + - [X] Sarah + - [ ] Sam + - [X] order food + - [ ] think about what music to play + - [X] talk to the neighbors + + Checkboxes work hierarchically, so if a checkbox item has children +that are checkboxes, toggling one of the children checkboxes makes the +parent checkbox reflect if none, some, or all of the children are +checked. + + The ‘[2/4]’ and ‘[1/3]’ in the first and second line are cookies +indicating how many checkboxes present in this entry have been checked +off, and the total number of checkboxes present. This can give you an +idea on how many checkboxes remain, even without opening a folded entry. +The cookies can be placed into a headline or into (the first line of) a +plain list item. Each cookie covers checkboxes of direct children +structurally below the headline/item on which the cookie appears(2). +You have to insert the cookie yourself by typing either ‘[/]’ or ‘[%]’. +With ‘[/]’ you get an ‘n out of m’ result, as in the examples above. +With ‘[%]’ you get information about the percentage of checkboxes +checked (in the above example, this would be ‘[50%]’ and ‘[33%]’, +respectively). In a headline, a cookie can count either checkboxes +below the heading or TODO states of children, and it displays whatever +was changed last. Set the property ‘COOKIE_DATA’ to either ‘checkbox’ +or ‘todo’ to resolve this issue. + + If the current outline node has an ‘ORDERED’ property, checkboxes +must be checked off in sequence, and an error is thrown if you try to +check off a box while there are unchecked boxes above it. + + The following commands work with checkboxes: + +‘C-c C-c’ (‘org-toggle-checkbox’) + Toggle checkbox status or—with prefix argument—checkbox presence at + point. With a single prefix argument, add an empty checkbox or + remove the current one(3). With a double prefix argument, set it + to ‘[-]’, which is considered to be an intermediate state. + +‘C-c C-x C-b’ (‘org-toggle-checkbox’) + Toggle checkbox status or—with prefix argument—checkbox presence at + point. With double prefix argument, set it to ‘[-]’, which is + considered to be an intermediate state. + + • If there is an active region, toggle the first checkbox in the + region and set all remaining boxes to the same status as the + first. With a prefix argument, add or remove the checkbox for + all items in the region. + + • If point is in a headline, toggle checkboxes in the region + between this headline and the next—so _not_ the entire + subtree. + + • If there is no active region, just toggle the checkbox at + point. + +‘M-S-’ (‘org-insert-todo-heading’) + Insert a new item with a checkbox. This works only if point is + already in a plain list item (see *note Plain Lists::). + +‘C-c C-x o’ (‘org-toggle-ordered-property’) + Toggle the ‘ORDERED’ property of the entry, to toggle if checkboxes + must be checked off in sequence. A property is used for this + behavior because this should be local to the current entry, not + inherited like a tag. However, if you would like to _track_ the + value of this property with a tag for better visibility, customize + ‘org-track-ordered-property-with-tag’. + +‘C-c #’ (‘org-update-statistics-cookies’) + Update the statistics cookie in the current outline entry. When + called with a ‘C-u’ prefix, update the entire file. Checkbox + statistic cookies are updated automatically if you toggle + checkboxes with ‘C-c C-c’ and make new ones with ‘M-S-’. TODO + statistics cookies update when changing TODO states. If you delete + boxes/entries or add/change them by hand, use this command to get + things back into sync. + + ---------- Footnotes ---------- + + (1) With the exception of description lists. But you can allow it by +modifying ‘org-list-automatic-rules’ accordingly. + + (2) Set the variable ‘org-hierarchical-checkbox-statistics’ if you +want such cookies to count all checkboxes below the cookie, not just +those belonging to direct children. + + (3) ‘C-u C-c C-c’ on the _first_ item of a list with no checkbox adds +checkboxes to the rest of the list. + + +File: org, Node: Tags, Next: Properties and Columns, Prev: TODO Items, Up: Top + +6 Tags +****** + +An excellent way to implement labels and contexts for cross-correlating +information is to assign _tags_ to headlines. Org mode has extensive +support for tags. + + Every headline can contain a list of tags; they occur at the end of +the headline. Tags are normal words containing letters, numbers, ‘_’, +and ‘@’. Tags must be preceded and followed by a single colon, e.g., +‘:work:’. Several tags can be specified, as in ‘:work:urgent:’. Tags +by default are in bold face with the same color as the headline. You +may specify special faces for specific tags using the variable +‘org-tag-faces’, in much the same way as you can for TODO keywords (see +*note Faces for TODO keywords::). + +* Menu: + +* Tag Inheritance:: Tags use the tree structure of an outline. +* Setting Tags:: How to assign tags to a headline. +* Tag Hierarchy:: Create a hierarchy of tags. +* Tag Searches:: Searching for combinations of tags. + + +File: org, Node: Tag Inheritance, Next: Setting Tags, Up: Tags + +6.1 Tag Inheritance +=================== + +_Tags_ make use of the hierarchical structure of outline trees. If a +heading has a certain tag, all subheadings inherit the tag as well. For +example, in the list + + * Meeting with the French group :work: + ** Summary by Frank :boss:notes: + *** TODO Prepare slides for him :action: + +the final heading has the tags ‘work’, ‘boss’, ‘notes’, and ‘action’ +even though the final heading is not explicitly marked with those tags. +You can also set tags that all entries in a file should inherit just as +if these tags were defined in a hypothetical level zero that surrounds +the entire file. Use a line like this(1) + + #+FILETAGS: :Peter:Boss:Secret: + + To limit tag inheritance to specific tags, or to turn it off +entirely, use the variables ‘org-use-tag-inheritance’ and +‘org-tags-exclude-from-inheritance’. + + When a headline matches during a tags search while tag inheritance is +turned on, all the sublevels in the same tree—for a simple match +form—match as well(2). The list of matches may then become very long. +If you only want to see the first tags match in a subtree, configure the +variable ‘org-tags-match-list-sublevels’ (not recommended). + + Tag inheritance is relevant when the agenda search tries to match a +tag, either in the ‘tags’ or ‘tags-todo’ agenda types. In other agenda +types, ‘org-use-tag-inheritance’ has no effect. Still, you may want to +have your tags correctly set in the agenda, so that tag filtering works +fine, with inherited tags. Set ‘org-agenda-use-tag-inheritance’ to +control this: the default value includes all agenda types, but setting +this to ‘nil’ can really speed up agenda generation. + + ---------- Footnotes ---------- + + (1) As with all these in-buffer settings, pressing ‘C-c C-c’ +activates any changes in the line. + + (2) This is only true if the search does not involve more complex +tests including properties (see *note Property Searches::). + + +File: org, Node: Setting Tags, Next: Tag Hierarchy, Prev: Tag Inheritance, Up: Tags + +6.2 Setting Tags +================ + +Tags can simply be typed into the buffer at the end of a headline. +After a colon, ‘M-’ offers completion on tags. There is also a +special command for inserting tags: + +‘C-c C-q’ (‘org-set-tags-command’) + Enter new tags for the current headline. Org mode either offers + completion or a special single-key interface for setting tags, see + below. After pressing ‘’, the tags are inserted and aligned + to ‘org-tags-column’. When called with a ‘C-u’ prefix, all tags in + the current buffer are aligned to that column, just to make things + look nice. Tags are automatically realigned after promotion, + demotion, and TODO state changes (see *note TODO Basics::). + +‘C-c C-c’ (‘org-set-tags-command’) + When point is in a headline, this does the same as ‘C-c C-q’. + + Org supports tag insertion based on a _list of tags_. By default +this list is constructed dynamically, containing all tags currently used +in the buffer(1). You may also globally specify a hard list of tags +with the variable ‘org-tag-alist’. Finally you can set the default tags +for a given file using the ‘TAGS’ keyword, like + + #+TAGS: @work @home @tennisclub + #+TAGS: laptop car pc sailboat + + If you have globally defined your preferred set of tags using the +variable ‘org-tag-alist’, but would like to use a dynamic tag list in a +specific file, add an empty ‘TAGS’ keyword to that file: + + #+TAGS: + + If you have a preferred set of tags that you would like to use in +every file, in addition to those defined on a per-file basis by ‘TAGS’ +keyword, then you may specify a list of tags with the variable +‘org-tag-persistent-alist’. You may turn this off on a per-file basis +by adding a ‘STARTUP’ keyword to that file: + + #+STARTUP: noptag + + By default Org mode uses the standard minibuffer completion +facilities for entering tags. However, it also implements another, +quicker, tag selection method called _fast tag selection_. This allows +you to select and deselect tags with just a single key press. For this +to work well you should assign unique letters to most of your commonly +used tags. You can do this globally by configuring the variable +‘org-tag-alist’ in your Emacs init file. For example, you may find the +need to tag many items in different files with ‘@home’. In this case +you can set something like: + + (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l))) + + If the tag is only relevant to the file you are working on, then you +can instead set the ‘TAGS’ keyword as: + + #+TAGS: @work(w) @home(h) @tennisclub(t) laptop(l) pc(p) + + The tags interface shows the available tags in a splash window. If +you want to start a new line after a specific tag, insert ‘\n’ into the +tag list + + #+TAGS: @work(w) @home(h) @tennisclub(t) \n laptop(l) pc(p) + +or write them in two lines: + + #+TAGS: @work(w) @home(h) @tennisclub(t) + #+TAGS: laptop(l) pc(p) + + You can also group together tags that are mutually exclusive by using +braces, as in: + + #+TAGS: { @work(w) @home(h) @tennisclub(t) } laptop(l) pc(p) + +you indicate that at most one of ‘@work’, ‘@home’, and ‘@tennisclub’ +should be selected. Multiple such groups are allowed. + + Do not forget to press ‘C-c C-c’ with point in one of these lines to +activate any changes. + + To set these mutually exclusive groups in the variable +‘org-tags-alist’, you must use the dummy tags ‘:startgroup’ and +‘:endgroup’ instead of the braces. Similarly, you can use ‘:newline’ to +indicate a line break. The previous example would be set globally by +the following configuration: + + (setq org-tag-alist '((:startgroup . nil) + ("@work" . ?w) ("@home" . ?h) + ("@tennisclub" . ?t) + (:endgroup . nil) + ("laptop" . ?l) ("pc" . ?p))) + + If at least one tag has a selection key then pressing ‘C-c C-c’ +automatically presents you with a special interface, listing inherited +tags, the tags of the current headline, and a list of all valid tags +with corresponding keys(2). + + Pressing keys assigned to tags adds or removes them from the list of +tags in the current line. Selecting a tag in a group of mutually +exclusive tags turns off any other tag from that group. + + In this interface, you can also use the following special keys: + +‘’ + Enter a tag in the minibuffer, even if the tag is not in the + predefined list. You can complete on all tags present in the + buffer. You can also add several tags: just separate them with a + comma. + +‘’ + Clear all tags for this line. + +‘’ + Accept the modified set. + +‘C-g’ + Abort without installing changes. + +‘q’ + If ‘q’ is not assigned to a tag, it aborts like ‘C-g’. + +‘!’ + Turn off groups of mutually exclusive tags. Use this to (as an + exception) assign several tags from such a group. + +‘C-c’ + Toggle auto-exit after the next change (see below). If you are + using expert mode, the first ‘C-c’ displays the selection window. + + This method lets you assign tags to a headline with very few keys. +With the above setup, you could clear the current tags and set ‘@home’, +‘laptop’ and ‘pc’ tags with just the following keys: ‘C-c C-c h l +p ’. Switching from ‘@home’ to ‘@work’ would be done with ‘C-c C-c +w ’ or alternatively with ‘C-c C-c C-c w’. Adding the +non-predefined tag ‘sarah’ could be done with ‘C-c C-c s a r a h +’. + + If you find that most of the time you need only a single key press to +modify your list of tags, set the variable +‘org-fast-tag-selection-single-key’. Then you no longer have to press +‘’ to exit fast tag selection—it exits after the first change. If +you then occasionally need more keys, press ‘C-c’ to turn off auto-exit +for the current tag selection process (in effect: start selection with +‘C-c C-c C-c’ instead of ‘C-c C-c’). If you set the variable to the +value ‘expert’, the special window is not even shown for single-key tag +selection, it comes up only when you press an extra ‘C-c’. + + ---------- Footnotes ---------- + + (1) To extend this default list to all tags used in all agenda files +(see *note Agenda Views::), customize the variable +‘org-complete-tags-always-offer-all-agenda-tags’. + + (2) Keys are automatically assigned to tags that have no configured +keys. + + +File: org, Node: Tag Hierarchy, Next: Tag Searches, Prev: Setting Tags, Up: Tags + +6.3 Tag Hierarchy +================= + +Tags can be defined in hierarchies. A tag can be defined as a _group +tag_ for a set of other tags. The group tag can be seen as the “broader +term” for its set of tags. Defining multiple group tags and nesting +them creates a tag hierarchy. + + One use-case is to create a taxonomy of terms (tags) that can be used +to classify nodes in a document or set of documents. + + When you search for a group tag, it return matches for all members in +the group and its subgroups. In an agenda view, filtering by a group +tag displays or hide headlines tagged with at least one of the members +of the group or any of its subgroups. This makes tag searches and +filters even more flexible. + + You can set group tags by using brackets and inserting a colon +between the group tag and its related tags—beware that all whitespaces +are mandatory so that Org can parse this line correctly: + + #+TAGS: [ GTD : Control Persp ] + + In this example, ‘GTD’ is the group tag and it is related to two +other tags: ‘Control’, ‘Persp’. Defining ‘Control’ and ‘Persp’ as group +tags creates a hierarchy of tags: + + #+TAGS: [ Control : Context Task ] + #+TAGS: [ Persp : Vision Goal AOF Project ] + + That can conceptually be seen as a hierarchy of tags: + + • ‘GTD’ + • ‘Persp’ + • ‘Vision’ + • ‘Goal’ + • ‘AOF’ + • ‘Project’ + • ‘Control’ + • ‘Context’ + • ‘Task’ + + You can use the ‘:startgrouptag’, ‘:grouptags’ and ‘:endgrouptag’ +keyword directly when setting ‘org-tag-alist’ directly: + + (setq org-tag-alist '((:startgrouptag) + ("GTD") + (:grouptags) + ("Control") + ("Persp") + (:endgrouptag) + (:startgrouptag) + ("Control") + (:grouptags) + ("Context") + ("Task") + (:endgrouptag))) + + The tags in a group can be mutually exclusive if using the same group +syntax as is used for grouping mutually exclusive tags together; using +curly brackets. + + #+TAGS: { Context : @Home @Work @Call } + + When setting ‘org-tag-alist’ you can use ‘:startgroup’ and +‘:endgroup’ instead of ‘:startgrouptag’ and ‘:endgrouptag’ to make the +tags mutually exclusive. + + Furthermore, the members of a group tag can also be regular +expressions, creating the possibility of a more dynamic and rule-based +tag structure. The regular expressions in the group must be specified +within curly brackets. Here is an expanded example: + + #+TAGS: [ Vision : {V@.+} ] + #+TAGS: [ Goal : {G@.+} ] + #+TAGS: [ AOF : {AOF@.+} ] + #+TAGS: [ Project : {P@.+} ] + + Searching for the tag ‘Project’ now lists all tags also including +regular expression matches for ‘P@.+’, and similarly for tag searches on +‘Vision’, ‘Goal’ and ‘AOF’. For example, this would work well for a +project tagged with a common project-identifier, e.g., ‘P@2014_OrgTags’. + + If you want to ignore group tags temporarily, toggle group tags +support with ‘org-toggle-tags-groups’, bound to ‘C-c C-x q’. If you +want to disable tag groups completely, set ‘org-group-tags’ to ‘nil’. + + +File: org, Node: Tag Searches, Prev: Tag Hierarchy, Up: Tags + +6.4 Tag Searches +================ + +Once a system of tags has been set up, it can be used to collect related +information into special lists. + +‘C-c / m’ or ‘C-c \’ (‘org-match-sparse-tree’) + Create a sparse tree with all headlines matching a tags search. + With a ‘C-u’ prefix argument, ignore headlines that are not a TODO + line. + +‘M-x org-agenda m’ (‘org-tags-view’) + Create a global list of tag matches from all agenda files. See + *note Matching tags and properties::. + +‘M-x org-agenda M’ (‘org-tags-view’) + Create a global list of tag matches from all agenda files, but + check only TODO items and force checking subitems (see the option + ‘org-tags-match-list-sublevels’). + + These commands all prompt for a match string which allows basic +Boolean logic like ‘+boss+urgent-project1’, to find entries with tags +‘boss’ and ‘urgent’, but not ‘project1’, or ‘Kathy|Sally’ to find +entries which are tagged, like ‘Kathy’ or ‘Sally’. The full syntax of +the search string is rich and allows also matching against TODO +keywords, entry levels and properties. For a complete description with +many examples, see *note Matching tags and properties::. + + +File: org, Node: Properties and Columns, Next: Dates and Times, Prev: Tags, Up: Top + +7 Properties and Columns +************************ + +A property is a key-value pair associated with an entry. Properties can +be set so they are associated with a single entry, with every entry in a +tree, or with every entry in an Org file. + + There are two main applications for properties in Org mode. First, +properties are like tags, but with a value. Imagine maintaining a file +where you document bugs and plan releases for a piece of software. +Instead of using tags like ‘release_1’, ‘release_2’, you can use a +property, say ‘Release’, that in different subtrees has different +values, such as ‘1.0’ or ‘2.0’. Second, you can use properties to +implement (very basic) database capabilities in an Org buffer. Imagine +keeping track of your music CDs, where properties could be things such +as the album, artist, date of release, number of tracks, and so on. + + Properties can be conveniently edited and viewed in column view (see +*note Column View::). + +* Menu: + +* Property Syntax:: How properties are spelled out. +* Special Properties:: Access to other Org mode features. +* Property Searches:: Matching property values. +* Property Inheritance:: Passing values down a tree. +* Column View:: Tabular viewing and editing. + + +File: org, Node: Property Syntax, Next: Special Properties, Up: Properties and Columns + +7.1 Property Syntax +=================== + +Properties are key–value pairs. When they are associated with a single +entry or with a tree they need to be inserted into a special drawer (see +*note Drawers::) with the name ‘PROPERTIES’, which has to be located +right below a headline, and its planning line (see *note Deadlines and +Scheduling::) when applicable. Each property is specified on a single +line, with the key—surrounded by colons—first, and the value after it. +Keys are case-insensitive. Here is an example: + + * CD collection + ** Classic + *** Goldberg Variations + :PROPERTIES: + :Title: Goldberg Variations + :Composer: J.S. Bach + :Artist: Glenn Gould + :Publisher: Deutsche Grammophon + :NDisks: 1 + :END: + + Depending on the value of ‘org-use-property-inheritance’, a property +set this way is associated either with a single entry, or with the +sub-tree defined by the entry, see *note Property Inheritance::. + + You may define the allowed values for a particular property ‘Xyz’ by +setting a property ‘Xyz_ALL’. This special property is _inherited_, so +if you set it in a level 1 entry, it applies to the entire tree. When +allowed values are defined, setting the corresponding property becomes +easier and is less prone to typing errors. For the example with the CD +collection, we can pre-define publishers and the number of disks in a +box like this: + + * CD collection + :PROPERTIES: + :NDisks_ALL: 1 2 3 4 + :Publisher_ALL: "Deutsche Grammophon" Philips EMI + :END: + + If you want to set properties that can be inherited by any entry in a +file, use a line like: + + #+PROPERTY: NDisks_ALL 1 2 3 4 + + If you want to add to the value of an existing property, append a ‘+’ +to the property name. The following results in the property ‘var’ +having the value ‘foo=1 bar=2’. + + #+PROPERTY: var foo=1 + #+PROPERTY: var+ bar=2 + + It is also possible to add to the values of inherited properties. +The following results in the ‘Genres’ property having the value ‘Classic +Baroque’ under the ‘Goldberg Variations’ subtree. + + * CD collection + ** Classic + :PROPERTIES: + :Genres: Classic + :END: + *** Goldberg Variations + :PROPERTIES: + :Title: Goldberg Variations + :Composer: J.S. Bach + :Artist: Glenn Gould + :Publisher: Deutsche Grammophon + :NDisks: 1 + :Genres+: Baroque + :END: + + Note that a property can only have one entry per drawer. + + Property values set with the global variable ‘org-global-properties’ +can be inherited by all entries in all Org files. + + The following commands help to work with properties: + +‘M-’ (‘pcomplete’) + After an initial colon in a line, complete property keys. All keys + used in the current file are offered as possible completions. + +‘C-c C-x p’ (‘org-set-property’) + Set a property. This prompts for a property name and a value. If + necessary, the property drawer is created as well. + +‘C-u M-x org-insert-drawer’ + Insert a property drawer into the current entry. The drawer is + inserted early in the entry, but after the lines with planning + information like deadlines. + +‘C-c C-c’ (‘org-property-action’) + With point in a property drawer, this executes property commands. + +‘C-c C-c s’ (‘org-set-property’) + Set a property in the current entry. Both the property and the + value can be inserted using completion. + +‘S-’ (‘org-property-next-allowed-values’) +‘S-’ (‘org-property-previous-allowed-value’) + Switch property at point to the next/previous allowed value. + +‘C-c C-c d’ (‘org-delete-property’) + Remove a property from the current entry. + +‘C-c C-c D’ (‘org-delete-property-globally’) + Globally remove a property, from all entries in the current file. + +‘C-c C-c c’ (‘org-compute-property-at-point’) + Compute the property at point, using the operator and scope from + the nearest column format definition. + + +File: org, Node: Special Properties, Next: Property Searches, Prev: Property Syntax, Up: Properties and Columns + +7.2 Special Properties +====================== + +Special properties provide an alternative access method to Org mode +features, like the TODO state or the priority of an entry, discussed in +the previous chapters. This interface exists so that you can include +these states in a column view (see *note Column View::), or to use them +in queries. The following property names are special and should not be +used as keys in the properties drawer: + +‘ALLTAGS’ All tags, including inherited ones. +‘BLOCKED’ ‘t’ if task is currently blocked by children or siblings. +‘CATEGORY’ The category of an entry. +‘CLOCKSUM’ The sum of CLOCK intervals in the subtree. ‘org-clock-sum’ + must be run first to compute the values in the current buffer. +‘CLOCKSUM_T’ The sum of CLOCK intervals in the subtree for today. + ‘org-clock-sum-today’ must be run first to compute the + values in the current buffer. +‘CLOSED’ When was this entry closed? +‘DEADLINE’ The deadline time string, without the angular brackets. +‘FILE’ The filename the entry is located in. +‘ITEM’ The headline of the entry. +‘PRIORITY’ The priority of the entry, a string with a single letter. +‘SCHEDULED’ The scheduling timestamp, without the angular brackets. +‘TAGS’ The tags defined directly in the headline. +‘TIMESTAMP’ The first keyword-less timestamp in the entry. +‘TIMESTAMP_IA’ The first inactive timestamp in the entry. +‘TODO’ The TODO keyword of the entry. + + +File: org, Node: Property Searches, Next: Property Inheritance, Prev: Special Properties, Up: Properties and Columns + +7.3 Property Searches +===================== + +To create sparse trees and special lists with selection based on +properties, the same commands are used as for tag searches (see *note +Tag Searches::). + +‘C-c / m’ or ‘C-c \’ (‘org-match-sparse-tree’) + Create a sparse tree with all matching entries. With a ‘C-u’ + prefix argument, ignore headlines that are not a TODO line. + +‘M-x org-agenda m’, ‘org-tags-view’ + Create a global list of tag/property matches from all agenda files. + +‘M-x org-agenda M’ (‘org-tags-view’) + Create a global list of tag matches from all agenda files, but + check only TODO items and force checking of subitems (see the + option ‘org-tags-match-list-sublevels’). + + The syntax for the search string is described in *note Matching tags +and properties::. + + There is also a special command for creating sparse trees based on a +single property: + +‘C-c / p’ + Create a sparse tree based on the value of a property. This first + prompts for the name of a property, and then for a value. A sparse + tree is created with all entries that define this property with the + given value. If you enclose the value in curly braces, it is + interpreted as a regular expression and matched against the + property values. + + +File: org, Node: Property Inheritance, Next: Column View, Prev: Property Searches, Up: Properties and Columns + +7.4 Property Inheritance +======================== + +The outline structure of Org documents lends itself to an inheritance +model of properties: if the parent in a tree has a certain property, the +children can inherit this property. Org mode does not turn this on by +default, because it can slow down property searches significantly and is +often not needed. However, if you find inheritance useful, you can turn +it on by setting the variable ‘org-use-property-inheritance’. It may be +set to ‘t’ to make all properties inherited from the parent, to a list +of properties that should be inherited, or to a regular expression that +matches inherited properties. If a property has the value ‘nil’, this +is interpreted as an explicit un-define of the property, so that +inheritance search stops at this value and returns ‘nil’. + + Org mode has a few properties for which inheritance is hard-coded, at +least for the special applications for which they are used: + +‘COLUMNS’ + The ‘COLUMNS’ property defines the format of column view (see *note + Column View::). It is inherited in the sense that the level where + a ‘COLUMNS’ property is defined is used as the starting point for a + column view table, independently of the location in the subtree + from where columns view is turned on. + +‘CATEGORY’ + For agenda view, a category set through a ‘CATEGORY’ property + applies to the entire subtree. + +‘ARCHIVE’ + For archiving, the ‘ARCHIVE’ property may define the archive + location for the entire subtree (see *note Moving subtrees::). + +‘LOGGING’ + The ‘LOGGING’ property may define logging settings for an entry or + a subtree (see *note Tracking TODO state changes::). + + +File: org, Node: Column View, Prev: Property Inheritance, Up: Properties and Columns + +7.5 Column View +=============== + +A great way to view and edit properties in an outline tree is _column +view_. In column view, each outline node is turned into a table row. +Columns in this table provide access to properties of the entries. Org +mode implements columns by overlaying a tabular structure over the +headline of each item. While the headlines have been turned into a +table row, you can still change the visibility of the outline tree. For +example, you get a compact table by switching to “contents” +view—‘S-’ ‘S-’, or simply ‘c’ while column view is active—but +you can still open, read, and edit the entry below each headline. Or, +you can switch to column view after executing a sparse tree command and +in this way get a table only for the selected items. Column view also +works in agenda buffers (see *note Agenda Views::) where queries have +collected selected items, possibly from a number of files. + +* Menu: + +* Defining columns:: The COLUMNS format property. +* Using column view:: How to create and use column view. +* Capturing column view:: A dynamic block for column view. + + +File: org, Node: Defining columns, Next: Using column view, Up: Column View + +7.5.1 Defining columns +---------------------- + +Setting up a column view first requires defining the columns. This is +done by defining a column format line. + +* Menu: + +* Scope of column definitions:: Where defined, where valid? +* Column attributes:: Appearance and content of a column. + + +File: org, Node: Scope of column definitions, Next: Column attributes, Up: Defining columns + +7.5.1.1 Scope of column definitions +................................... + +To define a column format for an entire file, use a line like: + + #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO + + To specify a format that only applies to a specific tree, add a +‘COLUMNS’ property to the top node of that tree, for example: + + ** Top node for columns view + :PROPERTIES: + :COLUMNS: %25ITEM %TAGS %PRIORITY %TODO + :END: + + If a ‘COLUMNS’ property is present in an entry, it defines columns +for the entry itself, and for the entire subtree below it. Since the +column definition is part of the hierarchical structure of the document, +you can define columns on level 1 that are general enough for all +sublevels, and more specific columns further down, when you edit a +deeper part of the tree. + + +File: org, Node: Column attributes, Prev: Scope of column definitions, Up: Defining columns + +7.5.1.2 Column attributes +......................... + +A column definition sets the attributes of a column. The general +definition looks like this: + + %[WIDTH]PROPERTY[(TITLE)][{SUMMARY-TYPE}] + +Except for the percent sign and the property name, all items are +optional. The individual parts have the following meaning: + +WIDTH + An integer specifying the width of the column in characters. If + omitted, the width is determined automatically. + +PROPERTY + The property that should be edited in this column. Special + properties representing meta data are allowed here as well (see + *note Special Properties::). + +TITLE + The header text for the column. If omitted, the property name is + used. + +SUMMARY-TYPE + The summary type. If specified, the column values for parent nodes + are computed from the children(1). + + Supported summary types are: + + ‘+’ Sum numbers in this column. + ‘+;%.1f’ Like ‘+’, but format result with ‘%.1f’. + ‘$’ Currency, short for ‘+;%.2f’. + ‘min’ Smallest number in column. + ‘max’ Largest number. + ‘mean’ Arithmetic mean of numbers. + ‘X’ Checkbox status, ‘[X]’ if all children are ‘[X]’. + ‘X/’ Checkbox status, ‘[n/m]’. + ‘X%’ Checkbox status, ‘[n%]’. + ‘:’ Sum times, HH:MM, plain numbers are hours. + ‘:min’ Smallest time value in column. + ‘:max’ Largest time value. + ‘:mean’ Arithmetic mean of time values. + ‘@min’ Minimum age(2) (in days/hours/mins/seconds). + ‘@max’ Maximum age (in days/hours/mins/seconds). + ‘@mean’ Arithmetic mean of ages (in days/hours/mins/seconds). + ‘est+’ Add low-high estimates. + + You can also define custom summary types by setting + ‘org-columns-summary-types’. + + The ‘est+’ summary type requires further explanation. It is used for +combining estimates, expressed as low-high ranges. For example, instead +of estimating a particular task will take 5 days, you might estimate it +as 5–6 days if you’re fairly confident you know how much work is +required, or 1–10 days if you do not really know what needs to be done. +Both ranges average at 5.5 days, but the first represents a more +predictable delivery. + + When combining a set of such estimates, simply adding the lows and +highs produces an unrealistically wide result. Instead, ‘est+’ adds the +statistical mean and variance of the subtasks, generating a final +estimate from the sum. For example, suppose you had ten tasks, each of +which was estimated at 0.5 to 2 days of work. Straight addition +produces an estimate of 5 to 20 days, representing what to expect if +everything goes either extremely well or extremely poorly. In contrast, +‘est+’ estimates the full job more realistically, at 10–15 days. + + Here is an example for a complete columns definition, along with +allowed values(3). + + :COLUMNS: %25ITEM %9Approved(Approved?){X} %Owner %11Status \ + %10Time_Estimate{:} %CLOCKSUM %CLOCKSUM_T + :Owner_ALL: Tammy Mark Karl Lisa Don + :Status_ALL: "In progress" "Not started yet" "Finished" "" + :Approved_ALL: "[ ]" "[X]" + +The first column, ‘%25ITEM’, means the first 25 characters of the item +itself, i.e., of the headline. You probably always should start the +column definition with the ‘ITEM’ specifier. The other specifiers +create columns ‘Owner’ with a list of names as allowed values, for +‘Status’ with four different possible values, and for a checkbox field +‘Approved’. When no width is given after the ‘%’ character, the column +is exactly as wide as it needs to be in order to fully display all +values. The ‘Approved’ column does have a modified title (‘Approved?’, +with a question mark). Summaries are created for the ‘Time_Estimate’ +column by adding time duration expressions like HH:MM, and for the +‘Approved’ column, by providing an ‘[X]’ status if all children have +been checked. The ‘CLOCKSUM’ and ‘CLOCKSUM_T’ columns are special, they +lists the sums of CLOCK intervals in the subtree, either for all clocks +or just for today. + + ---------- Footnotes ---------- + + (1) If more than one summary type applies to the same property, the +parent values are computed according to the first of them. + + (2) An age can be defined as a duration, using units defined in +‘org-duration-units’, e.g., ‘3d 1h’. If any value in the column is as +such, the summary is also expressed as a duration. + + (3) Please note that the ‘COLUMNS’ definition must be on a single +line; it is wrapped here only because of formatting constraints. + + +File: org, Node: Using column view, Next: Capturing column view, Prev: Defining columns, Up: Column View + +7.5.2 Using column view +----------------------- + +Turning column view on or off +............................. + +‘C-c C-x C-c’ (‘org-columns’) + Turn on column view. If point is before the first headline in the + file, column view is turned on for the entire file, using the + ‘#+COLUMNS’ definition. If point is somewhere inside the outline, + this command searches the hierarchy, up from point, for a ‘COLUMNS’ + property that defines a format. When one is found, the column view + table is established for the tree starting at the entry that + contains the ‘COLUMNS’ property. If no such property is found, the + format is taken from the ‘#+COLUMNS’ line or from the variable + ‘org-columns-default-format’, and column view is established for + the current entry and its subtree. + +‘r’ or ‘g’ (‘org-columns-redo’) + Recreate the column view, to include recent changes made in the + buffer. + +‘q’ (‘org-columns-quit’) + Exit column view. + +Editing values +.............. + +‘’, ‘’, ‘’, ‘’ + Move through the column view from field to field. + +‘1..9,0’ + Directly select the Nth allowed value, ‘0’ selects the 10th value. + +‘n’ or ‘S-’ (‘org-columns-next-allowed-value’) +‘p’ or ‘S-’ (‘org-columns-previous-allowed-value’) + Switch to the next/previous allowed value of the field. For this, + you have to have specified allowed values for a property. + +‘e’ (‘org-columns-edit-value’) + Edit the property at point. For the special properties, this + invokes the same interface that you normally use to change that + property. For example, the tag completion or fast selection + interface pops up when editing a ‘TAGS’ property. + +‘C-c C-c’ (‘org-columns-set-tags-or-toggle’) + When there is a checkbox at point, toggle it. + +‘v’ (‘org-columns-show-value’) + View the full value of this property. This is useful if the width + of the column is smaller than that of the value. + +‘a’ (‘org-columns-edit-allowed’) + Edit the list of allowed values for this property. If the list is + found in the hierarchy, the modified values is stored there. If no + list is found, the new value is stored in the first entry that is + part of the current column view. + +Modifying column view on-the-fly +................................ + +‘<’ (‘org-columns-narrow’) +‘>’ (‘org-columns-widen’) + Make the column narrower/wider by one character. + +‘S-M-’ (‘org-columns-new’) + Insert a new column, to the left of the current column. + +‘S-M-’ (‘org-columns-delete’) + Delete the current column. + + +File: org, Node: Capturing column view, Prev: Using column view, Up: Column View + +7.5.3 Capturing column view +--------------------------- + +Since column view is just an overlay over a buffer, it cannot be +exported or printed directly. If you want to capture a column view, use +a ‘columnview’ dynamic block (see *note Dynamic Blocks::). The frame of +this block looks like this: + + * The column view + #+BEGIN: columnview :hlines 1 :id "label" + + #+END: + + This dynamic block has the following parameters: + +‘:id’ + This is the most important parameter. Column view is a feature + that is often localized to a certain (sub)tree, and the capture + block might be at a different location in the file. To identify + the tree whose view to capture, you can use four values: + + ‘local’ + Use the tree in which the capture block is located. + + ‘global’ + Make a global view, including all headings in the file. + + ‘file:FILENAME’ + Run column view at the top of the FILENAME file. + + ‘LABEL’ + Call column view in the tree that has an ‘ID’ property with + the value LABEL. You can use ‘M-x org-id-copy’ to create a + globally unique ID for the current entry and copy it to the + kill-ring. + +‘:hlines’ + When ‘t’, insert an hline after every line. When a number N, + insert an hline before each headline with level ‘<= N’. + +‘:vlines’ + When non-‘nil’, force column groups to get vertical lines. + +‘:maxlevel’ + When set to a number, do not capture entries below this level. + +‘:skip-empty-rows’ + When non-‘nil’, skip rows where the only non-empty specifier of the + column view is ‘ITEM’. + +‘:indent’ + When non-‘nil’, indent each ‘ITEM’ field according to its level. + +‘:format’ + Specify a column attribute (see *note Column attributes::) for the + dynamic block. + + The following commands insert or update the dynamic block: + +‘C-c C-x i’ (‘org-insert-columns-dblock’) + Insert a dynamic block capturing a column view. Prompt for the + scope or ID of the view. + +‘C-c C-c’ ‘C-c C-x C-u’ (‘org-dblock-update’) + Update dynamic block at point. point needs to be in the ‘#+BEGIN’ + line of the dynamic block. + +‘C-u C-c C-x C-u’ (‘org-update-all-dblocks’) + Update all dynamic blocks (see *note Dynamic Blocks::). This is + useful if you have several clock table blocks, column-capturing + blocks or other dynamic blocks in a buffer. + + You can add formulas to the column view table and you may add +plotting instructions in front of the table—these survive an update of +the block. If there is a ‘TBLFM’ keyword after the table, the table is +recalculated automatically after an update. + + An alternative way to capture and process property values into a +table is provided by Eric Schulte’s ‘org-collector.el’, which is a +contributed package(1). It provides a general API to collect properties +from entries in a certain scope, and arbitrary Lisp expressions to +process these values before inserting them into a table or a dynamic +block. + + ---------- Footnotes ---------- + + (1) Contributed packages are not part of Emacs, but are distributed +with the main distribution of Org—visit . + + +File: org, Node: Dates and Times, Next: Capture Refile Archive, Prev: Properties and Columns, Up: Top + +8 Dates and Times +***************** + +To assist project planning, TODO items can be labeled with a date and/or +a time. The specially formatted string carrying the date and time +information is called a _timestamp_ in Org mode. This may be a little +confusing because timestamp is often used as indicating when something +was created or last changed. However, in Org mode this term is used in +a much wider sense. + +* Menu: + +* Timestamps:: Assigning a time to a tree entry. +* Creating Timestamps:: Commands to insert timestamps. +* Deadlines and Scheduling:: Planning your work. +* Clocking Work Time:: Tracking how long you spend on a task. +* Effort Estimates:: Planning work effort in advance. +* Timers:: Notes with a running timer. + + +File: org, Node: Timestamps, Next: Creating Timestamps, Up: Dates and Times + +8.1 Timestamps, Deadlines and Scheduling +======================================== + +A timestamp is a specification of a date (possibly with a time or a +range of times) in a special format, either ‘<2003-09-16 Tue>’ or +‘<2003-09-16 Tue 09:39>’ or ‘<2003-09-16 Tue 12:00-12:30>’(1). A +timestamp can appear anywhere in the headline or body of an Org tree +entry. Its presence causes entries to be shown on specific dates in the +agenda (see *note Weekly/daily agenda::). We distinguish: + +Plain timestamp; Event; Appointment + A simple timestamp just assigns a date/time to an item. This is + just like writing down an appointment or event in a paper agenda. + In the agenda display, the headline of an entry associated with a + plain timestamp is shown exactly on that date. + + * Meet Peter at the movies + <2006-11-01 Wed 19:15> + * Discussion on climate change + <2006-11-02 Thu 20:00-22:00> + +Timestamp with repeater interval + A timestamp may contain a _repeater interval_, indicating that it + applies not only on the given date, but again and again after a + certain interval of N days (d), weeks (w), months (m), or years + (y). The following shows up in the agenda every Wednesday: + + * Pick up Sam at school + <2007-05-16 Wed 12:30 +1w> + +Diary-style sexp entries + For more complex date specifications, Org mode supports using the + special sexp diary entries implemented in the Emacs calendar/diary + package(2). For example, with optional time: + + * 22:00-23:00 The nerd meeting on every 2nd Thursday of the month + <%%(diary-float t 4 2)> + +Time/Date range + Two timestamps connected by ‘--’ denote a range. The headline is + shown on the first and last day of the range, and on any dates that + are displayed and fall in the range. Here is an example: + + ** Meeting in Amsterdam + <2004-08-23 Mon>--<2004-08-26 Thu> + +Inactive timestamp + Just like a plain timestamp, but with square brackets instead of + angular ones. These timestamps are inactive in the sense that they + do _not_ trigger an entry to show up in the agenda. + + * Gillian comes late for the fifth time + [2006-11-01 Wed] + + ---------- Footnotes ---------- + + (1) The Org date format is inspired by the standard ISO 8601 +date/time format. To use an alternative format, see *note Custom time +format::. The day name is optional when you type the date yourself. +However, any date inserted or modified by Org adds that day name, for +reading convenience. + + (2) When working with the standard diary sexp functions, you need to +be very careful with the order of the arguments. That order depends +evilly on the variable ‘calendar-date-style’. For example, to specify a +date December 12, 2005, the call might look like ‘(diary-date 12 1 +2005)’ or ‘(diary-date 1 12 2005)’ or ‘(diary-date 2005 12 1)’, +depending on the settings. This has been the source of much confusion. +Org mode users can resort to special versions of these functions like +‘org-date’ or ‘org-anniversary’. These work just like the corresponding +‘diary-’ functions, but with stable ISO order of arguments (year, month, +day) wherever applicable, independent of the value of +‘calendar-date-style’. + + +File: org, Node: Creating Timestamps, Next: Deadlines and Scheduling, Prev: Timestamps, Up: Dates and Times + +8.2 Creating Timestamps +======================= + +For Org mode to recognize timestamps, they need to be in the specific +format. All commands listed below produce timestamps in the correct +format. + +‘C-c .’ (‘org-time-stamp’) + Prompt for a date and insert a corresponding timestamp. When point + is at an existing timestamp in the buffer, the command is used to + modify this timestamp instead of inserting a new one. When this + command is used twice in succession, a time range is inserted. + + When called with a prefix argument, use the alternative format + which contains date and time. The default time can be rounded to + multiples of 5 minutes. See the option + ‘org-time-stamp-rounding-minutes’. + + With two prefix arguments, insert an active timestamp with the + current time without prompting. + +‘C-c !’ (‘org-time-stamp-inactive’) + Like ‘C-c .’, but insert an inactive timestamp that does not cause + an agenda entry. + +‘C-c C-c’ + Normalize timestamp, insert or fix day name if missing or wrong. + +‘C-c <’ (‘org-date-from-calendar’) + Insert a timestamp corresponding to point date in the calendar. + +‘C-c >’ (‘org-goto-calendar’) + Access the Emacs calendar for the current date. If there is a + timestamp in the current line, go to the corresponding date + instead. + +‘C-c C-o’ (‘org-open-at-point’) + Access the agenda for the date given by the timestamp or -range at + point (see *note Weekly/daily agenda::). + +‘S-’ (‘org-timestamp-down-day’) +‘S-’ (‘org-timestamp-up-day’) + Change date at point by one day. These key bindings conflict with + shift-selection and related modes (see *note Conflicts::). + +‘S-’ (‘org-timestamp-up’) +‘S-’ (‘org-timestamp-down’) + On the beginning or enclosing bracket of a timestamp, change its + type. Within a timestamp, change the item under point. Point can + be on a year, month, day, hour or minute. When the timestamp + contains a time range like ‘15:30-16:30’, modifying the first time + also shifts the second, shifting the time block with constant + length. To change the length, modify the second time. Note that + if point is in a headline and not at a timestamp, these same keys + modify the priority of an item (see *note Priorities::). The key + bindings also conflict with shift-selection and related modes (see + *note Conflicts::). + +‘C-c C-y’ (‘org-evaluate-time-range’) + Evaluate a time range by computing the difference between start and + end. With a prefix argument, insert result after the time range + (in a table: into the following column). + +* Menu: + +* The date/time prompt:: How Org mode helps you enter dates and times. +* Custom time format:: Making dates look different. + + +File: org, Node: The date/time prompt, Next: Custom time format, Up: Creating Timestamps + +8.2.1 The date/time prompt +-------------------------- + +When Org mode prompts for a date/time, the default is shown in default +date/time format, and the prompt therefore seems to ask for a specific +format. But it in fact accepts date/time information in a variety of +formats. Generally, the information should start at the beginning of +the string. Org mode finds whatever information is in there and derives +anything you have not specified from the _default date and time_. The +default is usually the current date and time, but when modifying an +existing timestamp, or when entering the second stamp of a range, it is +taken from the stamp in the buffer. When filling in information, Org +mode assumes that most of the time you want to enter a date in the +future: if you omit the month/year and the given day/month is _before_ +today, it assumes that you mean a future date(1). If the date has been +automatically shifted into the future, the time prompt shows this with +‘(=>F)’. + + For example, let’s assume that today is *June 13, 2006*. Here is how +various inputs are interpreted, the items filled in by Org mode are in +*bold*. + +‘3-2-5’ ⇒ 2003-02-05 +‘2/5/3’ ⇒ 2003-02-05 +‘14’ ⇒ *2006*-*06*-14 +‘12’ ⇒ *2006*-*07*-12 +‘2/5’ ⇒ *2007*-02-05 +‘Fri’ ⇒ nearest Friday (default date or later) +‘sep 15’ ⇒ *2006*-09-15 +‘feb 15’ ⇒ *2007*-02-15 +‘sep 12 9’ ⇒ 2009-09-12 +‘12:45’ ⇒ *2006*-*06*-*13* 12:45 +‘22 sept 0:34’ ⇒ *2006*-09-22 0:34 +‘w4’ ⇒ ISO week for of the current year *2006* +‘2012 w4 fri’ ⇒ Friday of ISO week 4 in 2012 +‘2012-w04-5’ ⇒ Same as above + + Furthermore you can specify a relative date by giving, as the _first_ +thing in the input: a plus/minus sign, a number and a letter—‘d’, ‘w’, +‘m’ or ‘y’—to indicate change in days, weeks, months, or years. With a +single plus or minus, the date is always relative to today. With a +double plus or minus, it is relative to the default date. If instead of +a single letter, you use the abbreviation of day name, the date is the +Nth such day, e.g.: + +‘+0’ ⇒ today +‘.’ ⇒ today +‘+4d’ ⇒ four days from today +‘+4’ ⇒ same as +4d +‘+2w’ ⇒ two weeks from today +‘++5’ ⇒ five days from default date +‘+2tue’ ⇒ second Tuesday from now + + The function understands English month and weekday abbreviations. If +you want to use un-abbreviated names and/or other languages, configure +the variables ‘parse-time-months’ and ‘parse-time-weekdays’. + + Not all dates can be represented in a given Emacs implementation. By +default Org mode forces dates into the compatibility range 1970–2037 +which works on all Emacs implementations. If you want to use dates +outside of this range, read the docstring of the variable +‘org-read-date-force-compatible-dates’. + + You can specify a time range by giving start and end times or by +giving a start time and a duration (in HH:MM format). Use one or two +dash(es) as the separator in the former case and use ‘+’ as the +separator in the latter case, e.g.: + +‘11am-1:15pm’ ⇒ 11:00-13:15 +‘11am--1:15pm’ ⇒ same as above +‘11am+2:15’ ⇒ same as above + + Parallel to the minibuffer prompt, a calendar is popped up(2). When +you exit the date prompt, either by clicking on a date in the calendar, +or by pressing ‘’, the date selected in the calendar is combined +with the information entered at the prompt. You can control the +calendar fully from the minibuffer: + +‘’ Choose date at point in calendar. +‘mouse-1’ Select date by clicking on it. +‘S-’ One day forward. +‘S-’ One day backward. +‘S-’ One week forward. +‘S-’ One week backward. +‘M-S-’ One month forward. +‘M-S-’ One month backward. +‘>’ Scroll calendar forward by one month. +‘<’ Scroll calendar backward by one month. +‘M-v’ Scroll calendar forward by 3 months. +‘C-v’ Scroll calendar backward by 3 months. + + The actions of the date/time prompt may seem complex, but I assure +you they will grow on you, and you will start getting annoyed by pretty +much any other way of entering a date/time out there. To help you +understand what is going on, the current interpretation of your input is +displayed live in the minibuffer(3). + + ---------- Footnotes ---------- + + (1) See the variable ‘org-read-date-prefer-future’. You may set that +variable to the symbol ‘time’ to even make a time before now shift the +date to tomorrow. + + (2) If you do not need/want the calendar, configure the variable +‘org-popup-calendar-for-date-prompt’. + + (3) If you find this distracting, turn off the display with +‘org-read-date-display-live’. + + +File: org, Node: Custom time format, Prev: The date/time prompt, Up: Creating Timestamps + +8.2.2 Custom time format +------------------------ + +Org mode uses the standard ISO notation for dates and times as it is +defined in ISO 8601. If you cannot get used to this and require another +representation of date and time to keep you happy, you can get it by +customizing the variables ‘org-display-custom-times’ and +‘org-time-stamp-custom-formats’. + +‘C-c C-x C-t’ (‘org-toggle-time-stamp-overlays’) + Toggle the display of custom formats for dates and times. + + Org mode needs the default format for scanning, so the custom +date/time format does not _replace_ the default format. Instead, it is +put _over_ the default format using text properties. This has the +following consequences: + + • You cannot place point onto a timestamp anymore, only before or + after. + + • The ‘S-’ and ‘S-’ keys can no longer be used to adjust + each component of a timestamp. If point is at the beginning of the + stamp, ‘S-’ and ‘S-’ change the stamp by one day, just + like ‘S-’ ‘S-’. At the end of the stamp, change the + time by one minute. + + • If the timestamp contains a range of clock times or a repeater, + these are not overlaid, but remain in the buffer as they were. + + • When you delete a timestamp character-by-character, it only + disappears from the buffer after _all_ (invisible) characters + belonging to the ISO timestamp have been removed. + + • If the custom timestamp format is longer than the default and you + are using dates in tables, table alignment will be messed up. If + the custom format is shorter, things do work as expected. + + +File: org, Node: Deadlines and Scheduling, Next: Clocking Work Time, Prev: Creating Timestamps, Up: Dates and Times + +8.3 Deadlines and Scheduling +============================ + +A timestamp may be preceded by special keywords to facilitate planning. +Both the timestamp and the keyword have to be positioned immediately +after the task they refer to. + +‘DEADLINE’ + Meaning: the task (most likely a TODO item, though not necessarily) + is supposed to be finished on that date. + + On the deadline date, the task is listed in the agenda. In + addition, the agenda for _today_ carries a warning about the + approaching or missed deadline, starting + ‘org-deadline-warning-days’ before the due date, and continuing + until the entry is marked DONE. An example: + + *** TODO write article about the Earth for the Guide + DEADLINE: <2004-02-29 Sun> + The editor in charge is [[bbdb:Ford Prefect]] + + You can specify a different lead time for warnings for a specific + deadlines using the following syntax. Here is an example with a + warning period of 5 days ‘DEADLINE: <2004-02-29 Sun -5d>’. This + warning is deactivated if the task gets scheduled and you set + ‘org-agenda-skip-deadline-prewarning-if-scheduled’ to ‘t’. + +‘SCHEDULED’ + Meaning: you are planning to start working on that task on the + given date. + + The headline is listed under the given date(1). In addition, a + reminder that the scheduled date has passed is present in the + compilation for _today_, until the entry is marked DONE, i.e., the + task is automatically forwarded until completed. + + *** TODO Call Trillian for a date on New Years Eve. + SCHEDULED: <2004-12-25 Sat> + + If you want to _delay_ the display of this task in the agenda, use + ‘SCHEDULED: <2004-12-25 Sat -2d>’: the task is still scheduled on + the 25th but will appear two days later. In case the task contains + a repeater, the delay is considered to affect all occurrences; if + you want the delay to only affect the first scheduled occurrence of + the task, use ‘--2d’ instead. See ‘org-scheduled-delay-days’ and + ‘org-agenda-skip-scheduled-delay-if-deadline’ for details on how to + control this globally or per agenda. + + Important: Scheduling an item in Org mode should _not_ be + understood in the same way that we understand _scheduling a + meeting_. Setting a date for a meeting is just a simple + appointment, you should mark this entry with a simple plain + timestamp, to get this item shown on the date where it + applies. This is a frequent misunderstanding by Org users. + In Org mode, _scheduling_ means setting a date when you want + to start working on an action item. + + You may use timestamps with repeaters in scheduling and deadline +entries. Org mode issues early and late warnings based on the +assumption that the timestamp represents the _nearest instance_ of the +repeater. However, the use of diary S-exp entries like + + <%%(diary-float t 42)> + +in scheduling and deadline timestamps is limited. Org mode does not +know enough about the internals of each S-exp function to issue early +and late warnings. However, it shows the item on each day where the +S-exp entry matches. + +* Menu: + +* Inserting deadline/schedule:: Planning items. +* Repeated tasks:: Items that show up again and again. + + ---------- Footnotes ---------- + + (1) It will still be listed on that date after it has been marked +DONE. If you do not like this, set the variable +‘org-agenda-skip-scheduled-if-done’. + + +File: org, Node: Inserting deadline/schedule, Next: Repeated tasks, Up: Deadlines and Scheduling + +8.3.1 Inserting deadlines or schedules +-------------------------------------- + +The following commands allow you to quickly insert a deadline or to +schedule an item:(1) + +‘C-c C-d’ (‘org-deadline’) + Insert ‘DEADLINE’ keyword along with a stamp. The insertion + happens in the line directly following the headline. Remove any + ‘CLOSED’ timestamp . When called with a prefix argument, also + remove any existing deadline from the entry. Depending on the + variable ‘org-log-redeadline’, take a note when changing an + existing deadline(2). + +‘C-c C-s’ (‘org-schedule’) + Insert ‘SCHEDULED’ keyword along with a stamp. The insertion + happens in the line directly following the headline. Remove any + ‘CLOSED’ timestamp. When called with a prefix argument, also + remove the scheduling date from the entry. Depending on the + variable ‘org-log-reschedule’, take a note when changing an + existing scheduling time(3). + +‘C-c / d’ (‘org-check-deadlines’) + Create a sparse tree with all deadlines that are either past-due, + or which will become due within ‘org-deadline-warning-days’. With + ‘C-u’ prefix, show all deadlines in the file. With a numeric + prefix, check that many days. For example, ‘C-1 C-c / d’ shows all + deadlines due tomorrow. + +‘C-c / b’ (‘org-check-before-date’) + Sparse tree for deadlines and scheduled items before a given date. + +‘C-c / a’ (‘org-check-after-date’) + Sparse tree for deadlines and scheduled items after a given date. + + Note that ‘org-schedule’ and ‘org-deadline’ supports setting the date +by indicating a relative time e.g., ‘+1d’ sets the date to the next day +after today, and ‘--1w’ sets the date to the previous week before any +current timestamp. + + ---------- Footnotes ---------- + + (1) The ‘SCHEDULED’ and ‘DEADLINE’ dates are inserted on the line +right below the headline. Do not put any text between this line and the +headline. + + (2) Note the corresponding ‘STARTUP’ options ‘logredeadline’, +‘lognoteredeadline’, and ‘nologredeadline’. + + (3) Note the corresponding ‘STARTUP’ options ‘logreschedule’, +‘lognotereschedule’, and ‘nologreschedule’. + + +File: org, Node: Repeated tasks, Prev: Inserting deadline/schedule, Up: Deadlines and Scheduling + +8.3.2 Repeated tasks +-------------------- + +Some tasks need to be repeated again and again. Org mode helps to +organize such tasks using a so-called repeater in a ‘DEADLINE’, +‘SCHEDULED’, or plain timestamps(1). In the following example: + + ** TODO Pay the rent + DEADLINE: <2005-10-01 Sat +1m> + +the ‘+1m’ is a repeater; the intended interpretation is that the task +has a deadline on ‘<2005-10-01>’ and repeats itself every (one) month +starting from that time. You can use yearly, monthly, weekly, daily and +hourly repeat cookies by using the ‘y’, ‘w’, ‘m’, ‘d’ and ‘h’ letters. +If you need both a repeater and a special warning period in a deadline +entry, the repeater should come first and the warning period last + + DEADLINE: <2005-10-01 Sat +1m -3d> + + Deadlines and scheduled items produce entries in the agenda when they +are over-due, so it is important to be able to mark such an entry as +DONE once you have done so. When you mark a ‘DEADLINE’ or a ‘SCHEDULED’ +with the TODO keyword ‘DONE’, it no longer produces entries in the +agenda. The problem with this is, however, is that then also the _next_ +instance of the repeated entry will not be active. Org mode deals with +this in the following way: when you try to mark such an entry DONE, +using ‘C-c C-t’, it shifts the base date of the repeating timestamp by +the repeater interval, and immediately sets the entry state back to +TODO(2). In the example above, setting the state to DONE would actually +switch the date like this: + + ** TODO Pay the rent + DEADLINE: <2005-11-01 Tue +1m> + + To mark a task with a repeater as DONE, use ‘C-- 1 C-c C-t’, i.e., +‘org-todo’ with a numeric prefix argument of ‘-1’. + + A timestamp(3) is added under the deadline, to keep a record that you +actually acted on the previous instance of this deadline. + + As a consequence of shifting the base date, this entry is no longer +visible in the agenda when checking past dates, but all future instances +will be visible. + + With the ‘+1m’ cookie, the date shift is always exactly one month. +So if you have not paid the rent for three months, marking this entry +DONE still keeps it as an overdue deadline. Depending on the task, this +may not be the best way to handle it. For example, if you forgot to +call your father for 3 weeks, it does not make sense to call him 3 times +in a single day to make up for it. Finally, there are tasks like +changing batteries which should always repeat a certain time _after_ the +last time you did it. For these tasks, Org mode has special repeaters +‘++’ and ‘.+’. For example: + + ** TODO Call Father + DEADLINE: <2008-02-10 Sun ++1w> + Marking this DONE shifts the date by at least one week, but also + by as many weeks as it takes to get this date into the future. + However, it stays on a Sunday, even if you called and marked it + done on Saturday. + + ** TODO Empty kitchen trash + DEADLINE: <2008-02-08 Fri 20:00 ++1d> + Marking this DONE shifts the date by at least one day, and also + by as many days as it takes to get the timestamp into the future. + Since there is a time in the timestamp, the next deadline in the + future will be on today's date if you complete the task before + 20:00. + + ** TODO Check the batteries in the smoke detectors + DEADLINE: <2005-11-01 Tue .+1m> + Marking this DONE will shift the date to one month after today. + + You may have both scheduling and deadline information for a specific +task. If the repeater is set for the scheduling information only, you +probably want the repeater to be ignored after the deadline. If so, set +the variable ‘org-agenda-skip-scheduled-if-deadline-is-shown’ to +‘repeated-after-deadline’. However, any scheduling information without +a repeater is no longer relevant once the task is done, and thus, +removed upon repeating the task. If you want both scheduling and +deadline information to repeat after the same interval, set the same +repeater for both timestamps. + + An alternative to using a repeater is to create a number of copies of +a task subtree, with dates shifted in each copy. The command ‘C-c C-x +c’ was created for this purpose; it is described in *note Structure +Editing::. + + ---------- Footnotes ---------- + + (1) Org does not repeat inactive timestamps, however. See *note +Timestamps::. + + (2) In fact, the target state is taken from, in this sequence, the +‘REPEAT_TO_STATE’ property, the variable ‘org-todo-repeat-to-state’ if +it is a string, the previous TODO state if ‘org-todo-repeat-to-state’ is +‘t’, or the first state of the TODO state sequence. + + (3) You can change this using the option ‘org-log-repeat’, or the +‘STARTUP’ options ‘logrepeat’, ‘lognoterepeat’, and ‘nologrepeat’. With +‘lognoterepeat’, you will also be prompted for a note. + + +File: org, Node: Clocking Work Time, Next: Effort Estimates, Prev: Deadlines and Scheduling, Up: Dates and Times + +8.4 Clocking Work Time +====================== + +Org mode allows you to clock the time you spend on specific tasks in a +project. When you start working on an item, you can start the clock. +When you stop working on that task, or when you mark the task done, the +clock is stopped and the corresponding time interval is recorded. It +also computes the total time spent on each subtree(1) of a project. And +it remembers a history or tasks recently clocked, to that you can jump +quickly between a number of tasks absorbing your time. + + To save the clock history across Emacs sessions, use: + + (setq org-clock-persist 'history) + (org-clock-persistence-insinuate) + + When you clock into a new task after resuming Emacs, the incomplete +clock(2) is retrieved (see *note Resolving idle time (1)::) and you are +prompted about what to do with it. + +* Menu: + +* Clocking commands:: Starting and stopping a clock. +* The clock table:: Detailed reports. +* Resolving idle time:: Resolving time when you’ve been idle. + + ---------- Footnotes ---------- + + (1) Clocking only works if all headings are indented with less than +30 stars. This is a hard-coded limitation of ‘lmax’ in ‘org-clock-sum’. + + (2) To resume the clock under the assumption that you have worked on +this task while outside Emacs, use ‘(setq org-clock-persist t)’. + + +File: org, Node: Clocking commands, Next: The clock table, Up: Clocking Work Time + +8.4.1 Clocking commands +----------------------- + +‘C-c C-x C-i’ (‘org-clock-in’) + Start the clock on the current item (clock-in). This inserts the + CLOCK keyword together with a timestamp. If this is not the first + clocking of this item, the multiple CLOCK lines are wrapped into a + ‘LOGBOOK’ drawer (see also the variable ‘org-clock-into-drawer’). + You can also overrule the setting of this variable for a subtree by + setting a ‘CLOCK_INTO_DRAWER’ or ‘LOG_INTO_DRAWER’ property. When + called with a ‘C-u’ prefix argument, select the task from a list of + recently clocked tasks. With two ‘C-u C-u’ prefixes, clock into + the task at point and mark it as the default task; the default task + is always be available with letter ‘d’ when selecting a clocking + task. With three ‘C-u C-u C-u’ prefixes, force continuous clocking + by starting the clock when the last clock stopped. + + While the clock is running, Org shows the current clocking time in + the mode line, along with the title of the task. The clock time + shown is all time ever clocked for this task and its children. If + the task has an effort estimate (see *note Effort Estimates::), the + mode line displays the current clocking time against it(1). If the + task is a repeating one (see *note Repeated tasks::), show only the + time since the last reset of the task(2). You can exercise more + control over show time with the ‘CLOCK_MODELINE_TOTAL’ property. + It may have the values ‘current’ to show only the current clocking + instance, ‘today’ to show all time clocked on this tasks today—see + also the variable ‘org-extend-today-until’, ‘all’ to include all + time, or ‘auto’ which is the default(3). Clicking with ‘mouse-1’ + onto the mode line entry pops up a menu with clocking options. + +‘C-c C-x C-o’ (‘org-clock-out’) + Stop the clock (clock-out). This inserts another timestamp at the + same location where the clock was last started. It also directly + computes the resulting time in inserts it after the time range as + ‘=>HH:MM’. See the variable ‘org-log-note-clock-out’ for the + possibility to record an additional note together with the + clock-out timestamp(4). + +‘C-c C-x C-x’ (‘org-clock-in-last’) + Re-clock the last clocked task. With one ‘C-u’ prefix argument, + select the task from the clock history. With two ‘C-u’ prefixes, + force continuous clocking by starting the clock when the last clock + stopped. + +‘C-c C-x C-e’ (‘org-clock-modify-effort-estimate’) + Update the effort estimate for the current clock task. + +‘C-c C-c’ or ‘C-c C-y’ (‘org-evaluate-time-range’) + Recompute the time interval after changing one of the timestamps. + This is only necessary if you edit the timestamps directly. If you + change them with ‘S-’ keys, the update is automatic. + +‘C-S-’ (‘org-clock-timestamps-up’) +‘C-S-’ (‘org-clock-timestamps-down’) + On CLOCK log lines, increase/decrease both timestamps so that the + clock duration keeps the same value. + +‘S-M-’ (‘org-timestamp-up’) +‘S-M-’ (‘org-timestamp-down’) + On ‘CLOCK’ log lines, increase/decrease the timestamp at point and + the one of the previous, or the next, clock timestamp by the same + duration. For example, if you hit ‘S-M-’ to increase a + clocked-out timestamp by five minutes, then the clocked-in + timestamp of the next clock is increased by five minutes. + +‘C-c C-t’ (‘org-todo’) + Changing the TODO state of an item to DONE automatically stops the + clock if it is running in this same item. + +‘C-c C-x C-q’ (‘org-clock-cancel’) + Cancel the current clock. This is useful if a clock was started by + mistake, or if you ended up working on something else. + +‘C-c C-x C-j’ (‘org-clock-goto’) + Jump to the headline of the currently clocked in task. With a + ‘C-u’ prefix argument, select the target task from a list of + recently clocked tasks. + +‘C-c C-x C-d’ (‘org-clock-display’) + Display time summaries for each subtree in the current buffer. + This puts overlays at the end of each headline, showing the total + time recorded under that heading, including the time of any + subheadings. You can use visibility cycling to study the tree, but + the overlays disappear when you change the buffer (see variable + ‘org-remove-highlights-with-change’) or press ‘C-c C-c’. + + The ‘l’ key may be used in the agenda (see *note Weekly/daily +agenda::) to show which tasks have been worked on or closed during a +day. + + *Important:* note that both ‘org-clock-out’ and ‘org-clock-in-last’ +can have a global keybinding and do not modify the window disposition. + + ---------- Footnotes ---------- + + (1) To add an effort estimate “on the fly”, hook a function doing +this to ‘org-clock-in-prepare-hook’. + + (2) The last reset of the task is recorded by the ‘LAST_REPEAT’ +property. + + (3) See also the variable ‘org-clock-mode-line-total’. + + (4) The corresponding in-buffer setting is: ‘#+STARTUP: +lognoteclock-out’. + + +File: org, Node: The clock table, Next: Resolving idle time, Prev: Clocking commands, Up: Clocking Work Time + +8.4.2 The clock table +--------------------- + +Org mode can produce quite complex reports based on the time clocking +information. Such a report is called a _clock table_, because it is +formatted as one or several Org tables. + +‘C-c C-x C-r’ (‘org-clock-report’) + Insert a dynamic block (see *note Dynamic Blocks::) containing a + clock report as an Org mode table into the current file. When + point is at an existing clock table, just update it. When called + with a prefix argument, jump to the first clock report in the + current document and update it. The clock table includes archived + trees. + +‘C-c C-c’ or ‘C-c C-x C-u’ (‘org-dblock-update’) + Update dynamic block at point. Point needs to be in the ‘BEGIN’ + line of the dynamic block. + +‘C-u C-c C-x C-u’ + Update all dynamic blocks (see *note Dynamic Blocks::). This is + useful if you have several clock table blocks in a buffer. + +‘S-’ +‘S-’ (‘org-clocktable-try-shift’) + Shift the current ‘:block’ interval and update the table. Point + needs to be in the ‘#+BEGIN: clocktable’ line for this command. If + ‘:block’ is ‘today’, it is shifted to ‘today-1’, etc. + + Here is an example of the frame for a clock table as it is inserted +into the buffer with the ‘C-c C-x C-r’ command: + + #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file + #+END: clocktable + + The ‘#+BEGIN’ line and specify a number of options to define the +scope, structure, and formatting of the report. Defaults for all these +options can be configured in the variable ‘org-clocktable-defaults’. + + First there are options that determine which clock entries are to be +selected: + +‘:maxlevel’ + Maximum level depth to which times are listed in the table. Clocks + at deeper levels are summed into the upper level. + +‘:scope’ + The scope to consider. This can be any of the following: + + ‘nil’ the current buffer or narrowed region + ‘file’ the full current buffer + ‘subtree’ the subtree where the clocktable is located + ‘treeN’ the surrounding level N tree, for example ‘tree3’ + ‘tree’ the surrounding level 1 tree + ‘agenda’ all agenda files + ‘("file" ...)’ scan these files + ‘FUNCTION’ scan files returned by calling FUNCTION with no argument + ‘file-with-archives’ current file and its archives + ‘agenda-with-archives’ all agenda files, including archives + +‘:block’ + The time block to consider. This block is specified either + absolutely, or relative to the current time and may be any of these + formats: + + ‘2007-12-31’ New year eve 2007 + ‘2007-12’ December 2007 + ‘2007-W50’ ISO-week 50 in 2007 + ‘2007-Q2’ 2nd quarter in 2007 + ‘2007’ the year 2007 + ‘today’, ‘yesterday’, ‘today-N’ a relative day + ‘thisweek’, ‘lastweek’, ‘thisweek-N’ a relative week + ‘thismonth’, ‘lastmonth’, ‘thismonth-N’ a relative month + ‘thisyear’, ‘lastyear’, ‘thisyear-N’ a relative year + ‘untilnow’(1) all clocked time ever + + When this option is not set, Org falls back to the value in + ‘org-clock-display-default-range’, which defaults to the current + year. + + Use ‘S-’ or ‘S-’ to shift the time interval. + +‘:tstart’ + A time string specifying when to start considering times. Relative + times like ‘"<-2w>"’ can also be used. See *note Matching tags and + properties:: for relative time syntax. + +‘:tend’ + A time string specifying when to stop considering times. Relative + times like ‘""’ can also be used. See *note Matching tags and + properties:: for relative time syntax. + +‘:wstart’ + The starting day of the week. The default is 1 for Monday. + +‘:mstart’ + The starting day of the month. The default is 1 for the first. + +‘:step’ + Set to ‘week’ or ‘day’ to split the table into chunks. To use + this, ‘:block’ or ‘:tstart’, ‘:tend’ are needed. + +‘:stepskip0’ + When non-‘nil’, do not show steps that have zero time. + +‘:fileskip0’ + When non-‘nil’, do not show table sections from files which did not + contribute. + +‘:match’ + A tags match to select entries that should contribute. See *note + Matching tags and properties:: for the match syntax. + + Then there are options that determine the formatting of the table. +There options are interpreted by the function +‘org-clocktable-write-default’, but you can specify your own function +using the ‘:formatter’ parameter. + +‘:emphasize’ + When non-‘nil’, emphasize level one and level two items. + +‘:lang’ + Language(2) to use for descriptive cells like “Task”. + +‘:link’ + Link the item headlines in the table to their origins. + +‘:narrow’ + An integer to limit the width of the headline column in the Org + table. If you write it like ‘50!’, then the headline is also + shortened in export. + +‘:indent’ + Indent each headline field according to its level. + +‘:tcolumns’ + Number of columns to be used for times. If this is smaller than + ‘:maxlevel’, lower levels are lumped into one column. + +‘:level’ + Should a level number column be included? + +‘:sort’ + A cons cell containing the column to sort and a sorting type. + E.g., ‘:sort (1 . ?a)’ sorts the first column alphabetically. + +‘:compact’ + Abbreviation for ‘:level nil :indent t :narrow 40! :tcolumns 1’. + All are overwritten except if there is an explicit ‘:narrow’. + +‘:timestamp’ + A timestamp for the entry, when available. Look for ‘SCHEDULED’, + ‘DEADLINE’, ‘TIMESTAMP’ and ‘TIMESTAMP_IA’ special properties (see + *note Special Properties::), in this order. + +‘:tags’ + When this flag is non-‘nil’, show the headline’s tags. + +‘:properties’ + List of properties shown in the table. Each property gets its own + column. + +‘:inherit-props’ + When this flag is non-‘nil’, the values for ‘:properties’ are + inherited. + +‘:formula’ + Content of a ‘TBLFM’ keyword to be added and evaluated. As a + special case, ‘:formula %’ adds a column with % time. If you do + not specify a formula here, any existing formula below the clock + table survives updates and is evaluated. + +‘:formatter’ + A function to format clock data and insert it into the buffer. + + To get a clock summary of the current level 1 tree, for the current +day, you could write: + + #+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t + #+END: clocktable + +To use a specific time range you could write(3) + + #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>" + :tend "<2006-08-10 Thu 12:00>" + #+END: clocktable + +A range starting a week ago and ending right now could be written as + + #+BEGIN: clocktable :tstart "<-1w>" :tend "" + #+END: clocktable + +A summary of the current subtree with % times would be + + #+BEGIN: clocktable :scope subtree :link t :formula % + #+END: clocktable + +A horizontally compact representation of everything clocked during last +week would be + + #+BEGIN: clocktable :scope agenda :block lastweek :compact t + #+END: clocktable + + ---------- Footnotes ---------- + + (1) When using ‘:step’, ‘untilnow’ starts from the beginning of 2003, +not the beginning of time. + + (2) Language terms can be set through the variable +‘org-clock-clocktable-language-setup’. + + (3) Note that all parameters must be specified in a single line—the +line is broken here only to fit it into the manual. + + +File: org, Node: Resolving idle time, Prev: The clock table, Up: Clocking Work Time + +8.4.3 Resolving idle time and continuous clocking +------------------------------------------------- + +Resolving idle time +................... + +If you clock in on a work item, and then walk away from your +computer—perhaps to take a phone call—you often need to “resolve” the +time you were away by either subtracting it from the current clock, or +applying it to another one. + + By customizing the variable ‘org-clock-idle-time’ to some integer, +such as 10 or 15, Emacs can alert you when you get back to your computer +after being idle for that many minutes(1), and ask what you want to do +with the idle time. There will be a question waiting for you when you +get back, indicating how much idle time has passed constantly updated +with the current amount, as well as a set of choices to correct the +discrepancy: + +‘k’ + To keep some or all of the minutes and stay clocked in, press ‘k’. + Org asks how many of the minutes to keep. Press ‘’ to keep + them all, effectively changing nothing, or enter a number to keep + that many minutes. + +‘K’ + If you use the shift key and press ‘K’, it keeps however many + minutes you request and then immediately clock out of that task. + If you keep all of the minutes, this is the same as just clocking + out of the current task. + +‘s’ + To keep none of the minutes, use ‘s’ to subtract all the away time + from the clock, and then check back in from the moment you + returned. + +‘S’ + To keep none of the minutes and just clock out at the start of the + away time, use the shift key and press ‘S’. Remember that using + shift always leave you clocked out, no matter which option you + choose. + +‘C’ + To cancel the clock altogether, use ‘C’. Note that if instead of + canceling you subtract the away time, and the resulting clock + amount is less than a minute, the clock is still canceled rather + than cluttering up the log with an empty entry. + + What if you subtracted those away minutes from the current clock, and +now want to apply them to a new clock? Simply clock in to any task +immediately after the subtraction. Org will notice that you have +subtracted time “on the books”, so to speak, and will ask if you want to +apply those minutes to the next task you clock in on. + + There is one other instance when this clock resolution magic occurs. +Say you were clocked in and hacking away, and suddenly your cat chased a +mouse who scared a hamster that crashed into your UPS’s power button! +You suddenly lose all your buffers, but thanks to auto-save you still +have your recent Org mode changes, including your last clock in. + + If you restart Emacs and clock into any task, Org will notice that +you have a dangling clock which was never clocked out from your last +session. Using that clock’s starting time as the beginning of the +unaccounted-for period, Org will ask how you want to resolve that time. +The logic and behavior is identical to dealing with away time due to +idleness; it is just happening due to a recovery event rather than a set +amount of idle time. + + You can also check all the files visited by your Org agenda for +dangling clocks at any time using ‘M-x org-resolve-clocks ’ (or +‘C-c C-x C-z’). + +Continuous clocking +................... + +You may want to start clocking from the time when you clocked out the +previous task. To enable this systematically, set +‘org-clock-continuously’ to non-‘nil’. Each time you clock in, Org +retrieves the clock-out time of the last clocked entry for this session, +and start the new clock from there. + + If you only want this from time to time, use three universal prefix +arguments with ‘org-clock-in’ and two ‘C-u C-u’ with +‘org-clock-in-last’. + + ---------- Footnotes ---------- + + (1) On computers using macOS, idleness is based on actual user +idleness, not just Emacs’ idle time. For X11, you can install a utility +program ‘x11idle.c’, available in the ‘contrib/scripts/’ directory of +the Org Git distribution, or install the xprintidle package and set it +to the variable ‘org-clock-x11idle-program-name’ if you are running +Debian, to get the same general treatment of idleness. On other +systems, idle time refers to Emacs idle time only. + + +File: org, Node: Effort Estimates, Next: Timers, Prev: Clocking Work Time, Up: Dates and Times + +8.5 Effort Estimates +==================== + +If you want to plan your work in a very detailed way, or if you need to +produce offers with quotations of the estimated work effort, you may +want to assign effort estimates to entries. If you are also clocking +your work, you may later want to compare the planned effort with the +actual working time, a great way to improve planning estimates. Effort +estimates are stored in a special property ‘EFFORT’. You can set the +effort for an entry with the following commands: + +‘C-c C-x e’ (‘org-set-effort’) + Set the effort estimate for the current entry. With a prefix + argument, set it to the next allowed value—see below. This command + is also accessible from the agenda with the ‘e’ key. + +‘C-c C-x C-e’ (‘org-clock-modify-effort-estimate’) + Modify the effort estimate of the item currently being clocked. + + Clearly the best way to work with effort estimates is through column +view (see *note Column View::). You should start by setting up discrete +values for effort estimates, and a ‘COLUMNS’ format that displays these +values together with clock sums—if you want to clock your time. For a +specific buffer you can use: + + #+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 + #+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort){:} %CLOCKSUM + +or, even better, you can set up these values globally by customizing the +variables ‘org-global-properties’ and ‘org-columns-default-format’. In +particular if you want to use this setup also in the agenda, a global +setup may be advised. + + The way to assign estimates to individual items is then to switch to +column mode, and to use ‘S-’ and ‘S-’ to change the value. +The values you enter are immediately summed up in the hierarchy. In the +column next to it, any clocked time is displayed. + + If you switch to column view in the daily/weekly agenda, the effort +column summarizes the estimated work effort for each day(1), and you can +use this to find space in your schedule. To get an overview of the +entire part of the day that is committed, you can set the option +‘org-agenda-columns-add-appointments-to-effort-sum’. The appointments +on a day that take place over a specified time interval are then also +added to the load estimate of the day. + + Effort estimates can be used in secondary agenda filtering that is +triggered with the ‘/’ key in the agenda (see *note Agenda Commands::). +If you have these estimates defined consistently, two or three key +presses narrow down the list to stuff that fits into an available time +slot. + + ---------- Footnotes ---------- + + (1) Please note the pitfalls of summing hierarchical data in a flat +list (see *note Agenda Column View::). + + +File: org, Node: Timers, Prev: Effort Estimates, Up: Dates and Times + +8.6 Taking Notes with a Relative Timer +====================================== + +Org provides two types of timers. There is a relative timer that counts +up, which can be useful when taking notes during, for example, a meeting +or a video viewing. There is also a countdown timer. + + The relative and countdown are started with separate commands. + +‘C-c C-x 0’ (‘org-timer-start’) + Start or reset the relative timer. By default, the timer is set to + 0. When called with a ‘C-u’ prefix, prompt the user for a starting + offset. If there is a timer string at point, this is taken as the + default, providing a convenient way to restart taking notes after a + break in the process. When called with a double prefix argument + ‘C-u C-u’, change all timer strings in the active region by a + certain amount. This can be used to fix timer strings if the timer + was not started at exactly the right moment. + +‘C-c C-x ;’ (‘org-timer-set-timer’) + Start a countdown timer. The user is prompted for a duration. + ‘org-timer-default-timer’ sets the default countdown value. Giving + a numeric prefix argument overrides this default value. This + command is available as ‘;’ in agenda buffers. + + Once started, relative and countdown timers are controlled with the +same commands. + +‘C-c C-x .’ (‘org-timer’) + Insert a relative time into the buffer. The first time you use + this, the timer starts. Using a prefix argument restarts it. + +‘C-c C-x -’ (‘org-timer-item’) + Insert a description list item with the current relative time. + With a prefix argument, first reset the timer to 0. + +‘M-’ (‘org-insert-heading’) + Once the timer list is started, you can also use ‘M-’ to + insert new timer items. + +‘C-c C-x ,’ (‘org-timer-pause-or-continue’) + Pause the timer, or continue it if it is already paused. + +‘C-c C-x _’ (‘org-timer-stop’) + Stop the timer. After this, you can only start a new timer, not + continue the old one. This command also removes the timer from the + mode line. + + +File: org, Node: Capture Refile Archive, Next: Agenda Views, Prev: Dates and Times, Up: Top + +9 Capture, Refile, Archive +************************** + +An important part of any organization system is the ability to quickly +capture new ideas and tasks, and to associate reference material with +them. Org does this using a process called _capture_. It also can +store files related to a task (_attachments_) in a special directory. +Once in the system, tasks and projects need to be moved around. Moving +completed project trees to an archive file keeps the system compact and +fast. + +* Menu: + +* Capture:: Capturing new stuff. +* Attachments:: Add files to tasks. +* RSS Feeds:: Getting input from RSS feeds. +* Protocols:: External access to Emacs and Org. +* Refile and Copy:: Moving/copying a tree from one place to another. +* Archiving:: What to do with finished products. + + +File: org, Node: Capture, Next: Attachments, Up: Capture Refile Archive + +9.1 Capture +=========== + +Capture lets you quickly store notes with little interruption of your +work flow. Org’s method for capturing new items is heavily inspired by +John Wiegley’s excellent Remember package. + +* Menu: + +* Setting up capture:: Where notes will be stored. +* Using capture:: Commands to invoke and terminate capture. +* Capture templates:: Define the outline of different note types. + + +File: org, Node: Setting up capture, Next: Using capture, Up: Capture + +9.1.1 Setting up capture +------------------------ + +The following customization sets a default target file for notes. + + (setq org-default-notes-file (concat org-directory "/notes.org")) + + You may also define a global key for capturing new material (see +*note Activation::). + + +File: org, Node: Using capture, Next: Capture templates, Prev: Setting up capture, Up: Capture + +9.1.2 Using capture +------------------- + +‘M-x org-capture’ (‘org-capture’) + Display the capture templates menu. If you have templates defined + (see *note Capture templates::), it offers these templates for + selection or use a new Org outline node as the default template. + It inserts the template into the target file and switch to an + indirect buffer narrowed to this new node. You may then insert the + information you want. + +‘C-c C-c’ (‘org-capture-finalize’) + Once you have finished entering information into the capture + buffer, ‘C-c C-c’ returns you to the window configuration before + the capture process, so that you can resume your work without + further distraction. When called with a prefix argument, finalize + and then jump to the captured item. + +‘C-c C-w’ (‘org-capture-refile’) + Finalize the capture process by refiling the note to a different + place (see *note Refile and Copy::). Please realize that this is a + normal refiling command that will be executed—so point position at + the moment you run this command is important. If you have inserted + a tree with a parent and children, first move point back to the + parent. Any prefix argument given to this command is passed on to + the ‘org-refile’ command. + +‘C-c C-k’ (‘org-capture-kill’) + Abort the capture process and return to the previous state. + + You can also call ‘org-capture’ in a special way from the agenda, +using the ‘k c’ key combination. With this access, any timestamps +inserted by the selected capture template defaults to the date at point +in the agenda, rather than to the current date. + + To find the locations of the last stored capture, use ‘org-capture’ +with prefix commands: + +‘C-u M-x org-capture’ + Visit the target location of a capture template. You get to select + the template in the usual way. + +‘C-u C-u M-x org-capture’ + Visit the last stored capture item in its buffer. + + You can also jump to the bookmark ‘org-capture-last-stored’, which is +automatically created unless you set ‘org-capture-bookmark’ to ‘nil’. + + To insert the capture at point in an Org buffer, call ‘org-capture’ +with a ‘C-0’ prefix argument. + + +File: org, Node: Capture templates, Prev: Using capture, Up: Capture + +9.1.3 Capture templates +----------------------- + +You can use templates for different types of capture items, and for +different target locations. The easiest way to create such templates is +through the customize interface. + +‘C’ + Customize the variable ‘org-capture-templates’. + + Before we give the formal description of template definitions, let’s +look at an example. Say you would like to use one template to create +general TODO entries, and you want to put these entries under the +heading ‘Tasks’ in your file ‘~/org/gtd.org’. Also, a date tree in the +file ‘journal.org’ should capture journal entries. A possible +configuration would look like: + + (setq org-capture-templates + '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") + "* TODO %?\n %i\n %a") + ("j" "Journal" entry (file+datetree "~/org/journal.org") + "* %?\nEntered on %U\n %i\n %a"))) + +If you then press ‘t’ from the capture menu, Org will prepare the +template for you like this: + + * TODO + [[file:LINK TO WHERE YOU INITIATED CAPTURE]] + +During expansion of the template, ‘%a’ has been replaced by a link to +the location from where you called the capture command. This can be +extremely useful for deriving tasks from emails, for example. You fill +in the task definition, press ‘C-c C-c’ and Org returns you to the same +place where you started the capture process. + + To define special keys to capture to a particular template without +going through the interactive template selection, you can create your +key binding like this: + + (define-key global-map "\C-cx" + (lambda () (interactive) (org-capture nil "x"))) + +* Menu: + +* Template elements:: What is needed for a complete template entry. +* Template expansion:: Filling in information about time and context. +* Templates in contexts:: Only show a template in a specific context. + + +File: org, Node: Template elements, Next: Template expansion, Up: Capture templates + +9.1.3.1 Template elements +......................... + +Now lets look at the elements of a template definition. Each entry in +‘org-capture-templates’ is a list with the following items: + +keys + The keys that selects the template, as a string, characters only, + for example ‘"a"’, for a template to be selected with a single key, + or ‘"bt"’ for selection with two keys. When using several keys, + keys using the same prefix key must be sequential in the list and + preceded by a 2-element entry explaining the prefix key, for + example: + + ("b" "Templates for marking stuff to buy") + + If you do not define a template for the ‘C’ key, this key opens the + Customize buffer for this complex variable. + +description + A short string describing the template, shown during selection. + +type + The type of entry, a symbol. Valid values are: + + ‘entry’ + An Org mode node, with a headline. Will be filed as the child + of the target entry or as a top-level entry. The target file + should be an Org file. + + ‘item’ + A plain list item, placed in the first plain list at the + target location. Again the target file should be an Org file. + + ‘checkitem’ + A checkbox item. This only differs from the plain list item + by the default template. + + ‘table-line’ + A new line in the first table at the target location. Where + exactly the line will be inserted depends on the properties + ‘:prepend’ and ‘:table-line-pos’ (see below). + + ‘plain’ + Text to be inserted as it is. + +target + Specification of where the captured item should be placed. In Org + files, targets usually define a node. Entries will become children + of this node. Other types will be added to the table or list in + the body of this node. Most target specifications contain a file + name. If that file name is the empty string, it defaults to + ‘org-default-notes-file’. A file can also be given as a variable + or as a function called with no argument. When an absolute path is + not specified for a target, it is taken as relative to + ‘org-directory’. + + Valid values are: + + ‘(file "path/to/file")’ + Text will be placed at the beginning or end of that file. + + ‘(id "id of existing org entry")’ + Filing as child of this entry, or in the body of the entry. + + ‘(file+headline "filename" "node headline")’ + Fast configuration if the target heading is unique in the + file. + + ‘(file+olp "filename" "Level 1 heading" "Level 2" ...)’ + For non-unique headings, the full path is safer. + + ‘(file+regexp "filename" "regexp to find location")’ + Use a regular expression to position point. + + ‘(file+olp+datetree "filename" [ "Level 1 heading" ...])’ + This target(1) creates a heading in a date tree(2) for today’s + date. If the optional outline path is given, the tree will be + built under the node it is pointing to, instead of at top + level. Check out the ‘:time-prompt’ and ‘:tree-type’ + properties below for additional options. + + ‘(file+function "filename" function-finding-location)’ + A function to find the right location in the file. + + ‘(clock)’ + File to the entry that is currently being clocked. + + ‘(function function-finding-location)’ + Most general way: write your own function which both visits + the file and moves point to the right location. + +template + The template for creating the capture item. If you leave this + empty, an appropriate default template will be used. Otherwise + this is a string with escape codes, which will be replaced + depending on time and context of the capture call. The string with + escapes may be loaded from a template file, using the special + syntax ‘(file "template filename")’. See below for more details. + +properties + The rest of the entry is a property list of additional options. + Recognized properties are: + + ‘:prepend’ + Normally new captured information will be appended at the + target location (last child, last table line, last list item, + ...). Setting this property changes that. + + ‘:immediate-finish’ + When set, do not offer to edit the information, just file it + away immediately. This makes sense if the template only needs + information that can be added automatically. + + ‘:empty-lines’ + Set this to the number of lines to insert before and after the + new item. Default 0, and the only other common value is 1. + + ‘:clock-in’ + Start the clock in this item. + + ‘:clock-keep’ + Keep the clock running when filing the captured entry. + + ‘:clock-resume’ + If starting the capture interrupted a clock, restart that + clock when finished with the capture. Note that ‘:clock-keep’ + has precedence over ‘:clock-resume’. When setting both to + non-‘nil’, the current clock will run and the previous one + will not be resumed. + + ‘:time-prompt’ + Prompt for a date/time to be used for date/week trees and when + filling the template. Without this property, capture uses the + current date and time. Even if this property has not been + set, you can force the same behavior by calling ‘org-capture’ + with a ‘C-1’ prefix argument. + + ‘:tree-type’ + When ‘week’, make a week tree instead of the month tree, i.e., + place the headings for each day under a heading with the + current ISO week. + + ‘:unnarrowed’ + Do not narrow the target buffer, simply show the full buffer. + Default is to narrow it so that you only see the new material. + + ‘:table-line-pos’ + Specification of the location in the table where the new line + should be inserted. It should be a string like ‘II-3’ meaning + that the new line should become the third line before the + second horizontal separator line. + + ‘:kill-buffer’ + If the target file was not yet visited when capture was + invoked, kill the buffer again after capture is completed. + + ‘:no-save’ + Do not save the target file after finishing the capture. + + ---------- Footnotes ---------- + + (1) Org used to offer four different targets for date/week tree +capture. Now, Org automatically translates these to use +‘file+olp+datetree’, applying the ‘:time-prompt’ and ‘:tree-type’ +properties. Please rewrite your date/week-tree targets using +‘file+olp+datetree’ since the older targets are now deprecated. + + (2) A date tree is an outline structure with years on the highest +level, months or ISO weeks as sublevels and then dates on the lowest +level. Tags are allowed in the tree structure. + + +File: org, Node: Template expansion, Next: Templates in contexts, Prev: Template elements, Up: Capture templates + +9.1.3.2 Template expansion +.......................... + +In the template itself, special “%-escapes”(1) allow dynamic insertion +of content. The templates are expanded in the order given here: + +‘%[FILE]’ + Insert the contents of the file given by FILE. + +‘%(EXP)’ + Evaluate Elisp expression EXP and replace it with the result. The + EXP form must return a string. Only placeholders pre-existing + within the template, or introduced with ‘%[file]’, are expanded + this way. Since this happens after expanding non-interactive + “%-escapes”, those can be used to fill the expression. + +‘%’ + The result of format-time-string on the FORMAT specification. + +‘%t’ + Timestamp, date only. + +‘%T’ + Timestamp, with date and time. + +‘%u’, ‘%U’ + Like ‘%t’, ‘%T’ above, but inactive timestamps. + +‘%i’ + Initial content, the region when capture is called while the region + is active. If there is text before ‘%i’ on the same line, such as + indentation, and ‘%i’ is not inside a ‘%(exp)’ form, that prefix is + added before every line in the inserted text. + +‘%a’ + Annotation, normally the link created with ‘org-store-link’. + +‘%A’ + Like ‘%a’, but prompt for the description part. + +‘%l’ + Like ‘%a’, but only insert the literal link. + +‘%c’ + Current kill ring head. + +‘%x’ + Content of the X clipboard. + +‘%k’ + Title of the currently clocked task. + +‘%K’ + Link to the currently clocked task. + +‘%n’ + User name (taken from ‘user-full-name’). + +‘%f’ + File visited by current buffer when org-capture was called. + +‘%F’ + Full path of the file or directory visited by current buffer. + +‘%:keyword’ + Specific information for certain link types, see below. + +‘%^g’ + Prompt for tags, with completion on tags in target file. + +‘%^G’ + Prompt for tags, with completion all tags in all agenda files. + +‘%^t’ + Like ‘%t’, but prompt for date. Similarly ‘%^T’, ‘%^u’, ‘%^U’. + You may define a prompt like ‘%^{Birthday}t’. + +‘%^C’ + Interactive selection of which kill or clip to use. + +‘%^L’ + Like ‘%^C’, but insert as link. + +‘%^{PROP}p’ + Prompt the user for a value for property PROP. + +‘%^{PROMPT}’ + Prompt the user for a string and replace this sequence with it. + You may specify a default value and a completion table with + ‘%^{prompt|default|completion2|completion3...}’. The arrow keys + access a prompt-specific history. + +‘%\N’ + Insert the text entered at the Nth ‘%^{PROMPT}’, where N is a + number, starting from 1. + +‘%?’ + After completing the template, position point here. + + For specific link types, the following keywords are defined(2): + +Link type Available keywords +-------------------------------------------------------------------------- +bbdb ‘%:name’, ‘%:company’ +irc ‘%:server’, ‘%:port’, ‘%:nick’ +mh, rmail ‘%:type’, ‘%:subject’, ‘%:message-id’ + ‘%:from’, ‘%:fromname’, ‘%:fromaddress’ + ‘%:to’, ‘%:toname’, ‘%:toaddress’ + ‘%:date’ (message date header field) + ‘%:date-timestamp’ (date as active timestamp) + ‘%:date-timestamp-inactive’ (date as inactive timestamp) + ‘%:fromto’ (either “to NAME” or “from NAME”)(3) +gnus ‘%:group’, for messages also all email fields +w3, w3m ‘%:url’ +info ‘%:file’, ‘%:node’ +calendar ‘%:date’ +org-protocol ‘%:link’, ‘%:description’, ‘%:annotation’ + + ---------- Footnotes ---------- + + (1) If you need one of these sequences literally, escape the ‘%’ with +a backslash. + + (2) If you define your own link types (see *note Adding Hyperlink +Types::), any property you store with ‘org-store-link-props’ can be +accessed in capture templates in a similar way. + + (3) This is always the other, not the user. See the variable +‘org-from-is-user-regexp’. + + +File: org, Node: Templates in contexts, Prev: Template expansion, Up: Capture templates + +9.1.3.3 Templates in contexts +............................. + +To control whether a capture template should be accessible from a +specific context, you can customize ‘org-capture-templates-contexts’. +Let’s say, for example, that you have a capture template “p” for storing +Gnus emails containing patches. Then you would configure this option +like this: + + (setq org-capture-templates-contexts + '(("p" (in-mode . "message-mode")))) + + You can also tell that the command key ‘p’ should refer to another +template. In that case, add this command key like this: + + (setq org-capture-templates-contexts + '(("p" "q" (in-mode . "message-mode")))) + + See the docstring of the variable for more information. + + +File: org, Node: Attachments, Next: RSS Feeds, Prev: Capture, Up: Capture Refile Archive + +9.2 Attachments +=============== + +It is often useful to associate reference material with an outline +node/task. Small chunks of plain text can simply be stored in the +subtree of a project. Hyperlinks (see *note Hyperlinks::) can establish +associations with files that live elsewhere on your computer or in the +cloud, like emails or source code files belonging to a project. Another +method is _attachments_, which are files located in a directory +belonging to an outline node. Org uses directories named by the unique +ID of each entry. These directories are located in the ‘data/’ +directory which lives in the same directory where your Org file +lives(1). If you initialize this directory with ‘git init’, Org +automatically commits changes when it sees them. The attachment system +has been contributed to Org by John Wiegley. + + In cases where it seems better to do so, you can attach a directory +of your choice to an entry. You can also make children inherit the +attachment directory from a parent, so that an entire subtree uses the +same attached directory. + + The following commands deal with attachments: + +‘C-c C-a’ (‘org-attach’) + The dispatcher for commands related to the attachment system. + After these keys, a list of commands is displayed and you must + press an additional key to select a command: + + ‘a’ (‘org-attach-attach’) + Select a file and move it into the task’s attachment + directory. The file is copied, moved, or linked, depending on + ‘org-attach-method’. Note that hard links are not supported + on all systems. + + ‘c’/‘m’/‘l’ + Attach a file using the copy/move/link method. Note that hard + links are not supported on all systems. + + ‘n’ (‘org-attach-new’) + Create a new attachment as an Emacs buffer. + + ‘z’ (‘org-attach-sync’) + Synchronize the current task with its attachment directory, in + case you added attachments yourself. + + ‘o’ (‘org-attach-open’) + Open current task’s attachment. If there is more than one, + prompt for a file name first. Opening follows the rules set + by ‘org-file-apps’. For more details, see the information on + following hyperlinks (see *note Handling Links::). + + ‘O’ (‘org-attach-open-in-emacs’) + Also open the attachment, but force opening the file in Emacs. + + ‘f’ (‘org-attach-reveal’) + Open the current task’s attachment directory. + + ‘F’ (‘org-attach-reveal-in-emacs’) + Also open the directory, but force using Dired in Emacs. + + ‘d’ (‘org-attach-delete-one’) + Select and delete a single attachment. + + ‘D’ (‘org-attach-delete-all’) + Delete all of a task’s attachments. A safer way is to open + the directory in Dired and delete from there. + + ‘s’ (‘org-attach-set-directory’) + Set a specific directory as the entry’s attachment directory. + This works by putting the directory path into the ‘ATTACH_DIR’ + property. + + ‘i’ (‘org-attach-set-inherit’) + Set the ‘ATTACH_DIR_INHERIT’ property, so that children use + the same directory for attachments as the parent does. + + It is possible to attach files to a subtree from a Dired buffer. To +use this feature, have one window in Dired mode containing the file(s) +to be attached and another window with point in the subtree that shall +get the attachments. In the Dired window, with point on a file, ‘M-x +org-attach-dired-to-subtree’ attaches the file to the subtree using the +attachment method set by variable ‘org-attach-method’. When files are +marked in the Dired window then all marked files get attached. + + Add the following lines to the Emacs init file to have ‘C-c C-x a’ +attach files in Dired buffers. + + (add-hook 'dired-mode-hook + (lambda () + (define-key dired-mode-map + (kbd "C-c C-x a") + #'org-attach-dired-to-subtree))) + + The following code shows how to bind the previous command with a +specific attachment method. + + (add-hook 'dired-mode-hook + (lambda () + (define-key dired-mode-map (kbd "C-c C-x c") + (lambda () + (interactive) + (let ((org-attach-method 'cp)) + (call-interactively #'org-attach-dired-to-subtree)))))) + + ---------- Footnotes ---------- + + (1) If you move entries or Org files from one directory to another, +you may want to configure ‘org-attach-directory’ to contain an absolute +path. + + +File: org, Node: RSS Feeds, Next: Protocols, Prev: Attachments, Up: Capture Refile Archive + +9.3 RSS Feeds +============= + +Org can add and change entries based on information found in RSS feeds +and Atom feeds. You could use this to make a task out of each new +podcast in a podcast feed. Or you could use a phone-based note-creating +service on the web to import tasks into Org. To access feeds, configure +the variable ‘org-feed-alist’. The docstring of this variable has +detailed information. With the following + + (setq org-feed-alist + '(("Slashdot" + "http://rss.slashdot.org/Slashdot/slashdot" + "~/txt/org/feeds.org" "Slashdot Entries"))) + +new items from the feed provided by ‘rss.slashdot.org’ result in new +entries in the file ‘~/org/feeds.org’ under the heading ‘Slashdot +Entries’, whenever the following command is used: + +‘C-c C-x g’ (‘org-feed-update-all’) + Collect items from the feeds configured in ‘org-feed-alist’ and act + upon them. + +‘C-c C-x G’ (‘org-feed-goto-inbox’) + Prompt for a feed name and go to the inbox configured for this + feed. + + Under the same headline, Org creates a drawer ‘FEEDSTATUS’ in which +it stores information about the status of items in the feed, to avoid +adding the same item several times. + + For more information, including how to read atom feeds, see +‘org-feed.el’ and the docstring of ‘org-feed-alist’. + + +File: org, Node: Protocols, Next: Refile and Copy, Prev: RSS Feeds, Up: Capture Refile Archive + +9.4 Protocols for External Access +================================= + +Org protocol is a means to trigger custom actions in Emacs from external +applications. Any application that supports calling external programs +with an URL as argument may be used with this functionality. For +example, you can configure bookmarks in your web browser to send a link +to the current page to Org and create a note from it using capture (see +*note Capture::). You can also create a bookmark that tells Emacs to +open the local source file of a remote website you are browsing. + + In order to use Org protocol from an application, you need to +register ‘org-protocol://’ as a valid scheme-handler. External calls +are passed to Emacs through the ‘emacsclient’ command, so you also need +to ensure an Emacs server is running. More precisely, when the +application calls + + emacsclient org-protocol://PROTOCOL?key1=val1&key2=val2 + +Emacs calls the handler associated to PROTOCOL with argument ‘(:key1 +val1 :key2 val2)’. + + Org protocol comes with three predefined protocols, detailed in the +following sections. Configure ‘org-protocol-protocol-alist’ to define +your own. + +* Menu: + +* store-link protocol:: Store a link, push URL to kill-ring. +* capture protocol:: Fill a buffer with external information. +* open-source protocol:: Edit published contents. + + +File: org, Node: store-link protocol, Next: capture protocol, Up: Protocols + +9.4.1 ‘store-link’ protocol +--------------------------- + +Using ‘store-link’ handler, you can copy links, insertable through ‘M-x +org-insert-link’ or yanking thereafter. More precisely, the command + + emacsclient org-protocol://store-link?url=URL&title=TITLE + +stores the following link: + + [[URL][TITLE]] + + In addition, URL is pushed on the kill-ring for yanking. You need to +encode URL and TITLE if they contain slashes, and probably quote those +for the shell. + + To use this feature from a browser, add a bookmark with an arbitrary +name, e.g., ‘Org: store-link’ and enter this as _Location_: + + javascript:location.href='org-protocol://store-link?url='+ + encodeURIComponent(location.href); + + +File: org, Node: capture protocol, Next: open-source protocol, Prev: store-link protocol, Up: Protocols + +9.4.2 ‘capture’ protocol +------------------------ + +Activating “capture” handler pops up a ‘Capture’ buffer and fills the +capture template associated to the ‘X’ key with them. + + emacsclient org-protocol://capture?template=X?url=URL?title=TITLE?body=BODY + + To use this feature, add a bookmark with an arbitrary name, e.g., +‘Org: capture’, and enter this as ‘Location’: + + javascript:location.href='org-protocol://capture?template=x'+ + '&url='+encodeURIComponent(window.location.href)+ + '&title='+encodeURIComponent(document.title)+ + '&body='+encodeURIComponent(window.getSelection()); + + The result depends on the capture template used, which is set in the +bookmark itself, as in the example above, or in +‘org-protocol-default-template-key’. + + The following template placeholders are available: + + %:link The URL + %:description The webpage title + %:annotation Equivalent to [[%:link][%:description]] + %i The selected text + + +File: org, Node: open-source protocol, Prev: capture protocol, Up: Protocols + +9.4.3 ‘open-source’ protocol +---------------------------- + +The ‘open-source’ handler is designed to help with editing local sources +when reading a document. To that effect, you can use a bookmark with +the following location: + + javascript:location.href='org-protocol://open-source?&url='+ + encodeURIComponent(location.href) + + The variable ‘org-protocol-project-alist’ maps URLs to local file +names, by stripping URL parameters from the end and replacing the +‘:base-url’ with ‘:working-directory’ and ‘:online-suffix’ with +‘:working-suffix’. For example, assuming you own a local copy of +‘https://orgmode.org/worg/’ contents at ‘/home/user/worg’, you can set +‘org-protocol-project-alist’ to the following + + (setq org-protocol-project-alist + '(("Worg" + :base-url "https://orgmode.org/worg/" + :working-directory "/home/user/worg/" + :online-suffix ".html" + :working-suffix ".org"))) + +If you are now browsing +‘https://orgmode.org/worg/org-contrib/org-protocol.html’ and find a typo +or have an idea about how to enhance the documentation, simply click the +bookmark and start editing. + + However, such mapping may not yield the desired results. Suppose you +maintain an online store located at ‘http://example.com/’. The local +sources reside in ‘/home/user/example/’. It is common practice to serve +all products in such a store through one file and rewrite URLs that do +not match an existing file on the server. That way, a request to +‘http://example.com/print/posters.html’ might be rewritten on the server +to something like +‘http://example.com/shop/products.php/posters.html.php’. The +‘open-source’ handler probably cannot find a file named +‘/home/user/example/print/posters.html.php’ and fails. + + Such an entry in ‘org-protocol-project-alist’ may hold an additional +property ‘:rewrites’. This property is a list of cons cells, each of +which maps a regular expression to a path relative to the +‘:working-directory’. + + Now map the URL to the path ‘/home/user/example/products.php’ by +adding ‘:rewrites’ rules like this: + + (setq org-protocol-project-alist + '(("example.com" + :base-url "http://example.com/" + :working-directory "/home/user/example/" + :online-suffix ".php" + :working-suffix ".php" + :rewrites (("example.com/print/" . "products.php") + ("example.com/$" . "index.php"))))) + +Since ‘example.com/$’ is used as a regular expression, it maps +‘http://example.com/’, ‘https://example.com’, ‘http://www.example.com/’ +and similar to ‘/home/user/example/index.php’. + + The ‘:rewrites’ rules are searched as a last resort if and only if no +existing file name is matched. + + Two functions can help you filling ‘org-protocol-project-alist’ with +valid contents: ‘org-protocol-create’ and ‘org-protocol-create-for-org’. +The latter is of use if you’re editing an Org file that is part of a +publishing project. + + +File: org, Node: Refile and Copy, Next: Archiving, Prev: Protocols, Up: Capture Refile Archive + +9.5 Refile and Copy +=================== + +When reviewing the captured data, you may want to refile or to copy some +of the entries into a different list, for example into a project. +Cutting, finding the right location, and then pasting the note is +cumbersome. To simplify this process, you can use the following special +command: + +‘C-c M-w’ (‘org-copy’) + Copying works like refiling, except that the original note is not + deleted. + +‘C-c C-w’ (‘org-refile’) + Refile the entry or region at point. This command offers possible + locations for refiling the entry and lets you select one with + completion. The item (or all items in the region) is filed below + the target heading as a subitem. Depending on + ‘org-reverse-note-order’, it is either the first or last subitem. + + By default, all level 1 headlines in the current buffer are + considered to be targets, but you can have more complex definitions + across a number of files. See the variable ‘org-refile-targets’ + for details. If you would like to select a location via a + file-path-like completion along the outline path, see the variables + ‘org-refile-use-outline-path’ and + ‘org-outline-path-complete-in-steps’. If you would like to be able + to create new nodes as new parents for refiling on the fly, check + the variable ‘org-refile-allow-creating-parent-nodes’. When the + variable ‘org-log-refile’(1) is set, a timestamp or a note is + recorded whenever an entry is refiled. + +‘C-u C-c C-w’ + Use the refile interface to jump to a heading. + +‘C-u C-u C-c C-w’ (‘org-refile-goto-last-stored’) + Jump to the location where ‘org-refile’ last moved a tree to. + +‘C-2 C-c C-w’ + Refile as the child of the item currently being clocked. + +‘C-3 C-c C-w’ + Refile and keep the entry in place. Also see ‘org-refile-keep’ to + make this the default behavior, and beware that this may result in + duplicated ‘ID’ properties. + +‘C-0 C-c C-w’ or ‘C-u C-u C-u C-c C-w’ (‘org-refile-cache-clear’) + Clear the target cache. Caching of refile targets can be turned on + by setting ‘org-refile-use-cache’. To make the command see new + possible targets, you have to clear the cache with this command. + + ---------- Footnotes ---------- + + (1) Note the corresponding ‘STARTUP’ options ‘logrefile’, +‘lognoterefile’, and ‘nologrefile’. + + +File: org, Node: Archiving, Prev: Refile and Copy, Up: Capture Refile Archive + +9.6 Archiving +============= + +When a project represented by a (sub)tree is finished, you may want to +move the tree out of the way and to stop it from contributing to the +agenda. Archiving is important to keep your working files compact and +global searches like the construction of agenda views fast. + +‘C-c C-x C-a’ (‘org-archive-subtree-default’) + Archive the current entry using the command specified in the + variable ‘org-archive-default-command’. + +* Menu: + +* Moving subtrees:: Moving a tree to an archive file. +* Internal archiving:: Switch off a tree but keep it in the file. + + +File: org, Node: Moving subtrees, Next: Internal archiving, Up: Archiving + +9.6.1 Moving a tree to an archive file +-------------------------------------- + +The most common archiving action is to move a project tree to another +file, the archive file. + +‘C-c C-x C-s’ or short ‘C-c $’ (‘org-archive-subtree’) + Archive the subtree starting at point position to the location + given by ‘org-archive-location’. + +‘C-u C-c C-x C-s’ + Check if any direct children of the current headline could be moved + to the archive. To do this, check each subtree for open TODO + entries. If none is found, the command offers to move it to the + archive location. If point is _not_ on a headline when this + command is invoked, check level 1 trees. + +‘C-u C-u C-c C-x C-s’ + As above, but check subtree for timestamps instead of TODO entries. + The command offers to archive the subtree if it _does_ contain a + timestamp, and that timestamp is in the past. + + The default archive location is a file in the same directory as the +current file, with the name derived by appending ‘_archive’ to the +current file name. You can also choose what heading to file archived +items under, with the possibility to add them to a datetree in a file. +For information and examples on how to specify the file and the heading, +see the documentation string of the variable ‘org-archive-location’. + + There is also an in-buffer option for setting this variable, for +example: + + #+ARCHIVE: %s_done:: + + If you would like to have a special archive location for a single +entry or a (sub)tree, give the entry an ‘ARCHIVE’ property with the +location as the value (see *note Properties and Columns::). + + When a subtree is moved, it receives a number of special properties +that record context information like the file from where the entry came, +its outline path the archiving time etc. Configure the variable +‘org-archive-save-context-info’ to adjust the amount of information +added. + + +File: org, Node: Internal archiving, Prev: Moving subtrees, Up: Archiving + +9.6.2 Internal archiving +------------------------ + +If you want to just switch off—for agenda views—certain subtrees without +moving them to a different file, you can use the ‘ARCHIVE’ tag. + + A headline that is marked with the ‘ARCHIVE’ tag (see *note Tags::) +stays at its location in the outline tree, but behaves in the following +way: + + • It does not open when you attempt to do so with a visibility + cycling command (see *note Visibility Cycling::). You can force + cycling archived subtrees with ‘C-’, or by setting the option + ‘org-cycle-open-archived-trees’. Also normal outline commands, + like ‘outline-show-all’, open archived subtrees. + + • During sparse tree construction (see *note Sparse Trees::), matches + in archived subtrees are not exposed, unless you configure the + option ‘org-sparse-tree-open-archived-trees’. + + • During agenda view construction (see *note Agenda Views::), the + content of archived trees is ignored unless you configure the + option ‘org-agenda-skip-archived-trees’, in which case these trees + are always included. In the agenda you can press ‘v a’ to get + archives temporarily included. + + • Archived trees are not exported (see *note Exporting::), only the + headline is. Configure the details using the variable + ‘org-export-with-archived-trees’. + + • Archived trees are excluded from column view unless the variable + ‘org-columns-skip-archived-trees’ is configured to ‘nil’. + + The following commands help manage the ‘ARCHIVE’ tag: + +‘C-c C-x a’ (‘org-toggle-archive-tag’) + Toggle the archive tag for the current headline. When the tag is + set, the headline changes to a shadowed face, and the subtree below + it is hidden. + +‘C-u C-c C-x a’ + Check if any direct children of the current headline should be + archived. To do this, check each subtree for open TODO entries. + If none is found, the command offers to set the ‘ARCHIVE’ tag for + the child. If point is _not_ on a headline when this command is + invoked, check the level 1 trees. + +‘C-’ (‘org-force-cycle-archived’) + Cycle a tree even if it is tagged with ‘ARCHIVE’. + +‘C-c C-x A’ (‘org-archive-to-archive-sibling’) + Move the current entry to the _Archive Sibling_. This is a sibling + of the entry with the heading ‘Archive’ and the archive tag. The + entry becomes a child of that sibling and in this way retains a lot + of its original context, including inherited tags and approximate + position in the outline. + + +File: org, Node: Agenda Views, Next: Markup for Rich Contents, Prev: Capture Refile Archive, Up: Top + +10 Agenda Views +*************** + +Due to the way Org works, TODO items, time-stamped items, and tagged +headlines can be scattered throughout a file or even a number of files. +To get an overview of open action items, or of events that are important +for a particular date, this information must be collected, sorted and +displayed in an organized way. + + Org can select items based on various criteria and display them in a +separate buffer. Six different view types are provided: + + • an _agenda_ that is like a calendar and shows information for + specific dates, + + • a _TODO list_ that covers all unfinished action items, + + • a _match view_, showings headlines based on the tags, properties, + and TODO state associated with them, + + • a _text search view_ that shows all entries from multiple files + that contain specified keywords, + + • a _stuck projects view_ showing projects that currently do not move + along, and + + • _custom views_ that are special searches and combinations of + different views. + + The extracted information is displayed in a special _agenda buffer_. +This buffer is read-only, but provides commands to visit the +corresponding locations in the original Org files, and even to edit +these files remotely. + + By default, the report ignores commented (see *note Comment Lines::) +and archived (see *note Internal archiving::) entries. You can override +this by setting ‘org-agenda-skip-comment-trees’ and +‘org-agenda-skip-archived-trees’ to ‘nil’. + + Two variables control how the agenda buffer is displayed and whether +the window configuration is restored when the agenda exits: +‘org-agenda-window-setup’ and ‘org-agenda-restore-windows-after-quit’. + +* Menu: + +* Agenda Files:: Files being searched for agenda information. +* Agenda Dispatcher:: Keyboard access to agenda views. +* Built-in Agenda Views:: What is available out of the box? +* Presentation and Sorting:: How agenda items are prepared for display. +* Agenda Commands:: Remote editing of Org trees. +* Custom Agenda Views:: Defining special searches and views. +* Exporting Agenda Views:: Writing a view to a file. +* Agenda Column View:: Using column view for collected entries. + + +File: org, Node: Agenda Files, Next: Agenda Dispatcher, Up: Agenda Views + +10.1 Agenda Files +================= + +The information to be shown is normally collected from all _agenda +files_, the files listed in the variable ‘org-agenda-files’(1). If a +directory is part of this list, all files with the extension ‘.org’ in +this directory are part of the list. + + Thus, even if you only work with a single Org file, that file should +be put into the list(2). You can customize ‘org-agenda-files’, but the +easiest way to maintain it is through the following commands + +‘C-c [’ (‘org-agenda-file-to-front’) + Add current file to the list of agenda files. The file is added to + the front of the list. If it was already in the list, it is moved + to the front. With a prefix argument, file is added/moved to the + end. + +‘C-c ]’ (‘org-remove-file’) + Remove current file from the list of agenda files. + +‘C-'’ +‘C-,’ (‘org-cycle-agenda-files’) + Cycle through agenda file list, visiting one file after the other. + +‘M-x org-switchb’ + Command to use an iswitchb-like interface to switch to and between + Org buffers. + +The Org menu contains the current list of files and can be used to visit +any of them. + + If you would like to focus the agenda temporarily on a file not in +this list, or on just one file in the list, or even on only a subtree in +a file, then this can be done in different ways. For a single agenda +command, you may press ‘<’ once or several times in the dispatcher (see +*note Agenda Dispatcher::). To restrict the agenda scope for an +extended period, use the following commands: + +‘C-c C-x <’ (‘org-agenda-set-restriction-lock’) + Restrict the agenda to the current subtree. If there already is a + restriction at point, remove it. When called with a universal + prefix argument or with point before the first headline in a file, + set the agenda scope to the entire file. This restriction remains + in effect until removed with ‘C-c C-x >’, or by typing either ‘<’ + or ‘>’ in the agenda dispatcher. If there is a window displaying + an agenda view, the new restriction takes effect immediately. + +‘C-c C-x >’ (‘org-agenda-remove-restriction-lock’) + Remove the restriction created by ‘C-c C-x <’. + + When working with Speedbar, you can use the following commands in the +Speedbar frame: + +‘<’ (‘org-speedbar-set-agenda-restriction’) + Restrict the agenda to the item—either an Org file or a subtree in + such a file—at point in the Speedbar frame. If agenda is already + restricted there, remove the restriction. If there is a window + displaying an agenda view, the new restriction takes effect + immediately. + +‘>’ (‘org-agenda-remove-restriction-lock’) + Remove the restriction. + + ---------- Footnotes ---------- + + (1) If the value of that variable is not a list, but a single file +name, then the list of agenda files in maintained in that external file. + + (2) When using the dispatcher, pressing ‘<’ before selecting a +command actually limits the command to the current file, and ignores +‘org-agenda-files’ until the next dispatcher command. + + +File: org, Node: Agenda Dispatcher, Next: Built-in Agenda Views, Prev: Agenda Files, Up: Agenda Views + +10.2 The Agenda Dispatcher +========================== + +The views are created through a dispatcher, accessible with ‘M-x +org-agenda’, or, better, bound to a global key (see *note Activation::). +It displays a menu from which an additional letter is required to +execute a command. The dispatcher offers the following default +commands: + +‘a’ + Create the calendar-like agenda (see *note Weekly/daily agenda::). + +‘t’ or ‘T’ + Create a list of all TODO items (see *note Global TODO list::). + +‘m’ or ‘M’ + Create a list of headlines matching a given expression (see *note + Matching tags and properties::). + +‘s’ + Create a list of entries selected by a boolean expression of + keywords and/or regular expressions that must or must not occur in + the entry. + +‘/’ + Search for a regular expression in all agenda files and + additionally in the files listed in + ‘org-agenda-text-search-extra-files’. This uses the Emacs command + ‘multi-occur’. A prefix argument can be used to specify the number + of context lines for each match, default is + 1. +‘#’ or ‘!’ + Create a list of stuck projects (see *note Stuck projects::). + +‘<’ + Restrict an agenda command to the current buffer(1). After + pressing ‘<’, you still need to press the character selecting the + command. + +‘< <’ + If there is an active region, restrict the following agenda command + to the region. Otherwise, restrict it to the current subtree(2). + After pressing ‘< <’, you still need to press the character + selecting the command. + +‘*’ + Toggle sticky agenda views. By default, Org maintains only a + single agenda buffer and rebuilds it each time you change the view, + to make sure everything is always up to date. If you switch + between views often and the build time bothers you, you can turn on + sticky agenda buffers (make this the default by customizing the + variable ‘org-agenda-sticky’). With sticky agendas, the dispatcher + only switches to the selected view, you need to update it by hand + with ‘r’ or ‘g’. You can toggle sticky agenda view any time with + ‘org-toggle-sticky-agenda’. + + You can also define custom commands that are accessible through the +dispatcher, just like the default commands. This includes the +possibility to create extended agenda buffers that contain several +blocks together, for example the weekly agenda, the global TODO list and +a number of special tags matches. See *note Custom Agenda Views::. + + ---------- Footnotes ---------- + + (1) For backward compatibility, you can also press ‘1’ to restrict to +the current buffer. + + (2) For backward compatibility, you can also press ‘0’ to restrict to +the current region/subtree. + + +File: org, Node: Built-in Agenda Views, Next: Presentation and Sorting, Prev: Agenda Dispatcher, Up: Agenda Views + +10.3 The Built-in Agenda Views +============================== + +In this section we describe the built-in views. + +* Menu: + +* Weekly/daily agenda:: The calendar page with current tasks. +* Global TODO list:: All unfinished action items. +* Matching tags and properties:: Structured information with fine-tuned search. +* Search view:: Find entries by searching for text. +* Stuck projects:: Find projects you need to review. + + +File: org, Node: Weekly/daily agenda, Next: Global TODO list, Up: Built-in Agenda Views + +10.3.1 Weekly/daily agenda +-------------------------- + +The purpose of the weekly/daily _agenda_ is to act like a page of a +paper agenda, showing all the tasks for the current week or day. + +‘M-x org-agenda a’ (‘org-agenda-list’) + Compile an agenda for the current week from a list of Org files. + The agenda shows the entries for each day. With a numeric prefix + argument(1)—like ‘C-u 2 1 M-x org-agenda a’—you may set the number + of days to be displayed. + + The default number of days displayed in the agenda is set by the +variable ‘org-agenda-span’. This variable can be set to any number of +days you want to see by default in the agenda, or to a span name, such a +‘day’, ‘week’, ‘month’ or ‘year’. For weekly agendas, the default is to +start on the previous Monday (see ‘org-agenda-start-on-weekday’). You +can also set the start date using a date shift: ‘(setq +org-agenda-start-day "+10d")’ starts the agenda ten days from today in +the future. + + Remote editing from the agenda buffer means, for example, that you +can change the dates of deadlines and appointments from the agenda +buffer. The commands available in the Agenda buffer are listed in *note +Agenda Commands::. + +Calendar/Diary integration +.......................... + +Emacs contains the calendar and diary by Edward M. Reingold. The +calendar displays a three-month calendar with holidays from different +countries and cultures. The diary allows you to keep track of +anniversaries, lunar phases, sunrise/set, recurrent appointments +(weekly, monthly) and more. In this way, it is quite complementary to +Org. It can be very useful to combine output from Org with the diary. + + In order to include entries from the Emacs diary into Org mode’s +agenda, you only need to customize the variable + + (setq org-agenda-include-diary t) + +After that, everything happens automatically. All diary entries +including holidays, anniversaries, etc., are included in the agenda +buffer created by Org mode. ‘’, ‘’, and ‘’ can be used +from the agenda buffer to jump to the diary file in order to edit +existing diary entries. The ‘i’ command to insert new entries for the +current date works in the agenda buffer, as well as the commands ‘S’, +‘M’, and ‘C’ to display Sunrise/Sunset times, show lunar phases and to +convert to other calendars, respectively. ‘c’ can be used to switch +back and forth between calendar and agenda. + + If you are using the diary only for S-exp entries and holidays, it is +faster to not use the above setting, but instead to copy or even move +the entries into an Org file. Org mode evaluates diary-style sexp +entries, and does it faster because there is no overhead for first +creating the diary display. Note that the sexp entries must start at +the left margin, no whitespace is allowed before them, as seen in the +following segment of an Org file:(2) + + * Holidays + :PROPERTIES: + :CATEGORY: Holiday + :END: + %%(org-calendar-holiday) ; special function for holiday names + + * Birthdays + :PROPERTIES: + :CATEGORY: Ann + :END: + %%(org-anniversary 1956 5 14) Arthur Dent is %d years old + %%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old + +Anniversaries from BBDB +....................... + +If you are using the Insidious Big Brother Database to store your +contacts, you very likely prefer to store anniversaries in BBDB rather +than in a separate Org or diary file. Org supports this and can show +BBDB anniversaries as part of the agenda. All you need to do is to add +the following to one of your agenda files: + + * Anniversaries + :PROPERTIES: + :CATEGORY: Anniv + :END: + %%(org-bbdb-anniversaries) + + You can then go ahead and define anniversaries for a BBDB record. +Basically, you need a field named ‘anniversary’ for the BBDB record +which contains the date in the format ‘YYYY-MM-DD’ or ‘MM-DD’, followed +by a space and the class of the anniversary (‘birthday’, ‘wedding’, or a +format string). If you omit the class, it defaults to ‘birthday’. Here +are a few examples, the header for the file ‘org-bbdb.el’ contains more +detailed information. + + 1973-06-22 + 06-22 + 1955-08-02 wedding + 2008-04-14 %s released version 6.01 of Org mode, %d years ago + + After a change to BBDB, or for the first agenda display during an +Emacs session, the agenda display suffers a short delay as Org updates +its hash with anniversaries. However, from then on things will be very +fast, much faster in fact than a long list of ‘%%(diary-anniversary)’ +entries in an Org or Diary file. + + If you would like to see upcoming anniversaries with a bit of +forewarning, you can use the following instead: + + * Anniversaries + :PROPERTIES: + :CATEGORY: Anniv + :END: + %%(org-bbdb-anniversaries-future 3) + + That will give you three days’ warning: on the anniversary date +itself and the two days prior. The argument is optional: if omitted, it +defaults to 7. + +Appointment reminders +..................... + +Org can interact with Emacs appointments notification facility. To add +the appointments of your agenda files, use the command +‘org-agenda-to-appt’. This command lets you filter through the list of +your appointments and add only those belonging to a specific category or +matching a regular expression. It also reads a ‘APPT_WARNTIME’ property +which overrides the value of ‘appt-message-warning-time’ for this +appointment. See the docstring for details. + + ---------- Footnotes ---------- + + (1) For backward compatibility, the universal prefix argument ‘C-u’ +causes all TODO entries to be listed before the agenda. This feature is +deprecated, use the dedicated TODO list, or a block agenda instead (see +*note Block agenda::). + + (2) The variable ‘org-anniversary’ used in the example is just like +‘diary-anniversary’, but the argument order is always according to ISO +and therefore independent of the value of ‘calendar-date-style’. + + +File: org, Node: Global TODO list, Next: Matching tags and properties, Prev: Weekly/daily agenda, Up: Built-in Agenda Views + +10.3.2 The global TODO list +--------------------------- + +The global TODO list contains all unfinished TODO items formatted and +collected into a single place. + +‘M-x org-agenda t’ (‘org-todo-list’) + Show the global TODO list. This collects the TODO items from all + agenda files (see *note Agenda Views::) into a single buffer. By + default, this lists items with a state the is not a DONE state. + The buffer is in ‘agenda-mode’, so there are commands to examine + and manipulate the TODO entries directly from that buffer (see + *note Agenda Commands::). + +‘M-x org-agenda T’ (‘org-todo-list’) + Like the above, but allows selection of a specific TODO keyword. + You can also do this by specifying a prefix argument to ‘t’. You + are prompted for a keyword, and you may also specify several + keywords by separating them with ‘|’ as the boolean OR operator. + With a numeric prefix, the Nth keyword in ‘org-todo-keywords’ is + selected. + + The ‘r’ key in the agenda buffer regenerates it, and you can give a + prefix argument to this command to change the selected TODO + keyword, for example ‘3 r’. If you often need a search for a + specific keyword, define a custom command for it (see *note Agenda + Dispatcher::). + + Matching specific TODO keywords can also be done as part of a tags + search (see *note Tag Searches::). + + Remote editing of TODO items means that you can change the state of a +TODO entry with a single key press. The commands available in the TODO +list are described in *note Agenda Commands::. + + Normally the global TODO list simply shows all headlines with TODO +keywords. This list can become very long. There are two ways to keep +it more compact: + + • Some people view a TODO item that has been _scheduled_ for + execution or have a _deadline_ (see *note Timestamps::) as no + longer _open_. Configure the variables + ‘org-agenda-todo-ignore-scheduled’, + ‘org-agenda-todo-ignore-deadlines’, + ‘org-agenda-todo-ignore-timestamp’ and/or + ‘org-agenda-todo-ignore-with-date’ to exclude such items from the + global TODO list. + + • TODO items may have sublevels to break up the task into subtasks. + In such cases it may be enough to list only the highest level TODO + headline and omit the sublevels from the global list. Configure + the variable ‘org-agenda-todo-list-sublevels’ to get this behavior. + + +File: org, Node: Matching tags and properties, Next: Search view, Prev: Global TODO list, Up: Built-in Agenda Views + +10.3.3 Matching tags and properties +----------------------------------- + +If headlines in the agenda files are marked with _tags_ (see *note +Tags::), or have properties (see *note Properties and Columns::), you +can select headlines based on this metadata and collect them into an +agenda buffer. The match syntax described here also applies when +creating sparse trees with ‘C-c / m’. + +‘M-x org-agenda m’ (‘org-tags-view’) + Produce a list of all headlines that match a given set of tags. + The command prompts for a selection criterion, which is a boolean + logic expression with tags, like ‘+work+urgent-withboss’ or + ‘work|home’ (see *note Tags::). If you often need a specific + search, define a custom command for it (see *note Agenda + Dispatcher::). + +‘M-x org-agenda M’ (‘org-tags-view’) + Like ‘m’, but only select headlines that are also TODO items and + force checking subitems (see the variable + ‘org-tags-match-list-sublevels’). To exclude scheduled/deadline + items, see the variable + ‘org-agenda-tags-todo-honor-ignore-options’. Matching specific + TODO keywords together with a tags match is also possible, see + *note Tag Searches::. + + The commands available in the tags list are described in *note Agenda +Commands::. + + A search string can use Boolean operators ‘&’ for AND and ‘|’ for OR. +‘&’ binds more strongly than ‘|’. Parentheses are currently not +implemented. Each element in the search is either a tag, a regular +expression matching tags, or an expression like ‘PROPERTY OPERATOR +VALUE’ with a comparison operator, accessing a property value. Each +element may be preceded by ‘-’ to select against it, and ‘+’ is +syntactic sugar for positive selection. The AND operator ‘&’ is +optional when ‘+’ or ‘-’ is present. Here are some examples, using only +tags. + +‘+work-boss’ + Select headlines tagged ‘work’, but discard those also tagged + ‘boss’. + +‘work|laptop’ + Selects lines tagged ‘work’ or ‘laptop’. + +‘work|laptop+night’ + Like before, but require the ‘laptop’ lines to be tagged also + ‘night’. + + Instead of a tag, you may also specify a regular expression enclosed +in curly braces. For example, ‘work+{^boss.*}’ matches headlines that +contain the tag ‘:work:’ and any tag _starting_ with ‘boss’. + + Group tags (see *note Tag Hierarchy::) are expanded as regular +expressions. E.g., if ‘work’ is a group tag for the group +‘:work:lab:conf:’, then searching for ‘work’ also searches for +‘{\(?:work\|lab\|conf\)}’ and searching for ‘-work’ searches for all +headlines but those with one of the tags in the group (i.e., +‘-{\(?:work\|lab\|conf\)}’). + + You may also test for properties (see *note Properties and Columns::) +at the same time as matching tags. The properties may be real +properties, or special properties that represent other metadata (see +*note Special Properties::). For example, the property ‘TODO’ +represents the TODO keyword of the entry. Or, the property ‘LEVEL’ +represents the level of an entry. So searching +‘+LEVEL=3+boss-TODO​="DONE"’ lists all level three headlines that have +the tag ‘boss’ and are _not_ marked with the TODO keyword ‘DONE’. In +buffers with ‘org-odd-levels-only’ set, ‘LEVEL’ does not count the +number of stars, but ‘LEVEL=2’ corresponds to 3 stars etc. + + Here are more examples: + +‘work+TODO​="WAITING"’ + Select ‘work’-tagged TODO lines with the specific TODO keyword + ‘WAITING’. + +‘work+TODO​="WAITING"|home+TODO​="WAITING"’ + Waiting tasks both at work and at home. + + When matching properties, a number of different operators can be used +to test the value of a property. Here is a complex example: + + +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2 + +With={Sarah|Denny}+SCHEDULED>="<2008-10-11>" + +The type of comparison depends on how the comparison value is written: + + • If the comparison value is a plain number, a numerical comparison + is done, and the allowed operators are ‘<’, ‘=’, ‘>’, ‘<=’, ‘>=’, + and ‘<>’. + + • If the comparison value is enclosed in double-quotes, a string + comparison is done, and the same operators are allowed. + + • If the comparison value is enclosed in double-quotes _and_ angular + brackets (like ‘DEADLINE<​="<2008-12-24 18:30>"’), both values are + assumed to be date/time specifications in the standard Org way, and + the comparison is done accordingly. Valid values also include + ‘""’ for now (including time), ‘""’, and ‘""’ + for these days at 0:00 hours, i.e., without a time specification. + You can also use strings like ‘"<+5d>"’ or ‘"<-2m>"’ with units + ‘d’, ‘w’, ‘m’, and ‘y’ for day, week, month, and year, + respectively. + + • If the comparison value is enclosed in curly braces, a regexp match + is performed, with ‘=’ meaning that the regexp matches the property + value, and ‘<>’ meaning that it does not match. + + So the search string in the example finds entries tagged ‘work’ but +not ‘boss’, which also have a priority value ‘A’, a ‘Coffee’ property +with the value ‘unlimited’, an ‘EFFORT’ property that is numerically +smaller than 2, a ‘With’ property that is matched by the regular +expression ‘Sarah|Denny’, and that are scheduled on or after October 11, +2008. + + You can configure Org mode to use property inheritance during a +search, but beware that this can slow down searches considerably. See +*note Property Inheritance::, for details. + + For backward compatibility, and also for typing speed, there is also +a different way to test TODO states in a search. For this, terminate +the tags/property part of the search string (which may include several +terms connected with ‘|’) with a ‘/’ and then specify a Boolean +expression just for TODO keywords. The syntax is then similar to that +for tags, but should be applied with care: for example, a positive +selection on several TODO keywords cannot meaningfully be combined with +boolean AND. However, _negative selection_ combined with AND can be +meaningful. To make sure that only lines are checked that actually have +any TODO keyword (resulting in a speed-up), use ‘M-x org-agenda M’, or +equivalently start the TODO part after the slash with ‘!’. Using ‘M-x +org-agenda M’ or ‘/!’ does not match TODO keywords in a DONE state. +Examples: + +‘work/WAITING’ + Same as ‘work+TODO​="WAITING"’. + +‘work/!-WAITING-NEXT’ + Select ‘work’-tagged TODO lines that are neither ‘WAITING’ nor + ‘NEXT’. + +‘work/!+WAITING|+NEXT’ + Select ‘work’-tagged TODO lines that are either ‘WAITING’ or + ‘NEXT’. + + +File: org, Node: Search view, Next: Stuck projects, Prev: Matching tags and properties, Up: Built-in Agenda Views + +10.3.4 Search view +------------------ + +This agenda view is a general text search facility for Org mode entries. +It is particularly useful to find notes. + +‘M-x org-agenda s’ (‘org-search-view’) + This is a special search that lets you select entries by matching a + substring or specific words using a boolean logic. + + For example, the search string ‘computer equipment’ matches entries +that contain ‘computer equipment’ as a substring, even if the two words +are separated by more space or a line break. + + Search view can also search for specific keywords in the entry, using +Boolean logic. The search string ‘+computer +wifi -ethernet +-{8\.11[bg]}’ matches note entries that contain the keywords ‘computer’ +and ‘wifi’, but not the keyword ‘ethernet’, and which are also not +matched by the regular expression ‘8\.11[bg]’, meaning to exclude both +‘8.11b’ and ‘8.11g’. The first ‘+’ is necessary to turn on boolean +search, other ‘+’ characters are optional. For more details, see the +docstring of the command ‘org-search-view’. + + You can incrementally adjust a boolean search with the following keys + +‘[’ Add a positive search word +‘]’ Add a negative search word +‘{’ Add a positive regular expression +‘}’ Add a negative regular expression + + Note that in addition to the agenda files, this command also searches +the files listed in ‘org-agenda-text-search-extra-files’. + + +File: org, Node: Stuck projects, Prev: Search view, Up: Built-in Agenda Views + +10.3.5 Stuck projects +--------------------- + +If you are following a system like David Allen’s GTD to organize your +work, one of the “duties” you have is a regular review to make sure that +all projects move along. A _stuck_ project is a project that has no +defined next actions, so it never shows up in the TODO lists Org mode +produces. During the review, you need to identify such projects and +define next actions for them. + +‘M-x org-agenda #’ (‘org-agenda-list-stuck-projects’) + List projects that are stuck. + +‘M-x org-agenda !’ + Customize the variable ‘org-stuck-projects’ to define what a stuck + project is and how to find it. + + You almost certainly need to configure this view before it works for +you. The built-in default assumes that all your projects are level-2 +headlines, and that a project is not stuck if it has at least one entry +marked with a TODO keyword ‘TODO’ or ‘NEXT’ or ‘NEXTACTION’. + + Let’s assume that you, in your own way of using Org mode, identify +projects with a tag ‘:PROJECT:’, and that you use a TODO keyword ‘MAYBE’ +to indicate a project that should not be considered yet. Let’s further +assume that the TODO keyword ‘DONE’ marks finished projects, and that +‘NEXT’ and ‘TODO’ indicate next actions. The tag ‘:@shop:’ indicates +shopping and is a next action even without the NEXT tag. Finally, if +the project contains the special word ‘IGNORE’ anywhere, it should not +be listed either. In this case you would start by identifying eligible +projects with a tags/TODO match (see *note Tag Searches::) +‘+PROJECT/-MAYBE-DONE’, and then check for ‘TODO’, ‘NEXT’, ‘@shop’, and +‘IGNORE’ in the subtree to identify projects that are not stuck. The +correct customization for this is: + + (setq org-stuck-projects + '("+PROJECT/-MAYBE-DONE" ("NEXT" "TODO") ("@shop") + "\\")) + + Note that if a project is identified as non-stuck, the subtree of +this entry is searched for stuck projects. + + +File: org, Node: Presentation and Sorting, Next: Agenda Commands, Prev: Built-in Agenda Views, Up: Agenda Views + +10.4 Presentation and Sorting +============================= + +Before displaying items in an agenda view, Org mode visually prepares +the items and sorts them. Each item occupies a single line. The line +starts with a _prefix_ that contains the _category_ (see *note +Categories::) of the item and other important information. You can +customize in which column tags are displayed through +‘org-agenda-tags-column’. You can also customize the prefix using the +option ‘org-agenda-prefix-format’. This prefix is followed by a +cleaned-up version of the outline headline associated with the item. + +* Menu: + +* Categories:: Not all tasks are equal. +* Time-of-day specifications:: How the agenda knows the time. +* Sorting of agenda items:: The order of things. +* Filtering/limiting agenda times:: Dynamically narrow the agenda. + + +File: org, Node: Categories, Next: Time-of-day specifications, Up: Presentation and Sorting + +10.4.1 Categories +----------------- + +The category is a broad label assigned to each agenda item. By default, +the category is simply derived from the file name, but you can also +specify it with a special line in the buffer, like this: + + #+CATEGORY: Thesis + + If you would like to have a special category for a single entry or a +(sub)tree, give the entry a ‘CATEGORY’ property with the special +category you want to apply as the value. + + The display in the agenda buffer looks best if the category is not +longer than 10 characters. + + You can set up icons for category by customizing the +‘org-agenda-category-icon-alist’ variable. + + +File: org, Node: Time-of-day specifications, Next: Sorting of agenda items, Prev: Categories, Up: Presentation and Sorting + +10.4.2 Time-of-day specifications +--------------------------------- + +Org mode checks each agenda item for a time-of-day specification. The +time can be part of the timestamp that triggered inclusion into the +agenda, for example + + <2005-05-10 Tue 19:00> + +Time ranges can be specified with two timestamps: + + <2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15> + + In the headline of the entry itself, a time(range)—like ‘12:45’ or a +‘8:30-1pm’—may also appear as plain text(1). + + If the agenda integrates the Emacs diary (see *note Weekly/daily +agenda::), time specifications in diary entries are recognized as well. + + For agenda display, Org mode extracts the time and displays it in a +standard 24 hour format as part of the prefix. The example times in the +previous paragraphs would end up in the agenda like this: + + 8:30-13:00 Arthur Dent lies in front of the bulldozer + 12:45...... Ford Prefect arrives and takes Arthur to the pub + 19:00...... The Vogon reads his poem + 20:30-22:15 Marvin escorts the Hitchhikers to the bridge + + If the agenda is in single-day mode, or for the display of today, the +timed entries are embedded in a time grid, like + + 8:00...... ------------------ + 8:30-13:00 Arthur Dent lies in front of the bulldozer + 10:00...... ------------------ + 12:00...... ------------------ + 12:45...... Ford Prefect arrives and takes Arthur to the pub + 14:00...... ------------------ + 16:00...... ------------------ + 18:00...... ------------------ + 19:00...... The Vogon reads his poem + 20:00...... ------------------ + 20:30-22:15 Marvin escorts the Hitchhikers to the bridge + + The time grid can be turned on and off with the variable +‘org-agenda-use-time-grid’, and can be configured with +‘org-agenda-time-grid’. + + ---------- Footnotes ---------- + + (1) You can, however, disable this by setting +‘org-agenda-search-headline-for-time’ variable to a ‘nil’ value. + + +File: org, Node: Sorting of agenda items, Next: Filtering/limiting agenda times, Prev: Time-of-day specifications, Up: Presentation and Sorting + +10.4.3 Sorting of agenda items +------------------------------ + +Before being inserted into a view, the items are sorted. How this is +done depends on the type of view. + + • For the daily/weekly agenda, the items for each day are sorted. + The default order is to first collect all items containing an + explicit time-of-day specification. These entries are shown at the + beginning of the list, as a _schedule_ for the day. After that, + items remain grouped in categories, in the sequence given by + ‘org-agenda-files’. Within each category, items are sorted by + priority (see *note Priorities::), which is composed of the base + priority (2000 for priority ‘A’, 1000 for ‘B’, and 0 for ‘C’), plus + additional increments for overdue scheduled or deadline items. + + • For the TODO list, items remain in the order of categories, but + within each category, sorting takes place according to priority + (see *note Priorities::). The priority used for sorting derives + from the priority cookie, with additions depending on how close an + item is to its due or scheduled date. + + • For tags matches, items are not sorted at all, but just appear in + the sequence in which they are found in the agenda files. + + Sorting can be customized using the variable +‘org-agenda-sorting-strategy’, and may also include criteria based on +the estimated effort of an entry (see *note Effort Estimates::). + + +File: org, Node: Filtering/limiting agenda times, Prev: Sorting of agenda items, Up: Presentation and Sorting + +10.4.4 Filtering/limiting agenda times +-------------------------------------- + +Agenda built-in or customized commands are statically defined. Agenda +filters and limits provide two ways of dynamically narrowing down the +list of agenda entries: _filters_ and _limits_. Filters only act on the +display of the items, while limits take effect before the list of agenda +entries is built. Filters are more often used interactively, while +limits are mostly useful when defined as local variables within custom +agenda commands. + +Filtering in the agenda +....................... + +‘/’ (‘org-agenda-filter-by-tag’) + Filter the agenda view with respect to a tag and/or effort + estimates. The difference between this and a custom agenda command + is that filtering is very fast, so that you can switch quickly + between different filters without having to recreate the agenda.(1) + + You are prompted for a tag selection letter; ‘’ means any tag + at all. Pressing ‘’ at that prompt offers completion to + select a tag, including any tags that do not have a selection + character. The command then hides all entries that do not contain + or inherit this tag. When called with prefix argument, remove the + entries that _do_ have the tag. A second ‘/’ at the prompt turns + off the filter and shows any hidden entries. Pressing ‘+’ or ‘-’ + switches between filtering and excluding the next tag. + + Org also supports automatic, context-aware tag filtering. If the + variable ‘org-agenda-auto-exclude-function’ is set to a + user-defined function, that function can decide which tags should + be excluded from the agenda automatically. Once this is set, the + ‘/’ command then accepts ‘’ as a sub-option key and runs the + auto exclusion logic. For example, let’s say you use a ‘Net’ tag + to identify tasks which need network access, an ‘Errand’ tag for + errands in town, and a ‘Call’ tag for making phone calls. You + could auto-exclude these tags based on the availability of the + Internet, and outside of business hours, with something like this: + + (defun org-my-auto-exclude-function (tag) + (and (cond + ((string= tag "Net") + (/= 0 (call-process "/sbin/ping" nil nil nil + "-c1" "-q" "-t1" "mail.gnu.org"))) + ((or (string= tag "Errand") (string= tag "Call")) + (let ((hour (nth 2 (decode-time)))) + (or (< hour 8) (> hour 21))))) + (concat "-" tag))) + + (setq org-agenda-auto-exclude-function 'org-my-auto-exclude-function) + +‘<’ (‘org-agenda-filter-by-category’) + Filter the current agenda view with respect to the category of the + item at point. Pressing ‘<’ another time removes this filter. + When called with a prefix argument exclude the category of the item + at point from the agenda. + + You can add a filter preset in custom agenda commands through the + option ‘org-agenda-category-filter-preset’. See *note Setting + options::. + +‘^’ (‘org-agenda-filter-by-top-headline’) + Filter the current agenda view and only display the siblings and + the parent headline of the one at point. + +‘=’ (‘org-agenda-filter-by-regexp’) + Filter the agenda view by a regular expression: only show agenda + entries matching the regular expression the user entered. When + called with a prefix argument, it filters _out_ entries matching + the regexp. Called in a regexp-filtered agenda view, remove the + filter, unless there are two universal prefix arguments, in which + case filters are cumulated. + + You can add a filter preset in custom agenda commands through the + option ‘org-agenda-regexp-filter-preset’. See *note Setting + options::. + +‘_’ (‘org-agenda-filter-by-effort’) + Filter the agenda view with respect to effort estimates. You first + need to set up allowed efforts globally, for example + + (setq org-global-properties + '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00"))) + + You can then filter for an effort by first typing an operator, one + of ‘<’, ‘>’ and ‘=’, and then the one-digit index of an effort + estimate in your array of allowed values, where ‘0’ means the 10th + value. The filter then restricts to entries with effort + smaller-or-equal, equal, or larger-or-equal than the selected + value. For application of the operator, entries without a defined + effort are treated according to the value of + ‘org-sort-agenda-noeffort-is-high’. + + When called with a prefix argument, it removes entries matching the + condition. With two universal prefix arguments, it clears effort + filters, which can be accumulated. + + You can add a filter preset in custom agenda commands through the + option ‘org-agenda-effort-filter-preset’. See *note Setting + options::. + +‘|’ (‘org-agenda-filter-remove-all’) + Remove all filters in the current agenda view. + +Setting limits for the agenda +............................. + +Here is a list of options that you can set, either globally, or locally +in your custom agenda views (see *note Custom Agenda Views::). + +‘org-agenda-max-entries’ + Limit the number of entries. + +‘org-agenda-max-effort’ + Limit the duration of accumulated efforts (as minutes). + +‘org-agenda-max-todos’ + Limit the number of entries with TODO keywords. + +‘org-agenda-max-tags’ + Limit the number of tagged entries. + + When set to a positive integer, each option excludes entries from +other categories: for example, ‘(setq org-agenda-max-effort 100)’ limits +the agenda to 100 minutes of effort and exclude any entry that has no +effort property. If you want to include entries with no effort +property, use a negative value for ‘org-agenda-max-effort’. One useful +setup is to use ‘org-agenda-max-entries’ locally in a custom command. +For example, this custom command displays the next five entries with a +‘NEXT’ TODO keyword. + + (setq org-agenda-custom-commands + '(("n" todo "NEXT" + ((org-agenda-max-entries 5))))) + + Once you mark one of these five entry as DONE, rebuilding the agenda +will again the next five entries again, including the first entry that +was excluded so far. + + You can also dynamically set temporary limits, which are lost when +rebuilding the agenda: + +‘~’ (‘org-agenda-limit-interactively’) + This prompts for the type of limit to apply and its value. + + ---------- Footnotes ---------- + + (1) Custom commands can preset a filter by binding the variable +‘org-agenda-tag-filter-preset’ as an option. This filter is then +applied to the view and persists as a basic filter through refreshes and +more secondary filtering. The filter is a global property of the entire +agenda view—in a block agenda, you should only set this in the global +options section, not in the section of an individual block. + + +File: org, Node: Agenda Commands, Next: Custom Agenda Views, Prev: Presentation and Sorting, Up: Agenda Views + +10.5 Commands in the Agenda Buffer +================================== + +Entries in the agenda buffer are linked back to the Org file or diary +file where they originate. You are not allowed to edit the agenda +buffer itself, but commands are provided to show and jump to the +original entry location, and to edit the Org files “remotely” from the +agenda buffer. In this way, all information is stored only once, +removing the risk that your agenda and note files may diverge. + + Some commands can be executed with mouse clicks on agenda lines. For +the other commands, point needs to be in the desired line. + +Motion +------ + +‘n’ (‘org-agenda-next-line’) + Next line (same as ‘’ and ‘C-n’). + +‘p’ (‘org-agenda-previous-line’) + Previous line (same as ‘’ and ‘C-p’). + +View/Go to Org file +------------------- + +‘’ or ‘mouse-3’ (‘org-agenda-show-and-scroll-up’) + Display the original location of the item in another window. With + a prefix argument, make sure that drawers stay folded. + +‘L’ (‘org-agenda-recenter’) + Display original location and recenter that window. + +‘’ or ‘mouse-2’ (‘org-agenda-goto’) + Go to the original location of the item in another window. + +‘’ (‘org-agenda-switch-to’) + Go to the original location of the item and delete other windows. + +‘F’ (‘org-agenda-follow-mode’) + Toggle Follow mode. In Follow mode, as you move point through the + agenda buffer, the other window always shows the corresponding + location in the Org file. The initial setting for this mode in new + agenda buffers can be set with the variable + ‘org-agenda-start-with-follow-mode’. + +‘C-c C-x b’ (‘org-agenda-tree-to-indirect-buffer’) + Display the entire subtree of the current item in an indirect + buffer. With a numeric prefix argument N, go up to level N and + then take that tree. If N is negative, go up that many levels. + With a ‘C-u’ prefix, do not remove the previously used indirect + buffer. + +‘C-c C-o’ (‘org-agenda-open-link’) + Follow a link in the entry. This offers a selection of any links + in the text belonging to the referenced Org node. If there is only + one link, follow it without a selection prompt. + +Change display +-------------- + +‘A’ + Interactively select another agenda view and append it to the + current view. + +‘o’ + Delete other windows. + +‘v d’ or short ‘d’ (‘org-agenda-day-view’) + Switch to day view. When switching to day view, this setting + becomes the default for subsequent agenda refreshes. A numeric + prefix argument may be used to jump directly to a specific day of + the year. For example, ‘32 d’ jumps to February 1st. When setting + day view, a year may be encoded in the prefix argument as well. + For example, ‘200712 d’ jumps to January 12, 2007. If such a year + specification has only one or two digits, it is expanded into one + of the 30 next years or the last 69 years. + +‘v w’ or short ‘w’ (‘org-agenda-week-view’) + Switch to week view. When switching week view, this setting + becomes the default for subsequent agenda refreshes. A numeric + prefix argument may be used to jump directly to a specific day of + the ISO week. For example ‘9 w’ to ISO week number 9. When + setting week view, a year may be encoded in the prefix argument as + well. For example, ‘200712 w’ jumps to week 12 in 2007. If such a + year specification has only one or two digits, it is expanded into + one of the 30 next years or the last 69 years. + +‘v m’ (‘org-agenda-month-view’) + Switch to month view. Because month views are slow to create, they + do not become the default for subsequent agenda refreshes. A + numeric prefix argument may be used to jump directly to a specific + day of the month. When setting month view, a year may be encoded + in the prefix argument as well. For example, ‘200712 m’ jumps to + December, 2007. If such a year specification has only one or two + digits, it is expanded into one of the 30 next years or the last 69 + years. + +‘v y’ (‘org-agenda-year-view’) + Switch to year view. Because year views are slow to create, they + do not become the default for subsequent agenda refreshes. A + numeric prefix argument may be used to jump directly to a specific + day of the year. + +‘v ’ (‘org-agenda-reset-view’) + Reset the current view to ‘org-agenda-span’. + +‘f’ (‘org-agenda-later’) + Go forward in time to display the span following the current one. + For example, if the display covers a week, switch to the following + week. With a prefix argument, repeat that many times. + +‘b’ (‘org-agenda-earlier’) + Go backward in time to display earlier dates. + +‘.’ (‘org-agenda-goto-today’) + Go to today. + +‘j’ (‘org-agenda-goto-date’) + Prompt for a date and go there. + +‘J’ (‘org-agenda-clock-goto’) + Go to the currently clocked-in task _in the agenda buffer_. + +‘D’ (‘org-agenda-toggle-diary’) + Toggle the inclusion of diary entries. See *note Weekly/daily + agenda::. + +‘v l’ or ‘v L’ or short ‘l’ (‘org-agenda-log-mode’) + Toggle Logbook mode. In Logbook mode, entries that were marked + DONE while logging was on (see the variable ‘org-log-done’) are + shown in the agenda, as are entries that have been clocked on that + day. You can configure the entry types that should be included in + log mode using the variable ‘org-agenda-log-mode-items’. When + called with a ‘C-u’ prefix, show all possible logbook entries, + including state changes. When called with two prefix arguments + ‘C-u C-u’, show only logging information, nothing else. ‘v L’ is + equivalent to ‘C-u v l’. + +‘v [’ or short ‘[’ (‘org-agenda-manipulate-query-add’) + Include inactive timestamps into the current view. Only for + weekly/daily agenda. + +‘v a’ (‘org-agenda-archives-mode’) + Toggle Archives mode. In Archives mode, trees that are archived + (see *note Internal archiving::) are also scanned when producing + the agenda. To exit archives mode, press ‘v a’ again. + +‘v A’ + Toggle Archives mode. Include all archive files as well. + +‘v R’ or short ‘R’ (‘org-agenda-clockreport-mode’) + Toggle Clockreport mode. In Clockreport mode, the daily/weekly + agenda always shows a table with the clocked times for the time + span and file scope covered by the current agenda view. The + initial setting for this mode in new agenda buffers can be set with + the variable ‘org-agenda-start-with-clockreport-mode’. By using a + prefix argument when toggling this mode (i.e., ‘C-u R’), the clock + table does not show contributions from entries that are hidden by + agenda filtering(1). See also the variable + ‘org-clock-report-include-clocking-task’. + +‘v c’ + Show overlapping clock entries, clocking gaps, and other clocking + problems in the current agenda range. You can then visit clocking + lines and fix them manually. See the variable + ‘org-agenda-clock-consistency-checks’ for information on how to + customize the definition of what constituted a clocking problem. + To return to normal agenda display, press ‘l’ to exit Logbook mode. + +‘v E’ or short ‘E’ (‘org-agenda-entry-text-mode’) + Toggle entry text mode. In entry text mode, a number of lines from + the Org outline node referenced by an agenda line are displayed + below the line. The maximum number of lines is given by the + variable ‘org-agenda-entry-text-maxlines’. Calling this command + with a numeric prefix argument temporarily modifies that number to + the prefix value. + +‘G’ (‘org-agenda-toggle-time-grid’) + Toggle the time grid on and off. See also the variables + ‘org-agenda-use-time-grid’ and ‘org-agenda-time-grid’. + +‘r’ (‘org-agenda-redo’) +‘g’ + Recreate the agenda buffer, for example to reflect the changes + after modification of the timestamps of items with ‘S-’ and + ‘S-’. When the buffer is the global TODO list, a prefix + argument is interpreted to create a selective list for a specific + TODO keyword. + +‘C-x C-s’ or short ‘s’ (‘org-save-all-org-buffers’) + Save all Org buffers in the current Emacs session, and also the + locations of IDs. + +‘C-c C-x C-c’ (‘org-agenda-columns’) + Invoke column view (see *note Column View::) in the agenda buffer. + The column view format is taken from the entry at point, or, if + there is no entry at point, from the first entry in the agenda + view. So whatever the format for that entry would be in the + original buffer (taken from a property, from a ‘COLUMNS’ keyword, + or from the default variable ‘org-columns-default-format’) is used + in the agenda. + +‘C-c C-x >’ (‘org-agenda-remove-restriction-lock’) + Remove the restriction lock on the agenda, if it is currently + restricted to a file or subtree (see *note Agenda Files::). + +‘M-’ (‘org-agenda-drag-line-backward’) + Drag the line at point backward one line. With a numeric prefix + argument, drag backward by that many lines. + + Moving agenda lines does not persist after an agenda refresh and + does not modify the contributing Org files. + +‘M-’ (‘org-agenda-drag-line-forward’) + Drag the line at point forward one line. With a numeric prefix + argument, drag forward by that many lines. + +Remote editing +-------------- + +‘0--9’ + Digit argument. + +‘C-_’ (‘org-agenda-undo’) + Undo a change due to a remote editing command. The change is + undone both in the agenda buffer and in the remote buffer. + +‘t’ (‘org-agenda-todo’) + Change the TODO state of the item, both in the agenda and in the + original Org file. + +‘C-S-’ (‘org-agenda-todo-nextset’) + Switch to the next set of TODO keywords. + +‘C-S-’, ‘org-agenda-todo-previousset’ + Switch to the previous set of TODO keywords. + +‘C-k’ (‘org-agenda-kill’) + Delete the current agenda item along with the entire subtree + belonging to it in the original Org file. If the text to be + deleted remotely is longer than one line, the kill needs to be + confirmed by the user. See variable ‘org-agenda-confirm-kill’. + +‘C-c C-w’ (‘org-agenda-refile’) + Refile the entry at point. + +‘C-c C-x C-a’ or short ‘a’ (‘org-agenda-archive-default-with-confirmation’) + Archive the subtree corresponding to the entry at point using the + default archiving command set in ‘org-archive-default-command’. + When using the ‘a’ key, confirmation is required. + +‘C-c C-x a’ (‘org-agenda-toggle-archive-tag’) + Toggle the archive tag (see *note Internal archiving::) for the + current headline. + +‘C-c C-x A’ (‘org-agenda-archive-to-archive-sibling’) + Move the subtree corresponding to the current entry to its _archive + sibling_. + +‘C-c C-x C-s’ or short ‘$’ (‘org-agenda-archive’) + Archive the subtree corresponding to the current headline. This + means the entry is moved to the configured archive location, most + likely a different file. + +‘T’ (‘org-agenda-show-tags’) + Show all tags associated with the current item. This is useful if + you have turned off ‘org-agenda-show-inherited-tags’, but still + want to see all tags of a headline occasionally. + +‘:’ (‘org-agenda-set-tags’) + Set tags for the current headline. If there is an active region in + the agenda, change a tag for all headings in the region. + +‘,’ (‘org-agenda-priority’) + Set the priority for the current item. Org mode prompts for the + priority character. If you reply with ‘’, the priority cookie + is removed from the entry. + +‘P’ (‘org-agenda-show-priority’) + Display weighted priority of current item. + +‘+’ or ‘S-’ (‘org-agenda-priority-up’) + Increase the priority of the current item. The priority is changed + in the original buffer, but the agenda is not resorted. Use the + ‘r’ key for this. + +‘-’ or ‘S-’ (‘org-agenda-priority-down’) + Decrease the priority of the current item. + +‘C-c C-z’ or short ‘z’ (‘org-agenda-add-note’) + Add a note to the entry. This note is recorded, and then filed to + the same location where state change notes are put. Depending on + ‘org-log-into-drawer’, this may be inside a drawer. + +‘C-c C-a’ (‘org-attach’) + Dispatcher for all command related to attachments. + +‘C-c C-s’ (‘org-agenda-schedule’) + Schedule this item. With a prefix argument, remove the scheduling + timestamp + +‘C-c C-d’ (‘org-agenda-deadline’) + Set a deadline for this item. With a prefix argument, remove the + deadline. + +‘S-’ (‘org-agenda-do-date-later’) + Change the timestamp associated with the current line by one day + into the future. If the date is in the past, the first call to + this command moves it to today. With a numeric prefix argument, + change it by that many days. For example, ‘3 6 5 S-’ + changes it by a year. With a ‘C-u’ prefix, change the time by one + hour. If you immediately repeat the command, it will continue to + change hours even without the prefix argument. With a double ‘C-u + C-u’ prefix, do the same for changing minutes. The stamp is + changed in the original Org file, but the change is not directly + reflected in the agenda buffer. Use ‘r’ or ‘g’ to update the + buffer. + +‘S-’ (‘org-agenda-do-date-earlier’) + Change the timestamp associated with the current line by one day + into the past. + +‘>’ (‘org-agenda-date-prompt’) + Change the timestamp associated with the current line. The key ‘>’ + has been chosen, because it is the same as ‘S-.’ on my keyboard. + +‘I’ (‘org-agenda-clock-in’) + Start the clock on the current item. If a clock is running + already, it is stopped first. + +‘O’ (‘org-agenda-clock-out’) + Stop the previously started clock. + +‘X’ (‘org-agenda-clock-cancel’) + Cancel the currently running clock. + +‘J’ (‘org-agenda-clock-goto’) + Jump to the running clock in another window. + +‘k’ (‘org-agenda-capture’) + Like ‘org-capture’, but use the date at point as the default date + for the capture template. See ‘org-capture-use-agenda-date’ to + make this the default behavior of ‘org-capture’. + +Bulk remote editing selected entries +------------------------------------ + +‘m’ (‘org-agenda-bulk-mark’) + + Mark the entry at point for bulk action. If there is an active + region in the agenda, mark the entries in the region. With numeric + prefix argument, mark that many successive entries. + +‘*’ (‘org-agenda-bulk-mark-all’) + + Mark all visible agenda entries for bulk action. + +‘u’ (‘org-agenda-bulk-unmark’) + + Unmark entry for bulk action. + +‘U’ (‘org-agenda-bulk-remove-all-marks’) + + Unmark all marked entries for bulk action. + +‘M-m’ (‘org-agenda-bulk-toggle’) + + Toggle mark of the entry at point for bulk action. + +‘M-*’ (‘org-agenda-bulk-toggle-all’) + + Toggle mark of every entry for bulk action. + +‘%’ (‘org-agenda-bulk-mark-regexp’) + + Mark entries matching a regular expression for bulk action. + +‘B’ (‘org-agenda-bulk-action’) + + Bulk action: act on all marked entries in the agenda. This prompts + for another key to select the action to be applied. The prefix + argument to ‘B’ is passed through to the ‘s’ and ‘d’ commands, to + bulk-remove these special timestamps. By default, marks are + removed after the bulk. If you want them to persist, set + ‘org-agenda-bulk-persistent-marks’ to ‘t’ or hit ‘p’ at the prompt. + + ‘*’ + Toggle persistent marks. + + ‘$’ + Archive all selected entries. + + ‘A’ + Archive entries by moving them to their respective archive + siblings. + + ‘t’ + Change TODO state. This prompts for a single TODO keyword and + changes the state of all selected entries, bypassing blocking + and suppressing logging notes—but not timestamps. + + ‘+’ + Add a tag to all selected entries. + + ‘-’ + Remove a tag from all selected entries. + + ‘s’ + Schedule all items to a new date. To shift existing schedule + dates by a fixed number of days, use something starting with + double plus at the prompt, for example ‘++8d’ or ‘++2w’. + + ‘d’ + Set deadline to a specific date. + + ‘r’ + Prompt for a single refile target and move all entries. The + entries are no longer in the agenda; refresh (‘g’) to bring + them back. + + ‘S’ + Reschedule randomly into the coming N days. N is prompted + for. With a prefix argument (‘C-u B S’), scatter only across + weekdays. + + ‘f’ + Apply a function(2) to marked entries. For example, the + function below sets the ‘CATEGORY’ property of the entries to + ‘web’. + + (defun set-category () + (interactive "P") + (let ((marker (or (org-get-at-bol 'org-hd-marker) + (org-agenda-error)))) + (org-with-point-at marker + (org-back-to-heading t) + (org-set-property "CATEGORY" "web")))) + +Calendar commands +----------------- + +‘c’ (‘org-agenda-goto-calendar’) + Open the Emacs calendar and go to the date at point in the agenda. + +‘c’ (‘org-calendar-goto-agenda’) + When in the calendar, compute and show the Org agenda for the date + at point. + +‘i’ (‘org-agenda-diary-entry’) + + Insert a new entry into the diary, using the date at point and (for + block entries) the date at the mark. This adds to the Emacs diary + file(3), in a way similar to the ‘i’ command in the calendar. The + diary file pops up in another window, where you can add the entry. + + If you configure ‘org-agenda-diary-file’ to point to an Org file, + Org creates entries in that file instead. Most entries are stored + in a date-based outline tree that will later make it easy to + archive appointments from previous months/years. The tree is built + under an entry with a ‘DATE_TREE’ property, or else with years as + top-level entries. Emacs prompts you for the entry text—if you + specify it, the entry is created in ‘org-agenda-diary-file’ without + further interaction. If you directly press ‘’ at the prompt + without typing text, the target file is shown in another window for + you to finish the entry there. See also the ‘k r’ command. + +‘M’ (‘org-agenda-phases-of-moon’) + Show the phases of the moon for the three months around current + date. + +‘S’ (‘org-agenda-sunrise-sunset’) + Show sunrise and sunset times. The geographical location must be + set with calendar variables, see the documentation for the Emacs + calendar. + +‘C’ (‘org-agenda-convert-date’) + Convert the date at point into many other cultural and historic + calendars. + +‘H’ (‘org-agenda-holidays’) + Show holidays for three months around point date. + +Quit and exit +------------- + +‘q’ (‘org-agenda-quit’) + + Quit agenda, remove the agenda buffer. + +‘x’ (‘org-agenda-exit’) + + Exit agenda, remove the agenda buffer and all buffers loaded by + Emacs for the compilation of the agenda. Buffers created by the + user to visit Org files are not removed. + + ---------- Footnotes ---------- + + (1) Only tags filtering is respected here, effort filtering is +ignored. + + (2) You can also create persistent custom functions through +‘org-agenda-bulk-custom-functions’. + + (3) This file is parsed for the agenda when +‘org-agenda-include-diary’ is set. + + +File: org, Node: Custom Agenda Views, Next: Exporting Agenda Views, Prev: Agenda Commands, Up: Agenda Views + +10.6 Custom Agenda Views +======================== + +Custom agenda commands serve two purposes: to store and quickly access +frequently used TODO and tags searches, and to create special composite +agenda buffers. Custom agenda commands are accessible through the +dispatcher (see *note Agenda Dispatcher::), just like the default +commands. + +* Menu: + +* Storing searches:: Type once, use often. +* Block agenda:: All the stuff you need in a single buffer. +* Setting options:: Changing the rules. + + +File: org, Node: Storing searches, Next: Block agenda, Up: Custom Agenda Views + +10.6.1 Storing searches +----------------------- + +The first application of custom searches is the definition of keyboard +shortcuts for frequently used searches, either creating an agenda +buffer, or a sparse tree (the latter covering of course only the current +buffer). + + Custom commands are configured in the variable +‘org-agenda-custom-commands’. You can customize this variable, for +example by pressing ‘C’ from the agenda dispatcher (see *note Agenda +Dispatcher::). You can also directly set it with Emacs Lisp in the +Emacs init file. The following example contains all valid agenda views: + + (setq org-agenda-custom-commands + '(("x" agenda) + ("y" agenda*) + ("w" todo "WAITING") + ("W" todo-tree "WAITING") + ("u" tags "+boss-urgent") + ("v" tags-todo "+boss-urgent") + ("U" tags-tree "+boss-urgent") + ("f" occur-tree "\\") + ("h" . "HOME+Name tags searches") ;description for "h" prefix + ("hl" tags "+home+Lisa") + ("hp" tags "+home+Peter") + ("hk" tags "+home+Kim"))) + +The initial string in each entry defines the keys you have to press +after the dispatcher command in order to access the command. Usually +this will be just a single character, but if you have many similar +commands, you can also define two-letter combinations where the first +character is the same in several combinations and serves as a prefix +key(1). The second parameter is the search type, followed by the string +or regular expression to be used for the matching. The example above +will therefore define: + +‘x’ + as a global search for agenda entries planned(2) this week/day. + +‘y’ + as the same search, but only for entries with an hour specification + like ‘[h]h:mm’—think of them as appointments. + +‘w’ + as a global search for TODO entries with ‘WAITING’ as the TODO + keyword. + +‘W’ + as the same search, but only in the current buffer and displaying + the results as a sparse tree. + +‘u’ + as a global tags search for headlines tagged ‘boss’ but not + ‘urgent’. + +‘v’ + The same search, but limiting it to headlines that are also TODO + items. + +‘U’ + as the same search, but only in the current buffer and displaying + the result as a sparse tree. + +‘f’ + to create a sparse tree (again, current buffer only) with all + entries containing the word ‘FIXME’. + +‘h’ + as a prefix command for a ‘HOME’ tags search where you have to + press an additional key (‘l’, ‘p’ or ‘k’) to select a name (Lisa, + Peter, or Kim) as additional tag to match. + + Note that ‘*-tree’ agenda views need to be called from an Org buffer +as they operate on the current buffer only. + + ---------- Footnotes ---------- + + (1) You can provide a description for a prefix key by inserting a +cons cell with the prefix and the description. + + (2) _Planned_ means here that these entries have some planning +information attached to them, like a time-stamp, a scheduled or a +deadline string. See ‘org-agenda-entry-types’ on how to set what +planning information is taken into account. + + +File: org, Node: Block agenda, Next: Setting options, Prev: Storing searches, Up: Custom Agenda Views + +10.6.2 Block agenda +------------------- + +Another possibility is the construction of agenda views that comprise +the results of _several_ commands, each of which creates a block in the +agenda buffer. The available commands include ‘agenda’ for the daily or +weekly agenda (as created with ‘a’) , ‘alltodo’ for the global TODO list +(as constructed with ‘t’), and the matching commands discussed above: +‘todo’, ‘tags’, and ‘tags-todo’. Here are two examples: + + (setq org-agenda-custom-commands + '(("h" "Agenda and Home-related tasks" + ((agenda "") + (tags-todo "home") + (tags "garden"))) + ("o" "Agenda and Office-related tasks" + ((agenda "") + (tags-todo "work") + (tags "office"))))) + +This defines ‘h’ to create a multi-block view for stuff you need to +attend to at home. The resulting agenda buffer contains your agenda for +the current week, all TODO items that carry the tag ‘home’, and also all +lines tagged with ‘garden’. Finally the command ‘o’ provides a similar +view for office tasks. + + +File: org, Node: Setting options, Prev: Block agenda, Up: Custom Agenda Views + +10.6.3 Setting options for custom commands +------------------------------------------ + +Org mode contains a number of variables regulating agenda construction +and display. The global variables define the behavior for all agenda +commands, including the custom commands. However, if you want to change +some settings just for a single custom view, you can do so. Setting +options requires inserting a list of variable names and values at the +right spot in ‘org-agenda-custom-commands’. For example: + + (setq org-agenda-custom-commands + '(("w" todo "WAITING" + ((org-agenda-sorting-strategy '(priority-down)) + (org-agenda-prefix-format " Mixed: "))) + ("U" tags-tree "+boss-urgent" + ((org-show-context-detail 'minimal))) + ("N" search "" + ((org-agenda-files '("~org/notes.org")) + (org-agenda-text-search-extra-files nil))))) + +Now the ‘w’ command sorts the collected entries only by priority, and +the prefix format is modified to just say ‘Mixed:’ instead of giving the +category of the entry. The sparse tags tree of ‘U’ now turns out +ultra-compact, because neither the headline hierarchy above the match, +nor the headline following the match are shown. The command ‘N’ does a +text search limited to only a single file. + + For command sets creating a block agenda, +‘org-agenda-custom-commands’ has two separate spots for setting options. +You can add options that should be valid for just a single command in +the set, and options that should be valid for all commands in the set. +The former are just added to the command entry; the latter must come +after the list of command entries. Going back to the block agenda +example (see *note Block agenda::), let’s change the sorting strategy +for the ‘h’ commands to ‘priority-down’, but let’s sort the results for +‘garden’ tags query in the opposite order, ‘priority-up’. This would +look like this: + + (setq org-agenda-custom-commands + '(("h" "Agenda and Home-related tasks" + ((agenda) + (tags-todo "home") + (tags "garden" + ((org-agenda-sorting-strategy '(priority-up))))) + ((org-agenda-sorting-strategy '(priority-down)))) + ("o" "Agenda and Office-related tasks" + ((agenda) + (tags-todo "work") + (tags "office"))))) + + As you see, the values and parentheses setting is a little complex. +When in doubt, use the customize interface to set this variable—it fully +supports its structure. Just one caveat: when setting options in this +interface, the _values_ are just Lisp expressions. So if the value is a +string, you need to add the double-quotes around the value yourself. + + To control whether an agenda command should be accessible from a +specific context, you can customize +‘org-agenda-custom-commands-contexts’. Let’s say for example that you +have an agenda command ‘o’ displaying a view that you only need when +reading emails. Then you would configure this option like this: + + (setq org-agenda-custom-commands-contexts + '(("o" (in-mode . "message-mode")))) + + You can also tell that the command key ‘o’ should refer to another +command key ‘r’. In that case, add this command key like this: + + (setq org-agenda-custom-commands-contexts + '(("o" "r" (in-mode . "message-mode")))) + + See the docstring of the variable for more information. + + +File: org, Node: Exporting Agenda Views, Next: Agenda Column View, Prev: Custom Agenda Views, Up: Agenda Views + +10.7 Exporting Agenda Views +=========================== + +If you are away from your computer, it can be very useful to have a +printed version of some agenda views to carry around. Org mode can +export custom agenda views as plain text, HTML(1), Postscript, PDF(2), +and iCalendar files. If you want to do this only occasionally, use the +following command: + +‘C-x C-w’ (‘org-agenda-write’) + + Write the agenda view to a file. + + If you need to export certain agenda views frequently, you can +associate any custom agenda command with a list of output file names(3). +Here is an example that first defines custom commands for the agenda and +the global TODO list, together with a number of files to which to export +them. Then we define two block agenda commands and specify file names +for them as well. File names can be relative to the current working +directory, or absolute. + + (setq org-agenda-custom-commands + '(("X" agenda "" nil ("agenda.html" "agenda.ps")) + ("Y" alltodo "" nil ("todo.html" "todo.txt" "todo.ps")) + ("h" "Agenda and Home-related tasks" + ((agenda "") + (tags-todo "home") + (tags "garden")) + nil + ("~/views/home.html")) + ("o" "Agenda and Office-related tasks" + ((agenda) + (tags-todo "work") + (tags "office")) + nil + ("~/views/office.ps" "~/calendars/office.ics")))) + + The extension of the file name determines the type of export. If it +is ‘.html’, Org mode uses the htmlize package to convert the buffer to +HTML and save it to this file name. If the extension is ‘.ps’, +‘ps-print-buffer-with-faces’ is used to produce Postscript output. If +the extension is ‘.ics’, iCalendar export is run export over all files +that were used to construct the agenda, and limit the export to entries +listed in the agenda. Any other extension produces a plain ASCII file. + + The export files are _not_ created when you use one of those commands +interactively because this might use too much overhead. Instead, there +is a special command to produce _all_ specified files in one step: + +‘e’ (‘org-store-agenda-views’) + Export all agenda views that have export file names associated with + them. + + You can use the options section of the custom agenda commands to also +set options for the export commands. For example: + + (setq org-agenda-custom-commands + '(("X" agenda "" + ((ps-number-of-columns 2) + (ps-landscape-mode t) + (org-agenda-prefix-format " [ ] ") + (org-agenda-with-colors nil) + (org-agenda-remove-tags t)) + ("theagenda.ps")))) + +This command sets two options for the Postscript exporter, to make it +print in two columns in landscape format—the resulting page can be cut +in two and then used in a paper agenda. The remaining settings modify +the agenda prefix to omit category and scheduling information, and +instead include a checkbox to check off items. We also remove the tags +to make the lines compact, and we do not want to use colors for the +black-and-white printer. Settings specified in +‘org-agenda-exporter-settings’ also apply, e.g., + + (setq org-agenda-exporter-settings + '((ps-number-of-columns 2) + (ps-landscape-mode t) + (org-agenda-add-entry-text-maxlines 5) + (htmlize-output-type 'css))) + +but the settings in ‘org-agenda-custom-commands’ take precedence. + + From the command line you may also use: + + emacs -eval (org-batch-store-agenda-views) -kill + +or, if you need to modify some parameters(4) + + emacs -eval '(org-batch-store-agenda-views \ + org-agenda-span (quote month) \ + org-agenda-start-day "2007-11-01" \ + org-agenda-include-diary nil \ + org-agenda-files (quote ("~/org/project.org")))' \ + -kill + +which creates the agenda views restricted to the file +‘~/org/project.org’, without diary entries and with a 30-day extent. + + You can also extract agenda information in a way that allows further +processing by other programs. See *note Extracting Agenda +Information::, for more information. + + ---------- Footnotes ---------- + + (1) For HTML you need to install Hrvoje NikÅ¡ić’s ‘htmlize.el’ from +Hrvoje NikÅ¡ić’s repository (https://github.com/hniksic/emacs-htmlize). + + (2) To create PDF output, the Ghostscript ps2pdf utility must be +installed on the system. Selecting a PDF file also creates the +postscript file. + + (3) If you want to store standard views like the weekly agenda or the +global TODO list as well, you need to define custom commands for them in +order to be able to specify file names. + + (4) Quoting depends on the system you use, please check the FAQ for +examples. + + +File: org, Node: Agenda Column View, Prev: Exporting Agenda Views, Up: Agenda Views + +10.8 Using Column View in the Agenda +==================================== + +Column view (see *note Column View::) is normally used to view and edit +properties embedded in the hierarchical structure of an Org file. It +can be quite useful to use column view also from the agenda, where +entries are collected by certain criteria. + +‘C-c C-x C-c’ (‘org-agenda-columns’) + + Turn on column view in the agenda. + + To understand how to use this properly, it is important to realize +that the entries in the agenda are no longer in their proper outline +environment. This causes the following issues: + + 1. Org needs to make a decision which columns format to use. Since + the entries in the agenda are collected from different files, and + different files may have different columns formats, this is a + non-trivial problem. Org first checks if the variable + ‘org-overriding-columns-format’ is currently set, and if so, takes + the format from there. Otherwise it takes the format associated + with the first item in the agenda, or, if that item does not have a + specific format (defined in a property, or in its file), it uses + ‘org-columns-default-format’. + + 2. If any of the columns has a summary type defined (see *note Column + attributes::), turning on column view in the agenda visits all + relevant agenda files and make sure that the computations of this + property are up to date. This is also true for the special + ‘CLOCKSUM’ property. Org then sums the values displayed in the + agenda. In the daily/weekly agenda, the sums cover a single day; + in all other views they cover the entire block. + + It is important to realize that the agenda may show the same entry + _twice_—for example as scheduled and as a deadline—and it may show + two entries from the same hierarchy (for example a _parent_ and its + _child_). In these cases, the summation in the agenda leads to + incorrect results because some values count double. + + 3. When the column view in the agenda shows the ‘CLOCKSUM’ property, + that is always the entire clocked time for this item. So even in + the daily/weekly agenda, the clocksum listed in column view may + originate from times outside the current view. This has the + advantage that you can compare these values with a column listing + the planned total effort for a task—one of the major applications + for column view in the agenda. If you want information about + clocked time in the displayed period use clock table mode (press + ‘R’ in the agenda). + + 4. When the column view in the agenda shows the ‘CLOCKSUM_T’ property, + that is always today’s clocked time for this item. So even in the + weekly agenda, the clocksum listed in column view only originates + from today. This lets you compare the time you spent on a task for + today, with the time already spent—via ‘CLOCKSUM’—and with the + planned total effort for it. + + +File: org, Node: Markup for Rich Contents, Next: Exporting, Prev: Agenda Views, Up: Top + +11 Markup for Rich Contents +*************************** + +Org is primarily about organizing and searching through your plain-text +notes. However, it also provides a lightweight yet robust markup +language for rich text formatting and more. For instance, you may want +to center or emphasize text. Or you may need to insert a formula or +image in your writing. Org offers syntax for all of this and more. +Used in conjunction with the export framework (see *note Exporting::), +you can author beautiful documents in Org—like the fine manual you are +currently reading. + +* Menu: + +* Paragraphs:: The basic unit of text. +* Emphasis and Monospace:: Bold, italic, etc. +* Subscripts and Superscripts:: Simple syntax for raising/lowering text. +* Special Symbols:: Greek letters and other symbols. +* Embedded LaTeX:: LaTeX can be freely used inside Org documents. +* Literal Examples:: Source code examples with special formatting. +* Images:: Display an image. +* Captions:: Describe tables, images... +* Horizontal Rules:: Make a line. + + +File: org, Node: Paragraphs, Next: Emphasis and Monospace, Up: Markup for Rich Contents + +11.1 Paragraphs +=============== + +Paragraphs are separated by at least one empty line. If you need to +enforce a line break within a paragraph, use ‘\\’ at the end of a line. + + To preserve the line breaks, indentation and blank lines in a region, +but otherwise use normal formatting, you can use this construct, which +can also be used to format poetry. + + #+BEGIN_VERSE + Great clouds overhead + Tiny black birds rise and fall + Snow covers Emacs + + ---AlexSchroeder + #+END_VERSE + + When quoting a passage from another document, it is customary to +format this as a paragraph that is indented on both the left and the +right margin. You can include quotations in Org documents like this: + + #+BEGIN_QUOTE + Everything should be made as simple as possible, + but not any simpler ---Albert Einstein + #+END_QUOTE + + If you would like to center some text, do it like this: + + #+BEGIN_CENTER + Everything should be made as simple as possible, \\ + but not any simpler + #+END_CENTER + + +File: org, Node: Emphasis and Monospace, Next: Subscripts and Superscripts, Prev: Paragraphs, Up: Markup for Rich Contents + +11.2 Emphasis and Monospace +=========================== + +You can make words ‘*bold*’, ‘/italic/’, ‘_underlined_’, ‘=verbatim=’ +and ‘~code~’, and, if you must, ‘+strike-through+’. Text in the code +and verbatim string is not processed for Org mode specific syntax; it is +exported verbatim. + + To turn off fontification for marked up text, you can set +‘org-fontify-emphasized-text’ to ‘nil’. To narrow down the list of +available markup syntax, you can customize ‘org-emphasis-alist’. + + +File: org, Node: Subscripts and Superscripts, Next: Special Symbols, Prev: Emphasis and Monospace, Up: Markup for Rich Contents + +11.3 Subscripts and Superscripts +================================ + +‘^’ and ‘_’ are used to indicate super- and subscripts. To increase the +readability of ASCII text, it is not necessary, but OK, to surround +multi-character sub- and superscripts with curly braces. For example + + The radius of the sun is R_sun = 6.96 x 10^8 m. On the other hand, + the radius of Alpha Centauri is R_{Alpha Centauri} = 1.28 x R_{sun}. + + If you write a text where the underscore is often used in a different +context, Org’s convention to always interpret these as subscripts can +get in your way. Configure the variable ‘org-use-sub-superscripts’ to +change this convention. For example, when setting this variable to +‘{}’, ‘a_b’ is not interpreted as a subscript, but ‘a_{b}’ is. + +‘C-c C-x \’ (‘org-toggle-pretty-entities’) + This command formats sub- and superscripts in a WYSIWYM way. + + +File: org, Node: Special Symbols, Next: Embedded LaTeX, Prev: Subscripts and Superscripts, Up: Markup for Rich Contents + +11.4 Special Symbols +==================== + +You can use LaTeX-like syntax to insert special symbols—named +entities—like ‘\alpha’ to indicate the Greek letter, or ‘\to’ to +indicate an arrow. Completion for these symbols is available, just type +‘\’ and maybe a few letters, and press ‘M-’ to see possible +completions. If you need such a symbol inside a word, terminate it with +a pair of curly brackets. For example + + Pro tip: Given a circle \Gamma of diameter d, the length of its + circumference is \pi{}d. + + A large number of entities is provided, with names taken from both +HTML and LaTeX; you can comfortably browse the complete list from a +dedicated buffer using the command ‘org-entities-help’. It is also +possible to provide your own special symbols in the variable +‘org-entities-user’. + + During export, these symbols are transformed into the native format +of the exporter back-end. Strings like ‘\alpha’ are exported as +‘α’ in the HTML output, and as ‘\(\alpha\)’ in the LaTeX output. +Similarly, ‘\nbsp’ becomes ‘ â€™ in HTML and ‘~’ in LaTeX. + + If you would like to see entities displayed as UTF-8 characters, use +the following command(1): + +‘C-c C-x \’ (‘org-toggle-pretty-entities’) + + Toggle display of entities as UTF-8 characters. This does not + change the buffer content which remains plain ASCII, but it + overlays the UTF-8 character for display purposes only. + + In addition to regular entities defined above, Org exports in a +special way(2) the following commonly used character combinations: ‘\-’ +is treated as a shy hyphen, ‘--’ and ‘---’ are converted into dashes, +and ‘...’ becomes a compact set of dots. + + ---------- Footnotes ---------- + + (1) You can turn this on by default by setting the variable +‘org-pretty-entities’, or on a per-file base with the ‘STARTUP’ option +‘entitiespretty’. + + (2) This behavior can be disabled with ‘-’ export setting (see *note +Export Settings::). + + +File: org, Node: Embedded LaTeX, Next: Literal Examples, Prev: Special Symbols, Up: Markup for Rich Contents + +11.5 Embedded LaTeX +=================== + +Plain ASCII is normally sufficient for almost all note taking. +Exceptions include scientific notes, which often require mathematical +symbols and the occasional formula. LaTeX(1) is widely used to typeset +scientific documents. Org mode supports embedding LaTeX code into its +files, because many academics are used to writing and reading LaTeX +source code, and because it can be readily processed to produce pretty +output for a number of export back-ends. + +* Menu: + +* LaTeX fragments:: Complex formulas made easy. +* Previewing LaTeX fragments:: What will this snippet look like? +* CDLaTeX mode:: Speed up entering of formulas. + + ---------- Footnotes ---------- + + (1) LaTeX is a macro system based on Donald E. Knuth’s TeX system. +Many of the features described here as “LaTeX” are really from TeX, but +for simplicity I am blurring this distinction. + + +File: org, Node: LaTeX fragments, Next: Previewing LaTeX fragments, Up: Embedded LaTeX + +11.5.1 LaTeX fragments +---------------------- + +Org mode can contain LaTeX math fragments, and it supports ways to +process these for several export back-ends. When exporting to LaTeX, +the code is left as it is. When exporting to HTML, Org can use either +MathJax (http://www.mathjax.org) (see *note Math formatting in HTML +export::) or transcode the math into images (see *note Previewing LaTeX +fragments::). + + LaTeX fragments do not need any special marking at all. The +following snippets are identified as LaTeX source code: + + • Environments of any kind(1). The only requirement is that the + ‘\begin’ statement appears on a new line, preceded by only + whitespace. + + • Text within the usual LaTeX math delimiters. To avoid conflicts + with currency specifications, single ‘$’ characters are only + recognized as math delimiters if the enclosed text contains at most + two line breaks, is directly attached to the ‘$’ characters with no + whitespace in between, and if the closing ‘$’ is followed by + whitespace, punctuation or a dash. For the other delimiters, there + is no such restriction, so when in doubt, use ‘\(...\)’ as inline + math delimiters. + +For example: + + \begin{equation} % arbitrary environments, + x=\sqrt{b} % even tables, figures + \end{equation} % etc + + If $a^2=b$ and \( b=2 \), then the solution must be + either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \]. + + LaTeX processing can be configured with the variable +‘org-export-with-latex’. The default setting is ‘t’ which means MathJax +for HTML, and no processing for ASCII and LaTeX back-ends. You can also +set this variable on a per-file basis using one of these lines: + +‘#+OPTIONS: tex:t’ Do the right thing automatically (MathJax) +‘#+OPTIONS: tex:nil’ Do not process LaTeX fragments at all +‘#+OPTIONS: tex:verbatim’ Verbatim export, for jsMath or so + + ---------- Footnotes ---------- + + (1) When MathJax is used, only the environments recognized by MathJax +are processed. When dvipng, dvisvgm, or ImageMagick suite is used to +create images, any LaTeX environment is handled. + + +File: org, Node: Previewing LaTeX fragments, Next: CDLaTeX mode, Prev: LaTeX fragments, Up: Embedded LaTeX + +11.5.2 Previewing LaTeX fragments +--------------------------------- + +If you have a working LaTeX installation and ‘dvipng’, ‘dvisvgm’ or +‘convert’ installed(1), LaTeX fragments can be processed to produce +images of the typeset expressions to be used for inclusion while +exporting to HTML (see *note LaTeX fragments::), or for inline +previewing within Org mode. + + You can customize the variables ‘org-format-latex-options’ and +‘org-format-latex-header’ to influence some aspects of the preview. In +particular, the ‘:scale’ (and for HTML export, ‘:html-scale’) property +of the former can be used to adjust the size of the preview images. + +‘C-c C-x C-l’ (‘org-toggle-latex-fragment’) + + Produce a preview image of the LaTeX fragment at point and overlay + it over the source code. If there is no fragment at point, process + all fragments in the current entry (between two headlines). When + called with a prefix argument, process the entire subtree. When + called with two prefix arguments, or when point is before the first + headline, process the entire buffer. + + You can turn on the previewing of all LaTeX fragments in a file with + + #+STARTUP: latexpreview + + To disable it, simply use + + #+STARTUP: nolatexpreview + + ---------- Footnotes ---------- + + (1) These are respectively available at +, +and from the ImageMagick suite. Choose the converter by setting the +variable ‘org-preview-latex-default-process’ accordingly. + + +File: org, Node: CDLaTeX mode, Prev: Previewing LaTeX fragments, Up: Embedded LaTeX + +11.5.3 Using CDLaTeX to enter math +---------------------------------- + +CDLaTeX mode is a minor mode that is normally used in combination with a +major LaTeX mode like AUCTeX in order to speed-up insertion of +environments and math templates. Inside Org mode, you can make use of +some of the features of CDLaTeX mode. You need to install ‘cdlatex.el’ +and ‘texmathp.el’ (the latter comes also with AUCTeX) from +. Do not use CDLaTeX +mode itself under Org mode, but use the light version ‘org-cdlatex-mode’ +that comes as part of Org mode. Turn it on for the current buffer with +‘M-x org-cdlatex-mode’, or for all Org files with + + (add-hook 'org-mode-hook 'turn-on-org-cdlatex) + + When this mode is enabled, the following features are present (for +more details see the documentation of CDLaTeX mode): + +‘C-c {’ + + Insert an environment template. + +‘’ + + The ‘’ key expands the template if point is inside a LaTeX + fragment(1). For example, ‘’ expands ‘fr’ to ‘\frac{}{}’ and + position point correctly inside the first brace. Another ‘’ + gets you into the second brace. + + Even outside fragments, ‘’ expands environment abbreviations + at the beginning of a line. For example, if you write ‘equ’ at the + beginning of a line and press ‘’, this abbreviation is + expanded to an ‘equation’ environment. To get a list of all + abbreviations, type ‘M-x cdlatex-command-help’. + +‘^’ +‘_’ + + Pressing ‘_’ and ‘^’ inside a LaTeX fragment inserts these + characters together with a pair of braces. If you use ‘’ to + move out of the braces, and if the braces surround only a single + character or macro, they are removed again (depending on the + variable ‘cdlatex-simplify-sub-super-scripts’). + +‘`’ + + Pressing the backquote followed by a character inserts math macros, + also outside LaTeX fragments. If you wait more than 1.5 seconds + after the backquote, a help window pops up. + +‘'’ + + Pressing the single-quote followed by another character modifies + the symbol before point with an accent or a font. If you wait more + than 1.5 seconds after the single-quote, a help window pops up. + Character modification works only inside LaTeX fragments; outside + the quote is normal. + + ---------- Footnotes ---------- + + (1) Org mode has a method to test if point is inside such a fragment, +see the documentation of the function ‘org-inside-LaTeX-fragment-p’. + + +File: org, Node: Literal Examples, Next: Images, Prev: Embedded LaTeX, Up: Markup for Rich Contents + +11.6 Literal Examples +===================== + +You can include literal examples that should not be subjected to markup. +Such examples are typeset in monospace, so this is well suited for +source code and similar examples. + + #+BEGIN_EXAMPLE + Some example from a text file. + #+END_EXAMPLE + + Note that such blocks may be _indented_ in order to align nicely with +indented text and in particular with plain list structure (see *note +Plain Lists::). For simplicity when using small examples, you can also +start the example lines with a colon followed by a space. There may +also be additional whitespace before the colon: + + Here is an example + : Some example from a text file. + + If the example is source code from a programming language, or any +other text that can be marked up by Font Lock in Emacs, you can ask for +the example to look like the fontified Emacs buffer(1). This is done +with the code block, where you also need to specify the name of the +major mode that should be used to fontify the example(2), see *note +Structure Templates:: for shortcuts to easily insert code blocks. + + #+BEGIN_SRC emacs-lisp + (defun org-xor (a b) + "Exclusive or." + (if a (not b) b)) + #+END_SRC + + Both in ‘example’ and in ‘src’ snippets, you can add a ‘-n’ switch to +the end of the ‘#+BEGIN’ line, to get the lines of the example numbered. +The ‘-n’ takes an optional numeric argument specifying the starting line +number of the block. If you use a ‘+n’ switch, the numbering from the +previous numbered snippet is continued in the current one. The ‘+n’ +switch can also take a numeric argument. This adds the value of the +argument to the last line of the previous block to determine the +starting line number. + + #+BEGIN_SRC emacs-lisp -n 20 + ;; This exports with line number 20. + (message "This is line 21") + #+END_SRC + + #+BEGIN_SRC emacs-lisp +n 10 + ;; This is listed as line 31. + (message "This is line 32") + #+END_SRC + + In literal examples, Org interprets strings like ‘(ref:name)’ as +labels, and use them as targets for special hyperlinks like +‘[[(name)]]’—i.e., the reference name enclosed in single parenthesis. +In HTML, hovering the mouse over such a link remote-highlights the +corresponding code line, which is kind of cool. + + You can also add a ‘-r’ switch which _removes_ the labels from the +source code(3). With the ‘-n’ switch, links to these references are +labeled by the line numbers from the code listing. Otherwise links use +the labels with no parentheses. Here is an example: + + #+BEGIN_SRC emacs-lisp -n -r + (save-excursion (ref:sc) + (goto-char (point-min)) (ref:jump) + #+END_SRC + In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] + jumps to point-min. + + Finally, you can use ‘-i’ to preserve the indentation of a specific +code block (see *note Editing Source Code::). + + If the syntax for the label format conflicts with the language +syntax, use a ‘-l’ switch to change the format, for example + + #+BEGIN_SRC pascal -n -r -l "((%s))" + +See also the variable ‘org-coderef-label-format’. + + HTML export also allows examples to be published as text areas (see +*note Text areas in HTML export::). + + Because the ‘#+BEGIN’ ... ‘#+END’ patterns need to be added so often, +a shortcut is provided (see *note Structure Templates::). + +‘C-c '’ (‘org-edit-special’) + Edit the source code example at point in its native mode. This + works by switching to a temporary buffer with the source code. You + need to exit by pressing ‘C-c '’ again(4). The edited version then + replaces the old version in the Org buffer. Fixed-width + regions—where each line starts with a colon followed by a space—are + edited using ‘artist-mode’(5) to allow creating ASCII drawings + easily. Using this command in an empty line creates a new + fixed-width region. + + Calling ‘org-store-link’ (see *note Handling Links::) while editing a +source code example in a temporary buffer created with ‘C-c '’ prompts +for a label. Make sure that it is unique in the current buffer, and +insert it with the proper formatting like ‘(ref:label)’ at the end of +the current line. Then the label is stored as a link ‘(label)’, for +retrieval with ‘C-c C-l’. + + ---------- Footnotes ---------- + + (1) This works automatically for the HTML backend (it requires +version 1.34 of the ‘htmlize.el’ package, which you need to install). +Fontified code chunks in LaTeX can be achieved using either the listings +(https://www.ctan.org/pkg/listings) package or the minted +(https://www.ctan.org/pkg/minted) package. Refer to +‘org-export-latex-listings’ for details. + + (2) Source code in code blocks may also be evaluated either +interactively or on export. See *note Working with Source Code:: for +more information on evaluating code blocks. + + (3) Adding ‘-k’ to ‘-n -r’ _keeps_ the labels in the source code +while using line numbers for the links, which might be useful to explain +those in an Org mode example code. + + (4) Upon exit, lines starting with ‘*’, ‘,*’, ‘#+’ and ‘,#+’ get a +comma prepended, to keep them from being interpreted by Org as outline +nodes or special syntax. These commas are stripped when editing with +‘C-c '’, and also before export. + + (5) You may select a different-mode with the variable +‘org-edit-fixed-width-region-mode’. + + +File: org, Node: Images, Next: Captions, Prev: Literal Examples, Up: Markup for Rich Contents + +11.7 Images +=========== + +An image is a link to an image file(1) that does not have a description +part, for example + + ./img/cat.jpg + + If you wish to define a caption for the image (see *note Captions::) +and maybe a label for internal cross references (see *note Internal +Links::), make sure that the link is on a line by itself and precede it +with ‘CAPTION’ and ‘NAME’ keywords as follows: + + #+CAPTION: This is the caption for the next figure link (or table) + #+NAME: fig:SED-HR4049 + [[./img/a.jpg]] + +Such images can be displayed within the buffer with the following +command: + +‘C-c C-x C-v’ (‘org-toggle-inline-images’) + Toggle the inline display of linked images. When called with a + prefix argument, also display images that do have a link + description. You can ask for inline images to be displayed at + startup by configuring the variable + ‘org-startup-with-inline-images’(2). + + ---------- Footnotes ---------- + + (1) What Emacs considers to be an image depends on +‘image-file-name-extensions’ and ‘image-file-name-regexps’. + + (2) The variable ‘org-startup-with-inline-images’ can be set within a +buffer with the ‘STARTUP’ options ‘inlineimages’ and ‘noinlineimages’. + + +File: org, Node: Captions, Next: Horizontal Rules, Prev: Images, Up: Markup for Rich Contents + +11.8 Captions +============= + +You can assign a caption to a specific part of a document by inserting a +‘CAPTION’ keyword immediately before it: + + #+CAPTION: This is the caption for the next table (or link) + | ... | ... | + |-----+-----| + + Optionally, the caption can take the form: + + #+CAPTION[Short caption]: Longer caption. + + Even though images and tables are prominent examples of captioned +structures, the same caption mechanism can apply to many others—e.g., +LaTeX equations, source code blocks. Depending on the export back-end, +those may or may not be handled. + + +File: org, Node: Horizontal Rules, Prev: Captions, Up: Markup for Rich Contents + +11.9 Horizontal Rules +===================== + +A line consisting of only dashes, and at least 5 of them, is exported as +a horizontal line. + + +File: org, Node: Exporting, Next: Publishing, Prev: Markup for Rich Contents, Up: Top + +12 Exporting +************ + +At some point you might want to print your notes, publish them on the +web, or share them with people not using Org. Org can convert and +export documents to a variety of other formats while retaining as much +structure (see *note Document Structure::) and markup (see *note Markup +for Rich Contents::) as possible. + + The libraries responsible for translating Org files to other formats +are called _back-ends_. Org ships with support for the following +back-ends: + + • _ascii_ (ASCII format) + • _beamer_ (LaTeX Beamer format) + • _html_ (HTML format) + • _icalendar_ (iCalendar format) + • _latex_ (LaTeX format) + • _md_ (Markdown format) + • _odt_ (OpenDocument Text format) + • _org_ (Org format) + • _texinfo_ (Texinfo format) + • _man_ (Man page format) + + Users can install libraries for additional formats from the Emacs +packaging system. For easy discovery, these packages have a common +naming scheme: ‘ox-NAME’, where NAME is a format. For example, +‘ox-koma-letter’ for _koma-letter_ back-end. More libraries can be +found in the ‘contrib/’ directory (see *note Installation::). + + Org only loads back-ends for the following formats by default: ASCII, +HTML, iCalendar, LaTeX, and ODT. Additional back-ends can be loaded in +either of two ways: by configuring the ‘org-export-backends’ variable, +or by requiring libraries in the Emacs init file. For example, to load +the Markdown back-end, add this to your Emacs config: + + (require 'ox-md) + +* Menu: + +* The Export Dispatcher:: The main interface. +* Export Settings:: Common export settings. +* Table of Contents:: The if and where of the table of contents. +* Include Files:: Include additional files into a document. +* Macro Replacement:: Use macros to create templates. +* Comment Lines:: What will not be exported. +* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding. +* Beamer Export:: +* HTML Export:: Exporting to HTML. +* LaTeX Export:: Exporting to LaTeX and processing to PDF. +* Markdown Export:: Exporting to Markdown. +* OpenDocument Text Export:: Exporting to OpenDocument Text. +* Org Export:: Exporting to Org. +* Texinfo Export:: Exporting to Texinfo. +* iCalendar Export:: Exporting to iCalendar. +* Other Built-in Back-ends:: Exporting to a man page. +* Advanced Export Configuration:: Fine-tuning the export output. +* Export in Foreign Buffers:: Author tables and lists in Org syntax. + + +File: org, Node: The Export Dispatcher, Next: Export Settings, Up: Exporting + +12.1 The Export Dispatcher +========================== + +The export dispatcher is the main interface for Org’s exports. A +hierarchical menu presents the currently configured export formats. +Options are shown as easy toggle switches on the same screen. + + Org also has a minimal prompt interface for the export dispatcher. +When the variable ‘org-export-dispatch-use-expert-ui’ is set to a +non-‘nil’ value, Org prompts in the minibuffer. To switch back to the +hierarchical menu, press ‘?’. + +‘C-c C-e’ (‘org-export’) + + Invokes the export dispatcher interface. The options show default + settings. The ‘C-u’ prefix argument preserves options from the + previous export, including any sub-tree selections. + + Org exports the entire buffer by default. If the Org buffer has an +active region, then Org exports just that region. + + Within the dispatcher interface, the following key combinations can +further alter what is exported, and how. + +‘C-a’ + + Toggle asynchronous export. Asynchronous export uses an external + Emacs process with a specially configured initialization file to + complete the exporting process in the background, without tying-up + Emacs. This is particularly useful when exporting long documents. + + Output from an asynchronous export is saved on the _export stack_. + To view this stack, call the export dispatcher with a double ‘C-u’ + prefix argument. If already in the export dispatcher menu, ‘&’ + displays the stack. + + You can make asynchronous export the default by setting + ‘org-export-in-background’. + + You can set the initialization file used by the background process + by setting ‘org-export-async-init-file’. + +‘C-b’ + + Toggle body-only export. Useful for excluding headers and footers + in the export. Affects only those back-end formats that have + sections like ‘...’ in HTML. + +‘C-s’ + + Toggle sub-tree export. When turned on, Org exports only the + sub-tree starting from point position at the time the export + dispatcher was invoked. Org uses the top heading of this sub-tree + as the document’s title. If point is not on a heading, Org uses + the nearest enclosing header. If point is in the document + preamble, Org signals an error and aborts export. + + To make sub-tree export the default, customize the variable + ‘org-export-initial-scope’. + +‘C-v’ + + Toggle visible-only export. This is useful for exporting only + certain parts of an Org document by adjusting the visibility of + particular headings. + + +File: org, Node: Export Settings, Next: Table of Contents, Prev: The Export Dispatcher, Up: Exporting + +12.2 Export Settings +==================== + +Export options can be set: globally with variables; for an individual +file by making variables buffer-local with in-buffer settings (see *note +In-buffer Settings::); by setting individual keywords or specifying them +in compact form with the ‘OPTIONS’ keyword; or for a tree by setting +properties (see *note Properties and Columns::). Options set at a +specific level override options set at a more general level. + + In-buffer settings may appear anywhere in the file, either directly +or indirectly through a file included using ‘#+SETUPFILE: filename or +URL’ syntax. Option keyword sets tailored to a particular back-end can +be inserted from the export dispatcher (see *note The Export +Dispatcher::) using the ‘Insert template’ command by pressing ‘#’. To +insert keywords individually, a good way to make sure the keyword is +correct is to type ‘#+’ and then to use ‘M-’(1) for completion. + + The export keywords available for every back-end, and their +equivalent global variables, include: + +‘AUTHOR’ + The document author (‘user-full-name’). + +‘CREATOR’ + Entity responsible for output generation + (‘org-export-creator-string’). + +‘DATE’ + A date or a time-stamp(2). + +‘EMAIL’ + The email address (‘user-mail-address’). + +‘LANGUAGE’ + Language to use for translating certain strings + (‘org-export-default-language’). With ‘#+LANGUAGE: fr’, for + example, Org translates ‘Table of contents’ to the French ‘Table + des matières’(3). + +‘SELECT_TAGS’ + The default value is ‘("export")’. When a tree is tagged with + ‘export’ (‘org-export-select-tags’), Org selects that tree and its + sub-trees for export. Org excludes trees with ‘noexport’ tags, see + below. When selectively exporting files with ‘export’ tags set, + Org does not export any text that appears before the first + headline. + +‘EXCLUDE_TAGS’ + The default value is ‘("noexport")’. When a tree is tagged with + ‘noexport’ (‘org-export-exclude-tags’), Org excludes that tree and + its sub-trees from export. Entries tagged with ‘noexport’ are + unconditionally excluded from the export, even if they have an + ‘export’ tag. Even if a sub-tree is not exported, Org executes any + code blocks contained there. + +‘TITLE’ + Org displays this title. For long titles, use multiple ‘#+TITLE’ + lines. + +‘EXPORT_FILE_NAME’ + The name of the output file to be generated. Otherwise, Org + generates the file name based on the buffer name and the extension + based on the back-end format. + + The ‘OPTIONS’ keyword is a compact form. To configure multiple +options, use several ‘OPTIONS’ lines. ‘OPTIONS’ recognizes the +following arguments. + +‘'’ + Toggle smart quotes (‘org-export-with-smart-quotes’). Depending on + the language used, when activated, Org treats pairs of double + quotes as primary quotes, pairs of single quotes as secondary + quotes, and single quote marks as apostrophes. + +‘*’ + Toggle emphasized text (‘org-export-with-emphasize’). + +‘-’ + Toggle conversion of special strings + (‘org-export-with-special-strings’). + +‘:’ + Toggle fixed-width sections (‘org-export-with-fixed-width’). + +‘<’ + Toggle inclusion of time/date active/inactive stamps + (‘org-export-with-timestamps’). + +‘\n’ + Toggles whether to preserve line breaks + (‘org-export-preserve-breaks’). + +‘^’ + Toggle TeX-like syntax for sub- and superscripts. If you write + ‘^:{}’, ‘a_{b}’ is interpreted, but the simple ‘a_b’ is left as it + is (‘org-export-with-sub-superscripts’). + +‘arch’ + Configure how archived trees are exported. When set to ‘headline’, + the export process skips the contents and processes only the + headlines (‘org-export-with-archived-trees’). + +‘author’ + Toggle inclusion of author name into exported file + (‘org-export-with-author’). + +‘broken-links’ + Toggles if Org should continue exporting upon finding a broken + internal link. When set to ‘mark’, Org clearly marks the problem + link in the output (‘org-export-with-broken-links’). + +‘c’ + Toggle inclusion of CLOCK keywords (‘org-export-with-clocks’). + +‘creator’ + Toggle inclusion of creator information in the exported file + (‘org-export-with-creator’). + +‘d’ + Toggles inclusion of drawers, or list of drawers to include, or + list of drawers to exclude (‘org-export-with-drawers’). + +‘date’ + Toggle inclusion of a date into exported file + (‘org-export-with-date’). + +‘e’ + Toggle inclusion of entities (‘org-export-with-entities’). + +‘email’ + Toggle inclusion of the author’s e-mail into exported file + (‘org-export-with-email’). + +‘f’ + Toggle the inclusion of footnotes (‘org-export-with-footnotes’). + +‘H’ + Set the number of headline levels for export + (‘org-export-headline-levels’). Below that level, headlines are + treated differently. In most back-ends, they become list items. + +‘inline’ + Toggle inclusion of inlinetasks (‘org-export-with-inlinetasks’). + +‘num’ + Toggle section-numbers (‘org-export-with-section-numbers’). When + set to number N, Org numbers only those headlines at level N or + above. Set ‘UNNUMBERED’ property to non-‘nil’ to disable numbering + of heading and subheadings entirely. Moreover, when the value is + ‘notoc’ the headline, and all its children, do not appear in the + table of contents either (see *note Table of Contents::). + +‘p’ + Toggle export of planning information (‘org-export-with-planning’). + “Planning information” comes from lines located right after the + headline and contain any combination of these cookies: ‘SCHEDULED’, + ‘DEADLINE’, or ‘CLOSED’. + +‘pri’ + Toggle inclusion of priority cookies (‘org-export-with-priority’). + +‘prop’ + Toggle inclusion of property drawers, or list the properties to + include (‘org-export-with-properties’). + +‘stat’ + Toggle inclusion of statistics cookies + (‘org-export-with-statistics-cookies’). + +‘tags’ + Toggle inclusion of tags, may also be ‘not-in-toc’ + (‘org-export-with-tags’). + +‘tasks’ + Toggle inclusion of tasks (TODO items); or ‘nil’ to remove all + tasks; or ‘todo’ to remove DONE tasks; or list the keywords to keep + (‘org-export-with-tasks’). + +‘tex’ + ‘nil’ does not export; ‘t’ exports; ‘verbatim’ keeps everything in + verbatim (‘org-export-with-latex’). + +‘timestamp’ + Toggle inclusion of the creation time in the exported file + (‘org-export-time-stamp-file’). + +‘title’ + Toggle inclusion of title (‘org-export-with-title’). + +‘toc’ + Toggle inclusion of the table of contents, or set the level limit + (‘org-export-with-toc’). + +‘todo’ + Toggle inclusion of TODO keywords into exported text + (‘org-export-with-todo-keywords’). + +‘|’ + Toggle inclusion of tables (‘org-export-with-tables’). + + When exporting sub-trees, special node properties can override the +above keywords. These properties have an ‘EXPORT_’ prefix. For +example, ‘DATE’ becomes, ‘EXPORT_DATE’ when used for a specific +sub-tree. Except for ‘SETUPFILE’, all other keywords listed above have +an ‘EXPORT_’ equivalent. + + If ‘org-export-allow-bind-keywords’ is non-‘nil’, Emacs variables can +become buffer-local during export by using the ‘BIND’ keyword. Its +syntax is ‘#+BIND: variable value’. This is particularly useful for +in-buffer settings that cannot be changed using keywords. + + ---------- Footnotes ---------- + + (1) Many desktops intercept ‘M-’ to switch windows. Use ‘C-M-i’ +or ‘ ’ instead. + + (2) The variable ‘org-export-date-timestamp-format’ defines how this +timestamp are exported. + + (3) For export to LaTeX format—or LaTeX-related formats such as +Beamer—, the ‘org-latex-package-alist’ variable needs further +configuration. See *note LaTeX specific export settings::. + + +File: org, Node: Table of Contents, Next: Include Files, Prev: Export Settings, Up: Exporting + +12.3 Table of Contents +====================== + +The table of contents includes all headlines in the document. Its depth +is therefore the same as the headline levels in the file. If you need +to use a different depth, or turn it off entirely, set the +‘org-export-with-toc’ variable accordingly. You can achieve the same on +a per file basis, using the following ‘toc’ item in ‘OPTIONS’ keyword: + + #+OPTIONS: toc:2 (only include two levels in TOC) + #+OPTIONS: toc:nil (no default TOC at all) + + Org includes both numbered and unnumbered headlines in the table of +contents(1). If you need to exclude an unnumbered headline, along with +all its children, set the ‘UNNUMBERED’ property to ‘notoc’ value. + + * Subtree not numbered, not in table of contents either + :PROPERTIES: + :UNNUMBERED: notoc + :END: + + Org normally inserts the table of contents directly before the first +headline of the file. To move the table of contents to a different +location, first turn off the default with ‘org-export-with-toc’ variable +or with ‘#+OPTIONS: toc:nil’. Then insert ‘#+TOC: headlines N’ at the +desired location(s). + + #+OPTIONS: toc:nil + ... + #+TOC: headlines 2 + + To adjust the table of contents depth for a specific section of the +Org document, append an additional ‘local’ parameter. This parameter +becomes a relative depth for the current level. The following example +inserts a local table of contents, with direct children only. + + * Section + #+TOC: headlines 1 local + + Note that for this feature to work properly in LaTeX export, the Org +file requires the inclusion of the titletoc package. Because of +compatibility issues, titletoc has to be loaded _before_ hyperref. +Customize the ‘org-latex-default-packages-alist’ variable. + + Use the ‘TOC’ keyword to generate list of tables—respectively, all +listings—with captions. + + #+TOC: listings + #+TOC: tables + + Normally Org uses the headline for its entry in the table of +contents. But with ‘ALT_TITLE’ property, a different entry can be +specified for the table of contents. + + ---------- Footnotes ---------- + + (1) At the moment, some export back-ends do not obey this +specification. For example, LaTeX export excludes every unnumbered +headline from the table of contents. + + +File: org, Node: Include Files, Next: Macro Replacement, Prev: Table of Contents, Up: Exporting + +12.4 Include Files +================== + +During export, you can include the content of another file. For +example, to include your ‘.emacs’ file, you could use: + + #+INCLUDE: "~/.emacs" src emacs-lisp + +The first parameter is the file name to include. The optional second +parameter specifies the block type: ‘example’, ‘export’ or ‘src’. The +optional third parameter specifies the source code language to use for +formatting the contents. This is relevant to both ‘export’ and ‘src’ +block types. + + If an included file is specified as having a markup language, Org +neither checks for valid syntax nor changes the contents in any way. +For example and source blocks, Org code-escapes the contents before +inclusion. + + If an included file is not specified as having any markup language, +Org assumes it be in Org format and proceeds as usual with a few +exceptions. Org makes the footnote labels (see *note Creating +Footnotes::) in the included file local to that file. The contents of +the included file belong to the same structure—headline, item—containing +the ‘INCLUDE’ keyword. In particular, headlines within the file become +children of the current section. That behavior can be changed by +providing an additional keyword parameter, ‘:minlevel’. It shifts the +headlines in the included file to become the lowest level. For example, +this syntax makes the included file a sibling of the current top-level +headline: + + #+INCLUDE: "~/my-book/chapter2.org" :minlevel 1 + + Inclusion of only portions of files are specified using ranges +parameter with ‘:lines’ keyword. The line at the upper end of the range +will not be included. The start and/or the end of the range may be +omitted to use the obvious defaults. + +‘#+INCLUDE: "~/.emacs" :lines "5-10"’ Include lines 5 to 10, 10 excluded +‘#+INCLUDE: "~/.emacs" :lines "-10"’ Include lines 1 to 10, 10 excluded +‘#+INCLUDE: "~/.emacs" :lines "10-"’ Include lines from 10 to EOF + + Inclusions may specify a file-link to extract an object matched by +‘org-link-search’(1) (see *note Search Options::). The ranges for +‘:lines’ keyword are relative to the requested element. Therefore, + + #+INCLUDE: "./paper.org::*conclusion" :lines 1-20 + +includes the first 20 lines of the headline named ‘conclusion’. + + To extract only the contents of the matched object, set +‘:only-contents’ property to non-‘nil’. This omits any planning lines +or property drawers. For example, to include the body of the heading +with the custom ID ‘theory’, you can use + + #+INCLUDE: "./paper.org::#theory" :only-contents t + + The following command allows navigating back and forth to the +included document: + +‘C-c '’ (‘org-edit~special’) + + Visit the included file at point. + + ---------- Footnotes ---------- + + (1) Note that ‘org-link-search-must-match-exact-headline’ is locally +bound to non-‘nil’. Therefore, ‘org-link-search’ only matches headlines +and named elements. + + +File: org, Node: Macro Replacement, Next: Comment Lines, Prev: Include Files, Up: Exporting + +12.5 Macro Replacement +====================== + +Macros replace text snippets during export. Macros are defined globally +in ‘org-export-global-macros’, or document-wise with the following +syntax: + + #+MACRO: name replacement text; $1, $2 are arguments + +which can be referenced using ‘{{{name(arg1, arg2)}}}’(1). For example + + #+MACRO: poem Rose is $1, violet's $2. Life's ordered: Org assists you. + {{{poem(red,blue)}}} + +becomes + + Rose is red, violet's blue. Life's ordered: Org assists you. + + As a special case, Org parses any replacement text starting with +‘(eval’ as an Emacs Lisp expression and evaluates it accordingly. +Within such templates, arguments become strings. Thus, the following +macro + + #+MACRO: gnustamp (eval (concat "GNU/" (capitalize $1))) + +turns ‘{{{gnustamp(linux)}}}’ into ‘GNU/Linux’ during export. + + Org recognizes macro references in following Org markup areas: +paragraphs, headlines, verse blocks, tables cells and lists. Org also +recognizes macro references in keywords, such as ‘CAPTION’, ‘TITLE’, +‘AUTHOR’, ‘DATE’, and for some back-end specific export options. + + Org comes with following pre-defined macros: + +‘{{{keyword(NAME)}}}’ +‘{{{title}}}’ +‘{{{author}}}’ +‘{{{email}}}’ + The ‘keyword’ macro collects all values from NAME keywords + throughout the buffer, separated with white space. ‘title’, + ‘author’ and ‘email’ macros are shortcuts for, respectively, + ‘{{{keyword(TITLE)}}}’, ‘{{{keyword(AUTHOR)}}}’ and + ‘{{{keyword(EMAIL)}}}’. + +‘{{{date}}}’ +‘{{{date(FORMAT)}}}’ + This macro refers to the ‘DATE’ keyword. FORMAT is an optional + argument to the ‘date’ macro that is used only if ‘DATE’ is a + single timestamp. FORMAT should be a format string understood by + ‘format-time-string’. + +‘{{{time(FORMAT)}}}’ +‘{{{modification-time(FORMAT, VC)}}}’ + These macros refer to the document’s date and time of export and + date and time of modification. FORMAT is a string understood by + ‘format-time-string’. If the second argument to the + ‘modification-time’ macro is non-‘nil’, Org uses ‘vc.el’ to + retrieve the document’s modification time from the version control + system. Otherwise Org reads the file attributes. + +‘{{{input-file}}}’ + This macro refers to the filename of the exported file. + +‘{{{property(PROPERTY-NAME)}}}’ +‘{{{property(PROPERTY-NAME, SEARCH OPTION)}}}’ + This macro returns the value of property PROPERTY-NAME in the + current entry. If SEARCH-OPTION (see *note Search Options::) + refers to a remote entry, use it instead. + +‘{{{n}}}’ +‘{{{n(NAME)}}}’ +‘{{{n(NAME, ACTION)}}}’ + This macro implements custom counters by returning the number of + times the macro has been expanded so far while exporting the + buffer. You can create more than one counter using different NAME + values. If ACTION is ‘-’, previous value of the counter is held, + i.e., the specified counter is not incremented. If the value is a + number, the specified counter is set to that value. If it is any + other non-empty string, the specified counter is reset to 1. You + may leave NAME empty to reset the default counter. + + Moreover, inline source blocks (see *note Structure of Code Blocks::) +use the special ‘results’ macro to mark their output. As such, you are +advised against re-defining it, unless you know what you are doing. + + The surrounding brackets can be made invisible by setting +‘org-hide-macro-markers’ to a non-‘nil’ value. + + Org expands macros at the very beginning of the export process. + + ---------- Footnotes ---------- + + (1) Since commas separate the arguments, commas within arguments have +to be escaped with the backslash character. So only those backslash +characters before a comma need escaping with another backslash +character. + + +File: org, Node: Comment Lines, Next: ASCII/Latin-1/UTF-8 export, Prev: Macro Replacement, Up: Exporting + +12.6 Comment Lines +================== + +Lines starting with zero or more whitespace characters followed by one +‘#’ and a whitespace are treated as comments and, as such, are not +exported. + + Likewise, regions surrounded by ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ +are not exported. + + Finally, a ‘COMMENT’ keyword at the beginning of an entry, but after +any other keyword or priority cookie, comments out the entire subtree. +In this case, the subtree is not exported and no code block within it is +executed either(1). The command below helps changing the comment status +of a headline. + +‘C-c ;’ (‘org-toggle-comment’) + + Toggle the ‘COMMENT’ keyword at the beginning of an entry. + + ---------- Footnotes ---------- + + (1) For a less drastic behavior, consider using a select tag (see +*note Export Settings::) instead. + + +File: org, Node: ASCII/Latin-1/UTF-8 export, Next: Beamer Export, Prev: Comment Lines, Up: Exporting + +12.7 ASCII/Latin-1/UTF-8 export +=============================== + +ASCII export produces an output file containing only plain ASCII +characters. This is the simplest and most direct text output. It does +not contain any Org markup. Latin-1 and UTF-8 export use additional +characters and symbols available in these encoding standards. All three +of these export formats offer the most basic of text output for maximum +portability. + + On export, Org fills and justifies text according to the text width +set in ‘org-ascii-text-width’. + + Org exports links using a footnote-like style where the descriptive +part is in the text and the link is in a note before the next heading. +See the variable ‘org-ascii-links-to-notes’ for details. + +ASCII export commands +--------------------- + +‘C-c C-e t a’ (‘org-ascii-export-to-ascii’) +‘C-c C-e t l’ +‘C-c C-e t u’ + + Export as an ASCII file with a ‘.txt’ extension. For ‘myfile.org’, + Org exports to ‘myfile.txt’, overwriting without warning. For + ‘myfile.txt’, Org exports to ‘myfile.txt.txt’ in order to prevent + data loss. + +‘C-c C-e t A’ (‘org-ascii-export-to-ascii’) +‘C-c C-e t L’ +‘C-c C-e t U’ + + Export to a temporary buffer. Does not create a file. + +ASCII specific export settings +------------------------------ + +The ASCII export back-end has one extra keyword for customizing ASCII +output. Setting this keyword works similar to the general options (see +*note Export Settings::). + +‘SUBTITLE’ + The document subtitle. For long subtitles, use multiple + ‘#+SUBTITLE’ lines in the Org file. Org prints them on one + continuous line, wrapping into multiple lines if necessary. + +Header and sectioning structure +------------------------------- + +Org converts the first three outline levels into headlines for ASCII +export. The remaining levels are turned into lists. To change this +cut-off point where levels become lists, see *note Export Settings::. + +Quoting ASCII text +------------------ + +To insert text within the Org file by the ASCII back-end, use one the +following constructs, inline, keyword, or export block: + + Inline text @@ascii:and additional text@@ within a paragraph. + + #+ASCII: Some text + + #+BEGIN_EXPORT ascii + Org exports text in this block only when using ASCII back-end. + #+END_EXPORT + +ASCII specific attributes +------------------------- + +ASCII back-end recognizes only one attribute, ‘:width’, which specifies +the width of a horizontal rule in number of characters. The keyword and +syntax for specifying widths is: + + #+ATTR_ASCII: :width 10 + ----- + +ASCII special blocks +-------------------- + +Besides ‘#+BEGIN_CENTER’ blocks (see *note Paragraphs::), ASCII back-end +has these two left and right justification blocks: + + #+BEGIN_JUSTIFYLEFT + It's just a jump to the left... + #+END_JUSTIFYLEFT + + #+BEGIN_JUSTIFYRIGHT + ...and then a step to the right. + #+END_JUSTIFYRIGHT + + +File: org, Node: Beamer Export, Next: HTML Export, Prev: ASCII/Latin-1/UTF-8 export, Up: Exporting + +12.8 Beamer Export +================== + +Org uses Beamer export to convert an Org file tree structure into +high-quality interactive slides for presentations. Beamer is a LaTeX +document class for creating presentations in PDF, HTML, and other +popular display formats. + +* Menu: + +* Beamer export commands:: For creating Beamer documents. +* Beamer specific export settings:: For customizing Beamer export. +* Frames and Blocks in Beamer:: For composing Beamer slides. +* Beamer specific syntax:: For using in Org documents. +* Editing support:: Editing support. +* A Beamer example:: A complete presentation. + + +File: org, Node: Beamer export commands, Next: Beamer specific export settings, Up: Beamer Export + +12.8.1 Beamer export commands +----------------------------- + +‘C-c C-e l b’ (‘org-beamer-export-to-latex’) + + Export as LaTeX file with a ‘.tex’ extension. For ‘myfile.org’, + Org exports to ‘myfile.tex’, overwriting without warning. + +‘C-c C-e l B’ (‘org-beamer-export-as-latex’) + + Export to a temporary buffer. Does not create a file. + +‘C-c C-e l P’ (‘org-beamer-export-to-pdf’) + + Export as LaTeX file and then convert it to PDF format. + +‘C-c C-e l O’ + + Export as LaTeX file, convert it to PDF format, and then open the + PDF file. + + +File: org, Node: Beamer specific export settings, Next: Frames and Blocks in Beamer, Prev: Beamer export commands, Up: Beamer Export + +12.8.2 Beamer specific export settings +-------------------------------------- + +Beamer export back-end has several additional keywords for customizing +Beamer output. These keywords work similar to the general options +settings (see *note Export Settings::). + +‘BEAMER_THEME’ + The Beamer layout theme (‘org-beamer-theme’). Use square brackets + for options. For example: + + #+BEAMER_THEME: Rochester [height=20pt] + +‘BEAMER_FONT_THEME’ + The Beamer font theme. + +‘BEAMER_INNER_THEME’ + The Beamer inner theme. + +‘BEAMER_OUTER_THEME’ + The Beamer outer theme. + +‘BEAMER_HEADER’ + Arbitrary lines inserted in the preamble, just before the + ‘hyperref’ settings. + +‘DESCRIPTION’ + The document description. For long descriptions, use multiple + ‘DESCRIPTION’ keywords. By default, ‘hyperref’ inserts + ‘DESCRIPTION’ as metadata. Use ‘org-latex-hyperref-template’ to + configure document metadata. Use ‘org-latex-title-command’ to + configure typesetting of description as part of front matter. + +‘KEYWORDS’ + The keywords for defining the contents of the document. Use + multiple ‘KEYWORDS’ lines if necessary. By default, ‘hyperref’ + inserts ‘KEYWORDS’ as metadata. Use ‘org-latex-hyperref-template’ + to configure document metadata. Use ‘org-latex-title-command’ to + configure typesetting of keywords as part of front matter. + +‘SUBTITLE’ + Document’s subtitle. For typesetting, use + ‘org-beamer-subtitle-format’ string. Use + ‘org-latex-hyperref-template’ to configure document metadata. Use + ‘org-latex-title-command’ to configure typesetting of subtitle as + part of front matter. + + +File: org, Node: Frames and Blocks in Beamer, Next: Beamer specific syntax, Prev: Beamer specific export settings, Up: Beamer Export + +12.8.3 Frames and Blocks in Beamer +---------------------------------- + +Org transforms heading levels into Beamer’s sectioning elements, frames +and blocks. Any Org tree with a not-too-deep-level nesting should in +principle be exportable as a Beamer presentation. + + • Org headlines become Beamer frames when the heading level in Org is + equal to ‘org-beamer-frame-level’ or ‘H’ value in a ‘OPTIONS’ line + (see *note Export Settings::). + + Org overrides headlines to frames conversion for the current tree + of an Org file if it encounters the ‘BEAMER_ENV’ property set to + ‘frame’ or ‘fullframe’. Org ignores whatever + ‘org-beamer-frame-level’ happens to be for that headline level in + the Org tree. In Beamer terminology, a full frame is a frame + without its title. + + • Org exports a Beamer frame’s objects as block environments. Org + can enforce wrapping in special block types when ‘BEAMER_ENV’ + property is set(1). For valid values see + ‘org-beamer-environments-default’. To add more values, see + ‘org-beamer-environments-extra’. + + • If ‘BEAMER_ENV’ is set to ‘appendix’, Org exports the entry as an + appendix. When set to ‘note’, Org exports the entry as a note + within the frame or between frames, depending on the entry’s + heading level. When set to ‘noteNH’, Org exports the entry as a + note without its title. When set to ‘againframe’, Org exports the + entry with ‘\againframe’ command, which makes setting the + ‘BEAMER_REF’ property mandatory because ‘\againframe’ needs frame + to resume. + + When ‘ignoreheading’ is set, Org export ignores the entry’s + headline but not its content. This is useful for inserting content + between frames. It is also useful for properly closing a ‘column’ + environment. @end itemize + + When ‘BEAMER_ACT’ is set for a headline, Org export translates that + headline as an overlay or action specification. When enclosed in + square brackets, Org export makes the overlay specification a + default. Use ‘BEAMER_OPT’ to set any options applicable to the + current Beamer frame or block. The Beamer export back-end wraps + with appropriate angular or square brackets. It also adds the + ‘fragile’ option for any code that may require a verbatim block. + + To create a column on the Beamer slide, use the ‘BEAMER_COL’ + property for its headline in the Org file. Set the value of + ‘BEAMER_COL’ to a decimal number representing the fraction of the + total text width. Beamer export uses this value to set the + column’s width and fills the column with the contents of the Org + entry. If the Org entry has no specific environment defined, + Beamer export ignores the heading. If the Org entry has a defined + environment, Beamer export uses the heading as title. Behind the + scenes, Beamer export automatically handles LaTeX column + separations for contiguous headlines. To manually adjust them for + any unique configurations needs, use the ‘BEAMER_ENV’ property. + + ---------- Footnotes ---------- + + (1) If ‘BEAMER_ENV’ is set, Org export adds ‘B_environment’ tag to +make it visible. The tag serves as a visual aid and has no semantic +relevance. + + +File: org, Node: Beamer specific syntax, Next: Editing support, Prev: Frames and Blocks in Beamer, Up: Beamer Export + +12.8.4 Beamer specific syntax +----------------------------- + +Since Org’s Beamer export back-end is an extension of the LaTeX +back-end, it recognizes other LaTeX specific syntax—for example, +‘#+LATEX:’ or ‘#+ATTR_LATEX:’. See *note LaTeX Export::, for details. + + Beamer export wraps the table of contents generated with ‘toc:t’ +‘OPTION’ keyword in a ‘frame’ environment. Beamer export does not wrap +the table of contents generated with ‘TOC’ keyword (see *note Table of +Contents::). Use square brackets for specifying options. + + #+TOC: headlines [currentsection] + + Insert Beamer-specific code using the following constructs: + + #+BEAMER: \pause + + #+BEGIN_EXPORT beamer + Only Beamer export back-end exports this. + #+END_BEAMER + + Text @@beamer:some code@@ within a paragraph. + + Inline constructs, such as the last one above, are useful for adding +overlay specifications to objects with ‘bold’, ‘item’, ‘link’, +‘radio-target’ and ‘target’ types. Enclose the value in angular +brackets and place the specification at the beginning of the object as +shown in this example: + + A *@@beamer:<2->@@useful* feature + + Beamer export recognizes the ‘ATTR_BEAMER’ keyword with the following +attributes from Beamer configurations: ‘:environment’ for changing local +Beamer environment, ‘:overlay’ for specifying Beamer overlays in angular +or square brackets, and ‘:options’ for inserting optional arguments. + + #+ATTR_BEAMER: :environment nonindentlist + - item 1, not indented + - item 2, not indented + - item 3, not indented + + #+ATTR_BEAMER: :overlay <+-> + - item 1 + - item 2 + + #+ATTR_BEAMER: :options [Lagrange] + Let $G$ be a finite group, and let $H$ be + a subgroup of $G$. Then the order of $H$ divides the order of $G$. + + +File: org, Node: Editing support, Next: A Beamer example, Prev: Beamer specific syntax, Up: Beamer Export + +12.8.5 Editing support +---------------------- + +The ‘org-beamer-mode’ is a special minor mode for faster editing of +Beamer documents. + + #+STARTUP: beamer + +‘C-c C-b’ (‘org-beamer-select-environment’) + + The ‘org-beamer-mode’ provides this key for quicker selections in + Beamer normal environments, and for selecting the ‘BEAMER_COL’ + property. + + +File: org, Node: A Beamer example, Prev: Editing support, Up: Beamer Export + +12.8.6 A Beamer example +----------------------- + +Here is an example of an Org document ready for Beamer export. + + #+TITLE: Example Presentation + #+AUTHOR: Carsten Dominik + #+OPTIONS: H:2 toc:t num:t + #+LATEX_CLASS: beamer + #+LATEX_CLASS_OPTIONS: [presentation] + #+BEAMER_THEME: Madrid + #+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col) + + * This is the first structural section + + ** Frame 1 + *** Thanks to Eric Fraga :B_block: + :PROPERTIES: + :BEAMER_COL: 0.48 + :BEAMER_ENV: block + :END: + for the first viable Beamer setup in Org + *** Thanks to everyone else :B_block: + :PROPERTIES: + :BEAMER_COL: 0.48 + :BEAMER_ACT: <2-> + :BEAMER_ENV: block + :END: + for contributing to the discussion + **** This will be formatted as a beamer note :B_note: + :PROPERTIES: + :BEAMER_env: note + :END: + ** Frame 2 (where we will not use columns) + *** Request + Please test this stuff! + + +File: org, Node: HTML Export, Next: LaTeX Export, Prev: Beamer Export, Up: Exporting + +12.9 HTML Export +================ + +Org mode contains an HTML exporter with extensive HTML formatting +compatible with XHTML 1.0 strict standard. + +* Menu: + +* HTML export commands:: Invoking HTML export. +* HTML specific export settings:: Settings for HTML export. +* HTML doctypes:: Exporting various (X)HTML flavors. +* HTML preamble and postamble:: Inserting preamble and postamble. +* Quoting HTML tags:: Using direct HTML in Org files. +* Links in HTML export:: Inserting and formatting links. +* Tables in HTML export:: How to modify the formatting of tables. +* Images in HTML export:: How to insert figures into HTML output. +* Math formatting in HTML export:: Beautiful math also on the web. +* Text areas in HTML export:: An alternate way to show an example. +* CSS support:: Changing the appearance of the output. +* JavaScript support:: Info and folding in a web browser. + + +File: org, Node: HTML export commands, Next: HTML specific export settings, Up: HTML Export + +12.9.1 HTML export commands +--------------------------- + +‘C-c C-e h h’ (‘org-html-export-to-html’) + + Export as HTML file with a ‘.html’ extension. For ‘myfile.org’, + Org exports to ‘myfile.html’, overwriting without warning. + {{{kbd{C-c C-e h o)}}} exports to HTML and opens it in a web + browser. + +‘C-c C-e h H’ (‘org-html-export-as-html’) + + Exports to a temporary buffer. Does not create a file. + + +File: org, Node: HTML specific export settings, Next: HTML doctypes, Prev: HTML export commands, Up: HTML Export + +12.9.2 HTML specific export settings +------------------------------------ + +HTML export has a number of keywords, similar to the general options +settings described in *note Export Settings::. + +‘DESCRIPTION’ + This is the document’s description, which the HTML exporter inserts + it as a HTML meta tag in the HTML file. For long descriptions, use + multiple ‘DESCRIPTION’ lines. The exporter takes care of wrapping + the lines properly. + +‘HTML_DOCTYPE’ + Specify the document type, for example: HTML5 (‘org-html-doctype’). + +‘HTML_CONTAINER’ + Specify the HTML container, such as ‘div’, for wrapping sections + and elements (‘org-html-container-element’). + +‘HTML_LINK_HOME’ + The URL for home link (‘org-html-link-home’). + +‘HTML_LINK_UP’ + The URL for the up link of exported HTML pages + (‘org-html-link-up’). + +‘HTML_MATHJAX’ + Options for MathJax (‘org-html-mathjax-options’). MathJax is used + to typeset LaTeX math in HTML documents. See *note Math formatting + in HTML export::, for an example. + +‘HTML_HEAD’ + Arbitrary lines for appending to the HTML document’s head + (‘org-html-head’). + +‘HTML_HEAD_EXTRA’ + More arbitrary lines for appending to the HTML document’s head + (‘org-html-head-extra’). + +‘KEYWORDS’ + Keywords to describe the document’s content. HTML exporter inserts + these keywords as HTML meta tags. For long keywords, use multiple + ‘KEYWORDS’ lines. + +‘LATEX_HEADER’ + Arbitrary lines for appending to the preamble; HTML exporter + appends when transcoding LaTeX fragments to images (see *note Math + formatting in HTML export::). + +‘SUBTITLE’ + The document’s subtitle. HTML exporter formats subtitle if + document type is ‘HTML5’ and the CSS has a ‘subtitle’ class. + + Some of these keywords are explained in more detail in the following +sections of the manual. + + +File: org, Node: HTML doctypes, Next: HTML preamble and postamble, Prev: HTML specific export settings, Up: HTML Export + +12.9.3 HTML doctypes +-------------------- + +Org can export to various (X)HTML flavors. + + Set the ‘org-html-doctype’ variable for different (X)HTML variants. +Depending on the variant, the HTML exporter adjusts the syntax of HTML +conversion accordingly. Org includes the following ready-made variants: + + • ‘"html4-strict"’ + • ‘"html4-transitional"’ + • ‘"html4-frameset"’ + • ‘"xhtml-strict"’ + • ‘"xhtml-transitional"’ + • ‘"xhtml-frameset"’ + • ‘"xhtml-11"’ + • ‘"html5"’ + • ‘"xhtml5"’ + +See the variable ‘org-html-doctype-alist’ for details. The default is +‘"xhtml-strict"’. + + Org’s HTML exporter does not by default enable new block elements +introduced with the HTML5 standard. To enable them, set +‘org-html-html5-fancy’ to non-‘nil’. Or use an ‘OPTIONS’ line in the +file to set ‘html5-fancy’. + + HTML5 documents can now have arbitrary ‘#+BEGIN’ ... ‘#+END’ blocks. +For example: + + #+BEGIN_aside + Lorem ipsum + #+END_aside + +exports to: + + + +while this: + + #+ATTR_HTML: :controls controls :width 350 + #+BEGIN_video + #+HTML: + #+HTML: + Your browser does not support the video tag. + #+END_video + +exports to: + + + + When special blocks do not have a corresponding HTML5 element, the +HTML exporter reverts to standard translation (see +‘org-html-html5-elements’). For example, ‘#+BEGIN_lederhosen’ exports +to ‘
’. + + Special blocks cannot have headlines. For the HTML exporter to wrap +the headline and its contents in ‘
’ or ‘
’ tags, set +the ‘HTML_CONTAINER’ property for the headline. + + +File: org, Node: HTML preamble and postamble, Next: Quoting HTML tags, Prev: HTML doctypes, Up: HTML Export + +12.9.4 HTML preamble and postamble +---------------------------------- + +The HTML exporter has delineations for preamble and postamble. The +default value for ‘org-html-preamble’ is ‘t’, which makes the HTML +exporter insert the preamble. See the variable +‘org-html-preamble-format’ for the format string. + + Set ‘org-html-preamble’ to a string to override the default format +string. If the string is a function, the HTML exporter expects the +function to return a string upon execution. The HTML exporter inserts +this string in the preamble. The HTML exporter does not insert a +preamble if ‘org-html-preamble’ is set ‘nil’. + + The default value for ‘org-html-postamble’ is ‘auto’, which makes the +HTML exporter build a postamble from looking up author’s name, email +address, creator’s name, and date. Set ‘org-html-postamble’ to ‘t’ to +insert the postamble in the format specified in the +‘org-html-postamble-format’ variable. The HTML exporter does not insert +a postamble if ‘org-html-postamble’ is set to ‘nil’. + + +File: org, Node: Quoting HTML tags, Next: Links in HTML export, Prev: HTML preamble and postamble, Up: HTML Export + +12.9.5 Quoting HTML tags +------------------------ + +The HTML export back-end transforms ‘<’ and ‘>’ to ‘<’ and ‘>’. + + To include raw HTML code in the Org file so the HTML export back-end +can insert that HTML code in the output, use this inline syntax: +‘@@html:...@@’. For example: + + @@html:@@bold text@@html:@@ + + For larger raw HTML code blocks, use these HTML export code blocks: + + #+HTML: Literal HTML code for export + + #+BEGIN_EXPORT html + All lines between these markers are exported literally + #+END_EXPORT + + +File: org, Node: Links in HTML export, Next: Tables in HTML export, Prev: Quoting HTML tags, Up: HTML Export + +12.9.6 Links in HTML export +--------------------------- + +The HTML export back-end transforms Org’s internal links (see *note +Internal Links::) to equivalent HTML links in the output. The back-end +similarly handles Org’s automatic links created by radio targets (see +*note Radio Targets::) similarly. For Org links to external files, the +back-end transforms the links to _relative_ paths. + + For Org links to other ‘.org’ files, the back-end automatically +changes the file extension to ‘.html’ and makes file paths relative. If +the ‘.org’ files have an equivalent ‘.html’ version at the same +location, then the converted links should work without any further +manual intervention. However, to disable this automatic path +translation, set ‘org-html-link-org-files-as-html’ to ‘nil’. When +disabled, the HTML export back-end substitutes the ID-based links in the +HTML output. For more about linking files when publishing to a +directory, see *note Publishing links::. + + Org files can also have special directives to the HTML export +back-end. For example, by using ‘#+ATTR_HTML’ lines to specify new +format attributes to ‘’ or ‘’ tags. This example shows changing +the link’s title and style: + + #+ATTR_HTML: :title The Org mode homepage :style color:red; + [[https://orgmode.org]] + + +File: org, Node: Tables in HTML export, Next: Images in HTML export, Prev: Links in HTML export, Up: HTML Export + +12.9.7 Tables in HTML export +---------------------------- + +The HTML export back-end uses ‘org-html-table-default-attributes’ when +exporting Org tables to HTML. By default, the exporter does not draw +frames and cell borders. To change for this for a table, use the +following lines before the table in the Org file: + + #+CAPTION: This is a table with lines around and between cells + #+ATTR_HTML: border="2" rules="all" frame="border" + + The HTML export back-end preserves column groupings in Org tables +(see *note Column Groups::) when exporting to HTML. + + Additional options for customizing tables for HTML export. + +‘org-html-table-align-individual-fields’ + Non-‘nil’ attaches style attributes for alignment to each table + field. + +‘org-html-table-caption-above’ + Non-‘nil’ places caption string at the beginning of the table. + +‘org-html-table-data-tags’ + Opening and ending tags for table data fields. + +‘org-html-table-default-attributes’ + Default attributes and values for table tags. + +‘org-html-table-header-tags’ + Opening and ending tags for table’s header fields. + +‘org-html-table-row-tags’ + Opening and ending tags for table rows. + +‘org-html-table-use-header-tags-for-first-column’ + Non-‘nil’ formats column one in tables with header tags. + + +File: org, Node: Images in HTML export, Next: Math formatting in HTML export, Prev: Tables in HTML export, Up: HTML Export + +12.9.8 Images in HTML export +---------------------------- + +The HTML export back-end has features to convert Org image links to HTML +inline images and HTML clickable image links. + + When the link in the Org file has no description, the HTML export +back-end by default in-lines that image. For example: +‘[[file:myimg.jpg]]’ is in-lined, while ‘[[file:myimg.jpg][the image]]’ +links to the text, ‘the image’. For more details, see the variable +‘org-html-inline-images’. + + On the other hand, if the description part of the Org link is itself +another link, such as ‘file:’ or ‘http:’ URL pointing to an image, the +HTML export back-end in-lines this image and links to the main image. +This Org syntax enables the back-end to link low-resolution thumbnail to +the high-resolution version of the image, as shown in this example: + + [[file:highres.jpg][file:thumb.jpg]] + + To change attributes of in-lined images, use ‘#+ATTR_HTML’ lines in +the Org file. This example shows realignment to right, and adds ‘alt’ +and ‘title’ attributes in support of text viewers and modern web +accessibility standards. + + #+CAPTION: A black cat stalking a spider + #+ATTR_HTML: :alt cat/spider image :title Action! :align right + [[./img/a.jpg]] + + The HTML export back-end copies the ‘http’ links from the Org file +as-is. + + +File: org, Node: Math formatting in HTML export, Next: Text areas in HTML export, Prev: Images in HTML export, Up: HTML Export + +12.9.9 Math formatting in HTML export +------------------------------------- + +LaTeX math snippets (see *note LaTeX fragments::) can be displayed in +two different ways on HTML pages. The default is to use the MathJax +(http://www.mathjax.org), which should work out of the box with +Org(1)(2). Some MathJax display options can be configured via +‘org-html-mathjax-options’, or in the buffer. For example, with the +following settings, + + #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler + #+HTML_MATHJAX: cancel.js noErrors.js + +equation labels are displayed on the left margin and equations are five +em from the left margin. In addition, it loads the two MathJax +extensions ‘cancel.js’ and ‘noErrors.js’(3). + + See the docstring of ‘org-html-mathjax-options’ for all supported +variables. The MathJax template can be configure via +‘org-html-mathjax-template’. + + If you prefer, you can also request that LaTeX fragments are +processed into small images that will be inserted into the browser page. +Before the availability of MathJax, this was the default method for Org +files. This method requires that the dvipng program, dvisvgm or +ImageMagick suite is available on your system. You can still get this +processing with + + #+OPTIONS: tex:dvipng + + #+OPTIONS: tex:dvisvgm + +or + + #+OPTIONS: tex:imagemagick + + ---------- Footnotes ---------- + + (1) By default Org loads MathJax from cdnjs.com (https://cdnjs.com) +as recommended by MathJax (http://www.mathjax.org). + + (2) Please note that exported formulas are part of an HTML document, +and that signs such as ‘<’, ‘>’, or ‘&’ have special meanings. See +MathJax TeX and LaTeX support +(http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents). + + (3) See TeX and LaTeX extensions +(http://docs.mathjax.org/en/latest/tex.html#tex-extensions) in the +MathJax manual (http://docs.mathjax.org) to learn about extensions. + + +File: org, Node: Text areas in HTML export, Next: CSS support, Prev: Math formatting in HTML export, Up: HTML Export + +12.9.10 Text areas in HTML export +--------------------------------- + +Before Org mode’s Babel, one popular approach to publishing code in HTML +was by using ‘:textarea’. The advantage of this approach was that +copying and pasting was built into browsers with simple JavaScript +commands. Even editing before pasting was made simple. + + The HTML export back-end can create such text areas. It requires an +‘#+ATTR_HTML’ line as shown in the example below with the ‘:textarea’ +option. This must be followed by either an example or a source code +block. Other Org block types do not honor the ‘:textarea’ option. + + By default, the HTML export back-end creates a text area 80 +characters wide and height just enough to fit the content. Override +these defaults with ‘:width’ and ‘:height’ options on the ‘#+ATTR_HTML’ +line. + + #+ATTR_HTML: :textarea t :width 40 + #+BEGIN_EXAMPLE + (defun org-xor (a b) + "Exclusive or." + (if a (not b) b)) + #+END_EXAMPLE + + +File: org, Node: CSS support, Next: JavaScript support, Prev: Text areas in HTML export, Up: HTML Export + +12.9.11 CSS support +------------------- + +You can modify the CSS style definitions for the exported file. The +HTML exporter assigns the following special CSS classes(1) to +appropriate parts of the document—your style specifications may change +these, in addition to any of the standard classes like for headlines, +tables, etc. + +‘p.author’ author information, including email +‘p.date’ publishing date +‘p.creator’ creator info, about org mode version +‘.title’ document title +‘.subtitle’ document subtitle +‘.todo’ TODO keywords, all not-done states +‘.done’ the DONE keywords, all states that count as done +‘.WAITING’ each TODO keyword also uses a class named after itself +‘.timestamp’ timestamp +‘.timestamp-kwd’ keyword associated with a timestamp, like ‘SCHEDULED’ +‘.timestamp-wrapper’ span around keyword plus timestamp +‘.tag’ tag in a headline +‘._HOME’ each tag uses itself as a class, “@” replaced by “_” +‘.target’ target for links +‘.linenr’ the line number in a code example +‘.code-highlighted’ for highlighting referenced code lines +‘div.outline-N’ div for outline level N (headline plus text) +‘div.outline-text-N’ extra div for text at outline level N +‘.section-number-N’ section number in headlines, different for each level +‘.figure-number’ label like “Figure 1:” +‘.table-number’ label like “Table 1:” +‘.listing-number’ label like “Listing 1:” +‘div.figure’ how to format an in-lined image +‘pre.src’ formatted source code +‘pre.example’ normal example +‘p.verse’ verse paragraph +‘div.footnotes’ footnote section headline +‘p.footnote’ footnote definition paragraph, containing a footnote +‘.footref’ a footnote reference number (always a ) +‘.footnum’ footnote number in footnote definition (always ) +‘.org-svg’ default class for a linked ‘.svg’ image + + The HTML export back-end includes a compact default style in each +exported HTML file. To override the default style with another style, +use these keywords in the Org file. They will replace the global +defaults the HTML exporter uses. + + #+HTML_HEAD: + #+HTML_HEAD_EXTRA: + + To just turn off the default style, customize +‘org-html-head-include-default-style’ variable, or use this option line +in the Org file. + + #+OPTIONS: html-style:nil + + For longer style definitions, either use several ‘HTML_HEAD’ and +‘HTML_HEAD_EXTRA’ keywords, or use ‘’ blocks around +them. Both of these approaches can avoid referring to an external file. + + In order to add styles to a sub-tree, use the ‘HTML_CONTAINER_CLASS’ +property to assign a class to the tree. In order to specify CSS styles +for a particular headline, you can use the ID specified in a ‘CUSTOM_ID’ +property. + + Never change the ‘org-html-style-default’ constant. Instead use +other simpler ways of customizing as described above. + + ---------- Footnotes ---------- + + (1) If the classes on TODO keywords and tags lead to conflicts, use +the variables ‘org-html-todo-kwd-class-prefix’ and +‘org-html-tag-class-prefix’ to make them unique. + + +File: org, Node: JavaScript support, Prev: CSS support, Up: HTML Export + +12.9.12 JavaScript supported display of web pages +------------------------------------------------- + +Sebastian Rose has written a JavaScript program especially designed to +enhance the web viewing experience of HTML files created with Org. This +program enhances large files in two different ways of viewing. One is +an _Info_-like mode where each section is displayed separately and +navigation can be done with the ‘n’ and ‘p’ keys, and some other keys as +well, press ‘?’ for an overview of the available keys. The second one +has a _folding_ view, much like Org provides inside Emacs. The script +is available at and the documentation +at . The script is hosted +on , but for reliability, prefer installing it on +your own web server. + + To use this program, just add this line to the Org file: + + #+INFOJS_OPT: view:info toc:nil + +The HTML header now has the code needed to automatically invoke the +script. For setting options, use the syntax from the above line for +options described below: + +‘path:’ + The path to the script. The default is to grab the script from + , but you might want to have a + local copy and use a path like ‘../scripts/org-info.js’. + +‘view:’ + Initial view when the website is first shown. Possible values are: + + ‘info’ Info-like interface with one section per page + ‘overview’ Folding interface, initially showing only top-level + ‘content’ Folding interface, starting with all headlines visible + ‘showall’ Folding interface, all headlines and text visible + +‘sdepth:’ + Maximum headline level still considered as an independent section + for info and folding modes. The default is taken from + ‘org-export-headline-levels’, i.e., the ‘H’ switch in ‘OPTIONS’. + If this is smaller than in ‘org-export-headline-levels’, each + info/folding section can still contain child headlines. + +‘toc:’ + Should the table of contents _initially_ be visible? Even when + ‘nil’, you can always get to the “toc” with ‘i’. + +‘tdepth:’ + The depth of the table of contents. The defaults are taken from + the variables ‘org-export-headline-levels’ and + ‘org-export-with-toc’. + +‘ftoc:’ + Does the CSS of the page specify a fixed position for the “toc”? + If yes, the toc is displayed as a section. + +‘ltoc:’ + Should there be short contents (children) in each section? Make + this ‘above’ if the section should be above initial text. + +‘mouse:’ + Headings are highlighted when the mouse is over them. Should be + ‘underline’ (default) or a background color like ‘#cccccc’. + +‘buttons:’ + Should view-toggle buttons be everywhere? When ‘nil’ (the + default), only one such button is present. + + You can choose default values for these options by customizing the +variable ‘org-infojs-options’. If you always want to apply the script +to your pages, configure the variable ‘org-export-html-use-infojs’. + + +File: org, Node: LaTeX Export, Next: Markdown Export, Prev: HTML Export, Up: Exporting + +12.10 LaTeX Export +================== + +The LaTeX export back-end can handle complex documents, incorporate +standard or custom LaTeX document classes, generate documents using +alternate LaTeX engines, and produce fully linked PDF files with +indexes, bibliographies, and tables of contents, destined for +interactive online viewing or high-quality print publication. + + While the details are covered in-depth in this section, here are some +quick references to variables for the impatient: for engines, see +‘org-latex-compiler’; for build sequences, see ‘org-latex-pdf-process’; +for packages, see ‘org-latex-default-packages-alist’ and +‘org-latex-packages-alist’. + + An important note about the LaTeX export back-end: it is sensitive to +blank lines in the Org document. That’s because LaTeX itself depends on +blank lines to tell apart syntactical elements, such as paragraphs. + +* Menu: + +* LaTeX/PDF export commands:: For producing LaTeX and PDF documents. +* LaTeX specific export settings:: Unique to this LaTeX back-end. +* LaTeX header and sectioning:: Setting up the export file structure. +* Quoting LaTeX code:: Incorporating literal LaTeX code. +* Tables in LaTeX export:: Options for exporting tables to LaTeX. +* Images in LaTeX export:: How to insert figures into LaTeX output. +* Plain lists in LaTeX export:: Attributes specific to lists. +* Source blocks in LaTeX export:: Attributes specific to source code blocks. +* Example blocks in LaTeX export:: Attributes specific to example blocks. +* Special blocks in LaTeX export:: Attributes specific to special blocks. +* Horizontal rules in LaTeX export:: Attributes specific to horizontal rules. + + +File: org, Node: LaTeX/PDF export commands, Next: LaTeX specific export settings, Up: LaTeX Export + +12.10.1 LaTeX/PDF export commands +--------------------------------- + +‘C-c C-e l l’ (‘org-latex-export-to-latex’) + Export to a LaTeX file with a ‘.tex’ extension. For ‘myfile.org’, + Org exports to ‘myfile.tex’, overwriting without warning. + +‘C-c C-e l L’ (‘org-latex-export-as-latex’) + Export to a temporary buffer. Do not create a file. + +‘C-c C-e l p’ (‘org-latex-export-to-pdf’) + Export as LaTeX file and convert it to PDF file. + +‘C-c C-e l o’ + Export as LaTeX file and convert it to PDF, then open the PDF using + the default viewer. + +‘M-x org-export-region-as-latex’ + Convert the region to LaTeX under the assumption that it was in Org + mode syntax before. This is a global command that can be invoked + in any buffer. + + The LaTeX export back-end can use any of these LaTeX engines: +‘pdflatex’, ‘xelatex’, and ‘lualatex’. These engines compile LaTeX +files with different compilers, packages, and output options. The LaTeX +export back-end finds the compiler version to use from +‘org-latex-compiler’ variable or the ‘#+LATEX_COMPILER’ keyword in the +Org file. See the docstring for the ‘org-latex-default-packages-alist’ +for loading packages with certain compilers. Also see +‘org-latex-bibtex-compiler’ to set the bibliography compiler(1). + + ---------- Footnotes ---------- + + (1) This does not allow setting different bibliography compilers for +different files. However, “smart” LaTeX compilation systems, such as +latexmk, can select the correct bibliography compiler. + + +File: org, Node: LaTeX specific export settings, Next: LaTeX header and sectioning, Prev: LaTeX/PDF export commands, Up: LaTeX Export + +12.10.2 LaTeX specific export settings +-------------------------------------- + +The LaTeX export back-end has several additional keywords for +customizing LaTeX output. Setting these keywords works similar to the +general options (see *note Export Settings::). + +‘DESCRIPTION’ + The document’s description. The description along with author + name, keywords, and related file metadata are inserted in the + output file by the hyperref package. See + ‘org-latex-hyperref-template’ for customizing metadata items. See + ‘org-latex-title-command’ for typesetting description into the + document’s front matter. Use multiple ‘DESCRIPTION’ keywords for + long descriptions. + +‘LANGUAGE’ + In order to be effective, the ‘babel’ or ‘polyglossia’ + packages—according to the LaTeX compiler used—must be loaded with + the appropriate language as argument. This can be accomplished by + modifying the ‘org-latex-packages-alist’ variable, e.g., with the + following snippet: + + (add-to-list 'org-latex-packages-alist + '("AUTO" "babel" t ("pdflatex"))) + (add-to-list 'org-latex-packages-alist + '("AUTO" "polyglossia" t ("xelatex" "lualatex"))) + +‘LATEX_CLASS’ + This is LaTeX document class, such as _article_, _report_, _book_, + and so on, which contain predefined preamble and headline level + mapping that the LaTeX export back-end needs. The back-end reads + the default class name from the ‘org-latex-default-class’ variable. + Org has _article_ as the default class. A valid default class must + be an element of ‘org-latex-classes’. + +‘LATEX_CLASS_OPTIONS’ + Options the LaTeX export back-end uses when calling the LaTeX + document class. + +‘LATEX_COMPILER’ + The compiler, such as ‘pdflatex’, ‘xelatex’, ‘lualatex’, for + producing the PDF. See ‘org-latex-compiler’. + +‘LATEX_HEADER’ +‘LATEX_HEADER_EXTRA’ + Arbitrary lines to add to the document’s preamble, before the + hyperref settings. See ‘org-latex-classes’ for adjusting the + structure and order of the LaTeX headers. + +‘KEYWORDS’ + The keywords for the document. The description along with author + name, keywords, and related file metadata are inserted in the + output file by the hyperref package. See + ‘org-latex-hyperref-template’ for customizing metadata items. See + ‘org-latex-title-command’ for typesetting description into the + document’s front matter. Use multiple ‘KEYWORDS’ lines if + necessary. + +‘SUBTITLE’ + The document’s subtitle. It is typeset as per + ‘org-latex-subtitle-format’. If ‘org-latex-subtitle-separate’ is + non-‘nil’, it is typed as part of the ‘\title’ macro. See + ‘org-latex-hyperref-template’ for customizing metadata items. See + ‘org-latex-title-command’ for typesetting description into the + document’s front matter. + + The following sections have further details. + + +File: org, Node: LaTeX header and sectioning, Next: Quoting LaTeX code, Prev: LaTeX specific export settings, Up: LaTeX Export + +12.10.3 LaTeX header and sectioning structure +--------------------------------------------- + +The LaTeX export back-end converts the first three of Org’s outline +levels into LaTeX headlines. The remaining Org levels are exported as +lists. To change this globally for the cut-off point between levels and +lists, (see *note Export Settings::). + + By default, the LaTeX export back-end uses the _article_ class. + + To change the default class globally, edit ‘org-latex-default-class’. +To change the default class locally in an Org file, add option lines +‘#+LATEX_CLASS: myclass’. To change the default class for just a part +of the Org file, set a sub-tree property, ‘EXPORT_LATEX_CLASS’. The +class name entered here must be valid member of ‘org-latex-classes’. +This variable defines a header template for each class into which the +exporter splices the values of ‘org-latex-default-packages-alist’ and +‘org-latex-packages-alist’. Use the same three variables to define +custom sectioning or custom classes. + + The LaTeX export back-end sends the ‘LATEX_CLASS_OPTIONS’ keyword and +‘EXPORT_LATEX_CLASS_OPTIONS’ property as options to the LaTeX +‘\documentclass’ macro. The options and the syntax for specifying them, +including enclosing them in square brackets, follow LaTeX conventions. + + #+LATEX_CLASS_OPTIONS: [a4paper,11pt,twoside,twocolumn] + + The LaTeX export back-end appends values from ‘LATEX_HEADER’ and +‘LATEX_HEADER_EXTRA’ keywords to the LaTeX header. The docstring for +‘org-latex-classes’ explains in more detail. Also note that LaTeX +export back-end does not append ‘LATEX_HEADER_EXTRA’ to the header when +previewing LaTeX snippets (see *note Previewing LaTeX fragments::). + + A sample Org file with the above headers: + + #+LATEX_CLASS: article + #+LATEX_CLASS_OPTIONS: [a4paper] + #+LATEX_HEADER: \usepackage{xyz} + + * Headline 1 + some text + * Headline 2 + some more text + + +File: org, Node: Quoting LaTeX code, Next: Tables in LaTeX export, Prev: LaTeX header and sectioning, Up: LaTeX Export + +12.10.4 Quoting LaTeX code +-------------------------- + +The LaTeX export back-end can insert any arbitrary LaTeX code, see *note +Embedded LaTeX::. There are three ways to embed such code in the Org +file and they all use different quoting syntax. + + Inserting in-line quoted with @ symbols: + + Code embedded in-line @@latex:any arbitrary LaTeX code@@ in a paragraph. + + Inserting as one or more keyword lines in the Org file: + + #+LATEX: any arbitrary LaTeX code + + Inserting as an export block in the Org file, where the back-end +exports any code between begin and end markers: + + #+BEGIN_EXPORT latex + any arbitrary LaTeX code + #+END_EXPORT + + +File: org, Node: Tables in LaTeX export, Next: Images in LaTeX export, Prev: Quoting LaTeX code, Up: LaTeX Export + +12.10.5 Tables in LaTeX export +------------------------------ + +The LaTeX export back-end can pass several LaTeX attributes for table +contents and layout. Besides specifying a label (see *note Internal +Links::) and a caption (see *note Captions::), the other valid LaTeX +attributes include: + +‘:mode’ + The LaTeX export back-end wraps the table differently depending on + the mode for accurate rendering of math symbols. Mode is either + ‘table’, ‘math’, ‘inline-math’ or ‘verbatim’. + + For ‘math’ or ‘inline-math’ mode, LaTeX export back-end wraps the + table in a math environment, but every cell in it is exported + as-is. The LaTeX export back-end determines the default mode from + ‘org-latex-default-table-mode’. The LaTeX export back-end merges + contiguous tables in the same mode into a single environment. + +‘:environment’ + Set the default LaTeX table environment for the LaTeX export + back-end to use when exporting Org tables. Common LaTeX table + environments are provided by these packages: tabularx, longtable, + array, tabu, and bmatrix. For packages, such as tabularx and tabu, + or any newer replacements, include them in the + ‘org-latex-packages-alist’ variable so the LaTeX export back-end + can insert the appropriate load package headers in the converted + LaTeX file. Look in the docstring for the + ‘org-latex-packages-alist’ variable for configuring these packages + for LaTeX snippet previews, if any. + +‘:caption’ + Use ‘CAPTION’ keyword to set a simple caption for a table (see + *note Captions::). For custom captions, use ‘:caption’ attribute, + which accepts raw LaTeX code. ‘:caption’ value overrides ‘CAPTION’ + value. + +‘:float’ +‘:placement’ + The table environments by default are not floats in LaTeX. To make + them floating objects use ‘:float’ with one of the following + options: ‘sideways’, ‘multicolumn’, ‘t’, and ‘nil’. + + LaTeX floats can also have additional layout ‘:placement’ + attributes. These are the usual ‘[h t b p ! H]’ permissions + specified in square brackets. Note that for ‘:float sideways’ + tables, the LaTeX export back-end ignores ‘:placement’ attributes. + +‘:align’ +‘:font’ +‘:width’ + The LaTeX export back-end uses these attributes for regular tables + to set their alignments, fonts, and widths. + +‘:spread’ + When ‘:spread’ is non-‘nil’, the LaTeX export back-end spreads or + shrinks the table by the ‘:width’ for tabu and longtabu + environments. ‘:spread’ has no effect if ‘:width’ is not set. + +‘:booktabs’ +‘:center’ +‘:rmlines’ + All three commands are toggles. ‘:booktabs’ brings in modern + typesetting enhancements to regular tables. The booktabs package + has to be loaded through ‘org-latex-packages-alist’. ‘:center’ is + for centering the table. ‘:rmlines’ removes all but the very first + horizontal line made of ASCII characters from “table.el” tables + only. + +‘:math-prefix’ +‘:math-suffix’ +‘:math-arguments’ + The LaTeX export back-end inserts ‘:math-prefix’ string value in a + math environment before the table. The LaTeX export back-end + inserts ‘:math-suffix’ string value in a math environment after the + table. The LaTeX export back-end inserts ‘:math-arguments’ string + value between the macro name and the table’s contents. + ‘:math-arguments’ comes in use for matrix macros that require more + than one argument, such as ‘qbordermatrix’. + + LaTeX table attributes help formatting tables for a wide range of +situations, such as matrix product or spanning multiple pages: + + #+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l + | ... | ... | + | ... | ... | + + #+ATTR_LATEX: :mode math :environment bmatrix :math-suffix \times + | a | b | + | c | d | + #+ATTR_LATEX: :mode math :environment bmatrix + | 1 | 2 | + | 3 | 4 | + + Set the caption with the LaTeX command +‘\bicaption{HeadingA}{HeadingB}’: + + #+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB} + | ... | ... | + | ... | ... | + + +File: org, Node: Images in LaTeX export, Next: Plain lists in LaTeX export, Prev: Tables in LaTeX export, Up: LaTeX Export + +12.10.6 Images in LaTeX export +------------------------------ + +The LaTeX export back-end processes image links in Org files that do not +have descriptions, such as these links ‘[[file:img.jpg]]’ or +‘[[./img.jpg]]’, as direct image insertions in the final PDF output. In +the PDF, they are no longer links but actual images embedded on the +page. The LaTeX export back-end uses ‘\includegraphics’ macro to insert +the image. But for TikZ () +images, the back-end uses an ‘\input’ macro wrapped within a +‘tikzpicture’ environment. + + For specifying image ‘:width’, ‘:height’, and other ‘:options’, use +this syntax: + + #+ATTR_LATEX: :width 5cm :options angle=90 + [[./img/sed-hr4049.pdf]] + + For custom commands for captions, use the ‘:caption’ attribute. It +overrides the default ‘#+CAPTION’ value: + + #+ATTR_LATEX: :caption \bicaption{HeadingA}{HeadingB} + [[./img/sed-hr4049.pdf]] + + When captions follow the method as described in *note Captions::, the +LaTeX export back-end wraps the picture in a floating ‘figure’ +environment. To float an image without specifying a caption, set the +‘:float’ attribute to one of the following: + +‘t’ + For a standard ‘figure’ environment; used by default whenever an + image has a caption. + +‘multicolumn’ + To span the image across multiple columns of a page; the back-end + wraps the image in a ‘figure*’ environment. + +‘wrap’ + For text to flow around the image on the right; the figure occupies + the left half of the page. + +‘sideways’ + For a new page with the image sideways, rotated ninety degrees, in + a ‘sidewaysfigure’ environment; overrides ‘:placement’ setting. + +‘nil’ + To avoid a ‘:float’ even if using a caption. + + Use the ‘placement’ attribute to modify a floating environment’s +placement. + + #+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement {r}{0.4\textwidth} + [[./img/hst.png]] + + The LaTeX export back-end centers all images by default. Setting +‘:center’ to ‘nil’ disables centering. To disable centering globally, +set ‘org-latex-images-centered’ to ‘t’. + + Set the ‘:comment-include’ attribute to non-‘nil’ value for the LaTeX +export back-end to comment out the ‘\includegraphics’ macro. + + +File: org, Node: Plain lists in LaTeX export, Next: Source blocks in LaTeX export, Prev: Images in LaTeX export, Up: LaTeX Export + +12.10.7 Plain lists in LaTeX export +----------------------------------- + +The LaTeX export back-end accepts the ‘environment’ and ‘options’ +attributes for plain lists. Both attributes work together for +customizing lists, as shown in the examples: + + #+LATEX_HEADER: \usepackage[inline]{enumitem} + Some ways to say "Hello": + #+ATTR_LATEX: :environment itemize* + #+ATTR_LATEX: :options [label={}, itemjoin={,}, itemjoin*={, and}] + - Hola + - Bonjour + - Guten Tag. + + Since LaTeX supports only four levels of nesting for lists, use an +external package, such as ‘enumitem’ in LaTeX, for levels deeper than +four: + + #+LATEX_HEADER: \usepackage{enumitem} + #+LATEX_HEADER: \renewlist{itemize}{itemize}{9} + #+LATEX_HEADER: \setlist[itemize]{label=$\circ$} + - One + - Two + - Three + - Four + - Five + + +File: org, Node: Source blocks in LaTeX export, Next: Example blocks in LaTeX export, Prev: Plain lists in LaTeX export, Up: LaTeX Export + +12.10.8 Source blocks in LaTeX export +------------------------------------- + +The LaTeX export back-end can make source code blocks into floating +objects through the attributes ‘:float’ and ‘:options’. For ‘:float’: + +‘t’ + Makes a source block float; by default floats any source block with + a caption. + +‘multicolumn’ + Spans the source block across multiple columns of a page. + +‘nil’ + Avoids a ‘:float’ even if using a caption; useful for source code + blocks that may not fit on a page. + + #+ATTR_LATEX: :float nil + #+BEGIN_SRC emacs-lisp + Lisp code that may not fit in a single page. + #+END_SRC + + The LaTeX export back-end passes string values in ‘:options’ to LaTeX +packages for customization of that specific source block. In the +example below, the ‘:options’ are set for Minted. Minted is a source +code highlighting LaTeX package with many configurable options. + + #+ATTR_LATEX: :options commentstyle=\bfseries + #+BEGIN_SRC emacs-lisp + (defun Fib (n) + (if (< n 2) n (+ (Fib (- n 1)) (Fib (- n 2))))) + #+END_SRC + + To apply similar configuration options for all source blocks in a +file, use the ‘org-latex-listings-options’ and +‘org-latex-minted-options’ variables. + + +File: org, Node: Example blocks in LaTeX export, Next: Special blocks in LaTeX export, Prev: Source blocks in LaTeX export, Up: LaTeX Export + +12.10.9 Example blocks in LaTeX export +-------------------------------------- + +The LaTeX export back-end wraps the contents of example blocks in a +‘verbatim’ environment. To change this behavior to use another +environment globally, specify an appropriate export filter (see *note +Advanced Export Configuration::). To change this behavior to use +another environment for each block, use the ‘:environment’ parameter to +specify a custom environment. + + #+ATTR_LATEX: :environment myverbatim + #+BEGIN_EXAMPLE + This sentence is false. + #+END_EXAMPLE + + +File: org, Node: Special blocks in LaTeX export, Next: Horizontal rules in LaTeX export, Prev: Example blocks in LaTeX export, Up: LaTeX Export + +12.10.10 Special blocks in LaTeX export +--------------------------------------- + +For other special blocks in the Org file, the LaTeX export back-end +makes a special environment of the same name. The back-end also takes +‘:options’, if any, and appends as-is to that environment’s opening +string. For example: + + #+BEGIN_abstract + We demonstrate how to solve the Syracuse problem. + #+END_abstract + + #+ATTR_LATEX: :options [Proof of important theorem] + #+BEGIN_proof + ... + Therefore, any even number greater than 2 is the sum of two primes. + #+END_proof + +exports to + + \begin{abstract} + We demonstrate how to solve the Syracuse problem. + \end{abstract} + + \begin{proof}[Proof of important theorem] + ... + Therefore, any even number greater than 2 is the sum of two primes. + \end{proof} + + If you need to insert a specific caption command, use ‘:caption’ +attribute. It overrides standard ‘CAPTION’ value, if any. For example: + + #+ATTR_LATEX: :caption \MyCaption{HeadingA} + #+BEGIN_proof + ... + #+END_proof + + +File: org, Node: Horizontal rules in LaTeX export, Prev: Special blocks in LaTeX export, Up: LaTeX Export + +12.10.11 Horizontal rules in LaTeX export +----------------------------------------- + +The LaTeX export back-end converts horizontal rules by the specified +‘:width’ and ‘:thickness’ attributes. For example: + + #+ATTR_LATEX: :width .6\textwidth :thickness 0.8pt + ----- + + +File: org, Node: Markdown Export, Next: OpenDocument Text Export, Prev: LaTeX Export, Up: Exporting + +12.11 Markdown Export +===================== + +The Markdown export back-end, “md”, converts an Org file to Markdown +format, as defined at . + + Since it is built on top of the HTML back-end (see *note HTML +Export::), it converts every Org construct not defined in Markdown +syntax, such as tables, to HTML. + +Markdown export commands +------------------------ + +‘C-c C-e m m’ (‘org-md-export-to-markdown’) + Export to a text file with Markdown syntax. For ‘myfile.org’, Org + exports to ‘myfile.md’, overwritten without warning. + +‘C-c C-e m M’ (‘org-md-export-as-markdown’) + Export to a temporary buffer. Does not create a file. + +‘C-c C-e m o’ + Export as a text file with Markdown syntax, then open it. + +Header and sectioning structure +------------------------------- + +Based on ‘org-md-headline-style’, Markdown export can generate headlines +of both _atx_ and _setext_ types. _atx_ limits headline levels to two +whereas _setext_ limits headline levels to six. Beyond these limits, +the export back-end converts headlines to lists. To set a limit to a +level before the absolute limit (see *note Export Settings::). + + +File: org, Node: OpenDocument Text Export, Next: Org Export, Prev: Markdown Export, Up: Exporting + +12.12 OpenDocument Text Export +============================== + +The ODT export back-end handles creating of OpenDocument Text (ODT) +format. Documents created by this exporter use the ‘OpenDocument-v1.2 +specification’(1) and are compatible with LibreOffice 3.4. + +* Menu: + +* Pre-requisites for ODT export:: Required packages. +* ODT export commands:: Invoking export. +* ODT specific export settings:: Configuration options. +* Extending ODT export:: Producing DOC, PDF files. +* Applying custom styles:: Styling the output. +* Links in ODT export:: Handling and formatting links. +* Tables in ODT export:: Org tables conversions. +* Images in ODT export:: Inserting images. +* Math formatting in ODT export:: Formatting LaTeX fragments. +* Labels and captions in ODT export:: Rendering objects. +* Literal examples in ODT export:: For source code and example blocks. +* Advanced topics in ODT export:: For power users. + + ---------- Footnotes ---------- + + (1) See Open Document Format for Office Applications (OpenDocument) +Version 1.2 +(http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html). + + +File: org, Node: Pre-requisites for ODT export, Next: ODT export commands, Up: OpenDocument Text Export + +12.12.1 Pre-requisites for ODT export +------------------------------------- + +The ODT export back-end relies on the zip program to create the final +compressed ODT output. Check if ‘zip’ is locally available and +executable. Without it, export cannot finish. + + +File: org, Node: ODT export commands, Next: ODT specific export settings, Prev: Pre-requisites for ODT export, Up: OpenDocument Text Export + +12.12.2 ODT export commands +--------------------------- + +‘C-c C-e o o’ (‘org-export-to-odt’) + Export as OpenDocument Text file. + + If ‘org-odt-preferred-output-format’ is specified, the ODT export + back-end automatically converts the exported file to that format. + + For ‘myfile.org’, Org exports to ‘myfile.odt’, overwriting without + warning. The ODT export back-end exports a region only if a region + was active. + + If the selected region is a single tree, the ODT export back-end + makes the tree head the document title. Incidentally, ‘C-c @’ + selects the current sub-tree. If the tree head entry has, or + inherits, an ‘EXPORT_FILE_NAME’ property, the ODT export back-end + uses that for file name. + +‘C-c C-e o O’ + Export as an OpenDocument Text file and open the resulting file. + + If ‘org-export-odt-preferred-output-format’ is specified, open the + converted file instead. See *note Automatically exporting to other + formats::. + + +File: org, Node: ODT specific export settings, Next: Extending ODT export, Prev: ODT export commands, Up: OpenDocument Text Export + +12.12.3 ODT specific export settings +------------------------------------ + +The ODT export back-end has several additional keywords for customizing +ODT output. Setting these keywords works similar to the general options +(see *note Export Settings::). + +‘DESCRIPTION’ + This is the document’s description, which the ODT export back-end + inserts as document metadata. For long descriptions, use multiple + lines, prefixed with ‘DESCRIPTION’. + +‘KEYWORDS’ + The keywords for the document. The ODT export back-end inserts the + description along with author name, keywords, and related file + metadata as metadata in the output file. Use multiple ‘KEYWORDS’ + if necessary. + +‘ODT_STYLES_FILE’ + The ODT export back-end uses the ‘org-odt-styles-file’ by default. + See *note Applying custom styles:: for details. + +‘SUBTITLE’ + The document subtitle. + + +File: org, Node: Extending ODT export, Next: Applying custom styles, Prev: ODT specific export settings, Up: OpenDocument Text Export + +12.12.4 Extending ODT export +---------------------------- + +The ODT export back-end can produce documents in other formats besides +ODT using a specialized ODT converter process. Its common interface +works with popular converters to produce formats such as ‘doc’, or +convert a document from one format, say ‘csv’, to another format, say +‘xls’. + + Customize ‘org-odt-convert-process’ variable to point to ‘unoconv’, +which is the ODT’s preferred converter. Working installations of +LibreOffice would already have ‘unoconv’ installed. Alternatively, +other converters may be substituted here. See *note Configuring a +document converter::. + +Automatically exporting to other formats +........................................ + +If ODT format is just an intermediate step to get to other formats, such +as ‘doc’, ‘docx’, ‘rtf’, or ‘pdf’, etc., then extend the ODT export +back-end to directly produce that format. Specify the final format in +the ‘org-odt-preferred-output-format’ variable. This is one way to +extend (see *note ODT export commands::). + +Converting between document formats +................................... + +The Org export back-end is made to be inter-operable with a wide range +of text document format converters. Newer generation converters, such +as LibreOffice and Pandoc, can handle hundreds of formats at once. Org +provides a consistent interaction with whatever converter is installed. +Here are some generic commands: + +‘M-x org-odt-convert’ + Convert an existing document from one format to another. With a + prefix argument, opens the newly produced file. + + +File: org, Node: Applying custom styles, Next: Links in ODT export, Prev: Extending ODT export, Up: OpenDocument Text Export + +12.12.5 Applying custom styles +------------------------------ + +The ODT export back-end comes with many OpenDocument styles (see *note +Working with OpenDocument style files::). To expand or further +customize these built-in style sheets, either edit the style sheets +directly or generate them using an application such as LibreOffice. The +example here shows creating a style using LibreOffice. + +Applying custom styles: the easy way +.................................... + + 1. Create a sample ‘example.org’ file with settings as shown below, + and export it to ODT format. + + #+OPTIONS: H:10 num:t + + 2. Open the above ‘example.odt’ using LibreOffice. Use the _Stylist_ + to locate the target styles, which typically have the “Org” prefix. + Open one, modify, and save as either OpenDocument Text (ODT) or + OpenDocument Template (OTT) file. + + 3. Customize the variable ‘org-odt-styles-file’ and point it to the + newly created file. For additional configuration options, see + *note Overriding factory styles: x-overriding-factory-styles. + + To apply an ODT style to a particular file, use the + ‘ODT_STYLES_FILE’ keyword as shown in the example below: + + #+ODT_STYLES_FILE: "/path/to/example.ott" + + or + + #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")) + +Using third-party styles and templates +...................................... + +The ODT export back-end relies on many templates and style names. Using +third-party styles and templates can lead to mismatches. Templates +derived from built in ODT templates and styles seem to have fewer +problems. + + +File: org, Node: Links in ODT export, Next: Tables in ODT export, Prev: Applying custom styles, Up: OpenDocument Text Export + +12.12.6 Links in ODT export +--------------------------- + +ODT exporter creates native cross-references for internal links. It +creates Internet-style links for all other links. + + A link with no description and pointing to a regular, un-itemized, +outline heading is replaced with a cross-reference and section number of +the heading. + + A ‘\ref{label}’-style reference to an image, table etc., is replaced +with a cross-reference and sequence number of the labeled entity. See +*note Labels and captions in ODT export::. + + +File: org, Node: Tables in ODT export, Next: Images in ODT export, Prev: Links in ODT export, Up: OpenDocument Text Export + +12.12.7 Tables in ODT export +---------------------------- + +The ODT export back-end handles native Org mode tables (see *note +Tables::) and simple ‘table.el’ tables. Complex ‘table.el’ tables +having column or row spans are not supported. Such tables are stripped +from the exported document. + + By default, the ODT export back-end exports a table with top and +bottom frames and with ruled lines separating row and column groups (see +*note Column Groups::). All tables are typeset to occupy the same +width. The ODT export back-end honors any table alignments and relative +widths for columns (see *note Column Width and Alignment::). + + Note that the ODT export back-end interprets column widths as +weighted ratios, the default weight being 1. + + Specifying ‘:rel-width’ property on an ‘ATTR_ODT’ line controls the +width of the table. For example: + + #+ATTR_ODT: :rel-width 50 + | Area/Month | Jan | Feb | Mar | Sum | + |---------------+-------+-------+-------+-------| + | / | < | | | < | + | | | | | | + | North America | 1 | 21 | 926 | 948 | + | Middle East | 6 | 75 | 844 | 925 | + | Asia Pacific | 9 | 27 | 790 | 826 | + |---------------+-------+-------+-------+-------| + | Sum | 16 | 123 | 2560 | 2699 | + + On export, the above table takes 50% of text width area. The +exporter sizes the columns in the ratio: 13:5:5:5:6. The first column +is left-aligned and rest of the columns, right-aligned. Vertical rules +separate the header and the last column. Horizontal rules separate the +header and the last row. + + For even more customization, create custom table styles and associate +them with a table using the ‘ATTR_ODT’ keyword. See *note Customizing +tables in ODT export::. + + +File: org, Node: Images in ODT export, Next: Math formatting in ODT export, Prev: Tables in ODT export, Up: OpenDocument Text Export + +12.12.8 Images in ODT export +---------------------------- + +Embedding images +................ + +The ODT export back-end processes image links in Org files that do not +have descriptions, such as these links ‘[[file:img.jpg]]’ or +‘[[./img.jpg]]’, as direct image insertions in the final output. Either +of these examples works: + + [[file:img.png]] + + [[./img.png]] + +Embedding clickable images +.......................... + +For clickable images, provide a link whose description is another link +to an image file. For example, to embed an image ‘org-mode-unicorn.png’ +which when clicked jumps to website, do the +following + + [[https://orgmode.org][./org-mode-unicorn.png]] + +Sizing and scaling of embedded images +..................................... + +Control the size and scale of the embedded images with the ‘ATTR_ODT’ +attribute. + + The ODT export back-end starts with establishing the size of the +image in the final document. The dimensions of this size are measured +in centimeters. The back-end then queries the image file for its +dimensions measured in pixels. For this measurement, the back-end +relies on ImageMagick’s identify program or Emacs ‘create-image’ and +‘image-size’ API. ImageMagick is the preferred choice for large file +sizes or frequent batch operations. The back-end then converts the +pixel dimensions using ‘org-odt-pixels-per-inch’ into the familiar 72 +dpi or 96 dpi. The default value for this is in +‘display-pixels-per-inch’, which can be tweaked for better results based +on the capabilities of the output device. Here are some common image +scaling operations: + +Explicitly size the image + To embed ‘img.png’ as a 10 cm x 10 cm image, do the following: + + #+ATTR_ODT: :width 10 :height 10 + [[./img.png]] + +Scale the image + To embed ‘img.png’ at half its size, do the following: + + #+ATTR_ODT: :scale 0.5 + [[./img.png]] + +Scale the image to a specific width + To embed ‘img.png’ with a width of 10 cm while retaining the + original height:width ratio, do the following: + + #+ATTR_ODT: :width 10 + [[./img.png]] + +Scale the image to a specific height + To embed ‘img.png’ with a height of 10 cm while retaining the + original height:width ratio, do the following: + + #+ATTR_ODT: :height 10 + [[./img.png]] + +Anchoring of images +................... + +The ODT export back-end can anchor images to ‘as-char’, ‘paragraph’, or +‘page’. Set the preferred anchor using the ‘:anchor’ property of the +‘ATTR_ODT’ line. + + To create an image that is anchored to a page: + + #+ATTR_ODT: :anchor page + [[./img.png]] + + +File: org, Node: Math formatting in ODT export, Next: Labels and captions in ODT export, Prev: Images in ODT export, Up: OpenDocument Text Export + +12.12.9 Math formatting in ODT export +------------------------------------- + +The ODT exporter has special support for handling math. + +* Menu: + +* LaTeX math snippets:: Embedding in LaTeX format. +* MathML and OpenDocument formula files:: Embedding in native format. + + +File: org, Node: LaTeX math snippets, Next: MathML and OpenDocument formula files, Up: Math formatting in ODT export + +12.12.9.1 LaTeX math snippets +............................. + +LaTeX math snippets (see *note LaTeX fragments::) can be embedded in the +ODT document in one of the following ways: + +MathML + Add this line to the Org file. This option is activated on a + per-file basis. + + #+OPTIONS: tex:t + + With this option, LaTeX fragments are first converted into MathML + fragments using an external LaTeX-to-MathML converter program. The + resulting MathML fragments are then embedded as an OpenDocument + Formula in the exported document. + + You can specify the LaTeX-to-MathML converter by customizing the + variables ‘org-latex-to-mathml-convert-command’ and + ‘org-latex-to-mathml-jar-file’. + + If you prefer to use MathToWeb(1) as your converter, you can + configure the above variables as shown below. + + (setq org-latex-to-mathml-convert-command + "java -jar %j -unicode -force -df %o %I" + org-latex-to-mathml-jar-file + "/path/to/mathtoweb.jar") + + or, to use LaTeX​ML(2) instead, + + (setq org-latex-to-mathml-convert-command + "latexmlmath \"%i\" --presentationmathml=%o") + + To quickly verify the reliability of the LaTeX-to-MathML converter, + use the following commands: + + ‘M-x org-export-as-odf’ + Convert a LaTeX math snippet to an OpenDocument formula + (‘.odf’) file. + + ‘M-x org-export-as-odf-and-open’ + Convert a LaTeX math snippet to an OpenDocument formula + (‘.odf’) file and open the formula file with the + system-registered application. + +PNG images + Add this line to the Org file. This option is activated on a + per-file basis. + + #+OPTIONS: tex:dvipng + + #+OPTIONS: tex:dvisvgm + + or + + #+OPTIONS: tex:imagemagick + + Under this option, LaTeX fragments are processed into PNG or SVG + images and the resulting images are embedded in the exported + document. This method requires dvipng program, dvisvgm or + ImageMagick programs. + + ---------- Footnotes ---------- + + (1) See MathToWeb +(http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl). + + (2) See . + + +File: org, Node: MathML and OpenDocument formula files, Prev: LaTeX math snippets, Up: Math formatting in ODT export + +12.12.9.2 MathML and OpenDocument formula files +............................................... + +When embedding LaTeX math snippets in ODT documents is not reliable, +there is one more option to try. Embed an equation by linking to its +MathML (‘.mml’) source or its OpenDocument formula (‘.odf’) file as +shown below: + + [[./equation.mml]] + +or + + [[./equation.odf]] + + +File: org, Node: Labels and captions in ODT export, Next: Literal examples in ODT export, Prev: Math formatting in ODT export, Up: OpenDocument Text Export + +12.12.10 Labels and captions in ODT export +------------------------------------------ + +ODT format handles labeling and captioning of objects based on their +types. Inline images, tables, LaTeX fragments, and Math formulas are +numbered and captioned separately. Each object also gets a unique +sequence number based on its order of first appearance in the Org file. +Each category has its own sequence. A caption is just a label applied +to these objects. + + #+CAPTION: Bell curve + #+NAME: fig:SED-HR4049 + [[./img/a.png]] + + When rendered, it may show as follows in the exported document: + + Figure 2: Bell curve + + To modify the category component of the caption, customize the option +‘org-odt-category-map-alist’. For example, to tag embedded images with +the string “Illustration” instead of the default string “Figure”, use +the following setting: + + (setq org-odt-category-map-alist + '(("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p))) + + With the above modification, the previous example changes to: + + Illustration 2: Bell curve + + +File: org, Node: Literal examples in ODT export, Next: Advanced topics in ODT export, Prev: Labels and captions in ODT export, Up: OpenDocument Text Export + +12.12.11 Literal examples in ODT export +--------------------------------------- + +The ODT export back-end supports literal examples (see *note Literal +Examples::) with full fontification. Internally, the ODT export +back-end relies on ‘htmlfontify.el’ to generate the style definitions +needed for fancy listings. The auto-generated styles get ‘OrgSrc’ +prefix and inherit colors from the faces used by Emacs Font Lock library +for that source language. + + For custom fontification styles, customize the +‘org-odt-create-custom-styles-for-srcblocks’ option. + + To turn off fontification of literal examples, customize the +‘org-odt-fontify-srcblocks’ option. + + +File: org, Node: Advanced topics in ODT export, Prev: Literal examples in ODT export, Up: OpenDocument Text Export + +12.12.12 Advanced topics in ODT export +-------------------------------------- + +The ODT export back-end has extensive features useful for power users +and frequent uses of ODT formats. + +Configuring a document converter +................................ + +The ODT export back-end works with popular converters with little or no +extra configuration. See *note Extending ODT export::. The following +is for unsupported converters or tweaking existing defaults. + +Register the converter + Add the name of the converter to the ‘org-odt-convert-processes’ + variable. Note that it also requires how the converter is invoked + on the command line. See the variable’s docstring for details. + +Configure its capabilities + Specify which formats the converter can handle by customizing the + variable ‘org-odt-convert-capabilities’. Use the entry for the + default values in this variable for configuring the new converter. + Also see its docstring for details. + +Choose the converter + Select the newly added converter as the preferred one by + customizing the option ‘org-odt-convert-process’. + +Working with OpenDocument style files +..................................... + +This section explores the internals of the ODT exporter; the means by +which it produces styled documents; the use of automatic and custom +OpenDocument styles. + + The ODT exporter relies on two files for generating its output. +These files are bundled with the distribution under the directory +pointed to by the variable ‘org-odt-styles-dir’. The two files are: + +‘OrgOdtStyles.xml’ + This file contributes to the ‘styles.xml’ file of the final ODT + document. This file gets modified for the following purposes: + + 1. To control outline numbering based on user settings; + + 2. To add styles generated by ‘htmlfontify.el’ for fontification + of code blocks. + +‘OrgOdtContentTemplate.xml’ + This file contributes to the ‘content.xml’ file of the final ODT + document. The contents of the Org outline are inserted between the + ‘’ ... ‘’ elements of this file. + + Apart from serving as a template file for the final ‘content.xml’, + the file serves the following purposes: + + 1. It contains automatic styles for formatting of tables which + are referenced by the exporter; + + 2. It contains ‘’ ... ‘’ + elements that control numbering of tables, images, equations, + and similar entities. + + The following two variables control the location from where the ODT +exporter picks up the custom styles and content template files. +Customize these variables to override the factory styles used by the +exporter. + +‘org-odt-styles-file’ + The ODT export back-end uses the file pointed to by this variable, + such as ‘styles.xml’, for the final output. It can take one of the + following values: + + ‘FILE.xml’ + Use this file instead of the default ‘styles.xml’ + + ‘FILE.odt’ or ‘FILE.ott’ + Use the ‘styles.xml’ contained in the specified OpenDocument + Text or Template file + + ‘FILE.odt’ or ‘FILE.ott’ and a subset of included files + Use the ‘styles.xml’ contained in the specified OpenDocument + Text or Template file. Additionally extract the specified + member files and embed those within the final ODT document. + + Use this option if the ‘styles.xml’ file references additional + files like header and footer images. + + ‘nil’ + Use the default ‘styles.xml’. + +‘org-odt-content-template-file’ + Use this variable to specify the blank ‘content.xml’ used in the + final output. + +Creating one-off styles +....................... + +The ODT export back-end can read embedded raw OpenDocument XML from the +Org file. Such direct formatting is useful for one-off instances. + +Embedding ODT tags as part of regular text + Enclose OpenDocument syntax in ‘@@odt:...@@’ for inline markup. + For example, to highlight a region of text do the following: + + @@odt:This is highlighted + text@@. But this is regular text. + + *Hint:* To see the above example in action, edit the ‘styles.xml’ + (see *note Factory styles: x-orgodtstyles-xml.) and add a custom + _Highlight_ style as shown below: + + + + + +Embedding a one-line OpenDocument XML + The ODT export back-end can read one-liner options with ‘#+ODT:’ in + the Org file. For example, to force a page break: + + #+ODT: + + *Hint:* To see the above example in action, edit your ‘styles.xml’ + (see *note Factory styles: x-orgodtstyles-xml.) and add a custom + ‘PageBreak’ style as shown below. + + + + + +Embedding a block of OpenDocument XML + The ODT export back-end can also read ODT export blocks for + OpenDocument XML. Such blocks use the ‘#+BEGIN_EXPORT odt’ ... + ‘#+END_EXPORT’ constructs. + + For example, to create a one-off paragraph that uses bold text, do + the following: + + #+BEGIN_EXPORT odt + + This paragraph is specially formatted and uses bold text. + + #+END_EXPORT + +Customizing tables in ODT export +................................ + +Override the default table format by specifying a custom table style +with the ‘#+ATTR_ODT’ line. For a discussion on default formatting of +tables, see *note Tables in ODT export::. + + This feature closely mimics the way table templates are defined in +the OpenDocument-v1.2 specification(1). + + For quick preview of this feature, install the settings below and +export the table that follows: + + (setq org-export-odt-table-styles + (append org-export-odt-table-styles + '(("TableWithHeaderRowAndColumn" "Custom" + ((use-first-row-styles . t) + (use-first-column-styles . t))) + ("TableWithFirstRowandLastRow" "Custom" + ((use-first-row-styles . t) + (use-last-row-styles . t)))))) + + #+ATTR_ODT: :style TableWithHeaderRowAndColumn + | Name | Phone | Age | + | Peter | 1234 | 17 | + | Anna | 4321 | 25 | + + The example above used ‘Custom’ template and installed two table +styles ‘TableWithHeaderRowAndColumn’ and ‘TableWithFirstRowandLastRow’. +*Important:* The OpenDocument styles needed for producing the above +template were pre-defined. They are available in the section marked +‘Custom Table Template’ in ‘OrgOdtContentTemplate.xml’ (see *note +Factory styles: x-orgodtcontenttemplate-xml.). For adding new +templates, define new styles there. + + To use this feature proceed as follows: + + 1. Create a table template(2). + + A table template is set of ‘table-cell’ and ‘paragraph’ styles for + each of the following table cell categories: + + • Body + • First column + • Last column + • First row + • Last row + • Even row + • Odd row + • Even column + • Odd Column + + The names for the above styles must be chosen based on the name of + the table template using a well-defined convention. + + The naming convention is better illustrated with an example. For a + table template with the name ‘Custom’, the needed style names are + listed in the following table. + + Cell type Cell style Paragraph style + ---------------------------------------------------------------------------------- + Body ‘CustomTableCell’ ‘CustomTableParagraph’ + First column ‘CustomFirstColumnTableCell’ ‘CustomFirstColumnTableParagraph’ + Last column ‘CustomLastColumnTableCell’ ‘CustomLastColumnTableParagraph’ + First row ‘CustomFirstRowTableCell’ ‘CustomFirstRowTableParagraph’ + Last row ‘CustomLastRowTableCell’ ‘CustomLastRowTableParagraph’ + Even row ‘CustomEvenRowTableCell’ ‘CustomEvenRowTableParagraph’ + Odd row ‘CustomOddRowTableCell’ ‘CustomOddRowTableParagraph’ + Even column ‘CustomEvenColumnTableCell’ ‘CustomEvenColumnTableParagraph’ + Odd column ‘CustomOddColumnTableCell’ ‘CustomOddColumnTableParagraph’ + + To create a table template with the name ‘Custom’, define the above + styles in the ‘’ ... + ‘’ element of the content template file + (see *note Factory styles: x-orgodtcontenttemplate-xml.). + + 2. Define a table style(3). + + To define a table style, create an entry for the style in the + variable ‘org-odt-table-styles’ and specify the following: + + • the name of the table template created in step (1), + • the set of cell styles in that template that are to be + activated. + + For example, the entry below defines two different table styles + ‘TableWithHeaderRowAndColumn’ and ‘TableWithFirstRowandLastRow’ + based on the same template ‘Custom’. The styles achieve their + intended effect by selectively activating the individual cell + styles in that template. + + (setq org-export-odt-table-styles + (append org-export-odt-table-styles + '(("TableWithHeaderRowAndColumn" "Custom" + ((use-first-row-styles . t) + (use-first-column-styles . t))) + ("TableWithFirstRowandLastRow" "Custom" + ((use-first-row-styles . t) + (use-last-row-styles . t)))))) + + 3. Associate a table with the table style. + + To do this, specify the table style created in step (2) as part of + the ‘ATTR_ODT’ line as shown below. + + #+ATTR_ODT: :style TableWithHeaderRowAndColumn + | Name | Phone | Age | + | Peter | 1234 | 17 | + | Anna | 4321 | 25 | + +Validating OpenDocument XML +........................... + +Sometimes ODT format files may not open due to ‘.odt’ file corruption. +To verify if such a file is corrupt, validate it against the +OpenDocument Relax NG Compact (RNC) syntax schema. But first the ‘.odt’ +files have to be decompressed using ‘zip’. Note that ‘.odt’ files are +ZIP archives: *note (emacs)File Archives::. The contents of ODT files +are in XML. For general help with validation—and schema-sensitive +editing—of XML files: *note (nxml-mode)Introduction::. + + Customize ‘org-odt-schema-dir’ to point to a directory with +OpenDocument RNC files and the needed schema-locating rules. The ODT +export back-end takes care of updating the ‘rng-schema-locating-files’. + + ---------- Footnotes ---------- + + (1) OpenDocument-v1.2 Specification +(http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html) + + (2) See the ‘’ element of the OpenDocument-v1.2 +specification. + + (3) See the attributes ‘table:template-name’, +‘table:use-first-row-styles’, ‘table:use-last-row-styles’, +‘table:use-first-column-styles’, ‘table:use-last-column-styles’, +‘table:use-banding-rows-styles’, and ‘table:use-banding-column-styles’ +of the ‘’ element in the OpenDocument-v1.2 specification. + + +File: org, Node: Org Export, Next: Texinfo Export, Prev: OpenDocument Text Export, Up: Exporting + +12.13 Org Export +================ + +_org_ export back-end creates a normalized version of the Org document +in current buffer. The exporter evaluates Babel code (see *note +Evaluating Code Blocks::) and removes content specific to other +back-ends. + +Org export commands +------------------- + +‘C-c C-e O o’ (‘org-org-export-to-org’) + Export as an Org file with a ‘.org’ extension. For ‘myfile.org’, + Org exports to ‘myfile.org.org’, overwriting without warning. + +‘C-c C-e O v’ (~~) + Export to an Org file, then open it. + + +File: org, Node: Texinfo Export, Next: iCalendar Export, Prev: Org Export, Up: Exporting + +12.14 Texinfo Export +==================== + +* Menu: + +* Texinfo export commands:: Invoking commands. +* Texinfo specific export settings:: Setting the environment. +* Texinfo file header:: Generating the header. +* Texinfo title and copyright page:: Creating preamble pages. +* Info directory file:: Installing a manual in Info file hierarchy. +* Headings and sectioning structure:: Building document structure. +* Indices:: Creating indices. +* Quoting Texinfo code:: Incorporating literal Texinfo code. +* Plain lists in Texinfo export:: List attributes. +* Tables in Texinfo export:: Table attributes. +* Images in Texinfo export:: Image attributes. +* Quotations in Texinfo export:: Quote block attributes. +* Special blocks in Texinfo export:: Special block attributes. +* A Texinfo example:: Processing Org to Texinfo. + + +File: org, Node: Texinfo export commands, Next: Texinfo specific export settings, Up: Texinfo Export + +12.14.1 Texinfo export commands +------------------------------- + +‘C-c C-e i t’ (‘org-texinfo-export-to-texinfo’) + Export as a Texinfo file with ‘.texi’ extension. For ‘myfile.org’, + Org exports to ‘myfile.texi’, overwriting without warning. + +‘C-c C-e i i’ (‘org-texinfo-export-to-info’) + Export to Texinfo format first and then process it to make an Info + file. To generate other formats, such as DocBook, customize the + ‘org-texinfo-info-process’ variable. + + +File: org, Node: Texinfo specific export settings, Next: Texinfo file header, Prev: Texinfo export commands, Up: Texinfo Export + +12.14.2 Texinfo specific export settings +---------------------------------------- + +The Texinfo export back-end has several additional keywords for +customizing Texinfo output. Setting these keywords works similar to the +general options (see *note Export Settings::). + +‘SUBTITLE’ + The document subtitle. + +‘SUBAUTHOR’ + Additional authors for the document. + +‘TEXINFO_FILENAME’ + The Texinfo filename. + +‘TEXINFO_CLASS’ + The default document class (‘org-texinfo-default-class’), which + must be a member of ‘org-texinfo-classes’. + +‘TEXINFO_HEADER’ + Arbitrary lines inserted at the end of the header. + +‘TEXINFO_POST_HEADER’ + Arbitrary lines inserted after the end of the header. + +‘TEXINFO_DIR_CATEGORY’ + The directory category of the document. + +‘TEXINFO_DIR_TITLE’ + The directory title of the document. + +‘TEXINFO_DIR_DESC’ + The directory description of the document. + +‘TEXINFO_PRINTED_TITLE’ + The printed title of the document. + + +File: org, Node: Texinfo file header, Next: Texinfo title and copyright page, Prev: Texinfo specific export settings, Up: Texinfo Export + +12.14.3 Texinfo file header +--------------------------- + +After creating the header for a Texinfo file, the Texinfo back-end +automatically generates a name and destination path for the Info file. +To override this default with a more sensible path and name, specify the +‘TEXINFO_FILENAME’ keyword. + + Along with the output’s file name, the Texinfo header also contains +language details (see *note Export Settings::) and encoding system as +set in the ‘org-texinfo-coding-system’ variable. Insert +‘TEXINFO_HEADER’ keywords for each additional command in the header, for +example: + + #+TEXINFO_HEADER: @synindex + + Instead of repeatedly installing the same set of commands, define a +class in ‘org-texinfo-classes’ once, and then activate it in the +document by setting the ‘TEXINFO_CLASS’ keyword to that class. + + +File: org, Node: Texinfo title and copyright page, Next: Info directory file, Prev: Texinfo file header, Up: Texinfo Export + +12.14.4 Texinfo title and copyright page +---------------------------------------- + +The default template for hard copy output has a title page with ‘TITLE’ +and ‘AUTHOR’ keywords (see *note Export Settings::). To replace the +regular title with something different for the printed version, use the +‘TEXINFO_PRINTED_TITLE’ and ‘SUBTITLE’ keywords. Both expect raw +Texinfo code for setting their values. + + If one ‘AUTHOR’ line is not sufficient, add multiple ‘SUBAUTHOR’ +keywords. They have to be set in raw Texinfo code. + + #+AUTHOR: Jane Smith + #+SUBAUTHOR: John Doe + #+TEXINFO_PRINTED_TITLE: This Long Title@@inlinefmt{tex,@*} Is Broken in @TeX{} + + Copying material is defined in a dedicated headline with a non-‘nil’ +‘COPYING’ property. The back-end inserts the contents within a +‘@copying’ command at the beginning of the document. The heading itself +does not appear in the structure of the document. + + Copyright information is printed on the back of the title page. + + * Legalese + :PROPERTIES: + :COPYING: t + :END: + + This is a short example of a complete Texinfo file, version 1.0. + + Copyright \copy 2016 Free Software Foundation, Inc. + + +File: org, Node: Info directory file, Next: Headings and sectioning structure, Prev: Texinfo title and copyright page, Up: Texinfo Export + +12.14.5 Info directory file +--------------------------- + +The end result of the Texinfo export process is the creation of an Info +file. This Info file’s metadata has variables for category, title, and +description: ‘TEXINFO_DIR_CATEGORY’, ‘TEXINFO_DIR_TITLE’, and +‘TEXINFO_DIR_DESC’ keywords that establish where in the Info hierarchy +the file fits. + + Here is an example that writes to the Info directory file: + + #+TEXINFO_DIR_CATEGORY: Emacs + #+TEXINFO_DIR_TITLE: Org Mode: (org) + #+TEXINFO_DIR_DESC: Outline-based notes management and organizer + + +File: org, Node: Headings and sectioning structure, Next: Indices, Prev: Info directory file, Up: Texinfo Export + +12.14.6 Headings and sectioning structure +----------------------------------------- + +The Texinfo export back-end uses a pre-defined scheme to convert Org +headlines to equivalent Texinfo structuring commands. A scheme like +this maps top-level headlines to numbered chapters tagged as ‘@chapter’ +and lower-level headlines to unnumbered chapters tagged as +‘@unnumbered’. To override such mappings to introduce ‘@part’ or other +Texinfo structuring commands, define a new class in +‘org-texinfo-classes’. Activate the new class with the ‘TEXINFO_CLASS’ +keyword. When no new class is defined and activated, the Texinfo export +back-end defaults to the ‘org-texinfo-default-class’. + + If an Org headline’s level has no associated Texinfo structuring +command, or is below a certain threshold (see *note Export Settings::), +then the Texinfo export back-end makes it into a list item. + + The Texinfo export back-end makes any headline with a non-‘nil’ +‘APPENDIX’ property into an appendix. This happens independent of the +Org headline level or the ‘TEXINFO_CLASS’ keyword. + + The Texinfo export back-end creates a menu entry after the Org +headline for each regular sectioning structure. To override this with a +shorter menu entry, use the ‘ALT_TITLE’ property (see *note Table of +Contents::). Texinfo menu entries also have an option for a longer +‘DESCRIPTION’ property. Here’s an example that uses both to override +the default menu entry: + + * Controlling Screen Display + :PROPERTIES: + :ALT_TITLE: Display + :DESCRIPTION: Controlling Screen Display + :END: + + The text before the first headline belongs to the _Top_ node, i.e., +the node in which a reader enters an Info manual. As such, it is +expected not to appear in printed output generated from the ‘.texi’ +file. See *note (texinfo)The Top Node::, for more information. + + +File: org, Node: Indices, Next: Quoting Texinfo code, Prev: Headings and sectioning structure, Up: Texinfo Export + +12.14.7 Indices +--------------- + +The Texinfo export back-end recognizes these indexing keywords if used +in the Org file: ‘CINDEX’, ‘FINDEX’, ‘KINDEX’, ‘PINDEX’, ‘TINDEX’ and +‘VINDEX’. Write their value as verbatim Texinfo code; in particular, +‘{’, ‘}’ and ‘@’ characters need to be escaped with ‘@’ if they do not +belong to a Texinfo command. + + #+CINDEX: Defining indexing entries + + For the back-end to generate an index entry for a headline, set the +‘INDEX’ property to ‘cp’ or ‘vr’. These abbreviations come from Texinfo +that stand for concept index and variable index. The Texinfo manual has +abbreviations for all other kinds of indexes. The back-end exports the +headline as an unnumbered chapter or section command, and then inserts +the index after its contents. + + * Concept Index + :PROPERTIES: + :INDEX: cp + :END: + + +File: org, Node: Quoting Texinfo code, Next: Plain lists in Texinfo export, Prev: Indices, Up: Texinfo Export + +12.14.8 Quoting Texinfo code +---------------------------- + +Use any of the following three methods to insert or escape raw Texinfo +code: + + Richard @@texinfo:@sc{@@Stallman@@texinfo:}@@ commence' GNU. + + #+TEXINFO: @need800 + This paragraph is preceded by... + + #+BEGIN_EXPORT texinfo + @auindex Johnson, Mark + @auindex Lakoff, George + #+END_EXPORT + + +File: org, Node: Plain lists in Texinfo export, Next: Tables in Texinfo export, Prev: Quoting Texinfo code, Up: Texinfo Export + +12.14.9 Plain lists in Texinfo export +------------------------------------- + +The Texinfo export back-end by default converts description lists in the +Org file using the default command ‘@table’, which results in a table +with two columns. To change this behavior, specify ‘:table-type’ with +‘ftable’ or ‘vtable’ attributes. For more information, see *note +(texinfo)Two-column Tables::. + + The Texinfo export back-end by default also applies a text highlight +based on the defaults stored in ‘org-texinfo-table-default-markup’. To +override the default highlight command, specify another one with the +‘:indic’ attribute. + + Org syntax is limited to one entry per list item. Nevertheless, the +Texinfo export back-end can split that entry according to any text +provided through the ‘:sep’ attribute. Each part then becomes a new +entry in the first column of the table. + + The following example illustrates all the attributes above: + + #+ATTR_TEXINFO: :table-type vtable :sep , :indic asis + - foo, bar :: This is the common text for variables foo and bar. + +becomes + + @vtable @asis + @item foo + @itemx bar + This is the common text for variables foo and bar. + @end table + + +File: org, Node: Tables in Texinfo export, Next: Images in Texinfo export, Prev: Plain lists in Texinfo export, Up: Texinfo Export + +12.14.10 Tables in Texinfo export +--------------------------------- + +When exporting tables, the Texinfo export back-end uses the widest cell +width in each column. To override this and instead specify as fractions +of line length, use the ‘:columns’ attribute. See example below. + + #+ATTR_TEXINFO: :columns .5 .5 + | a cell | another cell | + + +File: org, Node: Images in Texinfo export, Next: Quotations in Texinfo export, Prev: Tables in Texinfo export, Up: Texinfo Export + +12.14.11 Images in Texinfo export +--------------------------------- + +Insert a file link to the image in the Org file, and the Texinfo export +back-end inserts the image. These links must have the usual supported +image extensions and no descriptions. To scale the image, use ‘:width’ +and ‘:height’ attributes. For alternate text, use ‘:alt’ and specify +the text using Texinfo code, as shown in the example: + + #+ATTR_TEXINFO: :width 1in :alt Alternate @i{text} + [[ridt.pdf]] + + +File: org, Node: Quotations in Texinfo export, Next: Special blocks in Texinfo export, Prev: Images in Texinfo export, Up: Texinfo Export + +12.14.12 Quotations in Texinfo export +------------------------------------- + +You can write the text of a quotation within a quote block (see *note +Paragraphs::). You may also emphasize some text at the beginning of the +quotation with the ‘:tag’ attribute. + + #+ATTR_TEXINFO: :tag Warning + #+BEGIN_QUOTE + Striking your thumb with a hammer may cause severe pain and discomfort. + #+END_QUOTE + + To specify the author of the quotation, use the ‘:author’ attribute. + + #+ATTR_TEXINFO: :author King Arthur + #+BEGIN_QUOTE + The Lady of the Lake, her arm clad in the purest shimmering samite, + held aloft Excalibur from the bosom of the water, signifying by divine + providence that I, Arthur, was to carry Excalibur. That is why I am + your king. + #+END_QUOTE + + +File: org, Node: Special blocks in Texinfo export, Next: A Texinfo example, Prev: Quotations in Texinfo export, Up: Texinfo Export + +12.14.13 Special blocks in Texinfo export +----------------------------------------- + +The Texinfo export back-end converts special blocks to commands with the +same name. It also adds any ‘:options’ attributes to the end of the +command, as shown in this example: + + #+ATTR_TEXINFO: :options org-org-export-to-org ... + #+BEGIN_defun + A somewhat obsessive function name. + #+END_defun + +becomes + + @defun org-org-export-to-org ... + A somewhat obsessive function name. + @end defun + + +File: org, Node: A Texinfo example, Prev: Special blocks in Texinfo export, Up: Texinfo Export + +12.14.14 A Texinfo example +-------------------------- + +Here is a more detailed example Org file. See *note (texinfo)GNU Sample +Texts:: for an equivalent example using Texinfo code. + + #+TITLE: GNU Sample {{{version}}} + #+SUBTITLE: for version {{{version}}}, {{{updated}}} + #+AUTHOR: A.U. Thor + #+EMAIL: bug-sample@gnu.org + + #+OPTIONS: ':t toc:t author:t email:t + #+LANGUAGE: en + + #+MACRO: version 2.0 + #+MACRO: updated last updated 4 March 2014 + + #+TEXINFO_FILENAME: sample.info + #+TEXINFO_HEADER: @syncodeindex pg cp + + #+TEXINFO_DIR_CATEGORY: Texinfo documentation system + #+TEXINFO_DIR_TITLE: sample: (sample) + #+TEXINFO_DIR_DESC: Invoking sample + + #+TEXINFO_PRINTED_TITLE: GNU Sample + + This manual is for GNU Sample (version {{{version}}}, + {{{updated}}}). + + * Copying + :PROPERTIES: + :COPYING: t + :END: + + This manual is for GNU Sample (version {{{version}}}, + {{{updated}}}), which is an example in the Texinfo documentation. + + Copyright \copy 2016 Free Software Foundation, Inc. + + #+BEGIN_QUOTE + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, with no Front-Cover Texts, + and with no Back-Cover Texts. A copy of the license is included in + the section entitled "GNU Free Documentation License". + #+END_QUOTE + + * Invoking sample + + #+PINDEX: sample + #+CINDEX: invoking @command{sample} + + This is a sample manual. There is no sample program to invoke, but + if there were, you could see its basic usage and command line + options here. + + * GNU Free Documentation License + :PROPERTIES: + :APPENDIX: t + :END: + + #+TEXINFO: @include fdl.texi + + * Index + :PROPERTIES: + :INDEX: cp + :END: + + +File: org, Node: iCalendar Export, Next: Other Built-in Back-ends, Prev: Texinfo Export, Up: Exporting + +12.15 iCalendar Export +====================== + +A large part of Org mode’s interoperability success is its ability to +easily export to or import from external applications. The iCalendar +export back-end takes calendar data from Org files and exports to the +standard iCalendar format. + + The iCalendar export back-end can also incorporate TODO entries based +on the configuration of the ‘org-icalendar-include-todo’ variable. The +back-end exports plain timestamps as ‘VEVENT’, TODO items as ‘VTODO’, +and also create events from deadlines that are in non-TODO items. The +back-end uses the deadlines and scheduling dates in Org TODO items for +setting the start and due dates for the iCalendar TODO entry. Consult +the ‘org-icalendar-use-deadline’ and ‘org-icalendar-use-scheduled’ +variables for more details. + + For tags on the headline, the iCalendar export back-end makes them +into iCalendar categories. To tweak the inheritance of tags and TODO +states, configure the variable ‘org-icalendar-categories’. To assign +clock alarms based on time, configure the ‘org-icalendar-alarm-time’ +variable. + + The iCalendar format standard requires globally unique identifier—or +UID—for each entry. The iCalendar export back-end creates UIDs during +export. To save a copy of the UID in the Org file set the variable +‘org-icalendar-store-UID’. The back-end looks for the ‘ID’ property of +the entry for re-using the same UID for subsequent exports. + + Since a single Org entry can result in multiple iCalendar +entries—timestamp, deadline, scheduled item, or TODO item—Org adds +prefixes to the UID, depending on which part of the Org entry triggered +the creation of the iCalendar entry. Prefixing ensures UIDs remains +unique, yet enable synchronization programs trace the connections. + +‘C-c C-e c f’ (‘org-icalendar-export-to-ics’) + Create iCalendar entries from the current Org buffer and store them + in the same directory, using a file extension ‘.ics’. + +‘C-c C-e c a’ (‘org-icalendar-export-agenda-files’) + Create iCalendar entries from Org files in ‘org-agenda-files’ and + store in a separate iCalendar file for each Org file. + +‘C-c C-e c c’ (‘org-icalendar-combine-agenda-files’) + Create a combined iCalendar file from Org files in + ‘org-agenda-files’ and write it to + ‘org-icalendar-combined-agenda-file’ file name. + + The iCalendar export back-end includes ‘SUMMARY’, ‘DESCRIPTION’, +‘LOCATION’ and ‘TIMEZONE’ properties from the Org entries when +exporting. To force the back-end to inherit the ‘LOCATION’ and +‘TIMEZONE’ properties, configure the ‘org-use-property-inheritance’ +variable. + + When Org entries do not have ‘SUMMARY’, ‘DESCRIPTION’ and ‘LOCATION’ +properties, the iCalendar export back-end derives the summary from the +headline, and derives the description from the body of the Org item. +The ‘org-icalendar-include-body’ variable limits the maximum number of +characters of the content are turned into its description. + + The ‘TIMEZONE’ property can be used to specify a per-entry time zone, +and is applied to any entry with timestamp information. Time zones +should be specified as per the IANA time zone database format, e.g., +‘Asia/Almaty’. Alternately, the property value can be ‘UTC’, to force +UTC time for this entry only. + + Exporting to iCalendar format depends in large part on the +capabilities of the destination application. Some are more lenient than +others. Consult the Org mode FAQ for advice on specific applications. + + +File: org, Node: Other Built-in Back-ends, Next: Advanced Export Configuration, Prev: iCalendar Export, Up: Exporting + +12.16 Other Built-in Back-ends +============================== + +Other export back-ends included with Org are: + + • ‘ox-man.el’: Export to a man page. + + To activate such back-ends, either customize ‘org-export-backends’ or +load directly with ‘(require 'ox-man)’. On successful load, the +back-end adds new keys in the export dispatcher (see *note The Export +Dispatcher::). + + Follow the comment section of such files, for example, ‘ox-man.el’, +for usage and configuration details. + + +File: org, Node: Advanced Export Configuration, Next: Export in Foreign Buffers, Prev: Other Built-in Back-ends, Up: Exporting + +12.17 Advanced Export Configuration +=================================== + +Hooks +----- + +The export process executes two hooks before the actual exporting +begins. The first hook, ‘org-export-before-processing-hook’, runs +before any expansions of macros, Babel code, and include keywords in the +buffer. The second hook, ‘org-export-before-parsing-hook’, runs before +the buffer is parsed. + + Functions added to these hooks are called with a single argument: the +export back-end actually used, as a symbol. You may use them for heavy +duty structural modifications of the document. For example, you can +remove every headline in the buffer during export like this: + + (defun my-headline-removal (backend) + "Remove all headlines in the current buffer. + BACKEND is the export back-end being used, as a symbol." + (org-map-entries + (lambda () (delete-region (point) (line-beginning-position 2))))) + + (add-hook 'org-export-before-parsing-hook 'my-headline-removal) + +Filters +------- + +Filters are lists of functions to be applied to certain parts for a +given back-end. The output from the first function in the filter is +passed on to the next function in the filter. The final output is the +output from the final function in the filter. + + The Org export process has many filter sets applicable to different +types of objects, plain text, parse trees, export options, and final +output formats. The filters are named after the element type or object +type: ‘org-export-filter-TYPE-functions’, where TYPE is the type +targeted by the filter. Valid types are: + +body bold babel-call +center-block clock code +diary-sexp drawer dynamic-block +entity example-block export-block +export-snippet final-output fixed-width +footnote-definition footnote-reference headline +horizontal-rule inline-babel-call inline-src-block +inlinetask italic item +keyword latex-environment latex-fragment +line-break link node-property +options paragraph parse-tree +plain-list plain-text planning +property-drawer quote-block radio-target +section special-block src-block +statistics-cookie strike-through subscript +superscript table table-cell +table-row target timestamp +underline verbatim verse-block + + Here is an example filter that replaces non-breaking spaces ‘ ’ in +the Org buffer with ‘~’ for the LaTeX back-end. + + (defun my-latex-filter-nobreaks (text backend info) + "Ensure \" \" are properly handled in LaTeX export." + (when (org-export-derived-backend-p backend 'latex) + (replace-regexp-in-string " " "~" text))) + + (add-to-list 'org-export-filter-plain-text-functions + 'my-latex-filter-nobreaks) + + A filter requires three arguments: the code to be transformed, the +name of the back-end, and some optional information about the export +process. The third argument can be safely ignored. Note the use of +‘org-export-derived-backend-p’ predicate that tests for _latex_ back-end +or any other back-end, such as _beamer_, derived from _latex_. + +Defining filters for individual files +------------------------------------- + +The Org export can filter not just for back-ends, but also for specific +files through the ‘BIND’ keyword. Here is an example with two filters; +one removes brackets from time stamps, and the other removes +strike-through text. The filter functions are defined in a code block +in the same Org file, which is a handy location for debugging. + + #+BIND: org-export-filter-timestamp-functions (tmp-f-timestamp) + #+BIND: org-export-filter-strike-through-functions (tmp-f-strike-through) + #+BEGIN_SRC emacs-lisp :exports results :results none + (defun tmp-f-timestamp (s backend info) + (replace-regexp-in-string "&[lg]t;\\|[][]" "" s)) + (defun tmp-f-strike-through (s backend info) "") + #+END_SRC + +Extending an existing back-end +------------------------------ + +Some parts of the conversion process can be extended for certain +elements so as to introduce a new or revised translation. That is how +the HTML export back-end was extended to handle Markdown format. The +extensions work seamlessly so any aspect of filtering not done by the +extended back-end is handled by the original back-end. Of all the +export customization in Org, extending is very powerful as it operates +at the parser level. + + For this example, make the _ascii_ back-end display the language used +in a source code block. Also make it display only when some attribute +is non-‘nil’, like the following: + + #+ATTR_ASCII: :language t + + Then extend ASCII back-end with a custom “my-ascii” back-end. + + (defun my-ascii-src-block (src-block contents info) + "Transcode a SRC-BLOCK element from Org to ASCII. + CONTENTS is nil. INFO is a plist used as a communication + channel." + (if (not (org-export-read-attribute :attr_ascii src-block :language)) + (org-export-with-backend 'ascii src-block contents info) + (concat + (format ",--[ %s ]--\n%s`----" + (org-element-property :language src-block) + (replace-regexp-in-string + "^" "| " + (org-element-normalize-string + (org-export-format-code-default src-block info))))))) + + (org-export-define-derived-backend 'my-ascii 'ascii + :translate-alist '((src-block . my-ascii-src-block))) + + The ‘my-ascii-src-block’ function looks at the attribute above the +current element. If not true, hands over to _ascii_ back-end. If true, +which it is in this example, it creates a box around the code and leaves +room for the inserting a string for language. The last form creates the +new back-end that springs to action only when translating ‘src-block’ +type elements. + + To use the newly defined back-end, evaluate the following from an Org +buffer: + + (org-export-to-buffer 'my-ascii "*Org MY-ASCII Export*") + + Further steps to consider would be an interactive function, +self-installing an item in the export dispatcher menu, and other +user-friendly improvements. + + +File: org, Node: Export in Foreign Buffers, Prev: Advanced Export Configuration, Up: Exporting + +12.18 Export in Foreign Buffers +=============================== + +The export back-ends in Org often include commands to convert selected +regions. A convenient feature of this in-place conversion is that the +exported output replaces the original source. Here are such functions: + +‘org-ascii-convert-region-to-ascii’ + Convert the selected region into ASCII. + +‘org-ascii-convert-region-to-utf8’ + Convert the selected region into UTF-8. + +‘org-html-convert-region-to-html’ + Convert the selected region into HTML. + +‘org-latex-convert-region-to-latex’ + Convert the selected region into LaTeX. + +‘org-texinfo-convert-region-to-texinfo’ + Convert the selected region into Texinfo. + +‘org-md-convert-region-to-md’ + Convert the selected region into Markdown. + + In-place conversions are particularly handy for quick conversion of +tables and lists in foreign buffers. For example, in an HTML buffer, +write a list in Org syntax, select it, and convert it to HTML with ‘M-x +org-html-convert-region-to-html’. + + +File: org, Node: Publishing, Next: Working with Source Code, Prev: Exporting, Up: Top + +13 Publishing +************* + +Org includes a publishing management system that allows you to configure +automatic HTML conversion of _projects_ composed of interlinked Org +files. You can also configure Org to automatically upload your exported +HTML pages and related attachments, such as images and source code +files, to a web server. + + You can also use Org to convert files into PDF, or even combine HTML +and PDF conversion so that files are available in both formats on the +server. + + Publishing has been contributed to Org by David O’Toole. + +* Menu: + +* Configuration:: Defining projects. +* Uploading Files:: How to get files up on the server. +* Sample Configuration:: Example projects. +* Triggering Publication:: Publication commands. + + +File: org, Node: Configuration, Next: Uploading Files, Up: Publishing + +13.1 Configuration +================== + +Publishing needs significant configuration to specify files, destination +and many other properties of a project. + +* Menu: + +* Project alist:: The central configuration variable. +* Sources and destinations:: From here to there. +* Selecting files:: What files are part of the project? +* Publishing action:: Setting the function doing the publishing. +* Publishing options:: Tweaking HTML/LaTeX export. +* Publishing links:: Which links keep working after publishing? +* Site map:: Generating a list of all pages. +* Generating an index:: An index that reaches across pages. + + +File: org, Node: Project alist, Next: Sources and destinations, Up: Configuration + +13.1.1 The variable ‘org-publish-project-alist’ +----------------------------------------------- + +Publishing is configured almost entirely through setting the value of +one variable, called ‘org-publish-project-alist’. Each element of the +list configures one project, and may be in one of the two following +forms: + + ("project-name" :property value :property value ...) + +i.e., a well-formed property list with alternating keys and values, or: + + ("project-name" :components ("project-name" "project-name" ...)) + + In both cases, projects are configured by specifying property values. +A project defines the set of files that are to be published, as well as +the publishing configuration to use when publishing those files. When a +project takes the second form listed above, the individual members of +the ‘:components’ property are taken to be sub-projects, which group +together files requiring different publishing options. When you publish +such a “meta-project”, all the components are also published, in the +sequence given. + + +File: org, Node: Sources and destinations, Next: Selecting files, Prev: Project alist, Up: Configuration + +13.1.2 Sources and destinations for files +----------------------------------------- + +Most properties are optional, but some should always be set. In +particular, Org needs to know where to look for source files, and where +to put published files. + +‘:base-directory’ + Directory containing publishing source files. + +‘:publishing-directory’ + Directory where output files are published. You can directly + publish to a webserver using a file name syntax appropriate for the + Emacs tramp package. Or you can publish to a local directory and + use external tools to upload your website (see *note Uploading + Files::). + +‘:preparation-function’ + Function or list of functions to be called before starting the + publishing process, for example, to run ‘make’ for updating files + to be published. Each preparation function is called with a single + argument, the project property list. + +‘:completion-function’ + Function or list of functions called after finishing the publishing + process, for example, to change permissions of the resulting files. + Each completion function is called with a single argument, the + project property list. + + +File: org, Node: Selecting files, Next: Publishing action, Prev: Sources and destinations, Up: Configuration + +13.1.3 Selecting files +---------------------- + +By default, all files with extension ‘.org’ in the base directory are +considered part of the project. This can be modified by setting the +following properties + +‘:base-extension’ + Extension—without the dot—of source files. This actually is a + regular expression. Set this to the symbol ‘any’ if you want to + get all files in ‘:base-directory’, even without extension. + +‘:exclude’ + Regular expression to match file names that should not be + published, even though they have been selected on the basis of + their extension. + +‘:include’ + List of files to be included regardless of ‘:base-extension’ and + ‘:exclude’. + +‘:recursive’ + Non-‘nil’ means, check base-directory recursively for files to + publish. + + +File: org, Node: Publishing action, Next: Publishing options, Prev: Selecting files, Up: Configuration + +13.1.4 Publishing action +------------------------ + +Publishing means that a file is copied to the destination directory and +possibly transformed in the process. The default transformation is to +export Org files as HTML files, and this is done by the function +‘org-publish-org-to-html’ which calls the HTML exporter (see *note HTML +Export::). But you can also publish your content as PDF files using +‘org-publish-org-to-pdf’, or as ASCII, Texinfo, etc., using the +corresponding functions. + + If you want to publish the Org file as an ‘.org’ file but with +_archived_, _commented_, and _tag-excluded_ trees removed, use +‘org-publish-org-to-org’. This produces ‘file.org’ and put it in the +publishing directory. If you want a htmlized version of this file, set +the parameter ‘:htmlized-source’ to ‘t’. It produces ‘file.org.html’ in +the publishing directory(1). + + Other files like images only need to be copied to the publishing +destination; for this you can use ‘org-publish-attachment’. For non-Org +files, you always need to specify the publishing function: + +‘:publishing-function’ + Function executing the publication of a file. This may also be a + list of functions, which are all called in turn. + +‘:htmlized-source’ + Non-‘nil’ means, publish htmlized source. + + The function must accept three arguments: a property list containing +at least a ‘:publishing-directory’ property, the name of the file to be +published, and the path to the publishing directory of the output file. +It should take the specified file, make the necessary transformation, if +any, and place the result into the destination folder. + + ---------- Footnotes ---------- + + (1) If the publishing directory is the same as the source directory, +‘file.org’ is exported as ‘file.org.org’, so you probably do not want to +do this. + + +File: org, Node: Publishing options, Next: Publishing links, Prev: Publishing action, Up: Configuration + +13.1.5 Options for the exporters +-------------------------------- + +The property list can be used to set many export options for the HTML +and LaTeX exporters. In most cases, these properties correspond to user +variables in Org. The table below lists these properties along with the +variable they belong to. See the documentation string for the +respective variable for details. + + When a property is given a value in ‘org-publish-project-alist’, its +setting overrides the value of the corresponding user variable, if any, +during publishing. Options set within a file (see *note Export +Settings::), however, override everything. + +Generic properties +.................. + +‘:archived-trees’ ‘org-export-with-archived-trees’ +‘:exclude-tags’ ‘org-export-exclude-tags’ +‘:headline-levels’ ‘org-export-headline-levels’ +‘:language’ ‘org-export-default-language’ +‘:preserve-breaks’ ‘org-export-preserve-breaks’ +‘:section-numbers’ ‘org-export-with-section-numbers’ +‘:select-tags’ ‘org-export-select-tags’ +‘:with-author’ ‘org-export-with-author’ +‘:with-broken-links’ ‘org-export-with-broken-links’ +‘:with-clocks’ ‘org-export-with-clocks’ +‘:with-creator’ ‘org-export-with-creator’ +‘:with-date’ ‘org-export-with-date’ +‘:with-drawers’ ‘org-export-with-drawers’ +‘:with-email’ ‘org-export-with-email’ +‘:with-emphasize’ ‘org-export-with-emphasize’ +‘:with-fixed-width’ ‘org-export-with-fixed-width’ +‘:with-footnotes’ ‘org-export-with-footnotes’ +‘:with-latex’ ‘org-export-with-latex’ +‘:with-planning’ ‘org-export-with-planning’ +‘:with-priority’ ‘org-export-with-priority’ +‘:with-properties’ ‘org-export-with-properties’ +‘:with-special-strings’ ‘org-export-with-special-strings’ +‘:with-sub-superscript’ ‘org-export-with-sub-superscripts’ +‘:with-tables’ ‘org-export-with-tables’ +‘:with-tags’ ‘org-export-with-tags’ +‘:with-tasks’ ‘org-export-with-tasks’ +‘:with-timestamps’ ‘org-export-with-timestamps’ +‘:with-title’ ‘org-export-with-title’ +‘:with-toc’ ‘org-export-with-toc’ +‘:with-todo-keywords’ ‘org-export-with-todo-keywords’ + +ASCII specific properties +......................... + +‘:ascii-bullets’ ‘org-ascii-bullets’ +‘:ascii-caption-above’ ‘org-ascii-caption-above’ +‘:ascii-charset’ ‘org-ascii-charset’ +‘:ascii-global-margin’ ‘org-ascii-global-margin’ +‘:ascii-format-drawer-function’ ‘org-ascii-format-drawer-function’ +‘:ascii-format-inlinetask-function’ ‘org-ascii-format-inlinetask-function’ +‘:ascii-headline-spacing’ ‘org-ascii-headline-spacing’ +‘:ascii-indented-line-width’ ‘org-ascii-indented-line-width’ +‘:ascii-inlinetask-width’ ‘org-ascii-inlinetask-width’ +‘:ascii-inner-margin’ ‘org-ascii-inner-margin’ +‘:ascii-links-to-notes’ ‘org-ascii-links-to-notes’ +‘:ascii-list-margin’ ‘org-ascii-list-margin’ +‘:ascii-paragraph-spacing’ ‘org-ascii-paragraph-spacing’ +‘:ascii-quote-margin’ ‘org-ascii-quote-margin’ +‘:ascii-table-keep-all-vertical-lines’ ‘org-ascii-table-keep-all-vertical-lines’ +‘:ascii-table-use-ascii-art’ ‘org-ascii-table-use-ascii-art’ +‘:ascii-table-widen-columns’ ‘org-ascii-table-widen-columns’ +‘:ascii-text-width’ ‘org-ascii-text-width’ +‘:ascii-underline’ ‘org-ascii-underline’ +‘:ascii-verbatim-format’ ‘org-ascii-verbatim-format’ + +Beamer specific properties +.......................... + +‘:beamer-theme’ ‘org-beamer-theme’ +‘:beamer-column-view-format’ ‘org-beamer-column-view-format’ +‘:beamer-environments-extra’ ‘org-beamer-environments-extra’ +‘:beamer-frame-default-options’ ‘org-beamer-frame-default-options’ +‘:beamer-outline-frame-options’ ‘org-beamer-outline-frame-options’ +‘:beamer-outline-frame-title’ ‘org-beamer-outline-frame-title’ +‘:beamer-subtitle-format’ ‘org-beamer-subtitle-format’ + +HTML specific properties +........................ + +‘:html-allow-name-attribute-in-anchors’ ‘org-html-allow-name-attribute-in-anchors’ +‘:html-checkbox-type’ ‘org-html-checkbox-type’ +‘:html-container’ ‘org-html-container-element’ +‘:html-divs’ ‘org-html-divs’ +‘:html-doctype’ ‘org-html-doctype’ +‘:html-extension’ ‘org-html-extension’ +‘:html-footnote-format’ ‘org-html-footnote-format’ +‘:html-footnote-separator’ ‘org-html-footnote-separator’ +‘:html-footnotes-section’ ‘org-html-footnotes-section’ +‘:html-format-drawer-function’ ‘org-html-format-drawer-function’ +‘:html-format-headline-function’ ‘org-html-format-headline-function’ +‘:html-format-inlinetask-function’ ‘org-html-format-inlinetask-function’ +‘:html-head-extra’ ‘org-html-head-extra’ +‘:html-head-include-default-style’ ‘org-html-head-include-default-style’ +‘:html-head-include-scripts’ ‘org-html-head-include-scripts’ +‘:html-head’ ‘org-html-head’ +‘:html-home/up-format’ ‘org-html-home/up-format’ +‘:html-html5-fancy’ ‘org-html-html5-fancy’ +‘:html-indent’ ‘org-html-indent’ +‘:html-infojs-options’ ‘org-html-infojs-options’ +‘:html-infojs-template’ ‘org-html-infojs-template’ +‘:html-inline-image-rules’ ‘org-html-inline-image-rules’ +‘:html-inline-images’ ‘org-html-inline-images’ +‘:html-link-home’ ‘org-html-link-home’ +‘:html-link-org-files-as-html’ ‘org-html-link-org-files-as-html’ +‘:html-link-up’ ‘org-html-link-up’ +‘:html-link-use-abs-url’ ‘org-html-link-use-abs-url’ +‘:html-mathjax-options’ ‘org-html-mathjax-options’ +‘:html-mathjax-template’ ‘org-html-mathjax-template’ +‘:html-metadata-timestamp-format’ ‘org-html-metadata-timestamp-format’ +‘:html-postamble-format’ ‘org-html-postamble-format’ +‘:html-postamble’ ‘org-html-postamble’ +‘:html-preamble-format’ ‘org-html-preamble-format’ +‘:html-preamble’ ‘org-html-preamble’ +‘:html-table-align-individual-field’ ‘de{org-html-table-align-individual-fields’ +‘:html-table-attributes’ ‘org-html-table-default-attributes’ +‘:html-table-caption-above’ ‘org-html-table-caption-above’ +‘:html-table-data-tags’ ‘org-html-table-data-tags’ +‘:html-table-header-tags’ ‘org-html-table-header-tags’ +‘:html-table-row-tags’ ‘org-html-table-row-tags’ +‘:html-table-use-header-tags-for-first-column’ ‘org-html-table-use-header-tags-for-first-column’ +‘:html-tag-class-prefix’ ‘org-html-tag-class-prefix’ +‘:html-text-markup-alist’ ‘org-html-text-markup-alist’ +‘:html-todo-kwd-class-prefix’ ‘org-html-todo-kwd-class-prefix’ +‘:html-toplevel-hlevel’ ‘org-html-toplevel-hlevel’ +‘:html-use-infojs’ ‘org-html-use-infojs’ +‘:html-validation-link’ ‘org-html-validation-link’ +‘:html-viewport’ ‘org-html-viewport’ +‘:html-xml-declaration’ ‘org-html-xml-declaration’ + +LaTeX specific properties +......................... + +‘:latex-active-timestamp-format’ ‘org-latex-active-timestamp-format’ +‘:latex-caption-above’ ‘org-latex-caption-above’ +‘:latex-classes’ ‘org-latex-classes’ +‘:latex-class’ ‘org-latex-default-class’ +‘:latex-compiler’ ‘org-latex-compiler’ +‘:latex-default-figure-position’ ‘org-latex-default-figure-position’ +‘:latex-default-table-environment’ ‘org-latex-default-table-environment’ +‘:latex-default-table-mode’ ‘org-latex-default-table-mode’ +‘:latex-diary-timestamp-format’ ‘org-latex-diary-timestamp-format’ +‘:latex-footnote-defined-format’ ‘org-latex-footnote-defined-format’ +‘:latex-footnote-separator’ ‘org-latex-footnote-separator’ +‘:latex-format-drawer-function’ ‘org-latex-format-drawer-function’ +‘:latex-format-headline-function’ ‘org-latex-format-headline-function’ +‘:latex-format-inlinetask-function’ ‘org-latex-format-inlinetask-function’ +‘:latex-hyperref-template’ ‘org-latex-hyperref-template’ +‘:latex-image-default-height’ ‘org-latex-image-default-height’ +‘:latex-image-default-option’ ‘org-latex-image-default-option’ +‘:latex-image-default-width’ ‘org-latex-image-default-width’ +‘:latex-images-centered’ ‘org-latex-images-centered’ +‘:latex-inactive-timestamp-format’ ‘org-latex-inactive-timestamp-format’ +‘:latex-inline-image-rules’ ‘org-latex-inline-image-rules’ +‘:latex-link-with-unknown-path-format’ ‘org-latex-link-with-unknown-path-format’ +‘:latex-listings-langs’ ‘org-latex-listings-langs’ +‘:latex-listings-options’ ‘org-latex-listings-options’ +‘:latex-listings’ ‘org-latex-listings’ +‘:latex-minted-langs’ ‘org-latex-minted-langs’ +‘:latex-minted-options’ ‘org-latex-minted-options’ +‘:latex-prefer-user-labels’ ‘org-latex-prefer-user-labels’ +‘:latex-subtitle-format’ ‘org-latex-subtitle-format’ +‘:latex-subtitle-separate’ ‘org-latex-subtitle-separate’ +‘:latex-table-scientific-notation’ ‘org-latex-table-scientific-notation’ +‘:latex-tables-booktabs’ ‘org-latex-tables-booktabs’ +‘:latex-tables-centered’ ‘org-latex-tables-centered’ +‘:latex-text-markup-alist’ ‘org-latex-text-markup-alist’ +‘:latex-title-command’ ‘org-latex-title-command’ +‘:latex-toc-command’ ‘org-latex-toc-command’ + +Markdown specific properties +............................ + +‘:md-footnote-format’ ‘org-md-footnote-format’ +‘:md-footnotes-section’ ‘org-md-footnotes-section’ +‘:md-headline-style’ ‘org-md-headline-style’ + +ODT specific properties +....................... + +‘:odt-content-template-file’ ‘org-odt-content-template-file’ +‘:odt-display-outline-level’ ‘org-odt-display-outline-level’ +‘:odt-fontify-srcblocks’ ‘org-odt-fontify-srcblocks’ +‘:odt-format-drawer-function’ ‘org-odt-format-drawer-function’ +‘:odt-format-headline-function’ ‘org-odt-format-headline-function’ +‘:odt-format-inlinetask-function’ ‘org-odt-format-inlinetask-function’ +‘:odt-inline-formula-rules’ ‘org-odt-inline-formula-rules’ +‘:odt-inline-image-rules’ ‘org-odt-inline-image-rules’ +‘:odt-pixels-per-inch’ ‘org-odt-pixels-per-inch’ +‘:odt-styles-file’ ‘org-odt-styles-file’ +‘:odt-table-styles’ ‘org-odt-table-styles’ +‘:odt-use-date-fields’ ‘org-odt-use-date-fields’ + +Texinfo specific properties +........................... + +‘:texinfo-active-timestamp-format’ ‘org-texinfo-active-timestamp-format’ +‘:texinfo-classes’ ‘org-texinfo-classes’ +‘:texinfo-class’ ‘org-texinfo-default-class’ +‘:texinfo-table-default-markup’ ‘org-texinfo-table-default-markup’ +‘:texinfo-diary-timestamp-format’ ‘org-texinfo-diary-timestamp-format’ +‘:texinfo-filename’ ‘org-texinfo-filename’ +‘:texinfo-format-drawer-function’ ‘org-texinfo-format-drawer-function’ +‘:texinfo-format-headline-function’ ‘org-texinfo-format-headline-function’ +‘:texinfo-format-inlinetask-function’ ‘org-texinfo-format-inlinetask-function’ +‘:texinfo-inactive-timestamp-format’ ‘org-texinfo-inactive-timestamp-format’ +‘:texinfo-link-with-unknown-path-format’ ‘org-texinfo-link-with-unknown-path-format’ +‘:texinfo-node-description-column’ ‘org-texinfo-node-description-column’ +‘:texinfo-table-scientific-notation’ ‘org-texinfo-table-scientific-notation’ +‘:texinfo-tables-verbatim’ ‘org-texinfo-tables-verbatim’ +‘:texinfo-text-markup-alist’ ‘org-texinfo-text-markup-alist’ + + +File: org, Node: Publishing links, Next: Site map, Prev: Publishing options, Up: Configuration + +13.1.6 Publishing links +----------------------- + +To create a link from one Org file to another, you would use something +like ‘[[file:foo.org][The foo]]’ or simply ‘[[file:foo.org]]’ (see *note +External Links::). When published, this link becomes a link to +‘foo.html’. You can thus interlink the pages of your “Org web” project +and the links will work as expected when you publish them to HTML. If +you also publish the Org source file and want to link to it, use an +‘http’ link instead of a ‘file:’ link, because ‘file’ links are +converted to link to the corresponding ‘.html’ file. + + You may also link to related files, such as images. Provided you are +careful with relative file names, and provided you have also configured +Org to upload the related files, these links will work too. See *note +Complex example::, for an example of this usage. + + Eventually, links between published documents can contain some search +options (see *note Search Options::), which will be resolved to the +appropriate location in the linked file. For example, once published to +HTML, the following links all point to a dedicated anchor in ‘foo.html’. + + [[file:foo.org::*heading]] + [[file:foo.org::#custom-id]] + [[file:foo.org::target]] + + +File: org, Node: Site map, Next: Generating an index, Prev: Publishing links, Up: Configuration + +13.1.7 Generating a sitemap +--------------------------- + +The following properties may be used to control publishing of a map of +files for a given project. + +‘:auto-sitemap’ + When non-‘nil’, publish a sitemap during + ‘org-publish-current-project’ or ‘org-publish-all’. + +‘:sitemap-filename’ + Filename for output of sitemap. Defaults to ‘sitemap.org’, which + becomes ‘sitemap.html’. + +‘:sitemap-title’ + Title of sitemap page. Defaults to name of file. + +‘:sitemap-format-entry’ + With this option one can tell how a site-map entry is formatted in + the site-map. It is a function called with three arguments: the + file or directory name relative to base directory of the project, + the site-map style and the current project. It is expected to + return a string. Default value turns file names into links and use + document titles as descriptions. For specific formatting needs, + one can use ‘org-publish-find-date’, ‘org-publish-find-title’ and + ‘org-publish-find-property’, to retrieve additional information + about published documents. + +‘:sitemap-function’ + Plug-in function to use for generation of the sitemap. It is + called with two arguments: the title of the site-map and a + representation of the files and directories involved in the project + as a nested list, which can further be transformed using + ‘org-list-to-generic’, ‘org-list-to-subtree’ and alike. Default + value generates a plain list of links to all files in the project. + +‘:sitemap-sort-folders’ + Where folders should appear in the sitemap. Set this to ‘first’ + (default) or ‘last’ to display folders first or last, respectively. + When set to ‘ignore’, folders are ignored altogether. Any other + value mixes files and folders. This variable has no effect when + site-map style is ‘tree’. + +‘:sitemap-sort-files’ + How the files are sorted in the site map. Set this to + ‘alphabetically’ (default), ‘chronologically’ or + ‘anti-chronologically’. ‘chronologically’ sorts the files with + older date first while ‘anti-chronologically’ sorts the files with + newer date first. ‘alphabetically’ sorts the files alphabetically. + The date of a file is retrieved with ‘org-publish-find-date’. + +‘:sitemap-ignore-case’ + Should sorting be case-sensitive? Default ‘nil’. + +‘:sitemap-file-entry-format’ + With this option one can tell how a sitemap’s entry is formatted in + the sitemap. This is a format string with some escape sequences: + ‘%t’ stands for the title of the file, ‘%a’ stands for the author + of the file and ‘%d’ stands for the date of the file. The date is + retrieved with the ‘org-publish-find-date’ function and formatted + with ‘org-publish-sitemap-date-format’. Default ‘%t’. + +‘:sitemap-date-format’ + Format string for the ‘format-time-string’ function that tells how + a sitemap entry’s date is to be formatted. This property bypasses + ‘org-publish-sitemap-date-format’ which defaults to ‘%Y-%m-%d’. + + +File: org, Node: Generating an index, Prev: Site map, Up: Configuration + +13.1.8 Generating an index +-------------------------- + +Org mode can generate an index across the files of a publishing project. + +‘:makeindex’ + When non-‘nil’, generate in index in the file ‘theindex.org’ and + publish it as ‘theindex.html’. + + The file is created when first publishing a project with the +‘:makeindex’ set. The file only contains a statement ‘#+INCLUDE: +"theindex.inc"’. You can then build around this include statement by +adding a title, style information, etc. + + Index entries are specified with ‘INDEX’ keyword. An entry that +contains an exclamation mark creates a sub item. + + *** Curriculum Vitae + #+INDEX: CV + #+INDEX: Application!CV + + +File: org, Node: Uploading Files, Next: Sample Configuration, Prev: Configuration, Up: Publishing + +13.2 Uploading Files +==================== + +For those people already utilizing third party sync tools such as Rsync +or Unison, it might be preferable not to use the built-in remote +publishing facilities of Org mode which rely heavily on Tramp. Tramp, +while very useful and powerful, tends not to be so efficient for +multiple file transfer and has been known to cause problems under heavy +usage. + + Specialized synchronization utilities offer several advantages. In +addition to timestamp comparison, they also do content and +permissions/attribute checks. For this reason you might prefer to +publish your web to a local directory—possibly even _in place_ with your +Org files—and then use Unison or Rsync to do the synchronization with +the remote host. + + Since Unison, for example, can be configured as to which files to +transfer to a certain remote destination, it can greatly simplify the +project publishing definition. Simply keep all files in the correct +location, process your Org files with ‘org-publish’ and let the +synchronization tool do the rest. You do not need, in this scenario, to +include attachments such as JPG, CSS or PNG files in the project +definition since the third-party tool syncs them. + + Publishing to a local directory is also much faster than to a remote +one, so that you can afford more easily to republish entire projects. +If you set ‘org-publish-use-timestamps-flag’ to ‘nil’, you gain the main +benefit of re-including any changed external files such as source +example files you might include with ‘INCLUDE’ keyword. The timestamp +mechanism in Org is not smart enough to detect if included files have +been modified. + + +File: org, Node: Sample Configuration, Next: Triggering Publication, Prev: Uploading Files, Up: Publishing + +13.3 Sample Configuration +========================= + +Below we provide two example configurations. The first one is a simple +project publishing only a set of Org files. The second example is more +complex, with a multi-component project. + +* Menu: + +* Simple example:: One-component publishing. +* Complex example:: A multi-component publishing example. + + +File: org, Node: Simple example, Next: Complex example, Up: Sample Configuration + +13.3.1 Example: simple publishing configuration +----------------------------------------------- + +This example publishes a set of Org files to the ‘public_html’ directory +on the local machine. + + (setq org-publish-project-alist + '(("org" + :base-directory "~/org/" + :publishing-directory "~/public_html" + :section-numbers nil + :table-of-contents nil + :style ""))) + + +File: org, Node: Complex example, Prev: Simple example, Up: Sample Configuration + +13.3.2 Example: complex publishing configuration +------------------------------------------------ + +This more complicated example publishes an entire website, including Org +files converted to HTML, image files, Emacs Lisp source code, and style +sheets. The publishing directory is remote and private files are +excluded. + + To ensure that links are preserved, care should be taken to replicate +your directory structure on the web server, and to use relative file +paths. For example, if your Org files are kept in ‘~/org/’ and your +publishable images in ‘~/images/’, you would link to an image with + + file:../images/myimage.png + + On the web server, the relative path to the image should be the same. +You can accomplish this by setting up an ‘images/’ folder in the right +place on the web server, and publishing images to it. + + (setq org-publish-project-alist + '(("orgfiles" + :base-directory "~/org/" + :base-extension "org" + :publishing-directory "/ssh:user@host:~/html/notebook/" + :publishing-function org-html-publish-to-html + :exclude "PrivatePage.org" ;; regexp + :headline-levels 3 + :section-numbers nil + :with-toc nil + :html-head "" + :html-preamble t) + + ("images" + :base-directory "~/images/" + :base-extension "jpg\\|gif\\|png" + :publishing-directory "/ssh:user@host:~/html/images/" + :publishing-function org-publish-attachment) + + ("other" + :base-directory "~/other/" + :base-extension "css\\|el" + :publishing-directory "/ssh:user@host:~/html/other/" + :publishing-function org-publish-attachment) + ("website" :components ("orgfiles" "images" "other")))) + + +File: org, Node: Triggering Publication, Prev: Sample Configuration, Up: Publishing + +13.4 Triggering Publication +=========================== + +Once properly configured, Org can publish with the following commands: + +‘C-c C-e X’ (‘org-publish’) + Prompt for a specific project and publish all files that belong to + it. + +‘C-c C-e P’ (‘org-publish-current-project’) + Publish the project containing the current file. + +‘C-c C-e F’ (‘org-publish-current-file’) + Publish only the current file. + +‘C-c C-e E’ (‘org-publish-all’) + Publish every project. + + Org uses timestamps to track when a file has changed. The above +functions normally only publish changed files. You can override this +and force publishing of all files by giving a prefix argument to any of +the commands above, or by customizing the variable +‘org-publish-use-timestamps-flag’. This may be necessary in particular +if files include other files via ‘SETUPFILE’ or ‘INCLUDE’ keywords. + + +File: org, Node: Working with Source Code, Next: Miscellaneous, Prev: Publishing, Up: Top + +14 Working with Source Code +*************************** + +Source code here refers to any plain text collection of computer +instructions, possibly with comments, written using a human-readable +programming language. Org can manage source code in an Org document +when the source code is identified with begin and end markers. Working +with source code begins with identifying source code blocks. A source +code block can be placed almost anywhere in an Org document; it is not +restricted to the preamble or the end of the document. However, Org +cannot manage a source code block if it is placed inside an Org comment +or within a fixed width section. + + Here is an example source code block in the Emacs Lisp language: + + #+BEGIN_SRC emacs-lisp + (defun org-xor (a b) + "Exclusive or." + (if a (not b) b)) + #+END_SRC + + Org can manage the source code in the block delimited by +‘#+BEGIN_SRC’ ... ‘#+END_SRC’ in several ways that can simplify +housekeeping tasks essential to modern source code maintenance. Org can +edit, format, extract, export, and publish source code blocks. Org can +also compile and execute a source code block, then capture the results. +The Org mode literature sometimes refers to source code blocks as _live +code_ blocks because they can alter the content of the Org document or +the material that it exports. Users can control how live they want each +source code block by tweaking the header arguments (see *note Using +Header Arguments::) for compiling, execution, extraction, and exporting. + + Source code blocks are one of many Org block types, which also +include “center”, “comment”, “dynamic”, “example”, “export”, “quote”, +“special”, and “verse”. This section pertains to blocks between +‘#+BEGIN_SRC’ and ‘#+END_SRC’. + + For editing and formatting a source code block, Org uses an +appropriate Emacs major mode that includes features specifically +designed for source code in that language. + + Org can extract one or more source code blocks and write them to one +or more source files—a process known as _tangling_ in literate +programming terminology. + + For exporting and publishing, Org’s back-ends can format a source +code block appropriately, often with native syntax highlighting. + + For executing and compiling a source code block, the user can +configure Org to select the appropriate compiler. Org provides +facilities to collect the result of the execution or compiler output, +insert it into the Org document, and/or export it. In addition to text +results, Org can insert links to other data types, including audio, +video, and graphics. Org can also link a compiler error message to the +appropriate line in the source code block. + + An important feature of Org’s management of source code blocks is the +ability to pass variables, functions, and results to one another using a +common syntax for source code blocks in any language. Although most +literate programming facilities are restricted to one language or +another, Org’s language-agnostic approach lets the literate programmer +match each programming task with the appropriate computer language and +to mix them all together in a single Org document. This +interoperability among languages explains why Org’s source code +management facility was named _Org Babel_ by its originators, Eric +Schulte and Dan Davison. + + Org mode fulfills the promise of easy verification and maintenance of +publishing reproducible research by keeping text, data, code, +configuration settings of the execution environment, the results of the +execution, and associated narratives, claims, references, and internal +and external links in a single Org document. + + Details of Org’s facilities for working with source code are +described in the following sections. + +* Menu: + +* Structure of Code Blocks:: Code block syntax described. +* Using Header Arguments:: Different ways to set header arguments. +* Environment of a Code Block:: Arguments, sessions, working directory... +* Evaluating Code Blocks:: Place results of evaluation in the Org buffer. +* Results of Evaluation:: Choosing a results type, post-processing... +* Exporting Code Blocks:: Export contents and/or results. +* Extracting Source Code:: Create pure source code files. +* Languages:: List of supported code block languages. +* Editing Source Code:: Language major-mode editing. +* Noweb Reference Syntax:: Literate programming in Org mode. +* Library of Babel:: Use and contribute to a library of useful code blocks. +* Key bindings and Useful Functions:: Work quickly with code blocks. +* Batch Execution:: Call functions from the command line. + + +File: org, Node: Structure of Code Blocks, Next: Using Header Arguments, Up: Working with Source Code + +14.1 Structure of Code Blocks +============================= + +Org offers two ways to structure source code in Org documents: in a +source code block, and directly inline. Both specifications are shown +below. + + A source code block conforms to this structure: + + #+NAME: + #+BEGIN_SRC
+ + #+END_SRC + + Do not be put-off by having to remember the source block syntax. Org +mode offers a command for wrapping existing text in a block (see *note +Structure Templates::). Org also works with other completion systems in +Emacs, some of which predate Org and have custom domain-specific +languages for defining templates. Regular use of templates reduces +errors, increases accuracy, and maintains consistency. + + An inline code block conforms to this structure: + + src_{} + +or + + src_[
]{} + +‘#+NAME: ’ + Optional. Names the source block so it can be called, like a + function, from other source blocks or inline code to evaluate or to + capture the results. Code from other blocks, other files, and from + table formulas (see *note The Spreadsheet::) can use the name to + reference a source block. This naming serves the same purpose as + naming Org tables. Org mode requires unique names. For duplicate + names, Org mode’s behavior is undefined. + +‘#+BEGIN_SRC’ ... ‘#+END_SRC’ + Mandatory. They mark the start and end of a block that Org + requires. The ‘#+BEGIN_SRC’ line takes additional arguments, as + described next. + +‘’ + Mandatory. It is the identifier of the source code language in the + block. See *note Languages::, for identifiers of supported + languages. + +‘’ + Optional. Switches provide finer control of the code execution, + export, and format (see the discussion of switches in *note Literal + Examples::). + +‘
’ + Optional. Heading arguments control many aspects of evaluation, + export and tangling of code blocks (see *note Using Header + Arguments::). Using Org’s properties feature, header arguments can + be selectively applied to the entire buffer or specific sub-trees + of the Org document. + +‘’ + Source code in the dialect of the specified language identifier. + + +File: org, Node: Using Header Arguments, Next: Environment of a Code Block, Prev: Structure of Code Blocks, Up: Working with Source Code + +14.2 Using Header Arguments +=========================== + +Org comes with many header arguments common to all languages. New +header arguments are added for specific languages as they become +available for use in source code blocks. A header argument is specified +with an initial colon followed by the argument’s name in lowercase. + + Since header arguments can be set in several ways, Org prioritizes +them in case of overlaps or conflicts by giving local settings a higher +priority. Header values in function calls, for example, override header +values from global defaults. + +System-wide header arguments +---------------------------- + +System-wide values of header arguments can be specified by customizing +the ‘org-babel-default-header-args’ variable, which defaults to the +following values: + + :session => "none" + :results => "replace" + :exports => "code" + :cache => "no" + :noweb => "no" + + The example below sets ‘:noweb’ header arguments to ‘yes’, which +makes Org expand ‘:noweb’ references by default. + + (setq org-babel-default-header-args + (cons '(:noweb . "yes") + (assq-delete-all :noweb org-babel-default-header-args))) + + Each language can have separate default header arguments by +customizing the variable ‘org-babel-default-header-args:’, where + is the name of the language. For details, see the +language-specific online documentation at +. + +Header arguments in Org mode properties +--------------------------------------- + +For header arguments applicable to the buffer, use ‘PROPERTY’ keyword +anywhere in the Org file (see *note Property Syntax::). + + The following example makes all the R code blocks execute in the same +session. Setting ‘:results’ to ‘silent’ ignores the results of +executions for all blocks, not just R code blocks; no results inserted +for any block. + + #+PROPERTY: header-args:R :session *R* + #+PROPERTY: header-args :results silent + + Header arguments set through Org’s property drawers (see *note +Property Syntax::) apply at the sub-tree level on down. Since these +property drawers can appear anywhere in the file hierarchy, Org uses +outermost call or source block to resolve the values. Org ignores +‘org-use-property-inheritance’ setting. + + In this example, ‘:cache’ defaults to ‘yes’ for all code blocks in +the sub-tree. + + * sample header + :PROPERTIES: + :header-args: :cache yes + :END: + + Properties defined through ‘org-set-property’ function, bound to ‘C-c +C-x p’, apply to all active languages. They override properties set in +‘org-babel-default-header-args’. + + Language-specific header arguments are also read from properties +‘header-args:’ where is the language identifier. For +example, + + * Heading + :PROPERTIES: + :header-args:clojure: :session *clojure-1* + :header-args:R: :session *R* + :END: + ** Subheading + :PROPERTIES: + :header-args:clojure: :session *clojure-2* + :END: + +would force separate sessions for Clojure blocks in ‘Heading’ and +‘Subheading’, but use the same session for all R blocks. Blocks in +‘Subheading’ inherit settings from ‘Heading’. + +Code block specific header arguments +------------------------------------ + +Header arguments are most commonly set at the source code block level, +on the ‘#+BEGIN_SRC’ line. Arguments set at this level take precedence +over those set in the ‘org-babel-default-header-args’ variable, and also +those set as header properties. + + In the following example, setting ‘:results’ to ‘silent’ makes it +ignore results of the code execution. Setting ‘:exports’ to ‘code’ +exports only the body of the code block to HTML or LaTeX. + + #+NAME: factorial + #+BEGIN_SRC haskell :results silent :exports code :var n=0 + fac 0 = 1 + fac n = n * fac (n-1) + #+END_SRC + + The same header arguments in an inline code block: + + src_haskell[:exports both]{fac 5} + + Code block header arguments can span multiple lines using ‘#+HEADER:’ +on each line. Note that Org currently accepts the plural spelling of +‘#+HEADER:’ only as a convenience for backward-compatibility. It may be +removed at some point. + + Multi-line header arguments on an unnamed code block: + + #+HEADER: :var data1=1 + #+BEGIN_SRC emacs-lisp :var data2=2 + (message "data1:%S, data2:%S" data1 data2) + #+END_SRC + + #+RESULTS: + : data1:1, data2:2 + + Multi-line header arguments on a named code block: + + #+NAME: named-block + #+HEADER: :var data=2 + #+BEGIN_SRC emacs-lisp + (message "data:%S" data) + #+END_SRC + + #+RESULTS: named-block + : data:2 + +Header arguments in function calls +---------------------------------- + +Header arguments in function calls are the most specific and override +all other settings in case of an overlap. They get the highest +priority. Two ‘#+CALL:’ examples are shown below. For the complete +syntax of ‘CALL’ keyword, see *note Evaluating Code Blocks::. + + In this example, ‘:exports results’ header argument is applied to the +evaluation of the ‘#+CALL:’ line. + + #+CALL: factorial(n=5) :exports results + + In this example, ‘:session special’ header argument is applied to the +evaluation of ‘factorial’ code block. + + #+CALL: factorial[:session special](n=5) + + +File: org, Node: Environment of a Code Block, Next: Evaluating Code Blocks, Prev: Using Header Arguments, Up: Working with Source Code + +14.3 Environment of a Code Block +================================ + +Passing arguments +----------------- + +Use ‘var’ for passing arguments to source code blocks. The specifics of +variables in code blocks vary by the source language and are covered in +the language-specific documentation. The syntax for ‘var’, however, is +the same for all languages. This includes declaring a variable, and +assigning a default value. + + The following syntax is used to pass arguments to code blocks using +the ‘var’ header argument. + + :var NAME=ASSIGN + +NAME is the name of the variable bound in the code block body. ASSIGN +is a literal value, such as a string, a number, a reference to a table, +a list, a literal example, another code block—with or without +arguments—or the results of evaluating a code block. + + Here are examples of passing values by reference: + +table + A table named with a ‘NAME’ keyword. + + #+NAME: example-table + | 1 | + | 2 | + | 3 | + | 4 | + + #+NAME: table-length + #+BEGIN_SRC emacs-lisp :var table=example-table + (length table) + #+END_SRC + + #+RESULTS: table-length + : 4 + + When passing a table, you can treat specially the row, or the + column, containing labels for the columns, or the rows, in the + table. + + The ‘colnames’ header argument accepts ‘yes’, ‘no’, or ‘nil’ + values. The default value is ‘nil’: if an input table has column + names—because the second row is a horizontal rule—then Org removes + the column names, processes the table, puts back the column names, + and then writes the table to the results block. Using ‘yes’, Org + does the same to the first row, even if the initial table does not + contain any horizontal rule. When set to ‘no’, Org does not + pre-process column names at all. + + #+NAME: less-cols + | a | + |---| + | b | + | c | + + #+BEGIN_SRC python :var tab=less-cols :colnames nil + return [[val + '*' for val in row] for row in tab] + #+END_SRC + + #+RESULTS: + | a | + |----| + | b* | + | c* | + + Similarly, the ‘rownames’ header argument can take two values: + ‘yes’ or ‘no’. When set to ‘yes’, Org removes the first column, + processes the table, puts back the first column, and then writes + the table to the results block. The default is ‘no’, which means + Org does not pre-process the first column. Note that Emacs Lisp + code blocks ignore ‘rownames’ header argument because of the ease + of table-handling in Emacs. + + #+NAME: with-rownames + | one | 1 | 2 | 3 | 4 | 5 | + | two | 6 | 7 | 8 | 9 | 10 | + + #+BEGIN_SRC python :var tab=with-rownames :rownames yes + return [[val + 10 for val in row] for row in tab] + #+END_SRC + + #+RESULTS: + | one | 11 | 12 | 13 | 14 | 15 | + | two | 16 | 17 | 18 | 19 | 20 | + +list + A simple named list. + + #+NAME: example-list + - simple + - not + - nested + - list + + #+BEGIN_SRC emacs-lisp :var x=example-list + (print x) + #+END_SRC + + #+RESULTS: + | simple | list | + + Note that only the top level list items are passed along. Nested + list items are ignored. + +code block without arguments + A code block name, as assigned by ‘NAME’ keyword from the example + above, optionally followed by parentheses. + + #+BEGIN_SRC emacs-lisp :var length=table-length() + (* 2 length) + #+END_SRC + + #+RESULTS: + : 8 + +code block with arguments + A code block name, as assigned by ‘NAME’ keyword, followed by + parentheses and optional arguments passed within the parentheses. + + #+NAME: double + #+BEGIN_SRC emacs-lisp :var input=8 + (* 2 input) + #+END_SRC + + #+RESULTS: double + : 16 + + #+NAME: squared + #+BEGIN_SRC emacs-lisp :var input=double(input=1) + (* input input) + #+END_SRC + + #+RESULTS: squared + : 4 + +literal example + A literal example block named with a ‘NAME’ keyword. + + #+NAME: literal-example + #+BEGIN_EXAMPLE + A literal example + on two lines + #+END_EXAMPLE + + #+NAME: read-literal-example + #+BEGIN_SRC emacs-lisp :var x=literal-example + (concatenate #'string x " for you.") + #+END_SRC + + #+RESULTS: read-literal-example + : A literal example + : on two lines for you. + + Indexing variable values enables referencing portions of a variable. +Indexes are 0 based with negative values counting backwards from the +end. If an index is separated by commas then each subsequent section +indexes as the next dimension. Note that this indexing occurs _before_ +other table-related header arguments are applied, such as ‘hlines’, +‘colnames’ and ‘rownames’. The following example assigns the last cell +of the first row the table ‘example-table’ to the variable ‘data’: + + #+NAME: example-table + | 1 | a | + | 2 | b | + | 3 | c | + | 4 | d | + + #+BEGIN_SRC emacs-lisp :var data=example-table[0,-1] + data + #+END_SRC + + #+RESULTS: + : a + + Two integers separated by a colon reference a range of variable +values. In that case the entire inclusive range is referenced. For +example the following assigns the middle three rows of ‘example-table’ +to ‘data’. + + #+NAME: example-table + | 1 | a | + | 2 | b | + | 3 | c | + | 4 | d | + | 5 | 3 | + + #+BEGIN_SRC emacs-lisp :var data=example-table[1:3] + data + #+END_SRC + + #+RESULTS: + | 2 | b | + | 3 | c | + | 4 | d | + + To pick the entire range, use an empty index, or the single character +‘*’. ‘0:-1’ does the same thing. Example below shows how to reference +the first column only. + + #+NAME: example-table + | 1 | a | + | 2 | b | + | 3 | c | + | 4 | d | + + #+BEGIN_SRC emacs-lisp :var data=example-table[,0] + data + #+END_SRC + + #+RESULTS: + | 1 | 2 | 3 | 4 | + + Index referencing can be used for tables and code blocks. Index +referencing can handle any number of dimensions. Commas delimit +multiple dimensions, as shown below. + + #+NAME: 3D + #+BEGIN_SRC emacs-lisp + '(((1 2 3) (4 5 6) (7 8 9)) + ((10 11 12) (13 14 15) (16 17 18)) + ((19 20 21) (22 23 24) (25 26 27))) + #+END_SRC + + #+BEGIN_SRC emacs-lisp :var data=3D[1,,1] + data + #+END_SRC + + #+RESULTS: + | 11 | 14 | 17 | + + Note that row names and column names are not removed prior to +variable indexing. You need to take them into account, even when +‘colnames’ or ‘rownames’ header arguments remove them. + + Emacs lisp code can also set the values for variables. To +differentiate a value from Lisp code, Org interprets any value starting +with ‘(’, ‘[’, ‘'’ or ‘`’ as Emacs Lisp code. The result of evaluating +that code is then assigned to the value of that variable. The following +example shows how to reliably query and pass the file name of the Org +mode buffer to a code block using headers. We need reliability here +because the file’s name could change once the code in the block starts +executing. + + #+BEGIN_SRC sh :var filename=(buffer-file-name) :exports both + wc -w $filename + #+END_SRC + + Note that values read from tables and lists are not mistakenly +evaluated as Emacs Lisp code, as illustrated in the following example. + + #+NAME: table + | (a b c) | + + #+HEADER: :var data=table[0,0] + #+BEGIN_SRC perl + $data + #+END_SRC + + #+RESULTS: + : (a b c) + +Using sessions +-------------- + +Two code blocks can share the same environment. The ‘session’ header +argument is for running multiple source code blocks under one session. +Org runs code blocks with the same session name in the same interpreter +process. + +‘none’ + Default. Each code block gets a new interpreter process to + execute. The process terminates once the block is evaluated. + +STRING + Any string besides ‘none’ turns that string into the name of that + session. For example, ‘:session STRING’ names it ‘STRING’. If + ‘session’ has no value, then the session name is derived from the + source language identifier. Subsequent blocks with the same source + code language use the same session. Depending on the language, + state variables, code from other blocks, and the overall + interpreted environment may be shared. Some interpreted languages + support concurrent sessions when subsequent source code language + blocks change session names. + + Only languages that provide interactive evaluation can have session +support. Not all languages provide this support, such as C and ditaa. +Even languages, such as Python and Haskell, that do support interactive +evaluation impose limitations on allowable language constructs that can +run interactively. Org inherits those limitations for those code blocks +running in a session. + +Choosing a working directory +---------------------------- + +The ‘dir’ header argument specifies the default directory during code +block execution. If it is absent, then the directory associated with +the current buffer is used. In other words, supplying ‘:dir PATH’ +temporarily has the same effect as changing the current directory with +‘M-x cd PATH’, and then not setting ‘dir’. Under the surface, ‘dir’ +simply sets the value of the Emacs variable ‘default-directory’. + + For example, to save the plot file in the ‘Work/’ folder of the home +directory—notice tilde is expanded: + + #+BEGIN_SRC R :file myplot.png :dir ~/Work + matplot(matrix(rnorm(100), 10), type="l") + #+END_SRC + + To evaluate the code block on a remote machine, supply a remote +directory name using Tramp syntax. For example: + + #+BEGIN_SRC R :file plot.png :dir /scp:dand@yakuba.princeton.edu: + plot(1:10, main=system("hostname", intern=TRUE)) + #+END_SRC + + Org first captures the text results as usual for insertion in the Org +file. Then Org also inserts a link to the remote file, thanks to Emacs +Tramp. Org constructs the remote path to the file name from ‘dir’ and +‘default-directory’, as illustrated here: + + [[file:/scp:dand@yakuba.princeton.edu:/home/dand/plot.png][plot.png]] + + When ‘dir’ is used with ‘session’, Org sets the starting directory +for a new session. But Org does not alter the directory of an already +existing session. + + Do not use ‘dir’ with ‘:exports results’ or with ‘:exports both’ to +avoid Org inserting incorrect links to remote files. That is because +Org does not expand ‘default directory’ to avoid some underlying +portability issues. + +Inserting headers and footers +----------------------------- + +The ‘prologue’ header argument is for appending to the top of the code +block for execution, like a reset instruction. For example, you may use +‘:prologue "reset"’ in a Gnuplot code block or, for every such block: + + (add-to-list 'org-babel-default-header-args:gnuplot + '((:prologue . "reset"))) + + + Likewise, the value of the ‘epilogue’ header argument is for +appending to the end of the code block for execution. + + +File: org, Node: Evaluating Code Blocks, Next: Results of Evaluation, Prev: Environment of a Code Block, Up: Working with Source Code + +14.4 Evaluating Code Blocks +=========================== + +A note about security: With code evaluation comes the risk of harm. Org +safeguards by prompting for user’s permission before executing any code +in the source block. To customize this safeguard, or disable it, see +*note Code Evaluation Security::. + +How to evaluate source code +--------------------------- + +Org captures the results of the code block evaluation and inserts them +in the Org file, right after the code block. The insertion point is +after a newline and the ‘RESULTS’ keyword. Org creates the ‘RESULTS’ +keyword if one is not already there. + + By default, Org enables only Emacs Lisp code blocks for execution. +See *note Languages:: to enable other languages. + + Org provides many ways to execute code blocks. ‘C-c C-c’ or ‘C-c C-v +e’ with the point on a code block(1) calls the +‘org-babel-execute-src-block’ function, which executes the code in the +block, collects the results, and inserts them in the buffer. + + By calling a named code block(2) from an Org mode buffer or a table. +Org can call the named code blocks from the current Org mode buffer or +from the “Library of Babel” (see *note Library of Babel::). + + The syntax for ‘CALL’ keyword is: + + #+CALL: () + #+CALL: []() + + The syntax for inline named code blocks is: + + ... call_() ... + ... call_[]()[] ... + + When inline syntax is used, the result is wrapped based on the +variable ‘org-babel-inline-result-wrap’, which by default is set to +‘"=%s="’ to produce verbatim text suitable for markup. + +‘’ + This is the name of the code block (see *note Structure of Code + Blocks::) to be evaluated in the current document. If the block is + located in another file, start ‘’ with the file name followed + by a colon. For example, in order to execute a block named + ‘clear-data’ in ‘file.org’, you can write the following: + + #+CALL: file.org:clear-data() + +‘’ + Org passes arguments to the code block using standard function call + syntax. For example, a ‘#+CALL:’ line that passes ‘4’ to a code + block named ‘double’, which declares the header argument ‘:var + n=2’, would be written as: + + #+CALL: double(n=4) + + Note how this function call syntax is different from the header + argument syntax. + +‘’ + Org passes inside header arguments to the named code block using + the header argument syntax. Inside header arguments apply to code + block evaluation. For example, ‘[:results output]’ collects + results printed to stdout during code execution of that block. + Note how this header argument syntax is different from the function + call syntax. + +‘’ + End header arguments affect the results returned by the code block. + For example, ‘:results html’ wraps the results in a ‘#+BEGIN_EXPORT + html’ block before inserting the results in the Org buffer. + +Limit code block evaluation +--------------------------- + +The ‘eval’ header argument can limit evaluation of specific code blocks +and ‘CALL’ keyword. It is useful for protection against evaluating +untrusted code blocks by prompting for a confirmation. + +‘never’ or ‘no’ + Org never evaluates the source code. + +‘query’ + Org prompts the user for permission to evaluate the source code. + +‘never-export’ or ‘no-export’ + Org does not evaluate the source code when exporting, yet the user + can evaluate it interactively. + +‘query-export’ + Org prompts the user for permission to evaluate the source code + during export. + + If ‘eval’ header argument is not set, then Org determines whether to +evaluate the source code from the ‘org-confirm-babel-evaluate’ variable +(see *note Code Evaluation Security::). + +Cache results of evaluation +--------------------------- + +The ‘cache’ header argument is for caching results of evaluating code +blocks. Caching results can avoid re-evaluating a code block that have +not changed since the previous run. To benefit from the cache and avoid +redundant evaluations, the source block must have a result already +present in the buffer, and neither the header arguments—including the +value of ‘var’ references—nor the text of the block itself has changed +since the result was last computed. This feature greatly helps avoid +long-running calculations. For some edge cases, however, the cached +results may not be reliable. + + The caching feature is best for when code blocks are pure functions, +that is functions that return the same value for the same input +arguments (see *note Environment of a Code Block::), and that do not +have side effects, and do not rely on external variables other than the +input arguments. Functions that depend on a timer, file system objects, +and random number generators are clearly unsuitable for caching. + + A note of warning: when ‘cache’ is used in a session, caching may +cause unexpected results. + + When the caching mechanism tests for any source code changes, it does +not expand Noweb style references (see *note Noweb Reference Syntax::). +For reasons why, see +. + + The ‘cache’ header argument can have one of two values: ‘yes’ or +‘no’. + +‘no’ + Default. No caching of results; code block evaluated every time. + +‘yes’ + Whether to run the code or return the cached results is determined + by comparing the SHA1 hash value of the combined code block and + arguments passed to it. This hash value is packed on the + ‘#+RESULTS:’ line from previous evaluation. When hash values + match, Org does not evaluate the code block. When hash values + mismatch, Org evaluates the code block, inserts the results, + recalculates the hash value, and updates ‘#+RESULTS:’ line. + + In this example, both functions are cached. But ‘caller’ runs only +if the result from ‘random’ has changed since the last run. + + #+NAME: random + #+BEGIN_SRC R :cache yes + runif(1) + #+END_SRC + + #+RESULTS[a2a72cd647ad44515fab62e144796432793d68e1]: random + 0.4659510825295 + + #+NAME: caller + #+BEGIN_SRC emacs-lisp :var x=random :cache yes + x + #+END_SRC + + #+RESULTS[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller + 0.254227238707244 + + ---------- Footnotes ---------- + + (1) The option ‘org-babel-no-eval-on-ctrl-c-ctrl-c’ can be used to +remove code evaluation from the ‘C-c C-c’ key binding. + + (2) Actually, the constructs ‘call_()’ and ‘src_{}’ are +not evaluated when they appear in a keyword (see *note In-buffer +Settings::). + + +File: org, Node: Results of Evaluation, Next: Exporting Code Blocks, Prev: Evaluating Code Blocks, Up: Working with Source Code + +14.5 Results of Evaluation +========================== + +How Org handles results of a code block execution depends on many header +arguments working together. The primary determinant, however, is the +‘results’ header argument. It accepts four classes of options. Each +code block can take only one option per class: + +collection + For how the results should be collected from the code block; + +type + For which type of result the code block will return; affects how + Org processes and inserts results in the Org buffer; + +format + For the result; affects how Org processes and inserts results in + the Org buffer; + +handling + For processing results after evaluation of the code block; + +Collection +---------- + +Collection options specify the results. Choose one of the options; they +are mutually exclusive. + +‘value’ + Default. Functional mode. Org gets the value by wrapping the code + in a function definition in the language of the source block. That + is why when using ‘:results value’, code should execute like a + function and return a value. For languages like Python, an + explicit ‘return’ statement is mandatory when using ‘:results + value’. Result is the value returned by the last statement in the + code block. + + When evaluating the code block in a session (see *note Environment + of a Code Block::), Org passes the code to an interpreter running + as an interactive Emacs inferior process. Org gets the value from + the source code interpreter’s last statement output. Org has to + use language-specific methods to obtain the value. For example, + from the variable ‘_’ in Python and Ruby, and the value of + ‘.Last.value’ in R. + +‘output’ + Scripting mode. Org passes the code to an external process running + the interpreter. Org returns the contents of the standard output + stream as text results. + + When using a session, Org passes the code to the interpreter + running as an interactive Emacs inferior process. Org concatenates + any text output from the interpreter and returns the collection as + a result. + + Note that this collection is not the same as that would be + collected from stdout of a non-interactive interpreter running as + an external process. Compare for example these two blocks: + + #+BEGIN_SRC python :results output + print "hello" + 2 + print "bye" + #+END_SRC + + #+RESULTS: + : hello + : bye + + In the above non-session mode, the “2” is not printed; so it does + not appear in results. + + #+BEGIN_SRC python :results output :session + print "hello" + 2 + print "bye" + #+END_SRC + + #+RESULTS: + : hello + : 2 + : bye + + In the above session, the interactive interpreter receives and + prints “2”. Results show that. + +Type +---- + +Type tells what result types to expect from the execution of the code +block. Choose one of the options; they are mutually exclusive. The +default behavior is to automatically determine the result type. + +‘table’ +‘vector’ + Interpret the results as an Org table. If the result is a single + value, create a table with one row and one column. Usage example: + ‘:results value table’. + + In-between each table row or below the table headings, sometimes + results have horizontal lines, which are also known as “hlines”. + The ‘hlines’ argument with the default ‘no’ value strips such lines + from the input table. For most code, this is desirable, or else + those ‘hline’ symbols raise unbound variable errors. A ‘yes’ + accepts such lines, as demonstrated in the following example. + + #+NAME: many-cols + | a | b | c | + |---+---+---| + | d | e | f | + |---+---+---| + | g | h | i | + + #+NAME: no-hline + #+BEGIN_SRC python :var tab=many-cols :hlines no + return tab + #+END_SRC + + #+RESULTS: no-hline + | a | b | c | + | d | e | f | + | g | h | i | + + #+NAME: hlines + #+BEGIN_SRC python :var tab=many-cols :hlines yes + return tab + #+END_SRC + + #+RESULTS: hlines + | a | b | c | + |---+---+---| + | d | e | f | + |---+---+---| + | g | h | i | + +‘list’ + Interpret the results as an Org list. If the result is a single + value, create a list of one element. + +‘scalar’ +‘verbatim’ + Interpret literally and insert as quoted text. Do not create a + table. Usage example: ‘:results value verbatim’. + +‘file’ + Interpret as a filename. Save the results of execution of the code + block to that file, then insert a link to it. You can control both + the filename and the description associated to the link. + + Org first tries to generate the filename from the value of the + ‘file’ header argument and the directory specified using the + ‘output-dir’ header arguments. If ‘output-dir’ is not specified, + Org assumes it is the current directory. + + #+BEGIN_SRC asymptote :results value file :file circle.pdf :output-dir img/ + size(2cm); + draw(unitcircle); + #+END_SRC + + If ‘file’ is missing, Org generates the base name of the output + file from the name of the code block, and its extension from the + ‘file-ext’ header argument. In that case, both the name and the + extension are mandatory(1). + + #+name: circle + #+BEGIN_SRC asymptote :results value file :file-ext pdf + size(2cm); + draw(unitcircle); + #+END_SRC + + The ‘file-desc’ header argument defines the description (see *note + Link Format::) for the link. If ‘file-desc’ has no value, Org uses + the generated file name for both the “link” and “description” parts + of the link. + + By default, Org assumes that a table written to a file has + TAB-delimited output. You can choose a different separator with + the ‘sep’ header argument. + +Format +------ + +Format pertains to the type of the result returned by the code block. +Choose one of the options; they are mutually exclusive. The default +follows from the type specified above. + +‘code’ + Result enclosed in a code block. Useful for parsing. Usage + example: ‘:results value code’. + +‘drawer’ + Result wrapped in a ‘RESULTS’ drawer. Useful for containing ‘raw’ + or ‘org’ results for later scripting and automated processing. + Usage example: ‘:results value drawer’. + +‘html’ + Results enclosed in a ‘BEGIN_EXPORT html’ block. Usage example: + ‘:results value html’. + +‘latex’ + Results enclosed in a ‘BEGIN_EXPORT latex’ block. Usage example: + ‘:results value latex’. + +‘link’ +‘graphics’ + Result is a link to the file specified in ‘:file’ header argument. + However, unlike plain ‘:file’, nothing is written to the disk. The + block is used for its side-effects only, as in the following + example: + + #+begin_src shell :results link :file "download.tar.gz" + wget -c "http://example.com/download.tar.gz" + #+end_src + +‘org’ + Results enclosed in a ‘BEGIN_SRC org’ block. For comma-escape, + either ‘’ in the block, or export the file. Usage example: + ‘:results value org’. + +‘pp’ + Result converted to pretty-print source code. Enclosed in a code + block. Languages supported: Emacs Lisp, Python, and Ruby. Usage + example: ‘:results value pp’. + +‘raw’ + Interpreted as raw Org mode. Inserted directly into the buffer. + Aligned if it is a table. Usage example: ‘:results value raw’. + + The ‘wrap’ header argument unconditionnally marks the results block +by appending strings to ‘#+BEGIN_’ and ‘#+END_’. If no string is +specified, Org wraps the results in a ‘#+BEGIN_results’ ... +‘#+END_results’ block. It takes precedent over the ‘results’ value +listed above. E.g., + + #+BEGIN_SRC emacs-lisp :results html :wrap EXPORT markdown + "Welcome back to the 90's" + #+END_SRC + + #+RESULTS: + #+BEGIN_EXPORT markdown + Welcome back to the 90's + #+END_EXPORT + +Handling +-------- + +Handling options after collecting the results. + +‘silent’ + Do not insert results in the Org mode buffer, but echo them in the + minibuffer. Usage example: ‘:results output silent’. + +‘replace’ + Default. Insert results in the Org buffer. Remove previous + results. Usage example: ‘:results output replace’. + +‘append’ + Append results to the Org buffer. Latest results are at the + bottom. Does not remove previous results. Usage example: + ‘:results output append’. + +‘prepend’ + Prepend results to the Org buffer. Latest results are at the top. + Does not remove previous results. Usage example: ‘:results output + prepend’. + +Post-processing +--------------- + +The ‘post’ header argument is for post-processing results from block +evaluation. When ‘post’ has any value, Org binds the results to +‘*this*’ variable for easy passing to ‘var’ header argument +specifications (see *note Environment of a Code Block::). That makes +results available to other code blocks, or even for direct Emacs Lisp +code execution. + + The following two examples illustrate ‘post’ header argument in +action. The first one shows how to attach an ‘ATTR_LATEX’ keyword using +‘post’. + + #+NAME: attr_wrap + #+BEGIN_SRC sh :var data="" :var width="\\textwidth" :results output + echo "#+ATTR_LATEX: :width $width" + echo "$data" + #+END_SRC + + #+HEADER: :file /tmp/it.png + #+BEGIN_SRC dot :post attr_wrap(width="5cm", data=*this*) :results drawer + digraph{ + a -> b; + b -> c; + c -> a; + } + #+end_src + + #+RESULTS: + :RESULTS: + #+ATTR_LATEX :width 5cm + [[file:/tmp/it.png]] + :END: + + The second example shows use of ‘colnames’ header argument in ‘post’ +to pass data between code blocks. + + #+NAME: round-tbl + #+BEGIN_SRC emacs-lisp :var tbl="" fmt="%.3f" + (mapcar (lambda (row) + (mapcar (lambda (cell) + (if (numberp cell) + (format fmt cell) + cell)) + row)) + tbl) + #+end_src + + #+BEGIN_SRC R :colnames yes :post round-tbl[:colnames yes](*this*) + set.seed(42) + data.frame(foo=rnorm(1)) + #+END_SRC + + #+RESULTS: + | foo | + |-------| + | 1.371 | + + ---------- Footnotes ---------- + + (1) Due to the way this header argument is implemented, it implies +“:results file”. Therefore if it is set for multiple blocks at once (by +a subtree or buffer property for example), all blocks are forced to +produce file results. This is seldom desired behavior, so it is +recommended to set this header only on a per-block basis. It is +possible that this aspect of the implementation might change in the +future. + + +File: org, Node: Exporting Code Blocks, Next: Extracting Source Code, Prev: Results of Evaluation, Up: Working with Source Code + +14.6 Exporting Code Blocks +========================== + +It is possible to export the _code_ of code blocks, the _results_ of +code block evaluation, _both_ the code and the results of code block +evaluation, or _none_. Org defaults to exporting _code_ for most +languages. For some languages, such as ditaa, Org defaults to +_results_. To export just the body of code blocks, see *note Literal +Examples::. To selectively export sub-trees of an Org document, see +*note Exporting::. + + The ‘exports’ header argument is to specify if that part of the Org +file is exported to, say, HTML or LaTeX formats. + +‘code’ + The default. The body of code is included into the exported file. + Example: ‘:exports code’. + +‘results’ + The results of evaluation of the code is included in the exported + file. Example: ‘:exports results’. + +‘both’ + Both the code and results of evaluation are included in the + exported file. Example: ‘:exports both’. + +‘none’ + Neither the code nor the results of evaluation is included in the + exported file. Whether the code is evaluated at all depends on + other options. Example: ‘:exports none’. + + To stop Org from evaluating code blocks to speed exports, use the +header argument ‘:eval never-export’ (see *note Evaluating Code +Blocks::). To stop Org from evaluating code blocks for greater +security, set the ‘org-export-use-babel’ variable to ‘nil’, but +understand that header arguments will have no effect. + + Turning off evaluation comes in handy when batch processing. For +example, markup languages for wikis, which have a high risk of untrusted +code. Stopping code block evaluation also stops evaluation of all +header arguments of the code block. This may not be desirable in some +circumstances. So during export, to allow evaluation of just the header +arguments but not any code evaluation in the source block, set ‘:eval +never-export’ (see *note Evaluating Code Blocks::). + + Org never evaluates code blocks in commented sub-trees when exporting +(see *note Comment Lines::). On the other hand, Org does evaluate code +blocks in sub-trees excluded from export (see *note Export Settings::). + + +File: org, Node: Extracting Source Code, Next: Languages, Prev: Exporting Code Blocks, Up: Working with Source Code + +14.7 Extracting Source Code +=========================== + +Extracting source code from code blocks is a basic task in literate +programming. Org has features to make this easy. In literate +programming parlance, documents on creation are _woven_ with code and +documentation, and on export, the code is tangled for execution by a +computer. Org facilitates weaving and tangling for producing, +maintaining, sharing, and exporting literate programming documents. Org +provides extensive customization options for extracting source code. + + When Org tangles code blocks, it expands, merges, and transforms +them. Then Org recomposes them into one or more separate files, as +configured through the options. During this tangling process, Org +expands variables in the source code, and resolves any Noweb style +references (see *note Noweb Reference Syntax::). + +Header arguments +---------------- + +The ‘tangle’ header argument specifies if the code block is exported to +source file(s). + +‘yes’ + Export the code block to source file. The file name for the source + file is derived from the name of the Org file, and the file + extension is derived from the source code language identifier. + Example: ‘:tangle yes’. + +‘no’ + The default. Do not extract the code in a source code file. + Example: ‘:tangle no’. + +FILENAME + Export the code block to source file whose file name is derived + from any string passed to the ‘tangle’ header argument. Org + derives the file name as being relative to the directory of the Org + file’s location. Example: ‘:tangle FILENAME’. + + The ‘mkdirp’ header argument creates parent directories for tangled +files if the directory does not exist. ‘yes’ enables directory creation +and ‘no’ inhibits directory creation. + + The ‘comments’ header argument controls inserting comments into +tangled files. These are above and beyond whatever comments may already +exist in the code block. + +‘no’ + The default. Do not insert any extra comments during tangling. + +‘link’ + Wrap the code block in comments. Include links pointing back to + the place in the Org file from where the code was tangled. + +‘yes’ + Kept for backward compatibility; same as ‘link’. + +‘org’ + Nearest headline text from Org file is inserted as comment. The + exact text that is inserted is picked from the leading context of + the source block. + +‘both’ + Includes both ‘link’ and ‘org’ options. + +‘noweb’ + Includes ‘link’ option, expands Noweb references (see *note Noweb + Reference Syntax::), and wraps them in link comments inside the + body of the code block. + + The ‘padline’ header argument controls insertion of newlines to pad +source code in the tangled file. + +‘yes’ + Default. Insert a newline before and after each code block in the + tangled file. + +‘no’ + Do not insert newlines to pad the tangled code blocks. + + The ‘shebang’ header argument can turn results into executable script +files. By setting it to a string value—for example, ‘:shebang +"#!/bin/bash"’—Org inserts that string as the first line of the tangled +file that the code block is extracted to. Org then turns on the tangled +file’s executable permission. + + The ‘tangle-mode’ header argument specifies what permissions to set +for tangled files by ‘set-file-modes’. For example, to make a read-only +tangled file, use ‘:tangle-mode (identity #o444)’. To make it +executable, use ‘:tangle-mode (identity #o755)’. It also overrides +executable permission granted by ‘shebang’. When multiple source code +blocks tangle to a single file with different and conflicting +‘tangle-mode’ header arguments, Org’s behavior is undefined. + + By default Org expands code blocks during tangling. The ‘no-expand’ +header argument turns off such expansions. Note that one side-effect of +expansion by ‘org-babel-expand-src-block’ also assigns values (see *note +Environment of a Code Block::) to variables. Expansions also replace +Noweb references with their targets (see *note Noweb Reference +Syntax::). Some of these expansions may cause premature assignment, +hence this option. This option makes a difference only for tangling. +It has no effect when exporting since code blocks for execution have to +be expanded anyway. + +Functions +--------- + +‘org-babel-tangle’ + Tangle the current file. Bound to ‘C-c C-v t’. + + With prefix argument only tangle the current code block. + +‘org-babel-tangle-file’ + Choose a file to tangle. Bound to ‘C-c C-v f’. + +Hooks +----- + +‘org-babel-post-tangle-hook’ + This hook is run from within code files tangled by + ‘org-babel-tangle’, making it suitable for post-processing, + compilation, and evaluation of code in the tangled files. + +Jumping between code and Org +---------------------------- + +Debuggers normally link errors and messages back to the source code. +But for tangled files, we want to link back to the Org file, not to the +tangled source file. To make this extra jump, Org uses +‘org-babel-tangle-jump-to-org’ function with two additional source code +block header arguments: + + 1. Set ‘padline’ to true—this is the default setting. + 2. Set ‘comments’ to ‘link’, which makes Org insert links to the Org + file. + + +File: org, Node: Languages, Next: Editing Source Code, Prev: Extracting Source Code, Up: Working with Source Code + +14.8 Languages +============== + +Code blocks in the following languages are supported. + +Language Identifier Language Identifier +----------------------------------------------------------------------- +Asymptote ‘asymptote’ Lua ‘lua’ +Awk ‘awk’ MATLAB ‘matlab’ +C ‘C’ Mscgen ‘mscgen’ +C++ ‘C++’(1) OCaml ‘ocaml’ +Clojure ‘clojure’ Octave ‘octave’ +CSS ‘css’ Org mode ‘org’ +D ‘D’(2) Oz ‘oz’ +ditaa ‘ditaa’ Perl ‘perl’ +Emacs Calc ‘calc’ Plantuml ‘plantuml’ +Emacs Lisp ‘emacs-lisp’ Processing.js ‘processing’ +Fortran ‘fortran’ Python ‘python’ +Gnuplot ‘gnuplot’ R ‘R’ +GNU Screen ‘screen’ Ruby ‘ruby’ +Graphviz ‘dot’ Sass ‘sass’ +Haskell ‘haskell’ Scheme ‘scheme’ +Java ‘java’ Sed ‘sed’ +Javascript ‘js’ shell ‘sh’ +LaTeX ‘latex’ SQL ‘sql’ +Ledger ‘ledger’ SQLite ‘sqlite’ +Lilypond ‘lilypond’ Vala ‘vala’ +Lisp ‘lisp’ + + Additional documentation for some languages is at +. + + By default, only Emacs Lisp is enabled for evaluation. To enable or +disable other languages, customize the ‘org-babel-load-languages’ +variable either through the Emacs customization interface, or by adding +code to the init file as shown next. + + In this example, evaluation is disabled for Emacs Lisp, and enabled +for R. + + (org-babel-do-load-languages + 'org-babel-load-languages + '((emacs-lisp . nil) + (R . t))) + + Note that this is not the only way to enable a language. Org also +enables languages when loaded with ‘require’ statement. For example, +the following enables execution of Clojure code blocks: + + (require 'ob-clojure) + + ---------- Footnotes ---------- + + (1) C++ language is handled in ‘ob-C.el’. Even though the identifier +for such source blocks is ‘C++’, you activate it by loading the C +language. + + (2) D language is handled in ‘ob-C.el’. Even though the identifier +for such source blocks is ‘D’, you activate it by loading the C +language. + + +File: org, Node: Editing Source Code, Next: Noweb Reference Syntax, Prev: Languages, Up: Working with Source Code + +14.9 Editing Source Code +======================== + +Use ‘C-c '’ to edit the current code block. It opens a new major-mode +edit buffer containing the body of the source code block, ready for any +edits. Use ‘C-c '’ again to close the buffer and return to the Org +buffer. + + ‘C-x C-s’ saves the buffer and updates the contents of the Org +buffer. Set ‘org-edit-src-auto-save-idle-delay’ to save the base buffer +after a certain idle delay time. Set ‘org-edit-src-turn-on-auto-save’ +to auto-save this buffer into a separate file using Auto-save mode. + + While editing the source code in the major mode, the Org Src minor +mode remains active. It provides these customization variables as +described below. For even more variables, look in the customization +group ‘org-edit-structure’. + +‘org-src-lang-modes’ + If an Emacs major-mode named ‘-mode’ exists, where is + the language identifier from code block’s header line, then the + edit buffer uses that major mode. Use this variable to arbitrarily + map language identifiers to major modes. + +‘org-src-window-setup’ + For specifying Emacs window arrangement when the new edit buffer is + created. + +‘org-src-preserve-indentation’ + Default is ‘nil’. Source code is indented. This indentation + applies during export or tangling, and depending on the context, + may alter leading spaces and tabs. When non-‘nil’, source code is + aligned with the leftmost column. No lines are modified during + export or tangling, which is very useful for white-space sensitive + languages, such as Python. + +‘org-src-ask-before-returning-to-edit-buffer’ + When ‘nil’, Org returns to the edit buffer without further prompts. + The default prompts for a confirmation. + + Set ‘org-src-fontify-natively’ to non-‘nil’ to turn on native code +fontification in the _Org_ buffer. Fontification of code blocks can +give visual separation of text and code on the display page. To further +customize the appearance of ‘org-block’ for specific languages, +customize ‘org-src-block-faces’. The following example shades the +background of regular blocks, and colors source blocks only for Python +and Emacs Lisp languages. + + (require 'color) + (set-face-attribute 'org-block nil :background + (color-darken-name + (face-attribute 'default :background) 3)) + + (setq org-src-block-faces '(("emacs-lisp" (:background "#EEE2FF")) + ("python" (:background "#E5FFB8")))) + + +File: org, Node: Noweb Reference Syntax, Next: Library of Babel, Prev: Editing Source Code, Up: Working with Source Code + +14.10 Noweb Reference Syntax +============================ + +Org supports named blocks in Noweb(1) style syntax: + + <> + + Org can replace the construct with the source code, or the results of +evaluation, of the code block identified as CODE-BLOCK-ID. + + The ‘noweb’ header argument controls expansion of Noweb syntax +references. Expansions occur when source code blocks are evaluated, +tangled, or exported. + +‘no’ + Default. No expansion of Noweb syntax references in the body of + the code when evaluating, tangling, or exporting. + +‘yes’ + Expansion of Noweb syntax references in the body of the code block + when evaluating, tangling, or exporting. + +‘tangle’ + Expansion of Noweb syntax references in the body of the code block + when tangling. No expansion when evaluating or exporting. + +‘no-export’ + Expansion of Noweb syntax references in the body of the code block + when evaluating or tangling. No expansion when exporting. + +‘strip-export’ + Expansion of Noweb syntax references in the body of the code block + when expanding prior to evaluating or tangling. Removes Noweb + syntax references when exporting. + +‘eval’ + Expansion of Noweb syntax references in the body of the code block + only before evaluating. + + In the following example, + + #+NAME: initialization + #+BEGIN_SRC emacs-lisp + (setq sentence "Never a foot too far, even.") + #+END_SRC + + #+BEGIN_SRC emacs-lisp :noweb yes + <> + (reverse sentence) + #+END_SRC + +the second code block is expanded as + + #+BEGIN_SRC emacs-lisp :noweb yes + (setq sentence "Never a foot too far, even.") + (reverse sentence) + #+END_SRC + + Noweb insertions honor prefix characters that appear before the Noweb +syntax reference. This behavior is illustrated in the following +example. Because the ‘<>’ Noweb reference appears behind the +SQL comment syntax, each line of the expanded Noweb reference is +commented. With: + + #+NAME: example + #+BEGIN_SRC text + this is the + multi-line body of example + #+END_SRC + +this code block: + + #+BEGIN_SRC sql :noweb yes + ---<> + #+END_SRC + +expands to: + + #+BEGIN_SRC sql :noweb yes + ---this is the + ---multi-line body of example + #+END_SRC + + Since this change does not affect Noweb replacement text without +newlines in them, inline Noweb references are acceptable. + + This feature can also be used for management of indentation in +exported code snippets. With: + + #+NAME: if-true + #+BEGIN_SRC python :exports none + print('do things when true') + #+end_src + + #+name: if-false + #+begin_src python :exports none + print('do things when false') + #+end_src + +this code block: + + #+begin_src python :noweb yes :results output + if true: + <> + else: + <> + #+end_src + +expands to: + + if true: + print('do things when true') + else: + print('do things when false') + + When expanding Noweb style references, Org concatenates code blocks +by matching the reference name to either the code block name or, if none +is found, to the ‘noweb-ref’ header argument. + + For simple concatenation, set this ‘noweb-ref’ header argument at the +sub-tree or file level. In the example Org file shown next, the body of +the source code in each block is extracted for concatenation to a pure +code file when tangled. + + #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh + <> + #+END_SRC + * the mount point of the fullest disk + :PROPERTIES: + :header-args: :noweb-ref fullest-disk + :END: + + ** query all mounted disks + #+BEGIN_SRC sh + df \ + #+END_SRC + + ** strip the header row + #+BEGIN_SRC sh + |sed '1d' \ + #+END_SRC + + ** output mount point of fullest disk + #+BEGIN_SRC sh + |awk '{if (u < +$5) {u = +$5; m = $6}} END {print m}' + #+END_SRC + + By default a newline separates each noweb reference concatenation. +To change this newline separator, edit the ‘noweb-sep’ header argument. + + Eventually, Org can include the results of a code block rather than +its body. To that effect, append parentheses, possibly including +arguments, to the code block name, as shown below. + + <> + + Note that when using the above approach to a code block’s results, +the code block name set by ‘NAME’ keyword is required; the reference set +by ‘noweb-ref’ does not work in that case. + + Here is an example that demonstrates how the exported content changes +when Noweb style references are used with parentheses versus without. +With: + + #+NAME: some-code + #+BEGIN_SRC python :var num=0 :results output :exports none + print(num*10) + #+END_SRC + +this code block: + + #+BEGIN_SRC text :noweb yes + <> + #+END_SRC + +expands to: + + print(num*10) + + Below, a similar Noweb style reference is used, but with parentheses, +while setting a variable ‘num’ to 10: + + #+BEGIN_SRC text :noweb yes + <> + #+END_SRC + +Note that now the expansion contains the results of the code block +‘some-code’, not the code block itself: + + 100 + + ---------- Footnotes ---------- + + (1) For Noweb literate programming details, see +. + + +File: org, Node: Library of Babel, Next: Key bindings and Useful Functions, Prev: Noweb Reference Syntax, Up: Working with Source Code + +14.11 Library of Babel +====================== + +The “Library of Babel” is a collection of code blocks. Like a function +library, these code blocks can be called from other Org files. A +collection of useful code blocks is available on Worg +(https://orgmode.org/worg/library-of-babel.html). For remote code block +evaluation syntax, see *note Evaluating Code Blocks::. + + For any user to add code to the library, first save the code in +regular code blocks of an Org file, and then load the Org file with +‘org-babel-lob-ingest’, which is bound to ‘C-c C-v i’. + + +File: org, Node: Key bindings and Useful Functions, Next: Batch Execution, Prev: Library of Babel, Up: Working with Source Code + +14.12 Key bindings and Useful Functions +======================================= + +Many common Org mode key sequences are re-bound depending on the +context. + + Active key bindings in code blocks: + +Key binding Function +-------------------------------------------------------- +‘C-c C-c’ ‘org-babel-execute-src-block’ +‘C-c C-o’ ‘org-babel-open-src-block-result’ +‘M-’ ‘org-babel-load-in-session’ +‘M-’ ‘org-babel-pop-to-session’ + + Active key bindings in Org mode buffer: + +Key binding Function +-------------------------------------------------------------------------- +‘C-c C-v p’ or ‘C-c C-v C-p’ ‘org-babel-previous-src-block’ +‘C-c C-v n’ or ‘C-c C-v C-n’ ‘org-babel-next-src-block’ +‘C-c C-v e’ or ‘C-c C-v C-e’ ‘org-babel-execute-maybe’ +‘C-c C-v o’ or ‘C-c C-v C-o’ ‘org-babel-open-src-block-result’ +‘C-c C-v v’ or ‘C-c C-v C-v’ ‘org-babel-expand-src-block’ +‘C-c C-v u’ or ‘C-c C-v C-u’ ‘org-babel-goto-src-block-head’ +‘C-c C-v g’ or ‘C-c C-v C-g’ ‘org-babel-goto-named-src-block’ +‘C-c C-v r’ or ‘C-c C-v C-r’ ‘org-babel-goto-named-result’ +‘C-c C-v b’ or ‘C-c C-v C-b’ ‘org-babel-execute-buffer’ +‘C-c C-v s’ or ‘C-c C-v C-s’ ‘org-babel-execute-subtree’ +‘C-c C-v d’ or ‘C-c C-v C-d’ ‘org-babel-demarcate-block’ +‘C-c C-v t’ or ‘C-c C-v C-t’ ‘org-babel-tangle’ +‘C-c C-v f’ or ‘C-c C-v C-f’ ‘org-babel-tangle-file’ +‘C-c C-v c’ or ‘C-c C-v C-c’ ‘org-babel-check-src-block’ +‘C-c C-v j’ or ‘C-c C-v C-j’ ‘org-babel-insert-header-arg’ +‘C-c C-v l’ or ‘C-c C-v C-l’ ‘org-babel-load-in-session’ +‘C-c C-v i’ or ‘C-c C-v C-i’ ‘org-babel-lob-ingest’ +‘C-c C-v I’ or ‘C-c C-v C-I’ ‘org-babel-view-src-block-info’ +‘C-c C-v z’ or ‘C-c C-v C-z’ ‘org-babel-switch-to-session-with-code’ +‘C-c C-v a’ or ‘C-c C-v C-a’ ‘org-babel-sha1-hash’ +‘C-c C-v h’ or ‘C-c C-v C-h’ ‘org-babel-describe-bindings’ +‘C-c C-v x’ or ‘C-c C-v C-x’ ‘org-babel-do-key-sequence-in-edit-buffer’ + + +File: org, Node: Batch Execution, Prev: Key bindings and Useful Functions, Up: Working with Source Code + +14.13 Batch Execution +===================== + +Org mode features, including working with source code facilities can be +invoked from the command line. This enables building shell scripts for +batch processing, running automated system tasks, and expanding Org +mode’s usefulness. + + The sample script shows batch processing of multiple files using +‘org-babel-tangle’. + + #!/bin/sh + # Tangle files with Org mode + # + emacs -Q --batch --eval " + (progn + (require 'ob-tangle) + (dolist (file command-line-args-left) + (with-current-buffer (find-file-noselect file) + (org-babel-tangle)))) + " "$@" + + +File: org, Node: Miscellaneous, Next: Hacking, Prev: Working with Source Code, Up: Top + +15 Miscellaneous +**************** + +* Menu: + +* Completion:: ‘M-’ guesses completions. +* Structure Templates:: Quick insertion of structural elements. +* Escape Character:: +* Speed Keys:: Electric commands at the beginning of a headline. +* Code Evaluation Security:: Org files evaluate in-line code. +* Customization:: Adapting Org to your taste. +* In-buffer Settings:: Overview of keywords. +* The Very Busy C-c C-c Key:: When in doubt, press ‘C-c C-c’. +* Clean View:: Getting rid of leading stars in the outline. +* TTY Keys:: Using Org on a tty. +* Documentation Access:: Read documentation about current syntax. +* Interaction:: With other Emacs packages. +* Org Crypt:: Encrypting Org files. +* Org Mobile:: Viewing and capture on a mobile device. +* Org Syntax:: Formal description of Org’s syntax. + + +File: org, Node: Completion, Next: Structure Templates, Up: Miscellaneous + +15.1 Completion +=============== + +Org has in-buffer completions. Unlike minibuffer completions, which are +useful for quick command interactions, Org’s in-buffer completions are +more suitable for content creation in Org documents. Type one or more +letters and invoke the hot key to complete the text in-place. Depending +on the context and the keys, Org offers different types of completions. +No minibuffer is involved. Such mode-specific hot keys have become an +integral part of Emacs and Org provides several shortcuts. + +‘M-’ + + Complete word at point. + + • At the beginning of a headline, complete TODO keywords. + + • After ‘\’, complete TeX symbols supported by the exporter. + + • After ‘*’, complete headlines in the current buffer so that + they can be used in search links like: + + [[*find this headline]] + + • After ‘:’ in a headline, complete tags. Org deduces the list + of tags from the ‘TAGS’ in-buffer option (see *note Setting + Tags::), the variable ‘org-tag-alist’, or from all tags used + in the current buffer. + + • After ‘:’ and not in a headline, complete property keys. The + list of keys is constructed dynamically from all keys used in + the current buffer. + + • After ‘[’, complete link abbreviations (see *note Link + Abbreviations::). + + • After ‘#+’, complete the special keywords like ‘TYP_TODO’ or + file-specific ‘OPTIONS’. After option keyword is complete, + pressing ‘M-’ again inserts example settings for this + keyword. + + • After ‘STARTUP’ keyword, complete startup items. + + • When point is anywhere else, complete dictionary words using + Ispell. + + +File: org, Node: Structure Templates, Next: Escape Character, Prev: Completion, Up: Miscellaneous + +15.2 Structure Templates +======================== + +With just a few keystrokes, it is possible to insert empty structural +blocks, such as ‘#+BEGIN_SRC’ ... ‘#+END_SRC’, or to wrap existing text +in such a block. + +‘C-c C-,’ (‘org-insert-structure-template’) + Prompt for a type of block structure, and insert the block at + point. If the region is active, it is wrapped in the block. First + prompts the user for keys, which are used to look up a structure + type from the variable below. If the key is ‘’, ‘’, or + ‘’, the user is prompted to enter a block type. + + Available structure types are defined in +‘org-structure-template-alist’, see the docstring for adding or changing +values. + + Org Tempo expands snippets to structures defined in +‘org-structure-template-alist’ and ‘org-tempo-keywords-alist’. For +example, ‘< s ’ creates a code block. Enable it by customizing +‘org-modules’ or add ‘(require 'org-tempo)’ to your Emacs init file(1). + +‘a’ ‘#+BEGIN_EXPORT ascii’ ... ‘#+END_EXPORT’ +‘c’ ‘#+BEGIN_CENTER’ ... ‘#+END_CENTER’ +‘C’ ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ +‘e’ ‘#+BEGIN_EXAMPLE’ ... ‘#+END_EXAMPLE’ +‘E’ ‘#+BEGIN_EXPORT’ ... ‘#+END_EXPORT’ +‘h’ ‘#+BEGIN_EXPORT html’ ... ‘#+END_EXPORT’ +‘l’ ‘#+BEGIN_EXPORT latex’ ... ‘#+END_EXPORT’ +‘q’ ‘#+BEGIN_QUOTE’ ... ‘#+END_QUOTE’ +‘s’ ‘#+BEGIN_SRC’ ... ‘#+END_SRC’ +‘v’ ‘#+BEGIN_VERSE’ ... ‘#+END_VERSE’ + + ---------- Footnotes ---------- + + (1) For more information, please refer to the commentary section in +‘org-tempo.el’. + + +File: org, Node: Escape Character, Next: Speed Keys, Prev: Structure Templates, Up: Miscellaneous + +15.3 Escape Character +===================== + +You may sometimes want to write text that looks like Org syntax, but +should really read as plain text. Org may use a specific escape +character in some situations, e.g., a backslash in macros (see *note +Macro Replacement::). In the general case, however, we suggest to use +the zero width space. You can get it with one of the following: + + C-x 8 zero width space + C-x 8 200B + + For example, in order to write ‘[[1,2]]’ as-is in your document, you +can write this, where ‘X’ denotes the zero width space character: + + [[X1,2]] + + +File: org, Node: Speed Keys, Next: Code Evaluation Security, Prev: Escape Character, Up: Miscellaneous + +15.4 Speed Keys +=============== + +Single keystrokes can execute custom commands in an Org file when point +is on a headline. Without the extra burden of a meta or modifier key, +Speed Keys can speed navigation or execute custom commands. Besides +faster navigation, Speed Keys may come in handy on small mobile devices +that do not have full keyboards. Speed Keys may also work on TTY +devices known for their problems when entering Emacs key chords. + + By default, Org has Speed Keys disabled. To activate Speed Keys, set +the variable ‘org-use-speed-commands’ to a non-‘nil’ value. To trigger +a Speed Key, point must be at the beginning of an Org headline, before +any of the stars. + + Org comes with a pre-defined list of Speed Keys. To add or modify +Speed Keys, customize the variable, ‘org-speed-commands-user’. For more +details, see the variable’s docstring. With Speed Keys activated, ‘M-x +org-speed-command-help’, or ‘?’ when point is at the beginning of an Org +headline, shows currently active Speed Keys, including the user-defined +ones. + + +File: org, Node: Code Evaluation Security, Next: Customization, Prev: Speed Keys, Up: Miscellaneous + +15.5 Code Evaluation and Security Issues +======================================== + +Unlike plain text, running code comes with risk. Each source code +block, in terms of risk, is equivalent to an executable file. Org +therefore puts a few confirmation prompts by default. This is to alert +the casual user from accidentally running untrusted code. + + For users who do not run code blocks or write code regularly, Org’s +default settings should suffice. However, some users may want to tweak +the prompts for fewer interruptions. To weigh the risks of automatic +execution of code blocks, here are some details about code evaluation. + + Org evaluates code in the following circumstances: + +_Source code blocks_ + Org evaluates source code blocks in an Org file during export. Org + also evaluates a source code block with the ‘C-c C-c’ key chord. + Users exporting or running code blocks must load files only from + trusted sources. Be wary of customizing variables that remove or + alter default security measures. + + -- User Option: org-confirm-babel-evaluate + When ‘t’, Org prompts the user for confirmation before + executing each code block. When ‘nil’, Org executes code + blocks without prompting the user for confirmation. When this + option is set to a custom function, Org invokes the function + with these two arguments: the source code language and the + body of the code block. The custom function must return + either a ‘t’ or ‘nil’, which determines if the user is + prompted. Each source code language can be handled separately + through this function argument. + + For example, here is how to execute ditaa code blocks without + prompting: + + (defun my-org-confirm-babel-evaluate (lang body) + (not (string= lang "ditaa"))) ;don't ask for ditaa + (setq org-confirm-babel-evaluate #'my-org-confirm-babel-evaluate) + +_Following ‘shell’ and ‘elisp’ links_ + Org has two link types that can directly evaluate code (see *note + External Links::). Because such code is not visible, these links + have a potential risk. Org therefore prompts the user when it + encounters such links. The customization variables are: + + -- User Option: org-confirm-shell-link-function + Function that prompts the user before executing a shell link. + + -- User Option: org-confirm-elisp-link-function + Function that prompts the user before executing an Emacs Lisp + link. + +_Formulas in tables_ + Formulas in tables (see *note The Spreadsheet::) are code that is + evaluated either by the Calc interpreter, or by the Emacs Lisp + interpreter. + + +File: org, Node: Customization, Next: In-buffer Settings, Prev: Code Evaluation Security, Up: Miscellaneous + +15.6 Customization +================== + +Org has more than 500 variables for customization. They can be accessed +through the usual ‘M-x org-customize’ command. Or through the Org menu: +Org → Customization → Browse Org Group. + + Org also has per-file settings for some variables (see *note +In-buffer Settings::). + + +File: org, Node: In-buffer Settings, Next: The Very Busy C-c C-c Key, Prev: Customization, Up: Miscellaneous + +15.7 Summary of In-Buffer Settings +================================== + +In-buffer settings start with ‘#+’, followed by a keyword, a colon, and +then a word for each setting. Org accepts multiple settings on the same +line. Org also accepts multiple lines for a keyword. This manual +describes these settings throughout. A summary follows here. + + ‘C-c C-c’ activates any changes to the in-buffer settings. Closing +and reopening the Org file in Emacs also activates the changes. + +‘#+ARCHIVE: %s_done’ + Sets the archive location of the agenda file. The corresponding + variable is ‘org-archive-location’. + +‘#+CATEGORY’ + Sets the category of the agenda file, which applies to the entire + document. + +‘#+COLUMNS: %25ITEM ...’ + Set the default format for columns view. This format applies when + columns view is invoked in locations where no ‘COLUMNS’ property + applies. + +‘#+CONSTANTS: name1=value1 ...’ + Set file-local values for constants that table formulas can use. + This line sets the local variable + ‘org-table-formula-constants-local’. The global version of this + variable is ‘org-table-formula-constants’. + +‘#+FILETAGS: :tag1:tag2:tag3:’ + Set tags that all entries in the file inherit from, including the + top-level entries. + +‘#+LINK: linkword replace’ + Each line specifies one abbreviation for one link. Use multiple + ‘LINK’ keywords for more, see *note Link Abbreviations::. The + corresponding variable is ‘org-link-abbrev-alist’. + +‘#+PRIORITIES: highest lowest default’ + This line sets the limits and the default for the priorities. All + three must be either letters A–Z or numbers 0–9. The highest + priority must have a lower ASCII number than the lowest priority. + +‘#+PROPERTY: Property_Name Value’ + This line sets a default inheritance value for entries in the + current buffer, most useful for specifying the allowed values of a + property. + +‘#+SETUPFILE: file’ + The setup file or a URL pointing to such file is for additional + in-buffer settings. Org loads this file and parses it for any + settings in it only when Org opens the main file. If URL is + specified, the contents are downloaded and stored in a temporary + file cache. ‘C-c C-c’ on the settings line parses and loads the + file, and also resets the temporary file cache. Org also parses + and loads the document during normal exporting process. Org parses + the contents of this document as if it was included in the buffer. + It can be another Org file. To visit the file—not a URL—use ‘C-c + '’ while point is on the line with the file name. + +‘#+STARTUP:’ + Startup options Org uses when first visiting a file. + + The first set of options deals with the initial visibility of the + outline tree. The corresponding variable for global default + settings is ‘org-startup-folded’ with a default value of ‘t’, which + is the same as ‘overview’. + + ‘overview’ + Top-level headlines only. + + ‘content’ + All headlines. + + ‘showall’ + No folding on any entry. + + ‘showeverything’ + Show even drawer contents. + + Dynamic virtual indentation is controlled by the variable + ‘org-startup-indented’(1). + + ‘indent’ + Start with ‘org-indent-mode’ turned on. + + ‘noindent’ + Start with ‘org-indent-mode’ turned off. + + Aligns tables consistently upon visiting a file. The corresponding + variable is ‘org-startup-align-all-tables’ with ‘nil’ as default + value. + + ‘align’ + Align all tables. + + ‘noalign’ + Do not align tables on startup. + + Shrink table columns with a width cookie. The corresponding + variable is ‘org-startup-shrink-all-tables’ with ‘nil’ as default + value. + + When visiting a file, inline images can be automatically displayed. + The corresponding variable is ‘org-startup-with-inline-images’, + with a default value ‘nil’ to avoid delays when visiting a file. + + ‘inlineimages’ + Show inline images. + + ‘noinlineimages’ + Do not show inline images on startup. + + Logging the closing and reopening of TODO items and clock intervals + can be configured using these options (see variables + ‘org-log-done’, ‘org-log-note-clock-out’, and ‘org-log-repeat’). + + ‘logdone’ + Record a timestamp when an item is marked DONE. + + ‘lognotedone’ + Record timestamp and a note when DONE. + + ‘nologdone’ + Do not record when items are marked DONE. + + ‘logrepeat’ + Record a time when reinstating a repeating item. + + ‘lognoterepeat’ + Record a note when reinstating a repeating item. + + ‘nologrepeat’ + Do not record when reinstating repeating item. + + ‘lognoteclock-out’ + Record a note when clocking out. + + ‘nolognoteclock-out’ + Do not record a note when clocking out. + + ‘logreschedule’ + Record a timestamp when scheduling time changes. + + ‘lognotereschedule’ + Record a note when scheduling time changes. + + ‘nologreschedule’ + Do not record when a scheduling date changes. + + ‘logredeadline’ + Record a timestamp when deadline changes. + + ‘lognoteredeadline’ + Record a note when deadline changes. + + ‘nologredeadline’ + Do not record when a deadline date changes. + + ‘logrefile’ + Record a timestamp when refiling. + + ‘lognoterefile’ + Record a note when refiling. + + ‘nologrefile’ + Do not record when refiling. + + Here are the options for hiding leading stars in outline headings, + and for indenting outlines. The corresponding variables are + ‘org-hide-leading-stars’ and ‘org-odd-levels-only’, both with a + default setting ‘nil’ (meaning ‘showstars’ and ‘oddeven’). + + ‘hidestars’ + Make all but one of the stars starting a headline invisible. + + ‘showstars’ + Show all stars starting a headline. + + ‘indent’ + Virtual indentation according to outline level. + + ‘noindent’ + No virtual indentation according to outline level. + + ‘odd’ + Allow only odd outline levels (1, 3, ...). + + ‘oddeven’ + Allow all outline levels. + + To turn on custom format overlays over timestamps (variables + ‘org-put-time-stamp-overlays’ and + ‘org-time-stamp-overlay-formats’), use: + + ‘customtime’ + Overlay custom time format. + + The following options influence the table spreadsheet (variable + ‘constants-unit-system’). + + ‘constcgs’ + ‘constants.el’ should use the c-g-s unit system. + + ‘constSI’ + ‘constants.el’ should use the SI unit system. + + To influence footnote settings, use the following keywords. The + corresponding variables are ‘org-footnote-define-inline’, + ‘org-footnote-auto-label’, and ‘org-footnote-auto-adjust’. + + ‘fninline’ + Define footnotes inline. + + ‘fnnoinline’ + Define footnotes in separate section. + + ‘fnlocal’ + Define footnotes near first reference, but not inline. + + ‘fnprompt’ + Prompt for footnote labels. + + ‘fnauto’ + Create ‘[fn:1]’-like labels automatically (default). + + ‘fnconfirm’ + Offer automatic label for editing or confirmation. + + ‘fnadjust’ + Automatically renumber and sort footnotes. + + ‘nofnadjust’ + Do not renumber and sort automatically. + + To hide blocks on startup, use these keywords. The corresponding + variable is ‘org-hide-block-startup’. + + ‘hideblocks’ + Hide all begin/end blocks on startup. + + ‘nohideblocks’ + Do not hide blocks on startup. + + The display of entities as UTF-8 characters is governed by the + variable ‘org-pretty-entities’ and the keywords + + ‘entitiespretty’ + Show entities as UTF-8 characters where possible. + + ‘entitiesplain’ + Leave entities plain. + +‘#+TAGS: TAG1(c1) TAG2(c2)’ + These lines (several such lines are allowed) specify the valid tags + in this file, and (potentially) the corresponding _fast tag + selection_ keys. The corresponding variable is ‘org-tag-alist’. + +‘#+TODO:’ +‘#+SEQ_TODO:’ +‘#+TYP_TODO:’ + These lines set the TODO keywords and their interpretation in the + current file. The corresponding variable is ‘org-todo-keywords’. + + ---------- Footnotes ---------- + + (1) Note that ‘org-indent-mode’ also sets the ‘wrap-prefix’ property, +such that ‘visual-line-mode’ (or purely setting ‘word-wrap’) wraps long +lines (including headlines) correctly indented. + + +File: org, Node: The Very Busy C-c C-c Key, Next: Clean View, Prev: In-buffer Settings, Up: Miscellaneous + +15.8 The Very Busy ‘C-c C-c’ Key +================================ + +The ‘C-c C-c’ key in Org serves many purposes depending on the context. +It is probably the most over-worked, multi-purpose key combination in +Org. Its uses are well documented throughout this manual, but here is a +consolidated list for easy reference. + + • If any highlights shown in the buffer from the creation of a sparse + tree, or from clock display, remove such highlights. + + • If point is in one of the special ‘KEYWORD’ lines, scan the buffer + for these lines and update the information. Also reset the Org + file cache used to temporary store the contents of URLs used as + values for keywords like ‘SETUPFILE’. + + • If point is inside a table, realign the table. The table realigns + even if automatic table editor is turned off. + + • If point is on a ‘TBLFM’ keyword, re-apply the formulas to the + entire table. + + • If the current buffer is a capture buffer, close the note and file + it. With a prefix argument, also jump to the target location after + saving the note. + + • If point is on a ‘<<>>’, update radio targets and + corresponding links in this buffer. + + • If point is on a property line or at the start or end of a property + drawer, offer property commands. + + • If point is at a footnote reference, go to the corresponding + definition, and _vice versa_. + + • If point is on a statistics cookie, update it. + + • If point is in a plain list item with a checkbox, toggle the status + of the checkbox. + + • If point is on a numbered item in a plain list, renumber the + ordered list. + + • If point is on the ‘#+BEGIN’ line of a dynamic block, the block is + updated. + + • If point is at a timestamp, fix the day name in the timestamp. + + +File: org, Node: Clean View, Next: TTY Keys, Prev: The Very Busy C-c C-c Key, Up: Miscellaneous + +15.9 A Cleaner Outline View +=========================== + +Org’s default outline with stars and no indents can become too cluttered +for short documents. For _book-like_ long documents, the effect is not +as noticeable. Org provides an alternate stars and indentation scheme, +as shown on the right in the following table. It uses only one star and +indents text to line with the heading: + + * Top level headline | * Top level headline + ** Second level | * Second level + *** Third level | * Third level + some text | some text + *** Third level | * Third level + more text | more text + * Another top level headline | * Another top level headline + + To turn this mode on, use the minor mode, ‘org-indent-mode’. Text +lines that are not headlines are prefixed with spaces to vertically +align with the headline text(1). + + To make more horizontal space, the headlines are shifted by two +stars. This can be configured by the ‘org-indent-indentation-per-level’ +variable. Only one star on each headline is visible, the rest are +masked with the same font color as the background. + + Note that turning on ‘org-indent-mode’ sets ‘org-hide-leading-stars’ +to ‘t’ and ‘org-adapt-indentation’ to ‘nil’. + + To globally turn on ‘org-indent-mode’ for all files, customize the +variable ‘org-startup-indented’. + + To turn on indenting for individual files, use ‘STARTUP’ keyword as +follows: + + #+STARTUP: indent + + Indent on startup makes Org use hard spaces to align text with +headings as shown in examples below. + +_Indentation of text below headlines_ + Indent text to align with the headline. + + *** Third level + more text, now indented + + Org supports this with paragraph filling, line wrapping, and + structure editing, preserving or adapting the indentation as + appropriate(2). + +_Hiding leading stars_ + Org can make leading stars invisible. For global preference, + configure the variable ‘org-hide-leading-stars’. For per-file + preference, use these file ‘STARTUP’ options: + + #+STARTUP: hidestars + #+STARTUP: showstars + + With stars hidden, the tree is shown as: + + * Top level headline + * Second level + * Third level + ... + + Because Org makes the font color the same as the background color + to hide to stars, sometimes ‘org-hide’ face may need tweaking to + get the effect right. For some black and white combinations, + ‘grey90’ on a white background might mask the stars better. + +_Odd levels_ + Using stars for only odd levels, 1, 3, 5, ..., can also clean up + the clutter. This removes two stars from each level(3). For Org + to properly handle this cleaner structure during edits and exports, + configure the variable ‘org-odd-levels-only’. To set this + per-file, use either one of the following lines: + + #+STARTUP: odd + #+STARTUP: oddeven + + To switch between single and double stars layouts, use ‘M-x + org-convert-to-odd-levels’ and ‘M-x org-convert-to-oddeven-levels’. + + ---------- Footnotes ---------- + + (1) The ‘org-indent-mode’ also sets the ‘wrap-prefix’ correctly for +indenting and wrapping long lines of headlines or text. This minor mode +handles ‘visual-line-mode’ and directly applied settings through +‘word-wrap’. + + (2) Also see the variable ‘org-adapt-indentation’. + + (3) Because ‘LEVEL=2’ has 3 stars, ‘LEVEL=3’ has 5 stars, and so on. + + +File: org, Node: TTY Keys, Next: Documentation Access, Prev: Clean View, Up: Miscellaneous + +15.10 Using Org on a TTY +======================== + +Org provides alternative key bindings for TTY and modern mobile devices +that cannot perform movement commands on point and key bindings with +modifier keys. Some of these workarounds may be more cumbersome than +necessary. Users should look into customizing these further based on +their usage needs. For example, the normal ‘S-’ for editing +timestamp might be better with ‘C-c .’ chord. + +Default Alternative 1 Speed key Alternative 2 +---------------------------------------------------------------- +‘S-’ ‘C-u ’ ‘C’ +‘M-’ ‘C-c C-x l’ ‘l’ ‘Esc ’ +‘M-S-’ ‘C-c C-x L’ ‘L’ +‘M-’ ‘C-c C-x r’ ‘r’ ‘Esc ’ +‘M-S-’ ‘C-c C-x R’ ‘R’ +‘M-’ ‘C-c C-x u’ ‘Esc ’ +‘M-S-’ ‘C-c C-x U’ ‘U’ +‘M-’ ‘C-c C-x d’ ‘Esc ’ +‘M-S-’ ‘C-c C-x D’ ‘D’ +‘S-’ ‘C-c C-x c’ +‘M-’ ‘C-c C-x m’ ‘Esc ’ +‘M-S-’ ‘C-c C-x M’ +‘S-’ ‘C-c ’ +‘S-’ ‘C-c ’ +‘S-’ ‘C-c ’ +‘S-’ ‘C-c ’ +‘C-S-’ ‘C-c C-x ’ +‘C-S-’ ‘C-c C-x ’ + + +File: org, Node: Documentation Access, Next: Interaction, Prev: TTY Keys, Up: Miscellaneous + +15.11 Context Dependent Documentation +===================================== + +‘C-c C-x I’ in an Org file tries to open a suitable section of the Org +manual depending on the syntax at point. For example, using it on a +headline displays “Document Structure” section. + + ‘q’ closes the Info window. + + +File: org, Node: Interaction, Next: Org Crypt, Prev: Documentation Access, Up: Miscellaneous + +15.12 Interaction with Other Packages +===================================== + +Org’s compatibility and the level of interaction with other Emacs +packages are documented here. + +* Menu: + +* Cooperation:: Packages Org cooperates with. +* Conflicts:: Packages that lead to conflicts. + + +File: org, Node: Cooperation, Next: Conflicts, Up: Interaction + +15.12.1 Packages that Org cooperates with +----------------------------------------- + +‘calc.el’ by Dave Gillespie + + Org uses the Calc package for implementing spreadsheet + functionality in its tables (see *note The Spreadsheet::). Org + also uses Calc for embedded calculations. See *note GNU Emacs Calc + Manual: (calc)Embedded Mode. + +‘constants.el’ by Carsten Dominik + + Org can use names for constants in formulas in tables. Org can + also use calculation suffixes for units, such as ‘M’ for ‘Mega’. + For a standard collection of such constants, install the + ‘constants’ package. Install version 2.0 of this package, + available at . Org checks + if the function ‘constants-get’ has been autoloaded. Installation + instructions are in the file ‘constants.el’. + +‘cdlatex.el’ by Carsten Dominik + + Org mode can make use of the CDLaTeX package to efficiently enter + LaTeX fragments into Org files. See *note CDLaTeX mode::. + +‘imenu.el’ by Ake Stenhoff and Lars Lindberg + + Imenu creates dynamic menus based on an index of items in a file. + Org mode supports Imenu menus. Enable it with a mode hook as + follows: + + (add-hook 'org-mode-hook + (lambda () (imenu-add-to-menubar "Imenu"))) + + By default the index is two levels deep—you can modify the depth + using the option ‘org-imenu-depth’. + +‘speedbar.el’ by Eric M. Ludlam + + Speedbar package creates a special Emacs frame for displaying files + and index items in files. Org mode supports Speedbar; users can + drill into Org files directly from the Speedbar. The ‘<’ in the + Speedbar frame tweaks the agenda commands to that file or to a + subtree. + +‘table.el’ by Takaaki Ota + + Complex ASCII tables with automatic line wrapping, column- and + row-spanning, and alignment can be created using the Emacs table + package by Takaaki Ota. Org mode recognizes such tables and + exports them properly. ‘C-c '’ to edit these tables in a special + buffer, much like Org’s code blocks. Because of interference with + other Org mode functionality, Takaaki Ota tables cannot be edited + directly in the Org buffer. + + ‘C-c '’ (‘org-edit-special’) + Edit a ‘table.el’ table. Works when point is in a ‘table.el’ + table. + + ‘C-c ~​’ (‘org-table-create-with-table.el’) + Insert a ‘table.el’ table. If there is already a table at + point, this command converts it between the ‘table.el’ format + and the Org mode format. See the documentation string of the + command ‘org-convert-table’ for the restrictions under which + this is possible. + + +File: org, Node: Conflicts, Prev: Cooperation, Up: Interaction + +15.12.2 Packages that conflict with Org mode +-------------------------------------------- + +In Emacs, ‘shift-selection-mode’ combines motions of point with shift +key to enlarge regions. Emacs sets this mode by default. This +conflicts with Org’s use of ‘S-’ commands to change timestamps, +TODO keywords, priorities, and item bullet types, etc. Since +‘S-’ commands outside of specific contexts do not do anything, +Org offers the variable ‘org-support-shift-select’ for customization. +Org mode accommodates shift selection by (i) making it available outside +of the special contexts where special commands apply, and (ii) extending +an existing active region even if point moves across a special context. + +‘cua.el’ by Kim F. Storm + Org key bindings conflict with ‘S-’ keys used by CUA mode. + For Org to relinquish these bindings to CUA mode, configure the + variable ‘org-replace-disputed-keys’. When set, Org moves the + following key bindings in Org files, and in the agenda buffer—but + not during date selection. + + ‘S-’ ⇒ ‘M-p’ ‘S-’ ⇒ ‘M-n’ + ‘S-’ ⇒ ‘M--’ ‘S-’ ⇒ ‘M-+’ + ‘C-S-’ ⇒ ‘M-S--’ ‘C-S-’ ⇒ ‘M-S-+’ + + Yes, these are unfortunately more difficult to remember. If you + want to have other replacement keys, look at the variable + ‘org-disputed-keys’. + +‘ecomplete.el’ by Lars Magne Ingebrigtsen + Ecomplete provides “electric” address completion in address header + lines in message buffers. Sadly Orgtbl mode cuts Ecomplete’s power + supply: no completion happens when Orgtbl mode is enabled in + message buffers while entering text in address header lines. If + one wants to use ecomplete one should _not_ follow the advice to + automagically turn on Orgtbl mode in message buffers (see *note + Orgtbl Mode::), but instead—after filling in the message + headers—turn on Orgtbl mode manually when needed in the messages + body. + +‘filladapt.el’ by Kyle Jones + Org mode tries to do the right thing when filling paragraphs, list + items and other elements. Many users reported problems using both + ‘filladapt.el’ and Org mode, so a safe thing to do is to disable + filladapt like this: + + (add-hook 'org-mode-hook 'turn-off-filladapt-mode) + +‘viper.el’ by Michael Kifer + + Viper uses ‘C-c /’ and therefore makes this key not access the + corresponding Org mode command ‘org-sparse-tree’. You need to find + another key for this command, or override the key in + ‘viper-vi-global-user-map’ with + + (define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree) + +‘windmove.el’ by Hovav Shacham + + This package also uses the ‘S-’ keys, so everything written + in the paragraph above about CUA mode also applies here. If you + want to make the windmove function active in locations where Org + mode does not have special functionality on ‘S-’, add this + to your configuration: + + ;; Make windmove work in Org mode: + (add-hook 'org-shiftup-final-hook 'windmove-up) + (add-hook 'org-shiftleft-final-hook 'windmove-left) + (add-hook 'org-shiftdown-final-hook 'windmove-down) + (add-hook 'org-shiftright-final-hook 'windmove-right) + +‘yasnippet.el’ + The way Org mode binds the ‘’ key (binding to ‘[tab]’ instead + of ‘"\t"’) overrules YASnippet’s access to this key. The following + code fixed this problem: + + (add-hook 'org-mode-hook + (lambda () + (setq-local yas/trigger-key [tab]) + (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand))) + + The latest version of YASnippet does not play well with Org mode. + If the above code does not fix the conflict, start by defining the + following function: + + (defun yas/org-very-safe-expand () + (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) + + Then, tell Org mode to use that function: + + (add-hook 'org-mode-hook + (lambda () + (make-variable-buffer-local 'yas/trigger-key) + (setq yas/trigger-key [tab]) + (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) + (define-key yas/keymap [tab] 'yas/next-field))) + + +File: org, Node: Org Crypt, Next: Org Mobile, Prev: Interaction, Up: Miscellaneous + +15.13 Org Crypt +=============== + +Org Crypt encrypts the text of an entry, but not the headline, or +properties. Behind the scene, it uses the Emacs EasyPG library to +encrypt and decrypt files. + + Any text below a headline that has a ‘crypt’ tag is automatically +encrypted when the file is saved. To use a different tag, customize the +‘org-crypt-tag-matcher’ setting. + + Here is a suggestion for Org Crypt settings in Emacs init file: + + (require 'org-crypt) + (org-crypt-use-before-save-magic) + (setq org-tags-exclude-from-inheritance '("crypt")) + + (setq org-crypt-key nil) + ;; GPG key to use for encryption + ;; Either the Key ID or set to nil to use symmetric encryption. + + (setq auto-save-default nil) + ;; Auto-saving does not cooperate with org-crypt.el: so you need to + ;; turn it off if you plan to use org-crypt.el quite often. Otherwise, + ;; you'll get an (annoying) message each time you start Org. + + ;; To turn it off only locally, you can insert this: + ;; + ;; # -*- buffer-auto-save-file-name: nil; -*- + + It’s possible to use different keys for different headings by +specifying the respective key as property ‘CRYPTKEY’, e.g.: + + * Totally secret :crypt: + :PROPERTIES: + :CRYPTKEY: 0x0123456789012345678901234567890123456789 + :END: + + Excluding the ‘crypt’ tag from inheritance prevents already encrypted +text from being encrypted again. + + +File: org, Node: Org Mobile, Next: Org Syntax, Prev: Org Crypt, Up: Miscellaneous + +15.14 Org Mobile +================ + +Org Mobile is a protocol for synchronizing Org files between Emacs and +other applications, e.g., on mobile devices. It enables offline-views +and capture support for an Org mode system that is rooted on a “real” +computer. The external application can also record changes to existing +entries. + + This appendix describes Org’s support for agenda view formats +compatible with Org Mobile. It also describes synchronizing changes, +such as to notes, between the mobile application and the computer. + + To change tags and TODO states in the mobile application, first +customize the variables ‘org-todo-keywords’ and ‘org-tag-alist’. These +should cover all the important tags and TODO keywords, even if Org files +use only some of them. Though the mobile application is expected to +support in-buffer settings, it is required to understand TODO states +_sets_ (see *note Per-file keywords::) and _mutually exclusive_ tags +(see *note Setting Tags::) only for those set in these variables. + +* Menu: + +* Setting up the staging area:: For the mobile device. +* Pushing to the mobile application:: Uploading Org files and agendas. +* Pulling from the mobile application:: Integrating captured and flagged items. + + +File: org, Node: Setting up the staging area, Next: Pushing to the mobile application, Up: Org Mobile + +15.14.1 Setting up the staging area +----------------------------------- + +The mobile application needs access to a file directory on a server(1) +to interact with Emacs. Pass its location through the +‘org-mobile-directory’ variable. If you can mount that directory +locally just set the variable to point to that directory: + + (setq org-mobile-directory "~/orgmobile/") + + Alternatively, by using TRAMP (see *note TRAMP User Manual: +(tramp)Top.), ‘org-mobile-directory’ may point to a remote directory +accessible through, for example, SSH, SCP, or DAVS: + + (setq org-mobile-directory "/davs:user@remote.host:/org/webdav/") + + With a public server, consider encrypting the files. Org also +requires OpenSSL installed on the local computer. To turn on +encryption, set the same password in the mobile application and in +Emacs. Set the password in the variable ‘org-mobile-use-encryption’(2). +Note that even after the mobile application encrypts the file contents, +the file name remains visible on the file systems of the local computer, +the server, and the mobile device. + + ---------- Footnotes ---------- + + (1) For a server to host files, consider using a WebDAV server, such +as Nextcloud (https://nextcloud.com). Additional help is at this FAQ +entry (https://orgmode.org/worg/org-faq.html#mobileorg_webdav). + + (2) If Emacs is configured for safe storing of passwords, then +configure the variable ‘org-mobile-encryption-password’; please read the +docstring of that variable. + + +File: org, Node: Pushing to the mobile application, Next: Pulling from the mobile application, Prev: Setting up the staging area, Up: Org Mobile + +15.14.2 Pushing to the mobile application +----------------------------------------- + +The command ‘org-mobile-push’ copies files listed in ‘org-mobile-files’ +into the staging area. Files include agenda files (as listed in +‘org-agenda-files’). Customize ‘org-mobile-files’ to add other files. +File names are staged with paths relative to ‘org-directory’, so all +files should be inside this directory(1). + + Push creates a special Org file ‘agendas.org’ with custom agenda +views defined by the user(2). + + Finally, Org writes the file ‘index.org’, containing links to other +files. The mobile application reads this file first from the server to +determine what other files to download for agendas. For faster +downloads, it is expected to only read files whose checksums(3) have +changed. + + ---------- Footnotes ---------- + + (1) Symbolic links in ‘org-directory’ need to have the same name as +their targets. + + (2) While creating the agendas, Org mode forces ‘ID’ properties on +all referenced entries, so that these entries can be uniquely identified +if Org Mobile flags them for further action. To avoid setting +properties configure the variable ‘org-mobile-force-id-on-agenda-items’ +to ‘nil’. Org mode then relies on outline paths, assuming they are +unique. + + (3) Checksums are stored automatically in the file ‘checksums.dat’. + + +File: org, Node: Pulling from the mobile application, Prev: Pushing to the mobile application, Up: Org Mobile + +15.14.3 Pulling from the mobile application +------------------------------------------- + +The command ‘org-mobile-pull’ synchronizes changes with the server. +More specifically, it first pulls the Org files for viewing. It then +appends captured entries and pointers to flagged or changed entries to +the file ‘mobileorg.org’ on the server. Org ultimately integrates its +data in an inbox file format, through the following steps: + + 1. Org moves all entries found in ‘mobileorg.org’(1) and appends them + to the file pointed to by the variable ‘org-mobile-inbox-for-pull’. + It should reside neither in the staging area nor on the server. + Each captured entry and each editing event is a top-level entry in + the inbox file. + + 2. After moving the entries, Org processes changes to the shared + files. Some of them are applied directly and without user + interaction. Examples include changes to tags, TODO state, + headline and body text. Entries requiring further action are + tagged as ‘FLAGGED’. Org marks entries with problems with an error + message in the inbox. They have to be resolved manually. + + 3. Org generates an agenda view for flagged entries for user + intervention to clean up. For notes stored in flagged entries, Org + displays them in the echo area when point is on the corresponding + agenda item. + + ‘?’ + Pressing ‘?’ displays the entire flagged note in another + window. Org also pushes it to the kill ring. To store + flagged note as a normal note, use ‘? z C-y C-c C-c’. + Pressing ‘?’ twice does these things: first it removes the + ‘FLAGGED’ tag; second, it removes the flagged note from the + property drawer; third, it signals that manual editing of the + flagged entry is now finished. + + From the agenda dispatcher, ‘?’ returns to the view to finish +processing flagged entries. Note that these entries may not be the most +recent since the mobile application searches files that were last +pulled. To get an updated agenda view with changes since the last pull, +pull again. + + ---------- Footnotes ---------- + + (1) The file will be empty after this operation. + + +File: org, Node: Org Syntax, Prev: Org Mobile, Up: Miscellaneous + +15.15 Org Syntax +================ + +A reference document providing a formal description of Org’s syntax is +available as a draft on Worg +(https://orgmode.org/worg/dev/org-syntax.html), written and maintained +by Nicolas Goaziou. It defines Org’s core internal concepts such as +“headlines”, “sections”, “affiliated keywords”, “(greater) elements” and +“objects”. Each part of an Org document belongs to one of the previous +categories. + + To explore the abstract structure of an Org buffer, run this in a +buffer: + + M-: (org-element-parse-buffer) + +It outputs a list containing the buffer’s content represented as an +abstract structure. The export engine relies on the information stored +in this list. Most interactive commands—e.g., for structure +editing—also rely on the syntactic meaning of the surrounding context. + + You can probe the syntax of your documents with the command + + M-x org-lint + +It runs a number of checks to find common mistakes. It then displays +their location in a dedicated buffer, along with a description and a +“trust level”, since false-positive are possible. From there, you can +operate on the reports with the following keys: + +‘C-j’, ‘’ Display the offending line +‘’ Move point to the offending line +‘g’ Check the document again +‘h’ Hide all reports from the same checker +‘i’ Also remove them from all subsequent checks +‘S’ Sort reports by the column at point + + +File: org, Node: Hacking, Next: History and Acknowledgments, Prev: Miscellaneous, Up: Top + +Appendix A Hacking +****************** + +This appendix describes some ways a user can extend the functionality of +Org. + +* Menu: + +* Hooks: Hooks (2). How to reach into Org’s internals. +* Add-on Packages:: Available extensions. +* Adding Hyperlink Types:: New custom link types. +* Adding Export Back-ends:: How to write new export back-ends. +* Tables in Arbitrary Syntax:: Orgtbl for LaTeX and other programs. +* Dynamic Blocks:: Automatically filled blocks. +* Special Agenda Views:: Customized views. +* Speeding Up Your Agendas:: Tips on how to speed up your agendas. +* Extracting Agenda Information:: Post-processing agenda information. +* Using the Property API:: Writing programs that use entry properties. +* Using the Mapping API:: Mapping over all or selected entries. + + +File: org, Node: Hooks (2), Next: Add-on Packages, Up: Hacking + +A.1 Hooks +========= + +Org has a large number of hook variables for adding functionality. This +appendix illustrates using a few. A complete list of hooks with +documentation is maintained by the Worg project at +. + + +File: org, Node: Add-on Packages, Next: Adding Hyperlink Types, Prev: Hooks (2), Up: Hacking + +A.2 Add-on Packages +=================== + +Various authors wrote a large number of add-on packages for Org. + + These packages are not part of Emacs, but they are distributed as +contributed packages with the separate release available at +. See the ‘contrib/README’ file in the source code +directory for a list of contributed files. Worg page with more +information is at: . + + +File: org, Node: Adding Hyperlink Types, Next: Adding Export Back-ends, Prev: Add-on Packages, Up: Hacking + +A.3 Adding Hyperlink Types +========================== + +Org has many built-in hyperlink types (see *note Hyperlinks::), and an +interface for adding new link types. The following example shows the +process of adding Org links to Unix man pages, which look like this + + [[man:printf][The printf manual]] + +The following ‘org-man.el’ file implements it + + ;;; org-man.el - Support for links to man pages in Org mode + (require 'org) + + (org-link-set-parameters "man" + :follow org-man-command + :export #'org-man-export + :store #'org-man-store-link) + + (defcustom org-man-command 'man + "The Emacs command to be used to display a man page." + :group 'org-link + :type '(choice (const man) (const woman))) + + (defun org-man-store-link () + "Store a link to a man page." + (when (memq major-mode '(Man-mode woman-mode)) + ;; This is a man page, we do make this link. + (let* ((page (org-man-get-page-name)) + (link (concat "man:" page)) + (description (format "Man page for %s" page))) + (org-store-link-props + :type "man" + :link link + :description description)))) + + (defun org-man-get-page-name () + "Extract the page name from the buffer name." + ;; This works for both `Man-mode' and `woman-mode'. + (if (string-match " \\(\\S-+\\)\\*" (buffer-name)) + (match-string 1 (buffer-name)) + (error "Cannot create link to this man page"))) + + (defun org-man-export (link description format) + "Export a man page link from Org files." + (let ((path (format "http://man.he.net/?topic=%s§ion=all" link)) + (desc (or description link))) + (pcase format + (`html (format "%s" path desc)) + (`latex (format "\\href{%s}{%s}" path desc)) + (`texinfo (format "@uref{%s,%s}" path desc)) + (`ascii (format "%s (%s)" desc path)) + (t path)))) + + (provide 'org-man) + ;;; org-man.el ends here + +To activate links to man pages in Org, enter this in the Emacs init +file: + + (require 'org-man) + +A review of ‘org-man.el’: + + 1. First, ‘(require 'org)’ ensures ‘org.el’ is loaded. + + 2. Then ‘org-link-set-parameters’ defines a new link type with ‘man’ + prefix and associates functions for following, exporting and + storing such links. See the variable ‘org-link-parameters’ for a + complete list of possible associations. + + 3. The rest of the file implements necessary variables and functions. + + For example, ‘org-man-store-link’ is responsible for storing a link + when ‘org-store-link’ (see *note Handling Links::) is called from a + buffer displaying a man page. It first checks if the ‘major-mode’ + is appropriate. If check fails, the function returns ‘nil’, which + means it isn’t responsible for creating a link to the current + buffer. Otherwise the function makes a link string by combining + the ‘man:’ prefix with the man topic. It also provides a default + description. The function ‘org-insert-link’ can insert it back + into an Org buffer later on. + + +File: org, Node: Adding Export Back-ends, Next: Tables in Arbitrary Syntax, Prev: Adding Hyperlink Types, Up: Hacking + +A.4 Adding Export Back-ends +=========================== + +Org’s export engine makes it easy for writing new back-ends. The +framework on which the engine was built makes it easy to derive new +back-ends from existing ones. + + The two main entry points to the export engine are: +‘org-export-define-backend’ and ‘org-export-define-derived-backend’. To +grok these functions, see ‘ox-latex.el’ for an example of defining a new +back-end from scratch, and ‘ox-beamer.el’ for an example of deriving +from an existing engine. + + For creating a new back-end from scratch, first set its name as a +symbol in an alist consisting of elements and export functions. To make +the back-end visible to the export dispatcher, set ‘:menu-entry’ +keyword. For export options specific to this back-end, set the +‘:options-alist’. + + For creating a new back-end from an existing one, set +‘:translate-alist’ to an alist of export functions. This alist replaces +the parent back-end functions. + + For complete documentation, see the Org Export Reference on Worg +(https://orgmode.org/worg/dev/org-export-reference.html). + + +File: org, Node: Tables in Arbitrary Syntax, Next: Dynamic Blocks, Prev: Adding Export Back-ends, Up: Hacking + +A.5 Tables in Arbitrary Syntax +============================== + +Due to Org’s success in handling tables with Orgtbl, a frequently +requested feature is the use of Org’s table functions in other modes, +e.g., LaTeX. This would be hard to do in a general way without +complicated customization nightmares. Moreover, that would take Org +away from its simplicity roots that Orgtbl has proven. There is, +however, an alternate approach to accomplishing the same. + + This approach involves implementing a custom _translate_ function +that operates on a native Org _source table_ to produce a table in +another format. This strategy would keep the excellently working Orgtbl +simple and isolate complications, if any, confined to the translate +function. To add more alien table formats, we just add more translate +functions. Also the burden of developing custom translate functions for +new table formats is in the hands of those who know those formats best. + +* Menu: + +* Radio tables:: Sending and receiving radio tables. +* A LaTeX example:: Step by step, almost a tutorial. +* Translator functions:: Copy and modify. + + +File: org, Node: Radio tables, Next: A LaTeX example, Up: Tables in Arbitrary Syntax + +A.5.1 Radio tables +------------------ + +Radio tables are target locations for translated tables that are not +near their source. Org finds the target location and inserts the +translated table. + + The key to finding the target location is the magic words ‘BEGIN/END +RECEIVE ORGTBL’. They have to appear as comments in the current mode. +If the mode is C, then: + + /* BEGIN RECEIVE ORGTBL table_name */ + /* END RECEIVE ORGTBL table_name */ + + At the location of source, Org needs a special line to direct Orgtbl +to translate and to find the target for inserting the translated table. +For example: + + #+ORGTBL: SEND table_name translation_function arguments ... + +‘table_name’ is the table’s reference name, which is also used in the +receiver lines, and the ‘translation_function’ is the Lisp function that +translates. This line, in addition, may also contain alternating key +and value arguments at the end. The translation function gets these +values as a property list. A few standard parameters are already +recognized and acted upon before the translation function is called: + +‘:skip N’ + Skip the first N lines of the table. Hlines do count; include them + if they are to be skipped. + +‘:skipcols (n1 n2 ...)’ + List of columns to be skipped. First Org automatically discards + columns with calculation marks and then sends the table to the + translator function, which then skips columns as specified in + ‘skipcols’. + + To keep the source table intact in the buffer without being disturbed +when the source file is compiled or otherwise being worked on, use one +of these strategies: + + • Place the table in a block comment. For example, in C mode you + could wrap the table between ‘/*’ and ‘*/’ lines. + + • Put the table after an “end” statement. For example ‘\bye’ in TeX + and ‘\end{document}’ in LaTeX. + + • Comment and un-comment each line of the table during edits. The + ‘M-x orgtbl-toggle-comment’ command makes toggling easy. + + +File: org, Node: A LaTeX example, Next: Translator functions, Prev: Radio tables, Up: Tables in Arbitrary Syntax + +A.5.2 A LaTeX example of radio tables +------------------------------------- + +To wrap a source table in LaTeX, use the ‘comment’ environment provided +by ‘comment.sty’(1). To activate it, put ‘\usepackage{comment}’ in the +document header. Orgtbl mode inserts a radio table skeleton(2) with the +command ‘M-x orgtbl-insert-radio-table’, which prompts for a table name. +For example, if ‘salesfigures’ is the name, the template inserts: + + % BEGIN RECEIVE ORGTBL salesfigures + % END RECEIVE ORGTBL salesfigures + \begin{comment} + #+ORGTBL: SEND salesfigures orgtbl-to-latex + | | | + \end{comment} + +The line ‘#+ORGTBL: SEND’ tells Orgtbl mode to use the function +‘orgtbl-to-latex’ to convert the table to LaTeX format, then insert the +table at the target (receive) location named ‘salesfigures’. Now the +table is ready for data entry. It can even use spreadsheet features(3): + + % BEGIN RECEIVE ORGTBL salesfigures + % END RECEIVE ORGTBL salesfigures + \begin{comment} + #+ORGTBL: SEND salesfigures orgtbl-to-latex + | Month | Days | Nr sold | per day | + |-------+------+---------+---------| + | Jan | 23 | 55 | 2.4 | + | Feb | 21 | 16 | 0.8 | + | March | 22 | 278 | 12.6 | + #+TBLFM: $4=$3/$2;%.1f + % $ (optional extra dollar to keep Font Lock happy, see footnote) + \end{comment} + + After editing, ‘C-c C-c’ inserts the translated table at the target +location, between the two marker lines. + + For hand-made custom tables, note that the translator needs to skip +the first two lines of the source table. Also the command has to +_splice_ out the target table without the header and footer. + + \begin{tabular}{lrrr} + Month & \multicolumn{1}{c}{Days} & Nr.\ sold & per day\\ + % BEGIN RECEIVE ORGTBL salesfigures + % END RECEIVE ORGTBL salesfigures + \end{tabular} + % + \begin{comment} + #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 + | Month | Days | Nr sold | per day | + |-------+------+---------+---------| + | Jan | 23 | 55 | 2.4 | + | Feb | 21 | 16 | 0.8 | + | March | 22 | 278 | 12.6 | + #+TBLFM: $4=$3/$2;%.1f + \end{comment} + + The LaTeX translator function ‘orgtbl-to-latex’ is already part of +Orgtbl mode and uses a ‘tabular’ environment to typeset the table and +marks horizontal lines with ‘\hline’. For additional parameters to +control output, see *note Translator functions::: + +‘:splice BOOLEAN’ + When {{{var(BOOLEAN}}} is non-‘nil’, return only table body lines; + i.e., not wrapped in ‘tabular’ environment. Default is ‘nil’. + +‘:fmt FMT’ + Format string to warp each field. It should contain ‘%s’ for the + original field value. For example, to wrap each field value in + dollar symbol, you could use ‘:fmt "$%s$"’. Format can also wrap a + property list with column numbers and formats, for example ‘:fmt (2 + "$%s$" 4 "%s\\%%")’. In place of a string, a function of one + argument can be used; the function must return a formatted string. + +‘:efmt EFMT’ + Format numbers as exponentials. The spec should have ‘%s’ twice + for inserting mantissa and exponent, for example + ‘"%s\\times10^{%s}"’. This may also be a property list with column + numbers and formats, for example ‘:efmt (2 "$%s\\times10^{%s}$" 4 + "$%s\\cdot10^{%s}$")’. After EFMT has been applied to a value, + FMT—see above—is also applied. Functions with two arguments can be + supplied instead of strings. By default, no special formatting is + applied. + + ---------- Footnotes ---------- + + (1) + + (2) By default this works only for LaTeX, HTML, and Texinfo. +Configure the variable ‘orgtbl-radio-table-templates’ to install +templates for other modes. + + (3) If the ‘TBLFM’ keyword contains an odd number of dollar +characters, this may cause problems with Font Lock in LaTeX mode. As +shown in the example you can fix this by adding an extra line inside the +‘comment’ environment that is used to balance the dollar expressions. +If you are using AUCTeX with the font-latex library, a much better +solution is to add the ‘comment’ environment to the variable +‘LaTeX-verbatim-environments’. + + +File: org, Node: Translator functions, Prev: A LaTeX example, Up: Tables in Arbitrary Syntax + +A.5.3 Translator functions +-------------------------- + +Orgtbl mode has built-in translator functions: ‘orgtbl-to-csv’ +(comma-separated values), ‘orgtbl-to-tsv’ (TAB-separated values), +‘orgtbl-to-latex’, ‘orgtbl-to-html’, ‘orgtbl-to-texinfo’, +‘orgtbl-to-unicode’ and ‘orgtbl-to-orgtbl’. They use the generic +translator, ‘orgtbl-to-generic’, which delegates translations to various +export back-ends. + + Properties passed to the function through the ‘ORGTBL SEND’ line take +precedence over properties defined inside the function. For example, +this overrides the default LaTeX line endings, ‘\\’, with ‘\\[2mm]’: + + #+ORGTBL: SEND test orgtbl-to-latex :lend " \\\\[2mm]" + + For a new language translator, define a converter function. It can +be a generic function, such as shown in this example. It marks a +beginning and ending of a table with ‘!BTBL!’ and ‘!ETBL!’; a beginning +and ending of lines with ‘!BL!’ and ‘!EL!’; and uses a TAB for a field +separator: + + (defun orgtbl-to-language (table params) + "Convert the orgtbl-mode TABLE to language." + (orgtbl-to-generic + table + (org-combine-plists + '(:tstart "!BTBL!" :tend "!ETBL!" :lstart "!BL!" :lend "!EL!" :sep "\t") + params))) + +The documentation for the ‘orgtbl-to-generic’ function shows a complete +list of parameters, each of which can be passed through to +‘orgtbl-to-latex’, ‘orgtbl-to-texinfo’, and any other function using +that generic function. + + For complicated translations the generic translator function could be +replaced by a custom translator function. Such a custom function must +take two arguments and return a single string containing the formatted +table. The first argument is the table whose lines are a list of fields +or the symbol ‘hline’. The second argument is the property list +consisting of parameters specified in the ‘#+ORGTBL: SEND’ line. Please +share your translator functions by posting them to the Org users mailing +list, at . + + +File: org, Node: Dynamic Blocks, Next: Special Agenda Views, Prev: Tables in Arbitrary Syntax, Up: Hacking + +A.6 Dynamic Blocks +================== + +Org supports _dynamic blocks_ in Org documents. They are inserted with +begin and end markers like any other code block, but the contents are +updated automatically by a user function. For example, ‘C-c C-x C-r’ +inserts a dynamic table that updates the work time (see *note Clocking +Work Time::). + + Dynamic blocks can have names and function parameters. The syntax is +similar to source code block specifications: + + #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ... + ... + #+END: + + These commands update dynamic blocks: + +‘C-c C-x C-u’ (‘org-dblock-update’) + Update dynamic block at point. + +‘C-u C-c C-x C-u’ + Update all dynamic blocks in the current file. + + Before updating a dynamic block, Org removes content between the +‘BEGIN’ and ‘END’ markers. Org then reads the parameters on the ‘BEGIN’ +line for passing to the writer function. If the function expects to +access the removed content, then Org expects an extra parameter, +‘:content’, on the ‘BEGIN’ line. + + The syntax for naming a writer function with a dynamic block labelled +‘myblock’ is: ‘org-dblock-write:myblock’. Parameters come from the +‘BEGIN’ line. + + The following is an example of a dynamic block and a block writer +function that updates the time when the function was last run: + + #+BEGIN: block-update-time :format "on %m/%d/%Y at %H:%M" + ... + #+END: + +The dynamic block’s writer function: + + (defun org-dblock-write:block-update-time (params) + (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) + (insert "Last block update at: " + (format-time-string fmt)))) + + To keep dynamic blocks up-to-date in an Org file, use the function, +‘org-update-all-dblocks’ in hook, such as ‘before-save-hook’. The +‘org-update-all-dblocks’ function does not run if the file is not in Org +mode. + + Dynamic blocks, like any other block, can be narrowed with +‘org-narrow-to-block’. + + +File: org, Node: Special Agenda Views, Next: Speeding Up Your Agendas, Prev: Dynamic Blocks, Up: Hacking + +A.7 Special Agenda Views +======================== + +Org provides a special hook to further limit items in agenda views: +‘agenda’, ‘agenda*’(1), ‘todo’, ‘alltodo’, ‘tags’, ‘tags-todo’, +‘tags-tree’. Specify a custom function that tests inclusion of every +matched item in the view. This function can also skip as much as is +needed. + + For a global condition applicable to agenda views, use the +‘org-agenda-skip-function-global’ variable. Org uses a global condition +with ‘org-agenda-skip-function’ for custom searching. + + This example defines a function for a custom view showing TODO items +with ‘waiting’ status. Manually this is a multi-step search process, +but with a custom view, this can be automated as follows: + + The custom function searches the subtree for the ‘waiting’ tag and +returns ‘nil’ on match. Otherwise it gives the location from where the +search continues. + + (defun my-skip-unless-waiting () + "Skip trees that are not waiting" + (let ((subtree-end (save-excursion (org-end-of-subtree t)))) + (if (re-search-forward ":waiting:" subtree-end t) + nil ; tag found, do not skip + subtree-end))) ; tag not found, continue after end of subtree + + To use this custom function in a custom agenda command: + + (org-add-agenda-custom-command + '("b" todo "PROJECT" + ((org-agenda-skip-function 'my-skip-unless-waiting) + (org-agenda-overriding-header "Projects waiting for something: ")))) + + Note that this also binds ‘org-agenda-overriding-header’ to a more +meaningful string suitable for the agenda view. + + Search for entries with a limit set on levels for the custom search. +This is a general approach to creating custom searches in Org. To +include all levels, use ‘LEVEL>0’(2). Then to selectively pick the +matched entries, use ‘org-agenda-skip-function’, which also accepts Lisp +forms, such as ‘org-agenda-skip-entry-if’ and +‘org-agenda-skip-subtree-if’. For example: + +‘(org-agenda-skip-entry-if 'scheduled)’ + Skip current entry if it has been scheduled. + +‘(org-agenda-skip-entry-if 'notscheduled)’ + Skip current entry if it has not been scheduled. + +‘(org-agenda-skip-entry-if 'deadline)’ + Skip current entry if it has a deadline. + +‘(org-agenda-skip-entry-if 'scheduled 'deadline)’ + Skip current entry if it has a deadline, or if it is scheduled. + +‘(org-agenda-skip-entry-if 'todo '("TODO" "WAITING"))’ + Skip current entry if the TODO keyword is TODO or WAITING. + +‘(org-agenda-skip-entry-if 'todo 'done)’ + Skip current entry if the TODO keyword marks a DONE state. + +‘(org-agenda-skip-entry-if 'timestamp)’ + Skip current entry if it has any timestamp, may also be deadline or + scheduled. + +‘(org-agenda-skip-entry-if 'regexp "regular expression")’ + Skip current entry if the regular expression matches in the entry. + +‘(org-agenda-skip-entry-if 'notregexp "regular expression")’ + Skip current entry unless the regular expression matches. + +‘(org-agenda-skip-subtree-if 'regexp "regular expression")’ + Same as above, but check and skip the entire subtree. + + The following is an example of a search for ‘waiting’ without the +special function: + + (org-add-agenda-custom-command + '("b" todo "PROJECT" + ((org-agenda-skip-function '(org-agenda-skip-subtree-if + 'regexp ":waiting:")) + (org-agenda-overriding-header "Projects waiting for something: ")))) + + ---------- Footnotes ---------- + + (1) The ‘agenda*’ view is the same as ‘agenda’ except that it only +considers _appointments_, i.e., scheduled and deadline items that have a +time specification ‘[h]h:mm’ in their time-stamps. + + (2) Note that, for ‘org-odd-levels-only’, a level number corresponds +to order in the hierarchy, not to the number of stars. + + +File: org, Node: Speeding Up Your Agendas, Next: Extracting Agenda Information, Prev: Special Agenda Views, Up: Hacking + +A.8 Speeding Up Your Agendas +============================ + +Some agenda commands slow down when the Org files grow in size or +number. Here are tips to speed up: + + • Reduce the number of Org agenda files to avoid slowdowns due to + hard drive accesses. + + • Reduce the number of DONE and archived headlines so agenda + operations that skip over these can finish faster. + + • Do not dim blocked tasks: + + (setq org-agenda-dim-blocked-tasks nil) + + • Stop preparing agenda buffers on startup: + + (setq org-agenda-inhibit-startup t) + + • Disable tag inheritance for agendas: + + (setq org-agenda-use-tag-inheritance nil) + + These options can be applied to selected agenda views. For more +details about generation of agenda views, see the docstrings for the +relevant variables, and this dedicated Worg page +(https://orgmode.org/worg/agenda-optimization.html) for agenda +optimization. + + +File: org, Node: Extracting Agenda Information, Next: Using the Property API, Prev: Speeding Up Your Agendas, Up: Hacking + +A.9 Extracting Agenda Information +================================= + +Org provides commands to access agendas through Emacs batch mode. +Through this command-line interface, agendas are automated for further +processing or printing. + + ‘org-batch-agenda’ creates an agenda view in ASCII and outputs to +standard output. This command takes one string parameter. When string +consists of a single character, Org uses it as a key to +‘org-agenda-custom-commands’. These are the same ones available through +the agenda dispatcher (see *note Agenda Dispatcher::). + + This example command line directly prints the TODO list to the +printer: + + emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr + + When the string parameter length is two or more characters, Org +matches it with tags/TODO strings. For example, this example command +line prints items tagged with ‘shop’, but excludes items tagged with +‘NewYork’: + + emacs -batch -l ~/.emacs \ + -eval '(org-batch-agenda "+shop-NewYork")' | lpr + +An example showing on-the-fly parameter modifications: + + emacs -batch -l ~/.emacs \ + -eval '(org-batch-agenda "a" \ + org-agenda-span (quote month) \ + org-agenda-include-diary nil \ + org-agenda-files (quote ("~/org/project.org")))' \ + | lpr + +which produces an agenda for the next 30 days from just the +‘~/org/projects.org’ file. + + For structured processing of agenda output, use +‘org-batch-agenda-csv’ with the following fields: + +category + The category of the item +head + The headline, without TODO keyword, TAGS and PRIORITY +type + The type of the agenda entry, can be + + ‘todo’ selected in TODO match + ‘tagsmatch’ selected in tags match + ‘diary’ imported from diary + ‘deadline’ a deadline + ‘scheduled’ scheduled + ‘timestamp’ appointment, selected by timestamp + ‘closed’ entry was closed on date + ‘upcoming-deadline’ warning about nearing deadline + ‘past-scheduled’ forwarded scheduled item + ‘block’ entry has date block including date + +todo + The TODO keyword, if any +tags + All tags including inherited ones, separated by colons +date + The relevant date, like ‘2007-2-14’ +time + The time, like ‘15:00-16:50’ +extra + String with extra planning info +priority-l + The priority letter if any was given +priority-n + The computed numerical priority + + If the selection of the agenda item was based on a timestamp, +including those items with ‘DEADLINE’ and ‘SCHEDULED’ keywords, then Org +includes date and time in the output. + + If the selection of the agenda item was based on a timestamp (or +deadline/scheduled), then Org includes date and time in the output. + + Here is an example of a post-processing script in Perl. It takes the +CSV output from Emacs and prints with a checkbox: + + #!/usr/bin/perl + + # define the Emacs command to run + $cmd = "emacs -batch -l ~/.emacs -eval '(org-batch-agenda-csv \"t\")'"; + + # run it and capture the output + $agenda = qx{$cmd 2>/dev/null}; + + # loop over all lines + foreach $line (split(/\n/,$agenda)) { + # get the individual values + ($category,$head,$type,$todo,$tags,$date,$time,$extra, + $priority_l,$priority_n) = split(/,/,$line); + # process and print + print "[ ] $head\n"; + } + + +File: org, Node: Using the Property API, Next: Using the Mapping API, Prev: Extracting Agenda Information, Up: Hacking + +A.10 Using the Property API +=========================== + +Here is a description of the functions that can be used to work with +properties. + + -- Function: org-entry-properties &optional pom which + Get all properties of the entry at point-or-marker POM. This + includes the TODO keyword, the tags, time strings for deadline, + scheduled, and clocking, and any additional properties defined in + the entry. The return value is an alist. Keys may occur multiple + times if the property key was used several times. POM may also be + ‘nil’, in which case the current entry is used. If WHICH is ‘nil’ + or ‘all’, get all properties. If WHICH is ‘special’ or ‘standard’, + only get that subclass. + + -- Function: org-entry-get pom property &optional inherit + Get value of PROPERTY for entry at point-or-marker POM. By + default, this only looks at properties defined locally in the + entry. If INHERIT is non-‘nil’ and the entry does not have the + property, then also check higher levels of the hierarchy. If + INHERIT is the symbol ‘selective’, use inheritance if and only if + the setting of ‘org-use-property-inheritance’ selects PROPERTY for + inheritance. + + -- Function: org-entry-delete pom property + Delete the property PROPERTY from entry at point-or-marker POM. + + -- Function: org-entry-put pom property value + Set PROPERTY to VALUES for entry at point-or-marker POM. + + -- Function: org-buffer-property-keys &optional include-specials + Get all property keys in the current buffer. + + -- Function: org-insert-property-drawer + Insert a property drawer for the current entry. Also + + -- Function: org-entry-put-multivalued-property pom property &rest + values + Set PROPERTY at point-or-marker POM to VALUES. VALUES should be a + list of strings. They are concatenated, with spaces as separators. + + -- Function: org-entry-get-multivalued-property pom property + Treat the value of the property PROPERTY as a whitespace-separated + list of values and return the values as a list of strings. + + -- Function: org-entry-add-to-multivalued-property pom property value + Treat the value of the property PROPERTY as a whitespace-separated + list of values and make sure that VALUE is in this list. + + -- Function: org-entry-remove-from-multivalued-property pom property + value + Treat the value of the property PROPERTY as a whitespace-separated + list of values and make sure that VALUE is _not_ in this list. + + -- Function: org-entry-member-in-multivalued-property pom property + value + Treat the value of the property PROPERTY as a whitespace-separated + list of values and check if VALUE is in this list. + + -- User Option: org-property-allowed-value-functions + Hook for functions supplying allowed values for a specific + property. The functions must take a single argument, the name of + the property, and return a flat list of allowed values. If ‘:ETC’ + is one of the values, use the values as completion help, but allow + also other values to be entered. The functions must return ‘nil’ + if they are not responsible for this property. + + +File: org, Node: Using the Mapping API, Prev: Using the Property API, Up: Hacking + +A.11 Using the Mapping API +========================== + +Org has sophisticated mapping capabilities to find all entries +satisfying certain criteria. Internally, this functionality is used to +produce agenda views, but there is also an API that can be used to +execute arbitrary functions for each or selected entries. The main +entry point for this API is: + + -- Function: org-map-entries func &optional match scope &rest skip + Call FUNC at each headline selected by MATCH in SCOPE. + + FUNC is a function or a Lisp form. With point positioned at the + beginning of the headline, call the function without arguments. + Org returns an alist of return values of calls to the function. + + To avoid preserving point, Org wraps the call to FUNC in + ‘save-excursion’ form. After evaluation, Org moves point to the + end of the line that was just processed. Search continues from + that point forward. This may not always work as expected under + some conditions, such as if the current sub-tree was removed by a + previous archiving operation. In such rare circumstances, Org + skips the next entry entirely when it should not. To stop Org from + such skips, make FUNC set the variable ‘org-map-continue-from’ to a + specific buffer position. + + MATCH is a tags/property/TODO match. Org iterates only matched + headlines. Org iterates over all headlines when MATCH is ‘nil’ or + ‘t’. + + SCOPE determines the scope of this command. It can be any of: + + ‘nil’ + The current buffer, respecting the restriction, if any. + + ‘tree’ + The subtree started with the entry at point. + + ‘region’ + The entries within the active region, if any. + + ‘file’ + The current buffer, without restriction. + + ‘file-with-archives’ + The current buffer, and any archives associated with it. + + ‘agenda’ + All agenda files. + + ‘agenda-with-archives’ + All agenda files with any archive files associated with them. + + list of filenames + If this is a list, all files in the list are scanned. + + The remaining arguments are treated as settings for the scanner’s + skipping facilities. Valid arguments are: + + ‘archive’ + Skip trees with the ‘ARCHIVE’ tag. + + ‘comment’ + Skip trees with the COMMENT keyword. + + function or Lisp form + Used as value for ‘org-agenda-skip-function’, so whenever the + function returns ‘t’, FUNC is called for that entry and search + continues from the point where the function leaves it. + + The mapping routine can call any arbitrary function, even functions +that change meta data or query the property API (see *note Using the +Property API::). Here are some handy functions: + + -- Function: org-todo &optional arg + Change the TODO state of the entry. See the docstring of the + functions for the many possible values for the argument ARG. + + -- Function: org-priority &optional action + Change the priority of the entry. See the docstring of this + function for the possible values for ACTION. + + -- Function: org-toggle-tag tag &optional onoff + Toggle the tag TAG in the current entry. Setting ONOFF to either + ‘on’ or ‘off’ does not toggle tag, but ensure that it is either on + or off. + + -- Function: org-promote + Promote the current entry. + + -- Function: org-demote + Demote the current entry. + + This example turns all entries tagged with ‘TOMORROW’ into TODO +entries with keyword ‘UPCOMING’. Org ignores entries in comment trees +and archive trees. + + (org-map-entries '(org-todo "UPCOMING") + "+TOMORROW" 'file 'archive 'comment) + + The following example counts the number of entries with TODO keyword +‘WAITING’, in all agenda files. + + (length (org-map-entries t "/+WAITING" 'agenda)) + + +File: org, Node: History and Acknowledgments, Next: GNU Free Documentation License, Prev: Hacking, Up: Top + +Appendix B History and Acknowledgments +************************************** + +B.1 From Carsten +================ + +Org was born in 2003, out of frustration over the user interface of the +Emacs Outline mode. I was trying to organize my notes and projects, and +using Emacs seemed to be the natural way to go. However, having to +remember eleven different commands with two or three keys per command, +only to hide and show parts of the outline tree, that seemed entirely +unacceptable to me. Also, when using outlines to take notes, I +constantly wanted to restructure the tree, organizing it parallel to my +thoughts and plans. _Visibility cycling_ and _structure editing_ were +originally implemented in the package ‘outline-magic.el’, but quickly +moved to the more general ‘org.el’. As this environment became +comfortable for project planning, the next step was adding _TODO +entries_, basic _timestamps_, and _table support_. These areas +highlighted the two main goals that Org still has today: to be a new, +outline-based, plain text mode with innovative and intuitive editing +features, and to incorporate project planning functionality directly +into a notes file. + + Since the first release, literally thousands of emails to me or to +the mailing list have provided a constant stream +of bug reports, feedback, new ideas, and sometimes patches and add-on +code. Many thanks to everyone who has helped to improve this package. +I am trying to keep here a list of the people who had significant +influence in shaping one or more aspects of Org. The list may not be +complete, if I have forgotten someone, please accept my apologies and +let me know. + + Before I get to this list, a few special mentions are in order: + +Bastien Guerry + Bastien has written a large number of extensions to Org (most of + them integrated into the core by now), including the LaTeX exporter + and the plain list parser. His support during the early days was + central to the success of this project. Bastien also invented + Worg, helped establishing the Web presence of Org, and sponsored + hosting costs for the orgmode.org website. Bastien stepped in as + maintainer of Org between 2011 and 2013, at a time when I + desperately needed a break. + +Eric Schulte and Dan Davison + Eric and Dan are jointly responsible for the Org Babel system, + which turns Org into a multi-language environment for evaluating + code and doing literate programming and reproducible research. + This has become one of Org’s killer features that define what Org + is today. + +John Wiegley + John has contributed a number of great ideas and patches directly + to Org, including the attachment system (‘org-attach.el’), + integration with Apple Mail (‘org-mac-message.el’), hierarchical + dependencies of TODO items, habit tracking (‘org-habits.el’), and + encryption (‘org-crypt.el’). Also, the capture system is really an + extended copy of his great ‘remember.el’. + +Sebastian Rose + Without Sebastian, the HTML/XHTML publishing of Org would be the + pitiful work of an ignorant amateur. Sebastian has pushed this + part of Org onto a much higher level. He also wrote ‘org-info.js’, + a Java script for displaying webpages derived from Org using an + Info-like or a folding interface with single-key navigation. + + See below for the full list of contributions! Again, please let me +know what I am missing here! + +B.2 From Bastien +================ + +I (Bastien) have been maintaining Org between 2011 and 2013. This +appendix would not be complete without adding a few more acknowledgments +and thanks. + + I am first grateful to Carsten for his trust while handing me over +the maintainership of Org. His unremitting support is what really +helped me getting more confident over time, with both the community and +the code. + + When I took over maintainership, I knew I would have to make Org more +collaborative than ever, as I would have to rely on people that are more +knowledgeable than I am on many parts of the code. Here is a list of +the persons I could rely on, they should really be considered +co-maintainers, either of the code or the community: + +Eric Schulte + Eric is maintaining the Babel parts of Org. His reactivity here + kept me away from worrying about possible bugs here and let me + focus on other parts. + +Nicolas Goaziou + Nicolas is maintaining the consistency of the deepest parts of Org. + His work on ‘org-element.el’ and ‘ox.el’ has been outstanding, and + it opened the doors for many new ideas and features. He rewrote + many of the old exporters to use the new export engine, and helped + with documenting this major change. More importantly (if that’s + possible), he has been more than reliable during all the work done + for Org 8.0, and always very reactive on the mailing list. + +Achim Gratz + Achim rewrote the building process of Org, turning some _ad hoc_ + tools into a flexible and conceptually clean process. He patiently + coped with the many hiccups that such a change can create for + users. + +Nick Dokos + The Org mode mailing list would not be such a nice place without + Nick, who patiently helped users so many times. It is impossible + to overestimate such a great help, and the list would not be so + active without him. + + I received support from so many users that it is clearly impossible +to be fair when shortlisting a few of them, but Org’s history would not +be complete if the ones above were not mentioned in this manual. + +B.3 List of Contributions +========================= + + • Russel Adams came up with the idea for drawers. + + • Thomas Baumann wrote ‘org-bbdb.el’ and ‘org-mhe.el’. + + • Christophe Bataillon created the great unicorn logo that we use on + the Org mode website. + + • Alex Bochannek provided a patch for rounding timestamps. + + • Jan Böcker wrote ‘org-docview.el’. + + • Brad Bozarth showed how to pull RSS feed data into Org files. + + • Tom Breton wrote ‘org-choose.el’. + + • Charles Cave’s suggestion sparked the implementation of templates + for Remember, which are now templates for capture. + + • Pavel Chalmoviansky influenced the agenda treatment of items with + specified time. + + • Gregory Chernov patched support for Lisp forms into table + calculations and improved XEmacs compatibility, in particular by + porting ‘nouline.el’ to XEmacs. + + • Sacha Chua suggested copying some linking code from Planner. + + • Baoqiu Cui contributed the DocBook exporter. + + • Eddward DeVilla proposed and tested checkbox statistics. He also + came up with the idea of properties, and that there should be an + API for them. + + • Nick Dokos tracked down several nasty bugs. + + • Kees Dullemond used to edit projects lists directly in HTML and so + inspired some of the early development, including HTML export. He + also asked for a way to narrow wide table columns. + + • Thomas S. Dye contributed documentation on Worg and helped + integrating the Org Babel documentation into the manual. + + • Christian Egli converted the documentation into Texinfo format, + inspired the agenda, patched CSS formatting into the HTML exporter, + and wrote ‘org-taskjuggler.el’. + + • David Emery provided a patch for custom CSS support in exported + HTML agendas. + + • Nic Ferrier contributed mailcap and XOXO support. + + • Miguel A. Figueroa-Villanueva implemented hierarchical checkboxes. + + • John Foerch figured out how to make incremental search show context + around a match in a hidden outline tree. + + • Raimar Finken wrote ‘org-git-line.el’. + + • Mikael Fornius works as a mailing list moderator. + + • Austin Frank works as a mailing list moderator. + + • Eric Fraga drove the development of Beamer export with ideas and + testing. + + • Barry Gidden did proofreading the manual in preparation for the + book publication through Network Theory Ltd. + + • Niels Giesen had the idea to automatically archive DONE trees. + + • Nicolas Goaziou rewrote much of the plain list code. + + • Kai Grossjohann pointed out key-binding conflicts with other + packages. + + • Brian Gough of Network Theory Ltd publishes the Org mode manual as + a book. + + • Bernt Hansen has driven much of the support for auto-repeating + tasks, task state change logging, and the clocktable. His clear + explanations have been critical when we started to adopt the Git + version control system. + + • Manuel Hermenegildo has contributed various ideas, small fixes and + patches. + + • Phil Jackson wrote ‘org-irc.el’. + + • Scott Jaderholm proposed footnotes, control over whitespace between + folded entries, and column view for properties. + + • Matt Jones wrote MobileOrg Android. + + • Tokuya Kameshima wrote ‘org-wl.el’ and ‘org-mew.el’. + + • Shidai Liu (“Leo”) asked for embedded LaTeX and tested it. He also + provided frequent feedback and some patches. + + • Matt Lundin has proposed last-row references for table formulas and + named invisible anchors. He has also worked a lot on the FAQ. + + • David Maus wrote ‘org-atom.el’, maintains the issues file for Org, + and is a prolific contributor on the mailing list with competent + replies, small fixes and patches. + + • Jason F. McBrayer suggested agenda export to CSV format. + + • Max Mikhanosha came up with the idea of refiling. + + • Dmitri Minaev sent a patch to set priority limits on a per-file + basis. + + • Stefan Monnier provided a patch to keep the Emacs Lisp compiler + happy. + + • Richard Moreland wrote MobileOrg for the iPhone. + + • Rick Moynihan proposed allowing multiple TODO sequences in a file + and being able to quickly restrict the agenda to a subtree. + + • Todd Neal provided patches for links to Info files and Elisp forms. + + • Greg Newman refreshed the unicorn logo into its current form. + + • Tim O’Callaghan suggested in-file links, search options for general + file links, and tags. + + • Osamu Okano wrote ‘orgcard2ref.pl’, a Perl program to create a text + version of the reference card. + + • Takeshi Okano translated the manual and David O’Toole’s tutorial + into Japanese. + + • Oliver Oppitz suggested multi-state TODO items. + + • Scott Otterson sparked the introduction of descriptive text for + links, among other things. + + • Pete Phillips helped during the development of the TAGS feature, + and provided frequent feedback. + + • Martin Pohlack provided the code snippet to bundle character + insertion into bundles of 20 for undo. + + • T. V. Raman reported bugs and suggested improvements. + + • Matthias Rempe (Oelde) provided ideas, Windows support, and quality + control. + + • Paul Rivier provided the basic implementation of named footnotes. + He also acted as mailing list moderator for some time. + + • Kevin Rogers contributed code to access VM files on remote hosts. + + • Frank Ruell solved the mystery of the ‘keymapp nil’ bug, a conflict + with ‘allout.el’. + + • Jason Riedy generalized the send-receive mechanism for Orgtbl + tables with extensive patches. + + • Philip Rooke created the Org reference card, provided lots of + feedback, developed and applied standards to the Org documentation. + + • Christian Schlauer proposed angular brackets around links, among + other things. + + • Paul Sexton wrote ‘org-ctags.el’. + + • Tom Shannon’s ‘organizer-mode.el’ inspired linking to VM/BBDB/Gnus. + + • Ilya Shlyakhter proposed the Archive Sibling, line numbering in + literal examples, and remote highlighting for referenced code + lines. + + • Stathis Sideris wrote the ‘ditaa.jar’ ASCII to PNG converter that + is now packaged into Org’s ‘contrib/’ directory. + + • Daniel Sinder came up with the idea of internal archiving by + locking subtrees. + + • Dale Smith proposed link abbreviations. + + • James TD Smith has contributed a large number of patches for useful + tweaks and features. + + • Adam Spiers asked for global linking commands, inspired the link + extension system, added support for Mairix, and proposed the + mapping API. + + • Ulf Stegemann created the table to translate special symbols to + HTML, LaTeX, UTF-8, Latin-1 and ASCII. + + • Andy Stewart contributed code to ‘org-w3m.el’, to copy HTML content + with links transformation to Org syntax. + + • David O’Toole wrote ‘org-publish.el’ and drafted the manual chapter + about publishing. + + • Jambunathan K. contributed the ODT exporter. + + • Sebastien Vauban reported many issues with LaTeX and Beamer export + and enabled source code highlighting in Gnus. + + • Stefan Vollmar organized a video-recorded talk at the + Max-Planck-Institute for Neurology. He also inspired the creation + of a concept index for HTML export. + + • Jürgen Vollmer contributed code generating the table of contents in + HTML output. + + • Samuel Wales has provided important feedback and bug reports. + + • Chris Wallace provided a patch implementing the ‘QUOTE’ block. + + • David Wainberg suggested archiving, and improvements to the linking + system. + + • Carsten Wimmer suggested some changes and helped fix a bug in + linking to Gnus. + + • Roland Winkler requested additional key bindings to make Org work + on a TTY. + + • Piotr Zielinski wrote ‘org-mouse.el’, proposed agenda blocks and + contributed various ideas and code snippets. + + • Marco Wahl wrote ‘org-eww.el’. + + +File: org, Node: GNU Free Documentation License, Next: Main Index, Prev: History and Acknowledgments, Up: Top + +Appendix C GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright © 2000, 2001, 2002, 2007, 2008, 2013, 2014, 2018 Free Software Foundation, Inc. + + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document “free” in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of “copyleft”, which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + “Document”, below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as “you”. You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A “Modified Version” of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A “Secondary Section” is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document’s overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The “Invariant Sections” are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The “Cover Texts” are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A “Transparent” copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + “Transparent” is called “Opaque”. + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The “Title Page” means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, “Title + Page” means the text near the most prominent appearance of the + work’s title, preceding the beginning of the body of the text. + + The “publisher” means any person or entity that distributes copies + of the Document to the public. + + A section “Entitled XYZ” means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) + To “Preserve the Title” of such a section when you modify the + Document means that it remains a section “Entitled XYZ” according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document’s license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document’s + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled “History”, Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled “History” in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + “History” section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled “Acknowledgements” or “Dedications”, + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled “Endorsements”. Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + “Endorsements” or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version’s + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled “Endorsements”, provided it contains + nothing but endorsements of your Modified Version by various + parties—for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of + a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + “History” in the various original documents, forming one section + Entitled “History”; likewise combine any sections Entitled + “Acknowledgements”, and any sections Entitled “Dedications”. You + must delete all sections Entitled “Endorsements.” + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an “aggregate” if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation’s users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document’s Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled “Acknowledgements”, + “Dedications”, or “History”, the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + . + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License “or any later version” applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy’s public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A “Massive Multiauthor Collaboration” (or “MMC”) contained in the + site means any set of copyrightable works thus published on the MMC + site. + + “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + “Incorporate” means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is “eligible for relicensing” if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the “with...Texts.” line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: org, Node: Main Index, Next: Key Index, Prev: GNU Free Documentation License, Up: Top + +D Main Index +************ + +[index] +* Menu: + +* *this*, in post header argument: Results of Evaluation. + (line 272) +* + suffix, in properties: Property Syntax. (line 48) +* _ALL suffix, in properties: Property Syntax. (line 46) +* abbreviation, links: Link Abbreviations. (line 6) +* abstract, in LaTeX export: Special blocks in LaTeX export. + (line 6) +* action, for publishing: Publishing action. (line 6) +* activation: Activation. (line 6) +* active region: Structure Editing. (line 132) +* add-on packages: Add-on Packages. (line 6) +* agenda: Weekly/daily agenda. (line 6) +* agenda dispatcher: Agenda Dispatcher. (line 6) +* agenda files: Agenda Files. (line 6) +* agenda files, removing buffers: Agenda Commands. (line 494) +* agenda filtering: Filtering/limiting agenda times. + (line 17) +* agenda views: Agenda Views. (line 6) +* agenda views, custom: Custom Agenda Views. (line 6) +* agenda views, exporting: Exporting Agenda Views. + (line 6) +* agenda views, exporting <1>: Exporting Agenda Views. + (line 13) +* agenda views, main example: Storing searches. (line 11) +* agenda views, optimization: Speeding Up Your Agendas. + (line 6) +* agenda views, user-defined: Special Agenda Views. + (line 6) +* agenda*, as an agenda views: Storing searches. (line 11) +* agenda, as an agenda views: Storing searches. (line 11) +* agenda, column view: Agenda Column View. (line 6) +* agenda, pipe: Extracting Agenda Information. + (line 6) +* agenda, with block views: Block agenda. (line 6) +* alignment in tables: Column Width and Alignment. + (line 6) +* ALLTAGS, special property: Special Properties. (line 13) +* ALT_TITLE, property: Table of Contents. (line 53) +* ALT_TITLE, property <1>: Headings and sectioning structure. + (line 24) +* angle bracket links: Link Format. (line 6) +* angular brackets, around links: External Links. (line 70) +* anniversaries, from BBDB: Weekly/daily agenda. (line 78) +* API, for mapping: Using the Mapping API. + (line 6) +* API, for properties: Using the Property API. + (line 6) +* APPENDIX, property: Headings and sectioning structure. + (line 20) +* appointment: Timestamps. (line 14) +* appointment <1>: Weekly/daily agenda. (line 125) +* appointment reminders: Weekly/daily agenda. (line 125) +* appt.el: Weekly/daily agenda. (line 125) +* APPT_WARNTIME, keyword: Weekly/daily agenda. (line 125) +* archive locations: Moving subtrees. (line 25) +* ARCHIVE, keyword: Moving subtrees. (line 35) +* ARCHIVE, keyword <1>: In-buffer Settings. (line 15) +* ARCHIVE, property: Property Inheritance. + (line 33) +* ARCHIVE, property <1>: Moving subtrees. (line 37) +* ARCHIVE, tag: Internal archiving. (line 6) +* archived entries, in agenda views: Agenda Views. (line 37) +* archiving: Archiving. (line 6) +* arguments, in code blocks: Environment of a Code Block. + (line 9) +* ASCII export: ASCII/Latin-1/UTF-8 export. + (line 6) +* ASCII, keyword: ASCII/Latin-1/UTF-8 export. + (line 63) +* Atom feeds: RSS Feeds. (line 6) +* attach from Dired: Attachments. (line 79) +* attachments: Attachments. (line 6) +* ATTACH_DIR, property: Attachments. (line 71) +* ATTACH_DIR_INHERIT, property: Attachments. (line 76) +* ATTR_ASCII, keyword: ASCII/Latin-1/UTF-8 export. + (line 74) +* ATTR_BEAMER, keyword: Beamer specific syntax. + (line 35) +* ATTR_HTML, keyword: Links in HTML export. + (line 27) +* ATTR_HTML, keyword <1>: Tables in HTML export. + (line 11) +* ATTR_HTML, keyword <2>: Images in HTML export. + (line 28) +* ATTR_LATEX, keyword: Images in LaTeX export. + (line 6) +* ATTR_LATEX, keyword <1>: Plain lists in LaTeX export. + (line 6) +* ATTR_LATEX, keyword <2>: Source blocks in LaTeX export. + (line 6) +* ATTR_LATEX, keyword <3>: Example blocks in LaTeX export. + (line 6) +* ATTR_LATEX, keyword <4>: Special blocks in LaTeX export. + (line 6) +* ATTR_LATEX, keyword <5>: Horizontal rules in LaTeX export. + (line 6) +* ATTR_ODT, keyword: Tables in ODT export. + (line 20) +* ATTR_ODT, keyword <1>: Images in ODT export. + (line 31) +* ATTR_ODT, keyword <2>: Images in ODT export. + (line 76) +* ATTR_ODT, keyword <3>: Advanced topics in ODT export. + (line 151) +* ATTR_TEXINFO, keyword: Plain lists in Texinfo export. + (line 6) +* ATTR_TEXINFO, keyword <1>: Tables in Texinfo export. + (line 6) +* ATTR_TEXINFO, keyword <2>: Images in Texinfo export. + (line 6) +* ATTR_TEXINFO, keyword <3>: Quotations in Texinfo export. + (line 6) +* ATTR_TEXINFO, keyword <4>: Special blocks in Texinfo export. + (line 6) +* author: Feedback. (line 6) +* AUTHOR, keyword: Export Settings. (line 25) +* author, macro: Macro Replacement. (line 41) +* auto-save, in code block editing: Editing Source Code. (line 11) +* autoload: Activation. (line 6) +* babel, languages: Languages. (line 6) +* babel, library of: Library of Babel. (line 6) +* backtrace of an error: Feedback. (line 66) +* BBDB links: External Links. (line 6) +* BBDB, anniversaries: Weekly/daily agenda. (line 78) +* Beamer export: Beamer Export. (line 6) +* BEAMER, keyword: Beamer specific syntax. + (line 19) +* BEAMER_ACT, property: Frames and Blocks in Beamer. + (line 41) +* BEAMER_COL, property: Frames and Blocks in Beamer. + (line 49) +* BEAMER_ENV, property: Frames and Blocks in Beamer. + (line 14) +* BEAMER_FONT_THEME, keyword: Beamer specific export settings. + (line 17) +* BEAMER_HEADER, keyword: Beamer specific export settings. + (line 26) +* BEAMER_INNER_THEME, keyword: Beamer specific export settings. + (line 20) +* BEAMER_OPT, property: Frames and Blocks in Beamer. + (line 41) +* BEAMER_OUTER_THEME, keyword: Beamer specific export settings. + (line 23) +* BEAMER_REF, property: Frames and Blocks in Beamer. + (line 27) +* BEAMER_THEME, keyword: Beamer specific export settings. + (line 11) +* BEGIN clocktable: The clock table. (line 35) +* BEGIN columnview: Capturing column view. + (line 11) +* BEGIN_CENTER: Paragraphs. (line 32) +* BEGIN_COMMENT: Comment Lines. (line 10) +* BEGIN_EXAMPLE: Literal Examples. (line 10) +* BEGIN_EXPORT ascii: ASCII/Latin-1/UTF-8 export. + (line 63) +* BEGIN_EXPORT beamer: Beamer specific syntax. + (line 19) +* BEGIN_EXPORT html: Quoting HTML tags. (line 14) +* BEGIN_EXPORT latex: Quoting LaTeX code. (line 18) +* BEGIN_EXPORT texinfo: Quoting Texinfo code. + (line 9) +* BEGIN_JUSTIFYLEFT: ASCII/Latin-1/UTF-8 export. + (line 84) +* BEGIN_JUSTIFYRIGHT: ASCII/Latin-1/UTF-8 export. + (line 84) +* BEGIN_QUOTE: Paragraphs. (line 25) +* BEGIN_SRC: Literal Examples. (line 30) +* BEGIN_SRC <1>: Structure of Code Blocks. + (line 6) +* BEGIN_VERSE: Paragraphs. (line 13) +* BIND, keyword: Export Settings. (line 210) +* block agenda: Block agenda. (line 6) +* BLOCKED, special property: Special Properties. (line 13) +* blocking, of checkboxes: Checkboxes. (line 46) +* blocks, folding: Blocks. (line 6) +* bold text, markup rules: Emphasis and Monospace. + (line 6) +* boolean logic, for agenda searches: Matching tags and properties. + (line 32) +* bracket links: Link Format. (line 9) +* bug reports: Feedback. (line 6) +* C-c C-c, overview: The Very Busy C-c C-c Key. + (line 6) +* cache results of code evaluation: Evaluating Code Blocks. + (line 106) +* cache, header argument: Evaluating Code Blocks. + (line 106) +* Calc package: The Spreadsheet. (line 6) +* calc.el: Cooperation. (line 7) +* calculations, in tables: Built-in Table Editor. + (line 167) +* calculations, in tables <1>: The Spreadsheet. (line 6) +* calendar commands, from agenda: Agenda Commands. (line 444) +* calendar integration: Weekly/daily agenda. (line 32) +* calendar, for selecting date: The date/time prompt. + (line 75) +* CALL, keyword: Evaluating Code Blocks. + (line 27) +* CAPTION, keyword: Captions. (line 6) +* CAPTION, keyword <1>: Tables in HTML export. + (line 11) +* CAPTION, keyword <2>: Images in HTML export. + (line 28) +* captions, markup rules: Captions. (line 6) +* capture: Capture Refile Archive. + (line 6) +* capture <1>: Capture. (line 6) +* capture protocol: capture protocol. (line 6) +* capturing, from agenda: Agenda Commands. (line 343) +* category: Categories. (line 6) +* category filtering, in agenda: Filtering/limiting agenda times. + (line 17) +* category, for tags/property match: Matching tags and properties. + (line 64) +* CATEGORY, keyword: Categories. (line 6) +* CATEGORY, keyword <1>: In-buffer Settings. (line 19) +* CATEGORY, property: Property Inheritance. + (line 29) +* CATEGORY, property <1>: Categories. (line 12) +* CDLaTeX: CDLaTeX mode. (line 6) +* cdlatex.el: Cooperation. (line 24) +* center blocks: Paragraphs. (line 32) +* center image in LaTeX export: Images in LaTeX export. + (line 57) +* change agenda display: Agenda Commands. (line 63) +* checkbox blocking: Checkboxes. (line 46) +* checkbox statistics: Checkboxes. (line 30) +* checkboxes: Checkboxes. (line 6) +* checkboxes and TODO dependencies: TODO dependencies. (line 53) +* children, subtree visibility state: Global and local cycling. + (line 6) +* CINDEX, keyword: Indices. (line 6) +* clean outline view: Clean View. (line 6) +* clocking time: Clocking Work Time. (line 6) +* CLOCKSUM, special property: Special Properties. (line 13) +* CLOCKSUM, special property <1>: Agenda Column View. (line 29) +* CLOCKSUM_T, special property: Special Properties. (line 13) +* CLOCKSUM_T, special property <1>: Agenda Column View. (line 53) +* clocktable, dynamic block: The clock table. (line 6) +* CLOCK_MODELINE_TOTAL, property: Clocking commands. (line 20) +* CLOSED, special property: Special Properties. (line 13) +* code block, batch execution: Batch Execution. (line 6) +* code block, editing: Editing Source Code. (line 6) +* code block, evaluating: Evaluating Code Blocks. + (line 6) +* code block, exporting: Exporting Code Blocks. + (line 6) +* code block, extracting source code: Extracting Source Code. + (line 6) +* code block, key bindings: Key bindings and Useful Functions. + (line 6) +* code block, languages: Languages. (line 6) +* code block, library: Library of Babel. (line 6) +* code block, Noweb reference: Noweb Reference Syntax. + (line 6) +* code block, results of evaluation: Results of Evaluation. + (line 6) +* code block, structure: Structure of Code Blocks. + (line 6) +* code line references, markup rules: Literal Examples. (line 6) +* code text, markup rules: Emphasis and Monospace. + (line 6) +* colnames, header argument: Environment of a Code Block. + (line 48) +* column formula: Column formulas. (line 6) +* column view, for properties: Defining columns. (line 6) +* column view, in agenda: Agenda Column View. (line 6) +* column, of field coordinates: References. (line 89) +* COLUMNS, keyword: Scope of column definitions. + (line 8) +* COLUMNS, property: Property Inheritance. + (line 22) +* COLUMNS, property <1>: In-buffer Settings. (line 23) +* commands, in agenda buffer: Agenda Commands. (line 6) +* comment block: Comment Lines. (line 10) +* comment lines: Comment Lines. (line 6) +* comment trees: Comment Lines. (line 13) +* commented entries, in agenda views: Agenda Views. (line 37) +* comments, header argument: Extracting Source Code. + (line 46) +* completion, of dictionary words: Completion. (line 6) +* completion, of file names: Handling Links. (line 92) +* completion, of link abbreviations: Completion. (line 6) +* completion, of links: Handling Links. (line 69) +* completion, of option keywords: Per-file keywords. (line 26) +* completion, of option keywords <1>: Completion. (line 6) +* completion, of property keys: Completion. (line 6) +* completion, of tags: Setting Tags. (line 11) +* completion, of tags <1>: Completion. (line 6) +* completion, of TeX symbols: Completion. (line 6) +* completion, of TODO keywords: Workflow states. (line 17) +* completion, of TODO keywords <1>: Completion. (line 6) +* concept index, in Texinfo export: Indices. (line 6) +* constants, in calculations: References. (line 113) +* CONSTANTS, keyword: References. (line 113) +* CONSTANTS, keyword <1>: In-buffer Settings. (line 28) +* constants.el: Cooperation. (line 14) +* contents, global visibility state: Global and local cycling. + (line 20) +* continuous clocking: Resolving idle time. (line 78) +* control code block evaluation: Evaluating Code Blocks. + (line 81) +* convert: Advanced topics in ODT export. + (line 12) +* converter: Advanced topics in ODT export. + (line 12) +* COOKIE_DATA, property: Breaking Down Tasks. (line 21) +* COOKIE_DATA, property <1>: Checkboxes. (line 30) +* coordinates, of field: References. (line 89) +* copying notes: Refile and Copy. (line 6) +* copying, of subtrees: Structure Editing. (line 6) +* COPYING, property: Texinfo title and copyright page. + (line 19) +* countdown timer: Timers. (line 6) +* counter, macro: Macro Replacement. (line 75) +* CREATOR, keyword: Export Settings. (line 28) +* CSS, for HTML export: CSS support. (line 6) +* cua.el: Conflicts. (line 17) +* custom agenda views: Custom Agenda Views. (line 6) +* custom date/time format: Custom time format. (line 6) +* custom search strings: Custom Searches. (line 6) +* customization: Customization. (line 6) +* CUSTOM_ID, property: Internal Links. (line 6) +* CUSTOM_ID, property <1>: Handling Links. (line 21) +* cutting, of subtrees: Structure Editing. (line 6) +* cycling, in plain lists: Plain Lists. (line 70) +* cycling, of agenda files: Agenda Files. (line 26) +* cycling, of TODO states: TODO Basics. (line 14) +* cycling, visibility: Visibility Cycling. (line 6) +* daily agenda: Weekly/daily agenda. (line 6) +* dash, special symbol: Special Symbols. (line 36) +* data type index, in Texinfo export: Indices. (line 6) +* date format, custom: Custom time format. (line 6) +* date range: Timestamps. (line 42) +* date stamp: Dates and Times. (line 6) +* date stamps: Timestamps. (line 6) +* date tree: Using capture. (line 7) +* DATE, keyword: Export Settings. (line 32) +* date, macro: Macro Replacement. (line 49) +* date, reading in minibuffer: The date/time prompt. + (line 6) +* dates: Dates and Times. (line 6) +* DEADLINE marker: Deadlines and Scheduling. + (line 11) +* DEADLINE, special property: Special Properties. (line 13) +* deadlines: Timestamps. (line 6) +* debugging, of table formulas: Editing and debugging formulas. + (line 132) +* default header arguments per language: Using Header Arguments. + (line 36) +* defining new protocols: Protocols. (line 25) +* demotion, of subtrees: Structure Editing. (line 6) +* dependencies, of TODO states: TODO dependencies. (line 6) +* DESCRIPTION, keyword: Beamer specific export settings. + (line 30) +* DESCRIPTION, keyword <1>: HTML specific export settings. + (line 10) +* DESCRIPTION, keyword <2>: LaTeX specific export settings. + (line 11) +* DESCRIPTION, keyword <3>: ODT specific export settings. + (line 11) +* DESCRIPTION, property: Headings and sectioning structure. + (line 24) +* DESCRIPTION, property <1>: iCalendar Export. (line 51) +* diary entries, creating from agenda: Agenda Commands. (line 453) +* diary integration: Weekly/daily agenda. (line 32) +* diary style timestamps: Timestamps. (line 34) +* dictionary word completion: Completion. (line 6) +* dir file, in Texinfo export: Info directory file. (line 6) +* dir, header argument: Environment of a Code Block. + (line 302) +* directories, for publishing: Sources and destinations. + (line 6) +* dispatcher, for export commands: The Export Dispatcher. + (line 6) +* dispatching agenda commands: Agenda Dispatcher. (line 6) +* display changing, in agenda: Agenda Commands. (line 63) +* doc, docx, rtf: Advanced topics in ODT export. + (line 12) +* document structure: Document Structure. (line 6) +* document title: Export Settings. (line 60) +* documentation: Documentation Access. + (line 6) +* DONE, final TODO keyword: Per-file keywords. (line 29) +* drawer, for properties: Property Syntax. (line 6) +* drawer, for state change recording: Tracking TODO state changes. + (line 6) +* drawers: Drawers. (line 6) +* duration, computing: Durations and time values. + (line 6) +* dvipng: Math formatting in HTML export. + (line 6) +* dvipng <1>: LaTeX math snippets. (line 50) +* dvisvgm: Math formatting in HTML export. + (line 6) +* dvisvgm <1>: LaTeX math snippets. (line 50) +* dynamic blocks: Dynamic Blocks. (line 6) +* dynamic indentation: Clean View. (line 6) +* ecomplete.el: Conflicts. (line 32) +* editing tables: Tables. (line 6) +* editing, of table formulas: Editing and debugging formulas. + (line 6) +* edits, catching invisible: Catching invisible edits. + (line 6) +* effort estimates: Effort Estimates. (line 6) +* effort filtering, in agenda: Filtering/limiting agenda times. + (line 17) +* EFFORT, property: Effort Estimates. (line 6) +* Elisp links: External Links. (line 6) +* ellipsis, special symbol: Special Symbols. (line 36) +* ELPA: Activation. (line 6) +* EMAIL, keyword: Export Settings. (line 35) +* email, macro: Macro Replacement. (line 41) +* embedding images in ODT: Images in ODT export. + (line 6) +* entities: Special Symbols. (line 6) +* epilogue, header argument: Environment of a Code Block. + (line 350) +* escape character: Escape Character. (line 6) +* escape syntax, for links: Link Format. (line 17) +* eval, header argument: Evaluating Code Blocks. + (line 81) +* evaluate time range: Creating Timestamps. (line 62) +* example block: Literal Examples. (line 10) +* example blocks, in LaTeX export: Example blocks in LaTeX export. + (line 6) +* EXCLUDE_TAGS, keyword: Export Settings. (line 52) +* excluding entries from table of contents: Table of Contents. + (line 15) +* export back-end: Exporting. (line 12) +* export, dispatcher: The Export Dispatcher. + (line 6) +* export, include files: Include Files. (line 6) +* export, OpenDocument: OpenDocument Text Export. + (line 6) +* Export, settings: Export Settings. (line 6) +* Export, writing back-ends: Adding Export Back-ends. + (line 6) +* exporting: Exporting. (line 6) +* exporting agenda views: Exporting Agenda Views. + (line 13) +* exporting, not: Comment Lines. (line 6) +* exports, header argument: Exporting Code Blocks. + (line 14) +* EXPORT_FILE_NAME, keyword: Export Settings. (line 64) +* EXPORT_FILE_NAME, property: ODT export commands. (line 9) +* EXPORT_LATEX_CLASS, property: LaTeX header and sectioning. + (line 23) +* EXPORT_LATEX_CLASS_OPTIONS, property: LaTeX header and sectioning. + (line 23) +* extended TODO keywords: TODO Extensions. (line 6) +* external archiving: Moving subtrees. (line 6) +* external links: External Links. (line 6) +* external links, in HTML export: Links in HTML export. + (line 6) +* faces, for TODO keywords: Faces for TODO keywords. + (line 6) +* FAQ: Summary. (line 49) +* feedback: Feedback. (line 6) +* field coordinates: References. (line 89) +* field formula: Field and range formulas. + (line 6) +* field references: References. (line 15) +* file links: External Links. (line 6) +* file links, searching: Search Options. (line 6) +* file name completion: Handling Links. (line 92) +* file, header argument: Results of Evaluation. + (line 152) +* FILE, special property: Special Properties. (line 13) +* file-desc, header argument: Results of Evaluation. + (line 173) +* file-ext, header argument: Results of Evaluation. + (line 162) +* files for agenda: Agenda Files. (line 6) +* files, adding to agenda list: Agenda Files. (line 16) +* files, selecting for publishing: Selecting files. (line 6) +* FILETAGS, keyword: Tag Inheritance. (line 20) +* FILETAGS, keyword <1>: In-buffer Settings. (line 34) +* filladapt.el: Conflicts. (line 43) +* filtering entries, in agenda: Filtering/limiting agenda times. + (line 17) +* Filters, exporting: Advanced Export Configuration. + (line 31) +* FINDEX, keyword: Indices. (line 6) +* FLAGGED, tag: Pulling from the mobile application. + (line 18) +* folded, subtree visibility state: Global and local cycling. + (line 6) +* folding, sparse trees: Sparse Trees. (line 6) +* following links: Handling Links. (line 102) +* footers, in code blocks: Environment of a Code Block. + (line 342) +* footnotes: Creating Footnotes. (line 6) +* format specifier, in spreadsheet: Formula syntax for Calc. + (line 17) +* format, of links: Link Format. (line 6) +* formatting source code, markup rules: Literal Examples. (line 23) +* formula debugging: Editing and debugging formulas. + (line 132) +* formula editing: Editing and debugging formulas. + (line 6) +* formula syntax, Calc: Formula syntax for Calc. + (line 6) +* formula, for individual table field: Field and range formulas. + (line 6) +* formula, for range of fields: Field and range formulas. + (line 6) +* formula, for table column: Column formulas. (line 6) +* formula, in tables: Built-in Table Editor. + (line 167) +* function index, in Texinfo export: Indices. (line 6) +* global cycling: Global and local cycling. + (line 20) +* global key bindings: Activation. (line 6) +* global TODO list: Global TODO list. (line 6) +* global visibility states: Global and local cycling. + (line 20) +* Gnus links: External Links. (line 6) +* graph, in tables: Org Plot. (line 6) +* group tags: Tag Hierarchy. (line 6) +* group tags, as regular expressions: Matching tags and properties. + (line 57) +* grouping columns in tables: Column Groups. (line 6) +* habits: Tracking your habits. + (line 6) +* hacking: Hacking. (line 6) +* header arguments per language: Using Header Arguments. + (line 74) +* header arguments, in code blocks: Structure of Code Blocks. + (line 57) +* header lines, in tables: Built-in Table Editor. + (line 6) +* header, for LaTeX files: LaTeX header and sectioning. + (line 6) +* HEADER, keyword: Using Header Arguments. + (line 114) +* headers, in code blocks: Environment of a Code Block. + (line 342) +* headline navigation: Motion. (line 6) +* headline tagging: Tags. (line 6) +* headline, promotion and demotion: Structure Editing. (line 6) +* headlines: Headlines. (line 6) +* hide text: Visibility Cycling. (line 6) +* hiding leading stars: Clean View. (line 6) +* hlines, header argument: Results of Evaluation. + (line 102) +* hooks: Hooks (2). (line 6) +* horizontal rule, in tables: Built-in Table Editor. + (line 6) +* horizontal rules, in ASCII export: ASCII/Latin-1/UTF-8 export. + (line 74) +* horizontal rules, in LaTeX export: Horizontal rules in LaTeX export. + (line 6) +* horizontal rules, markup rules: Horizontal Rules. (line 6) +* HTML export: HTML Export. (line 6) +* HTML export, CSS: CSS support. (line 6) +* HTML, and Orgtbl mode: Translator functions. + (line 6) +* HTML, keyword: Quoting HTML tags. (line 14) +* html-style, OPTIONS item: CSS support. (line 56) +* HTML5, export new elements: HTML doctypes. (line 25) +* HTML_CONTAINER, keyword: HTML specific export settings. + (line 19) +* HTML_CONTAINER_CLASS, property: CSS support. (line 62) +* HTML_DOCTYPE, keyword: HTML specific export settings. + (line 16) +* HTML_HEAD, keyword: HTML specific export settings. + (line 35) +* HTML_HEAD, keyword <1>: CSS support. (line 49) +* HTML_HEAD_EXTRA, keyword: HTML specific export settings. + (line 39) +* HTML_HEAD_EXTRA, keyword <1>: CSS support. (line 49) +* HTML_INCLUDE_STYLE, keyword: CSS support. (line 44) +* HTML_LINK_HOME, keyword: HTML specific export settings. + (line 23) +* HTML_LINK_UP, keyword: HTML specific export settings. + (line 26) +* HTML_MATHJAX, keyword: HTML specific export settings. + (line 30) +* hyperlinks: Hyperlinks. (line 6) +* hyperlinks, adding new types: Adding Hyperlink Types. + (line 6) +* iCalendar export: iCalendar Export. (line 6) +* ID, property: Handling Links. (line 21) +* ID, property <1>: Capturing column view. + (line 34) +* ID, property <2>: iCalendar Export. (line 26) +* identify, ImageMagick: Images in ODT export. + (line 34) +* idle, resolve, dangling: Resolving idle time. (line 9) +* image, centering in LaTeX export: Images in LaTeX export. + (line 57) +* ImageMagick: Math formatting in HTML export. + (line 6) +* ImageMagick <1>: LaTeX math snippets. (line 50) +* images, embedding in ODT: Images in ODT export. + (line 6) +* images, inline in HTML: Images in HTML export. + (line 6) +* images, inline in LaTeX: Images in LaTeX export. + (line 6) +* images, markup rules: Images. (line 6) +* imenu.el: Cooperation. (line 29) +* in-buffer settings: In-buffer Settings. (line 6) +* inactive timestamp: Timestamps. (line 50) +* include files, during export: Include Files. (line 6) +* INCLUDE, keyword: Include Files. (line 6) +* Indent mode: Clean View. (line 20) +* indentation, in code blocks: Editing Source Code. (line 32) +* indentation, in source blocks: Literal Examples. (line 73) +* index, in a publishing project: Generating an index. (line 6) +* INDEX, keyword: Generating an index. (line 17) +* INDEX, property: Indices. (line 14) +* Info: Documentation Access. + (line 6) +* Info directory file, in Texinfo export: Info directory file. + (line 6) +* Info links: External Links. (line 6) +* INFOJS_OPT, keyword: JavaScript support. (line 20) +* inheritance, of properties: Property Inheritance. + (line 6) +* inheritance, of tags: Tag Inheritance. (line 6) +* inline, in LaTeX export: Quoting LaTeX code. (line 10) +* inlining images: Images. (line 6) +* inlining images in HTML: Images in HTML export. + (line 6) +* inlining images in LaTeX: Images in LaTeX export. + (line 6) +* input-file, macro: Macro Replacement. (line 64) +* inserting links: Handling Links. (line 69) +* insertion, of templates: Structure Templates. (line 6) +* insertion, of templates <1>: Structure Templates. (line 21) +* install-info, in Texinfo export: Info directory file. (line 6) +* installation: Installation. (line 6) +* Installing Org protocol: Protocols. (line 14) +* internal links: Internal Links. (line 6) +* internal links, in HTML export: Links in HTML export. + (line 6) +* introduction: Introduction. (line 6) +* irc links: External Links. (line 6) +* italic text, markup rules: Emphasis and Monospace. + (line 6) +* ITEM, special property: Special Properties. (line 13) +* jumping, to headlines: Motion. (line 6) +* key bindings, global: Activation. (line 6) +* keystroke index, in Texinfo export: Indices. (line 6) +* keyword options: Per-file keywords. (line 6) +* keyword, macro: Macro Replacement. (line 41) +* KEYWORDS, keyword: Beamer specific export settings. + (line 37) +* KEYWORDS, keyword <1>: HTML specific export settings. + (line 43) +* KEYWORDS, keyword <2>: LaTeX specific export settings. + (line 54) +* KEYWORDS, keyword <3>: ODT specific export settings. + (line 16) +* KINDEX, keyword: Indices. (line 6) +* language specific default header arguments: Using Header Arguments. + (line 36) +* language specific header arguments properties: Using Header Arguments. + (line 74) +* language, in code blocks: Structure of Code Blocks. + (line 47) +* LANGUAGE, keyword: Export Settings. (line 38) +* LANGUAGE, keyword <1>: LaTeX specific export settings. + (line 20) +* LAST_REPEAT, property: Clocking commands. (line 20) +* LaTeX class: LaTeX header and sectioning. + (line 6) +* LaTeX export: LaTeX Export. (line 6) +* LaTeX fragments: LaTeX fragments. (line 6) +* LaTeX fragments, preview: Previewing LaTeX fragments. + (line 6) +* LaTeX header: LaTeX header and sectioning. + (line 6) +* LaTeX interpretation: Embedded LaTeX. (line 6) +* LaTeX sectioning structure: LaTeX header and sectioning. + (line 6) +* LaTeX, and Orgtbl mode: A LaTeX example. (line 6) +* LATEX, keyword: Quoting LaTeX code. (line 14) +* LATEX_CLASS, keyword: LaTeX specific export settings. + (line 32) +* LATEX_CLASS, keyword <1>: LaTeX header and sectioning. + (line 23) +* LATEX_CLASS_OPTIONS, keyword: LaTeX specific export settings. + (line 40) +* LATEX_CLASS_OPTIONS, keyword <1>: LaTeX header and sectioning. + (line 23) +* LATEX_COMPILER, keyword: LaTeX/PDF export commands. + (line 25) +* LATEX_COMPILER, keyword <1>: LaTeX specific export settings. + (line 44) +* LATEX_HEADER, keyword: HTML specific export settings. + (line 48) +* LATEX_HEADER, keyword <1>: LaTeX specific export settings. + (line 49) +* LATEX_HEADER, keyword <2>: LaTeX header and sectioning. + (line 30) +* LATEX_HEADER_EXTRA, keyword: LaTeX specific export settings. + (line 49) +* LATEX_HEADER_EXTRA, keyword <1>: LaTeX header and sectioning. + (line 30) +* Latin-1 export: ASCII/Latin-1/UTF-8 export. + (line 6) +* level, for tags/property match: Matching tags and properties. + (line 64) +* LibreOffice: OpenDocument Text Export. + (line 6) +* limits, in agenda: Filtering/limiting agenda times. + (line 111) +* line breaks, markup rules: Paragraphs. (line 9) +* lines, include: Include Files. (line 36) +* link abbreviations: Link Abbreviations. (line 6) +* link abbreviations, completion of: Completion. (line 6) +* link completion: Handling Links. (line 69) +* link format: Link Format. (line 6) +* LINK, keyword: Link Abbreviations. (line 50) +* LINK, keyword <1>: In-buffer Settings. (line 38) +* links, external: External Links. (line 6) +* links, finding next/previous: Handling Links. (line 151) +* links, handling: Handling Links. (line 6) +* links, in HTML export: Links in HTML export. + (line 6) +* links, in ODT export: Links in ODT export. (line 6) +* links, internal: Internal Links. (line 6) +* links, publishing: Publishing links. (line 6) +* links, radio targets: Radio Targets. (line 6) +* links, returning to: Handling Links. (line 144) +* linter: Org Syntax. (line 24) +* Lisp forms, as table formulas: Formula syntax for Lisp. + (line 6) +* list of listings: Table of Contents. (line 6) +* list of tables: Table of Contents. (line 6) +* lists, in other modes: Tables in Arbitrary Syntax. + (line 6) +* lists, ordered: Plain Lists. (line 6) +* lists, plain: Plain Lists. (line 6) +* literal examples, markup rules: Literal Examples. (line 6) +* LOCATION, property: iCalendar Export. (line 51) +* logging, of progress: Progress Logging. (line 6) +* LOGGING, property: Tracking TODO state changes. + (line 46) +* LOGGING, property <1>: Property Inheritance. + (line 37) +* LOG_INTO_DRAWER, property: Tracking TODO state changes. + (line 6) +* LOG_INTO_DRAWER, property <1>: Clocking commands. (line 7) +* lookup functions in tables: Lookup functions. (line 6) +* lualatex: LaTeX/PDF export commands. + (line 25) +* macro replacement, during export: Macro Replacement. (line 6) +* MACRO, keyword: Macro Replacement. (line 6) +* maintainer: Feedback. (line 6) +* mapping entries, API: Using the Mapping API. + (line 6) +* mappings in open-source protocol: open-source protocol. + (line 67) +* mark ring: Handling Links. (line 139) +* Markdown export: Markdown Export. (line 6) +* marking characters, tables: Advanced features. (line 39) +* match view: Matching tags and properties. + (line 6) +* matching, of properties: Matching tags and properties. + (line 6) +* matching, of tags: Matching tags and properties. + (line 6) +* matching, tags: Tags. (line 6) +* math symbols: Special Symbols. (line 6) +* MathJax: Math formatting in HTML export. + (line 6) +* MathML: LaTeX math snippets. (line 10) +* MH-E links: External Links. (line 6) +* minlevel, include: Include Files. (line 22) +* minor mode for tables: Orgtbl Mode. (line 6) +* mkdirp, header argument: Extracting Source Code. + (line 42) +* mode, for Calc: Formula syntax for Calc. + (line 17) +* modification-time, macro: Macro Replacement. (line 56) +* motion commands in agenda: Agenda Commands. (line 19) +* motion, between headlines: Motion. (line 6) +* multiple formula lines: Editing and debugging formulas. + (line 98) +* multiple items in Texinfo lists: Plain lists in Texinfo export. + (line 17) +* n, macro: Macro Replacement. (line 75) +* NAME keyword, in source blocks: Structure of Code Blocks. + (line 6) +* NAME, keyword: References. (line 134) +* NAME, keyword <1>: Internal Links. (line 21) +* name, of column or field: References. (line 113) +* name, of column or field <1>: References. (line 134) +* named references: References. (line 113) +* names as TODO keywords: TODO types. (line 6) +* narrow columns in tables: Column Width and Alignment. + (line 6) +* no-expand, header argument: Extracting Source Code. + (line 97) +* NOBLOCKING, property: TODO dependencies. (line 29) +* noweb, header argument: Noweb Reference Syntax. + (line 13) +* noweb-ref, header argument: Noweb Reference Syntax. + (line 118) +* noweb-sep, header argument: Noweb Reference Syntax. + (line 150) +* occur, command: Sparse Trees. (line 6) +* occur-tree: Storing searches. (line 11) +* odd-levels-only outlines: Clean View. (line 6) +* ODT: OpenDocument Text Export. + (line 6) +* ODT, keyword: Advanced topics in ODT export. + (line 120) +* ODT_STYLES_FILE, keyword: ODT specific export settings. + (line 22) +* ODT_STYLES_FILE, keyword <1>: Applying custom styles. + (line 29) +* only-contents, include: Include Files. (line 53) +* open-source protocol: open-source protocol. + (line 6) +* OpenDocument: OpenDocument Text Export. + (line 6) +* option keyword completion: Completion. (line 6) +* options, for custom agenda views: Setting options. (line 6) +* options, for customization: Customization. (line 6) +* options, for export: Export Settings. (line 6) +* options, for publishing: Publishing options. (line 6) +* OPTIONS, keyword: Export Settings. (line 6) +* ordered lists: Plain Lists. (line 6) +* ORDERED, property: TODO dependencies. (line 6) +* ORDERED, property <1>: Checkboxes. (line 46) +* Org export: Org Export. (line 6) +* Org mode, turning on: Activation. (line 24) +* Org protocol, set-up: Protocols. (line 14) +* org-agenda, command: Weekly/daily agenda. (line 10) +* Orgtbl mode: Orgtbl Mode. (line 6) +* Orgtbl mode <1>: Tables in Arbitrary Syntax. + (line 6) +* ORGTBL, keyword: Radio tables. (line 21) +* outline tree: Headlines. (line 6) +* output-dir, header argument: Results of Evaluation. + (line 152) +* overview, global visibility state: Global and local cycling. + (line 20) +* packages, interaction with other: Interaction. (line 6) +* padline, header argument: Extracting Source Code. + (line 73) +* paragraphs, markup rules: Paragraphs. (line 6) +* passing arguments to code blocks: Environment of a Code Block. + (line 9) +* pasting, of subtrees: Structure Editing. (line 6) +* PDF export: LaTeX Export. (line 6) +* pdflatex: LaTeX/PDF export commands. + (line 25) +* per-file keywords: Per-file keywords. (line 6) +* PINDEX, keyword: Indices. (line 6) +* plain links: Link Format. (line 6) +* plain lists: Plain Lists. (line 6) +* plain lists, in LaTeX export: Plain lists in LaTeX export. + (line 6) +* plain text external links: External Links. (line 70) +* plot tables using Gnuplot: Org Plot. (line 6) +* PLOT, keyword: Org Plot. (line 12) +* post, header argument: Results of Evaluation. + (line 272) +* presentation, of agenda items: Presentation and Sorting. + (line 6) +* print edition: Summary. (line 54) +* printing sparse trees: Sparse Trees. (line 52) +* priorities: Priorities. (line 6) +* PRIORITIES, keyword: Priorities. (line 44) +* PRIORITIES, keyword <1>: In-buffer Settings. (line 43) +* priorities, of agenda items: Sorting of agenda items. + (line 6) +* priority cookie: Priorities. (line 6) +* PRIORITY, special property: Special Properties. (line 13) +* program index, in Texinfo export: Indices. (line 6) +* progress logging: Progress Logging. (line 6) +* projects, for publishing: Project alist. (line 6) +* prologue, header argument: Environment of a Code Block. + (line 342) +* promotion, of subtrees: Structure Editing. (line 6) +* proof, in LaTeX export: Special blocks in LaTeX export. + (line 6) +* properties: Properties and Columns. + (line 6) +* properties, API: Using the Property API. + (line 6) +* properties, column view: Defining columns. (line 6) +* properties, inheritance: Property Inheritance. + (line 6) +* properties, searching: Property Searches. (line 6) +* properties, special: Special Properties. (line 6) +* property syntax: Property Syntax. (line 6) +* PROPERTY, keyword: Property Syntax. (line 46) +* PROPERTY, keyword <1>: In-buffer Settings. (line 48) +* property, macro: Macro Replacement. (line 68) +* protocol, capture: capture protocol. (line 6) +* protocol, new protocol: Protocols. (line 25) +* protocol, open-source: open-source protocol. + (line 6) +* protocol, open-source rewritten URL: open-source protocol. + (line 32) +* protocol, open-source, set-up mapping: open-source protocol. + (line 67) +* protocol, store-link: store-link protocol. (line 6) +* protocols, for external access: Protocols. (line 6) +* publishing: Publishing. (line 6) +* publishing options: Publishing options. (line 6) +* query editing, in agenda: Filtering/limiting agenda times. + (line 17) +* quote blocks: Paragraphs. (line 25) +* radio tables: Radio tables. (line 6) +* radio targets: Radio Targets. (line 6) +* range formula: Field and range formulas. + (line 6) +* range references: References. (line 64) +* ranges, time: Timestamps. (line 6) +* recomputing table fields: Updating the table. (line 6) +* references: References. (line 6) +* references, named: References. (line 113) +* references, remote: References. (line 134) +* references, to a different table: References. (line 134) +* references, to fields: References. (line 15) +* references, to ranges: References. (line 64) +* refiling notes: Refile and Copy. (line 6) +* refresh set-up: In-buffer Settings. (line 11) +* region, active: Structure Editing. (line 132) +* regular expressions, with tags search: Matching tags and properties. + (line 53) +* relative timer: Timers. (line 6) +* reminders: Weekly/daily agenda. (line 125) +* remote editing, bulk, from agenda: Agenda Commands. (line 350) +* remote editing, from agenda: Agenda Commands. (line 223) +* remote editing, undo: Agenda Commands. (line 227) +* remote references: References. (line 134) +* repeated tasks: Repeated tasks. (line 6) +* report, of clocked time: The clock table. (line 6) +* reporting a bug: Feedback. (line 6) +* resolve idle time: Resolving idle time. (line 9) +* results, header argument: Results of Evaluation. + (line 6) +* RESULTS, keyword: Evaluating Code Blocks. + (line 6) +* results, macro: Macro Replacement. (line 84) +* revealing context: Global and local cycling. + (line 42) +* rewritten URL in open-source protocol: open-source protocol. + (line 32) +* Rmail links: External Links. (line 6) +* row separator, in tables: Built-in Table Editor. + (line 6) +* row, of field coordinates: References. (line 89) +* rownames, header argument: Environment of a Code Block. + (line 73) +* RSS feeds: RSS Feeds. (line 6) +* rsync: Uploading Files. (line 6) +* SCHEDULED marker: Deadlines and Scheduling. + (line 31) +* SCHEDULED, special property: Special Properties. (line 13) +* scheduling: Timestamps. (line 6) +* scripts, for agenda processing: Extracting Agenda Information. + (line 6) +* search option in file links: Search Options. (line 6) +* search strings, custom: Custom Searches. (line 6) +* search view: Search view. (line 6) +* searching for tags: Tag Searches. (line 6) +* searching, for text: Search view. (line 6) +* searching, of properties: Property Searches. (line 6) +* sectioning structure, for LaTeX export: LaTeX header and sectioning. + (line 6) +* SELECT_TAGS, keyword: Export Settings. (line 44) +* sep, header argument: Results of Evaluation. + (line 178) +* SEQ_TODO, keyword: Per-file keywords. (line 6) +* SEQ_TODO, keyword <1>: In-buffer Settings. (line 265) +* session, header argument: Environment of a Code Block. + (line 272) +* setting tags: Setting Tags. (line 6) +* SETUPFILE, keyword: Export Settings. (line 13) +* SETUPFILE, keyword <1>: In-buffer Settings. (line 53) +* sexp timestamps: Timestamps. (line 34) +* shebang, header argument: Extracting Source Code. + (line 83) +* shell links: External Links. (line 6) +* shift-selection-mode: Plain Lists. (line 95) +* shift-selection-mode <1>: Conflicts. (line 6) +* show all, command: Global and local cycling. + (line 39) +* show all, global visibility state: Global and local cycling. + (line 20) +* show branches, command: Global and local cycling. + (line 51) +* show children, command: Global and local cycling. + (line 55) +* show hidden text: Visibility Cycling. (line 6) +* shy hyphen, special symbol: Special Symbols. (line 36) +* sitemap, of published pages: Site map. (line 6) +* smartphone: Org Mobile. (line 6) +* sorting, of agenda items: Sorting of agenda items. + (line 6) +* sorting, of plain list: Plain Lists. (line 159) +* sorting, of subtrees: Structure Editing. (line 6) +* source block: Literal Examples. (line 30) +* source blocks, in LaTeX export: Source blocks in LaTeX export. + (line 6) +* source code, batch execution: Batch Execution. (line 6) +* source code, block structure: Structure of Code Blocks. + (line 6) +* source code, editing: Editing Source Code. (line 6) +* source code, evaluating: Evaluating Code Blocks. + (line 6) +* source code, exporting: Exporting Code Blocks. + (line 6) +* source code, extracting: Extracting Source Code. + (line 6) +* source code, inline: Structure of Code Blocks. + (line 24) +* source code, languages: Languages. (line 6) +* source code, library: Library of Babel. (line 6) +* source code, Noweb reference: Noweb Reference Syntax. + (line 6) +* source code, results of evaluation: Results of Evaluation. + (line 6) +* source code, working with: Working with Source Code. + (line 6) +* sparse tree, for deadlines: Inserting deadline/schedule. + (line 26) +* sparse tree, for TODO: TODO Basics. (line 41) +* sparse tree, tag based: Tags. (line 6) +* sparse trees: Sparse Trees. (line 6) +* special blocks, in ASCII export: ASCII/Latin-1/UTF-8 export. + (line 84) +* special blocks, in LaTeX export: Special blocks in LaTeX export. + (line 6) +* special keywords: In-buffer Settings. (line 6) +* special symbols: Special Symbols. (line 6) +* special symbols, in-buffer display: Special Symbols. (line 27) +* speed keys: Speed Keys. (line 6) +* speedbar.el: Cooperation. (line 41) +* spreadsheet capabilities: The Spreadsheet. (line 6) +* square brackets in links: Link Format. (line 17) +* square brackets, around links: External Links. (line 70) +* startup visibility: Global and local cycling. + (line 35) +* STARTUP, keyword: Initial visibility. (line 12) +* STARTUP, keyword <1>: Blocks. (line 14) +* STARTUP, keyword <2>: In-buffer Settings. (line 65) +* statistics, for checkboxes: Checkboxes. (line 30) +* statistics, for TODO items: Breaking Down Tasks. (line 6) +* store-link protocol: store-link protocol. (line 6) +* storing link, in a source code buffer: Literal Examples. (line 99) +* storing links: Handling Links. (line 9) +* strike-through text, markup rules: Emphasis and Monospace. + (line 6) +* structure editing: Structure Editing. (line 6) +* structure of document: Document Structure. (line 6) +* STYLE, property: Tracking your habits. + (line 6) +* styles, custom: Applying custom styles. + (line 6) +* styles, custom <1>: Advanced topics in ODT export. + (line 34) +* SUBAUTHOR, keyword: Texinfo specific export settings. + (line 14) +* SUBAUTHOR, keyword <1>: Texinfo title and copyright page. + (line 12) +* sublevels, inclusion into tags match: Tag Inheritance. (line 6) +* sublevels, inclusion into TODO list: Global TODO list. (line 38) +* subscript: Subscripts and Superscripts. + (line 6) +* SUBTITLE, keyword: ASCII/Latin-1/UTF-8 export. + (line 46) +* SUBTITLE, keyword <1>: Beamer specific export settings. + (line 44) +* SUBTITLE, keyword <2>: HTML specific export settings. + (line 53) +* SUBTITLE, keyword <3>: LaTeX specific export settings. + (line 63) +* SUBTITLE, keyword <4>: ODT specific export settings. + (line 26) +* SUBTITLE, keyword <5>: Texinfo specific export settings. + (line 11) +* subtree cycling: Global and local cycling. + (line 6) +* subtree visibility states: Global and local cycling. + (line 6) +* subtree, cut and paste: Structure Editing. (line 6) +* subtree, subtree visibility state: Global and local cycling. + (line 6) +* subtrees, cut and paste: Structure Editing. (line 6) +* summary: Summary. (line 6) +* SUMMARY, property: iCalendar Export. (line 51) +* superscript: Subscripts and Superscripts. + (line 6) +* switches, in code blocks: Structure of Code Blocks. + (line 52) +* syntax checker: Org Syntax. (line 24) +* syntax, Noweb: Noweb Reference Syntax. + (line 6) +* syntax, of formulas: Formula syntax for Calc. + (line 6) +* table editor, built-in: Built-in Table Editor. + (line 6) +* table editor, table.el: Cooperation. (line 49) +* table indirection: References. (line 147) +* table lookup functions: Lookup functions. (line 6) +* table of contents: Table of Contents. (line 6) +* table of contents, exclude entries: Table of Contents. (line 15) +* table syntax: Built-in Table Editor. + (line 6) +* table types, in Texinfo export: Plain lists in Texinfo export. + (line 6) +* table.el: Cooperation. (line 49) +* tables: Tables. (line 6) +* tables, in HTML: Tables in HTML export. + (line 6) +* tables, in LaTeX export: Tables in LaTeX export. + (line 6) +* tables, in ODT export: Tables in ODT export. + (line 6) +* tables, in ODT export <1>: Advanced topics in ODT export. + (line 151) +* tables, in other modes: Tables in Arbitrary Syntax. + (line 6) +* tag completion: Completion. (line 6) +* tag filtering, in agenda: Filtering/limiting agenda times. + (line 17) +* tag inheritance: Tag Inheritance. (line 6) +* tag searches: Tag Searches. (line 6) +* tags: Tags. (line 6) +* tags hierarchy: Tag Hierarchy. (line 6) +* tags view: Matching tags and properties. + (line 6) +* tags, as an agenda view: Storing searches. (line 11) +* tags, groups: Tag Hierarchy. (line 6) +* TAGS, keyword: Setting Tags. (line 22) +* TAGS, keyword <1>: In-buffer Settings. (line 258) +* tags, setting: Setting Tags. (line 6) +* TAGS, special property: Special Properties. (line 13) +* tags-todo: Storing searches. (line 11) +* tags-tree: Storing searches. (line 11) +* tangle, header argument: Extracting Source Code. + (line 23) +* tangle-mode, header argument: Extracting Source Code. + (line 89) +* tangling: Extracting Source Code. + (line 6) +* targets, for links: Internal Links. (line 6) +* targets, radio: Radio Targets. (line 6) +* tasks, breaking down: Breaking Down Tasks. (line 6) +* tasks, repeated: Repeated tasks. (line 6) +* TBLFM keywords, multiple: Editing and debugging formulas. + (line 98) +* TBLFM, keyword: Field and range formulas. + (line 12) +* TBLFM, switching: Editing and debugging formulas. + (line 98) +* template expansion: Structure Templates. (line 21) +* template insertion: Structure Templates. (line 6) +* template, custom: Applying custom styles. + (line 6) +* template, custom <1>: Advanced topics in ODT export. + (line 34) +* templates, for Capture: Capture templates. (line 6) +* Tempo: Structure Templates. (line 21) +* TeX interpretation: Embedded LaTeX. (line 6) +* TeX symbol completion: Completion. (line 6) +* TEXINFO, keyword: Quoting Texinfo code. + (line 9) +* TEXINFO_CLASS, keyword: Texinfo specific export settings. + (line 20) +* TEXINFO_CLASS, keyword <1>: Texinfo file header. (line 19) +* TEXINFO_CLASS, keyword <2>: Headings and sectioning structure. + (line 6) +* TEXINFO_DIR_CATEGORY, keyword: Texinfo specific export settings. + (line 30) +* TEXINFO_DIR_CATEGORY, keyword <1>: Info directory file. (line 6) +* TEXINFO_DIR_DESC, keyword: Texinfo specific export settings. + (line 36) +* TEXINFO_DIR_DESC, keyword <1>: Info directory file. (line 6) +* TEXINFO_DIR_TITLE, keyword: Texinfo specific export settings. + (line 33) +* TEXINFO_DIR_TITLE, keyword <1>: Info directory file. (line 6) +* TEXINFO_FILENAME, keyword: Texinfo specific export settings. + (line 17) +* TEXINFO_FILENAME, keyword <1>: Texinfo file header. (line 6) +* TEXINFO_HEADER, keyword: Texinfo specific export settings. + (line 24) +* TEXINFO_HEADER, keyword <1>: Texinfo file header. (line 11) +* TEXINFO_POST_HEADER, keyword: Texinfo specific export settings. + (line 27) +* TEXINFO_PRINTED_TITLE, keyword: Texinfo specific export settings. + (line 39) +* TEXINFO_PRINTED_TITLE, keyword <1>: Texinfo title and copyright page. + (line 6) +* text areas, in HTML: Text areas in HTML export. + (line 6) +* text search: Search view. (line 6) +* time clocking: Clocking Work Time. (line 6) +* time format, custom: Custom time format. (line 6) +* time grid: Time-of-day specifications. + (line 31) +* time, computing: Durations and time values. + (line 6) +* time, macro: Macro Replacement. (line 56) +* time, reading in minibuffer: The date/time prompt. + (line 6) +* time-of-day specification: Time-of-day specifications. + (line 6) +* timerange: Timestamps. (line 42) +* times: Dates and Times. (line 6) +* timestamp: Dates and Times. (line 6) +* timestamp <1>: Timestamps. (line 14) +* timestamp, inactive: Timestamps. (line 50) +* TIMESTAMP, special property: Special Properties. (line 13) +* timestamp, with repeater interval: Timestamps. (line 25) +* timestamps: Timestamps. (line 6) +* TIMESTAMP_IA, special property: Special Properties. (line 13) +* TIMEZONE, property: iCalendar Export. (line 51) +* TINDEX, keyword: Indices. (line 6) +* TITLE, keyword: Export Settings. (line 60) +* title, macro: Macro Replacement. (line 41) +* toc, in OPTIONS keyword: Table of Contents. (line 6) +* TOC, keyword: Table of Contents. (line 24) +* TODO dependencies: TODO dependencies. (line 6) +* TODO dependencies, NOBLOCKING: TODO dependencies. (line 29) +* TODO items: TODO Items. (line 6) +* TODO keyword matching: Global TODO list. (line 18) +* TODO keyword matching, with tags search: Matching tags and properties. + (line 64) +* TODO keyword sets: Multiple sets in one file. + (line 6) +* TODO keywords completion: Completion. (line 6) +* TODO list, global: Global TODO list. (line 6) +* TODO types: TODO types. (line 6) +* TODO workflow: Workflow states. (line 6) +* todo, as an agenda view: Storing searches. (line 11) +* TODO, keyword: Per-file keywords. (line 6) +* TODO, keyword <1>: In-buffer Settings. (line 265) +* TODO, special property: Special Properties. (line 13) +* todo-tree: Storing searches. (line 11) +* top headline filtering, in agenda: Filtering/limiting agenda times. + (line 17) +* Top node, in Texinfo export: Headings and sectioning structure. + (line 37) +* transient mark mode: Structure Editing. (line 132) +* translator function: Translator functions. + (line 6) +* trees, sparse: Sparse Trees. (line 6) +* trees, visibility: Visibility Cycling. (line 6) +* tty key bindings: TTY Keys. (line 6) +* two-column tables, in Texinfo export: Plain lists in Texinfo export. + (line 6) +* types as TODO keywords: TODO types. (line 6) +* TYP_TODO, keyword: Per-file keywords. (line 6) +* TYP_TODO, keyword <1>: In-buffer Settings. (line 265) +* underlined text, markup rules: Emphasis and Monospace. + (line 6) +* undoing remote-editing events: Agenda Commands. (line 227) +* unison: Uploading Files. (line 6) +* UNNUMBERED, property: Export Settings. (line 149) +* unoconv: Extending ODT export. + (line 12) +* updating, table: Updating the table. (line 6) +* URL links: External Links. (line 6) +* Usenet links: External Links. (line 6) +* using sessions in code blocks: Environment of a Code Block. + (line 272) +* UTF-8 export: ASCII/Latin-1/UTF-8 export. + (line 6) +* var, header argument: Environment of a Code Block. + (line 9) +* variable index, in Texinfo export: Indices. (line 6) +* variables, for customization: Customization. (line 6) +* vectors, in table calculations: Formula syntax for Calc. + (line 14) +* verbatim blocks, in LaTeX export: Example blocks in LaTeX export. + (line 6) +* verbatim text, markup rules: Emphasis and Monospace. + (line 6) +* verse blocks: Paragraphs. (line 13) +* view file commands in agenda: Agenda Commands. (line 28) +* VINDEX, keyword: Indices. (line 6) +* viper.el: Conflicts. (line 51) +* visibility cycling: Visibility Cycling. (line 6) +* visibility cycling, drawers: Drawers. (line 6) +* VISIBILITY, property: Initial visibility. (line 17) +* visible text, printing: Sparse Trees. (line 52) +* VM links: External Links. (line 43) +* Wanderlust links: External Links. (line 43) +* weekly agenda: Weekly/daily agenda. (line 6) +* windmove.el: Conflicts. (line 60) +* workflow states as TODO keywords: Workflow states. (line 6) +* working directory, in a code block: Environment of a Code Block. + (line 302) +* wrap, header argument: Results of Evaluation. + (line 231) +* xelatex: LaTeX/PDF export commands. + (line 25) +* yasnippet.el: Conflicts. (line 74) +* zero width space: Escape Character. (line 6) +* zip: Pre-requisites for ODT export. + (line 6) + + +File: org, Node: Key Index, Next: Command and Function Index, Prev: Main Index, Up: Top + +E Key Index +*********** + +[index] +* Menu: + +* !: Setting Tags. (line 126) +* ! (Agenda dispatcher): Stuck projects. (line 17) +* # (Agenda dispatcher): Stuck projects. (line 14) +* $: Agenda Commands. (line 263) +* %: Agenda Commands. (line 377) +* ': CDLaTeX mode. (line 54) +* *: Agenda Commands. (line 357) +* * (Agenda dispatcher): Agenda Dispatcher. (line 49) +* +: Agenda Commands. (line 285) +* ,: Agenda Commands. (line 277) +* -: Agenda Commands. (line 290) +* .: Agenda Commands. (line 118) +* / (Agenda dispatcher): Agenda Dispatcher. (line 28) +* 1..9,0: Using column view. (line 35) +* :: Agenda Commands. (line 273) +* <: Using column view. (line 66) +* < <1>: The date/time prompt. + (line 81) +* < (Agenda dispatcher): Agenda Dispatcher. (line 38) +* < < (Agenda dispatcher): Agenda Dispatcher. (line 43) +* >: Using column view. (line 66) +* > <1>: The date/time prompt. + (line 81) +* > <2>: Agenda Commands. (line 326) +* ? (Agenda dispatcher): Pulling from the mobile application. + (line 39) +* [: Agenda Commands. (line 142) +* ^: CDLaTeX mode. (line 40) +* _: CDLaTeX mode. (line 40) +* `: CDLaTeX mode. (line 48) +* a: Using column view. (line 56) +* A: Agenda Commands. (line 64) +* a <1>: Agenda Commands. (line 250) +* a (Agenda dispatcher): Weekly/daily agenda. (line 10) +* b: Agenda Commands. (line 115) +* B: Agenda Commands. (line 381) +* C: Resolving idle time. (line 46) +* c: Agenda Commands. (line 445) +* c <1>: Agenda Commands. (line 448) +* C <1>: Agenda Commands. (line 479) +* C (Agenda dispatcher): Storing searches. (line 11) +* C (Capture menu: Capture templates. (line 11) +* C-#: Advanced features. (line 11) +* C-': Agenda Files. (line 26) +* C-,: Agenda Files. (line 26) +* C-0 C-c C-w: Refile and Copy. (line 50) +* C-2 C-c C-w: Refile and Copy. (line 42) +* C-3 C-c C-w: Refile and Copy. (line 45) +* C-c !: Creating Timestamps. (line 25) +* C-c #: Checkboxes. (line 88) +* C-c $: Moving subtrees. (line 10) +* C-c %: Handling Links. (line 139) +* C-c &: Handling Links. (line 144) +* C-c ': Editing and debugging formulas. + (line 37) +* C-c ' <1>: Literal Examples. (line 90) +* C-c ' <2>: Include Files. (line 64) +* C-c ' <3>: Editing Source Code. (line 6) +* C-c ' <4>: Cooperation. (line 59) +* C-c *: Structure Editing. (line 124) +* C-c * <1>: Plain Lists. (line 143) +* C-c * <2>: Updating the table. (line 14) +* C-c +: Built-in Table Editor. + (line 168) +* C-c ,: Priorities. (line 25) +* C-c -: Plain Lists. (line 131) +* C-c - <1>: Built-in Table Editor. + (line 113) +* C-c .: Creating Timestamps. (line 11) +* C-c /: Sparse Trees. (line 16) +* C-c / <1>: Conflicts. (line 51) +* C-c / /: Sparse Trees. (line 20) +* C-c / a: Inserting deadline/schedule. + (line 36) +* C-c / b: Inserting deadline/schedule. + (line 33) +* C-c / d: Inserting deadline/schedule. + (line 26) +* C-c / m: Tag Searches. (line 10) +* C-c / m <1>: Property Searches. (line 11) +* C-c / p: Property Searches. (line 29) +* C-c / r: Sparse Trees. (line 20) +* C-c / t: TODO Basics. (line 41) +* C-c ;: Comment Lines. (line 20) +* C-c <: Creating Timestamps. (line 32) +* C-c =: Column formulas. (line 33) +* C-c = <1>: Editing and debugging formulas. + (line 14) +* C-c >: Creating Timestamps. (line 35) +* C-c ?: Editing and debugging formulas. + (line 25) +* C-c @: Structure Editing. (line 61) +* C-c C-*: Plain Lists. (line 148) +* C-c C-,: Structure Templates. (line 11) +* C-c C-a: Attachments. (line 27) +* C-c C-a <1>: Agenda Commands. (line 298) +* C-c C-a a: Attachments. (line 32) +* C-c C-a c: Attachments. (line 38) +* C-c C-a d: Attachments. (line 64) +* C-c C-a D: Attachments. (line 67) +* C-c C-a f: Attachments. (line 58) +* C-c C-a F: Attachments. (line 61) +* C-c C-a i: Attachments. (line 76) +* C-c C-a l: Attachments. (line 38) +* C-c C-a m: Attachments. (line 38) +* C-c C-a n: Attachments. (line 42) +* C-c C-a o: Attachments. (line 49) +* C-c C-a O: Attachments. (line 55) +* C-c C-a s: Attachments. (line 71) +* C-c C-a z: Attachments. (line 45) +* C-c C-b: Motion. (line 18) +* C-c C-b <1>: Editing support. (line 12) +* C-c C-c: Plain Lists. (line 126) +* C-c C-c <1>: Creating Footnotes. (line 67) +* C-c C-c <2>: Built-in Table Editor. + (line 60) +* C-c C-c <3>: Column Width and Alignment. + (line 17) +* C-c C-c <4>: Editing and debugging formulas. + (line 45) +* C-c C-c <5>: Editing and debugging formulas. + (line 91) +* C-c C-c <6>: Editing and debugging formulas. + (line 98) +* C-c C-c <7>: Checkboxes. (line 53) +* C-c C-c <8>: Setting Tags. (line 20) +* C-c C-c <9>: Setting Tags. (line 130) +* C-c C-c <10>: Property Syntax. (line 95) +* C-c C-c <11>: Using column view. (line 49) +* C-c C-c <12>: Capturing column view. + (line 67) +* C-c C-c <13>: Creating Timestamps. (line 29) +* C-c C-c <14>: Clocking commands. (line 52) +* C-c C-c <15>: The clock table. (line 19) +* C-c C-c <16>: Evaluating Code Blocks. + (line 22) +* C-c C-c <17>: Key bindings and Useful Functions. + (line 11) +* C-c C-c <18>: The Very Busy C-c C-c Key. + (line 6) +* C-c C-c (Capture buffer): Using capture. (line 15) +* C-c C-c c: Property Syntax. (line 112) +* C-c C-c d: Property Syntax. (line 106) +* C-c C-c D: Property Syntax. (line 109) +* C-c C-c m m: Markdown Export. (line 17) +* C-c C-c m M: Markdown Export. (line 21) +* C-c C-c s: Property Syntax. (line 98) +* C-c C-d: Inserting deadline/schedule. + (line 10) +* C-c C-d <1>: Agenda Commands. (line 305) +* C-c C-e: The Export Dispatcher. + (line 16) +* C-c C-e c a: iCalendar Export. (line 43) +* C-c C-e c c: iCalendar Export. (line 47) +* C-c C-e c f: iCalendar Export. (line 39) +* C-c C-e C-a: The Export Dispatcher. + (line 28) +* C-c C-e C-b: The Export Dispatcher. + (line 46) +* C-c C-e C-s: The Export Dispatcher. + (line 52) +* C-c C-e C-v: The Export Dispatcher. + (line 64) +* C-c C-e E: Triggering Publication. + (line 19) +* C-c C-e F: Triggering Publication. + (line 16) +* C-c C-e h h: HTML export commands. + (line 7) +* C-c C-e h H: HTML export commands. + (line 14) +* C-c C-e h o: HTML export commands. + (line 7) +* C-c C-e i i: Texinfo export commands. + (line 11) +* C-c C-e i t: Texinfo export commands. + (line 7) +* C-c C-e l b: Beamer export commands. + (line 7) +* C-c C-e l B: Beamer export commands. + (line 12) +* C-c C-e l l: LaTeX/PDF export commands. + (line 7) +* C-c C-e l L: LaTeX/PDF export commands. + (line 11) +* C-c C-e l O: Beamer export commands. + (line 20) +* C-c C-e l o: LaTeX/PDF export commands. + (line 17) +* C-c C-e l P: Beamer export commands. + (line 16) +* C-c C-e l p: LaTeX/PDF export commands. + (line 14) +* C-c C-e m o: Markdown Export. (line 24) +* C-c C-e o o: ODT export commands. (line 7) +* C-c C-e o O: ODT export commands. (line 23) +* C-c C-e O o: Org Export. (line 15) +* C-c C-e O v: Org Export. (line 19) +* C-c C-e P: Triggering Publication. + (line 13) +* C-c C-e t a: ASCII/Latin-1/UTF-8 export. + (line 26) +* C-c C-e t A: ASCII/Latin-1/UTF-8 export. + (line 35) +* C-c C-e t l: ASCII/Latin-1/UTF-8 export. + (line 26) +* C-c C-e t L: ASCII/Latin-1/UTF-8 export. + (line 35) +* C-c C-e t u: ASCII/Latin-1/UTF-8 export. + (line 26) +* C-c C-e t U: ASCII/Latin-1/UTF-8 export. + (line 35) +* C-c C-e v: Sparse Trees. (line 52) +* C-c C-e X: Triggering Publication. + (line 9) +* C-c C-f: Motion. (line 15) +* C-c C-j: Motion. (line 24) +* C-c C-k: Global and local cycling. + (line 51) +* C-c C-k (Capture buffer): Using capture. (line 31) +* C-c C-l: Handling Links. (line 69) +* C-c C-n: Motion. (line 9) +* C-c C-o: Creating Footnotes. (line 73) +* C-c C-o <1>: Handling Links. (line 106) +* C-c C-o <2>: Creating Timestamps. (line 40) +* C-c C-o <3>: Agenda Commands. (line 56) +* C-c C-o <4>: Key bindings and Useful Functions. + (line 11) +* C-c C-p: Motion. (line 12) +* C-c C-q: Editing and debugging formulas. + (line 49) +* C-c C-q <1>: Setting Tags. (line 11) +* C-c C-r: Global and local cycling. + (line 42) +* C-c C-r <1>: Editing and debugging formulas. + (line 52) +* C-c C-s: Inserting deadline/schedule. + (line 18) +* C-c C-s <1>: Agenda Commands. (line 301) +* C-c C-t: TODO Basics. (line 14) +* C-c C-t <1>: Clocking commands. (line 70) +* C-c C-u: Motion. (line 21) +* C-c C-v a: Key bindings and Useful Functions. + (line 20) +* C-c C-v b: Key bindings and Useful Functions. + (line 20) +* C-c C-v c: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-a: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-b: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-c: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-d: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-e: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-f: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-g: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-h: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-i: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-I: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-j: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-l: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-n: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-o: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-p: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-r: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-s: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-t: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-u: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-v: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-x: Key bindings and Useful Functions. + (line 20) +* C-c C-v C-z: Key bindings and Useful Functions. + (line 20) +* C-c C-v d: Key bindings and Useful Functions. + (line 20) +* C-c C-v e: Evaluating Code Blocks. + (line 22) +* C-c C-v e <1>: Key bindings and Useful Functions. + (line 20) +* C-c C-v f: Extracting Source Code. + (line 116) +* C-c C-v f <1>: Key bindings and Useful Functions. + (line 20) +* C-c C-v g: Key bindings and Useful Functions. + (line 20) +* C-c C-v h: Key bindings and Useful Functions. + (line 20) +* C-c C-v i: Library of Babel. (line 12) +* C-c C-v i <1>: Key bindings and Useful Functions. + (line 20) +* C-c C-v I: Key bindings and Useful Functions. + (line 20) +* C-c C-v j: Key bindings and Useful Functions. + (line 20) +* C-c C-v l: Key bindings and Useful Functions. + (line 20) +* C-c C-v n: Key bindings and Useful Functions. + (line 20) +* C-c C-v o: Key bindings and Useful Functions. + (line 20) +* C-c C-v p: Key bindings and Useful Functions. + (line 20) +* C-c C-v r: Key bindings and Useful Functions. + (line 20) +* C-c C-v s: Key bindings and Useful Functions. + (line 20) +* C-c C-v t: Extracting Source Code. + (line 111) +* C-c C-v t <1>: Key bindings and Useful Functions. + (line 20) +* C-c C-v u: Key bindings and Useful Functions. + (line 20) +* C-c C-v v: Key bindings and Useful Functions. + (line 20) +* C-c C-v x: Key bindings and Useful Functions. + (line 20) +* C-c C-v z: Key bindings and Useful Functions. + (line 20) +* C-c C-w: Structure Editing. (line 99) +* C-c C-w <1>: Refile and Copy. (line 17) +* C-c C-w <2>: Agenda Commands. (line 247) +* C-c C-w (Capture buffer): Using capture. (line 22) +* C-c C-x ,: Timers. (line 44) +* C-c C-x -: Timers. (line 36) +* C-c C-x .: Timers. (line 32) +* C-c C-x 0: Timers. (line 13) +* C-c C-x ;: Timers. (line 23) +* C-c C-x <: Agenda Files. (line 43) +* C-c C-x >: Agenda Files. (line 52) +* C-c C-x > <1>: Agenda Commands. (line 206) +* C-c C-x a: Internal archiving. (line 39) +* C-c C-x A: Internal archiving. (line 54) +* C-c C-x a <1>: Agenda Commands. (line 255) +* C-c C-x A <1>: Agenda Commands. (line 259) +* C-c C-x b: Global and local cycling. + (line 59) +* C-c C-x b <1>: Agenda Commands. (line 49) +* C-c C-x c: Structure Editing. (line 91) +* C-c C-x C-a: Archiving. (line 12) +* C-c C-x C-a <1>: Agenda Commands. (line 250) +* C-c C-x C-b: Checkboxes. (line 59) +* C-c C-x C-c: Using column view. (line 10) +* C-c C-x C-c <1>: Agenda Commands. (line 197) +* C-c C-x C-c <2>: Agenda Column View. (line 12) +* C-c C-x C-d: Clocking commands. (line 83) +* C-c C-x C-e: Clocking commands. (line 49) +* C-c C-x C-e <1>: Effort Estimates. (line 20) +* C-c C-x C-i: Clocking commands. (line 7) +* C-c C-x C-j: Clocking commands. (line 78) +* C-c C-x C-l: Previewing LaTeX fragments. + (line 18) +* C-c C-x C-n: Handling Links. (line 151) +* C-c C-x C-o: Clocking commands. (line 35) +* C-c C-x C-p: Handling Links. (line 151) +* C-c C-x C-q: Clocking commands. (line 74) +* C-c C-x C-r: The clock table. (line 11) +* C-c C-x C-s: Moving subtrees. (line 10) +* C-c C-x C-s <1>: Agenda Commands. (line 263) +* C-c C-x C-t: Custom time format. (line 13) +* C-c C-x C-u: Capturing column view. + (line 67) +* C-c C-x C-u <1>: The clock table. (line 19) +* C-c C-x C-u <2>: Dynamic Blocks. (line 22) +* C-c C-x C-v: Images. (line 24) +* C-c C-x C-w: Structure Editing. (line 65) +* C-c C-x C-w <1>: Built-in Table Editor. + (line 144) +* C-c C-x C-x: Clocking commands. (line 43) +* C-c C-x C-y: Structure Editing. (line 73) +* C-c C-x C-y <1>: Built-in Table Editor. + (line 148) +* C-c C-x d: Drawers. (line 18) +* C-c C-x e: Effort Estimates. (line 15) +* C-c C-x f: Creating Footnotes. (line 44) +* C-c C-x g: RSS Feeds. (line 23) +* C-c C-x G: RSS Feeds. (line 27) +* C-c C-x i: Capturing column view. + (line 63) +* C-c C-x I: Documentation Access. + (line 6) +* C-c C-x M-w: Structure Editing. (line 69) +* C-c C-x M-w <1>: Built-in Table Editor. + (line 138) +* C-c C-x o: TODO dependencies. (line 38) +* C-c C-x o <1>: Checkboxes. (line 80) +* C-c C-x p: Property Syntax. (line 86) +* C-c C-x p <1>: Using Header Arguments. + (line 70) +* C-c C-x q: Tag Hierarchy. (line 86) +* C-c C-x v: Global and local cycling. + (line 65) +* C-c C-x \: Subscripts and Superscripts. + (line 20) +* C-c C-x \ <1>: Special Symbols. (line 31) +* C-c C-x _: Timers. (line 47) +* C-c C-y: Creating Timestamps. (line 62) +* C-c C-y <1>: Clocking commands. (line 52) +* C-c C-z: Drawers. (line 39) +* C-c C-z <1>: Agenda Commands. (line 293) +* C-c M-w: Refile and Copy. (line 13) +* C-c RET: Built-in Table Editor. + (line 117) +* C-c SPC: Built-in Table Editor. + (line 67) +* C-c TAB: Global and local cycling. + (line 55) +* C-c TAB <1>: Column Width and Alignment. + (line 44) +* C-c [: Agenda Files. (line 16) +* C-c \: Tag Searches. (line 10) +* C-c \ <1>: Property Searches. (line 11) +* C-c ]: Agenda Files. (line 22) +* C-c ^: Structure Editing. (line 103) +* C-c ^ <1>: Plain Lists. (line 159) +* C-c ^ <2>: Built-in Table Editor. + (line 121) +* C-c `: Built-in Table Editor. + (line 186) +* C-c {: Editing and debugging formulas. + (line 34) +* C-c { <1>: CDLaTeX mode. (line 22) +* C-c |: Built-in Table Editor. + (line 42) +* C-c | <1>: Built-in Table Editor. + (line 205) +* C-c }: Editing and debugging formulas. + (line 29) +* C-c } <1>: Editing and debugging formulas. + (line 83) +* C-c ~: Cooperation. (line 63) +* C-g: Setting Tags. (line 120) +* C-k: Agenda Commands. (line 241) +* C-RET: Structure Editing. (line 26) +* C-S-DOWN: Clocking commands. (line 58) +* C-S-LEFT: Multiple sets in one file. + (line 28) +* C-S-LEFT <1>: Agenda Commands. (line 238) +* C-S-RET: Structure Editing. (line 33) +* C-S-RIGHT: Multiple sets in one file. + (line 28) +* C-S-RIGHT <1>: Agenda Commands. (line 235) +* C-S-UP: Clocking commands. (line 58) +* C-TAB: Internal archiving. (line 51) +* C-u C-c !: Creating Timestamps. (line 25) +* C-u C-c *: Updating the table. (line 19) +* C-u C-c .: Creating Timestamps. (line 16) +* C-u C-c =: Field and range formulas. + (line 28) +* C-u C-c = <1>: Editing and debugging formulas. + (line 14) +* C-u C-c C-c: Updating the table. (line 19) +* C-u C-c C-l: Handling Links. (line 92) +* C-u C-c C-t: TODO Basics. (line 28) +* C-u C-c C-w: Refile and Copy. (line 36) +* C-u C-c C-x a: Internal archiving. (line 44) +* C-u C-c C-x C-s: Moving subtrees. (line 14) +* C-u C-c C-x C-u: Capturing column view. + (line 71) +* C-u C-c C-x C-u <1>: The clock table. (line 23) +* C-u C-c C-x C-u <2>: Dynamic Blocks. (line 25) +* C-u C-c TAB: Column Width and Alignment. + (line 54) +* C-u C-u C-c !: Creating Timestamps. (line 25) +* C-u C-u C-c *: Updating the table. (line 24) +* C-u C-u C-c .: Creating Timestamps. (line 21) +* C-u C-u C-c =: Editing and debugging formulas. + (line 19) +* C-u C-u C-c C-c: Updating the table. (line 24) +* C-u C-u C-c C-t: Multiple sets in one file. + (line 28) +* C-u C-u C-c C-w: Refile and Copy. (line 39) +* C-u C-u C-c C-x C-s: Moving subtrees. (line 21) +* C-u C-u C-c TAB: Column Width and Alignment. + (line 57) +* C-u C-u C-u C-c C-t: TODO dependencies. (line 46) +* C-u C-u C-u C-c C-w: Refile and Copy. (line 50) +* C-u C-u C-u TAB: Global and local cycling. + (line 39) +* C-u C-u TAB: Global and local cycling. + (line 35) +* C-u C-u TAB <1>: Initial visibility. (line 23) +* C-u TAB: Global and local cycling. + (line 20) +* C-v: The date/time prompt. + (line 81) +* C-x C-s: Editing and debugging formulas. + (line 45) +* C-x C-s <1>: Agenda Commands. (line 193) +* C-x C-s <2>: Editing Source Code. (line 11) +* C-x C-w: Exporting Agenda Views. + (line 13) +* C-x n b: Structure Editing. (line 118) +* C-x n s: Structure Editing. (line 115) +* C-x n w: Structure Editing. (line 121) +* C-y: Structure Editing. (line 79) +* C-_: Agenda Commands. (line 227) +* d: Agenda Commands. (line 71) +* D: Agenda Commands. (line 127) +* e: Using column view. (line 43) +* E: Agenda Commands. (line 173) +* e (Agenda dispatcher): Exporting Agenda Views. + (line 53) +* F: Agenda Commands. (line 42) +* f: Agenda Commands. (line 110) +* g: Using column view. (line 22) +* G: Agenda Commands. (line 181) +* g <1>: Agenda Commands. (line 186) +* H: Agenda Commands. (line 483) +* I: Agenda Commands. (line 330) +* i: Agenda Commands. (line 452) +* j: Agenda Commands. (line 121) +* J: Agenda Commands. (line 124) +* J <1>: Agenda Commands. (line 340) +* k: Resolving idle time. (line 23) +* K: Resolving idle time. (line 29) +* k <1>: Agenda Commands. (line 343) +* k c (Agenda): Using capture. (line 33) +* l: Agenda Commands. (line 131) +* m: Agenda Commands. (line 351) +* M: Agenda Commands. (line 470) +* m (Agenda dispatcher): Tag Searches. (line 15) +* M (Agenda dispatcher): Tag Searches. (line 19) +* m (Agenda dispatcher) <1>: Property Searches. (line 15) +* M (Agenda dispatcher) <1>: Property Searches. (line 18) +* m (Agenda dispatcher) <2>: Matching tags and properties. + (line 13) +* M (Agenda dispatcher) <2>: Matching tags and properties. + (line 21) +* M-*: Agenda Commands. (line 373) +* M-a: Built-in Table Editor. + (line 78) +* M-DOWN: Structure Editing. (line 58) +* M-DOWN <1>: Plain Lists. (line 102) +* M-DOWN <2>: Built-in Table Editor. + (line 103) +* M-DOWN <3>: Editing and debugging formulas. + (line 80) +* M-DOWN <4>: Agenda Commands. (line 217) +* M-DOWN <5>: Key bindings and Useful Functions. + (line 11) +* M-e: Built-in Table Editor. + (line 82) +* M-g M-n: Sparse Trees. (line 32) +* M-g M-p: Sparse Trees. (line 35) +* M-g n: Sparse Trees. (line 32) +* M-g p: Sparse Trees. (line 35) +* M-LEFT: Structure Editing. (line 43) +* M-LEFT <1>: Plain Lists. (line 108) +* M-LEFT <2>: Built-in Table Editor. + (line 88) +* M-m: Agenda Commands. (line 369) +* M-RET: Structure Editing. (line 7) +* M-RET <1>: Plain Lists. (line 83) +* M-RET <2>: Built-in Table Editor. + (line 155) +* M-RET <3>: Timers. (line 40) +* M-RIGHT: Structure Editing. (line 46) +* M-RIGHT <1>: Plain Lists. (line 108) +* M-RIGHT <2>: Built-in Table Editor. + (line 91) +* M-S-DOWN: Built-in Table Editor. + (line 109) +* M-S-DOWN <1>: Editing and debugging formulas. + (line 74) +* M-S-LEFT: Structure Editing. (line 49) +* M-S-LEFT <1>: Plain Lists. (line 113) +* M-S-LEFT <2>: Built-in Table Editor. + (line 94) +* M-S-LEFT <3>: The date/time prompt. + (line 81) +* M-S-RET: Structure Editing. (line 29) +* M-S-RET <1>: Plain Lists. (line 91) +* M-S-RET <2>: Checkboxes. (line 76) +* M-S-RIGHT: Structure Editing. (line 52) +* M-S-RIGHT <1>: Plain Lists. (line 113) +* M-S-RIGHT <2>: Built-in Table Editor. + (line 97) +* M-S-RIGHT <3>: The date/time prompt. + (line 81) +* M-S-UP: Built-in Table Editor. + (line 106) +* M-S-UP <1>: Editing and debugging formulas. + (line 71) +* M-TAB: Editing and debugging formulas. + (line 63) +* M-TAB <1>: Per-file keywords. (line 26) +* M-TAB <2>: Setting Tags. (line 6) +* M-TAB <3>: Property Syntax. (line 82) +* M-TAB <4>: Completion. (line 15) +* M-UP: Structure Editing. (line 55) +* M-UP <1>: Plain Lists. (line 102) +* M-UP <2>: Built-in Table Editor. + (line 100) +* M-UP <3>: Editing and debugging formulas. + (line 77) +* M-UP <4>: Agenda Commands. (line 210) +* M-UP <5>: Key bindings and Useful Functions. + (line 11) +* M-v: The date/time prompt. + (line 81) +* mouse-1: Creating Footnotes. (line 73) +* mouse-1 <1>: Handling Links. (line 131) +* mouse-1 <2>: The date/time prompt. + (line 81) +* mouse-2: Creating Footnotes. (line 73) +* mouse-2 <1>: Handling Links. (line 131) +* mouse-2 <2>: Agenda Commands. (line 36) +* mouse-3: Handling Links. (line 135) +* mouse-3 <1>: Agenda Commands. (line 29) +* n: Using column view. (line 39) +* n <1>: Agenda Commands. (line 20) +* o: Agenda Commands. (line 68) +* O: Agenda Commands. (line 334) +* p: Using column view. (line 39) +* p <1>: Agenda Commands. (line 23) +* P: Agenda Commands. (line 282) +* q: Setting Tags. (line 123) +* q <1>: Using column view. (line 26) +* q <2>: Agenda Commands. (line 489) +* r: Using column view. (line 22) +* r <1>: Global TODO list. (line 25) +* R: Agenda Commands. (line 154) +* r <2>: Agenda Commands. (line 186) +* RET: Built-in Table Editor. + (line 73) +* RET <1>: Handling Links. (line 127) +* RET <2>: Setting Tags. (line 117) +* RET <3>: The date/time prompt. + (line 81) +* RET <4>: Agenda Commands. (line 39) +* s: Resolving idle time. (line 35) +* S: Resolving idle time. (line 40) +* s <1>: Agenda Commands. (line 193) +* S <1>: Agenda Commands. (line 474) +* s (Agenda dispatcher): Agenda Dispatcher. (line 23) +* s (Agenda dispatcher) <1>: Search view. (line 10) +* S-DOWN: Plain Lists. (line 95) +* S-DOWN <1>: Editing and debugging formulas. + (line 66) +* S-DOWN <2>: Priorities. (line 33) +* S-DOWN <3>: Creating Timestamps. (line 50) +* S-DOWN <4>: The date/time prompt. + (line 81) +* S-DOWN <5>: Agenda Commands. (line 290) +* S-LEFT: Plain Lists. (line 154) +* S-LEFT <1>: Editing and debugging formulas. + (line 66) +* S-LEFT <2>: TODO Basics. (line 34) +* S-LEFT <3>: Multiple sets in one file. + (line 36) +* S-LEFT <4>: Property Syntax. (line 103) +* S-LEFT <5>: Using column view. (line 39) +* S-LEFT <6>: Creating Timestamps. (line 45) +* S-LEFT <7>: The date/time prompt. + (line 81) +* S-LEFT <8>: The clock table. (line 28) +* S-LEFT <9>: Agenda Commands. (line 322) +* S-M-DOWN: Clocking commands. (line 63) +* S-M-LEFT: Using column view. (line 72) +* S-M-RET: TODO Basics. (line 60) +* S-M-RIGHT: Using column view. (line 69) +* S-M-UP: Clocking commands. (line 63) +* S-RET: Built-in Table Editor. + (line 173) +* S-RIGHT: Plain Lists. (line 154) +* S-RIGHT <1>: Editing and debugging formulas. + (line 66) +* S-RIGHT <2>: TODO Basics. (line 34) +* S-RIGHT <3>: Multiple sets in one file. + (line 36) +* S-RIGHT <4>: Property Syntax. (line 103) +* S-RIGHT <5>: Using column view. (line 39) +* S-RIGHT <6>: Creating Timestamps. (line 45) +* S-RIGHT <7>: The date/time prompt. + (line 81) +* S-RIGHT <8>: The clock table. (line 28) +* S-RIGHT <9>: Agenda Commands. (line 309) +* S-TAB: Global and local cycling. + (line 20) +* S-TAB <1>: Built-in Table Editor. + (line 70) +* S-UP: Plain Lists. (line 95) +* S-UP <1>: Editing and debugging formulas. + (line 66) +* S-UP <2>: Priorities. (line 33) +* S-UP <3>: Creating Timestamps. (line 50) +* S-UP <4>: The date/time prompt. + (line 81) +* S-UP <5>: Agenda Commands. (line 285) +* SPC: Setting Tags. (line 114) +* SPC <1>: Agenda Commands. (line 29) +* t: Agenda Commands. (line 231) +* T: Agenda Commands. (line 268) +* t (Agenda dispatcher): TODO Basics. (line 52) +* t (Agenda dispatcher) <1>: Global TODO list. (line 10) +* T (Agenda dispatcher): Global TODO list. (line 18) +* TAB: Global and local cycling. + (line 11) +* TAB <1>: Structure Editing. (line 37) +* TAB <2>: Plain Lists. (line 70) +* TAB <3>: Built-in Table Editor. + (line 63) +* TAB <4>: Editing and debugging formulas. + (line 56) +* TAB <5>: Setting Tags. (line 108) +* TAB <6>: Agenda Commands. (line 36) +* TAB <7>: CDLaTeX mode. (line 26) +* u: Agenda Commands. (line 361) +* U: Agenda Commands. (line 365) +* v: Using column view. (line 52) +* v a: Agenda Commands. (line 146) +* v A: Agenda Commands. (line 151) +* v c: Agenda Commands. (line 165) +* v d: Agenda Commands. (line 71) +* v E: Agenda Commands. (line 173) +* v l: Agenda Commands. (line 131) +* v L: Agenda Commands. (line 131) +* v m: Agenda Commands. (line 91) +* v R: Agenda Commands. (line 154) +* v SPC: Agenda Commands. (line 107) +* v w: Agenda Commands. (line 81) +* v y: Agenda Commands. (line 101) +* v [: Agenda Commands. (line 142) +* w: Agenda Commands. (line 81) +* X: Agenda Commands. (line 337) +* x: Agenda Commands. (line 493) +* z: Agenda Commands. (line 293) + + +File: org, Node: Command and Function Index, Next: Variable Index, Prev: Key Index, Up: Top + +F Command and Function Index +**************************** + +[index] +* Menu: + +* lisp-complete-symbol: Editing and debugging formulas. + (line 63) +* next-error: Sparse Trees. (line 32) +* or-clock-goto: Clocking commands. (line 78) +* org-agenda: Activation. (line 13) +* org-agenda-add-note: Agenda Commands. (line 293) +* org-agenda-archive: Agenda Commands. (line 263) +* org-agenda-archive-default-with-confirmation: Agenda Commands. + (line 250) +* org-agenda-archive-to-archive-sibling: Agenda Commands. (line 259) +* org-agenda-archives-mode: Agenda Commands. (line 146) +* org-agenda-bulk-action: Agenda Commands. (line 381) +* org-agenda-bulk-mark: Agenda Commands. (line 351) +* org-agenda-bulk-mark-all: Agenda Commands. (line 357) +* org-agenda-bulk-mark-regexp: Agenda Commands. (line 377) +* org-agenda-bulk-remove-all-marks: Agenda Commands. (line 365) +* org-agenda-bulk-toggle: Agenda Commands. (line 369) +* org-agenda-bulk-toggle-all: Agenda Commands. (line 373) +* org-agenda-bulk-unmark: Agenda Commands. (line 361) +* org-agenda-capture: Agenda Commands. (line 343) +* org-agenda-clock-cancel: Agenda Commands. (line 337) +* org-agenda-clock-goto: Agenda Commands. (line 124) +* org-agenda-clock-goto <1>: Agenda Commands. (line 340) +* org-agenda-clock-in: Agenda Commands. (line 330) +* org-agenda-clock-out: Agenda Commands. (line 334) +* org-agenda-clockreport-mode: Agenda Commands. (line 154) +* org-agenda-columns: Agenda Commands. (line 197) +* org-agenda-columns <1>: Agenda Column View. (line 12) +* org-agenda-convert-date: Agenda Commands. (line 479) +* org-agenda-date-prompt: Agenda Commands. (line 326) +* org-agenda-day-view: Agenda Commands. (line 71) +* org-agenda-deadline: Agenda Commands. (line 305) +* org-agenda-diary-entry: Agenda Commands. (line 452) +* org-agenda-do-date-earlier: Agenda Commands. (line 322) +* org-agenda-do-date-later: Agenda Commands. (line 309) +* org-agenda-drag-line-backward: Agenda Commands. (line 210) +* org-agenda-drag-line-forward: Agenda Commands. (line 217) +* org-agenda-earlier: Agenda Commands. (line 115) +* org-agenda-entry-text-mode: Agenda Commands. (line 173) +* org-agenda-exit: Agenda Commands. (line 493) +* org-agenda-file-to-front: Agenda Files. (line 16) +* org-agenda-filter-by-category: Filtering/limiting agenda times. + (line 56) +* org-agenda-filter-by-effort: Filtering/limiting agenda times. + (line 82) +* org-agenda-filter-by-regexp: Filtering/limiting agenda times. + (line 70) +* org-agenda-filter-by-tag: Filtering/limiting agenda times. + (line 18) +* org-agenda-filter-by-top-headline: Filtering/limiting agenda times. + (line 66) +* org-agenda-follow-mode: Agenda Commands. (line 42) +* org-agenda-goto: Agenda Commands. (line 36) +* org-agenda-goto-calendar: Agenda Commands. (line 445) +* org-agenda-goto-date: Agenda Commands. (line 121) +* org-agenda-goto-today: Agenda Commands. (line 118) +* org-agenda-holidays: Agenda Commands. (line 483) +* org-agenda-kill: Agenda Commands. (line 241) +* org-agenda-later: Agenda Commands. (line 110) +* org-agenda-limit-interactively: Filtering/limiting agenda times. + (line 147) +* org-agenda-list: Weekly/daily agenda. (line 10) +* org-agenda-list-stuck-projects: Stuck projects. (line 14) +* org-agenda-log-mode: Agenda Commands. (line 131) +* org-agenda-manipulate-query-add: Agenda Commands. (line 142) +* org-agenda-month-view: Agenda Commands. (line 91) +* org-agenda-next-line: Agenda Commands. (line 20) +* org-agenda-open-link: Agenda Commands. (line 56) +* org-agenda-phases-of-moon: Agenda Commands. (line 470) +* org-agenda-previous-line: Agenda Commands. (line 23) +* org-agenda-priority: Agenda Commands. (line 277) +* org-agenda-priority-down: Agenda Commands. (line 290) +* org-agenda-priority-up: Agenda Commands. (line 285) +* org-agenda-quit: Agenda Commands. (line 489) +* org-agenda-recenter: Agenda Commands. (line 33) +* org-agenda-redo: Agenda Commands. (line 186) +* org-agenda-refile: Agenda Commands. (line 247) +* org-agenda-remove-restriction-lock: Agenda Files. (line 52) +* org-agenda-remove-restriction-lock <1>: Agenda Files. (line 65) +* org-agenda-remove-restriction-lock <2>: Agenda Commands. (line 206) +* org-agenda-reset-view: Agenda Commands. (line 107) +* org-agenda-schedule: Agenda Commands. (line 301) +* org-agenda-set-restriction-lock: Agenda Files. (line 43) +* org-agenda-set-tags: Agenda Commands. (line 273) +* org-agenda-show-and-scroll-up: Agenda Commands. (line 29) +* org-agenda-show-priority: Agenda Commands. (line 282) +* org-agenda-show-tags: Agenda Commands. (line 268) +* org-agenda-sunrise-sunset: Agenda Commands. (line 474) +* org-agenda-switch-to: Agenda Commands. (line 39) +* org-agenda-todo: Agenda Commands. (line 231) +* org-agenda-todo-nextset: Agenda Commands. (line 235) +* org-agenda-toggle-archive-tag: Agenda Commands. (line 255) +* org-agenda-toggle-diary: Agenda Commands. (line 127) +* org-agenda-tree-to-indirect-buffer: Agenda Commands. (line 49) +* org-agenda-undo: Agenda Commands. (line 227) +* org-agenda-week-view: Agenda Commands. (line 81) +* org-agenda-write: Exporting Agenda Views. + (line 13) +* org-agenda-year-view: Agenda Commands. (line 101) +* org-archive-subtree: Moving subtrees. (line 10) +* org-archive-subtree-default: Archiving. (line 12) +* org-archive-to-archive-sibling: Internal archiving. (line 54) +* org-ascii-convert-region-to-ascii: Export in Foreign Buffers. + (line 11) +* org-ascii-convert-region-to-utf8: Export in Foreign Buffers. + (line 14) +* org-ascii-export-to-ascii: ASCII/Latin-1/UTF-8 export. + (line 26) +* org-ascii-export-to-ascii <1>: ASCII/Latin-1/UTF-8 export. + (line 35) +* org-attach: Attachments. (line 27) +* org-attach <1>: Agenda Commands. (line 298) +* org-attach-attach: Attachments. (line 32) +* org-attach-dired-to-subtree: Attachments. (line 79) +* org-attach-new: Attachments. (line 42) +* org-attach-open: Attachments. (line 49) +* org-attach-open-in-emacs: Attachments. (line 55) +* org-attach-reveal: Attachments. (line 58) +* org-attach-reveal-in-emacs: Attachments. (line 61) +* org-attach-sync: Attachments. (line 45) +* org-babel-check-src-block: Key bindings and Useful Functions. + (line 20) +* org-babel-demarcate-block: Key bindings and Useful Functions. + (line 20) +* org-babel-describe-bindings: Key bindings and Useful Functions. + (line 20) +* org-babel-do-key-sequence-in-edit-buffer: Key bindings and Useful Functions. + (line 20) +* org-babel-execute-buffer: Key bindings and Useful Functions. + (line 20) +* org-babel-execute-maybe: Key bindings and Useful Functions. + (line 20) +* org-babel-execute-src-block: Evaluating Code Blocks. + (line 22) +* org-babel-execute-src-block <1>: Key bindings and Useful Functions. + (line 11) +* org-babel-execute-subtree: Key bindings and Useful Functions. + (line 20) +* org-babel-expand-src-block: Key bindings and Useful Functions. + (line 20) +* org-babel-goto-named-result: Key bindings and Useful Functions. + (line 20) +* org-babel-goto-named-src-block: Key bindings and Useful Functions. + (line 20) +* org-babel-goto-src-block-head: Key bindings and Useful Functions. + (line 20) +* org-babel-insert-header-arg: Key bindings and Useful Functions. + (line 20) +* org-babel-load-in-session: Key bindings and Useful Functions. + (line 11) +* org-babel-load-in-session <1>: Key bindings and Useful Functions. + (line 20) +* org-babel-lob-ingest: Library of Babel. (line 12) +* org-babel-lob-ingest <1>: Key bindings and Useful Functions. + (line 20) +* org-babel-next-src-block: Key bindings and Useful Functions. + (line 20) +* org-babel-open-src-block-result: Key bindings and Useful Functions. + (line 11) +* org-babel-open-src-block-result <1>: Key bindings and Useful Functions. + (line 20) +* org-babel-pop-to-session: Key bindings and Useful Functions. + (line 11) +* org-babel-previous-src-block: Key bindings and Useful Functions. + (line 20) +* org-babel-sha1-hash: Key bindings and Useful Functions. + (line 20) +* org-babel-switch-to-session-with-code: Key bindings and Useful Functions. + (line 20) +* org-babel-tangle: Extracting Source Code. + (line 111) +* org-babel-tangle <1>: Key bindings and Useful Functions. + (line 20) +* org-babel-tangle-file: Extracting Source Code. + (line 116) +* org-babel-tangle-file <1>: Key bindings and Useful Functions. + (line 20) +* org-babel-tangle-jump-to-org: Extracting Source Code. + (line 129) +* org-babel-view-src-block-info: Key bindings and Useful Functions. + (line 20) +* org-backward-heading-same-level: Motion. (line 18) +* org-batch-agenda: Extracting Agenda Information. + (line 10) +* org-batch-agenda-csv: Extracting Agenda Information. + (line 41) +* org-bbdb-anniversaries: Weekly/daily agenda. (line 78) +* org-bbdb-anniversaries-future: Weekly/daily agenda. (line 109) +* org-beamer-export-as-latex: Beamer export commands. + (line 12) +* org-beamer-export-to-latex: Beamer export commands. + (line 7) +* org-beamer-export-to-pdf: Beamer export commands. + (line 16) +* org-beamer-select-environment: Editing support. (line 12) +* org-buffer-property-keys: Using the Property API. + (line 34) +* org-calendar-goto-agenda: Agenda Commands. (line 448) +* org-capture: Activation. (line 13) +* org-capture <1>: Using capture. (line 7) +* org-capture-finalize: Using capture. (line 15) +* org-capture-kill: Using capture. (line 31) +* org-capture-refile: Using capture. (line 22) +* org-check-after-date: Inserting deadline/schedule. + (line 36) +* org-check-before-date: Inserting deadline/schedule. + (line 33) +* org-check-deadlines: Inserting deadline/schedule. + (line 26) +* org-clock-cancel: Clocking commands. (line 74) +* org-clock-display: Clocking commands. (line 83) +* org-clock-in: Clocking commands. (line 7) +* org-clock-in-last: Clocking commands. (line 43) +* org-clock-modify-effort-estimate: Clocking commands. (line 49) +* org-clock-modify-effort-estimate <1>: Effort Estimates. (line 20) +* org-clock-out: Clocking commands. (line 35) +* org-clock-report: The clock table. (line 11) +* org-clock-timestamp-down: Clocking commands. (line 63) +* org-clock-timestamp-up: Clocking commands. (line 63) +* org-clock-timestamps-down: Clocking commands. (line 58) +* org-clock-timestamps-up: Clocking commands. (line 58) +* org-clocktable-try-shift: The clock table. (line 28) +* org-clocktable-write-default: The clock table. (line 116) +* org-clone-subtree-with-time-shift: Structure Editing. (line 91) +* org-columns-delete: Using column view. (line 72) +* org-columns-edit-allowed: Using column view. (line 56) +* org-columns-edit-value: Using column view. (line 43) +* org-columns-narrow: Using column view. (line 66) +* org-columns-new: Using column view. (line 69) +* org-columns-next-allowed-value: Using column view. (line 39) +* org-columns-previous-allowed-value: Using column view. (line 39) +* org-columns-quit: Using column view. (line 26) +* org-columns-redo: Using column view. (line 22) +* org-columns-set-tags-or-toggle: Using column view. (line 49) +* org-columns-show-value: Using column view. (line 52) +* org-columns-widen: Using column view. (line 66) +* org-compute-property-at-point: Property Syntax. (line 112) +* org-copy: Refile and Copy. (line 13) +* org-copy-subtree: Structure Editing. (line 69) +* org-copy-visible: Global and local cycling. + (line 65) +* org-cut-subtree: Structure Editing. (line 65) +* org-cycle: Global and local cycling. + (line 11) +* org-cycle <1>: Structure Editing. (line 37) +* org-cycle <2>: Plain Lists. (line 70) +* org-cycle-agenda-files: Agenda Files. (line 26) +* org-date-from-calendar: Creating Timestamps. (line 32) +* org-dblock-update: Capturing column view. + (line 67) +* org-dblock-update <1>: The clock table. (line 19) +* org-dblock-update <2>: Dynamic Blocks. (line 22) +* org-deadline: Inserting deadline/schedule. + (line 10) +* org-delete-property: Property Syntax. (line 106) +* org-delete-property-globally: Property Syntax. (line 109) +* org-demote: Using the Mapping API. + (line 93) +* org-demote-subtree: Structure Editing. (line 52) +* org-do-demote: Structure Editing. (line 46) +* org-do-promote: Structure Editing. (line 43) +* org-edit-special: Literal Examples. (line 90) +* org-edit-special <1>: Include Files. (line 64) +* org-edit-special <2>: Cooperation. (line 59) +* org-entities-help: Special Symbols. (line 16) +* org-entry-add-to-multivalued-property: Using the Property API. + (line 49) +* org-entry-delete: Using the Property API. + (line 28) +* org-entry-get: Using the Property API. + (line 19) +* org-entry-get-multivalued-property: Using the Property API. + (line 45) +* org-entry-member-in-multivalued-property: Using the Property API. + (line 58) +* org-entry-properties: Using the Property API. + (line 9) +* org-entry-put: Using the Property API. + (line 31) +* org-entry-put-multivalued-property: Using the Property API. + (line 40) +* org-entry-remove-from-multivalued-property: Using the Property API. + (line 53) +* org-evaluate-time-range: Creating Timestamps. (line 62) +* org-evaluate-time-range <1>: Clocking commands. (line 52) +* org-export: The Export Dispatcher. + (line 16) +* org-export-define-backend: Adding Export Back-ends. + (line 10) +* org-export-define-derived-backend: Adding Export Back-ends. + (line 10) +* org-export-to-odt: ODT export commands. (line 7) +* org-forward-heading-same-level: Motion. (line 15) +* org-global-cycle: Global and local cycling. + (line 20) +* org-goto: Motion. (line 24) +* org-goto-calendar: Creating Timestamps. (line 35) +* org-html-convert-region-to-html: Export in Foreign Buffers. + (line 17) +* org-html-export-as-html: HTML export commands. + (line 14) +* org-html-export-to-html: HTML export commands. + (line 7) +* org-icalendar-combine-agenda-files: iCalendar Export. (line 47) +* org-icalendar-export-agenda-files: iCalendar Export. (line 43) +* org-icalendar-export-to-ics: iCalendar Export. (line 39) +* org-indent-mode: Clean View. (line 20) +* org-info-find-node: Documentation Access. + (line 6) +* org-insert-columns-dblock: Capturing column view. + (line 63) +* org-insert-drawer: Drawers. (line 18) +* org-insert-drawer <1>: Property Syntax. (line 90) +* org-insert-heading: Plain Lists. (line 83) +* org-insert-heading <1>: Timers. (line 40) +* org-insert-heading-respect-content: Structure Editing. (line 26) +* org-insert-link: Handling Links. (line 69) +* org-insert-link-global: Using Links Outside Org. + (line 6) +* org-insert-property-drawer: Using the Property API. + (line 19) +* org-insert-property-drawer <1>: Using the Property API. + (line 37) +* org-insert-structure-template: Structure Templates. (line 11) +* org-insert-todo-heading: Structure Editing. (line 29) +* org-insert-todo-heading <1>: TODO Basics. (line 60) +* org-insert-todo-heading <2>: Checkboxes. (line 76) +* org-insert-todo-heading-respect-content: Structure Editing. (line 33) +* org-latex-convert-region-to-latex: Export in Foreign Buffers. + (line 20) +* org-latex-export-as-latex: LaTeX/PDF export commands. + (line 11) +* org-latex-export-to-latex~: LaTeX/PDF export commands. + (line 7) +* org-latex-export-to-pdf: LaTeX/PDF export commands. + (line 14) +* org-link-set-parameters: Adding Hyperlink Types. + (line 69) +* org-lint: Org Syntax. (line 24) +* org-lookup-all: Lookup functions. (line 23) +* org-lookup-first: Lookup functions. (line 9) +* org-lookup-last: Lookup functions. (line 19) +* org-map-entries: Using the Mapping API. + (line 12) +* org-mark-ring-goto: Handling Links. (line 144) +* org-mark-ring-push: Handling Links. (line 139) +* org-mark-subtree: Structure Editing. (line 61) +* org-match-sparse-tree: Tag Searches. (line 10) +* org-match-sparse-tree <1>: Property Searches. (line 11) +* org-md-convert-region-to-md: Export in Foreign Buffers. + (line 26) +* org-md-export-as-markdown: Markdown Export. (line 21) +* org-md-export-to-markdown: Markdown Export. (line 17) +* org-meta-return: Structure Editing. (line 7) +* org-mobile-pull: Pulling from the mobile application. + (line 6) +* org-mobile-push: Pushing to the mobile application. + (line 6) +* org-move-subtree-down: Structure Editing. (line 58) +* org-move-subtree-up: Structure Editing. (line 55) +* org-narrow-to-block: Structure Editing. (line 118) +* org-narrow-to-block <1>: Dynamic Blocks. (line 56) +* org-narrow-to-subtree: Structure Editing. (line 115) +* org-next-link: Handling Links. (line 151) +* org-next-visible-heading: Motion. (line 9) +* org-occur: Sparse Trees. (line 20) +* org-odt-convert: Extending ODT export. + (line 37) +* org-open-at-point: Handling Links. (line 106) +* org-open-at-point <1>: Creating Timestamps. (line 40) +* org-open-at-point-global: Using Links Outside Org. + (line 6) +* org-org-export-to-org: Org Export. (line 15) +* org-paste-subtree: Structure Editing. (line 73) +* org-previous-link: Handling Links. (line 151) +* org-previous-visible-heading: Motion. (line 12) +* org-priority: Priorities. (line 25) +* org-priority <1>: Using the Mapping API. + (line 81) +* org-priority-down: Priorities. (line 33) +* org-priority-up: Priorities. (line 33) +* org-promote: Using the Mapping API. + (line 90) +* org-promote-subtree: Structure Editing. (line 49) +* org-property-action: Property Syntax. (line 95) +* org-protocol-create: open-source protocol. + (line 67) +* org-protocol-create-for-org: open-source protocol. + (line 67) +* org-publish: Triggering Publication. + (line 9) +* org-publish-all: Triggering Publication. + (line 19) +* org-publish-current-file: Triggering Publication. + (line 16) +* org-publish-current-project: Triggering Publication. + (line 13) +* org-publish-find-date: Site map. (line 21) +* org-publish-find-property: Site map. (line 21) +* org-publish-find-title: Site map. (line 21) +* org-refile: Structure Editing. (line 99) +* org-refile <1>: Refile and Copy. (line 17) +* org-refile-cache-clear: Refile and Copy. (line 50) +* org-refile-goto-last-stored: Refile and Copy. (line 39) +* org-remove-file: Agenda Files. (line 22) +* org-reveal: Global and local cycling. + (line 42) +* org-save-all-org-buffers: Agenda Commands. (line 193) +* org-schedule: Inserting deadline/schedule. + (line 18) +* org-search-view: Search view. (line 10) +* org-set-effort: Effort Estimates. (line 15) +* org-set-property: Property Syntax. (line 86) +* org-set-property <1>: Property Syntax. (line 98) +* org-set-property <2>: Using Header Arguments. + (line 70) +* org-set-startup-visibility: Global and local cycling. + (line 35) +* org-set-startup-visibility <1>: Initial visibility. (line 23) +* org-set-tags-command: Setting Tags. (line 11) +* org-show-todo-tree: TODO Basics. (line 41) +* org-sort: Structure Editing. (line 103) +* org-sparse-tree: Sparse Trees. (line 16) +* org-speed-command-help: Speed Keys. (line 18) +* org-speedbar-set-agenda-restriction: Agenda Files. (line 58) +* org-store-agenda-views: Exporting Agenda Views. + (line 53) +* org-store-link: Activation. (line 13) +* org-store-link <1>: Handling Links. (line 9) +* org-submit-bug-report: Feedback. (line 13) +* org-switchb: Agenda Files. (line 29) +* org-table-align: Built-in Table Editor. + (line 60) +* org-table-align <1>: Column Width and Alignment. + (line 17) +* org-table-beginning-of-field: Built-in Table Editor. + (line 78) +* org-table-blank-field: Built-in Table Editor. + (line 67) +* org-table-copy-down: Built-in Table Editor. + (line 173) +* org-table-copy-region: Built-in Table Editor. + (line 138) +* org-table-create-or-convert-from-region: Built-in Table Editor. + (line 42) +* org-table-create-or-convert-from-region <1>: Built-in Table Editor. + (line 205) +* org-table-create-with-table.el: Cooperation. (line 63) +* org-table-cut-region: Built-in Table Editor. + (line 144) +* org-table-delete-column: Built-in Table Editor. + (line 94) +* org-table-edit-field: Built-in Table Editor. + (line 186) +* org-table-edit-formulas: Editing and debugging formulas. + (line 37) +* org-table-end-of-field: Built-in Table Editor. + (line 82) +* org-table-eval-formula: Field and range formulas. + (line 28) +* org-table-eval-formula <1>: Column formulas. (line 33) +* org-table-eval-formula <2>: Editing and debugging formulas. + (line 14) +* org-table-eval-formula <3>: Editing and debugging formulas. + (line 19) +* org-table-expand: Column Width and Alignment. + (line 57) +* org-table-export: Built-in Table Editor. + (line 210) +* org-table-fedit-abort: Editing and debugging formulas. + (line 49) +* org-table-fedit-finish: Editing and debugging formulas. + (line 45) +* org-table-fedit-line-down: Editing and debugging formulas. + (line 74) +* org-table-fedit-line-up: Editing and debugging formulas. + (line 71) +* org-table-fedit-lisp-indent: Editing and debugging formulas. + (line 56) +* org-table-fedit-ref-down: Editing and debugging formulas. + (line 66) +* org-table-fedit-ref-left: Editing and debugging formulas. + (line 66) +* org-table-fedit-ref-right: Editing and debugging formulas. + (line 66) +* org-table-fedit-ref-up: Editing and debugging formulas. + (line 66) +* org-table-fedit-scroll-down: Editing and debugging formulas. + (line 80) +* org-table-fedit-scroll-up: Editing and debugging formulas. + (line 77) +* org-table-fedit-toggle-ref-type: Editing and debugging formulas. + (line 52) +* org-table-field-info: Editing and debugging formulas. + (line 25) +* org-table-hline-and-move: Built-in Table Editor. + (line 117) +* org-table-import: Built-in Table Editor. + (line 196) +* org-table-insert-column: Built-in Table Editor. + (line 97) +* org-table-insert-hline: Built-in Table Editor. + (line 113) +* org-table-insert-row: Built-in Table Editor. + (line 109) +* org-table-iterate: Updating the table. (line 24) +* org-table-iterate-buffer-tables: Updating the table. (line 32) +* org-table-kill-row: Built-in Table Editor. + (line 106) +* org-table-move-column-left: Built-in Table Editor. + (line 88) +* org-table-move-column-right: Built-in Table Editor. + (line 91) +* org-table-move-row-down: Built-in Table Editor. + (line 103) +* org-table-move-row-up: Built-in Table Editor. + (line 100) +* org-table-next-field: Built-in Table Editor. + (line 63) +* org-table-next-row: Built-in Table Editor. + (line 73) +* org-table-paste-rectangle: Built-in Table Editor. + (line 148) +* org-table-previous-field: Built-in Table Editor. + (line 70) +* org-table-recalculate: Updating the table. (line 14) +* org-table-recalculate-buffer-tables: Updating the table. (line 29) +* org-table-rotate-recalc-marks: Advanced features. (line 11) +* org-table-shrink: Column Width and Alignment. + (line 54) +* org-table-sort-lines: Built-in Table Editor. + (line 121) +* org-table-sum: Built-in Table Editor. + (line 168) +* org-table-toggle-column-width: Column Width and Alignment. + (line 44) +* org-table-toggle-coordinate-overlays: Editing and debugging formulas. + (line 29) +* org-table-toggle-coordinate-overlays <1>: Editing and debugging formulas. + (line 83) +* org-table-toggle-formula-debugger: Editing and debugging formulas. + (line 34) +* org-table-wrap-region: Built-in Table Editor. + (line 155) +* org-tags-view: Tag Searches. (line 15) +* org-tags-view <1>: Property Searches. (line 15) +* org-tags-view <2>: Matching tags and properties. + (line 13) +* org-tags-view <3>: Matching tags and properties. + (line 21) +* org-texinfo-convert-region-to-texinfo: Export in Foreign Buffers. + (line 23) +* org-texinfo-export-to-info: Texinfo export commands. + (line 11) +* org-texinfo-export-to-texinfo: Texinfo export commands. + (line 7) +* org-time-stamp: Creating Timestamps. (line 11) +* org-time-stamp-inactive: Creating Timestamps. (line 25) +* org-timer: Timers. (line 32) +* org-timer-item: Timers. (line 36) +* org-timer-pause-or-continue: Timers. (line 44) +* org-timer-set-timer: Timers. (line 23) +* org-timer-start: Timers. (line 13) +* org-timer-stop: Timers. (line 47) +* org-timestamp-down-day: Creating Timestamps. (line 45) +* org-timestamp-up-day: Creating Timestamps. (line 45) +* org-todo: Clocking commands. (line 70) +* org-todo <1>: Using the Mapping API. + (line 77) +* org-todo-list: Global TODO list. (line 10) +* org-todo-list <1>: Global TODO list. (line 18) +* org-toggle-archive-tag: Internal archiving. (line 39) +* org-toggle-checkbox: Checkboxes. (line 53) +* org-toggle-comment: Comment Lines. (line 20) +* org-toggle-heading: Structure Editing. (line 124) +* org-toggle-inline-images: Images. (line 24) +* org-toggle-latex-fragment: Previewing LaTeX fragments. + (line 18) +* org-toggle-ordered-property: TODO dependencies. (line 38) +* org-toggle-ordered-property <1>: Checkboxes. (line 80) +* org-toggle-pretty-entities: Subscripts and Superscripts. + (line 20) +* org-toggle-pretty-entities <1>: Special Symbols. (line 31) +* org-toggle-sticky-agenda: Agenda Dispatcher. (line 49) +* org-toggle-tag: Using the Mapping API. + (line 85) +* org-toggle-tags-groups: Tag Hierarchy. (line 86) +* org-toggle-time-stamp-overlays: Custom time format. (line 13) +* org-tree-to-indirect-buffer: Global and local cycling. + (line 59) +* org-update-statistics-cookies: Checkboxes. (line 88) +* org-version: Feedback. (line 13) +* org-yank: Structure Editing. (line 79) +* orgtbl-ascii-draw: Org Plot. (line 109) +* orgtbl-mode: Orgtbl Mode. (line 6) +* orgtbl-to-csv: Translator functions. + (line 6) +* orgtbl-to-generic: Translator functions. + (line 6) +* orgtbl-to-html: Translator functions. + (line 6) +* orgtbl-to-latex: Translator functions. + (line 6) +* orgtbl-to-orgtbl: Translator functions. + (line 6) +* orgtbl-to-texinfo: Translator functions. + (line 6) +* orgtbl-to-tsv: Translator functions. + (line 6) +* orgtbl-to-unicode: Translator functions. + (line 6) +* outline-show-all: Global and local cycling. + (line 39) +* outline-show-branches: Global and local cycling. + (line 51) +* outline-show-children: Global and local cycling. + (line 55) +* outline-up-heading: Motion. (line 21) +* pcomplete: Property Syntax. (line 82) +* previous-error: Sparse Trees. (line 35) +* widen: Structure Editing. (line 121) + + +File: org, Node: Variable Index, Prev: Command and Function Index, Up: Top + +G Variable Index +**************** + +This is not a complete index of variables and faces, only the ones that +are mentioned in the manual. For a more complete list, use ‘M-x +org-customize’ and then click yourself through the tree. + +[index] +* Menu: + +* cdlatex-simplify-sub-super-scripts: CDLaTeX mode. (line 40) +* constants-unit-system: References. (line 120) +* constants-unit-system <1>: In-buffer Settings. (line 202) +* LaTeX-verbatim-environments: A LaTeX example. (line 19) +* org-adapt-indentation: Clean View. (line 49) +* org-agenda-auto-exclude-function: Filtering/limiting agenda times. + (line 32) +* org-agenda-bulk-custom-functions: Agenda Commands. (line 350) +* org-agenda-bulk-custom-functions <1>: Agenda Commands. (line 429) +* org-agenda-bulk-persistent-marks: Agenda Commands. (line 381) +* org-agenda-category-filter-preset: Filtering/limiting agenda times. + (line 61) +* org-agenda-category-icon-alist: Categories. (line 19) +* org-agenda-clock-consistency-checks: Agenda Commands. (line 165) +* org-agenda-columns-add-appointments-to-effort-sum: Effort Estimates. + (line 41) +* org-agenda-confirm-kill: Agenda Commands. (line 241) +* org-agenda-custom-commands: Sparse Trees. (line 37) +* org-agenda-custom-commands <1>: Storing searches. (line 11) +* org-agenda-custom-commands <2>: Setting options. (line 6) +* org-agenda-custom-commands <3>: Extracting Agenda Information. + (line 10) +* org-agenda-custom-commands-contexts: Setting options. (line 59) +* org-agenda-diary-file: Agenda Commands. (line 458) +* org-agenda-dim-blocked-tasks: TODO dependencies. (line 48) +* org-agenda-dim-blocked-tasks <1>: Speeding Up Your Agendas. + (line 15) +* org-agenda-effort-filter-preset: Filtering/limiting agenda times. + (line 101) +* org-agenda-entry-text-maxlines: Agenda Commands. (line 173) +* org-agenda-exporter-settings: Exporting Agenda Views. + (line 14) +* org-agenda-exporter-settings <1>: Exporting Agenda Views. + (line 68) +* org-agenda-files: Agenda Files. (line 6) +* org-agenda-files <1>: Sorting of agenda items. + (line 9) +* org-agenda-inhibit-startup: Speeding Up Your Agendas. + (line 19) +* org-agenda-log-mode-items: Agenda Commands. (line 131) +* org-agenda-max-effort: Filtering/limiting agenda times. + (line 118) +* org-agenda-max-entries: Filtering/limiting agenda times. + (line 115) +* org-agenda-max-tags: Filtering/limiting agenda times. + (line 124) +* org-agenda-max-todos: Filtering/limiting agenda times. + (line 121) +* org-agenda-overriding-header: Special Agenda Views. + (line 38) +* org-agenda-prefix-format: Presentation and Sorting. + (line 6) +* org-agenda-regexp-filter-preset: Filtering/limiting agenda times. + (line 77) +* org-agenda-restore-windows-after-quit: Agenda Views. (line 42) +* org-agenda-search-headline-for-time: Time-of-day specifications. + (line 16) +* org-agenda-show-inherited-tags: Agenda Commands. (line 268) +* org-agenda-show-inherited-tags <1>: Speeding Up Your Agendas. + (line 23) +* org-agenda-skip-archived-trees: Internal archiving. (line 23) +* org-agenda-skip-archived-trees <1>: Agenda Views. (line 37) +* org-agenda-skip-comment-trees: Agenda Views. (line 37) +* org-agenda-skip-deadline-prewarning-if-scheduled: Deadlines and Scheduling. + (line 24) +* org-agenda-skip-function: Special Agenda Views. + (line 6) +* org-agenda-skip-function <1>: Special Agenda Views. + (line 41) +* org-agenda-skip-function <2>: Using the Mapping API. + (line 69) +* org-agenda-skip-function-global: Special Agenda Views. + (line 6) +* org-agenda-skip-scheduled-delay-if-deadline: Deadlines and Scheduling. + (line 42) +* org-agenda-skip-scheduled-if-deadline-is-shown: Repeated tasks. + (line 76) +* org-agenda-skip-scheduled-if-done: Deadlines and Scheduling. + (line 34) +* org-agenda-sorting-strategy: Sorting of agenda items. + (line 28) +* org-agenda-span: Weekly/daily agenda. (line 15) +* org-agenda-span <1>: Agenda Commands. (line 107) +* org-agenda-start-day: Weekly/daily agenda. (line 15) +* org-agenda-start-on-weekday: Weekly/daily agenda. (line 15) +* org-agenda-start-with-clockreport-mode: Agenda Commands. (line 154) +* org-agenda-start-with-entry-text-mode: Agenda Commands. (line 173) +* org-agenda-start-with-follow-mode: Agenda Commands. (line 42) +* org-agenda-sticky: Agenda Dispatcher. (line 49) +* org-agenda-tag-filter-preset: Filtering/limiting agenda times. + (line 18) +* org-agenda-tags-column: Presentation and Sorting. + (line 6) +* org-agenda-tags-todo-honor-ignore-options: Matching tags and properties. + (line 21) +* org-agenda-text-search-extra-files: Agenda Dispatcher. (line 28) +* org-agenda-text-search-extra-files <1>: Search view. (line 33) +* org-agenda-time-grid: Time-of-day specifications. + (line 46) +* org-agenda-time-grid <1>: Agenda Commands. (line 181) +* org-agenda-todo-ignore-deadlines: Global TODO list. (line 42) +* org-agenda-todo-ignore-scheduled: Global TODO list. (line 42) +* org-agenda-todo-ignore-timestamp: Global TODO list. (line 42) +* org-agenda-todo-ignore-with-date: Global TODO list. (line 42) +* org-agenda-todo-list-sublevels: Breaking Down Tasks. (line 6) +* org-agenda-todo-list-sublevels <1>: Global TODO list. (line 51) +* org-agenda-use-tag-inheritance: Tag Inheritance. (line 32) +* org-agenda-use-tag-inheritance <1>: Speeding Up Your Agendas. + (line 23) +* org-agenda-use-time-grid: Time-of-day specifications. + (line 46) +* org-agenda-use-time-grid <1>: Agenda Commands. (line 181) +* org-agenda-window-setup: Agenda Views. (line 42) +* org-alphabetical-lists: Plain Lists. (line 15) +* org-archive-default-command: Archiving. (line 12) +* org-archive-default-command <1>: Agenda Commands. (line 250) +* org-archive-location: Moving subtrees. (line 10) +* org-archive-location <1>: In-buffer Settings. (line 15) +* org-archive-save-context-info: Moving subtrees. (line 41) +* org-ascii-links-to-notes: ASCII/Latin-1/UTF-8 export. + (line 16) +* org-ascii-text-width: ASCII/Latin-1/UTF-8 export. + (line 13) +* org-attach-directory: Attachments. (line 6) +* org-attach-method: Attachments. (line 32) +* org-babel-default-header-args: Using Header Arguments. + (line 19) +* org-babel-default-header-args <1>: Using Header Arguments. + (line 19) +* org-babel-inline-result-wrap: Evaluating Code Blocks. + (line 27) +* org-babel-load-languages: Languages. (line 35) +* org-babel-post-tangle-hook: Extracting Source Code. + (line 122) +* org-beamer-environments-default: Frames and Blocks in Beamer. + (line 25) +* org-beamer-environments-extra: Frames and Blocks in Beamer. + (line 25) +* org-beamer-frame-level: Frames and Blocks in Beamer. + (line 10) +* org-beamer-theme: Beamer specific export settings. + (line 11) +* org-calc-default-modes: Formula syntax for Calc. + (line 17) +* org-capture-bookmark: Using capture. (line 48) +* org-capture-last-stored: Using capture. (line 48) +* org-capture-templates: Capture templates. (line 11) +* org-capture-templates-contexts: Templates in contexts. + (line 6) +* org-capture-use-agenda-date: Agenda Commands. (line 343) +* org-catch-invisible-edits: Catching invisible edits. + (line 6) +* org-clock-continuously: Clocking commands. (line 7) +* org-clock-continuously <1>: Clocking commands. (line 43) +* org-clock-continuously <2>: Resolving idle time. (line 78) +* org-clock-display-default-range: The clock table. (line 79) +* org-clock-idle-time: Resolving idle time. (line 14) +* org-clock-in-prepare-hook: Clocking commands. (line 20) +* org-clock-into-drawer: Clocking commands. (line 7) +* org-clock-mode-line-total: Clocking commands. (line 20) +* org-clock-persist: Clocking Work Time. (line 19) +* org-clock-report-include-clocking-task: Agenda Commands. (line 154) +* org-clock-x11idle-program-name: Resolving idle time. (line 14) +* org-clocktable-defaults: The clock table. (line 38) +* org-closed-keep-when-no-todo: Closing items. (line 11) +* org-coderef-label-format: Literal Examples. (line 76) +* org-columns: Using column view. (line 10) +* org-columns-default-format: Using column view. (line 10) +* org-columns-default-format <1>: Effort Estimates. (line 31) +* org-columns-default-format <2>: Agenda Commands. (line 197) +* org-columns-default-format <3>: Agenda Column View. (line 19) +* org-columns-skip-archived-trees: Internal archiving. (line 33) +* org-columns-summary-types: Column attributes. (line 51) +* org-complete-tags-always-offer-all-agenda-tags: Setting Tags. + (line 22) +* org-confirm-babel-evaluate: Code Evaluation Security. + (line 25) +* org-confirm-elisp-link-function: Code Evaluation Security. + (line 52) +* org-confirm-shell-link-function: Code Evaluation Security. + (line 49) +* org-create-file-search-functions: Custom Searches. (line 12) +* org-crypt-tag-matcher: Org Crypt. (line 10) +* org-ctrl-k-protect-subtree: Headlines. (line 6) +* org-cycle-emulate-tab: Global and local cycling. + (line 16) +* org-cycle-global-at-bob: Global and local cycling. + (line 30) +* org-cycle-include-plain-lists: Plain Lists. (line 70) +* org-cycle-open-archived-trees: Internal archiving. (line 13) +* org-cycle-separator-lines: Headlines. (line 24) +* org-deadline-warning-days: Deadlines and Scheduling. + (line 14) +* org-deadline-warning-days <1>: Inserting deadline/schedule. + (line 26) +* org-default-notes-file: Setting up capture. (line 8) +* org-default-notes-file <1>: Template elements. (line 50) +* org-default-priority: Priorities. (line 38) +* org-default-priority <1>: In-buffer Settings. (line 43) +* org-directory: Template elements. (line 50) +* org-display-custom-times: Custom time format. (line 6) +* org-display-internal-link-with-indirect-buffer: Handling Links. + (line 135) +* org-disputed-keys: Conflicts. (line 27) +* org-done, face: Faces for TODO keywords. + (line 6) +* org-edit-src-auto-save-idle-delay: Editing Source Code. (line 11) +* org-effort-property: Effort Estimates. (line 6) +* org-email-link-description-format: Handling Links. (line 31) +* org-enforce-todo-dependencies: TODO dependencies. (line 6) +* org-enforce-todo-dependencies <1>: TODO dependencies. (line 53) +* org-entities-user: Special Symbols. (line 16) +* org-execute-file-search-functions: Custom Searches. (line 12) +* org-export-allow-bind-keywords: Export Settings. (line 210) +* org-export-async-init-file: The Export Dispatcher. + (line 42) +* org-export-backends: Exporting. (line 33) +* org-export-before-parsing-hook: Advanced Export Configuration. + (line 9) +* org-export-before-processing-hook: Advanced Export Configuration. + (line 9) +* org-export-creator-string: HTML preamble and postamble. + (line 6) +* org-export-date-timestamp-format: Export Settings. (line 32) +* org-export-default-language: Export Settings. (line 38) +* org-export-dispatch-use-expert-ui: The Export Dispatcher. + (line 10) +* org-export-exclude-tags: Export Settings. (line 52) +* org-export-global-macros: Macro Replacement. (line 6) +* org-export-headline-levels: Export Settings. (line 141) +* org-export-html-table-tag: Tables in HTML export. + (line 6) +* org-export-html-tag-class-prefix: CSS support. (line 6) +* org-export-html-todo-kwd-class-prefix: CSS support. (line 6) +* org-export-html-use-infojs: JavaScript support. (line 71) +* org-export-in-background: The Export Dispatcher. + (line 39) +* org-export-initial-scope: The Export Dispatcher. + (line 60) +* org-export-odt-convert-capabilities: Advanced topics in ODT export. + (line 22) +* org-export-odt-convert-process: Advanced topics in ODT export. + (line 28) +* org-export-odt-convert-processes: Advanced topics in ODT export. + (line 17) +* org-export-odt-preferred-output-format: ODT export commands. + (line 25) +* org-export-odt-schema-dir: Advanced topics in ODT export. + (line 269) +* org-export-preserve-breaks: Export Settings. (line 93) +* org-export-select-tags: Export Settings. (line 44) +* org-export-time-stamp-file: Export Settings. (line 187) +* org-export-time-stamp-file <1>: HTML preamble and postamble. + (line 6) +* org-export-use-babel: Exporting Code Blocks. + (line 34) +* org-export-with-archived-trees: Internal archiving. (line 29) +* org-export-with-archived-trees <1>: Export Settings. (line 102) +* org-export-with-author: Export Settings. (line 107) +* org-export-with-broken-links: Export Settings. (line 111) +* org-export-with-clocks: Export Settings. (line 116) +* org-export-with-creator: Export Settings. (line 119) +* org-export-with-date: Export Settings. (line 127) +* org-export-with-drawers: Export Settings. (line 123) +* org-export-with-email: Export Settings. (line 134) +* org-export-with-emphasize: Export Settings. (line 79) +* org-export-with-entities: Export Settings. (line 131) +* org-export-with-fixed-width: Export Settings. (line 86) +* org-export-with-footnotes: Export Settings. (line 138) +* org-export-with-inlinetasks: Export Settings. (line 146) +* org-export-with-latex: LaTeX fragments. (line 38) +* org-export-with-latex <1>: Export Settings. (line 183) +* org-export-with-planning: Export Settings. (line 157) +* org-export-with-priority: Export Settings. (line 163) +* org-export-with-properties: Export Settings. (line 166) +* org-export-with-section-numbers: Export Settings. (line 149) +* org-export-with-smart-quotes: Export Settings. (line 73) +* org-export-with-special-strings: Export Settings. (line 82) +* org-export-with-statistics-cookies: Export Settings. (line 170) +* org-export-with-sub-superscripts: Export Settings. (line 97) +* org-export-with-tables: Export Settings. (line 202) +* org-export-with-tags: Export Settings. (line 174) +* org-export-with-tasks: Export Settings. (line 178) +* org-export-with-timestamps: Export Settings. (line 89) +* org-export-with-title: Export Settings. (line 191) +* org-export-with-toc: Export Settings. (line 194) +* org-export-with-toc <1>: Table of Contents. (line 6) +* org-export-with-todo-keywords: Export Settings. (line 198) +* org-expot-creator-string: Export Settings. (line 28) +* org-faces-easy-properties: Faces for TODO keywords. + (line 17) +* org-fast-tag-selection-include-todo: Fast access to TODO states. + (line 16) +* org-fast-tag-selection-single-key: Setting Tags. (line 141) +* org-file-apps: Handling Links. (line 106) +* org-file-apps <1>: Attachments. (line 49) +* org-fontify-emphasized-text: Emphasis and Monospace. + (line 11) +* org-footnote-auto-adjust: Creating Footnotes. (line 62) +* org-footnote-auto-adjust <1>: In-buffer Settings. (line 211) +* org-footnote-auto-label: Creating Footnotes. (line 34) +* org-footnote-auto-label <1>: In-buffer Settings. (line 211) +* org-footnote-define-inline: Creating Footnotes. (line 47) +* org-footnote-define-inline <1>: In-buffer Settings. (line 211) +* org-footnote-section: Headlines. (line 17) +* org-footnote-section <1>: Creating Footnotes. (line 47) +* org-format-latex-header: LaTeX fragments. (line 6) +* org-format-latex-header <1>: Previewing LaTeX fragments. + (line 12) +* org-format-latex-options: Previewing LaTeX fragments. + (line 12) +* org-from-is-user-regexp: Template expansion. (line 104) +* org-global-properties: Property Syntax. (line 76) +* org-global-properties <1>: Effort Estimates. (line 31) +* org-goto-auto-isearch: Motion. (line 24) +* org-goto-interface: Motion. (line 41) +* org-group-tags: Tag Hierarchy. (line 86) +* org-habit-following-days: Tracking your habits. + (line 91) +* org-habit-graph-column: Tracking your habits. + (line 82) +* org-habit-preceding-days: Tracking your habits. + (line 87) +* org-habit-show-habits-only-for-today: Tracking your habits. + (line 94) +* org-hide, face: Clean View. (line 68) +* org-hide-block-startup: Blocks. (line 6) +* org-hide-block-startup <1>: In-buffer Settings. (line 239) +* org-hide-leading-stars: In-buffer Settings. (line 172) +* org-hide-leading-stars <1>: Clean View. (line 54) +* org-hide-macro-markers: Macro Replacement. (line 88) +* org-hierarchical-checkbox-statistics: Checkboxes. (line 30) +* org-hierarchical-todo-statistics: Breaking Down Tasks. (line 25) +* org-highest-priority: Priorities. (line 38) +* org-highest-priority <1>: In-buffer Settings. (line 43) +* org-html-container-element: HTML specific export settings. + (line 19) +* org-html-doctype: HTML specific export settings. + (line 16) +* org-html-doctype <1>: HTML doctypes. (line 8) +* org-html-doctype-alist: HTML doctypes. (line 8) +* org-html-head: HTML specific export settings. + (line 35) +* org-html-head <1>: CSS support. (line 44) +* org-html-head-extra: HTML specific export settings. + (line 39) +* org-html-head-extra <1>: CSS support. (line 44) +* org-html-head-include-default-style: CSS support. (line 52) +* org-html-html5-elements: HTML doctypes. (line 60) +* org-html-html5-fancy: HTML doctypes. (line 25) +* org-html-inline-images: Images in HTML export. + (line 9) +* org-html-link-home: HTML specific export settings. + (line 23) +* org-html-link-org-files-as-html: Links in HTML export. + (line 12) +* org-html-link-up: HTML specific export settings. + (line 26) +* org-html-mathjax-options: HTML specific export settings. + (line 30) +* org-html-mathjax-options~: Math formatting in HTML export. + (line 6) +* org-html-mathjax-template: Math formatting in HTML export. + (line 20) +* org-html-postamble: HTML preamble and postamble. + (line 6) +* org-html-postamble-format: HTML preamble and postamble. + (line 6) +* org-html-preamble: HTML preamble and postamble. + (line 6) +* org-html-preamble-format: HTML preamble and postamble. + (line 6) +* org-html-style-default: CSS support. (line 44) +* org-html-table-align-individual-fields: Tables in HTML export. + (line 20) +* org-html-table-caption-above: Tables in HTML export. + (line 24) +* org-html-table-data-tags: Tables in HTML export. + (line 27) +* org-html-table-default-attributes: Tables in HTML export. + (line 30) +* org-html-table-header-tags: Tables in HTML export. + (line 33) +* org-html-table-row-tags: Tables in HTML export. + (line 36) +* org-html-table-use-header-tags-for-first-column: Tables in HTML export. + (line 39) +* org-html-validation-link: HTML preamble and postamble. + (line 6) +* org-icalendar-alarm-time: iCalendar Export. (line 20) +* org-icalendar-categories: iCalendar Export. (line 20) +* org-icalendar-combined-agenda-file: iCalendar Export. (line 47) +* org-icalendar-include-body: iCalendar Export. (line 57) +* org-icalendar-include-todo: iCalendar Export. (line 11) +* org-icalendar-store-UID: iCalendar Export. (line 26) +* org-icalendar-use-deadline: iCalendar Export. (line 11) +* org-icalendar-use-scheduled: iCalendar Export. (line 11) +* org-id-link-to-org-use-id: Handling Links. (line 21) +* org-imenu-depth: Cooperation. (line 37) +* org-indent-indentation-per-level: Clean View. (line 24) +* org-infojs-options: JavaScript support. (line 71) +* org-insert-mode-line-in-empty-file: Activation. (line 30) +* org-irc-links-to-logs: Handling Links. (line 45) +* org-keep-stored-link-after-insertion: Handling Links. (line 69) +* org-latex-bibtex-compiler: LaTeX/PDF export commands. + (line 25) +* org-latex-classes: LaTeX specific export settings. + (line 32) +* org-latex-classes <1>: LaTeX specific export settings. + (line 49) +* org-latex-classes <2>: LaTeX header and sectioning. + (line 13) +* org-latex-compiler: LaTeX/PDF export commands. + (line 25) +* org-latex-compiler <1>: LaTeX specific export settings. + (line 44) +* org-latex-default-class: LaTeX specific export settings. + (line 32) +* org-latex-default-class <1>: LaTeX header and sectioning. + (line 13) +* org-latex-default-packages-alist: LaTeX/PDF export commands. + (line 25) +* org-latex-default-packages-alist <1>: LaTeX header and sectioning. + (line 13) +* org-latex-default-table-environment: Tables in LaTeX export. + (line 23) +* org-latex-default-table-mode: Tables in LaTeX export. + (line 12) +* org-latex-hyperref-template: LaTeX specific export settings. + (line 11) +* org-latex-hyperref-template <1>: LaTeX specific export settings. + (line 54) +* org-latex-images-centered: Images in LaTeX export. + (line 57) +* org-latex-listings: Literal Examples. (line 23) +* org-latex-listings-options: Source blocks in LaTeX export. + (line 25) +* org-latex-minted-options: Source blocks in LaTeX export. + (line 25) +* org-latex-package-alist: LaTeX specific export settings. + (line 20) +* org-latex-packages-alist: LaTeX header and sectioning. + (line 13) +* org-latex-subtitle-format: LaTeX specific export settings. + (line 63) +* org-latex-subtitle-separate: LaTeX specific export settings. + (line 63) +* org-latex-tables-booktabs: Tables in LaTeX export. + (line 65) +* org-latex-tables-centered: Tables in LaTeX export. + (line 65) +* org-latex-title-command: LaTeX specific export settings. + (line 11) +* org-latex-title-command <1>: LaTeX specific export settings. + (line 54) +* org-latex-to-mathml-convert-command: LaTeX math snippets. (line 20) +* org-latex-to-mathml-jar-file: LaTeX math snippets. (line 20) +* org-link-abbrev-alist: Link Abbreviations. (line 12) +* org-link-abbrev-alist <1>: In-buffer Settings. (line 38) +* org-link-frame-setup: Handling Links. (line 121) +* org-link-parameters: Adding Hyperlink Types. + (line 69) +* org-list-automatic-rules: Plain Lists. (line 63) +* org-list-automatic-rules <1>: Checkboxes. (line 6) +* org-list-demote-modify-bullet: Plain Lists. (line 57) +* org-list-indent-offset: Plain Lists. (line 57) +* org-list-use-circular-motion: Plain Lists. (line 95) +* org-log-done: Tracking TODO state changes. + (line 29) +* org-log-done <1>: Agenda Commands. (line 131) +* org-log-done <2>: In-buffer Settings. (line 117) +* org-log-into-drawer: Tracking TODO state changes. + (line 6) +* org-log-into-drawer <1>: Agenda Commands. (line 293) +* org-log-note-clock-out: Clocking commands. (line 35) +* org-log-note-clock-out <1>: In-buffer Settings. (line 117) +* org-log-redeadline: Inserting deadline/schedule. + (line 10) +* org-log-refile: Refile and Copy. (line 17) +* org-log-repeat: Repeated tasks. (line 40) +* org-log-repeat <1>: In-buffer Settings. (line 117) +* org-log-reschedule: Inserting deadline/schedule. + (line 18) +* org-log-states-order-reversed: Tracking TODO state changes. + (line 6) +* org-lowest-priority: Priorities. (line 38) +* org-lowest-priority <1>: In-buffer Settings. (line 43) +* org-M-RET-may-split-line: Structure Editing. (line 7) +* org-M-RET-may-split-line <1>: Plain Lists. (line 83) +* org-md-headline-style: Markdown Export. (line 29) +* org-mobile-directory: Setting up the staging area. + (line 6) +* org-mobile-encryption: Setting up the staging area. + (line 19) +* org-mobile-files: Pushing to the mobile application. + (line 6) +* org-mobile-inbox-for-pull: Pulling from the mobile application. + (line 12) +* org-odd-levels-only: Matching tags and properties. + (line 64) +* org-odd-levels-only <1>: In-buffer Settings. (line 172) +* org-odd-levels-only <2>: Clean View. (line 74) +* org-odd-levels-only <3>: Special Agenda Views. + (line 41) +* org-odt-category-map-alist: Labels and captions in ODT export. + (line 21) +* org-odt-convert-process: Extending ODT export. + (line 12) +* org-odt-create-custom-styles-for-srcblocks: Literal examples in ODT export. + (line 16) +* org-odt-fontify-srcblocks: Literal examples in ODT export. + (line 13) +* org-odt-pixels-per-inch: Images in ODT export. + (line 34) +* org-odt-preferred-output-format: ODT export commands. (line 9) +* org-odt-preferred-output-format <1>: Extending ODT export. + (line 21) +* org-odt-styles-file: ODT specific export settings. + (line 22) +* org-odt-styles-file <1>: Applying custom styles. + (line 25) +* org-odt-table-styles: Advanced topics in ODT export. + (line 158) +* org-odt-table-styles <1>: Advanced topics in ODT export. + (line 226) +* org-outline-path-complete-in-steps: Refile and Copy. (line 17) +* org-overriding-columns-format: Agenda Column View. (line 19) +* org-plain-list-ordered-item-terminator: Plain Lists. (line 15) +* org-plain-list-ordered-item-terminator <1>: Plain Lists. (line 131) +* org-popup-calendar-for-date-prompt: The date/time prompt. + (line 75) +* org-pretty-entities: In-buffer Settings. (line 248) +* org-preview-latex-default-process: Previewing LaTeX fragments. + (line 6) +* org-priority-faces: Priorities. (line 13) +* org-priority-start-cycle-with-default: Priorities. (line 33) +* org-property-allowed-value-functions: Using the Property API. + (line 63) +* org-protocol-default-template-key: capture protocol. (line 19) +* org-protocol-project-alist: open-source protocol. + (line 13) +* org-publish-project-alist: Project alist. (line 6) +* org-publish-project-alist <1>: Publishing options. (line 12) +* org-publish-use-timestamps-flag: Triggering Publication. + (line 21) +* org-put-time-stamp-overlays: In-buffer Settings. (line 195) +* org-read-date-display-live: The date/time prompt. + (line 94) +* org-read-date-force-compatible-dates: The date/time prompt. + (line 60) +* org-read-date-prefer-future: The date/time prompt. + (line 6) +* org-refile-allow-creating-parent-nodes: Refile and Copy. (line 17) +* org-refile-keep: Refile and Copy. (line 45) +* org-refile-targets: Refile and Copy. (line 17) +* org-refile-use-cache: Refile and Copy. (line 50) +* org-refile-use-outline-path: Refile and Copy. (line 17) +* org-remove-highlights-with-change: Sparse Trees. (line 20) +* org-remove-highlights-with-change <1>: Clocking commands. (line 83) +* org-replace-disputed-keys: Conflicts. (line 17) +* org-return-follows-link: Handling Links. (line 127) +* org-reverse-note-order: Refile and Copy. (line 17) +* org-scheduled-delay-days: Deadlines and Scheduling. + (line 42) +* org-show-context-detail: Sparse Trees. (line 6) +* org-sort-agenda-noeffort-is-high: Filtering/limiting agenda times. + (line 88) +* org-sparse-tree-open-archived-trees: Internal archiving. (line 19) +* org-special-ctrl-a/e: Headlines. (line 6) +* org-special-ctrl-k: Headlines. (line 6) +* org-speed-commands-user: Speed Keys. (line 18) +* org-src-ask-before-returning-to-edit-buffer: Editing Source Code. + (line 40) +* org-src-block-faces: Editing Source Code. (line 43) +* org-src-fontify-natively: Editing Source Code. (line 43) +* org-src-lang-modes: Editing Source Code. (line 22) +* org-src-preserve-indentation: Editing Source Code. (line 32) +* org-src-window-setup: Editing Source Code. (line 28) +* org-startup-align-all-tables: Column Width and Alignment. + (line 19) +* org-startup-align-all-tables <1>: In-buffer Settings. (line 93) +* org-startup-folded: Initial visibility. (line 6) +* org-startup-folded <1>: In-buffer Settings. (line 67) +* org-startup-folded <2>: Speeding Up Your Agendas. + (line 19) +* org-startup-indented: In-buffer Settings. (line 84) +* org-startup-indented <1>: Clean View. (line 32) +* org-startup-shrink-all-tables: Column Width and Alignment. + (line 64) +* org-startup-shrink-all-tables <1>: In-buffer Settings. (line 103) +* org-startup-with-inline-images: Images. (line 24) +* org-startup-with-inline-images <1>: In-buffer Settings. (line 107) +* org-startup-with-latex-preview: Previewing LaTeX fragments. + (line 26) +* org-store-link-props: Template expansion. (line 102) +* org-structure-template-alist: Structure Templates. (line 17) +* org-stuck-projects: Stuck projects. (line 17) +* org-support-shift-select: Plain Lists. (line 95) +* org-support-shift-select <1>: Plain Lists. (line 154) +* org-support-shift-select <2>: Conflicts. (line 6) +* org-table-automatic-realign: Column Width and Alignment. + (line 10) +* org-table-copy-increment: Built-in Table Editor. + (line 173) +* org-table-current-column: References. (line 89) +* org-table-current-dline: References. (line 89) +* org-table-duration-custom-format: Durations and time values. + (line 6) +* org-table-export-default-format: Built-in Table Editor. + (line 210) +* org-table-formula: In-buffer Settings. (line 28) +* org-table-formula-constants: References. (line 113) +* org-table-formula-constants <1>: In-buffer Settings. (line 28) +* org-table-formula-constants <2>: Cooperation. (line 14) +* org-table-use-standard-references: Editing and debugging formulas. + (line 6) +* org-tag-alist: Setting Tags. (line 22) +* org-tag-alist <1>: In-buffer Settings. (line 258) +* org-tag-faces: Tags. (line 10) +* org-tag-persistent-alist: Setting Tags. (line 37) +* org-tags-column: Setting Tags. (line 11) +* org-tags-exclude-from-inheritance: Tag Inheritance. (line 22) +* org-tags-match-list-sublevels: Tag Inheritance. (line 26) +* org-tags-match-list-sublevels <1>: Tag Searches. (line 19) +* org-tags-match-list-sublevels <2>: Property Searches. (line 18) +* org-tags-match-list-sublevels <3>: Matching tags and properties. + (line 21) +* org-tempo-keywords-alist: Structure Templates. (line 21) +* org-texinfo-classes: Texinfo file header. (line 19) +* org-texinfo-classes <1>: Headings and sectioning structure. + (line 6) +* org-texinfo-coding-system: Texinfo file header. (line 11) +* org-texinfo-default-class: Texinfo specific export settings. + (line 20) +* org-texinfo-default-class <1>: Headings and sectioning structure. + (line 6) +* org-texinfo-info-process: Texinfo export commands. + (line 11) +* org-texinfo-table-default-markup: Plain lists in Texinfo export. + (line 12) +* org-time-stamp-custom-formats: Custom time format. (line 6) +* org-time-stamp-overlay-formats: In-buffer Settings. (line 195) +* org-time-stamp-rounding-minutes: Creating Timestamps. (line 16) +* org-timer-default-timer: Timers. (line 23) +* org-todo, face: Faces for TODO keywords. + (line 6) +* org-todo-keyword-faces: Faces for TODO keywords. + (line 6) +* org-todo-keywords: TODO Basics. (line 41) +* org-todo-keywords <1>: TODO Extensions. (line 6) +* org-todo-keywords <2>: Global TODO list. (line 18) +* org-todo-keywords <3>: In-buffer Settings. (line 265) +* org-todo-repeat-to-state: Repeated tasks. (line 22) +* org-todo-state-tags-triggers: TODO Basics. (line 62) +* org-track-ordered-property-with-tag: TODO dependencies. (line 38) +* org-track-ordered-property-with-tag <1>: Checkboxes. (line 80) +* org-treat-insert-todo-heading-as-state-change: Structure Editing. + (line 29) +* org-treat-S-cursor-todo-selection-as-state-change: TODO Basics. + (line 34) +* org-use-property-inheritance: Property Inheritance. + (line 6) +* org-use-property-inheritance <1>: Using Header Arguments. + (line 56) +* org-use-property-inheritance <2>: Using the Property API. + (line 19) +* org-use-speed-commands: Speed Keys. (line 13) +* org-use-sub-superscripts: Subscripts and Superscripts. + (line 13) +* org-use-tag-inheritance: Tag Inheritance. (line 22) +* org-yank-adjusted-subtrees: Structure Editing. (line 79) +* org-yank-folded-subtrees: Structure Editing. (line 79) +* parse-time-months: The date/time prompt. + (line 56) +* parse-time-weekdays: The date/time prompt. + (line 56) +* user-full-name: Export Settings. (line 25) +* user-mail-address: Export Settings. (line 35) + + + +Tag Table: +Node: Top879 +Node: Introduction21533 +Node: Summary21990 +Node: Installation24702 +Ref: Using Emacs packaging system25327 +Ref: Downloading Org as an archive25884 +Ref: Using Org's git repository26542 +Node: Activation27438 +Ref: Activation-Footnote-129082 +Node: Feedback29209 +Ref: How to create a useful backtrace31802 +Ref: Feedback-Footnote-132954 +Node: Conventions33080 +Ref: TODO keywords tags properties etc33246 +Ref: Key bindings and commands34131 +Node: Document Structure34761 +Node: Headlines36006 +Ref: Headlines-Footnote-137073 +Node: Visibility Cycling37352 +Node: Global and local cycling37737 +Ref: Global and local cycling-Footnote-140471 +Ref: Global and local cycling-Footnote-240533 +Node: Initial visibility40837 +Ref: Initial visibility-Footnote-141905 +Node: Catching invisible edits42098 +Node: Motion42569 +Node: Structure Editing44028 +Node: Sparse Trees50487 +Ref: Sparse Trees-Footnote-153043 +Ref: Sparse Trees-Footnote-253158 +Node: Plain Lists53234 +Ref: Plain Lists-Footnote-160730 +Ref: Plain Lists-Footnote-261094 +Ref: Plain Lists-Footnote-361194 +Ref: Plain Lists-Footnote-461451 +Ref: Plain Lists-Footnote-561628 +Ref: Plain Lists-Footnote-661732 +Ref: Plain Lists-Footnote-761838 +Node: Drawers61908 +Ref: Drawers-Footnote-163573 +Node: Blocks63685 +Node: Creating Footnotes64300 +Ref: Creating Footnotes-Footnote-167462 +Ref: Creating Footnotes-Footnote-267568 +Node: Tables67675 +Node: Built-in Table Editor68353 +Ref: Creation and conversion70083 +Ref: Re-aligning and field motion71021 +Ref: Column and row editing71948 +Ref: Regions73904 +Ref: Calculations75303 +Ref: Miscellaneous (1)76101 +Ref: Built-in Table Editor-Footnote-178161 +Node: Column Width and Alignment78269 +Node: Column Groups81601 +Node: Orgtbl Mode83163 +Node: The Spreadsheet83972 +Node: References85441 +Ref: Field references85895 +Ref: Range references88334 +Ref: Field coordinates in formulas89556 +Ref: Named references90542 +Ref: Remote references91513 +Ref: References-Footnote-192435 +Ref: References-Footnote-292663 +Ref: References-Footnote-392766 +Node: Formula syntax for Calc93091 +Ref: Formula syntax for Calc-Footnote-198613 +Node: Formula syntax for Lisp98952 +Node: Durations and time values100730 +Node: Field and range formulas102112 +Node: Column formulas104576 +Node: Lookup functions106683 +Node: Editing and debugging formulas108647 +Ref: Using multiple TBLFM lines113159 +Ref: Debugging formulas114002 +Node: Updating the table114426 +Node: Advanced features115793 +Ref: Advanced features-Footnote-1120239 +Node: Org Plot120347 +Ref: Graphical plots using Gnuplot120543 +Ref: Plot options121742 +Ref: ASCII bar plots123515 +Node: Hyperlinks124765 +Node: Link Format125624 +Ref: Link Format-Footnote-1127540 +Ref: Link Format-Footnote-2127772 +Node: Internal Links127904 +Ref: Internal Links-Footnote-1130121 +Ref: Internal Links-Footnote-2130361 +Node: Radio Targets130502 +Node: External Links131214 +Ref: External Links-Footnote-1135355 +Node: Handling Links135779 +Ref: Handling Links-Footnote-1143481 +Ref: Handling Links-Footnote-2143642 +Ref: Handling Links-Footnote-3143832 +Ref: Handling Links-Footnote-4144128 +Ref: Handling Links-Footnote-5144390 +Ref: Handling Links-Footnote-6144512 +Node: Using Links Outside Org144591 +Node: Link Abbreviations145061 +Node: Search Options147947 +Ref: Search Options-Footnote-1149906 +Node: Custom Searches149987 +Node: TODO Items151017 +Ref: TODO Items-Footnote-1152137 +Node: TODO Basics152251 +Node: TODO Extensions155170 +Node: Workflow states156218 +Ref: Workflow states-Footnote-1157577 +Node: TODO types157693 +Ref: TODO types-Footnote-1159332 +Node: Multiple sets in one file159404 +Node: Fast access to TODO states161366 +Ref: Fast access to TODO states-Footnote-1162244 +Ref: Fast access to TODO states-Footnote-2162351 +Node: Per-file keywords162653 +Ref: Per-file keywords-Footnote-1164097 +Node: Faces for TODO keywords164301 +Node: TODO dependencies165369 +Node: Progress Logging167818 +Node: Closing items168534 +Ref: Closing items-Footnote-1169519 +Ref: Closing items-Footnote-2169593 +Node: Tracking TODO state changes169671 +Ref: Tracking TODO state changes-Footnote-1172879 +Ref: Tracking TODO state changes-Footnote-2172941 +Ref: Tracking TODO state changes-Footnote-3173099 +Node: Tracking your habits173377 +Node: Priorities177729 +Ref: Priorities-Footnote-1179859 +Node: Breaking Down Tasks179932 +Ref: Breaking Down Tasks-Footnote-1181965 +Node: Checkboxes182072 +Ref: Checkboxes-Footnote-1186720 +Ref: Checkboxes-Footnote-2186848 +Ref: Checkboxes-Footnote-3187028 +Node: Tags187142 +Node: Tag Inheritance188230 +Ref: Tag Inheritance-Footnote-1190097 +Ref: Tag Inheritance-Footnote-2190201 +Node: Setting Tags190331 +Ref: Setting Tags-Footnote-1196802 +Ref: Setting Tags-Footnote-2196980 +Node: Tag Hierarchy197058 +Node: Tag Searches200619 +Node: Properties and Columns201925 +Node: Property Syntax203318 +Node: Special Properties207588 +Node: Property Searches209335 +Node: Property Inheritance210770 +Node: Column View212637 +Node: Defining columns213883 +Node: Scope of column definitions214263 +Node: Column attributes215173 +Ref: Column attributes-Footnote-1219577 +Ref: Column attributes-Footnote-2219708 +Ref: Column attributes-Footnote-3219906 +Node: Using column view220045 +Ref: Turning column view on or off220206 +Ref: Editing values221184 +Ref: Modifying column view on-the-fly222554 +Node: Capturing column view222926 +Ref: Capturing column view-Footnote-1226166 +Node: Dates and Times226303 +Node: Timestamps227217 +Ref: Timestamps-Footnote-1229614 +Ref: Timestamps-Footnote-2229910 +Node: Creating Timestamps230653 +Node: The date/time prompt233662 +Ref: The date/time prompt-Footnote-1238397 +Ref: The date/time prompt-Footnote-2238568 +Ref: The date/time prompt-Footnote-3238679 +Node: Custom time format238777 +Node: Deadlines and Scheduling240541 +Ref: Deadlines and Scheduling-Footnote-1244094 +Node: Inserting deadline/schedule244254 +Ref: Inserting deadline/schedule-Footnote-1246241 +Ref: Inserting deadline/schedule-Footnote-2246402 +Ref: Inserting deadline/schedule-Footnote-3246528 +Node: Repeated tasks246654 +Ref: Repeated tasks-Footnote-1251131 +Ref: Repeated tasks-Footnote-2251214 +Ref: Repeated tasks-Footnote-3251497 +Node: Clocking Work Time251719 +Ref: Clocking Work Time-Footnote-1252919 +Ref: Clocking Work Time-Footnote-2253072 +Node: Clocking commands253214 +Ref: Clocking commands-Footnote-1258297 +Ref: Clocking commands-Footnote-2258412 +Ref: Clocking commands-Footnote-3258494 +Ref: Clocking commands-Footnote-4258557 +Node: The clock table258640 +Ref: The clock table-Footnote-1266594 +Ref: The clock table-Footnote-2266703 +Ref: The clock table-Footnote-3266801 +Node: Resolving idle time266927 +Ref: Resolving idle time (1)267118 +Ref: Continuous clocking270315 +Ref: Resolving idle time-Footnote-1270857 +Node: Effort Estimates271336 +Ref: Effort Estimates-Footnote-1274112 +Node: Timers274223 +Node: Capture Refile Archive276437 +Node: Capture277418 +Node: Setting up capture277934 +Node: Using capture278290 +Node: Capture templates280681 +Node: Template elements282704 +Ref: Template elements-Footnote-1289403 +Ref: Template elements-Footnote-2289736 +Node: Template expansion289923 +Ref: Template expansion-Footnote-1293838 +Ref: Template expansion-Footnote-2293929 +Ref: Template expansion-Footnote-3294119 +Node: Templates in contexts294216 +Node: Attachments295050 +Ref: Attachments-Footnote-1299737 +Node: RSS Feeds299891 +Node: Protocols301351 +Node: store-link protocol302813 +Node: capture protocol303627 +Node: open-source protocol304771 +Node: Refile and Copy307978 +Ref: Refile and Copy-Footnote-1310444 +Node: Archiving310558 +Node: Moving subtrees311266 +Node: Internal archiving313290 +Node: Agenda Views316010 +Node: Agenda Files318411 +Ref: Agenda Files-Footnote-1321317 +Ref: Agenda Files-Footnote-2321461 +Node: Agenda Dispatcher321659 +Ref: Agenda Dispatcher-Footnote-1324393 +Ref: Agenda Dispatcher-Footnote-2324491 +Node: Built-in Agenda Views324597 +Node: Weekly/daily agenda325189 +Ref: Calendar/Diary integration326524 +Ref: Anniversaries from BBDB328583 +Ref: Appointment reminders330375 +Ref: Weekly/daily agenda-Footnote-1330925 +Ref: Weekly/daily agenda-Footnote-2331169 +Node: Global TODO list331389 +Node: Matching tags and properties334011 +Node: Search view341079 +Node: Stuck projects342676 +Node: Presentation and Sorting344808 +Node: Categories345780 +Node: Time-of-day specifications346524 +Ref: Time-of-day specifications-Footnote-1348510 +Node: Sorting of agenda items348633 +Node: Filtering/limiting agenda times350246 +Ref: Filtering in the agenda350885 +Ref: Setting limits for the agenda355552 +Ref: Filtering/limiting agenda times-Footnote-1357101 +Node: Agenda Commands357517 +Ref: Motion (1)358245 +Ref: View/Go to Org file358448 +Ref: Change display359954 +Ref: Remote editing367453 +Ref: Bulk remote editing selected entries372613 +Ref: Calendar commands375708 +Ref: Quit and exit377589 +Ref: Agenda Commands-Footnote-1377951 +Ref: Agenda Commands-Footnote-2378027 +Ref: Agenda Commands-Footnote-3378131 +Node: Custom Agenda Views378218 +Node: Storing searches378865 +Ref: Storing searches-Footnote-1381814 +Ref: Storing searches-Footnote-2381931 +Node: Block agenda382178 +Node: Setting options383429 +Node: Exporting Agenda Views387038 +Ref: Exporting Agenda Views-Footnote-1391572 +Ref: Exporting Agenda Views-Footnote-2391726 +Ref: Exporting Agenda Views-Footnote-3391876 +Ref: Exporting Agenda Views-Footnote-4392063 +Node: Agenda Column View392145 +Node: Markup for Rich Contents395255 +Node: Paragraphs396490 +Node: Emphasis and Monospace397620 +Node: Subscripts and Superscripts398271 +Node: Special Symbols399323 +Ref: Special Symbols-Footnote-1401231 +Ref: Special Symbols-Footnote-2401396 +Node: Embedded LaTeX401493 +Ref: Embedded LaTeX-Footnote-1402337 +Node: LaTeX fragments402533 +Ref: LaTeX fragments-Footnote-1404684 +Node: Previewing LaTeX fragments404877 +Ref: Previewing LaTeX fragments-Footnote-1406315 +Node: CDLaTeX mode406563 +Ref: CDLaTeX mode-Footnote-1409119 +Node: Literal Examples409266 +Ref: Literal Examples-Footnote-1413845 +Ref: Literal Examples-Footnote-2414215 +Ref: Literal Examples-Footnote-3414393 +Ref: Literal Examples-Footnote-4414578 +Ref: Literal Examples-Footnote-5414843 +Node: Images414941 +Ref: Images-Footnote-1416020 +Ref: Images-Footnote-2416143 +Node: Captions416304 +Node: Horizontal Rules416999 +Node: Exporting417223 +Node: The Export Dispatcher419937 +Node: Export Settings422650 +Ref: Export Settings-Footnote-1430738 +Ref: Export Settings-Footnote-2430850 +Ref: Export Settings-Footnote-3430951 +Node: Table of Contents431149 +Ref: Table of Contents-Footnote-1433438 +Node: Include Files433605 +Ref: Include Files-Footnote-1436552 +Node: Macro Replacement436730 +Ref: Macro Replacement-Footnote-1440605 +Node: Comment Lines440822 +Ref: Comment Lines-Footnote-1441680 +Node: ASCII/Latin-1/UTF-8 export441784 +Ref: ASCII export commands442633 +Ref: ASCII specific export settings443166 +Ref: Header and sectioning structure443610 +Ref: Quoting ASCII text443884 +Ref: ASCII specific attributes444256 +Ref: ASCII special blocks444533 +Node: Beamer Export444880 +Node: Beamer export commands445625 +Node: Beamer specific export settings446325 +Node: Frames and Blocks in Beamer448225 +Ref: Frames and Blocks in Beamer-Footnote-1451592 +Node: Beamer specific syntax451751 +Node: Editing support453725 +Node: A Beamer example454216 +Node: HTML Export455465 +Node: HTML export commands456515 +Node: HTML specific export settings457061 +Node: HTML doctypes459150 +Node: HTML preamble and postamble461326 +Node: Quoting HTML tags462516 +Node: Links in HTML export463210 +Node: Tables in HTML export464668 +Node: Images in HTML export466123 +Node: Math formatting in HTML export467608 +Ref: Math formatting in HTML export-Footnote-1469141 +Ref: Math formatting in HTML export-Footnote-2469265 +Ref: Math formatting in HTML export-Footnote-3469526 +Node: Text areas in HTML export469698 +Node: CSS support470838 +Ref: CSS support-Footnote-1474388 +Node: JavaScript support474568 +Node: LaTeX Export477821 +Node: LaTeX/PDF export commands479594 +Ref: LaTeX/PDF export commands-Footnote-1481092 +Node: LaTeX specific export settings481294 +Node: LaTeX header and sectioning484521 +Node: Quoting LaTeX code486633 +Node: Tables in LaTeX export487424 +Node: Images in LaTeX export491837 +Node: Plain lists in LaTeX export494335 +Node: Source blocks in LaTeX export495350 +Node: Example blocks in LaTeX export496775 +Node: Special blocks in LaTeX export497496 +Node: Horizontal rules in LaTeX export498754 +Node: Markdown Export499149 +Ref: Markdown export commands499611 +Ref: Header and sectioning structure (1)500048 +Node: OpenDocument Text Export500465 +Ref: OpenDocument Text Export-Footnote-1501566 +Node: Pre-requisites for ODT export501715 +Node: ODT export commands502088 +Node: ODT specific export settings503264 +Node: Extending ODT export504310 +Ref: Automatically exporting to other formats505116 +Ref: Converting between document formats505542 +Node: Applying custom styles506084 +Ref: Applying custom styles the easy way506611 +Ref: Using third-party styles and templates507569 +Node: Links in ODT export507866 +Node: Tables in ODT export508523 +Node: Images in ODT export510528 +Ref: Embedding images510727 +Ref: Embedding clickable images511044 +Ref: Sizing and scaling of embedded images511378 +Ref: Anchoring of images513062 +Node: Math formatting in ODT export513384 +Node: LaTeX math snippets513808 +Ref: LaTeX math snippets-Footnote-1516056 +Ref: LaTeX math snippets-Footnote-2516132 +Node: MathML and OpenDocument formula files516177 +Node: Labels and captions in ODT export516680 +Node: Literal examples in ODT export517951 +Node: Advanced topics in ODT export518787 +Ref: Configuring a document converter519092 +Ref: Working with OpenDocument style files520033 +Ref: x-orgodtstyles-xml520499 +Ref: x-orgodtcontenttemplate-xml520841 +Ref: x-overriding-factory-styles521485 +Ref: Creating one-off styles522729 +Ref: Customizing tables in ODT export524733 +Ref: Validating OpenDocument XML529593 +Ref: Advanced topics in ODT export-Footnote-1530390 +Ref: Advanced topics in ODT export-Footnote-2530494 +Ref: Advanced topics in ODT export-Footnote-3530587 +Node: Org Export530935 +Ref: Org export commands531286 +Node: Texinfo Export531592 +Node: Texinfo export commands532570 +Node: Texinfo specific export settings533190 +Node: Texinfo file header534338 +Node: Texinfo title and copyright page535316 +Node: Info directory file536675 +Node: Headings and sectioning structure537395 +Node: Indices539420 +Node: Quoting Texinfo code540444 +Node: Plain lists in Texinfo export540937 +Node: Tables in Texinfo export542296 +Node: Images in Texinfo export542787 +Node: Quotations in Texinfo export543420 +Node: Special blocks in Texinfo export544368 +Node: A Texinfo example545016 +Node: iCalendar Export547123 +Node: Other Built-in Back-ends550856 +Node: Advanced Export Configuration551483 +Ref: Hooks551690 +Ref: Filters552613 +Ref: Defining filters for individual files555122 +Ref: Extending an existing back-end555928 +Node: Export in Foreign Buffers558168 +Node: Publishing559316 +Node: Configuration560194 +Node: Project alist560971 +Node: Sources and destinations562108 +Node: Selecting files563421 +Node: Publishing action564371 +Ref: Publishing action-Footnote-1566195 +Node: Publishing options566358 +Ref: Generic properties567105 +Ref: ASCII specific properties568992 +Ref: Beamer specific properties570592 +Ref: HTML specific properties571157 +Ref: LaTeX specific properties575378 +Ref: Markdown specific properties578302 +Ref: ODT specific properties578540 +Ref: Texinfo specific properties579472 +Node: Publishing links580819 +Node: Site map582194 +Node: Generating an index585506 +Node: Uploading Files586293 +Node: Sample Configuration588071 +Node: Simple example588564 +Node: Complex example589212 +Node: Triggering Publication591256 +Node: Working with Source Code592269 +Node: Structure of Code Blocks597124 +Node: Using Header Arguments599603 +Ref: System-wide header arguments600325 +Ref: Header arguments in Org mode properties601248 +Ref: Code block specific header arguments603076 +Ref: Header arguments in function calls604575 +Node: Environment of a Code Block605249 +Ref: Passing arguments605458 +Ref: Using sessions613328 +Ref: Choosing a working directory614727 +Ref: Inserting headers and footers616465 +Node: Evaluating Code Blocks616975 +Ref: How to evaluate source code617425 +Ref: Limit code block evaluation620327 +Ref: Cache results of evaluation621187 +Ref: Evaluating Code Blocks-Footnote-1623773 +Ref: Evaluating Code Blocks-Footnote-2623907 +Node: Results of Evaluation624065 +Ref: Collection624905 +Ref: Type627165 +Ref: Format630445 +Ref: Handling632695 +Ref: Post-processing633410 +Ref: Results of Evaluation-Footnote-1635160 +Node: Exporting Code Blocks635582 +Node: Extracting Source Code637930 +Ref: Header arguments638906 +Ref: Functions642451 +Ref: Hooks (1)642702 +Ref: Jumping between code and Org642937 +Node: Languages643447 +Ref: Languages-Footnote-1646075 +Ref: Languages-Footnote-2646233 +Node: Editing Source Code646387 +Node: Noweb Reference Syntax649110 +Ref: Noweb Reference Syntax-Footnote-1654617 +Node: Library of Babel654707 +Node: Key bindings and Useful Functions655420 +Node: Batch Execution657840 +Node: Miscellaneous658618 +Node: Completion659714 +Node: Structure Templates661624 +Ref: Structure Templates-Footnote-1663375 +Node: Escape Character663467 +Node: Speed Keys664188 +Node: Code Evaluation Security665371 +Node: Customization668227 +Node: In-buffer Settings668664 +Ref: In-buffer Settings-Footnote-1677647 +Node: The Very Busy C-c C-c Key677857 +Node: Clean View679821 +Ref: Clean View-Footnote-1683253 +Ref: Clean View-Footnote-2683492 +Ref: Clean View-Footnote-3683551 +Node: TTY Keys683632 +Node: Documentation Access685239 +Node: Interaction685648 +Node: Cooperation686063 +Node: Conflicts688950 +Node: Org Crypt693557 +Node: Org Mobile695091 +Node: Setting up the staging area696429 +Ref: Setting up the staging area-Footnote-1697664 +Ref: Setting up the staging area-Footnote-2697871 +Node: Pushing to the mobile application698043 +Ref: Pushing to the mobile application-Footnote-1699049 +Ref: Pushing to the mobile application-Footnote-2699140 +Ref: Pushing to the mobile application-Footnote-3699507 +Node: Pulling from the mobile application699583 +Ref: Pulling from the mobile application-Footnote-1701891 +Node: Org Syntax701944 +Node: Hacking703559 +Node: Hooks (2)704505 +Node: Add-on Packages704828 +Node: Adding Hyperlink Types705366 +Node: Adding Export Back-ends708789 +Node: Tables in Arbitrary Syntax710041 +Node: Radio tables711305 +Node: A LaTeX example713437 +Ref: A LaTeX example-Footnote-1717284 +Ref: A LaTeX example-Footnote-2717327 +Ref: A LaTeX example-Footnote-3717488 +Node: Translator functions717940 +Node: Dynamic Blocks720111 +Node: Special Agenda Views722257 +Ref: Special Agenda Views-Footnote-1725963 +Ref: Special Agenda Views-Footnote-2726170 +Node: Speeding Up Your Agendas726302 +Node: Extracting Agenda Information727356 +Node: Using the Property API731156 +Node: Using the Mapping API734506 +Node: History and Acknowledgments738537 +Ref: From Carsten738730 +Ref: From Bastien742154 +Ref: List of Contributions744286 +Node: GNU Free Documentation License752495 +Node: Main Index777875 +Node: Key Index871484 +Node: Command and Function Index925433 +Node: Variable Index970155 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/org-plus-contrib-20170407/org-agenda.el b/elpa/org-plus-contrib-20190904/org-agenda.el similarity index 88% rename from elpa/org-plus-contrib-20170407/org-agenda.el rename to elpa/org-plus-contrib-20190904/org-agenda.el index 8a590ce2..76ff2d98 100644 --- a/elpa/org-plus-contrib-20170407/org-agenda.el +++ b/elpa/org-plus-contrib-20190904/org-agenda.el @@ -1,10 +1,10 @@ ;;; org-agenda.el --- Dynamic task and appointment lists for Org -;; Copyright (C) 2004-2017 Free Software Foundation, Inc. +;; Copyright (C) 2004-2019 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -19,7 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: @@ -277,10 +277,7 @@ list are are :deadline List deadline due on that date. When the date is today, also list any deadlines past due, or due within - `org-deadline-warning-days'. `:deadline' must appear before - `:scheduled' if the setting of - `org-agenda-skip-scheduled-if-deadline-is-shown' is to have - any effect. + `org-deadline-warning-days'. :deadline* Same as above, but only include the deadline if it has an hour specification as [h]h:mm. @@ -327,12 +324,14 @@ the daily/weekly agenda, see `org-agenda-skip-function'.") (string)) (list :tag "Number of days in agenda" (const org-agenda-span) - (choice (const :tag "Day" day) - (const :tag "Week" week) - (const :tag "Fortnight" fortnight) - (const :tag "Month" month) - (const :tag "Year" year) - (integer :tag "Custom"))) + (list + (const :format "" quote) + (choice (const :tag "Day" day) + (const :tag "Week" week) + (const :tag "Fortnight" fortnight) + (const :tag "Month" month) + (const :tag "Year" year) + (integer :tag "Custom")))) (list :tag "Fixed starting date" (const org-agenda-start-day) (string :value "2007-11-01")) @@ -396,35 +395,35 @@ the daily/weekly agenda, see `org-agenda-skip-function'.") (choice :tag "Condition type" (list :tag "Regexp matches" :inline t - (const :format "" 'regexp) + (const :format "" regexp) (regexp)) (list :tag "Regexp does not match" :inline t - (const :format "" 'notregexp) + (const :format "" notregexp) (regexp)) (list :tag "TODO state is" :inline t - (const 'todo) + (const todo) (choice - (const :tag "Any not-done state" 'todo) - (const :tag "Any done state" 'done) - (const :tag "Any state" 'any) + (const :tag "Any not-done state" todo) + (const :tag "Any done state" done) + (const :tag "Any state" any) (list :tag "Keyword list" (const :format "" quote) (repeat (string :tag "Keyword"))))) (list :tag "TODO state is not" :inline t - (const 'nottodo) + (const nottodo) (choice - (const :tag "Any not-done state" 'todo) - (const :tag "Any done state" 'done) - (const :tag "Any state" 'any) + (const :tag "Any not-done state" todo) + (const :tag "Any done state" done) + (const :tag "Any state" any) (list :tag "Keyword list" (const :format "" quote) (repeat (string :tag "Keyword"))))) - (const :tag "scheduled" 'scheduled) - (const :tag "not scheduled" 'notscheduled) - (const :tag "deadline" 'deadline) - (const :tag "no deadline" 'notdeadline) - (const :tag "timestamp" 'timestamp) - (const :tag "no timestamp" 'nottimestamp)))))) + (const :tag "scheduled" scheduled) + (const :tag "not scheduled" notscheduled) + (const :tag "deadline" deadline) + (const :tag "no deadline" notdeadline) + (const :tag "timestamp" timestamp) + (const :tag "no timestamp" nottimestamp)))))) (list :tag "Non-standard skipping condition" :value (org-agenda-skip-function) (const org-agenda-skip-function) @@ -607,8 +606,8 @@ subtree to see if any of the subtasks have project status. See also the variable `org-tags-match-list-sublevels' which applies to projects matched by this search as well. -After defining this variable, you may use `\\[org-agenda-list-stuck-projects]' -\(bound to `C-c a #') to produce the list." +After defining this variable, you may use `org-agenda-list-stuck-projects' +\(bound to `\\[org-agenda] #') to produce the list." :group 'org-agenda-custom-commands :type '(list (string :tag "Tags/TODO match to identify a project") @@ -1069,7 +1068,7 @@ have been removed when this is called, as will any matches for regular expressions listed in `org-agenda-entry-text-exclude-regexps'.") (defvar org-agenda-include-inactive-timestamps nil - "Non-nil means include inactive time stamps in agenda and timeline. + "Non-nil means include inactive time stamps in agenda. Dynamically scoped.") (defgroup org-agenda-windows nil @@ -1143,17 +1142,17 @@ When nil, only the days which actually have entries are shown." (defcustom org-agenda-format-date 'org-agenda-format-date-aligned "Format string for displaying dates in the agenda. -Used by the daily/weekly agenda and by the timeline. This should be -a format string understood by `format-time-string', or a function returning -the formatted date as a string. The function must take a single argument, -a calendar-style date list like (month day year)." +Used by the daily/weekly agenda. This should be a format string +understood by `format-time-string', or a function returning the +formatted date as a string. The function must take a single +argument, a calendar-style date list like (month day year)." :group 'org-agenda-daily/weekly :type '(choice (string :tag "Format string") (function :tag "Function"))) (defun org-agenda-format-date-aligned (date) - "Format a DATE string for display in the daily/weekly agenda, or timeline. + "Format a DATE string for display in the daily/weekly agenda. This function makes sure that dates are aligned for easy reading." (require 'cal-iso) (let* ((dayname (calendar-day-name date)) @@ -1213,8 +1212,7 @@ For example, 9:30am would become 09:30 rather than 9:30." (defcustom org-agenda-weekend-days '(6 0) "Which days are weekend? -These days get the special face `org-agenda-date-weekend' in the agenda -and timeline buffers." +These days get the special face `org-agenda-date-weekend' in the agenda." :group 'org-agenda-daily/weekly :type '(set :greedy t (const :tag "Monday" 1) @@ -1229,7 +1227,7 @@ and timeline buffers." "Non-nil means jump to today when moving a past date forward in time. When using S-right in the agenda to move a a date forward, and the date stamp currently points to the past, the first key press will move it -to today. WHen nil, just move one day forward even if the date stays +to today. When nil, just move one day forward even if the date stays in the past." :group 'org-agenda-daily/weekly :version "24.1" @@ -1403,6 +1401,9 @@ current display in the agenda." :group 'org-agenda-daily/weekly :type 'plist) +(defvaralias 'org-agenda-search-view-search-words-only + 'org-agenda-search-view-always-boolean) + (defcustom org-agenda-search-view-always-boolean nil "Non-nil means the search string is interpreted as individual parts. @@ -1431,9 +1432,6 @@ boolean search." :version "24.1" :type 'boolean) -(defvaralias 'org-agenda-search-view-search-words-only - 'org-agenda-search-view-always-boolean) - (defcustom org-agenda-search-view-force-full-words nil "Non-nil means, search words must be matches as complete words. When nil, they may also match part of a word." @@ -1447,7 +1445,7 @@ E.g. when this is set to 1, the search view will only show headlines of level 1. When set to 0, the default value, don't limit agenda view by outline level." :group 'org-agenda-search-view - :version "24.4" + :version "26.1" :package-version '(Org . "8.3") :type 'integer) @@ -1479,11 +1477,12 @@ the variable `org-agenda-time-grid'." (defcustom org-agenda-time-grid '((daily today require-timed) - "----------------" - (800 1000 1200 1400 1600 1800 2000)) + (800 1000 1200 1400 1600 1800 2000) + "......" + "----------------") "The settings for time grid for agenda display. -This is a list of three items. The first item is again a list. It contains +This is a list of four items. The first item is again a list. It contains symbols specifying conditions when the grid should be displayed: daily if the agenda shows a single day @@ -1492,10 +1491,14 @@ symbols specifying conditions when the grid should be displayed: require-timed show grid only if at least one item has a time specification remove-match skip grid times already present in an entry -The second item is a string which will be placed behind the grid time. +The second item is a list of integers, indicating the times that +should have a grid line. + +The third item is a string which will be placed right after the +times that have a grid line. -The third item is a list of integers, indicating the times that should have -a grid line." +The fourth item is a string placed after the grid times. This +will align with agenda items" :group 'org-agenda-time-grid :type '(list @@ -1507,8 +1510,9 @@ a grid line." require-timed) (const :tag "Skip grid times already present in an entry" remove-match)) - (string :tag "Grid String") - (repeat :tag "Grid Times" (integer :tag "Time")))) + (repeat :tag "Grid Times" (integer :tag "Time")) + (string :tag "Grid String (after agenda times)") + (string :tag "Grid String (aligns with agenda items)"))) (defcustom org-agenda-show-current-time-in-grid t "Non-nil means show the current time in the time grid." @@ -1636,14 +1640,14 @@ When nil, such items are sorted as 0 minutes effort." (defcustom org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s") - (timeline . " % s") (todo . " %i %-12:c") (tags . " %i %-12:c") (search . " %i %-12:c")) "Format specifications for the prefix of items in the agenda views. -An alist with five entries, each for the different agenda types. The -keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. -The values are format strings. + +An alist with one entry per agenda type. The keys of the +sublists are `agenda', `todo', `search' and `tags'. The values +are format strings. This format works similar to a printf format, with the following meaning: @@ -1695,11 +1699,12 @@ Custom commands can set this variable in the options section." (string :tag "General format") (list :greedy t :tag "View dependent" (cons (const agenda) (string :tag "Format")) - (cons (const timeline) (string :tag "Format")) (cons (const todo) (string :tag "Format")) (cons (const tags) (string :tag "Format")) (cons (const search) (string :tag "Format")))) - :group 'org-agenda-line-format) + :group 'org-agenda-line-format + :version "26.1" + :package-version '(Org . "9.1")) (defvar org-prefix-format-compiled nil "The compiled prefix format and associated variables. @@ -1810,7 +1815,7 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour." (defcustom org-agenda-show-inherited-tags t "Non-nil means show inherited tags in each agenda line. -When this option is set to `always', it take precedences over +When this option is set to `always', it takes precedence over `org-agenda-use-tag-inheritance' and inherited tags are shown in every agenda. @@ -1821,7 +1826,7 @@ given agenda type. This can be set to a list of agenda types in which the agenda must display the inherited tags. Available types are `todo', -`agenda', `search' and `timeline'. +`agenda' and `search'. When set to nil, never show inherited tags in agenda lines." :group 'org-agenda-line-format @@ -1833,7 +1838,7 @@ When set to nil, never show inherited tags in agenda lines." (repeat :tag "Show inherited tags only in selected agenda types" (symbol :tag "Agenda type")))) -(defcustom org-agenda-use-tag-inheritance '(todo search timeline agenda) +(defcustom org-agenda-use-tag-inheritance '(todo search agenda) "List of agenda view types where to use tag inheritance. In tags/tags-todo/tags-tree agenda views, tag inheritance is @@ -1842,7 +1847,7 @@ controlled by `org-use-tag-inheritance'. In other agenda types, agenda entries. Still, you may want the agenda to be aware of the inherited tags anyway, e.g. for later tag filtering. -Allowed value are `todo', `search', `timeline' and `agenda'. +Allowed value are `todo', `search' and `agenda'. This variable has no effect if `org-agenda-show-inherited-tags' is set to `always'. In that case, the agenda is aware of those @@ -1851,7 +1856,8 @@ tags. The default value sets tags in every agenda type. Setting this option to nil will speed up non-tags agenda view a lot." :group 'org-agenda - :version "24.3" + :version "26.1" + :package-version '(Org . "9.1") :type '(choice (const :tag "Use tag inheritance in all agenda types" t) (repeat :tag "Use tag inheritance in selected agenda types" @@ -1867,6 +1873,9 @@ Nil means don't hide any tags." (const :tag "Hide none" nil) (string :tag "Regexp "))) +(defvaralias 'org-agenda-remove-tags-when-in-prefix + 'org-agenda-remove-tags) + (defcustom org-agenda-remove-tags nil "Non-nil means remove the tags from the headline copy in the agenda. When this is the symbol `prefix', only remove tags when @@ -1877,18 +1886,23 @@ When this is the symbol `prefix', only remove tags when (const :tag "Never" nil) (const :tag "When prefix format contains %T" prefix))) -(defvaralias 'org-agenda-remove-tags-when-in-prefix - 'org-agenda-remove-tags) +(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column) -(defcustom org-agenda-tags-column -80 +(defcustom org-agenda-tags-column 'auto "Shift tags in agenda items to this column. -If this number is positive, it specifies the column. If it is negative, -it means that the tags should be flushright to that column. For example, --80 works well for a normal 80 character screen." - :group 'org-agenda-line-format - :type 'integer) +If set to `auto', tags will be automatically aligned to the right +edge of the window. -(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column) +If set to a positive number, tags will be left-aligned to that +column. If set to a negative number, tags will be right-aligned +to that column. For example, -80 works well for a normal 80 +character screen." + :group 'org-agenda-line-format + :type '(choice + (const :tag "Automatically align to right edge of window" auto) + (integer :tag "Specific column" -80)) + :package-version '(Org . "9.1") + :version "26.1") (defcustom org-agenda-fontify-priorities 'cookies "Non-nil means highlight low and high priorities in agenda. @@ -2051,18 +2065,38 @@ works you probably want to add it to `org-agenda-custom-commands' for good." (setcdr ass (cdr entry)) (push entry org-agenda-custom-commands)))) +(defmacro org-agenda--insert-overriding-header (default) + "Insert header into agenda view. +The inserted header depends on `org-agenda-overriding-header'. +If the empty string, don't insert a header. If any other string, +insert it as a header. If nil, insert DEFAULT, which should +evaluate to a string." + (declare (debug (form)) (indent defun)) + `(cond + ((not org-agenda-overriding-header) (insert ,default)) + ((equal org-agenda-overriding-header "") nil) + ((stringp org-agenda-overriding-header) + (insert (propertize org-agenda-overriding-header + 'face 'org-agenda-structure) + "\n")) + (t (user-error "Invalid value for `org-agenda-overriding-header': %S" + org-agenda-overriding-header)))) + ;;; Define the org-agenda-mode +(defvaralias 'org-agenda-keymap 'org-agenda-mode-map) (defvar org-agenda-mode-map (make-sparse-keymap) "Keymap for `org-agenda-mode'.") -(defvaralias 'org-agenda-keymap 'org-agenda-mode-map) (defvar org-agenda-menu) ; defined later in this file. (defvar org-agenda-restrict nil) ; defined later in this file. (defvar org-agenda-follow-mode nil) (defvar org-agenda-entry-text-mode nil) (defvar org-agenda-clockreport-mode nil) -(defvar org-agenda-show-log nil) +(defvar org-agenda-show-log nil + "When non-nil, show the log in the agenda. +Do not set this directly; instead use +`org-agenda-start-with-log-mode', which see.") (defvar org-agenda-redo-command nil) (defvar org-agenda-query-string nil) (defvar org-agenda-mode-hook nil @@ -2150,30 +2184,36 @@ The following commands are available: \\{org-agenda-mode-map}" (interactive) - (cond (org-agenda-doing-sticky-redo - ;; Refreshing sticky agenda-buffer - ;; - ;; Preserve the value of `org-agenda-local-vars' variables, - ;; while letting `kill-all-local-variables' kill the rest - (let ((save (buffer-local-variables))) - (kill-all-local-variables) - (mapc 'make-local-variable org-agenda-local-vars) - (dolist (elem save) - (let ((var (car elem)) - (val (cdr elem))) - (when (and val - (member var org-agenda-local-vars)) - (set var val))))) - (setq-local org-agenda-this-buffer-is-sticky t)) - (org-agenda-sticky - ;; Creating a sticky Agenda buffer for the first time - (kill-all-local-variables) - (mapc 'make-local-variable org-agenda-local-vars) - (setq-local org-agenda-this-buffer-is-sticky t)) - (t - ;; Creating a non-sticky agenda buffer - (kill-all-local-variables) - (setq-local org-agenda-this-buffer-is-sticky nil))) + (let ((agenda-local-vars-to-keep + '(text-scale-mode-amount + text-scale-mode + text-scale-mode-lighter + face-remapping-alist)) + (save (buffer-local-variables))) + (kill-all-local-variables) + (cl-flet ((reset-saved (var-set) + "Reset variables in VAR-SET to possibly stored value in SAVE." + (dolist (elem save) + (pcase elem + (`(,var . ,val) ;ignore unbound variables + (when (and val (memq var var-set)) + (set var val))))))) + (cond (org-agenda-doing-sticky-redo + ;; Refreshing sticky agenda-buffer + ;; + ;; Preserve the value of `org-agenda-local-vars' variables. + (mapc #'make-local-variable org-agenda-local-vars) + (reset-saved org-agenda-local-vars) + (setq-local org-agenda-this-buffer-is-sticky t)) + (org-agenda-sticky + ;; Creating a sticky Agenda buffer for the first time + (mapc 'make-local-variable org-agenda-local-vars) + (setq-local org-agenda-this-buffer-is-sticky t)) + (t + ;; Creating a non-sticky agenda buffer + (setq-local org-agenda-this-buffer-is-sticky nil))) + (mapc #'make-local-variable agenda-local-vars-to-keep) + (reset-saved agenda-local-vars-to-keep))) (setq org-agenda-undo-list nil org-agenda-pending-undo-list nil org-agenda-bulk-marked-entries nil) @@ -2184,20 +2224,24 @@ The following commands are available: (setq indent-tabs-mode nil) (use-local-map org-agenda-mode-map) (easy-menu-add org-agenda-menu) - (if org-startup-truncated (setq truncate-lines t)) + (when org-startup-truncated (setq truncate-lines t)) (setq-local line-move-visual nil) (add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local) (add-hook 'pre-command-hook 'org-unhighlight nil 'local) ;; Make sure properties are removed when copying text - (add-hook 'filter-buffer-substring-functions + (if (boundp 'filter-buffer-substring-functions) + (add-hook 'filter-buffer-substring-functions (lambda (fun start end delete) - (substring-no-properties (funcall fun start end delete))) + (substring-no-properties (funcall fun start end delete))) nil t) + ;; Emacs >= 24.4. + (add-function :filter-return (local 'filter-buffer-substring-function) + #'substring-no-properties)) (unless org-agenda-keep-modes (setq org-agenda-follow-mode org-agenda-start-with-follow-mode - org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode)) - (setq org-agenda-show-log org-agenda-start-with-log-mode) - (setq org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode) + org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode + org-agenda-show-log org-agenda-start-with-log-mode + org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode)) (add-to-invisibility-spec '(org-filtered)) (add-to-invisibility-spec '(org-link)) (easy-menu-change @@ -2286,7 +2330,7 @@ The following commands are available: (org-defkey org-agenda-mode-map "!" 'org-agenda-toggle-deadlines) (org-defkey org-agenda-mode-map "G" 'org-agenda-toggle-time-grid) (org-defkey org-agenda-mode-map "r" 'org-agenda-redo) -(org-defkey org-agenda-mode-map "g" (lambda () (interactive) (org-agenda-redo t))) +(org-defkey org-agenda-mode-map "g" 'org-agenda-redo-all) (org-defkey org-agenda-mode-map "e" 'org-agenda-set-effort) (org-defkey org-agenda-mode-map "\C-c\C-xe" 'org-agenda-set-effort) (org-defkey org-agenda-mode-map "\C-c\C-x\C-e" @@ -2351,9 +2395,11 @@ The following commands are available: (org-defkey org-agenda-mode-map "<" 'org-agenda-filter-by-category) (org-defkey org-agenda-mode-map "^" 'org-agenda-filter-by-top-headline) (org-defkey org-agenda-mode-map ";" 'org-timer-set-timer) +(org-defkey org-agenda-mode-map "\C-c\C-x_" 'org-timer-stop) (define-key org-agenda-mode-map "?" 'org-agenda-show-the-flagging-note) (org-defkey org-agenda-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull) (org-defkey org-agenda-mode-map "\C-c\C-x\C-mp" 'org-mobile-push) +(org-defkey org-agenda-mode-map "\C-c\C-xI" 'org-info-find-node) (org-defkey org-agenda-mode-map [mouse-2] 'org-agenda-goto-mouse) (org-defkey org-agenda-mode-map [mouse-3] 'org-agenda-show-mouse) @@ -2368,7 +2414,7 @@ The following commands are available: ("Agenda Files") "--" ("Agenda Dates" - ["Goto Today" org-agenda-goto-today (org-agenda-check-type nil 'agenda 'timeline)] + ["Goto Today" org-agenda-goto-today (org-agenda-check-type nil 'agenda)] ["Next Dates" org-agenda-later (org-agenda-check-type nil 'agenda)] ["Previous Dates" org-agenda-earlier (org-agenda-check-type nil 'agenda)] ["Jump to date" org-agenda-goto-date (org-agenda-check-type nil 'agenda)]) @@ -2414,7 +2460,7 @@ The following commands are available: "--" ["Show Logbook entries" org-agenda-log-mode :style toggle :selected org-agenda-show-log - :active (org-agenda-check-type nil 'agenda 'timeline) + :active (org-agenda-check-type nil 'agenda) :keys "v l (or just l)"] ["Include archived trees" org-agenda-archives-mode :style toggle :selected org-agenda-archives-mode :active t @@ -2471,13 +2517,13 @@ The following commands are available: ["Schedule" org-agenda-schedule t] ["Set Deadline" org-agenda-deadline t] "--" - ["Change Date +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda 'timeline)] - ["Change Date -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda 'timeline)] - ["Change Time +1 hour" org-agenda-do-date-later :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u S-right"] - ["Change Time -1 hour" org-agenda-do-date-earlier :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u S-left"] - ["Change Time + min" org-agenda-date-later :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-right"] - ["Change Time - min" org-agenda-date-earlier :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-left"] - ["Change Date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) + ["Change Date +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda)] + ["Change Date -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda)] + ["Change Time +1 hour" org-agenda-do-date-later :active (org-agenda-check-type nil 'agenda) :keys "C-u S-right"] + ["Change Time -1 hour" org-agenda-do-date-earlier :active (org-agenda-check-type nil 'agenda) :keys "C-u S-left"] + ["Change Time + min" org-agenda-date-later :active (org-agenda-check-type nil 'agenda) :keys "C-u C-u S-right"] + ["Change Time - min" org-agenda-date-earlier :active (org-agenda-check-type nil 'agenda) :keys "C-u C-u S-left"] + ["Change Date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda)]) ("Clock and Effort" ["Clock in" org-agenda-clock-in t] ["Clock out" org-agenda-clock-out t] @@ -2493,12 +2539,12 @@ The following commands are available: ["Decrease Priority" org-agenda-priority-down t] ["Show Priority" org-show-priority t]) ("Calendar/Diary" - ["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda 'timeline)] - ["Goto Calendar" org-agenda-goto-calendar (org-agenda-check-type nil 'agenda 'timeline)] - ["Phases of the Moon" org-agenda-phases-of-moon (org-agenda-check-type nil 'agenda 'timeline)] - ["Sunrise/Sunset" org-agenda-sunrise-sunset (org-agenda-check-type nil 'agenda 'timeline)] - ["Holidays" org-agenda-holidays (org-agenda-check-type nil 'agenda 'timeline)] - ["Convert" org-agenda-convert-date (org-agenda-check-type nil 'agenda 'timeline)] + ["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda)] + ["Goto Calendar" org-agenda-goto-calendar (org-agenda-check-type nil 'agenda)] + ["Phases of the Moon" org-agenda-phases-of-moon (org-agenda-check-type nil 'agenda)] + ["Sunrise/Sunset" org-agenda-sunrise-sunset (org-agenda-check-type nil 'agenda)] + ["Holidays" org-agenda-holidays (org-agenda-check-type nil 'agenda)] + ["Convert" org-agenda-convert-date (org-agenda-check-type nil 'agenda)] "--" ["Create iCalendar File" org-icalendar-combine-agenda-files t]) "--" @@ -2507,7 +2553,7 @@ The following commands are available: ("MobileOrg" ["Push Files and Views" org-mobile-push t] ["Get Captured and Flagged" org-mobile-pull t] - ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c a ?"] + ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "\\[org-agenda] ?"] ["Show note / unflag" org-agenda-show-the-flagging-note t] "--" ["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t]) @@ -2530,30 +2576,30 @@ that have been changed along." (interactive) (or org-agenda-allow-remote-undo (user-error "Check the variable `org-agenda-allow-remote-undo' to activate remote undo")) - (if (not (eq this-command last-command)) - (setq org-agenda-undo-has-started-in nil - org-agenda-pending-undo-list org-agenda-undo-list)) - (if (not org-agenda-pending-undo-list) - (user-error "No further undo information")) + (when (not (eq this-command last-command)) + (setq org-agenda-undo-has-started-in nil + org-agenda-pending-undo-list org-agenda-undo-list)) + (when (not org-agenda-pending-undo-list) + (user-error "No further undo information")) (let* ((entry (pop org-agenda-pending-undo-list)) buf line cmd rembuf) (setq cmd (pop entry) line (pop entry)) (setq rembuf (nth 2 entry)) (org-with-remote-undo rembuf (while (bufferp (setq buf (pop entry))) - (if (pop entry) - (with-current-buffer buf - (let ((last-undo-buffer buf) - (inhibit-read-only t)) - (unless (memq buf org-agenda-undo-has-started-in) - (push buf org-agenda-undo-has-started-in) - (make-local-variable 'pending-undo-list) - (undo-start)) - (while (and pending-undo-list - (listp pending-undo-list) - (not (car pending-undo-list))) - (pop pending-undo-list)) - (undo-more 1)))))) + (when (pop entry) + (with-current-buffer buf + (let ((last-undo-buffer buf) + (inhibit-read-only t)) + (unless (memq buf org-agenda-undo-has-started-in) + (push buf org-agenda-undo-has-started-in) + (make-local-variable 'pending-undo-list) + (undo-start)) + (while (and pending-undo-list + (listp pending-undo-list) + (not (car pending-undo-list))) + (pop pending-undo-list)) + (undo-more 1)))))) (org-goto-line line) (message "`%s' undone (buffer %s)" cmd (buffer-name rembuf)))) @@ -2634,8 +2680,7 @@ type." (const agenda) (const todo) (const tags) - (const search) - (const timeline)) + (const search)) (integer :tag "Max number of entries"))))) (defcustom org-agenda-max-todos nil @@ -2653,8 +2698,7 @@ type." (const agenda) (const todo) (const tags) - (const search) - (const timeline)) + (const search)) (integer :tag "Max number of TODOs"))))) (defcustom org-agenda-max-tags nil @@ -2672,8 +2716,7 @@ type." (const agenda) (const todo) (const tags) - (const search) - (const timeline)) + (const search)) (integer :tag "Max number of tagged entries"))))) (defcustom org-agenda-max-effort nil @@ -2691,8 +2734,7 @@ to limit entries to in this type." (const agenda) (const todo) (const tags) - (const search) - (const timeline)) + (const search)) (integer :tag "Max number of minutes"))))) (defvar org-agenda-keep-restricted-file-list nil) @@ -2780,9 +2822,9 @@ Pressing `<' twice means to restrict to the current subtree or region ;; If we have sticky agenda buffers, set a name for the buffer, ;; depending on the invoking keys. The user may still set this ;; as a command option, which will overwrite what we do here. - (if org-agenda-sticky - (setq org-agenda-buffer-name - (format "*Org Agenda(%s)*" org-keys))) + (when org-agenda-sticky + (setq org-agenda-buffer-name + (format "*Org Agenda(%s)*" org-keys))) ;; Establish the restriction, if any (when (and (not org-agenda-overriding-restriction) restriction) (put 'org-agenda-files 'org-restrict (list bfn)) @@ -2806,10 +2848,10 @@ Pressing `<' twice means to restrict to the current subtree or region (progn (setq type (nth 2 entry) org-match (eval (nth 3 entry)) lprops (nth 4 entry)) - (if org-agenda-sticky - (setq org-agenda-buffer-name - (or (and (stringp org-match) (format "*Org Agenda(%s:%s)*" org-keys org-match)) - (format "*Org Agenda(%s)*" org-keys)))) + (when org-agenda-sticky + (setq org-agenda-buffer-name + (or (and (stringp org-match) (format "*Org Agenda(%s:%s)*" org-keys org-match)) + (format "*Org Agenda(%s)*" org-keys)))) (put 'org-agenda-redo-command 'org-lprops lprops) (cond ((eq type 'agenda) @@ -2865,13 +2907,12 @@ Pressing `<' twice means to restrict to the current subtree or region (let* ((m (org-agenda-get-any-marker)) (note (and m (org-entry-get m "THEFLAGGINGNOTE")))) (when note - (message (concat - "FLAGGING-NOTE ([?] for more info): " - (org-add-props - (replace-regexp-in-string - "\\\\n" "//" - (copy-sequence note)) - nil 'face 'org-warning))))))) + (message "FLAGGING-NOTE ([?] for more info): %s" + (org-add-props + (replace-regexp-in-string + "\\\\n" "//" + (copy-sequence note)) + nil 'face 'org-warning)))))) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) @@ -2984,19 +3025,18 @@ s Search for keywords M Like m, but only TODO entries (symbol-name type) "Lambda expression")) (t "???")))) - (if org-agenda-menu-show-matcher - (setq line - (concat line ": " - (cond - ((stringp match) - (setq match (copy-sequence match)) - (org-add-props match nil 'face 'org-warning)) - ((listp type) - (format "set of %d commands" (length type)))))) - (if (org-string-nw-p match) - (add-text-properties - 0 (length line) (list 'help-echo - (concat "Matcher: " match)) line))) + (cond + ((not (org-string-nw-p match)) nil) + (org-agenda-menu-show-matcher + (setq line + (concat line ": " + (cond + ((stringp match) + (propertize match 'face 'org-warning)) + ((listp type) + (format "set of %d commands" (length type))))))) + (t + (org-add-props line nil 'help-echo (concat "Matcher: " match)))) (push line lines))) (setq lines (nreverse lines)) (when prefixes @@ -3032,8 +3072,8 @@ s Search for keywords M Like m, but only TODO entries ;; Make the window the right size (goto-char (point-min)) (if second-time - (if (not (pos-visible-in-window-p (point-max))) - (org-fit-window-to-buffer)) + (when (not (pos-visible-in-window-p (point-max))) + (org-fit-window-to-buffer)) (setq second-time t) (org-fit-window-to-buffer)) @@ -3229,11 +3269,9 @@ agenda-day The day in the agenda where this is listed" (org-tags-view nil cmd-key) (org-agenda nil cmd-key))) (set-buffer org-agenda-buffer-name) - (let* ((lines (org-split-string (buffer-string) "\n")) - line) - (while (setq line (pop lines)) - (catch 'next - (if (not (get-text-property 0 'org-category line)) (throw 'next nil)) + (let ((lines (org-split-string (buffer-string) "\n"))) + (dolist (line lines) + (when (get-text-property 0 'org-category line) (setq org-agenda-info (org-fix-agenda-info (text-properties-at 0 line))) (princ @@ -3250,14 +3288,14 @@ This ensures the export commands can easily use it." (when (setq tmp (plist-get props 'tags)) (setq props (plist-put props 'tags (mapconcat 'identity tmp ":")))) (when (setq tmp (plist-get props 'date)) - (if (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp))) + (when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp))) (let ((calendar-date-display-form '(year "-" month "-" day))) '((format "%4d, %9s %2s, %4s" dayname monthname day year)) (setq tmp (calendar-date-string tmp))) (setq props (plist-put props 'date tmp))) (when (setq tmp (plist-get props 'day)) - (if (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp))) + (when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp))) (let ((calendar-date-display-form '(year "-" month "-" day))) (setq tmp (calendar-date-string tmp))) (setq props (plist-put props 'day tmp)) @@ -3396,7 +3434,8 @@ the agenda to write." (kill-buffer (current-buffer)) (message "Org file written to %s" file))) ((member extension '("html" "htm")) - (require 'htmlize) + (or (require 'htmlize nil t) + (error "Please install htmlize from https://github.com/hniksic/emacs-htmlize")) (set-buffer (htmlize-buffer (current-buffer))) (when org-agenda-export-html-style ;; replace If you want to refer to an external style, use something like @@ -1577,12 +1584,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag" :package-version '(Org . "9.1") :type 'string) -(defcustom org-html-keep-old-src nil - "When non-nil, use
 instead of 
."
-  :group 'org-export-html
-  :package-version '(Org . "9.1")
-  :type 'boolean)
-
 
 ;;;; Todos
 
@@ -1705,7 +1706,7 @@ object unless a different class is specified with an attribute."
 
 (defun org-html--textarea-block (element)
   "Transcode ELEMENT into a textarea block.
-ELEMENT is either a src block or an example block."
+ELEMENT is either a source or an example block."
   (let* ((code (car (org-export-unravel-code element)))
 	 (attr (org-export-read-attribute :attr_html element)))
     (format "

\n\n

" @@ -1748,7 +1749,8 @@ If you then set `org-html-htmlize-output-type' to `css', calls to the function `org-html-htmlize-region-for-paste' will produce code that uses these same face definitions." (interactive) - (require 'htmlize) + (unless (require 'htmlize nil t) + (error "htmlize library missing. Aborting")) (and (get-buffer "*html*") (kill-buffer "*html*")) (with-temp-buffer (let ((fl (face-list)) @@ -1762,12 +1764,12 @@ produce code that uses these same face definitions." (htmlize-region (point-min) (point-max)))) (pop-to-buffer-same-window "*html*") (goto-char (point-min)) - (if (re-search-forward "" nil t) - (delete-region (1+ (match-end 0)) (point-max))) + (when (re-search-forward "" nil t) + (delete-region (1+ (match-end 0)) (point-max))) (beginning-of-line 1) - (if (looking-at " +") (replace-match "")) + (when (looking-at " +") (replace-match "")) (goto-char (point-min))) (defun org-html--make-string (n string) @@ -1782,33 +1784,38 @@ Replaces invalid characters with \"_\"." (defun org-html-footnote-section (info) "Format the footnote section. INFO is a plist used as a communication channel." - (let* ((fn-alist (org-export-collect-footnote-definitions info)) - (fn-alist - (cl-loop for (n _type raw) in fn-alist collect - (cons n (if (eq (org-element-type raw) 'org-data) - (org-trim (org-export-data raw info)) - (format "
%s
" - (org-trim (org-export-data raw info)))))))) - (when fn-alist + (pcase (org-export-collect-footnote-definitions info) + (`nil nil) + (definitions (format (plist-get info :html-footnotes-section) (org-html--translate "Footnotes" info) (format "\n%s\n" (mapconcat - (lambda (fn) - (let ((n (car fn)) (def (cdr fn))) - (format - "
%s %s
\n" - (format - (plist-get info :html-footnote-format) - (org-html--anchor - (format "fn.%d" n) - n - (format " class=\"footnum\" href=\"#fnr.%d\"" n) - info)) - def))) - fn-alist + (lambda (definition) + (pcase definition + (`(,n ,_ ,def) + ;; `org-export-collect-footnote-definitions' can return + ;; two kinds of footnote definitions: inline and blocks. + ;; Since this should not make any difference in the HTML + ;; output, we wrap the inline definitions within + ;; a "footpara" class paragraph. + (let ((inline? (not (org-element-map def org-element-all-elements + #'identity nil t))) + (anchor (org-html--anchor + (format "fn.%d" n) + n + (format " class=\"footnum\" href=\"#fnr.%d\"" n) + info)) + (contents (org-trim (org-export-data def info)))) + (format "
%s %s
\n" + (format (plist-get info :html-footnote-format) anchor) + (format "
%s
" + (if (not inline?) contents + (format "

%s

" + contents)))))))) + definitions "\n")))))) @@ -1817,27 +1824,30 @@ INFO is a plist used as a communication channel." (defun org-html--build-meta-info (info) "Return meta tags for exported document. INFO is a plist used as a communication channel." - (let ((protect-string - (lambda (str) - (replace-regexp-in-string - "\"" """ (org-html-encode-plain-text str)))) - (title (org-export-data (plist-get info :title) info)) - (author (and (plist-get info :with-author) - (let ((auth (plist-get info :author))) - (and auth - ;; Return raw Org syntax, skipping non - ;; exportable objects. - (org-element-interpret-data - (org-element-map auth - (cons 'plain-text org-element-all-objects) - 'identity info)))))) - (description (plist-get info :description)) - (keywords (plist-get info :keywords)) - (charset (or (and org-html-coding-system - (fboundp 'coding-system-get) - (coding-system-get org-html-coding-system - 'mime-charset)) - "iso-8859-1"))) + (let* ((protect-string + (lambda (str) + (replace-regexp-in-string + "\"" """ (org-html-encode-plain-text str)))) + (title (org-export-data (plist-get info :title) info)) + ;; Set title to an invisible character instead of leaving it + ;; empty, which is invalid. + (title (if (org-string-nw-p title) title "‎")) + (author (and (plist-get info :with-author) + (let ((auth (plist-get info :author))) + (and auth + ;; Return raw Org syntax, skipping non + ;; exportable objects. + (org-element-interpret-data + (org-element-map auth + (cons 'plain-text org-element-all-objects) + 'identity info)))))) + (description (plist-get info :description)) + (keywords (plist-get info :keywords)) + (charset (or (and org-html-coding-system + (fboundp 'coding-system-get) + (coding-system-get org-html-coding-system + 'mime-charset)) + "iso-8859-1"))) (concat (when (plist-get info :time-stamp-file) (format-time-string @@ -1911,7 +1921,7 @@ INFO is a plist used as a communication channel." INFO is a plist used as a communication channel." (when (and (memq (plist-get info :with-latex) '(mathjax t)) (org-element-map (plist-get info :parse-tree) - '(latex-fragment latex-environment) 'identity info t)) + '(latex-fragment latex-environment) #'identity info t nil t)) (let ((template (plist-get info :html-mathjax-template)) (options (plist-get info :html-mathjax-options)) (in-buffer (or (plist-get info :html-mathjax) ""))) @@ -1943,7 +1953,8 @@ INFO is a plist used as a communication channel." (?c . ,(plist-get info :creator)) (?C . ,(let ((file (plist-get info :input-file))) (format-time-string timestamp-format - (and file (nth 5 (file-attributes file)))))) + (and file (file-attribute-modification-time + (file-attributes file)))))) (?v . ,(or (plist-get info :html-validation-link) ""))))) (defun org-html--build-pre/postamble (type info) @@ -1987,21 +1998,18 @@ communication channel." (plist-get info :html-metadata-timestamp-format)))) (when (plist-get info :with-creator) (format "

%s

\n" creator)) - (format "

%s

\n" - validation-link)))) - (t (format-spec - (or (cadr (assoc-string - (plist-get info :language) - (eval (intern - (format "org-html-%s-format" type))) - t)) - (cadr - (assoc-string - "en" - (eval - (intern (format "org-html-%s-format" type))) - t))) - spec)))))) + (when (org-string-nw-p validation-link) + (format "

%s

\n" + validation-link))))) + (t + (let ((formats (plist-get info (if (eq type 'preamble) + :html-preamble-format + :html-postamble-format))) + (language (plist-get info :language))) + (format-spec + (cadr (or (assoc-string language formats t) + (assoc-string "en" formats t))) + spec))))))) (let ((div (assq type (plist-get info :html-divs)))) (when (org-string-nw-p section-contents) (concat @@ -2073,7 +2081,8 @@ holding export options." (format "<%s id=\"%s\">\n" (nth 1 div) (nth 2 div))) ;; Document title. (when (plist-get info :with-title) - (let ((title (plist-get info :title)) + (let ((title (and (plist-get info :with-title) + (plist-get info :title))) (subtitle (plist-get info :subtitle)) (html5-fancy (org-html--html5-fancy-p info))) (when title @@ -2086,7 +2095,8 @@ holding export options." (format (if html5-fancy "

%s

\n" - "\n
\n%s\n") + (concat "\n" (org-html-close-tag "br" nil info) "\n" + "%s\n")) (org-export-data subtitle info)) ""))))) contents @@ -2094,12 +2104,12 @@ holding export options." ;; Postamble. (org-html--build-pre/postamble 'postamble info) ;; Possibly use the Klipse library live code blocks. - (if (plist-get info :html-klipsify-src) - (concat "")) + (when (plist-get info :html-klipsify-src) + (concat "")) ;; Closing document. "\n")) @@ -2160,19 +2170,15 @@ CODE is a string representing the source code to colorize. LANG is the language used for CODE, as a string, or nil." (when code (cond - ;; Case 1: No lang. Possibly an example block. - ((not lang) - ;; Simple transcoding. - (org-html-encode-plain-text code)) - ;; Case 2: No htmlize or an inferior version of htmlize - ((not (and (require 'htmlize nil t) (fboundp 'htmlize-region-for-paste))) + ;; No language. Possibly an example block. + ((not lang) (org-html-encode-plain-text code)) + ;; Plain text explicitly set. + ((not org-html-htmlize-output-type) (org-html-encode-plain-text code)) + ;; No htmlize library or an inferior version of htmlize. + ((not (progn (require 'htmlize nil t) + (fboundp 'htmlize-region-for-paste))) ;; Emit a warning. - (message "Cannot fontify src block (htmlize.el >= 1.34 required)") - ;; Simple transcoding. - (org-html-encode-plain-text code)) - ;; Case 3: plain text explicitly set - ((not org-html-htmlize-output-type) - ;; Simple transcoding. + (message "Cannot fontify source block (htmlize.el >= 1.34 required)") (org-html-encode-plain-text code)) (t ;; Map language @@ -2181,7 +2187,6 @@ is the language used for CODE, as a string, or nil." (cond ;; Case 1: Language is not associated with any Emacs mode ((not (functionp lang-mode)) - ;; Simple transcoding. (org-html-encode-plain-text code)) ;; Case 2: Default. Fontify code. (t @@ -2211,7 +2216,7 @@ is the language used for CODE, as a string, or nil." (org-html-htmlize-region-for-paste (point-min) (point-max)))))) ;; Strip any enclosing
 tags.
-	  (let* ((beg (and (string-match "\\`]*>\n*" code) (match-end 0)))
+	  (let* ((beg (and (string-match "\\`]*>\n?" code) (match-end 0)))
 		 (end (and beg (string-match "
\\'" code)))) (if (and beg end) (substring code beg end) code))))))))) @@ -2224,7 +2229,7 @@ alist between line numbers and references (as returned by `org-export-unravel-code'), a boolean specifying if labels should appear in the source code, and the number associated to the first line of code." - (let* ((code-lines (org-split-string code "\n")) + (let* ((code-lines (split-string code "\n")) (code-length (length code-lines)) (num-fmt (and num-start @@ -2252,14 +2257,14 @@ line of code." (defun org-html-format-code (element info) "Format contents of ELEMENT as source code. -ELEMENT is either an example block or a src block. INFO is -a plist used as a communication channel." +ELEMENT is either an example or a source block. INFO is a plist +used as a communication channel." (let* ((lang (org-element-property :language element)) ;; Extract code and references. (code-info (org-export-unravel-code element)) (code (car code-info)) (refs (cdr code-info)) - ;; Does the src block contain labels? + ;; Does the source block contain labels? (retain-labels (org-element-property :retain-labels element)) ;; Does it have line numbers? (num-start (org-export-get-loc element info))) @@ -2332,15 +2337,7 @@ INFO is a plist used as a communication channel." (org-element-property :priority headline))) (text (org-export-data-with-backend (org-export-get-alt-title headline info) - ;; Create an anonymous back-end that will ignore any - ;; footnote-reference, link, radio-target and target - ;; in table of contents. - (org-export-create-backend - :parent 'html - :transcoders '((footnote-reference . ignore) - (link . (lambda (object c i) c)) - (radio-target . (lambda (object c i) c)) - (target . ignore))) + (org-export-toc-entry-backend 'html) info)) (tags (and (eq (plist-get info :with-tags) t) (org-export-get-tags headline info)))) @@ -2596,18 +2593,8 @@ holding contextual information." (full-text (funcall (plist-get info :html-format-headline-function) todo todo-type priority text tags info)) (contents (or contents "")) - (ids (delq nil - (list (org-element-property :CUSTOM_ID headline) - (org-export-get-reference headline info) - (org-element-property :ID headline)))) - (preferred-id (car ids)) - (extra-ids - (mapconcat - (lambda (id) - (org-html--anchor - (if (org-uuidgen-p id) (concat "ID-" id) id) - nil nil info)) - (cdr ids) ""))) + (id (or (org-element-property :CUSTOM_ID headline) + (org-export-get-reference headline info)))) (if (org-export-low-level-p headline info) ;; This is a deep sub-tree: export it as a list item. (let* ((html-type (if numberedp "ol" "ul"))) @@ -2616,11 +2603,9 @@ holding contextual information." (apply #'format "<%s class=\"org-%s\">\n" (make-list 2 html-type))) (org-html-format-list-item - contents (if numberedp 'ordered 'unordered) - nil info nil - (concat (org-html--anchor preferred-id nil nil info) - extra-ids - full-text)) "\n" + contents (if numberedp 'ordered 'unordered) + nil info nil + (concat (org-html--anchor id nil nil info) full-text)) "\n" (and (org-export-last-sibling-p headline info) (format "\n" html-type)))) ;; Standard headline. Export it as a section. @@ -2633,10 +2618,9 @@ holding contextual information." (concat (format "outline-%d" level) (and extra-class " ") extra-class) - (format "\n%s%s\n" + (format "\n%s\n" level - preferred-id - extra-ids + id (concat (and numberedp (format @@ -2684,12 +2668,14 @@ CONTENTS is nil. INFO is a plist holding contextual information." "Transcode an INLINE-SRC-BLOCK element from Org to HTML. CONTENTS holds the contents of the item. INFO is a plist holding contextual information." - (let ((lang (org-element-property :language inline-src-block)) - (code (org-element-property :value inline-src-block)) - (label - (let ((lbl (and (org-element-property :name inline-src-block) - (org-export-get-reference inline-src-block info)))) - (if (not lbl) "" (format " id=\"%s\"" lbl))))) + (let* ((lang (org-element-property :language inline-src-block)) + (code (org-html-fontify-code + (org-element-property :value inline-src-block) + lang)) + (label + (let ((lbl (and (org-element-property :name inline-src-block) + (org-export-get-reference inline-src-block info)))) + (if (not lbl) "" (format " id=\"%s\"" lbl))))) (format "%s" lang label code))) ;;;; Inlinetask @@ -2712,7 +2698,7 @@ holding contextual information." (defun org-html-format-inlinetask-default-function (todo todo-type priority text tags contents info) - "Default format function for a inlinetasks. + "Default format function for inlinetasks. See `org-html-format-inlinetask-function' for details." (format "
\n%s%s\n%s
" (org-html-format-headline-default-function @@ -2851,26 +2837,73 @@ INFO is a plist containing export properties." "Creating LaTeX Image..." nil processing-type) (buffer-string)))) +(defun org-html--wrap-latex-environment (contents _ &optional caption label) + "Wrap CONTENTS string within appropriate environment for equations. +When optional arguments CAPTION and LABEL are given, use them for +caption and \"id\" attribute." + (format "\n\n%s%s\n
" + ;; ID. + (if (org-string-nw-p label) (format " id=\"%s\"" label) "") + ;; Contents. + (format "\n%s\n" contents) + ;; Caption. + (if (not (org-string-nw-p caption)) "" + (format "\n\n%s\n" + caption)))) + +(defun org-html--math-environment-p (element &optional _) + "Non-nil when ELEMENT is a LaTeX math environment. +Math environments match the regular expression defined in +`org-latex-math-environments-re'. This function is meant to be +used as a predicate for `org-export-get-ordinal' or a value to +`org-html-standalone-image-predicate'." + (string-match-p org-latex-math-environments-re + (org-element-property :value element))) + +(defun org-html--unlabel-latex-environment (latex-frag) + "Change environment in LATEX-FRAG string to an unnumbered one. +For instance, change an 'equation' environment to 'equation*'." + (replace-regexp-in-string + "\\`[ \t]*\\\\begin{\\([^*]+?\\)}" + "\\1*" + (replace-regexp-in-string "^[ \t]*\\\\end{\\([^*]+?\\)}[ \r\t\n]*\\'" + "\\1*" + latex-frag nil nil 1) + nil nil 1)) + (defun org-html-latex-environment (latex-environment _contents info) "Transcode a LATEX-ENVIRONMENT element from Org to HTML. CONTENTS is nil. INFO is a plist holding contextual information." (let ((processing-type (plist-get info :with-latex)) (latex-frag (org-remove-indentation (org-element-property :value latex-environment))) - (attributes (org-export-read-attribute :attr_html latex-environment))) + (attributes (org-export-read-attribute :attr_html latex-environment)) + (label (and (org-element-property :name latex-environment) + (org-export-get-reference latex-environment info))) + (caption (number-to-string + (org-export-get-ordinal + latex-environment info nil + #'org-html--math-environment-p)))) (cond ((memq processing-type '(t mathjax)) - (org-html-format-latex latex-frag 'mathjax info)) + (org-html-format-latex + (if (org-string-nw-p label) + (replace-regexp-in-string "\\`.*" + (format "\\&\n\\\\label{%s}" label) + latex-frag) + latex-frag) + 'mathjax info)) ((assq processing-type org-preview-latex-process-alist) (let ((formula-link - (org-html-format-latex latex-frag processing-type info))) - (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) - ;; Do not provide a caption or a name to be consistent with - ;; `mathjax' handling. - (org-html--wrap-image - (org-html--format-image - (match-string 1 formula-link) attributes info) info)))) - (t latex-frag)))) + (org-html-format-latex + (org-html--unlabel-latex-environment latex-frag) + processing-type info))) + (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) + (org-html--wrap-latex-environment + (org-html--format-image + (match-string 1 formula-link) attributes info) + info caption label)))) + (t (org-html--wrap-latex-environment latex-frag info caption label))))) ;;;; Latex Fragment @@ -2968,10 +3001,7 @@ images, set it to: DESC is the description part of the link, or the empty string. INFO is a plist holding contextual information. See `org-export-data'." - (let* ((home (when (plist-get info :html-link-home) - (org-trim (plist-get info :html-link-home)))) - (use-abs-url (plist-get info :html-link-use-abs-url)) - (link-org-files-as-html-maybe + (let* ((link-org-files-as-html-maybe (lambda (raw-path info) ;; Treat links to `file.org' as links to `file.html', if ;; needed. See `org-html-link-org-files-as-html'. @@ -2989,46 +3019,53 @@ INFO is a plist holding contextual information. See (path (cond ((member type '("http" "https" "ftp" "mailto" "news")) - (url-encode-url (org-link-unescape (concat type ":" raw-path)))) + (url-encode-url (concat type ":" raw-path))) ((string= type "file") - ;; Treat links to ".org" files as ".html", if needed. + ;; During publishing, turn absolute file names belonging + ;; to base directory into relative file names. Otherwise, + ;; append "file" protocol to absolute file name. (setq raw-path - (funcall link-org-files-as-html-maybe raw-path info)) - ;; If file path is absolute, prepend it with protocol - ;; component - "file://". - (cond - ((file-name-absolute-p raw-path) - (setq raw-path (org-export-file-uri raw-path))) - ((and home use-abs-url) - (setq raw-path (concat (file-name-as-directory home) raw-path)))) + (org-export-file-uri + (org-publish-file-relative-name raw-path info))) + ;; Possibly append `:html-link-home' to relative file + ;; name. + (let ((home (and (plist-get info :html-link-home) + (org-trim (plist-get info :html-link-home))))) + (when (and home + (plist-get info :html-link-use-abs-url) + (file-name-absolute-p raw-path)) + (setq raw-path (concat (file-name-as-directory home) raw-path)))) + ;; Maybe turn ".org" into ".html". + (setq raw-path (funcall link-org-files-as-html-maybe raw-path info)) ;; Add search option, if any. A search option can be ;; relative to a custom-id, a headline title, a name or ;; a target. (let ((option (org-element-property :search-option link))) - (cond ((not option) raw-path) - ;; Since HTML back-end use custom-id value as-is, - ;; resolving is them is trivial. - ((eq (string-to-char option) ?#) (concat raw-path option)) - (t - (concat raw-path - "#" - (org-publish-resolve-external-link - option - (org-element-property :path link))))))) + (if (not option) raw-path + (let ((path (org-element-property :path link))) + (concat raw-path + "#" + (org-publish-resolve-external-link option path t)))))) (t raw-path))) - ;; Extract attributes from parent's paragraph. HACK: Only do - ;; this for the first link in parent (inner image link for - ;; inline images). This is needed as long as attributes - ;; cannot be set on a per link basis. (attributes-plist - (let* ((parent (org-export-get-parent-element link)) - (link (let ((container (org-export-get-parent link))) - (if (and (eq (org-element-type container) 'link) - (org-html-inline-image-p link info)) - container - link)))) - (and (eq (org-element-map parent 'link 'identity info t) link) - (org-export-read-attribute :attr_html parent)))) + (org-combine-plists + ;; Extract attributes from parent's paragraph. HACK: Only + ;; do this for the first link in parent (inner image link + ;; for inline images). This is needed as long as + ;; attributes cannot be set on a per link basis. + (let* ((parent (org-export-get-parent-element link)) + (link (let ((container (org-export-get-parent link))) + (if (and (eq 'link (org-element-type container)) + (org-html-inline-image-p link info)) + container + link)))) + (and (eq link (org-element-map parent 'link #'identity info t)) + (org-export-read-attribute :attr_html parent))) + ;; Also add attributes from link itself. Currently, those + ;; need to be added programmatically before `org-html-link' + ;; is invoked, for example, by backends building upon HTML + ;; export. + (org-export-read-attribute :attr_html link))) (attributes (let ((attr (org-html--make-attribute-string attributes-plist))) (if (org-string-nw-p attr) (concat " " attr) "")))) @@ -3092,23 +3129,37 @@ INFO is a plist holding contextual information. See (format "%s" href attributes desc))) ;; Fuzzy link points to a target or an element. (_ - (let* ((ref (org-export-get-reference destination info)) - (org-html-standalone-image-predicate - #'org-html--has-caption-p) - (number (cond - (desc nil) - ((org-html-standalone-image-p destination info) - (org-export-get-ordinal - (org-element-map destination 'link - #'identity info t) - info 'link 'org-html-standalone-image-p)) - (t (org-export-get-ordinal - destination info nil 'org-html--has-caption-p)))) - (desc (cond (desc) - ((not number) "No description for this link") - ((numberp number) (number-to-string number)) - (t (mapconcat #'number-to-string number "."))))) - (format "%s" ref attributes desc)))))) + (if (and destination + (memq (plist-get info :with-latex) '(mathjax t)) + (eq 'latex-environment (org-element-type destination)) + (eq 'math (org-latex--environment-type destination))) + ;; Caption and labels are introduced within LaTeX + ;; environment. Use "eqref" macro to refer to those in + ;; the document. + (format "\\eqref{%s}" + (org-export-get-reference destination info)) + (let* ((ref (org-export-get-reference destination info)) + (org-html-standalone-image-predicate + #'org-html--has-caption-p) + (counter-predicate + (if (eq 'latex-environment (org-element-type destination)) + #'org-html--math-environment-p + #'org-html--has-caption-p)) + (number + (cond + (desc nil) + ((org-html-standalone-image-p destination info) + (org-export-get-ordinal + (org-element-map destination 'link #'identity info t) + info 'link 'org-html-standalone-image-p)) + (t (org-export-get-ordinal + destination info nil counter-predicate)))) + (desc + (cond (desc) + ((not number) "No description for this link") + ((numberp number) (number-to-string number)) + (t (mapconcat #'number-to-string number "."))))) + (format "%s" ref attributes desc))))))) ;; Coderef: replace link with the reference name or the ;; equivalent line number. ((string= type "coderef") @@ -3122,18 +3173,18 @@ INFO is a plist holding contextual information. See (format (org-export-get-coderef-format path desc) (org-export-resolve-coderef path info))))) ;; External link with a description part. - ((and path desc) (format "%s" - (org-html-encode-plain-text path) - attributes - desc)) + ((and path desc) + (format "%s" + (org-html-encode-plain-text path) + attributes + desc)) ;; External link without a description part. - (path (let ((path (org-html-encode-plain-text path))) - (format "%s" - path - attributes - (org-link-unescape path)))) + (path + (let ((path (org-html-encode-plain-text path))) + (format "%s" path attributes path))) ;; No path, only description. Try to do something useful. - (t (format "%s" desc))))) + (t + (format "%s" desc))))) ;;;; Node Property @@ -3397,12 +3448,16 @@ contextual information." listing-number (org-trim (org-export-data caption info)))))) ;; Contents. - (let ((open (if org-html-keep-old-src "" ""))) - (format "%s class=\"src src-%s\"%s%s>%s%s" - open lang label (if (and klipsify (string= lang "html")) - " data-editor-type=\"html\"" "") - code close))))))) + (if klipsify + (format "
%s
" + lang + label + (if (string= lang "html") + " data-editor-type=\"html\"" + "") + code) + (format "
%s
" + lang label code))))))) ;;;; Statistics Cookie @@ -3672,8 +3727,8 @@ contextual information." (with-temp-buffer (insert contents) (set-auto-mode t) - (if (plist-get info :html-indent) - (indent-region (point-min) (point-max))) + (when (plist-get info :html-indent) + (indent-region (point-min) (point-max))) (buffer-substring-no-properties (point-min) (point-max)))) diff --git a/elpa/org-plus-contrib-20170407/ox-icalendar.el b/elpa/org-plus-contrib-20190904/ox-icalendar.el similarity index 90% rename from elpa/org-plus-contrib-20170407/ox-icalendar.el rename to elpa/org-plus-contrib-20190904/ox-icalendar.el index 966353a1..297d624d 100644 --- a/elpa/org-plus-contrib-20170407/ox-icalendar.el +++ b/elpa/org-plus-contrib-20190904/ox-icalendar.el @@ -1,11 +1,11 @@ ;;; ox-icalendar.el --- iCalendar Back-End for Org Export Engine -*- lexical-binding: t; -*- -;; Copyright (C) 2004-2017 Free Software Foundation, Inc. +;; Copyright (C) 2004-2019 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: http://orgmode.org +;; Homepage: https://orgmode.org ;; This file is part of GNU Emacs. @@ -20,7 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; @@ -317,7 +317,7 @@ A headline is blocked when either done first or is a child of a blocked grandparent entry." (or ;; Check if any child is not done. - (org-element-map headline 'headline + (org-element-map (org-element-contents headline) 'headline (lambda (hl) (eq (org-element-property :todo-type hl) 'todo)) info 'first-match) ;; Check :ORDERED: node property. @@ -341,7 +341,7 @@ A headline is blocked when either (1- (length org-icalendar-date-time-format))) ?Z)) (defvar org-agenda-default-appointment-duration) ; From org-agenda.el. -(defun org-icalendar-convert-timestamp (timestamp keyword &optional end utc) +(defun org-icalendar-convert-timestamp (timestamp keyword &optional end tz) "Convert TIMESTAMP to iCalendar format. TIMESTAMP is a timestamp object. KEYWORD is added in front of @@ -352,8 +352,11 @@ Also increase the hour by two (if time string contains a time), or the day by one (if it does not contain a time) when no explicit ending time is specified. -When optional argument UTC is non-nil, time will be expressed in -Universal Time, ignoring `org-icalendar-date-time-format'." +When optional argument TZ is non-nil, timezone data time will be +added to the timestamp. It can be the string \"UTC\", to use UTC +time, or a string in the IANA TZ database +format (e.g. \"Europe/London\"). In either case, the value of +`org-icalendar-date-time-format' will be ignored." (let* ((year-start (org-element-property :year-start timestamp)) (year-end (org-element-property :year-end timestamp)) (month-start (org-element-property :month-start timestamp)) @@ -387,8 +390,9 @@ Universal Time, ignoring `org-icalendar-date-time-format'." (concat keyword (format-time-string - (cond (utc ":%Y%m%dT%H%M%SZ") + (cond ((string-equal tz "UTC") ":%Y%m%dT%H%M%SZ") ((not with-time-p) ";VALUE=DATE:%Y%m%d") + ((stringp tz) (concat ";TZID=" tz ":%Y%m%dT%H%M%S")) (t (replace-regexp-in-string "%Z" org-icalendar-timezone org-icalendar-date-time-format @@ -396,7 +400,10 @@ Universal Time, ignoring `org-icalendar-date-time-format'." ;; Convert timestamp into internal time in order to use ;; `format-time-string' and fix any mistake (i.e. MI >= 60). (encode-time 0 mi h d m y) - (and (or utc (and with-time-p (org-icalendar-use-UTC-date-time-p))) + (and (or (string-equal tz "UTC") + (and (null tz) + with-time-p + (org-icalendar-use-UTC-date-time-p))) t))))) (defun org-icalendar-dtstamp () @@ -530,7 +537,9 @@ inlinetask within the section." (org-export-data (org-element-property :title entry) info)))) (loc (org-icalendar-cleanup-string - (org-element-property :LOCATION entry))) + (org-export-get-node-property + :LOCATION entry + (org-property-inherit-p "LOCATION")))) ;; Build description of the entry from associated section ;; (headline) or contents (inlinetask). (desc @@ -545,7 +554,10 @@ inlinetask within the section." contents 0 (min (length contents) org-icalendar-include-body)))) (org-icalendar-include-body (org-trim contents))))))) - (cat (org-icalendar-get-categories entry info))) + (cat (org-icalendar-get-categories entry info)) + (tz (org-export-get-node-property + :TIMEZONE entry + (org-property-inherit-p "TIMEZONE")))) (concat ;; Events: Delegate to `org-icalendar--vevent' to generate ;; "VEVENT" component from scheduled, deadline, or any @@ -556,14 +568,14 @@ inlinetask within the section." org-icalendar-use-deadline) (org-icalendar--vevent entry deadline (concat "DL-" uid) - (concat "DL: " summary) loc desc cat))) + (concat "DL: " summary) loc desc cat tz))) (let ((scheduled (org-element-property :scheduled entry))) (and scheduled (memq (if todo-type 'event-if-todo 'event-if-not-todo) org-icalendar-use-scheduled) (org-icalendar--vevent entry scheduled (concat "SC-" uid) - (concat "S: " summary) loc desc cat))) + (concat "S: " summary) loc desc cat tz))) ;; When collecting plain timestamps from a headline and its ;; title, skip inlinetasks since collection will happen once ;; ENTRY is one of them. @@ -581,7 +593,7 @@ inlinetask within the section." ((t) t))) (let ((uid (format "TS%d-%s" (cl-incf counter) uid))) (org-icalendar--vevent - entry ts uid summary loc desc cat)))) + entry ts uid summary loc desc cat tz)))) info nil (and (eq type 'headline) 'inlinetask)) "")) ;; Task: First check if it is appropriate to export it. If @@ -595,7 +607,7 @@ inlinetask within the section." (not (org-icalendar-blocked-headline-p entry info)))) ((t) (eq todo-type 'todo)))) - (org-icalendar--vtodo entry uid summary loc desc cat)) + (org-icalendar--vtodo entry uid summary loc desc cat tz)) ;; Diary-sexp: Collect every diary-sexp element within ENTRY ;; and its title, and transcode them. If ENTRY is ;; a headline, skip inlinetasks: they will be handled @@ -626,7 +638,7 @@ inlinetask within the section." contents)))) (defun org-icalendar--vevent - (entry timestamp uid summary location description categories) + (entry timestamp uid summary location description categories timezone) "Create a VEVENT component. ENTRY is either a headline or an inlinetask element. TIMESTAMP @@ -635,7 +647,8 @@ is the unique identifier for the event. SUMMARY defines a short summary or subject for the event. LOCATION defines the intended venue for the event. DESCRIPTION provides the complete description of the event. CATEGORIES defines the categories the -event belongs to. +event belongs to. TIMEZONE specifies a time zone for this event +only. Return VEVENT component as a string." (org-icalendar-fold-string @@ -645,8 +658,8 @@ Return VEVENT component as a string." (concat "BEGIN:VEVENT\n" (org-icalendar-dtstamp) "\n" "UID:" uid "\n" - (org-icalendar-convert-timestamp timestamp "DTSTART") "\n" - (org-icalendar-convert-timestamp timestamp "DTEND" t) "\n" + (org-icalendar-convert-timestamp timestamp "DTSTART" nil timezone) "\n" + (org-icalendar-convert-timestamp timestamp "DTEND" t timezone) "\n" ;; RRULE. (when (org-element-property :repeater-type timestamp) (format "RRULE:FREQ=%s;INTERVAL=%d\n" @@ -664,7 +677,7 @@ Return VEVENT component as a string." "END:VEVENT")))) (defun org-icalendar--vtodo - (entry uid summary location description categories) + (entry uid summary location description categories timezone) "Create a VTODO component. ENTRY is either a headline or an inlinetask element. UID is the @@ -672,6 +685,7 @@ unique identifier for the task. SUMMARY defines a short summary or subject for the task. LOCATION defines the intended venue for the task. DESCRIPTION provides the complete description of the task. CATEGORIES defines the categories the task belongs to. +TIMEZONE specifies a time zone for this TODO only. Return VTODO component as a string." (let ((start (or (and (memq 'todo-start org-icalendar-use-scheduled) @@ -690,11 +704,11 @@ Return VTODO component as a string." (concat "BEGIN:VTODO\n" "UID:TODO-" uid "\n" (org-icalendar-dtstamp) "\n" - (org-icalendar-convert-timestamp start "DTSTART") "\n" + (org-icalendar-convert-timestamp start "DTSTART" nil timezone) "\n" (and (memq 'todo-due org-icalendar-use-deadline) (org-element-property :deadline entry) (concat (org-icalendar-convert-timestamp - (org-element-property :deadline entry) "DUE") + (org-element-property :deadline entry) "DUE" nil timezone) "\n")) "SUMMARY:" summary "\n" (and (org-string-nw-p location) (format "LOCATION:%s\n" location)) @@ -879,22 +893,24 @@ The file is stored under the name chosen in "Export current agenda view to an iCalendar FILE. This function assumes major mode for current buffer is `org-agenda-mode'." - (let* ((org-export-use-babel) ; Don't evaluate Babel block. + (let* ((org-export-use-babel) ;don't evaluate Babel blocks (contents (org-export-string-as (with-output-to-string (save-excursion - (let ((p (point-min))) + (let ((p (point-min)) + (seen nil)) ;prevent duplicates (while (setq p (next-single-property-change p 'org-hd-marker)) (let ((m (get-text-property p 'org-hd-marker))) - (when m + (when (and m (not (member m seen))) + (push m seen) (with-current-buffer (marker-buffer m) (org-with-wide-buffer (goto-char (marker-position m)) (princ (org-element-normalize-string - (buffer-substring - (point) (progn (outline-next-heading) (point))))))))) + (buffer-substring (point) + (org-entry-end-position)))))))) (forward-line))))) 'icalendar t '(:ascii-charset utf-8 :ascii-links-to-notes nil @@ -912,43 +928,46 @@ This function assumes major mode for current buffer is (defun org-icalendar--combine-files (&rest files) "Combine entries from multiple files into an iCalendar file. FILES is a list of files to build the calendar from." - (org-agenda-prepare-buffers files) - (unwind-protect - (progn - (with-temp-file org-icalendar-combined-agenda-file - (insert - (org-icalendar--vcalendar - ;; Name. - org-icalendar-combined-name - ;; Owner. - user-full-name - ;; Timezone. - (or (org-string-nw-p org-icalendar-timezone) - (cadr (current-time-zone))) - ;; Description. - org-icalendar-combined-description - ;; Contents. - (concat - ;; Agenda contents. - (mapconcat - (lambda (file) - (catch 'nextfile - (org-check-agenda-file file) - (with-current-buffer (org-get-agenda-file-buffer file) - ;; Create ID if necessary. - (when org-icalendar-store-UID - (org-icalendar-create-uid file t)) - (org-export-as - 'icalendar nil nil t - '(:ascii-charset utf-8 :ascii-links-to-notes nil))))) - files "") - ;; BBDB anniversaries. - (when (and org-icalendar-include-bbdb-anniversaries - (require 'org-bbdb nil t)) - (with-output-to-string (org-bbdb-anniv-export-ical))))))) - (run-hook-with-args 'org-icalendar-after-save-hook - org-icalendar-combined-agenda-file)) - (org-release-buffers org-agenda-new-buffers))) + ;; At the end of the process, all buffers related to FILES are going + ;; to be killed. Make sure to only kill the ones opened in the + ;; process. + (let ((org-agenda-new-buffers nil)) + (unwind-protect + (progn + (with-temp-file org-icalendar-combined-agenda-file + (insert + (org-icalendar--vcalendar + ;; Name. + org-icalendar-combined-name + ;; Owner. + user-full-name + ;; Timezone. + (or (org-string-nw-p org-icalendar-timezone) + (cadr (current-time-zone))) + ;; Description. + org-icalendar-combined-description + ;; Contents. + (concat + ;; Agenda contents. + (mapconcat + (lambda (file) + (catch 'nextfile + (org-check-agenda-file file) + (with-current-buffer (org-get-agenda-file-buffer file) + ;; Create ID if necessary. + (when org-icalendar-store-UID + (org-icalendar-create-uid file t)) + (org-export-as + 'icalendar nil nil t + '(:ascii-charset utf-8 :ascii-links-to-notes nil))))) + files "") + ;; BBDB anniversaries. + (when (and org-icalendar-include-bbdb-anniversaries + (require 'org-bbdb nil t)) + (with-output-to-string (org-bbdb-anniv-export-ical))))))) + (run-hook-with-args 'org-icalendar-after-save-hook + org-icalendar-combined-agenda-file)) + (org-release-buffers org-agenda-new-buffers)))) (provide 'ox-icalendar) diff --git a/elpa/org-plus-contrib-20170407/ox-koma-letter.el b/elpa/org-plus-contrib-20190904/ox-koma-letter.el similarity index 68% rename from elpa/org-plus-contrib-20170407/ox-koma-letter.el rename to elpa/org-plus-contrib-20190904/ox-koma-letter.el index 37da54cb..abc0c287 100644 --- a/elpa/org-plus-contrib-20170407/ox-koma-letter.el +++ b/elpa/org-plus-contrib-20190904/ox-koma-letter.el @@ -1,6 +1,6 @@ ;;; ox-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine -;; Copyright (C) 2007-2017 Free Software Foundation, Inc. +;; Copyright (C) 2007-2018 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Alan Schmitt @@ -39,6 +39,8 @@ ;; - LCO: see `org-koma-letter-class-option-file', ;; - OPENING: see `org-koma-letter-opening', ;; - PHONE_NUMBER: see `org-koma-letter-phone-number', +;; - URL: see `org-koma-letter-url', +;; - FROM_LOGO: see `org-koma-letter-from-logo', ;; - SIGNATURE: see `org-koma-letter-signature', ;; - PLACE: see `org-koma-letter-place', ;; - LOCATION: see `org-koma-letter-location', @@ -57,6 +59,8 @@ ;; - backaddress (see `org-koma-letter-use-backaddress') ;; - foldmarks (see `org-koma-letter-use-foldmarks') ;; - phone (see `org-koma-letter-use-phone') +;; - url (see `org-koma-letter-use-url') +;; - from-logo (see `org-koma-letter-use-from-logo') ;; - email (see `org-koma-letter-use-email') ;; - place (see `org-koma-letter-use-place') ;; - location (see `org-koma-letter-use-location') @@ -73,6 +77,43 @@ ;; (See also `org-koma-letter-author'), ;; - EMAIL: Same as AUTHOR. (see also `org-koma-letter-email'), ;; +;; FROM_LOGO uses LaTeX markup. FROM_LOGO provides the +;; "includegraphics" command to tell LaTeX where to find the logo. +;; This command needs to know the logo's directory and file name. The +;; directory can either be relative or absolute, just as you would +;; expect. LaTeX can use three file types for the logo: PDF, JPEG, or +;; PNG. The logo can either include or exclude its extension, which +;; might surprise you. When you exclude its extension, LaTeX will +;; search the directory for the "best" quality graphics format. For +;; example if it finds both logo.pdf and logo.png then it will +;; identify the PDF as "better", and include "logo.pdf". This can be +;; useful, for example, when you are mocking up a logo in the PNG +;; raster format and then switch over to the higher quality PDF vector +;; format. When you include the file extension then LaTeX will +;; include it without searching for higher quality file types. +;; Whatever file type you choose, it will probably require a few +;; design iterations to get the best looking logo size for your +;; letter. Finally, the directory and file name are specified +;; *without* quotes. Here are some examples with commentary, in the +;; location of your letter, with a logo named "logo", to get you +;; started: +;; +;; Logo in the same directory: \includegraphics{logo} +;; or a sub-directory: \includegraphics{logos/production/logo} +;; +;; Logos specified using absolute paths on Linux or Windows: +;; +;; \includegraphics{~/correspondence/logo} +;; \includegraphics{~/correspondence/logos/production/logo} +;; \includegraphics{c:/you/correspondence/logo} +;; \includegraphics{c:/you/correspondence/logos/production/logo} +;; +;; Logos in the same directory where the "better" quality PDF will +;; be chosen over the JPG: +;; +;; \includegraphics{logo.pdf} +;; \includegraphics{logo.png} +;; ;; Headlines are in general ignored. However, headlines with special ;; tags can be used for specified contents like postscript (ps), ;; carbon copy (cc), enclosures (encl) and code to be inserted after @@ -121,12 +162,13 @@ ;;; Code: +(require 'cl-lib) (require 'ox-latex) ;; Install a default letter class. (unless (assoc "default-koma-letter" org-latex-classes) (add-to-list 'org-latex-classes - '("default-koma-letter" "\\documentclass[11pt]{scrlttr2}"))) + '("default-koma-letter" "\\documentclass[11pt]{scrlttr2}"))) ;;; User-Configurable Variables @@ -153,9 +195,9 @@ Functions must return a string. This option can also be set with the AUTHOR keyword." :group 'org-export-koma-letter :type '(radio (function-item user-full-name) - (string) - (function) - (const :tag "Do not export author" nil))) + (string) + (function) + (const :tag "Do not export author" nil))) (defcustom org-koma-letter-email 'org-koma-letter-email "Sender's email address. @@ -167,9 +209,9 @@ a function may be given. Functions must return a string. This option can also be set with the EMAIL keyword." :group 'org-export-koma-letter :type '(radio (function-item org-koma-letter-email) - (string) - (function) - (const :tag "Do not export email" nil))) + (string) + (function) + (const :tag "Do not export email" nil))) (defcustom org-koma-letter-from-address "" "Sender's address, as a string. @@ -184,6 +226,20 @@ This option can also be set with the PHONE_NUMBER keyword." :group 'org-export-koma-letter :type 'string) +(defcustom org-koma-letter-url "" + "Sender's URL, e. g., the URL of her homepage. +This option can also be set with the URL keyword." + :group 'org-export-koma-letter + :type 'string + :safe #'stringp) + +(defcustom org-koma-letter-from-logo "" + "Commands for inserting the sender's logo, e. g., \\includegraphics{logo}. +This option can also be set with the FROM_LOGO keyword." + :group 'org-export-koma-letter + :type 'string + :safe #'stringp) + (defcustom org-koma-letter-place "" "Place from which the letter is sent, as a string. This option can also be set with the PLACE keyword." @@ -287,14 +343,14 @@ This option can also be set with the OPTIONS keyword, e.g.: (const :tag "No export" nil) (const :tag "Default options" t) (set :tag "Configure options" - (const :tag "Subject after opening" afteropening) - (const :tag "Subject before opening" beforeopening) - (const :tag "Subject centered" centered) - (const :tag "Subject left-justified" left) - (const :tag "Subject right-justified" right) - (const :tag "Add title or description to subject" underlined) - (const :tag "Set subject underlined" titled) - (const :tag "Do not add title or description to subject" untitled))) + (const :tag "Subject after opening" afteropening) + (const :tag "Subject before opening" beforeopening) + (const :tag "Subject centered" centered) + (const :tag "Subject left-justified" left) + (const :tag "Subject right-justified" right) + (const :tag "Add title or description to subject" underlined) + (const :tag "Set subject underlined" titled) + (const :tag "Do not add title or description to subject" untitled))) :group 'org-export-koma-letter) (defcustom org-koma-letter-use-backaddress nil @@ -336,24 +392,24 @@ This option can also be set with the OPTIONS keyword, e.g.: \"foldmarks:(b l m t)\"." :group 'org-export-koma-letter :type '(choice - (const :tag "Activate default folding marks" t) - (const :tag "Deactivate folding marks" nil) - (set - :tag "Configure folding marks" - (const :tag "Activate upper horizontal mark on left paper edge" B) - (const :tag "Deactivate upper horizontal mark on left paper edge" b) - (const :tag "Activate all horizontal marks on left paper edge" H) - (const :tag "Deactivate all horizontal marks on left paper edge" h) - (const :tag "Activate left vertical mark on upper paper edge" L) - (const :tag "Deactivate left vertical mark on upper paper edge" l) - (const :tag "Activate middle horizontal mark on left paper edge" M) - (const :tag "Deactivate middle horizontal mark on left paper edge" m) - (const :tag "Activate punch or center mark on left paper edge" P) - (const :tag "Deactivate punch or center mark on left paper edge" p) - (const :tag "Activate lower horizontal mark on left paper edge" T) - (const :tag "Deactivate lower horizontal mark on left paper edge" t) - (const :tag "Activate all vertical marks on upper paper edge" V) - (const :tag "Deactivate all vertical marks on upper paper edge" v)))) + (const :tag "Activate default folding marks" t) + (const :tag "Deactivate folding marks" nil) + (set + :tag "Configure folding marks" + (const :tag "Activate upper horizontal mark on left paper edge" B) + (const :tag "Deactivate upper horizontal mark on left paper edge" b) + (const :tag "Activate all horizontal marks on left paper edge" H) + (const :tag "Deactivate all horizontal marks on left paper edge" h) + (const :tag "Activate left vertical mark on upper paper edge" L) + (const :tag "Deactivate left vertical mark on upper paper edge" l) + (const :tag "Activate middle horizontal mark on left paper edge" M) + (const :tag "Deactivate middle horizontal mark on left paper edge" m) + (const :tag "Activate punch or center mark on left paper edge" P) + (const :tag "Deactivate punch or center mark on left paper edge" p) + (const :tag "Activate lower horizontal mark on left paper edge" T) + (const :tag "Deactivate lower horizontal mark on left paper edge" t) + (const :tag "Activate all vertical marks on upper paper edge" V) + (const :tag "Deactivate all vertical marks on upper paper edge" v)))) (defcustom org-koma-letter-use-phone nil "Non-nil prints sender's phone number. @@ -362,6 +418,22 @@ This option can also be set with the OPTIONS keyword, e.g.: :group 'org-export-koma-letter :type 'boolean) +(defcustom org-koma-letter-use-url nil + "Non-nil prints sender's URL. +This option can also be set with the OPTIONS keyword, e.g.: +\"url:t\"." + :group 'org-export-koma-letter + :type 'boolean + :safe #'booleanp) + +(defcustom org-koma-letter-use-from-logo nil + "Non-nil prints sender's FROM_LOGO. +This option can also be set with the OPTIONS keyword, e.g.: +\"from-logo:t\"." + :group 'org-export-koma-letter + :type 'boolean + :safe #'booleanp) + (defcustom org-koma-letter-use-email nil "Non-nil prints sender's email address. This option can also be set with the OPTIONS keyword, e.g.: @@ -393,8 +465,8 @@ See also `org-koma-letter-opening' and "Non-nil means title should be interpreted as subject if subject is missing. This option can also be set with the OPTIONS keyword, e.g. \"title-subject:t\"." - :group 'org-export-koma-letter - :type 'boolean) + :group 'org-export-koma-letter + :type 'boolean) (defconst org-koma-letter-special-tags-in-letter '(to from closing location) "Header tags related to the letter itself.") @@ -412,8 +484,8 @@ e.g. \"title-subject:t\"." "Holds special content temporarily.") (make-obsolete-variable 'org-koma-letter-use-title - 'org-export-with-title - "25.1" 'set) + 'org-export-with-title + "25.1" 'set) ;;; Define Back-End @@ -426,6 +498,8 @@ e.g. \"title-subject:t\"." (:author-changed-in-buffer-p "AUTHOR" nil nil t) (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline) (:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number) + (:url "URL" nil org-koma-letter-url) + (:from-logo "FROM_LOGO" nil org-koma-letter-from-logo) (:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t) (:to-address "TO_ADDRESS" nil nil newline) (:place "PLACE" nil org-koma-letter-place) @@ -438,13 +512,15 @@ e.g. \"title-subject:t\"." (:special-tags-as-macro nil nil org-koma-letter-special-tags-as-macro) (:special-tags-in-letter nil nil org-koma-letter-special-tags-in-letter) (:special-tags-after-closing nil "after-closing-order" - org-koma-letter-special-tags-after-closing) + org-koma-letter-special-tags-after-closing) (:special-tags-after-letter nil "after-letter-order" - org-koma-letter-special-tags-after-letter) + org-koma-letter-special-tags-after-letter) (:with-backaddress nil "backaddress" org-koma-letter-use-backaddress) (:with-email nil "email" org-koma-letter-use-email) (:with-foldmarks nil "foldmarks" org-koma-letter-use-foldmarks) (:with-phone nil "phone" org-koma-letter-use-phone) + (:with-url nil "url" org-koma-letter-use-url) + (:with-from-logo nil "from-logo" org-koma-letter-use-from-logo) (:with-place nil "place" org-koma-letter-use-place) (:with-subject nil "subject" org-koma-letter-subject-format) (:with-title-as-subject nil "title-subject" org-koma-letter-prefer-subject) @@ -456,6 +532,8 @@ e.g. \"title-subject:t\"." (:inbuffer-from "FROM" nil 'koma-letter:empty) (:inbuffer-email "EMAIL" nil 'koma-letter:empty) (:inbuffer-phone-number "PHONE_NUMBER" nil 'koma-letter:empty) + (:inbuffer-url "URL" nil 'koma-letter:empty) + (:inbuffer-from-logo "FROM_LOGO" nil 'koma-letter:empty) (:inbuffer-place "PLACE" nil 'koma-letter:empty) (:inbuffer-location "LOCATION" nil 'koma-letter:empty) (:inbuffer-signature "SIGNATURE" nil 'koma-letter:empty) @@ -463,21 +541,23 @@ e.g. \"title-subject:t\"." (:inbuffer-with-email nil "email" 'koma-letter:empty) (:inbuffer-with-foldmarks nil "foldmarks" 'koma-letter:empty) (:inbuffer-with-phone nil "phone" 'koma-letter:empty) + (:inbuffer-with-url nil "url" 'koma-letter:empty) + (:inbuffer-with-from-logo nil "from-logo" 'koma-letter:empty) (:inbuffer-with-place nil "place" 'koma-letter:empty)) :translate-alist '((export-block . org-koma-letter-export-block) - (export-snippet . org-koma-letter-export-snippet) - (headline . org-koma-letter-headline) - (keyword . org-koma-letter-keyword) - (template . org-koma-letter-template)) + (export-snippet . org-koma-letter-export-snippet) + (headline . org-koma-letter-headline) + (keyword . org-koma-letter-keyword) + (template . org-koma-letter-template)) :menu-entry '(?k "Export with KOMA Scrlttr2" ((?L "As LaTeX buffer" org-koma-letter-export-as-latex) - (?l "As LaTeX file" org-koma-letter-export-to-latex) - (?p "As PDF file" org-koma-letter-export-to-pdf) - (?o "As PDF file and open" - (lambda (a s v b) - (if a (org-koma-letter-export-to-pdf t s v b) - (org-open-file (org-koma-letter-export-to-pdf nil s v b)))))))) + (?l "As LaTeX file" org-koma-letter-export-to-latex) + (?p "As PDF file" org-koma-letter-export-to-pdf) + (?o "As PDF file and open" + (lambda (a s v b) + (if a (org-koma-letter-export-to-pdf t s v b) + (org-open-file (org-koma-letter-export-to-pdf nil s v b)))))))) @@ -494,7 +574,7 @@ e.g. \"title-subject:t\"." "Get contents from a headline tagged with KEY. The contents is stored in `org-koma-letter-special-contents'." (let ((value (cdr (assoc-string (org-koma-letter--get-value key) - org-koma-letter-special-contents)))) + org-koma-letter-special-contents)))) (when value (org-string-nw-p (org-trim value))))) (defun org-koma-letter--get-value (value) @@ -503,26 +583,26 @@ Determines if VALUE is nil, a string, a function or a symbol and return a string or nil." (when value (cond ((stringp value) value) - ((functionp value) (funcall value)) - ((symbolp value) (symbol-name value)) - (t value)))) + ((functionp value) (funcall value)) + ((symbolp value) (symbol-name value)) + (t value)))) (defun org-koma-letter--special-contents-inline (keywords info) "Process KEYWORDS members of `org-koma-letter-special-contents'. + KEYWORDS is a list of symbols. Return them as a string to be formatted. The function is used for inserting content of special headings -such as the one tagged with PS. -" +such as the one tagged with PS." (mapconcat (lambda (keyword) (let* ((name (org-koma-letter--get-value keyword)) - (value (org-koma-letter--get-tagged-contents name)) - (macrop (memq keyword (plist-get info :special-tags-as-macro)))) + (value (org-koma-letter--get-tagged-contents name)) + (macrop (memq keyword (plist-get info :special-tags-as-macro)))) (cond ((not value) nil) - (macrop (format "\\%s{%s}\n" name value)) - (t value)))) + (macrop (format "\\%s{%s}\n" name value)) + (t value)))) keywords "\n")) @@ -543,7 +623,8 @@ such as the one tagged with PS. "Transcode an EXPORT-BLOCK element into KOMA Scrlttr2 code. CONTENTS is nil. INFO is a plist used as a communication channel." - (when (member (org-element-property :type export-block) '("KOMA-LETTER" "LATEX")) + (when (member (org-element-property :type export-block) + '("KOMA-LETTER" "LATEX")) (org-remove-indentation (org-element-property :value export-block)))) ;;;; Export Snippet @@ -562,7 +643,7 @@ channel." CONTENTS is nil. INFO is a plist used as a communication channel." (let ((key (org-element-property :key keyword)) - (value (org-element-property :value keyword))) + (value (org-element-property :value keyword))) ;; Handle specifically KOMA-LETTER keywords. Otherwise, fallback ;; to `latex' back-end. (if (equal key "KOMA-LETTER") value @@ -581,7 +662,7 @@ stored in `org-koma-letter-special-contents' and included at the appropriate place." (let ((special-tag (org-koma-letter--special-tag headline info))) (if (not special-tag) - contents + contents (push (cons special-tag contents) org-koma-letter-special-contents) ""))) @@ -590,13 +671,11 @@ appropriate place." INFO is a plist holding contextual information. Return first special tag headline." (let ((special-tags (append - (plist-get info :special-tags-in-letter) - (plist-get info :special-tags-after-closing) - (plist-get info :special-tags-after-letter)))) - (catch 'exit - (dolist (tag (org-export-get-tags headline info)) - (let ((tag (assoc-string tag special-tags))) - (when tag (throw 'exit tag))))))) + (plist-get info :special-tags-in-letter) + (plist-get info :special-tags-after-closing) + (plist-get info :special-tags-after-letter)))) + (cl-some (lambda (tag) (and (assoc-string tag special-tags) tag)) + (org-export-get-tags headline info)))) (defun org-koma-letter--keyword-or-headline (plist-key pred info) "Return the correct version of opening or closing. @@ -607,15 +686,15 @@ and an info plist. INFO is a plist holding contextual information. Return the preferred candidate for the exported of PLIST-KEY." (let* ((keyword-candidate (plist-get info plist-key)) - (headline-candidate (when (and (plist-get info :with-headline-opening) - (or (plist-get info :special-headings) - (not keyword-candidate))) - (org-element-map (plist-get info :parse-tree) - 'headline - (lambda (head) - (when (funcall pred head info) - (org-element-property :title head))) - info t)))) + (headline-candidate (when (and (plist-get info :with-headline-opening) + (or (plist-get info :special-headings) + (not keyword-candidate))) + (org-element-map (plist-get info :parse-tree) + 'headline + (lambda (h) + (and (funcall pred h info) + (org-element-property :title h))) + info t)))) (org-export-data (or headline-candidate keyword-candidate "") info))) ;;;; Template @@ -638,36 +717,36 @@ holding export options." ;; variables, then we insert LCO files, and, eventually, we insert ;; settings coming from buffer keywords. (org-koma-letter--build-settings 'global info) - (mapconcat #'(lambda (file) (format "\\LoadLetterOption{%s}\n" file)) - (org-split-string (or (plist-get info :lco) "") " ") - "") + (mapconcat (lambda (file) (format "\\LoadLetterOption{%s}\n" file)) + (split-string (or (plist-get info :lco) "")) + "") (org-koma-letter--build-settings 'buffer info) ;; Date. (format "\\date{%s}\n" (org-export-data (org-export-get-date info) info)) ;; Hyperref, document start, and subject and title. (let* ((with-subject (plist-get info :with-subject)) - (with-title (plist-get info :with-title)) - (title-as-subject (and with-subject - (plist-get info :with-title-as-subject))) - (subject* (org-string-nw-p - (org-export-data (plist-get info :subject) info))) - (title* (and with-title - (org-string-nw-p - (org-export-data (plist-get info :title) info)))) - (subject (cond ((not with-subject) nil) - (title-as-subject (or subject* title*)) - (t subject*))) - (title (cond ((not with-title) nil) - (title-as-subject (and subject* title*)) - (t title*))) - (hyperref-template (plist-get info :latex-hyperref-template)) - (spec (append (list (cons ?t (or title subject ""))) - (org-latex--format-spec info)))) + (with-title (plist-get info :with-title)) + (title-as-subject (and with-subject + (plist-get info :with-title-as-subject))) + (subject* (org-string-nw-p + (org-export-data (plist-get info :subject) info))) + (title* (and with-title + (org-string-nw-p + (org-export-data (plist-get info :title) info)))) + (subject (cond ((not with-subject) nil) + (title-as-subject (or subject* title*)) + (t subject*))) + (title (cond ((not with-title) nil) + (title-as-subject (and subject* title*)) + (t title*))) + (hyperref-template (plist-get info :latex-hyperref-template)) + (spec (append (list (cons ?t (or title subject ""))) + (org-latex--format-spec info)))) (concat (when (and with-subject (not (eq with-subject t))) - (format "\\KOMAoption{subject}{%s}\n" - (if (symbolp with-subject) with-subject - (mapconcat #'symbol-name with-subject ",")))) + (format "\\KOMAoption{subject}{%s}\n" + (if (symbolp with-subject) with-subject + (mapconcat #'symbol-name with-subject ",")))) ;; Hyperref. (format-spec hyperref-template spec) ;; Document start. @@ -678,25 +757,30 @@ holding export options." (when (or (org-string-nw-p title) (org-string-nw-p subject)) "\n"))) ;; Letter start. (let ((keyword-val (plist-get info :to-address)) - (heading-val (org-koma-letter--get-tagged-contents 'to))) + (heading-val (org-koma-letter--get-tagged-contents 'to))) (format "\\begin{letter}{%%\n%s}\n\n" - (org-koma-letter--add-latex-newlines - (or (if (plist-get info :special-headings) - (or heading-val keyword-val) - (or keyword-val heading-val)) - "\\\\mbox{}")))) + (org-koma-letter--add-latex-newlines + (or (if (plist-get info :special-headings) + (or heading-val keyword-val) + (or keyword-val heading-val)) + "\\mbox{}")))) ;; Opening. (format "\\opening{%s}\n\n" - (org-koma-letter--keyword-or-headline - :opening (lambda (h i) (not (org-koma-letter--special-tag h i))) - info)) + (org-koma-letter--keyword-or-headline + :opening + (lambda (h i) + (not (org-koma-letter--special-tag h i))) + info)) ;; Letter body. contents ;; Closing. (format "\\closing{%s}\n" (org-koma-letter--keyword-or-headline - :closing (lambda (h i) (eq (org-koma-letter--special-tag h i) - 'closing)) + :closing + (lambda (h i) + (let ((special-tag (org-koma-letter--special-tag h i))) + (and special-tag + (string= "closing" special-tag)))) info)) (org-koma-letter--special-contents-inline (plist-get info :special-tags-after-closing) info) @@ -712,23 +796,21 @@ holding export options." SCOPE is either `global' or `buffer'. INFO is a plist used as a communication channel." (let* ((check-scope - (function - ;; Non-nil value when SETTING was defined in SCOPE. - (lambda (setting) - (let ((property (intern (format ":inbuffer-%s" setting)))) - (if (eq scope 'global) - (eq (plist-get info property) 'koma-letter:empty) - (not (eq (plist-get info property) 'koma-letter:empty))))))) - (heading-or-key-value - (function - (lambda (heading key &optional scoped) - (let* ((heading-val - (org-koma-letter--get-tagged-contents heading)) - (key-val (org-string-nw-p (plist-get info key))) - (scopedp (funcall check-scope (or scoped heading)))) - (and (or (and key-val scopedp) heading-val) - (not (and (eq scope 'global) heading-val)) - (if scopedp key-val heading-val))))))) + ;; Non-nil value when SETTING was defined in SCOPE. + (lambda (setting) + (let ((property (intern (format ":inbuffer-%s" setting)))) + (if (eq scope 'global) + (eq (plist-get info property) 'koma-letter:empty) + (not (eq (plist-get info property) 'koma-letter:empty)))))) + (heading-or-key-value + (lambda (heading key &optional scoped) + (let* ((heading-val + (org-koma-letter--get-tagged-contents heading)) + (key-val (org-string-nw-p (plist-get info key))) + (scopedp (funcall check-scope (or scoped heading)))) + (and (or (and key-val scopedp) heading-val) + (not (and (eq scope 'global) heading-val)) + (if scopedp key-val heading-val)))))) (concat ;; Name. (let ((author (plist-get info :author))) @@ -739,8 +821,8 @@ a communication channel." ;; From. (let ((from (funcall heading-or-key-value 'from :from-address))) (and from - (format "\\setkomavar{fromaddress}{%s}\n" - (org-koma-letter--add-latex-newlines from)))) + (format "\\setkomavar{fromaddress}{%s}\n" + (org-koma-letter--add-latex-newlines from)))) ;; Email. (let ((email (plist-get info :email))) (and email @@ -757,45 +839,59 @@ a communication channel." (and (funcall check-scope 'with-phone) (format "\\KOMAoption{fromphone}{%s}\n" (if (plist-get info :with-phone) "true" "false"))) + ;; URL + (let ((url (plist-get info :url))) + (and (org-string-nw-p url) + (funcall check-scope 'url) + (format "\\setkomavar{fromurl}{%s}\n" url))) + (and (funcall check-scope 'with-url) + (format "\\KOMAoption{fromurl}{%s}\n" + (if (plist-get info :with-url) "true" "false"))) + ;; From Logo + (let ((from-logo (plist-get info :from-logo))) + (and (org-string-nw-p from-logo) + (funcall check-scope 'from-logo) + (format "\\setkomavar{fromlogo}{%s}\n" from-logo))) + (and (funcall check-scope 'with-from-logo) + (format "\\KOMAoption{fromlogo}{%s}\n" + (if (plist-get info :with-from-logo) "true" "false"))) ;; Signature. (let* ((heading-val - (and (plist-get info :with-headline-opening) - (org-string-nw-p - (org-trim - (org-export-data - (org-koma-letter--get-tagged-contents 'closing) - info))))) - (signature (org-string-nw-p (plist-get info :signature))) - (signature-scope (funcall check-scope 'signature))) + (and (plist-get info :with-headline-opening) + (pcase (org-koma-letter--get-tagged-contents 'closing) + ((and (pred org-string-nw-p) closing) (org-trim closing)) + (_ nil)))) + (signature (org-string-nw-p (plist-get info :signature))) + (signature-scope (funcall check-scope 'signature))) (and (or (and signature signature-scope) - heading-val) - (not (and (eq scope 'global) heading-val)) - (format "\\setkomavar{signature}{%s}\n" - (if signature-scope signature heading-val)))) + heading-val) + (not (and (eq scope 'global) heading-val)) + (format "\\setkomavar{signature}{%s}\n" + (if signature-scope signature heading-val)))) ;; Back address. (and (funcall check-scope 'with-backaddress) (format "\\KOMAoption{backaddress}{%s}\n" (if (plist-get info :with-backaddress) "true" "false"))) ;; Place. (let ((with-place-set (funcall check-scope 'with-place)) - (place-set (funcall check-scope 'place))) + (place-set (funcall check-scope 'place))) (and (or (and with-place-set place-set) - (and (eq scope 'buffer) (or with-place-set place-set))) - (format "\\setkomavar{place}{%s}\n" - (if (plist-get info :with-place) (plist-get info :place) - "")))) + (and (eq scope 'buffer) (or with-place-set place-set))) + (format "\\setkomavar{place}{%s}\n" + (if (plist-get info :with-place) (plist-get info :place) + "")))) ;; Location. (let ((location (funcall heading-or-key-value 'location :location))) (and location - (format "\\setkomavar{location}{%s}\n" location))) + (format "\\setkomavar{location}{%s}\n" location))) ;; Folding marks. (and (funcall check-scope 'with-foldmarks) (let ((foldmarks (plist-get info :with-foldmarks))) - (cond ((consp foldmarks) - (format "\\KOMAoptions{foldmarks=true,foldmarks=%s}\n" - (mapconcat #'symbol-name foldmarks ""))) - (foldmarks "\\KOMAoptions{foldmarks=true}\n") - (t "\\KOMAoptions{foldmarks=false}\n"))))))) + (cond ((consp foldmarks) + (format "\\KOMAoptions{foldmarks=true,foldmarks=%s}\n" + (mapconcat #'symbol-name foldmarks ""))) + (foldmarks "\\KOMAoptions{foldmarks=true}\n") + (t "\\KOMAoptions{foldmarks=false}\n"))))))) @@ -803,7 +899,7 @@ a communication channel." ;;;###autoload (defun org-koma-letter-export-as-latex - (&optional async subtreep visible-only body-only ext-plist) + (&optional async subtreep visible-only body-only ext-plist) "Export current buffer as a KOMA Scrlttr2 letter. If narrowing is active in the current buffer, only export its @@ -840,7 +936,7 @@ non-nil." ;;;###autoload (defun org-koma-letter-export-to-latex - (&optional async subtreep visible-only body-only ext-plist) + (&optional async subtreep visible-only body-only ext-plist) "Export current buffer as a KOMA Scrlttr2 letter (tex). If narrowing is active in the current buffer, only export its @@ -872,13 +968,13 @@ directory. Return output file's name." (interactive) (let ((outfile (org-export-output-file-name ".tex" subtreep)) - (org-koma-letter-special-contents)) + (org-koma-letter-special-contents)) (org-export-to-file 'koma-letter outfile async subtreep visible-only body-only ext-plist))) ;;;###autoload (defun org-koma-letter-export-to-pdf - (&optional async subtreep visible-only body-only ext-plist) + (&optional async subtreep visible-only body-only ext-plist) "Export current buffer as a KOMA Scrlttr2 letter (pdf). If narrowing is active in the current buffer, only export its @@ -907,7 +1003,7 @@ file-local settings. Return PDF file's name." (interactive) (let ((file (org-export-output-file-name ".tex" subtreep)) - (org-koma-letter-special-contents)) + (org-koma-letter-special-contents)) (org-export-to-file 'koma-letter file async subtreep visible-only body-only ext-plist (lambda (file) (org-latex-compile file))))) diff --git a/elpa/org-plus-contrib-20170407/ox-latex.el b/elpa/org-plus-contrib-20190904/ox-latex.el similarity index 95% rename from elpa/org-plus-contrib-20170407/ox-latex.el rename to elpa/org-plus-contrib-20190904/ox-latex.el index 58657c73..4582ab9e 100644 --- a/elpa/org-plus-contrib-20170407/ox-latex.el +++ b/elpa/org-plus-contrib-20190904/ox-latex.el @@ -1,6 +1,6 @@ ;;; ox-latex.el --- LaTeX Back-End for Org Export Engine -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2017 Free Software Foundation, Inc. +;; Copyright (C) 2011-2019 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou ;; Keywords: outlines, hypermedia, calendar, wp @@ -18,7 +18,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; @@ -159,7 +159,6 @@ (defconst org-latex-babel-language-alist '(("af" . "afrikaans") ("bg" . "bulgarian") - ("bt-br" . "brazilian") ("ca" . "catalan") ("cs" . "czech") ("cy" . "welsh") @@ -179,7 +178,7 @@ ("et" . "estonian") ("eu" . "basque") ("fi" . "finnish") - ("fr" . "frenchb") + ("fr" . "french") ("fr-ca" . "canadien") ("gl" . "galician") ("hr" . "croatian") @@ -195,6 +194,7 @@ ("no" . "norsk") ("pl" . "polish") ("pt" . "portuguese") + ("pt-br" . "brazilian") ("ro" . "romanian") ("ru" . "russian") ("sa" . "sanskrit") @@ -810,8 +810,9 @@ attributes." :type 'boolean :safe #'booleanp) -(defcustom org-latex-table-scientific-notation "%s\\,(%s)" +(defcustom org-latex-table-scientific-notation nil "Format string to display numbers in scientific notation. + The format should have \"%s\" twice, for mantissa and exponent \(i.e., \"%s\\\\times10^{%s}\"). @@ -865,7 +866,7 @@ The function should return the string to be exported. The default function simply returns the value of CONTENTS." :group 'org-export-latex - :version "24.4" + :version "26.1" :package-version '(Org . "8.3") :type 'function) @@ -920,15 +921,14 @@ using customize, or with (add-to-list \\='org-latex-packages-alist \\='(\"newfloat\" \"minted\")) In addition, it is necessary to install pygments -\(http://pygments.org), and to configure the variable +\(URL `http://pygments.org>'), and to configure the variable `org-latex-pdf-process' so that the -shell-escape option is passed to pdflatex. The minted choice has possible repercussions on the preview of latex fragments (see `org-preview-latex-fragment'). If you run into previewing problems, please consult - - http://orgmode.org/worg/org-tutorials/org-latex-preview.html" +URL `https://orgmode.org/worg/org-tutorials/org-latex-preview.html'." :group 'org-export-latex :type '(choice (const :tag "Use listings" t) @@ -956,7 +956,7 @@ parameter for the listings package. If the mode name and the listings name are the same, the language does not need an entry in this list - but it does not hurt if it is present." :group 'org-export-latex - :version "24.4" + :version "26.1" :package-version '(Org . "8.3") :type '(repeat (list @@ -1027,7 +1027,7 @@ value. For example, (setq org-latex-minted-options \\='((\"bgcolor\" \"bg\") (\"frame\" \"lines\"))) -will result in src blocks being exported with +will result in source blocks being exported with \\begin{minted}[bgcolor=bg,frame=lines]{} @@ -1048,12 +1048,13 @@ block-specific options, you may use the following syntax: (defcustom org-latex-custom-lang-environments nil "Alist mapping languages to language-specific LaTeX environments. -It is used during export of src blocks by the listings and minted -latex packages. The environment may be a simple string, composed of -only letters and numbers. In this case, the string is directly the -name of the latex environment to use. The environment may also be -a format string. In this case the format string will be directly -exported. This format string may contain these elements: +It is used during export of source blocks by the listings and +minted LaTeX packages. The environment may be a simple string, +composed of only letters and numbers. In this case, the string +is directly the name of the LaTeX environment to use. The +environment may also be a format string. In this case the format +string will be directly exported. This format string may contain +these elements: %s for the formatted source %c for the caption @@ -1075,7 +1076,7 @@ would have the effect that if Org encounters a Python source block during LaTeX export it will produce \\begin{pythoncode} - + \\end{pythoncode} and if Org encounters an Ocaml source block during LaTeX export it @@ -1083,7 +1084,7 @@ will produce \\begin{listing} \\begin{minted}[]{ocaml} - + \\end{minted} \\caption{} \\label{