summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <dominik@nb-dominik2.science.uva.nl>2008-01-31 11:33:32 +0100
committerCarsten Dominik <dominik@nb-dominik2.science.uva.nl>2008-01-31 11:33:32 +0100
commit09ce05493102645948c2faacb2e6748b00dd9eed (patch)
tree2d4111d79efc31c972fbb63957f9d017497c1b2d
parentbd2ceb1b545cd75b682b21f5f1dbdbf497cb48ed (diff)
Release 4.60release_4.60
-rw-r--r--org574
-rw-r--r--org.el669
-rw-r--r--org.pdfbin638748 -> 651080 bytes
-rw-r--r--org.texi203
-rw-r--r--orgcard.pdfbin59989 -> 58067 bytes
-rw-r--r--orgcard.tex2
-rw-r--r--xemacs/noutline.el35
7 files changed, 989 insertions, 494 deletions
diff --git a/org b/org
index 76a1f0d66..d1331b876 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 4.59).
+ This manual is for Org-mode (version 4.60).
Copyright (C) 2004, 2005, 2006 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 4.59).
+This manual is for Org-mode (version 4.60).
Copyright (C) 2004, 2005, 2006 Free Software Foundation
@@ -149,6 +149,7 @@ Creating timestamps
Progress Logging
* Closing items:: When was this entry marked DONE?
+* Tracking TODO state changes:: When did the status change?
* Clocking work time:: When exactly did you work on this item?
Tags
@@ -203,6 +204,14 @@ Exporting
* iCalendar export:: Exporting in iCalendar format
* Text interpretation:: How the exporter looks at the file
+HTML export
+
+* Export commands:: How to invode HTML export
+* Quoting HTML tags:: Using direct HTML in Org-mode
+* Links:: How hyperlinks get transferred to HTML
+* Images:: To inline or not to inline?
+* CSS support:: Style specifications
+
Text interpretation by the exporter
* Comment lines:: Some lines will not be exported
@@ -537,7 +546,8 @@ the visibility in the buffer.
Reveal context around point, showing the current entry, the
following heading and the hierarchy above. Useful for working
near a location exposed by a sparse tree command (*note Sparse
- trees::) or an agenda command (*note Agenda commands::).
+ trees::) or an agenda command (*note Agenda commands::). With
+ prefix arg show, on each level, all sibling headings.
`C-c C-x b'
Show the current subtree in an indirect buffer(3). With numerical
@@ -802,8 +812,9 @@ only the visible part of the document and print the resulting file.
---------- Footnotes ----------
- (1) See also the variables `org-show-hierarchy-above' and
-`org-show-following-heading'.
+ (1) See also the variables `org-show-hierarchy-above',
+`org-show-following-heading', and `org-show-siblings' for detailed
+control on how much context is shown around each match.
(2) This does not work under XEmacs, because XEmacs uses selective
display for outlining, not text properties.
@@ -1679,10 +1690,15 @@ format::), for example:
[[http://www.gnu.org/software/emacs/][GNU Emacs]]
+If the description is a file name or URL that points to an image, HTML
+export (*note HTML export::) will inline the image as a clickable
+button. If there is no description at all and the link points to an
+image, that image will be inlined into the exported HTML file.
+
Org-mode also finds external links in the normal text and activates
them as links. If spaces must be part of the link (for example in
-`bbdb:Richard Stallman'), or you need to remove ambiguities about the
-end of the link, enclose them in angular brackets.
+`bbdb:Richard Stallman'), or if you need to remove ambiguities about
+the end of the link, enclose them in angular brackets.

File: org, Node: Handling links, Next: Link abbreviations, Prev: External links, Up: Hyperlinks
@@ -2085,7 +2101,9 @@ from TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may
also use a prefix argument to quickly select a specific state. For
example `C-3 C-c C-t' will change the state immediately to VERIFY. If
you define many keywords, you can use in-buffer completion (see *Note
-Completion::) to insert these words into the buffer.
+Completion::) to insert these words into the buffer. Changing a todo
+state can be logged with a timestamp, see *Note Tracking TODO state
+changes:: for more information.

File: org, Node: TODO types, Next: Per file keywords, Prev: Workflow states, Up: TODO extensions
@@ -2564,40 +2582,72 @@ File: org, Node: Progress logging, Prev: Custom time format, Up: Timestamps
====================
Org-mode can automatically record a time stamp when you mark a TODO item
-as DONE. You can also measure precisely the time you spent on specific
-items in a project by starting and stopping a clock when you start and
-stop working on an aspect of a project.
+as DONE, or even each time when you change the state of a TODO item.
+You can also measure precisely the time you spent on specific items in a
+project by starting and stopping a clock when you start and stop working
+on an aspect of a project.
* Menu:
* Closing items:: When was this entry marked DONE?
+* Tracking TODO state changes:: When did the status change?
* Clocking work time:: When exactly did you work on this item?

-File: org, Node: Closing items, Next: Clocking work time, Prev: Progress logging, Up: Progress logging
+File: org, Node: Closing items, Next: Tracking TODO state changes, Prev: Progress logging, Up: Progress logging
6.4.1 Closing items
-------------------
If you want to keep track of _when_ a certain TODO item was finished,
-turn on logging with
+turn on logging with(1)
(setq org-log-done t)
Then each time you turn a TODO entry into DONE using either `C-c C-t'
in the Org-mode buffer or `t' in the agenda buffer, a line `CLOSED:
[timestamp]' will be inserted just after the headline. If you turn the
-entry back into a TODO item again through further state cycling, that
-line will be removed again. In the timeline (*note Timeline::) and in
-the agenda (*note Weekly/Daily agenda::), you can then use the `l' key
-to display the TODO items closed on each day, giving you an overview of
-what has been done on a day. See the variable `org-log-done' for the
-possibility to record an additional note together with a timestamp.
+entry back into a TODO item through further state cycling, that line
+will be removed again. In the timeline (*note Timeline::) and in the
+agenda (*note Weekly/Daily agenda::), you can then use the `l' key to
+display the TODO items closed on each day, giving you an overview of
+what has been done on a day. If you want to record a note along with
+the timestamp, use(2)
+
+ (setq org-log-done '(done))
+
+ ---------- Footnotes ----------
+
+ (1) The corresponding in-buffer setting is: `#+STARTUP: logdone'
+
+ (2) The corresponding in-buffer setting is: `#+STARTUP: lognotedone'

-File: org, Node: Clocking work time, Prev: Closing items, Up: Progress logging
+File: org, Node: Tracking TODO state changes, Next: Clocking work time, Prev: Closing items, Up: Progress logging
+
+6.4.2 Tracking TODO state changes
+---------------------------------
+
+When TODO keywords are used as workflow states (*note Workflow
+states::), you might want to keep track of when a state change occurred,
+and you may even want to attach notes to that state change. With the
+setting
+
+ (setq org-log-done '(state))
+
+each state change will prompt you for a note that will be attached to
+the current headline. Very likely you do not want this verbose tracking
+all the time, so it is probably better to configure this behavior with
+in-buffer options. For example, if you are tracking purchases, put
+these into a separate file that starts with:
-6.4.2 Clocking work time
+ #+SEQ_TODO: TODO ORDERED INVOICE PAYED RECEIVED SENT
+ #+STARTUP: lognotestate
+
+
+File: org, Node: Clocking work time, Prev: Tracking TODO state changes, Up: Progress logging
+
+6.4.3 Clocking work time
------------------------
Org-mode allows you to clock the time you spent on specific tasks in a
@@ -2615,7 +2665,8 @@ also computes the total time spent on each subtree of a project.
same location where the clock was last started. It also directly
computes the resulting time in inserts it after the time range as
`=> HH:MM'. See the variable `org-log-done' for the possibility to
- record an additional note together with the clock-out time stamp.
+ record an additional note together with the clock-out time
+ stamp(1).
`C-c C-y'
Recompute the time interval after changing one of the time stamps.
@@ -2658,7 +2709,7 @@ also computes the total time spent on each subtree of a project.
#+BEGIN: clocktable :maxlevel 2 :block today
#+END: clocktable
- and to use a specific time range you could write(1)
+ and to use a specific time range you could write(2)
#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
:tend "<2006-08-10 Thu 12:00>"
@@ -2674,7 +2725,10 @@ worked on or closed during a day.
---------- Footnotes ----------
- (1) Note that all parameters must be specified in a single line -
+ (1) The corresponding in-buffer setting is: `#+STARTUP:
+lognoteclock-out'
+
+ (2) Note that all parameters must be specified in a single line -
the line is broken here only to fit it onto the manual.

@@ -4043,6 +4097,20 @@ Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive
HTML formatting, in ways similar to John Grubers _markdown_ language,
but with additional support for tables.
+* Menu:
+
+* Export commands:: How to invode HTML export
+* Quoting HTML tags:: Using direct HTML in Org-mode
+* Links:: How hyperlinks get transferred to HTML
+* Images:: To inline or not to inline?
+* CSS support:: Style specifications
+
+
+File: org, Node: Export commands, Next: Quoting HTML tags, Prev: HTML export, Up: HTML export
+
+10.2.1 HTML export commands
+---------------------------
+
`C-c C-e h'
Export as HTML file `myfile.html'.
@@ -4064,11 +4132,23 @@ example,
creates two levels of headings and does the rest as items.
- If you want to include HTML tags which should be interpreted as such,
+
+File: org, Node: Quoting HTML tags, Next: Links, Prev: Export commands, Up: HTML export
+
+10.2.2 Quoting HTML tags
+------------------------
+
+If you want to include HTML tags which should be interpreted as such,
mark them with `@' as in `@<b>bold text@</b>'. Plain `<' and `>' are
always transformed to `&lt;' and `&gt;' in HTML export.
- Internal links (*note Internal links::) will continue to work in HTML
+
+File: org, Node: Links, Next: Images, Prev: Quoting HTML tags, Up: HTML export
+
+10.2.3 Links
+------------
+
+Internal links (*note Internal links::) will continue to work in HTML
files only if they match a dedicated `<<target>>'. Automatic links
created by radio targets (*note Radio targets::) will also work in the
HTML file. Links to external files will still work if the HTML file is
@@ -4078,7 +4158,38 @@ HTML version also exists of the linked file. For information related to
linking files while publishing them to a publishing directory see *Note
Publishing links::.
- You can also give style information for the exported file. The HTML
+
+File: org, Node: Images, Next: CSS support, Prev: Links, Up: HTML export
+
+10.2.4 Images
+-------------
+
+HTML export can inline images given as links in the Org-mode file, and
+it can make an image the clickable part of a link. By default(1),
+images are inlined if a link does not have a description. So
+`[[file:myimg.jpg]]' will be inlined, while `[[file:myimg.jpg][the
+image]]' will just produce a link `the image' that points to the image.
+If the description part itself is a `file:' link or a `http:' URL
+pointing to an image, this image will be inlined and activated so that
+clicking on the image will activate the link. For example, to include
+a thumbnail that will link to a high resolution version of the image,
+you could use:
+
+ [[file:highres.jpg][file:thumb.jpg]]
+
+and you could use `http' addresses just as well.
+
+ ---------- Footnotes ----------
+
+ (1) but see the variable `org-export-html-inline-images'
+
+
+File: org, Node: CSS support, Prev: Images, Up: HTML export
+
+10.2.5 CSS support
+------------------
+
+You can also give style information for the exported file. The HTML
exporter assigns the following CSS classes to appropriate parts of the
document - your style specifications may change these:
.todo TODO keywords
@@ -4091,9 +4202,9 @@ document - your style specifications may change these:
The default style specification can be configured through the option
`org-export-html-style'. If you want to use a file-local style, you
may use file variables, best wrapped into a COMMENT section at the end
-of the outline tree. For example:
+of the outline tree. For example(1):
- * COMMENT HTML style specifications
+ * COMMENT html style specifications
# Local Variables:
# org-export-html-style: " <style type=\"text/css\">
@@ -4107,6 +4218,11 @@ the new style visible to Emacs. This command restarts org-mode for the
current buffer and forces Emacs to re-evaluate the local variables
section in the buffer.
+ ---------- Footnotes ----------
+
+ (1) Under Emacs 21, the continuation lines for a variable value
+should have no `#' at the start of the line.
+

File: org, Node: XOXO export, Next: iCalendar export, Prev: HTML export, Up: Exporting
@@ -4702,31 +4818,34 @@ file is visited again in a new Emacs session.
with the initial visibility of the outline tree. The
corresponding variable for global default settings is
`org-startup-folded', with a default value `t', which means
- `overview'.
+ `overview'.
overview top-level headlines only
content all headlines
showall no folding at all, show everything
Then there are options for aligning tables upon visiting a file.
This is useful in files containing narrowed table columns. The
corresponding variable is `org-startup-align-all-tables', with a
- default value `nil'.
+ default value `nil'.
align align all tables
noalign don't align tables on startup
- Logging when a TODO item is marked DONE (variable `org-log-done')
- can be configured using these options.
- logging record a timestamp when an item is marked DONE
- nologging don't record when items are marked DONE
+ Logging TODO state changes and clock intervals (variable
+ `org-log-done') can be configured using these options.
+ logging record a timestamp when an item is marked DONE
+ nologging don't record when items are marked DONE
+ lognotedone record timestamp and a note when DONE
+ lognotestate record timestamp, note when TODO state changes
+ lognoteclock-out record timestamp and a note when clocking out
Here are the options for hiding leading stars in outline headings.
The corresponding variables are `org-hide-leading-stars' and
`org-odd-levels-only', both with a default setting `nil' (meaning
- `showstars' and `oddeven').
+ `showstars' and `oddeven').
hidestars make all but one of the stars starting a headline invisible.
showstars show all stars starting a headline
odd allow only odd outline levels (1,3,...)
oddeven allow all outline levels
To turn on custom format overlays over time stamps (variables
`org-put-time-stamp-overlays' and
- `org-time-stamp-overlay-formats'), use
+ `org-time-stamp-overlay-formats'), use
customtime overlay custom time format
`#+SEQ_TODO: #+TYP_TODO:'
@@ -5263,6 +5382,9 @@ if I have forgotten someone, please accept my apologies and let me know.
* Nic Ferrier contributed mailcap and XOXO support.
+ * John Foerch figured out how to make incremental search show context
+ around a match in a hidden outline tree.
+
* Niels Giessen had the idea to automatically archive DONE trees.
* Bastien Guerry provided extensive feedback.
@@ -5356,7 +5478,7 @@ Index
(line 6)
* action, for publishing: Publishing action. (line 6)
* activation: Activation. (line 6)
-* active region <1>: HTML export. (line 10)
+* active region <1>: Export commands. (line 6)
* active region <2>: ASCII export. (line 9)
* active region <3>: Built-in table editor.
(line 171)
@@ -5369,8 +5491,9 @@ Index
* agenda views, custom: Custom agenda views. (line 6)
* agenda, batch production: Batch processing. (line 6)
* agenda, with block views: Block agenda. (line 6)
+* align, STARTUP keyword: In-buffer settings. (line 29)
* allout.el: Conflicts. (line 6)
-* angular brackets, around links: External links. (line 38)
+* angular brackets, around links: External links. (line 43)
* applescript, for calendar update: iCalendar export. (line 38)
* archive locations: Moving subtrees. (line 21)
* archiving: Archiving. (line 6)
@@ -5426,6 +5549,7 @@ Index
* completion, of TODO keywords: Workflow states. (line 12)
* constants, in calculations: Formula syntax. (line 26)
* constants.el: Cooperation. (line 14)
+* content, STARTUP keyword: In-buffer settings. (line 22)
* contents, global visibility state: Visibility cycling. (line 22)
* copying, of subtrees: Structure editing. (line 6)
* creating timestamps: Creating timestamps. (line 6)
@@ -5434,6 +5558,7 @@ Index
* custom date/time format: Custom time format. (line 6)
* custom search strings: Custom searches. (line 6)
* customization: Customization. (line 6)
+* customtime, STARTUP keyword: In-buffer settings. (line 49)
* cutting, of subtrees: Structure editing. (line 6)
* cycling, of TODO states: TODO basics. (line 13)
* cycling, visibility: Visibility cycling. (line 6)
@@ -5462,12 +5587,13 @@ Index
* emphasized text: Export options. (line 25)
* enhancing text: Enhancing text. (line 6)
* evaluate time range: Creating timestamps. (line 66)
+* even, STARTUP keyword: In-buffer settings. (line 42)
* exporting: Exporting. (line 6)
* exporting, not: Comment lines. (line 6)
* extended TODO keywords: TODO extensions. (line 6)
* external archiving: Moving subtrees. (line 6)
* external links: External links. (line 6)
-* external links, in HTML export: HTML export. (line 35)
+* external links, in HTML export: Links. (line 6)
* FAQ: Summary. (line 51)
* feedback: Feedback. (line 6)
* file links: External links. (line 6)
@@ -5498,29 +5624,32 @@ Index
* GNUS links: External links. (line 6)
* hand-formatted lists: Enhancing text. (line 11)
* headline levels: Export options. (line 25)
-* headline levels, for exporting <1>: HTML export. (line 21)
+* headline levels, for exporting <1>: Export commands. (line 17)
* headline levels, for exporting: ASCII export. (line 18)
* headline navigation: Motion. (line 6)
* headline tagging: Tags. (line 6)
* headline, promotion and demotion: Structure editing. (line 6)
* headlines: Headlines. (line 6)
* hide text: Visibility cycling. (line 6)
+* hidestars, STARTUP keyword: In-buffer settings. (line 42)
* hiding leading stars: Clean view. (line 6)
* history: History and Acknowledgments.
(line 6)
* HTML export: HTML export. (line 6)
* hyperlinks: Hyperlinks. (line 6)
* iCalendar export: iCalendar export. (line 6)
+* images, inline in HTML: Images. (line 6)
* in-buffer settings: In-buffer settings. (line 6)
* inactive timestamp: Time stamps. (line 24)
* index, of published pages: Project page index. (line 6)
* Info links: External links. (line 6)
* inheritance, of tags: Tag inheritance. (line 6)
+* inlining images in HTML: Images. (line 6)
* inserting links: Handling links. (line 27)
* installation: Installation. (line 6)
* internal archiving: ARCHIVE tag. (line 6)
* internal links: Internal links. (line 6)
-* internal links, in HTML export: HTML export. (line 35)
+* internal links, in HTML export: Links. (line 6)
* introduction: Introduction. (line 6)
* italic text: Enhancing text. (line 15)
* jumping, to headlines: Motion. (line 6)
@@ -5540,7 +5669,7 @@ Index
* link format: Link format. (line 6)
* links, external: External links. (line 6)
* links, handling: Handling links. (line 6)
-* links, in HTML export: HTML export. (line 35)
+* links, in HTML export: Links. (line 6)
* links, internal: Internal links. (line 6)
* links, publishing: Publishing links. (line 6)
* links, radio targets: Radio targets. (line 6)
@@ -5549,7 +5678,11 @@ Index
* lists, hand-formatted: Enhancing text. (line 11)
* lists, ordered: Plain lists. (line 6)
* lists, plain: Plain lists. (line 6)
+* logdone, STARTUP keyword: In-buffer settings. (line 33)
* logging, of progress: Progress logging. (line 6)
+* lognoteclock-out, STARTUP keyword: In-buffer settings. (line 33)
+* lognotedone, STARTUP keyword: In-buffer settings. (line 33)
+* lognotestate, STARTUP keyword: In-buffer settings. (line 33)
* maintainer: Feedback. (line 6)
* mark ring: Handling links. (line 81)
* marking characters, tables: Advanced features. (line 34)
@@ -5567,7 +5700,10 @@ Index
(line 6)
* names as TODO keywords: TODO types. (line 6)
* narrow columns in tables: Narrow columns. (line 6)
+* noalign, STARTUP keyword: In-buffer settings. (line 29)
+* nologging, STARTUP keyword: In-buffer settings. (line 33)
* occur, command: Sparse trees. (line 6)
+* odd, STARTUP keyword: In-buffer settings. (line 42)
* option keyword completion: Completion. (line 6)
* options, for custom agenda views: Setting Options. (line 6)
* options, for customization: Customization. (line 6)
@@ -5585,11 +5721,12 @@ Index
* outline-mode: Outlines. (line 6)
* outlines: Outlines. (line 6)
* overview, global visibility state: Visibility cycling. (line 22)
+* overview, STARTUP keyword: In-buffer settings. (line 22)
* packages, interaction with other: Interaction. (line 6)
* pasting, of subtrees: Structure editing. (line 6)
* per file keywords: Per file keywords. (line 6)
* plain lists: Plain lists. (line 6)
-* plain text external links: External links. (line 38)
+* plain text external links: External links. (line 43)
* presentation, of agenda items: Presentation and sorting.
(line 6)
* printing sparse trees: Sparse trees. (line 41)
@@ -5604,7 +5741,7 @@ Index
* radio targets: Radio targets. (line 6)
* ranges, time: Time stamps. (line 6)
* recomputing table fields: Column formulas. (line 27)
-* region, active <1>: HTML export. (line 10)
+* region, active <1>: Export commands. (line 6)
* region, active <2>: ASCII export. (line 9)
* region, active <3>: Built-in table editor.
(line 171)
@@ -5627,6 +5764,8 @@ Index
* show all, command: Visibility cycling. (line 31)
* show all, global visibility state: Visibility cycling. (line 22)
* show hidden text: Visibility cycling. (line 6)
+* showall, STARTUP keyword: In-buffer settings. (line 22)
+* showstars, STARTUP keyword: In-buffer settings. (line 42)
* sorting, of agenda items: Sorting of agenda items.
(line 6)
* sparse tree, for deadlines: Creating timestamps. (line 41)
@@ -5701,7 +5840,7 @@ 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>: HTML export. (line 10)
+* transient-mark-mode <1>: Export commands. (line 6)
* transient-mark-mode <2>: ASCII export. (line 9)
* transient-mark-mode <3>: Built-in table editor.
(line 171)
@@ -5845,17 +5984,17 @@ Key Index
* C-c C-d: Creating timestamps. (line 37)
* C-c C-e: Exporting. (line 19)
* C-c C-e a: ASCII export. (line 9)
-* C-c C-e b: HTML export. (line 11)
+* C-c C-e b: Export commands. (line 7)
* C-c C-e c: iCalendar export. (line 20)
-* C-c C-e h: HTML export. (line 10)
+* C-c C-e h: Export commands. (line 6)
* C-c C-e I: iCalendar export. (line 15)
* C-c C-e i: iCalendar export. (line 13)
* C-c C-e t: Export options. (line 13)
* C-c C-e v <1>: XOXO export. (line 11)
* C-c C-e v: Sparse trees. (line 41)
* C-c C-e v a: ASCII export. (line 13)
-* C-c C-e v b: HTML export. (line 14)
-* C-c C-e v h: HTML export. (line 14)
+* C-c C-e v b: Export commands. (line 10)
+* C-c C-e v h: Export commands. (line 10)
* C-c C-e x: XOXO export. (line 10)
* C-c C-f: Motion. (line 12)
* C-c C-j: Motion. (line 21)
@@ -5871,35 +6010,35 @@ Key Index
* C-c C-r: Visibility cycling. (line 32)
* C-c C-s <1>: Agenda commands. (line 155)
* C-c C-s: Creating timestamps. (line 48)
-* C-c C-t <1>: Clocking work time. (line 26)
+* C-c C-t <1>: Clocking work time. (line 27)
* C-c C-t: TODO basics. (line 13)
* C-c C-u: Motion. (line 18)
* C-c C-v: TODO basics. (line 26)
* C-c C-w: Creating timestamps. (line 41)
-* C-c C-x b: Visibility cycling. (line 38)
+* C-c C-x b: Visibility cycling. (line 39)
* C-c C-x C-a: ARCHIVE tag. (line 28)
* C-c C-x C-b: Checkboxes. (line 38)
* C-c C-x C-c: Agenda commands. (line 220)
-* C-c C-x C-d: Clocking work time. (line 34)
+* C-c C-x C-d: Clocking work time. (line 35)
* C-c C-x C-i: Clocking work time. (line 12)
* C-c C-x C-k: Structure editing. (line 39)
* C-c C-x C-l: Processing LaTeX fragments.
(line 9)
* C-c C-x C-o: Clocking work time. (line 14)
-* C-c C-x C-r: Clocking work time. (line 42)
+* C-c C-x C-r: Clocking work time. (line 43)
* C-c C-x C-t: Custom time format. (line 12)
* C-c C-x C-u: Dynamic blocks. (line 21)
* C-c C-x C-w <1>: Built-in table editor.
(line 114)
* C-c C-x C-w: Structure editing. (line 39)
-* C-c C-x C-x: Clocking work time. (line 30)
+* C-c C-x C-x: Clocking work time. (line 31)
* C-c C-x C-y <1>: Built-in table editor.
(line 118)
* C-c C-x C-y: Structure editing. (line 46)
* C-c C-x M-w <1>: Built-in table editor.
(line 111)
* C-c C-x M-w: Structure editing. (line 43)
-* C-c C-y <1>: Clocking work time. (line 21)
+* C-c C-y <1>: Clocking work time. (line 22)
* C-c C-y: Creating timestamps. (line 66)
* C-c l: Handling links. (line 9)
* C-c {: CDLaTeX mode. (line 21)
@@ -5915,7 +6054,7 @@ Key Index
* C-u C-c C-l: Handling links. (line 43)
* C-u C-c C-x C-a: ARCHIVE tag. (line 31)
* C-u C-c C-x C-u <1>: Dynamic blocks. (line 22)
-* C-u C-c C-x C-u: Clocking work time. (line 69)
+* C-u C-c C-x C-u: Clocking work time. (line 70)
* D: Agenda commands. (line 74)
* d: Agenda commands. (line 71)
* f: Agenda commands. (line 44)
@@ -6019,160 +6158,171 @@ Key Index

Tag Table:
Node: Top964
-Node: Introduction10454
-Node: Summary10869
-Node: Installation13781
-Node: Activation15159
-Node: Feedback16408
-Node: Document structure18484
-Node: Outlines19258
-Node: Headlines19918
-Node: Visibility cycling20541
-Ref: Visibility cycling-Footnote-122567
-Ref: Visibility cycling-Footnote-222625
-Ref: Visibility cycling-Footnote-322675
-Node: Motion22944
-Node: Structure editing23728
-Node: Archiving26554
-Node: ARCHIVE tag27112
-Node: Moving subtrees28905
-Node: Sparse trees29946
-Ref: Sparse trees-Footnote-132077
-Ref: Sparse trees-Footnote-232169
-Node: Plain lists32284
-Ref: Plain lists-Footnote-135809
-Ref: Plain lists-Footnote-236166
-Node: Tables36350
-Node: Built-in table editor36898
-Node: Narrow columns44926
-Ref: Narrow columns-Footnote-146865
-Node: Table calculations46911
-Node: Formula syntax48231
-Ref: Formula syntax-Footnote-151136
-Node: Lisp formulas51436
-Node: Column formulas52225
-Node: Advanced features53987
-Node: Named-field formulas57241
-Node: Editing/debugging formulas57881
-Node: Appetizer59639
-Node: orgtbl-mode60742
-Node: table.el61233
-Node: Hyperlinks62210
-Node: Link format62983
-Node: Internal links64276
-Ref: Internal links-Footnote-166265
-Node: Radio targets66397
-Node: CamelCase links67112
-Node: External links67706
-Node: Handling links69837
-Ref: Handling links-Footnote-174489
-Ref: Handling links-Footnote-274726
-Node: Link abbreviations74800
-Node: Search options76479
-Ref: Search options-Footnote-178259
-Node: Custom searches78340
-Node: Remember79388
-Node: TODO items83082
-Node: TODO basics84064
-Node: TODO extensions85591
-Node: Workflow states86386
-Node: TODO types87254
-Ref: TODO types-Footnote-188912
-Node: Per file keywords88994
-Ref: Per file keywords-Footnote-190448
-Node: Priorities90649
-Node: Breaking down tasks91893
-Ref: Breaking down tasks-Footnote-192412
-Node: Checkboxes92508
-Node: Timestamps95263
-Node: Time stamps95724
-Ref: Time stamps-Footnote-199218
-Ref: Time stamps-Footnote-299334
-Node: Creating timestamps99489
-Node: The date/time prompt102115
-Ref: The date/time prompt-Footnote-1103881
-Node: Custom time format103987
-Node: Progress logging105546
-Node: Closing items106075
-Node: Clocking work time106979
-Ref: Clocking work time-Footnote-1110603
-Node: Tags110729
-Node: Tag inheritance111491
-Node: Setting tags112428
-Ref: Setting tags-Footnote-1116627
-Ref: Setting tags-Footnote-2116739
-Node: Tag searches116822
-Node: Agenda views119534
-Node: Agenda files121474
-Ref: Agenda files-Footnote-1122434
-Ref: Agenda files-Footnote-2122583
-Node: Agenda dispatcher122776
-Node: Built-in agenda views124467
-Node: Weekly/Daily agenda125045
-Node: Global TODO list127174
-Node: Matching headline tags129347
-Node: Timeline130418
-Node: Stuck projects131084
-Node: Presentation and sorting132783
-Node: Categories133574
-Node: Time-of-day specifications134238
-Node: Sorting of agenda items136209
-Node: Agenda commands137491
-Node: Custom agenda views144144
-Node: Storing searches144819
-Node: Block agenda146731
-Node: Setting Options147961
-Node: Batch processing150673
-Node: Embedded LaTeX151803
-Ref: Embedded LaTeX-Footnote-1152895
-Node: Math symbols153085
-Node: Subscripts and Superscripts153850
-Node: LaTeX fragments154694
-Ref: LaTeX fragments-Footnote-1156802
-Node: Processing LaTeX fragments157064
-Node: CDLaTeX mode158010
-Ref: CDLaTeX mode-Footnote-1160494
-Node: Exporting160642
-Node: ASCII export161956
-Node: HTML export163246
-Node: XOXO export166082
-Node: iCalendar export166521
-Node: Text interpretation168344
-Node: Comment lines168823
-Node: Enhancing text169294
-Node: Export options170986
-Node: Publishing172653
-Ref: Publishing-Footnote-1173449
-Node: Configuration173645
-Node: Project alist174363
-Node: Sources and destinations175429
-Node: Selecting files176159
-Node: Publishing action176907
-Node: Publishing options178140
-Node: Publishing links180292
-Node: Project page index181805
-Node: Sample configuration182583
-Node: Simple example183075
-Node: Complex example183748
-Node: Triggering publication185824
-Node: Miscellaneous186509
-Node: Completion187143
-Node: Customization188614
-Node: In-buffer settings189197
-Node: The very busy C-c C-c key192816
-Node: Clean view194460
-Node: TTY keys197037
-Node: Interaction198646
-Node: Cooperation199043
-Node: Conflicts200910
-Node: Bugs202502
-Node: Extensions and Hacking203896
-Node: Extensions204400
-Node: Dynamic blocks206187
-Node: Special agenda views208143
-Ref: Special agenda views-Footnote-1210424
-Node: History and Acknowledgments210684
-Node: Index215691
-Node: Key Index242933
+Node: Introduction10833
+Node: Summary11248
+Node: Installation14160
+Node: Activation15538
+Node: Feedback16787
+Node: Document structure18863
+Node: Outlines19637
+Node: Headlines20297
+Node: Visibility cycling20920
+Ref: Visibility cycling-Footnote-123011
+Ref: Visibility cycling-Footnote-223069
+Ref: Visibility cycling-Footnote-323119
+Node: Motion23388
+Node: Structure editing24172
+Node: Archiving26998
+Node: ARCHIVE tag27556
+Node: Moving subtrees29349
+Node: Sparse trees30390
+Ref: Sparse trees-Footnote-132521
+Ref: Sparse trees-Footnote-232703
+Node: Plain lists32818
+Ref: Plain lists-Footnote-136343
+Ref: Plain lists-Footnote-236700
+Node: Tables36884
+Node: Built-in table editor37432
+Node: Narrow columns45460
+Ref: Narrow columns-Footnote-147399
+Node: Table calculations47445
+Node: Formula syntax48765
+Ref: Formula syntax-Footnote-151670
+Node: Lisp formulas51970
+Node: Column formulas52759
+Node: Advanced features54521
+Node: Named-field formulas57775
+Node: Editing/debugging formulas58415
+Node: Appetizer60173
+Node: orgtbl-mode61276
+Node: table.el61767
+Node: Hyperlinks62744
+Node: Link format63517
+Node: Internal links64810
+Ref: Internal links-Footnote-166799
+Node: Radio targets66931
+Node: CamelCase links67646
+Node: External links68240
+Node: Handling links70644
+Ref: Handling links-Footnote-175296
+Ref: Handling links-Footnote-275533
+Node: Link abbreviations75607
+Node: Search options77286
+Ref: Search options-Footnote-179066
+Node: Custom searches79147
+Node: Remember80195
+Node: TODO items83889
+Node: TODO basics84871
+Node: TODO extensions86398
+Node: Workflow states87193
+Node: TODO types88178
+Ref: TODO types-Footnote-189836
+Node: Per file keywords89918
+Ref: Per file keywords-Footnote-191372
+Node: Priorities91573
+Node: Breaking down tasks92817
+Ref: Breaking down tasks-Footnote-193336
+Node: Checkboxes93432
+Node: Timestamps96187
+Node: Time stamps96648
+Ref: Time stamps-Footnote-1100142
+Ref: Time stamps-Footnote-2100258
+Node: Creating timestamps100413
+Node: The date/time prompt103039
+Ref: The date/time prompt-Footnote-1104805
+Node: Custom time format104911
+Node: Progress logging106470
+Node: Closing items107119
+Ref: Closing items-Footnote-1108053
+Ref: Closing items-Footnote-2108122
+Node: Tracking TODO state changes108195
+Node: Clocking work time109051
+Ref: Clocking work time-Footnote-1112697
+Ref: Clocking work time-Footnote-2112775
+Node: Tags112901
+Node: Tag inheritance113663
+Node: Setting tags114600
+Ref: Setting tags-Footnote-1118799
+Ref: Setting tags-Footnote-2118911
+Node: Tag searches118994
+Node: Agenda views121706
+Node: Agenda files123646
+Ref: Agenda files-Footnote-1124606
+Ref: Agenda files-Footnote-2124755
+Node: Agenda dispatcher124948
+Node: Built-in agenda views126639
+Node: Weekly/Daily agenda127217
+Node: Global TODO list129346
+Node: Matching headline tags131519
+Node: Timeline132590
+Node: Stuck projects133256
+Node: Presentation and sorting134955
+Node: Categories135746
+Node: Time-of-day specifications136410
+Node: Sorting of agenda items138381
+Node: Agenda commands139663
+Node: Custom agenda views146316
+Node: Storing searches146991
+Node: Block agenda148903
+Node: Setting Options150133
+Node: Batch processing152845
+Node: Embedded LaTeX153975
+Ref: Embedded LaTeX-Footnote-1155067
+Node: Math symbols155257
+Node: Subscripts and Superscripts156022
+Node: LaTeX fragments156866
+Ref: LaTeX fragments-Footnote-1158974
+Node: Processing LaTeX fragments159236
+Node: CDLaTeX mode160182
+Ref: CDLaTeX mode-Footnote-1162666
+Node: Exporting162814
+Node: ASCII export164128
+Node: HTML export165418
+Node: Export commands166037
+Node: Quoting HTML tags166761
+Node: Links167104
+Node: Images167801
+Ref: Images-Footnote-1168672
+Node: CSS support168733
+Ref: CSS support-Footnote-1170052
+Node: XOXO export170165
+Node: iCalendar export170604
+Node: Text interpretation172427
+Node: Comment lines172906
+Node: Enhancing text173377
+Node: Export options175069
+Node: Publishing176736
+Ref: Publishing-Footnote-1177532
+Node: Configuration177728
+Node: Project alist178446
+Node: Sources and destinations179512
+Node: Selecting files180242
+Node: Publishing action180990
+Node: Publishing options182223
+Node: Publishing links184375
+Node: Project page index185888
+Node: Sample configuration186666
+Node: Simple example187158
+Node: Complex example187831
+Node: Triggering publication189907
+Node: Miscellaneous190592
+Node: Completion191226
+Node: Customization192697
+Node: In-buffer settings193280
+Node: The very busy C-c C-c key197139
+Node: Clean view198783
+Node: TTY keys201360
+Node: Interaction202969
+Node: Cooperation203366
+Node: Conflicts205233
+Node: Bugs206825
+Node: Extensions and Hacking208219
+Node: Extensions208723
+Node: Dynamic blocks210510
+Node: Special agenda views212466
+Ref: Special agenda views-Footnote-1214747
+Node: History and Acknowledgments215007
+Node: Index220134
+Node: Key Index248617

End Tag Table
diff --git a/org.el b/org.el
index 0d165d4ae..e8cf734cd 100644
--- a/org.el
+++ b/org.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.59
+;; Version: 4.60
;;
;; This file is part of GNU Emacs.
;;
@@ -61,6 +61,17 @@
;;
;; Recent changes
;; --------------
+;; Version 4.60
+;; - HTML export: inlining images, clickable images (manual 10.2.4).
+;; - Incremental search now shows proper context when exiting.
+;; - Tables calculation and Calc package.
+;; - Calc is no longer needed when using only elisp formulas.
+;; - Proper error messages when calc is needed and not available.
+;; - Tracking TODO state changes with time stamps and notes.
+;; - Empty entries go full circle.
+;; - Links in iCalendar export cleaned up.
+;; - Bug fixes.
+;;
;; Version 4.59
;; - Cleanup code, bug fixes.
;;
@@ -95,36 +106,6 @@
;; - M-left/right now in/outdents plain list items, no Shift needed.
;; - Bug fixes.
;;
-;; Version 4.55
-;; - Bug fixes.
-;;
-;; Version 4.54
-;; - Improvements to fast tag selection
-;; + show status also in target line.
-;; + option to auto-exit after first change to tags list (see manual).
-;; - Tags sparse trees now also respect the settings in
-;; `org-show-hierarchy-above' and `org-show-following-heading'.
-;; - Bug fixes.
-;;
-;; Version 4.53
-;; - Custom time formats can be overlayed over time stamps.
-;; - New option `org-agenda-todo-ignore-deadlines'.
-;; - Work-around for flyspell bug (CVS Emacs has this fixed in flyspell.el).
-;; - Work-around for session.el problem with circular data structures.
-;; - Bug fixes.
-;;
-;; Version 4.52
-;; - TAG matches can also specify conditions on TODO keywords.
-;; - The fast tag interface allows setting tags that are not in the
-;; predefined list.
-;; - Bug fixes.
-;;
-;; Version 4.51
-;; - Link abbreviations (manual section 4.5).
-;; - More control over how agenda is displayed. See the new variables
-;; `org-agenda-window-setup', `org-agenda-restore-windows-after-quit'.
-;; - Bug fixes.
-;;
;;; Code:
;;;; Require other packages
@@ -146,7 +127,7 @@
;;; Version
-(defvar org-version "4.58"
+(defvar org-version "4.60"
"The version number of the file org.el.")
(defun org-version ()
(interactive)
@@ -244,8 +225,9 @@ S-right -> M-+
If you do not like the alternative keys, take a look at the variable
`org-disputed-keys'.
-This option is only relevant at load-time of Org-mode. Changing it requires
-a restart of Emacs to become effective."
+This option is only relevant at load-time of Org-mode, and must be set
+*before* org.el is loaded. Changing it requires a restart of Emacs to
+become effective."
:group 'org-startup
:type 'boolean)
@@ -328,11 +310,114 @@ An entry can be toggled between QUOTE and normal with
:group 'org-keywords
:type 'string)
+(defvar org-repeat-re "\\<REPEAT(\\([-+ 0-9dwmy]+\\))"
+ "Regular expression for specifying repeated events.
+After a match, group 1 contains the repeat expression.")
+
(defgroup org-structure nil
"Options concerning the general structure of Org-mode files."
:tag "Org Structure"
:group 'org)
+(defgroup org-reveal-location nil
+ "Options about how to make context of a location visible."
+ :tag "Org Reveal Location"
+ :group 'org-structure)
+
+(defcustom org-show-hierarchy-above '((default . t))
+ "Non-nil means, show full hierarchy 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 hierarchy of headings
+above the exposed location is shown.
+Turning this off for example for sparse trees makes them very compact.
+Instead of t, this can also be an alist specifying this option for different
+contexts. Valid contexts are
+ agenda when exposing an entry from the agenda
+ org-goto when using the command `org-goto' on key C-c C-j
+ occur-tree when using the command `org-occur' on key C-c /
+ tags-tree when constructing a sparse tree based on tags matches
+ link-search when exposing search matches associated with a link
+ mark-goto when exposing the jump goal of a mark
+ bookmark-jump when exposing a bookmark location
+ isearch when exiting from an incremental search
+ default default for all contexts not set explicitly"
+ :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)))))
+
+(defcustom org-show-following-heading '((default . t))
+ "Non-nil means, show following heading 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 heading following the
+match is shown.
+Turning this off for example for sparse trees makes them very compact,
+but makes it harder to edit the location of the match. In such a case,
+use the command \\[org-reveal] to show more context.
+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)))))
+
+(defcustom org-show-siblings '((default . nil) (isearch t))
+ "Non-nil means, show all sibling heading 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 sibling of the current entry
+heading are all made visible. If `org-show-hierarchy-above' is t,
+the same happens on each level of the hierarchy above the current entry.
+
+By default this is on for the isearch context, off for all other contexts.
+Turning this off for example for sparse trees makes them very compact,
+but makes it harder to edit the location of the match. In such a case,
+use the command \\[org-reveal] to show more context.
+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"
@@ -452,61 +537,6 @@ The highlights created by `org-preview-latex-fragment' always need
:group 'org-time
:type 'boolean)
-(defcustom org-show-hierarchy-above '((default . t))
- "Non-nil means, show full hierarchy when showing a spot in the tree.
-Turning this off makes sparse trees more compact, but also less clear.
-Instead of t, this can also be an alist specifying this option for different
-contexts. Valid contexts are
- agenda when exposing an entry from the agenda
- org-goto when using the command `org-goto' on key C-c C-j
- occur-tree when using the command `org-occur' on key C-c /
- tags-tree when constructing a sparse tree based on tags matches
- link-search when exposing search matches associated with a link
- mark-goto when exposing the jump goal of a mark
- bookmark-jump when exposing a bookmark location
- default default for all contexts not set explicitly"
- :group 'org-sparse-trees
- :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 default))
- (boolean)))))
-
-(defcustom org-show-following-heading '((default . t))
- "Non-nil means, show heading following match in `org-occur'.
-When doing an `org-occur' it is useful to show the headline which
-follows the match, even if they do not match the regexp. This makes it
-easier to edit directly inside the sparse tree. However, if you use
-`org-occur' mainly as an overview, the following headlines are
-unnecessary clutter.
-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-sparse-trees
- :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 default))
- (boolean)))))
(defcustom org-occur-hook '(org-first-headline-recenter)
"Hook that is run after `org-occur' has constructed a sparse tree.
@@ -703,9 +733,8 @@ this variable requires a restart of Emacs to become effective."
:group 'org-table-settings
:type 'string)
-;; FIXME: I am no longer sure if including HEX is a good idea.
(defcustom org-table-number-regexp
- "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|\\(0[xX]\\)?[0-9a-fA-F]+\\)$"
+ "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|\\(0[xX]\\)[0-9a-fA-F]+\\)$"
"Regular expression for recognizing numbers in table columns.
If a table column contains mostly numbers, it will be aligned to the
right. If not, it will be aligned to the left.
@@ -730,7 +759,7 @@ Other options offered by the customize interface are more restrictive."
(const :tag "Exponential, Floating point, Integer"
"^[-+]?[0-9.]+\\([eEdD][-+0-9]+\\)?$")
(const :tag "Very General Number-Like, including hex"
- "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|\\(0[xX]\\)?[0-9a-fA-F]+\\)$")
+ "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|\\(0[xX]\\)[0-9a-fA-F]+\\)$")
(string :tag "Regexp:")))
(defcustom org-table-number-fraction 0.5
@@ -1281,6 +1310,11 @@ When nil, new notes will be filed to the end of a file or entry."
:tag "Org TODO"
:group 'org)
+(defgroup org-progress nil
+ "Options concerning Progress logging in Org-mode."
+ :tag "Org Progress"
+ :group 'org-time)
+
(defcustom org-todo-keywords '("TODO" "DONE")
"List of TODO entry keywords.
\\<org-mode-map>By default, this is '(\"TODO\" \"DONE\"). The last entry in the list is
@@ -1327,6 +1361,10 @@ the time stamp recording the action should be annotated with a short note.
Valid members of this list are
done Offer to record a note when marking entries done
+ state Offer to record a note whenever changing the TODO state
+ of an item. This is only relevant if TODO keywords are
+ interpreted as sequence, see variable `org-todo-interpretation'.
+ When `state' is set, this includes tracking `done'.
clock-out Offer to record a note when clocking out of an item.
A separate window will then pop up and allow you to type a note.
@@ -1337,27 +1375,40 @@ timestamp, as a plain list item. See also the variable
Logging can also be configured on a per-file basis by adding one of
the following lines anywhere in the buffer:
- #+STARTUP: logging
- #+STARTUP: nologging"
- ;; FIXME: in-buffer words for notes???????
+ #+STARTUP: logdone
+ #+STARTUP: nologging
+ #+STARTUP: lognotedone
+ #+STARTUP: lognotestate
+ #+STARTUP: lognoteclock-out"
:group 'org-todo
+ :group 'org-progress
:type '(choice
(const :tag "off" nil)
(const :tag "on" t)
- (set :tag "on, with notes" :greedy t :value (done)
- (const done) (const clock-out))))
-
-(defcustom org-log-note-headings '((done . "CLOSING NOTE %t") (clock-out . ""))
+ (set :tag "on, with notes, detailed control" :greedy t :value (done)
+ (const :tag "when item is marked DONE" done)
+ (const :tag "when TODO state changes" state)
+ (const :tag "when clocking out" clock-out))))
+
+(defcustom org-log-note-headings
+ '((done . "CLOSING NOTE %t")
+ (state . "State %-12s %t")
+ (clock-out . ""))
"Headings for notes added when clocking out or closing TODO items.
The value is an alist, with the car being a sympol indicating the note
context, and the cdr is the heading to be used. The heading may also be the
empty string.
-%t in the heading will be replaced by a time stamp
-%u will be replaced by the user name
+%t in the heading will be replaced by a time stamp.
+%s will be replaced by the new TODO state, in double quotes.
+%u will be replaced by the user name.
%U will be replaced by the full user name."
:group 'org-todo
+ :group 'org-progress
:type '(list :greedy t
(cons (const :tag "Heading when closing an item" done) string)
+ (cons (const :tag
+ "Heading when changing todo state (todo sequence only)"
+ state) string)
(cons (const :tag "Heading when clocking out" clock-out) string)))
(defgroup org-priorities nil
@@ -1677,7 +1728,7 @@ precedence over the general options."
(list (variable :tag "Option")
(sexp :tag "Value"))))
- (list :tag "Other, user-defined function" ; FIXME: untested
+ (list :tag "Other, user-defined function"
(symbol :tag "function")
(string :tag "Match")
(repeat :tag "Local options"
@@ -3009,11 +3060,14 @@ Also put tags into group 4 if tags are present.")
(make-variable-buffer-local 'org-closed-time-regexp)
(defvar org-keyword-time-regexp nil
- "Matches any of the 3 keywords, together with the time stamp.")
+ "Matches any of the 4 keywords, together with the time stamp.")
(make-variable-buffer-local 'org-keyword-time-regexp)
+(defvar org-keyword-time-not-clock-regexp nil
+ "Matches any of the 3 keywords, together with the time stamp.")
+(make-variable-buffer-local 'org-keyword-time-not-clock-regexp)
(defvar org-maybe-keyword-time-regexp nil
"Matches a timestamp, possibly preceeded by a keyword.")
-(make-variable-buffer-local 'org-keyword-time-regexp)
+(make-variable-buffer-local 'org-maybe-keyword-time-regexp)
(defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t
rear-nonsticky t mouse-map t)
@@ -3055,7 +3109,7 @@ Also put tags into group 4 if tags are present.")
(defun org-let2 (list1 list2 &rest body)
(eval (cons 'let (cons list1 (list (cons 'let (cons list2 body)))))))
(put 'org-let2 'lisp-indent-function 2)
-
+;; FIXME: document this, in particular the push argument.
(defconst org-startup-options
'(("fold" org-startup-folded t)
("overview" org-startup-folded t)
@@ -3070,7 +3124,11 @@ Also put tags into group 4 if tags are present.")
("noalign" org-startup-align-all-tables nil)
("customtime" org-display-custom-times t)
("logging" org-log-done t)
+ ("logdone" org-log-done t)
("nologging" org-log-done nil)
+ ("lognotedone" org-log-done done push)
+ ("lognotestate" org-log-done state push)
+ ("lognoteclock-out" org-log-done clock-out push)
("dlcheck" org-startup-with-deadline-check t)
("nodlcheck" org-startup-with-deadline-check nil)))
@@ -3114,7 +3172,12 @@ Also put tags into group 4 if tags are present.")
l var val)
(while (setq l (assoc (pop opts) org-startup-options))
(setq var (nth 1 l) val (nth 2 l))
- (set (make-local-variable var) val))))
+ (if (not (nth 3 l))
+ (set (make-local-variable var) val)
+ (if (not (listp (symbol-value var)))
+ (set (make-local-variable var) nil))
+ (set (make-local-variable var) (symbol-value var))
+ (add-to-list var val)))))
((equal key "ARCHIVE")
(string-match " *$" value)
(setq arch (replace-match "" t t value))
@@ -3187,6 +3250,11 @@ Also put tags into group 4 if tags are present.")
"\\|" org-closed-string
"\\|" org-clock-string "\\)"
" *[[<]\\([^]>]+\\)[]>]")
+ org-keyword-time-not-clock-regexp
+ (concat "\\<\\(" org-scheduled-string
+ "\\|" org-deadline-string
+ "\\|" org-closed-string "\\)"
+ " *[[<]\\([^]>]+\\)[]>]")
org-maybe-keyword-time-regexp
(concat "\\(\\<\\(" org-scheduled-string
"\\|" org-deadline-string
@@ -3250,6 +3318,7 @@ This is for getting out of special buffers like remember.")
;; no other functions uses these, forgetting to let-bind them.
(defvar entry)
(defvar state)
+(defvar last-state)
(defvar date)
(defvar description)
@@ -3452,7 +3521,16 @@ The following commands are available:
;; Paragraphs and auto-filling
(org-set-autofill-regexps)
(org-update-radio-target-regexp)
-
+ ;; Make isearch reveal context
+ (if (or (featurep 'xemacs)
+ (not (boundp 'outline-isearch-open-invisible-function)))
+ ;; Emacs 21 and XEmacs make use of the hook
+ (org-add-hook 'isearch-mode-end-hook 'org-isearch-end 'append 'local)
+ ;; Emacs 22 deals with this through a special variable
+ (org-set-local 'outline-isearch-open-invisible-function
+ (lambda (&rest ignore) (org-show-context 'isearch))))
+
+ ;; If empty file that did not turn on org-mode automatically, make it to.
(if (and org-insert-mode-line-in-empty-file
(interactive-p)
(= (point-min) (point-max)))
@@ -3479,7 +3557,7 @@ The following commands are available:
(defsubst org-current-line (&optional pos)
(save-excursion
(and pos (goto-char pos))
- (+ (if (bolp) 1 0) (count-lines (point-min) (point)))))
+ (+ (if (bolp) 1 0) (count-lines 1 (point)))))
(defun org-current-time ()
"Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
@@ -3822,6 +3900,7 @@ between words."
;; Priorities
(list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
;; Special keywords
+ (list org-repeat-re '(0 'org-special-keyword t))
(list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
(list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
(list (concat "\\<" org-closed-string) '(0 'org-special-keyword t))
@@ -4003,14 +4082,15 @@ between words."
(get-char-property (1- (point)) 'invisible))
(beginning-of-line 2)) (setq eol (point)))
(outline-end-of-heading) (setq eoh (point))
- (org-end-of-subtree t) (setq eos (point))
- (outline-next-heading))
+ (org-end-of-subtree t)
+ (skip-chars-forward " \t\n")
+ (setq eos (1- (point))))
;; Find out what to do next and set `this-command'
(cond
- ((and (= eos eoh)
+ ((= eos eoh)
;; Nothing is hidden behind this heading
(message "EMPTY ENTRY")
- (setq org-cycle-subtree-status nil)))
+ (setq org-cycle-subtree-status nil))
((>= eol eos)
;; Entire subtree is hidden in one line: open it
(org-show-entry)
@@ -4325,7 +4405,6 @@ frame is not changed."
(narrow-to-region beg end)
(show-all)
(goto-char pos)
- (debug)
(and (window-live-p cwin) (select-window cwin))))
(defun org-get-indirect-buffer (&optional buffer)
@@ -4442,7 +4521,7 @@ in the region."
(defun org-fix-position-after-promote ()
"Make sure that after pro/demotion cursor position is right."
- (if (and (equal (char-after) ?\n)
+ (if (and (or (eobp) (equal (char-after) ?\n))
(save-excursion
(skip-chars-backward "a-zA-Z0-9_@")
(looking-at org-todo-regexp)))
@@ -4859,7 +4938,7 @@ WITH-CASE, the sorting considers case as well. With two prefix arguments
(setq nremoved (1+ nremoved)) ; same entry as before, skip it
(insert stars " " (cdr p))))
(goto-char start)
- (message "Sorting entries...done (%d entries%s)"
+ (message "Sorting entries...done (%d entries%s)"
nentries
(if unique (format ", %d duplicates removed" nremoved) ""))))
@@ -4877,7 +4956,7 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive."
(setq sorting-type (read-char-exclusive)))
(let ((dcst (downcase sorting-type))
extractfun comparefun)
- ;; Define the appropriate functions
+ ;; Define the appropriate functions
(cond
((= dcst ?n)
(setq extractfun 'string-to-number
@@ -4894,10 +4973,10 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive."
(if (string-match org-ts-regexp x)
(time-to-seconds
(org-time-string-to-time (match-string 0 x)))
- 0))
+ 0))
comparefun (if (= dcst sorting-type) '< '>)))
(t (error "Invalid sorting type `%c'" sorting-type)))
-
+
(sort (mapcar (lambda (x) (cons (funcall extractfun (car x)) (cdr x)))
table)
(lambda (a b) (funcall comparefun (car a) (car b))))))
@@ -5083,10 +5162,11 @@ Assumes that s is a single line, starting in column 0."
t t s)))
s)
-;; FIXME: document properly.
(defun org-fix-indentation (line ind)
- "If the current indenation is smaller than ind1, leave it alone.
-If it is larger than ind, reduce it by ind."
+ "Fix indentation in LINE.
+IND is a cons cell with target and minimum indentation.
+If the current indenation in LINE is smaller than the minimum,
+leave it alone. If it is larger than ind, set it to the target."
(let* ((l (org-remove-tabs line))
(i (org-get-indentation l))
(i1 (car ind)) (i2 (cdr ind)))
@@ -6539,11 +6619,11 @@ with `org-table-paste-rectangle'."
(rpl (if cut " " nil)))
(goto-char beg)
(org-table-check-inside-data-field)
- (setq l01 (count-lines (point-min) (point))
+ (setq l01 (org-current-line)
c01 (org-table-current-column))
(goto-char end)
(org-table-check-inside-data-field)
- (setq l02 (count-lines (point-min) (point))
+ (setq l02 (org-current-line)
c02 (org-table-current-column))
(setq l1 (min l01 l02) l2 (max l01 l02)
c1 (min c01 c02) c2 (max c01 c02))
@@ -6574,7 +6654,7 @@ lines."
(error "First cut/copy a region to paste!"))
(org-table-check-inside-data-field)
(let* ((clip org-table-clip)
- (line (count-lines (point-min) (point)))
+ (line (org-current-line))
(col (org-table-current-column))
(org-enable-table-editor t)
(org-table-automatic-realign nil)
@@ -7178,8 +7258,10 @@ If yes, store the formula and apply it."
(when (string-match "^:?=\\(.*\\)" field)
(setq named (equal (string-to-char field) ?:)
eq (match-string 1 field))
- (if (fboundp 'calc-eval)
- (org-table-eval-formula (if named '(4) nil) eq))))))
+ (if (or (fboundp 'calc-eval)
+ (equal (substring eq 0 (min 2 (length eq))) "'("))
+ (org-table-eval-formula (if named '(4) nil) eq)
+ (error "Calc does not seem to be installed, and is needed to evaluate the formula"))))))
(defvar org-recalc-commands nil
"List of commands triggering the recalculation of a line.
@@ -7262,7 +7344,7 @@ of the new mark."
(equal org-last-recalc-line (org-current-line))))
(save-excursion (beginning-of-line 1)
(looking-at org-table-auto-recalculate-regexp))
- (fboundp 'calc-eval)
+ ;; (fboundp 'calc-eval) ;; FIXME: correct to remove this?
(org-table-recalculate) t))
(defvar org-table-formula-debug nil
@@ -7316,7 +7398,6 @@ SUPPRESS-STORE means the formula should not be stored, either because
it is already stored, or because it is a modified equation that should
not overwrite the stored one."
(interactive "P")
- (require 'calc)
(org-table-check-inside-data-field)
(org-table-get-specials)
(let* (fields
@@ -7389,6 +7470,8 @@ not overwrite the stored one."
(if lispp
(setq ev (eval (eval (read form)))
ev (if (numberp ev) (number-to-string ev) ev))
+ (or (fboundp 'calc-eval)
+ (error "Calc does not seem to be installed, and is needed to evaluate the formula"))
(setq ev (calc-eval (cons form modes)
(if org-table-formula-numbers-only 'num))))
@@ -8038,8 +8121,9 @@ For file links, arg negates `org-context-in-file-links'."
wl-summary-buffer-elmo-folder msgnum)
(elmo-msgdb-overview-get-entity
msgnum (wl-summary-buffer-msgdb))))
- (author (wl-summary-line-from)) ; FIXME: correct?
- (subject "???")) ; FIXME:
+ ;; FIXME: How to get author and subject in wl???
+ (author (wl-summary-line-from)) ; ?
+ (subject "???"))
(setq message-id (org-remove-angle-brackets message-id))
(setq cpltxt (concat author " on: " subject))
(setq link (org-make-link "wl:" wl-summary-buffer-folder-name
@@ -8635,10 +8719,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
((string= type "shell")
(let ((cmd path))
- (while (string-match "@{" cmd) ; FIXME: not needed for [[]] links
- (setq cmd (replace-match "<" t t cmd)))
- (while (string-match "@}" cmd) ; FIXME: not needed for [[]] links
- (setq cmd (replace-match ">" t t cmd)))
+ ;; FIXME: the following is only for backward compatibility
+ (while (string-match "@{" cmd) (setq cmd (replace-match "<" t t cmd)))
+ (while (string-match "@}" cmd) (setq cmd (replace-match ">" t t cmd)))
(if (or (not org-confirm-shell-link-function)
(funcall org-confirm-shell-link-function
(format "Execute \"%s\" in shell? "
@@ -9197,30 +9280,6 @@ folders."
;; end of Bibtex link setup
-
-;; FIXME: This function can be removed, I think.
-(defun org-upgrade-old-links (&optional query-description)
- "Transfer old <...> style links to new [[...]] style links.
-With arg query-description, ask at each match for a description text to use
-for this link."
- (interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
- (save-excursion
- (goto-char (point-min))
- (let ((re (concat "\\([^[]\\)<\\("
- "\\(" (mapconcat 'identity org-link-types "\\|")
- "\\):"
- "[^" org-non-link-chars "]+\\)>"))
- l1 l2 (cnt 0))
- (while (re-search-forward re nil t)
- (setq cnt (1+ cnt)
- l1 (org-match-string-no-properties 2)
- l2 (save-match-data (org-link-escape l1)))
- (when query-description (setq l1 (read-string "Desc: " l1)))
- (if (equal l1 l2)
- (replace-match (concat (match-string 1) "[[" l1 "]]") t t)
- (replace-match (concat (match-string 1) "[[" l2 "][" l1 "]]") t t)))
- (message "%d matches have beed treated" cnt))))
-
;;; Following file links
(defun org-open-file (path &optional in-emacs line search)
@@ -9766,8 +9825,15 @@ So for this example: when the item starts with TODO, it is changed to DONE.
When it starts with DONE, the DONE is removed. And when neither TODO nor
DONE are present, add TODO at the beginning of the heading.
-With prefix arg, use completion to determine the new state. With numeric
-prefix arg, switch to that state."
+With C-u prefix arg, use completion to determine the new state.
+With numeric prefix arg, switch to that state.
+
+For calling through lisp, arg is also interpreted in the following way:
+'none -> empty state
+\"\"(empty string) -> switch to empty state
+'done -> switch to DONE
+\"WAITING\" -> switch to the specified keyword, but only if it
+ really is a member of `org-todo-keywords'."
(interactive "P")
(save-excursion
(org-back-to-heading)
@@ -9775,6 +9841,7 @@ prefix arg, switch to that state."
(or (looking-at (concat " +" org-todo-regexp " *"))
(looking-at " *"))
(let* ((this (match-string 1))
+ (last-state (or this ""))
(completion-ignore-case t)
(member (member this org-todo-keywords))
(tail (cdr member))
@@ -9797,8 +9864,13 @@ prefix arg, switch to that state."
org-done-string)))
(arg
;; user requests a specific state
- (nth (1- (prefix-numeric-value arg))
- org-todo-keywords))
+ (cond
+ ((equal arg "") nil)
+ ((eq arg 'none) nil)
+ ((eq arg 'done) (org-last org-todo-keywords))
+ ((car (member arg org-todo-keywords)))
+ ((nth (1- (prefix-numeric-value arg))
+ org-todo-keywords))))
((null member) (car org-todo-keywords))
((null tail) nil) ;; -> first entry
((eq org-todo-interpretation 'sequence)
@@ -9808,18 +9880,30 @@ prefix arg, switch to that state."
(car tail)
(if (> (length tail) 0) org-done-string nil)))
(t nil)))
- (next (if state (concat " " state " ") " ")))
+ (next (if state (concat " " state " ") " "))
+ dostates)
(replace-match next t t)
(setq org-last-todo-state-is-todo
(not (equal state org-done-string)))
(when org-log-done
- (if (equal state org-done-string)
- (org-add-planning-info 'closed (org-current-time) 'scheduled)
- (if (not this)
- (org-add-planning-info nil nil 'closed))))
+ (setq dostates (and (eq org-todo-interpretation 'sequence)
+ (listp org-log-done) (memq 'state org-log-done)))
+ (cond
+ ((and state (not this))
+ (org-add-planning-info nil nil 'closed)
+ (and dostates (org-add-log-maybe 'state state 'findpos)))
+ ((and state dostates)
+ (org-add-log-maybe 'state state 'findpos))
+ ((equal state org-done-string)
+ ;; Planning info calls the note-setting command.
+ (org-add-planning-info 'closed (org-current-time)
+ (if (org-get-repeat) nil 'scheduled))
+ (org-add-log-maybe 'done state 'findpos))))
;; Fixup tag positioning
(and org-auto-align-tags (org-set-tags nil t))
- (run-hooks 'org-after-todo-state-change-hook)))
+ (run-hooks 'org-after-todo-state-change-hook)
+ ;; (and (equal state org-done-string) (org-auto-repeat-maybe))
+ ))
;; Fixup cursor location if close to the keyword
(if (and (outline-on-heading-p)
(not (bolp))
@@ -9830,6 +9914,16 @@ prefix arg, switch to that state."
(goto-char (or (match-end 2) (match-end 1)))
(just-one-space))))
+
+(defun org-get-repeat ()
+ "Return the REPEAT statement of this entry."
+ (save-match-data
+ (save-excursion
+ (org-back-to-heading t)
+ (if (re-search-forward
+ org-repeat-re (save-excursion (outline-next-heading) (point)) t)
+ (match-string 1)))))
+
(defun org-show-todo-tree (arg)
"Make a compact tree which shows all headlines marked with TODO.
The tree will show the lines where the regexp matches, and all higher
@@ -9918,7 +10012,8 @@ be removed."
" ")
(org-insert-time-stamp time nil (eq what 'closed))
(end-of-line 1)
- (and (eq what 'closed) (org-add-log-maybe 'done)))
+;;FIXME (and (eq what 'closed) (org-add-log-maybe 'done))
+ )
(goto-char (point-min))
(widen)
(if (looking-at "[ \t]+\r?\n")
@@ -9927,20 +10022,31 @@ be removed."
(defvar org-log-note-marker (make-marker))
(defvar org-log-note-purpose nil)
+(defvar org-log-note-state nil)
(defvar org-log-note-window-configuration nil)
+(defvar org-log-note-return-to (make-marker))
-(defun org-add-log-maybe (&optional purpose)
- (when (and (listp org-log-done)
- (memq purpose org-log-done))
- (move-marker org-log-note-marker (point))
- (setq org-log-note-purpose purpose)
- (add-hook 'post-command-hook 'org-add-log-note 'append)))
+(defun org-add-log-maybe (&optional purpose state findpos)
+ (save-excursion
+ (when (and (listp org-log-done)
+ (memq purpose org-log-done))
+ (when findpos
+ (org-back-to-heading t)
+ (looking-at (concat outline-regexp "\\( *\\)[^\r\n]*"
+ "\\(\n[^\r\n]*?" org-keyword-time-not-clock-regexp
+ "[^\r\n]*\\)?"))
+ (goto-char (match-end 0)))
+ (move-marker org-log-note-marker (point))
+ (setq org-log-note-purpose purpose)
+ (setq org-log-note-state state)
+ (add-hook 'post-command-hook 'org-add-log-note 'append))))
(defun org-add-log-note (&optional purpose)
"Pop up a window for taking a note, and add this note later at point."
(remove-hook 'post-command-hook 'org-add-log-note)
(setq org-log-note-window-configuration (current-window-configuration))
(delete-other-windows)
+ (move-marker org-log-note-return-to (point))
(switch-to-buffer (marker-buffer org-log-note-marker))
(goto-char org-log-note-marker)
(switch-to-buffer-other-window "*Org Note*")
@@ -9950,6 +10056,7 @@ be removed."
(cond
((eq org-log-note-purpose 'clock-out) "stopped clock")
((eq org-log-note-purpose 'done) "closed todo item")
+ ((eq org-log-note-purpose 'state) "state change")
(t (error "This should not happen")))))
(org-set-local 'org-finish-function 'org-store-log-note))
@@ -9959,33 +10066,38 @@ be removed."
(note (cdr (assq org-log-note-purpose org-log-note-headings)))
lines ind)
(kill-buffer (current-buffer))
- (if (string-match "^#.*\n[ \t\\n]*" txt)
+ (if (string-match "^#.*\n[ \t\n]*" txt)
(setq txt (replace-match "" t t txt)))
- (when (string-match "\\S-" txt)
- (if (string-match "\\s-+\\'" txt)
- (setq txt (replace-match "" t t txt)))
- (setq lines (org-split-string txt "\n"))
- (when (and note (string-match "\\S-" note))
- (setq note
- (org-replace-escapes
- note
- (list (cons "%u" user-login-name)
- (cons "%U" user-full-name)
- (cons "%t" (format-time-string
- (org-time-stamp-format 'long 'inactive)
- (current-time))))))
- (push note lines))
+ (if (string-match "\\s-+\\'" txt)
+ (setq txt (replace-match "" t t txt)))
+ (setq lines (org-split-string txt "\n"))
+ (when (and note (string-match "\\S-" note))
+ (setq note
+ (org-replace-escapes
+ note
+ (list (cons "%u" (user-login-name))
+ (cons "%U" user-full-name)
+ (cons "%t" (format-time-string
+ (org-time-stamp-format 'long 'inactive)
+ (current-time)))
+ (cons "%s" (if org-log-note-state
+ (concat "\"" org-log-note-state "\"")
+ "")))))
+ (if lines (setq note (concat note " \\\\")))
+ (push note lines))
+ (save-excursion
+ (set-buffer (marker-buffer org-log-note-marker))
(save-excursion
- (set-buffer (marker-buffer org-log-note-marker))
- (save-excursion
- (goto-char org-log-note-marker)
- (if (not (bolp)) (newline))
- (indent-relative t)
- (setq ind (concat (buffer-substring (point-at-bol) (point)) " "))
- (insert " - " (pop lines))
- (while lines
- (insert "\n" ind (pop lines))))))
- (set-window-configuration org-log-note-window-configuration)))
+ (goto-char org-log-note-marker)
+ (end-of-line 1)
+ (if (not (bolp)) (insert "\n")) (indent-relative nil)
+ (setq ind (concat (buffer-substring (point-at-bol) (point)) " "))
+ (insert " - " (pop lines))
+ (while lines
+ (insert "\n" ind (pop lines))))))
+ (set-window-configuration org-log-note-window-configuration)
+ (with-current-buffer (marker-buffer org-log-note-return-to)
+ (goto-char org-log-note-return-to)))
(defvar org-occur-highlights nil)
(make-variable-buffer-local 'org-occur-highlights)
@@ -10025,6 +10137,7 @@ that the match should indeed be shown."
(message "%d match(es) for regexp %s" cnt regexp))
cnt))
+;; FIXME: Remove the siblings argument, or add args for the others too?
(defun org-show-context (&optional key siblings)
"Make sure point and context and visible.
How much context is shown depends upon the variables
@@ -10032,7 +10145,8 @@ How much context is shown depends upon the variables
When SIBLINGS is non-nil, show all siblings on each hierarchy level."
(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)))
+ (following-p (org-get-alist-option org-show-following-heading key))
+ (siblings-p (or siblings (org-get-alist-option org-show-siblings key))))
(catch 'exit
;; Show heading or entry text
(if heading-p
@@ -10044,6 +10158,7 @@ When SIBLINGS is non-nil, show all siblings on each hierarchy level."
(save-excursion
(and (if heading-p (org-goto-sibling) (outline-next-heading))
(org-flag-heading nil))))
+ (when siblings-p (org-show-siblings))
(when hierarchy-p
;; show all higher headings, possibly with siblings
(save-excursion
@@ -10052,12 +10167,7 @@ When SIBLINGS is non-nil, show all siblings on each hierarchy level."
(error nil))
(not (bobp)))
(org-flag-heading nil)
- (when siblings
- (save-excursion
- (while (org-goto-sibling) (org-flag-heading nil)))
- (save-excursion
- (while (org-goto-sibling 'previous)
- (org-flag-heading nil))))))))))
+ (when siblings-p (org-show-siblings))))))))
(defun org-reveal (&optional siblings)
"Show current entry, hierarchy above it, and the following headline.
@@ -10066,14 +10176,13 @@ exposed with `org-show-hierarchy-above' or `org-show-following-heading'
not t for the search context.
With optional argument SIBLINGS, on each level of the hierarchy all
-siblings are shown. This repairs the tree structure so what it would
-look like when opend with successive calls to `org-cycle'."
+siblings are shown. This repairs the tree structure to what it would
+look like when opened with hierarchical calls to `org-cycle'."
(interactive "P")
(let ((org-show-hierarchy-above t)
(org-show-following-heading t))
(org-show-context nil siblings)))
-
(defun org-highlight-new-match (beg end)
"Highlight from BEG to END and mark the highlight is an occur headline."
(let ((ov (org-make-overlay beg end)))
@@ -10254,7 +10363,6 @@ also TODO lines."
(interactive "P")
(org-scan-tags 'sparse-tree (cdr (org-make-tags-matcher match)) todo-only))
-;; FIXME: implement search for a specific level.
(defun org-make-tags-matcher (match)
"Create the TAGS//TODO matcher form for the selection string MATCH."
;; todo-only is scoped dynamically into this function, and the function
@@ -10503,6 +10611,7 @@ Returns the new tags string, or nil to not change the current settings."
(org-move-overlay org-tags-overlay ov-start ov-end)
(save-window-excursion
;; FIXME: would it be better to keep the other windows?
+ ;; How about fast tag selection keeping all windows? Expert mode?
(delete-other-windows)
(split-window-vertically)
(switch-to-buffer-other-window (get-buffer-create " *Org tags*"))
@@ -10949,12 +11058,12 @@ But do this only if the variable `org-display-custom-times' is set."
(org-parse-time-string (substring string beg end) t))
with-hm (and (nth 1 t1) (nth 2 t1))
inactive (equal (substring string beg (1+ beg)) "[")
- tf (funcall (if with-hm 'cdr 'car)
+ tf (funcall (if with-hm 'cdr 'car)
org-time-stamp-custom-formats)
time (org-fix-decoded-time t1)
str (format-time-string
(concat
- (if inactive "[" "<") (substring tf 1 -1)
+ (if inactive "[" "<") (substring tf 1 -1)
(if inactive "]" ">"))
(apply 'encode-time time))
string (replace-match str t t string)
@@ -12918,9 +13027,9 @@ MATCH is being ignored."
(tags-re (concat "^\\*+.*:\\("
(mapconcat 'identity tags "\\|")
"\\):[a-zA-Z0-9_@:]*[ \t]*$")))
-
+
(setq org-agenda-skip-regexp
- (cond
+ (cond
((and todo tags)
(concat todo-re "\\|" tags-re))
(todo todo-re)
@@ -13182,7 +13291,6 @@ the documentation of `org-diary'."
"[^\n\r]*\\)"))
(deadline-re (concat ".*\\(\n[^*].*\\)?" org-deadline-time-regexp))
(sched-re (concat ".*\\(\n[^*].*\\)?" org-scheduled-time-regexp))
-; FIXME why was this wrong? (sched-re (concat ".*\n?.*?" org-scheduled-time-regexp))
marker priority category tags
ee txt)
(goto-char (point-min))
@@ -13196,7 +13304,6 @@ the documentation of `org-diary'."
(looking-at deadline-re)
(org-deadline-close (match-string 2))))
- ;; FIXME: the following test also happens below, but we need it here
(or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
(throw :skip nil)))
(org-agenda-skip)
@@ -14465,7 +14572,7 @@ the tags of the current headline come last."
(insert-extent ex (1- (point)) (point-at-eol)))
(add-text-properties
(1- (point)) (point-at-eol)
- (list 'display (org-add-props stamp nil
+ (list 'display (org-add-props stamp nil
'face 'secondary-selection))))
(beginning-of-line 1))
(beginning-of-line 0)))))
@@ -15978,7 +16085,11 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
(if org-odd-levels-only "odd" "oddeven")
(if org-hide-leading-stars "hidestars" "showstars")
(if org-startup-align-all-tables "align" "noalign")
- (if org-log-done "logging" "nologging")
+ (cond ((eq t org-log-done) "logdone")
+ ((not org-log-done) "nologging")
+ ((listp org-log-done)
+ (mapconcat (lambda (x) (concat "lognote" (symbol-name x)))
+ org-log-done " ")))
(or (mapconcat (lambda (x)
(cond
((equal '(:startgroup) x) "{")
@@ -16073,6 +16184,7 @@ org-mode's default settings, but still inferior to file-local settings."
(setq-default org-todo-line-regexp org-todo-line-regexp)
(setq-default org-deadline-line-regexp org-deadline-line-regexp)
(setq-default org-done-string org-done-string)
+ (setq-default org-maybe-keyword-time-regexp org-maybe-keyword-time-regexp)
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
ext-plist
(org-infile-export-plist)))
@@ -16338,6 +16450,12 @@ lang=\"%s\" xml:lang=\"%s\">
desc2 (if (match-end 2) (concat type ":" path) path)
descp (and desc1 (not (equal desc1 desc2)))
desc (or desc1 desc2))
+ ;; Make an image out of the description if that is so wanted
+ (when (and descp (org-file-image-p desc))
+ (save-match-data
+ (if (string-match "^file:" desc)
+ (setq desc (substring desc (match-end 0)))))
+ (setq desc (concat "<img src=\"" desc "\"/>")))
;; FIXME: do we need to unescape here somewhere?
(cond
((equal type "internal")
@@ -16346,7 +16464,15 @@ lang=\"%s\" xml:lang=\"%s\">
"<a href=\"#"
(org-solidify-link-text path target-alist)
"\">" desc "</a>")))
- ((member type '("http" "https" "ftp" "mailto" "news"))
+ ((member type '("http" "https")) ; FIXME: need to test this.
+ ;; standard URL, just check if we need to inline an image
+ (if (and (or (eq t org-export-html-inline-images)
+ (and org-export-html-inline-images (not descp)))
+ (org-file-image-p path))
+ (setq rpl (concat "<img src=\"" type ":" path "\"/>"))
+ (setq link (concat type ":" path))
+ (setq rpl (concat "<a href=\"" link "\">" desc "</a>"))))
+ ((member type '("ftp" "mailto" "news"))
;; standard URL
(setq link (concat type ":" path))
(setq rpl (concat "<a href=\"" link "\">" desc "</a>")))
@@ -16363,8 +16489,7 @@ lang=\"%s\" xml:lang=\"%s\">
(if (functionp link-validate)
(funcall link-validate filename current-dir)
t))
- (setq file-is-image-p
- (string-match (org-image-file-name-regexp) filename))
+ (setq file-is-image-p (org-file-image-p filename))
(setq thefile (if abs-p (expand-file-name filename) filename))
(when (and org-export-html-link-org-files-as-html
(string-match "\\.org$" thefile))
@@ -16718,7 +16843,7 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used."
(format "@<span class=\"timestamp-kwd\">%s @</span>"
(match-string 1 s)))
(format " @<span class=\"timestamp\">%s@</span>"
- (substring
+ (substring
(org-translate-time (match-string 3 s)) 1 -1)))
s (substring s (match-end 0)))))
;; Line break if line started and ended with time stamp stuff
@@ -17011,6 +17136,10 @@ When COMBINE is non nil, add the category to each line."
(if (or (string-match org-tr-regexp hd)
(string-match org-ts-regexp hd))
(setq hd (replace-match "" t t hd)))
+ (if (string-match org-bracket-link-regexp hd)
+ (setq hd (replace-match (if (match-end 3) (match-string 3 hd)
+ (match-string 1 hd))
+ t t hd)))
(if deadlinep (setq hd (concat "DL: " hd)))
(if scheduledp (setq hd (concat "S: " hd)))
(princ (format "BEGIN:VEVENT
@@ -17235,7 +17364,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
(define-key org-mode-map [?\C-c ?\C-x (down)] 'org-shiftdown)
(define-key org-mode-map [?\C-c ?\C-x (left)] 'org-shiftleft)
(define-key org-mode-map [?\C-c ?\C-x (right)] 'org-shiftright))
-
+
;; All the other keys
(define-key org-mode-map "\C-c\C-a" 'show-all) ; in case allout messed up.
@@ -17870,11 +17999,7 @@ See the individual commands for more information."
["Literal Links"
(progn
(org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock))
- :style radio :selected (not (member '(org-link) buffer-invisibility-spec))]
- "--"
- ["Upgrade all <link> to [[link][desc]]" org-upgrade-old-links
- (save-excursion (goto-char (point-min))
- (re-search-forward "<[a-z]+:" nil t))])
+ :style radio :selected (not (member '(org-link) buffer-invisibility-spec))])
"--"
["Export/Publish..." org-export t]
("LaTeX"
@@ -17900,6 +18025,15 @@ See the individual commands for more information."
["Refresh setup" org-mode-restart t]
))
+(defun org-toggle-log-option (type)
+ (if (not (listp org-log-done)) (setq org-log-done nil))
+ (if (memq type org-log-done)
+ (setq org-log-done (delq type org-log-done))
+ (add-to-list 'org-log-done type)))
+
+(defun org-check-log-option (type)
+ (and (listp org-log-done) (memq type org-log-done)))
+
(defun org-info (&optional node)
"Read documentation for Org-mode in the info system.
With optional NODE, go directly to that node."
@@ -18093,14 +18227,18 @@ return nil."
(defun org-replace-escapes (string table)
;; FIXME: document and make safer
- (let (e)
+ (let (e re rpl)
(while (setq e (pop table))
- (while (string-match (car e) string)
- (setq string (replace-match (cdr e) t t string))))
+ (setq re (concat "%-?[0-9.]*" (substring (car e) 1)))
+ (while (string-match re string)
+ (setq rpl (format (concat (substring (match-string 0 string) 0 -1) "s")
+ (cdr e)))
+ (setq string (replace-match rpl t t string))))
string))
;;; Paragraph filling stuff.
;; We want this to be just right, so use the full arsenal.
+;; FIXME: configure filladapt for XEmacs
(defun org-set-autofill-regexps ()
(interactive)
@@ -18171,6 +18309,11 @@ work correctly."
t)
"\\'"))))
+(defun org-file-image-p (file)
+ "Return non-nil if FILE is an image."
+ (save-match-data
+ (string-match (org-image-file-name-regexp) file)))
+
;;;; Functions extending outline functionality
;; C-a should go to the beginning of a *visible* line, also in the
@@ -18248,6 +18391,14 @@ move point."
(goto-char pos)
nil)))
+(defun org-show-siblings ()
+ "Show all siblings of the current headline."
+ (save-excursion
+ (while (org-goto-sibling) (org-flag-heading nil)))
+ (save-excursion
+ (while (org-goto-sibling 'previous)
+ (org-flag-heading nil))))
+
(defun org-show-hidden-entry ()
"Show an entry where even the heading is hidden."
(save-excursion
@@ -18320,6 +18471,28 @@ Show the heading too, if it is currently invisible."
"\\):[ \t]*"
"\\(.+\\)"))
+;; Make isearch reveal the necessary context
+(defun org-isearch-end ()
+ "Reveal context after isearch exits."
+ (when isearch-success ; only if search was successful
+ (if (featurep 'xemacs)
+ ;; Under XEmacs, the hook is run in the correct place,
+ ;; we directly show the context.
+ (org-show-context 'isearch)
+ ;; In Emacs the hook runs *before* restoring the overlays.
+ ;; So we have to use a one-time post-command-hook to do this.
+ ;; (Emacs 22 has a special variable, see function `org-mode')
+ (unless (and (boundp 'isearch-mode-end-hook-quit)
+ isearch-mode-end-hook-quit)
+ ;; Only when the isearch was not quitted.
+ (org-add-hook 'post-command-hook 'org-isearch-post-command
+ 'append 'local)))))
+
+(defun org-isearch-post-command ()
+ "Remove self from hook, and show context."
+ (remove-hook 'post-command-hook 'org-isearch-post-command 'local)
+ (org-show-context 'isearch))
+
;;;; Repair problems with some other packages
;; Make `bookmark-jump' show the jump location if it was hidden.
@@ -18346,7 +18519,37 @@ Show the heading too, if it is currently invisible."
;;;; Experimental code
-
+(defun org-auto-repeat-maybe ()
+ "Check if the current headline contains a REPEAT key.
+If yes, set TODO state back to what it was and change any SCHEDULED
+or DEADLINE times the new date.
+This function should be run in the `org-after-todo-state-change-hook'."
+ ;; last-state is dynamically scoped into this function
+ (let ((repeat (org-get-repeat))
+ (whata '(("d" . day) ("m" . month) ("y" . year)))
+ (msg "Entry repeats: ")
+ (org-log-done)
+ re type n what start)
+ (when repeat
+ (org-todo (if (eq 'org-todo-interpretation 'type)
+ last-state
+ (car org-todo-keywords)))
+ (org-back-to-heading t)
+ (org-add-planning-info nil nil 'closed)
+ (setq re (concat "\\(" org-scheduled-time-regexp "\\)\\|\\("
+ org-deadline-time-regexp "\\)"))
+ (while (re-search-forward
+ re (save-excursion (outline-next-heading) (point)) t)
+ (setq type (if (match-end 1) org-scheduled-string org-deadline-string)
+ start 0)
+ (while (string-match "\\([-+]?[0-9]+\\)\\([dwmy]\\)" repeat start)
+ (setq start (match-end 0)
+ n (string-to-number (match-string 1 repeat))
+ what (match-string 2 repeat))
+ (if (equal what "w") (setq n (* n 7) what "d"))
+ (org-timestamp-change n (cdr (assoc what whata))))
+ (setq msg (concat msg type org-last-changed-timestamp " ")))
+ (message msg) (sit-for 1))))
;;;; Finish up
diff --git a/org.pdf b/org.pdf
index 1235b9dfc..810db3a03 100644
--- a/org.pdf
+++ b/org.pdf
Binary files differ
diff --git a/org.texi b/org.texi
index f0d88307d..26e0de111 100644
--- a/org.texi
+++ b/org.texi
@@ -3,7 +3,7 @@
@setfilename ../info/org
@settitle Org Mode Manual
-@set VERSION 4.59
+@set VERSION 4.60
@set DATE December 2006
@dircategory Emacs
@@ -180,6 +180,7 @@ Creating timestamps
Progress Logging
* Closing items:: When was this entry marked DONE?
+* Tracking TODO state changes:: When did the status change?
* Clocking work time:: When exactly did you work on this item?
Tags
@@ -234,6 +235,14 @@ Exporting
* iCalendar export:: Exporting in iCalendar format
* Text interpretation:: How the exporter looks at the file
+HTML export
+
+* Export commands:: How to invode HTML export
+* Quoting HTML tags:: Using direct HTML in Org-mode
+* Links:: How hyperlinks get transferred to HTML
+* Images:: To inline or not to inline?
+* CSS support:: Style specifications
+
Text interpretation by the exporter
* Comment lines:: Some lines will not be exported
@@ -622,7 +631,8 @@ Show all.
Reveal context around point, showing the current entry, the following
heading and the hierarchy above. Useful for working near a location
exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda
-command (@pxref{Agenda commands}).
+command (@pxref{Agenda commands}). With prefix arg show, on each
+level, all sibling headings.
@kindex C-c C-x b
@item C-c C-x b
Show the current subtree in an indirect buffer@footnote{The indirect
@@ -867,9 +877,10 @@ An important feature of Org-mode is the ability to construct
sparse tree means that the entire document is folded as much as
possible, but the selected information is made visible along with the
headline structure above it@footnote{See also the variables
-@code{org-show-hierarchy-above} and
-@code{org-show-following-heading}.}. Just try it out and you will see
-immediately how it works.
+@code{org-show-hierarchy-above}, @code{org-show-following-heading}, and
+@code{org-show-siblings} for detailed control on how much context is
+shown around each match.}. Just try it out and you will see immediately
+how it works.
Org-mode contains several commands creating such trees. The most
basic one is @command{org-occur}:
@@ -1857,12 +1868,19 @@ format}), for example:
[[http://www.gnu.org/software/emacs/][GNU Emacs]]
@end example
+@noindent
+If the description is a file name or URL that points to an image, HTML
+export (@pxref{HTML export}) will inline the image as a clickable
+button. If there is no description at all and the link points to an
+image,
+that image will be inlined into the exported HTML file.
+
@cindex angular brackets, around links
@cindex plain text external links
Org-mode also finds external links in the normal text and activates them
as links. If spaces must be part of the link (for example in
-@samp{bbdb:Richard Stallman}), or you need to remove ambiguities about the end of
-the link, enclose them in angular brackets.
+@samp{bbdb:Richard Stallman}), or if you need to remove ambiguities
+about the end of the link, enclose them in angular brackets.
@node Handling links, Link abbreviations, External links, Hyperlinks
@section Handling links
@@ -2304,7 +2322,9 @@ TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
use a prefix argument to quickly select a specific state. For example
@kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
If you define many keywords, you can use in-buffer completion (see
-@ref{Completion}) to insert these words into the buffer.
+@ref{Completion}) to insert these words into the buffer. Changing a todo
+state can be logged with a timestamp, see @ref{Tracking TODO state
+changes} for more information.
@node TODO types, Per file keywords, Workflow states, TODO extensions
@subsection TODO keywords as types
@@ -2831,20 +2851,23 @@ format is shorter, things do work as expected.
@cindex logging, of progress
Org-mode can automatically record a time stamp when you mark a TODO item
-as DONE. You can also measure precisely the time you spent on specific
-items in a project by starting and stopping a clock when you start and
-stop working on an aspect of a project.
+as DONE, or even each time when you change the state of a TODO item.
+You can also measure precisely the time you spent on specific items in a
+project by starting and stopping a clock when you start and stop working
+on an aspect of a project.
@menu
* Closing items:: When was this entry marked DONE?
+* Tracking TODO state changes:: When did the status change?
* Clocking work time:: When exactly did you work on this item?
@end menu
-@node Closing items, Clocking work time, Progress logging, Progress logging
+@node Closing items, Tracking TODO state changes, Progress logging, Progress logging
@subsection Closing items
If you want to keep track of @emph{when} a certain TODO item was
-finished, turn on logging with
+finished, turn on logging with@footnote{The corresponding in-buffer
+setting is: @code{#+STARTUP: logdone}}
@lisp
(setq org-log-done t)
@@ -2853,16 +2876,44 @@ finished, turn on logging with
@noindent
Then each time you turn a TODO entry into DONE using either @kbd{C-c
C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
-@samp{CLOSED: [timestamp]} will be inserted just after the headline.
-If you turn the entry back into a TODO item again through further
-state cycling, that line will be removed again. In the timeline
-(@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}),
-you can then use the @kbd{l} key to display the TODO items closed on
-each day, giving you an overview of what has been done on a day.
-See the variable @code{org-log-done} for the possibility to record an
-additional note together with a timestamp.
-
-@node Clocking work time, , Closing items, Progress logging
+@samp{CLOSED: [timestamp]} will be inserted just after the headline. If
+you turn the entry back into a TODO item through further state cycling,
+that line will be removed again. In the timeline (@pxref{Timeline}) and
+in the agenda (@pxref{Weekly/Daily agenda}), you can then use the
+@kbd{l} key to display the TODO items closed on each day, giving you an
+overview of what has been done on a day. If you want to record a note
+along with the timestamp, use@footnote{The corresponding in-buffer
+setting is: @code{#+STARTUP: lognotedone}}
+
+@lisp
+(setq org-log-done '(done))
+@end lisp
+
+@node Tracking TODO state changes, Clocking work time, Closing items, Progress logging
+@subsection Tracking TODO state changes
+
+When TODO keywords are used as workflow states (@pxref{Workflow
+states}), you might want to keep track of when a state change occurred,
+and you may even want to attach notes to that state change. With the
+setting
+
+@lisp
+(setq org-log-done '(state))
+@end lisp
+
+@noindent
+each state change will prompt you for a note that will be attached to
+the current headline. Very likely you do not want this verbose tracking
+all the time, so it is probably better to configure this behavior with
+in-buffer options. For example, if you are tracking purchases, put
+these into a separate file that starts with:
+
+@example
+#+SEQ_TODO: TODO ORDERED INVOICE PAYED RECEIVED SENT
+#+STARTUP: lognotestate
+@end example
+
+@node Clocking work time, , Tracking TODO state changes, Progress logging
@subsection Clocking work time
Org-mode allows you to clock the time you spent on specific tasks in a
@@ -2882,7 +2933,9 @@ Stop the clock (clock-out). The inserts another timestamp at the same
location where the clock was last started. It also directly computes
the resulting time in inserts it after the time range as @samp{=>
HH:MM}. See the variable @code{org-log-done} for the possibility to
-record an additional note together with the clock-out time stamp.
+record an additional note together with the clock-out time
+stamp@footnote{The corresponding in-buffer setting is: @code{#+STARTUP:
+lognoteclock-out}}.
@kindex C-c C-y
@item C-c C-y
Recompute the time interval after changing one of the time stamps. This
@@ -2951,6 +3004,29 @@ 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.
+@c @node Self-repeating deadlines
+@c @section Self-repeating deadlines
+@c
+@c Org-mode integrates with the Emacs calendar and diary to display cyclic
+@c appointments and anniversaries in the agenda (@pxref{The weekly/daily
+@c agenda}). However, it can be useful to have certain deadlines and
+@c scheduling items to auto-repeat. The advantage of a deadline or
+@c scheduled item is that the they produce warnings ahead of time and
+@c automatically forward themselves in the agenda until they are done. The
+@c abstract difference is therefore between cyclic @i{appointments} and
+@c cyclic @i{action items}. For appointments you should use the diary, for
+@c actions you can uses an org-mode deadline or scheduling time stamp
+@c together with a REPEAT cookie. For example:
+@c
+@c @example
+@c * TODO Income tax to IRS REPEAT(+1y)
+@c DEADLINE: <2006-12-19 Tue>
+@c @end example
+@c
+@c Each time you try to mark this entry DONE using @kbd{C-c C-t}, it will
+@c automatically switch back to the state TODO, and the deadline will be
+@c shifted by 1 year.
+
@node Tags, Agenda views, Timestamps, Top
@chapter Tags
@cindex tags
@@ -4425,6 +4501,17 @@ Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive
HTML formatting, in ways similar to John Grubers @emph{markdown}
language, but with additional support for tables.
+@menu
+* Export commands:: How to invode HTML export
+* Quoting HTML tags:: Using direct HTML in Org-mode
+* Links:: How hyperlinks get transferred to HTML
+* Images:: To inline or not to inline?
+* CSS support:: Style specifications
+@end menu
+
+@node Export commands, Quoting HTML tags, HTML export, HTML export
+@subsection HTML export commands
+
@cindex region, active
@cindex active region
@cindex transient-mark-mode
@@ -4455,11 +4542,17 @@ at a different level, specify it with a prefix argument. For example,
@noindent
creates two levels of headings and does the rest as items.
+@node Quoting HTML tags, Links, Export commands, HTML export
+@subsection Quoting HTML tags
+
If you want to include HTML tags which should be interpreted as such,
mark them with @samp{@@} as in @samp{@@<b>bold text@@</b>}.
Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
@samp{&gt;} in HTML export.
+@node Links, Images, Quoting HTML tags, HTML export
+@subsection Links
+
@cindex links, in HTML export
@cindex internal links, in HTML export
@cindex external links, in HTML export
@@ -4473,6 +4566,33 @@ HTML version also exists of the linked file. For information related to
linking files while publishing them to a publishing directory see
@ref{Publishing links}.
+@node Images, CSS support, Links, HTML export
+@subsection Images
+
+@cindex images, inline in HTML
+@cindex inlining images in HTML
+HTML export can inline images given as links in the Org-mode file, and
+it can make an image the clickable part of a link. By
+default@footnote{but see the variable
+@code{org-export-html-inline-images}}, images are inlined if a link does
+not have a description. So @samp{[[file:myimg.jpg]]} will be inlined,
+while @samp{[[file:myimg.jpg][the image]]} will just produce a link
+@samp{the image} that points to the image. If the description part
+itself is a @code{file:} link or a @code{http:} URL pointing to an
+image, this image will be inlined and activated so that clicking on the
+image will activate the link. For example, to include a thumbnail that
+will link to a high resolution version of the image, you could use:
+
+@example
+[[file:highres.jpg][file:thumb.jpg]]
+@end example
+
+@noindent
+and you could use @code{http} addresses just as well.
+
+@node CSS support, , Images, HTML export
+@subsection CSS support
+
You can also give style information for the exported file. The HTML
exporter assigns the following CSS classes to appropriate parts of the
document - your style specifications may change these:
@@ -4488,10 +4608,12 @@ document - your style specifications may change these:
The default style specification can be configured through the option
@code{org-export-html-style}. If you want to use a file-local style,
you may use file variables, best wrapped into a COMMENT section at the
-end of the outline tree. For example:
+end of the outline tree. For example@footnote{Under Emacs 21, the
+continuation lines for a variable value should have no @samp{#} at the
+start of the line.}:
@example
-* COMMENT HTML style specifications
+* COMMENT html style specifications
# Local Variables:
# org-export-html-style: " <style type=\"text/css\">
@@ -5162,6 +5284,9 @@ Org-mode file is being visited. The first set of options deals with the
initial visibility of the outline tree. The corresponding variable for
global default settings is @code{org-startup-folded}, with a default
value @code{t}, which means @code{overview}.
+@cindex @code{overview}, STARTUP keyword
+@cindex @code{content}, STARTUP keyword
+@cindex @code{showall}, STARTUP keyword
@example
overview @r{top-level headlines only}
content @r{all headlines}
@@ -5171,20 +5296,34 @@ Then there are options for aligning tables upon visiting a file. This
is useful in files containing narrowed table columns. The corresponding
variable is @code{org-startup-align-all-tables}, with a default value
@code{nil}.
+@cindex @code{align}, STARTUP keyword
+@cindex @code{noalign}, STARTUP keyword
@example
align @r{align all tables}
noalign @r{don't align tables on startup}
@end example
-Logging when a TODO item is marked DONE (variable @code{org-log-done})
-can be configured using these options.
+Logging TODO state changes and clock intervals (variable
+@code{org-log-done}) can be configured using these options.
+@cindex @code{logdone}, STARTUP keyword
+@cindex @code{nologging}, STARTUP keyword
+@cindex @code{lognotedone}, STARTUP keyword
+@cindex @code{lognoteclock-out}, STARTUP keyword
+@cindex @code{lognotestate}, STARTUP keyword
@example
-logging @r{record a timestamp when an item is marked DONE}
-nologging @r{don't record when items are marked DONE}
+logging @r{record a timestamp when an item is marked DONE}
+nologging @r{don't record when items are marked DONE}
+lognotedone @r{record timestamp and a note when DONE}
+lognotestate @r{record timestamp, note when TODO state changes}
+lognoteclock-out @r{record timestamp and a note when clocking out}
@end example
Here are the options for hiding leading stars in outline headings. The
corresponding variables are @code{org-hide-leading-stars} and
@code{org-odd-levels-only}, both with a default setting @code{nil}
(meaning @code{showstars} and @code{oddeven}).
+@cindex @code{hidestars}, STARTUP keyword
+@cindex @code{showstars}, STARTUP keyword
+@cindex @code{odd}, STARTUP keyword
+@cindex @code{even}, STARTUP keyword
@example
hidestars @r{make all but one of the stars starting a headline invisible.}
showstars @r{show all stars starting a headline}
@@ -5194,6 +5333,7 @@ oddeven @r{allow all outline levels}
To turn on custom format overlays over time stamps (variables
@code{org-put-time-stamp-overlays} and
@code{org-time-stamp-overlay-formats}), use
+@cindex @code{customtime}, STARTUP keyword
@example
customtime @r{overlay custom time format}
@end example
@@ -5749,6 +5889,9 @@ patched CSS formatting into the HTML exporter, and inspired the agenda.
@item
@i{Nic Ferrier} contributed mailcap and XOXO support.
@item
+@i{John Foerch} figured out how to make incremental search show context
+around a match in a hidden outline tree.
+@item
@i{Niels Giessen} had the idea to automatically archive DONE trees.
@item
@i{Bastien Guerry} provided extensive feedback.
diff --git a/orgcard.pdf b/orgcard.pdf
index 9b519f51f..e1820f407 100644
--- a/orgcard.pdf
+++ b/orgcard.pdf
Binary files differ
diff --git a/orgcard.tex b/orgcard.tex
index 7cceca21b..3226542c7 100644
--- a/orgcard.tex
+++ b/orgcard.tex
@@ -1,5 +1,5 @@
% Reference Card for Org Mode
-\def\orgversionnumber{4.59}
+\def\orgversionnumber{4.60}
\def\year{2006}
%
%**start of header
diff --git a/xemacs/noutline.el b/xemacs/noutline.el
index 609af07c2..ba195386a 100644
--- a/xemacs/noutline.el
+++ b/xemacs/noutline.el
@@ -77,7 +77,7 @@ that can be added."
:group 'editing)
(defcustom outline-regexp "[*\^L]+"
- "*Regular expression to match the beginning of a heading.
+ "Regular expression to match the beginning of a heading.
Any line whose beginning matches this regexp is considered to start a heading.
Note that Outline mode only checks this regexp at the start of a line,
so the regexp need not (and usually does not) start with `^'.
@@ -87,7 +87,7 @@ in the file it applies to. See also `outline-heading-end-regexp'."
:group 'outlines)
(defcustom outline-heading-end-regexp "\n"
- "*Regular expression to match the end of a heading line.
+ "Regular expression to match the end of a heading line.
You can assume that point is at the beginning of a heading when this
regexp is searched for. The heading ends at the end of the match.
The recommended way to set this is with a `Local Variables:' list
@@ -249,10 +249,10 @@ in the file it applies to."
"Normal hook to be run after outline visibility changes.")
(defvar outline-mode-hook nil
- "*This hook is run when outline mode starts.")
+ "This hook is run when outline mode starts.")
(defvar outline-blank-line nil
- "*Non-nil means to leave unhidden blank line before heading.")
+ "Non-nil means to leave unhidden blank line before heading.")
;;;###autoload
(define-derived-mode outline-mode text-mode "Outline"
@@ -316,7 +316,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of
(add-hook 'change-major-mode-hook 'show-all nil t))
(defcustom outline-minor-mode-prefix "\C-c@"
- "*Prefix key to use for Outline commands in Outline minor mode.
+ "Prefix key to use for Outline commands in Outline minor mode.
The value of this variable is checked as part of loading Outline mode.
After that, changing the prefix key requires manipulating keymaps."
:type 'string
@@ -351,7 +351,7 @@ See the command `outline-mode' for more information on this mode."
(show-all)))
(defvar outline-level 'outline-level
- "*Function of no args to compute a header's nesting level in an outline.
+ "Function of no args to compute a header's nesting level in an outline.
It can assume point is at the beginning of a header line and that the match
data reflects the `outline-regexp'.")
@@ -702,6 +702,11 @@ This puts point at the start of the current subtree, and mark at the end."
(goto-char beg)))
+(defvar outline-isearch-open-invisible-function nil
+ "Function called if `isearch' finishes in an invisible overlay.
+The function is called with the overlay as its only argument.
+If nil, `show-entry' is called to reveal the invisible text.")
+
(defun outline-discard-extents (&optional beg end)
"Clear BEG and END of overlays whose property NAME has value VAL.
Overlays might be moved and/or split.
@@ -725,14 +730,6 @@ BEG and END default respectively to the beginning and end of buffer."
(delete-extent ex)))
(current-buffer) beg end nil 'end-closed 'outline)))
-
-;;;(defun outline-discard-extents (from to)
-;;; "Delete hideshow extents in region defined by FROM and TO."
-;;; (when (< to from)
-;;; (setq from (prog1 to (setq to from))))
-;;; (map-extents #'(lambda (ex ignored) (delete-extent ex))
-;;; (current-buffer) from to nil 'end-closed 'outline))
-
(defun outline-flag-region (from to flag)
"Hide or show lines from FROM to TO, according to FLAG.
If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
@@ -744,11 +741,12 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
(let ((ex (make-extent from to)))
(set-extent-property ex 'invisible 'outline)
(set-extent-property ex 'outline flag)
- (set-extent-property ex 'isearch-open-invisible 'outline-isearch-open-invisible)))
+ ;; FIXME: I don't think XEmacs uses this, actually.
+ (set-extent-property ex 'isearch-open-invisible
+ (or outline-isearch-open-invisible-function
+ 'outline-isearch-open-invisible))))
;; Seems only used by lazy-lock. I.e. obsolete.
(run-hooks 'outline-view-change-hook))
-
-
;; Function to be set as an outline-isearch-open-invisible' property
;; to the overlay that makes the outline invisible (see
@@ -894,7 +892,8 @@ Show the heading too, if it is currently invisible."
(or first (> (funcall outline-level) level)))
(setq first nil)
(outline-next-heading))
- (if (bolp)
+ (if (and (bolp) (not (eolp)))
+ ;; We stopped at a nonempty line (the next heading).
(progn
;; Go to end of line before heading
(forward-char -1)