diff --git a/org b/org index 771cd9d92..05599b837 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.56). + This manual is for Org-mode (version 4.57). Copyright (C) 2004, 2005, 2006 Free Software Foundation @@ -27,7 +27,7 @@ File: org, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) Org Mode Manual *************** -This manual is for Org-mode (version 4.56). +This manual is for Org-mode (version 4.57). Copyright (C) 2004, 2005, 2006 Free Software Foundation @@ -635,7 +635,17 @@ File: org, Node: Structure editing, Next: Archiving, Prev: Motion, Up: Docum Yank subtree from kill ring. This does modify the level of the subtree to make sure the tree fits in nicely at the yank position. The yank level can also be specified with a prefix arg, or by - yanking after a headline marker like `****'. + yanking after a headline marker like `****'. + +`C-c ^' + Sort same-level entries. When there is an active region, all + entries in the region will be sorted. Otherwise the children of + the current headline are sorted. The command prompts for the + sorting method, which can be alphabetically, numerically, by time + (using the first time stamp in each entry), and each of these in + reverse order. With a `C-u' prefix, sorting will be + case-sensitive. With two `C-u C-u' prefixes, duplicate entries + will also be removed. When there is an active region (transient-mark-mode), promotion and demotion work on all headlines in the region. To select a region of @@ -995,10 +1005,16 @@ Column and row editing line is created above the current line. `C-c ^' - Sort the table lines in the region. Point and mark must be in the - first and last line to be included, and must be in the column that - should be used for sorting. The command prompts for numerical - versus alphanumerical sorting. + Sort the table lines in the region. The position of point + indicates the column to be used for sorting, and the range of + lines is the range between the nearest horizontal separator lines, + or the entire table. If point is before the first column, you + will be prompted for the sorting column. If there is an active + region, the mark specifies the first line and the sorting column, + while point should be in the last line to be included into the + sorting. The command prompts for the sorting type + (alphabetically, numerically, or by time). When called with a + prefix argument, alphabetic sorting will be case-sensitive. Regions ....... @@ -1838,7 +1854,7 @@ link, together with an explanation: tree with the matches. As a degenerate case, a file link with an empty file name can be used -to search the current file. For example, `' does a +to search the current file. For example, `[[file:::find me]]' does a search for `find me' in the current file, just as `[[find me]]' would. ---------- Footnotes ---------- @@ -1908,13 +1924,13 @@ as a target for this note. When you call `M-x remember' to remember something, org will prompt for a key to select the template and then prepare the buffer like * TODO - + [[file:link to where you called remember]] or * [2006-03-21 Tue 15:37] - + [[file:link to where you called remember]] See the variable `org-remember-templates' for more details. @@ -2309,7 +2325,7 @@ TIME STAMP WITH SCHEDULED KEYWORD If a time stamp is preceded by the word `SCHEDULED:', it means you are planning to start working on that task on the given date. So this is not about recording an event, but about planning your - work. The headline will be listed under the given date. In + work. The headline will be listed under the given date(2). In addition, a reminder that the scheduled date has passed will be present in the compilation for _today_, until the entry is marked DONE. I.e., the task will automatically be forwarded until @@ -2327,7 +2343,7 @@ TIME STAMP WITH DEADLINE KEYWORD date, and continuing until the entry is marked DONE. An example: *** TODO write article about the Earth for the Guide - The editor in charge is + The editor in charge is [[bbdb:Ford Prefect]] DEADLINE: <2004-02-29 Sun> TIME STAMP WITH CLOSED KEYWORD @@ -2348,6 +2364,10 @@ TIME RANGE WITH CLOCK KEYWORD (1) This is the standard ISO date/time format. If you cannot get used to these, see *Note Custom time format:: + (2) It will still be listed on that date after it has been marked +DONE. If you don't like this, set the variable +`org-agenda-skip-scheduled-if-done'. +  File: org, Node: Creating timestamps, Next: Custom time format, Prev: Time stamps, Up: Timestamps @@ -2443,6 +2463,7 @@ specified with the current date and time. For example: 22 sept 0:34 --> currentyear-09-22 0:34 12 --> currentyear-currentmonth-12 Fri --> nearest Friday (today or later) + +4 --> 4 days from now (if +N is the only thing given) The function understands English month and weekday abbreviations. If you want to use unabbreviated names and/or other languages, configure @@ -2861,6 +2882,11 @@ _negative selection_ combined with AND can be meaningful. Examples: Select `:WORK:'-tagged TODO lines that are either `WAITING' or `NEXT'. + Any element of the tag/todo match can be a regular expression - in +this case it must be enclosed in curly braces. For example, +`WORK+{^BOSS.*}' matches headlines that contain the tag `WORK' and any +tag starting with `BOSS'. +  File: org, Node: Agenda views, Next: Embedded LaTeX, Prev: Tags, Up: Top @@ -3356,6 +3382,9 @@ Remote editing deleted remotely is longer than one line, the kill needs to be confirmed by the user. See variable `org-agenda-confirm-kill'. +`$' + 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 @@ -4991,9 +5020,9 @@ The following extensions for Org-mode have been written by other people: A blogging plug-in for `org-publish.el'. `http://dto.freeshell.org/notebook/OrgMode.html'. -`org-blogging.el' by Bastien Guerry +`blorg.el' by Bastien Guerry Publish Org-mode files as blogs. - `http://www.cognition.ens.fr/~guerry/org-blogging.html'. + `http://www.cognition.ens.fr/~guerry/blorg.html'.  File: org, Node: Dynamic blocks, Prev: Extensions, Up: Extensions and Hacking @@ -5196,12 +5225,12 @@ Index * active region <1>: HTML export. (line 10) * active region <2>: ASCII export. (line 9) * active region <3>: Built-in table editor. - (line 165) -* active region: Structure editing. (line 54) + (line 171) +* active region: Structure editing. (line 64) * 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 217) +* agenda files, removing buffers: Agenda commands. (line 220) * agenda views: Agenda views. (line 6) * agenda views, custom: Custom agenda views. (line 6) * agenda, batch production: Batch processing. (line 6) @@ -5217,6 +5246,7 @@ Index * backtrace of an error: Feedback. (line 27) * BBDB links: External links. (line 6) * block agenda: Block agenda. (line 6) +* blorg.el: Extensions. (line 33) * bold text: Enhancing text. (line 15) * Boolean logic, for tag searches: Tag searches. (line 21) * bug reports: Feedback. (line 6) @@ -5227,12 +5257,12 @@ Index * calc.el: Cooperation. (line 6) * calculations, in tables <1>: Table calculations. (line 6) * calculations, in tables: Built-in table editor. - (line 135) -* calendar commands, from agenda: Agenda commands. (line 178) + (line 141) +* calendar commands, from agenda: Agenda commands. (line 181) * calendar integration: Calendar/Diary integration. (line 6) * calendar, for selecting date: The date/time prompt. - (line 25) + (line 26) * CamelCase link completion: Completion. (line 6) * CamelCase links: Internal links. (line 6) * CamelCase links, completion of: CamelCase links. (line 6) @@ -5283,7 +5313,7 @@ Index * DEADLINE keyword: Time stamps. (line 53) * deadlines: Time stamps. (line 6) * demotion, of subtrees: Structure editing. (line 6) -* diary entries, creating from agenda: Agenda commands. (line 185) +* diary entries, creating from agenda: Agenda commands. (line 188) * diary integration: Calendar/Diary integration. (line 6) * dictionary word completion: Completion. (line 6) @@ -5328,7 +5358,7 @@ Index (line 6) * formula, for table column: Column formulas. (line 6) * formula, in tables: Built-in table editor. - (line 135) + (line 141) * global cycling: Visibility cycling. (line 22) * global keybindings: Activation. (line 6) * global TODO list: Global TODO list. (line 6) @@ -5413,7 +5443,6 @@ Index * ordered lists: Plain lists. (line 6) * org-agenda, command: Weekly/Daily agenda. (line 9) * org-blog.el: Extensions. (line 29) -* org-blogging.el: Extensions. (line 33) * org-mode, turning on: Activation. (line 22) * org-mouse.el: Extensions. (line 17) * org-publish-project-alist: Project alist. (line 6) @@ -5445,8 +5474,9 @@ Index * region, active <1>: HTML export. (line 10) * region, active <2>: ASCII export. (line 9) * region, active <3>: Built-in table editor. - (line 165) -* region, active: Structure editing. (line 54) + (line 171) +* region, active: Structure editing. (line 64) +* regular expressions, with tags search: Tag searches. (line 58) * remember.el <1>: Cooperation. (line 33) * remember.el: Remember. (line 6) * remote editing, from agenda: Agenda commands. (line 100) @@ -5540,8 +5570,8 @@ Index * transient-mark-mode <1>: HTML export. (line 10) * transient-mark-mode <2>: ASCII export. (line 9) * transient-mark-mode <3>: Built-in table editor. - (line 165) -* transient-mark-mode: Structure editing. (line 54) + (line 171) +* transient-mark-mode: Structure editing. (line 64) * trees, sparse: Sparse trees. (line 6) * trees, visibility: Visibility cycling. (line 6) * tty keybindings: TTY keys. (line 6) @@ -5570,19 +5600,20 @@ Key Index [index] * Menu: +* $: Agenda commands. (line 113) * ': CDLaTeX mode. (line 43) -* +: Agenda commands. (line 132) -* ,: Agenda commands. (line 124) -* -: Agenda commands. (line 138) +* +: Agenda commands. (line 135) +* ,: Agenda commands. (line 127) +* -: Agenda commands. (line 141) * .: Agenda commands. (line 94) -* :: Agenda commands. (line 118) +* :: Agenda commands. (line 121) * <: The date/time prompt. - (line 28) + (line 29) * : Agenda commands. (line 91) * <1>: Agenda commands. (line 41) * <2>: Setting tags. (line 76) * <3>: The date/time prompt. - (line 53) + (line 54) * : Built-in table editor. (line 64) * : Agenda commands. (line 86) @@ -5595,17 +5626,17 @@ Key Index (line 57) * <5>: Plain lists. (line 37) * : Visibility cycling. (line 10) -* > <1>: Agenda commands. (line 160) +* > <1>: Agenda commands. (line 163) * >: The date/time prompt. - (line 29) + (line 30) * ^: CDLaTeX mode. (line 33) * _: CDLaTeX mode. (line 33) * `: CDLaTeX mode. (line 39) -* a: Agenda commands. (line 121) -* C: Agenda commands. (line 200) -* c: Agenda commands. (line 178) +* a: Agenda commands. (line 124) +* C: Agenda commands. (line 203) +* c: Agenda commands. (line 181) * C-#: Built-in table editor. - (line 155) + (line 161) * C-,: Agenda files. (line 18) * C-a a L: Timeline. (line 10) * C-c !: Creating timestamps. (line 21) @@ -5616,11 +5647,11 @@ Key Index * C-c ' <1>: Editing/debugging formulas. (line 20) * C-c ': Built-in table editor. - (line 144) + (line 150) * C-c *: Built-in table editor. - (line 148) + (line 154) * C-c +: Built-in table editor. - (line 165) + (line 171) * C-c ,: Priorities. (line 18) * C-c -: Built-in table editor. (line 92) @@ -5630,21 +5661,22 @@ Key Index * C-c ;: Comment lines. (line 11) * C-c <: Creating timestamps. (line 25) * C-c : Built-in table editor. - (line 187) + (line 193) * C-c =: Built-in table editor. - (line 135) + (line 141) * C-c >: Creating timestamps. (line 29) * C-c ? <1>: Editing/debugging formulas. (line 20) * C-c ?: Built-in table editor. - (line 161) + (line 167) * C-c [: Agenda files. (line 12) * C-c \: Tag searches. (line 9) * C-c ]: Agenda files. (line 15) -* C-c ^: Built-in table editor. +* C-c ^ <1>: Built-in table editor. (line 96) +* C-c ^: Structure editing. (line 52) * C-c `: Built-in table editor. - (line 181) + (line 187) * C-c a a: Weekly/Daily agenda. (line 9) * C-c a C: Storing searches. (line 9) * C-c a M: Matching headline tags. @@ -5670,7 +5702,7 @@ Key Index * 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 145) +* C-c C-d <1>: Agenda commands. (line 148) * C-c C-d: Creating timestamps. (line 37) * C-c C-e: Exporting. (line 19) * C-c C-e a: ASCII export. (line 9) @@ -5696,9 +5728,9 @@ Key Index * C-c C-q <1>: Editing/debugging formulas. (line 20) * C-c C-q: Built-in table editor. - (line 119) + (line 125) * C-c C-r: Visibility cycling. (line 32) -* C-c C-s <1>: Agenda commands. (line 142) +* C-c C-s <1>: Agenda commands. (line 145) * C-c C-s: Creating timestamps. (line 48) * C-c C-t <1>: Clocking work time. (line 26) * C-c C-t: TODO basics. (line 13) @@ -5707,7 +5739,7 @@ Key Index * C-c C-w: Creating timestamps. (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 207) +* C-c C-x C-c: Agenda commands. (line 210) * C-c C-x C-d: Clocking work time. (line 34) * C-c C-x C-i: Clocking work time. (line 12) * C-c C-x C-k: Structure editing. (line 39) @@ -5718,14 +5750,14 @@ Key Index * C-c C-x C-t: Custom time format. (line 12) * C-c C-x C-u: Dynamic blocks. (line 21) * C-c C-x C-w <1>: Built-in table editor. - (line 108) + (line 114) * C-c C-x C-w: Structure editing. (line 39) * C-c C-x C-x: Clocking work time. (line 30) * C-c C-x C-y <1>: Built-in table editor. - (line 112) + (line 118) * C-c C-x C-y: Structure editing. (line 46) * C-c C-x M-w <1>: Built-in table editor. - (line 105) + (line 111) * C-c C-x M-w: Structure editing. (line 43) * C-c C-y <1>: Clocking work time. (line 21) * C-c C-y: Creating timestamps. (line 66) @@ -5739,7 +5771,7 @@ Key Index * C-u C-c $: Moving subtrees. (line 12) * C-u C-c .: Creating timestamps. (line 16) * C-u C-c =: Built-in table editor. - (line 139) + (line 145) * C-u C-c C-l: Handling links. (line 43) * C-u C-c C-x C-a: ARCHIVE tag. (line 31) * C-u C-c C-x C-u <1>: Dynamic blocks. (line 22) @@ -5748,12 +5780,12 @@ Key Index * d: Agenda commands. (line 65) * f: Agenda commands. (line 44) * g: Agenda commands. (line 72) -* H: Agenda commands. (line 204) -* i: Agenda commands. (line 185) -* I: Agenda commands. (line 165) +* H: Agenda commands. (line 207) +* i: Agenda commands. (line 188) +* I: Agenda commands. (line 168) * l: Agenda commands. (line 51) * L: Agenda commands. (line 32) -* M: Agenda commands. (line 191) +* M: Agenda commands. (line 194) * M-: Built-in table editor. (line 82) * M- <1>: Built-in table editor. @@ -5774,7 +5806,7 @@ Key Index * M-S- <2>: Plain lists. (line 59) * M-S-: Structure editing. (line 36) * M-S- <1>: The date/time prompt. - (line 50) + (line 51) * M-S- <2>: Built-in table editor. (line 76) * M-S- <3>: Plain lists. (line 65) @@ -5783,7 +5815,7 @@ Key Index * M-S- <2>: Plain lists. (line 52) * M-S-: Structure editing. (line 18) * M-S- <1>: The date/time prompt. - (line 47) + (line 48) * M-S- <2>: Built-in table editor. (line 79) * M-S- <3>: Plain lists. (line 65) @@ -5794,54 +5826,54 @@ Key Index * M-S-: Structure editing. (line 33) * mouse-1 <1>: Agenda commands. (line 35) * mouse-1 <2>: The date/time prompt. - (line 32) + (line 33) * mouse-1: Handling links. (line 72) * mouse-2 <1>: Agenda commands. (line 35) * mouse-2: Handling links. (line 72) * mouse-3 <1>: Agenda commands. (line 28) * mouse-3: Handling links. (line 77) * n: Agenda commands. (line 19) -* O: Agenda commands. (line 167) +* O: Agenda commands. (line 170) * o: Agenda commands. (line 59) -* P: Agenda commands. (line 129) +* P: Agenda commands. (line 132) * p: Agenda commands. (line 20) -* q: Agenda commands. (line 214) +* q: Agenda commands. (line 217) * r <1>: Agenda commands. (line 76) * r: Global TODO list. (line 20) -* S: Agenda commands. (line 195) +* S: Agenda commands. (line 198) * s: Agenda commands. (line 83) -* S- <1>: Agenda commands. (line 138) +* S- <1>: Agenda commands. (line 141) * S- <2>: The date/time prompt. - (line 41) + (line 42) * S- <3>: Creating timestamps. (line 58) * S- <4>: Priorities. (line 25) * S-: Plain lists. (line 55) -* S- <1>: Agenda commands. (line 156) +* S- <1>: Agenda commands. (line 159) * S- <2>: The date/time prompt. - (line 38) + (line 39) * S- <3>: Creating timestamps. (line 53) * S-: TODO basics. (line 20) * S-: Built-in table editor. - (line 170) -* S- <1>: Agenda commands. (line 148) + (line 176) +* S- <1>: Agenda commands. (line 151) * S- <2>: The date/time prompt. - (line 35) + (line 36) * S- <3>: Creating timestamps. (line 53) * S-: TODO basics. (line 20) * S- <1>: Built-in table editor. (line 61) * S-: Visibility cycling. (line 22) -* S- <1>: Agenda commands. (line 132) +* S- <1>: Agenda commands. (line 135) * S- <2>: The date/time prompt. - (line 44) + (line 45) * S- <3>: Creating timestamps. (line 58) * S- <4>: Priorities. (line 25) * S-: Plain lists. (line 55) -* T: Agenda commands. (line 113) +* T: Agenda commands. (line 116) * t: Agenda commands. (line 103) * w: Agenda commands. (line 62) -* x: Agenda commands. (line 217) -* X: Agenda commands. (line 170) +* x: Agenda commands. (line 220) +* X: Agenda commands. (line 173)  @@ -5860,142 +5892,143 @@ Ref: Visibility cycling-Footnote-122201 Ref: Visibility cycling-Footnote-222259 Node: Motion22309 Node: Structure editing23093 -Node: Archiving25409 -Node: ARCHIVE tag25967 -Node: Moving subtrees27760 -Node: Sparse trees28801 -Ref: Sparse trees-Footnote-130932 -Ref: Sparse trees-Footnote-231024 -Node: Plain lists31139 -Ref: Plain lists-Footnote-134664 -Ref: Plain lists-Footnote-235021 -Node: Tables35205 -Node: Built-in table editor35753 -Node: Narrow columns43361 -Ref: Narrow columns-Footnote-145300 -Node: Table calculations45346 -Node: Formula syntax46666 -Ref: Formula syntax-Footnote-149571 -Node: Lisp formulas49871 -Node: Column formulas50660 -Node: Advanced features52422 -Node: Named-field formulas55676 -Node: Editing/debugging formulas56316 -Node: Appetizer58074 -Node: orgtbl-mode59177 -Node: table.el59668 -Node: Hyperlinks60645 -Node: Link format61418 -Node: Internal links62711 -Ref: Internal links-Footnote-164700 -Node: Radio targets64832 -Node: CamelCase links65547 -Node: External links66141 -Node: Handling links68272 -Ref: Handling links-Footnote-172924 -Ref: Handling links-Footnote-273161 -Node: Link abbreviations73235 -Node: Search options74914 -Ref: Search options-Footnote-176692 -Node: Custom searches76773 -Node: Remember77821 -Node: TODO items81511 -Node: TODO basics82493 -Node: TODO extensions84020 -Node: Workflow states84815 -Node: TODO types85683 -Ref: TODO types-Footnote-187341 -Node: Per file keywords87423 -Ref: Per file keywords-Footnote-188877 -Node: Priorities89078 -Node: Breaking down tasks90322 -Ref: Breaking down tasks-Footnote-190841 -Node: Checkboxes90937 -Node: Timestamps93692 -Node: Time stamps94153 -Ref: Time stamps-Footnote-197642 -Node: Creating timestamps97758 -Node: The date/time prompt100384 -Ref: The date/time prompt-Footnote-1102077 -Node: Custom time format102183 -Node: Progress logging103742 -Node: Closing items104271 -Node: Clocking work time105175 -Ref: Clocking work time-Footnote-1108799 -Node: Tags108925 -Node: Tag inheritance109687 -Node: Setting tags110624 -Ref: Setting tags-Footnote-1114823 -Ref: Setting tags-Footnote-2114935 -Node: Tag searches115018 -Node: Agenda views117018 -Node: Agenda files119111 -Ref: Agenda files-Footnote-1120071 -Ref: Agenda files-Footnote-2120220 -Node: Agenda dispatcher120413 -Node: Weekly/Daily agenda122030 -Node: Calendar/Diary integration122995 -Node: Global TODO list124333 -Node: Matching headline tags126493 -Node: Timeline127551 -Node: Presentation and sorting128214 -Node: Categories128992 -Node: Time-of-day specifications129656 -Node: Sorting of agenda items131634 -Node: Agenda commands132916 -Node: Custom agenda views139085 -Node: Storing searches139760 -Node: Block agenda141672 -Node: Setting Options142902 -Node: Batch processing145614 -Node: Embedded LaTeX146744 -Ref: Embedded LaTeX-Footnote-1147836 -Node: Math symbols148026 -Node: Subscripts and Superscripts148791 -Node: LaTeX fragments149635 -Ref: LaTeX fragments-Footnote-1151743 -Node: Processing LaTeX fragments152005 -Node: CDLaTeX mode152951 -Ref: CDLaTeX mode-Footnote-1155435 -Node: Exporting155583 -Node: ASCII export156897 -Node: HTML export158187 -Node: XOXO export161023 -Node: iCalendar export161462 -Node: Text interpretation163285 -Node: Comment lines163764 -Node: Enhancing text164235 -Node: Export options165927 -Node: Publishing167594 -Ref: Publishing-Footnote-1168390 -Node: Configuration168586 -Node: Project alist169304 -Node: Sources and destinations170370 -Node: Selecting files171100 -Node: Publishing action171848 -Node: Publishing options173081 -Node: Publishing links175233 -Node: Project page index176746 -Node: Sample configuration177524 -Node: Simple example178016 -Node: Complex example178689 -Node: Triggering publication180765 -Node: Miscellaneous181450 -Node: Completion182084 -Node: Customization183555 -Node: In-buffer settings184140 -Node: The very busy C-c C-c key187759 -Node: Clean view189403 -Node: TTY keys191980 -Node: Interaction193589 -Node: Cooperation193986 -Node: Conflicts195853 -Node: Bugs197445 -Node: Extensions and Hacking199068 -Node: Extensions199554 -Node: Dynamic blocks201355 -Node: History and Acknowledgments203282 -Node: Index208289 -Node: Key Index235377 +Node: Archiving25919 +Node: ARCHIVE tag26477 +Node: Moving subtrees28270 +Node: Sparse trees29311 +Ref: Sparse trees-Footnote-131442 +Ref: Sparse trees-Footnote-231534 +Node: Plain lists31649 +Ref: Plain lists-Footnote-135174 +Ref: Plain lists-Footnote-235531 +Node: Tables35715 +Node: Built-in table editor36263 +Node: Narrow columns44291 +Ref: Narrow columns-Footnote-146230 +Node: Table calculations46276 +Node: Formula syntax47596 +Ref: Formula syntax-Footnote-150501 +Node: Lisp formulas50801 +Node: Column formulas51590 +Node: Advanced features53352 +Node: Named-field formulas56606 +Node: Editing/debugging formulas57246 +Node: Appetizer59004 +Node: orgtbl-mode60107 +Node: table.el60598 +Node: Hyperlinks61575 +Node: Link format62348 +Node: Internal links63641 +Ref: Internal links-Footnote-165630 +Node: Radio targets65762 +Node: CamelCase links66477 +Node: External links67071 +Node: Handling links69202 +Ref: Handling links-Footnote-173854 +Ref: Handling links-Footnote-274091 +Node: Link abbreviations74165 +Node: Search options75844 +Ref: Search options-Footnote-177624 +Node: Custom searches77705 +Node: Remember78753 +Node: TODO items82447 +Node: TODO basics83429 +Node: TODO extensions84956 +Node: Workflow states85751 +Node: TODO types86619 +Ref: TODO types-Footnote-188277 +Node: Per file keywords88359 +Ref: Per file keywords-Footnote-189813 +Node: Priorities90014 +Node: Breaking down tasks91258 +Ref: Breaking down tasks-Footnote-191777 +Node: Checkboxes91873 +Node: Timestamps94628 +Node: Time stamps95089 +Ref: Time stamps-Footnote-198583 +Ref: Time stamps-Footnote-298699 +Node: Creating timestamps98854 +Node: The date/time prompt101480 +Ref: The date/time prompt-Footnote-1103246 +Node: Custom time format103352 +Node: Progress logging104911 +Node: Closing items105440 +Node: Clocking work time106344 +Ref: Clocking work time-Footnote-1109968 +Node: Tags110094 +Node: Tag inheritance110856 +Node: Setting tags111793 +Ref: Setting tags-Footnote-1115992 +Ref: Setting tags-Footnote-2116104 +Node: Tag searches116187 +Node: Agenda views118416 +Node: Agenda files120509 +Ref: Agenda files-Footnote-1121469 +Ref: Agenda files-Footnote-2121618 +Node: Agenda dispatcher121811 +Node: Weekly/Daily agenda123428 +Node: Calendar/Diary integration124393 +Node: Global TODO list125731 +Node: Matching headline tags127891 +Node: Timeline128949 +Node: Presentation and sorting129612 +Node: Categories130390 +Node: Time-of-day specifications131054 +Node: Sorting of agenda items133032 +Node: Agenda commands134314 +Node: Custom agenda views140552 +Node: Storing searches141227 +Node: Block agenda143139 +Node: Setting Options144369 +Node: Batch processing147081 +Node: Embedded LaTeX148211 +Ref: Embedded LaTeX-Footnote-1149303 +Node: Math symbols149493 +Node: Subscripts and Superscripts150258 +Node: LaTeX fragments151102 +Ref: LaTeX fragments-Footnote-1153210 +Node: Processing LaTeX fragments153472 +Node: CDLaTeX mode154418 +Ref: CDLaTeX mode-Footnote-1156902 +Node: Exporting157050 +Node: ASCII export158364 +Node: HTML export159654 +Node: XOXO export162490 +Node: iCalendar export162929 +Node: Text interpretation164752 +Node: Comment lines165231 +Node: Enhancing text165702 +Node: Export options167394 +Node: Publishing169061 +Ref: Publishing-Footnote-1169857 +Node: Configuration170053 +Node: Project alist170771 +Node: Sources and destinations171837 +Node: Selecting files172567 +Node: Publishing action173315 +Node: Publishing options174548 +Node: Publishing links176700 +Node: Project page index178213 +Node: Sample configuration178991 +Node: Simple example179483 +Node: Complex example180156 +Node: Triggering publication182232 +Node: Miscellaneous182917 +Node: Completion183551 +Node: Customization185022 +Node: In-buffer settings185607 +Node: The very busy C-c C-c key189226 +Node: Clean view190870 +Node: TTY keys193447 +Node: Interaction195056 +Node: Cooperation195453 +Node: Conflicts197320 +Node: Bugs198912 +Node: Extensions and Hacking200535 +Node: Extensions201021 +Node: Dynamic blocks202808 +Node: History and Acknowledgments204735 +Node: Index209742 +Node: Key Index236903  End Tag Table diff --git a/org.el b/org.el index 30e72ebfe..1ff8f57f2 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.56 +;; Version: 4.57a ;; ;; This file is part of GNU Emacs. ;; @@ -61,6 +61,25 @@ ;; ;; Recent changes ;; -------------- +;; Version 4.57a +;; - Bug fixes for XEmacs. +;; +;; Version 4.57 +;; - Sorting of outline items on same level. +;; - Sorting tables automatically selects line range between hlines. +;; - Changes in Agenda buffer +;; - `C-c C-o' follows a link in the current line. +;; - `C-c $' archives the subtree corresponding to the line. +;; - Changing dates with S-left and S-right show new date in agenda, +;; but still do not move the entry to the new date. +;; - new option `org-agenda-skip-scheduled-if-done'. +;; - Agenda and sparse tree construction using tag matches can now +;; use regular expressions. +;; - When prompted for a date/time, entering "+7" indicates a date +;; 7 days from now - but only this is the only thing you give. +;; - Custom time formats also apply to exported html and ascii. +;; - Bug fixes. +;; ;; Version 4.56 ;; - `C-k' in agenda kills current line and corresponding subtree in file. ;; - XEmacs compatibility issues fixed, in particular tag alignment. @@ -101,6 +120,7 @@ (eval-when-compile (require 'cl) + (require 'gnus-sum) (require 'calendar)) ;; For XEmacs, noutline is not yet provided by outline.el, so arrange for ;; the file noutline.el being loaded. @@ -113,7 +133,7 @@ ;;; Customization variables -(defvar org-version "4.56" +(defvar org-version "4.57a" "The version number of the file org.el.") (defun org-version () (interactive) @@ -667,6 +687,7 @@ this variable requires a restart of Emacs to become effective." :group 'org-table-settings :type 'string) +;; FIXME: I am no longer sure if including HEX is a good idea. (defcustom org-table-number-regexp "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|\\(0[xX]\\)?[0-9a-fA-F]+\\)$" "Regular expression for recognizing numbers in table columns. @@ -1310,11 +1331,14 @@ the following lines anywhere in the buffer: (set :tag "on, with notes" :greedy t :value (done) (const done) (const clock-out)))) -(defcustom org-log-note-headings '((done . "CLOSING NOTE") (clock-out . "")) +(defcustom org-log-note-headings '((done . "CLOSING NOTE %t") (clock-out . "")) "Headings for notes added when clocking out or closing TODO items. The value is an alist, with the car being a sympol indicating the note context, and the cdr is the heading to be used. The heading may also be the -empty string." +empty string. +%t in the heading will be replaced by a time stamp +%u will be replaced by the user name +%U will be replaced by the full user name." :group 'org-todo :type '(list :greedy t (cons (const :tag "Heading when closing an item" done) string) @@ -1380,6 +1404,14 @@ These are overlayed over the default ISO format if the variable :group 'org-time :type 'sexp) +(defun org-time-stamp-format (&optional long inactive) + "Get the right format for a time string." + (let ((f (if long (cdr org-time-stamp-formats) + (car org-time-stamp-formats)))) + (if inactive + (concat "[" (substring f 1 -1) "]") + f))) + (defcustom org-deadline-warning-days 30 "No. of days before expiration during which a deadline becomes active. This variable governs the display in sparse trees and in the agenda." @@ -1519,8 +1551,7 @@ agenda file per line." (repeat :tag "List of files" file) (file :tag "Store list in a file\n" :value "~/.agenda_files"))) -(defcustom org-agenda-custom-commands ;'(("w" todo "WAITING")) -'(("w" todo "WAITING" ((aaa 1) (bbb 2)))) +(defcustom org-agenda-custom-commands '(("w" todo "WAITING")) "Custom commands for the agenda. These commands will be offered on the splash screen displayed by the agenda dispatcher \\[org-agenda]. Each entry is a list like this: @@ -1632,6 +1663,11 @@ The idea behind this is that such items will appear in the agenda anyway." :group 'org-todo :type 'boolean) +(defcustom org-agenda-skip-scheduled-if-done nil + "Non-nil means don't show scheduled items in agenda when they are done. +This is relevant for the daily/weekly agenda, not for the TODO list." + :group 'org-agenda + :type 'boolean) (defcustom org-timeline-show-empty-dates 3 "Non-nil means, `org-timeline' also shows dates without an entry. @@ -1649,7 +1685,7 @@ N days, just insert a special line indicating the size of the gap." "When set, remote killing from the agenda buffer needs confirmation. When t, a confirmation is always needed. When a number N, confirmation is only needed when the text to be killed contains more than N non-white lines." - :group 'org-agenda ;; FIXME + :group 'org-agenda :type '(choice (const :tag "Never" nil) (const :tag "Always" t) @@ -4205,6 +4241,120 @@ in the region." (and org-auto-align-tags (org-set-tags nil t)) (if org-adapt-indentation (org-fixup-indentation diff)))) +(defun org-sort (with-case) + "Call `org-sort-entries' or `org-table-sort-lines', depending on context." + (interactive "P") + (if (org-at-table-p) + (org-call-with-arg 'org-table-sort-lines with-case) + (org-call-with-arg 'org-sort-entries with-case))) + +(defun org-sort-entries (&optional with-case sorting-type) + "Sort entries on a certain level of an outline tree. +If there is an active region, the entries in the region are sorted. +If not, the children of the entry at point are sorted. + +Sorting can be alphabetically, numerically, and by date/time as given by +the first time stamp in the entry. The command prompts for the sorting +type unless it has been given to the function through the SORTING-TYPE +argument, which needs to a character, any of (?n ?N ?a ?A ?t ?T). + +Comparing entries ignores case by default. However, with an optional argument +WITH-CASE, the sorting considers case as well. With two prefix arguments +`C-u C-u', sorting is case-sensitive and duplicate entries will be removed." + (interactive "P") + (let ((unique (equal with-case '(16))) + start beg end entries stars re re2 p nentries (nremoved 0) last txt) + + ;; Find beginning and end of region to sort + (if (org-region-active-p) + (progn + ;; we will sort the region + (setq end (region-end)) + (goto-char (1- (setq start (region-beginning))))) + ;; we will sort the children of the current headline + (setq start (point) end (org-end-of-subtree)) + (goto-char start) + (show-subtree)) + (outline-next-heading) ; this is the first heading to be included + (setq beg (point)) + (if (>= (point) end) (error "Nothing to sort")) + (looking-at "\\(\\*+\\)") + (setq stars (match-string 1) + re (concat "^" (regexp-quote stars) " +") + re2 (concat "^" (regexp-quote (substring stars 0 -1)) "[^*]") + txt (buffer-substring beg end)) + (if (not (equal (substring txt -1) "\n")) (setq txt (concat txt "\n"))) + (if (string-match re2 txt) + (error "Region to sort contains a level above the first entry")) + ;; Make a list that can be sorted. + ;; The car is the string for comparison, the cdr is the subtree + (message "Sorting entries...") + (setq entries + (mapcar + (lambda (x) + (string-match "^.*\\(\n.*\\)?" x) ; take two lines + (cons (match-string 0 x) x)) + (org-split-string txt re))) + + ;; Sort the list + (setq entries (org-do-sort + entries + (if (org-region-active-p) "region" "children") + with-case sorting-type)) + + ;; Delete the old stuff + (goto-char beg) + (kill-region beg end) + (setq nentries (length entries)) + ;; Insert the sorted entries, and remove duplicates if this is required + (while (setq p (pop entries)) + (if (and unique (equal last (setq last (org-trim (cdr p))))) + (setq nremoved (1+ nremoved)) ; same entry as before, skip it + (insert stars " " (cdr p)))) + (goto-char start) + (message "Sorting entries...done (%d entries%s)" + nentries + (if unique (format ", %d duplicates removed" nremoved) "")))) + +(defun org-do-sort (table what &optional with-case sorting-type) + "Sort TABLE of WHAT according to SORTING-TYPE. +The user will be prompted for the SORTING-TYPE if the call to this +function does not specify it. WHAT is only for the prompt, to indicate +what is being sorted. The sorting key will be extracted from +the car of the elements of the table. +If WITH-CASE is non-nil, the sorting will be case-sensitive." + (unless sorting-type + (message + "Sort %s:[a]lphabetically [n]umerically [t]ime. A/N/T means reversed:" + what) + (setq sorting-type (read-char-exclusive))) + (let ((dcst (downcase sorting-type)) + extractfun comparefun) + ;; Define the appropriate functions + (cond + ((= dcst ?n) + (setq extractfun 'string-to-number + comparefun (if (= dcst sorting-type) '< '>))) + ((= dcst ?a) + (setq extractfun (if with-case 'identity 'downcase) + comparefun (if (= dcst sorting-type) + 'string< + (lambda (a b) (and (not (string< a b)) + (not (string= a b))))))) + ((= dcst ?t) + (setq extractfun + (lambda (x) + (if (string-match org-ts-regexp x) + (time-to-seconds + (org-time-string-to-time (match-string 0 x))) + 0)) + comparefun (if (= dcst sorting-type) '< '>))) + (t (error "Invalid sorting type `%c'" sorting-type))) + + (sort (mapcar (lambda (x) (cons (funcall extractfun (car x)) (cdr x))) + table) + (lambda (a b) (funcall comparefun (car a) (car b)))))) + (defun org-map-tree (fun) "Call FUN for every heading underneath the current one." (org-back-to-heading) @@ -4933,7 +5083,8 @@ this heading. " (org-paste-subtree (1+ level)) ;; Mark the entry as done, i.e. set to last work in org-todo-keywords (if org-archive-mark-done - (org-todo (length org-todo-keywords))) + (let (org-log-done) + (org-todo (length org-todo-keywords)))) ;; Move cursor to right after the TODO keyword (when org-archive-stamp-time (beginning-of-line 1) @@ -5361,7 +5512,8 @@ At all other locations, this simply calls `ispell-complete-word'." (cond ((eq completion t) (if (equal type :opt) (insert (substring (cdr (assoc (upcase pattern) table)) - (length pattern))))) + (length pattern))) + (if (equal type :tag) (insert ":")))) ((null completion) (message "Can't find completion for \"%s\"" pattern) (ding)) @@ -5562,6 +5714,7 @@ be removed." (and (eq elt 'closed) (re-search-forward org-closed-time-regexp nil t))) (replace-match "") + (if (looking-at "--+<[^>]+>") (replace-match "")) (if (looking-at " +") (replace-match "")))) (goto-char (point-max)) (when what @@ -5573,7 +5726,7 @@ be removed." " ") (org-insert-time-stamp time nil (eq what 'closed)) (end-of-line 1) - (org-add-log-maybe 'done)) + (and (eq what 'closed) (org-add-log-maybe 'done))) (goto-char (point-min)) (widen) (if (looking-at "[ \t]+\r?\n") @@ -5620,7 +5773,16 @@ be removed." (if (string-match "\\s-+\\'" txt) (setq txt (replace-match "" t t txt))) (setq lines (org-split-string txt "\n")) - (and note (string-match "\\S-" note) (push note lines)) + (when (and note (string-match "\\S-" note)) + (setq note + (org-replace-escapes + note + (list (cons "%u" user-login-name) + (cons "%U" user-full-name) + (cons "%t" (format-time-string + (org-time-stamp-format 'long 'inactive) + (current-time)))))) + (push note lines)) (save-excursion (set-buffer (marker-buffer org-log-note-marker)) (save-excursion @@ -5759,6 +5921,15 @@ look like when opend with successive calls to `org-cycle'." (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))) +(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." + (let ((overlays (org-overlays-at (or pos (point)))) + ov found) + (while (setq ov (pop overlays)) + (if (org-overlay-get ov prop) + (if delete (org-delete-overlay ov) (push ov found)))) + found)) (defun org-highlight-new-match (beg end) "Highlight from BEG to END and mark the highlight is an occur headline." @@ -5913,6 +6084,7 @@ hour and minute. For example, 22 sept 0:34 --> currentyear-09-22 0:34 12 --> currentyear-currentmonth-12 Fri --> nearest Friday (today or later) + +4 --> four days from today (only if +N is the only thing given) etc. The function understands only English month and weekday abbreviations, but this can be configured with the variables `parse-time-months' and @@ -5953,7 +6125,7 @@ used to insert the time stamp into the buffer to include the time." (timestr (format-time-string (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time)) (prompt (format "YYYY-MM-DD [%s]: " timestr)) - ans ans1 ans2 + ans ans1 ans2 (deltadays 0) second minute hour day month year tl wday wday1) (cond @@ -6009,6 +6181,9 @@ used to insert the time stamp into the buffer to include the time." (setq ans (read-string prompt "" nil timestr)))) (org-detach-overlay org-date-ovl) + (if (string-match "^[ \t]*[-+][0-9]+[ \t]*$" ans) + (setq deltadays (string-to-number ans) ans "")) + (if (string-match "^ *\\(\\([0-9]+\\)-\\)?\\([0-1]?[0-9]\\)-\\([0-3]?[0-9]\\)\\([^-0-9]\\|$\\)" ans) (progn @@ -6028,6 +6203,7 @@ used to insert the time stamp into the buffer to include the time." minute (or (nth 1 tl) (string-to-number (format-time-string "%M" ct))) second (or (nth 0 tl) 0) wday (nth 6 tl)) + (setq day (+ day deltadays)) (when (and wday (not (nth 3 tl))) ;; Weekday was given, but no day, so pick that day in the week ;; on or after the derived date. @@ -6112,7 +6288,7 @@ The command returns the inserted time stamp." (with-hm (and (nth 1 t1) (nth 2 t1))) (inactive (= (char-before (1- beg)) ?\[)) (tf (funcall (if with-hm 'cdr 'car) org-time-stamp-custom-formats)) - (time (mapcar (lambda (x) (or x 0)) t1)) + (time (org-fix-decoded-time t1)) (str (org-add-props (format-time-string (substring tf 1 -1) (apply 'encode-time time)) @@ -6127,6 +6303,39 @@ The command returns the inserted time stamp." (put-text-property beg end 'end-glyph (make-glyph str))) (put-text-property beg end 'display str)))) +(defun org-translate-time (string) + "Translate all timestamps in STRING to custom format. +But do this only if the variable `org-display-custom-times' is set." + (when org-display-custom-times + (save-match-data + (let* ((start 0) + (re org-ts-regexp-both) + t1 with-hm inactive tf time str beg end) + (while (setq start (string-match re string start)) + (setq beg (match-beginning 0) + end (match-end 0) + t1 (save-match-data + (org-parse-time-string (substring string beg end) t)) + with-hm (and (nth 1 t1) (nth 2 t1)) + inactive (equal (substring string beg (1+ beg)) "[") + tf (funcall (if with-hm 'cdr 'car) + org-time-stamp-custom-formats) + time (org-fix-decoded-time t1) + str (format-time-string + (concat + (if inactive "[" "<") (substring tf 1 -1) + (if inactive "]" ">")) + (apply 'encode-time time)) + string (replace-match str t t string) + start (+ start (length str))))))) + string) + +(defun org-fix-decoded-time (time) + "Set 0 instead of nil for the first 6 elements of time. +Don't touch the rest." + (let ((n 0)) + (mapcar (lambda (x) (if (< (setq n (1+ n)) 7) (or x 0) x)) time))) + (defun org-days-to-time (timestamp-string) "Difference between TIMESTAMP-STRING and now in days." (- (time-to-days (org-time-string-to-time timestamp-string)) @@ -6869,10 +7078,15 @@ The following commands are available: (if (fboundp 'run-mode-hooks) 'run-mode-hooks 'run-hooks) (list 'org-agenda-mode-hook))) +;(substitute-key-definition 'undo 'org-agenda-undo +; org-agenda-mode-map global-map) (define-key org-agenda-mode-map "\C-i" 'org-agenda-goto) (define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) (define-key org-agenda-mode-map "\C-m" 'org-agenda-switch-to) (define-key org-agenda-mode-map "\C-k" 'org-agenda-kill) +(define-key org-agenda-mode-map "\C-c$" 'org-agenda-archive) +(define-key org-agenda-mode-map "$" 'org-agenda-archive) +(define-key org-agenda-mode-map "\C-c\C-o" 'org-agenda-open-link) (define-key org-agenda-mode-map " " 'org-agenda-show) (define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo) (define-key org-agenda-mode-map "o" 'delete-other-windows) @@ -6954,51 +7168,55 @@ The following commands are available: :style toggle :selected org-agenda-follow-mode :active t] "--" ["Cycle TODO" org-agenda-todo t] - ("Tags" - ["Show all Tags" org-agenda-show-tags t] - ["Set Tags" org-agenda-set-tags t]) - ("Schedule" - ["Schedule" org-agenda-schedule t] - ["Set Deadline" org-agenda-deadline t] - "--" - ["Reschedule +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda 'timeline)] - ["Reschedule -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda 'timeline)] - ["Reschedule to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) - ("Priority" - ["Set Priority" org-agenda-priority t] - ["Increase Priority" org-agenda-priority-up t] - ["Decrease Priority" org-agenda-priority-down t] - ["Show Priority" org-agenda-show-priority t]) - "--" - ;; ["New agenda command" org-agenda t] - ["Rebuild buffer" org-agenda-redo t] - ["Save all Org-mode Buffers" org-save-all-org-buffers t] + ["Archive subtree" org-agenda-archive t] + ["Delete subtree" org-agenda-kill t] "--" ["Goto Today" org-agenda-goto-today (org-agenda-check-type nil 'agenda 'timeline)] ["Next Dates" org-agenda-later (org-agenda-check-type nil 'agenda)] ["Previous Dates" org-agenda-earlier (org-agenda-check-type nil 'agenda)] "--" - ["Day View" org-agenda-day-view :active (org-agenda-check-type nil 'agenda) - :style radio :selected (equal org-agenda-ndays 1)] - ["Week View" org-agenda-week-view :active (org-agenda-check-type nil 'agenda) - :style radio :selected (equal org-agenda-ndays 7)] - "--" - ["Show Logbook entries" org-agenda-log-mode - :style toggle :selected org-agenda-show-log :active (org-agenda-check-type nil 'agenda 'timeline)] - ["Include Diary" org-agenda-toggle-diary - :style toggle :selected org-agenda-include-diary :active (org-agenda-check-type nil 'agenda)] - ["Use Time Grid" org-agenda-toggle-time-grid - :style toggle :selected org-agenda-use-time-grid :active (org-agenda-check-type nil 'agenda)] - "--" - ["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda 'timeline)] - ("Calendar Commands" + ("Tags" + ["Show all Tags" org-agenda-show-tags t] + ["Set Tags" org-agenda-set-tags t]) + ("Date/Schedule" + ["Schedule" org-agenda-schedule t] + ["Set Deadline" org-agenda-deadline t] + "--" + ["Change date +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda 'timeline)] + ["Change date -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda 'timeline)] + ["Change date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) + ("Priority" + ["Set Priority" org-agenda-priority t] + ["Increase Priority" org-agenda-priority-up t] + ["Decrease Priority" org-agenda-priority-down t] + ["Show Priority" org-agenda-show-priority t]) + ("Calendar/Diary" + ["New Diary Entry" org-agenda-diary-entry (org-agenda-check-type nil 'agenda 'timeline)] ["Goto Calendar" org-agenda-goto-calendar (org-agenda-check-type nil 'agenda 'timeline)] ["Phases of the Moon" org-agenda-phases-of-moon (org-agenda-check-type nil 'agenda 'timeline)] ["Sunrise/Sunset" org-agenda-sunrise-sunset (org-agenda-check-type nil 'agenda 'timeline)] ["Holidays" org-agenda-holidays (org-agenda-check-type nil 'agenda 'timeline)] - ["Convert" org-agenda-convert-date (org-agenda-check-type nil 'agenda 'timeline)]) - ["Create iCalendar file" org-export-icalendar-combine-agenda-files t] + ["Convert" org-agenda-convert-date (org-agenda-check-type nil 'agenda 'timeline)] + "--" + ["Create iCalendar file" org-export-icalendar-combine-agenda-files t]) "--" + ("View" + ["Day View" org-agenda-day-view :active (org-agenda-check-type nil 'agenda) + :style radio :selected (equal org-agenda-ndays 1)] + ["Week View" org-agenda-week-view :active (org-agenda-check-type nil 'agenda) + :style radio :selected (equal org-agenda-ndays 7)] + "--" + ["Show Logbook entries" org-agenda-log-mode + :style toggle :selected org-agenda-show-log :active (org-agenda-check-type nil 'agenda 'timeline)] + ["Include Diary" org-agenda-toggle-diary + :style toggle :selected org-agenda-include-diary :active (org-agenda-check-type nil 'agenda)] + ["Use Time Grid" org-agenda-toggle-time-grid + :style toggle :selected org-agenda-use-time-grid :active (org-agenda-check-type nil 'agenda)]) + ["Rebuild buffer" org-agenda-redo t] + ["Save all Org-mode Buffers" org-save-all-org-buffers t] + "--" +; ["Undo Remote Editing" org-agenda-undo org-agenda-multi-buffer-undo-list] +; "--" ["Quit" org-agenda-quit t] ["Exit and Release Buffers" org-agenda-exit t] )) @@ -8289,6 +8507,9 @@ the documentation of `org-diary'." deadlinep (string-match org-deadline-regexp tmp) scheduledp (string-match org-scheduled-regexp tmp) donep (org-entry-is-done-p)) + (and org-agenda-skip-scheduled-if-done + scheduledp donep + (throw :skip t)) (if (string-match ">" timestr) ;; substring should only run to end of time stamp (setq timestr (substring timestr 0 (match-end 0)))) @@ -8444,7 +8665,7 @@ the documentation of `org-diary'." (regexp org-scheduled-time-regexp) (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar - d2 diff pos pos1 category tags + d2 diff pos pos1 category tags donep ee txt head) (goto-char (point-min)) (while (re-search-forward regexp nil t) @@ -8867,7 +9088,7 @@ and by additional input from the age of a schedules or deadline entry." (hdmarker (get-text-property (point) 'org-hd-marker)) (buffer (marker-buffer marker)) (pos (marker-position marker)) - dbeg dend txt n conf) + dbeg dend (n 0) conf) (with-current-buffer buffer (save-excursion (goto-char pos) @@ -8876,10 +9097,9 @@ and by additional input from the age of a schedules or deadline entry." dend (org-end-of-subtree t)) (setq dbeg (point-at-bol) dend (min (point-max) (1+ (point-at-eol))))) - (setq txt (buffer-substring dbeg dend)))) - (while (string-match "^[ \t]*\n" txt) (setq txt (replace-match "" t t txt))) - (setq n (length (split-string txt "\n")) - conf (or (eq t org-agenda-confirm-kill) + (goto-char dbeg) + (while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n))))) + (setq conf (or (eq t org-agenda-confirm-kill) (and (numberp org-agenda-confirm-kill) (> n org-agenda-confirm-kill)))) (and conf @@ -8887,12 +9107,64 @@ and by additional input from the age of a schedules or deadline entry." (format "Delete entry with %d lines in buffer \"%s\"? " n (buffer-name buffer)))) (error "Abort")) - ;; FIXME: if we kill an entire subtree, should we not find all - ;; lines coming from the subtree? - (save-excursion (org-agenda-change-all-lines "" hdmarker)) + (org-remove-subtree-entries-from-agenda buffer dbeg dend) (with-current-buffer buffer (delete-region dbeg dend)) (message "Agenda item and source killed"))) +(defun org-agenda-archive () + "Kill the entry or subtree belonging to the current agenda entry." + (interactive) + (let* ((marker (or (get-text-property (point) 'org-marker) + (org-agenda-error))) + (hdmarker (get-text-property (point) 'org-hd-marker)) + (buffer (marker-buffer marker)) + (pos (marker-position marker)) + dbeg dend txt n conf) + (with-current-buffer buffer + (if (org-mode-p) + (save-excursion + (goto-char pos) + (org-remove-subtree-entries-from-agenda) + (org-back-to-heading t) + (org-archive-subtree)) + (error "Archiving works only in Org-mode files"))))) + +(defun org-remove-subtree-entries-from-agenda (&optional buf beg end) + "Remove all lines in the agenda that correspond to a given subtree. +The subtree is the one in buffer BUF, starting at BEG and ending at END. +If this information is not given, the function uses the tree at point." + (let ((buf (or buf (current-buffer))) m p) + (save-excursion + (unless (and beg end) + (org-back-to-heading t) + (setq beg (point)) + (org-end-of-subtree t) + (setq end (point))) + (set-buffer (get-buffer org-agenda-buffer-name)) + (save-excursion + (goto-char (point-max)) + (beginning-of-line 1) + (while (not (bobp)) + (when (and (setq m (get-text-property (point) 'org-marker)) + (equal buf (marker-buffer m)) + (setq p (marker-position m)) + (>= p beg) + (<= p end)) + (let (buffer-read-only) + (delete-region (point-at-bol) (1+ (point-at-eol))))) + (beginning-of-line 0)))))) + +(defun org-agenda-open-link () + "Follow the link in the current line, if any." + (interactive) + (let ((eol (point-at-eol))) + (save-excursion + (if (or (re-search-forward org-bracket-link-regexp eol t) + (re-search-forward org-angle-link-re eol t) + (re-search-forward org-plain-link-re eol t)) + (call-interactively 'org-open-at-point) + (error "No link in current line"))))) + (defun org-agenda-switch-to (&optional delete-other-windows) "Go to the Org-mode file which contains the item at point." (interactive) @@ -9137,14 +9409,34 @@ the tags of the current headline come last." (goto-char pos) (if (not (org-at-timestamp-p)) (error "Cannot find time stamp")) - (org-timestamp-change arg (or what 'day)) - (message "Time stamp changed to %s" org-last-changed-timestamp)))) + (org-timestamp-change arg (or what 'day))) + (org-agenda-overlay-new-time marker org-last-changed-timestamp) + (message "Time stamp changed to %s" org-last-changed-timestamp))) (defun org-agenda-date-earlier (arg &optional what) "Change the date of this item to one day earlier." (interactive "p") (org-agenda-date-later (- arg) what)) + +(defun org-agenda-overlay-new-time (marker stamp) + (let ((buffer-read-only nil) + ovs ov) + (setq stamp (concat " => " stamp)) + (save-excursion + (goto-char (point-max)) + (while (not (bobp)) + (when (equal marker (get-text-property (point) 'org-marker)) + ;; remove any old overlays + (org-find-overlays 'org-new-date (1- (point-at-eol)) 'delete) + ;; put a new overlay + (move-to-column (- (window-width) (length stamp)) t) + (setq ov (org-make-overlay (1- (point)) (point-at-eol))) + (org-overlay-put ov 'org-new-date t) + (org-overlay-display ov stamp 'secondary-selection) + (beginning-of-line 1)) + (beginning-of-line 0))))) + (defun org-agenda-date-prompt (arg) "Change the date of this item. Date is prompted for, with default today. The prefix ARG is passed to the `org-time-stamp' command and can therefore @@ -9451,12 +9743,14 @@ MATCH can contain positive and negative selection of tags, like org-last-tags-completion-table)) (setq match (completing-read "Match: " 'org-tags-completion-function nil nil nil - 'org-tags-history))) ; FIXME: SHould we have a separate history for this? + 'org-tags-history))) ; FIXME: Separate history for this? ;; Parse the string and create a lisp form - (let ((match0 match) minus tag mm + (let ((match0 match) + (re "^&?\\([-+:]\\)?\\({[^}]+}\\|[A-Za-z_@0-9]+\\)") + minus tag mm tagsmatch todomatch tagsmatcher todomatcher kwd matcher - orterms term orlist) + orterms term orlist re-p) (if (string-match "/+" match) ;; match contains also a todo-matching request (setq tagsmatch (substring match 0 (match-beginning 0)) @@ -9469,12 +9763,17 @@ MATCH can contain positive and negative selection of tags, like (setq tagsmatcher t) (setq orterms (org-split-string tagsmatch "|") orlist nil) (while (setq term (pop orterms)) - (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_@0-9]+\\)" term) + (while (and (equal (substring term -1) "\\") orterms) + (setq term (concat term "|" (pop orterms)))) ; repair bad split + (while (string-match re term) (setq minus (and (match-end 1) (equal (match-string 1 term) "-")) tag (match-string 2 term) term (substring term (match-end 0)) - mm (list 'member (downcase tag) 'tags-list) + re-p (equal (string-to-char tag) ?{) + mm (if re-p + `(org-match-any-p ,(substring tag 1 -1) tags-list) + `(member ,(downcase tag) tags-list)) mm (if minus (list 'not mm) mm)) (push mm tagsmatcher)) (push (if (> (length tagsmatcher) 1) @@ -9484,17 +9783,20 @@ MATCH can contain positive and negative selection of tags, like (setq tagsmatcher nil)) (setq tagsmatcher (if (> (length orlist) 1) (cons 'or orlist) (car orlist)))) - ;; Make the todo matcher ;; FIXME: reduce syntax richness? + ;; Make the todo matcher (if (or (not todomatch) (not (string-match "\\S-" todomatch))) (setq todomatcher t) (setq orterms (org-split-string todomatch "|") orlist nil) (while (setq term (pop orterms)) - (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_@0-9]+\\)" term) + (while (string-match re term) (setq minus (and (match-end 1) (equal (match-string 1 term) "-")) kwd (match-string 2 term) + re-p (equal (string-to-char kwd) ?{) term (substring term (match-end 0)) - mm (list 'equal 'todo kwd) + mm (if re-p + `(string-match ,(substring kwd 1 -1) todo) + (list 'equal 'todo kwd)) mm (if minus (list 'not mm) mm)) (push mm todomatcher)) (push (if (> (length todomatcher) 1) @@ -9511,6 +9813,11 @@ MATCH can contain positive and negative selection of tags, like tagsmatcher)) (cons match0 matcher))) +(defun org-match-any-p (re list) + "Does re match any element of list?" + (setq list (mapcar (lambda (x) (string-match re x)) list)) + (delq nil list)) + ;;;###autoload (defun org-tags-view (&optional todo-only match) "Show all headlines for all `org-agenda-files' matching a TAGS criterion. @@ -10448,8 +10755,8 @@ onto the ring." (defun org-follow-wl-link (folder article) "Follow a Wanderlust link to FOLDER and ARTICLE." (setq article (org-add-angle-brackets article)) - (wl-summary-goto-folder-subr folder 'no-sync t nil t) - (if article (wl-summary-jump-to-msg-by-message-id article ">")) + (wl-summary-goto-folder-subr folder 'no-sync t nil t nil nil) + (if article (wl-summary-jump-to-msg-by-message-id article)) (wl-summary-redisplay)) (defun org-follow-rmail-link (folder article) @@ -10818,8 +11125,12 @@ For file links, arg negates `org-context-in-file-links'." (let* ((msgnum (wl-summary-message-number)) (message-id (elmo-message-field wl-summary-buffer-elmo-folder msgnum 'message-id)) - (wl-message-entity (elmo-msgdb-overview-get-entity - msgnum (wl-summary-buffer-msgdb))) + (wl-message-entity + (if (fboundp 'elmo-message-entity) + (elmo-message-entity + wl-summary-buffer-elmo-folder msgnum) + (elmo-msgdb-overview-get-entity + msgnum (wl-summary-buffer-msgdb)))) (author (wl-summary-line-from)) ; FIXME: correct? (subject "???")) ; FIXME: (setq message-id (org-remove-angle-brackets message-id)) @@ -10863,7 +11174,7 @@ For file links, arg negates `org-context-in-file-links'." link (org-make-link cpltxt)))) ((memq major-mode '(gnus-summary-mode gnus-article-mode)) - (require 'gnus-sum) + (require 'gnus-sum) ; FIXME: I don't think this is needed, actually (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary)) (gnus-summary-beginning-of-article) (let* ((group (car gnus-article-current)) @@ -11376,13 +11687,21 @@ See also the variable `org-reverse-note-order'." (if (not spos) (throw 'quit nil)) ; return nil to show we did ; not handle this note (goto-char spos) - (cond ((bobp) - ;; Put it at the start or end, as level 2 + (cond ((and (bobp) (not reversed)) + ;; Put it at the end, as level 2 (save-restriction (widen) - (goto-char (if reversed (point-min) (point-max))) + (goto-char (point-max)) (if (not (bolp)) (newline)) (org-paste-subtree 2 txt))) + ((and (bobp) reversed) + ;; Put it at the start, as level 1 + (save-restriction + (widen) + (goto-char (point-min)) + (re-search-forward "^\\*" nil t) + (beginning-of-line 1) + (org-paste-subtree 1 txt))) ((and (org-on-heading-p nil) (not current-prefix-arg)) ;; Put it below this entry, at the beg/end of the subtree (org-back-to-heading) @@ -12308,25 +12627,62 @@ In particular, this does handle wide and invisible characters." (if (not (org-at-table-p)) (beginning-of-line 0)) (move-to-column col))) -(defun org-table-sort-lines (beg end numericp) - "Sort table lines in region. -Point and mark define the first and last line to include. Both point and -mark should be in the column that is used for sorting. For example, to -sort according to column 3, put the mark in the first line to sort, in -table column 3. Put point into the last line to be included in the sorting, -also in table column 3. The command will prompt for the sorting method -\(n for numerical, a for alphanumeric)." - (interactive "r\nsSorting method: [n]=numeric [a]=alpha: ") - (setq numericp (string-match "[nN]" numericp)) - (org-table-align) ;; Just to be safe - (let* (bcol ecol cmp column lns) - (goto-char beg) +(defun org-table-sort-lines (with-case &optional sorting-type) + "Sort table lines according to the column at point. + +The position of point indicates the column to be used for +sorting, and the range of lines is the range between the nearest +horizontal separator lines, or the entire table of no such lines +exist. If point is before the first column, you will be prompted +for the sorting column. If there is an active region, the mark +specifies the first line and the sorting column, while point +should be in the last line to be included into the sorting. + +The command then prompts for the sorting type which can be +alphabetically, numerically, or by time (as given in a time stamp +in the field). Sorting in reverse order is also possible. + +With prefix argument WITH-CASE, alphabetic sorting will be case-sensitive. + +If SORTING-TYPE is specified when this function is called from a Lisp +program, no prompting will take place. SORTING-TYPE must be a character, +any of (?a ?A ?n ?N ?t ?T) where the capital letter indicate that sorting +should be done in reverse order." + (interactive "P") + (let* ((thisline (org-current-line)) + (thiscol (org-table-current-column)) + beg end bcol ecol tend tbeg column lns pos) + (when (equal thiscol 0) + (if (interactive-p) + (setq thiscol + (string-to-number + (read-string "Use column N for sorting: "))) + (setq thiscol 1)) + (org-table-goto-column thiscol)) (org-table-check-inside-data-field) - (setq column (org-table-current-column) - beg (move-marker (make-marker) (point-at-bol))) - (goto-char end) - (org-table-check-inside-data-field) - (setq end (move-marker (make-marker) (1+ (point-at-eol)))) + (if (org-region-active-p) + (progn + (setq beg (region-beginning) end (region-end)) + (goto-char beg) + (setq column (org-table-current-column) + beg (point-at-bol)) + (goto-char end) + (setq end (point-at-bol 2))) + (setq column (org-table-current-column) + pos (point) + tbeg (org-table-begin) + tend (org-table-end)) + (if (re-search-backward org-table-hline-regexp tbeg t) + (setq beg (point-at-bol 2)) + (goto-char tbeg) + (setq beg (point-at-bol 1))) + (goto-char pos) + (if (re-search-forward org-table-hline-regexp tend t) + (setq beg (point-at-bol 0)) + (goto-char tend) + (setq end (point-at-bol)))) + (setq beg (move-marker (make-marker) beg) + end (move-marker (make-marker) end)) (untabify beg end) (goto-char beg) (org-table-goto-column column) @@ -12335,22 +12691,17 @@ also in table column 3. The command will prompt for the sorting method (org-table-goto-column (1+ column)) (skip-chars-backward "^|") (setq ecol (1- (current-column))) - (setq cmp (if numericp - (lambda (a b) (< (car a) (car b))) - (lambda (a b) (string< (car a) (car b))))) + (org-table-goto-column column) (setq lns (mapcar (lambda(x) (cons (org-trim (substring x bcol ecol)) x)) (org-split-string (buffer-substring beg end) "\n"))) - (if numericp - (setq lns (mapcar (lambda(x) - (cons (string-to-number (car x)) (cdr x))) - lns))) + (setq lns (org-do-sort lns "Table" with-case sorting-type)) (delete-region beg end) (move-marker beg nil) (move-marker end nil) - (insert (mapconcat 'cdr (setq lns (sort lns cmp)) "\n") "\n") - (message "%d lines sorted %s based on column %d" - (length lns) - (if numericp "numerically" "alphabetically") column))) + (insert (mapconcat 'cdr lns "\n") "\n") + (goto-line thisline) + (org-table-goto-column thiscol) + (message "%d lines sorted, based on column %d" (length lns) column))) (defun org-table-cut-region (beg end) "Copy region in table to the clipboard and blank all relevant fields." @@ -13783,6 +14134,7 @@ overwritten, and the table is not marked as requiring realignment." (defconst org-export-plist-vars '((:language . org-export-default-language) + (:customtime . org-display-custom-times) (:headline-levels . org-export-headline-levels) (:section-numbers . org-export-with-section-numbers) (:table-of-contents . org-export-with-toc) @@ -14271,6 +14623,7 @@ translations. There is currently no way for users to extend this.") (erase-buffer) (insert string) (let ((org-inhibit-startup t)) (org-mode)) + (untabify (point-min) (point-max)) ;; Get rid of archived trees (when (not (eq org-export-with-archived-trees t)) @@ -14419,6 +14772,7 @@ underlined headlines. The default is 3." (buffer-substring (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 @@ -14540,6 +14894,8 @@ underlined headlines. The default is 3." (setq line (replace-match (if (match-end 3) "[\\3]" "[\\1]") t nil line))) + (when custom-times + (setq line (org-translate-time line))) (cond ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) ;; a Headline @@ -15479,7 +15835,8 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (format "@%s @" (match-string 1 s))) (format " @%s@" - (substring (match-string 3 s) 1 -1))) + (substring + (org-translate-time (match-string 3 s)) 1 -1))) s (substring s (match-end 0))))) ;; Line break if line started and ended with time stamp stuff (if (not r) @@ -16270,6 +16627,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (define-key org-mode-map [(tab)] 'org-cycle) (define-key org-mode-map [(control tab)] 'org-force-cycle-archived) (define-key org-mode-map [(meta tab)] 'org-complete) +(define-key org-mode-map "\M-\C-i" 'org-complete) ;; The following line is necessary under Suse GNU/Linux (unless (featurep 'xemacs) (define-key org-mode-map [S-iso-lefttab] 'org-shifttab)) @@ -16300,7 +16658,6 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (when (or (featurep 'xemacs) ;; because XEmacs supports multi-device stuff (not window-system)) - (define-key org-mode-map "\M-\C-i" 'org-complete) (define-key org-mode-map "\C-c\C-xc" 'org-table-copy-down) (define-key org-mode-map "\C-c\C-xM" 'org-insert-todo-heading) (define-key org-mode-map "\C-c\C-xm" 'org-meta-return) @@ -16354,29 +16711,29 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (define-key org-mode-map [(control ?,)] 'org-cycle-agenda-files) (define-key org-mode-map "\C-c[" 'org-agenda-file-to-front) (define-key org-mode-map "\C-c]" 'org-remove-file) -(define-key org-mode-map "\C-c-" 'org-table-insert-hline) -(define-key org-mode-map "\C-c^" 'org-table-sort-lines) -(define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) -(define-key org-mode-map "\C-c#" 'org-update-checkbox-count) -(define-key org-mode-map "\C-m" 'org-return) -(define-key org-mode-map "\C-c?" 'org-table-current-column) -(define-key org-mode-map "\C-c " 'org-table-blank-field) -(define-key org-mode-map "\C-c+" 'org-table-sum) -(define-key org-mode-map "\C-c=" 'org-table-eval-formula) -(define-key org-mode-map "\C-c'" 'org-table-edit-formulas) -(define-key org-mode-map "\C-c`" 'org-table-edit-field) -(define-key org-mode-map "\C-c|" 'org-table-create-or-convert-from-region) -(define-key org-mode-map "\C-c*" 'org-table-recalculate) -(define-key org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks) -(define-key org-mode-map "\C-c~" 'org-table-create-with-table.el) -(define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region) -(define-key org-mode-map "\C-c\C-e" 'org-export) -(define-key org-mode-map "\C-c:" 'org-toggle-fixed-width-section) +(define-key org-mode-map "\C-c-" 'org-table-insert-hline) +(define-key org-mode-map "\C-c^" 'org-sort) +(define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) +(define-key org-mode-map "\C-c#" 'org-update-checkbox-count) +(define-key org-mode-map "\C-m" 'org-return) +(define-key org-mode-map "\C-c?" 'org-table-current-column) +(define-key org-mode-map "\C-c " 'org-table-blank-field) +(define-key org-mode-map "\C-c+" 'org-table-sum) +(define-key org-mode-map "\C-c=" 'org-table-eval-formula) +(define-key org-mode-map "\C-c'" 'org-table-edit-formulas) +(define-key org-mode-map "\C-c`" 'org-table-edit-field) +(define-key org-mode-map "\C-c|" 'org-table-create-or-convert-from-region) +(define-key org-mode-map "\C-c*" 'org-table-recalculate) +(define-key org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks) +(define-key org-mode-map "\C-c~" 'org-table-create-with-table.el) +(define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region) +(define-key org-mode-map "\C-c\C-e" 'org-export) +(define-key org-mode-map "\C-c:" 'org-toggle-fixed-width-section) -(define-key org-mode-map "\C-c\C-x\C-k" 'org-cut-special) -(define-key org-mode-map "\C-c\C-x\C-w" 'org-cut-special) -(define-key org-mode-map "\C-c\C-x\M-w" 'org-copy-special) -(define-key org-mode-map "\C-c\C-x\C-y" 'org-paste-special) +(define-key org-mode-map "\C-c\C-x\C-k" 'org-cut-special) +(define-key org-mode-map "\C-c\C-x\C-w" 'org-cut-special) +(define-key org-mode-map "\C-c\C-x\M-w" 'org-copy-special) +(define-key org-mode-map "\C-c\C-x\C-y" 'org-paste-special) (define-key org-mode-map "\C-c\C-x\C-t" 'org-toggle-time-stamp-overlays) (define-key org-mode-map "\C-c\C-x\C-i" 'org-clock-in) @@ -16859,6 +17216,8 @@ See the individual commands for more information." ["Demote Heading" org-metaright (not (org-at-table-p))] ["Demote Subtree" org-shiftmetaright (not (org-at-table-p))] "--" + ["Sort Region/Children" org-sort (not (org-at-table-p))] + "--" ["Convert to odd levels" org-convert-to-odd-levels t] ["Convert to odd/even levels" org-convert-to-oddeven-levels t]) ("Archive" @@ -17169,6 +17528,14 @@ return nil." (goto-char pos) (move-to-column col))) +(defun org-replace-escapes (string table) + ;; FIXME: document and make safer + (let (e) + (while (setq e (pop table)) + (while (string-match (car e) string) + (setq string (replace-match (cdr e) t t string)))) + string)) + ;; Paragraph filling stuff. ;; We want this to be just right, so use the full arsenal. @@ -17186,7 +17553,7 @@ return nil." ;; But only if the user has not turned off tables or fixed-width regions (org-set-local 'auto-fill-inhibit-regexp - (concat "\\*\\|#" + (concat "\\*\\|#\\+" "\\|[ \t]*" org-keyword-time-regexp (if (or org-enable-table-editor org-enable-fixed-width-editor) (concat @@ -17220,7 +17587,8 @@ return nil." "Return a fill prefix for org-mode files. In particular, this makes sure hanging paragraphs for hand-formatted lists work correctly." - (if (looking-at " *\\([-*+] \\|[0-9]+[.)] \\)?") +;;FIXME (if (looking-at " *\\([-*+] \\|[0-9]+[.)] \\)?") + (if (looking-at " *\\([-*+] \\|[0-9]+[.)] \\)?\|#\\+[ \t]+") (make-string (- (match-end 0) (match-beginning 0)) ?\ ))) ;; Functions needed for Emacs/XEmacs region compatibility diff --git a/org.pdf b/org.pdf index 3b57adfba..e501774f0 100644 Binary files a/org.pdf and b/org.pdf differ diff --git a/org.texi b/org.texi index db8f20c39..6b0097c63 100644 --- a/org.texi +++ b/org.texi @@ -3,7 +3,7 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 4.56 +@set VERSION 4.57 @set DATE November 2006 @dircategory Emacs @@ -730,6 +730,15 @@ Yank subtree from kill ring. This does modify the level of the subtree to make sure the tree fits in nicely at the yank position. The yank level can also be specified with a prefix arg, or by yanking after a headline marker like @samp{****}. +@kindex C-c ^ +@item C-c ^ +Sort same-level entries. When there is an active region, all entries in +the region will be sorted. Otherwise the children of the current +headline are sorted. The command prompts for the sorting method, which +can be alphabetically, numerically, by time (using the first time stamp +in each entry), and each of these in reverse order. With a @kbd{C-u} +prefix, sorting will be case-sensitive. With two @kbd{C-u C-u} +prefixes, duplicate entries will also be removed. @end table @cindex region, active @@ -1126,10 +1135,15 @@ is created above the current line. @kindex C-c ^ @item C-c ^ -Sort the table lines in the region. Point and mark must be in the first -and last line to be included, and must be in the column that should be -used for sorting. The command prompts for numerical versus -alphanumerical sorting. +Sort the table lines in the region. The position of point indicates the +column to be used for sorting, and the range of lines is the range +between the nearest horizontal separator lines, or the entire table. If +point is before the first column, you will be prompted for the sorting +column. If there is an active region, the mark specifies the first line +and the sorting column, while point should be in the last line to be +included into the sorting. The command prompts for the sorting type +(alphabetically, numerically, or by time). When called with a prefix +argument, alphabetic sorting will be case-sensitive. @tsubheading{Regions} @kindex C-c C-x M-w @@ -2042,7 +2056,7 @@ sparse tree with the matches. @end table As a degenerate case, a file link with an empty file name can be used -to search the current file. For example, @code{} does +to search the current file. For example, @code{[[file:::find me]]} does a search for @samp{find me} in the current file, just as @samp{[[find me]]} would. @@ -2114,7 +2128,7 @@ When you call @kbd{M-x remember} to remember something, org will prompt for a key to select the template and then prepare the buffer like @example * TODO - + [[file:link to where you called remember]] @end example @noindent or @@ -2122,7 +2136,7 @@ for a key to select the template and then prepare the buffer like @example * [2006-03-21 Tue 15:37] - + [[file:link to where you called remember]] @end example @noindent See the variable @code{org-remember-templates} for more details. @@ -2554,10 +2568,12 @@ example: If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you are planning to start working on that task on the given date. So this is not about recording an event, but about planning your work. The -headline will be listed under the given date. In addition, a reminder -that the scheduled date has passed will be present in the compilation -for @emph{today}, until the entry is marked DONE. I.e., the task will -automatically be forwarded until completed. +headline will be listed under the given date@footnote{It will still be +listed on that date after it has been marked DONE. If you don't like +this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In +addition, a reminder that the scheduled date has passed will be present +in the compilation for @emph{today}, until the entry is marked DONE. +I.e., the task will automatically be forwarded until completed. @example *** TODO Call Trillian for a date on New Years Eve. @@ -2575,7 +2591,7 @@ continuing until the entry is marked DONE. An example: @example *** TODO write article about the Earth for the Guide - The editor in charge is + The editor in charge is [[bbdb:Ford Prefect]] DEADLINE: <2004-02-29 Sun> @end example @item Time stamp with CLOSED keyword @@ -2707,6 +2723,7 @@ specified with the current date and time. For example: 22 sept 0:34 --> currentyear-09-22 0:34 12 --> currentyear-currentmonth-12 Fri --> nearest Friday (today or later) + +4 --> 4 days from now (if +N is the only thing given) @end example The function understands English month and weekday abbreviations. If @@ -3155,6 +3172,12 @@ Select @samp{:WORK:}-tagged TODO lines that are either @samp{WAITING} or @samp{NEXT}. @end table +@cindex regular expressions, with tags search +Any element of the tag/todo match can be a regular expression - in this +case it must be enclosed in curly braces. For example, +@samp{WORK+@{^BOSS.*@}} matches headlines that contain the tag +@samp{WORK} and any tag @i{starting} with @samp{BOSS}. + @node Agenda views, Embedded LaTeX, Tags, Top @chapter Agenda Views @cindex agenda views @@ -3686,6 +3709,10 @@ 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}. +@kindex $ +@item $ +Archive the subtree corresponding to the current headline. + @kindex T @item T Show all tags associated with the current item. Because of @@ -5463,10 +5490,10 @@ caused by the preparations for the 22.1 release. In the mean time, @item @file{org-blog.el} by David O'Toole A blogging plug-in for @file{org-publish.el}.@* @url{http://dto.freeshell.org/notebook/OrgMode.html}. -@cindex @file{org-blogging.el} -@item @file{org-blogging.el} by Bastien Guerry +@cindex @file{blorg.el} +@item @file{blorg.el} by Bastien Guerry Publish Org-mode files as -blogs. @url{http://www.cognition.ens.fr/~guerry/org-blogging.html}. +blogs. @url{http://www.cognition.ens.fr/~guerry/blorg.html}. @end table @node Dynamic blocks, , Extensions, Extensions and Hacking diff --git a/orgcard.pdf b/orgcard.pdf index cb06bbcf4..70f4bf243 100644 Binary files a/orgcard.pdf and b/orgcard.pdf differ diff --git a/orgcard.tex b/orgcard.tex index 141e78634..e744d634d 100644 --- a/orgcard.tex +++ b/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.56} +\def\orgversionnumber{4.57} \def\year{2006} % %**start of header @@ -613,6 +613,7 @@ To set categories, add lines like$^2$: \key{digit argument}{0-9} \key{change state of current TODO item}{t} \key{kill item and source}{C-k} +\key{archive the subtree}{\$} \key{show tags of current headline}{T} \key{set tags for current headline}{:} \key{toggle ARCHIVE tag}{a} @@ -624,10 +625,13 @@ To set categories, add lines like$^2$: \key{change timestamp to today}{>} \key{insert new entry into diary}{i} -\key{Start the clock on current item (clock-in)}{I} -\key{Stop the clock (clock-out)}{O} -\key{Cancel current clock}{X} +\key{start the clock on current item (clock-in)}{I} +\key{stop the clock (clock-out)}{O} +\key{cancel current clock}{X} +{\bf Misc} + +\key{Open link in current line}{C-c C-o} {\bf Calendar commands} @@ -674,20 +678,19 @@ some other place. \key{links become HTML links}{http:... etc} \key{include html tags}{@...@} -{\bf Export options} - -Include additional information for export by putting these anywhere in the -org file. Use {\tt M-TAB} completion to make sure to get the right -keywords. {\tt M-TAB} again just after keyword is complete inserts examples. - -\key{the title to be shown}{\#+TITLE:} -\key{the author}{\#+AUTHOR:} -\key{authors email address}{\#+EMAIL:} -\key{language code for html}{\#+LANGUAGE:} -\key{free text description of file}{\#+TEXT:} -\key{... which can carry over multiple lines}{\#+TEXT:} -%\key{settings for the export process - see below}{\#+OPTIONS:} -\key{settings for the export process}{\#+OPTIONS:} +%{\bf Export options} +% +%Include additional information for export by putting these anywhere in the +%org file. Use {\tt M-TAB} completion to make sure to get the right +%keywords. {\tt M-TAB} again just after keyword is complete inserts examples. +% +%\key{the title to be shown}{\#+TITLE:} +%\key{the author}{\#+AUTHOR:} +%\key{authors email address}{\#+EMAIL:} +%\key{language code for html}{\#+LANGUAGE:} +%\key{free text description of file}{\#+TEXT:} +%\key{... which can carry over multiple lines}{\#+TEXT:} +%\key{settings for the export process}{\#+OPTIONS:} %\key{set number of headline levels for export}{H:2} %\key{turn on/off section numbers}{num:t}