diff --git a/org b/org index 11f1a2151..439d88aa2 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.68). + This manual is for Org-mode (version 4.69). Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation @@ -27,7 +27,7 @@ File: org, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) Org Mode Manual *************** -This manual is for Org-mode (version 4.68). +This manual is for Org-mode (version 4.69). Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation @@ -139,6 +139,7 @@ Extended use of TODO keywords * Workflow states:: From TODO to DONE in steps * TODO types:: I do this, Fred the rest * Per file keywords:: Different files, different requirements +* Multiple sets in one file:: Mixing it all, and still finding your way Timestamps @@ -221,6 +222,7 @@ HTML export Text interpretation by the exporter * Comment lines:: Some lines will not be exported +* Initial text:: Text before the first headline * Enhancing text:: Subscripts, symbols and more * Export options:: How to influence the export settings @@ -861,7 +863,11 @@ indentation on the first line. In particular, if an ordered list reaches number `10.', then the 2-digit numbers must be written left-aligned with the other numbers in the list. Indentation also determines the end of a list item. It ends before the next line that -is indented like the bullet/number, or less. For example: +is indented like the bullet/number, or less. Empty lines are part of +the previous item, so you can have several paragraphs in one item. If +you would like an emtpy line to terminate all currently open plain +lists, configure the variable `org-empty-line-terminates-plain-lists'. +Here is an for example: ** Lord of the Rings My favorite scenes are (in this order) @@ -931,7 +937,7 @@ be seen as top-level headlines. Also, when you are hiding leading stars to get a clean outline view, plain list items starting with a star are visually indistinguishable from true headlines. In short: even though `*' is supported, it may be better not to use it for plain -list items +list items. (2) Org-mode only changes the filling settings for Emacs. For XEmacs, you should use Kyle E. Jones' `filladapt.el'. To turn this on, @@ -1010,14 +1016,14 @@ Re-aligning and field motion ............................ `C-c C-c' - Re-align the table without moving the cursor. + Re-align the table without moving the cursor. `' Re-align the table, move to the next field. Creates a new row if - necessary. + necessary. `S-' - Re-align, move to previous field. + Re-align, move to previous field. `' Re-align the table and move down to next row. Creates a new row if @@ -1029,27 +1035,27 @@ Column and row editing `M-' `M-' - Move the current column left/right. + Move the current column left/right. `M-S-' - Kill the current column. + Kill the current column. `M-S-' - Insert a new column to the left of the cursor position. + Insert a new column to the left of the cursor position. `M-' `M-' - Move the current row up/down. + Move the current row up/down. `M-S-' - Kill the current row or horizontal line. + Kill the current row or horizontal line. `M-S-' - Insert a new row above (with arg: below) the current row. + Insert a new row above (with arg: below) the current row. `C-c -' Insert a horizontal line below current row. With prefix arg, the - line is created above the current line. + line is created above the current line. `C-c ^' Sort the table lines in the region. The position of point @@ -1099,7 +1105,7 @@ Calculations `C-c +' Sum the numbers in the current column, or in the rectangle defined by the active region. The result is shown in the echo area and can - be inserted with `C-y'. + be inserted with `C-y'. `S-' When current field is empty, copy from first non-empty field above. @@ -1116,7 +1122,7 @@ Miscellaneous Edit the current field in a separate window. This is useful for fields that are not fully visible (*note Narrow columns::). When called with a `C-u' prefix, just make the full field visible, so - that it can be edited in place. + that it can be edited in place. `C-c ' This is an alias for `C-u C-c `' to make the current field fully @@ -1135,7 +1141,6 @@ Miscellaneous Export the table as a TAB-separated file. Useful for data exchange with, for example, Excel or database programs. - If you don't like the automatic table editor because it gets in your way on lines which you would like to start with `|', you can turn it off with @@ -1322,6 +1327,8 @@ it will also be used to resolve constants, including natural constants like `$h' for Planck's constant, and units like `$km' for kilometers(1). Column names and parameters can be specified in special table lines. These are described below, see *Note Advanced features::. +All names must start with a letter, and further consist of letters and +numbers. ---------- Footnotes ---------- @@ -1590,13 +1597,13 @@ the following commands: `C-c *' Recalculate the current row by first applying the stored column formulas from left to right, and all field formulas in the current - row. + row. `C-u C-c *' `C-u C-c C-c' Recompute the entire table, line by line. Any lines before the first hline are left alone, assuming that these are part of the - table header. + table header. `C-u C-u C-c *' Iterate the table by recomputing it until no further changes occur. @@ -1890,7 +1897,7 @@ insert it into an org-mode file, and to follow the link. not working correctly or accurately enough, you can write custom functions to select the search string and to do the search for particular file types - see *Note Custom searches::. The key - binding `C-c l' is only a suggestion - see *Note Installation::. + binding `C-c l' is only a suggestion - see *Note Installation::. `C-c C-l' Insert a link. This prompts for a link to be inserted into the @@ -1906,7 +1913,7 @@ insert it into an org-mode file, and to follow the link. Links in Org-mode are plain text, and you can type or paste them straight into the buffer. By using this command, the links are automatically enclosed in double brackets, and you will be asked - for the optional descriptive text. + for the optional descriptive text. `C-u C-c C-l' When `C-c C-l' is called with a `C-u' prefix argument, a link to a @@ -1919,9 +1926,9 @@ insert it into an org-mode file, and to follow the link. your home directory. You can force an absolute path with two `C-u' prefixes. -`C-c C-l with cursor on existing link' +`C-c C-l (with cursor on existing link)' When the cursor is on an existing link, `C-c C-l' allows you to - edit the link and description parts of the link. + edit the link and description parts of the link. `C-c C-o' Open link at point. This will launch a web browser for URLs (using @@ -1935,26 +1942,26 @@ insert it into an org-mode file, and to follow the link. with Emacs and select a suitable application for local non-text files. Classification of files is based on file extension only. See option `org-file-apps'. If you want to override the default - application and visit the file with Emacs, use a `C-u' prefix. + application and visit the file with Emacs, use a `C-u' prefix. `mouse-2' `mouse-1' On links, `mouse-2' will open the link just as `C-c C-o' would. - Under Emacs 22, also `mouse-1' will follow a link. + Under Emacs 22, also `mouse-1' will follow a link. `mouse-3' Like `mouse-2', but force file links to be opened with Emacs, and - internal links to be displayed in another window(2). + internal links to be displayed in another window(2). `C-c %' Push the current position onto the mark ring, to be able to return - easily. Commands following an internal link do this automatically. + easily. Commands following an internal link do this automatically. `C-c &' Jump back to a recorded position. A position is recorded by the commands following internal links, and by `C-c %'. Using this command several times in direct succession moves through a ring of - previously recorded positions. + previously recorded positions. `C-c C-x C-n' `C-c C-x C-p' @@ -2332,6 +2339,7 @@ TODO items in particular (*note Tags::). * Workflow states:: From TODO to DONE in steps * TODO types:: I do this, Fred the rest * Per file keywords:: Different files, different requirements +* Multiple sets in one file:: Mixing it all, and still finding your way  File: org, Node: Workflow states, Next: TODO types, Prev: TODO extensions, Up: TODO extensions @@ -2392,7 +2400,7 @@ global todo list: `C-3 C-c t'. buffers.  -File: org, Node: Per file keywords, Prev: TODO types, Up: TODO extensions +File: org, Node: Per file keywords, Next: Multiple sets in one file, Prev: TODO types, Up: TODO extensions 5.2.3 Setting up TODO keywords for individual files --------------------------------------------------- @@ -2412,18 +2420,9 @@ To make sure you are using the correct keyword, type `#+' into the buffer and then use `M-' completion. Remember that the last keyword must always mean that the item is DONE -(although you may use a different word). Also note that in each file, -only one of the two aspects of TODO keywords can be used. After -changing one of these lines, use `C-c C-c' with the cursor still in the -line to make the changes known to Org-mode(1). - - If you want to use very many keywords, for example when working with -a large group of people, you may split the names over several lines: - - #+TYP_TODO: Fred Sara Lucy Mike - #+TYP_TODO: Luis George Jules Jessica - #+TYP_TODO: Kim Arnold Peter - #+TYP_TODO: DONE +(although you may use a different word). After changing one of these +lines, use `C-c C-c' with the cursor still in the line to make the +changes known to Org-mode(1). ---------- Footnotes ---------- @@ -2431,6 +2430,40 @@ a large group of people, you may split the names over several lines: after visiting a file. `C-c C-c' with the cursor in a line starting with `#+' is simply restarting Org-mode for the current buffer. + +File: org, Node: Multiple sets in one file, Prev: Per file keywords, Up: TODO extensions + +5.2.4 Multiple TODO keyword sets in one file +-------------------------------------------- + +Sometimes you may want to use different sets of TODO keywords in the +same file. For example, you may want to have the basic `TODO'/`DONE', +but also a workflow for bug fixing. Your setup would then look like +this: + + #+SEQ_TODO: TODO DONE + #+SEQ_TODO: REPORT BUG KNOWNCAUSE RESOLVED + + The keywords should all be different, this helps Org-mode to keep +track of which subsequence should be used for a given entry. In this +setup, `C-c C-t' only operates within a subsequence, so it switches from +`DONE' to (nothing) to `TODO', and from `RESOLVED' to (nothing) to +`REPORT'. Therefore you need a mechanism to initially select the +correct sequence. Besides the obvious ways like typing a keyword or +using completion, you may also apply the following commands: + +`S-' +`S-' + `S-<>' and `S-<>' and walk through all keywords from + all sets, so for example `S-<>' would switch from `DONE' to + `REPORT' in the example above. + +`C-S-' +`C-S-' + These key jump from one TODO subset to the next. So `C-S-' + would jump from `TODO' to `REPORT' and from `KNOWNCAUSE' to `TODO' + in the above example. +  File: org, Node: Priorities, Next: Breaking down tasks, Prev: TODO extensions, Up: TODO items @@ -2454,7 +2487,7 @@ agenda (*note Weekly/Daily agenda::). a priority character `A', `B' or `C'. When you press instead, the priority cookie is removed from the headline. The priorities can also be changed "remotely" from the timeline and - agenda buffer with the `,' command (*note Agenda commands::). + agenda buffer with the `,' command (*note Agenda commands::). `S-' `S-' @@ -2664,49 +2697,49 @@ format. Prompt for a date and insert a corresponding time stamp. When the cursor is at a previously used time stamp, it is updated to NOW. When this command is used twice in succession, a time range is - inserted. + inserted. `C-u C-c .' Like `C-c .', but use the alternative format which contains date and time. The default time can be rounded to multiples of 5 - minutes, see the option `org-time-stamp-rounding-minutes'. + minutes, see the option `org-time-stamp-rounding-minutes'. `C-c !' Like `C-c .', but insert an inactive time stamp that will not cause - an agenda entry. + an agenda entry. `C-c <' Insert a time stamp corresponding to the cursor date in the - Calendar. + Calendar. `C-c >' Access the Emacs calendar for the current date. If there is a - timestamp in the current line, goto the corresponding date instead. + timestamp in the current line, goto the corresponding date instead. `C-c C-o' Access the agenda for the date given by the time stamp or -range at - point (*note Weekly/Daily agenda::). + point (*note Weekly/Daily agenda::). `C-c C-d' Insert `DEADLINE' keyword along with a stamp. The insertion will - happen in the line directly following the headline. + happen in the line directly following the headline. `C-c C-w' Create a sparse tree with all deadlines that are either past-due, or which will become due within `org-deadline-warning-days'. With `C-u' prefix, show all deadlines in the file. With a numeric prefix, check that many days. For example, `C-1 C-c C-w' shows - all deadlines due tomorrow. + all deadlines due tomorrow. `C-c C-s' Insert `SCHEDULED' keyword along with a stamp. The insertion will happen in the line directly following the headline. Any CLOSED - timestamp will be removed. + timestamp will be removed. `S-' `S-' Change date at cursor by one day. These key bindings conflict with - CUA-mode (*note Conflicts::). + CUA-mode (*note Conflicts::). `S-' `S-' @@ -2714,7 +2747,7 @@ format. be on a year, month, day, hour or minute. Note that if the cursor is in a headline and not at a time stamp, these same keys modify the priority of an item. (*note Priorities::). The key bindings - also conflict with CUA-mode (*note Conflicts::). + also conflict with CUA-mode (*note Conflicts::). `C-c C-y' Evaluate a time range by computing the difference between start and @@ -3727,32 +3760,32 @@ View/GoTo org file `mouse-3' `' - Display the original location of the item in another window. + Display the original location of the item in another window. `L' - Display original location and recenter that window. + Display original location and recenter that window. `mouse-2' `mouse-1' `' Go to the original location of the item in another window. Under - Emacs 22, `mouse-1' will also works for this. + Emacs 22, `mouse-1' will also works for this. `' - Go to the original location of the item and delete other windows. + Go to the original location of the item and delete other windows. `f' Toggle Follow mode. In Follow mode, as you move the cursor through the agenda buffer, the other window always shows the corresponding location in the org file. The initial setting for this mode in new agenda buffers can be set with the variable - `org-agenda-start-with-follow-mode'. + `org-agenda-start-with-follow-mode'. `b' Display the entire subtree of the current item in an indirect buffer. With numerical prefix ARG, go up to this level and then take that tree. If ARG is negative, go up that many levels. With - `C-u' prefix, do not remove the previously used indirect buffer. + `C-u' prefix, do not remove the previously used indirect buffer. `l' Toggle Logbook mode. In Logbook mode, entries that where marked @@ -3763,39 +3796,39 @@ Change display .............. `o' - Delete other windows. + Delete other windows. `w' - Switch to weekly view (7 days displayed together). + Switch to weekly view (7 days displayed together). `d' - Switch to daily view (just one day displayed). + Switch to daily view (just one day displayed). `D' Toggle the inclusion of diary entries. See *Note Weekly/Daily - agenda::. + agenda::. `g' Toggle the time grid on and off. See also the variables - `org-agenda-use-time-grid' and `org-agenda-time-grid'. + `org-agenda-use-time-grid' and `org-agenda-time-grid'. `r' Recreate the agenda buffer, for example to reflect the changes after modification of the time stamps of items with S- and S-. When the buffer is the global todo list, a prefix argument is interpreted to create a selective list for a specific - TODO keyword. + TODO keyword. `s' - Save all Org-mode buffers in the current Emacs session. + Save all Org-mode buffers in the current Emacs session. `' Display the following `org-agenda-ndays' days. For example, if the display covers a week, switch to the following week. With - prefix arg, go forward that many times `org-agenda-ndays' days. + prefix arg, go forward that many times `org-agenda-ndays' days. `' - Display the previous dates. + Display the previous dates. `.' Goto today. @@ -3804,59 +3837,59 @@ Remote editing .............. `0-9' - Digit argument. + Digit argument. `C-_' Undo a change due to a remote editing command. The change is - undone both in the agenda buffer and in the remote buffer. + undone both in the agenda buffer and in the remote buffer. `t' Change the TODO state of the item, both in the agenda and in the - original org file. + original org file. `C-k' Delete the current agenda item along with the entire subtree belonging to it in the original Org-mode file. If the text to be deleted remotely is longer than one line, the kill needs to be - confirmed by the user. See variable `org-agenda-confirm-kill'. + confirmed by the user. See variable `org-agenda-confirm-kill'. `$' - Archive the subtree corresponding to the current headline. + Archive the subtree corresponding to the current headline. `T' Show all tags associated with the current item. Because of inheritance, this may be more than the tags listed in the line - itself. + itself. `:' - Set tags for the current headline. + Set tags for the current headline. `a' - Toggle the ARCHIVE tag for the current headline. + Toggle the ARCHIVE tag for the current headline. `,' Set the priority for the current item. Org-mode prompts for the priority character. If you reply with , the priority cookie - is removed from the entry. + is removed from the entry. `P' - Display weighted priority of current item. + Display weighted priority of current item. `+' `S-' Increase the priority of the current item. The priority is changed in the original buffer, but the agenda is not resorted. - Use the `r' key for this. + Use the `r' key for this. `-' `S-' - Decrease the priority of the current item. + Decrease the priority of the current item. `C-c C-s' - Schedule this item + Schedule this item `C-c C-d' - Set a deadline for this item. + Set a deadline for this item. `S-' Change the time stamp associated with the current line by one day @@ -3864,16 +3897,16 @@ Remote editing days. For example, `3 6 5 S-' will change it by a year. The stamp is changed in the original org file, but the change is not directly reflected in the agenda buffer. Use the `r' key to - update the buffer. + update the buffer. `S-' Change the time stamp associated with the current line by one day - into the past. + into the past. `>' Change the time stamp associated with the current line to today. The key `>' has been chosen, because it is the same as `S-.' on my - keyboard. + keyboard. `I' Start the clock on the current item. If a clock is running @@ -3893,29 +3926,29 @@ Calendar commands `c' When in the calendar, compute and show the Org-mode agenda for the - date at the cursor. + date at the cursor. `i' Insert a new entry into the diary. Prompts for the type of entry (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new entry in the diary, just as `i d' etc. would do in the - calendar. The date is taken from the cursor position. + calendar. The date is taken from the cursor position. `M' Show the phases of the moon for the three months around current - date. + date. `S' Show sunrise and sunset times. The geographical location must be set with calendar variables, see documentation of the Emacs - calendar. + calendar. `C' Convert the date at cursor into many other cultural and historic - calendars. + calendars. `H' - Show holidays for three month around the cursor date. + Show holidays for three month around the cursor date. `C-c C-x C-c' Export a single iCalendar file containing entries from all agenda @@ -3925,14 +3958,13 @@ Quit and Exit ............. `q' - Quit agenda, remove the agenda buffer. + Quit agenda, remove the agenda buffer. `x' Exit agenda, remove the agenda buffer and all buffers loaded by Emacs for the compilation of the agenda. Buffers created by the user to visit org files will not be removed. -  File: org, Node: Custom agenda views, Prev: Agenda commands, Up: Agenda views @@ -4592,27 +4624,62 @@ file in order to produce better output. * Menu: * Comment lines:: Some lines will not be exported +* Initial text:: Text before the first headline * Enhancing text:: Subscripts, symbols and more * Export options:: How to influence the export settings  -File: org, Node: Comment lines, Next: Enhancing text, Prev: Text interpretation, Up: Text interpretation +File: org, Node: Comment lines, Next: Initial text, Prev: Text interpretation, Up: Text interpretation 10.5.1 Comment lines -------------------- Lines starting with `#' in column zero are treated as comments and will never be exported. Also entire subtrees starting with the word -`COMMENT' will never be exported. Finally, any text before the first -headline will not be exported either. +`COMMENT' will never be exported. `C-c ;' Toggle the COMMENT keyword at the beginning of an entry.  -File: org, Node: Enhancing text, Next: Export options, Prev: Comment lines, Up: Text interpretation +File: org, Node: Initial text, Next: Enhancing text, Prev: Comment lines, Up: Text interpretation -10.5.2 Enhancing text for export +10.5.2 Text before the first headline +------------------------------------- + +Org-mode normally ignores any text before the first headline when +exporting, because this region is often used for internal links to speed +up navigation etc. However, there are occasions when you might want to +have some text before the first headline, like a small intorduction, +special HTML code with a navigation bar, etc. You can ask to have this +part of the file exported as well by setting the variable +`org-export-skip-text-before-1st-heading' to `nil'. On a per-file +basis, you can get the same effect with + + #+OPTIONS: skip:nil + + The text before the first headline will be fully processed (*note +Enhancing text::). If you need to include literal HTML, use the +special constructs described in *Note Quoting HTML tags::. The table of +contents is normally inserted directly before the first headline of the +file. If you would like to get it to a different location, insert the +string `[TABLE-OF-CONTENTS]' on a line by itself at the desired +location. + + Finally, if you want to use the space before the first headline for +internal purposes, but _still_ want to place something before the first +headline when exporting the file, you can use the `#+TEXT' construct: + + #+OPTIONS: skip:t + #+TEXT: This text will go before the *first* headline. + #+TEXT: We place the table of contents here: + #+TEXT: [TABLE-OF-CONTENTS] + #+TEXT: This goes between the table of contents and the first headline + + +File: org, Node: Enhancing text, Next: Export options, Prev: Initial text, Up: Text interpretation + +10.5.3 Enhancing text for export -------------------------------- Some of the export backends of Org-mode allow for sophisticated text @@ -4648,14 +4715,14 @@ formatted output. this position. If these conversions conflict with your habits of typing ASCII text, -they can all be turned off with corresponding variables (see the +they can all be turned off with corresponding variables. See the customization group `org-export-general', and the following section which explains how to set export options with special lines in a buffer.  File: org, Node: Export options, Prev: Enhancing text, Up: Text interpretation -10.5.3 Export options +10.5.4 Export options --------------------- The exporter recognizes special lines in the buffer which provide @@ -4674,7 +4741,7 @@ Completion::). #+LANGUAGE: language for HTML, e.g. `en' (`org-export-default-language') #+TEXT: Some descriptive text to be inserted at the beginning. #+TEXT: Several lines may be given. - #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t LaTeX:t + #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t LaTeX:t skip:t The OPTIONS line is a compact form to specify export settings. Here you can: @@ -4685,10 +4752,13 @@ you can: @: turn on/off quoted HTML tags :: turn on/off fixed-width sections |: turn on/off tables - ^: turn on/off TeX-like syntax for sub- and superscripts. + ^: turn on/off TeX-like syntax for sub- and superscripts. If + you write "^:{}", `a_{b}' will be interpreted, but + the simple `a_b' will be left as it is. *: turn on/off emphasized text (bold, italic, underlined) TeX: turn on/off simple TeX macros in plain text LaTeX: turn on/off LaTeX fragments + skip: turn on/off skipping the text before the first heading  File: org, Node: Publishing, Next: Miscellaneous, Prev: Exporting, Up: Top @@ -5415,7 +5485,7 @@ File: org, Node: Cooperation, Next: Conflicts, Prev: Interaction, Up: Intera `C-c C-c' Recognize `table.el' table. Works when the cursor is in a - table.el table. + table.el table. `C-c ~' Insert a table.el table. If there is already a table at @@ -5986,13 +6056,14 @@ if I have forgotten someone, please accept my apologies and let me know. * Kai Grossjohann pointed out key-binding conflicts with other packages. - * Shidai Liu ("Leo") provided extensive feedback and some patches. - - * Leon Liu asked for embedded LaTeX and tested it. + * Shidai Liu ("Leo") asked for embedded LaTeX and tested it. He also + provided frequent feedback and some patches. * Stefan Monnier provided a patch to keep the Emacs-Lisp compiler happy. + * Rick Moynihan proposed to allow multiple TODO sequences in a file. + * Todd Neal provided patches for links to Info files and elisp forms. * Tim O'Callaghan suggested in-file links, search options for general @@ -6085,7 +6156,7 @@ Index * agenda: Weekly/Daily agenda. (line 6) * agenda dispatcher: Agenda dispatcher. (line 6) * agenda files: Agenda files. (line 6) -* agenda files, removing buffers: Agenda commands. (line 230) +* agenda files, removing buffers: Agenda commands. (line 228) * agenda views: Agenda views. (line 6) * agenda views, custom: Custom agenda views. (line 6) * agenda views, user-defined: Special agenda views. @@ -6132,9 +6203,9 @@ Index * commands, in agenda buffer: Agenda commands. (line 6) * comment lines: Comment lines. (line 6) * completion, of dictionary words: Completion. (line 6) -* completion, of file names: Handling links. (line 43) +* completion, of file names: Handling links. (line 41) * completion, of link abbreviations: Completion. (line 6) -* completion, of links: Handling links. (line 27) +* completion, of links: Handling links. (line 25) * completion, of option keywords <1>: Completion. (line 6) * completion, of option keywords <2>: Export options. (line 6) * completion, of option keywords: Per file keywords. (line 17) @@ -6172,7 +6243,7 @@ Index * debugging, of table formulas: Editing and debugging formulas. (line 97) * demotion, of subtrees: Structure editing. (line 6) -* diary entries, creating from agenda: Agenda commands. (line 198) +* diary entries, creating from agenda: Agenda commands. (line 196) * diary integration: Weekly/Daily agenda. (line 24) * dictionary word completion: Completion. (line 6) * directories, for publishing: Sources and destinations. @@ -6188,7 +6259,7 @@ Index * elisp links: External links. (line 6) * emphasized text: Export options. (line 25) * enhancing text: Enhancing text. (line 6) -* evaluate time range: Creating timestamps. (line 66) +* evaluate time range: Creating timestamps. (line 64) * even, STARTUP keyword: In-buffer settings. (line 42) * exporting: Exporting. (line 6) * exporting, not: Comment lines. (line 6) @@ -6203,7 +6274,7 @@ Index * field references: References. (line 15) * file links: External links. (line 6) * file links, searching: Search options. (line 6) -* file name completion: Handling links. (line 43) +* file name completion: Handling links. (line 41) * files for agenda: Agenda files. (line 6) * files, adding to agenda list: Agenda files. (line 12) * files, selecting for publishing: Selecting files. (line 6) @@ -6211,7 +6282,7 @@ Index * fixed-width sections: Export options. (line 25) * folded, subtree visibility state: Visibility cycling. (line 10) * folding, sparse trees: Sparse trees. (line 6) -* following links: Handling links. (line 58) +* following links: Handling links. (line 56) * format specifier: Formula syntax for Calc. (line 15) * format, of links: Link format. (line 6) @@ -6256,7 +6327,7 @@ Index * 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) +* inserting links: Handling links. (line 25) * installation: Installation. (line 6) * internal archiving: ARCHIVE tag. (line 6) * internal links: Internal links. (line 6) @@ -6278,16 +6349,16 @@ Index * linebreak, forced: Enhancing text. (line 35) * link abbreviations: Link abbreviations. (line 6) * link abbreviations, completion of: Completion. (line 6) -* link completion: Handling links. (line 27) +* link completion: Handling links. (line 25) * link format: Link format. (line 6) * links, external: External links. (line 6) -* links, finding next/previous: Handling links. (line 91) +* links, finding next/previous: Handling links. (line 89) * links, handling: Handling links. (line 6) * 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) -* links, returning to: Handling links. (line 85) +* links, returning to: Handling links. (line 83) * Lisp forms, as table formulas: Formula syntax for Lisp. (line 6) * lists, hand-formatted: Enhancing text. (line 11) @@ -6299,7 +6370,7 @@ Index * 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) +* mark ring: Handling links. (line 79) * marking characters, tables: Advanced features. (line 40) * matching, of tags: Matching headline tags. (line 6) @@ -6374,7 +6445,7 @@ Index * remember.el <1>: Cooperation. (line 33) * remember.el: Remember. (line 6) * remote editing, from agenda: Agenda commands. (line 106) -* remote editing, undo: Agenda commands. (line 109) +* remote editing, undo: Agenda commands. (line 107) * richer text: Enhancing text. (line 6) * RMAIL links: External links. (line 6) * SCHEDULED keyword: Time stamps. (line 40) @@ -6393,7 +6464,7 @@ Index * 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) +* sparse tree, for deadlines: Creating timestamps. (line 39) * sparse tree, for TODO: TODO basics. (line 26) * sparse tree, tag based: Tags. (line 6) * sparse trees: Sparse trees. (line 6) @@ -6464,6 +6535,8 @@ Index * TODO items, repeating: Repeating items. (line 6) * TODO keyword matching: Global TODO list. (line 17) * TODO keyword matching, with tags search: Tag searches. (line 40) +* todo keyword sets: Multiple sets in one file. + (line 6) * TODO keywords completion: Completion. (line 6) * TODO list, global: Global TODO list. (line 6) * TODO types: TODO types. (line 6) @@ -6480,7 +6553,7 @@ Index * tty keybindings: TTY keys. (line 6) * types as TODO keywords: TODO types. (line 6) * underlined text: Enhancing text. (line 15) -* undoing remote-editing events: Agenda commands. (line 109) +* undoing remote-editing events: Agenda commands. (line 107) * updating, table: Updating the table. (line 6) * URL links: External links. (line 6) * USENET links: External links. (line 6) @@ -6506,53 +6579,53 @@ Key Index [index] * Menu: -* $: Agenda commands. (line 123) +* $: Agenda commands. (line 121) * ': CDLaTeX mode. (line 43) -* +: Agenda commands. (line 145) -* ,: Agenda commands. (line 137) -* -: Agenda commands. (line 151) -* .: Agenda commands. (line 100) -* :: Agenda commands. (line 131) +* +: Agenda commands. (line 143) +* ,: Agenda commands. (line 135) +* -: Agenda commands. (line 149) +* .: Agenda commands. (line 98) +* :: Agenda commands. (line 129) * <: The date/time prompt. (line 32) -* : Agenda commands. (line 97) -* <1>: Agenda commands. (line 41) +* : Agenda commands. (line 95) +* <1>: Agenda commands. (line 39) * <2>: Setting tags. (line 76) * <3>: The date/time prompt. (line 57) * : Built-in table editor. - (line 64) -* : Agenda commands. (line 92) + (line 62) +* : Agenda commands. (line 90) * <1>: Agenda commands. (line 28) * : Setting tags. (line 73) * <1>: CDLaTeX mode. (line 23) -* <2>: Agenda commands. (line 35) +* <2>: Agenda commands. (line 33) * <3>: Setting tags. (line 68) * <4>: Editing and debugging formulas. (line 57) * <5>: Built-in table editor. - (line 57) -* <6>: Plain lists. (line 37) + (line 55) +* <6>: Plain lists. (line 41) * : Visibility cycling. (line 10) -* > <1>: Agenda commands. (line 173) +* > <1>: Agenda commands. (line 171) * >: The date/time prompt. (line 33) * ^: CDLaTeX mode. (line 33) * _: CDLaTeX mode. (line 33) * `: CDLaTeX mode. (line 39) -* a: Agenda commands. (line 134) -* b: Agenda commands. (line 51) -* C: Agenda commands. (line 213) +* a: Agenda commands. (line 132) +* b: Agenda commands. (line 49) +* C: Agenda commands. (line 211) * c: Agenda commands. (line 191) * C-#: Advanced features. (line 9) * C-': Agenda files. (line 18) * C-,: Agenda files. (line 18) -* C-_: Agenda commands. (line 109) +* C-_: Agenda commands. (line 107) * C-a a L: Timeline. (line 10) -* C-c !: Creating timestamps. (line 21) +* C-c !: Creating timestamps. (line 19) * C-c #: Checkboxes. (line 56) -* C-c %: Handling links. (line 81) -* C-c &: Handling links. (line 85) +* C-c %: Handling links. (line 79) +* C-c &: Handling links. (line 83) * C-c ': Editing and debugging formulas. (line 36) * C-c *: Updating the table. (line 13) @@ -6560,25 +6633,25 @@ Key Index (line 141) * C-c ,: Priorities. (line 18) * C-c -: Built-in table editor. - (line 92) + (line 90) * C-c .: Creating timestamps. (line 10) * C-c /: Sparse trees. (line 15) * C-c :: Enhancing text. (line 32) -* C-c ;: Comment lines. (line 11) -* C-c <: Creating timestamps. (line 25) +* C-c ;: Comment lines. (line 10) +* C-c <: Creating timestamps. (line 23) * C-c : Built-in table editor. - (line 163) + (line 161) * C-c = <1>: Editing and debugging formulas. (line 14) * C-c =: Column formulas. (line 26) -* C-c >: Creating timestamps. (line 29) +* C-c >: Creating timestamps. (line 27) * C-c ?: Editing and debugging formulas. (line 24) * C-c [: Agenda files. (line 12) * C-c \: Tag searches. (line 9) * C-c ]: Agenda files. (line 15) * C-c ^ <1>: Built-in table editor. - (line 96) + (line 94) * C-c ^: Structure editing. (line 52) * C-c `: Built-in table editor. (line 157) @@ -6608,9 +6681,9 @@ Key Index (line 46) * C-c C-c <7>: Built-in table editor. (line 54) -* C-c C-c: Plain lists. (line 74) -* C-c C-d <1>: Agenda commands. (line 158) -* C-c C-d: Creating timestamps. (line 37) +* C-c C-c: Plain lists. (line 78) +* C-c C-d <1>: Agenda commands. (line 156) +* C-c C-d: Creating timestamps. (line 35) * C-c C-e: Exporting. (line 19) * C-c C-e a: ASCII export. (line 9) * C-c C-e b: Export commands. (line 7) @@ -6627,10 +6700,10 @@ Key Index * C-c C-e x: XOXO export. (line 10) * C-c C-f: Motion. (line 12) * C-c C-j: Motion. (line 21) -* C-c C-l: Handling links. (line 27) +* C-c C-l: Handling links. (line 25) * C-c C-n: Motion. (line 8) -* C-c C-o <1>: Creating timestamps. (line 33) -* C-c C-o: Handling links. (line 58) +* C-c C-o <1>: Creating timestamps. (line 31) +* C-c C-o: Handling links. (line 56) * C-c C-p: Motion. (line 9) * C-c C-q <1>: Editing and debugging formulas. (line 50) @@ -6639,25 +6712,25 @@ Key Index * C-c C-r <1>: Editing and debugging formulas. (line 53) * C-c C-r: Visibility cycling. (line 34) -* C-c C-s <1>: Agenda commands. (line 155) -* C-c C-s: Creating timestamps. (line 48) +* C-c C-s <1>: Agenda commands. (line 153) +* C-c C-s: Creating timestamps. (line 46) * 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-w: Creating timestamps. (line 39) * C-c C-x b: Visibility cycling. (line 41) * C-c C-x C-a: ARCHIVE tag. (line 28) * C-c C-x C-b: Checkboxes. (line 38) -* C-c C-x C-c: Agenda commands. (line 220) +* C-c C-x C-c: Agenda commands. (line 218) * 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-n: Handling links. (line 91) +* C-c C-x C-n: Handling links. (line 89) * C-c C-x C-o: Clocking work time. (line 14) -* C-c C-x C-p: Handling links. (line 91) +* C-c C-x C-p: Handling links. (line 89) * C-c C-x C-r: Clocking work time. (line 43) * C-c C-x C-s: Moving subtrees. (line 10) * C-c C-x C-t: Custom time format. (line 12) @@ -6673,7 +6746,7 @@ Key Index (line 111) * C-c C-x M-w: Structure editing. (line 43) * C-c C-y <1>: Clocking work time. (line 22) -* C-c C-y: Creating timestamps. (line 66) +* C-c C-y: Creating timestamps. (line 64) * C-c l: Handling links. (line 9) * C-c { <1>: CDLaTeX mode. (line 21) * C-c {: Editing and debugging formulas. @@ -6682,43 +6755,47 @@ Key Index (line 40) * C-c }: Editing and debugging formulas. (line 28) -* C-c ~: Cooperation. (line 50) -* C-k: Agenda commands. (line 117) +* C-c ~: Cooperation. (line 48) +* C-k: Agenda commands. (line 115) +* C-S-: Multiple sets in one file. + (line 26) +* C-S-: Multiple sets in one file. + (line 26) * C-TAB: ARCHIVE tag. (line 38) -* C-u C-c *: Updating the table. (line 18) -* C-u C-c .: Creating timestamps. (line 16) +* C-u C-c *: Updating the table. (line 16) +* C-u C-c .: Creating timestamps. (line 14) * C-u C-c = <1>: Editing and debugging formulas. (line 14) * C-u C-c =: Field formulas. (line 24) * C-u C-c C-c: Updating the table. (line 19) -* C-u C-c C-l: Handling links. (line 43) +* C-u C-c C-l: Handling links. (line 41) * C-u C-c C-x C-a: ARCHIVE tag. (line 31) * C-u C-c C-x C-s: Moving subtrees. (line 12) * 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 70) -* C-u C-u C-c *: Updating the table. (line 24) +* C-u C-u C-c *: Updating the table. (line 22) * C-u C-u C-c =: Editing and debugging formulas. (line 18) * C-x C-s: Editing and debugging formulas. (line 46) -* D: Agenda commands. (line 74) -* d: Agenda commands. (line 71) -* f: Agenda commands. (line 44) -* g: Agenda commands. (line 78) -* H: Agenda commands. (line 217) -* i: Agenda commands. (line 198) -* I: Agenda commands. (line 178) -* l: Agenda commands. (line 57) -* L: Agenda commands. (line 32) -* M: Agenda commands. (line 204) +* D: Agenda commands. (line 72) +* d: Agenda commands. (line 69) +* f: Agenda commands. (line 42) +* g: Agenda commands. (line 76) +* H: Agenda commands. (line 215) +* i: Agenda commands. (line 196) +* I: Agenda commands. (line 176) +* l: Agenda commands. (line 55) +* L: Agenda commands. (line 30) +* M: Agenda commands. (line 202) * M- <1>: Editing and debugging formulas. (line 76) * M-: Built-in table editor. - (line 82) + (line 80) * M- <1>: Built-in table editor. (line 72) * M-: Structure editing. (line 21) -* M- <1>: Plain lists. (line 42) +* M- <1>: Plain lists. (line 46) * M-: Structure editing. (line 6) * M- <1>: Built-in table editor. (line 72) @@ -6731,273 +6808,279 @@ Key Index * M- <1>: Editing and debugging formulas. (line 76) * M-: Built-in table editor. - (line 82) + (line 80) * M-S- <1>: Editing and debugging formulas. (line 72) * M-S- <2>: Built-in table editor. - (line 89) -* M-S- <3>: Plain lists. (line 59) + (line 87) +* M-S- <3>: Plain lists. (line 63) * M-S-: Structure editing. (line 36) * M-S- <1>: The date/time prompt. (line 54) * M-S- <2>: Built-in table editor. - (line 76) -* M-S- <3>: Plain lists. (line 65) + (line 74) +* M-S- <3>: Plain lists. (line 69) * M-S-: Structure editing. (line 27) * M-S- <1>: Checkboxes. (line 53) -* M-S- <2>: Plain lists. (line 52) +* M-S- <2>: Plain lists. (line 56) * M-S-: Structure editing. (line 18) * M-S- <1>: The date/time prompt. (line 51) * M-S- <2>: Built-in table editor. - (line 79) -* M-S- <3>: Plain lists. (line 65) + (line 77) +* M-S- <3>: Plain lists. (line 69) * M-S-: Structure editing. (line 30) * M-S- <1>: Editing and debugging formulas. (line 72) * M-S- <2>: Built-in table editor. - (line 86) -* M-S- <3>: Plain lists. (line 59) + (line 84) +* M-S- <3>: Plain lists. (line 63) * M-S-: Structure editing. (line 33) -* mouse-1 <1>: Agenda commands. (line 35) +* mouse-1 <1>: Agenda commands. (line 33) * mouse-1 <2>: The date/time prompt. (line 36) -* mouse-1: Handling links. (line 72) -* mouse-2 <1>: Agenda commands. (line 35) -* mouse-2: Handling links. (line 72) +* mouse-1: Handling links. (line 70) +* mouse-2 <1>: Agenda commands. (line 33) +* mouse-2: Handling links. (line 70) * mouse-3 <1>: Agenda commands. (line 28) -* mouse-3: Handling links. (line 77) +* mouse-3: Handling links. (line 75) * n: Agenda commands. (line 19) * O: Agenda commands. (line 180) * o: Agenda commands. (line 65) -* P: Agenda commands. (line 142) +* P: Agenda commands. (line 140) * p: Agenda commands. (line 20) * q: Agenda commands. (line 227) -* r <1>: Agenda commands. (line 82) +* r <1>: Agenda commands. (line 80) * r: Global TODO list. (line 20) -* S: Agenda commands. (line 208) -* s: Agenda commands. (line 89) -* S- <1>: Agenda commands. (line 151) +* S: Agenda commands. (line 206) +* s: Agenda commands. (line 87) +* S- <1>: Agenda commands. (line 149) * S- <2>: The date/time prompt. (line 45) -* S- <3>: Creating timestamps. (line 58) -* S- <4>: Priorities. (line 25) +* S- <3>: Creating timestamps. (line 56) +* S- <4>: Priorities. (line 23) * S- <5>: Editing and debugging formulas. (line 67) -* S-: Plain lists. (line 55) -* S- <1>: Agenda commands. (line 169) +* S-: Plain lists. (line 59) +* S- <1>: Agenda commands. (line 167) * S- <2>: The date/time prompt. (line 42) -* S- <3>: Creating timestamps. (line 53) -* S- <4>: TODO basics. (line 20) +* S- <3>: Creating timestamps. (line 51) +* S- <4>: Multiple sets in one file. + (line 22) +* S- <5>: TODO basics. (line 20) * S-: Editing and debugging formulas. (line 67) * S-: Built-in table editor. - (line 146) -* S- <1>: Agenda commands. (line 161) + (line 144) +* S- <1>: Agenda commands. (line 159) * S- <2>: The date/time prompt. (line 39) -* S- <3>: Creating timestamps. (line 53) -* S- <4>: TODO basics. (line 20) +* S- <3>: Creating timestamps. (line 51) +* S- <4>: Multiple sets in one file. + (line 22) +* S- <5>: TODO basics. (line 20) * S-: Editing and debugging formulas. (line 67) * S- <1>: Built-in table editor. - (line 61) + (line 59) * S-: Visibility cycling. (line 22) -* S- <1>: Agenda commands. (line 145) +* S- <1>: Agenda commands. (line 143) * S- <2>: The date/time prompt. (line 48) -* S- <3>: Creating timestamps. (line 58) -* S- <4>: Priorities. (line 25) +* S- <3>: Creating timestamps. (line 56) +* S- <4>: Priorities. (line 23) * S- <5>: Editing and debugging formulas. (line 67) -* S-: Plain lists. (line 55) -* T: Agenda commands. (line 126) -* t: Agenda commands. (line 113) -* w: Agenda commands. (line 68) -* x: Agenda commands. (line 230) +* S-: Plain lists. (line 59) +* T: Agenda commands. (line 124) +* t: Agenda commands. (line 111) +* w: Agenda commands. (line 66) +* x: Agenda commands. (line 228) * X: Agenda commands. (line 183)  Tag Table: Node: Top970 -Node: Introduction11399 -Node: Summary11814 -Node: Installation14823 -Node: Activation16201 -Node: Feedback17450 -Node: Document structure19526 -Node: Outlines20300 -Node: Headlines20960 -Node: Visibility cycling21583 -Ref: Visibility cycling-Footnote-123797 -Ref: Visibility cycling-Footnote-223855 -Ref: Visibility cycling-Footnote-323905 -Node: Motion24174 -Node: Structure editing24958 -Node: Archiving27784 -Node: ARCHIVE tag28342 -Node: Moving subtrees30135 -Node: Sparse trees31446 -Ref: Sparse trees-Footnote-133578 -Ref: Sparse trees-Footnote-233760 -Node: Plain lists33875 -Ref: Plain lists-Footnote-137400 -Ref: Plain lists-Footnote-237757 -Node: Tables37941 -Node: Built-in table editor38455 -Node: Narrow columns45451 -Ref: Narrow columns-Footnote-147384 -Node: orgtbl-mode47430 -Node: The spreadsheet48234 -Node: References49321 -Ref: References-Footnote-153370 -Node: Formula syntax for Calc53659 -Node: Formula syntax for Lisp56125 -Node: Field formulas57394 -Node: Column formulas58702 -Node: Editing and debugging formulas60301 -Node: Updating the table64454 -Node: Advanced features65485 -Node: Hyperlinks70010 -Node: Link format70783 -Node: Internal links72076 -Ref: Internal links-Footnote-174001 -Node: Radio targets74133 -Node: External links74824 -Node: Handling links77228 -Ref: Handling links-Footnote-182320 -Ref: Handling links-Footnote-282557 -Node: Link abbreviations82631 -Node: Search options84310 -Ref: Search options-Footnote-186090 -Node: Custom searches86171 -Node: Remember87219 -Node: Setting up remember88206 -Node: Remember templates88788 -Ref: Remember templates-Footnote-192102 -Node: Storing notes92200 -Node: TODO items94008 -Node: TODO basics94991 -Node: TODO extensions96518 -Node: Workflow states97313 -Node: TODO types98298 -Ref: TODO types-Footnote-199956 -Node: Per file keywords100038 -Ref: Per file keywords-Footnote-1101492 -Node: Priorities101693 -Node: Breaking down tasks102937 -Ref: Breaking down tasks-Footnote-1103457 -Node: Checkboxes103553 -Node: Timestamps106308 -Node: Time stamps106842 -Ref: Time stamps-Footnote-1110336 -Ref: Time stamps-Footnote-2110452 -Node: Creating timestamps110607 -Node: The date/time prompt113243 -Ref: The date/time prompt-Footnote-1115204 -Node: Custom time format115310 -Node: Repeating items116868 -Node: Progress logging118678 -Node: Closing items119324 -Ref: Closing items-Footnote-1120258 -Ref: Closing items-Footnote-2120327 -Node: Tracking TODO state changes120400 -Node: Clocking work time121256 -Ref: Clocking work time-Footnote-1124902 -Ref: Clocking work time-Footnote-2124980 -Node: Tags125106 -Node: Tag inheritance125868 -Node: Setting tags126805 -Ref: Setting tags-Footnote-1131328 -Ref: Setting tags-Footnote-2131440 -Node: Tag searches131523 -Node: Agenda views134234 -Node: Agenda files136179 -Ref: Agenda files-Footnote-1137145 -Ref: Agenda files-Footnote-2137294 -Node: Agenda dispatcher137487 -Node: Built-in agenda views139178 -Node: Weekly/Daily agenda139756 -Node: Global TODO list141885 -Node: Matching headline tags144058 -Node: Timeline145129 -Node: Stuck projects145795 -Node: Presentation and sorting147494 -Node: Categories148285 -Node: Time-of-day specifications148949 -Node: Sorting of agenda items150920 -Node: Agenda commands152202 -Node: Custom agenda views158855 -Node: Storing searches159530 -Node: Block agenda161442 -Node: Setting Options162672 -Node: Batch processing165384 -Node: Embedded LaTeX166514 -Ref: Embedded LaTeX-Footnote-1167606 -Node: Math symbols167796 -Node: Subscripts and Superscripts168561 -Node: LaTeX fragments169405 -Ref: LaTeX fragments-Footnote-1171513 -Node: Processing LaTeX fragments171775 -Node: CDLaTeX mode172721 -Ref: CDLaTeX mode-Footnote-1175205 -Node: Exporting175353 -Node: ASCII export176667 -Node: HTML export177957 -Node: Export commands178576 -Node: Quoting HTML tags179300 -Node: Links179930 -Node: Images180627 -Ref: Images-Footnote-1181498 -Node: CSS support181559 -Ref: CSS support-Footnote-1182878 -Node: XOXO export182991 -Node: iCalendar export183430 -Node: Text interpretation184649 -Node: Comment lines185128 -Node: Enhancing text185599 -Node: Export options187417 -Node: Publishing189114 -Ref: Publishing-Footnote-1189910 -Node: Configuration190106 -Node: Project alist190824 -Node: Sources and destinations191890 -Node: Selecting files192620 -Node: Publishing action193368 -Node: Publishing options194601 -Node: Publishing links196753 -Node: Project page index198266 -Node: Sample configuration199044 -Node: Simple example199536 -Node: Complex example200209 -Node: Triggering publication202285 -Node: Miscellaneous202970 -Node: Completion203604 -Node: Customization205075 -Node: In-buffer settings205658 -Node: The very busy C-c C-c key210135 -Node: Clean view211779 -Node: TTY keys214356 -Node: Interaction215965 -Node: Cooperation216362 -Node: Conflicts219102 -Node: Bugs220694 -Node: Extensions and Hacking222190 -Node: Extensions222786 -Node: Tables in arbitrary syntax224733 -Node: Radio tables225810 -Node: A LaTeX example228313 -Ref: A LaTeX example-Footnote-1231959 -Ref: A LaTeX example-Footnote-2232107 -Node: Translator functions232542 -Ref: Translator functions-Footnote-1235651 -Node: Dynamic blocks235739 -Node: Special agenda views237711 -Ref: Special agenda views-Footnote-1239990 -Node: History and Acknowledgments240250 -Node: Index246039 -Node: Key Index276879 +Node: Introduction11536 +Node: Summary11951 +Node: Installation14960 +Node: Activation16338 +Node: Feedback17587 +Node: Document structure19663 +Node: Outlines20437 +Node: Headlines21097 +Node: Visibility cycling21720 +Ref: Visibility cycling-Footnote-123934 +Ref: Visibility cycling-Footnote-223992 +Ref: Visibility cycling-Footnote-324042 +Node: Motion24311 +Node: Structure editing25095 +Node: Archiving27921 +Node: ARCHIVE tag28479 +Node: Moving subtrees30272 +Node: Sparse trees31583 +Ref: Sparse trees-Footnote-133715 +Ref: Sparse trees-Footnote-233897 +Node: Plain lists34012 +Ref: Plain lists-Footnote-137781 +Ref: Plain lists-Footnote-238139 +Node: Tables38323 +Node: Built-in table editor38837 +Node: Narrow columns45856 +Ref: Narrow columns-Footnote-147789 +Node: orgtbl-mode47835 +Node: The spreadsheet48639 +Node: References49726 +Ref: References-Footnote-153855 +Node: Formula syntax for Calc54144 +Node: Formula syntax for Lisp56610 +Node: Field formulas57879 +Node: Column formulas59187 +Node: Editing and debugging formulas60786 +Node: Updating the table64939 +Node: Advanced features65974 +Node: Hyperlinks70499 +Node: Link format71272 +Node: Internal links72565 +Ref: Internal links-Footnote-174490 +Node: Radio targets74622 +Node: External links75313 +Node: Handling links77717 +Ref: Handling links-Footnote-182827 +Ref: Handling links-Footnote-283064 +Node: Link abbreviations83138 +Node: Search options84817 +Ref: Search options-Footnote-186597 +Node: Custom searches86678 +Node: Remember87726 +Node: Setting up remember88713 +Node: Remember templates89295 +Ref: Remember templates-Footnote-192609 +Node: Storing notes92707 +Node: TODO items94515 +Node: TODO basics95498 +Node: TODO extensions97025 +Node: Workflow states97894 +Node: TODO types98879 +Ref: TODO types-Footnote-1100537 +Node: Per file keywords100619 +Ref: Per file keywords-Footnote-1101740 +Node: Multiple sets in one file101941 +Node: Priorities103299 +Node: Breaking down tasks104545 +Ref: Breaking down tasks-Footnote-1105065 +Node: Checkboxes105161 +Node: Timestamps107916 +Node: Time stamps108450 +Ref: Time stamps-Footnote-1111944 +Ref: Time stamps-Footnote-2112060 +Node: Creating timestamps112215 +Node: The date/time prompt114873 +Ref: The date/time prompt-Footnote-1116834 +Node: Custom time format116940 +Node: Repeating items118498 +Node: Progress logging120308 +Node: Closing items120954 +Ref: Closing items-Footnote-1121888 +Ref: Closing items-Footnote-2121957 +Node: Tracking TODO state changes122030 +Node: Clocking work time122886 +Ref: Clocking work time-Footnote-1126532 +Ref: Clocking work time-Footnote-2126610 +Node: Tags126736 +Node: Tag inheritance127498 +Node: Setting tags128435 +Ref: Setting tags-Footnote-1132958 +Ref: Setting tags-Footnote-2133070 +Node: Tag searches133153 +Node: Agenda views135864 +Node: Agenda files137809 +Ref: Agenda files-Footnote-1138775 +Ref: Agenda files-Footnote-2138924 +Node: Agenda dispatcher139117 +Node: Built-in agenda views140808 +Node: Weekly/Daily agenda141386 +Node: Global TODO list143515 +Node: Matching headline tags145688 +Node: Timeline146759 +Node: Stuck projects147425 +Node: Presentation and sorting149124 +Node: Categories149915 +Node: Time-of-day specifications150579 +Node: Sorting of agenda items152550 +Node: Agenda commands153832 +Node: Custom agenda views160561 +Node: Storing searches161236 +Node: Block agenda163148 +Node: Setting Options164378 +Node: Batch processing167090 +Node: Embedded LaTeX168220 +Ref: Embedded LaTeX-Footnote-1169312 +Node: Math symbols169502 +Node: Subscripts and Superscripts170267 +Node: LaTeX fragments171111 +Ref: LaTeX fragments-Footnote-1173219 +Node: Processing LaTeX fragments173481 +Node: CDLaTeX mode174427 +Ref: CDLaTeX mode-Footnote-1176911 +Node: Exporting177059 +Node: ASCII export178373 +Node: HTML export179663 +Node: Export commands180282 +Node: Quoting HTML tags181006 +Node: Links181636 +Node: Images182333 +Ref: Images-Footnote-1183204 +Node: CSS support183265 +Ref: CSS support-Footnote-1184584 +Node: XOXO export184697 +Node: iCalendar export185136 +Node: Text interpretation186355 +Node: Comment lines186897 +Node: Initial text187292 +Node: Enhancing text188900 +Node: Export options190718 +Node: Publishing192611 +Ref: Publishing-Footnote-1193407 +Node: Configuration193603 +Node: Project alist194321 +Node: Sources and destinations195387 +Node: Selecting files196117 +Node: Publishing action196865 +Node: Publishing options198098 +Node: Publishing links200250 +Node: Project page index201763 +Node: Sample configuration202541 +Node: Simple example203033 +Node: Complex example203706 +Node: Triggering publication205782 +Node: Miscellaneous206467 +Node: Completion207101 +Node: Customization208572 +Node: In-buffer settings209155 +Node: The very busy C-c C-c key213632 +Node: Clean view215276 +Node: TTY keys217853 +Node: Interaction219462 +Node: Cooperation219859 +Node: Conflicts222601 +Node: Bugs224193 +Node: Extensions and Hacking225689 +Node: Extensions226285 +Node: Tables in arbitrary syntax228232 +Node: Radio tables229309 +Node: A LaTeX example231812 +Ref: A LaTeX example-Footnote-1235458 +Ref: A LaTeX example-Footnote-2235606 +Node: Translator functions236041 +Ref: Translator functions-Footnote-1239150 +Node: Dynamic blocks239238 +Node: Special agenda views241210 +Ref: Special agenda views-Footnote-1243489 +Node: History and Acknowledgments243749 +Node: Index249609 +Node: Key Index280590  End Tag Table diff --git a/org.el b/org.el index ee73a2646..9c544ee51 100644 --- a/org.el +++ b/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.68 +;; Version: 4.69a ;; ;; This file is part of GNU Emacs. ;; @@ -83,7 +83,7 @@ ;;; Version -(defconst org-version "4.68" +(defconst org-version "4.69a" "The version number of the file org.el.") (defun org-version () (interactive) @@ -1338,12 +1338,25 @@ etc. The command \\[org-todo] cycles an entry through these states, and an additional state where no keyword is present. For details about this cycling, see also the variable `org-todo-interpretation' -Changes become only effective after restarting Emacs." +Changes become only effective after restarting Emacs. + +TODO keywords and interpretation can also be set on a per-file basis with +the special #+SEQ_TODO and #+TYP_TODO lines." :group 'org-todo :group 'org-keywords :type '(repeat (string :tag "Keyword"))) -;; FIXME: remove priority as a possible value, this seems to be obsolete. +(defvar org-not-done-keywords nil) +(make-variable-buffer-local 'org-not-done-keywords) +(defvar org-done-keywords nil) +(make-variable-buffer-local 'org-done-keywords) +(defvar org-todo-heads nil) +(make-variable-buffer-local 'org-todo-heads) +(defvar org-todo-sets nil) +(make-variable-buffer-local 'org-todo-sets) +(defvar org-todo-kwd-alist nil) +(make-variable-buffer-local 'org-todo-kwd-alist) + (defcustom org-todo-interpretation 'sequence "Controls how TODO keywords are interpreted. This variable is only relevant if `org-todo-keywords' contains more than two @@ -1353,7 +1366,10 @@ When `sequence', \\[org-todo] will always switch to the next state in the `org-todo-keywords' list. When `type', \\[org-todo] only cycles from state to state when executed several times in direct succession. Otherwise, it switches directly to DONE from any state. -See the manual for more information." +See the manual for more information. + +TODO keywords and interpretation can also be set on a per-file basis with +the special #+SEQ_TODO and #+TYP_TODO lines." :group 'org-todo :group 'org-keywords :type '(choice (const sequence) @@ -1435,6 +1451,13 @@ entry is marked DONE." :group 'org-progress :type 'boolean) +(defcustom org-log-repeat t + "Non-nil means, prompt for a note when REPEAT is resetting a TODO entry. +When nil, no note will be taken." + :group 'org-todo + :group 'org-progress + :type 'boolean) + (defgroup org-priorities nil "Priorities in Org-mode." :tag "Org Priorities" @@ -1624,7 +1647,7 @@ make sure all corresponding TODO items find their way into the list." "Variable used by org files to set a category for agenda display. Such files should use a file variable to set it, for example - -*- mode: org; org-category: \"ELisp\" +# -*- mode: org; org-category: \"ELisp\" or contain a special line @@ -2249,6 +2272,12 @@ This should have an association in `org-export-language-setup'." :group 'org-export-general :type 'string) +(defcustom org-export-skip-text-before-1st-heading t + "Non-nil means, skip all text before the first headline when exporting. +When nil, that text is exported as well." + :group 'org-export-general + :type 'boolean) + (defcustom org-export-headline-levels 3 "The last level which is still exported as a headline. Inferior levels will produce itemize lists when exported. @@ -2366,12 +2395,19 @@ sub- or superscripts. x_{i^2} or x^(2-i) braces or parenthesis do grouping. Still, ambiguity is possible - so when in doubt use {} to enclose the -sub/superscript. +sub/superscript. If you set this variable to the symbol `{}', +the braces are *required* in order to trigger interpretations as +sub/superscript. This can be helpful in documents that need \"_\" +frequently in plain text. + Not all export backends support this, but HTML does. This option can also be set with the +OPTIONS line, e.g. \"^:nil\"." :group 'org-export-translation - :type 'boolean) + :type '(choice + (const :tag "Always interpret" t) + (const :tag "Only with braces" {}) + (const :tag "Never interpret" nil))) (defcustom org-export-with-TeX-macros t "Non-nil means, interpret simple TeX-like macros when exporting. @@ -3033,9 +3069,6 @@ This face is only used if `org-fontify-done-headline' is set." ;;; Variables for pre-computed regular expressions, all buffer local -(defvar org-done-string nil - "The last string in `org-todo-keywords', indicating an item is DONE.") -(make-variable-buffer-local 'org-done-string) (defvar org-todo-regexp nil "Matches any of the TODO state keywords.") (make-variable-buffer-local 'org-todo-regexp) @@ -3055,12 +3088,6 @@ Also put tags into group 4 if tags are present.") (defvar org-looking-at-done-regexp nil "Matches the DONE keyword a point.") (make-variable-buffer-local 'org-looking-at-done-regexp) -(defvar org-todo-kwd-priority-p nil - "Do TODO items have priorities?") -(make-variable-buffer-local 'org-todo-kwd-priority-p) -(defvar org-todo-kwd-max-priority nil - "Maximum priority of TODO items.") -(make-variable-buffer-local 'org-todo-kwd-max-priority) (defvar org-ds-keyword-length 12 "Maximum length of the Deadline and SCHEDULED keywords.") (make-variable-buffer-local 'org-ds-keyword-length) @@ -3169,11 +3196,16 @@ means to push this value onto the list in the variable.") (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (org-mode-p) + (org-set-local 'org-todo-kwd-alist nil) + (org-set-local 'org-todo-keywords nil) + (org-set-local 'org-done-keywords nil) + (org-set-local 'org-todo-heads nil) + (org-set-local 'org-todo-sets nil) (let ((re (org-make-options-regexp '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP" "ARCHIVE" "TAGS" "LINK"))) (splitre "[ \t]+") - kwds int key value cat arch tags links) + kwds int key value cat arch tags links hw dw) (save-excursion (save-restriction (widen) @@ -3186,14 +3218,11 @@ means to push this value onto the list in the variable.") (setq value (replace-match "" t t value))) (setq cat (intern value))) ((equal key "SEQ_TODO") - (setq int 'sequence - kwds (append kwds (org-split-string value splitre)))) - ((equal key "PRI_TODO") - (setq int 'priority - kwds (append kwds (org-split-string value splitre)))) + (push 'sequence int) + (push (org-split-string value splitre) kwds)) ((equal key "TYP_TODO") - (setq int 'type - kwds (append kwds (org-split-string value splitre)))) + (push 'type int) + (push (org-split-string value splitre) kwds)) ((equal key "TAGS") (setq tags (append tags (org-split-string value splitre)))) ((equal key "LINK") @@ -3220,10 +3249,26 @@ means to push this value onto the list in the variable.") '(face t fontified t) arch))) ))) (and cat (org-set-local 'org-category cat)) - (and kwds (org-set-local 'org-todo-keywords kwds)) (and arch (org-set-local 'org-archive-location arch)) - (and int (org-set-local 'org-todo-interpretation int)) (and links (setq org-link-abbrev-alist-local (nreverse links))) + ;; Process the TODO keywords + (unless (and int kwds) + ;; Use the global values as if they had been given locally. + (setq kwds (list (default-value 'org-todo-keywords)) + int (list org-todo-interpretation))) + (setq int (nreverse int) kwds (nreverse kwds)) + (let (i k) + (while (setq i (pop int)) + (setq k (pop kwds) hw (car k) dw (org-last k)) + (add-to-list 'org-todo-heads hw 'append) + (push k org-todo-sets) + (push dw org-done-keywords) + (mapc (lambda (x) (push (list x i hw dw) org-todo-kwd-alist)) k) + (setq org-todo-keywords (append org-todo-keywords k))) + (setq org-done-keywords (nreverse org-done-keywords) + org-todo-sets (nreverse org-todo-sets) + org-todo-kwd-alist (nreverse org-todo-kwd-alist))) + ;; Process the tags. (when tags (let (e tgs) (while (setq e (pop tags)) @@ -3242,32 +3287,35 @@ means to push this value onto the list in the variable.") (push e org-tag-alist)))))) ;; Compute the regular expressions and other local variables - (setq org-todo-kwd-priority-p (equal org-todo-interpretation 'priority) - org-todo-kwd-max-priority (1- (length org-todo-keywords)) - org-ds-keyword-length (+ 2 (max (length org-deadline-string) + (if (not org-done-keywords) + (setq org-done-keywords (list (org-last org-todo-keywords)))) + (setq org-ds-keyword-length (+ 2 (max (length org-deadline-string) (length org-scheduled-string))) - org-done-string - (nth (1- (length org-todo-keywords)) org-todo-keywords) + org-not-done-keywords + (org-delete-all org-done-keywords (copy-sequence org-todo-keywords)) org-todo-regexp (concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords "\\|") "\\)\\>") org-not-done-regexp (concat "\\<\\(" - (mapconcat 'regexp-quote - (nreverse (cdr (reverse org-todo-keywords))) - "\\|") + (mapconcat 'regexp-quote org-not-done-keywords "\\|") "\\)\\>") org-todo-line-regexp (concat "^\\(\\*+\\)[ \t]*\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords "\\|") "\\)\\>\\)? *\\(.*\\)") org-nl-done-regexp - (concat "[\r\n]\\*+[ \t]+" org-done-string "\\>") + (concat "[\r\n]\\*+[ \t]+" + "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|") + "\\)" "\\>") org-todo-line-tags-regexp (concat "^\\(\\*+\\)[ \t]*\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords "\\|") "\\)\\>\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)") - org-looking-at-done-regexp (concat "^" org-done-string "\\>") + org-looking-at-done-regexp + (concat "^" "\\(?:" + (mapconcat 'regexp-quote org-done-keywords "\\|") "\\)" + "\\>") org-deadline-regexp (concat "\\<" org-deadline-string) org-deadline-time-regexp (concat "\\<" org-deadline-string " *<\\([^>]+\\)>") @@ -3296,7 +3344,7 @@ means to push this value onto the list in the variable.") "\\|" org-closed-string "\\|" org-clock-string "\\)\\)?" " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)")) - + (org-set-font-lock-defaults))) @@ -3416,6 +3464,7 @@ This is for getting out of special buffers like remember.") (overlay-get ovl prop))) (defun org-overlays-at (pos) (if (featurep 'xemacs) (extents-at pos) (overlays-at pos))) +;; FIXME: this is currently not used (defun org-overlays-in (&optional start end) (if (featurep 'xemacs) (extent-list nil start end) @@ -3424,6 +3473,7 @@ This is for getting out of special buffers like remember.") (if (featurep 'xemacs) (extent-start-position o) (overlay-start o))) (defun org-overlay-end (o) (if (featurep 'xemacs) (extent-end-position o) (overlay-end o))) +;; FIXME: this is currently not used (defun org-find-overlays (prop &optional pos delete) "Find all overlays specifying PROP at POS or point. If DELETE is non-nil, delete all those overlays." @@ -3477,6 +3527,7 @@ that can be added." (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec))))) +;; FIXME: this is currently not used (defun org-in-invisibility-spec-p (arg) "Is ARG a member of `buffer-invisibility-spec'?" (if (consp buffer-invisibility-spec) @@ -3587,7 +3638,7 @@ The following commands are available: (if (and org-insert-mode-line-in-empty-file (interactive-p) (= (point-min) (point-max))) - (insert " -*- mode: org -*-\n\n")) + (insert "# -*- mode: org -*-\n\n")) (unless org-inhibit-startup (when org-startup-align-all-tables @@ -3601,6 +3652,8 @@ The following commands are available: (let ((this-command 'org-cycle) (last-command 'org-cycle)) (org-cycle '(4)) (org-cycle '(4))))))) +(put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) + (defsubst org-call-with-arg (command arg) "Call COMMAND interactively, but pretend prefix are was ARG." (let ((current-prefix-arg arg)) (call-interactively command))) @@ -3904,11 +3957,6 @@ between words." 'keymap org-mouse-map)) t))) -(defun org-font-lock-level () - (save-excursion - (org-back-to-heading t) - (- (match-end 0) (match-beginning 0)))) - (defun org-outline-level () (save-excursion (looking-at outline-regexp) @@ -3965,9 +4013,13 @@ between words." '("^#.*" (0 'font-lock-comment-face t)) ;; DONE (if org-fontify-done-headline - (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") + (list (concat "^[*]+ +\\<\\(" + (mapconcat 'regexp-quote org-done-keywords "\\|") + "\\)\\(.*\\)\\>") '(1 'org-done t) '(2 'org-headline-done t)) - (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") + (list (concat "^[*]+ +\\<\\(" + (mapconcat 'regexp-quote org-done-keywords "\\|") + "\\)\\>") '(1 'org-done t))) ;; Table stuff '("^[ \t]*\\(:.*\\)" (1 'org-table t)) @@ -4526,7 +4578,7 @@ state (TODO by default). Also with prefix arg, force first state." (looking-at org-todo-line-regexp)) (if (or arg (not (match-beginning 2)) - (equal (match-string 2) org-done-string)) + (member (match-string 2) org-done-keywords)) (insert (car org-todo-keywords) " ") (insert (match-string 2) " ")))) @@ -5240,6 +5292,12 @@ leave it alone. If it is larger than ind, set it to the target." (concat (make-string i1 ?\ ) l) l))) +(defcustom org-empty-line-terminates-plain-lists nil + "Non-nil means, an empty line ends all plain list levels. +When nil, empty lines are part of the preceeding item." + :group 'org-plain-lists + :type 'boolean) + (defun org-beginning-of-item () "Go to the beginning of the current hand-formatted item. If the cursor is not in an item, throw an error." @@ -5247,6 +5305,7 @@ If the cursor is not in an item, throw an error." (let ((pos (point)) (limit (save-excursion (org-back-to-heading) (beginning-of-line 2) (point))) + (ind-empty (if org-empty-line-terminates-plain-lists 0 10000)) ind ind1) (if (org-at-item-p) (beginning-of-line 1) @@ -5257,11 +5316,13 @@ If the cursor is not in an item, throw an error." (while t (beginning-of-line 0) (if (< (point) limit) (throw 'exit nil)) - (unless (looking-at "[ \t]*$") + + (if (looking-at "[ \t]*$") + (setq ind1 ind-empty) (skip-chars-forward " \t") - (setq ind1 (current-column)) - (if (< ind1 ind) - (throw 'exit (org-at-item-p)))))) + (setq ind1 (current-column))) + (if (< ind1 ind) + (throw 'exit (org-at-item-p))))) nil (goto-char pos) (error "Not in an item"))))) @@ -5270,22 +5331,27 @@ If the cursor is not in an item, throw an error." "Go to the end of the current hand-formatted item. If the cursor is not in an item, throw an error." (interactive) - (let ((pos (point)) - (limit (save-excursion (outline-next-heading) (point))) - (ind (save-excursion - (org-beginning-of-item) - (skip-chars-forward " \t") - (current-column))) - ind1) - (if (catch 'exit - (while t - (beginning-of-line 2) - (if (>= (point) limit) (throw 'exit t)) - (unless (looking-at "[ \t]*$") - (skip-chars-forward " \t") - (setq ind1 (current-column)) - (if (<= ind1 ind) (throw 'exit t))))) - (beginning-of-line 1) + (let* ((pos (point)) + ind1 + (ind-empty (if org-empty-line-terminates-plain-lists 0 10000)) + (limit (save-excursion (outline-next-heading) (point))) + (ind (save-excursion + (org-beginning-of-item) + (skip-chars-forward " \t") + (current-column))) + (end (catch 'exit + (while t + (beginning-of-line 2) + (if (eobp) (throw 'exit (point))) + (if (>= (point) limit) (throw 'exit (point-at-bol))) + (if (looking-at "[ \t]*$") + (setq ind1 ind-empty) + (skip-chars-forward " \t") + (setq ind1 (current-column))) + (if (<= ind1 ind) + (throw 'exit (point-at-bol))))))) + (if end + (goto-char end) (goto-char pos) (error "Not in an item")))) @@ -5364,7 +5430,11 @@ so this really moves item trees." (while t (beginning-of-line 0) (if (looking-at "[ \t]*$") - nil + (if org-empty-line-terminates-plain-lists + (progn + (goto-char pos) + (error "Cannot move this item further up")) + nil) (if (<= (setq ind1 (org-get-indentation)) ind) (throw 'exit t))))) (condition-case nil @@ -5502,8 +5572,8 @@ this heading. " (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler (tr-org-todo-keywords org-todo-keywords) - (tr-org-todo-interpretation org-todo-interpretation) - (tr-org-done-string org-done-string) + (tr-org-todo-kwd-alist org-todo-kwd-alist) + (tr-org-done-keywords org-done-keywords) (tr-org-todo-regexp org-todo-regexp) (tr-org-todo-line-regexp org-todo-line-regexp) (tr-org-odd-levels-only org-odd-levels-only) @@ -5551,8 +5621,8 @@ this heading. " ;; Force the TODO keywords of the original buffer (let ((org-todo-line-regexp tr-org-todo-line-regexp) (org-todo-keywords tr-org-todo-keywords) - (org-todo-interpretation tr-org-todo-interpretation) - (org-done-string tr-org-done-string) + (org-todo-kwd-alist tr-org-todo-kwd-alist) + (org-done-keywords tr-org-done-keywords) (org-todo-regexp tr-org-todo-regexp) (org-todo-line-regexp tr-org-todo-line-regexp) (org-odd-levels-only @@ -6674,9 +6744,9 @@ With prefix ARG, insert below the current line." (org-table-align)) (org-table-fix-formulas "@" nil (1- (org-table-current-dline)) 1))) -(defun org-table-insert-hline (&optional arg) +(defun org-table-insert-hline (&optional above) "Insert a horizontal-line below the current line into the table. -With prefix ARG, insert above the current line." +With prefix ABOVE, insert above the current line." (interactive "P") (if (not (org-at-table-p)) (error "Not at a table")) @@ -6688,12 +6758,25 @@ With prefix ARG, insert above the current line." (concat "+" (make-string (- (match-end 1) (match-beginning 1)) ?-) "|") t t line))) (and (string-match "\\+" line) (setq line (replace-match "|" t t line))) - (beginning-of-line (if arg 1 2)) + (beginning-of-line (if above 1 2)) (insert line "\n") - (beginning-of-line (if arg 1 -1)) + (beginning-of-line (if above 1 -1)) (move-to-column col) (and org-table-overlay-coordinates (org-table-align)))) +(defun org-table-hline-and-move (&optional same-column) + "Insert a hline and move to the row below that line." + (interactive "P") + (let ((col (org-table-current-column))) + (org-table-maybe-eval-formula) + (org-table-maybe-recalculate-line) + (org-table-insert-hline) + (end-of-line 2) + (if (looking-at "\n[ \t]*|-") + (progn (insert "\n|") (org-table-align)) + (org-table-next-field)) + (if same-column (org-table-goto-column col)))) + (defun org-table-clean-line (s) "Convert a table line S into a string with only \"|\" and space. In particular, this does handle wide and invisible characters." @@ -7005,8 +7088,7 @@ it can be edited in place." '(invisible t org-cwidth t display t intangible t)) (goto-char p) - (org-set-local 'org-finish-function - 'org-table-finish-edit-field) + (org-set-local 'org-finish-function 'org-table-finish-edit-field) (org-set-local 'org-window-configuration cw) (org-set-local 'org-field-marker pos) (message "Edit and finish with C-c C-c")))) @@ -7412,13 +7494,6 @@ For all numbers larger than LIMIT, shift them by DELTA." org-table-dlines (apply 'vector (cons nil (nreverse dlines))) org-table-hlines (apply 'vector (cons nil (nreverse hlines))))))) -(defun org-this-word () - ;; Get the current word - (save-excursion - (let ((beg (progn (skip-chars-backward "^ \t\n") (point))) - (end (progn (skip-chars-forward "^ \t\n") (point)))) - (buffer-substring-no-properties beg end)))) - (defun org-table-maybe-eval-formula () "Check if the current field starts with \"=\" or \":=\". If yes, store the formula and apply it." @@ -8097,6 +8172,179 @@ Parameters get priority." (error nil)) (select-window win))))) +(defun org-table-formula-to-user (s) + "Convert a formula from internal to user representation." + (if (eq org-table-use-standard-references t) + (org-table-convert-refs-to-an s) + s)) + +(defun org-table-formula-from-user (s) + "Convert a formula from user to internal representation." + (if org-table-use-standard-references + (org-table-convert-refs-to-rc s) + s)) + +(defun org-table-convert-refs-to-rc (s) + "Convert spreadsheet references from AB7 to @7$28. +Works for single references, but also for entire formulas and even the +full TBLFM line." + (let ((start 0)) + (while (string-match "\\<\\([a-zA-Z]+\\)\\([0-9]+\\>\\|&\\)\\|\\(;[^\r\n:]+\\)" s start) + (if (match-end 3) + ;; format match, just advance + (setq start (match-end 0)) + (setq start (match-beginning 0) + s (replace-match + (if (equal (match-string 2 s) "&") + (format "$%d" (org-letters-to-number (match-string 1 s))) + (format "@%d$%d" + (string-to-number (match-string 2 s)) + (org-letters-to-number (match-string 1 s)))) + t t s)))) + s)) + +(defun org-table-convert-refs-to-an (s) + "Convert spreadsheet references from to @7$28 to AB7. +Works for single references, but also for entire formulas and even the +full TBLFM line." + (while (string-match "@\\([0-9]+\\)$\\([0-9]+\\)" s) + (setq s (replace-match + (format "%s%d" + (org-number-to-letters + (string-to-number (match-string 2 s))) + (string-to-number (match-string 1 s))) + t t s))) + (while (string-match "\\(^\\|[^0-9a-zA-Z]\\)\\$\\([0-9]+\\)" s) + (setq s (replace-match (concat "\\1" + (org-number-to-letters + (string-to-number (match-string 2 s))) "&") + t nil s))) + s) + +(defun org-letters-to-number (s) + "Convert a base 26 number represented by letters into an integer. +For example: AB -> 28." + (let ((n 0)) + (setq s (upcase s)) + (while (> (length s) 0) + (setq n (+ (* n 26) (string-to-char s) (- ?A) 1) + s (substring s 1))) + n)) + +(defun org-number-to-letters (n) + "Convert an integer into a base 26 number represented by letters. +For example: 28 -> AB." + (let ((s "")) + (while (> n 0) + (setq s (concat (char-to-string (+ (mod (1- n) 26) ?A)) s) + n (/ (1- n) 26))) + s)) + +(defun org-table-fedit-convert-buffer (function) + "Convert all references in this buffer, using FUNTION." + (let ((line (org-current-line))) + (goto-char (point-min)) + (while (not (eobp)) + (insert (funcall function (buffer-substring (point) (point-at-eol)))) + (delete-region (point) (point-at-eol)) + (or (eobp) (forward-char 1))) + (goto-line line))) + +(defun org-table-fedit-toggle-ref-type () + "Convert all references in the buffer from B3 to @3$2 and back." + (interactive) + (org-set-local 'org-table-buffer-is-an (not org-table-buffer-is-an)) + (org-table-fedit-convert-buffer + (if org-table-buffer-is-an + 'org-table-convert-refs-to-an 'org-table-convert-refs-to-rc)) + (message "Reference type switched to %s" + (if org-table-buffer-is-an "A1 etc" "@row$column"))) + +(defun org-table-fedit-ref-up () + "Shift the reference at point one row/hline up." + (interactive) + (org-table-fedit-shift-reference 'up)) +(defun org-table-fedit-ref-down () + "Shift the reference at point one row/hline down." + (interactive) + (org-table-fedit-shift-reference 'down)) +(defun org-table-fedit-ref-left () + "Shift the reference at point one field to the left." + (interactive) + (org-table-fedit-shift-reference 'left)) +(defun org-table-fedit-ref-right () + "Shift the reference at point one field to the right." + (interactive) + (org-table-fedit-shift-reference 'right)) + +(defun org-table-fedit-shift-reference (dir) + (cond + ((org-at-regexp-p "\\(\\<[a-zA-Z]\\)&") + (if (memq dir '(left right)) + (org-rematch-and-replace 1 (eq dir 'left)) + (error "Cannot shift reference in this direction"))) + ((org-at-regexp-p "\\(\\<[a-zA-Z]\\{1,2\\}\\)\\([0-9]+\\)") + ;; A B3-like reference + (if (memq dir '(up down)) + (org-rematch-and-replace 2 (eq dir 'up)) + (org-rematch-and-replace 1 (eq dir 'left)))) + ((org-at-regexp-p + "\\(@\\|\\.\\.\\)\\([-+]?\\(I+\\>\\|[0-9]+\\)\\)\\(\\$\\([-+]?[0-9]+\\)\\)?") + ;; An internal reference + (if (memq dir '(up down)) + (org-rematch-and-replace 2 (eq dir 'up) (match-end 3)) + (org-rematch-and-replace 5 (eq dir 'left)))))) + +(defun org-rematch-and-replace (n &optional decr hline) + "Re-match the group N, and replace it with the shifted refrence." + (or (match-end n) (error "Cannot shift reference in this direction")) + (goto-char (match-beginning n)) + (and (looking-at (regexp-quote (match-string n))) + (replace-match (org-shift-refpart (match-string 0) decr hline) + t t))) + +(defun org-shift-refpart (ref &optional decr hline) + "Shift a refrence part REF. +If DECR is set, decrease the references row/column, else increase. +If HLINE is set, this may be a hline reference, it certainly is not +a translation reference." + (save-match-data + (let* ((sign (string-match "^[-+]" ref)) n) + + (if sign (setq sign (substring ref 0 1) ref (substring ref 1))) + (cond + ((and hline (string-match "^I+" ref)) + (setq n (string-to-number (concat sign (number-to-string (length ref))))) + (setq n (+ n (if decr -1 1))) + (if (= n 0) (setq n (+ n (if decr -1 1)))) + (if sign + (setq sign (if (< n 0) "-" "+") n (abs n)) + (setq n (max 1 n))) + (concat sign (make-string n ?I))) + + ((string-match "^[0-9]+" ref) + (setq n (string-to-number (concat sign ref))) + (setq n (+ n (if decr -1 1))) + (if sign + (concat (if (< n 0) "-" "+") (number-to-string (abs n))) + (number-to-string (max 1 n)))) + + ((string-match "^[a-zA-Z]+" ref) + (org-number-to-letters + (max 1 (+ (org-letters-to-number ref) (if decr -1 1))))) + + (t (error "Cannot shift reference")))))) + +(defun org-table-fedit-toggle-coordinates () + "Toggle the display of coordinates in the refrenced table." + (interactive) + (let ((pos (marker-position org-pos))) + (with-current-buffer (marker-buffer org-pos) + (save-excursion + (goto-char pos) + (org-table-toggle-coordinate-overlays))))) + +(defvar org-table-buffer-is-an nil) (defun org-table-fedit-finish (&optional arg) "Parse the buffer for formula definitions and install them. With prefix ARG, apply the new formulas to the table." @@ -10034,16 +10282,18 @@ enclose the position of `org-open-link-marker'." (let ((m org-open-link-marker)) (catch 'exit (while (apply 're-search-forward args) - (goto-char (match-end group)) - (if (and (or (not (eq (marker-buffer m) (current-buffer))) - (> (match-beginning 0) (marker-position m)) - (< (match-end 0) (marker-position m))) - (save-match-data - (or (not (org-in-regexp org-bracket-link-analytic-regexp 1)) - (not (match-end 4)) ; no description - (and (<= (match-beginning 4) (point)) - (>= (match-end 4) (point)))))) - (throw 'exit (point))))))) + (unless (get-text-property (match-end group) 'intangible) ; Emacs 21 + (goto-char (match-end group)) + (if (and (or (not (eq (marker-buffer m) (current-buffer))) + (> (match-beginning 0) (marker-position m)) + (< (match-end 0) (marker-position m))) + (save-match-data + (or (not (org-in-regexp + org-bracket-link-analytic-regexp 1)) + (not (match-end 4)) ; no description + (and (<= (match-beginning 4) (point)) + (>= (match-end 4) (point)))))) + (throw 'exit (point)))))))) (defun org-get-buffer-for-internal-link (buffer) "Return a buffer to be used for displaying the link target of internal links." @@ -10472,7 +10722,7 @@ If the file does not exist, an error is thrown." (if (stringp command) (setq cmd command) (setq cmd 'emacs)))) - (if (and (not (eq cmd 'emacs)) ; Emacs has not problems with non-ex files + (if (and (not (eq cmd 'emacs)) ; Emacs has no problems with non-ex files (not (file-exists-p file)) (not org-open-non-existing-files)) (error "No such file: %s" file)) @@ -10506,10 +10756,6 @@ If the file does not exist, an error is thrown." org-file-apps-defaults-windowsnt) (t org-file-apps-defaults-gnu))) -(defun org-expand-file-name (path) - "Replace special path abbreviations and expand the file name." - (expand-file-name path)) - (defvar ange-ftp-name-format) ; to silence the XEmacs compiler. (defun org-file-remote-p (file) "Test whether FILE specifies a location on a remote system. @@ -11052,6 +11298,8 @@ 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 +'nextset -> switch to the next set of keywords +'previousset -> switch to the previous set of keywords \"WAITING\" -> switch to the specified keyword, but only if it really is a member of `org-todo-keywords'." (interactive "P") @@ -11061,6 +11309,9 @@ For calling through lisp, arg is also interpreted in the following way: (or (looking-at (concat " +" org-todo-regexp " *")) (looking-at " *")) (let* ((this (match-string 1)) + (head (org-get-todo-sequence-head this)) + (interpret (nth 1 (assoc head org-todo-kwd-alist))) + (done-word (nth 3 (assoc head org-todo-kwd-alist))) (last-state (or this "")) (completion-ignore-case t) (member (member this org-todo-keywords)) @@ -11081,32 +11332,45 @@ For calling through lisp, arg is also interpreted in the following way: (if this (nth (- (length org-todo-keywords) (length tail) 2) org-todo-keywords) - org-done-string))) + (org-last org-todo-keywords)))) (arg - ;; user requests a specific state + ;; user or caller requests a specific state (cond ((equal arg "") nil) ((eq arg 'none) nil) - ((eq arg 'done) (org-last org-todo-keywords)) + ((eq arg 'done) (or done-word (car org-done-keywords))) + ((eq arg 'nextset) + (or (car (cdr (member head org-todo-heads))) + (car org-todo-heads))) + ((eq arg 'previousset) + (let ((org-todo-heads (reverse org-todo-heads))) + (or (car (cdr (member head org-todo-heads))) + (car org-todo-heads)))) ((car (member arg org-todo-keywords))) ((nth (1- (prefix-numeric-value arg)) org-todo-keywords)))) - ((null member) (car org-todo-keywords)) + ((null member) (or head (car org-todo-keywords))) + ((member this org-done-keywords) nil) ;; -> make empty ((null tail) nil) ;; -> first entry - ((eq org-todo-interpretation 'sequence) + ((eq interpret 'sequence) (car tail)) - ((memq org-todo-interpretation '(type priority)) + ((memq interpret '(type priority)) (if (eq this-command last-command) (car tail) - (if (> (length tail) 0) org-done-string nil))) + (if (> (length tail) 0) + (or done-word (car org-done-keywords)) + nil))) (t nil))) (next (if state (concat " " state " ") " ")) dostates) (replace-match next t t) + (when (memq arg '(nextset previousset)) + (message "Keyword set: %s" + (mapconcat 'identity (assoc state org-todo-sets) " "))) (setq org-last-todo-state-is-todo - (not (equal state org-done-string))) + (not (member state org-done-keywords))) (when org-log-done - (setq dostates (and (eq org-todo-interpretation 'sequence) + (setq dostates (and (eq interpret 'sequence) (listp org-log-done) (memq 'state org-log-done))) (cond ((and state (not this)) @@ -11114,7 +11378,7 @@ For calling through lisp, arg is also interpreted in the following way: (and dostates (org-add-log-maybe 'state state 'findpos))) ((and state dostates) (org-add-log-maybe 'state state 'findpos)) - ((equal state org-done-string) + ((member state org-done-keywords) ;; Planning info calls the note-setting command. (org-add-planning-info 'closed (org-current-time) (if (org-get-repeat) nil 'scheduled)) @@ -11122,8 +11386,10 @@ For calling through lisp, arg is also interpreted in the following way: ;; Fixup tag positioning (and org-auto-align-tags (org-set-tags nil t)) (run-hooks 'org-after-todo-state-change-hook) - (and (equal state org-done-string) (org-auto-repeat-maybe)) - )) + (and (member state org-done-keywords) (org-auto-repeat-maybe)) + (if (and arg (not (member state org-done-keywords))) + (setq head (org-get-todo-sequence-head state))) + (put-text-property (point-at-bol) (point-at-eol) 'org-todo-head head))) ;; Fixup cursor location if close to the keyword (if (and (outline-on-heading-p) (not (bolp)) @@ -11134,6 +11400,22 @@ For calling through lisp, arg is also interpreted in the following way: (goto-char (or (match-end 2) (match-end 1))) (just-one-space)))) +(defun org-get-todo-sequence-head (kwd) + "Return the head of the TODO sequence to which KWD belongs. +If KWD is not set, check if there is a text property remembering the +right sequence." + (let (p) + (cond + ((not kwd) + (or (get-text-property (point-at-bol) 'org-todo-head) + (progn + (setq p (next-single-property-change (point-at-bol) 'org-todo-head + nil (point-at-eol))) + (get-text-property p 'org-todo-head)))) + ((not (member kwd org-todo-keywords)) + (car org-todo-keywords)) + (t (nth 2 (assoc kwd org-todo-kwd-alist)))))) + (defun org-get-repeat () "Return the REPEAT statement of this entry." (save-match-data @@ -11151,19 +11433,24 @@ 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) + (let* ((repeat (org-get-repeat)) + (aa (assoc last-state org-todo-kwd-alist)) + (interpret (nth 1 aa)) + (head (nth 2 aa)) + (done-word (nth 3 aa)) + (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))) - (unless (memq 'org-add-log-note (default-value 'post-command-hook)) + (org-todo (if (eq interpret 'type) last-state head)) + (when (and org-log-repeat + (not (memq 'org-add-log-note + (default-value 'post-command-hook)))) ;; Make sure a note is taken (let ((org-log-done '(done))) - (org-add-log-maybe 'done org-done-string 'findpos))) + (org-add-log-maybe 'done (or done-word (car org-done-keywords)) + 'findpos))) (org-back-to-heading t) (org-add-planning-info nil nil 'closed) (setq re (concat "\\(" org-scheduled-time-regexp "\\)\\|\\(" @@ -12854,7 +13141,7 @@ from the `before-change-functions' in the current buffer." (defun org-clock-out-if-current () "Clock out if the current entry contains the running clock. This is used to stop the clock after a TODO entry is marked DONE." - (when (and (equal state org-done-string) + (when (and (member state org-done-keywords) (equal (marker-buffer org-clock-marker) (current-buffer)) (< (point) org-clock-marker) (> (save-excursion (outline-next-heading) (point)) @@ -13656,13 +13943,6 @@ If the current buffer does not, find the first agenda file." (find-file (car fs))) (if (buffer-base-buffer) (switch-to-buffer (buffer-base-buffer))))) -(defun org-agenda-file-to-end () - "Move/add the current file to the end of the agenda file list. -If the file is not present in the list, it is appended to the list. If it is -present, it is moved there." - (interactive) - (org-agenda-file-to-front 'to-end)) - (defun org-agenda-file-to-front (&optional to-end) "Move/add the current file to the top of the agenda file list. If the file is not present in the list, it is added to the front. If it is @@ -14630,13 +14910,7 @@ the documentation of `org-diary'." category (org-get-category) tags (org-get-tags-at (point)) txt (org-format-agenda-item "" (match-string 1) category tags) - priority - (+ (org-get-priority txt) - (if org-todo-kwd-priority-p - (- org-todo-kwd-max-priority -2 - (length - (member (match-string 2) org-todo-keywords))) - 1))) + priority (1+ (org-get-priority txt))) (org-add-props txt props 'org-marker marker 'org-hd-marker marker 'priority priority 'org-category category) @@ -15392,6 +15666,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'." "Detach overlay INDEX." (funcall (if (featurep 'xemacs) 'detach-extent 'delete-overlay) org-hl)) +;; FIXME this is currently not used. (defun org-highlight-until-next-command (beg end &optional buffer) (org-highlight beg end buffer) (add-hook 'pre-command-hook 'org-unhighlight-once)) @@ -16456,6 +16731,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (:sub-superscript . org-export-with-sub-superscripts) (:TeX-macros . org-export-with-TeX-macros) (:LaTeX-fragments . org-export-with-LaTeX-fragments) + (:skip-before-1st-heading . org-export-skip-text-before-1st-heading) (:fixed-width . org-export-with-fixed-width) (:timestamps . org-export-with-timestamps) (:tables . org-export-with-tables) @@ -16510,7 +16786,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." ("^" . :sub-superscript) ("*" . :emphasize) ("TeX" . :TeX-macros) - ("LaTeX" . :LaTeX-fragments))) + ("LaTeX" . :LaTeX-fragments) + ("skip" . :skip-before-1st-heading))) o) (while (setq o (pop op)) (if (string-match (concat (regexp-quote (car o)) @@ -16528,15 +16805,6 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." val))) dir)) -(defun org-export-find-first-heading-line (list) - "Remove all lines from LIST which are before the first headline." - (let ((orig-list list) - (re (concat "^" outline-regexp))) - (while (and list - (not (string-match re (car list)))) - (pop list)) - (or list orig-list))) - (defun org-skip-comments (lines) "Skip lines starting with \"#\" and subtrees starting with COMMENT." (let ((re1 (concat "^\\(\\*+\\)[ \t]+" org-comment-string)) @@ -16917,7 +17185,7 @@ translations. There is currently no way for users to extend this.") (re-angle-link (concat "\\([^[]\\)" org-angle-link-re)) (re-archive (concat ":" org-archive-tag ":")) (re-quote (concat "^\\*+[ \t]+" org-quote-string "\\>")) - (htmlp (memq :for-html parameters)) + (htmlp (plist-get parameters :for-html)) (outline-regexp "\\*+") rtn) (save-excursion @@ -16927,6 +17195,17 @@ translations. There is currently no way for users to extend this.") (let ((org-inhibit-startup t)) (org-mode)) (untabify (point-min) (point-max)) + ;; Get the correct stuff before the first headline + (when (plist-get parameters :skip-before-1st-heading) + (goto-char (point-min)) + (when (re-search-forward "^\\*+[ \t]" nil t) + (delete-region (point-min) (match-beginning 0)) + (goto-char (point-min)) + (insert "\n"))) + (when (plist-get parameters :add-text) + (goto-char (point-min)) + (insert (plist-get parameters :add-text) "\n")) + ;; Get rid of archived trees (when (not (eq org-export-with-archived-trees t)) (goto-char (point-min)) @@ -16952,7 +17231,7 @@ translations. There is currently no way for users to extend this.") '(org-protected t)))) (goto-char (point-min)) (while (re-search-forward - "^#\\+BEGIN_HTML\\>.*\\(\n.*\\)*?\n#\\+END_HTML\\>.*\n?" nil t) + "^#\\+BEGIN_HTML\\>.*\\(\\(\n.*\\)*?\n\\)#\\+END_HTML\\>.*\n?" nil t) (if htmlp (add-text-properties (match-beginning 1) (1+ (match-end 1)) '(org-protected t)) @@ -16990,7 +17269,7 @@ translations. There is currently no way for users to extend this.") (goto-char (match-beginning 0)))) ;; Convert LaTeX fragments to images - (when (memq :LaTeX-fragments parameters) + (when (plist-get parameters :LaTeX-fragments) (org-format-latex (concat "ltxpng/" (file-name-sans-extension (file-name-nondirectory @@ -17028,7 +17307,7 @@ translations. There is currently no way for users to extend this.") t t))) ;; Find multiline emphasis and put them into single line - (when (memq :emph-multiline parameters) + (when (plist-get parameters :emph-multiline) (goto-char (point-min)) (while (re-search-forward org-emph-re nil t) (org-if-unprotected @@ -17115,11 +17394,14 @@ underlined headlines. The default is 3." (if (org-region-active-p) (region-beginning) (point-min)) (if (org-region-active-p) (region-end) (point-max)))) (custom-times org-display-custom-times) - (lines (org-export-find-first-heading-line - (org-skip-comments - (org-split-string - (org-cleaned-string-for-export region) - "[\r\n]")))) + (lines (org-skip-comments + (org-split-string + (org-cleaned-string-for-export + region + :skip-before-1st-heading + (plist-get opt-plist :skip-before-1st-heading) + :add-text (plist-get opt-plist :text)) + "[\r\n]"))) (org-ascii-current-indentation '(0 . 0)) (level 0) line txt (umax nil) @@ -17143,9 +17425,9 @@ underlined headlines. The default is 3." (language (plist-get opt-plist :language)) (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) ; (quote-re (concat "^\\(\\*+\\)\\([ \t]*" org-quote-string "\\>\\)")) - (text nil) (todo nil) - (lang-words nil)) + (lang-words nil) + thetoc first-heading-pos) (setq org-last-level 1) (org-init-section-numbers) @@ -17179,14 +17461,13 @@ underlined headlines. The default is 3." "\n"))) (if (and date time) (insert (concat (nth 2 lang-words) ": " date " " time "\n"))) - (if text (insert (concat (org-html-expand-for-ascii text) "\n\n"))) (insert "\n\n") (if org-export-with-toc (progn - (insert (nth 3 lang-words) "\n" - (make-string (length (nth 3 lang-words)) ?=) "\n") + (push (concat (nth 3 lang-words) "\n") thetoc) + (push (concat (make-string (length (nth 3 lang-words)) ?=) "\n") thetoc) (mapcar '(lambda (line) (if (string-match org-todo-line-regexp line) @@ -17198,33 +17479,36 @@ underlined headlines. The default is 3." todo (or (and org-export-mark-todo-in-toc (match-beginning 2) - (not (equal (match-string 2 line) - org-done-string))) + (not (member (match-string 2 line) + org-done-keywords))) ; TODO, not DONE (and org-export-mark-todo-in-toc (= level umax-toc) (org-search-todo-below line lines level)))) (setq txt (org-html-expand-for-ascii txt)) - + (if (and (memq org-export-with-tags '(not-in-toc nil)) (string-match "[ \t]+:[a-zA-Z0-9_@:]+:[ \t]*$" txt)) (setq txt (replace-match "" t t txt))) (if (string-match quote-re0 txt) (setq txt (replace-match "" t t txt))) - + (if org-export-with-section-numbers (setq txt (concat (org-section-number level) " " txt))) (if (<= level umax-toc) (progn - (insert - (make-string (* (1- level) 4) ?\ ) - (format (if todo "%s (*)\n" "%s\n") txt)) + (push + (concat + (make-string (* (1- level) 4) ?\ ) + (format (if todo "%s (*)\n" "%s\n") txt)) + thetoc) (setq org-last-level level)) )))) - lines))) - + lines) + (setq thetoc (nreverse thetoc)))) + (org-init-section-numbers) (while (setq line (pop lines)) ;; Remove the quoted HTML tags. @@ -17242,12 +17526,26 @@ underlined headlines. The default is 3." (cond ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) ;; a Headline + (setq first-heading-pos (or first-heading-pos (point))) (setq level (org-tr-level (- (match-end 1) (match-beginning 1))) txt (match-string 2 line)) (org-ascii-level-start level txt umax lines)) (t (insert (org-fix-indentation line org-ascii-current-indentation) "\n")))) (normal-mode) + + ;; insert the table of contents + (when thetoc + (goto-char (point-min)) + (if (re-search-forward "^[ \t]*\\[TABLE-OF-CONTENTS\\][ \t]*$" nil t) + (progn + (goto-char (match-beginning 0)) + (replace-match "")) + (goto-char first-heading-pos)) + (mapc 'insert thetoc) + (or (looking-at "[ \t]*\n[ \t]*\n") + (insert "\n\n"))) + (save-buffer) ;; remove display and invisible chars (let (beg end) @@ -17275,8 +17573,8 @@ underlined headlines. The default is 3." (progn (setq lv (- (match-end 1) (match-beginning 1)) todo (and (match-beginning 2) - (not (equal (match-string 2 line) - org-done-string)))) + (not (member (match-string 2 line) + org-done-keywords)))) ; TODO, not DONE (if (<= lv level) (throw 'exit nil)) (if todo (throw 'exit t)))))))) @@ -17404,7 +17702,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff." #+EMAIL: %s #+LANGUAGE: %s #+TEXT: Some descriptive text to be emitted. Several lines OK. -#+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s *:%s TeX:%s LaTeX:%s +#+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s *:%s TeX:%s LaTeX:%s skip:%s #+CATEGORY: %s #+SEQ_TODO: %s #+TYP_TODO: %s @@ -17425,13 +17723,10 @@ Does include HTML export options as well as TODO and CATEGORY stuff." org-export-with-emphasize org-export-with-TeX-macros org-export-with-LaTeX-fragments + org-export-skip-text-before-1st-heading (file-name-nondirectory buffer-file-name) - (if (equal org-todo-interpretation 'sequence) - (mapconcat 'identity org-todo-keywords " ") - "TODO FEEDBACK VERIFY DONE") - (if (equal org-todo-interpretation 'type) - (mapconcat 'identity org-todo-keywords " ") - "Me Jason Marie DONE") + "TODO FEEDBACK VERIFY DONE" + "Me Jason Marie DONE" (cdr (assoc org-startup-folded '((nil . "showall") (t . "overview") (content . "content")))) (if org-odd-levels-only "odd" "oddeven") @@ -17535,7 +17830,7 @@ org-mode's default settings, but still inferior to file-local settings." (message "Exporting...") (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-done-keywords org-done-keywords) (setq-default org-maybe-keyword-time-regexp org-maybe-keyword-time-regexp) (let* ((opt-plist (org-combine-plists (org-default-export-plist) ext-plist @@ -17543,7 +17838,7 @@ org-mode's default settings, but still inferior to file-local settings." (style (plist-get opt-plist :style)) (link-validate (plist-get opt-plist :link-validation-function)) - valid + valid thetoc first-heading-pos (odd org-odd-levels-only) (region-p (org-region-active-p)) (region @@ -17554,14 +17849,19 @@ org-mode's default settings, but still inferior to file-local settings." ;; routines below. (org-current-export-dir (org-export-directory :html opt-plist)) (org-current-export-file buffer-file-name) - (all_lines + (lines (org-skip-comments (org-split-string (org-cleaned-string-for-export - region :emph-multiline :for-html - (if (plist-get opt-plist :LaTeX-fragments) - :LaTeX-fragments)) + region + :emph-multiline t + :for-html t + :skip-before-1st-heading + (plist-get opt-plist :skip-before-1st-heading) + :add-text + (plist-get opt-plist :text) + :LaTeX-fragments + (plist-get opt-plist :LaTeX-fragments)) "[\r\n]"))) - (lines (org-export-find-first-heading-line all_lines)) (level 0) (line "") (origline "") txt todo (umax nil) (umax-toc nil) @@ -17589,7 +17889,6 @@ org-mode's default settings, but still inferior to file-local settings." (llt org-plain-list-ordered-item-terminator) (email (plist-get opt-plist :email)) (language (plist-get opt-plist :language)) - (text (plist-get opt-plist :text)) (lang-words nil) (target-alist nil) tg (head-count 0) cnt @@ -17634,7 +17933,6 @@ org-mode's default settings, but still inferior to file-local settings." (setq umax-toc (if (integerp org-export-with-toc) (min org-export-with-toc umax) umax)) - ;; File header (insert (format " (when (plist-get opt-plist :auto-preamble) (if title (insert (format org-export-html-title-format - (org-html-expand title)))) - (if text (insert "

\n" (org-html-expand text) "

"))) + (org-html-expand title))))) (if org-export-with-toc (progn - (insert (format "%s\n" - org-export-html-toplevel-hlevel - (nth 3 lang-words) - org-export-html-toplevel-hlevel)) - (insert "
    \n
  • ") + (push (format "%s\n" + org-export-html-toplevel-hlevel + (nth 3 lang-words) + org-export-html-toplevel-hlevel) + thetoc) + (push "
      \n
    • " thetoc) (setq lines (mapcar '(lambda (line) (if (string-match org-todo-line-regexp line) @@ -17682,8 +17980,8 @@ lang=\"%s\" xml:lang=\"%s\"> todo (or (and org-export-mark-todo-in-toc (match-beginning 2) - (not (equal (match-string 2 line) - org-done-string))) + (not (member (match-string 2 line) + org-done-keywords))) ; TODO, not DONE (and org-export-mark-todo-in-toc (= level umax-toc) @@ -17704,14 +18002,14 @@ lang=\"%s\" xml:lang=\"%s\"> (progn (setq cnt (- level org-last-level)) (while (>= (setq cnt (1- cnt)) 0) - (insert "\n
        \n
      • ")) - (insert "\n"))) + (push "\n
          \n
        • " thetoc)) + (push "\n" thetoc))) (if (< level org-last-level) (progn (setq cnt (- org-last-level level)) (while (>= (setq cnt (1- cnt)) 0) - (insert "
        • \n
        ")) - (insert "\n"))) + (push "
      • \n
      " thetoc)) + (push "\n" thetoc))) ;; Check for targets (while (string-match org-target-regexp line) (setq tg (match-string 1 line) @@ -17723,21 +18021,21 @@ lang=\"%s\" xml:lang=\"%s\"> target-alist)) (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) (setq txt (replace-match "" t t txt))) - (insert + (push (format (if todo "
    • \n
    • %s" "
    • \n
    • %s") - head-count txt)) - + head-count txt) thetoc) + (setq org-last-level level)) ))) line) lines)) (while (> org-last-level 0) (setq org-last-level (1- org-last-level)) - (insert "
    • \n
    \n")) - )) + (push "
  • \n
\n" thetoc)) + (setq thetoc (nreverse thetoc)))) (setq head-count 0) (org-init-section-numbers) @@ -17769,7 +18067,16 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Protected HTML (when (get-text-property 0 'org-protected line) - (insert line "\n") + (let (par) + (when (re-search-backward + "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) + (setq par (match-string 1)) + (replace-match "\\2\n")) + (insert line "\n") + (while (and lines + (get-text-property 0 'org-protected (car lines))) + (insert (pop lines) "\n")) + (and par (insert "

\n"))) (throw 'nextline nil)) ;; Horizontal line @@ -17889,7 +18196,7 @@ lang=\"%s\" xml:lang=\"%s\"> ;; TODO items (if (and (string-match org-todo-line-regexp line) (match-beginning 2)) - (if (equal (match-string 2 line) org-done-string) + (if (member (match-string 2 line) org-done-keywords) (setq line (replace-match "\\2" t nil line 2)) @@ -17912,6 +18219,7 @@ lang=\"%s\" xml:lang=\"%s\"> (pop local-list-num)) (setq local-list-indent nil in-local-list nil)) + (setq first-heading-pos (or first-heading-pos (point))) (org-html-level-start level txt umax (and org-export-with-toc (<= level umax)) head-count) @@ -17952,7 +18260,9 @@ lang=\"%s\" xml:lang=\"%s\"> line (substring line (match-beginning 5))) (unless (string-match "[^ \t]" line) ;; empty line. Pretend indentation is large. - (setq ind (1+ (or (car local-list-indent) 1)))) + (setq ind (if org-empty-line-terminates-plain-lists + 0 + (1+ (or (car local-list-indent) 1))))) (setq didclose nil) (while (and in-local-list (or (and (= ind (car local-list-indent)) @@ -18034,6 +18344,21 @@ lang=\"%s\" xml:lang=\"%s\"> (insert (or (plist-get opt-plist :postamble) "")) (insert "\n\n") (normal-mode) + ;; insert the table of contents + (goto-char (point-min)) + (when thetoc + (if (or (re-search-forward + "

\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*

" nil t) + (re-search-forward + "\\[TABLE-OF-CONTENTS\\]" nil t)) + (progn + (goto-char (match-beginning 0)) + (replace-match "")) + (goto-char first-heading-pos) + (when (looking-at "\\s-*

") + (goto-char (match-end 0)) + (insert "\n"))) + (mapc 'insert thetoc)) ;; remove empty paragraphs and lists (goto-char (point-min)) (while (re-search-forward "

[ \r\n\t]*

" nil t) @@ -18154,16 +18479,6 @@ If yes remove the column and the special lines." (replace-match "|" t t x)))) lines)))) -(defun org-fake-empty-table-line (line) - "Replace everything except \"|\" with spaces." - (let ((i (length line)) - (newstr (copy-sequence line))) - (while (> i 0) - (setq i (1- i)) - (if (not (eq (aref newstr i) ?|)) - (aset newstr i ?\ ))) - newstr)) - (defun org-format-table-table-html (lines) "Format a table generated by table.el into HTML. This conversion does *not* use `table-generate-source' from table.el. @@ -18337,19 +18652,22 @@ stacked delimiters is N. Escaping delimiters is not possible." (defun org-export-html-convert-sub-super (string) "Convert sub- and superscripts in STRING to HTML." - (let (key c) - (while (string-match org-match-substring-regexp string) - (setq key (if (string= (match-string 2 string) "_") "sub" "sup")) - (setq c (or (match-string 8 string) - (match-string 6 string) - (match-string 5 string))) - (setq string (replace-match - (concat (match-string 1 string) - "<" key ">" c "") - t t string))) - (while (string-match "\\\\\\([_^]\\)" string) - (setq string (replace-match (match-string 1 string) t t string)))) - string) + (let (key c (s 0) (requireb (eq org-export-with-sub-superscripts '{}))) + (while (string-match org-match-substring-regexp string s) + (if (and requireb (match-end 8)) + (setq s (match-end 2)) + (setq s (match-end 1) + key (if (string= (match-string 2 string) "_") "sub" "sup") + c (or (match-string 8 string) + (match-string 6 string) + (match-string 5 string)) + string (replace-match + (concat (match-string 1 string) + "<" key ">" c "") + t t string))) + (while (string-match "\\\\\\([_^]\\)" string) + (setq string (replace-match (match-string 1 string) t t string)))) + string)) (defun org-export-html-convert-emphasize (string) "Apply emphasis." @@ -18550,12 +18868,16 @@ END:VEVENT\n" (goto-char (point-min)) (while (re-search-forward org-todo-line-regexp nil t) (setq state (match-string 2)) - (setq status (if (equal state org-done-string) + (setq status (if (member state org-done-keywords) "COMPLETED" "NEEDS-ACTION")) (when (and state - (or (not (equal state org-done-string)) + (or (not (member state org-done-keywords)) (eq org-icalendar-include-todo 'all))) (setq hd (match-string 3)) + (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 (string-match org-priority-regexp hd) (setq pri (string-to-char (match-string 2 hd)) hd (concat (substring hd 0 (match-beginning 1)) @@ -18732,6 +19054,9 @@ The XOXO buffer is named *xoxo-*" (define-key org-mode-map (org-key 'S-left) 'org-shiftleft) (define-key org-mode-map (org-key 'S-right) 'org-shiftright) +(define-key org-mode-map [(control shift right)] 'org-shiftcontrolright) +(define-key org-mode-map [(control shift left)] 'org-shiftcontrolleft) + ;;; Extra keys for tty access. ;; We only set them when really needed because otherwise the ;; menus don't show the simple keys @@ -18777,7 +19102,7 @@ The XOXO buffer is named *xoxo-*" (define-key org-mode-map "\C-c\C-w" 'org-check-deadlines) (define-key org-mode-map "\C-c/" 'org-occur) ; Minor-mode reserved (define-key org-mode-map "\C-c\\" 'org-tags-sparse-tree) ; Minor-mode res. -(define-key org-mode-map "\C-c\C-m" 'org-insert-heading) +(define-key org-mode-map "\C-c\C-m" 'org-ctrl-c-ret) (define-key org-mode-map "\M-\C-m" 'org-insert-heading) (define-key org-mode-map "\C-c\C-x\C-n" 'org-next-link) (define-key org-mode-map "\C-c\C-x\C-p" 'org-previous-link) @@ -18965,7 +19290,8 @@ See the individual commands for more information." (defun org-shiftmetaleft () "Promote subtree or delete table column. -Calls `org-promote-subtree' or `org-table-delete-column', depending on context. +Calls `org-promote-subtree', `org-outdent-item', +or `org-table-delete-column', depending on context. See the individual commands for more information." (interactive) (cond @@ -18976,7 +19302,8 @@ See the individual commands for more information." (defun org-shiftmetaright () "Demote subtree or insert table column. -Calls `org-demote-subtree' or `org-table-insert-column', depending on context. +Calls `org-demote-subtree', `org-indent-item', +or `org-table-insert-column', depending on context. See the individual commands for more information." (interactive) (cond @@ -19060,8 +19387,8 @@ commands for more information." (defun org-shiftup (&optional arg) "Increase item in timestamp or increase priority of current headline. -Calls `org-timestamp-up' or `org-priority-up', depending on context. -See the individual commands for more information." +Calls `org-timestamp-up' or `org-priority-up', or `org-previous-item', +depending on context. See the individual commands for more information." (interactive "P") (cond ((org-at-timestamp-p t) (call-interactively 'org-timestamp-up)) @@ -19071,8 +19398,8 @@ See the individual commands for more information." (defun org-shiftdown (&optional arg) "Decrease item in timestamp or decrease priority of current headline. -Calls `org-timestamp-down' or `org-priority-down', depending on context. -See the individual commands for more information." +Calls `org-timestamp-down' or `org-priority-down', or `org-next-item' +depending on context. See the individual commands for more information." (interactive "P") (cond ((org-at-timestamp-p t) (call-interactively 'org-timestamp-down)) @@ -19095,6 +19422,27 @@ See the individual commands for more information." ((org-on-heading-p) (org-call-with-arg 'org-todo 'left)) (t (org-shiftcursor-error)))) +(defun org-shiftcontrolright () + "Switch to next TODO set." + (interactive) + (cond + ((org-on-heading-p) (org-call-with-arg 'org-todo 'nextset)) + (t (org-shiftcursor-error)))) + +(defun org-shiftcontrolleft () + "Switch to previous TODO set." + (interactive) + (cond + ((org-on-heading-p) (org-call-with-arg 'org-todo 'previousset)) + (t (org-shiftcursor-error)))) + +(defun org-ctrl-c-ret () + "Call `org-table-hline-and-move' or `org-insert-heading' dep. on context." + (interactive) + (cond + ((org-at-table-p) (call-interactively 'org-table-hline-and-move)) + (t (call-interactively 'org-insert-heading)))) + (defun org-copy-special () "Copy region in table or copy current subtree. Calls `org-table-copy' or `org-copy-subtree', depending on context. @@ -19390,7 +19738,7 @@ See the individual commands for more information." ["Record DONE time" (progn (setq org-log-done (not org-log-done)) (message "Switching to %s will %s record a timestamp" - org-done-string + (car org-done-keywords) (if org-log-done "automatically" "not"))) :style toggle :selected org-log-done]) "--" @@ -19442,15 +19790,6 @@ 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." @@ -19604,6 +19943,7 @@ and :keyword." (setq clist (nreverse (delq nil clist))) clist)) +;; FIXME Compare with at-regexp-p (defun org-in-regexp (re &optional nlines visually) "Check if point is inside a match of regexp. Normally only the current line is checked, but you can include NLINES extra @@ -19621,6 +19961,24 @@ really on, so that the block visually is on the match." (>= (+ inc (match-end 0)) pos)) (throw 'exit (cons (match-beginning 0) (match-end 0))))))))) +(defun org-at-regexp-p (regexp) + "Is point inside a match of REGEXP in the current line?" + (catch 'exit + (save-excursion + (let ((pos (point)) (end (point-at-eol))) + (beginning-of-line 1) + (while (re-search-forward regexp end t) + (if (and (<= (match-beginning 0) pos) + (>= (match-end 0) pos)) + (throw 'exit t))) + nil)))) + +(defun org-delete-all (elts list) + "Remove all elements in ELTS from LIST." + (while elts + (setq list (delete (pop elts) list))) + list) + (defun org-point-in-group (point group &optional context) "Check if POINT is in match-group GROUP. If CONTEXT is non-nil, return a list with CONTEXT and the boundaries of the @@ -19700,24 +20058,31 @@ Counting starts at 1." (setq c (1+ c))) (nreverse rtn))) -(defun org-at-regexp-p (regexp) - "Is point inside a match of REGEXP in the current line?" - (catch 'exit - (save-excursion - (let ((pos (point)) (end (point-at-eol))) - (beginning-of-line 1) - (while (re-search-forward regexp end t) - (if (and (<= (match-beginning 0) pos) - (>= (match-end 0) pos)) - (throw 'exit t))) - nil)))) - (defun org-find-base-buffer-visiting (file) "Like `find-buffer-visiting' but alway return the base buffer and not an indirect buffer" (let ((buf (find-buffer-visiting file))) (or (buffer-base-buffer buf) buf))) +(defun org-image-file-name-regexp () + "Return regexp matching the file names of images." + (if (fboundp 'image-file-name-regexp) + (image-file-name-regexp) + (let ((image-file-name-extensions + '("png" "jpeg" "jpg" "gif" "tiff" "tif" + "xbm" "xpm" "pbm" "pgm" "ppm"))) + (concat "\\." + (regexp-opt (nconc (mapcar 'upcase + image-file-name-extensions) + image-file-name-extensions) + 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))) + ;;; Paragraph filling stuff. ;; We want this to be just right, so use the full arsenal. @@ -19791,27 +20156,6 @@ work correctly." (make-string (- (match-end 0) (match-beginning 0)) ?\ )) (t nil))) - -;; FIXME: these 2 functions are not in the right place. -(defun org-image-file-name-regexp () - "Return regexp matching the file names of images." - (if (fboundp 'image-file-name-regexp) - (image-file-name-regexp) - (let ((image-file-name-extensions - '("png" "jpeg" "jpg" "gif" "tiff" "tif" - "xbm" "xpm" "pbm" "pgm" "ppm"))) - (concat "\\." - (regexp-opt (nconc (mapcar 'upcase - image-file-name-extensions) - image-file-name-extensions) - 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 @@ -19985,7 +20329,13 @@ Show the heading too, if it is currently invisible." (remove-hook 'post-command-hook 'org-isearch-post-command 'local) (org-show-context 'isearch)) -;;;; Repair problems with some other packages + +;;;; Address problems with some other packages + +;; Make flyspell not check words in links, to not mess up our keymap +(defun org-mode-flyspell-verify () + "Don't let flyspell put overlays at active buttons." + (not (get-text-property (point) 'keymap))) ;; Make `bookmark-jump' show the jump location if it was hidden. (eval-after-load "bookmark" @@ -20011,179 +20361,6 @@ Show the heading too, if it is currently invisible." ;;;; Experimental code -(defun org-table-formula-to-user (s) - "Convert a formula from internal to user representation." - (if (eq org-table-use-standard-references t) - (org-table-convert-refs-to-an s) - s)) - -(defun org-table-formula-from-user (s) - "Convert a formula from user to internal representation." - (if org-table-use-standard-references - (org-table-convert-refs-to-rc s) - s)) - -(defun org-table-convert-refs-to-rc (s) - "Convert spreadsheet references from AB7 to @7$28. -Works for single references, but also for entire formulas and even the -full TBLFM line." - (let ((start 0)) - (while (string-match "\\<\\([a-zA-Z]+\\)\\([0-9]+\\>\\|&\\)\\|\\(;[^\r\n:]+\\)" s start) - (if (match-end 3) - ;; format match, just advance - (setq start (match-end 0)) - (setq start (match-beginning 0) - s (replace-match - (if (equal (match-string 2 s) "&") - (format "$%d" (org-letters-to-number (match-string 1 s))) - (format "@%d$%d" - (string-to-number (match-string 2 s)) - (org-letters-to-number (match-string 1 s)))) - t t s)))) - s)) - -(defun org-table-convert-refs-to-an (s) - "Convert spreadsheet references from to @7$28 to AB7. -Works for single references, but also for entire formulas and even the -full TBLFM line." - (while (string-match "@\\([0-9]+\\)$\\([0-9]+\\)" s) - (setq s (replace-match - (format "%s%d" - (org-number-to-letters - (string-to-number (match-string 2 s))) - (string-to-number (match-string 1 s))) - t t s))) - (while (string-match "\\(^\\|[^0-9a-zA-Z]\\)\\$\\([0-9]+\\)" s) - (setq s (replace-match (concat "\\1" - (org-number-to-letters - (string-to-number (match-string 2 s))) "&") - t nil s))) - s) - -(defun org-letters-to-number (s) - "Convert a base 26 number represented by letters into an integer. -For example: AB -> 28." - (let ((n 0)) - (setq s (upcase s)) - (while (> (length s) 0) - (setq n (+ (* n 26) (string-to-char s) (- ?A) 1) - s (substring s 1))) - n)) - -(defun org-number-to-letters (n) - "Convert an integer into a base 26 number represented by letters. -For example: 28 -> AB." - (let ((s "")) - (while (> n 0) - (setq s (concat (char-to-string (+ (mod (1- n) 26) ?A)) s) - n (/ (1- n) 26))) - s)) - -(defun org-table-fedit-convert-buffer (function) - "Convert all references in this buffer, using FUNTION." - (let ((line (org-current-line))) - (goto-char (point-min)) - (while (not (eobp)) - (insert (funcall function (buffer-substring (point) (point-at-eol)))) - (delete-region (point) (point-at-eol)) - (or (eobp) (forward-char 1))) - (goto-line line))) - -(defvar org-table-buffer-is-an nil) - -(defun org-table-fedit-toggle-ref-type () - "Convert all references in the buffer from B3 to @3$2 and back." - (interactive) - (org-set-local 'org-table-buffer-is-an (not org-table-buffer-is-an)) - (org-table-fedit-convert-buffer - (if org-table-buffer-is-an - 'org-table-convert-refs-to-an 'org-table-convert-refs-to-rc)) - (message "Reference type switched to %s" - (if org-table-buffer-is-an "A1 etc" "@row$column"))) - -(defun org-table-fedit-ref-up () - "Shift the reference at point one row/hline up." - (interactive) - (org-table-fedit-shift-reference 'up)) -(defun org-table-fedit-ref-down () - "Shift the reference at point one row/hline down." - (interactive) - (org-table-fedit-shift-reference 'down)) -(defun org-table-fedit-ref-left () - "Shift the reference at point one field to the left." - (interactive) - (org-table-fedit-shift-reference 'left)) -(defun org-table-fedit-ref-right () - "Shift the reference at point one field to the right." - (interactive) - (org-table-fedit-shift-reference 'right)) - -(defun org-table-fedit-shift-reference (dir) - (cond - ((org-at-regexp-p "\\(\\<[a-zA-Z]\\)&") - (if (memq dir '(left right)) - (org-rematch-and-replace 1 (eq dir 'left)) - (error "Cannot shift reference in this direction"))) - ((org-at-regexp-p "\\(\\<[a-zA-Z]\\{1,2\\}\\)\\([0-9]+\\)") - ;; A B3-like reference - (if (memq dir '(up down)) - (org-rematch-and-replace 2 (eq dir 'up)) - (org-rematch-and-replace 1 (eq dir 'left)))) - ((org-at-regexp-p - "\\(@\\|\\.\\.\\)\\([-+]?\\(I+\\>\\|[0-9]+\\)\\)\\(\\$\\([-+]?[0-9]+\\)\\)?") - ;; An internal reference - (if (memq dir '(up down)) - (org-rematch-and-replace 2 (eq dir 'up) (match-end 3)) - (org-rematch-and-replace 5 (eq dir 'left)))))) - -(defun org-rematch-and-replace (n &optional decr hline) - "Re-match the group N, and replace it with the shifted refrence." - (or (match-end n) (error "Cannot shift reference in this direction")) - (goto-char (match-beginning n)) - (and (looking-at (regexp-quote (match-string n))) - (replace-match (org-shift-refpart (match-string 0) decr hline) - t t))) - -(defun org-shift-refpart (ref &optional decr hline) - "Shift a refrence part REF. -If DECR is set, decrease the references row/column, else increase. -If HLINE is set, this may be a hline reference, it certainly is not -a translation reference." - (save-match-data - (let* ((sign (string-match "^[-+]" ref)) n) - - (if sign (setq sign (substring ref 0 1) ref (substring ref 1))) - (cond - ((and hline (string-match "^I+" ref)) - (setq n (string-to-number (concat sign (number-to-string (length ref))))) - (setq n (+ n (if decr -1 1))) - (if (= n 0) (setq n (+ n (if decr -1 1)))) - (if sign - (setq sign (if (< n 0) "-" "+") n (abs n)) - (setq n (max 1 n))) - (concat sign (make-string n ?I))) - - ((string-match "^[0-9]+" ref) - (setq n (string-to-number (concat sign ref))) - (setq n (+ n (if decr -1 1))) - (if sign - (concat (if (< n 0) "-" "+") (number-to-string (abs n))) - (number-to-string (max 1 n)))) - - ((string-match "^[a-zA-Z]+" ref) - (org-number-to-letters - (max 1 (+ (org-letters-to-number ref) (if decr -1 1))))) - - (t (error "Cannot shift reference")))))) - -(defun org-table-fedit-toggle-coordinates () - "Toggle the display of coordinates in the refrenced table." - (interactive) - (let ((pos (marker-position org-pos))) - (with-current-buffer (marker-buffer org-pos) - (save-excursion - (goto-char pos) - (org-table-toggle-coordinate-overlays))))) ;;;; Finish up diff --git a/org.pdf b/org.pdf index ea47878cf..f3a055ca1 100644 Binary files a/org.pdf and b/org.pdf differ diff --git a/org.texi b/org.texi index 1f7d44de6..faa54fd53 100644 --- a/org.texi +++ b/org.texi @@ -3,7 +3,7 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 4.68 +@set VERSION 4.69 @set DATE March 2007 @dircategory Emacs @@ -170,6 +170,7 @@ Extended use of TODO keywords * Workflow states:: From TODO to DONE in steps * TODO types:: I do this, Fred the rest * Per file keywords:: Different files, different requirements +* Multiple sets in one file:: Mixing it all, and still finding your way Timestamps @@ -252,6 +253,7 @@ HTML export Text interpretation by the exporter * Comment lines:: Some lines will not be exported +* Initial text:: Text before the first headline * Enhancing text:: Subscripts, symbols and more * Export options:: How to influence the export settings @@ -979,14 +981,17 @@ bullet, lines must be indented or they will be seen as top-level headlines. Also, when you are hiding leading stars to get a clean outline view, plain list items starting with a star are visually indistinguishable from true headlines. In short: even though @samp{*} -is supported, it may be better not to use it for plain list items} as +is supported, it may be better not to use it for plain list items.} as bullets. Ordered list items start with @samp{1.} or @samp{1)}. Items belonging to the same list must have the same indentation on the first line. In particular, if an ordered list reaches number @samp{10.}, then the 2--digit numbers must be written left-aligned with the other numbers in the list. Indentation also determines the end of a list item. It ends before the next line that is indented like the bullet/number, or -less. For example: +less. Empty lines are part of the previous item, so you can have +several paragraphs in one item. If you would like an emtpy line to +terminate all currently open plain lists, configure the variable +@code{org-empty-line-terminates-plain-lists}. Here is an for example: @example @group @@ -1140,16 +1145,16 @@ table. But it's easier just to start typing, like @kindex C-c C-c @item C-c C-c Re-align the table without moving the cursor. - +@c @kindex @key{TAB} @item @key{TAB} Re-align the table, move to the next field. Creates a new row if necessary. - +@c @kindex S-@key{TAB} @item S-@key{TAB} Re-align, move to previous field. - +@c @kindex @key{RET} @item @key{RET} Re-align the table and move down to next row. Creates a new row if @@ -1162,34 +1167,34 @@ NEWLINE, so it can be used to split a table. @item M-@key{left} @itemx M-@key{right} Move the current column left/right. - +@c @kindex M-S-@key{left} @item M-S-@key{left} Kill the current column. - +@c @kindex M-S-@key{right} @item M-S-@key{right} Insert a new column to the left of the cursor position. - +@c @kindex M-@key{up} @kindex M-@key{down} @item M-@key{up} @itemx M-@key{down} Move the current row up/down. - +@c @kindex M-S-@key{up} @item M-S-@key{up} Kill the current row or horizontal line. - +@c @kindex M-S-@key{down} @item M-S-@key{down} Insert a new row above (with arg: below) the current row. - +@c @kindex C-c - @item C-c - Insert a horizontal line below current row. With prefix arg, the line is created above the current line. - +@c @kindex C-c ^ @item C-c ^ Sort the table lines in the region. The position of point indicates the @@ -1208,10 +1213,12 @@ argument, alphabetic sorting will be case-sensitive. Copy a rectangular region from a table to a special clipboard. Point and mark determine edge fields of the rectangle. The process ignores horizontal separator lines. +@c @kindex C-c C-x C-w @item C-c C-x C-w Copy a rectangular region from a table to a special clipboard, and blank all fields in the rectangle. So this is the ``cut'' operation. +@c @kindex C-c C-x C-y @item C-c C-x C-y Paste a rectangular region into a table. @@ -1219,6 +1226,7 @@ The upper right corner ends up in the current field. All involved fields will be overwritten. If the rectangle does not fit into the present table, the table is enlarged as needed. The process ignores horizontal separator lines. +@c @kindex C-c C-q @item C-c C-q Wrap several fields in a column like a paragraph. If there is an active @@ -1234,7 +1242,6 @@ above. @tsubheading{Calculations} @cindex formula, in tables @cindex calculations, in tables - @cindex region, active @cindex active region @cindex transient-mark-mode @@ -1243,7 +1250,7 @@ above. Sum the numbers in the current column, or in the rectangle defined by the active region. The result is shown in the echo area and can be inserted with @kbd{C-y}. - +@c @kindex S-@key{RET} @item S-@key{RET} When current field is empty, copy from first non-empty field above. @@ -1260,12 +1267,12 @@ Edit the current field in a separate window. This is useful for fields that are not fully visible (@pxref{Narrow columns}). When called with a @kbd{C-u} prefix, just make the full field visible, so that it can be edited in place. - +@c @kindex C-c @key{TAB} @item C-c @key{TAB} This is an alias for @kbd{C-u C-c `} to make the current field fully visible. - +@c @item M-x org-table-import Import a file as a table. The table should be TAB- or whitespace separated. Useful, for example, to import an Excel table or data from a @@ -1273,11 +1280,10 @@ database, because these programs generally can write TAB-separated text files. This command works by inserting the file into the buffer and then converting the region to a table. Any prefix argument is passed on to the converter, which uses it to determine the separator. - +@c @item M-x org-table-export Export the table as a TAB-separated file. Useful for data exchange with, for example, Excel or database programs. - @end table If you don't like the automatic table editor because it gets in your @@ -1491,7 +1497,9 @@ values of constants in two different unit systems, @code{SI} and @code{constants-unit-system}. You can use the @code{#+STARTUP} options @code{constSI} and @code{constcgs} to set this value for the current buffer.}. Column names and parameters can be specified in special table -lines. These are described below, see @ref{Advanced features}. +lines. These are described below, see @ref{Advanced features}. All +names must start with a letter, and further consist of letters and +numbers. @node Formula syntax for Calc, Formula syntax for Lisp, References, The spreadsheet @subsection Formula syntax for Calc @@ -1777,14 +1785,14 @@ following commands: @item C-c * Recalculate the current row by first applying the stored column formulas from left to right, and all field formulas in the current row. - +@c @kindex C-u C-c * @item C-u C-c * @kindex C-u C-c C-c @itemx C-u C-c C-c Recompute the entire table, line by line. Any lines before the first hline are left alone, assuming that these are part of the table header. - +@c @kindex C-u C-u C-c * @item C-u C-u C-c * Iterate the table by recomputing it until no further changes occur. @@ -2106,7 +2114,7 @@ automatically created link is not working correctly or accurately enough, you can write custom functions to select the search string and to do the search for particular file types - see @ref{Custom searches}. The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation}. - +@c @kindex C-c C-l @cindex link completion @cindex completion, of links @@ -2128,12 +2136,12 @@ insert a link. Links in Org-mode are plain text, and you can type or paste them straight into the buffer. By using this command, the links are automatically enclosed in double brackets, and you will be asked for the optional descriptive text. - +@c @c If the link is a @samp{file:} link and @c the linked file is located in the same directory as the current file or @c a subdirectory of it, the path of the file will be inserted relative to @c the current directory. - +@c @kindex C-u C-c C-l @cindex file name completion @cindex completion, of file names @@ -2146,11 +2154,11 @@ directory or in a subdirectory of it, or if the path is written relative to the current directory using @samp{../}. Otherwise an absolute path is used, if possible with @samp{~/} for your home directory. You can force an absolute path with two @kbd{C-u} prefixes. - -@item C-c C-l @r{with cursor on existing link} +@c +@item C-c C-l @r{(with cursor on existing link)} When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the link and description parts of the link. - +@c @cindex following links @kindex C-c C-o @item C-c C-o @@ -2166,26 +2174,26 @@ suitable application for local non-text files. Classification of files is based on file extension only. See option @code{org-file-apps}. If you want to override the default application and visit the file with Emacs, use a @kbd{C-u} prefix. - +@c @kindex mouse-2 @kindex mouse-1 @item mouse-2 @itemx mouse-1 On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o} would. Under Emacs 22, also @kbd{mouse-1} will follow a link. - +@c @kindex mouse-3 @item mouse-3 Like @kbd{mouse-2}, but force file links to be opened with Emacs, and internal links to be displayed in another window@footnote{See the variable @code{org-display-internal-link-with-indirect-buffer}}. - +@c @cindex mark ring @kindex C-c % @item C-c % Push the current position onto the mark ring, to be able to return easily. Commands following an internal link do this automatically. - +@c @cindex links, returning to @kindex C-c & @item C-c & @@ -2193,7 +2201,7 @@ Jump back to a recorded position. A position is recorded by the commands following internal links, and by @kbd{C-c %}. Using this command several times in direct succession moves through a ring of previously recorded positions. - +@c @kindex C-c C-x C-n @kindex C-c C-x C-p @cindex links, finding next/previous @@ -2571,7 +2579,6 @@ the TODO entries directly from that buffer (@pxref{Agenda commands}). @c agenda, customize the variable @code{org-agenda-include-all-todo}. @end table - @node TODO extensions, Priorities, TODO basics, TODO items @section Extended use of TODO keywords @cindex extended TODO keywords @@ -2589,6 +2596,7 @@ TODO items in particular (@pxref{Tags}). * Workflow states:: From TODO to DONE in steps * TODO types:: I do this, Fred the rest * Per file keywords:: Different files, different requirements +* Multiple sets in one file:: Mixing it all, and still finding your way @end menu @node Workflow states, TODO types, TODO extensions, TODO extensions @@ -2651,7 +2659,7 @@ Lucy's items from all agenda files into a single buffer, you would use the prefix arg as well when creating the global todo list: @kbd{C-3 C-c t}. -@node Per file keywords, , TODO types, TODO extensions +@node Per file keywords, Multiple sets in one file, TODO types, TODO extensions @subsection Setting up TODO keywords for individual files @cindex keyword options @cindex per file keywords @@ -2676,24 +2684,52 @@ anywhere in the file: @cindex DONE, final TODO keyword Remember that the last keyword must always mean that the item is DONE -(although you may use a different word). Also note that in each file, -only one of the two aspects of TODO keywords can be used. After -changing one of these lines, use @kbd{C-c C-c} with the cursor still -in the line to make the changes known to Org-mode@footnote{Org-mode -parses these lines only when Org-mode is activated after visiting a -file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+} -is simply restarting Org-mode for the current buffer.}. +(although you may use a different word). After changing one of these +lines, use @kbd{C-c C-c} with the cursor still in the line to make the +changes known to Org-mode@footnote{Org-mode parses these lines only when +Org-mode is activated after visiting a file. @kbd{C-c C-c} with the +cursor in a line starting with @samp{#+} is simply restarting Org-mode +for the current buffer.}. -If you want to use very many keywords, for example when working with a -large group of people, you may split the names over several lines: +@node Multiple sets in one file, , Per file keywords, TODO extensions +@subsection Multiple TODO keyword sets in one file +@cindex todo keyword sets + +Sometimes you may want to use different sets of TODO keywords in the +same file. For example, you may want to have the basic +@code{TODO}/@code{DONE}, but also a workflow for bug fixing. Your setup +would then look like this: @example -#+TYP_TODO: Fred Sara Lucy Mike -#+TYP_TODO: Luis George Jules Jessica -#+TYP_TODO: Kim Arnold Peter -#+TYP_TODO: DONE +#+SEQ_TODO: TODO DONE +#+SEQ_TODO: REPORT BUG KNOWNCAUSE RESOLVED @end example +The keywords should all be different, this helps Org-mode to keep track +of which subsequence should be used for a given entry. In this setup, +@kbd{C-c C-t} only operates within a subsequence, so it switches from +@code{DONE} to (nothing) to @code{TODO}, and from @code{RESOLVED} to +(nothing) to @code{REPORT}. Therefore you need a mechanism to initially +select the correct sequence. Besides the obvious ways like typing a +keyword or using completion, you may also apply the following commands: + +@table @kbd +@kindex S-@key{right} +@kindex S-@key{left} +@item S-@key{right} +@itemx S-@key{left} +@kbd{S-@key{}} and @kbd{S-@key{}} and walk through all +keywords from all sets, so for example @kbd{S-@key{}} would +switch from @code{DONE} to @code{REPORT} in the example above. +@kindex C-S-@key{right} +@kindex C-S-@key{left} +@item C-S-@key{right} +@itemx C-S-@key{left} +These key jump from one TODO subset to the next. So +@kbd{C-S-@key{right}} would jump from @code{TODO} to @code{REPORT} and +from @code{KNOWNCAUSE} to @code{TODO} in the above example. +@end table + @node Priorities, Breaking down tasks, TODO extensions, TODO items @section Priorities @cindex priorities @@ -2721,7 +2757,7 @@ priority character @samp{A}, @samp{B} or @samp{C}. When you press @key{SPC} instead, the priority cookie is removed from the headline. The priorities can also be changed ``remotely'' from the timeline and agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). - +@c @kindex S-@key{up} @kindex S-@key{down} @item S-@key{up} @@ -2947,39 +2983,39 @@ format. Prompt for a date and insert a corresponding time stamp. When the cursor is at a previously used time stamp, it is updated to NOW. When this command is used twice in succession, a time range is inserted. - +@c @kindex C-u C-c . @item C-u C-c . Like @kbd{C-c .}, but use the alternative format which contains date and time. The default time can be rounded to multiples of 5 minutes, see the option @code{org-time-stamp-rounding-minutes}. - +@c @kindex C-c ! @item C-c ! Like @kbd{C-c .}, but insert an inactive time stamp that will not cause an agenda entry. - +@c @kindex C-c < @item C-c < Insert a time stamp corresponding to the cursor date in the Calendar. - +@c @kindex C-c > @item C-c > Access the Emacs calendar for the current date. If there is a timestamp in the current line, goto the corresponding date instead. - +@c @kindex C-c C-o @item C-c C-o Access the agenda for the date given by the time stamp or -range at point (@pxref{Weekly/Daily agenda}). - +@c @kindex C-c C-d @item C-c C-d Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen in the line directly following the headline. @c FIXME Any CLOSED timestamp will be removed.???????? - +@c @kindex C-c C-w @cindex sparse tree, for deadlines @item C-c C-w @@ -2988,20 +3024,20 @@ which will become due within @code{org-deadline-warning-days}. With @kbd{C-u} prefix, show all deadlines in the file. With a numeric prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows all deadlines due tomorrow. - +@c @kindex C-c C-s @item C-c C-s Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will happen in the line directly following the headline. Any CLOSED timestamp will be removed. - +@c @kindex S-@key{left} @kindex S-@key{right} @item S-@key{left} @itemx S-@key{right} Change date at cursor by one day. These key bindings conflict with CUA-mode (@pxref{Conflicts}). - +@c @kindex S-@key{up} @kindex S-@key{down} @item S-@key{up} @@ -3011,8 +3047,7 @@ year, month, day, hour or minute. Note that if the cursor is in a headline and not at a time stamp, these same keys modify the priority of an item. (@pxref{Priorities}). The key bindings also conflict with CUA-mode (@pxref{Conflicts}). - - +@c @kindex C-c C-y @cindex evaluate time range @item C-c C-y @@ -3179,6 +3214,8 @@ agenda, you will not find past and future instances, only the current one will show up. Use a cyclic diary entry if you need all past and future instances to be visible in the agenda. +@c FIXME: Document that a note is always being taken. + @node Progress logging, , Repeating items, Timestamps @section Progress Logging @cindex progress logging @@ -4079,11 +4116,11 @@ Previous line (same as @key{down}). @item mouse-3 @itemx @key{SPC} Display the original location of the item in another window. - +@c @kindex L @item L Display original location and recenter that window. - +@c @kindex mouse-2 @kindex mouse-1 @kindex @key{TAB} @@ -4092,11 +4129,11 @@ Display original location and recenter that window. @itemx @key{TAB} Go to the original location of the item in another window. Under Emacs 22, @kbd{mouse-1} will also works for this. - +@c @kindex @key{RET} @itemx @key{RET} Go to the original location of the item and delete other windows. - +@c @kindex f @item f Toggle Follow mode. In Follow mode, as you move the cursor through @@ -4104,14 +4141,14 @@ the agenda buffer, the other window always shows the corresponding location in the org file. The initial setting for this mode in new agenda buffers can be set with the variable @code{org-agenda-start-with-follow-mode}. - +@c @kindex b @item b Display the entire subtree of the current item in an indirect buffer. With numerical prefix ARG, go up to this level and then take that tree. If ARG is negative, go up that many levels. With @kbd{C-u} prefix, do not remove the previously used indirect buffer. - +@c @kindex l @item l Toggle Logbook mode. In Logbook mode, entries that where marked DONE while @@ -4123,24 +4160,24 @@ as are entries that have been clocked on that day. @kindex o @item o Delete other windows. - +@c @kindex w @item w Switch to weekly view (7 days displayed together). - +@c @kindex d @item d Switch to daily view (just one day displayed). - +@c @kindex D @item D Toggle the inclusion of diary entries. See @ref{Weekly/Daily agenda}. - +@c @kindex g @item g Toggle the time grid on and off. See also the variables @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. - +@c @kindex r @item r Recreate the agenda buffer, for example to reflect the changes @@ -4148,21 +4185,21 @@ after modification of the time stamps of items with S-@key{left} and S-@key{right}. When the buffer is the global todo list, a prefix argument is interpreted to create a selective list for a specific TODO keyword. - +@c @kindex s @item s Save all Org-mode buffers in the current Emacs session. - +@c @kindex @key{right} @item @key{right} Display the following @code{org-agenda-ndays} days. For example, if the display covers a week, switch to the following week. With prefix arg, go forward that many times @code{org-agenda-ndays} days. - +@c @kindex @key{left} @item @key{left} Display the previous dates. - +@c @kindex . @item . Goto today. @@ -4172,53 +4209,53 @@ Goto today. @item 0-9 Digit argument. - +@c @cindex undoing remote-editing events @cindex remote editing, undo @kindex C-_ @item C-_ Undo a change due to a remote editing command. The change is undone both in the agenda buffer and in the remote buffer. - +@c @kindex t @item t Change the TODO state of the item, both in the agenda and in the original org file. - +@c @kindex C-k @item C-k Delete the current agenda item along with the entire subtree belonging to it in the original Org-mode file. If the text to be deleted remotely is longer than one line, the kill needs to be confirmed by the user. See variable @code{org-agenda-confirm-kill}. - +@c @kindex $ @item $ Archive the subtree corresponding to the current headline. - +@c @kindex T @item T Show all tags associated with the current item. Because of inheritance, this may be more than the tags listed in the line itself. - +@c @kindex : @item : Set tags for the current headline. - +@c @kindex a @item a Toggle the ARCHIVE tag for the current headline. - +@c @kindex , @item , Set the priority for the current item. Org-mode prompts for the priority character. If you reply with @key{SPC}, the priority cookie is removed from the entry. - +@c @kindex P @item P Display weighted priority of current item. - +@c @kindex + @kindex S-@key{up} @item + @@ -4226,21 +4263,21 @@ Display weighted priority of current item. Increase the priority of the current item. The priority is changed in the original buffer, but the agenda is not resorted. Use the @kbd{r} key for this. - +@c @kindex - @kindex S-@key{down} @item - @itemx S-@key{down} Decrease the priority of the current item. - +@c @kindex C-c C-s @item C-c C-s Schedule this item - +@c @kindex C-c C-d @item C-c C-d Set a deadline for this item. - +@c @kindex S-@key{right} @item S-@key{right} Change the time stamp associated with the current line by one day into @@ -4249,25 +4286,27 @@ example, @kbd{3 6 5 S-@key{right}} will change it by a year. The stamp is changed in the original org file, but the change is not directly reflected in the agenda buffer. Use the @kbd{r} key to update the buffer. - +@c @kindex S-@key{left} @item S-@key{left} Change the time stamp associated with the current line by one day into the past. - +@c @kindex > @item > Change the time stamp associated with the current line to today. The key @kbd{>} has been chosen, because it is the same as @kbd{S-.} on my keyboard. - +@c @kindex I @item I Start the clock on the current item. If a clock is running already, it is stopped first. +@c @kindex O @item O Stop the previously started clock. +@c @kindex X @item X Cancel the currently running clock. @@ -4277,11 +4316,11 @@ Cancel the currently running clock. @kindex c @item c Open the Emacs calendar and move to the date at the agenda cursor. - +@c @item c When in the calendar, compute and show the Org-mode agenda for the date at the cursor. - +@c @cindex diary entries, creating from agenda @kindex i @item i @@ -4289,25 +4328,25 @@ Insert a new entry into the diary. Prompts for the type of entry (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new entry in the diary, just as @kbd{i d} etc. would do in the calendar. The date is taken from the cursor position. - +@c @kindex M @item M Show the phases of the moon for the three months around current date. - +@c @kindex S @item S Show sunrise and sunset times. The geographical location must be set with calendar variables, see documentation of the Emacs calendar. - +@c @kindex C @item C Convert the date at cursor into many other cultural and historic calendars. - +@c @kindex H @item H Show holidays for three month around the cursor date. - +@c @c FIXME: This should be a different key. @kindex C-c C-x C-c @item C-c C-x C-c @@ -4317,14 +4356,13 @@ Export a single iCalendar file containing entries from all agenda files. @kindex q @item q Quit agenda, remove the agenda buffer. - +@c @kindex x @cindex agenda files, removing buffers @item x Exit agenda, remove the agenda buffer and all buffers loaded by Emacs for the compilation of the agenda. Buffers created by the user to visit org files will not be removed. - @end table @@ -5023,19 +5061,19 @@ in order to produce better output. @menu * Comment lines:: Some lines will not be exported +* Initial text:: Text before the first headline * Enhancing text:: Subscripts, symbols and more * Export options:: How to influence the export settings @end menu -@node Comment lines, Enhancing text, Text interpretation, Text interpretation +@node Comment lines, Initial text, Text interpretation, Text interpretation @subsection Comment lines @cindex comment lines @cindex exporting, not Lines starting with @samp{#} in column zero are treated as comments and will never be exported. Also entire subtrees starting with the -word @samp{COMMENT} will never be exported. Finally, any text before -the first headline will not be exported either. +word @samp{COMMENT} will never be exported. @table @kbd @kindex C-c ; @@ -5043,7 +5081,44 @@ the first headline will not be exported either. Toggle the COMMENT keyword at the beginning of an entry. @end table -@node Enhancing text, Export options, Comment lines, Text interpretation +@node Initial text, Enhancing text, Comment lines, Text interpretation +@subsection Text before the first headline + +Org-mode normally ignores any text before the first headline when +exporting, because this region is often used for internal links to speed +up navigation etc. However, there are occasions when you might want to +have some text before the first headline, like a small intorduction, +special HTML code with a navigation bar, etc. You can ask to have this +part of the file exported as well by setting the variable +@code{org-export-skip-text-before-1st-heading} to @code{nil}. On a +per-file basis, you can get the same effect with + +@example +#+OPTIONS: skip:nil +@end example + +The text before the first headline will be fully processed +(@pxref{Enhancing text}). If you need to include literal HTML, use the +special constructs described in @ref{Quoting HTML tags}. The table of +contents is normally inserted directly before the first headline of the +file. If you would like to get it to a different location, insert +the string @code{[TABLE-OF-CONTENTS]} on a line by itself at the desired +location. + +Finally, if you want to use the space before the first headline for +internal purposes, but @emph{still} want to place something before the +first headline when exporting the file, you can use the @code{#+TEXT} +construct: + +@example +#+OPTIONS: skip:t +#+TEXT: This text will go before the *first* headline. +#+TEXT: We place the table of contents here: +#+TEXT: [TABLE-OF-CONTENTS] +#+TEXT: This goes between the table of contents and the first headline +@end example + +@node Enhancing text, Export options, Initial text, Text interpretation @subsection Enhancing text for export @cindex enhancing text @cindex richer text @@ -5105,7 +5180,7 @@ this position. @end itemize If these conversions conflict with your habits of typing ASCII text, -they can all be turned off with corresponding variables (see the +they can all be turned off with corresponding variables. See the customization group @code{org-export-general}, and the following section which explains how to set export options with special lines in a buffer. @@ -5136,7 +5211,7 @@ Insert template with export options, see example below. #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language}) #+TEXT: Some descriptive text to be inserted at the beginning. #+TEXT: Several lines may be given. -#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t *:nil TeX:t LaTeX:t +#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t *:nil TeX:t LaTeX:t skip:t @end example @noindent @@ -5161,10 +5236,13 @@ toc: @r{turn on/off table of contents, or set level limit (integer)} @@: @r{turn on/off quoted HTML tags} :: @r{turn on/off fixed-width sections} |: @r{turn on/off tables} -^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.} +^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts. If} + @r{you write "^:@{@}", @code{a_@{b@}} will be interpreted, but} + @r{the simple @code{a_b} will be left as it is.} *: @r{turn on/off emphasized text (bold, italic, underlined)} TeX: @r{turn on/off simple @TeX{} macros in plain text} LaTeX: @r{turn on/off La@TeX{} fragments} +skip: @r{turn on/off skipping the text before the first heading} @end example @node Publishing, Miscellaneous, Exporting, Top @@ -5943,7 +6021,7 @@ to execute Org-mode-related commands, leave the table. @item C-c C-c Recognize @file{table.el} table. Works when the cursor is in a table.el table. - +@c @kindex C-c ~ @item C-c ~ Insert a table.el table. If there is already a table at point, this @@ -6546,13 +6624,14 @@ translated David O'Toole's tutorial into French. @item @i{Kai Grossjohann} pointed out key-binding conflicts with other packages. @item -@i{Shidai Liu} (``Leo'') provided extensive feedback and some patches. -@item -@i{Leon Liu} asked for embedded LaTeX and tested it. +@i{Shidai Liu} ("Leo") asked for embedded LaTeX and tested it. He also +provided frequent feedback and some patches. @item @i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler happy. @item +@i{Rick Moynihan} proposed to allow multiple TODO sequences in a file. +@item @i{Todd Neal} provided patches for links to Info files and elisp forms. @item @i{Tim O'Callaghan} suggested in-file links, search options for general diff --git a/orgcard.pdf b/orgcard.pdf index a6ad811f1..cb8f25b1a 100644 Binary files a/orgcard.pdf and b/orgcard.pdf differ diff --git a/orgcard.tex b/orgcard.tex index 1d7723cee..c63364aad 100644 --- a/orgcard.tex +++ b/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.68} +\def\orgversionnumber{4.69} \def\versionyear{2007} % latest update \def\year{2007} % latest copyright year %