summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <dominik@nb-dominik2.science.uva.nl>2008-01-31 11:37:51 +0100
committerCarsten Dominik <dominik@nb-dominik2.science.uva.nl>2008-01-31 11:37:51 +0100
commit93570c03c788f0a8857620d900ccf9c817b20ae2 (patch)
tree84388fe9666eaadc7a9892f85975158786f0a5f5
parent77c28e7c9d6154ab3cf0cbd4d0edd70484c90504 (diff)
Release 5.14release_5.14
-rw-r--r--ChangeLog142
-rw-r--r--Makefile15
-rw-r--r--org1433
-rwxr-xr-x[-rw-r--r--]org-export-latex.el1064
-rw-r--r--org-install.el513
-rw-r--r--org.el1502
-rw-r--r--org.pdfbin831733 -> 855353 bytes
-rw-r--r--org.texi618
-rw-r--r--orgcard.pdfbin58295 -> 58288 bytes
-rw-r--r--orgcard.tex9
-rw-r--r--orgcard_letter.pdfbin57885 -> 57886 bytes
11 files changed, 3708 insertions, 1588 deletions
diff --git a/ChangeLog b/ChangeLog
index fd5ab9929..135896e8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,33 +1,137 @@
-2007-11-02 Carsten Dominik <dominik@science.uva.nl>
-
- * org.el (org-columns-compute, org-column-number-to-string)
+2007-11-25 Carsten Dominik <dominik@science.uva.nl>
+
+ * org.texi (Property inheritance): New section
+ (Conventions): New section.
+ (Structure editing): Document C-RET, the prefix arg to the cut/cpy
+ commands, and the new bindings for refiling.
+ (Sparse trees): Document the new special command for sparse trees.
+ (References): Be more clear about the counting of hilines.
+ (Handling links): Document M-p/n for accessing links.
+ (Fast access to TODO states): New section.
+ (Per file keywords): New section.
+ (Property inheritance): New section.
+ (Column attributes): New summary types.
+ (Capturing Column View): New section.
+ (The date/time prompt): Cover the new features in the date/time
+ prompt. Compactify the table of keys for the calendar remote
+ control.
+ (Clocking work time): Document the new :scope parameter.
+ (Remember): Promoted to chapter.
+ (Quoted examples): New section.
+ (Enhancing text): New verbatim environments.
+
+ * org.el (org-calendar-holiday): Try to use
+ `calendar-check-holidays' instead of the obsolete
+ `check-calendar-holidays'.
+ (org-export-html-special-string-regexps): New constant.
+ (org-massive-special-regexp): New variable.
+ (org-compute-latex-and-specials-regexp)
+ (org-do-latex-and-special-faces): New functions.
+ (org-latex-and-export-specials): New face.
+ (org-highlight-latex-fragments-and-specials): New option.
+ (org-link-escape-chars): Use characters instead of strings.
+ (org-link-escape-chars-browser, org-link-escape)
+ (org-link-unescape): Use characters instead of strings.
+ (org-export-html-convert-sub-super, org-html-do-expand): Check for
+ protected text.
+ (org-emphasis-alist): Additional `verbatim' flag.
+ (org-set-emph-re): Handle the verbatim flag and compute
+ `org-verbatim-re'.
+ (org-cleaned-string-for-export): Protect verbatim elements.
+ (org-verbatim-re): New variable.
+ (org-hide-emphasis-markers): New option.
+ (org-additional-option-like-keywords): Add new keywords.
+ (org-get-entry): Renamed from `org-get-cleaned-entry'.
+ (org-icalendar-cleanup-string): New function for quoting icalendar
+ text.
+ (org-agenda-skip-scheduled-if-done): New option.
+ (org-agenda-get-scheduled, org-agenda-get-blocks): Use
+ `org-agenda-skip-scheduled-if-done'.
+ (org-prepare-agenda-buffers): Allow buffers as arguments.
+ (org-entry-properties): Add CATEGORY as a special property.
+ (org-use-property-inheritance): Allow a list of properties as a
+ value.
+ (org-eval-in-calendar): No longer update the prompt.
+ (org-read-date-popup-calendar): Renamed from
+ `org-popup-calendar-for-date-prompt'.
+ (org-read-date-display-live): New variable.
+ (org-read-date-display): New function.
+ (org-read-date-analyze): New function.
+ (org-remember-apply-template): Define `remember-finalize' if it is
+ not yet defined.
+ (org-remember-insinuate): New function.
+ (org-read-date-prefer-future): New option.
+ (org-read-date): Respect the setting of
+ `org-read-date-prefer-future'. Use `org-read-date-analyze'.
+ (org-set-font-lock-defaults): Use `org-archive-tag' instead of a
+ hardcoded string.
+ (org-remember-apply-template): Use `remember-finalize' instead of
+ `remember-buffer'.
+ (org-columns-compute, org-column-number-to-string)
(org-columns-uncompile-format, org-columns-compile-format)
(org-columns-compile-format): Handle printf format specifier.
(org-columns-new, org-column-number-to-string)
(org-columns-uncompile-format, org-columns-compile-format):
Support for new currency summary type.
-
-2007-10-30 Carsten Dominik <dominik@science.uva.nl>
-
- * org.el (org-format-org-table-html): Use lower-case for <col>
- tag.
-
-2007-10-28 Carsten Dominik <dominik@science.uva.nl>
-
- * org.el (org-agenda-execute): New command.
+ (org-tree-to-indirect-buffer): Do not kill old buffer when
+ `org-indirect-buffer-display' is `new-frame'.
+ (org-indirect-buffer-display): Document that `new-frame' leads to
+ indiret buffer proliferation.
+ (org-agenda-list): Use `org-extend-today-until'.
+ (org-extend-today-until): New option.
+ (org-format-org-table-html): Use lower-case for <col> tag.
+ (org-agenda-execute): New command.
(org-agenda-mode-map): Keybindings of "g" "G", "e" modified.
-
-2007-10-26 Carsten Dominik <dominik@science.uva.nl>
-
- * org.el (org-select-remember-template): New function.
- (org-remember-apply-template): Use
- `org-select-remember-template'.
+ (org-select-remember-template): New function.
+ (org-remember-apply-template): Use `org-select-remember-template'.
(org-go-to-remember-target): New function.
+2007-11-04 Bastien Guerry <Bastien.Guerry@ens.fr>
+
+ * org.el (org-export-with-special-strings): New option.
+ (org-export-html-convert-special-strings): New function.
+ (org-html-do-expand): `org-export-html-convert-special-strings'
+ added to the list of conversion.
+ (org-infile-export-plist, org-get-current-options): Added support
+ for "-" in the #+OPTION line to let user switch on/off special
+ strings conversion.
+ (org-export-plist-vars): New :html-table-tag property.
+ (org-export-as-html, org-format-org-table-html)
+ (org-format-table-table-html) Use the :html-table-tag property
+ instead of the `org-export-html-table-tag' global value.
+ (org-additional-option-like-keywords): Added "TBLFM".
+
+2007-11-27 Bastien Guerry <bzg@altern.org>
+
+ * org-export-latex.el (org-export-latex-cleaned-string): Fixed.
+ (org-export-latex-special-chars): Convert "..." in \ldots and skip
+ tables
+ (org-export-latex-fontify-headline): Changed parameter name
+ (org-export-as-latex): Handle export of subtrees
+ (org-export-latex-make-header): New argument TITLE
+ (org-export-latex-content): New argument EXCLUDE-LIST
+ (org-list-parse-list): New name for org-export-latex-parse-list
+ (org-export-latex-make-header): New name for
+ org-export-latex-make-preamble
+ (org-list-to-generic): New name of org-export-list-to-generic
+ (org-list-to-latex): New name of org-export-list-to-latex
+ (org-list-item-begin, org-list-end, org-list-insert-radio-list)
+ (org-list-send-list, org-list-to-texinfo)
+ (org-list-to-html): New functions
+ (org-export-latex-tables-column-borders)
+ (org-export-latex-default-class, org-export-latex-classes)
+ (org-export-latex-classes-sectioning)
+ (org-list-radio-list-templates): New options
+ (org-export-latex-header): New variable
+ (org-latex-entities): New constant
+ (org-export-latex-default-sectioning, org-export-latex-preamble)
+ (org-export-latex-prepare-text-option)
+ (org-export-latex-get-sectioning): Removed
+
-----------------------------------------------------------------------
Installed as 5.13g
-
+
2007-10-25 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-remember-handler): Make sure the amount of
diff --git a/Makefile b/Makefile
index 1c9956de4..2d7f375b9 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,8 @@ CP = cp -p
##----------------------------------------------------------------------
# The following variables need to be defined by the maintainer
-LISPFILES = org.el org-publish.el org-mouse.el org-export-latex.el org-install.el
+LISPFILES1 = org.el org-publish.el org-mouse.el org-export-latex.el
+LISPFILES = $(LISPFILES1) org-install.el
ELCFILES = $(LISPFILES:.el=.elc)
DOCFILES = org.texi org.pdf org
CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf
@@ -96,6 +97,17 @@ install-noutline: xemacs/noutline.elc
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
$(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
+org-install.el: $(LISPFILES)
+ $(BATCH) --eval "(require 'autoload)" \
+ --eval '(find-file "org-install.el")' \
+ --eval '(erase-buffer)' \
+ --eval '(generate-file-autoloads "org.el")' \
+ --eval '(generate-file-autoloads "org-mouse.el")' \
+ --eval '(generate-file-autoloads "org-publish.el")' \
+ --eval '(generate-file-autoloads "org-export-latex.el")' \
+ --eval '(save-buffer)'
+ cat < provide.el >> org-install.el
+
org.elc: org.el
org-publish.elc: org-publish.el
@@ -152,6 +164,7 @@ distfile:
touch org.texi orgcard.tex
make info
make doc
+ make org-install.el
rm -rf org-$(TAG) org-$(TAG).zip
$(MKDIR) org-$(TAG)
$(MKDIR) org-$(TAG)/xemacs
diff --git a/org b/org
index 12ce3b940..137e02058 100644
--- a/org
+++ b/org
@@ -5,7 +5,7 @@ START-INFO-DIR-ENTRY
* Org Mode: (org). Outline-based notes management and organizer
END-INFO-DIR-ENTRY
- This manual is for Org-mode (version 5.13e).
+ This manual is for Org-mode (version 5.14).
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
@@ -27,7 +27,7 @@ File: org, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
Org Mode Manual
***************
-This manual is for Org-mode (version 5.13e).
+This manual is for Org-mode (version 5.14).
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
@@ -52,7 +52,7 @@ This manual is for Org-mode (version 5.13e).
* 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
-* Timestamps:: Assign date and time to items
+* Dates and times:: Making items useful for planning
* Remember:: Quickly adding nodes to the outline tree
* Agenda views:: Collecting information into views
* Embedded LaTeX:: LaTeX fragments and formulas
@@ -72,6 +72,7 @@ Introduction
* Installation:: How to install a downloaded version of Org-mode
* Activation:: How to activate Org-mode for certain buffers.
* Feedback:: Bug reports, ideas, patches etc.
+* Conventions:: Type-setting conventions in the manual
Document Structure
@@ -159,6 +160,7 @@ 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
@@ -173,7 +175,7 @@ Defining Columns
* Scope of column definitions:: Where defined, where valid?
* Column attributes:: Appearance and content of a column
-Timestamps
+Dates and Times
* Time stamps:: Assigning a time to a tree entry
* Creating timestamps:: Commands which insert timestamps
@@ -195,6 +197,7 @@ Remember
* Setting up remember:: Some code for .emacs to get things going
* Remember templates:: Define the outline of different note types
* Storing notes:: Directly get the note to where it belongs
+* Refiling notes:: Moving a note or task to a project
Agenda Views
@@ -256,12 +259,14 @@ LaTeX export
* LaTeX export commands:: How to invoke LaTeX export
* Quoting LaTeX code:: Incorporating literal LaTeX code
+* Sectioning structure::
Text interpretation by the exporter
* Comment lines:: Some lines will not be exported
* Initial text:: Text before the first headline
* Footnotes:: Numbers like [1]
+* Quoted examples:: Inserting quoted chnuks of text
* Enhancing text:: Subscripts, symbols and more
* Export options:: How to influence the export settings
@@ -311,11 +316,12 @@ Extensions, Hooks and Hacking
* Special agenda views:: Customized views
* Using the property API:: Writing programs that use entry properties
-Tables in arbitrary syntax
+Tables and Lists in arbitrary syntax
* Radio tables:: Sending and receiving
* A LaTeX example:: Step by step, almost a tutorial
* Translator functions:: Copy and modify
+* Radio lists:: Doing the same for lists.

File: org, Node: Introduction, Next: Document structure, Prev: Top, Up: Top
@@ -329,6 +335,7 @@ File: org, Node: Introduction, Next: Document structure, Prev: Top, Up: Top
* Installation:: How to install a downloaded version of Org-mode
* Activation:: How to activate Org-mode for certain buffers.
* Feedback:: Bug reports, ideas, patches etc.
+* Conventions:: Type-setting conventions in the manual

File: org, Node: Summary, Next: Installation, Prev: Introduction, Up: Introduction
@@ -376,7 +383,7 @@ example as:
* full agenda and planner with deadlines and work scheduling
* environment to implement David Allen's GTD system
* a basic database application
- * simple hypertext system, with HTML export
+ * simple hypertext system, with HTML and LaTeX export
* publishing tool to create a set of interlinked webpages
Org-mode's automatic, context sensitive table editor with spreadsheet
@@ -463,7 +470,7 @@ 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'.

-File: org, Node: Feedback, Prev: Activation, Up: Introduction
+File: org, Node: Feedback, Next: Conventions, Prev: Activation, Up: Introduction
1.4 Feedback
============
@@ -514,6 +521,31 @@ error occurred. Here is how to produce a useful backtrace:
and attach it to your bug report.

+File: org, Node: Conventions, Prev: Feedback, Up: Introduction
+
+1.5 Typesetting conventions used in this manual
+===============================================
+
+Org-mode has 3 types of keywords that are being used. TODO keywords,
+tags, and property names. For this manual we are using the following
+conventions:
+
+`TODO'
+`WAITING'
+ TODO keyword 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 a all-caps.
+
+`Release'
+`PRIORITY'
+ User-defined properties are capitalized in all examples, while
+ built-in properties with special meaning are all-caps.
+
+
File: org, Node: Document structure, Next: Tables, Prev: Introduction, Up: Top
2 Document Structure
@@ -748,6 +780,9 @@ File: org, Node: Structure editing, Next: Archiving, Prev: Motion, Up: Docum
The yank level can also be specified with a prefix arg, or by
yanking after a headline marker like `****'.
+`C-c C-w'
+ Refile entry to a different location. *Note Refiling notes::.
+
`C-c ^'
Sort same-level entries. When there is an active region, all
entries in the region will be sorted. Otherwise the children of
@@ -865,11 +900,13 @@ location as the value (*note Properties and columns::).
---------- Footnotes ----------
- (1) If there are several such lines in the buffer, each will be
-valid for the entries below it. The first will also apply to any text
-before it. This method is only kept for backward compatibility. The
-preferred methods for setting multiple archive locations is using a
-property.
+ (1) For backward compatibility, the following also works: If there
+are several such lines in a file, each specifies the archive location
+for the text below it. The first such line also applies to any text
+before its definition. However, using this method is _strongly_
+deprecated as it is incompatible with the outline structure of the
+document. The correct method for setting multiple archive locations in
+a buffer is using a property.

File: org, Node: Sparse trees, Next: Plain lists, Prev: Archiving, Up: Document structure
@@ -1279,8 +1316,8 @@ Miscellaneous
`M-x org-table-import'
Import a file as a table. The table should be TAB- or whitespace
- separated. Useful, for example, to import an Excel table or data
- from a database, because these programs generally can write
+ separated. Useful, 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
@@ -1293,7 +1330,7 @@ Miscellaneous
`M-x org-table-export'
Export the table as a TAB-separated file. Useful for data
- exchange with, for example, Excel or database programs.
+ exchange with, for example, spreadsheet or database programs.
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
@@ -1454,7 +1491,7 @@ the current column like `+1' or `-2'.
separator lines (hlines). You can use absolute row numbers `1'...`N',
and row numbers relative to the current row like `+3' or `-1'. Or
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
+hline(1), `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. Relative row numbers like `-3' will not
@@ -1520,14 +1557,17 @@ constants in table formulas: For a property `:XYZ:' use the name
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(1). Column names and parameters can be specified in special
+kilometers(2). 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.
---------- Footnotes ----------
- (1) `Constant.el' can supply the values of constants in two
+ (1) Note that only hlines are counted that _separate_ table lines.
+If the table starts with a hline above the header, it does not count.
+
+ (2) `Constant.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
@@ -2829,7 +2869,7 @@ headlines. Org-mode has extensive support for using tags.
Every headline can contain a list of tags, at the end of the
headline. Tags are normal words containing letters, numbers, `_', and
`@'. Tags must be preceded and followed by a single colon; like
-`:WORK:'. Several tags can be specified like `:WORK:URGENT:'.
+`:WORK:'. Several tags can be specified like `:work:URGENT:'.
* Menu:
@@ -2847,12 +2887,12 @@ 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:
+ * 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:'. When executing tag searches and Org-mode finds that a
+the final heading will have the tags `:work:', `:boss:', `:notes:', and
+`:action:'. When executing tag searches and Org-mode finds that a
certain headline matches the search criterion, it will not check any
sublevel headline, assuming that these likely also match, and that the
list of matches can become very long. This may not be what you want,
@@ -2885,8 +2925,8 @@ 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
+ #+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
@@ -2900,18 +2940,18 @@ _fast tag selection_. This method allows to select and deselect tags
with a single key per tag. To function efficiently, you should assign
unique keys to most tags. This can be done globally with
- (setq org-tag-alist '(("@WORK" . ?w) ("@HOME" . ?h) ("Laptop" . ?l)))
+ (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l)))
or on a per-file basis with
- #+TAGS: @WORK(w) @HOME(h) @TENNISCLUB(t) Laptop(l) PC(p)
+ #+TAGS: @work(w) @home(h) @tennisclub(t) laptop(l) pc(p)
You can also group together tags that are mutually exclusive. With
curly braces(1)
- #+TAGS: { @WORK(w) @HOME(h) @TENNISCLUB(t) } Laptop(l) PC(p)
+ #+TAGS: { @work(w) @home(h) @tennisclub(t) } laptop(l) pc(p)
-you indicate that at most one of `@WORK', `@HOME', and `@TENNISCLUB'
+you indicate that at most one of `@work', `@home', and `@tennisclub'
should be selected.
Don't forget to press `C-c C-c' with the cursor in one of these lines
@@ -2956,9 +2996,9 @@ following keys:
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 <SPC> h l
-p <RET>'. Switching from `@HOME' to `@WORK' would be done with `C-c
+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 <SPC> h l
+p <RET>'. Switching from `@home' to `@work' would be done with `C-c
C-c w <RET>' or alternatively with `C-c C-c C-c w'. Adding the
non-predefined tag `Sarah' could be done with `C-c C-c <TAB> S a r a h
<RET> <RET>'.
@@ -3012,16 +3052,16 @@ not implemented. A tag may also be preceded by `-', to select against
it, and `+' is syntactic sugar for positive selection. The AND
operator `&' is optional when `+' or `-' is present. Examples:
-`+WORK-BOSS'
- Select headlines tagged `:WORK:', but discard those also tagged
- `:BOSS:'.
+`+work-boss'
+ Select headlines tagged `:work:', but discard those also tagged
+ `:boss:'.
-`WORK|LAPTOP'
- Selects lines tagged `:WORK:' or `:LAPTOP:'.
+`work|laptop'
+ Selects lines tagged `:work:' or `:laptop:'.
-`WORK|LAPTOP&NIGHT'
- Like before, but require the `:LAPTOP:' lines to be tagged also
- `NIGHT'.
+`work|laptop&night'
+ Like before, but require the `:laptop:' lines to be tagged also
+ `night'.
If you are using multi-state TODO keywords (*note TODO
extensions::), it can be useful to also match on the TODO keyword.
@@ -3034,30 +3074,31 @@ that only lines are checked that actually have any TODO keyword, use
`C-c a M', or equivalently start the todo part after the slash with `!'.
Examples:
-`WORK/WAITING'
- Select `:WORK:'-tagged TODO lines with the specific TODO keyword
+`work/WAITING'
+ Select `:work:'-tagged TODO lines with the specific TODO keyword
`WAITING'.
-`WORK/!-WAITING-NEXT'
- Select `:WORK:'-tagged TODO lines that are neither `WAITING' nor
+`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
+`work/+WAITING|+NEXT'
+ Select `:work:'-tagged TODO lines that are either `WAITING' or
`NEXT'.
Any element of the tag/todo match can be a regular expression - in
this case it must be enclosed in curly braces. For example,
-`WORK+{^BOSS.*}' matches headlines that contain the tag `WORK' and any
-tag starting with `BOSS'.
+`work+{^boss.*}' matches headlines that contain the tag `work' and any
+tag starting with `boss'.
- You can also require a headline to be of a certain level, by writing
-instead of any TAG an expression like `LEVEL=3'. For example, a search
-`+LEVEL=3+BOSS/-DONE' lists all level three headlines that have the tag
-BOSS and are _not_ marked with the todo keyword DONE.
+ You can also require a headline to be of a certain level or
+category, by writing instead of any TAG an expression like `LEVEL=3' or
+`CATEGORY="work"', respectively. For example, a search
+`+LEVEL=3+boss/-DONE' lists all level three headlines that have the tag
+`boss' and are _not_ marked with the todo keyword DONE.

-File: org, Node: Properties and columns, Next: Timestamps, Prev: Tags, Up: Top
+File: org, Node: Properties and columns, Next: Dates and times, Prev: Tags, Up: Top
7 Properties and Columns
************************
@@ -3067,7 +3108,7 @@ are two main applications for properties in Org-mode. First, properties
are like tags, but with a value. For example, in a file where you
document bugs and plan releases of a piece of software, instead of using
tags like `:release_1:', `:release_2:', it can be more efficient to use
-a property `RELEASE' with a value `1.0' or `2.0'. Second, you can use
+a property `Release' with a value `1.0' or `2.0'. Second, you can use
properties to implement (very basic) database capabilities in an
Org-mode buffer, for example to create a list of Music CD's you own.
You can edit and view properties conveniently in column view (*note
@@ -3078,6 +3119,7 @@ Column view::).
* 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
@@ -3103,8 +3145,8 @@ and the value after it. Here is an example:
:NDisks: 1
:END:
- You may define the allowed values for a particular property `XYZ' by
-setting a property `XYZ_ALL'. This special property is _inherited_, so
+ 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
@@ -3171,9 +3213,9 @@ File: org, Node: Special properties, Next: Property searches, Prev: Property
Special properties provide alternative access method to Org-mode
features discussed in the previous chapters, like the TODO state or the
priority of an entry. This interface exists so that you can include
-these states into columns view (*note Column view::). The following
-property names are special and should not be used as keys in the
-properties drawer:
+these states into columns 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:
TODO The TODO keyword of the entry.
TAGS The tags defined directly in the headline.
@@ -3183,7 +3225,7 @@ properties drawer:
SCHEDULED The scheduling time stamp, without the angular brackets.

-File: org, Node: Property searches, Next: Column view, Prev: Special properties, Up: Properties and columns
+File: org, Node: Property searches, Next: Property inheritance, Prev: Special properties, Up: Properties and columns
7.3 Property searches
=====================
@@ -3192,15 +3234,15 @@ To create sparse trees and special lists with selection based on
properties, the same commands are used as for tag searches (*note Tag
searches::), and the same logic applies. For example, a search string
- +WORK-BOSS+PRIORITY="A"+coffee="unlimited"+with={Sarah\|Denny}
+ +work-boss+PRIORITY="A"+Coffee="unlimited"+With={Sarah\|Denny}
-finds entries tagged `:WORK:' but not `:BOSS:', which also have a
-priority value `A', a `:coffee:' property with the value `unlimited',
-and a `:with:' property that is matched by the regular expression
+finds entries tagged `:work:' but not `:boss:', which also have a
+priority value `A', a `:Coffee:' property with the value `unlimited',
+and a `:With:' property that is matched by the regular expression
`Sarah\|Denny'.
- During a search, properties will be inherited from parent entries
-only if you configure the variable `org-use-property-inheritance'.
+ You can configure Org-mode to use property inheritance during a
+search, see *Note Property inheritance:: for details.
There is also a special command for creating sparse trees based on a
single property:
@@ -3214,9 +3256,43 @@ single property:
property values.

-File: org, Node: Column view, Next: Property API, Prev: Property searches, Up: Properties and columns
+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 for 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, or to a list of properties that
+should be inherited.
+
+ 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 column 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::).
+
+
+File: org, Node: Column view, Next: Property API, Prev: Property inheritance, Up: Properties and columns
-7.4 Column View
+7.5 Column View
===============
A great way to view and edit properties in an outline tree is _column
@@ -3242,7 +3318,7 @@ collected selected items, possibly from a number of files.

File: org, Node: Defining columns, Next: Using column view, Prev: Column view, Up: Column view
-7.4.1 Defining Columns
+7.5.1 Defining Columns
----------------------
Setting up a column view first requires defining the columns. This is
@@ -3256,7 +3332,7 @@ done by defining a column format line.

File: org, Node: Scope of column definitions, Next: Column attributes, Prev: Defining columns, Up: Defining columns
-7.4.1.1 Scope of column definitions
+7.5.1.1 Scope of column definitions
...................................
To define a column format for an entire file, use a line like
@@ -3280,7 +3356,7 @@ deeper part of the tree.

File: org, Node: Column attributes, Prev: Scope of column definitions, Up: Defining columns
-7.4.1.2 Column attributes
+7.5.1.2 Column attributes
.........................
A column definition sets the attributes of a column. The general
@@ -3299,9 +3375,11 @@ optional. The individual parts have the following meaning:
{summary-type} The summary type. If specified, the column values for
parent nodes are computed from the children.
Supported summary types are:
- {+} Sum numbers in this column.
- {:} Sum times, HH:MM:SS, plain numbers are hours.
- {X} Checkbox status, [X] if all children are [X].
+ {+} Sum numbers in this column.
+ {+;%.1f} Like `+', but format result with `%.1f'.
+ {$} Currency, short for `+;%.2f'.
+ {:} Sum times, HH:MM:SS, plain numbers are hours.
+ {X} Checkbox status, [X] if all children are [X].
Here is an example for a complete columns definition, along with allowed
values.
@@ -3327,7 +3405,7 @@ been checked.

File: org, Node: Using column view, Next: Capturing Column View, Prev: Defining columns, Up: Column view
-7.4.2 Using Column View
+7.5.2 Using Column View
-----------------------
Turning column view on and off
@@ -3393,7 +3471,7 @@ Modifying the table structure

File: org, Node: Capturing Column View, Prev: Using column view, Up: Column view
-7.4.3 Capturing Column View
+7.5.3 Capturing Column View
---------------------------
Since column view is just an overlay over a buffer, it cannot be
@@ -3443,7 +3521,7 @@ The following commands insert or update the dynamic block:

File: org, Node: Property API, Prev: Column view, Up: Properties and columns
-7.5 The Property API
+7.6 The Property API
====================
There is a full API for accessing and changing properties. This API can
@@ -3452,13 +3530,17 @@ features based on them. For more information see *Note Using the
property API::.

-File: org, Node: Timestamps, Next: Remember, Prev: Properties and columns, Up: Top
+File: org, Node: Dates and times, Next: Remember, Prev: Properties and columns, Up: Top
-8 Timestamps
-************
+8 Dates and Times
+*****************
-Items can be labeled with timestamps to make them useful for project
-planning.
+Items can be labeled with a date and/or a time to make them useful for
+project planning. 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:
@@ -3468,7 +3550,7 @@ planning.
* Clocking work time::

-File: org, Node: Time stamps, Next: Creating timestamps, Prev: Timestamps, Up: Timestamps
+File: org, Node: Time stamps, Next: Creating timestamps, Prev: Dates and times, Up: Dates and times
8.1 Time stamps, deadlines and scheduling
=========================================
@@ -3480,7 +3562,7 @@ stamp 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 TIME STAMP, EVENT, APPOINTMENT
+PLAIN TIME STAMP; EVENT; APPOINTMENT
A simple time stamp just assigns a date/time to an item. This is
just like writing down an appointment or event in a paper agenda.
In the timeline and agenda displays, the headline of an entry
@@ -3529,7 +3611,7 @@ INACTIVE TIME STAMP
used to these, see *Note Custom time format::

-File: org, Node: Creating timestamps, Next: Deadlines and scheduling, Prev: Time stamps, Up: Timestamps
+File: org, Node: Creating timestamps, Next: Deadlines and scheduling, Prev: Time stamps, Up: Dates and times
8.2 Creating timestamps
=======================
@@ -3594,23 +3676,34 @@ File: org, Node: The date/time prompt, Next: Custom time format, Prev: Creati
8.2.1 The date/time prompt
--------------------------
-When Org-mode prompts for a date/time, the prompt suggests to enter an
-ISO date. But it will in fact accept any string containing some date
-and/or time information. You can, for example, use `C-y' to paste a
-(possibly multi-line) string copied from an email message. Org-mode
-will find whatever information is in there and will replace anything not
-specified with the _default date and time_. The default is usually the
-current date and time, but when modifying an existing time stamp, or
-when entering the second stamp of a range, it is taken from the stamp in
-the buffer. For example:
+When Org-mode prompts for a date/time, the default is shown as an ISO
+date, and the prompt therefore seems to ask for an ISO date. But it
+will in fact accept any string containing some date and/or time
+information, and it is really smart about interpreting your input. You
+can, for example, use `C-y' to paste a (possibly multi-line) string
+copied from an email message. 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 time stamp, 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).
+
+ For example, lets 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
- feb 15 --> defaultyear-02-15
- sep 12 9 --> 2009-09-12
- 12:45 --> default-date 12:45
- 22 sept 0:34 --> defaultyear-09-22 0:34
- 12 --> defaultyear-defaultmonth-12
+ 14 --> 2006-06-14
+ 12 --> 2006-07-12
Fri --> nearest Friday (defaultdate or later)
+ sep 15 --> 2006-11-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
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
@@ -3630,48 +3723,34 @@ the nth such day. E.g.
you want to use unabbreviated names and/or other languages, configure
the variables `parse-time-months' and `parse-time-weekdays'.
- Parallel to the minibuffer prompt, a calendar is popped up(1). When
+ 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 <RET>, 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:
-`<'
- Scroll calendar backwards by one month.
-
-`>'
- Scroll calendar forwards by one month.
+ > / < Scroll calendar forward/backward by one month.
+ mouse-1 Select date by clicking on it.
+ S-<right>/<left> One day forward/backward.
+ S-<down>/<up> One week forward/backward.
+ M-S-<right>/<left> One month forward/backward.
+ <RET> Choose date in calendar.
-`mouse-1'
- Select date by clicking on it.
-
-`S-<right>'
- One day forward.
-
-`S-<left>'
- One day back.
-
-`S-<down>'
- One week forward.
-
-`S-<up>'
- One week back.
-
-`M-S-<right>'
- One month forward.
-
-`M-S-<left>'
- One month back.
-
-`<RET>'
- Choose date in calendar (only if nothing was typed into
- minibuffer).
+ The actions of the date/time prompt may seem complex, but I asure you
+they will grow on you. To help you understand what is going on, the
+current interpretation of your input will be displayed live in the
+minibuffer(3).
---------- Footnotes ----------
- (1) If you don't need/want the calendar, configure the variable
+ (1) See the variable `org-read-date-prefer-future'.
+
+ (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 of with
+`org-read-date-display-live'.
+

File: org, Node: Custom time format, Prev: The date/time prompt, Up: Creating timestamps
@@ -3712,7 +3791,7 @@ consequences:
the custom format is shorter, things do work as expected.

-File: org, Node: Deadlines and scheduling, Next: Clocking work time, Prev: Creating timestamps, Up: Timestamps
+File: org, Node: Deadlines and scheduling, Next: Clocking work time, Prev: Creating timestamps, Up: Dates and times
8.3 Deadlines and Scheduling
============================
@@ -3780,11 +3859,11 @@ an item:
with a prefix arg, an existing deadline will be removed from the
entry.
-`C-c C-w'
+`C-c / d'
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 C-w' shows
+ prefix, check that many days. For example, `C-1 C-c / d' shows
all deadlines due tomorrow.
`C-c C-s'
@@ -3837,7 +3916,7 @@ task - just make sure that the repeater intervals on both are the same.
`#+STARTUP' options `logrepeat' and `nologrepeat'.

-File: org, Node: Clocking work time, Prev: Deadlines and scheduling, Up: Timestamps
+File: org, Node: Clocking work time, Prev: Deadlines and scheduling, Up: Dates and times
8.4 Clocking work time
======================
@@ -3948,7 +4027,7 @@ lognoteclock-out'
the line is broken here only to fit it onto the manual.

-File: org, Node: Remember, Next: Agenda views, Prev: Timestamps, Up: Top
+File: org, Node: Remember, Next: Agenda views, Prev: Dates and times, Up: Top
9 Remember
**********
@@ -3956,7 +4035,7 @@ File: org, Node: Remember, Next: Agenda views, Prev: Timestamps, Up: Top
The Remember package by John Wiegley lets you store quick notes with
little interruption of your work flow. See
`http://www.emacswiki.org/cgi-bin/wiki/RememberMode' for more
-information. It is an excellent way to add new notes and TODO items to
+information. It is an excellent way to add new notes and tasks to
Org-mode files. Org-mode significantly expands the possibilities of
remember: You may define templates for different note types, and
associate target files and headlines with specific templates. It also
@@ -3968,6 +4047,7 @@ interactively, on the fly.
* Setting up remember:: Some code for .emacs to get things going
* Remember templates:: Define the outline of different note types
* Storing notes:: Directly get the note to where it belongs
+* Refiling notes:: Moving a note or task to a project

File: org, Node: Setting up remember, Next: Remember templates, Prev: Remember, Up: Remember
@@ -3978,12 +4058,21 @@ File: org, Node: Setting up remember, Next: Remember templates, Prev: Remembe
The following customization will tell remember to use org files as
target, and to create annotations compatible with Org-mode links.
- (require 'remember)
+ (org-remember-insinuate)
(setq org-directory "~/path/to/my/orgfiles/")
(setq org-default-notes-file (concat org-directory "/notes.org"))
- (setq remember-annotation-functions '(org-remember-annotation))
- (setq remember-handler-functions '(org-remember-handler))
- (add-hook 'remember-mode-hook 'org-remember-apply-template)
+ (define-key global-map "\C-cr" 'org-remember)
+
+ The last line binds the command `org-remember' to a global key(1).
+`org-remember' basically just calls `remember', but it makes a few
+things easier: If there is an active region, it will automatically copy
+the region into the remember buffer. It also allows to jump to the
+buffer and location where remember notes are being stored: Just call
+`org-remember' with a prefix argument.
+
+ ---------- Footnotes ----------
+
+ (1) Please select your own key, `C-c r' is only a suggestion.

File: org, Node: Remember templates, Next: Storing notes, Prev: Setting up remember, Up: Remember
@@ -4006,11 +4095,9 @@ In these entries, the first string is just a name, and the character
specifies how to select the template. It is useful if the character is
also the first letter of the name. The next string specifies the
template. Two more (optional) strings give the file in which, and the
-headline under which the new note should be stored. The file defaults
-(if not present or `nil') to `org-default-notes-file', the heading to
-`org-remember-default-headline'. Both defaults help to get to the
-storing location quickly, but you can change the location interactively
-while storing the note.
+headline under which the new note should be stored. The file (if not
+present or `nil') defaults to `org-default-notes-file', the heading to
+`org-remember-default-headline'.
When you call `M-x remember' (or `M-x org-remember') to remember
something, org will prompt for a key to select the template (if you have
@@ -4031,9 +4118,12 @@ insertion of content:
%A like `%a', but prompt for the description part
%i initial content, the region when remember is called with C-u.
The entire text will be indented like `%i' itself.
+ %c Content of the clipboard, or current kill ring head.
%^g prompt for tags, with completion on tags in target file.
%^G prompt for tags, with completion all tags in all agenda files.
%:keyword specific information for certain link types, see below
+ %[pathname] insert the contents of the file given by `pathname'
+ %(sexp) evaluate elisp `(sexp)' and replace with the result
For specific link types, the following keywords will be defined(1):
@@ -4067,7 +4157,7 @@ accessed in remember templates in a similar way.
`org-from-is-user-regexp'.

-File: org, Node: Storing notes, Prev: Remember templates, Up: Remember
+File: org, Node: Storing notes, Next: Refiling notes, Prev: Remember templates, Up: Remember
9.3 Storing notes
=================
@@ -4081,10 +4171,10 @@ restored, and you are back in the working context before the call to
`remember', exit the remember buffer with `C-u C-u C-c C-c', i.e.
specify a double prefix argument to `C-c C-c'.
- If you want to store the note to a different place, use `C-u C-c
-C-c' instead to exit remember(1). The handler will then first prompt
-for a target file - if you press <RET>, the value specified for the
-template is used. Then the command offers the headings tree of the
+ If you want to store the note directly to a different place, use
+`C-u C-c C-c' instead to exit remember(1). The handler will then first
+prompt for a target file - if you press <RET>, the value specified for
+the template is used. Then the command offers the headings tree of the
selected file, with the cursor position at the default headline (if you
had specified one in the template). You can either immediately press
<RET> to get the note placed there. Or you can use the following keys
@@ -4122,6 +4212,33 @@ demotion from level 1.
make this behavior the default.

+File: org, Node: Refiling notes, Prev: Storing notes, Up: Remember
+
+9.4 Refiling notes
+==================
+
+Remember is usually used to quickly capture notes and tasks into one or
+a few capture lists. When reviewing the captured data, you may want to
+refile 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 C-w'
+ Refile the entry at point. This command offers possible locations
+ for refiling the entry and lets you select one with completion.
+ The item is filed below the target heading as a subitem.
+ Depending on `org-reverse-note-order', it will be either the first
+ of last subitem, and you can toggle the value of this variable for
+ the duration of the command by using a `C-u' prefix.
+ 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. The list of targets is compiled
+ upon first use, you can update it by using a double prefix
+ argument (`C-u C-u') to this command.
+
+
File: org, Node: Agenda views, Next: Embedded LaTeX, Prev: Remember, Up: Top
10 Agenda Views
@@ -4426,8 +4543,8 @@ collect them into an agenda buffer.
`C-c a m'
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,
+ 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'
@@ -4540,11 +4657,13 @@ longer than 10 characters.
---------- Footnotes ----------
- (1) If there are several such lines in a file, each specifies the
-category for the text below it. The first category also applies to any
-text before the first CATEGORY line. This method is only kept for
-backward compatibility. The preferred method for setting multiple
-categories in a buffer is using a property.
+ (1) For backward compatibility, the following also works: If there
+are several such lines in a file, each specifies the category for the
+text below it. The first category also applies to any text before the
+first CATEGORY line. However, using this method is _strongly_
+deprecated as it is incompatible with the outline structure of the
+document. The correct method for setting multiple categories in a
+buffer is using a property.

File: org, Node: Time-of-day specifications, Next: Sorting of agenda items, Prev: Categories, Up: Presentation and sorting
@@ -5135,6 +5254,7 @@ From the command line you may also use
or, if you need to modify some parameters
emacs -eval '(org-batch-store-agenda-views \
org-agenda-ndays 30 \
+ org-agenda-start-day "2007-11-01" \
org-agenda-include-diary nil \
org-agenda-files (quote ("~/org/project.org")))' \
-kill
@@ -5560,7 +5680,7 @@ File: org, Node: HTML Export commands, Next: Quoting HTML tags, Prev: HTML ex
`C-c C-e H'
Export to a temporary buffer, do not create a file.
-`C-c C-e H'
+`C-c C-e R'
Export the active region to a temporary buffer. With prefix arg,
do not produce file header and foot, but just the plain HTML
section for the region. This is good for cut-and-paste operations.
@@ -5706,6 +5826,7 @@ Org-mode contains a LaTeX exporter written by Bastien Guerry.
* LaTeX export commands:: How to invoke LaTeX export
* Quoting LaTeX code:: Incorporating literal LaTeX code
+* Sectioning structure::

File: org, Node: LaTeX export commands, Next: Quoting LaTeX code, Prev: LaTeX export, Up: LaTeX export
@@ -5746,7 +5867,7 @@ with a prefix argument. For example,
creates two levels of headings and does the rest as items.

-File: org, Node: Quoting LaTeX code, Prev: LaTeX export commands, Up: LaTeX export
+File: org, Node: Quoting LaTeX code, Next: Sectioning structure, Prev: LaTeX export commands, Up: LaTeX export
12.3.2 Quoting LaTeX code
-------------------------
@@ -5765,6 +5886,20 @@ or
#+END_LaTeX

+File: org, Node: Sectioning structure, Prev: Quoting LaTeX code, Up: LaTeX export
+
+12.3.3 Sectioning structure
+---------------------------
+
+By default, the LaTeX output uses the class `article'.
+
+ You can change this globally by setting a different value for
+`org-export-latex-default-class' or locally by adding an option like
+`#+LaTeX_CLASS: myclass' in your file. The class should be listed in
+`org-export-latex-classes', where you can also define the sectioning
+structure for each class.
+
+
File: org, Node: XOXO export, Next: iCalendar export, Prev: LaTeX export, Up: Exporting
12.4 XOXO export
@@ -5830,6 +5965,7 @@ file in order to produce better output.
* Comment lines:: Some lines will not be exported
* Initial text:: Text before the first headline
* Footnotes:: Numbers like [1]
+* Quoted examples:: Inserting quoted chnuks of text
* Enhancing text:: Subscripts, symbols and more
* Export options:: How to influence the export settings
@@ -5883,7 +6019,7 @@ headline when exporting the file, you can use the `#+TEXT' construct:
#+TEXT: This goes between the table of contents and the first headline

-File: org, Node: Footnotes, Next: Enhancing text, Prev: Initial text, Up: Text interpretation
+File: org, Node: Footnotes, Next: Quoted examples, Prev: Initial text, Up: Text interpretation
12.6.3 Footnotes
----------------
@@ -5904,9 +6040,33 @@ binding, you could use `org-replace-disputed-keys' and
`org-disputed-keys' to change the settings in Org-mode.

-File: org, Node: Enhancing text, Next: Export options, Prev: Footnotes, Up: Text interpretation
+File: org, Node: Quoted examples, Next: Enhancing text, Prev: Footnotes, Up: Text interpretation
+
+12.6.4 Quoted examples
+----------------------
+
+When writing technical documents, you often need to insert examples that
+are not further interpreted by Org-mode. For historical reasons, there
+are several ways to do this:
+
+ * If a headline starts with the word `QUOTE', the text below the
+ headline will be typeset as fixed-width, to allow quoting of
+ computer codes etc.
+
+ * Lines starting with `:' are also typeset in fixed-width font.
+ `C-c :'
+ Toggle fixed-width for entry (QUOTE) or region, see below.
+
+ * Finally, text between
+ #+BEGIN_EXAMPLE
+ quoted text
+ #+END_EXAMPLE
+ will also be exported in this way.
+
+
+File: org, Node: Enhancing text, Next: Export options, Prev: Quoted examples, Up: Text interpretation
-12.6.4 Enhancing text for export
+12.6.5 Enhancing text for export
--------------------------------
Some of the export backends of Org-mode allow for sophisticated text
@@ -5918,8 +6078,10 @@ richly formatted output.
enumerator will be recognized and transformed if the backend
supports lists. See *Note Plain lists::.
- * You can make words *bold*, /italic/, _underlined_, `=code=', and
- even `+strikethrough+'(1).
+ * You can make words *bold*, /italic/, _underlined_, `=code=' and
+ `~verbatim~', and, if you must, `+strikethrough+'. Text in the
+ code and verbatim string is not processed for org-mode specific
+ syntax, it is exported verbatim.
* A line consisting of only dashes, and at least 5 of them, will be
exported as a horizontal line (`<hr/>' in HTML).
@@ -5937,24 +6099,30 @@ richly formatted output.
fixed-width font.
`C-c :'
Toggle fixed-width for entry (QUOTE) or region, see below.
+ Finally, text between
+ #+BEGIN_EXAMPLE
+ quoted text
+ #+END_EXAMPLE
+ will also be exported in this way.
* A double backslash _at the end of a line_ enforces a line break at
this position.
+ * Strings like `\alpha' will be exported as `&alpha;', in the HTML
+ output. These strings are exported as `$\alpha$' in the LaTeX
+ output. Similarly, `\nbsp' will become `&nbsp;' in HTML and in
+ LaTeX. This applies for a long list of entities, see the variable
+ `org-html-entities' for the complete list.
+
If these conversions conflict with your habits of typing ASCII text,
they can all be turned off with corresponding variables. See the
customization group `org-export-general', and the following section
which explains how to set export options with special lines in a buffer.
- ---------- Footnotes ----------
-
- (1) but remember that strikethrough is typographically evil and
-should never be used.
-

File: org, Node: Export options, Prev: Enhancing text, Up: Text interpretation
-12.6.5 Export options
+12.6.6 Export options
---------------------
The exporter recognizes special lines in the buffer which provide
@@ -5988,6 +6156,7 @@ you can:
^: turn on/off 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.
+ -: turn on/off conversion of special strings.
f: turn on/off foototes like this[1].
*: turn on/off emphasized text (bold, italic, underlined)
TeX: turn on/off simple TeX macros in plain text
@@ -6160,6 +6329,7 @@ respective variable for details.
`:archived-trees' `org-export-with-archived-trees'
`:emphasize' `org-export-with-emphasize'
`:sub-superscript' `org-export-with-sub-superscripts'
+`:special-strings' `org-export-with-special-strings'
`:TeX-macros' `org-export-with-TeX-macros'
`:LaTeX-fragments' `org-export-with-LaTeX-fragments'
`:fixed-width' `org-export-with-fixed-width'
@@ -6182,11 +6352,13 @@ respective variable for details.
`:author' `user-full-name'
`:email' `user-mail-address'
+ If you use several email addresses, separate them by a semi-column.
+
Most of the `org-export-with-*' variables have the same effect in
both HTML and LaTeX exporters, except for `:TeX-macros' and
`:LaTeX-fragments', respectively `nil' and `t' in the LaTeX export.
- When a property is given a value in org-publish-project-alist, its
+ 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 options::),
however, override everything.
@@ -6206,7 +6378,7 @@ HTML.
You may also link to related files, such as images. Provided you are
careful with relative pathnames, and provided you have also configured
-org-publish to upload the related files, these links will work too.
+`org-publish' to upload the related files, these links will work too.
*Note Complex example:: for an example of this usage.
Sometime an Org-mode file to be published may contain links that are
@@ -6807,13 +6979,13 @@ File: org, Node: Conflicts, Prev: Cooperation, Up: Interaction
`(require 'org)' early enough into your `.emacs' file.
`CUA.el' by Kim. F. Storm
- Keybindings in Org-mode conflict with the `S-<cursor>' keys used
- by CUA-mode (as well as pc-select-mode and s-region-mode) to
- select and extend the region. If you want to use one of these
- packages along with Org-mode, configure the variable
- `org-CUA-compatible'. When set, Org-mode will move the following
- keybindings in Org-mode files, and in the agenda buffer (but not
- during date selection).
+ Keybindings in Org-mode conflict with the `S-<cursor>' keys used by
+ CUA-mode (as well as pc-select-mode and s-region-mode) to select
+ and extend the region. If you want to use one of these packages
+ along with Org-mode, configure the variable
+ `org-replace-disputed-keys'. When set, Org-mode will move the
+ following keybindings in Org-mode 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-+
@@ -7033,8 +7205,8 @@ when the link is later inserted into tan Org-mode buffer with `C-c C-l'.

File: org, Node: Tables in arbitrary syntax, Next: Dynamic blocks, Prev: Adding hyperlink types, Up: Extensions and Hacking
-A.3 Tables in arbitrary syntax
-==============================
+A.3 Tables and Lists in arbitrary syntax
+========================================
Since Orgtbl-mode can be used as a minor mode in arbitrary buffers, a
frequent feature request has been to make it work with native tables in
@@ -7049,11 +7221,17 @@ install it in the right location (the target table). This puts the
burden of writing conversion functions on the user, but it allows for a
very flexible system.
+ Bastien added the ability to do the same with lists. You can use
+Org's facilities to edit and structure lists by turning `orgstruct-mode'
+on, then locally exporting such lists in another format (HTML, LaTeX or
+TeXInfo.)
+
* Menu:
* Radio tables:: Sending and receiving
* A LaTeX example:: Step by step, almost a tutorial
* Translator functions:: Copy and modify
+* Radio lists:: Doing the same for lists.

File: org, Node: Radio tables, Next: A LaTeX example, Prev: Tables in arbitrary syntax, Up: Tables in arbitrary syntax
@@ -7113,8 +7291,8 @@ number of different solutions:

File: org, Node: A LaTeX example, Next: Translator functions, Prev: Radio tables, Up: Tables in arbitrary syntax
-A.3.2 A LaTeX example
----------------------
+A.3.2 A LaTeX example of radio tables
+-------------------------------------
The best way to wrap the source table in LaTeX is to use the `comment'
environment provided by `comment.sty'. It has to be activated by
@@ -7214,7 +7392,7 @@ 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
+File: org, Node: Translator functions, Next: Radio lists, Prev: A LaTeX example, Up: Tables in arbitrary syntax
A.3.3 Translator functions
--------------------------
@@ -7282,6 +7460,48 @@ others can benefit from your work.
during HTML export.

+File: org, Node: Radio lists, Prev: Translator functions, Up: Tables in arbitrary syntax
+
+A.3.4 Radio lists
+-----------------
+
+Sending and receiving radio lists works exactly the same way than
+sending and receiving radio tables (*note Radio tables::) (1). As for
+radio tables, you can insert radio lists templates in HTML, LaTeX and
+TeXInfo modes by calling `org-list-insert-radio-list'.
+
+ Here are the differences with radio tables:
+
+ - Use `ORGLST' instead of `ORGTBL'.
+
+ - The available translation functions for radio lists don't take
+ parameters.
+
+ - `C-c C-c' will work when pressed on the first item of the list.
+
+ Here is a LaTeX example. Let's say that you have this in your LaTeX
+file:
+
+ % BEGIN RECEIVE ORGLST to-buy
+ % END RECEIVE ORGLST to-buy
+ \begin{comment}
+ #+ORGLIST: SEND to-buy orgtbl-to-latex
+ - a new house
+ - a new computer
+ + a new keyboard
+ + a new mouse
+ - a new life
+ \end{comment}
+
+ Pressing `C-c C-c' on `a new house' and will insert the converted
+LaTeX list between the two marker lines.
+
+ ---------- Footnotes ----------
+
+ (1) You need to load the `org-export-latex.el' package to use radio
+lists since the relevant code is there for now.
+
+
File: org, Node: Dynamic blocks, Next: Special agenda views, Prev: Tables in arbitrary syntax, Up: Extensions and Hacking
A.4 Dynamic blocks
@@ -7431,7 +7651,9 @@ properties.
-- Function: org-entry-get pom property &optional inherit
Get value of PROPERTY for entry at point-or-marker POM. If
INHERIT is non-nil and the entry does not have the property, then
- also check higher levels of the hierarchy.
+ also check higher levels of the hierarchy. This function ignores
+ the value of `org-use-property-inheritance' and requires the
+ explicit INHERIT flag.
-- Function: org-entry-delete pom property
Delete the property PROPERTY from entry at point-or-marker POM.
@@ -7627,12 +7849,12 @@ Index
(line 6)
* action, for publishing: Publishing action. (line 6)
* activation: Activation. (line 6)
-* active region <1>: ASCII export. (line 9)
-* active region <2>: Structure editing. (line 71)
-* active region <3>: Built-in table editor.
- (line 143)
-* active region: HTML Export commands.
+* active region <1>: Structure editing. (line 74)
+* active region <2>: HTML Export commands.
(line 6)
+* active region <3>: ASCII export. (line 9)
+* active region: Built-in table editor.
+ (line 143)
* agenda: Weekly/Daily agenda. (line 6)
* agenda dispatcher: Agenda dispatcher. (line 6)
* agenda files: Agenda files. (line 6)
@@ -7641,7 +7863,7 @@ Index
* agenda views, custom: Custom agenda views. (line 6)
* agenda views, exporting <1>: Agenda commands. (line 233)
* agenda views, exporting: Exporting Agenda Views.
- (line 12)
+ (line 6)
* agenda views, user-defined: Special agenda views.
(line 6)
* agenda, pipe: Extracting Agenda Information for other programs.
@@ -7673,14 +7895,15 @@ Index
(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.
+* calculations, in tables <1>: Built-in table editor.
(line 143)
+* calculations, in tables: The spreadsheet. (line 6)
* calendar commands, from agenda: Agenda commands. (line 196)
* calendar integration: Weekly/Daily agenda. (line 23)
* calendar, for selecting date: The date/time prompt.
- (line 42)
+ (line 53)
* category: Categories. (line 6)
+* category, require for tags/property match: Tag searches. (line 69)
* CDLaTeX: CDLaTeX mode. (line 6)
* cdlatex.el: Cooperation. (line 29)
* checkbox statistics: Checkboxes. (line 23)
@@ -7699,8 +7922,8 @@ Index
* completion, of option keywords <2>: Completion. (line 6)
* completion, of option keywords: Export options. (line 6)
* completion, of property keys: Completion. (line 6)
-* completion, of tags <1>: Completion. (line 6)
-* completion, of tags: Setting tags. (line 11)
+* completion, of tags <1>: Setting tags. (line 11)
+* completion, of tags: Completion. (line 6)
* completion, of TeX symbols: Completion. (line 6)
* completion, of TODO keywords <1>: Completion. (line 6)
* completion, of TODO keywords: Workflow states. (line 15)
@@ -7724,10 +7947,11 @@ Index
* daily agenda: Weekly/Daily agenda. (line 6)
* date format, custom: Custom time format. (line 6)
* date range: Time stamps. (line 40)
-* date stamps <1>: Timestamps. (line 6)
+* date stamps <1>: Dates and times. (line 6)
* date stamps: Time stamps. (line 6)
* date, reading in minibuffer: The date/time prompt.
(line 6)
+* dates: Dates and times. (line 6)
* DEADLINE keyword: Deadlines and scheduling.
(line 10)
* deadlines: Time stamps. (line 6)
@@ -7754,6 +7978,7 @@ Index
* enhancing text: Enhancing text. (line 6)
* evaluate time range: Creating timestamps. (line 48)
* even, STARTUP keyword: In-buffer settings. (line 88)
+* examples, quoted: Quoted examples. (line 6)
* exporting: Exporting. (line 6)
* exporting agenda views <1>: Agenda commands. (line 233)
* exporting agenda views: Exporting Agenda Views.
@@ -7776,7 +8001,8 @@ Index
* files for agenda: Agenda files. (line 6)
* files, adding to agenda list: Agenda files. (line 15)
* files, selecting for publishing: Selecting files. (line 6)
-* fixed width: Enhancing text. (line 28)
+* fixed width: Enhancing text. (line 30)
+* fixed width text: Quoted examples. (line 6)
* fixed-width sections: Export options. (line 26)
* folded, subtree visibility state: Visibility cycling. (line 10)
* folding, sparse trees: Sparse trees. (line 6)
@@ -7784,8 +8010,8 @@ Index
* footnote.el <1>: Cooperation. (line 56)
* footnote.el <2>: Footnotes. (line 6)
* footnote.el: Conflicts. (line 35)
-* footnotes <1>: Export options. (line 26)
-* footnotes: Footnotes. (line 6)
+* footnotes <1>: Footnotes. (line 6)
+* footnotes: Export options. (line 26)
* format specifier: Formula syntax for Calc.
(line 14)
* format, of links: Link format. (line 6)
@@ -7807,11 +8033,11 @@ Index
* grouping columns in tables: Column groups. (line 6)
* hand-formatted lists: Enhancing text. (line 11)
* headline levels: Export options. (line 26)
-* headline levels, for exporting <1>: ASCII export. (line 21)
-* headline levels, for exporting <2>: LaTeX export commands.
+* headline levels, for exporting <1>: LaTeX export commands.
(line 26)
-* headline levels, for exporting: HTML Export commands.
+* headline levels, for exporting <2>: HTML Export commands.
(line 44)
+* headline levels, for exporting: ASCII export. (line 21)
* headline navigation: Motion. (line 6)
* headline tagging: Tags. (line 6)
* headline, promotion and demotion: Structure editing. (line 6)
@@ -7821,7 +8047,8 @@ Index
* hiding leading stars: Clean view. (line 6)
* history: History and Acknowledgments.
(line 6)
-* horizontal rules, in exported files: Enhancing text. (line 18)
+* horizontal rules, in exported files: Enhancing text. (line 20)
+* HTML entities, LaTeX entities: Enhancing text. (line 45)
* HTML export: HTML export. (line 6)
* HTML, and orgtbl-mode: Translator functions.
(line 6)
@@ -7847,17 +8074,21 @@ Index
* jumping, to headlines: Motion. (line 6)
* keybindings, global: Activation. (line 6)
* keyword options: Per file keywords. (line 6)
+* LaTeX class: Sectioning structure.
+ (line 6)
* LaTeX export: LaTeX export. (line 6)
-* LaTeX fragments <1>: LaTeX fragments. (line 6)
-* LaTeX fragments: Export options. (line 26)
-* LaTeX fragments, export: Enhancing text. (line 21)
+* LaTeX fragments <1>: Export options. (line 26)
+* LaTeX fragments: LaTeX fragments. (line 6)
+* LaTeX fragments, export: Enhancing text. (line 23)
* LaTeX fragments, preview: Processing LaTeX fragments.
(line 6)
* LaTeX interpretation: Embedded LaTeX. (line 6)
+* LaTeX sectioning structure: Sectioning structure.
+ (line 6)
* LaTeX, and orgtbl-mode: A LaTeX example. (line 6)
-* level, require for tags match: Tag searches. (line 69)
+* level, require for tags/property match: Tag searches. (line 69)
* linebreak preservation: Export options. (line 26)
-* linebreak, forced: Enhancing text. (line 35)
+* linebreak, forced: Enhancing text. (line 42)
* link abbreviations: Link abbreviations. (line 6)
* link abbreviations, completion of: Completion. (line 6)
* link completion: Handling links. (line 25)
@@ -7873,6 +8104,8 @@ Index
* Lisp forms, as table formulas: Formula syntax for Lisp.
(line 6)
* lists, hand-formatted: Enhancing text. (line 11)
+* lists, in other modes: Tables in arbitrary syntax.
+ (line 6)
* lists, ordered: Plain lists. (line 6)
* lists, plain: Plain lists. (line 6)
* logdone, STARTUP keyword: In-buffer settings. (line 77)
@@ -7914,6 +8147,7 @@ Index
* ordered lists: Plain lists. (line 6)
* org-agenda, command: Weekly/Daily agenda. (line 9)
* org-blog.el: Extensions. (line 28)
+* org-list-insert-radio-list: Radio lists. (line 6)
* org-mode, turning on: Activation. (line 22)
* org-mouse.el: Extensions. (line 16)
* org-publish-project-alist: Project alist. (line 6)
@@ -7944,16 +8178,18 @@ Index
* promotion, of subtrees: Structure editing. (line 6)
* properties: Properties and columns.
(line 6)
-* properties, API <1>: Using the property API.
+* properties, API <1>: Property API. (line 6)
+* properties, API: Using the property API.
(line 6)
-* properties, API: Property API. (line 6)
* properties, column view: Defining columns. (line 6)
* properties, inheritance: Property searches. (line 6)
* properties, searching: Property searches. (line 6)
* properties, special: Special properties. (line 6)
* property syntax: Property syntax. (line 6)
* publishing: Publishing. (line 6)
+* quoted examples: Quoted examples. (line 6)
* quoted HTML tags: Export options. (line 26)
+* radio lists: Radio lists. (line 6)
* radio tables: Radio tables. (line 6)
* radio targets: Radio targets. (line 6)
* range references: References. (line 60)
@@ -7963,12 +8199,13 @@ Index
* references, named: References. (line 82)
* references, to fields: References. (line 15)
* references, to ranges: References. (line 60)
-* region, active <1>: ASCII export. (line 9)
-* region, active <2>: Structure editing. (line 71)
+* refiling notes: Refiling notes. (line 6)
+* region, active <1>: Built-in table editor.
+ (line 143)
+* region, active <2>: Structure editing. (line 74)
* region, active <3>: HTML Export commands.
(line 6)
-* region, active: Built-in table editor.
- (line 143)
+* region, active: ASCII export. (line 9)
* regular expressions, with tags search: Tag searches. (line 64)
* remember.el <1>: Remember. (line 6)
* remember.el: Cooperation. (line 33)
@@ -8001,6 +8238,7 @@ Index
* sparse tree, tag based: Tags. (line 6)
* sparse trees: Sparse trees. (line 6)
* special keywords: In-buffer settings. (line 6)
+* special strings: Export options. (line 26)
* spreadsheet capabilities: The spreadsheet. (line 6)
* statistics, for checkboxes: Checkboxes. (line 23)
* storing links: Handling links. (line 9)
@@ -8025,9 +8263,9 @@ Index
* table editor, table.el: Cooperation. (line 37)
* table of contents: Export options. (line 26)
* table.el: Cooperation. (line 34)
-* tables <1>: Tables. (line 6)
-* tables: Export options. (line 26)
-* tables, export: Enhancing text. (line 24)
+* tables <1>: Export options. (line 26)
+* tables: Tables. (line 6)
+* tables, export: Enhancing text. (line 26)
* tables, in other modes: Tables in arbitrary syntax.
(line 6)
* tag completion: Completion. (line 6)
@@ -8044,16 +8282,17 @@ Index
* TeX interpretation: Embedded LaTeX. (line 6)
* TeX macros <1>: Math symbols. (line 6)
* TeX macros: Export options. (line 26)
-* TeX macros, export: Enhancing text. (line 21)
+* TeX macros, export: Enhancing text. (line 23)
* TeX symbol completion: Completion. (line 6)
* TeX-like syntax for sub- and superscripts: Export options. (line 26)
+* text, fixed width: Quoted examples. (line 6)
* thanks: History and Acknowledgments.
(line 6)
* time format, custom: Custom time format. (line 6)
* time grid: Time-of-day specifications.
(line 26)
* time info, in export: Export options. (line 26)
-* time stamps <1>: Timestamps. (line 6)
+* time stamps <1>: Dates and times. (line 6)
* time stamps: Time stamps. (line 6)
* time, reading in minibuffer: The date/time prompt.
(line 6)
@@ -8062,6 +8301,7 @@ Index
* time-sorted view: Timeline. (line 6)
* timeline, single file: Timeline. (line 6)
* timerange: Time stamps. (line 40)
+* times: Dates and times. (line 6)
* timestamp: Time stamps. (line 14)
* timestamp, inactive: Time stamps. (line 49)
* timestamp, with repeater interval: Time stamps. (line 24)
@@ -8075,10 +8315,10 @@ Index
* TODO list, global: Global TODO list. (line 6)
* TODO types: TODO types. (line 6)
* TODO workflow: Workflow states. (line 6)
-* transient-mark-mode <1>: Built-in table editor.
+* transient-mark-mode <1>: ASCII export. (line 9)
+* transient-mark-mode <2>: Built-in table editor.
(line 143)
-* transient-mark-mode <2>: Structure editing. (line 71)
-* transient-mark-mode <3>: ASCII export. (line 9)
+* transient-mark-mode <3>: Structure editing. (line 74)
* transient-mark-mode: HTML Export commands.
(line 6)
* translator function: Translator functions.
@@ -8095,6 +8335,7 @@ Index
* variables, for customization: Customization. (line 6)
* vectors, in table calculations: Formula syntax for Calc.
(line 11)
+* verbatim text: Enhancing text. (line 15)
* visibility cycling: Visibility cycling. (line 6)
* visibility cycling, drawers: Drawers. (line 6)
* visible text, printing: Sparse trees. (line 46)
@@ -8123,36 +8364,36 @@ Key Index
* .: Agenda commands. (line 99)
* :: Agenda commands. (line 130)
* < <1>: The date/time prompt.
- (line 48)
+ (line 59)
* <: Using column view. (line 57)
* <left>: Agenda commands. (line 96)
-* <RET> <1>: Agenda commands. (line 39)
+* <RET> <1>: The date/time prompt.
+ (line 59)
* <RET> <2>: Setting tags. (line 76)
-* <RET> <3>: The date/time prompt.
- (line 73)
+* <RET> <3>: Agenda commands. (line 39)
* <RET>: Built-in table editor.
(line 64)
* <right>: Agenda commands. (line 91)
* <SPC> <1>: Agenda commands. (line 28)
* <SPC>: Setting tags. (line 73)
-* <TAB> <1>: CDLaTeX mode. (line 23)
-* <TAB> <2>: Visibility cycling. (line 10)
-* <TAB> <3>: Setting tags. (line 68)
-* <TAB> <4>: Agenda commands. (line 33)
-* <TAB> <5>: Editing and debugging formulas.
+* <TAB> <1>: Visibility cycling. (line 10)
+* <TAB> <2>: Editing and debugging formulas.
(line 57)
-* <TAB> <6>: Built-in table editor.
+* <TAB> <3>: Built-in table editor.
(line 57)
-* <TAB>: Plain lists. (line 41)
-* > <1>: The date/time prompt.
- (line 49)
-* > <2>: Using column view. (line 57)
-* >: Agenda commands. (line 173)
+* <TAB> <4>: Plain lists. (line 41)
+* <TAB> <5>: Agenda commands. (line 33)
+* <TAB> <6>: CDLaTeX mode. (line 23)
+* <TAB>: Setting tags. (line 68)
+* > <1>: Using column view. (line 57)
+* > <2>: Agenda commands. (line 173)
+* >: The date/time prompt.
+ (line 59)
* ^: CDLaTeX mode. (line 33)
* _: CDLaTeX mode. (line 33)
* `: CDLaTeX mode. (line 39)
-* a <1>: Agenda commands. (line 134)
-* a: Using column view. (line 46)
+* a <1>: Using column view. (line 46)
+* a: Agenda commands. (line 134)
* b: Agenda commands. (line 49)
* C: Agenda commands. (line 216)
* c: Agenda commands. (line 196)
@@ -8172,16 +8413,19 @@ Key Index
* C-c +: Built-in table editor.
(line 143)
* C-c ,: Priorities. (line 18)
-* C-c - <1>: Built-in table editor.
+* C-c - <1>: Plain lists. (line 88)
+* C-c -: Built-in table editor.
(line 92)
-* C-c -: Plain lists. (line 88)
* C-c .: Creating timestamps. (line 10)
* C-c /: Sparse trees. (line 15)
+* C-c / d: Inserting deadline/schedule.
+ (line 13)
* C-c / p: Property searches. (line 23)
* C-c / r: Sparse trees. (line 17)
* C-c / T: Tag searches. (line 9)
* C-c / t: TODO basics. (line 38)
-* C-c :: Enhancing text. (line 32)
+* C-c : <1>: Quoted examples. (line 15)
+* C-c :: Enhancing text. (line 34)
* C-c ;: Comment lines. (line 10)
* C-c <: Creating timestamps. (line 23)
* C-c <TAB>: Built-in table editor.
@@ -8195,9 +8439,9 @@ Key Index
* C-c [: Agenda files. (line 15)
* C-c \: Tag searches. (line 9)
* C-c ]: Agenda files. (line 18)
-* C-c ^ <1>: Built-in table editor.
+* C-c ^ <1>: Structure editing. (line 61)
+* C-c ^: Built-in table editor.
(line 96)
-* C-c ^: Structure editing. (line 58)
* C-c `: Built-in table editor.
(line 159)
* C-c a !: Stuck projects. (line 14)
@@ -8207,41 +8451,40 @@ Key Index
* C-c a e: Exporting Agenda Views.
(line 57)
* C-c a L: Timeline. (line 10)
-* C-c a m: Tag searches. (line 13)
-* C-c a M <1>: Matching tags and properties.
+* C-c a M <1>: Tag searches. (line 17)
+* C-c a M: Matching tags and properties.
(line 15)
-* C-c a M: Tag searches. (line 17)
+* C-c a m <1>: Tag searches. (line 13)
* C-c a m: Matching tags and properties.
(line 10)
+* C-c a t <1>: Global TODO list. (line 9)
+* C-c a t: TODO basics. (line 49)
* C-c a T: Global TODO list. (line 14)
-* C-c a t <1>: TODO basics. (line 49)
-* C-c a t: Global TODO list. (line 9)
* C-c C-a: Visibility cycling. (line 33)
* C-c C-b: Motion. (line 15)
-* C-c C-c <1>: Processing LaTeX fragments.
- (line 15)
+* C-c C-c <1>: TODO basics. (line 30)
* C-c C-c <2>: Cooperation. (line 37)
-* C-c C-c <3>: Built-in table editor.
+* C-c C-c <3>: The very busy C-c C-c key.
+ (line 6)
+* C-c C-c <4>: Processing LaTeX fragments.
+ (line 15)
+* C-c C-c <5>: Plain lists. (line 81)
+* C-c C-c <6>: Built-in table editor.
(line 56)
-* C-c C-c <4>: Editing and debugging formulas.
+* C-c C-c <7>: Clocking work time. (line 89)
+* C-c C-c <8>: Editing and debugging formulas.
(line 46)
-* C-c C-c <5>: Plain lists. (line 81)
-* C-c C-c <6>: Editing and debugging formulas.
- (line 90)
-* C-c C-c <7>: Capturing Column View.
+* C-c C-c <9>: Capturing Column View.
(line 39)
-* C-c C-c <8>: Cooperation. (line 46)
-* C-c C-c <9>: TODO basics. (line 30)
-* C-c C-c <10>: Clocking work time. (line 89)
-* C-c C-c <11>: Checkboxes. (line 37)
-* C-c C-c <12>: Using column view. (line 39)
-* C-c C-c <13>: Property syntax. (line 58)
-* C-c C-c <14>: Setting tags. (line 10)
-* C-c C-c: The very busy C-c C-c key.
- (line 6)
-* C-c C-d <1>: Agenda commands. (line 158)
-* C-c C-d: Inserting deadline/schedule.
+* C-c C-c <10>: Using column view. (line 39)
+* C-c C-c <11>: Editing and debugging formulas.
+ (line 90)
+* C-c C-c <12>: Property syntax. (line 58)
+* C-c C-c <13>: Setting tags. (line 10)
+* C-c C-c: Checkboxes. (line 37)
+* C-c C-d <1>: Inserting deadline/schedule.
(line 9)
+* C-c C-d: Agenda commands. (line 158)
* C-c C-e: Exporting. (line 20)
* C-c C-e a: ASCII export. (line 9)
* C-c C-e b: HTML Export commands.
@@ -8251,24 +8494,24 @@ Key Index
(line 6)
* C-c C-e H: HTML Export commands.
(line 16)
-* C-c C-e I: iCalendar export. (line 16)
* C-c C-e i: iCalendar export. (line 14)
-* C-c C-e l: LaTeX export commands.
- (line 6)
+* C-c C-e I: iCalendar export. (line 16)
* C-c C-e L: LaTeX export commands.
(line 7)
+* C-c C-e l: LaTeX export commands.
+ (line 6)
* C-c C-e R: HTML Export commands.
(line 19)
* C-c C-e t: Export options. (line 13)
-* C-c C-e v <1>: Sparse trees. (line 46)
-* C-c C-e v: XOXO export. (line 11)
+* C-c C-e v <1>: XOXO export. (line 11)
+* C-c C-e v: Sparse trees. (line 46)
* C-c C-e v a: ASCII export. (line 16)
* C-c C-e v b: HTML Export commands.
(line 24)
-* C-c C-e v h: HTML Export commands.
- (line 24)
* C-c C-e v H: HTML Export commands.
(line 24)
+* C-c C-e v h: HTML Export commands.
+ (line 24)
* C-c C-e v l: LaTeX export commands.
(line 10)
* C-c C-e v L: LaTeX export commands.
@@ -8290,20 +8533,20 @@ Key Index
* C-c C-r <1>: Visibility cycling. (line 34)
* C-c C-r: Editing and debugging formulas.
(line 53)
-* C-c C-s <1>: Agenda commands. (line 155)
-* C-c C-s: Inserting deadline/schedule.
+* C-c C-s <1>: Inserting deadline/schedule.
(line 20)
+* C-c C-s: Agenda commands. (line 155)
* C-c C-t <1>: Clocking work time. (line 30)
* C-c C-t: TODO basics. (line 13)
* C-c C-u: Motion. (line 18)
* C-c C-v: TODO basics. (line 38)
-* C-c C-w: Inserting deadline/schedule.
- (line 13)
+* C-c C-w <1>: Structure editing. (line 58)
+* C-c C-w: Refiling notes. (line 13)
* C-c C-x b: Visibility cycling. (line 41)
* C-c C-x C-a: ARCHIVE tag. (line 28)
* C-c C-x C-b: Checkboxes. (line 39)
-* C-c C-x C-c <1>: Using column view. (line 9)
-* C-c C-x C-c: Agenda commands. (line 223)
+* C-c C-x C-c <1>: Agenda commands. (line 223)
+* C-c C-x C-c: Using column view. (line 9)
* C-c C-x C-d: Clocking work time. (line 42)
* C-c C-x C-i: Clocking work time. (line 12)
* C-c C-x C-j: Clocking work time. (line 38)
@@ -8316,25 +8559,25 @@ Key Index
* C-c C-x C-r: Clocking work time. (line 50)
* C-c C-x C-s: Moving subtrees. (line 10)
* C-c C-x C-t: Custom time format. (line 12)
-* C-c C-x C-u <1>: Capturing Column View.
- (line 42)
+* C-c C-x C-u <1>: Clocking work time. (line 91)
* C-c C-x C-u <2>: Dynamic blocks. (line 21)
-* C-c C-x C-u: Clocking work time. (line 91)
+* C-c C-x C-u: Capturing Column View.
+ (line 42)
* C-c C-x C-w <1>: Built-in table editor.
(line 116)
* C-c C-x C-w: Structure editing. (line 43)
* C-c C-x C-x: Clocking work time. (line 34)
-* C-c C-x C-y <1>: Structure editing. (line 52)
-* C-c C-x C-y: Built-in table editor.
+* C-c C-x C-y <1>: Built-in table editor.
(line 120)
+* C-c C-x C-y: Structure editing. (line 52)
* C-c C-x M-w <1>: Structure editing. (line 48)
* C-c C-x M-w: Built-in table editor.
(line 113)
* C-c C-x p: Property syntax. (line 49)
* C-c C-x r: Capturing Column View.
(line 37)
-* C-c C-y <1>: Clocking work time. (line 25)
-* C-c C-y: Creating timestamps. (line 48)
+* C-c C-y <1>: Creating timestamps. (line 48)
+* C-c C-y: Clocking work time. (line 25)
* C-c l: Handling links. (line 9)
* C-c { <1>: CDLaTeX mode. (line 21)
* C-c {: Editing and debugging formulas.
@@ -8360,20 +8603,20 @@ Key Index
* C-u C-c C-t: TODO basics. (line 22)
* C-u C-c C-x C-a: ARCHIVE tag. (line 31)
* C-u C-c C-x C-s: Moving subtrees. (line 14)
-* C-u C-c C-x C-u <1>: Clocking work time. (line 93)
-* C-u C-c C-x C-u <2>: Capturing Column View.
+* C-u C-c C-x C-u <1>: Dynamic blocks. (line 22)
+* C-u C-c C-x C-u <2>: Clocking work time. (line 93)
+* C-u C-c C-x C-u: Capturing Column View.
(line 44)
-* C-u C-c C-x C-u: Dynamic blocks. (line 22)
* C-u C-u C-c *: Updating the table. (line 22)
* C-u C-u C-c =: Editing and debugging formulas.
(line 18)
* C-u C-u C-c C-c: Updating the table. (line 22)
-* C-x C-s <1>: Editing and debugging formulas.
+* C-x C-s <1>: Agenda commands. (line 87)
+* C-x C-s: Editing and debugging formulas.
(line 46)
-* C-x C-s: Agenda commands. (line 87)
-* C-x C-w <1>: Exporting Agenda Views.
+* C-x C-w <1>: Agenda commands. (line 232)
+* C-x C-w: Exporting Agenda Views.
(line 11)
-* C-x C-w: Agenda commands. (line 232)
* D: Agenda commands. (line 72)
* d: Agenda commands. (line 66)
* e: Using column view. (line 33)
@@ -8383,360 +8626,370 @@ Key Index
* I: Agenda commands. (line 178)
* i: Agenda commands. (line 201)
* J: Agenda commands. (line 190)
-* l: Agenda commands. (line 55)
* L: Agenda commands. (line 30)
+* l: Agenda commands. (line 55)
* M: Agenda commands. (line 207)
* m: Agenda commands. (line 66)
-* M-<down> <1>: Built-in table editor.
- (line 82)
-* M-<down>: Editing and debugging formulas.
+* M-<down> <1>: Editing and debugging formulas.
(line 76)
+* M-<down>: Built-in table editor.
+ (line 82)
* M-<left> <1>: Structure editing. (line 25)
* M-<left>: Built-in table editor.
(line 74)
-* M-<RET> <1>: Structure editing. (line 6)
-* M-<RET>: Plain lists. (line 49)
-* M-<right> <1>: Built-in table editor.
+* M-<RET> <1>: Plain lists. (line 49)
+* M-<RET>: Structure editing. (line 6)
+* M-<right> <1>: Structure editing. (line 28)
+* M-<right>: Built-in table editor.
(line 74)
-* M-<right>: Structure editing. (line 28)
-* M-<TAB> <1>: Editing and debugging formulas.
+* M-<TAB> <1>: Completion. (line 10)
+* M-<TAB> <2>: Property syntax. (line 46)
+* M-<TAB> <3>: Setting tags. (line 6)
+* M-<TAB> <4>: Per file keywords. (line 23)
+* M-<TAB>: Editing and debugging formulas.
(line 64)
-* M-<TAB> <2>: Completion. (line 10)
-* M-<TAB> <3>: Per file keywords. (line 23)
-* M-<TAB> <4>: Property syntax. (line 46)
-* M-<TAB>: Setting tags. (line 6)
* M-<up> <1>: Built-in table editor.
(line 82)
* M-<up>: Editing and debugging formulas.
(line 76)
* M-S-<down> <1>: Built-in table editor.
(line 89)
-* M-S-<down> <2>: Plain lists. (line 66)
-* M-S-<down> <3>: Structure editing. (line 40)
-* M-S-<down>: Editing and debugging formulas.
+* M-S-<down> <2>: Editing and debugging formulas.
(line 72)
-* M-S-<left> <1>: Structure editing. (line 31)
-* M-S-<left> <2>: The date/time prompt.
- (line 70)
-* M-S-<left> <3>: Plain lists. (line 72)
-* M-S-<left>: Built-in table editor.
+* M-S-<down> <3>: Plain lists. (line 66)
+* M-S-<down>: Structure editing. (line 40)
+* M-S-<left> <1>: Plain lists. (line 72)
+* M-S-<left> <2>: Built-in table editor.
(line 76)
+* M-S-<left> <3>: Structure editing. (line 31)
+* M-S-<left>: The date/time prompt.
+ (line 59)
* M-S-<RET> <1>: Checkboxes. (line 54)
-* M-S-<RET> <2>: Structure editing. (line 22)
-* M-S-<RET>: Plain lists. (line 59)
-* M-S-<right> <1>: Built-in table editor.
+* M-S-<RET> <2>: Plain lists. (line 59)
+* M-S-<RET>: Structure editing. (line 22)
+* M-S-<right> <1>: The date/time prompt.
+ (line 59)
+* M-S-<right> <2>: Plain lists. (line 72)
+* M-S-<right> <3>: Structure editing. (line 34)
+* M-S-<right>: Built-in table editor.
(line 79)
-* M-S-<right> <2>: The date/time prompt.
- (line 67)
-* M-S-<right> <3>: Plain lists. (line 72)
-* M-S-<right>: Structure editing. (line 34)
-* M-S-<up> <1>: Built-in table editor.
+* M-S-<up> <1>: Structure editing. (line 37)
+* M-S-<up> <2>: Plain lists. (line 66)
+* M-S-<up> <3>: Built-in table editor.
(line 86)
-* M-S-<up> <2>: Editing and debugging formulas.
+* M-S-<up>: Editing and debugging formulas.
(line 72)
-* M-S-<up> <3>: Plain lists. (line 66)
-* M-S-<up>: Structure editing. (line 37)
* mouse-1 <1>: Agenda commands. (line 33)
* mouse-1 <2>: Handling links. (line 73)
* mouse-1: The date/time prompt.
- (line 52)
-* mouse-2 <1>: Agenda commands. (line 33)
-* mouse-2: Handling links. (line 73)
+ (line 59)
+* mouse-2 <1>: Handling links. (line 73)
+* mouse-2: Agenda commands. (line 33)
* mouse-3 <1>: Agenda commands. (line 28)
* mouse-3: Handling links. (line 78)
* n <1>: Agenda commands. (line 19)
* n: Using column view. (line 30)
* O: Agenda commands. (line 182)
* o: Agenda commands. (line 65)
-* p <1>: Agenda commands. (line 20)
-* p: Using column view. (line 30)
+* p <1>: Using column view. (line 30)
+* p: Agenda commands. (line 20)
* P: Agenda commands. (line 142)
* q <1>: Agenda commands. (line 243)
* q: Using column view. (line 17)
* r <1>: Global TODO list. (line 22)
* r: Agenda commands. (line 80)
-* s: Agenda commands. (line 87)
* S: Agenda commands. (line 211)
-* S-<down> <1>: Plain lists. (line 62)
+* s: Agenda commands. (line 87)
+* S-<down> <1>: The date/time prompt.
+ (line 59)
* S-<down> <2>: Creating timestamps. (line 40)
-* S-<down> <3>: Priorities. (line 23)
+* S-<down> <3>: Plain lists. (line 62)
* S-<down> <4>: Editing and debugging formulas.
(line 67)
-* S-<down> <5>: The date/time prompt.
- (line 61)
-* S-<down>: Agenda commands. (line 151)
-* S-<left> <1>: Multiple sets in one file.
+* S-<down> <5>: Agenda commands. (line 151)
+* S-<down>: Priorities. (line 23)
+* S-<left> <1>: The date/time prompt.
+ (line 59)
+* S-<left> <2>: Agenda commands. (line 169)
+* S-<left> <3>: Creating timestamps. (line 35)
+* S-<left> <4>: TODO basics. (line 26)
+* S-<left> <5>: Multiple sets in one file.
(line 29)
-* S-<left> <2>: Using column view. (line 26)
-* S-<left> <3>: Agenda commands. (line 169)
-* S-<left> <4>: The date/time prompt.
- (line 58)
-* S-<left> <5>: TODO basics. (line 26)
-* S-<left> <6>: Property syntax. (line 66)
-* S-<left> <7>: Editing and debugging formulas.
+* S-<left> <6>: Using column view. (line 26)
+* S-<left> <7>: Property syntax. (line 66)
+* S-<left>: Editing and debugging formulas.
(line 67)
-* S-<left>: Creating timestamps. (line 35)
* S-<RET>: Built-in table editor.
(line 146)
-* S-<right> <1>: Multiple sets in one file.
+* S-<right> <1>: Editing and debugging formulas.
+ (line 67)
+* S-<right> <2>: Multiple sets in one file.
(line 29)
-* S-<right> <2>: Using column view. (line 26)
-* S-<right> <3>: Agenda commands. (line 161)
+* S-<right> <3>: TODO basics. (line 26)
* S-<right> <4>: Creating timestamps. (line 35)
-* S-<right> <5>: Property syntax. (line 66)
-* S-<right> <6>: Editing and debugging formulas.
- (line 67)
-* S-<right> <7>: The date/time prompt.
- (line 55)
-* S-<right>: TODO basics. (line 26)
-* S-<TAB> <1>: Built-in table editor.
+* S-<right> <5>: Using column view. (line 26)
+* S-<right> <6>: The date/time prompt.
+ (line 59)
+* S-<right> <7>: Agenda commands. (line 161)
+* S-<right>: Property syntax. (line 66)
+* S-<TAB> <1>: Visibility cycling. (line 22)
+* S-<TAB>: Built-in table editor.
(line 61)
-* S-<TAB>: Visibility cycling. (line 22)
-* S-<up> <1>: Editing and debugging formulas.
+* S-<up> <1>: Plain lists. (line 62)
+* S-<up> <2>: The date/time prompt.
+ (line 59)
+* S-<up> <3>: Editing and debugging formulas.
(line 67)
-* S-<up> <2>: Plain lists. (line 62)
-* S-<up> <3>: The date/time prompt.
- (line 64)
* S-<up> <4>: Creating timestamps. (line 40)
* S-<up> <5>: Agenda commands. (line 145)
* S-<up>: Priorities. (line 23)
* S-M-<left>: Using column view. (line 61)
* S-M-<RET>: TODO basics. (line 57)
* S-M-<right>: Using column view. (line 58)
-* t: Agenda commands. (line 112)
* T: Agenda commands. (line 125)
+* t: Agenda commands. (line 112)
* v: Using column view. (line 42)
* w: Agenda commands. (line 66)
-* X: Agenda commands. (line 185)
* x: Agenda commands. (line 244)
+* X: Agenda commands. (line 185)
* y: Agenda commands. (line 66)

Tag Table:
-Node: Top971
-Node: Introduction13147
-Node: Summary13562
-Node: Installation16689
-Node: Activation18067
-Node: Feedback19304
-Node: Document structure21373
-Node: Outlines22265
-Node: Headlines22930
-Ref: Headlines-Footnote-123934
-Node: Visibility cycling24045
-Ref: Visibility cycling-Footnote-126255
-Ref: Visibility cycling-Footnote-226313
-Ref: Visibility cycling-Footnote-326363
-Node: Motion26633
-Node: Structure editing27587
-Node: Archiving30754
-Node: ARCHIVE tag31312
-Node: Moving subtrees33105
-Ref: Moving subtrees-Footnote-134652
-Node: Sparse trees34939
-Ref: Sparse trees-Footnote-137211
-Ref: Sparse trees-Footnote-237393
-Node: Plain lists37508
-Ref: Plain lists-Footnote-141705
-Ref: Plain lists-Footnote-242063
-Node: Drawers42244
-Ref: Drawers-Footnote-143121
-Node: orgstruct-mode43227
-Node: Tables44127
-Node: Built-in table editor44708
-Node: Narrow columns52114
-Ref: Narrow columns-Footnote-154049
-Node: Column groups54095
-Node: orgtbl-mode55628
-Node: The spreadsheet56431
-Node: References57518
-Ref: References-Footnote-161982
-Node: Formula syntax for Calc62271
-Node: Formula syntax for Lisp64728
-Node: Field formulas66446
-Node: Column formulas67754
-Node: Editing and debugging formulas69353
-Node: Updating the table73506
-Node: Advanced features74559
-Node: Hyperlinks79084
-Node: Link format79862
-Node: Internal links81155
-Ref: Internal links-Footnote-183080
-Node: Radio targets83215
-Node: External links83915
-Node: Handling links86319
-Ref: Handling links-Footnote-191635
-Ref: Handling links-Footnote-291872
-Node: Using links outside Org-mode91946
-Node: Link abbreviations92456
-Node: Search options94149
-Ref: Search options-Footnote-195929
-Node: Custom searches96010
-Node: TODO items97041
-Node: TODO basics98079
-Node: TODO extensions100294
-Node: Workflow states101238
-Ref: Workflow states-Footnote-1102413
-Node: TODO types102506
-Ref: TODO types-Footnote-1104089
-Node: Multiple sets in one file104171
-Node: Fast access to TODO states105791
-Node: Per file keywords106934
-Ref: Per file keywords-Footnote-1108236
-Node: Faces for TODO keywords108437
-Node: Progress logging109143
-Node: Closing items109574
-Ref: Closing items-Footnote-1110508
-Ref: Closing items-Footnote-2110713
-Node: Tracking TODO state changes110786
-Ref: Tracking TODO state changes-Footnote-1111971
-Node: Priorities112046
-Ref: Priorities-Footnote-1113696
-Node: Breaking down tasks113766
-Ref: Breaking down tasks-Footnote-1114286
-Node: Checkboxes114382
-Node: Tags117231
-Node: Tag inheritance118003
-Node: Setting tags118940
-Ref: Setting tags-Footnote-1123463
-Ref: Setting tags-Footnote-2123575
-Node: Tag searches123658
-Node: Properties and columns126385
-Node: Property syntax127490
-Node: Special properties130180
-Node: Property searches131096
-Node: Column view132363
-Node: Defining columns133594
-Node: Scope of column definitions133992
-Node: Column attributes134914
-Node: Using column view137162
-Node: Capturing Column View139243
-Node: Property API140970
-Node: Timestamps141324
-Node: Time stamps141735
-Ref: Time stamps-Footnote-1144089
-Node: Creating timestamps144205
-Node: The date/time prompt146279
-Ref: The date/time prompt-Footnote-1149038
-Node: Custom time format149144
-Node: Deadlines and scheduling150836
-Ref: Deadlines and scheduling-Footnote-1152909
-Node: Inserting deadline/schedule153064
-Node: Repeated tasks154182
-Ref: Repeated tasks-Footnote-1155860
-Node: Clocking work time155981
-Ref: Clocking work time-Footnote-1160828
-Ref: Clocking work time-Footnote-2160906
-Node: Remember161032
-Node: Setting up remember161911
-Node: Remember templates162539
-Ref: Remember templates-Footnote-1166100
-Ref: Remember templates-Footnote-2166283
-Node: Storing notes166381
-Ref: Storing notes-Footnote-1168860
-Node: Agenda views168962
-Node: Agenda files170913
-Ref: Agenda files-Footnote-1172001
-Ref: Agenda files-Footnote-2172150
-Node: Agenda dispatcher172343
-Ref: Agenda dispatcher-Footnote-1174397
-Ref: Agenda dispatcher-Footnote-2174491
-Node: Built-in agenda views174585
-Node: Weekly/Daily agenda175167
-Ref: Weekly/Daily agenda-Footnote-1178465
-Node: Global TODO list178669
-Node: Matching tags and properties180949
-Node: Timeline182040
-Node: Stuck projects182714
-Node: Presentation and sorting184567
-Node: Categories185360
-Ref: Categories-Footnote-1186071
-Node: Time-of-day specifications186391
-Node: Sorting of agenda items188364
-Node: Agenda commands189648
-Node: Custom agenda views197111
-Node: Storing searches197832
-Ref: Storing searches-Footnote-1200366
-Node: Block agenda200483
-Node: Setting Options201715
-Node: Exporting Agenda Views204456
-Ref: Exporting Agenda Views-Footnote-1208742
-Ref: Exporting Agenda Views-Footnote-2208799
-Node: Extracting Agenda Information for other programs208985
-Node: Embedded LaTeX213113
-Ref: Embedded LaTeX-Footnote-1214207
-Node: Math symbols214397
-Node: Subscripts and Superscripts215164
-Node: LaTeX fragments216010
-Ref: LaTeX fragments-Footnote-1218243
-Ref: LaTeX fragments-Footnote-2218504
-Node: Processing LaTeX fragments218638
-Node: CDLaTeX mode219586
-Ref: CDLaTeX mode-Footnote-1222072
-Node: Exporting222220
-Node: ASCII export223687
-Node: HTML export225188
-Node: HTML Export commands225814
-Node: Quoting HTML tags227601
-Node: Links228236
-Node: Images228933
-Ref: Images-Footnote-1229804
-Node: CSS support229865
-Ref: CSS support-Footnote-1231184
-Node: LaTeX export231297
-Node: LaTeX export commands231621
-Node: Quoting LaTeX code232783
-Node: XOXO export233288
-Node: iCalendar export233728
-Node: Text interpretation235197
-Node: Comment lines235788
-Node: Initial text236183
-Node: Footnotes237852
-Node: Enhancing text238643
-Ref: Enhancing text-Footnote-1240512
-Node: Export options240602
-Node: Publishing243004
-Ref: Publishing-Footnote-1243965
-Ref: Publishing-Footnote-2244109
-Node: Configuration244260
-Node: Project alist244978
-Node: Sources and destinations246044
-Node: Selecting files246774
-Node: Publishing action247522
-Node: Publishing options248856
-Node: Publishing links251231
-Node: Project page index252744
-Node: Sample configuration253522
-Node: Simple example254014
-Node: Complex example254687
-Node: Triggering publication256763
-Node: Miscellaneous257448
-Node: Completion258082
-Node: Customization259752
-Node: In-buffer settings260335
-Node: The very busy C-c C-c key266005
-Node: Clean view267860
-Node: TTY keys270437
-Node: Interaction272047
-Node: Cooperation272444
-Node: Conflicts275320
-Node: Bugs277323
-Node: Extensions and Hacking278819
-Node: Extensions279544
-Node: Adding hyperlink types281806
-Node: Tables in arbitrary syntax285468
-Node: Radio tables286557
-Node: A LaTeX example289060
-Ref: A LaTeX example-Footnote-1292706
-Ref: A LaTeX example-Footnote-2292854
-Node: Translator functions293289
-Ref: Translator functions-Footnote-1296398
-Node: Dynamic blocks296486
-Node: Special agenda views298458
-Node: Using the property API301703
-Node: History and Acknowledgments303184
-Node: Index309745
-Node: Key Index344814
+Node: Top970
+Node: Introduction13509
+Node: Summary13995
+Node: Installation17132
+Node: Activation18510
+Node: Feedback19747
+Node: Conventions21836
+Node: Document structure22528
+Node: Outlines23420
+Node: Headlines24085
+Ref: Headlines-Footnote-125089
+Node: Visibility cycling25200
+Ref: Visibility cycling-Footnote-127410
+Ref: Visibility cycling-Footnote-227468
+Ref: Visibility cycling-Footnote-327518
+Node: Motion27788
+Node: Structure editing28742
+Node: Archiving31990
+Node: ARCHIVE tag32548
+Node: Moving subtrees34341
+Ref: Moving subtrees-Footnote-135888
+Node: Sparse trees36332
+Ref: Sparse trees-Footnote-138604
+Ref: Sparse trees-Footnote-238786
+Node: Plain lists38901
+Ref: Plain lists-Footnote-143098
+Ref: Plain lists-Footnote-243456
+Node: Drawers43637
+Ref: Drawers-Footnote-144514
+Node: orgstruct-mode44620
+Node: Tables45520
+Node: Built-in table editor46101
+Node: Narrow columns53518
+Ref: Narrow columns-Footnote-155453
+Node: Column groups55499
+Node: orgtbl-mode57032
+Node: The spreadsheet57835
+Node: References58922
+Ref: References-Footnote-163389
+Ref: References-Footnote-263530
+Node: Formula syntax for Calc63819
+Node: Formula syntax for Lisp66276
+Node: Field formulas67994
+Node: Column formulas69302
+Node: Editing and debugging formulas70901
+Node: Updating the table75054
+Node: Advanced features76107
+Node: Hyperlinks80632
+Node: Link format81410
+Node: Internal links82703
+Ref: Internal links-Footnote-184628
+Node: Radio targets84763
+Node: External links85463
+Node: Handling links87867
+Ref: Handling links-Footnote-193183
+Ref: Handling links-Footnote-293420
+Node: Using links outside Org-mode93494
+Node: Link abbreviations94004
+Node: Search options95697
+Ref: Search options-Footnote-197477
+Node: Custom searches97558
+Node: TODO items98589
+Node: TODO basics99627
+Node: TODO extensions101842
+Node: Workflow states102786
+Ref: Workflow states-Footnote-1103961
+Node: TODO types104054
+Ref: TODO types-Footnote-1105637
+Node: Multiple sets in one file105719
+Node: Fast access to TODO states107339
+Node: Per file keywords108482
+Ref: Per file keywords-Footnote-1109784
+Node: Faces for TODO keywords109985
+Node: Progress logging110691
+Node: Closing items111122
+Ref: Closing items-Footnote-1112056
+Ref: Closing items-Footnote-2112261
+Node: Tracking TODO state changes112334
+Ref: Tracking TODO state changes-Footnote-1113519
+Node: Priorities113594
+Ref: Priorities-Footnote-1115244
+Node: Breaking down tasks115314
+Ref: Breaking down tasks-Footnote-1115834
+Node: Checkboxes115930
+Node: Tags118779
+Node: Tag inheritance119551
+Node: Setting tags120488
+Ref: Setting tags-Footnote-1125011
+Ref: Setting tags-Footnote-2125123
+Node: Tag searches125206
+Node: Properties and columns127982
+Node: Property syntax129153
+Node: Special properties131843
+Node: Property searches132786
+Node: Property inheritance134047
+Node: Column view135494
+Node: Defining columns136728
+Node: Scope of column definitions137126
+Node: Column attributes138048
+Node: Using column view140444
+Node: Capturing Column View142525
+Node: Property API144252
+Node: Dates and times144606
+Node: Time stamps145335
+Ref: Time stamps-Footnote-1147699
+Node: Creating timestamps147815
+Node: The date/time prompt149894
+Ref: The date/time prompt-Footnote-1153250
+Ref: The date/time prompt-Footnote-2153306
+Ref: The date/time prompt-Footnote-3153412
+Node: Custom time format153505
+Node: Deadlines and scheduling155197
+Ref: Deadlines and scheduling-Footnote-1157275
+Node: Inserting deadline/schedule157430
+Node: Repeated tasks158548
+Ref: Repeated tasks-Footnote-1160226
+Node: Clocking work time160347
+Ref: Clocking work time-Footnote-1165199
+Ref: Clocking work time-Footnote-2165277
+Node: Remember165403
+Node: Setting up remember166349
+Ref: Setting up remember-Footnote-1167258
+Node: Remember templates167324
+Ref: Remember templates-Footnote-1170963
+Ref: Remember templates-Footnote-2171146
+Node: Storing notes171244
+Ref: Storing notes-Footnote-1173755
+Node: Refiling notes173857
+Node: Agenda views175122
+Node: Agenda files177073
+Ref: Agenda files-Footnote-1178161
+Ref: Agenda files-Footnote-2178310
+Node: Agenda dispatcher178503
+Ref: Agenda dispatcher-Footnote-1180557
+Ref: Agenda dispatcher-Footnote-2180651
+Node: Built-in agenda views180745
+Node: Weekly/Daily agenda181327
+Ref: Weekly/Daily agenda-Footnote-1184625
+Node: Global TODO list184829
+Node: Matching tags and properties187109
+Node: Timeline188200
+Node: Stuck projects188874
+Node: Presentation and sorting190727
+Node: Categories191520
+Ref: Categories-Footnote-1192231
+Node: Time-of-day specifications192668
+Node: Sorting of agenda items194641
+Node: Agenda commands195925
+Node: Custom agenda views203388
+Node: Storing searches204109
+Ref: Storing searches-Footnote-1206643
+Node: Block agenda206760
+Node: Setting Options207992
+Node: Exporting Agenda Views210733
+Ref: Exporting Agenda Views-Footnote-1215090
+Ref: Exporting Agenda Views-Footnote-2215147
+Node: Extracting Agenda Information for other programs215333
+Node: Embedded LaTeX219461
+Ref: Embedded LaTeX-Footnote-1220555
+Node: Math symbols220745
+Node: Subscripts and Superscripts221512
+Node: LaTeX fragments222358
+Ref: LaTeX fragments-Footnote-1224591
+Ref: LaTeX fragments-Footnote-2224852
+Node: Processing LaTeX fragments224986
+Node: CDLaTeX mode225934
+Ref: CDLaTeX mode-Footnote-1228420
+Node: Exporting228568
+Node: ASCII export230035
+Node: HTML export231536
+Node: HTML Export commands232162
+Node: Quoting HTML tags233949
+Node: Links234584
+Node: Images235281
+Ref: Images-Footnote-1236152
+Node: CSS support236213
+Ref: CSS support-Footnote-1237532
+Node: LaTeX export237645
+Node: LaTeX export commands237994
+Node: Quoting LaTeX code239156
+Node: Sectioning structure239690
+Node: XOXO export240191
+Node: iCalendar export240631
+Node: Text interpretation242100
+Node: Comment lines242755
+Node: Initial text243150
+Node: Footnotes244819
+Node: Quoted examples245611
+Node: Enhancing text246386
+Node: Export options248835
+Node: Publishing251296
+Ref: Publishing-Footnote-1252257
+Ref: Publishing-Footnote-2252401
+Node: Configuration252552
+Node: Project alist253270
+Node: Sources and destinations254336
+Node: Selecting files255066
+Node: Publishing action255814
+Node: Publishing options257148
+Node: Publishing links259654
+Node: Project page index261169
+Node: Sample configuration261947
+Node: Simple example262439
+Node: Complex example263112
+Node: Triggering publication265188
+Node: Miscellaneous265873
+Node: Completion266507
+Node: Customization268177
+Node: In-buffer settings268760
+Node: The very busy C-c C-c key274430
+Node: Clean view276285
+Node: TTY keys278862
+Node: Interaction280472
+Node: Cooperation280869
+Node: Conflicts283745
+Node: Bugs285755
+Node: Extensions and Hacking287251
+Node: Extensions287976
+Node: Adding hyperlink types290238
+Node: Tables in arbitrary syntax293900
+Node: Radio tables295292
+Node: A LaTeX example297795
+Ref: A LaTeX example-Footnote-1301473
+Ref: A LaTeX example-Footnote-2301621
+Node: Translator functions302056
+Ref: Translator functions-Footnote-1305185
+Node: Radio lists305273
+Ref: Radio lists-Footnote-1306395
+Node: Dynamic blocks306515
+Node: Special agenda views308487
+Node: Using the property API311732
+Node: History and Acknowledgments313330
+Node: Index319891
+Node: Key Index356323

End Tag Table
diff --git a/org-export-latex.el b/org-export-latex.el
index 0dafed2b7..d30a59a40 100644..100755
--- a/org-export-latex.el
+++ b/org-export-latex.el
@@ -4,7 +4,7 @@
;;
;; Emacs Lisp Archive Entry
;; Filename: org-export-latex.el
-;; Version: 5.12
+;; Version: 5.14
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: org, wp, tex
@@ -18,31 +18,31 @@
;; Free Software Foundation; either version 3, 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.
+;; 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.
;;
;;; Commentary:
;;
;; This library implements a LaTeX exporter for org-mode.
-;;
+;;
;; Put this file into your load-path and the following into your ~/.emacs:
;; (require 'org-export-latex)
-;;
+;;
;; The interactive functions are similar to those of the HTML exporter:
-;;
+;;
;; M-x `org-export-as-latex'
;; M-x `org-export-as-latex-batch'
;; M-x `org-export-as-latex-to-buffer'
;; M-x `org-export-region-as-latex'
;; M-x `org-replace-region-by-latex'
-;;
+;;
;;; Code:
(eval-when-compile
@@ -52,15 +52,19 @@
(require 'org)
;;; Variables:
-(defvar org-latex-options-plist nil)
-(defvar org-latex-todo-keywords-1 nil)
-(defvar org-latex-all-targets-regexp nil)
-(defvar org-latex-add-level 0)
-(defvar org-latex-sectioning-depth 0)
+(defvar org-export-latex-class nil)
+(defvar org-export-latex-header nil)
+(defvar org-export-latex-append-header nil)
+(defvar org-export-latex-options-plist nil)
+(defvar org-export-latex-todo-keywords-1 nil)
+(defvar org-export-latex-all-targets-re nil)
+(defvar org-export-latex-add-level 0)
+(defvar org-export-latex-sectioning "")
+(defvar org-export-latex-sectioning-depth 0)
(defvar org-export-latex-list-beginning-re
"^\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) +?")
-(defvar org-latex-special-string-regexps
+(defvar org-export-latex-special-string-regexps
'(org-ts-regexp
org-scheduled-string
org-deadline-string
@@ -71,28 +75,82 @@
(defvar re-quote) ; dynamically scoped from org.el
(defvar commentsp) ; dynamically scoped from org.el
-;;; Custom variables:
-(defcustom org-export-latex-sectioning-alist
- '((1 "\\section{%s}" "\\section*{%s}")
- (2 "\\subsection{%s}" "\\subsection*{%s}")
- (3 "\\subsubsection{%s}" "\\subsubsection*{%s}")
- (4 "\\paragraph{%s}" "\\paragraph*{%s}")
- (5 "\\subparagraph{%s}" "\\subparagraph*{%s}"))
- "Alist of LaTeX commands for inserting sections.
-Here is the structure of each cell:
+;;; User variables:
- \(level unnumbered-section numbered-section\)
+(defcustom org-export-latex-default-class "article"
+ "The default LaTeX class."
+ :group 'org-export-latex
+ :type '(string :tag "LaTeX class"))
-The %s formatter will be replaced by the title of the section."
+(defcustom org-export-latex-classes
+ '(("article"
+ "\\documentclass[11pt,a4paper]{article}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{hyperref}"
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+ ("\\paragraph{%s}" . "\\paragraph*{%s}")
+ ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
+ ("report"
+ "\\documentclass[11pt,a4paper]{report}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{hyperref}"
+ ("\\part{%s}" . "\\part*{%s}")
+ ("\\chapter{%s}" . "\\chapter*{%s}")
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
+ ("book"
+ "\\documentclass[11pt,a4paper]{book}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{hyperref}"
+ ("\\part{%s}" . "\\part*{%s}")
+ ("\\chapter{%s}" . "\\chapter*{%s}")
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
+ "Alist of LaTeX classes and associated header and structure.
+If #+LaTeX_CLASS is set in the buffer, use its value and the
+associated information. Here is the structure of each cell:
+
+ \(class-name
+ header-string
+ (unnumbered-section numbered-section\)
+ ...\)
+
+A %s formatter is mandatory in each section string and will be
+replaced by the title of the section."
:group 'org-export-latex
- :type 'alist)
+ :type '(repeat
+ (list (string :tag "LaTeX class")
+ (string :tag "LaTeX header")
+ (cons :tag "Level 1"
+ (string :tag "Numbered")
+ (string :tag "Unnumbered"))
+ (cons :tag "Level 2"
+ (string :tag "Numbered")
+ (string :tag "Unnumbered"))
+ (cons :tag "Level 3"
+ (string :tag "Numbered")
+ (string :tag "Unnumbered"))
+ (cons :tag "Level 4"
+ (string :tag "Numbered")
+ (string :tag "Unnumbered"))
+ (cons :tag "Level 5"
+ (string :tag "Numbered")
+ (string :tag "Unnumbered")))))
(defcustom org-export-latex-emphasis-alist
'(("*" "\\textbf{%s}" nil)
("/" "\\emph{%s}" nil)
("_" "\\underline{%s}" nil)
("+" "\\texttt{%s}" nil)
- ("=" "\\texttt{%s}" nil))
+ ("=" "\\texttt{%s}" nil)
+ ("~" "\\texttt{%s}" t))
"Alist of LaTeX expressions to convert emphasis fontifiers.
Each element of the list is a list of three elements.
The first element is the character used as a marker for fontification.
@@ -102,15 +160,6 @@ conversions."
:group 'org-export-latex
:type 'alist)
-(defcustom org-export-latex-preamble
- "\\documentclass[11pt,a4paper]{article}
-\\usepackage[utf8]{inputenc}
-\\usepackage[T1]{fontenc}
-\\usepackage{hyperref}"
- "Preamble to be inserted at the very beginning of the LaTeX export."
- :group 'org-export-latex
- :type 'string)
-
(defcustom org-export-latex-title-command "\\maketitle"
"The command used to insert the title just after \\begin{document}.
If this string contains the formatting specification \"%s\" then
@@ -119,7 +168,7 @@ argument."
:group 'org-export-latex
:type 'string)
-(defcustom org-export-latex-date-format
+(defcustom org-export-latex-date-format
"%d %B %Y"
"Format string for \\date{...}."
:group 'org-export-latex
@@ -130,14 +179,15 @@ argument."
:group 'org-export-latex
:type 'boolean)
-(defcustom org-export-latex-packages-alist nil
- "Alist of packages to be inserted in the preamble.
-Each cell is of the forma \( option . package \).
-
-For example:
+(defcustom org-export-latex-tables-column-borders nil
+ "When non-nil, group of columns are surrounded with borders,
+XSeven if these borders are the outside borders of the table."
+ :group 'org-export-latex
+ :type 'boolean)
-\(setq org-export-latex-packages-alist
- '((\"french\" \"babel\"))"
+(defcustom org-export-latex-packages-alist nil
+ "Alist of packages to be inserted in the header.
+Each cell is of the forma \( \"option\" . \"package\" \)."
:group 'org-export-latex
:type 'alist)
@@ -167,17 +217,42 @@ Don't remove the keys, just change their values."
(defcustom org-export-latex-image-default-option "width=10em"
"Default option for images."
:group 'org-export-latex
- :type '(string))
+ :type 'string)
(defcustom org-export-latex-coding-system nil
"Coding system for the exported LaTex file."
:group 'org-export-latex
:type 'coding-system)
-;; FIXME Do we want this one?
-;; (defun org-export-as-latex-and-open (arg) ...)
+(defcustom org-list-radio-list-templates
+ '((latex-mode "% BEGIN RECEIVE ORGLST %n
+% END RECEIVE ORGLST %n
+\\begin{comment}
+#+ORGLST: SEND %n org-list-to-latex
+| | |
+\\end{comment}\n")
+ (texinfo-mode "@c BEGIN RECEIVE ORGLST %n
+@c END RECEIVE ORGLST %n
+@ignore
+#+ORGLST: SEND %n org-list-to-texinfo
+| | |
+@end ignore\n")
+ (html-mode "<!-- BEGIN RECEIVE ORGLST %n -->
+<!-- END RECEIVE ORGLST %n -->
+<!--
+#+ORGLST: SEND %n org-list-to-html
+| | |
+-->\n"))
+ "Templates for radio lists in different major modes.
+All occurrences of %n in a template will be replaced with the name of the
+list, obtained by prompting the user."
+ :group 'org-plain-lists
+ :type '(repeat
+ (list (symbol :tag "Major mode")
+ (string :tag "Format"))))
;;; Autoload functions:
+
;;;###autoload
(defun org-export-as-latex-batch ()
"Call `org-export-as-latex', may be used in batch processing as
@@ -199,7 +274,7 @@ No file is created. The prefix ARG is passed through to `org-export-as-latex'."
(defun org-replace-region-by-latex (beg end)
"Replace the region from BEG to END with its LaTeX export.
It assumes the region has `org-mode' syntax, and then convert it to
-LaTeX. This can be used in any buffer. For example, you could
+LaTeX. This can be used in any buffer. For example, you could
write an itemized list in `org-mode' syntax in an LaTeX buffer and
then use this command to convert it."
(interactive "r")
@@ -255,7 +330,21 @@ in a window. A non-interactive call will only retunr the buffer."
;;;###autoload
(defun org-export-as-latex (arg &optional hidden ext-plist
to-buffer body-only)
- "Export current buffer to a LaTeX file."
+ "Export current buffer to a LaTeX file.
+If there is an active region, export only the region. The prefix
+ARG specifies how many levels of the outline should become
+headlines. The default is 3. Lower levels will be exported
+depending on `org-export-latex-low-levels'. The default is to
+convert them as description lists. When HIDDEN is non-nil, don't
+display the LaTeX buffer. EXT-PLIST is a property list with
+external parameters overriding org-mode's default settings, but
+still inferior to file-local settings. When TO-BUFFER is
+non-nil, create a buffer with that name and export to that
+buffer. If TO-BUFFER is the symbol `string', don't leave any
+buffer behind but just return the resulting LaTeX as a string.
+When BODY-ONLY is set, don't produce the file header and footer,
+simply return the content of \begin{document}...\end{document},
+without even the \begin{document} and \end{document} commands."
(interactive "P")
;; Make sure we have a file name when we need it.
(when (and (not (or to-buffer body-only))
@@ -268,9 +357,23 @@ in a window. A non-interactive call will only retunr the buffer."
(message "Exporting to LaTeX...")
(org-update-radio-target-regexp)
- (org-export-latex-set-initial-vars ext-plist)
+ (org-export-latex-set-initial-vars ext-plist arg)
(let* ((wcf (current-window-configuration))
- (opt-plist org-latex-options-plist)
+ (opt-plist org-export-latex-options-plist)
+ (region-p (org-region-active-p))
+ (subtree-p
+ (when region-p
+ (save-excursion
+ (goto-char (region-beginning))
+ (and (org-at-heading-p)
+ (>= (org-end-of-subtree t t) (region-end))))))
+ (title (or (and subtree-p (org-export-get-title-from-subtree))
+ (plist-get opt-plist :title)
+ (and (not
+ (plist-get opt-plist :skip-before-1st-heading))
+ (org-export-grab-title-from-buffer))
+ (file-name-sans-extension
+ (file-name-nondirectory buffer-file-name))))
(filename (concat (file-name-as-directory
(org-export-directory :LaTeX ext-plist))
(file-name-sans-extension
@@ -286,10 +389,11 @@ in a window. A non-interactive call will only retunr the buffer."
"*Org LaTeX Export*"))
(t (get-buffer-create to-buffer)))
(find-file-noselect filename)))
- (region-p (org-region-active-p))
(odd org-odd-levels-only)
- (preamble (org-export-latex-make-preamble opt-plist))
- (skip (plist-get opt-plist :skip-before-1st-heading))
+ (header (org-export-latex-make-header title opt-plist))
+ (skip (if subtree-p nil
+ ;; never skip first lines when exporting a subtree
+ (plist-get opt-plist :skip-before-1st-heading)))
(text (plist-get opt-plist :text))
(first-lines (if skip "" (org-export-latex-first-lines)))
(coding-system (and (boundp 'buffer-file-coding-system)
@@ -310,19 +414,21 @@ in a window. A non-interactive call will only retunr the buffer."
:skip-before-1st-heading skip
:LaTeX-fragments nil)))
- (set-buffer buffer)
+ (set-buffer buffer)
(erase-buffer)
(and (fboundp 'set-buffer-file-coding-system)
(set-buffer-file-coding-system coding-system-for-write))
- ;; insert the preamble and initial document commands
+ ;; insert the header and initial document commands
(unless (or (eq to-buffer 'string) body-only)
- (insert preamble))
+ (insert header))
;; insert text found in #+TEXT
(when (and text (not (eq to-buffer 'string)))
- (insert (org-export-latex-content text) "\n\n"))
+ (insert (org-export-latex-content
+ text '(lists tables fixed-width keywords))
+ "\n\n"))
;; insert lines before the first headline
(unless (or skip (eq to-buffer 'string))
@@ -342,7 +448,7 @@ in a window. A non-interactive call will only retunr the buffer."
(when (re-search-forward "^\\(\\*+\\) " nil t)
(let* ((asters (length (match-string 1)))
(level (if odd (- asters 2) (- asters 1))))
- (setq org-latex-add-level
+ (setq org-export-latex-add-level
(if odd (1- (/ (1+ asters) 2)) (1- asters)))
(org-export-latex-parse-global level odd)))))
@@ -358,16 +464,16 @@ in a window. A non-interactive call will only retunr the buffer."
(current-buffer))
(set-window-configuration wcf))))
-
;;; Parsing functions:
+
(defun org-export-latex-parse-global (level odd)
"Parse the current buffer recursively, starting at LEVEL.
If ODD is non-nil, assume the buffer only contains odd sections.
-Return A list reflecting the document structure."
+Return a list reflecting the document structure."
(save-excursion
(goto-char (point-min))
(let* ((cnt 0) output
- (depth org-latex-sectioning-depth))
+ (depth org-export-latex-sectioning-depth))
(while (re-search-forward
(concat "^\\(\\(?:\\*\\)\\{"
(number-to-string (+ (if odd 2 1) level))
@@ -404,57 +510,11 @@ Return A list reflecting the document structure."
`(occur . ,cnt)
`(heading . ,heading)
`(content . ,(org-export-latex-parse-content))
- `(subcontent . ,(org-export-latex-parse-subcontent
+ `(subcontent . ,(org-export-latex-parse-subcontent
level odd)))))))
(widen)))
(list output))))
-(defun org-export-latex-parse-list (&optional delete)
- "Parse the list at point.
-Return a list containing first level items as strings and
-sublevels as list of strings."
- (let ((start (point))
- ;; Find the end of the list
- (end (save-excursion
- (catch 'exit
- (while (or (looking-at org-export-latex-list-beginning-re)
- (looking-at "^[ \t]+\\|^$"))
- (if (eq (point) (point-max))
- (throw 'exit (point-max)))
- (forward-line 1))) (point)))
- output itemsep)
- (while (re-search-forward org-export-latex-list-beginning-re end t)
- (setq itemsep (if (save-match-data
- (string-match "^[0-9]" (match-string 2)))
- "[0-9]+\\(?:\\.\\|)\\)" "[-+]"))
- (let* ((indent1 (match-string 1))
- (nextitem (save-excursion
- (save-match-data
- (or (and (re-search-forward
- (concat "^" indent1 itemsep " *?") end t)
- (match-beginning 0)) end))))
- (item (buffer-substring
- (point)
- (or (and (re-search-forward
- org-export-latex-list-beginning-re end t)
- (goto-char (match-beginning 0)))
- (goto-char end))))
- (nextindent (match-string 1))
- (item (org-trim item))
- (item (if (string-match "^\\[.+\\]" item)
- (replace-match "\\\\texttt{\\&}"
- t nil item) item)))
- (push item output)
- (when (> (length nextindent)
- (length indent1))
- (narrow-to-region (point) nextitem)
- (push (org-export-latex-parse-list) output)
- (widen))))
- (when delete (delete-region start end))
- (setq output (nreverse output))
- (push (if (string-match "^\\[0" itemsep)
- 'ordered 'unordered) output)))
-
(defun org-export-latex-parse-content ()
"Extract the content of a section."
(let ((beg (point))
@@ -487,7 +547,7 @@ CONTENT is an element of the list produced by
"Export the list SUBCONTENT to LaTeX.
SUBCONTENT is an alist containing information about the headline
and its content."
- (let ((num (plist-get org-latex-options-plist :section-numbers)))
+ (let ((num (plist-get org-export-latex-options-plist :section-numbers)))
(mapc (lambda(x) (org-export-latex-subcontent x num)) subcontent)))
(defun org-export-latex-subcontent (subcontent num)
@@ -495,20 +555,20 @@ and its content."
(let ((heading (org-export-latex-fontify-headline
(cdr (assoc 'heading subcontent))))
(level (- (cdr (assoc 'level subcontent))
- org-latex-add-level))
+ org-export-latex-add-level))
(occur (number-to-string (cdr (assoc 'occur subcontent))))
(content (cdr (assoc 'content subcontent)))
(subcontent (cadr (assoc 'subcontent subcontent))))
- (cond
+ (cond
;; Normal conversion
- ((<= level org-latex-sectioning-depth)
- (let ((sec (assoc level org-export-latex-sectioning-alist)))
- (insert (format (if num (cadr sec) (caddr sec)) heading) "\n"))
+ ((<= level org-export-latex-sectioning-depth)
+ (let ((sec (nth (1- level) org-export-latex-sectioning)))
+ (insert (format (if num (car sec) (cdr sec)) heading) "\n"))
(insert (org-export-latex-content content))
(cond ((stringp subcontent) (insert subcontent))
((listp subcontent) (org-export-latex-sub subcontent))))
;; At a level under the hl option: we can drop this subsection
- ((> level org-latex-sectioning-depth)
+ ((> level org-export-latex-sectioning-depth)
(cond ((eq org-export-latex-low-levels 'description)
(insert (format "\\begin{description}\n\n\\item[%s]\n\n" heading))
(insert (org-export-latex-content content))
@@ -521,52 +581,47 @@ and its content."
(cond ((stringp subcontent) (insert subcontent))
((listp subcontent) (org-export-latex-sub subcontent)))))))))
-
;;; Exporting internals:
-(defun org-export-latex-protect-string (string)
- "Prevent further conversion for STRING by adding the
-org-protect property."
- (add-text-properties
- 0 (length string) '(org-protected t) string) string)
-
-(defun org-export-latex-protect-char-in-string (char-list string)
- "Add org-protected text-property to char from CHAR-LIST in STRING."
- (with-temp-buffer
- (save-match-data
- (insert string)
- (goto-char (point-min))
- (while (re-search-forward (regexp-opt char-list) nil t)
- (add-text-properties (match-beginning 0)
- (match-end 0) '(org-protected t)))
- (buffer-string))))
-
-(defun org-export-latex-set-initial-vars (ext-plist)
+(defun org-export-latex-set-initial-vars (ext-plist level)
"Store org local variables required for LaTeX export.
-EXT-PLIST is an optional additional plist."
- (setq org-latex-todo-keywords-1 org-todo-keywords-1
- org-latex-all-targets-regexp
+EXT-PLIST is an optional additional plist.
+LEVEL indicates the default depth for export."
+ (setq org-export-latex-todo-keywords-1 org-todo-keywords-1
+ org-export-latex-all-targets-re
(org-make-target-link-regexp (org-all-targets))
- org-latex-options-plist
+ org-export-latex-options-plist
(org-combine-plists (org-default-export-plist) ext-plist
(org-infile-export-plist))
- org-latex-sectioning-depth
- (let ((hl-levels (plist-get org-latex-options-plist :headline-levels))
- (sec-depth (length org-export-latex-sectioning-alist)))
- ;; Fall back on org-export-latex-sectioning-alist length if
- ;; headline-levels goes beyond it
- (if (> hl-levels sec-depth) sec-depth hl-levels))))
-
-(defun org-export-latex-make-preamble (opt-plist)
- "Make the LaTeX preamble and return it as a string.
-Argument OPT-PLIST is the options plist for current buffer."
- (let ((toc (plist-get opt-plist :table-of-contents)))
- (concat
+ org-export-latex-class
+ (save-excursion
+ (goto-char (point-min))
+ (if (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([a-zA-Z]+\\)" nil t)
+ (assoc (match-string 1) org-export-latex-classes))
+ (match-string 1)
+ org-export-latex-default-class))
+ org-export-latex-header
+ (cadr (assoc org-export-latex-class org-export-latex-classes))
+ org-export-latex-sectioning
+ (cddr (assoc org-export-latex-class org-export-latex-classes))
+ org-export-latex-sectioning-depth
+ (or level
+ (let ((hl-levels
+ (plist-get org-export-latex-options-plist :headline-levels))
+ (sec-depth (length org-export-latex-sectioning)))
+ (if (> hl-levels sec-depth) sec-depth hl-levels)))))
+
+(defun org-export-latex-make-header (title opt-plist)
+ "Make the LaTeX header and return it as a string.
+TITLE is the current title from the buffer or region.
+OPT-PLIST is the options plist for current buffer."
+ (let ((toc (plist-get opt-plist :table-of-contents))
+ (author (plist-get opt-plist :author)))
+ (concat
(if (plist-get opt-plist :time-stamp-file)
(format-time-string "% Created %Y-%m-%d %a %H:%M\n"))
-
- ;; insert LaTeX custom preamble
- org-export-latex-preamble "\n"
-
+ ;; insert LaTeX custom header
+ org-export-latex-header
+ "\n"
;; insert information on LaTeX packages
(when org-export-latex-packages-alist
(mapconcat (lambda(p)
@@ -575,46 +630,34 @@ Argument OPT-PLIST is the options plist for current buffer."
(format "\\usepackage[%s]{%s}"
(car p) (cadr p))))
org-export-latex-packages-alist "\n"))
-
+ ;; insert additional commands in the header
+ org-export-latex-append-header
;; insert the title
- (format
- "\\title{%s}\n"
+ (format
+ "\n\n\\title{%s}\n"
;; convert the title
(org-export-latex-content
- (or (plist-get opt-plist :title)
- (and (not
- (plist-get opt-plist :skip-before-1st-heading))
- (org-export-grab-title-from-buffer))
- (and buffer-file-name
- (file-name-sans-extension
- (file-name-nondirectory buffer-file-name)))
- "UNTITLED")))
-
+ title '(lists tables fixed-width keywords)))
;; insert author info
(if (plist-get opt-plist :author-info)
- (format "\\author{%s}\n"
- (or (plist-get opt-plist :author) user-full-name))
+ (format "\\author{%s}\n"
+ (or author user-full-name))
(format "%%\\author{%s}\n"
- (or (plist-get opt-plist :author) user-full-name)))
-
+ (or author user-full-name)))
;; insert the date
(format "\\date{%s}\n"
- (format-time-string
+ (format-time-string
(or (plist-get opt-plist :date)
org-export-latex-date-format)))
-
;; beginning of the document
"\n\\begin{document}\n\n"
-
;; insert the title command
(if (string-match "%s" org-export-latex-title-command)
- (format org-export-latex-title-command
- (plist-get opt-plist :title))
+ (format org-export-latex-title-command title)
org-export-latex-title-command)
"\n\n"
-
;; table of contents
- (when (and org-export-with-toc
+ (when (and org-export-with-toc
(plist-get opt-plist :section-numbers))
(cond ((numberp toc)
(format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n"
@@ -628,8 +671,9 @@ COMMENTS is either nil to replace them with the empty string or a
formatting string like %%%%s if we want to comment them out."
(save-excursion
(goto-char (point-min))
+ (if (org-at-heading-p) (beginning-of-line 2))
(let* ((pt (point))
- (end (if (and (re-search-forward "^\\*" nil t)
+ (end (if (and (re-search-forward "^\\* " nil t)
(not (eq pt (match-beginning 0))))
(goto-char (match-beginning 0))
(goto-char (point-max)))))
@@ -643,10 +687,58 @@ formatting string like %%%%s if we want to comment them out."
:skip-before-1st-heading nil
:LaTeX-fragments nil)))))
+(defun org-export-latex-content (content &optional exclude-list)
+ "Convert CONTENT string to LaTeX.
+Don't perform conversions that are in EXCLUDE-LIST. Recognized
+conversion types are: quotation-marks, emphasis, sub-superscript,
+links, keywords, lists, tables, fixed-width"
+ (with-temp-buffer
+ (insert content)
+ (unless (memq 'quotation-marks exclude-list)
+ (org-export-latex-quotation-marks))
+ (unless (memq 'emphasis exclude-list)
+ (when (plist-get org-export-latex-options-plist :emphasize)
+ (org-export-latex-fontify)))
+ (unless (memq 'sub-superscript exclude-list)
+ (org-export-latex-special-chars
+ (plist-get org-export-latex-options-plist :sub-superscript)))
+ (unless (memq 'links exclude-list)
+ (org-export-latex-links))
+ (unless (memq 'keywords exclude-list)
+ (org-export-latex-keywords
+ (plist-get org-export-latex-options-plist :timestamps)))
+ (unless (memq 'lists exclude-list)
+ (org-export-latex-lists))
+ (unless (memq 'tables exclude-list)
+ (org-export-latex-tables
+ (plist-get org-export-latex-options-plist :tables)))
+ (unless (memq 'fixed-width exclude-list)
+ (org-export-latex-fixed-width
+ (plist-get org-export-latex-options-plist :fixed-width)))
+ ;; return string
+ (buffer-substring (point-min) (point-max))))
+
+(defun org-export-latex-protect-string (s)
+ "Prevent further conversion for string S by adding the
+org-protect property."
+ (add-text-properties 0 (length s) '(org-protected t) s) s)
+
+(defun org-export-latex-protect-char-in-string (char-list string)
+ "Add org-protected text-property to char from CHAR-LIST in STRING."
+ (with-temp-buffer
+ (save-match-data
+ (insert string)
+ (goto-char (point-min))
+ (while (re-search-forward (regexp-opt char-list) nil t)
+ (add-text-properties (match-beginning 0)
+ (match-end 0) '(org-protected t)))
+ (buffer-string))))
+
(defun org-export-latex-keywords-maybe (remove-list)
"Maybe remove keywords depending on rules in REMOVE-LIST."
(goto-char (point-min))
- (let ((re-todo (mapconcat 'identity org-latex-todo-keywords-1 "\\|")))
+ (let ((re-todo (mapconcat 'identity org-export-latex-todo-keywords-1 "\\|"))
+ (case-fold-search nil))
;; convert TODO keywords
(when (re-search-forward (concat "^\\(" re-todo "\\)") nil t)
(if (plist-get remove-list :todo)
@@ -664,48 +756,25 @@ formatting string like %%%%s if we want to comment them out."
(replace-match "")
(replace-match (format "\\texttt{%s}" (match-string 0)) t t)))))
-(defun org-export-latex-fontify-headline (headline)
- "Fontify special words in a HEADLINE."
+(defun org-export-latex-fontify-headline (string)
+ "Fontify special words in string."
(with-temp-buffer
;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at
;; the beginning of the buffer - inserting "\n" is safe here though.
- (insert "\n" headline)
+ (insert "\n" string)
(goto-char (point-min))
- (when (plist-get org-latex-options-plist :emphasize)
+ (when (plist-get org-export-latex-options-plist :emphasize)
(org-export-latex-fontify))
(org-export-latex-special-chars
- (plist-get org-latex-options-plist :sub-superscript))
+ (plist-get org-export-latex-options-plist :sub-superscript))
(org-export-latex-keywords-maybe
org-export-latex-remove-from-headlines)
(org-export-latex-links)
(org-trim (buffer-substring-no-properties (point-min) (point-max)))))
-(defun org-export-latex-content (content)
- "Convert CONTENT string to LaTeX."
- (with-temp-buffer
- (insert content)
- (org-export-latex-quotation-marks)
- (when (plist-get org-latex-options-plist :emphasize)
- (org-export-latex-fontify))
- (org-export-latex-special-chars
- (plist-get org-latex-options-plist :sub-superscript))
- (org-export-latex-links)
- (org-export-latex-keywords
- (plist-get org-latex-options-plist :timestamps))
- (org-export-latex-lists)
- (org-export-latex-tables
- (plist-get org-latex-options-plist :tables))
- (org-export-latex-fixed-width
- (plist-get org-latex-options-plist :fixed-width))
- ;; return string
- (buffer-substring (point-min) (point-max))))
-
(defun org-export-latex-quotation-marks ()
- "Export question marks depending on language conventions.
-Local definition of the language overrides
-`org-export-latex-quotation-marks-convention' which overrides
-`org-export-default-language'."
- (let* ((lang (plist-get org-latex-options-plist :language))
+ "Export question marks depending on language conventions."
+ (let* ((lang (plist-get org-export-latex-options-plist :language))
(quote-rpl (if (equal lang "fr")
'(("\\(\\s-\\)\"" "«~")
("\\(\\S-\\)\"" "~»")
@@ -720,21 +789,6 @@ Local definition of the language overrides
(org-if-unprotected
(replace-match rpl t t))))) quote-rpl)))
-;; | chars/string in Org | normal environment | math environment |
-;; |-----------------------+-----------------------+-----------------------|
-;; | & # % $ | \& \# \% \$ | \& \# \% \$ |
-;; | { } _ ^ \ | \{ \} \_ \^ \\ | { } _ ^ \ |
-;; |-----------------------+-----------------------+-----------------------|
-;; | a_b and a^b | $a_b$ and $a^b$ | a_b and a^b |
-;; | a_abc and a_{abc} | $a_a$bc and $a_{abc}$ | a_abc and a_{abc} |
-;; | \tau and \mu | $\tau$ and $\mu$ | \tau and \mu |
-;; |-----------------------+-----------------------+-----------------------|
-;; | \_ \^ | \_ \^ | \_ \^ |
-;; | \(a=\mu\mbox{m}\) | \(a=\mu\mbox{m}\) | \(a=\mu\mbox{m}\) |
-;; | \[\beta^2-a=0\] | \[\beta^2-a=0\] | \[\beta^2-a=0\] |
-;; | $x=22\tau$ | $x=22\tau$ | $x=22\tau$ |
-;; | $$\alpha=\sqrt{a^3}$$ | $$\alpha=\sqrt{a^3}$$ | $$\alpha=\sqrt{a^3}$$ |
-
(defun org-export-latex-special-chars (sub-superscript)
"Export special characters to LaTeX.
If SUB-SUPERSCRIPT is non-nil, convert \\ and ^.
@@ -744,7 +798,8 @@ See the `org-export-latex.el' code for a complete conversion table."
(goto-char (point-min))
(while (re-search-forward c nil t)
;; Put the point where to check for org-protected
- (unless (get-text-property (match-beginning 2) 'org-protected)
+ (unless (or (get-text-property (match-beginning 2) 'org-protected)
+ (org-at-table-p))
(cond ((member (match-string 2) '("\\$" "$"))
(if (equal (match-string 2) "\\$")
(replace-match (concat (match-string 1) "$"
@@ -756,11 +811,15 @@ See the `org-export-latex.el' code for a complete conversion table."
(replace-match (match-string 2) t t)
(replace-match (concat (match-string 1) "\\"
(match-string 2)) t t)))
+ ((equal (match-string 2) "...")
+ (replace-match
+ (concat (match-string 1)
+ (org-export-latex-protect-string "\\ldots{}")) t t))
((equal (match-string 2) "~")
(cond ((equal (match-string 1) "\\") nil)
((eq 'org-link (get-text-property 0 'face (match-string 2)))
(replace-match (concat (match-string 1) "\\~") t t))
- (t (replace-match
+ (t (replace-match
(org-export-latex-protect-string
(concat (match-string 1) "\\~{}")) t t))))
((member (match-string 2) '("{" "}"))
@@ -791,6 +850,7 @@ See the `org-export-latex.el' code for a complete conversion table."
"\\(.\\|^\\)\\({\\)"
"\\(.\\|^\\)\\(}\\)"
"\\(.\\|^\\)\\(~\\)"
+ "\\(.\\|^\\)\\(\\.\\.\\.\\)"
;; (?\< . "\\textless{}")
;; (?\> . "\\textgreater{}")
)))
@@ -812,7 +872,7 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER."
(cond ((eq 1 (length string-after))
(concat string-before char string-after))
((string-match "[({]?\\([^)}]+\\)[)}]?" string-after)
- (format "%s%s{%s}" string-before char
+ (format "%s%s{%s}" string-before char
(match-string 1 string-after))))))
((and subsup
(> (length string-after) 1)
@@ -842,7 +902,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(string-match "^[ \t\n]" string-after)))
;; backslash might escape a character (like \#) or a user TeX
;; macro (like \setcounter)
- (org-export-latex-protect-string
+ (org-export-latex-protect-string
(concat string-before "\\" string-after)))
((and (string-match "^[ \t\n]" string-after)
(string-match "[ \t\n]\\'" string-before))
@@ -854,19 +914,18 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(defun org-export-latex-keywords (timestamps)
"Convert special keywords to LaTeX.
-Regexps are those from `org-latex-special-string-regexps'."
- (let ((rg org-latex-special-string-regexps) r)
+Regexps are those from `org-export-latex-special-string-regexps'."
+ (let ((rg org-export-latex-special-string-regexps) r)
(while (setq r (pop rg))
(goto-char (point-min))
(while (re-search-forward (eval r) nil t)
(if (not timestamps)
(replace-match (format "\\\\texttt{%s}" (match-string 0)) t)
(replace-match ""))))))
-
+
(defun org-export-latex-fixed-width (opt)
"When OPT is non-nil convert fixed-width sections to LaTeX."
(goto-char (point-min))
- ;; FIXME the search shouldn't be performed on already converted text
(while (re-search-forward "^[ \t]*:" nil t)
(if opt
(progn (goto-char (match-beginning 0))
@@ -882,73 +941,6 @@ Regexps are those from `org-latex-special-string-regexps'."
(match-string 2)) t t)
(forward-line))))))
-(defun org-export-latex-lists ()
- "Convert lists to LaTeX."
- (goto-char (point-min))
- (while (re-search-forward org-export-latex-list-beginning-re nil t)
- (beginning-of-line)
- (org-export-list-to-latex
- (org-export-latex-parse-list t))))
-
-(defun org-export-list-to-generic (list params)
- "Convert a LIST parsed through `org-export-latex-parse-list' to other formats.
-
-Valid parameters are
-
-:ustart String to start an unordered list
-:uend String to end an unordered list
-
-:ostart String to start an ordered list
-:oend String to end an ordered list
-
-:splice When set to t, return only list body lines, don't wrap
- them into :[u/o]start and :[u/o]end. Default is nil.
-
-:istart String to start a list item
-:iend String to end a list item
-:isep String to separate items
-:lsep String to separate sublists"
- (interactive)
- (let* ((p params) sublist
- (splicep (plist-get p :splice))
- (ostart (plist-get p :ostart))
- (oend (plist-get p :oend))
- (ustart (plist-get p :ustart))
- (uend (plist-get p :uend))
- (istart (plist-get p :istart))
- (iend (plist-get p :iend))
- (isep (plist-get p :isep))
- (lsep (plist-get p :lsep)))
- (let ((wrapper
- (cond ((eq (car list) 'ordered)
- (concat ostart "\n%s" oend "\n"))
- ((eq (car list) 'unordered)
- (concat ustart "\n%s" uend "\n"))))
- rtn)
- (while (setq sublist (pop list))
- (cond ((symbolp sublist) nil)
- ((stringp sublist)
- (setq rtn (concat rtn istart sublist iend isep)))
- (t
- (setq rtn (concat rtn ;; previous list
- lsep ;; list separator
- (org-export-list-to-generic sublist p)
- lsep ;; list separator
- )))))
- (format wrapper rtn))))
-
-(defun org-export-list-to-latex (list)
- "Convert LIST into a LaTeX list."
- (insert
- (org-export-list-to-generic
- list '(:splicep nil :ostart "\\begin{enumerate}" :oend "\\end{enumerate}"
- :ustart "\\begin{itemize}" :uend "\\end{itemize}"
- :istart "\\item " :iend ""
- :isep "\n" :lsep "\n"))
- ;; Add a trailing \n after list conversion
- "\n"))
-
-;; FIXME Use org-export-highlight-first-table-line ?
(defun org-export-latex-tables (insert)
"Convert tables to LaTeX and INSERT it."
(goto-char (point-min))
@@ -975,7 +967,7 @@ Valid parameters are
(unless (string-match "^[ \t]*|-" line)
(setq fields (org-split-string line "[ \t]*|[ \t]*"))
(setq fnum (make-vector (length fields) 0))
- (setq line-fmt
+ (setq line-fmt
(mapconcat
(lambda (x)
(setq gr (pop org-table-colgroup-info))
@@ -991,18 +983,21 @@ Valid parameters are
(progn (setq colgropen nil) "|")
"")))
fnum ""))))
+ ;; fix double || in line-fmt
+ (setq line-fmt (replace-regexp-in-string "||" "|" line-fmt))
;; maybe remove the first and last "|"
- (when (string-match "^\\(|\\)?\\(.+\\)|$" line-fmt)
+ (when (and (not org-export-latex-tables-column-borders)
+ (string-match "^\\(|\\)?\\(.+\\)|$" line-fmt))
(setq line-fmt (match-string 2 line-fmt)))
;; format alignment
- (setq align (apply 'format
+ (setq align (apply 'format
(cons line-fmt
(mapcar (lambda (x) (if x "r" "l"))
org-table-last-alignment))))
;; prepare the table to send to orgtbl-to-latex
(setq lines
(mapcar
- (lambda(elem)
+ (lambda(elem)
(or (and (string-match "[ \t]*|-+" elem) 'hline)
(split-string (org-trim elem) "|" t)))
lines))
@@ -1016,8 +1011,8 @@ Valid parameters are
(goto-char (point-min))
(while (re-search-forward org-emph-re nil t)
;; The match goes one char after the *string*
- (let ((emph (assoc (match-string 3)
- org-export-latex-emphasis-alist))
+ (let ((emph (assoc (match-string 3)
+ org-export-latex-emphasis-alist))
rpl)
(unless (get-text-property (1- (point)) 'org-protected)
(setq rpl (concat (match-string 1)
@@ -1025,7 +1020,7 @@ Valid parameters are
'("\\" "{" "}") (cadr emph))
(match-string 4))
(match-string 5)))
- (if (caddr emph)
+ (if (caddr emph)
(setq rpl (org-export-latex-protect-string rpl)))
(replace-match rpl t t)))
(backward-char)))
@@ -1038,7 +1033,7 @@ Valid parameters are
(while (re-search-forward org-bracket-link-analytic-regexp nil t)
(org-if-unprotected
(goto-char (match-beginning 0))
- (let* ((re-radio org-latex-all-targets-regexp)
+ (let* ((re-radio org-export-latex-all-targets-re)
(remove (list (match-beginning 0) (match-end 0)))
(type (match-string 2))
(raw-path (match-string 3))
@@ -1063,23 +1058,22 @@ Valid parameters are
(if (file-exists-p raw-path)
(concat type "://" (expand-file-name raw-path))
(concat type "://" (org-export-directory
- :LaTeX org-latex-options-plist)
+ :LaTeX org-export-latex-options-plist)
raw-path))))))))
;; process with link inserting
(apply 'delete-region remove)
- (cond ((and imgp (plist-get org-latex-options-plist :inline-images))
+ (cond ((and imgp (plist-get org-export-latex-options-plist :inline-images))
(insert (format "\\includegraphics[%s]{%s}"
;; image option should be set be a comment line
org-export-latex-image-default-option
(expand-file-name raw-path))))
- ;; FIXME: what about caption? image properties?
(radiop (insert (format "\\hyperref[%s]{%s}" raw-path desc)))
(path (insert (format "\\href{%s}{%s}" path desc)))
(t (insert "\\texttt{" desc "}")))))))
-(defun org-export-latex-cleaned-string
- ;; FIXME remove commentsp call in org.el and here
- (&optional commentsp)
+(defvar org-latex-entities) ; defined below
+
+(defun org-export-latex-cleaned-string ()
"Clean stuff in the LaTeX export."
;; Preserve line breaks
@@ -1092,7 +1086,7 @@ Valid parameters are
(goto-char (point-min))
(let ((case-fold-search nil) rpl)
(while (re-search-forward "\\([^+_]\\)LaTeX" nil t)
- (replace-match (org-export-latex-protect-string
+ (replace-match (org-export-latex-protect-string
(concat (match-string 1) "\\LaTeX{}")) t t)))
;; Convert horizontal rules
@@ -1100,19 +1094,25 @@ Valid parameters are
(while (re-search-forward "^----+.$" nil t)
(replace-match (org-export-latex-protect-string "\\hrule") t t))
- ;; Protect LaTeX \commands{...}
+ ;; Protect LaTeX commands like \commad[...]{...} or \command{...}
(goto-char (point-min))
(while (re-search-forward "\\\\[a-zA-Z]+\\(?:\\[.*\\]\\)?{.*}" nil t)
(add-text-properties (match-beginning 0) (match-end 0)
'(org-protected t)))
+ ;; Protect LaTeX entities
+ (goto-char (point-min))
+ (while (re-search-forward (regexp-opt org-latex-entities) nil t)
+ (add-text-properties (match-beginning 0) (match-end 0)
+ '(org-protected t)))
+
;; Replace radio links
(goto-char (point-min))
(while (re-search-forward
- (concat "<<<?" org-latex-all-targets-regexp
+ (concat "<<<?" org-export-latex-all-targets-re
">>>?\\((INVISIBLE)\\)?") nil t)
(replace-match
- (org-export-latex-protect-string
+ (org-export-latex-protect-string
(format "\\label{%s}%s"(match-string 1)
(if (match-string 2) "" (match-string 1)))) t t))
@@ -1124,7 +1124,7 @@ Valid parameters are
;; When converting to LaTeX, replace footnotes
;; FIXME: don't protect footnotes from conversion
- (when (plist-get org-latex-options-plist :footnotes)
+ (when (plist-get org-export-latex-options-plist :footnotes)
(goto-char (point-min))
(while (re-search-forward "\\[[0-9]+\\]" nil t)
(when (save-match-data
@@ -1134,34 +1134,402 @@ Valid parameters are
(foot-end (match-end 0))
(foot-prefix (match-string 0))
footnote footnote-rpl)
- (when (and (re-search-forward (regexp-quote foot-prefix) nil t))
- (replace-match "")
- (let ((end (save-excursion
- (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t)
- (match-beginning 0) (point-max)))))
- (setq footnote
- (concat
- (org-trim (buffer-substring (point) end))
- ;; FIXME stupid workaround for cases where
- ;; `org-bracket-link-analytic-regexp' matches
- ;; }. as part of the link.
- " "))
- (delete-region (point) end)))
- (goto-char foot-beg)
- (delete-region foot-beg foot-end)
- (setq footnote-rpl (format "\\footnote{%s}" footnote))
- (add-text-properties 0 10 '(org-protected t) footnote-rpl)
- (add-text-properties (1- (length footnote-rpl))
- (length footnote-rpl)
- '(org-protected t) footnote-rpl)
- (insert footnote-rpl))))
-
+ (save-excursion
+ (when (search-forward foot-prefix nil t)
+ (replace-match "")
+ (let ((end (save-excursion
+ (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t)
+ (match-beginning 0) (point-max)))))
+ (setq footnote (concat (org-trim (buffer-substring (point) end))
+ " ")) ; prevent last } being part of a link
+ (delete-region (point) end))
+ (goto-char foot-beg)
+ (delete-region foot-beg foot-end)
+ (unless (null footnote)
+ (setq footnote-rpl (format "\\footnote{%s}" footnote))
+ (add-text-properties 0 10 '(org-protected t) footnote-rpl)
+ (add-text-properties (1- (length footnote-rpl))
+ (length footnote-rpl)
+ '(org-protected t) footnote-rpl)
+ (insert footnote-rpl)))))))
+
;; Replace footnote section tag for LaTeX
(goto-char (point-min))
- (while (re-search-forward
+ (while (re-search-forward
(concat "^" footnote-section-tag-regexp) nil t)
(replace-match ""))))
+;;; List handling:
+
+(defun org-export-latex-lists ()
+ "Replace plain text lists in current buffer into LaTeX lists."
+ "Convert lists to LaTeX."
+ (goto-char (point-min))
+ (while (re-search-forward org-export-latex-list-beginning-re nil t)
+ (beginning-of-line)
+ (insert (org-list-to-latex (org-list-parse-list t)) "\n")))
+
+(defun org-list-parse-list (&optional delete)
+ "Parse the list at point.
+Return a list containing first level items as strings and
+sublevels as a list of strings."
+ (let ((start (org-list-item-begin))
+ (end (org-list-end))
+ output itemsep)
+ (while (re-search-forward org-export-latex-list-beginning-re end t)
+ (setq itemsep (if (save-match-data
+ (string-match "^[0-9]" (match-string 2)))
+ "[0-9]+\\(?:\\.\\|)\\)" "[-+]"))
+ (let* ((indent1 (match-string 1))
+ (nextitem (save-excursion
+ (save-match-data
+ (or (and (re-search-forward
+ (concat "^" indent1 itemsep " *?") end t)
+ (match-beginning 0)) end))))
+ (item (buffer-substring
+ (point)
+ (or (and (re-search-forward
+ org-export-latex-list-beginning-re end t)
+ (goto-char (match-beginning 0)))
+ (goto-char end))))
+ (nextindent (match-string 1))
+ (item (org-trim item))
+ (item (if (string-match "^\\[.+\\]" item)
+ (replace-match "\\\\texttt{\\&}"
+ t nil item) item)))
+ (push item output)
+ (when (> (length nextindent)
+ (length indent1))
+ (narrow-to-region (point) nextitem)
+ (push (org-list-parse-list) output)
+ (widen))))
+ (when delete (delete-region start end))
+ (setq output (nreverse output))
+ (push (if (string-match "^\\[0" itemsep)
+ 'ordered 'unordered) output)))
+
+(defun org-list-item-begin ()
+ "Find the beginning of the list item and return its position."
+ (save-excursion
+ (if (not (or (looking-at org-export-latex-list-beginning-re)
+ (re-search-backward
+ org-export-latex-list-beginning-re nil t)))
+ (progn (goto-char (point-min)) (point))
+ (match-beginning 0))))
+
+(defun org-list-end ()
+ "Find the end of the list and return its position."
+ (save-excursion
+ (catch 'exit
+ (while (or (looking-at org-export-latex-list-beginning-re)
+ (looking-at "^[ \t]+\\|^$"))
+ (if (eq (point) (point-max))
+ (throw 'exit (point-max)))
+ (forward-line 1))) (point)))
+
+(defun org-list-insert-radio-list ()
+ "Insert a radio list template appropriate for this major mode."
+ (interactive)
+ (let* ((e (assq major-mode org-list-radio-list-templates))
+ (txt (nth 1 e))
+ name pos)
+ (unless e (error "No radio list setup defined for %s" major-mode))
+ (setq name (read-string "List name: "))
+ (while (string-match "%n" txt)
+ (setq txt (replace-match name t t txt)))
+ (or (bolp) (insert "\n"))
+ (setq pos (point))
+ (insert txt)
+ (goto-char pos)))
+
+(defun org-list-send-list (&optional maybe)
+ "Send a tranformed version of this list to the receiver position.
+With argument MAYBE, fail quietly if no transformation is defined for
+this list."
+ (interactive)
+ (catch 'exit
+ (unless (org-at-item-p) (error "Not at a list"))
+ (save-excursion
+ (goto-char (org-list-item-begin))
+ (beginning-of-line 0)
+ (unless (looking-at "#\\+ORGLST: *SEND +\\([a-zA-Z0-9_]+\\) +\\([^ \t\r\n]+\\)\\( +.*\\)?")
+ (if maybe
+ (throw 'exit nil)
+ (error "Don't know how to transform this list"))))
+ (let* ((name (match-string 1))
+ beg
+ (transform (intern (match-string 2)))
+ (txt (buffer-substring-no-properties
+ (org-list-item-begin)
+ (org-list-end)))
+ (list (org-list-parse-list)))
+ (unless (fboundp transform)
+ (error "No such transformation function %s" transform))
+ (setq txt (funcall transform list))
+ ;; Find the insertion place
+ (save-excursion
+ (goto-char (point-min))
+ (unless (re-search-forward
+ (concat "BEGIN RECEIVE ORGLST +" name "\\([ \t]\\|$\\)") nil t)
+ (error "Don't know where to insert translated list"))
+ (goto-char (match-beginning 0))
+ (beginning-of-line 2)
+ (setq beg (point))
+ (unless (re-search-forward (concat "END RECEIVE ORGLST +" name) nil t)
+ (error "Cannot find end of insertion region"))
+ (beginning-of-line 1)
+ (delete-region beg (point))
+ (goto-char beg)
+ (insert txt "\n"))
+ (message "List converted and installed at receiver location"))))
+
+(defun org-list-to-generic (list params)
+ "Convert a LIST parsed through `org-list-parse-list' to other formats.
+
+Valid parameters are
+
+:ustart String to start an unordered list
+:uend String to end an unordered list
+
+:ostart String to start an ordered list
+:oend String to end an ordered list
+
+:splice When set to t, return only list body lines, don't wrap
+ them into :[u/o]start and :[u/o]end. Default is nil.
+
+:istart String to start a list item
+:iend String to end a list item
+:isep String to separate items
+:lsep String to separate sublists"
+ (interactive)
+ (let* ((p params) sublist
+ (splicep (plist-get p :splice))
+ (ostart (plist-get p :ostart))
+ (oend (plist-get p :oend))
+ (ustart (plist-get p :ustart))
+ (uend (plist-get p :uend))
+ (istart (plist-get p :istart))
+ (iend (plist-get p :iend))
+ (isep (plist-get p :isep))
+ (lsep (plist-get p :lsep)))
+ (let ((wrapper
+ (cond ((eq (car list) 'ordered)
+ (concat ostart "\n%s" oend "\n"))
+ ((eq (car list) 'unordered)
+ (concat ustart "\n%s" uend "\n"))))
+ rtn)
+ (while (setq sublist (pop list))
+ (cond ((symbolp sublist) nil)
+ ((stringp sublist)
+ (setq rtn (concat rtn istart sublist iend isep)))
+ (t
+ (setq rtn (concat rtn ;; previous list
+ lsep ;; list separator
+ (org-list-to-generic sublist p)
+ lsep ;; list separator
+ )))))
+ (format wrapper rtn))))
+
+(defun org-list-to-latex (list)
+ "Convert LIST into a LaTeX list."
+ (org-list-to-generic
+ list '(:splicep nil :ostart "\\begin{enumerate}" :oend "\\end{enumerate}"
+ :ustart "\\begin{itemize}" :uend "\\end{itemize}"
+ :istart "\\item " :iend ""
+ :isep "\n" :lsep "\n")))
+
+(defun org-list-to-html (list)
+ "Convert LIST into a HTML list."
+ (org-list-to-generic
+ list '(:splicep nil :ostart "<ol>" :oend "</ol>"
+ :ustart "<ul>" :uend "</ul>"
+ :istart "<li>" :iend "</li>"
+ :isep "\n" :lsep "\n")))
+
+(defun org-list-to-texinfo (list)
+ "Convert LIST into a Texinfo list."
+ (org-list-to-generic
+ list '(:splicep nil :ostart "@itemize @minus" :oend "@end itemize"
+ :ustart "@enumerate" :uend "@end enumerate"
+ :istart "@item\n" :iend ""
+ :isep "\n" :lsep "\n")))
+
+(defconst org-latex-entities
+ '("\\!"
+ "\\'"
+ "\\+"
+ "\\,"
+ "\\-"
+ "\\:"
+ "\\;"
+ "\\<"
+ "\\="
+ "\\>"
+ "\\Huge"
+ "\\LARGE"
+ "\\Large"
+ "\\Styles"
+ "\\\\"
+ "\\`"
+ "\\addcontentsline"
+ "\\address"
+ "\\addtocontents"
+ "\\addtocounter"
+ "\\addtolength"
+ "\\addvspace"
+ "\\alph"
+ "\\appendix"
+ "\\arabic"
+ "\\author"
+ "\\begin{array}"
+ "\\begin{center}"
+ "\\begin{description}"
+ "\\begin{enumerate}"
+ "\\begin{eqnarray}"
+ "\\begin{equation}"
+ "\\begin{figure}"
+ "\\begin{flushleft}"
+ "\\begin{flushright}"
+ "\\begin{itemize}"
+ "\\begin{list}"
+ "\\begin{minipage}"
+ "\\begin{picture}"
+ "\\begin{quotation}"
+ "\\begin{quote}"
+ "\\begin{tabbing}"
+ "\\begin{table}"
+ "\\begin{tabular}"
+ "\\begin{thebibliography}"
+ "\\begin{theorem}"
+ "\\begin{titlepage}"
+ "\\begin{verbatim}"
+ "\\begin{verse}"
+ "\\bf"
+ "\\bf"
+ "\\bibitem"
+ "\\bigskip"
+ "\\cdots"
+ "\\centering"
+ "\\circle"
+ "\\cite"
+ "\\cleardoublepage"
+ "\\clearpage"
+ "\\cline"
+ "\\closing"
+ "\\dashbox"
+ "\\date"
+ "\\ddots"
+ "\\dotfill"
+ "\\em"
+ "\\fbox"
+ "\\flushbottom"
+ "\\fnsymbol"
+ "\\footnote"
+ "\\footnotemark"
+ "\\footnotesize"
+ "\\footnotetext"
+ "\\frac"
+ "\\frame"
+ "\\framebox"
+ "\\hfill"
+ "\\hline"
+ "\\hrulespace"
+ "\\hspace"
+ "\\huge"
+ "\\hyphenation"
+ "\\include"
+ "\\includeonly"
+ "\\indent"
+ "\\input"
+ "\\it"
+ "\\kill"
+ "\\label"
+ "\\large"
+ "\\ldots"
+ "\\line"
+ "\\linebreak"
+ "\\linethickness"
+ "\\listoffigures"
+ "\\listoftables"
+ "\\location"
+ "\\makebox"
+ "\\maketitle"
+ "\\mark"
+ "\\mbox"
+ "\\medskip"
+ "\\multicolumn"
+ "\\multiput"
+ "\\newcommand"
+ "\\newcounter"
+ "\\newenvironment"
+ "\\newfont"
+ "\\newlength"
+ "\\newline"
+ "\\newpage"
+ "\\newsavebox"
+ "\\newtheorem"
+ "\\nocite"
+ "\\nofiles"
+ "\\noindent"
+ "\\nolinebreak"
+ "\\nopagebreak"
+ "\\normalsize"
+ "\\onecolumn"
+ "\\opening"
+ "\\oval"
+ "\\overbrace"
+ "\\overline"
+ "\\pagebreak"
+ "\\pagenumbering"
+ "\\pageref"
+ "\\pagestyle"
+ "\\par"
+ "\\parbox"
+ "\\put"
+ "\\raggedbottom"
+ "\\raggedleft"
+ "\\raggedright"
+ "\\raisebox"
+ "\\ref"
+ "\\rm"
+ "\\roman"
+ "\\rule"
+ "\\savebox"
+ "\\sc"
+ "\\scriptsize"
+ "\\setcounter"
+ "\\setlength"
+ "\\settowidth"
+ "\\sf"
+ "\\shortstack"
+ "\\signature"
+ "\\sl"
+ "\\small"
+ "\\smallskip"
+ "\\sqrt"
+ "\\tableofcontents"
+ "\\telephone"
+ "\\thanks"
+ "\\thispagestyle"
+ "\\tiny"
+ "\\title"
+ "\\tt"
+ "\\twocolumn"
+ "\\typein"
+ "\\typeout"
+ "\\underbrace"
+ "\\underline"
+ "\\usebox"
+ "\\usecounter"
+ "\\value"
+ "\\vdots"
+ "\\vector"
+ "\\verb"
+ "\\vfill"
+ "\\vline"
+ "\\vspace")
+ "A list of LaTeX commands to be protected when performing conversion.")
+
(provide 'org-export-latex)
;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
diff --git a/org-install.el b/org-install.el
index b21dc1afe..9b379e862 100644
--- a/org-install.el
+++ b/org-install.el
@@ -1,60 +1,457 @@
-;;; org-install.el --- Autoloads for org.el
-
-;; org.el
-(autoload 'org-mode "org" "Org mode" t)
-(autoload 'org-diary "org" "Diary entries from Org mode.")
-(autoload 'org-agenda "org" "Multi-file agenda from Org mode." t)
-(autoload 'org-store-link "org" "Store a link to the current location." t)
-(autoload 'org-open-at-point-global "org" "Follow a link like Org-mode does." t)
-(autoload 'org-insert-link-global "org" "Insert a link like Org-mode does." t)
-(autoload 'orgtbl-mode "org" "Org tables as a minor mode." t)
-(autoload 'turn-on-orgtbl "org" "Org tables as a minor mode.")
-(autoload 'orgstruct-mode "org" "Org structure as a minor mode." t)
-(autoload 'turn-on-orgstruct "org" "Org structure as a minor mode.")
-(autoload 'turn-on-orgstruct++ "Orgstruct-mode with indentation settings.")
-(autoload 'org-cycle "org" "Subtree visibility cycling." t)
-(autoload 'org-global-cycle "org" "Global visibility cycling." t)
-(autoload 'org-agenda-list "org" "Produce calendar-like agenda view." t)
-(autoload 'org-cycle-agenda-files "org" "Cycle through agenda-files." t)
-(autoload 'org-todo-list "org" "Produce global TODO list." t)
-(autoload 'org-tags-view "org" "Produce global TAGS agenda view." t)
-(autoload 'org-agenda-list-stuck-projects "org" "List stuck projects." t)
-(autoload 'org-remember "org" "Call remember or re-apply template" t)
-(autoload 'org-remember-annotation "org")
-(autoload 'org-remember-apply-template "org")
-(autoload 'org-remember-handler "org")
-(autoload 'org-export-icalendar-all-agenda-files "org"
- "Export all files in `org-agenda-files' to iCalendar .ics files." t)
-(autoload 'org-export-icalendar-combine-agenda-files "org"
- "Export all files in `org-agenda-files' to a single combined iCalendar file." t)
-(autoload 'org-run-like-in-org-mode "Run a command like in Org-mode.")
-(autoload 'org-agenda-to-appt "Activate appointments in `org-agenda-files'.")
-
-;; org-latex.el
-(autoload 'org-export-as-latex-batch "org-export-latex")
-(autoload 'org-export-as-latex-to-buffer "org-export-latex"
- "Call `org-exort-as-latex` with output to a temporary buffer" t)
-(autoload 'org-replace-region-by-latex "org-export-latex"
- "Replace the region from BEG to END with its LaTeX export." t)
-(autoload 'org-export-region-as-latex "org-export-latex"
- "Convert region from BEG to END in `org-mode' buffer to LaTeX." t)
-(autoload 'org-export-as-latex "org-export-latex"
- "Export current buffer to a LaTeX file." t)
-
-(autoload 'org-batch-agenda "org")
-(autoload 'org-batch-agenda-csv "org")
-(autoload 'org-store-agenda-views "org" "Store agenda views to files" t)
-(autoload 'org-batch-store-agenda-views "org")
-
-;; org-publish.el
-(autoload 'org-publish-current-file "org-publish" "Publish current file." t)
-(autoload 'org-publish-current-project "org-publish"
- "Publish all files of current project." t)
-(autoload 'org-publish "org-publish" "Publish a project." t)
-(autoload 'org-publish-all "org-publish" "Publish all projects." t)
-
-;; org-toc.el
-(autoload 'org-toc-show "org-toc" "Create and display a table of contents" t)
-
+
+;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files
+;;;;;; org-export-icalendar-this-file org-diary org-agenda-list-stuck-projects
+;;;;;; org-tags-view org-todo-list org-agenda-list org-cycle-agenda-files
+;;;;;; org-batch-store-agenda-views org-store-agenda-views org-batch-agenda-csv
+;;;;;; org-batch-agenda org-agenda org-agenda-to-appt org-remember-handler
+;;;;;; org-remember org-remember-apply-template org-remember-annotation
+;;;;;; org-remember-insinuate org-open-at-point-global org-insert-link-global
+;;;;;; org-store-link orgtbl-mode turn-on-orgtbl org-run-like-in-org-mode
+;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle
+;;;;;; org-cycle org-mode) "org" "org.el" (18250 40473))
+;;; Generated autoloads from org.el
+
+(autoload (quote org-mode) "org" "\
+Outline-based notes management and organizer, alias
+\"Carsten's outline-mode for keeping track of everything.\"
+
+Org-mode develops organizational tasks around a NOTES file which
+contains information about projects as plain text. Org-mode is
+implemented on top of outline-mode, which is ideal to keep the content
+of large files well structured. It supports ToDo items, deadlines and
+time stamps, which magically appear in the diary listing of the Emacs
+calendar. Tables are easily created with a built-in table editor.
+Plain text URL-like links connect to websites, emails (VM), Usenet
+messages (Gnus), BBDB entries, and any files related to the project.
+For printing and sharing of notes, an Org-mode file (or a part of it)
+can be exported as a structured ASCII or HTML file.
+
+The following commands are available:
+
+\\{org-mode-map}" t nil)
+
+(autoload (quote org-cycle) "org" "\
+Visibility cycling for Org-mode.
+
+- When this function is called with a prefix argument, rotate the entire
+ buffer through 3 states (global cycling)
+ 1. OVERVIEW: Show only top-level headlines.
+ 2. CONTENTS: Show all headlines of all levels, but no body text.
+ 3. SHOW ALL: Show everything.
+
+- When point is at the beginning of a headline, rotate the subtree started
+ by this line through 3 different states (local cycling)
+ 1. FOLDED: Only the main headline is shown.
+ 2. CHILDREN: The main headline and the direct children are shown.
+ From this state, you can move to one of the children
+ and zoom in further.
+ 3. SUBTREE: Show the entire subtree, including body text.
+
+- When there is a numeric prefix, go up to a heading with level ARG, do
+ a `show-subtree' and return to the previous cursor position. If ARG
+ is negative, go up that many levels.
+
+- When point is not at the beginning of a headline, execute
+ `indent-relative', like TAB normally does. See the option
+ `org-cycle-emulate-tab' for details.
+
+- Special case: if point is at the beginning of the buffer and there is
+ no headline in line 1, this function will act as if called with prefix arg.
+ But only if also the variable `org-cycle-global-at-bob' is t." t nil)
+
+(autoload (quote org-global-cycle) "org" "\
+Cycle the global visibility. For details see `org-cycle'." t nil)
+
+(autoload (quote orgstruct-mode) "org" "\
+Toggle the minor more `orgstruct-mode'.
+This mode is for using Org-mode structure commands in other modes.
+The following key behave as if Org-mode was active, if the cursor
+is on a headline, or on a plain list item (both in the definition
+of Org-mode).
+
+M-up Move entry/item up
+M-down Move entry/item down
+M-left Promote
+M-right Demote
+M-S-up Move entry/item up
+M-S-down Move entry/item down
+M-S-left Promote subtree
+M-S-right Demote subtree
+M-q Fill paragraph and items like in Org-mode
+C-c ^ Sort entries
+C-c - Cycle list bullet
+TAB Cycle item visibility
+M-RET Insert new heading/item
+S-M-RET Insert new TODO heading / Chekbox item
+C-c C-c Set tags / toggle checkbox" t nil)
+
+(autoload (quote turn-on-orgstruct) "org" "\
+Unconditionally turn on `orgstruct-mode'." nil nil)
+
+(autoload (quote turn-on-orgstruct++) "org" "\
+Unconditionally turn on `orgstruct-mode', and force org-mode indentations.
+In addition to setting orgstruct-mode, this also exports all indentation and
+autofilling variables from org-mode into the buffer. Note that turning
+off orgstruct-mode will *not* remove these additonal settings." nil nil)
+
+(autoload (quote org-run-like-in-org-mode) "org" nil nil nil)
+
+(autoload (quote turn-on-orgtbl) "org" "\
+Unconditionally turn on `orgtbl-mode'." nil nil)
+
+(autoload (quote orgtbl-mode) "org" "\
+The `org-mode' table editor as a minor mode for use in other modes." t nil)
+
+(autoload (quote org-store-link) "org" "\
+\\<org-mode-map>Store an org-link to the current location.
+This link can later be inserted into an org-buffer with
+\\[org-insert-link].
+For some link types, a prefix arg is interpreted:
+For links to usenet articles, arg negates `org-usenet-links-prefer-google'.
+For file links, arg negates `org-context-in-file-links'." t nil)
+
+(autoload (quote org-insert-link-global) "org" "\
+Insert a link like Org-mode does.
+This command can be called in any mode to insert a link in Org-mode syntax." t nil)
+
+(autoload (quote org-open-at-point-global) "org" "\
+Follow a link like Org-mode does.
+This command can be called in any mode to follow a link that has
+Org-mode syntax." t nil)
+
+(autoload (quote org-remember-insinuate) "org" "\
+Setup remember.el for use wiht Org-mode." nil nil)
+
+(autoload (quote org-remember-annotation) "org" "\
+Return a link to the current location as an annotation for remember.el.
+If you are using Org-mode files as target for data storage with
+remember.el, then the annotations should include a link compatible with the
+conventions in Org-mode. This function returns such a link." nil nil)
+
+(autoload (quote org-remember-apply-template) "org" "\
+Initialize *remember* buffer with template, invoke `org-mode'.
+This function should be placed into `remember-mode-hook' and in fact requires
+to be run from that hook to function properly." nil nil)
+
+(autoload (quote org-remember) "org" "\
+Call `remember'. If this is already a remember buffer, re-apply template.
+If there is an active region, make sure remember uses it as initial content
+of the remember buffer.
+
+When called interactively with a `C-u' prefix argument GOTO, don't remember
+anything, just go to the file/headline where the selected templated usually
+stores its notes.
+
+Lisp programs can set ORG-FORCE-REMEMBER-TEMPLATE-CHAR to a character
+associated with a template in `org-remember-tempates'." t nil)
+
+(autoload (quote org-remember-handler) "org" "\
+Store stuff from remember.el into an org file.
+First prompts for an org file. If the user just presses return, the value
+of `org-default-notes-file' is used.
+Then the command offers the headings tree of the selected file in order to
+file the text at a specific location.
+You can either immediately press RET to get the note appended to the
+file, or you can use vertical cursor motion and visibility cycling (TAB) to
+find a better place. Then press RET or <left> or <right> in insert the note.
+
+Key Cursor position Note gets inserted
+-----------------------------------------------------------------------------
+RET buffer-start as level 1 heading at end of file
+RET on headline as sublevel of the heading at cursor
+RET no heading at cursor position, level taken from context.
+ Or use prefix arg to specify level manually.
+<left> on headline as same level, before current heading
+<right> on headline as same level, after current heading
+
+So the fastest way to store the note is to press RET RET to append it to
+the default file. This way your current train of thought is not
+interrupted, in accordance with the principles of remember.el.
+You can also get the fast execution without prompting by using
+C-u C-c C-c to exit the remember buffer. See also the variable
+`org-remember-store-without-prompt'.
+
+Before being stored away, the function ensures that the text has a
+headline, i.e. a first line that starts with a \"*\". If not, a headline
+is constructed from the current date and some additional data.
+
+If the variable `org-adapt-indentation' is non-nil, the entire text is
+also indented so that it starts in the same column as the headline
+\(i.e. after the stars).
+
+See also the variable `org-reverse-note-order'." nil nil)
+
+(autoload (quote org-agenda-to-appt) "org" "\
+Activate appointments found in `org-agenda-files'.
+When prefixed, prompt for a regular expression and use it as a
+filter: only add entries if they match this regular expression.
+
+FILTER can be a string. In this case, use this string as a
+regular expression to filter results.
+
+FILTER can also be an alist, with the car of each cell being
+either 'headline or 'category. For example:
+
+ '((headline \"IMPORTANT\")
+ (category \"Work\"))
+
+will only add headlines containing IMPORTANT or headlines
+belonging to the category \"Work\"." t nil)
+
+(autoload (quote org-agenda) "org" "\
+Dispatch agenda commands to collect entries to the agenda buffer.
+Prompts for a command to execute. Any prefix arg will be passed
+on to the selected command. The default selections are:
+
+a Call `org-agenda-list' to display the agenda for current day or week.
+t Call `org-todo-list' to display the global todo list.
+T Call `org-todo-list' to display the global todo list, select only
+ entries with a specific TODO keyword (the user gets a prompt).
+m Call `org-tags-view' to display headlines with tags matching
+ a condition (the user is prompted for the condition).
+M Like `m', but select only TODO entries, no ordinary headlines.
+L Create a timeline for the current buffer.
+e Export views to associated files.
+
+More commands can be added by configuring the variable
+`org-agenda-custom-commands'. In particular, specific tags and TODO keyword
+searches can be pre-defined in this way.
+
+If the current buffer is in Org-mode and visiting a file, you can also
+first press `<' once to indicate that the agenda should be temporarily
+\(until the next use of \\[org-agenda]) restricted to the current file.
+Pressing `<' twice means to restrict to the current subtree or region
+\(if active)." t nil)
+
+(autoload (quote org-batch-agenda) "org" "\
+Run an agenda command in batch mode and send the result to STDOUT.
+If CMD-KEY is a string of length 1, it is used as a key in
+`org-agenda-custom-commands' and triggers this command. If it is a
+longer string is is used as a tags/todo match string.
+Paramters are alternating variable names and values that will be bound
+before running the agenda command." nil (quote macro))
+
+(autoload (quote org-batch-agenda-csv) "org" "\
+Run an agenda command in batch mode and send the result to STDOUT.
+If CMD-KEY is a string of length 1, it is used as a key in
+`org-agenda-custom-commands' and triggers this command. If it is a
+longer string is is used as a tags/todo match string.
+Paramters are alternating variable names and values that will be bound
+before running the agenda command.
+
+The output gives a line for each selected agenda item. Each
+item is a list of comma-separated values, like this:
+
+category,head,type,todo,tags,date,time,extra,priority-l,priority-n
+
+category The category of the item
+head The headline, without TODO kwd, 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 on given date
+ scheduled scheduled on given date
+ timestamp entry has timestamp on given date
+ closed entry was closed on given date
+ upcoming-deadline warning about deadline
+ past-scheduled forwarded scheduled item
+ block entry has date block including g. 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 Sting with extra planning info
+priority-l The priority letter if any was given
+priority-n The computed numerical priority
+agenda-day The day in the agenda where this is listed" nil (quote macro))
+
+(autoload (quote org-store-agenda-views) "org" nil t nil)
+
+(autoload (quote org-batch-store-agenda-views) "org" "\
+Run all custom agenda commands that have a file argument." nil (quote macro))
+
+(autoload (quote org-cycle-agenda-files) "org" "\
+Cycle through the files in `org-agenda-files'.
+If the current buffer visits an agenda file, find the next one in the list.
+If the current buffer does not, find the first agenda file." t nil)
+
+(autoload (quote org-agenda-list) "org" "\
+Produce a daily/weekly view from all files in variable `org-agenda-files'.
+The view will be for the current day or week, but from the overview buffer
+you will be able to go to other days/weeks.
+
+With one \\[universal-argument] prefix argument INCLUDE-ALL,
+all unfinished TODO items will also be shown, before the agenda.
+This feature is considered obsolete, please use the TODO list or a block
+agenda instead.
+
+With a numeric prefix argument in an interactive call, the agenda will
+span INCLUDE-ALL days. Lisp programs should instead specify NDAYS to change
+the number of days. NDAYS defaults to `org-agenda-ndays'.
+
+START-DAY defaults to TODAY, or to the most recent match for the weekday
+given in `org-agenda-start-on-weekday'." t nil)
+
+(autoload (quote org-todo-list) "org" "\
+Show all TODO entries from all agenda file in a single list.
+The prefix arg can be used to select a specific TODO keyword and limit
+the list to these. When using \\[universal-argument], you will be prompted
+for a keyword. A numeric prefix directly selects the Nth keyword in
+`org-todo-keywords-1'." t nil)
+
+(autoload (quote org-tags-view) "org" "\
+Show all headlines for all `org-agenda-files' matching a TAGS criterion.
+The prefix arg TODO-ONLY limits the search to TODO entries." t nil)
+
+(autoload (quote org-agenda-list-stuck-projects) "org" "\
+Create agenda view for projects that are stuck.
+Stuck projects are project that have no next actions. For the definitions
+of what a project is and how to check if it stuck, customize the variable
+`org-stuck-projects'.
+MATCH is being ignored." t nil)
+
+(autoload (quote org-diary) "org" "\
+Return diary information from org-files.
+This function can be used in a \"sexp\" diary entry in the Emacs calendar.
+It accesses org files and extracts information from those files to be
+listed in the diary. The function accepts arguments specifying what
+items should be listed. The following arguments are allowed:
+
+ :timestamp List the headlines of items containing a date stamp or
+ date range matching the selected date. Deadlines will
+ also be listed, on the expiration day.
+
+ :sexp List entries resulting from diary-like sexps.
+
+ :deadline List any deadlines past due, or due within
+ `org-deadline-warning-days'. The listing occurs only
+ in the diary for *today*, not at any other date. If
+ an entry is marked DONE, it is no longer listed.
+
+ :scheduled List all items which are scheduled for the given date.
+ The diary for *today* also contains items which were
+ scheduled earlier and are not yet marked DONE.
+
+ :todo List all TODO items from the org-file. This may be a
+ long list - so this is not turned on by default.
+ Like deadlines, these entries only show up in the
+ diary for *today*, not at any other date.
+
+The call in the diary file should look like this:
+
+ &%%(org-diary) ~/path/to/some/orgfile.org
+
+Use a separate line for each org file to check. Or, if you omit the file name,
+all files listed in `org-agenda-files' will be checked automatically:
+
+ &%%(org-diary)
+
+If you don't give any arguments (as in the example above), the default
+arguments (:deadline :scheduled :timestamp :sexp) are used.
+So the example above may also be written as
+
+ &%%(org-diary :deadline :timestamp :sexp :scheduled)
+
+The function expects the lisp variables `entry' and `date' to be provided
+by the caller, because this is how the calendar works. Don't use this
+function from a program - use `org-agenda-get-day-entries' instead." nil nil)
+
+(autoload (quote org-export-icalendar-this-file) "org" "\
+Export current file as an iCalendar file.
+The iCalendar file will be located in the same directory as the Org-mode
+file, but with extension `.ics'." t nil)
+
+(autoload (quote org-export-icalendar-all-agenda-files) "org" "\
+Export all files in `org-agenda-files' to iCalendar .ics files.
+Each iCalendar file will be located in the same directory as the Org-mode
+file, but with extension `.ics'." t nil)
+
+(autoload (quote org-export-icalendar-combine-agenda-files) "org" "\
+Export all files in `org-agenda-files' to a single combined iCalendar file.
+The file is stored under the name `org-combined-agenda-icalendar-file'." t nil)
+
+;;;***
+
+;;;### (autoloads (org-publish-all org-publish-current-file org-publish-current-project
+;;;;;; org-publish) "org-publish" "org-publish.el" (18207 29024))
+;;; Generated autoloads from org-publish.el
+
+(autoload (quote org-publish) "org-publish" "\
+Publish the project PROJECT-NAME." t nil)
+
+(autoload (quote org-publish-current-project) "org-publish" "\
+Publish the project associated with the current file.
+With prefix argument, force publishing all files in project." t nil)
+
+(autoload (quote org-publish-current-file) "org-publish" "\
+Publish the current file.
+With prefix argument, force publish the file." t nil)
+
+(autoload (quote org-publish-all) "org-publish" "\
+Publish all projects.
+With prefix argument, force publish all files." t nil)
+
+;;;***
+
+;;;### (autoloads (org-export-as-latex org-export-region-as-latex
+;;;;;; org-replace-region-by-latex org-export-as-latex-to-buffer
+;;;;;; org-export-as-latex-batch) "org-export-latex" "org-export-latex.el"
+;;;;;; (18252 7249))
+;;; Generated autoloads from org-export-latex.el
+
+(autoload (quote org-export-as-latex-batch) "org-export-latex" "\
+Call `org-export-as-latex', may be used in batch processing as
+emacs --batch
+ --load=$HOME/lib/emacs/org.el
+ --eval \"(setq org-export-headline-levels 2)\"
+ --visit=MyFile --funcall org-export-as-latex-batch" nil nil)
+
+(autoload (quote org-export-as-latex-to-buffer) "org-export-latex" "\
+Call `org-exort-as-latex` with output to a temporary buffer.
+No file is created. The prefix ARG is passed through to `org-export-as-latex'." t nil)
+
+(autoload (quote org-replace-region-by-latex) "org-export-latex" "\
+Replace the region from BEG to END with its LaTeX export.
+It assumes the region has `org-mode' syntax, and then convert it to
+LaTeX. This can be used in any buffer. For example, you could
+write an itemized list in `org-mode' syntax in an LaTeX buffer and
+then use this command to convert it." t nil)
+
+(autoload (quote org-export-region-as-latex) "org-export-latex" "\
+Convert region from BEG to END in `org-mode' buffer to LaTeX.
+If prefix arg BODY-ONLY is set, omit file header, footer, and table of
+contents, and only produce the region of converted text, useful for
+cut-and-paste operations.
+If BUFFER is a buffer or a string, use/create that buffer as a target
+of the converted LaTeX. If BUFFER is the symbol `string', return the
+produced LaTeX as a string and leave not buffer behind. For example,
+a Lisp program could call this function in the following way:
+
+ (setq latex (org-export-region-as-latex beg end t 'string))
+
+When called interactively, the output buffer is selected, and shown
+in a window. A non-interactive call will only retunr the buffer." t nil)
+
+(autoload (quote org-export-as-latex) "org-export-latex" "\
+Export current buffer to a LaTeX file.
+If there is an active region, export only the region. The prefix
+ARG specifies how many levels of the outline should become
+headlines. The default is 3. Lower levels will be exported
+depending on `org-export-latex-low-levels'. The default is to
+convert them as description lists. When HIDDEN is non-nil, don't
+display the LaTeX buffer. EXT-PLIST is a property list with
+external parameters overriding org-mode's default settings, but
+still inferior to file-local settings. When TO-BUFFER is
+non-nil, create a buffer with that name and export to that
+buffer. If TO-BUFFER is the symbol `string', don't leave any
+buffer behind but just return the resulting LaTeX as a string.
+When BODY-ONLY is set, don't produce the file header and footer,
+simply return the content of egin{document}...nd{document},
+without even the egin{document} and nd{document} commands." t nil)
+
+;;;***
+
+
(provide 'org-install)
diff --git a/org.el b/org.el
index 68d4c72dc..36335e8c9 100644
--- a/org.el
+++ b/org.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 5.13i
+;; Version: 5.14-alpha7
;;
;; This file is part of GNU Emacs.
;;
@@ -83,7 +83,7 @@
;;; Version
-(defconst org-version "5.13i"
+(defconst org-version "5.14-alpha7"
"The version number of the file org.el.")
(defun org-version ()
(interactive)
@@ -251,7 +251,7 @@ Or return the original if not disputed."
"Define a key, possibly translated, as returned by `org-key'."
(define-key keymap (org-key key) def))
-(defcustom org-ellipsis 'org-ellipsis
+(defcustom org-ellipsis nil
"The ellipsis to use in the Org-mode outline.
When nil, just use the standard three dots. When a string, use that instead,
When a face, use the standart 3 dots, but with the specified face.
@@ -426,6 +426,33 @@ contexts. See `org-show-hierarchy-above' for valid contexts."
(const default))
(boolean)))))
+(defcustom org-show-entry-below '((default . nil))
+ "Non-nil means, show the entry below a headline when revealing a location.
+Org-mode often shows locations in an org-mode file which might have
+been invisible before. When this is set, the text below the headline that is
+exposed is also shown.
+
+By default this is off for all contexts.
+Instead of t, this can also be an alist specifying this option for different
+contexts. See `org-show-hierarchy-above' for valid contexts."
+ :group 'org-reveal-location
+ :type '(choice
+ (const :tag "Always" t)
+ (const :tag "Never" nil)
+ (repeat :greedy t :tag "Individual contexts"
+ (cons
+ (choice :tag "Context"
+ (const agenda)
+ (const org-goto)
+ (const occur-tree)
+ (const tags-tree)
+ (const link-search)
+ (const mark-goto)
+ (const bookmark-jump)
+ (const isearch)
+ (const default))
+ (boolean)))))
+
(defgroup org-cycle nil
"Options concerning visibility cycling in Org-mode."
:tag "Org Cycle"
@@ -568,7 +595,7 @@ and a boolean flag as cdr."
(defcustom org-insert-heading-hook nil
"Hook being run after inserting a new heading."
:group 'org-edit-structure
- :type 'boolean)
+ :type 'hook)
(defcustom org-enable-fixed-width-editor t
"Non-nil means, lines starting with \":\" are treated as fixed-width.
@@ -658,7 +685,9 @@ with \\[org-ctrl-c-ctrl-c\\]."
(defcustom org-archive-tag "ARCHIVE"
"The tag that marks a subtree as archived.
An archived subtree does not open during visibility cycling, and does
-not contribute to the agenda listings."
+not contribute to the agenda listings.
+After changing this, font-lock must be restarted in the relevant buffers to
+get the proper fontification."
:group 'org-archive
:group 'org-keywords
:type 'string)
@@ -892,7 +921,7 @@ alignment to the right border applies."
:type 'number)
(defgroup org-table-editing nil
- "Bahavior of tables during editing in Org-mode."
+ "Behavior of tables during editing in Org-mode."
:tag "Org Table Editing"
:group 'org-table)
@@ -1483,7 +1512,9 @@ calendar | %:type %:date"
(defcustom org-reverse-note-order nil
"Non-nil means, store new notes at the beginning of a file or entry.
-When nil, new notes will be filed to the end of a file or entry."
+When nil, new notes will be filed to the end of a file or entry.
+This can also be a list with cons cells of regular expressions that
+are matched against file names, and values."
:group 'org-remember
:type '(choice
(const :tag "Reverse always" t)
@@ -1795,13 +1826,52 @@ end of the second format."
(concat "[" (substring f 1 -1) "]")
f)))
-(defcustom org-popup-calendar-for-date-prompt t
+(defcustom org-read-date-prefer-future t
+ "Non-nil means, assume future for incomplete date input from user.
+This affects the following situations:
+1. The user gives a day, but no month.
+ For example, if today is the 15th, and you enter \"3\", Org-mode will
+ read this as the third of *next* month. However, if you enter \"17\",
+ it will be considered as *this* month.
+2. The user gives a month but not a year.
+ For example, if it is april and you enter \"feb 2\", this will be read
+ as feb 2, *next* year. \"May 5\", however, will be this year.
+
+When this option is nil, the current month and year will always be used
+as defaults."
+ :group 'org-time
+ :type 'boolean)
+
+(defcustom org-read-date-display-live t
+ "Non-nil means, display current interpretation of date prompt live.
+This display will be in an overlay, in the minibuffer."
+ :group 'org-time
+ :type 'boolean)
+
+(defcustom org-read-date-popup-calendar t
"Non-nil means, pop up a calendar when prompting for a date.
In the calendar, the date can be selected with mouse-1. However, the
minibuffer will also be active, and you can simply enter the date as well.
When nil, only the minibuffer will be available."
:group 'org-time
:type 'boolean)
+(if (fboundp 'defvaralias)
+ (defvaralias 'org-popup-calendar-for-date-prompt
+ 'org-read-date-popup-calendar))
+
+(defcustom org-extend-today-until 0
+ "The hour when your day really ends.
+This has influence for the following applications:
+- When switching the agenda to \"today\". It it is still earlier than
+ the time given here, the day recognized as TODAY is actually yesterday.
+- When a date is read from the user and it is still before the time given
+ here, the current date and time will be assumed to be yesterday, 23:59.
+
+FIXME:
+IMPORTANT: This is still a very experimental feature, it may disappear
+again or it may be extended to mean more things."
+ :group 'org-time
+ :type 'number)
(defcustom org-edit-timestamp-down-means-later nil
"Non-nil means, S-down will increase the time in a time stamp.
@@ -1929,16 +1999,23 @@ lined-up with respect to each other."
(defcustom org-use-property-inheritance nil
"Non-nil means, properties apply also for sublevels.
-This can cause significant overhead when doing a search, so this is turned
-off by default.
+This setting is only relevant during property searches, not when querying
+an entry with `org-entry-get'. To retrieve a property with inheritance,
+you need to call `org-entry-get' with the inheritance flag.
+Turning this on can cause significant overhead when doing a search, so
+this is turned off by default.
When nil, only the properties directly given in the current entry count.
+The value may also be a list of properties that shouldhave inheritance.
However, note that some special properties use inheritance under special
circumstances (not in searches). Examples are CATEGORY, ARCHIVE, COLUMNS,
and the properties ending in \"_ALL\" when they are used as descriptor
for valid values of a property."
:group 'org-properties
- :type 'boolean)
+ :type '(choice
+ (const :tag "Not" nil)
+ (const :tag "Always" nil)
+ (repeat :tag "Specific properties")))
(defcustom org-columns-default-format "%25ITEM %TODO %3PRIORITY %TAGS"
"The default column format, if no other format has been defined.
@@ -1998,7 +2075,7 @@ agenda file per line."
(repeat :tag "List of files and directories" file)
(file :tag "Store list in a file\n" :value "~/.agenda_files")))
-(defcustom org-agenda-file-regexp "\\.org\\'"
+(defcustom org-agenda-file-regexp "\\`[^.].*\\.org\\'"
"Regular expression to match files for `org-agenda-files'.
If any element in the list in that variable contains a directory instead
of a normal file, all files in that directory that are matched by this
@@ -2318,6 +2395,11 @@ deadlines are always turned off when the item is DONE."
:group 'org-agenda-skip
:type 'boolean)
+(defcustom org-agenda-skip-timestamp-if-done nil
+ "Non-nil means don't don't select item by timestamp or -range if it is DONE."
+ :group 'org-agenda-skip
+ :type 'boolean)
+
(defcustom org-timeline-show-empty-dates 3
"Non-nil means, `org-timeline' also shows dates without an entry.
When nil, only the days which actually have entries are shown.
@@ -2400,7 +2482,9 @@ Valid values are:
current-window Display in the current window
other-window Just display in another window.
dedicated-frame Create one new frame, and re-use it each time.
-new-frame Make a new frame each time."
+new-frame Make a new frame each time. Note that in this case
+ previously-made indirect buffers are kept, and you need to
+ kill these buffers yourself."
:group 'org-structure
:group 'org-agenda-windows
:type '(choice
@@ -2580,7 +2664,11 @@ the sequence given in `org-agenda-files'. Within each category sort by
priority.
Leaving out `category-keep' would mean that items will be sorted across
-categories by priority."
+categories by priority.
+
+Instead of a single list, this can also be a set of list for specific
+contents, with a context symbol in the car of the list, any of
+`agenda', `todo', `tags' for the corresponding agenda views."
:group 'org-agenda-sorting
:type `(choice
(repeat :tag "General" ,sorting-choice)
@@ -2811,23 +2899,23 @@ This is a property list with the following properties:
:tag "Org Export General"
:group 'org-export)
-(defcustom org-export-publishing-directory "."
- "Path to the location where exported files should be located.
-This path may be relative to the directory where the Org-mode file lives.
-The default is to put them into the same directory as the Org-mode file.
-The variable may also be an alist with export types `:html', `:ascii',
-`:ical', `:LaTeX', or `:xoxo' and the corresponding directories.
-If a directory path is relative, it is interpreted relative to the
-directory where the exported Org-mode files lives."
- :group 'org-export-general
- :type '(choice
- (directory)
- (repeat
- (cons
- (choice :tag "Type"
- (const :html) (const :LaTeX)
- (const :ascii) (const :ical) (const :xoxo))
- (directory)))))
+;; FIXME
+(defvar org-export-publishing-directory nil)
+
+(defcustom org-export-with-special-strings t
+ "Non-nil means, interpret \"\-\", \"--\" and \"---\" for export.
+When this option is turned on, these strings will be exported as:
+
+ Org HTML LaTeX
+ -----+----------+--------
+ \\- &shy; \\-
+ -- &ndash; --
+ --- &mdash; ---
+ ... &hellip; \ldots
+
+This option can also be set with the +OPTIONS line, e.g. \"-:nil\"."
+ :group 'org-export-translation
+ :type 'boolean)
(defcustom org-export-language-setup
'(("en" "Author" "Date" "Table of Contents")
@@ -3032,6 +3120,20 @@ This option can also be set with the +OPTIONS line, e.g. \"^:nil\"."
(const :tag "Only with braces" {})
(const :tag "Never interpret" nil)))
+(defcustom org-export-with-special-strings t
+ "Non-nil means, interpret \"\-\", \"--\" and \"---\" for export.
+When this option is turned on, these strings will be exported as:
+
+\\- : &shy;
+-- : &ndash;
+--- : &mdash;
+
+Not all export backends support this, but HTML does.
+
+This option can also be set with the +OPTIONS line, e.g. \"-:nil\"."
+ :group 'org-export-translation
+ :type 'boolean)
+
(defcustom org-export-with-TeX-macros t
"Non-nil means, interpret simple TeX-like macros when exporting.
For example, HTML export converts \\alpha to &alpha; and \\AA to &Aring;.
@@ -3377,8 +3479,15 @@ Changing this variable requires a restart of Emacs to take effect."
:group 'org-font-lock
:type 'boolean)
+(defcustom org-hide-emphasis-markers nil
+ "Non-nil measn font-lock should hide the emphasis marker characters."
+ :group 'org-font-lock
+ :type 'boolean)
+
(defvar org-emph-re nil
"Regular expression for matching emphasis.")
+(defvar org-verbatim-re nil
+ "Regular expression for matching verbatim text.")
(defvar org-emphasis-regexp-components) ; defined just below
(defvar org-emphasis-alist) ; defined just below
(defun org-set-emph-re (var val)
@@ -3393,33 +3502,53 @@ Changing this variable requires a restart of Emacs to take effect."
(border (nth 2 e))
(body (nth 3 e))
(nl (nth 4 e))
- (stacked (nth 5 e))
+ (stacked (and nil (nth 5 e))) ; stacked is no longer allowed, forced to nil
(body1 (concat body "*?"))
- (markers (mapconcat 'car org-emphasis-alist "")))
+ (markers (mapconcat 'car org-emphasis-alist ""))
+ (vmarkers (mapconcat
+ (lambda (x) (if (eq (nth 4 x) 'verbatim) (car x) ""))
+ org-emphasis-alist "")))
;; make sure special characters appear at the right position in the class
(if (string-match "\\^" markers)
(setq markers (concat (replace-match "" t t markers) "^")))
(if (string-match "-" markers)
(setq markers (concat (replace-match "" t t markers) "-")))
+ (if (string-match "\\^" vmarkers)
+ (setq vmarkers (concat (replace-match "" t t vmarkers) "^")))
+ (if (string-match "-" vmarkers)
+ (setq vmarkers (concat (replace-match "" t t vmarkers) "-")))
(if (> nl 0)
(setq body1 (concat body1 "\\(?:\n" body "*?\\)\\{0,"
(int-to-string nl) "\\}")))
;; Make the regexp
(setq org-emph-re
- (concat "\\([" pre (if stacked markers) "]\\|^\\)"
+ (concat "\\([" pre (if (and nil stacked) markers) "]\\|^\\)"
"\\("
"\\([" markers "]\\)"
"\\("
+ "[^" border "]\\|"
"[^" border (if (and nil stacked) markers) "]"
body1
"[^" border (if (and nil stacked) markers) "]"
"\\)"
"\\3\\)"
- "\\([" post (if stacked markers) "]\\|$\\)")))))
+ "\\([" post (if (and nil stacked) markers) "]\\|$\\)"))
+ (setq org-verbatim-re
+ (concat "\\([" pre "]\\|^\\)"
+ "\\("
+ "\\([" vmarkers "]\\)"
+ "\\("
+ "[^" border "]\\|"
+ "[^" border "]"
+ body1
+ "[^" border "]"
+ "\\)"
+ "\\3\\)"
+ "\\([" post "]\\|$\\)")))))
(defcustom org-emphasis-regexp-components
- '(" \t('\"" "- \t.,:?;'\")" " \t\r\n,\"'" "." 1 nil)
- "Components used to build the reqular expression for emphasis.
+ '(" \t('\"" "- \t.,:?;'\")" " \t\r\n,\"'" "." 1)
+ "Components used to build the regular expression for emphasis.
This is a list with 6 entries. Terminology: In an emphasis string
like \" *strong word* \", we call the initial space PREMATCH, the final
space POSTMATCH, the stars MARKERS, \"s\" and \"d\" are BORDER characters
@@ -3432,10 +3561,7 @@ border The chars *forbidden* as border characters.
body-regexp A regexp like \".\" to match a body character. Don't use
non-shy groups here, and don't allow newline here.
newline The maximum number of newlines allowed in an emphasis exp.
-stacked Non-nil means, allow stacked styles. This works only in HTML
- export. When this is set, all marker characters (as given in
- `org-emphasis-alist') will be allowed as pre/post, aiding
- inside-out matching.
+
Use customize to modify this, or restart Emacs after changing it."
:group 'org-font-lock
:set 'org-set-emph-re
@@ -3445,16 +3571,17 @@ Use customize to modify this, or restart Emacs after changing it."
(sexp :tag "Forbidden chars in border ")
(sexp :tag "Regexp for body ")
(integer :tag "number of newlines allowed")
- (boolean :tag "Stacking allowed ")))
+ (option (boolean :tag "Stacking (DISABLED) "))))
(defcustom org-emphasis-alist
'(("*" bold "<b>" "</b>")
("/" italic "<i>" "</i>")
("_" underline "<u>" "</u>")
- ("=" org-code "<code>" "</code>")
+ ("=" org-code "<code>" "</code>" verbatim)
+ ("~" org-verbatim "" "" verbatim)
("+" (:strike-through t) "<del>" "</del>")
)
-"Special syntax for emphasized text.
+ "Special syntax for emphasized text.
Text starting and ending with a special character will be emphasized, for
example *bold*, _underlined_ and /italic/. This variable sets the marker
characters, the face to be used by font-lock for highlighting in Org-mode
@@ -3469,7 +3596,8 @@ Use customize to modify this, or restart Emacs after changing it."
(face :tag "Font-lock-face")
(plist :tag "Face property list"))
(string :tag "HTML start tag")
- (string :tag "HTML end tag"))))
+ (string :tag "HTML end tag")
+ (option (const verbatim)))))
;;; The faces
@@ -3679,8 +3807,8 @@ color of the frame."
:group 'org-faces)
(defface org-ellipsis
- '((((class color) (background light)) (:foreground "DarkGoldenrod" :strike-through t))
- (((class color) (background dark)) (:foreground "LightGoldenrod" :strike-through t))
+ '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
+ (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
(t (:strike-through t)))
"Face for the ellipsis in folded text."
:group 'org-faces)
@@ -3793,6 +3921,21 @@ list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
:group 'org-faces
:version "22.1")
+(defface org-verbatim
+ (org-compatible-face
+ nil
+ '((((class color grayscale) (min-colors 88) (background light))
+ (:foreground "grey50" :underline t))
+ (((class color grayscale) (min-colors 88) (background dark))
+ (:foreground "grey70" :underline t))
+ (((class color) (min-colors 8) (background light))
+ (:foreground "green" :underline t))
+ (((class color) (min-colors 8) (background dark))
+ (:foreground "yellow" :underline t))))
+ "Face for fixed-with text like code snippets."
+ :group 'org-faces
+ :version "22.1")
+
(defface org-agenda-structure ;; font-lock-function-name-face
(org-compatible-face
nil
@@ -4056,7 +4199,7 @@ means to push this value onto the list in the variable.")
((equal key "CATEGORY")
(if (string-match "[ \t]+$" value)
(setq value (replace-match "" t t value)))
- (setq cat (intern value)))
+ (setq cat value))
((member key '("SEQ_TODO" "TODO"))
(push (cons 'sequence (org-split-string value splitre)) kwds))
((equal key "TYP_TODO")
@@ -4098,7 +4241,9 @@ means to push this value onto the list in the variable.")
(remove-text-properties 0 (length arch)
'(face t fontified t) arch)))
)))
- (and cat (org-set-local 'org-category cat))
+ (when cat
+ (org-set-local 'org-category (intern cat))
+ (push (cons "CATEGORY" cat) props))
(when prio
(if (< (length prio) 3) (setq prio '("A" "C" "B")))
(setq prio (mapcar 'string-to-char prio))
@@ -4144,6 +4289,8 @@ means to push this value onto the list in the variable.")
dws (if sep (org-remove-keyword-keys (cdr sep)) (last kws1))
tail (list inter hw (car dws) (org-last dws)))
(add-to-list 'org-todo-heads hw 'append)
+;????????????????? (setq org-todo-heads (append org-todo-heads (list hw)))
+ (add-to-list 'org-todo-heads hw 'append)
(push kws1 org-todo-sets)
(setq org-done-keywords (append org-done-keywords dws nil))
(setq org-todo-key-alist (append org-todo-key-alist kwsa))
@@ -4254,7 +4401,7 @@ means to push this value onto the list in the variable.")
"\\|" org-closed-string "\\|" org-clock-string
"\\)\\>\\)")
)
-
+ (org-compute-latex-and-specials-regexp)
(org-set-font-lock-defaults)))
(defun org-remove-keyword-keys (list)
@@ -4324,7 +4471,6 @@ This is for getting out of special buffers like remember.")
(defvar date)
(defvar description)
-
;; Defined somewhere in this file, but used before definition.
(defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized
(defvar org-agenda-buffer-name)
@@ -4732,9 +4878,15 @@ The time stamps may be either active or inactive.")
org-emphasis-alist)))
(add-text-properties (match-beginning 2) (match-end 2)
'(font-lock-multiline t))
+ (when org-hide-emphasis-markers
+ (add-text-properties (match-end 4) (match-beginning 5)
+ '(invisible org-link))
+ (add-text-properties (match-beginning 3) (match-end 3)
+ '(invisible org-link)))
(backward-char 1))))
rtn))
+
(defun org-emphasize (&optional char)
"Insert or change an emphasis, i.e. a font like bold or italic.
If there is an active region, change that region to a new emphasis.
@@ -4847,10 +4999,10 @@ We use a macro so that the test can happen at compilation time."
(ip (org-maybe-intangible
(list 'invisible 'org-link 'rear-nonsticky org-nonsticky-props
'keymap org-mouse-map 'mouse-face 'highlight
- 'help-echo help)))
+ 'font-lock-multiline t 'help-echo help)))
(vp (list 'rear-nonsticky org-nonsticky-props
'keymap org-mouse-map 'mouse-face 'highlight
- 'help-echo help)))
+ ' font-lock-multiline t 'help-echo help)))
;; We need to remove the invisible property here. Table narrowing
;; may have made some of this invisible.
(remove-text-properties (match-beginning 0) (match-end 0)
@@ -5035,14 +5187,17 @@ between words."
(if org-provide-checkbox-statistics
'("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
(0 (org-get-checkbox-statistics-face) t)))
+ (list (concat "^\\*+ \\(.*:" org-archive-tag ":.*\\)")
+ '(1 'org-archived prepend))
+ ;; Specials
+ '(org-do-latex-and-special-faces)
+ ;; Code
+ '(org-activate-code (1 'org-code t))
;; COMMENT
(list (concat "^\\*+[ \t]+\\<\\(" org-comment-string
"\\|" org-quote-string "\\)\\>")
'(1 'org-special-keyword t))
'("^#.*" (0 'font-lock-comment-face t))
- '("^\\*+ \\(.*:ARCHIVE:.*\\)" (1 'org-archived prepend))
- ;; Code
- '(org-activate-code (1 'org-code t))
)))
(setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
;; Now set the full font-lock-keywords
@@ -5267,12 +5422,12 @@ If KWD is a number, get the corresponding match group."
(>= (match-end 0) pos))))
t
(eq org-cycle-emulate-tab t))
- (if (and (looking-at "[ \n\r\t]")
- (string-match "^[ \t]*$" (buffer-substring
- (point-at-bol) (point))))
- (progn
- (beginning-of-line 1)
- (and (looking-at "[ \t]+") (replace-match ""))))
+; (if (and (looking-at "[ \n\r\t]")
+; (string-match "^[ \t]*$" (buffer-substring
+; (point-at-bol) (point))))
+; (progn
+; (beginning-of-line 1)
+; (and (looking-at "[ \t]+") (replace-match ""))))
(call-interactively (global-key-binding "\t")))
(t (save-excursion
@@ -5553,8 +5708,10 @@ or nil."
"Create indirect buffer and narrow it to current subtree.
With numerical prefix ARG, go up to this level and then take that tree.
If ARG is negative, go up that many levels.
-Normally this command removes the indirect buffer previously made
-with this command. However, when called with a C-u prefix, the last buffer
+If `org-indirect-buffer-display' is not `new-frame', the command removes the
+indirect buffer previously made with this command, to avoid proliferation of
+indirect buffers. However, when you call the command with a `C-u' prefix, or
+when `org-indirect-buffer-display' is `new-frame', the last buffer
is kept so that you can work with several indirect buffers at the same time.
If `org-indirect-buffer-display' is `dedicated-frame', the C-u prefix also
requests that a new frame be made for the new buffer, so that the dedicated
@@ -5574,8 +5731,9 @@ frame is not changed."
(setq beg (point)
heading (org-get-heading))
(org-end-of-subtree t) (setq end (point)))
- (if (and (not arg)
- (buffer-live-p org-last-indirect-buffer))
+ (if (and (buffer-live-p org-last-indirect-buffer)
+ (not (eq org-indirect-buffer-display 'new-frame))
+ (not arg))
(kill-buffer org-last-indirect-buffer))
(setq ibuf (org-get-indirect-buffer cbuf)
org-last-indirect-buffer ibuf)
@@ -5839,7 +5997,8 @@ would end up with no indentation after the change, nothing at all is done."
col)
(unless (save-excursion (end-of-line 1)
(re-search-forward prohibit end t))
- (while (re-search-forward "^[ \t]+" end t)
+ (while (and (< (point) end)
+ (re-search-forward "^[ \t]+" end t))
(goto-char (match-end 0))
(setq col (current-column))
(if (< diff 0) (replace-match ""))
@@ -6048,7 +6207,7 @@ If optional TREE is given, use this text instead of the kill ring."
(beginning-of-line 1)
(setq beg (point))
(insert txt)
- (unless (string-match "\n[ \t]*\\'" txt) (insert "\n"))
+ (unless (string-match "\n\\'" txt) (insert "\n"))
(setq end (point))
(goto-char beg)
;; Shift if necessary
@@ -6231,12 +6390,12 @@ WITH-CASE, the sorting considers case as well."
(cond
((= dcst ?n)
(string-to-number (buffer-substring (match-end 0)
- (line-end-position))))
+ (point-at-eol))))
((= dcst ?a)
- (buffer-substring (match-end 0) (line-end-position)))
+ (buffer-substring (match-end 0) (point-at-eol)))
((= dcst ?t)
(if (re-search-forward org-ts-regexp
- (line-end-position) t)
+ (point-at-eol) t)
(org-time-string-to-time (match-string 0))
now))
((= dcst ?f)
@@ -6252,11 +6411,11 @@ WITH-CASE, the sorting considers case as well."
((= dcst ?n)
(if (looking-at outline-regexp)
(string-to-number (buffer-substring (match-end 0)
- (line-end-position)))
+ (point-at-eol)))
nil))
((= dcst ?a)
- (funcall case-func (buffer-substring (line-beginning-position)
- (line-end-position))))
+ (funcall case-func (buffer-substring (point-at-bol)
+ (point-at-eol))))
((= dcst ?t)
(if (re-search-forward org-ts-regexp
(save-excursion
@@ -6265,7 +6424,7 @@ WITH-CASE, the sorting considers case as well."
(org-time-string-to-time (match-string 0))
now))
((= dcst ?p)
- (if (re-search-forward org-priority-regexp (line-end-position) t)
+ (if (re-search-forward org-priority-regexp (point-at-eol) t)
(string-to-char (match-string 2))
org-default-priority))
((= dcst ?r)
@@ -6405,12 +6564,13 @@ Return t when things worked, nil when we are not in an item."
((org-on-heading-p)
(setq beg (point) end (save-excursion (outline-next-heading) (point))))
((org-at-item-checkbox-p)
- (save-excursion
+ (let ((pos (point)))
(replace-match
(cond (arg "[-]")
((member (match-string 0) '("[ ]" "[-]")) "[X]")
(t "[ ]"))
- t t))
+ t t)
+ (goto-char pos))
(throw 'exit t))
(t (error "Not at a checkbox or heading, and no active region")))
(save-excursion
@@ -7174,7 +7334,8 @@ this heading."
(this-buffer (current-buffer))
(org-archive-location org-archive-location)
(re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$")
- ;; start of variables that will be used for savind context
+ ;; start of variables that will be used for saving context
+ ;; The compiler complains about them - keep them anyway!
(file (abbreviate-file-name (buffer-file-name)))
(time (format-time-string
(substring (cdr org-time-stamp-formats) 1 -1)
@@ -7752,19 +7913,23 @@ This is being used to correctly align a single field after TAB or RET.")
(make-string sp2 ?\ ) "%%%s%ds" (make-string sp1 ?\ ) "|"))
(hfmt1 (concat
(make-string sp2 ?-) "%s" (make-string sp1 ?-) "+"))
- emptystrings links dates narrow fmax f1 len c e)
+ emptystrings links dates emph narrow fmax f1 len c e)
(untabify beg end)
(remove-text-properties beg end '(org-cwidth t org-dwidth t display t))
;; Check if we have links or dates
(goto-char beg)
(setq links (re-search-forward org-bracket-link-regexp end t))
(goto-char beg)
+ (setq emph (and org-hide-emphasis-markers
+ (re-search-forward org-emph-re end t)))
+ (goto-char beg)
(setq dates (and org-display-custom-times
(re-search-forward org-ts-regexp-both end t)))
;; Make sure the link properties are right
(when links (goto-char beg) (while (org-activate-bracket-links end)))
;; Make sure the date properties are right
(when dates (goto-char beg) (while (org-activate-dates end)))
+ (when emph (goto-char beg) (while (org-do-emphasis-faces end)))
;; Check if we are narrowing any columns
(goto-char beg)
@@ -7845,13 +8010,14 @@ This is being used to correctly align a single field after TAB or RET.")
;; With invisible characters, `format' does not get the field width right
;; So we need to make these fields wide by hand.
- (when links
+ (when (or links emph)
(loop for i from 0 upto (1- maxfields) do
(setq len (nth i lengths))
(loop for j from 0 upto (1- (length fields)) do
(setq c (nthcdr i (car (nthcdr j fields))))
(if (and (stringp (car c))
- (string-match org-bracket-link-regexp (car c))
+ (text-property-any 0 (length (car c)) 'invisible 'org-link (car c))
+; (string-match org-bracket-link-regexp (car c))
(< (org-string-width (car c)) len))
(setcar c (concat (car c) (make-string (- len (org-string-width (car c))) ?\ )))))))
@@ -11186,7 +11352,7 @@ value. Each function should check if it is responsible for creating
this link (for example by looking at the major mode).
If not, it must exit and return nil.
If yes, it should return a non-nil value after a calling
-`org-store-link-properties' with a list of properties and values.
+`org-store-link-props' with a list of properties and values.
Special properties are:
:type The link prefix. like \"http\". This must be given.
@@ -11547,29 +11713,30 @@ according to FMT (default from `org-email-link-description-format')."
"]"))
(defconst org-link-escape-chars
- '((" " . "%20")
- ("[" . "%5B")
- ("]" . "%5d")
- ("\340" . "%E0") ; `a
- ("\342" . "%E2") ; ^a
- ("\347" . "%E7") ; ,c
- ("\350" . "%E8") ; `e
- ("\351" . "%E9") ; 'e
- ("\352" . "%EA") ; ^e
- ("\356" . "%EE") ; ^i
- ("\364" . "%F4") ; ^o
- ("\371" . "%F9") ; `u
- ("\373" . "%FB") ; ^u
- (";" . "%3B")
- ("?" . "%3F")
- ("=" . "%3D")
- ("+" . "%2B")
+ '((?\ . "%20")
+ (?\[ . "%5B")
+ (?\] . "%5d")
+ (?\340 . "%E0") ; `a
+ (?\342 . "%E2") ; ^a
+ (?\347 . "%E7") ; ,c
+ (?\350 . "%E8") ; `e
+ (?\351 . "%E9") ; 'e
+ (?\352 . "%EA") ; ^e
+ (?\356 . "%EE") ; ^i
+ (?\364 . "%F4") ; ^o
+ (?\371 . "%F9") ; `u
+ (?\373 . "%FB") ; ^u
+ (?\; . "%3B")
+ (?? . "%3F")
+ (?= . "%3D")
+ (?+ . "%2B")
)
"Association list of escapes for some characters problematic in links.
This is the list that is used for internal purposes.")
(defconst org-link-escape-chars-browser
- '((" " . "%20"))
+ '((?\ . "%20")) ; 32 for the SPC char
+
"Association list of escapes for some characters problematic in links.
This is the list that is used before handing over to the browser.")
@@ -11577,12 +11744,14 @@ This is the list that is used before handing over to the browser.")
"Escape charaters in TEXT that are problematic for links."
(setq table (or table org-link-escape-chars))
(when text
- (let ((re (mapconcat (lambda (x) (regexp-quote (car x)))
+ (let ((re (mapconcat (lambda (x) (regexp-quote
+ (char-to-string (car x))))
table "\\|")))
(while (string-match re text)
(setq text
(replace-match
- (cdr (assoc (match-string 0 text) table))
+ (cdr (assoc (string-to-char (match-string 0 text))
+ table))
t t text)))
text)))
@@ -11595,7 +11764,7 @@ This is the list that is used before handing over to the browser.")
(while (string-match re text)
(setq text
(replace-match
- (car (rassoc (match-string 0 text) table))
+ (char-to-string (car (rassoc (match-string 0 text) table)))
t t text)))
text)))
@@ -11981,7 +12150,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
(if (string-match "::\\(.+\\)\\'" path)
(setq search (match-string 1 path)
path (substring path 0 (match-beginning 0)))))
- (org-open-file path in-emacs line search))
+ (if (string-match "[*?{]" (file-name-nondirectory path))
+ (dired path)
+ (org-open-file path in-emacs line search)))
((string= type "news")
(org-follow-gnus-link path))
@@ -12696,6 +12867,14 @@ on the system \"/user@host:\"."
;;;; Hooks for remember.el
;;;###autoload
+(defun org-remember-insinuate ()
+ "Setup remember.el for use wiht Org-mode."
+ (require 'remember)
+ (setq remember-annotation-functions '(org-remember-annotation))
+ (setq remember-handler-functions '(org-remember-handler))
+ (add-hook 'remember-mode-hook 'org-remember-apply-template))
+
+;;;###autoload
(defun org-remember-annotation ()
"Return a link to the current location as an annotation for remember.el.
If you are using Org-mode files as target for data storage with
@@ -12713,44 +12892,51 @@ RET at beg-of-buf -> Append to file as level 2 headline
(defvar org-remember-previous-location nil)
(defvar org-force-remember-template-char) ;; dynamically scoped
+(defun org-select-remember-template (&optional use-char)
+ (when org-remember-templates
+ (let* ((templates (mapcar (lambda (x)
+ (if (stringp (car x))
+ (append (list (nth 1 x) (car x)) (cddr x))
+ (append (list (car x) "") (cdr x))))
+ org-remember-templates))
+ (char (or use-char
+ (cond
+ ((= (length templates) 1)
+ (caar templates))
+ ((and (boundp 'org-force-remember-template-char)
+ org-force-remember-template-char)
+ (if (stringp org-force-remember-template-char)
+ (string-to-char org-force-remember-template-char)
+ org-force-remember-template-char))
+ (t
+ (message "Select template: %s"
+ (mapconcat
+ (lambda (x)
+ (cond
+ ((not (string-match "\\S-" (nth 1 x)))
+ (format "[%c]" (car x)))
+ ((equal (downcase (car x))
+ (downcase (aref (nth 1 x) 0)))
+ (format "[%c]%s" (car x)
+ (substring (nth 1 x) 1)))
+ (t (format "[%c]%s" (car x) (nth 1 x)))))
+ templates " "))
+ (let ((inhibit-quit t) (char0 (read-char-exclusive)))
+ (when (equal char0 ?\C-g)
+ (jump-to-register remember-register)
+ (kill-buffer remember-buffer))
+ char0))))))
+ (cddr (assoc char templates)))))
+
;;;###autoload
(defun org-remember-apply-template (&optional use-char skip-interactive)
"Initialize *remember* buffer with template, invoke `org-mode'.
This function should be placed into `remember-mode-hook' and in fact requires
-to be run from that hook to fucntion properly."
+to be run from that hook to function properly."
+ (unless (fboundp 'remember-finalize)
+ (defalias 'remember-finalize 'remember-buffer))
(if org-remember-templates
- (let* ((templates (mapcar (lambda (x)
- (if (stringp (car x))
- (append (list (nth 1 x) (car x)) (cddr x))
- (append (list (car x) "") (cdr x))))
- org-remember-templates))
- (char (or use-char
- (cond
- ((= (length templates) 1)
- (caar templates))
- ((and (boundp 'org-force-remember-template-char)
- org-force-remember-template-char)
- (if (stringp org-force-remember-template-char)
- (string-to-char org-force-remember-template-char)
- org-force-remember-template-char))
- (t
- (message "Select template: %s"
- (mapconcat
- (lambda (x)
- (cond
- ((not (string-match "\\S-" (nth 1 x)))
- (format "[%c]" (car x)))
- ((equal (downcase (car x))
- (downcase (aref (nth 1 x) 0)))
- (format "[%c]%s" (car x) (substring (nth 1 x) 1)))
- (t (format "[%c]%s" (car x) (nth 1 x)))))
- templates " "))
- (let ((inhibit-quit t) (char0 (read-char-exclusive)))
- (when (equal char0 ?\C-g)
- (jump-to-register remember-register)
- (kill-buffer remember-buffer))
- char0)))))
- (entry (cddr (assoc char templates)))
+ (let* ((entry (org-select-remember-template use-char))
(tpl (car entry))
(plist-p (if org-store-link-plist t nil))
(file (if (and (nth 1 entry) (stringp (nth 1 entry))
@@ -12758,6 +12944,7 @@ to be run from that hook to fucntion properly."
(nth 1 entry)
org-default-notes-file))
(headline (nth 2 entry))
+ (v-c (current-kill 0)) ;; FIXME: protection needed?
(v-t (format-time-string (car org-time-stamp-formats) (org-current-time)))
(v-T (format-time-string (cdr org-time-stamp-formats) (org-current-time)))
(v-u (concat "[" (substring v-t 1 -1) "]"))
@@ -12773,11 +12960,11 @@ to be run from that hook to fucntion properly."
v-a))
(v-n user-full-name)
(org-startup-folded nil)
- org-time-was-given org-end-time-was-given x prompt char time)
+ org-time-was-given org-end-time-was-given x prompt char time pos)
(setq org-store-link-plist
(append (list :annotation v-a :initial v-i)
org-store-link-plist))
- (unless tpl (setq tpl "") (message "No template") (ding))
+ (unless tpl (setq tpl "") (message "No template") (ding) (sit-for 1))
(erase-buffer)
(insert (substitute-command-keys
(format
@@ -12794,7 +12981,7 @@ to be run from that hook to fucntion properly."
(or (cdr org-remember-previous-location) "???"))))
(insert tpl) (goto-char (point-min))
;; Simple %-escapes
- (while (re-search-forward "%\\([tTuUaiA]\\)" nil t)
+ (while (re-search-forward "%\\([tTuUaiAc]\\)" nil t)
(when (and initial (equal (match-string 0) "%i"))
(save-match-data
(let* ((lead (buffer-substring
@@ -12805,16 +12992,43 @@ to be run from that hook to fucntion properly."
(replace-match
(or (eval (intern (concat "v-" (match-string 1)))) "")
t t))
+
+ ;; %[] Insert contents of a file.
+ (goto-char (point-min))
+ (while (re-search-forward "%\\[\\(.+\\)\\]" nil t)
+ (let ((start (match-beginning 0))
+ (end (match-end 0))
+ (filename (expand-file-name (match-string 1))))
+ (goto-char start)
+ (delete-region start end)
+ (condition-case error
+ (insert-file-contents filename)
+ (error (insert (format "%%![Couldn't insert %s: %s]"
+ filename error))))))
+ ;; %() embedded elisp
+ (goto-char (point-min))
+ (while (re-search-forward "%\\((.+)\\)" nil t)
+ (goto-char (match-beginning 0))
+ (let ((template-start (point)))
+ (forward-char 1)
+ (let ((result
+ (condition-case error
+ (eval (read (current-buffer)))
+ (error (format "%%![Error: %s]" error)))))
+ (delete-region template-start (point))
+ (insert result))))
+
;; From the property list
(when plist-p
(goto-char (point-min))
(while (re-search-forward "%\\(:[-a-zA-Z]+\\)" nil t)
- (and (setq x (plist-get org-store-link-plist
- (intern (match-string 1))))
+ (and (setq x (or (plist-get org-store-link-plist
+ (intern (match-string 1))) ""))
(replace-match x t t))))
+
;; Turn on org-mode in the remember buffer, set local variables
(org-mode)
- (org-set-local 'org-finish-function 'remember-buffer)
+ (org-set-local 'org-finish-function 'remember-finalize)
(if (and file (string-match "\\S-" file) (not (file-directory-p file)))
(org-set-local 'org-default-notes-file file))
(if (and headline (stringp headline) (string-match "\\S-" headline))
@@ -12858,26 +13072,59 @@ to be run from that hook to fucntion properly."
(replace-match "")
(and (re-search-forward "^[^#\n]" nil t) (backward-char 1))))
(org-mode)
- (org-set-local 'org-finish-function 'remember-buffer)))
+ (org-set-local 'org-finish-function 'remember-finalize)))
;;;###autoload
-(defun org-remember (&optional org-force-remember-template-char)
+(defun org-remember (&optional goto org-force-remember-template-char)
"Call `remember'. If this is already a remember buffer, re-apply template.
If there is an active region, make sure remember uses it as initial content
-of the remember buffer."
+of the remember buffer.
+
+When called interactively with a `C-u' prefix argument GOTO, don't remember
+anything, just go to the file/headline where the selected templated usually
+stores its notes.
+
+Lisp programs can set ORG-FORCE-REMEMBER-TEMPLATE-CHAR to a character
+associated with a template in `org-remember-tempates'."
+ (interactive "P")
+ (if (equal goto '(4))
+ (org-go-to-remember-target)
+ (if (eq org-finish-function 'remember-buffer)
+ (progn
+ (when (< (length org-remember-templates) 2)
+ (error "No other template available"))
+ (erase-buffer)
+ (let ((annotation (plist-get org-store-link-plist :annotation))
+ (initial (plist-get org-store-link-plist :initial)))
+ (org-remember-apply-template))
+ (message "Press C-c C-c to remember data"))
+ (if (org-region-active-p)
+ (remember (buffer-substring (point) (mark)))
+ (call-interactively 'remember)))))
+
+(defun org-go-to-remember-target (&optional template-key)
+ "Go to the target location of a remember template.
+The user is queried for the template."
(interactive)
- (if (eq org-finish-function 'remember-buffer)
- (progn
- (when (< (length org-remember-templates) 2)
- (error "No other template available"))
- (erase-buffer)
- (let ((annotation (plist-get org-store-link-plist :annotation))
- (initial (plist-get org-store-link-plist :initial)))
- (org-remember-apply-template))
- (message "Press C-c C-c to remember data"))
- (if (org-region-active-p)
- (remember (buffer-substring (point) (mark)))
- (call-interactively 'remember))))
+ (let* ((entry (org-select-remember-template template-key))
+ (file (nth 1 entry))
+ (heading (nth 2 entry))
+ visiting)
+ (unless (and file (stringp file) (string-match "\\S-" file))
+ (setq file org-default-notes-file))
+ (unless (and heading (stringp heading) (string-match "\\S-" heading))
+ (setq heading org-remember-default-headline))
+ (setq visiting (org-find-base-buffer-visiting file))
+ (if (not visiting) (find-file-noselect file))
+ (switch-to-buffer (or visiting (get-file-buffer file)))
+ (widen)
+ (goto-char (point-min))
+ (if (re-search-forward
+ (concat "^\\*+[ \t]+" (regexp-quote heading)
+ (org-re "\\([ \t]+:[[:alnum:]@_:]*\\)?[ \t]*$"))
+ nil t)
+ (goto-char (match-beginning 0))
+ (error "Target headline not found: %s" heading))))
(defvar org-note-abort nil) ; dynamically scoped
@@ -12921,7 +13168,6 @@ See also the variable `org-reverse-note-order'."
(while (looking-at "^[ \t]*\n\\|^##.*\n")
(replace-match ""))
(goto-char (point-max))
- (unless (equal (char-before) ?\n) (insert "\n"))
(catch 'quit
(if org-note-abort (throw 'quit nil))
(let* ((txt (buffer-substring (point-min) (point-max)))
@@ -12952,9 +13198,17 @@ See also the variable `org-reverse-note-order'."
" (" (remember-buffer-desc) ")")
indent " "))
(if (and org-adapt-indentation indent)
- (setq lines (mapcar (lambda (x) (concat indent x)) lines)))
+ (setq lines (mapcar
+ (lambda (x)
+ (if (string-match "\\S-" x)
+ (concat indent x) x))
+ lines)))
(setq txt (concat first "\n"
(mapconcat 'identity lines "\n"))))
+ (if (string-match "\n[ \t]*\n[ \t\n]*\\'" txt)
+ (setq txt (replace-match "\n\n" t t txt))
+ (if (string-match "[ \t\n]*\\'" txt)
+ (setq txt (replace-match "\n" t t txt))))
;; Find the file
(if (not visiting) (find-file-noselect file))
(with-current-buffer (or visiting (get-file-buffer file))
@@ -13185,7 +13439,8 @@ This function can be used in a hook."
(defconst org-additional-option-like-keywords
'("BEGIN_HTML" "BEGIN_LaTeX" "END_HTML" "END_LaTeX"
- "ORGTBL" "HTML:" "LaTeX:" "BEGIN:" "END:" "DATE:"))
+ "ORGTBL" "HTML:" "LaTeX:" "BEGIN:" "END:" "DATE:" "TBLFM"
+ "BEGIN_EXAMPLE" "END_EXAMPLE"))
(defun org-complete (&optional arg)
"Perform completion on word at point.
@@ -13306,13 +13561,14 @@ At all other locations, this simply calls the value of
(interactive)
(save-excursion
(org-back-to-heading)
- (if (looking-at (concat outline-regexp
- "\\( *\\<" org-comment-string "\\>[ \t]*\\)"))
- (replace-match "" t t nil 1)
- (if (looking-at outline-regexp)
- (progn
- (goto-char (match-end 0))
- (insert org-comment-string " "))))))
+ (let (case-fold-search)
+ (if (looking-at (concat outline-regexp
+ "\\( *\\<" org-comment-string "\\>[ \t]*\\)"))
+ (replace-match "" t t nil 1)
+ (if (looking-at outline-regexp)
+ (progn
+ (goto-char (match-end 0))
+ (insert org-comment-string " ")))))))
(defvar org-last-todo-state-is-todo nil
"This is non-nil when the last TODO state change led to a TODO state.
@@ -13412,7 +13668,7 @@ For calling through lisp, arg is also interpreted in the following way:
(or (looking-at (concat " +" org-todo-regexp " *"))
(looking-at " *"))
(let* ((match-data (match-data))
- (startpos (line-beginning-position))
+ (startpos (point-at-bol))
(logging (save-match-data (org-entry-get nil "LOGGING" t)))
(org-log-done (org-parse-local-options logging 'org-log-done))
(org-log-repeat (org-parse-local-options logging 'org-log-repeat))
@@ -13889,7 +14145,7 @@ The auto-repeater uses this.")
(end-of-line 1)
(if (not (bolp)) (let ((inhibit-read-only t)) (insert "\n")))
(indent-relative nil)
- (insert " - " (pop lines))
+ (insert "- " (pop lines))
(org-indent-line-function)
(beginning-of-line 1)
(looking-at "[ \t]*")
@@ -13918,9 +14174,11 @@ p Enter a property name and its value (both with completion on existing
r Show entries matching a regular expression"
(interactive "P")
(let (ans kwd value)
- (message "Sparse tree: [r]egexp [t]odo-kwd [T]ag [p]roperty")
+ (message "Sparse tree: [/]regexp [t]odo-kwd [T]ag [p]roperty [d]eadlines")
(setq ans (read-char-exclusive))
(cond
+ ((equal ans ?d)
+ (call-interactively 'org-check-deadlines))
((equal ans ?t)
(org-show-todo-tree '(4)))
((equal ans ?T)
@@ -13933,7 +14191,7 @@ r Show entries matching a regular expression"
(unless (string-match "\\`{.*}\\'" value)
(setq value (concat "\"" value "\"")))
(org-tags-sparse-tree arg (concat kwd "=" value)))
- ((member ans '(?r ?R))
+ ((member ans '(?r ?R ?/))
(call-interactively 'org-occur))
(t (error "No such sparse tree command \"%c\"" ans)))))
@@ -13984,12 +14242,13 @@ How much context is shown depends upon the variables
(let ((heading-p (org-on-heading-p t))
(hierarchy-p (org-get-alist-option org-show-hierarchy-above key))
(following-p (org-get-alist-option org-show-following-heading key))
+ (entry-p (org-get-alist-option org-show-entry-below key))
(siblings-p (org-get-alist-option org-show-siblings key)))
(catch 'exit
;; Show heading or entry text
- (if heading-p
+ (if (and heading-p (not entry-p))
(org-flag-heading nil) ; only show the heading
- (and (or (org-invisible-p) (org-invisible-p2))
+ (and (or entry-p (org-invisible-p) (org-invisible-p2))
(org-show-hidden-entry))) ; show entire entry
(when following-p
;; Show next sibling, or heading below text
@@ -14224,11 +14483,13 @@ MATCH can contain positive and negative selection of tags, like
If optional argument TODO_ONLY is non-nil, only select lines that are
also TODO lines."
(interactive "P")
+ (org-prepare-agenda-buffers (list (current-buffer)))
(org-scan-tags 'sparse-tree (cdr (org-make-tags-matcher match)) todo-only))
(defvar org-cached-props nil)
(defun org-cached-entry-get (pom property)
- (if org-use-property-inheritance
+ (if (or (eq t org-use-property-inheritance)
+ (member property org-use-property-inheritance))
;; Caching is not possible, check it directly
(org-entry-get pom property 'inherit)
;; Get all properties, so that we can do complicated checks easily
@@ -14266,7 +14527,7 @@ also TODO lines."
(re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL=\\([0-9]+\\)\\|\\([[:alnum:]_]+\\)=\\({[^}]+}\\|\"[^\"]+\"\\)\\|[[:alnum:]_@]+\\)"))
minus tag mm
tagsmatch todomatch tagsmatcher todomatcher kwd matcher
- orterms term orlist re-p level-p prop-p pn pv)
+ orterms term orlist re-p level-p prop-p pn pv cat-p gv)
(if (string-match "/+" match)
;; match contains also a todo-matching request
(progn
@@ -14300,11 +14561,15 @@ also TODO lines."
(prop-p
(setq pn (match-string 4 term)
pv (match-string 5 term)
+ cat-p (equal pn "CATEGORY")
re-p (equal (string-to-char pv) ?{)
pv (substring pv 1 -1))
+ (if (equal pn "CATEGORY")
+ (setq gv '(get-text-property (point) 'org-category))
+ (setq gv `(org-cached-entry-get nil ,pn)))
(if re-p
- `(string-match ,pv (or (org-cached-entry-get nil ,pn) ""))
- `(equal ,pv (org-cached-entry-get nil ,pn))))
+ `(string-match ,pv (or ,gv ""))
+ `(equal ,pv ,gv)))
(t `(member ,(downcase tag) tags-list)))
mm (if minus (list 'not mm) mm)
term (substring term (match-end 0)))
@@ -15096,6 +15361,7 @@ internally: ARCHIVE, CATEGORY, SUMMARY, DESCRIPTION, LOCATION, and LOGGING."
(and (equal (char-after) ?\n) (forward-char 1))
(org-skip-over-state-notes)
(skip-chars-backward " \t\n\r")
+ (if (eq (char-before) ?*) (forward-char 1))
(let ((inhibit-read-only t)) (insert "\n:PROPERTIES:\n:END:"))
(beginning-of-line 0)
(indent-to-column indent)
@@ -15612,7 +15878,7 @@ Where possible, use the standard interface for changing this line."
(defmacro org-no-warnings (&rest body)
(cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body))
-
+
(defun org-columns-eval (form)
(let (hidep)
(save-excursion
@@ -15756,7 +16022,7 @@ Where possible, use the standard interface for changing this line."
(setq width (string-to-number width))
(setq width nil))
(setq fmt (completing-read "Summary [none]: "
- '(("none") ("add_numbers") ("add_times") ("checkbox"))
+ '(("none") ("add_numbers") ("currency") ("add_times") ("checkbox"))
nil t))
(if (string-match "\\S-" fmt)
(setq fmt (intern fmt))
@@ -15959,6 +16225,7 @@ display, or in the #+COLUMNS line of the current buffer."
(level 0)
(ass (assoc property org-columns-current-fmt-compiled))
(format (nth 4 ass))
+ (printf (nth 5 ass))
(beg org-columns-top-level-marker)
last-level val valflag flag end sumpos sum-alist sum str str1 useval)
(save-excursion
@@ -15978,7 +16245,7 @@ display, or in the #+COLUMNS line of the current buffer."
;; put the sum of lower levels here as a property
(setq sum (aref lsum last-level) ; current sum
flag (aref lflag last-level) ; any valid entries from children?
- str (org-column-number-to-string sum format)
+ str (org-column-number-to-string sum format printf)
str1 (org-add-props (copy-sequence str) nil 'org-computed t 'face 'bold)
useval (if flag str1 (if valflag val ""))
sum-alist (get-text-property sumpos 'org-summaries))
@@ -16035,7 +16302,7 @@ display, or in the #+COLUMNS line of the current buffer."
(setq sum (+ (string-to-number (pop l)) (/ sum 60))))
sum)))
-(defun org-column-number-to-string (n fmt)
+(defun org-column-number-to-string (n fmt printf)
"Convert a computed column number to a string value, according to FMT."
(cond
((eq fmt 'add_times)
@@ -16045,6 +16312,9 @@ display, or in the #+COLUMNS line of the current buffer."
(cond ((= n (floor n)) "[X]")
((> n 1.) "[-]")
(t "[ ]")))
+ (printf (format printf n))
+ ((eq fmt 'currency)
+ (format "%.2f" n))
(t (number-to-string n))))
(defun org-column-string-to-number (s fmt)
@@ -16061,17 +16331,20 @@ display, or in the #+COLUMNS line of the current buffer."
(defun org-columns-uncompile-format (cfmt)
"Turn the compiled columns format back into a string representation."
- (let ((rtn "") e s prop title op width fmt)
+ (let ((rtn "") e s prop title op width fmt printf)
(while (setq e (pop cfmt))
(setq prop (car e)
title (nth 1 e)
width (nth 2 e)
op (nth 3 e)
- fmt (nth 4 e))
+ fmt (nth 4 e)
+ printf (nth 5 e))
(cond
((eq fmt 'add_times) (setq op ":"))
((eq fmt 'checkbox) (setq op "X"))
- ((eq fmt 'add_numbers) (setq op "+")))
+ ((eq fmt 'add_numbers) (setq op "+"))
+ ((eq fmt 'currency) (setq op "$")))
+ (if (and op printf) (setq op (concat op ";" printf)))
(if (equal title prop) (setq title nil))
(setq s (concat "%" (if width (number-to-string width))
prop
@@ -16088,8 +16361,9 @@ property the property
title the title field for the columns
width the column width in characters, can be nil for automatic
operator the operator if any
-format the output format for computed results, derived from operator"
- (let ((start 0) width prop title op f)
+format the output format for computed results, derived from operator
+printf a printf format for computed values"
+ (let ((start 0) width prop title op f printf)
(setq org-columns-current-fmt-compiled nil)
(while (string-match
(org-re "%\\([0-9]+\\)?\\([[:alnum:]_-]+\\)\\(?:(\\([^)]+\\))\\)?\\(?:{\\([^}]+\\)}\\)?\\s-*")
@@ -16099,13 +16373,18 @@ format the output format for computed results, derived from operator"
prop (match-string 2 fmt)
title (or (match-string 3 fmt) prop)
op (match-string 4 fmt)
- f nil)
+ f nil
+ printf nil)
(if width (setq width (string-to-number width)))
+ (when (and op (string-match ";" op))
+ (setq printf (substring op (match-end 0))
+ op (substring op 0 (match-beginning 0))))
(cond
((equal op "+") (setq f 'add_numbers))
+ ((equal op "$") (setq f 'currency))
((equal op ":") (setq f 'add_times))
((equal op "X") (setq f 'checkbox)))
- (push (list prop title width op f) org-columns-current-fmt-compiled))
+ (push (list prop title width op f printf) org-columns-current-fmt-compiled))
(setq org-columns-current-fmt-compiled
(nreverse org-columns-current-fmt-compiled))))
@@ -16234,28 +16513,30 @@ So if you press just return without typing anything, the time stamp
will represent the current date/time. If there is already a timestamp
at the cursor, it will be modified."
(interactive "P")
- (let ((default-time
- ;; Default time is either today, or, when entering a range,
- ;; the range start.
- (if (or (org-at-timestamp-p t)
- (save-excursion
- (re-search-backward
- (concat org-ts-regexp "--?-?\\=") ; 1-3 minuses
- (- (point) 20) t)))
- (apply 'encode-time (org-parse-time-string (match-string 1)))
- (current-time)))
- org-time-was-given org-end-time-was-given time)
+ (let* ((ts nil)
+ (default-time
+ ;; Default time is either today, or, when entering a range,
+ ;; the range start.
+ (if (or (and (org-at-timestamp-p t) (setq ts (match-string 0)))
+ (save-excursion
+ (re-search-backward
+ (concat org-ts-regexp "--?-?\\=") ; 1-3 minuses
+ (- (point) 20) t)))
+ (apply 'encode-time (org-parse-time-string (match-string 1)))
+ (current-time)))
+ (default-input (and ts (org-get-compact-tod ts)))
+ org-time-was-given org-end-time-was-given time)
(cond
((and (org-at-timestamp-p)
(eq last-command 'org-time-stamp)
(eq this-command 'org-time-stamp))
(insert "--")
(setq time (let ((this-command this-command))
- (org-read-date arg 'totime nil nil default-time)))
+ (org-read-date arg 'totime nil nil default-time default-input)))
(org-insert-time-stamp time (or org-time-was-given arg)))
((org-at-timestamp-p)
(setq time (let ((this-command this-command))
- (org-read-date arg 'totime nil nil default-time)))
+ (org-read-date arg 'totime nil nil default-time default-input)))
(when (org-at-timestamp-p) ; just to get the match data
(replace-match "")
(setq org-last-changed-timestamp
@@ -16265,10 +16546,28 @@ at the cursor, it will be modified."
(message "Timestamp updated"))
(t
(setq time (let ((this-command this-command))
- (org-read-date arg 'totime nil nil default-time)))
+ (org-read-date arg 'totime nil nil default-time default-input)))
(org-insert-time-stamp time (or org-time-was-given arg)
nil nil nil (list org-end-time-was-given))))))
+;; FIXME: can we use this for something else????
+;; like computing time differences?????
+(defun org-get-compact-tod (s)
+ (when (string-match "\\(\\([012]?[0-9]\\):\\([0-5][0-9]\\)\\)\\(-\\(\\([012]?[0-9]\\):\\([0-5][0-9]\\)\\)\\)?" s)
+ (let* ((t1 (match-string 1 s))
+ (h1 (string-to-number (match-string 2 s)))
+ (m1 (string-to-number (match-string 3 s)))
+ (t2 (and (match-end 4) (match-string 5 s)))
+ (h2 (and t2 (string-to-number (match-string 6 s))))
+ (m2 (and t2 (string-to-number (match-string 7 s))))
+ dh dm)
+ (if (not t2)
+ t1
+ (setq dh (- h2 h1) dm (- m2 m1))
+ (if (< dm 0) (setq dm (+ dm 60) dh (1- dh)))
+ (concat t1 "+" (number-to-string dh)
+ (if (/= 0 dm) (concat ":" (number-to-string dm))))))))
+
(defun org-time-stamp-inactive (&optional arg)
"Insert an inactive time stamp.
An inactive time stamp is enclosed in square brackets instead of angle
@@ -16289,9 +16588,13 @@ So these are more for recording a certain time/date."
(defvar org-ans2) ; dynamically scoped parameter
(defvar org-plain-time-of-day-regexp) ; defined below
+
+(defvar org-read-date-overlay nil)
+(defvar org-dcst nil) ; dynamically scoped
+
(defun org-read-date (&optional with-time to-time from-string prompt
- default-time)
- "Read a date and make things smooth for the user.
+ default-time default-input)
+ "Read a date, possibly a time, and make things smooth for the user.
The prompt will suggest to enter an ISO date, but you can also enter anything
which will at least partially be understood by `parse-time-string'.
Unrecognized parts of the date will default to the current day, month, year,
@@ -16325,7 +16628,7 @@ While prompting, a calendar is popped up - you can also select the
date with the mouse (button 1). The calendar shows a period of three
months. To scroll it to other months, use the keys `>' and `<'.
If you don't like the calendar, turn it off with
- \(setq org-popup-calendar-for-date-prompt nil)
+ \(setq org-read-date-popup-calendar nil)
With optional argument TO-TIME, the date will immediately be converted
to an internal time.
@@ -16334,29 +16637,35 @@ insert a time. Note that when WITH-TIME is not set, you can still
enter a time, and this function will inform the calling routine about
this change. The calling routine may then choose to change the format
used to insert the time stamp into the buffer to include the time.
-With optional argument FROM-STRING, read fomr this string instead from
+With optional argument FROM-STRING, read from this string instead from
the user. PROMPT can overwrite the default prompt. DEFAULT-TIME is
the time/date that is used for everything that is not specified by the
user."
(require 'parse-time)
(let* ((org-time-stamp-rounding-minutes
(if (equal with-time '(16)) 0 org-time-stamp-rounding-minutes))
+ (org-dcst org-display-custom-times)
(ct (org-current-time))
(def (or default-time ct))
(defdecode (decode-time def))
+ (dummy (progn
+ (when (< (nth 2 defdecode) org-extend-today-until)
+ (setcar (nthcdr 2 defdecode) -1)
+ (setcar (nthcdr 1 defdecode) 59)
+ (setq def (apply 'encode-time defdecode)
+ defdecode (decode-time def)))))
(calendar-move-hook nil)
(view-diary-entries-initially nil)
(view-calendar-holidays-initially nil)
(timestr (format-time-string
(if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
(prompt (concat (if prompt (concat prompt " ") "")
- (format "Date and/or time (default [%s]): " timestr)))
- ans (org-ans0 "") org-ans1 org-ans2 delta deltan deltaw deltadef
- second minute hour day month year tl wday wday1 pm h2 m2)
+ (format "Date+time [%s]: " timestr)))
+ ans (org-ans0 "") org-ans1 org-ans2 final)
(cond
(from-string (setq ans from-string))
- (org-popup-calendar-for-date-prompt
+ (org-read-date-popup-calendar
(save-excursion
(save-window-excursion
(calendar)
@@ -16378,6 +16687,12 @@ user."
(org-defkey minibuffer-local-map [(meta shift right)]
(lambda () (interactive)
(org-eval-in-calendar '(calendar-forward-month 1))))
+ (org-defkey minibuffer-local-map [(meta shift up)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-backward-year 1))))
+ (org-defkey minibuffer-local-map [(meta shift down)]
+ (lambda () (interactive)
+ (org-eval-in-calendar '(calendar-forward-year 1))))
(org-defkey minibuffer-local-map [(shift up)]
(lambda () (interactive)
(org-eval-in-calendar '(calendar-backward-week 1))))
@@ -16399,15 +16714,75 @@ user."
(unwind-protect
(progn
(use-local-map map)
- (setq org-ans0 (read-string prompt "" nil nil))
+ (add-hook 'post-command-hook 'org-read-date-display)
+ (setq org-ans0 (read-string prompt default-input nil nil))
;; org-ans0: from prompt
;; org-ans1: from mouse click
;; org-ans2: from calendar motion
(setq ans (concat org-ans0 " " (or org-ans1 org-ans2))))
- (use-local-map old-map))))))
+ (remove-hook 'post-command-hook 'org-read-date-display)
+ (use-local-map old-map)
+ (when org-read-date-overlay
+ (org-delete-overlay org-read-date-overlay)
+ (setq org-read-date-overlay nil)))))))
+
(t ; Naked prompt only
- (setq ans (read-string prompt "" nil timestr))))
- (org-detach-overlay org-date-ovl)
+ (unwind-protect
+ (setq ans (read-string prompt default-input nil timestr))
+ (when org-read-date-overlay
+ (org-delete-overlay org-read-date-overlay)
+ (setq org-read-date-overlay nil)))))
+
+ (setq final (org-read-date-analyze ans def defdecode))
+
+ (if to-time
+ (apply 'encode-time final)
+ (if (and (boundp 'org-time-was-given) org-time-was-given)
+ (format "%04d-%02d-%02d %02d:%02d"
+ (nth 5 final) (nth 4 final) (nth 3 final)
+ (nth 2 final) (nth 1 final))
+ (format "%04d-%02d-%02d" (nth 5 final) (nth 4 final) (nth 3 final))))))
+(defvar def)
+(defvar defdecode)
+(defvar with-time)
+(defun org-read-date-display ()
+ "Display the currrent date prompt interpretation in the minibuffer."
+ (when org-read-date-display-live
+ (when org-read-date-overlay
+ (org-delete-overlay org-read-date-overlay))
+ (let ((p (point)))
+ (end-of-line 1)
+ (while (not (equal (buffer-substring
+ (max (point-min) (- (point) 4)) (point))
+ " "))
+ (insert " "))
+ (goto-char p))
+ (let* ((ans (concat (buffer-substring (point-at-bol) (point-max))
+ " " (or org-ans1 org-ans2)))
+ (org-end-time-was-given nil)
+ (f (org-read-date-analyze ans def defdecode))
+ (fmts (if org-dcst
+ org-time-stamp-custom-formats
+ org-time-stamp-formats))
+ (fmt (if (or with-time
+ (and (boundp 'org-time-was-given) org-time-was-given))
+ (cdr fmts)
+ (car fmts)))
+ (txt (concat "=> " (format-time-string fmt (apply 'encode-time f)))))
+ (when (and org-end-time-was-given
+ (string-match org-plain-time-of-day-regexp txt))
+ (setq txt (concat (substring txt 0 (match-end 0)) "-"
+ org-end-time-was-given
+ (substring txt (match-end 0)))))
+ (setq org-read-date-overlay
+ (make-overlay (1- (point-at-eol)) (point-at-eol)))
+ (org-overlay-display org-read-date-overlay txt 'secondary-selection))))
+
+(defun org-read-date-analyze (ans def defdecode)
+ "Analyze the combined answer of the date prompt."
+ ;; FIXME: cleanup and comment
+ (let (delta deltan deltaw deltadef year month day
+ hour minute second wday pm h2 m2 tl wday1)
(when (setq delta (org-read-date-get-relative ans (current-time) def))
(setq ans (replace-match "" t t ans)
@@ -16450,22 +16825,32 @@ user."
h2 (+ hour (string-to-number (match-string 3 ans)))
minute (string-to-number (match-string 2 ans))
m2 (+ minute (if (match-end 5) (string-to-number (match-string 5 ans))0)))
+ (if (>= m2 60) (setq h2 (1+ h2) m2 (- m2 60)))
(setq ans (replace-match (format "%02d:%02d-%02d:%02d" hour minute h2 m2) t t ans)))
;; Check if there is a time range
- (when (and (boundp 'org-end-time-was-given)
- (string-match org-plain-time-of-day-regexp ans)
- (match-end 8))
- (setq org-end-time-was-given (match-string 8 ans))
- (setq ans (concat (substring ans 0 (match-beginning 7))
- (substring ans (match-end 7)))))
+ (when (boundp 'org-end-time-was-given)
+ (setq org-time-was-given nil)
+ (when (and (string-match org-plain-time-of-day-regexp ans)
+ (match-end 8))
+ (setq org-end-time-was-given (match-string 8 ans))
+ (setq ans (concat (substring ans 0 (match-beginning 7))
+ (substring ans (match-end 7))))))
(setq tl (parse-time-string ans)
- day (or (nth 3 tl) (string-to-number (format-time-string "%d" def)))
- month (or (nth 4 tl) (string-to-number (format-time-string "%m" def)))
- year (or (nth 5 tl) (string-to-number (format-time-string "%Y" def)))
- hour (or (nth 2 tl) (string-to-number (format-time-string "%H" def)))
- minute (or (nth 1 tl) (string-to-number (format-time-string "%M" def)))
+ day (or (nth 3 tl) (nth 3 defdecode))
+ month (or (nth 4 tl)
+ (if (and org-read-date-prefer-future
+ (nth 3 tl) (< (nth 3 tl) (nth 3 defdecode)))
+ (1+ (nth 4 defdecode))
+ (nth 4 defdecode)))
+ year (or (nth 5 tl)
+ (if (and org-read-date-prefer-future
+ (nth 4 tl) (< (nth 4 tl) (nth 4 defdecode)))
+ (1+ (nth 5 defdecode))
+ (nth 5 defdecode)))
+ hour (or (nth 2 tl) (nth 2 defdecode))
+ minute (or (nth 1 tl) (nth 1 defdecode))
second (or (nth 0 tl) 0)
wday (nth 6 tl))
(when deltan
@@ -16486,25 +16871,8 @@ user."
(nth 2 tl))
(setq org-time-was-given t))
(if (< year 100) (setq year (+ 2000 year)))
- (if to-time
- (encode-time second minute hour day month year)
- (if (or (nth 1 tl) (nth 2 tl))
- (format "%04d-%02d-%02d %02d:%02d" year month day hour minute)
- (format "%04d-%02d-%02d" year month day)))))
-
-;(defun org-parse-for-shift (n1 n2 given-dec default-dec)
-; (cond
-; ((not (nth n1 given-dec))
-; (nth n1 default-dec))
-; ((or (> (nth n1 given-dec) (nth n1 (default-dec)))
-; (not org-read-date-prefer-future))
-; (nth n1 given-dec))
-; (t (1+
-; (if (nth 3 given-dec)
-; (nth 3 given-dec)
-; (if (> (nth
-; (setq given
-; (if (and
+ (if (< year 1970) (setq year (nth 5 defdecode))) ; not representable
+ (list second minute hour day month year)))
(defvar parse-time-weekdays)
@@ -16551,17 +16919,18 @@ Also, store the cursor date in variable org-ans2."
(time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
(setq org-ans2 (format-time-string "%Y-%m-%d" time))))
(org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
- (select-window sw)
- ;; Update the prompt to show new default date
- (save-excursion
- (goto-char (point-min))
- (when (and org-ans2
- (re-search-forward "\\[[-0-9]+\\]" nil t)
- (get-text-property (match-end 0) 'field))
- (let ((inhibit-read-only t))
- (replace-match (concat "[" org-ans2 "]") t t)
- (add-text-properties (point-min) (1+ (match-end 0))
- (text-properties-at (1+ (point-min)))))))))
+ (select-window sw)))
+
+; ;; Update the prompt to show new default date
+; (save-excursion
+; (goto-char (point-min))
+; (when (and org-ans2
+; (re-search-forward "\\[[-0-9]+\\]" nil t)
+; (get-text-property (match-end 0) 'field))
+; (let ((inhibit-read-only t))
+; (replace-match (concat "[" org-ans2 "]") t t)
+; (add-text-properties (point-min) (1+ (match-end 0))
+; (text-properties-at (1+ (point-min)))))))))
(defun org-calendar-select ()
"Return to `org-read-date' with the date currently selected.
@@ -16788,10 +17157,12 @@ days in order to avoid rounding problems."
h 0 m 0))
(if (not to-buffer)
(message (org-make-tdiff-string y d h m))
- (when (org-at-table-p)
- (goto-char match-end)
- (setq align t)
- (and (looking-at " *|") (goto-char (match-end 0))))
+ (if (org-at-table-p)
+ (progn
+ (goto-char match-end)
+ (setq align t)
+ (and (looking-at " *|") (goto-char (match-end 0))))
+ (goto-char match-end))
(if (looking-at
"\\( *-? *[0-9]+y\\)?\\( *[0-9]+d\\)? *[0-9][0-9]:[0-9][0-9]")
(replace-match ""))
@@ -16840,7 +17211,10 @@ D may be an absolute day number, or a calendar-type list (month day year)."
(defun org-calendar-holiday ()
"List of holidays, for Diary display in Org-mode."
- (let ((hl (check-calendar-holidays date)))
+ (require 'holidays)
+ (let ((hl (funcall
+ (if (fboundp 'calendar-check-holidays)
+ 'calendar-check-holidays 'check-calendar-holidays) date)))
(if hl (mapconcat 'identity hl "; "))))
(defun org-diary-sexp-entry (sexp entry date)
@@ -16864,7 +17238,7 @@ D may be an absolute day number, or a calendar-type list (month day year)."
(t nil))))
(defun org-diary-to-ical-string (frombuf)
- "Get iCalendar entreis from diary entries in buffer FROMBUF.
+ "Get iCalendar entries from diary entries in buffer FROMBUF.
This uses the icalendar.el library."
(let* ((tmpdir (if (featurep 'xemacs)
(temp-directory)
@@ -17939,8 +18313,10 @@ The following commands are available:
(org-defkey org-agenda-mode-map "f" 'org-agenda-follow-mode)
(org-defkey org-agenda-mode-map "l" 'org-agenda-log-mode)
(org-defkey org-agenda-mode-map "D" 'org-agenda-toggle-diary)
-(org-defkey org-agenda-mode-map "g" 'org-agenda-toggle-time-grid)
+(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" 'org-agenda-redo)
+(org-defkey org-agenda-mode-map "e" 'org-agenda-execute)
(org-defkey org-agenda-mode-map "q" 'org-agenda-quit)
(org-defkey org-agenda-mode-map "x" 'org-agenda-exit)
(org-defkey org-agenda-mode-map "\C-x\C-w" 'org-write-agenda)
@@ -18325,10 +18701,10 @@ L Timeline for current buffer # List stuck projects (!=configure)
(when (eq rmheader t)
(goto-line 1)
(re-search-forward ":" nil t)
- (delete-region (match-end 0) (line-end-position))
+ (delete-region (match-end 0) (point-at-eol))
(forward-char 1)
(looking-at "-+")
- (delete-region (match-end 0) (line-end-position))
+ (delete-region (match-end 0) (point-at-eol))
(move-marker header-end (match-end 0)))
(goto-char header-end)
(delete-region (point) (point-max))
@@ -18905,10 +19281,9 @@ Optional argument FILE means, use this file instead of the current."
(interactive)
(mapc (lambda (o) (if (eq (org-overlay-get o 'org-type) 'org-priority)
(org-delete-overlay o)))
- (overlays-in (point-min) (point-max)))
+ (org-overlays-in (point-min) (point-max)))
(save-excursion
- (let ((ovs (org-overlays-in (point-min) (point-max)))
- (inhibit-read-only t)
+ (let ((inhibit-read-only t)
b e p ov h l)
(goto-char (point-min))
(while (re-search-forward "\\[#\\(.\\)\\]" nil t)
@@ -18917,7 +19292,7 @@ Optional argument FILE means, use this file instead of the current."
l (or (get-char-property (point) 'org-lowest-priority)
org-lowest-priority)
p (string-to-char (match-string 1))
- b (match-beginning 0) e (line-end-position)
+ b (match-beginning 0) e (point-at-eol)
ov (org-make-overlay b e))
(org-overlay-put
ov 'face
@@ -18939,8 +19314,10 @@ Optional argument FILE means, use this file instead of the current."
(save-excursion
(save-restriction
(while (setq file (pop files))
- (org-check-agenda-file file)
- (set-buffer (org-get-agenda-file-buffer file))
+ (if (bufferp file)
+ (set-buffer file)
+ (org-check-agenda-file file)
+ (set-buffer (org-get-agenda-file-buffer file)))
(widen)
(setq bmp (buffer-modified-p))
(org-refresh-category-properties)
@@ -19226,7 +19603,9 @@ given in `org-agenda-start-on-weekday'."
org-agenda-start-on-weekday nil))
(thefiles (org-agenda-files))
(files thefiles)
- (today (time-to-days (current-time)))
+ (today (time-to-days
+ (time-subtract (current-time)
+ (list 0 (* 3600 org-extend-today-until) 0))))
(sd (or start-day today))
(start (if (or (null org-agenda-start-on-weekday)
(< org-agenda-ndays 7))
@@ -19501,6 +19880,7 @@ to skip this subtree. This is a function that can be put into
"Skip entry if any of CONDITIONS is true.
See `org-agenda-skip-if for details."
(org-agenda-skip-if nil conditions))
+
(defun org-agenda-skip-subtree-if (&rest conditions)
"Skip entry if any of CONDITIONS is true.
See `org-agenda-skip-if for details."
@@ -19527,7 +19907,7 @@ The regexp is taken from the conditions list, it must com right after the
If any of these conditions is met, this function returns the end point of
the entity, causing the search to continue from there. This is a function
that can be put into `org-agenda-skip-function' for the duration of a command."
- (let (beg end m r)
+ (let (beg end m)
(org-back-to-heading t)
(setq beg (point)
end (if subtree
@@ -19545,13 +19925,14 @@ that can be put into `org-agenda-skip-function' for the duration of a command."
(and (memq 'notdeadline conditions)
(not (re-search-forward org-deadline-time-regexp end t)))
(and (setq m (memq 'regexp conditions))
- (stringp (setq r (nth 1 m)))
+ (stringp (nth 1 m))
(re-search-forward (nth 1 m) end t))
(and (setq m (memq 'notregexp conditions))
- (stringp (setq r (nth 1 m)))
+ (stringp (nth 1 m))
(not (re-search-forward (nth 1 m) end t))))
end)))
+;;;###autoload
(defun org-agenda-list-stuck-projects (&rest ignore)
"Create agenda view for projects that are stuck.
Stuck projects are project that have no next actions. For the definitions
@@ -19947,7 +20328,7 @@ the documentation of `org-diary'."
"\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)"
"\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
marker hdmarker deadlinep scheduledp donep tmp priority category
- ee txt timestr tags b0 b3 e3)
+ ee txt timestr tags b0 b3 e3 head)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(setq b0 (match-beginning 0)
@@ -19981,8 +20362,10 @@ the documentation of `org-diary'."
(setq hdmarker (org-agenda-new-marker)
tags (org-get-tags-at))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
+ (setq head (match-string 1))
+ (and org-agenda-skip-timestamp-if-done donep (throw :skip t))
(setq txt (org-format-agenda-item
- nil (match-string 1) category tags timestr nil
+ nil head category tags timestr nil
remove-re)))
(setq txt org-agenda-no-heading-message))
(setq priority (org-get-priority txt))
@@ -20254,7 +20637,8 @@ FRACTION is what fraction of the head-warning time has passed."
(abbreviate-file-name buffer-file-name))))
(regexp org-tr-regexp)
(d0 (calendar-absolute-from-gregorian date))
- marker hdmarker ee txt d1 d2 s1 s2 timestr category tags pos)
+ marker hdmarker ee txt d1 d2 s1 s2 timestr category tags pos
+ donep head)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@@ -20277,10 +20661,14 @@ FRACTION is what fraction of the head-warning time has passed."
(setq hdmarker (org-agenda-new-marker (point)))
(setq tags (org-get-tags-at))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
+ (setq head (match-string 1))
+ (and org-agenda-skip-timestamp-if-done
+ (org-entry-is-done-p)
+ (throw :skip t))
(setq txt (org-format-agenda-item
(format (if (= d1 d2) "" "(%d/%d): ")
(1+ (- d0 d1)) (1+ (- d2 d1)))
- (match-string 1) category tags
+ head category tags
(if (= d0 d1) timestr))))
(setq txt org-agenda-no-heading-message))
(org-add-props txt props
@@ -20657,6 +21045,13 @@ Org-mode buffers visited directly by the user will not be touched."
(setq org-agenda-new-buffers nil)
(org-agenda-quit))
+(defun org-agenda-execute (arg)
+ "Execute another agenda command, keeping same window.\\<global-map>
+So this is just a shortcut for `\\[org-agenda]', available in the agenda."
+ (interactive "P")
+ (let ((org-agenda-window-setup 'current-window))
+ (org-agenda arg)))
+
(defun org-save-all-org-buffers ()
"Save all Org-mode buffers without user confirmation."
(interactive)
@@ -20693,7 +21088,9 @@ When this is the global TODO list, a prefix argument will be interpreted."
(cond
(tdpos (goto-char tdpos))
((eq org-agenda-type 'agenda)
- (let* ((sd (time-to-days (current-time)))
+ (let* ((sd (time-to-days
+ (time-subtract (current-time)
+ (list 0 (* 3600 org-extend-today-until) 0))))
(comp (org-agenda-compute-time-span sd org-agenda-span))
(org-agenda-overriding-arguments org-agenda-last-arguments))
(setf (nth 1 org-agenda-overriding-arguments) (car comp))
@@ -21957,6 +22354,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(:archived-trees . org-export-with-archived-trees)
(:emphasize . org-export-with-emphasize)
(:sub-superscript . org-export-with-sub-superscripts)
+ (:special-strings . org-export-with-special-strings)
(:footnotes . org-export-with-footnotes)
(:drawers . org-export-with-drawers)
(:tags . org-export-with-tags)
@@ -21974,6 +22372,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(:convert-org-links . org-export-html-link-org-files-as-html)
(:inline-images . org-export-html-inline-images)
(:html-extension . org-export-html-extension)
+ (:html-table-tag . org-export-html-table-tag)
(:expand-quoted-html . org-export-html-expand)
(:timestamp . org-export-html-with-timestamp)
(:publishing-directory . org-export-publishing-directory)
@@ -22020,6 +22419,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(":" . :fixed-width)
("|" . :tables)
("^" . :sub-superscript)
+ ("-" . :special-strings)
("f" . :footnotes)
("d" . :drawers)
("tags" . :tags)
@@ -22320,8 +22720,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
("prop") ("proptp"."&prop;")
("infin") ("infty"."&infin;")
("ang") ("angle"."&ang;")
- ("and") ("vee"."&and;")
- ("or") ("wedge"."&or;")
+ ("and") ("wedge"."&and;")
+ ("or") ("vee"."&or;")
("cap")
("cup")
("int")
@@ -22446,6 +22846,8 @@ translations. There is currently no way for users to extend this.")
(commentsp (plist-get parameters :comments))
(archived-trees (plist-get parameters :archived-trees))
(inhibit-read-only t)
+ (drawers org-drawers)
+ (exp-drawers (plist-get parameters :drawers))
(outline-regexp "\\*+ ")
a b xx
rtn p)
@@ -22484,14 +22886,14 @@ translations. There is currently no way for users to extend this.")
(if (> b a) (delete-region a b)))))
;; Get rid of drawers
- (unless (eq t org-export-with-drawers)
+ (unless (eq t exp-drawers)
(goto-char (point-min))
(let ((re (concat "^[ \t]*:\\("
- (mapconcat 'identity
- (if (listp org-export-with-drawers)
- org-export-with-drawers
- org-drawers)
- "\\|")
+ (mapconcat
+ 'identity
+ (org-delete-all exp-drawers
+ (copy-sequence drawers))
+ "\\|")
"\\):[ \t]*\n\\([^@]*?\n\\)?[ \t]*:END:[ \t]*\n")))
(while (re-search-forward re nil t)
(replace-match ""))))
@@ -22503,12 +22905,18 @@ translations. There is currently no way for users to extend this.")
(replace-match "\\1(INVISIBLE)"))
;; Protect backend specific stuff, throw away the others.
- (goto-char (point-min))
(let ((formatters
`((,htmlp "HTML" "BEGIN_HTML" "END_HTML")
(,asciip "ASCII" "BEGIN_ASCII" "END_ASCII")
(,latexp "LaTeX" "BEGIN_LaTeX" "END_LaTeX")))
fmt)
+ (goto-char (point-min))
+ (while (re-search-forward "^#\\+BEGIN_EXAMPLE[ \t]*\n" nil t)
+ (goto-char (match-end 0))
+ (while (not (looking-at "#\\+END_EXAMPLE"))
+ (insert ": ")
+ (beginning-of-line 2)))
+ (goto-char (point-min))
(while (re-search-forward "^[ \t]*:.*\\(\n[ \t]*:.*\\)*" nil t)
(add-text-properties (match-beginning 0) (match-end 0)
'(org-protected t)))
@@ -22540,6 +22948,13 @@ translations. There is currently no way for users to extend this.")
(add-text-properties (point) (org-end-of-subtree t)
'(org-protected t)))
+ ;; Protect verbatim elements
+ (goto-char (point-min))
+ (while (re-search-forward org-verbatim-re nil t)
+ (add-text-properties (match-beginning 4) (match-end 4)
+ '(org-protected t))
+ (goto-char (1+ (match-end 4))))
+
;; Remove subtrees that are commented
(goto-char (point-min))
(while (re-search-forward re-commented nil t)
@@ -22563,6 +22978,9 @@ translations. There is currently no way for users to extend this.")
(require 'org-export-latex nil)
(org-export-latex-cleaned-string))
+ (when asciip
+ (org-export-ascii-clean-string))
+
;; Specific HTML stuff
(when htmlp
;; Convert LaTeX fragments to images
@@ -22810,6 +23228,8 @@ underlined headlines. The default is 3."
:for-ascii t
:skip-before-1st-heading
(plist-get opt-plist :skip-before-1st-heading)
+ :drawers (plist-get opt-plist :drawers)
+ :verbatim-multiline t
:archived-trees
(plist-get opt-plist :archived-trees)
:add-text (plist-get opt-plist :text))
@@ -23006,6 +23426,16 @@ underlined headlines. The default is 3."
(goto-char beg)))
(goto-char (point-min))))
+(defun org-export-ascii-clean-string ()
+ "Do extra work for ASCII export"
+ (goto-char (point-min))
+ (while (re-search-forward org-verbatim-re nil t)
+ (goto-char (match-end 2))
+ (backward-delete-char 1) (insert "'")
+ (goto-char (match-beginning 2))
+ (delete-char 1) (insert "`")
+ (goto-char (match-end 2))))
+
(defun org-search-todo-below (line lines level)
"Search the subtree below LINE for any TODO entries."
(let ((rest (cdr (memq line lines)))
@@ -23092,8 +23522,6 @@ command."
(?\C-b . org-export-as-html-and-open)
(?h . org-export-as-html)
(?H . org-export-as-html-to-buffer)
- (?l . org-export-as-latex)
- (?L . org-export-as-latex-to-buffer)
(?R . org-export-region-as-html)
(?x . org-export-as-xoxo)))))
(keepp (equal type ?\ ))
@@ -23157,7 +23585,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
#+EMAIL: %s
#+LANGUAGE: %s
#+TEXT: Some descriptive text to be emitted. Several lines OK.
-#+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s f:%s *:%s TeX:%s LaTeX:%s skip:%s d:%s tags:%s
+#+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s -:%s f:%s *:%s TeX:%s LaTeX:%s skip:%s d:%s tags:%s
#+CATEGORY: %s
#+SEQ_TODO: %s
#+TYP_TODO: %s
@@ -23177,6 +23605,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
org-export-with-fixed-width
org-export-with-tables
org-export-with-sub-superscripts
+ org-export-with-special-strings
org-export-with-footnotes
org-export-with-emphasize
org-export-with-TeX-macros
@@ -23233,6 +23662,7 @@ this line is also exported in fixed-width font."
(beg (if regionp (region-beginning) (point)))
(end (if regionp (region-end)))
(nlines (or arg (if (and beg end) (count-lines beg end) 1)))
+ (case-fold-search nil)
(re "[ \t]*\\(:\\)")
off)
(if regionp
@@ -23340,6 +23770,7 @@ in a window. A non-interactive call will only retunr the buffer."
(switch-to-buffer-other-window rtn)
rtn)))
+(defvar html-table-tag nil) ; dynamically scoped into this.
(defun org-export-as-html (arg &optional hidden ext-plist
to-buffer body-only)
"Export the outline as a pretty HTML file.
@@ -23422,6 +23853,7 @@ the body tags themselves."
(file-name-sans-extension
(file-name-nondirectory buffer-file-name)))
"UNTITLED"))
+ (html-table-tag (plist-get opt-plist :html-table-tag))
(quote-re0 (concat "^[ \t]*" org-quote-string "\\>"))
(quote-re (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)"))
(inquote nil)
@@ -23458,6 +23890,7 @@ the body tags themselves."
:for-html t
:skip-before-1st-heading
(plist-get opt-plist :skip-before-1st-heading)
+ :drawers (plist-get opt-plist :drawers)
:archived-trees
(plist-get opt-plist :archived-trees)
:add-text
@@ -23793,14 +24226,17 @@ lang=\"%s\" xml:lang=\"%s\">
;; Does this contain a reference to a footnote?
(when org-export-with-footnotes
- (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" line)
- (let ((n (match-string 2 line)))
- (setq line
- (replace-match
- (format
- "%s<sup><a class=\"footref\" name=\"fnr.%s\" href=\"#fn.%s\">%s</a></sup>"
- (match-string 1 line) n n n)
- t t line)))))
+ (setq start 0)
+ (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" line start)
+ (if (get-text-property (match-beginning 2) 'org-protected line)
+ (setq start (match-end 2))
+ (let ((n (match-string 2 line)))
+ (setq line
+ (replace-match
+ (format
+ "%s<sup><a class=\"footref\" name=\"fnr.%s\" href=\"#fn.%s\">%s</a></sup>"
+ (match-string 1 line) n n n)
+ t t line))))))
(cond
((string-match "^\\(\\*+\\)[ \t]+\\(.*\\)" line)
@@ -23941,8 +24377,13 @@ lang=\"%s\" xml:lang=\"%s\">
(insert "<p class=\"author\"> "
(nth 1 lang-words) ": " author "\n")
(when email
- (insert "<a href=\"mailto:" email "\">&lt;"
- email "&gt;</a>\n"))
+ (if (listp (split-string email ",+ *"))
+ (mapc (lambda(e)
+ (insert "<a href=\"mailto:" e "\">&lt;"
+ e "&gt;</a>\n"))
+ (split-string email ",+ *"))
+ (insert "<a href=\"mailto:" email "\">&lt;"
+ email "&gt;</a>\n")))
(insert "</p>\n"))
(when (and date org-export-time-stamp-file)
(insert "<p class=\"date\"> "
@@ -24126,11 +24567,11 @@ lang=\"%s\" xml:lang=\"%s\">
(unless splice (push "</table>\n" html))
(setq html (nreverse html))
(unless splice
- ;; Put in COL tags with the alignment (unfortuntely often ignored...)
+ ;; Put in col tags with the alignment (unfortuntely often ignored...)
(push (mapconcat
(lambda (x)
(setq gr (pop org-table-colgroup-info))
- (format "%s<COL align=\"%s\"></COL>%s"
+ (format "%s<col align=\"%s\"></col>%s"
(if (memq gr '(:start :startend))
(prog1
(if colgropen "</colgroup>\n<colgroup>" "<colgroup>")
@@ -24144,7 +24585,7 @@ lang=\"%s\" xml:lang=\"%s\">
fnum "")
html)
(if colgropen (setq html (cons (car html) (cons "</colgroup>" (cdr html)))))
- (push org-export-html-table-tag html))
+ (push html-table-tag html))
(concat (mapconcat 'identity html "\n") "\n")))
(defun org-table-clean-before-export (lines)
@@ -24192,8 +24633,7 @@ If yes remove the column and the special lines."
((or (string-match "^\\([ \t]*\\)|-+\\+" x)
(string-match "^\\([ \t]*\\)|[^|]*|" x))
;; remove the first column
- (replace-match "\\1|" t nil x))
- (t (error "This should not happen"))))
+ (replace-match "\\1|" t nil x))))
lines))))
(defun org-format-table-table-html (lines)
@@ -24204,7 +24644,7 @@ But it has the disadvantage, that no cell- or row-spanning is allowed."
(let (line field-buffer
(head org-export-highlight-first-table-line)
fields html empty)
- (setq html (concat org-export-html-table-tag "\n"))
+ (setq html (concat html-table-tag "\n"))
(while (setq line (pop lines))
(setq empty "&nbsp;")
(catch 'next-line
@@ -24332,21 +24772,26 @@ If there are links in the string, don't modify these."
"Apply all active conversions to translate special ASCII to HTML."
(setq s (org-html-protect s))
(if org-export-html-expand
- (while (string-match "@&lt;\\([^&]*\\)&gt;" s)
- (setq s (replace-match "<\\1>" t nil s))))
+ (let ((start 0))
+ (while (string-match "@&lt;\\([^&]*\\)&gt;" s)
+ (setq s (replace-match "<\\1>" t nil s)))))
(if org-export-with-emphasize
(setq s (org-export-html-convert-emphasize s)))
+ (if org-export-with-special-strings
+ (setq s (org-export-html-convert-special-strings s)))
(if org-export-with-sub-superscripts
(setq s (org-export-html-convert-sub-super s)))
(if org-export-with-TeX-macros
(let ((start 0) wd ass)
(while (setq start (string-match "\\\\\\([a-zA-Z]+\\)" s start))
- (setq wd (match-string 1 s))
- (if (setq ass (assoc wd org-html-entities))
- (setq s (replace-match (or (cdr ass)
- (concat "&" (car ass) ";"))
- t t s))
- (setq start (+ start (length wd)))))))
+ (if (get-text-property (match-beginning 0) 'org-protected s)
+ (setq start (match-end 0))
+ (setq wd (match-string 1 s))
+ (if (setq ass (assoc wd org-html-entities))
+ (setq s (replace-match (or (cdr ass)
+ (concat "&" (car ass) ";"))
+ t t s))
+ (setq start (+ start (length wd))))))))
s)
(defun org-create-multibrace-regexp (left right n)
@@ -24377,16 +24822,41 @@ stacked delimiters is N. Escaping delimiters is not possible."
"\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)")
"The regular expression matching a sub- or superscript.")
-;(let ((s "a\\_b"))
-; (and (string-match org-match-substring-regexp s)
-; (conca t (match-string 1 s) ":::" (match-string 2 s))))
+(defvar org-match-substring-with-braces-regexp
+ (concat
+ "\\([^\\]\\)\\([_^]\\)\\("
+ "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)"
+ "\\)")
+ "The regular expression matching a sub- or superscript, forcing braces.")
+
+(defconst org-export-html-special-string-regexps
+ '(("\\\\-" . "&shy;")
+ ("---\\([^-]\\)" . "&mdash;\\1")
+ ("--\\([^-]\\)" . "&ndash;\\1")
+ ("\\.\\.\\." . "&hellip;"))
+ "Regular expressions for special string conversion.")
+
+(defun org-export-html-convert-special-strings (string)
+ "Convert special characters in STRING to HTML."
+ (let ((all org-export-html-special-string-regexps)
+ e a re rpl start)
+ (while (setq a (pop all))
+ (setq re (car a) rpl (cdr a) start 0)
+ (while (string-match re string start)
+ (if (get-text-property (match-beginning 0) 'org-protected string)
+ (setq start (match-end 0))
+ (setq string (replace-match rpl t nil string)))))
+ string))
(defun org-export-html-convert-sub-super (string)
"Convert sub- and superscripts in STRING to HTML."
(let (key c (s 0) (requireb (eq org-export-with-sub-superscripts '{})))
(while (string-match org-match-substring-regexp string s)
- (if (and requireb (match-end 8))
- (setq s (match-end 2))
+ (cond
+ ((and requireb (match-end 8)) (setq s (match-end 2)))
+ ((get-text-property (match-beginning 2) 'org-protected string)
+ (setq s (match-end 2)))
+ (t
(setq s (match-end 1)
key (if (string= (match-string 2 string) "_") "sub" "sup")
c (or (match-string 8 string)
@@ -24395,22 +24865,29 @@ stacked delimiters is N. Escaping delimiters is not possible."
string (replace-match
(concat (match-string 1 string)
"<" key ">" c "</" key ">")
- t t string))))
+ t t string)))))
(while (string-match "\\\\\\([_^]\\)" string)
(setq string (replace-match (match-string 1 string) t t string)))
string))
(defun org-export-html-convert-emphasize (string)
"Apply emphasis."
- (let ((s 0))
+ (let ((s 0) rpl)
(while (string-match org-emph-re string s)
(if (not (equal
(substring string (match-beginning 3) (1+ (match-beginning 3)))
(substring string (match-beginning 4) (1+ (match-beginning 4)))))
- (setq string (replace-match
- (concat "\\1" (nth 2 (assoc (match-string 3 string) org-emphasis-alist))
- "\\4" (nth 3 (assoc (match-string 3 string) org-emphasis-alist))
- "\\5") t nil string))
+ (setq s (match-beginning 0)
+ rpl
+ (concat
+ (match-string 1 string)
+ (nth 2 (assoc (match-string 3 string) org-emphasis-alist))
+ (match-string 4 string)
+ (nth 3 (assoc (match-string 3 string)
+ org-emphasis-alist))
+ (match-string 5 string))
+ string (replace-match rpl t t string)
+ s (+ s (- (length rpl) 2)))
(setq s (1+ s))))
string))
@@ -24437,7 +24914,6 @@ When TITLE is nil, just close all open levels."
(org-close-par-maybe)
(let ((l org-level-max))
(while (>= l level)
- ; (while (>= l (1+ level))
(if (aref org-levels-open (1- l))
(progn
(org-html-level-close l umax)
@@ -24583,10 +25059,14 @@ When COMBINE is non nil, add the category to each line."
ts (match-string 0)
inc t
hd (org-get-heading)
- summary (org-entry-get nil "SUMMARY")
- desc (or (org-entry-get nil "DESCRIPTION")
- (org-get-cleaned-entry org-icalendar-include-body))
- location (org-entry-get nil "LOCATION")
+ summary (org-icalendar-cleanup-string
+ (org-entry-get nil "SUMMARY"))
+ desc (org-icalendar-cleanup-string
+ (or (org-entry-get nil "DESCRIPTION")
+ (and org-icalendar-include-body (org-get-entry)))
+ t org-icalendar-include-body)
+ location (org-icalendar-cleanup-string
+ (org-entry-get nil "LOCATION"))
category (org-get-category))
(if (looking-at re2)
(progn
@@ -24674,10 +25154,14 @@ END:VEVENT\n"
(not (member org-archive-tag (org-get-tags-at)))
)
(setq hd (match-string 3)
- summary (org-entry-get nil "SUMMARY")
- desc (or (org-entry-get nil "DESCRIPTION")
- (org-get-cleaned-entry org-icalendar-include-body))
- location (org-entry-get nil "LOCATION"))
+ summary (org-icalendar-cleanup-string
+ (org-entry-get nil "SUMMARY"))
+ desc (org-icalendar-cleanup-string
+ (or (org-entry-get nil "DESCRIPTION")
+ (and org-icalendar-include-body (org-get-entry)))
+ t org-icalendar-include-body)
+ location (org-icalendar-cleanup-string
+ (org-entry-get nil "LOCATION")))
(if (string-match org-bracket-link-regexp hd)
(setq hd (replace-match (if (match-end 3) (match-string 3 hd)
(match-string 1 hd))
@@ -24706,24 +25190,38 @@ END:VTODO\n"
(concat "\nDESCRIPTION: " desc) "")
category pri status)))))))))
-(defun org-get-cleaned-entry (what)
- "Clean-up description string."
- (when what
- (save-excursion
- (org-back-to-heading t)
- (let ((s (buffer-substring (point-at-bol 2) (org-end-of-subtree t)))
- (re (concat org-drawer-regexp "[^\000]*?:END:.*\n?"))
+(defun org-icalendar-cleanup-string (s &optional is-body maxlength)
+ "Take out stuff and quote what needs to be quoted.
+When IS-BODY is non-nil, assume that this is the body of an item, clean up
+whitespace, newlines, drawers, and timestamps, and cut it down to MAXLENGTH
+characters."
+ (if (not s)
+ nil
+ (when is-body
+ (let ((re (concat "\\(" org-drawer-regexp "\\)[^\000]*?:END:.*\n?"))
(re2 (concat "^[ \t]*" org-keyword-time-regexp ".*\n?")))
(while (string-match re s) (setq s (replace-match "" t t s)))
- (while (string-match re2 s) (setq s (replace-match "" t t s)))
- (if (string-match "[ \t\r\n]+\\'" s) (setq s (replace-match "" t t s)))
- (while (string-match "[ \t]*\n[ \t]*" s)
- (setq s (replace-match "\\n" t t s)))
- (setq s (org-trim s))
- (if (and (numberp what)
- (> (length s) what))
- (substring s 0 what)
- s)))))
+ (while (string-match re2 s) (setq s (replace-match "" t t s)))))
+ (let ((start 0))
+ (while (string-match "\\([,;\\]\\)" s start)
+ (setq start (+ (match-beginning 0) 2)
+ s (replace-match "\\\\\\1" nil nil s))))
+ (when is-body
+ (while (string-match "[ \t]*\n[ \t]*" s)
+ (setq s (replace-match "\\n" t t s))))
+ (setq s (org-trim s))
+ (if is-body
+ (if maxlength
+ (if (and (numberp maxlength)
+ (> (length s) maxlength))
+ (setq s (substring s 0 maxlength)))))
+ s))
+
+(defun org-get-entry ()
+ "Clean-up description string."
+ (save-excursion
+ (org-back-to-heading t)
+ (buffer-substring (point-at-bol 2) (org-end-of-subtree t))))
(defun org-start-icalendar-file (name)
"Start an iCalendar file by inserting the header."
@@ -24935,7 +25433,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
(org-defkey org-mode-map "\C-c\C-d" 'org-deadline)
(org-defkey org-mode-map "\C-c;" 'org-toggle-comment)
(org-defkey org-mode-map "\C-c\C-v" 'org-show-todo-tree)
-(org-defkey org-mode-map "\C-c\C-w" 'org-check-deadlines)
+(org-defkey org-mode-map "\C-c\C-w" 'org-refile)
(org-defkey org-mode-map "\C-c/" 'org-sparse-tree) ; Minor-mode reserved
(org-defkey org-mode-map "\C-c\\" 'org-tags-sparse-tree) ; Minor-mode res.
(org-defkey org-mode-map "\C-c\C-m" 'org-ctrl-c-ret)
@@ -25101,12 +25599,9 @@ because, in this case the deletion might narrow the column."
(put 'org-delete-char 'flyspell-delayed t)
(put 'org-delete-backward-char 'flyspell-delayed t)
-(eval-after-load "pabbrev"
- '(progn
- (add-to-list 'pabbrev-expand-after-command-list
- 'orgtbl-self-insert-command t)
- (add-to-list 'pabbrev-expand-after-command-list
- 'org-self-insert-command t)))
+;; Make pabbrev-mode expand after org-mode commands
+(put 'org-self-insert-command 'pabbrev-expand-after-command t)
+(put 'orgybl-self-insert-command 'pabbrev-expand-after-command t)
;; How to do this: Measure non-white length of current string
;; If equal to column width, we should realign.
@@ -25368,7 +25863,9 @@ This command does many different things, depending on context:
links in this buffer.
- If the cursor is on a numbered item in a plain list, renumber the
- ordered list."
+ ordered list.
+
+- If the cursor is on a checkbox, toggle it."
(interactive "P")
(let ((org-enable-table-editor t))
(cond
@@ -26055,10 +26552,13 @@ not an indirect buffer"
(setq column tcol)
(goto-char pos)
(beginning-of-line 1)
- (looking-at "[ \t]*\\(\\S-+\\)[ \t]*")
- (setq bullet (match-string 1)
- btype (if (string-match "[0-9]" bullet) "n" bullet))
- (setq column (if (equal btype bullet-type) bcol tcol))))
+ (if (looking-at "\\S-")
+ (progn
+ (looking-at "[ \t]*\\(\\S-+\\)[ \t]*")
+ (setq bullet (match-string 1)
+ btype (if (string-match "[0-9]" bullet) "n" bullet))
+ (setq column (if (equal btype bullet-type) bcol tcol)))
+ (setq column (org-get-indentation)))))
(t (setq column (org-get-indentation))))))
(goto-char pos)
(if (<= (current-column) (current-indentation))
@@ -26067,7 +26567,7 @@ not an indirect buffer"
(setq column (current-column))
(beginning-of-line 1)
(if (looking-at
- "\\([ \t]+\\)\\(:[0-9a-zA-Z]+:\\)[ \t]*\\(\\S-.*\\(\\S-\\|$\\)\\)")
+ "\\([ \t]+\\)\\(:[-_0-9a-zA-Z]+:\\)[ \t]*\\(\\S-.*\\(\\S-\\|$\\)\\)")
(replace-match (concat "\\1" (format org-property-format
(match-string 2) (match-string 3)))
t nil))
@@ -26109,10 +26609,13 @@ not an indirect buffer"
"Re-align a table, pass through to fill-paragraph if no table."
(let ((table-p (org-at-table-p))
(table.el-p (org-at-table.el-p)))
- (cond ((equal (char-after (point-at-bol)) ?*) t) ; skip headlines
- (table.el-p t) ; skip table.el tables
- (table-p (org-table-align) t) ; align org-mode tables
- (t nil)))) ; call paragraph-fill
+ (cond ((and (equal (char-after (point-at-bol)) ?*)
+ (save-excursion (goto-char (point-at-bol))
+ (looking-at outline-regexp)))
+ t) ; skip headlines
+ (table.el-p t) ; skip table.el tables
+ (table-p (org-table-align) t) ; align org-mode tables
+ (t nil)))) ; call paragraph-fill
;; For reference, this is the default value of adaptive-fill-regexp
;; "[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"
@@ -26397,6 +26900,13 @@ Show the heading too, if it is currently invisible."
(org-invisible-p)))
(org-show-context 'bookmark-jump)))
+;; Fix a bug in htmlize where there are text properties (face nil)
+(eval-after-load "htmlize"
+ '(progn
+ (defadvice htmlize-faces-in-buffer (after org-no-nil-faces activate)
+ "Make sure there are no nil faces"
+ (setq ad-return-value (delq nil ad-return-value)))))
+
;; Make session.el ignore our circular variable
(eval-after-load "session"
'(add-to-list 'session-globals-exclude 'org-mark-ring))
@@ -26405,7 +26915,7 @@ Show the heading too, if it is currently invisible."
(defun org-closed-in-range ()
"Sparse tree of items closed in a certain time range.
-Still experimental, may disappear in the furture."
+Still experimental, may disappear in the future."
(interactive)
;; Get the time interval from the user.
(let* ((time1 (time-to-seconds
@@ -26467,20 +26977,246 @@ Respect keys that are already there."
(push (cons k c) new))))
(nreverse new)))
-;(defcustom org-read-date-prefer-future nil
-; "Non-nil means, when reading an incomplete date from the user, assume future.
-;This affects the following situations:
-;1. The user give a day, but no month.
-; In this case, if the day number if after today, the current month will
-; be used, otherwise the next month.
-;2. The user gives a month but not a year.
-; In this case, the the given month is after the current month, the current
-; year will be used. Otherwise the next year will be used.;
-;
-;When nil, always the current month and year will be used."
-; :group 'org-time ;????
-; :type 'boolean)
+(defcustom org-refile-targets '((nil . (:level . 1)))
+ "Targets for refiling entries with \\[org-refile].
+This is list of cons cells. Each cell contains:
+- a specification of the files to be considered, either a list of files,
+ or a symbol whose function or value fields will be used to retrieve
+ a file name or a list of file names. Nil means, refile to a different
+ heading in the current buffer.
+- A specification of how to find candidate refile targets. This may be
+ any of
+ - a cons cell (:tag . \"TAG\") to identify refile targes by a tag.
+ This tag has to be present in all target headlines, inheritance will
+ not be considered.
+ - a cons cell (:todo . \"KEYWORD\" to identify refile targets by
+ todo keyword.
+ - a cons cell (:regexp . \"REGEXP\") with a regular expression matching
+ headlines that are refiling targets.
+ - a cons cell (:level . N). Any headline of level N is considered a target."
+;; FIXME: what if there are a var and func with same name???
+ :group 'org
+ :type '(repeat
+ (cons
+ (choice :value org-agenda-files
+ (const :tag "All agenda files" org-agenda-files)
+ (const :tag "Current buffer" nil)
+ (function) (variable) (file))
+ (choice :tag "Identify target headline by"
+ (cons :tag "Specific tag" (const :tag) (string))
+ (cons :tag "TODO keyword" (const :todo) (string))
+ (cons :tag "Regular expression" (const :regexp) (regexp))
+ (cons :tag "Level number" (const :level) (integer))))))
+
+(defvar org-refile-target-table nil
+ "The list of refile targets, created by `org-refile'.")
+
+(defun org-get-refile-targets ()
+ "Produce a table with refile targets."
+ ;; FIXME: interpret the different specs for refile targets.
+ (put 'org-agenda-files 'org-restrict nil)
+ (let ((entries org-refile-targets)
+ org-agenda-new-files targets txt re files f desc descre)
+ (while (setq entry (pop entries))
+ (setq files (car entry) desc (cdr entry))
+ (cond
+ ((null files) (setq files (list (current-buffer))))
+ ((and (symbolp files) (fboundp files))
+ (setq files (funcall files)))
+ ((and (symbolp files) (boundp files))
+ (setq files (symbol-value files))))
+ (if (stringp files) (setq files (list files)))
+ (cond
+ ((eq (car desc) :tag)
+ (setq descre (concat "^\\*+[ \t]+.*?:" (regexp-quote (cdr desc)) ":")))
+ ((eq (car desc) :todo)
+ (setq descre (concat "^\\*+[ \t]+" (regexp-quote (cdr desc)) "[ \t]")))
+ ((eq (car desc) :regexp)
+ (setq descre (cdr desc)))
+ ((eq (car desc) :level)
+ (setq descre (concat "^\\*\\{" (number-to-string
+ (if org-odd-levels-only
+ (1- (* 2 (cdr desc)))
+ (cdr desc)))
+ "\\}[ \t]")))
+ (t (error "Bad refiling target description %s" desc)))
+ (while (setq f (pop files))
+ (save-excursion
+ (set-buffer (if (bufferp f) f (org-get-agenda-file-buffer f)))
+ (if (bufferp f) (setq f (buffer-file-name (buffer-base-buffer f))))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (re-search-forward descre nil t)
+ (goto-char (point-at-bol))
+ (when (looking-at org-complex-heading-regexp)
+ (setq txt (match-string 4)
+ re (concat "^" (regexp-quote
+ (buffer-substring (match-beginning 1)
+ (match-end 4)))))
+ (if (match-end 5) (setq re (concat re "[ \t]+"
+ (regexp-quote
+ (match-string 5)))))
+ (setq re (concat re "[ \t]*$"))
+ (push (list txt f re (point)) targets))
+ (goto-char (point-at-eol))))))))
+ (org-release-buffers org-agenda-new-buffers)
+ (nreverse targets)))
+
+(defun org-refile (&optional reversed-or-update)
+ "Move the entry at point to another heading.
+The list of target headings is compiled using the information in
+`org-refile-targets', which see. This list is created upon first use, and
+you can update it by calling this command with a double prefix (`C-u C-u').
+
+At the target location, the entry is filed as a subitem of the target heading.
+Depending on `org-reverse-note-order', the new subitem will either be the
+first of the last subitem. A single C-u prefix will toggle the value of this
+variable for the duration of the command."
+ (interactive "P")
+ (if (equal reversed-or-update '(16))
+ (progn
+ (setq org-refile-target-table (org-get-refile-targets))
+ (message "Refile targets updated (%d targets)"
+ (length org-refile-target-table)))
+ (when (or (not org-refile-target-table)
+ (and (= (length org-refile-targets) 1)
+ (not (caar org-refile-targets))))
+ (setq org-refile-target-table (org-get-refile-targets)))
+ (unless org-refile-target-table
+ (error "No refile targets"))
+ (let* ((cbuf (current-buffer))
+ (filename (buffer-file-name (buffer-base-buffer cbuf)))
+ (fname (and filename (file-truename filename)))
+ (tbl (mapcar
+ (lambda (x)
+ (if (not (equal fname (file-truename (nth 1 x))))
+ (cons (concat (car x) " (" (file-name-nondirectory
+ (nth 1 x)) ")")
+ (cdr x))
+ x))
+ org-refile-target-table))
+ (completion-ignore-case t)
+ pos it nbuf file re level reversed)
+ (when (setq it (completing-read "Refile to: " tbl
+ nil t nil 'org-refile-history))
+ (setq it (assoc it tbl)
+ file (nth 1 it)
+ re (nth 2 it))
+ (org-copy-special)
+ (save-excursion
+ (set-buffer (setq nbuf (or (find-buffer-visiting file)
+ (find-file-noselect file))))
+ (setq reversed (org-notes-order-reversed-p))
+ (if (equal reversed-or-update '(16)) (setq reversed (not reversed)))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (unless (re-search-forward re nil t)
+ (error "Cannot find target location - try again with `C-u' prefix."))
+ (goto-char (match-beginning 0))
+ (looking-at outline-regexp)
+ (setq level (org-get-legal-level (funcall outline-level) 1))
+ (goto-char (or (save-excursion
+ (if reversed
+ (outline-next-heading)
+ (outline-get-next-sibling)))
+ (point-max)))
+ (org-paste-subtree level))))
+ (org-cut-special)
+ (message "Entry refiled to \"%s\"" (car it))))))
+
+(defcustom org-highlight-latex-fragments-and-specials nil
+ "Non-nil means, fontify what is treated specially by the exporters."
+ :group 'org-font-lock
+ :type 'boolean)
+
+(defvar org-latex-and-specials-regexp nil
+ "Regular expression for highlighting export special stuff.")
+
+(defun org-compute-latex-and-specials-regexp ()
+ "Compute regular expression for stuff treated specially by exporters."
+ (if (not org-highlight-latex-fragments-and-specials)
+ (org-set-local 'org-latex-and-specials-regexp nil)
+ (let*
+ ((matchers (plist-get org-format-latex-options :matchers))
+ (latexs (delq nil (mapcar (lambda (x) (if (member (car x) matchers) x))
+ org-latex-regexps)))
+ (options (org-combine-plists (org-default-export-plist)
+ (org-infile-export-plist)))
+ (org-export-with-sub-superscripts (plist-get options :sub-superscript))
+ (org-export-with-LaTeX-fragments (plist-get options :LaTeX-fragments))
+ (org-export-with-TeX-macros (plist-get options :TeX-macros))
+ (org-export-html-expand (plist-get options :expand-quoted-html))
+ (org-export-with-special-strings (plist-get options :special-strings))
+ (re-sub
+ (cond
+ ((equal org-export-with-sub-superscripts '{})
+ (list org-match-substring-with-braces-regexp))
+ (org-export-with-sub-superscripts
+ (list org-match-substring-regexp))
+ (t nil)))
+ (re-latex
+ (if org-export-with-LaTeX-fragments
+ (mapcar (lambda (x) (nth 1 x)) latexs)))
+ (re-macros
+ (if org-export-with-TeX-macros
+ (list (concat "\\\\"
+ (regexp-opt
+ (append (mapcar 'car org-html-entities)
+ (if (boundp 'org-latex-entities)
+ org-latex-entities nil))
+ 'words))) ; FIXME
+ ))
+ ;; (list "\\\\\\(?:[a-zA-Z]+\\)")))
+ (re-special (if org-export-with-special-strings
+ (mapcar (lambda (x) (car x))
+ org-export-html-special-string-regexps)))
+ (re-rest
+ (delq nil
+ (list
+ (if org-export-html-expand "@<[^>\n]+>")
+ ))))
+ (org-set-local
+ 'org-latex-and-specials-regexp
+ (mapconcat 'identity (append re-latex re-sub re-macros re-special re-rest) "\\|")))))
+
+(defface org-latex-and-export-specials
+ (let ((font (cond ((assq :inherit custom-face-attributes)
+ '(:inherit underline))
+ (t '(:underline t)))))
+ `((((class grayscale) (background light))
+ (:foreground "DimGray" ,@font))
+ (((class grayscale) (background dark))
+ (:foreground "LightGray" ,@font))
+ (((class color) (background light))
+ (:foreground "SaddleBrown"))
+ (((class color) (background dark))
+ (:foreground "burlywood"))
+ (t (,@font))))
+ "Face used to highlight math latex and other special exporter stuff."
+ :group 'org-faces)
+(defun org-do-latex-and-special-faces (limit)
+ "Run through the buffer and add overlays to links."
+ (when org-latex-and-specials-regexp
+ (let (rtn d)
+ (while (and (not rtn) (re-search-forward org-latex-and-specials-regexp
+ limit t))
+ (if (not (memq (car-safe (get-text-property (1+ (match-beginning 0)) 'face))
+ '(org-code org-verbatim underline)))
+ (progn
+ (setq rtn t
+ d (cond ((member (char-after (1+ (match-beginning 0))) '(?_ ?^)) 1)
+ (t 0)))
+ (font-lock-prepend-text-property
+ (+ d (match-beginning 0)) (match-end 0)
+ 'face 'org-latex-and-export-specials)
+ (add-text-properties (+ d (match-beginning 0)) (match-end 0)
+ '(font-lock-multiline t)))))
+ rtn)))
;;;; Finish up
diff --git a/org.pdf b/org.pdf
index 22af7f1d2..3de57fd3a 100644
--- a/org.pdf
+++ b/org.pdf
Binary files differ
diff --git a/org.texi b/org.texi
index 12d205a6c..44d33b467 100644
--- a/org.texi
+++ b/org.texi
@@ -1,10 +1,10 @@
\input texinfo
@c %**start of header
-@setfilename ../info/org
+@setfilename ../../info/org
@settitle Org Mode Manual
-@set VERSION 5.13e
-@set DATE October 2007
+@set VERSION 5.14
+@set DATE December 2007
@dircategory Emacs
@direntry
@@ -82,7 +82,7 @@ Software Foundation raise funds for GNU development.''
* 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
-* Timestamps:: Assign date and time to items
+* Dates and times:: Making items useful for planning
* Remember:: Quickly adding nodes to the outline tree
* Agenda views:: Collecting information into views
* Embedded LaTeX:: LaTeX fragments and formulas
@@ -103,6 +103,7 @@ Introduction
* Installation:: How to install a downloaded version of Org-mode
* Activation:: How to activate Org-mode for certain buffers.
* Feedback:: Bug reports, ideas, patches etc.
+* Conventions:: Type-setting conventions in the manual
Document Structure
@@ -190,6 +191,7 @@ 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
@@ -204,7 +206,7 @@ Defining Columns
* Scope of column definitions:: Where defined, where valid?
* Column attributes:: Appearance and content of a column
-Timestamps
+Dates and Times
* Time stamps:: Assigning a time to a tree entry
* Creating timestamps:: Commands which insert timestamps
@@ -226,6 +228,7 @@ Remember
* Setting up remember:: Some code for .emacs to get things going
* Remember templates:: Define the outline of different note types
* Storing notes:: Directly get the note to where it belongs
+* Refiling notes:: Moving a note or task to a project
Agenda Views
@@ -287,12 +290,14 @@ LaTeX export
* LaTeX export commands:: How to invoke LaTeX export
* Quoting LaTeX code:: Incorporating literal LaTeX code
+* Sectioning structure::
Text interpretation by the exporter
* Comment lines:: Some lines will not be exported
* Initial text:: Text before the first headline
* Footnotes:: Numbers like [1]
+* Quoted examples:: Inserting quoted chnuks of text
* Enhancing text:: Subscripts, symbols and more
* Export options:: How to influence the export settings
@@ -342,11 +347,12 @@ Extensions, Hooks and Hacking
* Special agenda views:: Customized views
* Using the property API:: Writing programs that use entry properties
-Tables in arbitrary syntax
+Tables and Lists in arbitrary syntax
* Radio tables:: Sending and receiving
* A LaTeX example:: Step by step, almost a tutorial
* Translator functions:: Copy and modify
+* Radio lists:: Doing the same for lists.
@end detailmenu
@end menu
@@ -360,6 +366,7 @@ Tables in arbitrary syntax
* Installation:: How to install a downloaded version of Org-mode
* Activation:: How to activate Org-mode for certain buffers.
* Feedback:: Bug reports, ideas, patches etc.
+* Conventions:: Type-setting conventions in the manual
@end menu
@node Summary, Installation, Introduction, Introduction
@@ -407,7 +414,7 @@ example as:
@r{@bullet{} full agenda and planner with deadlines and work scheduling}
@r{@bullet{} environment to implement David Allen's GTD system}
@r{@bullet{} a basic database application}
-@r{@bullet{} simple hypertext system, with HTML export}
+@r{@bullet{} simple hypertext system, with HTML and LaTeX export}
@r{@bullet{} publishing tool to create a set of interlinked webpages}
@end example
@@ -527,7 +534,7 @@ MY PROJECTS -*- mode: org; -*-
the file's name is. See also the variable
@code{org-insert-mode-line-in-empty-file}.
-@node Feedback, , Activation, Introduction
+@node Feedback, Conventions, Activation, Introduction
@section Feedback
@cindex feedback
@cindex bug reports
@@ -584,6 +591,28 @@ screen. Save this buffer to a file (for example using @kbd{C-x C-w}) and
attach it to your bug report.
@end enumerate
+@node Conventions, , Feedback, Introduction
+@section Typesetting conventions used in this manual
+
+Org-mode has 3 types of keywords that are being used. TODO keywords,
+tags, and property names. For this manual we are using the following
+conventions:
+
+@table @code
+@item TODO
+@itemx WAITING
+TODO keyword are written with all capitals, even if they are
+user-defined.
+@item boss
+@itemx ARCHIVE
+User-defined Tags are written in lowercase, built-in tags with special
+meaning a all-caps.
+@item Release
+@itemx PRIORITY
+User-defined properties are capitalized in all examples, while
+built-in properties with special meaning are all-caps.
+@end table
+
@node Document structure, Tables, Introduction, Top
@chapter Document Structure
@cindex document structure
@@ -850,6 +879,9 @@ 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 prefix arg, or by yanking after a
headline marker like @samp{****}.
+@kindex C-c C-w
+@item C-c C-w
+Refile entry to a different location. @xref{Refiling notes}.
@kindex C-c ^
@item C-c ^
Sort same-level entries. When there is an active region, all entries in
@@ -965,11 +997,13 @@ current file, with the name derived by appending @file{_archive} to the
current file name. For information and examples on how to change this,
see the documentation string of the variable
@code{org-archive-location}. There is also an in-buffer option for
-setting this variable, for example@footnote{If there are several such
-lines in the buffer, each will be valid for the entries below it. The
-first will also apply to any text before it. This method is only kept
-for backward compatibility. The preferred methods for setting multiple
-archive locations is using a property.}:
+setting this variable, for example@footnote{For backward compatibility,
+the following also works: If there are several such lines in a file,
+each specifies the archive location for the text below it. The first
+such line also applies to any text before its definition. However,
+using this method is @emph{strongly} deprecated as it is incompatible
+with the outline structure of the document. The correct method for
+setting multiple archive locations in a buffer is using a property.}:
@example
#+ARCHIVE: %s_done::
@@ -1416,11 +1450,12 @@ visible.
@c
@item M-x org-table-import
Import a file as a table. The table should be TAB- or whitespace
-separated. Useful, for example, to import an Excel 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.
+separated. Useful, 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.
@item C-c |
Tables can also be imported by pasting tabular text into the org-mode
buffer, selecting the pasted text with @kbd{C-x C-x} and then using the
@@ -1428,7 +1463,7 @@ buffer, selecting the pasted text with @kbd{C-x C-x} and then using the
@c
@item M-x org-table-export
Export the table as a TAB-separated file. Useful for data exchange with,
-for example, Excel or database programs.
+for example, spreadsheet or database programs.
@end table
If you don't like the automatic table editor because it gets in your
@@ -1604,13 +1639,15 @@ The row specification only counts data lines and ignores horizontal
separator lines (hlines). You can use absolute row numbers
@samp{1}...@samp{N}, and row numbers relative to the current row like
@samp{+3} or @samp{-1}. Or specify the row relative to one of the
-hlines: @samp{I} refers to the first hline, @samp{II} to the second etc.
-@samp{-I} refers to the first such line above the current line,
-@samp{+I} to the first such line below the current line. You can also
-write @samp{III+2} which is the second data line after the third hline
-in the table. Relative row numbers like @samp{-3} will not cross hlines
-if the current line is too close to the hline. Instead, the value
-directly at the hline is used.
+hlines: @samp{I} refers to the first hline@footnote{Note that only
+hlines are counted that @emph{separate} table lines. If the table
+starts with a hline above the header, it does not count.}, @samp{II} to
+the second etc. @samp{-I} refers to the first such line above the
+current line, @samp{+I} to the first such line below the current line.
+You can also write @samp{III+2} which is the second data line after the
+third hline in the table. Relative row numbers like @samp{-3} will not
+cross hlines if the current line is too close to the hline. Instead,
+the value directly at the hline is used.
@samp{0} refers to the current row and column. Also, if you omit
either the column or the row part of the reference, the current
@@ -3095,7 +3132,7 @@ headlines. Org-mode has extensive support for using tags.
Every headline can contain a list of tags, at the end of the headline.
Tags are normal words containing letters, numbers, @samp{_}, and
@samp{@@}. Tags must be preceded and followed by a single colon; like
-@samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}.
+@samp{:WORK:}. Several tags can be specified like @samp{:work:URGENT:}.
@menu
* Tag inheritance:: Tags use the tree structure of the outline
@@ -3114,14 +3151,14 @@ heading has a certain tag, all subheadings will inherit the tag as
well. For example, in the list
@example
-* Meeting with the French group :WORK:
-** Summary by Frank :BOSS:NOTES:
-*** TODO Prepare slides for him :ACTION:
+* Meeting with the French group :work:
+** Summary by Frank :boss:notes:
+*** TODO Prepare slides for him :action:
@end example
@noindent
-the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
-@samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
+the final heading will have the tags @samp{:work:}, @samp{:boss:},
+@samp{:notes:}, and @samp{:action:}. When executing tag searches and
Org-mode finds that a certain headline matches the search criterion, it
will not check any sublevel headline, assuming that these likely also
match, and that the list of matches can become very long. This may
@@ -3159,8 +3196,8 @@ of tags with the variable @code{org-tag-alist}. Finally you can set
the default tags for a given file with lines like
@example
-#+TAGS: @@WORK @@HOME @@TENNISCLUB
-#+TAGS: Laptop Car PC Sailboat
+#+TAGS: @@work @@home @@tennisclub
+#+TAGS: laptop car pc sailboat
@end example
If you have globally defined your preferred set of tags using the
@@ -3178,13 +3215,13 @@ single key per tag. To function efficiently, you should assign unique
keys to most tags. This can be done globally with
@lisp
-(setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l)))
+(setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l)))
@end lisp
@noindent or on a per-file basis with
@example
-#+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t) Laptop(l) PC(p)
+#+TAGS: @@work(w) @@home(h) @@tennisclub(t) laptop(l) pc(p)
@end example
@noindent
@@ -3194,11 +3231,11 @@ curly braces@footnote{In @code{org-mode-alist} use
groups are allowed.}
@example
-#+TAGS: @{ @@WORK(w) @@HOME(h) @@TENNISCLUB(t) @} Laptop(l) PC(p)
+#+TAGS: @{ @@work(w) @@home(h) @@tennisclub(t) @} laptop(l) pc(p)
@end example
-@noindent you indicate that at most one of @samp{@@WORK}, @samp{@@HOME},
-and @samp{@@TENNISCLUB} should be selected.
+@noindent you indicate that at most one of @samp{@@work}, @samp{@@home},
+and @samp{@@tennisclub} should be selected.
@noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of
these lines to activate any changes.
@@ -3240,10 +3277,10 @@ selection window.
@noindent
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 @samp{@@HOME},
-@samp{Laptop} and @samp{PC} tags with just the following keys: @kbd{C-c
-C-c @key{SPC} h l p @key{RET}}. Switching from @samp{@@HOME} to
-@samp{@@WORK} would be done with @kbd{C-c C-c w @key{RET}} or
+the above setup, you could clear the current tags and set @samp{@@home},
+@samp{laptop} and @samp{pc} tags with just the following keys: @kbd{C-c
+C-c @key{SPC} h l p @key{RET}}. Switching from @samp{@@home} to
+@samp{@@work} would be done with @kbd{C-c C-c w @key{RET}} or
alternatively with @kbd{C-c C-c C-c w}. Adding the non-predefined tag
@samp{Sarah} could be done with @kbd{C-c C-c @key{TAB} S a r a h
@key{RET} @key{RET}}.
@@ -3294,14 +3331,14 @@ positive selection. The AND operator @samp{&} is optional when @samp{+}
or @samp{-} is present. Examples:
@table @samp
-@item +WORK-BOSS
-Select headlines tagged @samp{:WORK:}, but discard those also tagged
-@samp{:BOSS:}.
-@item WORK|LAPTOP
-Selects lines tagged @samp{:WORK:} or @samp{:LAPTOP:}.
-@item WORK|LAPTOP&NIGHT
-Like before, but require the @samp{:LAPTOP:} lines to be tagged also
-@samp{NIGHT}.
+@item +work-boss
+Select headlines tagged @samp{:work:}, but discard those also tagged
+@samp{:boss:}.
+@item work|laptop
+Selects lines tagged @samp{:work:} or @samp{:laptop:}.
+@item work|laptop&night
+Like before, but require the @samp{:laptop:} lines to be tagged also
+@samp{night}.
@end table
@cindex TODO keyword matching, with tags search
@@ -3317,30 +3354,32 @@ M}, or equivalently start the todo part after the slash with @samp{!}.
Examples:
@table @samp
-@item WORK/WAITING
-Select @samp{:WORK:}-tagged TODO lines with the specific TODO
+@item work/WAITING
+Select @samp{:work:}-tagged TODO lines with the specific TODO
keyword @samp{WAITING}.
-@item WORK/!-WAITING-NEXT
-Select @samp{:WORK:}-tagged TODO lines that are neither @samp{WAITING}
+@item work/!-WAITING-NEXT
+Select @samp{:work:}-tagged TODO lines that are neither @samp{WAITING}
nor @samp{NEXT}
-@item WORK/+WAITING|+NEXT
-Select @samp{:WORK:}-tagged TODO lines that are either @samp{WAITING} or
+@item work/+WAITING|+NEXT
+Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
@samp{NEXT}.
@end table
@cindex regular expressions, with tags search
Any element of the tag/todo match can be a regular expression - in this
case it must be enclosed in curly braces. For example,
-@samp{WORK+@{^BOSS.*@}} matches headlines that contain the tag
-@samp{WORK} and any tag @i{starting} with @samp{BOSS}.
-
-@cindex level, require for tags match
-You can also require a headline to be of a certain level, by writing
-instead of any TAG an expression like @samp{LEVEL=3}. For example, a
-search @samp{+LEVEL=3+BOSS/-DONE} lists all level three headlines that
-have the tag BOSS and are @emph{not} marked with the todo keyword DONE.
-
-@node Properties and columns, Timestamps, Tags, Top
+@samp{work+@{^boss.*@}} matches headlines that contain the tag
+@samp{work} and any tag @i{starting} with @samp{boss}.
+
+@cindex level, require for tags/property match
+@cindex category, require for tags/property match
+You can also require a headline to be of a certain level or category, by
+writing instead of any TAG an expression like @samp{LEVEL=3} or
+@samp{CATEGORY="work"}, respectively. For example, a search
+@samp{+LEVEL=3+boss/-DONE} lists all level three headlines that have the
+tag @samp{boss} and are @emph{not} marked with the todo keyword DONE.
+
+@node Properties and columns, Dates and times, Tags, Top
@chapter Properties and Columns
@cindex properties
@@ -3349,7 +3388,7 @@ are two main applications for properties in Org-mode. First, properties
are like tags, but with a value. For example, in a file where you
document bugs and plan releases of a piece of software, instead of using
tags like @code{:release_1:}, @code{:release_2:}, it can be more
-efficient to use a property @code{RELEASE} with a value @code{1.0} or
+efficient to use a property @code{Release} with a value @code{1.0} or
@code{2.0}. Second, you can use properties to implement (very basic)
database capabilities in an Org-mode buffer, for example to create a
list of Music CD's you own. You can edit and view properties
@@ -3359,6 +3398,7 @@ conveniently in column view (@pxref{Column view}).
* 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
@end menu
@@ -3386,8 +3426,8 @@ first, and the value after it. Here is an example:
:END:
@end example
-You may define the allowed values for a particular property @samp{XYZ}
-by setting a property @samp{XYZ_ALL}. This special property is
+You may define the allowed values for a particular property @samp{Xyz}
+by setting a property @samp{Xyz_ALL}. This special property is
@emph{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
@@ -3455,9 +3495,9 @@ nearest column format definition.
Special properties provide alternative access method to Org-mode
features discussed in the previous chapters, like the TODO state or the
priority of an entry. This interface exists so that you can include
-these states into columns view (@pxref{Column view}). The following
-property names are special and should not be used as keys in the
-properties drawer:
+these states into columns view (@pxref{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:
@example
TODO @r{The TODO keyword of the entry.}
@@ -3468,7 +3508,7 @@ DEADLINE @r{The deadline time string, without the angular brackets.}
SCHEDULED @r{The scheduling time stamp, without the angular brackets.}
@end example
-@node Property searches, Column view, Special properties, Properties and columns
+@node Property searches, Property inheritance, Special properties, Properties and columns
@section Property searches
@cindex properties, searching
@cindex properties, inheritance
@@ -3480,17 +3520,17 @@ properties, the same commands are used as for tag searches (@pxref{Tag
searches}), and the same logic applies. For example, a search string
@example
-+WORK-BOSS+PRIORITY="A"+coffee="unlimited"+with=@{Sarah\|Denny@}
++work-boss+PRIORITY="A"+Coffee="unlimited"+With=@{Sarah\|Denny@}
@end example
@noindent
-finds entries tagged @samp{:WORK:} but not @samp{:BOSS:}, which
-also have a priority value @samp{A}, a @samp{:coffee:} property with the
-value @samp{unlimited}, and a @samp{:with:} property that is matched by
+finds entries tagged @samp{:work:} but not @samp{:boss:}, which
+also have a priority value @samp{A}, a @samp{:Coffee:} property with the
+value @samp{unlimited}, and a @samp{:With:} property that is matched by
the regular expression @samp{Sarah\|Denny}.
-During a search, properties will be inherited from parent entries only
-if you configure the variable @code{org-use-property-inheritance}.
+You can configure Org-mode to use property inheritance during a search,
+see @ref{Property inheritance} for details.
There is also a special command for creating sparse trees based on a
single property:
@@ -3505,8 +3545,38 @@ value. If you enclose the value into curly braces, it is interpreted as
a regular expression and matched against the property values.
@end table
+@node Property inheritance, Column view, Property searches, Properties and columns
+@section Property Inheritance
+
+The outline structure of Org-mode documents lends itself for 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
+@code{org-use-property-inheritance}. It may be set to @code{t}, to make
+all properties inherited from the parent, or to a list of properties
+that should be inherited.
+
+Org-mode has a few properties for which inheritance is hard-coded, at
+least for the special applications for which they are used:
-@node Column view, Property API, Property searches, Properties and columns
+@table @code
+@item COLUMNS
+The column property defines the format of column view (@pxref{Column
+view}). It is inherited in the sense that the level where a
+@code{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.
+@item CATEGORY
+For agenda view, a category set through a @code{CATEGORY} property
+applies to the entire subtree.
+@item ARCHIVE
+For archiving, the @code{ARCHIVE} property may define the archive
+location for the entire subtree (@pxref{Moving subtrees}).
+@end table
+
+@node Column view, Property API, Property inheritance, Properties and columns
@section Column View
A great way to view and edit properties in an outline tree is
@@ -3589,9 +3659,11 @@ property @r{The property that should be edited in this column.}
@{summary-type@} @r{The summary type. If specified, the column values for}
@r{parent nodes are computed from the children.}
@r{Supported summary types are:}
- @{+@} @r{Sum numbers in this column.}
- @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.}
- @{X@} @r{Checkbox status, [X] if all children are [X].}
+ @{+@} @r{Sum numbers in this column.}
+ @{+;%.1f@} @r{Like @samp{+}, but format result with @samp{%.1f}.}
+ @{$@} @r{Currency, short for @samp{+;%.2f}.}
+ @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.}
+ @{X@} @r{Checkbox status, [X] if all children are [X].}
@end example
@noindent
@@ -3745,13 +3817,19 @@ be used by Emacs Lisp programs to work with properties and to implement
features based on them. For more information see @ref{Using the
property API}.
-@node Timestamps, Remember, Properties and columns, Top
-@chapter Timestamps
+@node Dates and times, Remember, Properties and columns, Top
+@chapter Dates and Times
+@cindex dates
+@cindex times
@cindex time stamps
@cindex date stamps
-Items can be labeled with timestamps to make them useful for project
-planning.
+Items can be labeled with a date and/or a time to make them useful for
+project planning. The specially formatted string carrying the date and
+time information is called a @emph{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
* Time stamps:: Assigning a time to a tree entry
@@ -3761,7 +3839,7 @@ planning.
@end menu
-@node Time stamps, Creating timestamps, Timestamps, Timestamps
+@node Time stamps, Creating timestamps, Dates and times, Dates and times
@section Time stamps, deadlines and scheduling
@cindex time stamps
@cindex ranges, time
@@ -3779,7 +3857,7 @@ Its presence causes entries to be shown on specific dates in the agenda
(@pxref{Weekly/Daily agenda}). We distinguish:
@table @var
-@item Plain time stamp, Event, Appointment
+@item Plain time stamp; Event; Appointment
@cindex timestamp
A simple time stamp just assigns a date/time to an item. This is just
like writing down an appointment or event in a paper agenda. In the
@@ -3837,7 +3915,7 @@ angular ones. These time stamps are inactive in the sense that they do
@end table
-@node Creating timestamps, Deadlines and scheduling, Time stamps, Timestamps
+@node Creating timestamps, Deadlines and scheduling, Time stamps, Dates and times
@section Creating timestamps
@cindex creating timestamps
@cindex timestamps, creating
@@ -3915,24 +3993,36 @@ into the following column).
@cindex date, reading in minibuffer
@cindex time, reading in minibuffer
-When Org-mode prompts for a date/time, the prompt suggests to enter an
-ISO date. But it will in fact accept any string containing some date
-and/or time information. You can, for example, use @kbd{C-y} to paste a
-(possibly multi-line) string copied from an email message. Org-mode
-will find whatever information is in there and will replace anything not
-specified with the @emph{default date and time}. The default is usually
-the current date and time, but when modifying an existing time stamp, or
-when entering the second stamp of a range, it is taken from the stamp in
-the buffer. For example:
+When Org-mode prompts for a date/time, the default is shown as an ISO
+date, and the prompt therefore seems to ask for an ISO date. But it
+will in fact accept any string containing some date and/or time
+information, and it is really smart about interpreting your input. You
+can, for example, use @kbd{C-y} to paste a (possibly multi-line) string
+copied from an email message. Org-mode will find whatever information
+is in there and derive anything you have not specified from the
+@emph{default date and time}. The default is usually the current date
+and time, but when modifying an existing time stamp, 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 @i{before} today, it will assume that you mean a
+future date@footnote{See the variable
+@code{org-read-date-prefer-future}.}.
+
+For example, lets assume that today is @b{June 13, 2006}. Here is how
+various inputs will be interpreted, the items filled in by Org-mode are
+in @b{bold}.
@example
3-2-5 --> 2003-02-05
-feb 15 --> defaultyear-02-15
-sep 12 9 --> 2009-09-12
-12:45 --> default-date 12:45
-22 sept 0:34 --> defaultyear-09-22 0:34
-12 --> defaultyear-defaultmonth-12
+14 --> @b{2006}-@b{06}-14
+12 --> @b{2006}-@b{07}-12
Fri --> nearest Friday (defaultdate or later)
+sep 15 --> @b{2006}-11-15
+feb 15 --> @b{2007}-02-15
+sep 12 9 --> 2009-09-12
+12:45 --> @b{2006}-@b{06}-@b{13} 12:45
+22 sept 0:34 --> @b{2006}-09-22 0:34
@end example
Furthermore you can specify a relative date by giving, as the
@@ -3964,38 +4054,30 @@ prompt, either by clicking on a date in the calendar, or by pressing
information entered at the prompt. You can control the calendar fully
from the minibuffer:
-@table @kbd
@kindex <
-@item <
-Scroll calendar backwards by one month.
@kindex >
-@item >
-Scroll calendar forwards by one month.
@kindex mouse-1
-@item mouse-1
-Select date by clicking on it.
@kindex S-@key{right}
-@item S-@key{right}
-One day forward.
@kindex S-@key{left}
-@item S-@key{left}
-One day back.
@kindex S-@key{down}
-@item S-@key{down}
-One week forward.
@kindex S-@key{up}
-@item S-@key{up}
-One week back.
@kindex M-S-@key{right}
-@item M-S-@key{right}
-One month forward.
@kindex M-S-@key{left}
-@item M-S-@key{left}
-One month back.
@kindex @key{RET}
-@item @key{RET}
-Choose date in calendar (only if nothing was typed into minibuffer).
-@end table
+@example
+> / < @r{Scroll calendar forward/backward by one month.}
+mouse-1 @r{Select date by clicking on it.}
+S-@key{right}/@key{left} @r{One day forward/backward.}
+S-@key{down}/@key{up} @r{One week forward/backward.}
+M-S-@key{right}/@key{left} @r{One month forward/backward.}
+@key{RET} @r{Choose date in calendar.}
+@end example
+
+The actions of the date/time prompt may seem complex, but I asure you
+they will grow on you. To help you understand what is going on, the
+current interpretation of your input will be displayed live in the
+minibuffer@footnote{If you find this distracting, turn the display of
+with @code{org-read-date-display-live}.}.
@node Custom time format, , The date/time prompt, Creating timestamps
@subsection Custom time format
@@ -4044,7 +4126,7 @@ format is shorter, things do work as expected.
@end itemize
-@node Deadlines and scheduling, Clocking work time, Creating timestamps, Timestamps
+@node Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and times
@section Deadlines and Scheduling
A time stamp may be preceded by special keywords to facilitate planning
@@ -4114,13 +4196,13 @@ happen in the line directly following the headline. When called with a
prefix arg, an existing deadline will be removed from the entry.
@c FIXME Any CLOSED timestamp will be removed.????????
@c
-@kindex C-c C-w
+@kindex C-c / d
@cindex sparse tree, for deadlines
-@item C-c C-w
+@item C-c / d
Create a sparse tree with all deadlines that are either past-due, or
which will become due within @code{org-deadline-warning-days}.
With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
-prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
+prefix, check that many days. For example, @kbd{C-1 C-c / d} shows
all deadlines due tomorrow.
@c
@kindex C-c C-s
@@ -4172,7 +4254,7 @@ will be visible.
You may have both scheduling and deadline information for a specific
task - just make sure that the repeater intervals on both are the same.
-@node Clocking work time, , Deadlines and scheduling, Timestamps
+@node Clocking work time, , Deadlines and scheduling, Dates and times
@section Clocking work time
Org-mode allows you to clock the time you spent on specific tasks in a
@@ -4288,14 +4370,14 @@ The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
the agenda (@pxref{Weekly/Daily agenda}) to show which tasks have been
worked on or closed during a day.
-@node Remember, Agenda views, Timestamps, Top
+@node Remember, Agenda views, Dates and times, Top
@chapter Remember
@cindex @file{remember.el}
The @i{Remember} package by John Wiegley lets you store quick notes with
little interruption of your work flow. See
@uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
-information. It is an excellent way to add new notes and TODO items to
+information. It is an excellent way to add new notes and tasks to
Org-mode files. Org-mode significantly expands the possibilities of
@i{remember}: You may define templates for different note types, and
associate target files and headlines with specific templates. It also
@@ -4306,6 +4388,7 @@ interactively, on the fly.
* Setting up remember:: Some code for .emacs to get things going
* Remember templates:: Define the outline of different note types
* Storing notes:: Directly get the note to where it belongs
+* Refiling notes:: Moving a note or task to a project
@end menu
@node Setting up remember, Remember templates, Remember, Remember
@@ -4315,14 +4398,19 @@ The following customization will tell @i{remember} to use org files as
target, and to create annotations compatible with Org-mode links.
@example
-(require 'remember)
+(org-remember-insinuate)
(setq org-directory "~/path/to/my/orgfiles/")
(setq org-default-notes-file (concat org-directory "/notes.org"))
-(setq remember-annotation-functions '(org-remember-annotation))
-(setq remember-handler-functions '(org-remember-handler))
-(add-hook 'remember-mode-hook 'org-remember-apply-template)
+(define-key global-map "\C-cr" 'org-remember)
@end example
+The last line binds the command @code{org-remember} to a global
+key@footnote{Please select your own key, @kbd{C-c r} is only a
+suggestion.}. @code{org-remember} basically just calls @code{remember},
+but it makes a few things easier: If there is an active region, it will
+automatically copy the region into the remember buffer. It also allows
+to jump to the buffer and location where remember notes are being
+stored: Just call @code{org-remember} with a prefix argument.
@node Remember templates, Storing notes, Setting up remember, Remember
@section Remember templates
@@ -4346,11 +4434,9 @@ character specifies how to select the template. It is useful if the
character is also the first letter of the name. The next string
specifies the template. Two more (optional) strings give the file in
which, and the headline under which the new note should be stored. The
-file defaults (if not present or @code{nil}) to
+file (if not present or @code{nil}) defaults to
@code{org-default-notes-file}, the heading to
-@code{org-remember-default-headline}. Both defaults help to get to the
-storing location quickly, but you can change the location interactively
-while storing the note.
+@code{org-remember-default-headline}.
When you call @kbd{M-x remember} (or @kbd{M-x org-remember}) to remember
something, org will prompt for a key to select the template (if you have
@@ -4375,9 +4461,12 @@ insertion of content:
%A @r{like @code{%a}, but prompt for the description part}
%i @r{initial content, the region when remember is called with C-u.}
@r{The entire text will be indented like @code{%i} itself.}
+%c @r{Content of the clipboard, or current kill ring head.}
%^g @r{prompt for tags, with completion on tags in target file.}
%^G @r{prompt for tags, with completion all tags in all agenda files.}
%:keyword @r{specific information for certain link types, see below}
+%[pathname] @r{insert the contents of the file given by @code{pathname}}
+%(sexp) @r{evaluate elisp @code{(sexp)} and replace with the result}
@end example
@noindent
@@ -4413,7 +4502,7 @@ If you change you mind about which template to use, call
@code{org-remember} in the remember buffer. You may then select a new
template that will be filled with the previous context information.
-@node Storing notes, , Remember templates, Remember
+@node Storing notes, Refiling notes, Remember templates, Remember
@section Storing notes
When you are finished preparing a note with @i{remember}, you have to press
@@ -4425,13 +4514,13 @@ restored, and you are back in the working context before the call to
@code{remember}, exit the remember buffer with @kbd{C-u C-u C-c C-c},
i.e. specify a double prefix argument to @kbd{C-c C-c}.
-If you want to store the note to a different place, use @kbd{C-u C-c
-C-c} instead to exit remember@footnote{Configure the variable
-@code{org-remember-store-without-prompt} to make this behavior the
-default.}. The handler will then first prompt for a target file - if you
-press @key{RET}, the value specified for the template is used. Then the
-command offers the headings tree of the selected file, with the cursor
-position at the default headline (if you had specified one in the
+If you want to store the note directly to a different place, use
+@kbd{C-u C-c C-c} instead to exit remember@footnote{Configure the
+variable @code{org-remember-store-without-prompt} to make this behavior
+the default.}. The handler will then first prompt for a target file -
+if you press @key{RET}, the value specified for the template is used.
+Then the command offers the headings tree of the selected file, with the
+cursor position at the default headline (if you had specified one in the
template). You can either immediately press @key{RET} to get the note
placed there. Or you can use the following keys to find a different
location:
@@ -4465,6 +4554,33 @@ data. If you have indented the text of the note below the headline, the
indentation will be adapted if inserting the note into the tree requires
demotion from level 1.
+@node Refiling notes, , Storing notes, Remember
+@section Refiling notes
+@cindex refiling notes
+
+Remember is usually used to quickly capture notes and tasks into one or
+a few capture lists. When reviewing the captured data, you may want to
+refile 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:
+
+@table @kbd
+@kindex C-c C-w
+@item C-c C-w
+Refile the entry at point. This command offers possible locations for
+refiling the entry and lets you select one with completion. The item is
+filed below the target heading as a subitem. Depending on
+@code{org-reverse-note-order}, it will be either the first of last
+subitem, and you can toggle the value of this variable for the duration
+of the command by using a @kbd{C-u} prefix.@* 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 @code{org-refile-targets} for details. The list of targets is
+compiled upon first use, you can update it by using a double prefix
+argument (@kbd{C-u C-u}) to this command.
+@end table
+
@node Agenda views, Embedded LaTeX, Remember, Top
@chapter Agenda Views
@cindex agenda views
@@ -4775,8 +4891,8 @@ to them and collect them into an agenda buffer.
@item C-c a m
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 @samp{+WORK+URGENT-WITHBOSS} or
-@samp{WORK|HOME} (@pxref{Tags}). If you often need a specific search,
+expression with tags, like @samp{+work+urgent-withboss} or
+@samp{work|home} (@pxref{Tags}). If you often need a specific search,
define a custom command for it (@pxref{Agenda dispatcher}).
@kindex C-c a M
@item C-c a M
@@ -4879,12 +4995,14 @@ associated with the item.
@cindex category
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@footnote{If
-there are several such lines in a file, each specifies the category for
-the text below it. The first category also applies to any text before
-the first CATEGORY line. This method is only kept for backward
-compatibility. The preferred method for setting multiple categories in
-a buffer is using a property.}:
+specify it with a special line in the buffer, like this@footnote{For
+backward compatibility, the following also works: If there are several
+such lines in a file, each specifies the category for the text below it.
+The first category also applies to any text before the first CATEGORY
+line. However, using this method is @emph{strongly} deprecated as it is
+incompatible with the outline structure of the document. The correct
+method for setting multiple categories in a buffer is using a
+property.}:
@example
#+CATEGORY: Thesis
@@ -5575,6 +5693,7 @@ or, if you need to modify some parameters
@example
emacs -eval '(org-batch-store-agenda-views \
org-agenda-ndays 30 \
+ org-agenda-start-day "2007-11-01" \
org-agenda-include-diary nil \
org-agenda-files (quote ("~/org/project.org")))' \
-kill
@@ -6021,7 +6140,7 @@ Export as HTML file and immediately open it with a browser.
@item C-c C-e H
Export to a temporary buffer, do not create a file.
@kindex C-c C-e R
-@item C-c C-e H
+@item C-c C-e R
Export the active region to a temporary buffer. With prefix arg, do not
produce file header and foot, but just the plain HTML section for the
region. This is good for cut-and-paste operations.
@@ -6169,6 +6288,7 @@ Org-mode contains a La@TeX{} exporter written by Bastien Guerry.
@menu
* LaTeX export commands:: How to invoke LaTeX export
* Quoting LaTeX code:: Incorporating literal LaTeX code
+* Sectioning structure::
@end menu
@node LaTeX export commands, Quoting LaTeX code, LaTeX export, LaTeX export
@@ -6212,7 +6332,7 @@ with a prefix argument. For example,
@noindent
creates two levels of headings and does the rest as items.
-@node Quoting LaTeX code, , LaTeX export commands, LaTeX export
+@node Quoting LaTeX code, Sectioning structure, LaTeX export commands, LaTeX export
@subsection Quoting LaTeX code
Embedded La@TeX{} as described in @ref{Embedded LaTeX} will be correctly
@@ -6231,6 +6351,23 @@ constructs:
All lines between these markers are exported literally
#+END_LaTeX
@end example
+
+
+
+@node Sectioning structure, , Quoting LaTeX code, LaTeX export
+@subsection Sectioning structure
+@cindex LaTeX class
+@cindex LaTeX sectioning structure
+
+By default, the La@TeX{} output uses the class @code{article}.
+
+You can change this globally by setting a different value for
+@code{org-export-latex-default-class} or locally by adding an option
+like @code{#+LaTeX_CLASS: myclass} in your file. The class should be
+listed in @code{org-export-latex-classes}, where you can also define the
+sectioning structure for each class.
+
+
@node XOXO export, iCalendar export, LaTeX export, Exporting
@section XOXO export
@cindex XOXO export
@@ -6296,6 +6433,7 @@ in order to produce better output.
* Comment lines:: Some lines will not be exported
* Initial text:: Text before the first headline
* Footnotes:: Numbers like [1]
+* Quoted examples:: Inserting quoted chnuks of text
* Enhancing text:: Subscripts, symbols and more
* Export options:: How to influence the export settings
@end menu
@@ -6353,7 +6491,7 @@ construct:
#+TEXT: This goes between the table of contents and the first headline
@end example
-@node Footnotes, Enhancing text, Initial text, Text interpretation
+@node Footnotes, Quoted examples, Initial text, Text interpretation
@subsection Footnotes
@cindex footnotes
@cindex @file{footnote.el}
@@ -6378,14 +6516,48 @@ if you are too used to this binding, you could use
@code{org-replace-disputed-keys} and @code{org-disputed-keys} to change
the settings in Org-mode.
-@node Enhancing text, Export options, Footnotes, Text interpretation
+@node Quoted examples, Enhancing text, Footnotes, Text interpretation
+@subsection Quoted examples
+@cindex quoted examples
+@cindex examples, quoted
+@cindex text, fixed width
+@cindex fixed width text
+
+When writing technical documents, you often need to insert examples that
+are not further interpreted by Org-mode. For historical reasons, there
+are several ways to do this:
+
+@itemize @bullet
+@item
+If a headline starts with the word @samp{QUOTE}, the text below the
+headline will be typeset as fixed-width, to allow quoting of computer
+codes etc.
+@item
+Lines starting with @samp{:} are also typeset in fixed-width font.
+@table @kbd
+@kindex C-c :
+@item C-c :
+Toggle fixed-width for entry (QUOTE) or region, see below.
+@end table
+@item
+Finally, text between
+@example
+#+BEGIN_EXAMPLE
+quoted text
+#+END_EXAMPLE
+@end example
+will also be exported in this way.
+@end itemize
+
+
+@node Enhancing text, Export options, Quoted examples, Text interpretation
@subsection Enhancing text for export
@cindex enhancing text
@cindex richer text
Some of the export backends of Org-mode allow for sophisticated text
formatting, this is true in particular for the HTML and La@TeX{}
-backends. Org-mode has a number of typing conventions that allow to
+backends. Org-mode has a number of typing conventions that allow to
produce a richly formatted output.
@itemize @bullet
@@ -6400,11 +6572,12 @@ backend supports lists. See @xref{Plain lists}.
@cindex underlined text
@cindex bold text
@cindex italic text
+@cindex verbatim text
@item
-You can make words @b{*bold*}, @i{/italic/}, _underlined_,
-@code{=code=}, and even @samp{+strikethrough+}@footnote{but remember
-that strikethrough is typographically evil and should @i{never} be
-used.}.
+You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
+and @code{~verbatim~}, and, if you must, @samp{+strikethrough+}. Text
+in the code and verbatim string is not processed for org-mode specific
+syntax, it is exported verbatim.
@cindex horizontal rules, in exported files
@item
@@ -6434,11 +6607,27 @@ font.
@item C-c :
Toggle fixed-width for entry (QUOTE) or region, see below.
@end table
+Finally, text between
+@example
+#+BEGIN_EXAMPLE
+quoted text
+#+END_EXAMPLE
+@end example
+will also be exported in this way.
@cindex linebreak, forced
@item
A double backslash @emph{at the end of a line} enforces a line break at
this position.
+
+@cindex HTML entities, LaTeX entities
+@item
+Strings like @code{\alpha} will be exported as @code{&alpha;}, in the
+HTML output. These strings are exported as @code{$\alpha$} in the
+La@TeX{} output. Similarly, @code{\nbsp} will become @code{&nbsp;} in
+HTML and in La@TeX{}. This applies for a long list of entities, see
+the variable @code{org-html-entities} for the complete list.
+@c FIXME
@end itemize
If these conversions conflict with your habits of typing ASCII text,
@@ -6489,6 +6678,7 @@ you can:
@cindex tables
@cindex @TeX{}-like syntax for sub- and superscripts
@cindex footnotes
+@cindex special strings
@cindex emphasized text
@cindex @TeX{} macros
@cindex La@TeX{} fragments
@@ -6505,6 +6695,7 @@ toc: @r{turn on/off table of contents, or set level limit (integer)}
^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts. If}
@r{you write "^:@{@}", @code{a_@{b@}} will be interpreted, but}
@r{the simple @code{a_b} will be left as it is.}
+-: @r{turn on/off conversion of special strings.}
f: @r{turn on/off foototes like this[1].}
*: @r{turn on/off emphasized text (bold, italic, underlined)}
TeX: @r{turn on/off simple @TeX{} macros in plain text}
@@ -6677,6 +6868,7 @@ respective variable for details.
@item @code{:archived-trees} @tab @code{org-export-with-archived-trees}
@item @code{:emphasize} @tab @code{org-export-with-emphasize}
@item @code{:sub-superscript} @tab @code{org-export-with-sub-superscripts}
+@item @code{:special-strings} @tab @code{org-export-with-special-strings}
@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros}
@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments}
@item @code{:fixed-width} @tab @code{org-export-with-fixed-width}
@@ -6698,14 +6890,16 @@ respective variable for details.
@item @code{:email} @tab @code{user-mail-address}
@end multitable
+If you use several email addresses, separate them by a semi-column.
+
Most of the @code{org-export-with-*} variables have the same effect in
both HTML and La@TeX{} exporters, except for @code{:TeX-macros} and
@code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the
La@TeX{} export.
-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 (@pxref{Export
+When a property is given a value in @code{org-publish-project-alist},
+its setting overrides the value of the corresponding user variable (if
+any) during publishing. Options set within a file (@pxref{Export
options}), however, override everything.
@node Publishing links, Project page index, Publishing options, Configuration
@@ -6721,7 +6915,7 @@ you publish them to HTML.
You may also link to related files, such as images. Provided you are
careful with relative pathnames, and provided you have also configured
-org-publish to upload the related files, these links will work
+@code{org-publish} to upload the related files, these links will work
too. @ref{Complex example} for an example of this usage.
Sometime an Org-mode file to be published may contain links that are
@@ -7375,13 +7569,12 @@ is loaded @emph{before} @file{allout.el}, for example by putting
@cindex @file{CUA.el}
@item @file{CUA.el} by Kim. F. Storm
-Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
-used by CUA-mode (as well as pc-select-mode and s-region-mode) to
-select and extend the region. If you want to use one of these
-packages along with Org-mode, configure the variable
-@code{org-CUA-compatible}. When set, Org-mode will move the following
-keybindings in Org-mode files, and in the agenda buffer (but not
-during date selection).
+Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys used by
+CUA-mode (as well as pc-select-mode and s-region-mode) to select and
+extend the region. If you want to use one of these packages along with
+Org-mode, configure the variable @code{org-replace-disputed-keys}. When
+set, Org-mode will move the following keybindings in Org-mode files, and
+in the agenda buffer (but not during date selection).
@example
S-UP -> M-p S-DOWN -> M-n
@@ -7610,15 +7803,18 @@ the link description when the link is later inserted into tan Org-mode
buffer with @kbd{C-c C-l}.
@node Tables in arbitrary syntax, Dynamic blocks, Adding hyperlink types, Extensions and Hacking
-@section Tables in arbitrary syntax
+@section Tables and Lists in arbitrary syntax
@cindex tables, in other modes
+@cindex lists, in other modes
@cindex orgtbl-mode
Since Orgtbl-mode can be used as a minor mode in arbitrary buffers, a
frequent feature request has been to make it work with native tables in
-specific languages, for example La@TeX{}. However, this is extremely hard
-to do in a general way, would lead to a customization nightmare, and
-would take away much of the simplicity of the Orgtbl-mode table editor.
+specific languages, for example La@TeX{}. However, this is extremely
+hard to do in a general way, would lead to a customization nightmare,
+and would take away much of the simplicity of the Orgtbl-mode table
+editor.
+
This appendix describes a different approach. We keep the Orgtbl-mode
table in its native format (the @i{source table}), and use a custom
@@ -7627,10 +7823,17 @@ function to @i{translate} the table to the correct syntax, and to
the burden of writing conversion functions on the user, but it allows
for a very flexible system.
+Bastien added the ability to do the same with lists. You can use Org's
+facilities to edit and structure lists by turning @code{orgstruct-mode}
+on, then locally exporting such lists in another format (HTML, La@TeX{}
+or TeXInfo.)
+
+
@menu
* Radio tables:: Sending and receiving
* A LaTeX example:: Step by step, almost a tutorial
* Translator functions:: Copy and modify
+* Radio lists:: Doing the same for lists.
@end menu
@node Radio tables, A LaTeX example, Tables in arbitrary syntax, Tables in arbitrary syntax
@@ -7699,7 +7902,7 @@ key.
@end itemize
@node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax
-@subsection A LaTeX example
+@subsection A LaTeX example of radio tables
@cindex LaTeX, and orgtbl-mode
The best way to wrap the source table in La@TeX{} is to use the
@@ -7803,7 +8006,7 @@ may also be a property list with column numbers and formats, for example
applied.
@end table
-@node Translator functions, , A LaTeX example, Tables in arbitrary syntax
+@node Translator functions, Radio lists, A LaTeX example, Tables in arbitrary syntax
@subsection Translator functions
@cindex HTML, and orgtbl-mode
@cindex translator function
@@ -7876,6 +8079,49 @@ containing the formatted table. If you write a generally useful
translator, please post it on @code{emacs-orgmode@@gnu.org} so that
others can benefit from your work.
+@node Radio lists, , Translator functions, Tables in arbitrary syntax
+@subsection Radio lists
+@cindex radio lists
+@cindex org-list-insert-radio-list
+
+Sending and receiving radio lists works exactly the same way than
+sending and receiving radio tables (@pxref{Radio tables}) @footnote{You
+need to load the @code{org-export-latex.el} package to use radio lists
+since the relevant code is there for now.}. As for radio tables, you
+can insert radio lists templates in HTML, La@TeX{} and TeXInfo modes by
+calling @code{org-list-insert-radio-list}.
+
+Here are the differences with radio tables:
+
+@itemize @minus
+@item
+Use @code{ORGLST} instead of @code{ORGTBL}.
+@item
+The available translation functions for radio lists don't take
+parameters.
+@item
+`C-c C-c' will work when pressed on the first item of the list.
+@end itemize
+
+Here is a La@TeX{} example. Let's say that you have this in your
+La@TeX{} file:
+
+@example
+% BEGIN RECEIVE ORGLST to-buy
+% END RECEIVE ORGLST to-buy
+\begin@{comment@}
+#+ORGLIST: SEND to-buy orgtbl-to-latex
+- a new house
+- a new computer
+ + a new keyboard
+ + a new mouse
+- a new life
+\end@{comment@}
+@end example
+
+Pressing `C-c C-c' on @code{a new house} and will insert the converted
+La@TeX{} list between the two marker lines.
+
@node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Extensions and Hacking
@section Dynamic blocks
@cindex dynamic blocks
@@ -8034,7 +8280,9 @@ If WHICH is nil or `all', get all properties. If WHICH is
@defun org-entry-get pom property &optional inherit
Get value of PROPERTY for entry at point-or-marker POM.
If INHERIT is non-nil and the entry does not have the property,
-then also check higher levels of the hierarchy.
+then also check higher levels of the hierarchy. This function ignores
+the value of @code{org-use-property-inheritance} and requires the
+explicit INHERIT flag.
@end defun
@defun org-entry-delete pom property
diff --git a/orgcard.pdf b/orgcard.pdf
index 5e0b4b723..a5def2581 100644
--- a/orgcard.pdf
+++ b/orgcard.pdf
Binary files differ
diff --git a/orgcard.tex b/orgcard.tex
index a5d07b528..f78439b48 100644
--- a/orgcard.tex
+++ b/orgcard.tex
@@ -1,5 +1,5 @@
% Reference Card for Org Mode
-\def\orgversionnumber{5.13e}
+\def\orgversionnumber{5.14}
\def\versionyear{2007} % latest update
\def\year{2007} % latest copyright year
@@ -317,6 +317,7 @@ are preserved on all copies.
\key{demote current subtree down one level}{M-S-RIGHT}
\key{move subtree/list item up/down}{M-S-UP/DOWN}
+\key{refile subtree}{C-c C-w}
\key{kill subtree}{C-c C-x C-w}
\key{copy subtree}{C-c C-x M-w}
\key{yank subtree}{C-c C-x C-y}
@@ -337,10 +338,10 @@ are preserved on all copies.
\section{Filtering and Sparse Trees}
-\key{show sparse tree for all matches of a regexp}{C-c /}
+% FIXME: this is garbage
+\key{construct a sparse tree by various criteria}{C-c /}
\key{view TODO's in sparse tree}{C-c C-v}
\key{global TODO list in agenda mode}{C-c t$^1$}
-\key{create sparse tree with all deadlines due}{C-c C-w}
\key{time sorted view of current org file}{C-c a L}
%\key{agenda for the week}{C-c a$^1$}
%\key{agenda for date at cursor}{C-c C-o}
@@ -572,7 +573,7 @@ after ``{\tt :}'', and dictionary words elsewhere.
\key{Like \kbd{C-c .} but make stamp inactive}{C-c !} % FIXME
\key{insert DEADLINE timestamp}{C-c C-d}
\key{insert SCHEDULED timestamp}{C-c C-s}
-\key{create sparse tree with all deadlines due}{C-c C-w}
+\key{create sparse tree with all deadlines due}{C-c / d}
\key{the time between 2 dates in a time range}{C-c C-y}
\key{change timestamp at cursor by $\pm 1$ day}{S-RIGHT/LEFT$^3$}
\key{change year/month/day at cursor by $\pm 1$}{S-UP/DOWN$^3$}
diff --git a/orgcard_letter.pdf b/orgcard_letter.pdf
index 84bf363cf..1b7bd506b 100644
--- a/orgcard_letter.pdf
+++ b/orgcard_letter.pdf
Binary files differ