diff options
| author | Stefan Monnier | 2010-12-12 23:11:49 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-12 23:11:49 -0500 |
| commit | 7a600d54c026061eee6db4e499802f524e7ebe00 (patch) | |
| tree | 684aa988f06de977a52027ee5e1262c37f7678eb | |
| parent | f07a954eeb0930029104402e706165bf89853576 (diff) | |
| parent | fdbb4d85ffa2ac30cb7ac0ceea6f12d0c8054d6c (diff) | |
| download | emacs-7a600d54c026061eee6db4e499802f524e7ebe00.tar.gz emacs-7a600d54c026061eee6db4e499802f524e7ebe00.zip | |
Merge from trunk
122 files changed, 4417 insertions, 2803 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-12-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * make-dist: Exclude etc/*.pyc. | ||
| 4 | |||
| 1 | 2010-12-10 Andreas Schwab <schwab@linux-m68k.org> | 5 | 2010-12-10 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 6 | ||
| 3 | * configure.in: Don't double machfile in final message. | 7 | * configure.in: Don't double machfile in final message. |
| @@ -14910,12 +14910,17 @@ if test "${HAVE_GTK}" = "yes"; then | |||
| 14910 | USE_X_TOOLKIT=GTK | 14910 | USE_X_TOOLKIT=GTK |
| 14911 | fi | 14911 | fi |
| 14912 | 14912 | ||
| 14913 | and_machfile= | ||
| 14914 | if test -n "$machfile"; then | ||
| 14915 | and_machfile=" and \`${machfile}'" | ||
| 14916 | fi | ||
| 14917 | |||
| 14913 | echo " | 14918 | echo " |
| 14914 | Configured for \`${canonical}'. | 14919 | Configured for \`${canonical}'. |
| 14915 | 14920 | ||
| 14916 | Where should the build process find the source code? ${srcdir} | 14921 | Where should the build process find the source code? ${srcdir} |
| 14917 | What operating system and machine description files should Emacs use? | 14922 | What operating system and machine description files should Emacs use? |
| 14918 | \`${opsysfile}'${machfile:+ and \`${machfile}'} | 14923 | \`${opsysfile}'${and_machfile} |
| 14919 | What compiler should emacs be built with? ${CC} ${CFLAGS} | 14924 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
| 14920 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | 14925 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
| 14921 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | 14926 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
diff --git a/configure.in b/configure.in index ed071b83475..dbced95093e 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -3638,12 +3638,17 @@ if test "${HAVE_GTK}" = "yes"; then | |||
| 3638 | USE_X_TOOLKIT=GTK | 3638 | USE_X_TOOLKIT=GTK |
| 3639 | fi | 3639 | fi |
| 3640 | 3640 | ||
| 3641 | and_machfile= | ||
| 3642 | if test -n "$machfile"; then | ||
| 3643 | and_machfile=" and \`${machfile}'" | ||
| 3644 | fi | ||
| 3645 | |||
| 3641 | echo " | 3646 | echo " |
| 3642 | Configured for \`${canonical}'. | 3647 | Configured for \`${canonical}'. |
| 3643 | 3648 | ||
| 3644 | Where should the build process find the source code? ${srcdir} | 3649 | Where should the build process find the source code? ${srcdir} |
| 3645 | What operating system and machine description files should Emacs use? | 3650 | What operating system and machine description files should Emacs use? |
| 3646 | \`${opsysfile}'${machfile:+ and \`${machfile}'} | 3651 | \`${opsysfile}'${and_machfile} |
| 3647 | What compiler should emacs be built with? ${CC} ${CFLAGS} | 3652 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
| 3648 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | 3653 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
| 3649 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} | 3654 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index b1b3b440767..174d3015291 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 2 | |||
| 3 | * org.texi (Using capture): Document using prefix arguments for | ||
| 4 | finalizing capture. | ||
| 5 | (Agenda commands): Document prefix argument for the bulk scatter | ||
| 6 | command. | ||
| 7 | (Beamer class export): Document that also overlay arguments can be | ||
| 8 | passed to the column environment. | ||
| 9 | (Template elements): Document the new entry type. | ||
| 10 | |||
| 11 | 2010-12-11 Puneeth Chaganti <punchagan@gmail.com> | ||
| 12 | |||
| 13 | * org.texi (Include files): Document :minlevel. | ||
| 14 | |||
| 15 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 16 | |||
| 17 | * org.texi (Categories): Document category icons. | ||
| 18 | |||
| 19 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 20 | |||
| 21 | * org.texi (noweb): Fix typo. | ||
| 22 | |||
| 1 | 2010-12-06 Tassilo Horn <tassilo@member.fsf.org> | 23 | 2010-12-06 Tassilo Horn <tassilo@member.fsf.org> |
| 2 | 24 | ||
| 3 | * gnus.texi (Server Commands): Point to the rest of the server | 25 | * gnus.texi (Server Commands): Point to the rest of the server |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 2df6d90cc07..9f4d1f75ede 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -14445,6 +14445,9 @@ remote system. If both Emacs and the server supports it, the | |||
| 14445 | connection will be upgraded to an encrypted @acronym{STARTTLS} | 14445 | connection will be upgraded to an encrypted @acronym{STARTTLS} |
| 14446 | connection automatically. | 14446 | connection automatically. |
| 14447 | 14447 | ||
| 14448 | @item network-only | ||
| 14449 | The same as the above, but don't do automatic @acronym{STARTTLS} upgrades. | ||
| 14450 | |||
| 14448 | @findex nntp-open-tls-stream | 14451 | @findex nntp-open-tls-stream |
| 14449 | @item nntp-open-tls-stream | 14452 | @item nntp-open-tls-stream |
| 14450 | Opens a connection to a server over a @dfn{secure} channel. To use | 14453 | Opens a connection to a server over a @dfn{secure} channel. To use |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index af7a4b48032..5a676786fdd 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | @setfilename ../../info/org | 4 | @setfilename ../../info/org |
| 5 | @settitle The Org Manual | 5 | @settitle The Org Manual |
| 6 | 6 | ||
| 7 | @set VERSION 7.3 | 7 | @set VERSION 7.4 |
| 8 | @set DATE November 2010 | 8 | @set DATE December 2010 |
| 9 | 9 | ||
| 10 | @c Use proper quote and backtick for code sections in PDF output | 10 | @c Use proper quote and backtick for code sections in PDF output |
| 11 | @c Cf. Texinfo manual 14.2 | 11 | @c Cf. Texinfo manual 14.2 |
| @@ -21,41 +21,237 @@ | |||
| 21 | @c %**end of header | 21 | @c %**end of header |
| 22 | @finalout | 22 | @finalout |
| 23 | 23 | ||
| 24 | @c Macro definitions | 24 | |
| 25 | @c ----------------------------------------------------------------------------- | ||
| 26 | |||
| 27 | @c Macro definitions for commands and keys | ||
| 28 | @c ======================================= | ||
| 29 | |||
| 30 | @c The behavior of the key/command macros will depend on the flag cmdnames | ||
| 31 | @c When set, commands names are shown. When clear, they are not shown. | ||
| 32 | |||
| 33 | @set cmdnames | ||
| 34 | |||
| 35 | @c Below we define the following macros for Org key tables: | ||
| 36 | |||
| 37 | @c orgkey{key} A key item | ||
| 38 | @c orgcmd{key,cmd} Key with command name | ||
| 39 | @c xorgcmd{key,cmmand} Key with command name as @itemx | ||
| 40 | @c orgcmdnki{key,cmd} Like orgcmd, but do not index the key | ||
| 41 | @c orgcmdtkc{text,key,cmd} Like orgcmd,special text instead of key | ||
| 42 | @c orgcmdkkc{key1,key2,cmd} Two keys with one command name, use "or" | ||
| 43 | @c orgcmdkxkc{key1,key2,cmd} Two keys with one command name, but | ||
| 44 | @c different functions, so format as @itemx | ||
| 45 | @c orgcmdkskc{key1,key2,cmd} Same as orgcmdkkc, but use "or short" | ||
| 46 | @c xorgcmdkskc{key1,key2,cmd} Same as previous, but use @itemx | ||
| 47 | @c orgcmdkkcc{key1,key2,cmd1,cmd2} Two keys and two commands | ||
| 48 | |||
| 49 | @c a key but no command | ||
| 50 | @c Inserts: @item key | ||
| 51 | @macro orgkey{key} | ||
| 52 | @kindex \key\ | ||
| 53 | @item @kbd{\key\} | ||
| 54 | @end macro | ||
| 55 | |||
| 56 | @macro xorgkey{key} | ||
| 57 | @kindex \key\ | ||
| 58 | @itemx @kbd{\key\} | ||
| 59 | @end macro | ||
| 60 | |||
| 61 | @c one key with a command | ||
| 62 | @c Inserts: @item KEY COMMAND | ||
| 25 | @macro orgcmd{key,command} | 63 | @macro orgcmd{key,command} |
| 26 | @iftex | 64 | @ifset cmdnames |
| 27 | @kindex \key\ | 65 | @kindex \key\ |
| 28 | @findex \command\ | 66 | @findex \command\ |
| 67 | @iftex | ||
| 29 | @item @kbd{\key\} @hskip 0pt plus 1filll @code{\command\} | 68 | @item @kbd{\key\} @hskip 0pt plus 1filll @code{\command\} |
| 30 | @end iftex | 69 | @end iftex |
| 31 | @ifnottex | 70 | @ifnottex |
| 71 | @item @kbd{\key\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 72 | @end ifnottex | ||
| 73 | @end ifset | ||
| 74 | @ifclear cmdnames | ||
| 75 | @kindex \key\ | ||
| 76 | @item @kbd{\key\} | ||
| 77 | @end ifclear | ||
| 78 | @end macro | ||
| 79 | |||
| 80 | @c One key with one command, formatted using @itemx | ||
| 81 | @c Inserts: @itemx KEY COMMAND | ||
| 82 | @macro xorgcmd{key,command} | ||
| 83 | @ifset cmdnames | ||
| 84 | @kindex \key\ | ||
| 85 | @findex \command\ | ||
| 86 | @iftex | ||
| 87 | @itemx @kbd{\key\} @hskip 0pt plus 1filll @code{\command\} | ||
| 88 | @end iftex | ||
| 89 | @ifnottex | ||
| 90 | @itemx @kbd{\key\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 91 | @end ifnottex | ||
| 92 | @end ifset | ||
| 93 | @ifclear cmdnames | ||
| 32 | @kindex \key\ | 94 | @kindex \key\ |
| 95 | @itemx @kbd{\key\} | ||
| 96 | @end ifclear | ||
| 97 | @end macro | ||
| 98 | |||
| 99 | @c one key with a command, bit do not index the key | ||
| 100 | @c Inserts: @item KEY COMMAND | ||
| 101 | @macro orgcmdnki{key,command} | ||
| 102 | @ifset cmdnames | ||
| 33 | @findex \command\ | 103 | @findex \command\ |
| 104 | @iftex | ||
| 105 | @item @kbd{\key\} @hskip 0pt plus 1filll @code{\command\} | ||
| 106 | @end iftex | ||
| 107 | @ifnottex | ||
| 34 | @item @kbd{\key\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | 108 | @item @kbd{\key\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) |
| 35 | @end ifnottex | 109 | @end ifnottex |
| 110 | @end ifset | ||
| 111 | @ifclear cmdnames | ||
| 112 | @item @kbd{\key\} | ||
| 113 | @end ifclear | ||
| 36 | @end macro | 114 | @end macro |
| 37 | 115 | ||
| 38 | @macro orgkey{key} | 116 | @c one key with a command, and special text to replace key in item |
| 117 | @c Inserts: @item TEXT COMMAND | ||
| 118 | @macro orgcmdtkc{text,key,command} | ||
| 119 | @ifset cmdnames | ||
| 39 | @kindex \key\ | 120 | @kindex \key\ |
| 40 | @item @kbd{\key\} | 121 | @findex \command\ |
| 122 | @iftex | ||
| 123 | @item @kbd{\text\} @hskip 0pt plus 1filll @code{\command\} | ||
| 124 | @end iftex | ||
| 125 | @ifnottex | ||
| 126 | @item @kbd{\text\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 127 | @end ifnottex | ||
| 128 | @end ifset | ||
| 129 | @ifclear cmdnames | ||
| 130 | @kindex \key\ | ||
| 131 | @item @kbd{\text\} | ||
| 132 | @end ifclear | ||
| 41 | @end macro | 133 | @end macro |
| 42 | 134 | ||
| 135 | @c two keys with one command | ||
| 136 | @c Inserts: @item KEY1 or KEY2 COMMAND | ||
| 137 | @macro orgcmdkkc{key1,key2,command} | ||
| 138 | @ifset cmdnames | ||
| 139 | @kindex \key1\ | ||
| 140 | @kindex \key2\ | ||
| 141 | @findex \command\ | ||
| 43 | @iftex | 142 | @iftex |
| 44 | @c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed} | 143 | @item @kbd{\key1\} @ @r{or} @ @kbd{\key2\} @hskip 0pt plus 1filll @code{\command\} |
| 45 | @end iftex | 144 | @end iftex |
| 46 | @macro Ie {} | 145 | @ifnottex |
| 47 | I.e., | 146 | @item @kbd{\key1\} @ @r{or} @ @kbd{\key2\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) |
| 147 | @end ifnottex | ||
| 148 | @end ifset | ||
| 149 | @ifclear cmdnames | ||
| 150 | @kindex \key1\ | ||
| 151 | @kindex \key2\ | ||
| 152 | @item @kbd{\key1\} @ @r{or} @ @kbd{\key2\} | ||
| 153 | @end ifclear | ||
| 48 | @end macro | 154 | @end macro |
| 49 | @macro ie {} | 155 | |
| 50 | i.e., | 156 | @c Two keys with one command name, but different functions, so format as |
| 157 | @c @itemx | ||
| 158 | @c Inserts: @item KEY1 | ||
| 159 | @c @itemx KEY2 COMMAND | ||
| 160 | @macro orgcmdkxkc{key1,key2,command} | ||
| 161 | @ifset cmdnames | ||
| 162 | @kindex \key1\ | ||
| 163 | @kindex \key2\ | ||
| 164 | @findex \command\ | ||
| 165 | @iftex | ||
| 166 | @item @kbd{\key1\} | ||
| 167 | @itemx @kbd{\key2\} @hskip 0pt plus 1filll @code{\command\} | ||
| 168 | @end iftex | ||
| 169 | @ifnottex | ||
| 170 | @item @kbd{\key1\} | ||
| 171 | @itemx @kbd{\key2\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 172 | @end ifnottex | ||
| 173 | @end ifset | ||
| 174 | @ifclear cmdnames | ||
| 175 | @kindex \key1\ | ||
| 176 | @kindex \key2\ | ||
| 177 | @item @kbd{\key1\} | ||
| 178 | @itemx @kbd{\key2\} | ||
| 179 | @end ifclear | ||
| 51 | @end macro | 180 | @end macro |
| 52 | @macro Eg {} | 181 | |
| 53 | E.g., | 182 | @c Same as previous, but use "or short" |
| 183 | @c Inserts: @item KEY1 or short KEY2 COMMAND | ||
| 184 | @macro orgcmdkskc{key1,key2,command} | ||
| 185 | @ifset cmdnames | ||
| 186 | @kindex \key1\ | ||
| 187 | @kindex \key2\ | ||
| 188 | @findex \command\ | ||
| 189 | @iftex | ||
| 190 | @item @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} @hskip 0pt plus 1filll @code{\command\} | ||
| 191 | @end iftex | ||
| 192 | @ifnottex | ||
| 193 | @item @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 194 | @end ifnottex | ||
| 195 | @end ifset | ||
| 196 | @ifclear cmdnames | ||
| 197 | @kindex \key1\ | ||
| 198 | @kindex \key2\ | ||
| 199 | @item @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} | ||
| 200 | @end ifclear | ||
| 54 | @end macro | 201 | @end macro |
| 55 | @macro eg {} | 202 | |
| 56 | e.g., | 203 | @c Same as previous, but use @itemx |
| 204 | @c Inserts: @itemx KEY1 or short KEY2 COMMAND | ||
| 205 | @macro xorgcmdkskc{key1,key2,command} | ||
| 206 | @ifset cmdnames | ||
| 207 | @kindex \key1\ | ||
| 208 | @kindex \key2\ | ||
| 209 | @findex \command\ | ||
| 210 | @iftex | ||
| 211 | @itemx @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} @hskip 0pt plus 1filll @code{\command\} | ||
| 212 | @end iftex | ||
| 213 | @ifnottex | ||
| 214 | @itemx @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} @tie{}@tie{}@tie{}@tie{}(@code{\command\}) | ||
| 215 | @end ifnottex | ||
| 216 | @end ifset | ||
| 217 | @ifclear cmdnames | ||
| 218 | @kindex \key1\ | ||
| 219 | @kindex \key2\ | ||
| 220 | @itemx @kbd{\key1\} @ @r{or short} @ @kbd{\key2\} | ||
| 221 | @end ifclear | ||
| 57 | @end macro | 222 | @end macro |
| 58 | 223 | ||
| 224 | @c two keys with two commands | ||
| 225 | @c Inserts: @item KEY1 COMMAND1 | ||
| 226 | @c @itemx KEY2 COMMAND2 | ||
| 227 | @macro orgcmdkkcc{key1,key2,command1,command2} | ||
| 228 | @ifset cmdnames | ||
| 229 | @kindex \key1\ | ||
| 230 | @kindex \key2\ | ||
| 231 | @findex \command1\ | ||
| 232 | @findex \command2\ | ||
| 233 | @iftex | ||
| 234 | @item @kbd{\key1\} @hskip 0pt plus 1filll @code{\command1\} | ||
| 235 | @itemx @kbd{\key2\} @hskip 0pt plus 1filll @code{\command2\} | ||
| 236 | @end iftex | ||
| 237 | @ifnottex | ||
| 238 | @item @kbd{\key1\} @tie{}@tie{}@tie{}@tie{}(@code{\command1\}) | ||
| 239 | @itemx @kbd{\key2\} @tie{}@tie{}@tie{}@tie{}(@code{\command2\}) | ||
| 240 | @end ifnottex | ||
| 241 | @end ifset | ||
| 242 | @ifclear cmdnames | ||
| 243 | @kindex \key1\ | ||
| 244 | @kindex \key2\ | ||
| 245 | @item @kbd{\key1\} | ||
| 246 | @itemx @kbd{\key2\} | ||
| 247 | @end ifclear | ||
| 248 | @end macro | ||
| 249 | @c ----------------------------------------------------------------------------- | ||
| 250 | |||
| 251 | @iftex | ||
| 252 | @c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed} | ||
| 253 | @end iftex | ||
| 254 | |||
| 59 | @c Subheadings inside a table. | 255 | @c Subheadings inside a table. |
| 60 | @macro tsubheading{text} | 256 | @macro tsubheading{text} |
| 61 | @ifinfo | 257 | @ifinfo |
| @@ -260,7 +456,6 @@ Dates and times | |||
| 260 | * Creating timestamps:: Commands which insert timestamps | 456 | * Creating timestamps:: Commands which insert timestamps |
| 261 | * Deadlines and scheduling:: Planning your work | 457 | * Deadlines and scheduling:: Planning your work |
| 262 | * Clocking work time:: Tracking how long you spend on a task | 458 | * Clocking work time:: Tracking how long you spend on a task |
| 263 | * Resolving idle time:: Resolving time if you've been idle | ||
| 264 | * Effort estimates:: Planning work effort in advance | 459 | * Effort estimates:: Planning work effort in advance |
| 265 | * Relative timer:: Notes with a running timer | 460 | * Relative timer:: Notes with a running timer |
| 266 | * Countdown timer:: Starting a countdown timer for a task | 461 | * Countdown timer:: Starting a countdown timer for a task |
| @@ -275,6 +470,12 @@ Deadlines and scheduling | |||
| 275 | * Inserting deadline/schedule:: Planning items | 470 | * Inserting deadline/schedule:: Planning items |
| 276 | * Repeated tasks:: Items that show up again and again | 471 | * Repeated tasks:: Items that show up again and again |
| 277 | 472 | ||
| 473 | Clocking work time | ||
| 474 | |||
| 475 | * Clocking commands:: Starting and stopping a clock | ||
| 476 | * The clock table:: Detailed reports | ||
| 477 | * Resolving idle time:: Resolving time when you've been idle | ||
| 478 | |||
| 278 | Capture - Refile - Archive | 479 | Capture - Refile - Archive |
| 279 | 480 | ||
| 280 | * Capture:: Capturing new stuff | 481 | * Capture:: Capturing new stuff |
| @@ -355,7 +556,7 @@ Structural markup elements | |||
| 355 | * Horizontal rules:: Make a line | 556 | * Horizontal rules:: Make a line |
| 356 | * Comment lines:: What will *not* be exported | 557 | * Comment lines:: What will *not* be exported |
| 357 | 558 | ||
| 358 | Embedded La@TeX{} | 559 | Embedded @LaTeX{} |
| 359 | 560 | ||
| 360 | * Special symbols:: Greek letters and other symbols | 561 | * Special symbols:: Greek letters and other symbols |
| 361 | * Subscripts and superscripts:: Simple syntax for raising/lowering text | 562 | * Subscripts and superscripts:: Simple syntax for raising/lowering text |
| @@ -370,7 +571,7 @@ Exporting | |||
| 370 | * The export dispatcher:: How to access exporter commands | 571 | * The export dispatcher:: How to access exporter commands |
| 371 | * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding | 572 | * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding |
| 372 | * HTML export:: Exporting to HTML | 573 | * HTML export:: Exporting to HTML |
| 373 | * LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF | 574 | * LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF |
| 374 | * DocBook export:: Exporting to DocBook | 575 | * DocBook export:: Exporting to DocBook |
| 375 | * TaskJuggler export:: Exporting to TaskJuggler | 576 | * TaskJuggler export:: Exporting to TaskJuggler |
| 376 | * Freemind export:: Exporting to Freemind mind maps | 577 | * Freemind export:: Exporting to Freemind mind maps |
| @@ -389,13 +590,13 @@ HTML export | |||
| 389 | * CSS support:: Changing the appearance of the output | 590 | * CSS support:: Changing the appearance of the output |
| 390 | * JavaScript support:: Info and Folding in a web browser | 591 | * JavaScript support:: Info and Folding in a web browser |
| 391 | 592 | ||
| 392 | La@TeX{} and PDF export | 593 | @LaTeX{} and PDF export |
| 393 | 594 | ||
| 394 | * LaTeX/PDF export commands:: Which key invokes which commands | 595 | * LaTeX/PDF export commands:: Which key invokes which commands |
| 395 | * Header and sectioning:: Setting up the export file structure | 596 | * Header and sectioning:: Setting up the export file structure |
| 396 | * Quoting LaTeX code:: Incorporating literal La@TeX{} code | 597 | * Quoting LaTeX code:: Incorporating literal @LaTeX{} code |
| 397 | * Tables in LaTeX export:: Options for exporting tables to La@TeX{} | 598 | * Tables in LaTeX export:: Options for exporting tables to @LaTeX{} |
| 398 | * Images in LaTeX export:: How to insert figures into La@TeX{} output | 599 | * Images in LaTeX export:: How to insert figures into @LaTeX{} output |
| 399 | * Beamer class export:: Turning the file into a presentation | 600 | * Beamer class export:: Turning the file into a presentation |
| 400 | 601 | ||
| 401 | DocBook export | 602 | DocBook export |
| @@ -506,7 +707,7 @@ Hacking | |||
| 506 | * Add-on packages:: Available extensions | 707 | * Add-on packages:: Available extensions |
| 507 | * Adding hyperlink types:: New custom link types | 708 | * Adding hyperlink types:: New custom link types |
| 508 | * Context-sensitive commands:: How to add functionality to such commands | 709 | * Context-sensitive commands:: How to add functionality to such commands |
| 509 | * Tables in arbitrary syntax:: Orgtbl for La@TeX{} and other programs | 710 | * Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs |
| 510 | * Dynamic blocks:: Automatically filled blocks | 711 | * Dynamic blocks:: Automatically filled blocks |
| 511 | * Special agenda views:: Customized views | 712 | * Special agenda views:: Customized views |
| 512 | * Extracting agenda information:: Postprocessing of agenda information | 713 | * Extracting agenda information:: Postprocessing of agenda information |
| @@ -567,14 +768,14 @@ As a project planning environment, Org works by adding metadata to outline | |||
| 567 | nodes. Based on this data, specific entries can be extracted in queries and | 768 | nodes. Based on this data, specific entries can be extracted in queries and |
| 568 | create dynamic @i{agenda views}. | 769 | create dynamic @i{agenda views}. |
| 569 | 770 | ||
| 570 | Org mode contains the Org Babel environment which allows to work with | 771 | Org mode contains the Org Babel environment which allows you to work with |
| 571 | embedded source code block in a file, to facilitate code evaluation, | 772 | embedded source code blocks in a file, to facilitate code evaluation, |
| 572 | documentation, and tangling. | 773 | documentation, and tangling. |
| 573 | 774 | ||
| 574 | Org's automatic, context-sensitive table editor with spreadsheet | 775 | Org's automatic, context-sensitive table editor with spreadsheet |
| 575 | capabilities can be integrated into any major mode by activating the | 776 | capabilities can be integrated into any major mode by activating the |
| 576 | minor Orgtbl mode. Using a translation step, it can be used to maintain | 777 | minor Orgtbl mode. Using a translation step, it can be used to maintain |
| 577 | tables in arbitrary file types, for example in La@TeX{}. The structure | 778 | tables in arbitrary file types, for example in @LaTeX{}. The structure |
| 578 | editing and list creation capabilities can be used outside Org with | 779 | editing and list creation capabilities can be used outside Org with |
| 579 | the minor Orgstruct mode. | 780 | the minor Orgstruct mode. |
| 580 | 781 | ||
| @@ -591,7 +792,7 @@ ends, for example: | |||
| 591 | @r{@bullet{} a full agenda and planner with deadlines and work scheduling} | 792 | @r{@bullet{} a full agenda and planner with deadlines and work scheduling} |
| 592 | @pindex GTD, Getting Things Done | 793 | @pindex GTD, Getting Things Done |
| 593 | @r{@bullet{} an environment in which to implement David Allen's GTD system} | 794 | @r{@bullet{} an environment in which to implement David Allen's GTD system} |
| 594 | @r{@bullet{} a simple hypertext system, with HTML and La@TeX{} export} | 795 | @r{@bullet{} a simple hypertext system, with HTML and @LaTeX{} export} |
| 595 | @r{@bullet{} a publishing tool to create a set of interlinked webpages} | 796 | @r{@bullet{} a publishing tool to create a set of interlinked webpages} |
| 596 | @r{@bullet{} an environment for literate programming} | 797 | @r{@bullet{} an environment for literate programming} |
| 597 | @end example | 798 | @end example |
| @@ -742,7 +943,7 @@ to the mailing list, in order to minimize the work the mailing list | |||
| 742 | moderators have to do.}. | 943 | moderators have to do.}. |
| 743 | 944 | ||
| 744 | For bug reports, please first try to reproduce the bug with the latest | 945 | For bug reports, please first try to reproduce the bug with the latest |
| 745 | version of Org available - if you are running an outdated version, it is | 946 | version of Org available---if you are running an outdated version, it is |
| 746 | quite possible that the bug has been fixed already. If the bug persists, | 947 | quite possible that the bug has been fixed already. If the bug persists, |
| 747 | prepare a report and provide as much information as possible, including the | 948 | prepare a report and provide as much information as possible, including the |
| 748 | version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org | 949 | version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org |
| @@ -819,6 +1020,18 @@ User-defined properties are capitalized; built-in properties with | |||
| 819 | special meaning are written with all capitals. | 1020 | special meaning are written with all capitals. |
| 820 | @end table | 1021 | @end table |
| 821 | 1022 | ||
| 1023 | The manual lists both the keys and the corresponding commands for accessing | ||
| 1024 | functionality. Org mode often uses the same key for different functions, | ||
| 1025 | depending on context. The command that is bound to such keys has a generic | ||
| 1026 | name, like @code{org-metaright}. In the manual we will, wherever possible, | ||
| 1027 | give the function that is internally called by the generic command. For | ||
| 1028 | example, in the chapter on document structure, @kbd{M-@key{right}} will be | ||
| 1029 | listed to call @code{org-do-demote}, while in the chapter on tables, it will | ||
| 1030 | be listed to call org-table-move-column-right. | ||
| 1031 | |||
| 1032 | If you prefer, you can compile the manual without the command names by | ||
| 1033 | unsetting the flag @code{cmdnames} in @file{org.texi}. | ||
| 1034 | |||
| 822 | @node Document Structure, Tables, Introduction, Top | 1035 | @node Document Structure, Tables, Introduction, Top |
| 823 | @chapter Document structure | 1036 | @chapter Document structure |
| 824 | @cindex document structure | 1037 | @cindex document structure |
| @@ -1199,8 +1412,7 @@ commands can be accessed through a dispatcher: | |||
| 1199 | @table @asis | 1412 | @table @asis |
| 1200 | @orgcmd{C-c /,org-sparse-tree} | 1413 | @orgcmd{C-c /,org-sparse-tree} |
| 1201 | This prompts for an extra key to select a sparse-tree creating command. | 1414 | This prompts for an extra key to select a sparse-tree creating command. |
| 1202 | @kindex C-c / r | 1415 | @orgcmd{C-c / r,org-occur} |
| 1203 | @item C-c / r | ||
| 1204 | @vindex org-remove-highlights-with-change | 1416 | @vindex org-remove-highlights-with-change |
| 1205 | Occur. Prompts for a regexp and shows a sparse tree with all matches. If | 1417 | Occur. Prompts for a regexp and shows a sparse tree with all matches. If |
| 1206 | the match is in a headline, the headline is made visible. If the match is in | 1418 | the match is in a headline, the headline is made visible. If the match is in |
| @@ -1270,7 +1482,7 @@ as bullets. | |||
| 1270 | @emph{Ordered} list items start with a numeral followed by either a period or | 1482 | @emph{Ordered} list items start with a numeral followed by either a period or |
| 1271 | a right parenthesis@footnote{You can filter out any of them by configuring | 1483 | a right parenthesis@footnote{You can filter out any of them by configuring |
| 1272 | @code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or | 1484 | @code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or |
| 1273 | @samp{1)}. If you want a list to start a different value (e.g. 20), start | 1485 | @samp{1)}. If you want a list to start with a different value (e.g. 20), start |
| 1274 | the text of the item with @code{[@@20]}@footnote{If there's a checkbox in the | 1486 | the text of the item with @code{[@@20]}@footnote{If there's a checkbox in the |
| 1275 | item, the cookie must be put @emph{before} the checkbox.}. Those constructs | 1487 | item, the cookie must be put @emph{before} the checkbox.}. Those constructs |
| 1276 | can be used in any item of the list in order to enforce a particular | 1488 | can be used in any item of the list in order to enforce a particular |
| @@ -1325,7 +1537,7 @@ XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on, | |||
| 1325 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them | 1537 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them |
| 1326 | properly (@pxref{Exporting}). Since indentation is what governs the | 1538 | properly (@pxref{Exporting}). Since indentation is what governs the |
| 1327 | structure of these lists, many structural constructs like @code{#+BEGIN_...} | 1539 | structure of these lists, many structural constructs like @code{#+BEGIN_...} |
| 1328 | blocks can be indented to signal that they should be considered of a list | 1540 | blocks can be indented to signal that they should be considered as a list |
| 1329 | item. | 1541 | item. |
| 1330 | 1542 | ||
| 1331 | @vindex org-list-demote-modify-bullet | 1543 | @vindex org-list-demote-modify-bullet |
| @@ -1336,7 +1548,7 @@ the current list-level) improves readability, customize the variable | |||
| 1336 | @vindex org-list-automatic-rules | 1548 | @vindex org-list-automatic-rules |
| 1337 | The following commands act on items when the cursor is in the first line of | 1549 | The following commands act on items when the cursor is in the first line of |
| 1338 | an item (the line with the bullet or number). Some of them imply the | 1550 | an item (the line with the bullet or number). Some of them imply the |
| 1339 | application of automatic rules to keep list structure in tact. If some of | 1551 | application of automatic rules to keep list structure intact. If some of |
| 1340 | these actions get in your way, configure @code{org-list-automatic-rules} | 1552 | these actions get in your way, configure @code{org-list-automatic-rules} |
| 1341 | to disable them individually. | 1553 | to disable them individually. |
| 1342 | 1554 | ||
| @@ -1345,8 +1557,9 @@ to disable them individually. | |||
| 1345 | @vindex org-cycle-include-plain-lists | 1557 | @vindex org-cycle-include-plain-lists |
| 1346 | Items can be folded just like headline levels. Normally this works only if | 1558 | Items can be folded just like headline levels. Normally this works only if |
| 1347 | the cursor is on a plain list item. For more details, see the variable | 1559 | the cursor is on a plain list item. For more details, see the variable |
| 1348 | @code{org-cycle-include-plain-lists}. to @code{integrate}, plain list items | 1560 | @code{org-cycle-include-plain-lists}. If this variable is set to |
| 1349 | will be treated like low-level. The level of an item is then given by the | 1561 | @code{integrate}, plain list items will be treated like low-level |
| 1562 | headlines. The level of an item is then given by the | ||
| 1350 | indentation of the bullet/number. Items are always subordinate to real | 1563 | indentation of the bullet/number. Items are always subordinate to real |
| 1351 | headlines, however; the hierarchies remain completely separated. | 1564 | headlines, however; the hierarchies remain completely separated. |
| 1352 | @orgcmd{M-@key{RET},org-insert-heading} | 1565 | @orgcmd{M-@key{RET},org-insert-heading} |
| @@ -1357,7 +1570,7 @@ heading (@pxref{Structure editing}). If this command is used in the middle | |||
| 1357 | of a line, the line is @emph{split} and the rest of the line becomes the new | 1570 | of a line, the line is @emph{split} and the rest of the line becomes the new |
| 1358 | item@footnote{If you do not want the line to be split, customize the variable | 1571 | item@footnote{If you do not want the line to be split, customize the variable |
| 1359 | @code{org-M-RET-may-split-line}.}. If this command is executed @emph{before | 1572 | @code{org-M-RET-may-split-line}.}. If this command is executed @emph{before |
| 1360 | item's body}, the new item is created @emph{before} the current item. If the | 1573 | an item's body}, the new item is created @emph{before} the current item. If the |
| 1361 | command is executed in the white space before the text that is part of an | 1574 | command is executed in the white space before the text that is part of an |
| 1362 | item but does not contain the bullet, a bullet is added to the current line. | 1575 | item but does not contain the bullet, a bullet is added to the current line. |
| 1363 | 1576 | ||
| @@ -1369,7 +1582,7 @@ the structure, or return an error. | |||
| 1369 | Insert a new item with a checkbox (@pxref{Checkboxes}). | 1582 | Insert a new item with a checkbox (@pxref{Checkboxes}). |
| 1370 | @orgcmd{@key{TAB},org-cycle} | 1583 | @orgcmd{@key{TAB},org-cycle} |
| 1371 | In a new item with no text yet, the first @key{TAB} demotes the item to | 1584 | In a new item with no text yet, the first @key{TAB} demotes the item to |
| 1372 | become a child of the previous one. Subsequents @key{TAB} move the item to | 1585 | become a child of the previous one. Subsequent @key{TAB}s move the item to |
| 1373 | meaningful levels in the list and eventually get it back to its initial | 1586 | meaningful levels in the list and eventually get it back to its initial |
| 1374 | position. | 1587 | position. |
| 1375 | @kindex S-@key{down} | 1588 | @kindex S-@key{down} |
| @@ -1475,8 +1688,7 @@ press @key{TAB} there. Org-mode uses the @code{PROPERTIES} drawer for | |||
| 1475 | storing properties (@pxref{Properties and Columns}), and you can also arrange | 1688 | storing properties (@pxref{Properties and Columns}), and you can also arrange |
| 1476 | for state change notes (@pxref{Tracking TODO state changes}) and clock times | 1689 | for state change notes (@pxref{Tracking TODO state changes}) and clock times |
| 1477 | (@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}. If you | 1690 | (@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}. If you |
| 1478 | want to store a quick note in the LOGBOOK drawer, in a similar way as this is | 1691 | want to store a quick note in the LOGBOOK drawer, in a similar way to state changes, use |
| 1479 | done by state changes, use | ||
| 1480 | 1692 | ||
| 1481 | @table @kbd | 1693 | @table @kbd |
| 1482 | @kindex C-c C-z | 1694 | @kindex C-c C-z |
| @@ -1513,7 +1725,7 @@ larger document, not only for one-off documents like emails. The basic | |||
| 1513 | syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is | 1725 | syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is |
| 1514 | defined in a paragraph that is started by a footnote marker in square | 1726 | defined in a paragraph that is started by a footnote marker in square |
| 1515 | brackets in column 0, no indentation allowed. If you need a paragraph break | 1727 | brackets in column 0, no indentation allowed. If you need a paragraph break |
| 1516 | inside a footnote, use the La@TeX{} idiom @samp{\par}. The footnote reference | 1728 | inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference |
| 1517 | is simply the marker in square brackets, inside text. For example: | 1729 | is simply the marker in square brackets, inside text. For example: |
| 1518 | 1730 | ||
| 1519 | @example | 1731 | @example |
| @@ -1525,7 +1737,7 @@ The Org homepage[fn:1] now looks a lot better than it used to. | |||
| 1525 | Org-mode extends the number-based syntax to @emph{named} footnotes and | 1737 | Org-mode extends the number-based syntax to @emph{named} footnotes and |
| 1526 | optional inline definition. Using plain numbers as markers (as | 1738 | optional inline definition. Using plain numbers as markers (as |
| 1527 | @file{footnote.el} does) is supported for backward compatibility, but not | 1739 | @file{footnote.el} does) is supported for backward compatibility, but not |
| 1528 | encouraged because of possible conflicts with La@TeX{} snippets (@pxref{Embedded | 1740 | encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded |
| 1529 | LaTeX}). Here are the valid references: | 1741 | LaTeX}). Here are the valid references: |
| 1530 | 1742 | ||
| 1531 | @table @code | 1743 | @table @code |
| @@ -1537,7 +1749,7 @@ snippet. | |||
| 1537 | A named footnote reference, where @code{name} is a unique label word, or, for | 1749 | A named footnote reference, where @code{name} is a unique label word, or, for |
| 1538 | simplicity of automatic creation, a number. | 1750 | simplicity of automatic creation, a number. |
| 1539 | @item [fn:: This is the inline definition of this footnote] | 1751 | @item [fn:: This is the inline definition of this footnote] |
| 1540 | A La@TeX{}-like anonymous footnote where the definition is given directly at the | 1752 | A @LaTeX{}-like anonymous footnote where the definition is given directly at the |
| 1541 | reference point. | 1753 | reference point. |
| 1542 | @item [fn:name: a definition] | 1754 | @item [fn:name: a definition] |
| 1543 | An inline definition of a footnote, which also specifies a name for the note. | 1755 | An inline definition of a footnote, which also specifies a name for the note. |
| @@ -1548,7 +1760,7 @@ Since Org allows multiple references to the same note, you can then use | |||
| 1548 | @vindex org-footnote-auto-label | 1760 | @vindex org-footnote-auto-label |
| 1549 | Footnote labels can be created automatically, or you can create names yourself. | 1761 | Footnote labels can be created automatically, or you can create names yourself. |
| 1550 | This is handled by the variable @code{org-footnote-auto-label} and its | 1762 | This is handled by the variable @code{org-footnote-auto-label} and its |
| 1551 | corresponding @code{#+STARTUP} keywords, see the docstring of that variable | 1763 | corresponding @code{#+STARTUP} keywords. See the docstring of that variable |
| 1552 | for details. | 1764 | for details. |
| 1553 | 1765 | ||
| 1554 | @noindent The following command handles footnotes: | 1766 | @noindent The following command handles footnotes: |
| @@ -1631,7 +1843,7 @@ When this mode is active and the cursor is on a line that looks to Org like a | |||
| 1631 | headline or the first line of a list item, most structure editing commands | 1843 | headline or the first line of a list item, most structure editing commands |
| 1632 | will work, even if the same keys normally have different functionality in the | 1844 | will work, even if the same keys normally have different functionality in the |
| 1633 | major mode you are using. If the cursor is not in one of those special | 1845 | major mode you are using. If the cursor is not in one of those special |
| 1634 | lines, Orgstruct mode lurks silently in the shadow. When you use | 1846 | lines, Orgstruct mode lurks silently in the shadows. When you use |
| 1635 | @code{orgstruct++-mode}, Org will also export indentation and autofill | 1847 | @code{orgstruct++-mode}, Org will also export indentation and autofill |
| 1636 | settings into that mode, and detect item context after the first line of an | 1848 | settings into that mode, and detect item context after the first line of an |
| 1637 | item. | 1849 | item. |
| @@ -1642,8 +1854,7 @@ item. | |||
| 1642 | @cindex editing tables | 1854 | @cindex editing tables |
| 1643 | 1855 | ||
| 1644 | Org comes with a fast and intuitive table editor. Spreadsheet-like | 1856 | Org comes with a fast and intuitive table editor. Spreadsheet-like |
| 1645 | calculations are supported in connection with the Emacs @file{calc} | 1857 | calculations are supported using the Emacs @file{calc} package |
| 1646 | package | ||
| 1647 | @ifinfo | 1858 | @ifinfo |
| 1648 | (@pxref{Top,Calc,,Calc,Gnu Emacs Calculator Manual}). | 1859 | (@pxref{Top,Calc,,Calc,Gnu Emacs Calculator Manual}). |
| 1649 | @end ifinfo | 1860 | @end ifinfo |
| @@ -1722,70 +1933,55 @@ table. But it's easier just to start typing, like | |||
| 1722 | @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. | 1933 | @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. |
| 1723 | 1934 | ||
| 1724 | @tsubheading{Re-aligning and field motion} | 1935 | @tsubheading{Re-aligning and field motion} |
| 1725 | @orgcmd{C-c C-c,org-ctrl-c-ctrl-c} | 1936 | @orgcmd{C-c C-c,org-table-align} |
| 1726 | Re-align the table without moving the cursor. | 1937 | Re-align the table without moving the cursor. |
| 1727 | @c | 1938 | @c |
| 1728 | @orgcmd{<TAB>,org-cycle} | 1939 | @orgcmd{<TAB>,org-table-next-field} |
| 1729 | Re-align the table, move to the next field. Creates a new row if | 1940 | Re-align the table, move to the next field. Creates a new row if |
| 1730 | necessary. | 1941 | necessary. |
| 1731 | @c | 1942 | @c |
| 1732 | @orgcmd{S-@key{TAB},org-shifttab} | 1943 | @orgcmd{S-@key{TAB},org-table-previous-field} |
| 1733 | Re-align, move to previous field. | 1944 | Re-align, move to previous field. |
| 1734 | @c | 1945 | @c |
| 1735 | @orgcmd{@key{RET},org-return} | 1946 | @orgcmd{@key{RET},org-table-next-row} |
| 1736 | Re-align the table and move down to next row. Creates a new row if | 1947 | Re-align the table and move down to next row. Creates a new row if |
| 1737 | necessary. At the beginning or end of a line, @key{RET} still does | 1948 | necessary. At the beginning or end of a line, @key{RET} still does |
| 1738 | NEWLINE, so it can be used to split a table. | 1949 | NEWLINE, so it can be used to split a table. |
| 1739 | @c | 1950 | @c |
| 1740 | @kindex M-a | 1951 | @orgcmd{M-a,org-table-beginning-of-field} |
| 1741 | @item M-a | ||
| 1742 | Move to beginning of the current table field, or on to the previous field. | 1952 | Move to beginning of the current table field, or on to the previous field. |
| 1743 | @kindex M-e | 1953 | @orgcmd{M-e,org-table-end-of-field} |
| 1744 | @item M-e | ||
| 1745 | Move to end of the current table field, or on to the next field. | 1954 | Move to end of the current table field, or on to the next field. |
| 1746 | 1955 | ||
| 1747 | @tsubheading{Column and row editing} | 1956 | @tsubheading{Column and row editing} |
| 1748 | @kindex M-@key{left} | 1957 | @orgcmdkkcc{M-@key{left},M-@key{right},org-table-move-column-left,org-table-move-column-right} |
| 1749 | @kindex M-@key{right} | ||
| 1750 | @item M-@key{left} | ||
| 1751 | @itemx M-@key{right} | ||
| 1752 | Move the current column left/right. | 1958 | Move the current column left/right. |
| 1753 | @c | 1959 | @c |
| 1754 | @kindex M-S-@key{left} | 1960 | @orgcmd{M-S-@key{left},org-table-delete-column} |
| 1755 | @item M-S-@key{left} | ||
| 1756 | Kill the current column. | 1961 | Kill the current column. |
| 1757 | @c | 1962 | @c |
| 1758 | @kindex M-S-@key{right} | 1963 | @orgcmd{M-S-@key{right},org-table-insert-column} |
| 1759 | @item M-S-@key{right} | ||
| 1760 | Insert a new column to the left of the cursor position. | 1964 | Insert a new column to the left of the cursor position. |
| 1761 | @c | 1965 | @c |
| 1762 | @kindex M-@key{up} | 1966 | @orgcmdkkcc{M-@key{up},M-@key{down},org-table-move-row-up,org-table-move-row-down} |
| 1763 | @kindex M-@key{down} | ||
| 1764 | @item M-@key{up} | ||
| 1765 | @itemx M-@key{down} | ||
| 1766 | Move the current row up/down. | 1967 | Move the current row up/down. |
| 1767 | @c | 1968 | @c |
| 1768 | @kindex M-S-@key{up} | 1969 | @orgcmd{M-S-@key{up},org-table-kill-row} |
| 1769 | @item M-S-@key{up} | ||
| 1770 | Kill the current row or horizontal line. | 1970 | Kill the current row or horizontal line. |
| 1771 | @c | 1971 | @c |
| 1772 | @kindex M-S-@key{down} | 1972 | @orgcmd{M-S-@key{down},org-table-insert-row} |
| 1773 | @item M-S-@key{down} | ||
| 1774 | Insert a new row above the current row. With a prefix argument, the line is | 1973 | Insert a new row above the current row. With a prefix argument, the line is |
| 1775 | created below the current one. | 1974 | created below the current one. |
| 1776 | @c | 1975 | @c |
| 1777 | @kindex C-c - | 1976 | @orgcmd{C-c -,org-table-insert-hline} |
| 1778 | @item C-c - | ||
| 1779 | Insert a horizontal line below current row. With a prefix argument, the line | 1977 | Insert a horizontal line below current row. With a prefix argument, the line |
| 1780 | is created above the current line. | 1978 | is created above the current line. |
| 1781 | @c | 1979 | @c |
| 1782 | @kindex C-c @key{RET} | 1980 | @orgcmd{C-c @key{RET},org-table-hline-and-move} |
| 1783 | @item C-c @key{RET} | ||
| 1784 | Insert a horizontal line below current row, and move the cursor into the row | 1981 | Insert a horizontal line below current row, and move the cursor into the row |
| 1785 | below that line. | 1982 | below that line. |
| 1786 | @c | 1983 | @c |
| 1787 | @kindex C-c ^ | 1984 | @orgcmd{C-c ^,org-table-sort-lines} |
| 1788 | @item C-c ^ | ||
| 1789 | Sort the table lines in the region. The position of point indicates the | 1985 | Sort the table lines in the region. The position of point indicates the |
| 1790 | column to be used for sorting, and the range of lines is the range | 1986 | column to be used for sorting, and the range of lines is the range |
| 1791 | between the nearest horizontal separator lines, or the entire table. If | 1987 | between the nearest horizontal separator lines, or the entire table. If |
| @@ -1797,35 +1993,30 @@ included into the sorting. The command prompts for the sorting type | |||
| 1797 | argument, alphabetic sorting will be case-sensitive. | 1993 | argument, alphabetic sorting will be case-sensitive. |
| 1798 | 1994 | ||
| 1799 | @tsubheading{Regions} | 1995 | @tsubheading{Regions} |
| 1800 | @kindex C-c C-x M-w | 1996 | @orgcmd{C-c C-x M-w,org-table-copy-region} |
| 1801 | @item C-c C-x M-w | ||
| 1802 | Copy a rectangular region from a table to a special clipboard. Point and | 1997 | Copy a rectangular region from a table to a special clipboard. Point and |
| 1803 | mark determine edge fields of the rectangle. If there is no active region, | 1998 | mark determine edge fields of the rectangle. If there is no active region, |
| 1804 | copy just the current field. The process ignores horizontal separator lines. | 1999 | copy just the current field. The process ignores horizontal separator lines. |
| 1805 | @c | 2000 | @c |
| 1806 | @kindex C-c C-x C-w | 2001 | @orgcmd{C-c C-x C-w,org-table-cut-region} |
| 1807 | @item C-c C-x C-w | ||
| 1808 | Copy a rectangular region from a table to a special clipboard, and | 2002 | Copy a rectangular region from a table to a special clipboard, and |
| 1809 | blank all fields in the rectangle. So this is the ``cut'' operation. | 2003 | blank all fields in the rectangle. So this is the ``cut'' operation. |
| 1810 | @c | 2004 | @c |
| 1811 | @kindex C-c C-x C-y | 2005 | @orgcmd{C-c C-x C-y,org-table-paste-rectangle} |
| 1812 | @item C-c C-x C-y | ||
| 1813 | Paste a rectangular region into a table. | 2006 | Paste a rectangular region into a table. |
| 1814 | The upper left corner ends up in the current field. All involved fields | 2007 | The upper left corner ends up in the current field. All involved fields |
| 1815 | will be overwritten. If the rectangle does not fit into the present table, | 2008 | will be overwritten. If the rectangle does not fit into the present table, |
| 1816 | the table is enlarged as needed. The process ignores horizontal separator | 2009 | the table is enlarged as needed. The process ignores horizontal separator |
| 1817 | lines. | 2010 | lines. |
| 1818 | @c | 2011 | @c |
| 1819 | @kindex M-@key{RET} | 2012 | @orgcmd{M-@key{RET},org-table-wrap-region} |
| 1820 | @itemx M-@kbd{RET} | 2013 | Split the current field at the cursor position and move the rest to the line |
| 1821 | Wrap several fields in a column like a paragraph. If there is an active | 2014 | below. If there is an active region, and both point and mark are in the same |
| 1822 | region, and both point and mark are in the same column, the text in the | 2015 | column, the text in the column is wrapped to minimum width for the given |
| 1823 | column is wrapped to minimum width for the given number of lines. A numeric | 2016 | number of lines. A numeric prefix argument may be used to change the number |
| 1824 | prefix argument may be used to change the number of desired lines. If there | 2017 | of desired lines. If there is no region, but you specify a prefix argument, |
| 1825 | is no region, the current field is split at the cursor position and the text | 2018 | the current field is made blank, and the content is appended to the field |
| 1826 | fragment to the right of the cursor is prepended to the field one line | 2019 | above. |
| 1827 | down. If there is no region, but you specify a prefix argument, the current | ||
| 1828 | field is made blank, and the content is appended to the field above. | ||
| 1829 | 2020 | ||
| 1830 | @tsubheading{Calculations} | 2021 | @tsubheading{Calculations} |
| 1831 | @cindex formula, in tables | 2022 | @cindex formula, in tables |
| @@ -1833,14 +2024,12 @@ field is made blank, and the content is appended to the field above. | |||
| 1833 | @cindex region, active | 2024 | @cindex region, active |
| 1834 | @cindex active region | 2025 | @cindex active region |
| 1835 | @cindex transient mark mode | 2026 | @cindex transient mark mode |
| 1836 | @kindex C-c + | 2027 | @orgcmd{C-c +,org-table-sum} |
| 1837 | @item C-c + | ||
| 1838 | Sum the numbers in the current column, or in the rectangle defined by | 2028 | Sum the numbers in the current column, or in the rectangle defined by |
| 1839 | the active region. The result is shown in the echo area and can | 2029 | the active region. The result is shown in the echo area and can |
| 1840 | be inserted with @kbd{C-y}. | 2030 | be inserted with @kbd{C-y}. |
| 1841 | @c | 2031 | @c |
| 1842 | @kindex S-@key{RET} | 2032 | @orgcmd{S-@key{RET},org-table-copy-down} |
| 1843 | @item S-@key{RET} | ||
| 1844 | @vindex org-table-copy-increment | 2033 | @vindex org-table-copy-increment |
| 1845 | When current field is empty, copy from first non-empty field above. When not | 2034 | When current field is empty, copy from first non-empty field above. When not |
| 1846 | empty, copy current field down to next row and move cursor along with it. | 2035 | empty, copy current field down to next row and move cursor along with it. |
| @@ -1851,8 +2040,7 @@ increment. This key is also used by shift-selection and related modes | |||
| 1851 | (@pxref{Conflicts}). | 2040 | (@pxref{Conflicts}). |
| 1852 | 2041 | ||
| 1853 | @tsubheading{Miscellaneous} | 2042 | @tsubheading{Miscellaneous} |
| 1854 | @kindex C-c ` | 2043 | @orgcmd{C-c `,org-table-edit-field} |
| 1855 | @item C-c ` | ||
| 1856 | Edit the current field in a separate window. This is useful for fields that | 2044 | Edit the current field in a separate window. This is useful for fields that |
| 1857 | are not fully visible (@pxref{Column width and alignment}). When called with | 2045 | are not fully visible (@pxref{Column width and alignment}). When called with |
| 1858 | a @kbd{C-u} prefix, just make the full field visible, so that it can be | 2046 | a @kbd{C-u} prefix, just make the full field visible, so that it can be |
| @@ -1866,12 +2054,13 @@ TAB-separated text files. This command works by inserting the file into | |||
| 1866 | the buffer and then converting the region to a table. Any prefix | 2054 | the buffer and then converting the region to a table. Any prefix |
| 1867 | argument is passed on to the converter, which uses it to determine the | 2055 | argument is passed on to the converter, which uses it to determine the |
| 1868 | separator. | 2056 | separator. |
| 1869 | @item C-c | | 2057 | @orgcmd{C-c |,org-table-create-or-convert-from-region} |
| 1870 | Tables can also be imported by pasting tabular text into the Org | 2058 | Tables can also be imported by pasting tabular text into the Org |
| 1871 | buffer, selecting the pasted text with @kbd{C-x C-x} and then using the | 2059 | buffer, selecting the pasted text with @kbd{C-x C-x} and then using the |
| 1872 | @kbd{C-c |} command (see above under @i{Creation and conversion}). | 2060 | @kbd{C-c |} command (see above under @i{Creation and conversion}). |
| 1873 | @c | 2061 | @c |
| 1874 | @item M-x org-table-export | 2062 | @item M-x org-table-export |
| 2063 | @findex org-table-export | ||
| 1875 | @vindex org-table-export-default-format | 2064 | @vindex org-table-export-default-format |
| 1876 | Export the table, by default as a TAB-separated file. Use for data | 2065 | Export the table, by default as a TAB-separated file. Use for data |
| 1877 | exchange with, for example, spreadsheet or database programs. The format | 2066 | exchange with, for example, spreadsheet or database programs. The format |
| @@ -1926,7 +2115,7 @@ will then set the width of this column to this value. | |||
| 1926 | 2115 | ||
| 1927 | @noindent | 2116 | @noindent |
| 1928 | Fields that are wider become clipped and end in the string @samp{=>}. | 2117 | Fields that are wider become clipped and end in the string @samp{=>}. |
| 1929 | Note that the full text is still in the buffer, it is only invisible. | 2118 | Note that the full text is still in the buffer but is hidden. |
| 1930 | To see the full text, hold the mouse over the field---a tool-tip window | 2119 | To see the full text, hold the mouse over the field---a tool-tip window |
| 1931 | will show the full content. To edit such a field, use the command | 2120 | will show the full content. To edit such a field, use the command |
| 1932 | @kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will | 2121 | @kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will |
| @@ -1947,7 +2136,7 @@ on a per-file basis with: | |||
| 1947 | @end example | 2136 | @end example |
| 1948 | 2137 | ||
| 1949 | If you would like to overrule the automatic alignment of number-rich columns | 2138 | If you would like to overrule the automatic alignment of number-rich columns |
| 1950 | to the right and of string-rich column to the left, you and use @samp{<r>}, | 2139 | to the right and of string-rich column to the left, you can use @samp{<r>}, |
| 1951 | @samp{c}@footnote{Centering does not work inside Emacs, but it does have an | 2140 | @samp{c}@footnote{Centering does not work inside Emacs, but it does have an |
| 1952 | effect when exporting to HTML.} or @samp{<l>} in a similar fashion. You may | 2141 | effect when exporting to HTML.} or @samp{<l>} in a similar fashion. You may |
| 1953 | also combine alignment and field width like this: @samp{<l10>}. | 2142 | also combine alignment and field width like this: @samp{<l10>}. |
| @@ -2007,7 +2196,7 @@ example in mail mode, use | |||
| 2007 | 2196 | ||
| 2008 | Furthermore, with some special setup, it is possible to maintain tables | 2197 | Furthermore, with some special setup, it is possible to maintain tables |
| 2009 | in arbitrary syntax with Orgtbl mode. For example, it is possible to | 2198 | in arbitrary syntax with Orgtbl mode. For example, it is possible to |
| 2010 | construct La@TeX{} tables with the underlying ease and power of | 2199 | construct @LaTeX{} tables with the underlying ease and power of |
| 2011 | Orgtbl mode, including spreadsheet capabilities. For details, see | 2200 | Orgtbl mode, including spreadsheet capabilities. For details, see |
| 2012 | @ref{Tables in arbitrary syntax}. | 2201 | @ref{Tables in arbitrary syntax}. |
| 2013 | 2202 | ||
| @@ -2280,7 +2469,7 @@ tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} | |||
| 2280 | sin($1);Dp3%.1e @r{Same, but use printf specifier for display} | 2469 | sin($1);Dp3%.1e @r{Same, but use printf specifier for display} |
| 2281 | vmean($2..$7) @r{Compute column range mean, using vector function} | 2470 | vmean($2..$7) @r{Compute column range mean, using vector function} |
| 2282 | vmean($2..$7);EN @r{Same, but treat empty fields as 0} | 2471 | vmean($2..$7);EN @r{Same, but treat empty fields as 0} |
| 2283 | taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree} | 2472 | taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree} |
| 2284 | @end example | 2473 | @end example |
| 2285 | 2474 | ||
| 2286 | Calc also contains a complete set of logical operations. For example | 2475 | Calc also contains a complete set of logical operations. For example |
| @@ -2293,24 +2482,23 @@ if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty} | |||
| 2293 | @subsection Emacs Lisp forms as formulas | 2482 | @subsection Emacs Lisp forms as formulas |
| 2294 | @cindex Lisp forms, as table formulas | 2483 | @cindex Lisp forms, as table formulas |
| 2295 | 2484 | ||
| 2296 | It is also possible to write a formula in Emacs Lisp; this can be useful | 2485 | It is also possible to write a formula in Emacs Lisp; this can be useful for |
| 2297 | for string manipulation and control structures, if Calc's | 2486 | string manipulation and control structures, if Calc's functionality is not |
| 2298 | functionality is not enough. If a formula starts with a single-quote | 2487 | enough. If a formula starts with a single-quote followed by an opening |
| 2299 | followed by an opening parenthesis, then it is evaluated as a Lisp form. | 2488 | parenthesis, then it is evaluated as a Lisp form. The evaluation should |
| 2300 | The evaluation should return either a string or a number. Just as with | 2489 | return either a string or a number. Just as with @file{calc} formulas, you |
| 2301 | @file{calc} formulas, you can specify modes and a printf format after a | 2490 | can specify modes and a printf format after a semicolon. With Emacs Lisp |
| 2302 | semicolon. With Emacs Lisp forms, you need to be conscious about the way | 2491 | forms, you need to be conscious about the way field references are |
| 2303 | field references are interpolated into the form. By default, a | 2492 | interpolated into the form. By default, a reference will be interpolated as |
| 2304 | reference will be interpolated as a Lisp string (in double-quotes) | 2493 | a Lisp string (in double-quotes) containing the field. If you provide the |
| 2305 | containing the field. If you provide the @samp{N} mode switch, all | 2494 | @samp{N} mode switch, all referenced elements will be numbers (non-number |
| 2306 | referenced elements will be numbers (non-number fields will be zero) and | 2495 | fields will be zero) and interpolated as Lisp numbers, without quotes. If |
| 2307 | interpolated as Lisp numbers, without quotes. If you provide the | 2496 | you provide the @samp{L} flag, all fields will be interpolated literally, |
| 2308 | @samp{L} flag, all fields will be interpolated literally, without quotes. | 2497 | without quotes. I.e., if you want a reference to be interpreted as a string |
| 2309 | I.e., if you want a reference to be interpreted as a string by the Lisp | 2498 | by the Lisp form, enclose the reference operator itself in double-quotes, |
| 2310 | form, enclose the reference operator itself in double-quotes, like | 2499 | like @code{"$3"}. Ranges are inserted as space-separated fields, so you can |
| 2311 | @code{"$3"}. Ranges are inserted as space-separated fields, so you can | 2500 | +embed them in list or vector syntax. Here are a few examples---note how the |
| 2312 | embed them in list or vector syntax. A few examples, note how the | 2501 | @samp{N} mode is used when we do computations in Lisp: |
| 2313 | @samp{N} mode is used when we do computations in Lisp. | ||
| 2314 | 2502 | ||
| 2315 | @example | 2503 | @example |
| 2316 | @r{Swap the first two characters of the content of column 1} | 2504 | @r{Swap the first two characters of the content of column 1} |
| @@ -2334,7 +2522,7 @@ evaluated, and the current field replaced with the result. | |||
| 2334 | 2522 | ||
| 2335 | @cindex #+TBLFM | 2523 | @cindex #+TBLFM |
| 2336 | Formulas are stored in a special line starting with @samp{#+TBLFM:} | 2524 | Formulas are stored in a special line starting with @samp{#+TBLFM:} |
| 2337 | directly below the table. If you typed the equation in the 4th field of | 2525 | directly below the table. If you type the equation in the 4th field of |
| 2338 | the 3rd data line in the table, the formula will look like | 2526 | the 3rd data line in the table, the formula will look like |
| 2339 | @samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows | 2527 | @samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows |
| 2340 | with the appropriate commands, @i{absolute references} (but not relative | 2528 | with the appropriate commands, @i{absolute references} (but not relative |
| @@ -2348,8 +2536,7 @@ Instead of typing an equation into the field, you may also use the | |||
| 2348 | following command | 2536 | following command |
| 2349 | 2537 | ||
| 2350 | @table @kbd | 2538 | @table @kbd |
| 2351 | @kindex C-u C-c = | 2539 | @orgcmd{C-u C-c =,org-table-eval-formula} |
| 2352 | @item C-u C-c = | ||
| 2353 | Install a new formula for the current field. The command prompts for a | 2540 | Install a new formula for the current field. The command prompts for a |
| 2354 | formula with default taken from the @samp{#+TBLFM:} line, applies | 2541 | formula with default taken from the @samp{#+TBLFM:} line, applies |
| 2355 | it to the current field, and stores it. | 2542 | it to the current field, and stores it. |
| @@ -2382,8 +2569,7 @@ Instead of typing an equation into the field, you may also use the | |||
| 2382 | following command: | 2569 | following command: |
| 2383 | 2570 | ||
| 2384 | @table @kbd | 2571 | @table @kbd |
| 2385 | @kindex C-c = | 2572 | @orgcmd{C-c =,org-table-eval-formula} |
| 2386 | @item C-c = | ||
| 2387 | Install a new formula for the current column and replace current field with | 2573 | Install a new formula for the current column and replace current field with |
| 2388 | the result of the formula. The command prompts for a formula, with default | 2574 | the result of the formula. The command prompts for a formula, with default |
| 2389 | taken from the @samp{#+TBLFM} line, applies it to the current field and | 2575 | taken from the @samp{#+TBLFM} line, applies it to the current field and |
| @@ -2406,32 +2592,29 @@ if possible. If you prefer to only work with the internal format (like | |||
| 2406 | @code{org-table-use-standard-references}. | 2592 | @code{org-table-use-standard-references}. |
| 2407 | 2593 | ||
| 2408 | @table @kbd | 2594 | @table @kbd |
| 2409 | @kindex C-c = | 2595 | @orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} |
| 2410 | @kindex C-u C-c = | ||
| 2411 | @item C-c = | ||
| 2412 | @itemx C-u C-c = | ||
| 2413 | Edit the formula associated with the current column/field in the | 2596 | Edit the formula associated with the current column/field in the |
| 2414 | minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. | 2597 | minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. |
| 2415 | @kindex C-u C-u C-c = | 2598 | @orgcmd{C-u C-u C-c =,org-table-eval-formula} |
| 2416 | @item C-u C-u C-c = | ||
| 2417 | Re-insert the active formula (either a | 2599 | Re-insert the active formula (either a |
| 2418 | field formula, or a column formula) into the current field, so that you | 2600 | field formula, or a column formula) into the current field, so that you |
| 2419 | can edit it directly in the field. The advantage over editing in the | 2601 | can edit it directly in the field. The advantage over editing in the |
| 2420 | minibuffer is that you can use the command @kbd{C-c ?}. | 2602 | minibuffer is that you can use the command @kbd{C-c ?}. |
| 2421 | @kindex C-c ? | 2603 | @orgcmd{C-c ?,org-table-field-info} |
| 2422 | @item C-c ? | ||
| 2423 | While editing a formula in a table field, highlight the field(s) | 2604 | While editing a formula in a table field, highlight the field(s) |
| 2424 | referenced by the reference at the cursor position in the formula. | 2605 | referenced by the reference at the cursor position in the formula. |
| 2425 | @kindex C-c @} | 2606 | @kindex C-c @} |
| 2607 | @findex org-table-toggle-coordinate-overlays | ||
| 2426 | @item C-c @} | 2608 | @item C-c @} |
| 2427 | Toggle the display of row and column numbers for a table, using | 2609 | Toggle the display of row and column numbers for a table, using overlays |
| 2428 | overlays. These are updated each time the table is aligned; you can | 2610 | (@command{org-table-toggle-coordinate-overlays}). These are updated each |
| 2429 | force it with @kbd{C-c C-c}. | 2611 | time the table is aligned; you can force it with @kbd{C-c C-c}. |
| 2430 | @kindex C-c @{ | 2612 | @kindex C-c @{ |
| 2613 | @findex org-table-toggle-formula-debugger | ||
| 2431 | @item C-c @{ | 2614 | @item C-c @{ |
| 2432 | Toggle the formula debugger on and off. See below. | 2615 | Toggle the formula debugger on and off |
| 2433 | @kindex C-c ' | 2616 | (@command{org-table-toggle-formula-debugger}). See below. |
| 2434 | @item C-c ' | 2617 | @orgcmd{C-c ',org-table-edit-formulas} |
| 2435 | Edit all formulas for the current table in a special buffer, where the | 2618 | Edit all formulas for the current table in a special buffer, where the |
| 2436 | formulas will be displayed one per line. If the current field has an | 2619 | formulas will be displayed one per line. If the current field has an |
| 2437 | active formula, the cursor in the formula editor will mark it. | 2620 | active formula, the cursor in the formula editor will mark it. |
| @@ -2439,46 +2622,40 @@ While inside the special buffer, Org will automatically highlight | |||
| 2439 | any field or range reference at the cursor position. You may edit, | 2622 | any field or range reference at the cursor position. You may edit, |
| 2440 | remove and add formulas, and use the following commands: | 2623 | remove and add formulas, and use the following commands: |
| 2441 | @table @kbd | 2624 | @table @kbd |
| 2442 | @kindex C-c C-c | 2625 | @orgcmdkkc{C-c C-c,C-x C-s,org-table-fedit-finish} |
| 2443 | @kindex C-x C-s | ||
| 2444 | @item C-c C-c | ||
| 2445 | @itemx C-x C-s | ||
| 2446 | Exit the formula editor and store the modified formulas. With @kbd{C-u} | 2626 | Exit the formula editor and store the modified formulas. With @kbd{C-u} |
| 2447 | prefix, also apply the new formulas to the entire table. | 2627 | prefix, also apply the new formulas to the entire table. |
| 2448 | @kindex C-c C-q | 2628 | @orgcmd{C-c C-q,org-table-fedit-abort} |
| 2449 | @item C-c C-q | ||
| 2450 | Exit the formula editor without installing changes. | 2629 | Exit the formula editor without installing changes. |
| 2451 | @kindex C-c C-r | 2630 | @orgcmd{C-c C-r,org-table-fedit-toggle-ref-type} |
| 2452 | @item C-c C-r | ||
| 2453 | Toggle all references in the formula editor between standard (like | 2631 | Toggle all references in the formula editor between standard (like |
| 2454 | @code{B3}) and internal (like @code{@@3$2}). | 2632 | @code{B3}) and internal (like @code{@@3$2}). |
| 2455 | @kindex @key{TAB} | 2633 | @orgcmd{@key{TAB},org-table-fedit-lisp-indent} |
| 2456 | @item @key{TAB} | ||
| 2457 | Pretty-print or indent Lisp formula at point. When in a line containing | 2634 | Pretty-print or indent Lisp formula at point. When in a line containing |
| 2458 | a Lisp formula, format the formula according to Emacs Lisp rules. | 2635 | a Lisp formula, format the formula according to Emacs Lisp rules. |
| 2459 | Another @key{TAB} collapses the formula back again. In the open | 2636 | Another @key{TAB} collapses the formula back again. In the open |
| 2460 | formula, @key{TAB} re-indents just like in Emacs Lisp mode. | 2637 | formula, @key{TAB} re-indents just like in Emacs Lisp mode. |
| 2461 | @kindex M-@key{TAB} | 2638 | @orgcmd{M-@key{TAB},lisp-complete-symbol} |
| 2462 | @item M-@key{TAB} | ||
| 2463 | Complete Lisp symbols, just like in Emacs Lisp mode. | 2639 | Complete Lisp symbols, just like in Emacs Lisp mode. |
| 2464 | @kindex S-@key{up} | 2640 | @kindex S-@key{up} |
| 2465 | @kindex S-@key{down} | 2641 | @kindex S-@key{down} |
| 2466 | @kindex S-@key{left} | 2642 | @kindex S-@key{left} |
| 2467 | @kindex S-@key{right} | 2643 | @kindex S-@key{right} |
| 2644 | @findex org-table-fedit-ref-up | ||
| 2645 | @findex org-table-fedit-ref-down | ||
| 2646 | @findex org-table-fedit-ref-left | ||
| 2647 | @findex org-table-fedit-ref-right | ||
| 2468 | @item S-@key{up}/@key{down}/@key{left}/@key{right} | 2648 | @item S-@key{up}/@key{down}/@key{left}/@key{right} |
| 2469 | Shift the reference at point. For example, if the reference is | 2649 | Shift the reference at point. For example, if the reference is |
| 2470 | @code{B3} and you press @kbd{S-@key{right}}, it will become @code{C3}. | 2650 | @code{B3} and you press @kbd{S-@key{right}}, it will become @code{C3}. |
| 2471 | This also works for relative references and for hline references. | 2651 | This also works for relative references and for hline references. |
| 2472 | @kindex M-S-@key{up} | 2652 | @orgcmdkkcc{M-S-@key{up},M-S-@key{down},org-table-fedit-line-up,org-table-fedit-line-down} |
| 2473 | @kindex M-S-@key{down} | ||
| 2474 | @item M-S-@key{up}/@key{down} | ||
| 2475 | Move the test line for column formulas in the Org buffer up and | 2653 | Move the test line for column formulas in the Org buffer up and |
| 2476 | down. | 2654 | down. |
| 2477 | @kindex M-@key{up} | 2655 | @orgcmdkkcc{M-@key{up},M-@key{down},org-table-fedit-scroll-down,org-table-fedit-scroll-up} |
| 2478 | @kindex M-@key{down} | ||
| 2479 | @item M-@key{up}/@key{down} | ||
| 2480 | Scroll the window displaying the table. | 2656 | Scroll the window displaying the table. |
| 2481 | @kindex C-c @} | 2657 | @kindex C-c @} |
| 2658 | @findex org-table-toggle-coordinate-overlays | ||
| 2482 | @item C-c @} | 2659 | @item C-c @} |
| 2483 | Turn the coordinate grid in the table on and off. | 2660 | Turn the coordinate grid in the table on and off. |
| 2484 | @end table | 2661 | @end table |
| @@ -2518,8 +2695,7 @@ In order to recalculate a line of a table or the entire table, use the | |||
| 2518 | following commands: | 2695 | following commands: |
| 2519 | 2696 | ||
| 2520 | @table @kbd | 2697 | @table @kbd |
| 2521 | @kindex C-c * | 2698 | @orgcmd{C-c *,org-table-recalculate} |
| 2522 | @item C-c * | ||
| 2523 | Recalculate the current row by first applying the stored column formulas | 2699 | Recalculate the current row by first applying the stored column formulas |
| 2524 | from left to right, and all field formulas in the current row. | 2700 | from left to right, and all field formulas in the current row. |
| 2525 | @c | 2701 | @c |
| @@ -2530,16 +2706,15 @@ from left to right, and all field formulas in the current row. | |||
| 2530 | Recompute the entire table, line by line. Any lines before the first | 2706 | Recompute the entire table, line by line. Any lines before the first |
| 2531 | hline are left alone, assuming that these are part of the table header. | 2707 | hline are left alone, assuming that these are part of the table header. |
| 2532 | @c | 2708 | @c |
| 2533 | @kindex C-u C-u C-c * | 2709 | @orgcmdkkc{C-u C-u C-c *,C-u C-u C-c C-c,org-table-iterate} |
| 2534 | @kindex C-u C-u C-c C-c | ||
| 2535 | @item C-u C-u C-c * | ||
| 2536 | @itemx C-u C-u C-c C-c | ||
| 2537 | Iterate the table by recomputing it until no further changes occur. | 2710 | Iterate the table by recomputing it until no further changes occur. |
| 2538 | This may be necessary if some computed fields use the value of other | 2711 | This may be necessary if some computed fields use the value of other |
| 2539 | fields that are computed @i{later} in the calculation sequence. | 2712 | fields that are computed @i{later} in the calculation sequence. |
| 2540 | @item M-x org-table-recalculate-buffer-tables | 2713 | @item M-x org-table-recalculate-buffer-tables |
| 2714 | @findex org-table-recalculate-buffer-tables | ||
| 2541 | Recompute all tables in the current buffer. | 2715 | Recompute all tables in the current buffer. |
| 2542 | @item M-x org-table-iterate-buffer-tables | 2716 | @item M-x org-table-iterate-buffer-tables |
| 2717 | @findex org-table-iterate-buffer-tables | ||
| 2543 | Iterate all tables in the current buffer, in order to converge table-to-table | 2718 | Iterate all tables in the current buffer, in order to converge table-to-table |
| 2544 | dependencies. | 2719 | dependencies. |
| 2545 | @end table | 2720 | @end table |
| @@ -2551,8 +2726,7 @@ If you want the recalculation of fields to happen automatically, or if | |||
| 2551 | you want to be able to assign @i{names} to fields and columns, you need | 2726 | you want to be able to assign @i{names} to fields and columns, you need |
| 2552 | to reserve the first column of the table for special marking characters. | 2727 | to reserve the first column of the table for special marking characters. |
| 2553 | @table @kbd | 2728 | @table @kbd |
| 2554 | @kindex C-# | 2729 | @orgcmd{C-#,org-table-rotate-recalc-marks} |
| 2555 | @item C-# | ||
| 2556 | Rotate the calculation mark in first column through the states @samp{ }, | 2730 | Rotate the calculation mark in first column through the states @samp{ }, |
| 2557 | @samp{#}, @samp{*}, @samp{!}, @samp{$}. When there is an active region, | 2731 | @samp{#}, @samp{*}, @samp{!}, @samp{$}. When there is an active region, |
| 2558 | change all marks in the region. | 2732 | change all marks in the region. |
| @@ -2708,8 +2882,8 @@ Defaults to @code{lines}. | |||
| 2708 | If you want to plot to a file, specify @code{"@var{path/to/desired/output-file}"}. | 2882 | If you want to plot to a file, specify @code{"@var{path/to/desired/output-file}"}. |
| 2709 | 2883 | ||
| 2710 | @item labels | 2884 | @item labels |
| 2711 | List of labels to be used for the deps (defaults to the column headers if | 2885 | List of labels to be used for the @code{deps} (defaults to the column headers |
| 2712 | they exist). | 2886 | if they exist). |
| 2713 | 2887 | ||
| 2714 | @item line | 2888 | @item line |
| 2715 | Specify an entire line to be inserted in the Gnuplot script. | 2889 | Specify an entire line to be inserted in the Gnuplot script. |
| @@ -2821,7 +2995,7 @@ a link targeting a headline, in-buffer completion can be used. Just type a | |||
| 2821 | star followed by a few optional letters into the buffer and press | 2995 | star followed by a few optional letters into the buffer and press |
| 2822 | @kbd{M-@key{TAB}}. All headlines in the current buffer will be offered as | 2996 | @kbd{M-@key{TAB}}. All headlines in the current buffer will be offered as |
| 2823 | completions.}. In non-Org files, the search will look for the words in the | 2997 | completions.}. In non-Org files, the search will look for the words in the |
| 2824 | link text, in the above example the search would be for @samp{my target}. | 2998 | link text. In the above example the search would be for @samp{my target}. |
| 2825 | 2999 | ||
| 2826 | Following a link pushes a mark onto Org's own mark ring. You can | 3000 | Following a link pushes a mark onto Org's own mark ring. You can |
| 2827 | return to the previous position with @kbd{C-c &}. Using this command | 3001 | return to the previous position with @kbd{C-c &}. Using this command |
| @@ -2939,9 +3113,8 @@ Org provides methods to create a link in the correct syntax, to | |||
| 2939 | insert it into an Org file, and to follow the link. | 3113 | insert it into an Org file, and to follow the link. |
| 2940 | 3114 | ||
| 2941 | @table @kbd | 3115 | @table @kbd |
| 2942 | @kindex C-c l | 3116 | @orgcmd{C-c l,org-store-link} |
| 2943 | @cindex storing links | 3117 | @cindex storing links |
| 2944 | @item C-c l | ||
| 2945 | Store a link to the current location. This is a @emph{global} command (you | 3118 | Store a link to the current location. This is a @emph{global} command (you |
| 2946 | must create the key binding yourself) which can be used in any buffer to | 3119 | must create the key binding yourself) which can be used in any buffer to |
| 2947 | create a link. The link will be stored for later insertion into an Org | 3120 | create a link. The link will be stored for later insertion into an Org |
| @@ -2997,11 +3170,10 @@ When the cursor is in an agenda view, the created link points to the | |||
| 2997 | entry referenced by the current line. | 3170 | entry referenced by the current line. |
| 2998 | 3171 | ||
| 2999 | @c | 3172 | @c |
| 3000 | @kindex C-c C-l | 3173 | @orgcmd{C-c C-l,org-insert-link} |
| 3001 | @cindex link completion | 3174 | @cindex link completion |
| 3002 | @cindex completion, of links | 3175 | @cindex completion, of links |
| 3003 | @cindex inserting links | 3176 | @cindex inserting links |
| 3004 | @item C-c C-l | ||
| 3005 | @vindex org-keep-stored-link-after-insertion | 3177 | @vindex org-keep-stored-link-after-insertion |
| 3006 | Insert a link@footnote{ Note that you don't have to use this command to | 3178 | Insert a link@footnote{ Note that you don't have to use this command to |
| 3007 | insert a link. Links in Org are plain text, and you can type or paste them | 3179 | insert a link. Links in Org are plain text, and you can type or paste them |
| @@ -3031,10 +3203,9 @@ calling a special function @code{org-PREFIX-complete-link}.} For | |||
| 3031 | example, if you type @kbd{file @key{RET}}, file name completion (alternative | 3203 | example, if you type @kbd{file @key{RET}}, file name completion (alternative |
| 3032 | access: @kbd{C-u C-c C-l}, see below) will be offered, and after @kbd{bbdb | 3204 | access: @kbd{C-u C-c C-l}, see below) will be offered, and after @kbd{bbdb |
| 3033 | @key{RET}} you can complete contact names. | 3205 | @key{RET}} you can complete contact names. |
| 3034 | @kindex C-u C-c C-l | 3206 | @orgkey C-u C-c C-l |
| 3035 | @cindex file name completion | 3207 | @cindex file name completion |
| 3036 | @cindex completion, of file names | 3208 | @cindex completion, of file names |
| 3037 | @item C-u C-c C-l | ||
| 3038 | When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to | 3209 | When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to |
| 3039 | a file will be inserted and you may use file name completion to select | 3210 | a file will be inserted and you may use file name completion to select |
| 3040 | the name of the file. The path to the file is inserted relative to the | 3211 | the name of the file. The path to the file is inserted relative to the |
| @@ -3049,9 +3220,7 @@ When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the | |||
| 3049 | link and description parts of the link. | 3220 | link and description parts of the link. |
| 3050 | @c | 3221 | @c |
| 3051 | @cindex following links | 3222 | @cindex following links |
| 3052 | @kindex C-c C-o | 3223 | @orgcmd{C-c C-o,org-open-at-point} |
| 3053 | @kindex @key{RET} | ||
| 3054 | @item C-c C-o @ @r{(or, if @code{org-return-follows-link} is set, also} @key{RET} | ||
| 3055 | @vindex org-file-apps | 3224 | @vindex org-file-apps |
| 3056 | Open link at point. This will launch a web browser for URLs (using | 3225 | Open link at point. This will launch a web browser for URLs (using |
| 3057 | @command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for | 3226 | @command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for |
| @@ -3067,13 +3236,17 @@ visit the file with Emacs, use a @kbd{C-u} prefix. If you want to avoid | |||
| 3067 | opening in Emacs, use a @kbd{C-u C-u} prefix.@* | 3236 | opening in Emacs, use a @kbd{C-u C-u} prefix.@* |
| 3068 | If the cursor is on a headline, but not on a link, offer all links in the | 3237 | If the cursor is on a headline, but not on a link, offer all links in the |
| 3069 | headline and entry text. | 3238 | headline and entry text. |
| 3239 | @orgkey @key{RET} | ||
| 3240 | @vindex org-return-follows-link | ||
| 3241 | When @code{org-return-follows-link} is set, @kbd{@key{RET}} will also follow | ||
| 3242 | the link at point. | ||
| 3070 | @c | 3243 | @c |
| 3071 | @kindex mouse-2 | 3244 | @kindex mouse-2 |
| 3072 | @kindex mouse-1 | 3245 | @kindex mouse-1 |
| 3073 | @item mouse-2 | 3246 | @item mouse-2 |
| 3074 | @itemx mouse-1 | 3247 | @itemx mouse-1 |
| 3075 | On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o} | 3248 | On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o} |
| 3076 | would. Under Emacs 22, @kbd{mouse-1} will also follow a link. | 3249 | would. Under Emacs 22 and later, @kbd{mouse-1} will also follow a link. |
| 3077 | @c | 3250 | @c |
| 3078 | @kindex mouse-3 | 3251 | @kindex mouse-3 |
| 3079 | @item mouse-3 | 3252 | @item mouse-3 |
| @@ -3082,13 +3255,12 @@ Like @kbd{mouse-2}, but force file links to be opened with Emacs, and | |||
| 3082 | internal links to be displayed in another window@footnote{See the | 3255 | internal links to be displayed in another window@footnote{See the |
| 3083 | variable @code{org-display-internal-link-with-indirect-buffer}}. | 3256 | variable @code{org-display-internal-link-with-indirect-buffer}}. |
| 3084 | @c | 3257 | @c |
| 3258 | @orgcmd{C-c C-x C-v,org-toggle-inline-images} | ||
| 3085 | @cindex inlining images | 3259 | @cindex inlining images |
| 3086 | @cindex images, inlining | 3260 | @cindex images, inlining |
| 3087 | @kindex C-c C-x C-v | ||
| 3088 | @vindex org-startup-with-inline-images | 3261 | @vindex org-startup-with-inline-images |
| 3089 | @cindex @code{inlineimages}, STARTUP keyword | 3262 | @cindex @code{inlineimages}, STARTUP keyword |
| 3090 | @cindex @code{noinlineimages}, STARTUP keyword | 3263 | @cindex @code{noinlineimages}, STARTUP keyword |
| 3091 | @item C-c C-x C-v | ||
| 3092 | Toggle the inline display of linked images. Normally this will only inline | 3264 | Toggle the inline display of linked images. Normally this will only inline |
| 3093 | images that have no description part in the link, i.e. images that will also | 3265 | images that have no description part in the link, i.e. images that will also |
| 3094 | be inlined during export. When called with a prefix argument, also display | 3266 | be inlined during export. When called with a prefix argument, also display |
| @@ -3096,28 +3268,23 @@ images that do have a link description. You can ask for inline images to be | |||
| 3096 | displayed at startup by configuring the variable | 3268 | displayed at startup by configuring the variable |
| 3097 | @code{org-startup-with-inline-images}@footnote{with corresponding | 3269 | @code{org-startup-with-inline-images}@footnote{with corresponding |
| 3098 | @code{#+STARTUP} keywords @code{inlineimages} and @code{inlineimages}}. | 3270 | @code{#+STARTUP} keywords @code{inlineimages} and @code{inlineimages}}. |
| 3271 | @orgcmd{C-c %,org-mark-ring-push} | ||
| 3099 | @cindex mark ring | 3272 | @cindex mark ring |
| 3100 | @kindex C-c % | ||
| 3101 | @item C-c % | ||
| 3102 | Push the current position onto the mark ring, to be able to return | 3273 | Push the current position onto the mark ring, to be able to return |
| 3103 | easily. Commands following an internal link do this automatically. | 3274 | easily. Commands following an internal link do this automatically. |
| 3104 | @c | 3275 | @c |
| 3276 | @orgcmd{C-c &,org-mark-ring-goto} | ||
| 3105 | @cindex links, returning to | 3277 | @cindex links, returning to |
| 3106 | @kindex C-c & | ||
| 3107 | @item C-c & | ||
| 3108 | Jump back to a recorded position. A position is recorded by the | 3278 | Jump back to a recorded position. A position is recorded by the |
| 3109 | commands following internal links, and by @kbd{C-c %}. Using this | 3279 | commands following internal links, and by @kbd{C-c %}. Using this |
| 3110 | command several times in direct succession moves through a ring of | 3280 | command several times in direct succession moves through a ring of |
| 3111 | previously recorded positions. | 3281 | previously recorded positions. |
| 3112 | @c | 3282 | @c |
| 3113 | @kindex C-c C-x C-n | 3283 | @orgcmdkkcc{C-c C-x C-n,C-c C-x C-p,org-next-link,org-previous-link} |
| 3114 | @kindex C-c C-x C-p | ||
| 3115 | @cindex links, finding next/previous | 3284 | @cindex links, finding next/previous |
| 3116 | @item C-c C-x C-n | ||
| 3117 | @itemx C-c C-x C-p | ||
| 3118 | Move forward/backward to the next link in the buffer. At the limit of | 3285 | Move forward/backward to the next link in the buffer. At the limit of |
| 3119 | the buffer, the search fails once, and then wraps around. The key | 3286 | the buffer, the search fails once, and then wraps around. The key |
| 3120 | bindings for this are really too long, you might want to bind this also | 3287 | bindings for this are really too long; you might want to bind this also |
| 3121 | to @kbd{C-n} and @kbd{C-p} | 3288 | to @kbd{C-n} and @kbd{C-p} |
| 3122 | @lisp | 3289 | @lisp |
| 3123 | (add-hook 'org-load-hook | 3290 | (add-hook 'org-load-hook |
| @@ -3316,9 +3483,8 @@ Any headline becomes a TODO item when it starts with the word | |||
| 3316 | The most important commands to work with TODO entries are: | 3483 | The most important commands to work with TODO entries are: |
| 3317 | 3484 | ||
| 3318 | @table @kbd | 3485 | @table @kbd |
| 3319 | @kindex C-c C-t | 3486 | @orgcmd{C-c C-t,org-todo} |
| 3320 | @cindex cycling, of TODO states | 3487 | @cindex cycling, of TODO states |
| 3321 | @item C-c C-t | ||
| 3322 | Rotate the TODO state of the current item among | 3488 | Rotate the TODO state of the current item among |
| 3323 | 3489 | ||
| 3324 | @example | 3490 | @example |
| @@ -3329,8 +3495,7 @@ Rotate the TODO state of the current item among | |||
| 3329 | The same rotation can also be done ``remotely'' from the timeline and | 3495 | The same rotation can also be done ``remotely'' from the timeline and |
| 3330 | agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). | 3496 | agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). |
| 3331 | 3497 | ||
| 3332 | @kindex C-u C-c C-t | 3498 | @orgkey{C-u C-c C-t} |
| 3333 | @item C-u C-c C-t | ||
| 3334 | Select a specific keyword using completion or (if it has been set up) | 3499 | Select a specific keyword using completion or (if it has been set up) |
| 3335 | the fast selection interface. For the latter, you need to assign keys | 3500 | the fast selection interface. For the latter, you need to assign keys |
| 3336 | to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for | 3501 | to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for |
| @@ -3338,17 +3503,15 @@ more information. | |||
| 3338 | 3503 | ||
| 3339 | @kindex S-@key{right} | 3504 | @kindex S-@key{right} |
| 3340 | @kindex S-@key{left} | 3505 | @kindex S-@key{left} |
| 3506 | @item S-@key{right} @ @r{/} @ S-@key{left} | ||
| 3341 | @vindex org-treat-S-cursor-todo-selection-as-state-change | 3507 | @vindex org-treat-S-cursor-todo-selection-as-state-change |
| 3342 | @item S-@key{right} | ||
| 3343 | @itemx S-@key{left} | ||
| 3344 | Select the following/preceding TODO state, similar to cycling. Useful | 3508 | Select the following/preceding TODO state, similar to cycling. Useful |
| 3345 | mostly if more than two TODO states are possible (@pxref{TODO | 3509 | mostly if more than two TODO states are possible (@pxref{TODO |
| 3346 | extensions}). See also @ref{Conflicts}, for a discussion of the interaction | 3510 | extensions}). See also @ref{Conflicts}, for a discussion of the interaction |
| 3347 | with @code{shift-selection-mode}. See also the variable | 3511 | with @code{shift-selection-mode}. See also the variable |
| 3348 | @code{org-treat-S-cursor-todo-selection-as-state-change}. | 3512 | @code{org-treat-S-cursor-todo-selection-as-state-change}. |
| 3349 | @kindex C-c / t | 3513 | @orgcmd{C-c / t,org-show-todo-key} |
| 3350 | @cindex sparse tree, for TODO | 3514 | @cindex sparse tree, for TODO |
| 3351 | @itemx C-c / t | ||
| 3352 | @vindex org-todo-keywords | 3515 | @vindex org-todo-keywords |
| 3353 | View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the | 3516 | View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the |
| 3354 | entire buffer, but shows all TODO items (with not-DONE state) and the | 3517 | entire buffer, but shows all TODO items (with not-DONE state) and the |
| @@ -3359,15 +3522,13 @@ entries that match any one of these keywords. With numeric prefix argument | |||
| 3359 | N, show the tree for the Nth keyword in the variable | 3522 | N, show the tree for the Nth keyword in the variable |
| 3360 | @code{org-todo-keywords}. With two prefix arguments, find all TODO states, | 3523 | @code{org-todo-keywords}. With two prefix arguments, find all TODO states, |
| 3361 | both un-done and done. | 3524 | both un-done and done. |
| 3362 | @kindex C-c a t | 3525 | @orgcmd{C-c a t,org-todo-list} |
| 3363 | @item C-c a t | ||
| 3364 | Show the global TODO list. Collects the TODO items (with not-DONE states) | 3526 | Show the global TODO list. Collects the TODO items (with not-DONE states) |
| 3365 | from all agenda files (@pxref{Agenda Views}) into a single buffer. The new | 3527 | from all agenda files (@pxref{Agenda Views}) into a single buffer. The new |
| 3366 | buffer will be in @code{agenda-mode}, which provides commands to examine and | 3528 | buffer will be in @code{agenda-mode}, which provides commands to examine and |
| 3367 | manipulate the TODO entries from the new buffer (@pxref{Agenda commands}). | 3529 | manipulate the TODO entries from the new buffer (@pxref{Agenda commands}). |
| 3368 | @xref{Global TODO list}, for more information. | 3530 | @xref{Global TODO list}, for more information. |
| 3369 | @kindex S-M-@key{RET} | 3531 | @orgcmd{S-M-@key{RET},org-insert-todo-heading} |
| 3370 | @item S-M-@key{RET} | ||
| 3371 | Insert a new TODO entry below the current one. | 3532 | Insert a new TODO entry below the current one. |
| 3372 | @end table | 3533 | @end table |
| 3373 | 3534 | ||
| @@ -3644,8 +3805,7 @@ example: | |||
| 3644 | @end example | 3805 | @end example |
| 3645 | 3806 | ||
| 3646 | @table @kbd | 3807 | @table @kbd |
| 3647 | @kindex C-c C-x o | 3808 | @orgcmd{C-c C-x o,org-toggle-ordered-property} |
| 3648 | @item C-c C-x o | ||
| 3649 | @vindex org-track-ordered-property-with-tag | 3809 | @vindex org-track-ordered-property-with-tag |
| 3650 | @cindex property, ORDERED | 3810 | @cindex property, ORDERED |
| 3651 | Toggle the @code{ORDERED} property of the current entry. A property is used | 3811 | Toggle the @code{ORDERED} property of the current entry. A property is used |
| @@ -3653,8 +3813,7 @@ for this behavior because this should be local to the current entry, not | |||
| 3653 | inherited like a tag. However, if you would like to @i{track} the value of | 3813 | inherited like a tag. However, if you would like to @i{track} the value of |
| 3654 | this property with a tag for better visibility, customize the variable | 3814 | this property with a tag for better visibility, customize the variable |
| 3655 | @code{org-track-ordered-property-with-tag}. | 3815 | @code{org-track-ordered-property-with-tag}. |
| 3656 | @kindex C-u C-u C-u C-c C-t | 3816 | @orgkey{C-u C-u C-u C-c C-t} |
| 3657 | @item C-u C-u C-u C-c C-t | ||
| 3658 | Change TODO state, circumventing any state blocking. | 3817 | Change TODO state, circumventing any state blocking. |
| 3659 | @end table | 3818 | @end table |
| 3660 | 3819 | ||
| @@ -3698,7 +3857,7 @@ work time}. | |||
| 3698 | 3857 | ||
| 3699 | The most basic logging is to keep track of @emph{when} a certain TODO | 3858 | The most basic logging is to keep track of @emph{when} a certain TODO |
| 3700 | item was finished. This is achieved with@footnote{The corresponding | 3859 | item was finished. This is achieved with@footnote{The corresponding |
| 3701 | in-buffer setting is: @code{#+STARTUP: logdone}}. | 3860 | in-buffer setting is: @code{#+STARTUP: logdone}} |
| 3702 | 3861 | ||
| 3703 | @lisp | 3862 | @lisp |
| 3704 | (setq org-log-done 'time) | 3863 | (setq org-log-done 'time) |
| @@ -3928,18 +4087,16 @@ Priorities can be attached to any outline node; they do not need to be TODO | |||
| 3928 | items. | 4087 | items. |
| 3929 | 4088 | ||
| 3930 | @table @kbd | 4089 | @table @kbd |
| 3931 | @kindex @kbd{C-c ,} | ||
| 3932 | @item @kbd{C-c ,} | 4090 | @item @kbd{C-c ,} |
| 3933 | Set the priority of the current headline. The command prompts for a | 4091 | @kindex @kbd{C-c ,} |
| 3934 | priority character @samp{A}, @samp{B} or @samp{C}. When you press | 4092 | @findex org-priority |
| 3935 | @key{SPC} instead, the priority cookie is removed from the headline. | 4093 | Set the priority of the current headline (@command{org-priority}). The |
| 3936 | The priorities can also be changed ``remotely'' from the timeline and | 4094 | command prompts for a priority character @samp{A}, @samp{B} or @samp{C}. |
| 3937 | agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). | 4095 | When you press @key{SPC} instead, the priority cookie is removed from the |
| 4096 | headline. The priorities can also be changed ``remotely'' from the timeline | ||
| 4097 | and agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). | ||
| 3938 | @c | 4098 | @c |
| 3939 | @kindex S-@key{up} | 4099 | @orgcmdkkcc{S-@key{up},S-@key{down},org-priority-up,org-priority-down} |
| 3940 | @kindex S-@key{down} | ||
| 3941 | @item S-@key{up} | ||
| 3942 | @itemx S-@key{down} | ||
| 3943 | @vindex org-priority-start-cycle-with-default | 4100 | @vindex org-priority-start-cycle-with-default |
| 3944 | Increase/decrease priority of current headline@footnote{See also the option | 4101 | Increase/decrease priority of current headline@footnote{See also the option |
| 3945 | @code{org-priority-start-cycle-with-default}.}. Note that these keys are | 4102 | @code{org-priority-start-cycle-with-default}.}. Note that these keys are |
| @@ -4089,13 +4246,11 @@ off a box while there are unchecked boxes above it. | |||
| 4089 | @noindent The following commands work with checkboxes: | 4246 | @noindent The following commands work with checkboxes: |
| 4090 | 4247 | ||
| 4091 | @table @kbd | 4248 | @table @kbd |
| 4092 | @kindex C-c C-c | 4249 | @orgcmd{C-c C-c,org-toggle-checkbox} |
| 4093 | @item C-c C-c | ||
| 4094 | Toggle checkbox status or (with prefix arg) checkbox presence at point. With | 4250 | Toggle checkbox status or (with prefix arg) checkbox presence at point. With |
| 4095 | double prefix argument, set it to @samp{[-]}, which is considered to be an | 4251 | double prefix argument, set it to @samp{[-]}, which is considered to be an |
| 4096 | intermediate state. | 4252 | intermediate state. |
| 4097 | @kindex C-c C-x C-b | 4253 | @orgcmd{C-c C-x C-b,org-toggle-checkbox} |
| 4098 | @item C-c C-x C-b | ||
| 4099 | Toggle checkbox status or (with prefix arg) checkbox presence at point. With | 4254 | Toggle checkbox status or (with prefix arg) checkbox presence at point. With |
| 4100 | double prefix argument, set it to @samp{[-]}, which is considered to be an | 4255 | double prefix argument, set it to @samp{[-]}, which is considered to be an |
| 4101 | intermediate state. | 4256 | intermediate state. |
| @@ -4110,13 +4265,11 @@ this headline and the next (so @emph{not} the entire subtree). | |||
| 4110 | @item | 4265 | @item |
| 4111 | If there is no active region, just toggle the checkbox at point. | 4266 | If there is no active region, just toggle the checkbox at point. |
| 4112 | @end itemize | 4267 | @end itemize |
| 4113 | @kindex M-S-@key{RET} | 4268 | @orgcmd{M-S-@key{RET},org-insert-todo-heading} |
| 4114 | @item M-S-@key{RET} | ||
| 4115 | Insert a new item with a checkbox. | 4269 | Insert a new item with a checkbox. |
| 4116 | This works only if the cursor is already in a plain list item | 4270 | This works only if the cursor is already in a plain list item |
| 4117 | (@pxref{Plain lists}). | 4271 | (@pxref{Plain lists}). |
| 4118 | @kindex C-c C-x o | 4272 | @orgcmd{C-c C-x o,org-toggle-ordered-property} |
| 4119 | @item C-c C-x o | ||
| 4120 | @vindex org-track-ordered-property-with-tag | 4273 | @vindex org-track-ordered-property-with-tag |
| 4121 | @cindex property, ORDERED | 4274 | @cindex property, ORDERED |
| 4122 | Toggle the @code{ORDERED} property of the entry, to toggle if checkboxes must | 4275 | Toggle the @code{ORDERED} property of the entry, to toggle if checkboxes must |
| @@ -4125,8 +4278,7 @@ this should be local to the current entry, not inherited like a tag. | |||
| 4125 | However, if you would like to @i{track} the value of this property with a tag | 4278 | However, if you would like to @i{track} the value of this property with a tag |
| 4126 | for better visibility, customize the variable | 4279 | for better visibility, customize the variable |
| 4127 | @code{org-track-ordered-property-with-tag}. | 4280 | @code{org-track-ordered-property-with-tag}. |
| 4128 | @kindex C-c # | 4281 | @orgcmd{C-c #,org-update-statistics-cookies} |
| 4129 | @item C-c # | ||
| 4130 | Update the statistics cookie in the current outline entry. When called with | 4282 | Update the statistics cookie in the current outline entry. When called with |
| 4131 | a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are | 4283 | a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are |
| 4132 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make | 4284 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make |
| @@ -4220,8 +4372,7 @@ After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is | |||
| 4220 | also a special command for inserting tags: | 4372 | also a special command for inserting tags: |
| 4221 | 4373 | ||
| 4222 | @table @kbd | 4374 | @table @kbd |
| 4223 | @kindex C-c C-q | 4375 | @orgcmd{C-c C-q,org-set-tags-command} |
| 4224 | @item C-c C-q | ||
| 4225 | @cindex completion, of tags | 4376 | @cindex completion, of tags |
| 4226 | @vindex org-tags-column | 4377 | @vindex org-tags-column |
| 4227 | Enter new tags for the current headline. Org-mode will either offer | 4378 | Enter new tags for the current headline. Org-mode will either offer |
| @@ -4231,8 +4382,7 @@ to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all | |||
| 4231 | tags in the current buffer will be aligned to that column, just to make | 4382 | tags in the current buffer will be aligned to that column, just to make |
| 4232 | things look nice. TAGS are automatically realigned after promotion, | 4383 | things look nice. TAGS are automatically realigned after promotion, |
| 4233 | demotion, and TODO state changes (@pxref{TODO basics}). | 4384 | demotion, and TODO state changes (@pxref{TODO basics}). |
| 4234 | @kindex C-c C-c | 4385 | @orgcmd{C-c C-c,org-set-tags-command} |
| 4235 | @item C-c C-c | ||
| 4236 | When the cursor is in a headline, this does the same as @kbd{C-c C-q}. | 4386 | When the cursor is in a headline, this does the same as @kbd{C-c C-q}. |
| 4237 | @end table | 4387 | @end table |
| 4238 | 4388 | ||
| @@ -4399,18 +4549,13 @@ Once a system of tags has been set up, it can be used to collect related | |||
| 4399 | information into special lists. | 4549 | information into special lists. |
| 4400 | 4550 | ||
| 4401 | @table @kbd | 4551 | @table @kbd |
| 4402 | @kindex C-c \ | 4552 | @orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} |
| 4403 | @kindex C-c / m | ||
| 4404 | @item C-c \ | ||
| 4405 | @itemx C-c / m | ||
| 4406 | Create a sparse tree with all headlines matching a tags search. With a | 4553 | Create a sparse tree with all headlines matching a tags search. With a |
| 4407 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | 4554 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. |
| 4408 | @kindex C-c a m | 4555 | @orgcmd{C-c a m,org-tags-view} |
| 4409 | @item C-c a m | ||
| 4410 | Create a global list of tag matches from all agenda files. | 4556 | Create a global list of tag matches from all agenda files. |
| 4411 | @xref{Matching tags and properties}. | 4557 | @xref{Matching tags and properties}. |
| 4412 | @kindex C-c a M | 4558 | @orgcmd{C-c a M,org-tags-view} |
| 4413 | @item C-c a M | ||
| 4414 | @vindex org-tags-match-list-sublevels | 4559 | @vindex org-tags-match-list-sublevels |
| 4415 | Create a global list of tag matches from all agenda files, but check | 4560 | Create a global list of tag matches from all agenda files, but check |
| 4416 | only TODO items and force checking subitems (see variable | 4561 | only TODO items and force checking subitems (see variable |
| @@ -4511,33 +4656,29 @@ Org files. | |||
| 4511 | The following commands help to work with properties: | 4656 | The following commands help to work with properties: |
| 4512 | 4657 | ||
| 4513 | @table @kbd | 4658 | @table @kbd |
| 4514 | @kindex M-@key{TAB} | 4659 | @orgcmd{M-@key{TAB},org-complete} |
| 4515 | @item M-@key{TAB} | ||
| 4516 | After an initial colon in a line, complete property keys. All keys used | 4660 | After an initial colon in a line, complete property keys. All keys used |
| 4517 | in the current file will be offered as possible completions. | 4661 | in the current file will be offered as possible completions. |
| 4518 | @kindex C-c C-x p | 4662 | @orgcmd{C-c C-x p,org-set-property} |
| 4519 | @item C-c C-x p | ||
| 4520 | Set a property. This prompts for a property name and a value. If | 4663 | Set a property. This prompts for a property name and a value. If |
| 4521 | necessary, the property drawer is created as well. | 4664 | necessary, the property drawer is created as well. |
| 4522 | @item M-x org-insert-property-drawer | 4665 | @item M-x org-insert-property-drawer |
| 4666 | @findex org-insert-property-drawer | ||
| 4523 | Insert a property drawer into the current entry. The drawer will be | 4667 | Insert a property drawer into the current entry. The drawer will be |
| 4524 | inserted early in the entry, but after the lines with planning | 4668 | inserted early in the entry, but after the lines with planning |
| 4525 | information like deadlines. | 4669 | information like deadlines. |
| 4526 | @kindex C-c C-c | 4670 | @orgcmd{C-c C-c,org-property-action} |
| 4527 | @item C-c C-c | ||
| 4528 | With the cursor in a property drawer, this executes property commands. | 4671 | With the cursor in a property drawer, this executes property commands. |
| 4529 | @item C-c C-c s | 4672 | @orgcmd{C-c C-c s,org-set-property} |
| 4530 | Set a property in the current entry. Both the property and the value | 4673 | Set a property in the current entry. Both the property and the value |
| 4531 | can be inserted using completion. | 4674 | can be inserted using completion. |
| 4532 | @kindex S-@key{right} | 4675 | @orgcmdkkcc{S-@key{right},S-@key{left},org-property-next-allowed-value,org-property-previous-allowed-value} |
| 4533 | @kindex S-@key{left} | ||
| 4534 | @item S-@key{left}/@key{right} | ||
| 4535 | Switch property at point to the next/previous allowed value. | 4676 | Switch property at point to the next/previous allowed value. |
| 4536 | @item C-c C-c d | 4677 | @orgcmd{C-c C-c d,org-delete-property} |
| 4537 | Remove a property from the current entry. | 4678 | Remove a property from the current entry. |
| 4538 | @item C-c C-c D | 4679 | @orgcmd{C-c C-c D,org-delete-property-globally} |
| 4539 | Globally remove a property, from all entries in the current file. | 4680 | Globally remove a property, from all entries in the current file. |
| 4540 | @item C-c C-c c | 4681 | @orgcmd{C-c C-c c,org-compute-property-at-point} |
| 4541 | Compute the property at point, using the operator and scope from the | 4682 | Compute the property at point, using the operator and scope from the |
| 4542 | nearest column format definition. | 4683 | nearest column format definition. |
| 4543 | @end table | 4684 | @end table |
| @@ -4592,18 +4733,13 @@ ITEM @r{The content of the entry.} | |||
| 4592 | To create sparse trees and special lists with selection based on properties, | 4733 | To create sparse trees and special lists with selection based on properties, |
| 4593 | the same commands are used as for tag searches (@pxref{Tag searches}). | 4734 | the same commands are used as for tag searches (@pxref{Tag searches}). |
| 4594 | @table @kbd | 4735 | @table @kbd |
| 4595 | @kindex C-c \ | 4736 | @orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} |
| 4596 | @kindex C-c / m | ||
| 4597 | @item C-c \ | ||
| 4598 | @itemx C-c / m | ||
| 4599 | Create a sparse tree with all matching entries. With a | 4737 | Create a sparse tree with all matching entries. With a |
| 4600 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | 4738 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. |
| 4601 | @kindex C-c a m | 4739 | @orgcmd{C-c a m,org-tags-view} |
| 4602 | @item C-c a m | ||
| 4603 | Create a global list of tag/property matches from all agenda files. | 4740 | Create a global list of tag/property matches from all agenda files. |
| 4604 | @xref{Matching tags and properties}. | 4741 | @xref{Matching tags and properties}. |
| 4605 | @kindex C-c a M | 4742 | @orgcmd{C-c a M,org-tags-view} |
| 4606 | @item C-c a M | ||
| 4607 | @vindex org-tags-match-list-sublevels | 4743 | @vindex org-tags-match-list-sublevels |
| 4608 | Create a global list of tag matches from all agenda files, but check | 4744 | Create a global list of tag matches from all agenda files, but check |
| 4609 | only TODO items and force checking of subitems (see variable | 4745 | only TODO items and force checking of subitems (see variable |
| @@ -4617,12 +4753,11 @@ There is also a special command for creating sparse trees based on a | |||
| 4617 | single property: | 4753 | single property: |
| 4618 | 4754 | ||
| 4619 | @table @kbd | 4755 | @table @kbd |
| 4620 | @kindex C-c / p | 4756 | @orgkey{C-c / p} |
| 4621 | @item C-c / p | ||
| 4622 | Create a sparse tree based on the value of a property. This first | 4757 | Create a sparse tree based on the value of a property. This first |
| 4623 | prompts for the name of a property, and then for a value. A sparse tree | 4758 | prompts for the name of a property, and then for a value. A sparse tree |
| 4624 | is created with all entries that define this property with the given | 4759 | is created with all entries that define this property with the given |
| 4625 | value. If you enclose the value into curly braces, it is interpreted as | 4760 | value. If you enclose the value in curly braces, it is interpreted as |
| 4626 | a regular expression and matched against the property values. | 4761 | a regular expression and matched against the property values. |
| 4627 | @end table | 4762 | @end table |
| 4628 | 4763 | ||
| @@ -4632,7 +4767,7 @@ a regular expression and matched against the property values. | |||
| 4632 | @cindex inheritance, of properties | 4767 | @cindex inheritance, of properties |
| 4633 | 4768 | ||
| 4634 | @vindex org-use-property-inheritance | 4769 | @vindex org-use-property-inheritance |
| 4635 | The outline structure of Org-mode documents lends itself for an | 4770 | The outline structure of Org-mode documents lends itself to an |
| 4636 | inheritance model of properties: if the parent in a tree has a certain | 4771 | inheritance model of properties: if the parent in a tree has a certain |
| 4637 | property, the children can inherit this property. Org-mode does not | 4772 | property, the children can inherit this property. Org-mode does not |
| 4638 | turn this on by default, because it can slow down property searches | 4773 | turn this on by default, because it can slow down property searches |
| @@ -4642,7 +4777,7 @@ useful, you can turn it on by setting the variable | |||
| 4642 | all properties inherited from the parent, to a list of properties | 4777 | all properties inherited from the parent, to a list of properties |
| 4643 | that should be inherited, or to a regular expression that matches | 4778 | that should be inherited, or to a regular expression that matches |
| 4644 | inherited properties. If a property has the value @samp{nil}, this is | 4779 | inherited properties. If a property has the value @samp{nil}, this is |
| 4645 | interpreted as an explicit undefine of he property, so that inheritance | 4780 | interpreted as an explicit undefine of the property, so that inheritance |
| 4646 | search will stop at this value and return @code{nil}. | 4781 | search will stop at this value and return @code{nil}. |
| 4647 | 4782 | ||
| 4648 | Org-mode has a few properties for which inheritance is hard-coded, at | 4783 | Org-mode has a few properties for which inheritance is hard-coded, at |
| @@ -4784,7 +4919,7 @@ same summary information. | |||
| 4784 | The @code{est+} summary type requires further explanation. It is used for | 4919 | The @code{est+} summary type requires further explanation. It is used for |
| 4785 | combining estimates, expressed as low-high ranges. For example, instead | 4920 | combining estimates, expressed as low-high ranges. For example, instead |
| 4786 | of estimating a particular task will take 5 days, you might estimate it as | 4921 | of estimating a particular task will take 5 days, you might estimate it as |
| 4787 | 5-6 days if you're fairly confident you know how much woark is required, or | 4922 | 5-6 days if you're fairly confident you know how much work is required, or |
| 4788 | 1-10 days if you don't really know what needs to be done. Both ranges | 4923 | 1-10 days if you don't really know what needs to be done. Both ranges |
| 4789 | average at 5.5 days, but the first represents a more predictable delivery. | 4924 | average at 5.5 days, but the first represents a more predictable delivery. |
| 4790 | 4925 | ||
| @@ -4829,8 +4964,7 @@ in the subtree. | |||
| 4829 | 4964 | ||
| 4830 | @table @kbd | 4965 | @table @kbd |
| 4831 | @tsubheading{Turning column view on and off} | 4966 | @tsubheading{Turning column view on and off} |
| 4832 | @kindex C-c C-x C-c | 4967 | @orgcmd{C-c C-x C-c,org-columns} |
| 4833 | @item C-c C-x C-c | ||
| 4834 | @vindex org-columns-default-format | 4968 | @vindex org-columns-default-format |
| 4835 | Turn on column view. If the cursor is before the first headline in the file, | 4969 | Turn on column view. If the cursor is before the first headline in the file, |
| 4836 | column view is turned on for the entire file, using the @code{#+COLUMNS} | 4970 | column view is turned on for the entire file, using the @code{#+COLUMNS} |
| @@ -4841,14 +4975,11 @@ for the tree starting at the entry that contains the @code{:COLUMNS:} | |||
| 4841 | property. If no such property is found, the format is taken from the | 4975 | property. If no such property is found, the format is taken from the |
| 4842 | @code{#+COLUMNS} line or from the variable @code{org-columns-default-format}, | 4976 | @code{#+COLUMNS} line or from the variable @code{org-columns-default-format}, |
| 4843 | and column view is established for the current entry and its subtree. | 4977 | and column view is established for the current entry and its subtree. |
| 4844 | @kindex r | 4978 | @orgcmd{r,org-columns-redo} |
| 4845 | @item r | ||
| 4846 | Recreate the column view, to include recent changes made in the buffer. | 4979 | Recreate the column view, to include recent changes made in the buffer. |
| 4847 | @kindex g | 4980 | @orgcmd{g,org-columns-redo} |
| 4848 | @item g | ||
| 4849 | Same as @kbd{r}. | 4981 | Same as @kbd{r}. |
| 4850 | @kindex q | 4982 | @orgcmd{q,org-columns-quit} |
| 4851 | @item q | ||
| 4852 | Exit column view. | 4983 | Exit column view. |
| 4853 | @tsubheading{Editing values} | 4984 | @tsubheading{Editing values} |
| 4854 | @item @key{left} @key{right} @key{up} @key{down} | 4985 | @item @key{left} @key{right} @key{up} @key{down} |
| @@ -4859,40 +4990,30 @@ Move through the column view from field to field. | |||
| 4859 | Switch to the next/previous allowed value of the field. For this, you | 4990 | Switch to the next/previous allowed value of the field. For this, you |
| 4860 | have to have specified allowed values for a property. | 4991 | have to have specified allowed values for a property. |
| 4861 | @item 1..9,0 | 4992 | @item 1..9,0 |
| 4862 | Directly select the nth allowed value, @kbd{0} selects the 10th value. | 4993 | Directly select the Nth allowed value, @kbd{0} selects the 10th value. |
| 4863 | @kindex n | 4994 | @orgcmdkkcc{n,p,org-columns-next-allowed-value,org-columns-previous-allowed-value} |
| 4864 | @kindex p | ||
| 4865 | @itemx n / p | ||
| 4866 | Same as @kbd{S-@key{left}/@key{right}} | 4995 | Same as @kbd{S-@key{left}/@key{right}} |
| 4867 | @kindex e | 4996 | @orgcmd{e,org-columns-edit-value} |
| 4868 | @item e | ||
| 4869 | Edit the property at point. For the special properties, this will | 4997 | Edit the property at point. For the special properties, this will |
| 4870 | invoke the same interface that you normally use to change that | 4998 | invoke the same interface that you normally use to change that |
| 4871 | property. For example, when editing a TAGS property, the tag completion | 4999 | property. For example, when editing a TAGS property, the tag completion |
| 4872 | or fast selection interface will pop up. | 5000 | or fast selection interface will pop up. |
| 4873 | @kindex C-c C-c | 5001 | @orgcmd{C-c C-c,org-columns-set-tags-or-toggle} |
| 4874 | @item C-c C-c | ||
| 4875 | When there is a checkbox at point, toggle it. | 5002 | When there is a checkbox at point, toggle it. |
| 4876 | @kindex v | 5003 | @orgcmd{v,org-columns-show-value} |
| 4877 | @item v | ||
| 4878 | View the full value of this property. This is useful if the width of | 5004 | View the full value of this property. This is useful if the width of |
| 4879 | the column is smaller than that of the value. | 5005 | the column is smaller than that of the value. |
| 4880 | @kindex a | 5006 | @orgcmd{a,org-columns-edit-allowed} |
| 4881 | @item a | ||
| 4882 | Edit the list of allowed values for this property. If the list is found | 5007 | Edit the list of allowed values for this property. If the list is found |
| 4883 | in the hierarchy, the modified values is stored there. If no list is | 5008 | in the hierarchy, the modified values is stored there. If no list is |
| 4884 | found, the new value is stored in the first entry that is part of the | 5009 | found, the new value is stored in the first entry that is part of the |
| 4885 | current column view. | 5010 | current column view. |
| 4886 | @tsubheading{Modifying the table structure} | 5011 | @tsubheading{Modifying the table structure} |
| 4887 | @kindex < | 5012 | @orgcmdkkcc{<,>,org-columns-narrow,org-columns-widen} |
| 4888 | @kindex > | ||
| 4889 | @item < / > | ||
| 4890 | Make the column narrower/wider by one character. | 5013 | Make the column narrower/wider by one character. |
| 4891 | @kindex S-M-@key{right} | 5014 | @orgcmd{S-M-@key{right},org-columns-new} |
| 4892 | @item S-M-@key{right} | ||
| 4893 | Insert a new column, to the left of the current column. | 5015 | Insert a new column, to the left of the current column. |
| 4894 | @kindex S-M-@key{left} | 5016 | @orgcmd{S-M-@key{left},org-columns-delete} |
| 4895 | @item S-M-@key{left} | ||
| 4896 | Delete the current column. | 5017 | Delete the current column. |
| 4897 | @end table | 5018 | @end table |
| 4898 | 5019 | ||
| @@ -4948,20 +5069,16 @@ column view is @code{ITEM}. | |||
| 4948 | The following commands insert or update the dynamic block: | 5069 | The following commands insert or update the dynamic block: |
| 4949 | 5070 | ||
| 4950 | @table @kbd | 5071 | @table @kbd |
| 4951 | @kindex C-c C-x i | 5072 | @orgcmd{C-c C-x i,org-insert-columns-dblock} |
| 4952 | @item C-c C-x i | ||
| 4953 | Insert a dynamic block capturing a column view. You will be prompted | 5073 | Insert a dynamic block capturing a column view. You will be prompted |
| 4954 | for the scope or ID of the view. | 5074 | for the scope or ID of the view. |
| 4955 | @kindex C-c C-c | 5075 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} |
| 4956 | @item C-c C-c | ||
| 4957 | @kindex C-c C-x C-u | ||
| 4958 | @itemx C-c C-x C-u | ||
| 4959 | Update dynamic block at point. The cursor needs to be in the | 5076 | Update dynamic block at point. The cursor needs to be in the |
| 4960 | @code{#+BEGIN} line of the dynamic block. | 5077 | @code{#+BEGIN} line of the dynamic block. |
| 4961 | @kindex C-u C-c C-x C-u | 5078 | @orgcmd{C-u C-c C-x C-u,org-update-all-dblocks} |
| 4962 | @item C-u C-c C-x C-u | ||
| 4963 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if | 5079 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if |
| 4964 | you have several clock table blocks in a buffer. | 5080 | you have several clock table blocks, column-capturing blocks or other dynamic |
| 5081 | blocks in a buffer. | ||
| 4965 | @end table | 5082 | @end table |
| 4966 | 5083 | ||
| 4967 | You can add formulas to the column view table and you may add plotting | 5084 | You can add formulas to the column view table and you may add plotting |
| @@ -5006,7 +5123,6 @@ is used in a much wider sense. | |||
| 5006 | * Creating timestamps:: Commands which insert timestamps | 5123 | * Creating timestamps:: Commands which insert timestamps |
| 5007 | * Deadlines and scheduling:: Planning your work | 5124 | * Deadlines and scheduling:: Planning your work |
| 5008 | * Clocking work time:: Tracking how long you spend on a task | 5125 | * Clocking work time:: Tracking how long you spend on a task |
| 5009 | * Resolving idle time:: Resolving time if you've been idle | ||
| 5010 | * Effort estimates:: Planning work effort in advance | 5126 | * Effort estimates:: Planning work effort in advance |
| 5011 | * Relative timer:: Notes with a running timer | 5127 | * Relative timer:: Notes with a running timer |
| 5012 | * Countdown timer:: Starting a countdown timer for a task | 5128 | * Countdown timer:: Starting a countdown timer for a task |
| @@ -5130,17 +5246,11 @@ instead. | |||
| 5130 | Access the agenda for the date given by the timestamp or -range at | 5246 | Access the agenda for the date given by the timestamp or -range at |
| 5131 | point (@pxref{Weekly/daily agenda}). | 5247 | point (@pxref{Weekly/daily agenda}). |
| 5132 | @c | 5248 | @c |
| 5133 | @kindex S-@key{left} | 5249 | @orgcmdkkcc{S-@key{left},S-@key{right},org-timestamp-down-day,org-timestamp-up-day} |
| 5134 | @kindex S-@key{right} | ||
| 5135 | @item S-@key{left} | ||
| 5136 | @itemx S-@key{right} | ||
| 5137 | Change date at cursor by one day. These key bindings conflict with | 5250 | Change date at cursor by one day. These key bindings conflict with |
| 5138 | shift-selection and related modes (@pxref{Conflicts}). | 5251 | shift-selection and related modes (@pxref{Conflicts}). |
| 5139 | @c | 5252 | @c |
| 5140 | @kindex S-@key{up} | 5253 | @orgcmdkkcc{S-@key{up},S-@key{down},org-timestamp-up,org-timestamp-down-down} |
| 5141 | @kindex S-@key{down} | ||
| 5142 | @item S-@key{up} | ||
| 5143 | @itemx S-@key{down} | ||
| 5144 | Change the item under the cursor in a timestamp. The cursor can be on a | 5254 | Change the item under the cursor in a timestamp. The cursor can be on a |
| 5145 | year, month, day, hour or minute. When the timestamp contains a time range | 5255 | year, month, day, hour or minute. When the timestamp contains a time range |
| 5146 | like @samp{15:30-16:30}, modifying the first time will also shift the second, | 5256 | like @samp{15:30-16:30}, modifying the first time will also shift the second, |
| @@ -5150,9 +5260,8 @@ timestamp, these same keys modify the priority of an item. | |||
| 5150 | (@pxref{Priorities}). The key bindings also conflict with shift-selection and | 5260 | (@pxref{Priorities}). The key bindings also conflict with shift-selection and |
| 5151 | related modes (@pxref{Conflicts}). | 5261 | related modes (@pxref{Conflicts}). |
| 5152 | @c | 5262 | @c |
| 5153 | @kindex C-c C-y | 5263 | @orgcmd{C-c C-y,org-evaluate-time-range} |
| 5154 | @cindex evaluate time range | 5264 | @cindex evaluate time range |
| 5155 | @item C-c C-y | ||
| 5156 | Evaluate a time range by computing the difference between start and end. | 5265 | Evaluate a time range by computing the difference between start and end. |
| 5157 | With a prefix argument, insert result after the time range (in a table: into | 5266 | With a prefix argument, insert result after the time range (in a table: into |
| 5158 | the following column). | 5267 | the following column). |
| @@ -5215,7 +5324,7 @@ letter ([dwmy]) to indicate change in days, weeks, months, or years. With a | |||
| 5215 | single plus or minus, the date is always relative to today. With a | 5324 | single plus or minus, the date is always relative to today. With a |
| 5216 | double plus or minus, it is relative to the default date. If instead of | 5325 | double plus or minus, it is relative to the default date. If instead of |
| 5217 | a single letter, you use the abbreviation of day name, the date will be | 5326 | a single letter, you use the abbreviation of day name, the date will be |
| 5218 | the nth such day. E.g. | 5327 | the Nth such day. E.g. |
| 5219 | 5328 | ||
| 5220 | @example | 5329 | @example |
| 5221 | +0 --> today | 5330 | +0 --> today |
| @@ -5234,7 +5343,7 @@ you want to use unabbreviated names and/or other languages, configure | |||
| 5234 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. | 5343 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. |
| 5235 | 5344 | ||
| 5236 | You can specify a time range by giving start and end times or by giving a | 5345 | You can specify a time range by giving start and end times or by giving a |
| 5237 | start time and a duration (in HH:MM format). Use '-' or '--' as the separator | 5346 | start time and a duration (in HH:MM format). Use `-' or `-@{@}-' as the separator |
| 5238 | in the former case and use '+' as the separator in the latter case. E.g. | 5347 | in the former case and use '+' as the separator in the latter case. E.g. |
| 5239 | 5348 | ||
| 5240 | @example | 5349 | @example |
| @@ -5298,8 +5407,7 @@ customizing the variables @code{org-display-custom-times} and | |||
| 5298 | @code{org-time-stamp-custom-formats}. | 5407 | @code{org-time-stamp-custom-formats}. |
| 5299 | 5408 | ||
| 5300 | @table @kbd | 5409 | @table @kbd |
| 5301 | @kindex C-c C-x C-t | 5410 | @orgcmd{C-c C-x C-t,org-toggle-time-stamp-overlays} |
| 5302 | @item C-c C-x C-t | ||
| 5303 | Toggle the display of custom formats for dates and times. | 5411 | Toggle the display of custom formats for dates and times. |
| 5304 | @end table | 5412 | @end table |
| 5305 | 5413 | ||
| @@ -5320,7 +5428,7 @@ just like @kbd{S-@key{left}/@key{right}}. At the end of the stamp, the | |||
| 5320 | time will be changed by one minute. | 5428 | time will be changed by one minute. |
| 5321 | @item | 5429 | @item |
| 5322 | If the timestamp contains a range of clock times or a repeater, these | 5430 | If the timestamp contains a range of clock times or a repeater, these |
| 5323 | will not be overlayed, but remain in the buffer as they were. | 5431 | will not be overlaid, but remain in the buffer as they were. |
| 5324 | @item | 5432 | @item |
| 5325 | When you delete a timestamp character-by-character, it will only | 5433 | When you delete a timestamp character-by-character, it will only |
| 5326 | disappear from the buffer after @emph{all} (invisible) characters | 5434 | disappear from the buffer after @emph{all} (invisible) characters |
| @@ -5372,8 +5480,8 @@ The headline will be listed under the given date@footnote{It will still | |||
| 5372 | be listed on that date after it has been marked DONE. If you don't like | 5480 | be listed on that date after it has been marked DONE. If you don't like |
| 5373 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In | 5481 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In |
| 5374 | addition, a reminder that the scheduled date has passed will be present | 5482 | addition, a reminder that the scheduled date has passed will be present |
| 5375 | in the compilation for @emph{today}, until the entry is marked DONE. | 5483 | in the compilation for @emph{today}, until the entry is marked DONE, i.e. |
| 5376 | I.e. the task will automatically be forwarded until completed. | 5484 | the task will automatically be forwarded until completed. |
| 5377 | 5485 | ||
| 5378 | @example | 5486 | @example |
| 5379 | *** TODO Call Trillian for a date on New Years Eve. | 5487 | *** TODO Call Trillian for a date on New Years Eve. |
| @@ -5415,8 +5523,7 @@ an item: | |||
| 5415 | 5523 | ||
| 5416 | @table @kbd | 5524 | @table @kbd |
| 5417 | @c | 5525 | @c |
| 5418 | @kindex C-c C-d | 5526 | @orgcmd{C-c C-d,org-deadline} |
| 5419 | @item C-c C-d | ||
| 5420 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen | 5527 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen |
| 5421 | in the line directly following the headline. When called with a prefix arg, | 5528 | in the line directly following the headline. When called with a prefix arg, |
| 5422 | an existing deadline will be removed from the entry. Depending on the | 5529 | an existing deadline will be removed from the entry. Depending on the |
| @@ -5426,8 +5533,7 @@ and @code{nologredeadline}}, a note will be taken when changing an existing | |||
| 5426 | deadline. | 5533 | deadline. |
| 5427 | @c FIXME Any CLOSED timestamp will be removed.???????? | 5534 | @c FIXME Any CLOSED timestamp will be removed.???????? |
| 5428 | @c | 5535 | @c |
| 5429 | @kindex C-c C-s | 5536 | @orgcmd{C-c C-s,org-schedule} |
| 5430 | @item C-c C-s | ||
| 5431 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will | 5537 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will |
| 5432 | happen in the line directly following the headline. Any CLOSED timestamp | 5538 | happen in the line directly following the headline. Any CLOSED timestamp |
| 5433 | will be removed. When called with a prefix argument, remove the scheduling | 5539 | will be removed. When called with a prefix argument, remove the scheduling |
| @@ -5437,18 +5543,16 @@ keywords @code{logredeadline}, @code{lognoteredeadline}, and | |||
| 5437 | @code{nologredeadline}}, a note will be taken when changing an existing | 5543 | @code{nologredeadline}}, a note will be taken when changing an existing |
| 5438 | scheduling time. | 5544 | scheduling time. |
| 5439 | @c | 5545 | @c |
| 5440 | @kindex C-c C-x C-k | 5546 | @orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action} |
| 5441 | @kindex k a | 5547 | @kindex k a |
| 5442 | @kindex k s | 5548 | @kindex k s |
| 5443 | @item C-c C-x C-k | ||
| 5444 | Mark the current entry for agenda action. After you have marked the entry | 5549 | Mark the current entry for agenda action. After you have marked the entry |
| 5445 | like this, you can open the agenda or the calendar to find an appropriate | 5550 | like this, you can open the agenda or the calendar to find an appropriate |
| 5446 | date. With the cursor on the selected date, press @kbd{k s} or @kbd{k d} to | 5551 | date. With the cursor on the selected date, press @kbd{k s} or @kbd{k d} to |
| 5447 | schedule the marked item. | 5552 | schedule the marked item. |
| 5448 | @c | 5553 | @c |
| 5449 | @kindex C-c / d | 5554 | @orgcmd{C-c / d,org-check-deadlines} |
| 5450 | @cindex sparse tree, for deadlines | 5555 | @cindex sparse tree, for deadlines |
| 5451 | @item C-c / d | ||
| 5452 | @vindex org-deadline-warning-days | 5556 | @vindex org-deadline-warning-days |
| 5453 | Create a sparse tree with all deadlines that are either past-due, or | 5557 | Create a sparse tree with all deadlines that are either past-due, or |
| 5454 | which will become due within @code{org-deadline-warning-days}. | 5558 | which will become due within @code{org-deadline-warning-days}. |
| @@ -5456,12 +5560,10 @@ With @kbd{C-u} prefix, show all deadlines in the file. With a numeric | |||
| 5456 | prefix, check that many days. For example, @kbd{C-1 C-c / d} shows | 5560 | prefix, check that many days. For example, @kbd{C-1 C-c / d} shows |
| 5457 | all deadlines due tomorrow. | 5561 | all deadlines due tomorrow. |
| 5458 | @c | 5562 | @c |
| 5459 | @kindex C-c / b | 5563 | @orgcmd{C-c / b,org-check-before-date} |
| 5460 | @item C-c / b | ||
| 5461 | Sparse tree for deadlines and scheduled items before a given date. | 5564 | Sparse tree for deadlines and scheduled items before a given date. |
| 5462 | @c | 5565 | @c |
| 5463 | @kindex C-c / a | 5566 | @orgcmd{C-c / a,org-check-after-date} |
| 5464 | @item C-c / a | ||
| 5465 | Sparse tree for deadlines and scheduled items after a given date. | 5567 | Sparse tree for deadlines and scheduled items after a given date. |
| 5466 | @end table | 5568 | @end table |
| 5467 | 5569 | ||
| @@ -5520,11 +5622,11 @@ With the @samp{+1m} cookie, the date shift will always be exactly one | |||
| 5520 | month. So if you have not paid the rent for three months, marking this | 5622 | month. So if you have not paid the rent for three months, marking this |
| 5521 | entry DONE will still keep it as an overdue deadline. Depending on the | 5623 | entry DONE will still keep it as an overdue deadline. Depending on the |
| 5522 | task, this may not be the best way to handle it. For example, if you | 5624 | task, this may not be the best way to handle it. For example, if you |
| 5523 | forgot to call you father for 3 weeks, it does not make sense to call | 5625 | forgot to call your father for 3 weeks, it does not make sense to call |
| 5524 | him 3 times in a single day to make up for it. Finally, there are tasks | 5626 | him 3 times in a single day to make up for it. Finally, there are tasks |
| 5525 | like changing batteries which should always repeat a certain time | 5627 | like changing batteries which should always repeat a certain time |
| 5526 | @i{after} the last time you did it. For these tasks, Org-mode has | 5628 | @i{after} the last time you did it. For these tasks, Org-mode has |
| 5527 | special repeaters markers with @samp{++} and @samp{.+}. For example: | 5629 | special repeaters @samp{++} and @samp{.+}. For example: |
| 5528 | 5630 | ||
| 5529 | @example | 5631 | @example |
| 5530 | ** TODO Call Father | 5632 | ** TODO Call Father |
| @@ -5547,8 +5649,10 @@ subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was | |||
| 5547 | created for this purpose, it is described in @ref{Structure editing}. | 5649 | created for this purpose, it is described in @ref{Structure editing}. |
| 5548 | 5650 | ||
| 5549 | 5651 | ||
| 5550 | @node Clocking work time, Resolving idle time, Deadlines and scheduling, Dates and Times | 5652 | @node Clocking work time, Effort estimates, Deadlines and scheduling, Dates and Times |
| 5551 | @section Clocking work time | 5653 | @section Clocking work time |
| 5654 | @cindex clocking time | ||
| 5655 | @cindex time clocking | ||
| 5552 | 5656 | ||
| 5553 | Org-mode allows you to clock the time you spend on specific tasks in a | 5657 | Org-mode allows you to clock the time you spend on specific tasks in a |
| 5554 | project. When you start working on an item, you can start the clock. | 5658 | project. When you start working on an item, you can start the clock. |
| @@ -5569,9 +5673,17 @@ on this task while outside Emacs, use @code{(setq org-clock-persist t)}.} | |||
| 5569 | will be found (@pxref{Resolving idle time}) and you will be prompted about | 5673 | will be found (@pxref{Resolving idle time}) and you will be prompted about |
| 5570 | what to do with it. | 5674 | what to do with it. |
| 5571 | 5675 | ||
| 5676 | @menu | ||
| 5677 | * Clocking commands:: Starting and stopping a clock | ||
| 5678 | * The clock table:: Detailed reports | ||
| 5679 | * Resolving idle time:: Resolving time when you've been idle | ||
| 5680 | @end menu | ||
| 5681 | |||
| 5682 | @node Clocking commands, The clock table, Clocking work time, Clocking work time | ||
| 5683 | @subsection Clocking commands | ||
| 5684 | |||
| 5572 | @table @kbd | 5685 | @table @kbd |
| 5573 | @kindex C-c C-x C-i | 5686 | @orgcmd{C-c C-x C-i,org-clock-in} |
| 5574 | @item C-c C-x C-i | ||
| 5575 | @vindex org-clock-into-drawer | 5687 | @vindex org-clock-into-drawer |
| 5576 | Start the clock on the current item (clock-in). This inserts the CLOCK | 5688 | Start the clock on the current item (clock-in). This inserts the CLOCK |
| 5577 | keyword together with a timestamp. If this is not the first clocking of | 5689 | keyword together with a timestamp. If this is not the first clocking of |
| @@ -5601,8 +5713,8 @@ show all time clocked on this tasks today (see also the variable | |||
| 5601 | @code{auto} which is the default@footnote{See also the variable | 5713 | @code{auto} which is the default@footnote{See also the variable |
| 5602 | @code{org-clock-modeline-total}.}.@* Clicking with @kbd{mouse-1} onto the | 5714 | @code{org-clock-modeline-total}.}.@* Clicking with @kbd{mouse-1} onto the |
| 5603 | mode line entry will pop up a menu with clocking options. | 5715 | mode line entry will pop up a menu with clocking options. |
| 5604 | @kindex C-c C-x C-o | 5716 | @c |
| 5605 | @item C-c C-x C-o | 5717 | @orgcmd{C-c C-x C-o,org-clock-out} |
| 5606 | @vindex org-log-note-clock-out | 5718 | @vindex org-log-note-clock-out |
| 5607 | Stop the clock (clock-out). This inserts another timestamp at the same | 5719 | Stop the clock (clock-out). This inserts another timestamp at the same |
| 5608 | location where the clock was last started. It also directly computes | 5720 | location where the clock was last started. It also directly computes |
| @@ -5611,29 +5723,24 @@ HH:MM}. See the variable @code{org-log-note-clock-out} for the | |||
| 5611 | possibility to record an additional note together with the clock-out | 5723 | possibility to record an additional note together with the clock-out |
| 5612 | timestamp@footnote{The corresponding in-buffer setting is: | 5724 | timestamp@footnote{The corresponding in-buffer setting is: |
| 5613 | @code{#+STARTUP: lognoteclock-out}}. | 5725 | @code{#+STARTUP: lognoteclock-out}}. |
| 5614 | @kindex C-c C-x C-e | 5726 | @orgcmd{C-c C-x C-e,org-clock-modify-effort-estimate} |
| 5615 | @item C-c C-x C-e | ||
| 5616 | Update the effort estimate for the current clock task. | 5727 | Update the effort estimate for the current clock task. |
| 5617 | @kindex C-c C-y | 5728 | @kindex C-c C-y |
| 5618 | @kindex C-c C-c | 5729 | @kindex C-c C-c |
| 5619 | @item C-c C-y @ @ @r{or}@ @ C-c C-c | 5730 | @orgcmdkkc{C-c C-c,C-c C-y,org-evaluate-time-range} |
| 5620 | Recompute the time interval after changing one of the timestamps. This | 5731 | Recompute the time interval after changing one of the timestamps. This |
| 5621 | is only necessary if you edit the timestamps directly. If you change | 5732 | is only necessary if you edit the timestamps directly. If you change |
| 5622 | them with @kbd{S-@key{cursor}} keys, the update is automatic. | 5733 | them with @kbd{S-@key{cursor}} keys, the update is automatic. |
| 5623 | @kindex C-c C-t | 5734 | @orgcmd{C-c C-t,org-todo} |
| 5624 | @item C-c C-t | ||
| 5625 | Changing the TODO state of an item to DONE automatically stops the clock | 5735 | Changing the TODO state of an item to DONE automatically stops the clock |
| 5626 | if it is running in this same item. | 5736 | if it is running in this same item. |
| 5627 | @kindex C-c C-x C-x | 5737 | @orgcmd{C-c C-x C-x,org-clock-cancel} |
| 5628 | @item C-c C-x C-x | ||
| 5629 | Cancel the current clock. This is useful if a clock was started by | 5738 | Cancel the current clock. This is useful if a clock was started by |
| 5630 | mistake, or if you ended up working on something else. | 5739 | mistake, or if you ended up working on something else. |
| 5631 | @kindex C-c C-x C-j | 5740 | @orgcmd{C-c C-x C-j,org-clock-goto} |
| 5632 | @item C-c C-x C-j | ||
| 5633 | Jump to the headline of the currently clocked in task. With a @kbd{C-u} | 5741 | Jump to the headline of the currently clocked in task. With a @kbd{C-u} |
| 5634 | prefix arg, select the target task from a list of recently clocked tasks. | 5742 | prefix arg, select the target task from a list of recently clocked tasks. |
| 5635 | @kindex C-c C-x C-d | 5743 | @orgcmd{C-c C-x C-d,org-clock-display} |
| 5636 | @item C-c C-x C-d | ||
| 5637 | @vindex org-remove-highlights-with-change | 5744 | @vindex org-remove-highlights-with-change |
| 5638 | Display time summaries for each subtree in the current buffer. This | 5745 | Display time summaries for each subtree in the current buffer. This |
| 5639 | puts overlays at the end of each headline, showing the total time | 5746 | puts overlays at the end of each headline, showing the total time |
| @@ -5641,24 +5748,60 @@ recorded under that heading, including the time of any subheadings. You | |||
| 5641 | can use visibility cycling to study the tree, but the overlays disappear | 5748 | can use visibility cycling to study the tree, but the overlays disappear |
| 5642 | when you change the buffer (see variable | 5749 | when you change the buffer (see variable |
| 5643 | @code{org-remove-highlights-with-change}) or press @kbd{C-c C-c}. | 5750 | @code{org-remove-highlights-with-change}) or press @kbd{C-c C-c}. |
| 5644 | @kindex C-c C-x C-r | 5751 | @end table |
| 5645 | @item C-c C-x C-r | 5752 | |
| 5753 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | ||
| 5754 | the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been | ||
| 5755 | worked on or closed during a day. | ||
| 5756 | |||
| 5757 | @node The clock table, Resolving idle time, Clocking commands, Clocking work time | ||
| 5758 | @subsection The clock table | ||
| 5759 | @cindex clocktable, dynamic block | ||
| 5760 | @cindex report, of clocked time | ||
| 5761 | |||
| 5762 | Org mode can produce quite complex reports based on the time clocking | ||
| 5763 | information. Such a report is called a @emph{clock table}, because it is | ||
| 5764 | formatted as one or several Org tables. | ||
| 5765 | |||
| 5766 | @table @kbd | ||
| 5767 | @orgcmd{C-c C-x C-r,org-clock-report} | ||
| 5646 | Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock | 5768 | Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock |
| 5647 | report as an Org-mode table into the current file. When the cursor is | 5769 | report as an Org-mode table into the current file. When the cursor is |
| 5648 | at an existing clock table, just update it. When called with a prefix | 5770 | at an existing clock table, just update it. When called with a prefix |
| 5649 | argument, jump to the first clock report in the current document and | 5771 | argument, jump to the first clock report in the current document and |
| 5650 | update it. | 5772 | update it. |
| 5773 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} | ||
| 5774 | Update dynamic block at point. The cursor needs to be in the | ||
| 5775 | @code{#+BEGIN} line of the dynamic block. | ||
| 5776 | @orgkey{C-u C-c C-x C-u} | ||
| 5777 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if | ||
| 5778 | you have several clock table blocks in a buffer. | ||
| 5779 | @orgcmdkxkc{S-@key{left},S-@key{right},org-clocktable-try-shift} | ||
| 5780 | Shift the current @code{:block} interval and update the table. The cursor | ||
| 5781 | needs to be in the @code{#+BEGIN: clocktable} line for this command. If | ||
| 5782 | @code{:block} is @code{today}, it will be shifted to @code{today-1} etc. | ||
| 5783 | @end table | ||
| 5784 | |||
| 5785 | |||
| 5786 | Here is an example of the frame for a clock table as it is inserted into the | ||
| 5787 | buffer with the @kbd{C-c C-x C-r} command: | ||
| 5788 | |||
| 5651 | @cindex #+BEGIN, clocktable | 5789 | @cindex #+BEGIN, clocktable |
| 5652 | @example | 5790 | @example |
| 5653 | #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file | 5791 | #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file |
| 5654 | #+END: clocktable | 5792 | #+END: clocktable |
| 5655 | @end example | 5793 | @end example |
| 5656 | @noindent | 5794 | @noindent |
| 5657 | If such a block already exists at point, its content is replaced by the | 5795 | @vindex org-clocktable-defaults |
| 5658 | new table. The @samp{BEGIN} line can specify options: | 5796 | The @samp{BEGIN} line and specify a number of options to define the scope, |
| 5797 | structure, and formatting of the report. Defaults for all these options can | ||
| 5798 | be configured in the variable @code{org-clocktable-defaults}. | ||
| 5799 | |||
| 5800 | @noindent First there are options that determine which clock entries are to | ||
| 5801 | be selected: | ||
| 5659 | @example | 5802 | @example |
| 5660 | :maxlevel @r{Maximum level depth to which times are listed in the table.} | 5803 | :maxlevel @r{Maximum level depth to which times are listed in the table.} |
| 5661 | :emphasize @r{When @code{t}, emphasize level one and level two items.} | 5804 | @r{Clocks at deeper levels will be summed into the upper level.} |
| 5662 | :scope @r{The scope to consider. This can be any of the following:} | 5805 | :scope @r{The scope to consider. This can be any of the following:} |
| 5663 | nil @r{the current buffer or narrowed region} | 5806 | nil @r{the current buffer or narrowed region} |
| 5664 | file @r{the full current buffer} | 5807 | file @r{the full current buffer} |
| @@ -5675,6 +5818,7 @@ new table. The @samp{BEGIN} line can specify options: | |||
| 5675 | 2007-12-31 @r{New year eve 2007} | 5818 | 2007-12-31 @r{New year eve 2007} |
| 5676 | 2007-12 @r{December 2007} | 5819 | 2007-12 @r{December 2007} |
| 5677 | 2007-W50 @r{ISO-week 50 in 2007} | 5820 | 2007-W50 @r{ISO-week 50 in 2007} |
| 5821 | 2007-Q2 @r{2nd quarter in 2007} | ||
| 5678 | 2007 @r{the year 2007} | 5822 | 2007 @r{the year 2007} |
| 5679 | today, yesterday, today-@var{N} @r{a relative day} | 5823 | today, yesterday, today-@var{N} @r{a relative day} |
| 5680 | thisweek, lastweek, thisweek-@var{N} @r{a relative week} | 5824 | thisweek, lastweek, thisweek-@var{N} @r{a relative week} |
| @@ -5685,15 +5829,33 @@ new table. The @samp{BEGIN} line can specify options: | |||
| 5685 | :tend @r{A time string specifying when to stop considering times.} | 5829 | :tend @r{A time string specifying when to stop considering times.} |
| 5686 | :step @r{@code{week} or @code{day}, to split the table into chunks.} | 5830 | :step @r{@code{week} or @code{day}, to split the table into chunks.} |
| 5687 | @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} | 5831 | @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} |
| 5688 | :stepskip0 @r{Don't show steps that have zero time} | 5832 | :stepskip0 @r{Do not show steps that have zero time.} |
| 5689 | :tags @r{A tags match to select entries that should contribute} | 5833 | :fileskip0 @r{Do not show table sections from files which did not contribute.} |
| 5834 | :tags @r{A tags match to select entries that should contribute}. | ||
| 5835 | @end example | ||
| 5836 | |||
| 5837 | Then there are options which determine the formatting of the table. There | ||
| 5838 | options are interpreted by the function @code{org-clocktable-write-default}, | ||
| 5839 | but you can specify your own function using the @code{:formatter} parameter. | ||
| 5840 | @example | ||
| 5841 | :emphasize @r{When @code{t}, emphasize level one and level two items.} | ||
| 5690 | :link @r{Link the item headlines in the table to their origins.} | 5842 | :link @r{Link the item headlines in the table to their origins.} |
| 5843 | :narrow @r{An integer to limit the width of the headline column in} | ||
| 5844 | @r{the org table. If you write it like @samp{50!}, then the} | ||
| 5845 | @r{headline will also be shortened in export.} | ||
| 5846 | :indent @r{Indent each headline field according to its level.} | ||
| 5847 | :tcolumns @r{Number of columns to be used for times. If this is smaller} | ||
| 5848 | @r{than @code{:maxlevel}, lower levels will be lumped into one column.} | ||
| 5849 | :level @r{Should a level number column be included?} | ||
| 5850 | :compact @r{Abbreviation for @code{:level nil :indent t :narrow 40! :tcolumns 1}} | ||
| 5851 | @r{All are overwritten except if there is an explicit @code{:narrow}} | ||
| 5852 | :timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} | ||
| 5853 | @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} | ||
| 5691 | :formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} | 5854 | :formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} |
| 5692 | @r{As a special case, @samp{:formula %} adds a column with % time.} | 5855 | @r{As a special case, @samp{:formula %} adds a column with % time.} |
| 5693 | @r{If you do not specify a formula here, any existing formula.} | 5856 | @r{If you do not specify a formula here, any existing formula} |
| 5694 | @r{below the clock table will survive updates and be evaluated.} | 5857 | @r{below the clock table will survive updates and be evaluated.} |
| 5695 | :timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} | 5858 | :formatter @r{A function to format clock data and insert it into the buffer.} |
| 5696 | @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} | ||
| 5697 | @end example | 5859 | @end example |
| 5698 | To get a clock summary of the current level 1 tree, for the current | 5860 | To get a clock summary of the current level 1 tree, for the current |
| 5699 | day, you could write | 5861 | day, you could write |
| @@ -5715,31 +5877,15 @@ A summary of the current subtree with % times would be | |||
| 5715 | #+BEGIN: clocktable :scope subtree :link t :formula % | 5877 | #+BEGIN: clocktable :scope subtree :link t :formula % |
| 5716 | #+END: clocktable | 5878 | #+END: clocktable |
| 5717 | @end example | 5879 | @end example |
| 5718 | @kindex C-c C-c | 5880 | A horizontally compact representation of everything clocked during last week |
| 5719 | @item C-c C-c | 5881 | would be |
| 5720 | @kindex C-c C-x C-u | 5882 | @example |
| 5721 | @itemx C-c C-x C-u | 5883 | #+BEGIN: clocktable :scope agenda :block lastweek :compact t |
| 5722 | Update dynamic block at point. The cursor needs to be in the | 5884 | #+END: clocktable |
| 5723 | @code{#+BEGIN} line of the dynamic block. | 5885 | @end example |
| 5724 | @kindex C-u C-c C-x C-u | ||
| 5725 | @item C-u C-c C-x C-u | ||
| 5726 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if | ||
| 5727 | you have several clock table blocks in a buffer. | ||
| 5728 | @kindex S-@key{left} | ||
| 5729 | @kindex S-@key{right} | ||
| 5730 | @item S-@key{left} | ||
| 5731 | @itemx S-@key{right} | ||
| 5732 | Shift the current @code{:block} interval and update the table. The cursor | ||
| 5733 | needs to be in the @code{#+BEGIN: clocktable} line for this command. If | ||
| 5734 | @code{:block} is @code{today}, it will be shifted to @code{today-1} etc. | ||
| 5735 | @end table | ||
| 5736 | |||
| 5737 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | ||
| 5738 | the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been | ||
| 5739 | worked on or closed during a day. | ||
| 5740 | 5886 | ||
| 5741 | @node Resolving idle time, Effort estimates, Clocking work time, Dates and Times | 5887 | @node Resolving idle time, , The clock table, Clocking work time |
| 5742 | @section Resolving idle time | 5888 | @subsection Resolving idle time |
| 5743 | @cindex resolve idle time | 5889 | @cindex resolve idle time |
| 5744 | 5890 | ||
| 5745 | @cindex idle, resolve, dangling | 5891 | @cindex idle, resolve, dangling |
| @@ -5800,13 +5946,13 @@ If you restart Emacs and clock into any task, Org will notice that you have a | |||
| 5800 | dangling clock which was never clocked out from your last session. Using | 5946 | dangling clock which was never clocked out from your last session. Using |
| 5801 | that clock's starting time as the beginning of the unaccounted-for period, | 5947 | that clock's starting time as the beginning of the unaccounted-for period, |
| 5802 | Org will ask how you want to resolve that time. The logic and behavior is | 5948 | Org will ask how you want to resolve that time. The logic and behavior is |
| 5803 | identical to dealing with away time due to idleness, it's just happening due | 5949 | identical to dealing with away time due to idleness; it's just happening due |
| 5804 | to a recovery event rather than a set amount of idle time. | 5950 | to a recovery event rather than a set amount of idle time. |
| 5805 | 5951 | ||
| 5806 | You can also check all the files visited by your Org agenda for dangling | 5952 | You can also check all the files visited by your Org agenda for dangling |
| 5807 | clocks at any time using @kbd{M-x org-resolve-clocks}. | 5953 | clocks at any time using @kbd{M-x org-resolve-clocks}. |
| 5808 | 5954 | ||
| 5809 | @node Effort estimates, Relative timer, Resolving idle time, Dates and Times | 5955 | @node Effort estimates, Relative timer, Clocking work time, Dates and Times |
| 5810 | @section Effort estimates | 5956 | @section Effort estimates |
| 5811 | @cindex effort estimates | 5957 | @cindex effort estimates |
| 5812 | 5958 | ||
| @@ -5822,13 +5968,11 @@ used with the variable @code{org-effort-property}.}. You can set the effort | |||
| 5822 | for an entry with the following commands: | 5968 | for an entry with the following commands: |
| 5823 | 5969 | ||
| 5824 | @table @kbd | 5970 | @table @kbd |
| 5825 | @kindex C-c C-x e | 5971 | @orgcmd{C-c C-x e,org-set-effort} |
| 5826 | @item C-c C-x e | ||
| 5827 | Set the effort estimate for the current entry. With a numeric prefix | 5972 | Set the effort estimate for the current entry. With a numeric prefix |
| 5828 | argument, set it to the NTH allowed value (see below). This command is also | 5973 | argument, set it to the Nth allowed value (see below). This command is also |
| 5829 | accessible from the agenda with the @kbd{e} key. | 5974 | accessible from the agenda with the @kbd{e} key. |
| 5830 | @kindex C-c C-x C-e | 5975 | @orgcmd{C-c C-x C-e,org-clock-modify-effort-estimate} |
| 5831 | @item C-c C-x C-e | ||
| 5832 | Modify the effort estimate of the item currently being clocked. | 5976 | Modify the effort estimate of the item currently being clocked. |
| 5833 | @end table | 5977 | @end table |
| 5834 | 5978 | ||
| @@ -5880,29 +6024,27 @@ be useful to have access to times relative to a starting time. Org provides | |||
| 5880 | such a relative timer and make it easy to create timed notes. | 6024 | such a relative timer and make it easy to create timed notes. |
| 5881 | 6025 | ||
| 5882 | @table @kbd | 6026 | @table @kbd |
| 5883 | @kindex C-c C-x . | 6027 | @orgcmd{C-c C-x .,org-timer} |
| 5884 | @item C-c C-x . | ||
| 5885 | Insert a relative time into the buffer. The first time you use this, the | 6028 | Insert a relative time into the buffer. The first time you use this, the |
| 5886 | timer will be started. When called with a prefix argument, the timer is | 6029 | timer will be started. When called with a prefix argument, the timer is |
| 5887 | restarted. | 6030 | restarted. |
| 5888 | @kindex C-c C-x - | 6031 | @orgcmd{C-c C-x -,org-timer-item} |
| 5889 | @item C-c C-x - | ||
| 5890 | Insert a description list item with the current relative time. With a prefix | 6032 | Insert a description list item with the current relative time. With a prefix |
| 5891 | argument, first reset the timer to 0. | 6033 | argument, first reset the timer to 0. |
| 5892 | @kindex M-@key{RET} | 6034 | @orgcmd{M-@key{RET},org-insert-heading} |
| 5893 | @item M-@key{RET} | ||
| 5894 | Once the timer list is started, you can also use @kbd{M-@key{RET}} to insert | 6035 | Once the timer list is started, you can also use @kbd{M-@key{RET}} to insert |
| 5895 | new timer items. | 6036 | new timer items. |
| 6037 | @c for key sequences with a comma, command name macros fail :( | ||
| 5896 | @kindex C-c C-x , | 6038 | @kindex C-c C-x , |
| 5897 | @item C-c C-x , | 6039 | @item C-c C-x , |
| 5898 | Pause the timer, or continue it if it is already paused. | 6040 | Pause the timer, or continue it if it is already paused |
| 6041 | (@command{org-timer-pause-or-continue}). | ||
| 5899 | @c removed the sentence because it is redundant to the following item | 6042 | @c removed the sentence because it is redundant to the following item |
| 5900 | @kindex C-u C-c C-x , | 6043 | @kindex C-u C-c C-x , |
| 5901 | @item C-u C-c C-x , | 6044 | @item C-u C-c C-x , |
| 5902 | Stop the timer. After this, you can only start a new timer, not continue the | 6045 | Stop the timer. After this, you can only start a new timer, not continue the |
| 5903 | old one. This command also removes the timer from the mode line. | 6046 | old one. This command also removes the timer from the mode line. |
| 5904 | @kindex C-c C-x 0 | 6047 | @orgcmd{C-c C-x 0,org-timer-start} |
| 5905 | @item C-c C-x 0 | ||
| 5906 | Reset the timer without inserting anything into the buffer. By default, the | 6048 | Reset the timer without inserting anything into the buffer. By default, the |
| 5907 | timer is reset to 0. When called with a @kbd{C-u} prefix, reset the timer to | 6049 | timer is reset to 0. When called with a @kbd{C-u} prefix, reset the timer to |
| 5908 | specific starting offset. The user is prompted for the offset, with a | 6050 | specific starting offset. The user is prompted for the offset, with a |
| @@ -5994,31 +6136,31 @@ suggestion.} for capturing new material. | |||
| 5994 | @subsection Using capture | 6136 | @subsection Using capture |
| 5995 | 6137 | ||
| 5996 | @table @kbd | 6138 | @table @kbd |
| 5997 | @kindex C-c c | 6139 | @orgcmd{C-c c,org-capture} |
| 5998 | @item C-c c | 6140 | Call the command @code{org-capture}. Note that this keybinding is global and |
| 5999 | Call the command @code{org-capture}. If you have templates defined | 6141 | not active by default - you need to install it. If you have templates |
| 6000 | @pxref{Capture templates}, it will offer these templates for selection or use | 6142 | defined @pxref{Capture templates}, it will offer these templates for |
| 6001 | a new Org outline node as the default template. It will insert the template | 6143 | selection or use a new Org outline node as the default template. It will |
| 6002 | into the target file and switch to an indirect buffer narrowed to this new | 6144 | insert the template into the target file and switch to an indirect buffer |
| 6003 | node. You may then insert the information you want. | 6145 | narrowed to this new node. You may then insert the information you want. |
| 6004 | 6146 | ||
| 6005 | @kindex C-c C-c | 6147 | @orgcmd{C-c C-c,org-capture-finalize} |
| 6006 | @item C-c C-c | 6148 | Once you have finished entering information into the capture buffer, @kbd{C-c |
| 6007 | Once you have finished entering information into the capture buffer, | 6149 | C-c} will return you to the window configuration before the capture process, |
| 6008 | @kbd{C-c C-c} will return you to the window configuration before the capture | 6150 | so that you can resume your work without further distraction. When called |
| 6009 | process, so that you can resume your work without further distraction. | 6151 | with a prefix arg, finalize and then jump to the captured item. |
| 6010 | 6152 | ||
| 6011 | @kindex C-c C-w | 6153 | @orgcmd{C-c C-w,org-capture-refile} |
| 6012 | @item C-c C-w | ||
| 6013 | Finalize the capture process by refiling (@pxref{Refiling notes}) the note to | 6154 | Finalize the capture process by refiling (@pxref{Refiling notes}) the note to |
| 6014 | a different place. Please realize that this is a normal refiling command | 6155 | a different place. Please realize that this is a normal refiling command |
| 6015 | that will be executed - so the cursor position at the moment you run this | 6156 | that will be executed---so the cursor position at the moment you run this |
| 6016 | command is important. If you have inserted a tree with a parent and | 6157 | command is important. If you have inserted a tree with a parent and |
| 6017 | children, first move the cursor back to the parent. | 6158 | children, first move the cursor back to the parent. Any prefix argument |
| 6159 | given to this command will be passed on to the @code{org-refile} command. | ||
| 6018 | 6160 | ||
| 6019 | @kindex C-c C-k | 6161 | @orgcmd{C-c C-k,org-capture-kill} |
| 6020 | @item C-c C-k | ||
| 6021 | Abort the capture process and return to the previous state. | 6162 | Abort the capture process and return to the previous state. |
| 6163 | |||
| 6022 | @end table | 6164 | @end table |
| 6023 | 6165 | ||
| 6024 | You can also call @code{org-capture} in a special way from the agenda, using | 6166 | You can also call @code{org-capture} in a special way from the agenda, using |
| @@ -6026,6 +6168,17 @@ the @kbd{k c} key combination. With this access, any timestamps inserted by | |||
| 6026 | the selected capture template will default to the cursor date in the agenda, | 6168 | the selected capture template will default to the cursor date in the agenda, |
| 6027 | rather than to the current date. | 6169 | rather than to the current date. |
| 6028 | 6170 | ||
| 6171 | To find the locations of the last stored capture, use @code{org-capture} with | ||
| 6172 | prefix commands: | ||
| 6173 | |||
| 6174 | @table @kbd | ||
| 6175 | @orgkey{C-u C-c c} | ||
| 6176 | Visit the target location of a cpature template. You get to select the | ||
| 6177 | template in the usual way. | ||
| 6178 | @orgkey{C-u C-u C-c c} | ||
| 6179 | Visit the last stored capture item in its buffer. | ||
| 6180 | @end table | ||
| 6181 | |||
| 6029 | @node Capture templates, , Using capture, Capture | 6182 | @node Capture templates, , Using capture, Capture |
| 6030 | @subsection Capture templates | 6183 | @subsection Capture templates |
| 6031 | @cindex templates, for Capture | 6184 | @cindex templates, for Capture |
| @@ -6035,8 +6188,7 @@ for different target locations. The easiest way to create such templates is | |||
| 6035 | through the customize interface. | 6188 | through the customize interface. |
| 6036 | 6189 | ||
| 6037 | @table @kbd | 6190 | @table @kbd |
| 6038 | @kindex C-c c C | 6191 | @orgkey{C-c c C} |
| 6039 | @item C-c c C | ||
| 6040 | Customize the variable @code{org-capture-templates}. | 6192 | Customize the variable @code{org-capture-templates}. |
| 6041 | @end table | 6193 | @end table |
| 6042 | 6194 | ||
| @@ -6124,7 +6276,7 @@ Text to be inserted as it is. | |||
| 6124 | @vindex org-default-notes-file | 6276 | @vindex org-default-notes-file |
| 6125 | Specification of where the captured item should be placed. In Org-mode | 6277 | Specification of where the captured item should be placed. In Org-mode |
| 6126 | files, targets usually define a node. Entries will become children of this | 6278 | files, targets usually define a node. Entries will become children of this |
| 6127 | node, other types will be added to the table or list in the body of this | 6279 | node. Other types will be added to the table or list in the body of this |
| 6128 | node. Most target specifications contain a file name. If that file name is | 6280 | node. Most target specifications contain a file name. If that file name is |
| 6129 | the empty string, it defaults to @code{org-default-notes-file}. | 6281 | the empty string, it defaults to @code{org-default-notes-file}. |
| 6130 | 6282 | ||
| @@ -6146,7 +6298,10 @@ For non-unique headings, the full path is safer. | |||
| 6146 | Use a regular expression to position the cursor. | 6298 | Use a regular expression to position the cursor. |
| 6147 | 6299 | ||
| 6148 | @item (file+datetree "path/to/file") | 6300 | @item (file+datetree "path/to/file") |
| 6149 | Will create a heading in a date tree. | 6301 | Will create a heading in a date tree for today's date. |
| 6302 | |||
| 6303 | @item (file+datetree+prompt "path/to/file") | ||
| 6304 | Will create a heading in a date tree, but will prompt for the date. | ||
| 6150 | 6305 | ||
| 6151 | @item (file+function "path/to/file" function-finding-location) | 6306 | @item (file+function "path/to/file" function-finding-location) |
| 6152 | A function to find the right location in the file. | 6307 | A function to find the right location in the file. |
| @@ -6302,15 +6457,13 @@ directory. | |||
| 6302 | 6457 | ||
| 6303 | @table @kbd | 6458 | @table @kbd |
| 6304 | 6459 | ||
| 6305 | @kindex C-c C-a | 6460 | @orgcmd{C-c C-a,org-attach} |
| 6306 | @item C-c C-a | ||
| 6307 | The dispatcher for commands related to the attachment system. After these | 6461 | The dispatcher for commands related to the attachment system. After these |
| 6308 | keys, a list of commands is displayed and you must press an additional key | 6462 | keys, a list of commands is displayed and you must press an additional key |
| 6309 | to select a command: | 6463 | to select a command: |
| 6310 | 6464 | ||
| 6311 | @table @kbd | 6465 | @table @kbd |
| 6312 | @kindex C-c C-a a | 6466 | @orgcmdtkc{a,C-c C-a a,org-attach-attach} |
| 6313 | @item a | ||
| 6314 | @vindex org-attach-method | 6467 | @vindex org-attach-method |
| 6315 | Select a file and move it into the task's attachment directory. The file | 6468 | Select a file and move it into the task's attachment directory. The file |
| 6316 | will be copied, moved, or linked, depending on @code{org-attach-method}. | 6469 | will be copied, moved, or linked, depending on @code{org-attach-method}. |
| @@ -6323,52 +6476,42 @@ Note that hard links are not supported on all systems. | |||
| 6323 | Attach a file using the copy/move/link method. | 6476 | Attach a file using the copy/move/link method. |
| 6324 | Note that hard links are not supported on all systems. | 6477 | Note that hard links are not supported on all systems. |
| 6325 | 6478 | ||
| 6326 | @kindex C-c C-a n | 6479 | @orgcmdtkc{n,C-c C-a n,org-attach-new} |
| 6327 | @item n | ||
| 6328 | Create a new attachment as an Emacs buffer. | 6480 | Create a new attachment as an Emacs buffer. |
| 6329 | 6481 | ||
| 6330 | @kindex C-c C-a z | 6482 | @orgcmdtkc{z,C-c C-a z,org-attach-sync} |
| 6331 | @item z | ||
| 6332 | Synchronize the current task with its attachment directory, in case you added | 6483 | Synchronize the current task with its attachment directory, in case you added |
| 6333 | attachments yourself. | 6484 | attachments yourself. |
| 6334 | 6485 | ||
| 6335 | @kindex C-c C-a o | 6486 | @orgcmdtkc{p,C-c C-a o,org-attach-open} |
| 6336 | @item o | ||
| 6337 | @vindex org-file-apps | 6487 | @vindex org-file-apps |
| 6338 | Open current task's attachment. If there is more than one, prompt for a | 6488 | Open current task's attachment. If there is more than one, prompt for a |
| 6339 | file name first. Opening will follow the rules set by @code{org-file-apps}. | 6489 | file name first. Opening will follow the rules set by @code{org-file-apps}. |
| 6340 | For more details, see the information on following hyperlinks | 6490 | For more details, see the information on following hyperlinks |
| 6341 | (@pxref{Handling links}). | 6491 | (@pxref{Handling links}). |
| 6342 | 6492 | ||
| 6343 | @kindex C-c C-a O | 6493 | @orgcmdtkc{O,C-c C-a O,org-attach-open-in-emacs} |
| 6344 | @item O | ||
| 6345 | Also open the attachment, but force opening the file in Emacs. | 6494 | Also open the attachment, but force opening the file in Emacs. |
| 6346 | 6495 | ||
| 6347 | @kindex C-c C-a f | 6496 | @orgcmdtkc{f,C-c C-a f,org-attach-reveal} |
| 6348 | @item f | ||
| 6349 | Open the current task's attachment directory. | 6497 | Open the current task's attachment directory. |
| 6350 | 6498 | ||
| 6351 | @kindex C-c C-a F | 6499 | @orgcmdtkc{F,C-c C-a F,org-attach-reveal-in-emacs} |
| 6352 | @item F | ||
| 6353 | Also open the directory, but force using @command{dired} in Emacs. | 6500 | Also open the directory, but force using @command{dired} in Emacs. |
| 6354 | 6501 | ||
| 6355 | @kindex C-c C-a d | 6502 | @orgcmdtkc{d,C-c C-a d,org-attach-delete-one} |
| 6356 | @item d | ||
| 6357 | Select and delete a single attachment. | 6503 | Select and delete a single attachment. |
| 6358 | 6504 | ||
| 6359 | @kindex C-c C-a D | 6505 | @orgcmdtkc{D,C-c C-a D,org-attach-delete-all} |
| 6360 | @item D | ||
| 6361 | Delete all of a task's attachments. A safer way is to open the directory in | 6506 | Delete all of a task's attachments. A safer way is to open the directory in |
| 6362 | @command{dired} and delete from there. | 6507 | @command{dired} and delete from there. |
| 6363 | 6508 | ||
| 6364 | @kindex C-c C-a s | 6509 | @orgcmdtkc{s,C-c C-a s,org-attach-set-directory} |
| 6365 | @item C-c C-a s | ||
| 6366 | @cindex property, ATTACH_DIR | 6510 | @cindex property, ATTACH_DIR |
| 6367 | Set a specific directory as the entry's attachment directory. This works by | 6511 | Set a specific directory as the entry's attachment directory. This works by |
| 6368 | putting the directory path into the @code{ATTACH_DIR} property. | 6512 | putting the directory path into the @code{ATTACH_DIR} property. |
| 6369 | 6513 | ||
| 6370 | @kindex C-c C-a i | 6514 | @orgcmdtkc{i,C-c C-a i,org-attach-set-inherit} |
| 6371 | @item C-c C-a i | ||
| 6372 | @cindex property, ATTACH_DIR_INHERIT | 6515 | @cindex property, ATTACH_DIR_INHERIT |
| 6373 | Set the @code{ATTACH_DIR_INHERIT} property, so that children will use the | 6516 | Set the @code{ATTACH_DIR_INHERIT} property, so that children will use the |
| 6374 | same directory for attachments as the parent does. | 6517 | same directory for attachments as the parent does. |
| @@ -6401,12 +6544,11 @@ will configure that new items from the feed provided by | |||
| 6401 | the following command is used: | 6544 | the following command is used: |
| 6402 | 6545 | ||
| 6403 | @table @kbd | 6546 | @table @kbd |
| 6404 | @kindex C-c C-x g | 6547 | @orgcmd{C-c C-x g,org-feed-update-all} |
| 6405 | @item C-c C-x g | 6548 | @item C-c C-x g |
| 6406 | Collect items from the feeds configured in @code{org-feed-alist} and act upon | 6549 | Collect items from the feeds configured in @code{org-feed-alist} and act upon |
| 6407 | them. | 6550 | them. |
| 6408 | @kindex C-c C-x G | 6551 | @orgcmd{C-c C-x G,org-feed-goto-inbox} |
| 6409 | @item C-c C-x G | ||
| 6410 | Prompt for a feed name and go to the inbox configured for this feed. | 6552 | Prompt for a feed name and go to the inbox configured for this feed. |
| 6411 | @end table | 6553 | @end table |
| 6412 | 6554 | ||
| @@ -6446,8 +6588,7 @@ right location, and then pasting the note is cumbersome. To simplify this | |||
| 6446 | process, you can use the following special command: | 6588 | process, you can use the following special command: |
| 6447 | 6589 | ||
| 6448 | @table @kbd | 6590 | @table @kbd |
| 6449 | @kindex C-c C-w | 6591 | @orgcmd{C-c C-w,org-refile} |
| 6450 | @item C-c C-w | ||
| 6451 | @vindex org-reverse-note-order | 6592 | @vindex org-reverse-note-order |
| 6452 | @vindex org-refile-targets | 6593 | @vindex org-refile-targets |
| 6453 | @vindex org-refile-use-outline-path | 6594 | @vindex org-refile-use-outline-path |
| @@ -6472,17 +6613,18 @@ When the variable @code{org-log-refile}@footnote{with corresponding | |||
| 6472 | @code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, | 6613 | @code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, |
| 6473 | and @code{nologrefile}} is set, a time stamp or a note will be | 6614 | and @code{nologrefile}} is set, a time stamp or a note will be |
| 6474 | recorded when an entry has been refiled. | 6615 | recorded when an entry has been refiled. |
| 6475 | @kindex C-u C-c C-w | 6616 | @orgkey{C-u C-c C-w} |
| 6476 | @item C-u C-c C-w | ||
| 6477 | Use the refile interface to jump to a heading. | 6617 | Use the refile interface to jump to a heading. |
| 6478 | @kindex C-u C-u C-c C-w | 6618 | @orgcmd{C-u C-u C-c C-w,org-refile-goto-last-stored} |
| 6479 | @item C-u C-u C-c C-w | ||
| 6480 | Jump to the location where @code{org-refile} last moved a tree to. | 6619 | Jump to the location where @code{org-refile} last moved a tree to. |
| 6481 | @item C-2 C-c C-w | 6620 | @item C-2 C-c C-w |
| 6482 | Refile as the child of the item currently being clocked. | 6621 | Refile as the child of the item currently being clocked. |
| 6483 | @item C-0 C-c C-w @ @r{or} @ C-u C-u C-u C-c C-w | 6622 | @item C-0 C-c C-w @ @r{or} @ C-u C-u C-u C-c C-w |
| 6623 | |||
| 6624 | @orgcmdtkc{C-0 C-c C-w @ @r{or} @ C-u C-u C-u C-c C-w,C-0 C-c C-w,org-refile-cache-clear} | ||
| 6625 | |||
| 6484 | Clear the target cache. Caching of refile targets can be turned on by | 6626 | Clear the target cache. Caching of refile targets can be turned on by |
| 6485 | setting @code{org-refile-use-cache}. To make the command seen new possible | 6627 | setting @code{org-refile-use-cache}. To make the command see new possible |
| 6486 | targets, you have to clear the cache with this command. | 6628 | targets, you have to clear the cache with this command. |
| 6487 | @end table | 6629 | @end table |
| 6488 | 6630 | ||
| @@ -6496,8 +6638,7 @@ agenda. Archiving is important to keep your working files compact and global | |||
| 6496 | searches like the construction of agenda views fast. | 6638 | searches like the construction of agenda views fast. |
| 6497 | 6639 | ||
| 6498 | @table @kbd | 6640 | @table @kbd |
| 6499 | @kindex C-c C-x C-a | 6641 | @orgcmd{C-c C-x C-a,org-archive-subtree-default} |
| 6500 | @item C-c C-x C-a | ||
| 6501 | @vindex org-archive-default-command | 6642 | @vindex org-archive-default-command |
| 6502 | Archive the current entry using the command specified in the variable | 6643 | Archive the current entry using the command specified in the variable |
| 6503 | @code{org-archive-default-command}. | 6644 | @code{org-archive-default-command}. |
| @@ -6516,14 +6657,11 @@ The most common archiving action is to move a project tree to another file, | |||
| 6516 | the archive file. | 6657 | the archive file. |
| 6517 | 6658 | ||
| 6518 | @table @kbd | 6659 | @table @kbd |
| 6519 | @kindex C-c $ | 6660 | @orgcmdkskc{C-c C-x C-s,C-c $,org-archive-subtree} |
| 6520 | @kindex C-c C-x C-s | ||
| 6521 | @item C-c C-x C-s@ @r{or short} @ C-c $ | ||
| 6522 | @vindex org-archive-location | 6661 | @vindex org-archive-location |
| 6523 | Archive the subtree starting at the cursor position to the location | 6662 | Archive the subtree starting at the cursor position to the location |
| 6524 | given by @code{org-archive-location}. | 6663 | given by @code{org-archive-location}. |
| 6525 | @kindex C-u C-c C-x C-s | 6664 | @orgkey{C-u C-c C-x C-s} |
| 6526 | @item C-u C-c C-x C-s | ||
| 6527 | Check if any direct children of the current headline could be moved to | 6665 | Check if any direct children of the current headline could be moved to |
| 6528 | the archive. To do this, each subtree is checked for open TODO entries. | 6666 | the archive. To do this, each subtree is checked for open TODO entries. |
| 6529 | If none are found, the command offers to move it to the archive | 6667 | If none are found, the command offers to move it to the archive |
| @@ -6606,23 +6744,19 @@ Archived trees are excluded from column view unless the variable | |||
| 6606 | The following commands help manage the ARCHIVE tag: | 6744 | The following commands help manage the ARCHIVE tag: |
| 6607 | 6745 | ||
| 6608 | @table @kbd | 6746 | @table @kbd |
| 6609 | @kindex C-c C-x a | 6747 | @orgcmd{C-c C-x a,org-toggle-archive-tag} |
| 6610 | @item C-c C-x a | ||
| 6611 | Toggle the ARCHIVE tag for the current headline. When the tag is set, | 6748 | Toggle the ARCHIVE tag for the current headline. When the tag is set, |
| 6612 | the headline changes to a shadowed face, and the subtree below it is | 6749 | the headline changes to a shadowed face, and the subtree below it is |
| 6613 | hidden. | 6750 | hidden. |
| 6614 | @kindex C-u C-c C-x a | 6751 | @orgkey{C-u C-c C-x a} |
| 6615 | @item C-u C-c C-x a | ||
| 6616 | Check if any direct children of the current headline should be archived. | 6752 | Check if any direct children of the current headline should be archived. |
| 6617 | To do this, each subtree is checked for open TODO entries. If none are | 6753 | To do this, each subtree is checked for open TODO entries. If none are |
| 6618 | found, the command offers to set the ARCHIVE tag for the child. If the | 6754 | found, the command offers to set the ARCHIVE tag for the child. If the |
| 6619 | cursor is @emph{not} on a headline when this command is invoked, the | 6755 | cursor is @emph{not} on a headline when this command is invoked, the |
| 6620 | level 1 trees will be checked. | 6756 | level 1 trees will be checked. |
| 6621 | @kindex C-@kbd{TAB} | 6757 | @orgcmd{C-@kbd{TAB},org-force-cycle-archived} |
| 6622 | @item C-@kbd{TAB} | ||
| 6623 | Cycle a tree even if it is tagged with ARCHIVE. | 6758 | Cycle a tree even if it is tagged with ARCHIVE. |
| 6624 | @kindex C-c C-x A | 6759 | @orgcmd{C-c C-x A,org-archive-to-archive-sibling} |
| 6625 | @item C-c C-x A | ||
| 6626 | Move the current entry to the @emph{Archive Sibling}. This is a sibling of | 6760 | Move the current entry to the @emph{Archive Sibling}. This is a sibling of |
| 6627 | the entry with the heading @samp{Archive} and the tag @samp{ARCHIVE}. The | 6761 | the entry with the heading @samp{Archive} and the tag @samp{ARCHIVE}. The |
| 6628 | entry becomes a child of that sibling and in this way retains a lot of its | 6762 | entry becomes a child of that sibling and in this way retains a lot of its |
| @@ -6715,18 +6849,15 @@ the easiest way to maintain it is through the following commands | |||
| 6715 | 6849 | ||
| 6716 | @cindex files, adding to agenda list | 6850 | @cindex files, adding to agenda list |
| 6717 | @table @kbd | 6851 | @table @kbd |
| 6718 | @kindex C-c [ | 6852 | @orgcmd{C-c [,org-agenda-to-front} |
| 6719 | @item C-c [ | ||
| 6720 | Add current file to the list of agenda files. The file is added to | 6853 | Add current file to the list of agenda files. The file is added to |
| 6721 | the front of the list. If it was already in the list, it is moved to | 6854 | the front of the list. If it was already in the list, it is moved to |
| 6722 | the front. With a prefix argument, file is added/moved to the end. | 6855 | the front. With a prefix argument, file is added/moved to the end. |
| 6723 | @kindex C-c ] | 6856 | @orgcmd{C-c ],org-remove-file} |
| 6724 | @item C-c ] | ||
| 6725 | Remove current file from the list of agenda files. | 6857 | Remove current file from the list of agenda files. |
| 6726 | @kindex C-, | 6858 | @kindex C-, |
| 6727 | @kindex C-' | 6859 | @orgcmd{C-',org-cycle-agenda-files} |
| 6728 | @item C-, | 6860 | @itemx C-, |
| 6729 | @itemx C-' | ||
| 6730 | Cycle through agenda file list, visiting one file after the other. | 6861 | Cycle through agenda file list, visiting one file after the other. |
| 6731 | @kindex M-x org-iswitchb | 6862 | @kindex M-x org-iswitchb |
| 6732 | @item M-x org-iswitchb | 6863 | @item M-x org-iswitchb |
| @@ -6746,16 +6877,14 @@ you may press @kbd{<} once or several times in the dispatcher | |||
| 6746 | extended period, use the following commands: | 6877 | extended period, use the following commands: |
| 6747 | 6878 | ||
| 6748 | @table @kbd | 6879 | @table @kbd |
| 6749 | @kindex C-c C-x < | 6880 | @orgcmd{C-c C-x <,org-agenda-set-restriction-lock} |
| 6750 | @item C-c C-x < | ||
| 6751 | Permanently restrict the agenda to the current subtree. When with a | 6881 | Permanently restrict the agenda to the current subtree. When with a |
| 6752 | prefix argument, or with the cursor before the first headline in a file, | 6882 | prefix argument, or with the cursor before the first headline in a file, |
| 6753 | the agenda scope is set to the entire file. This restriction remains in | 6883 | the agenda scope is set to the entire file. This restriction remains in |
| 6754 | effect until removed with @kbd{C-c C-x >}, or by typing either @kbd{<} | 6884 | effect until removed with @kbd{C-c C-x >}, or by typing either @kbd{<} |
| 6755 | or @kbd{>} in the agenda dispatcher. If there is a window displaying an | 6885 | or @kbd{>} in the agenda dispatcher. If there is a window displaying an |
| 6756 | agenda view, the new restriction takes effect immediately. | 6886 | agenda view, the new restriction takes effect immediately. |
| 6757 | @kindex C-c C-x > | 6887 | @orgcmd{C-c C-x >,org-agenda-remove-restriction-lock} |
| 6758 | @item C-c C-x > | ||
| 6759 | Remove the permanent restriction created by @kbd{C-c C-x <}. | 6888 | Remove the permanent restriction created by @kbd{C-c C-x <}. |
| 6760 | @end table | 6889 | @end table |
| 6761 | 6890 | ||
| @@ -6763,14 +6892,12 @@ Remove the permanent restriction created by @kbd{C-c C-x <}. | |||
| 6763 | When working with @file{speedbar.el}, you can use the following commands in | 6892 | When working with @file{speedbar.el}, you can use the following commands in |
| 6764 | the Speedbar frame: | 6893 | the Speedbar frame: |
| 6765 | @table @kbd | 6894 | @table @kbd |
| 6766 | @kindex < | 6895 | @orgcmdtkc{< @r{in the speedbar frame},<,org-speedbar-set-agenda-restriction} |
| 6767 | @item < @r{in the speedbar frame} | ||
| 6768 | Permanently restrict the agenda to the item---either an Org file or a subtree | 6896 | Permanently restrict the agenda to the item---either an Org file or a subtree |
| 6769 | in such a file---at the cursor in the Speedbar frame. | 6897 | in such a file---at the cursor in the Speedbar frame. |
| 6770 | If there is a window displaying an agenda view, the new restriction takes | 6898 | If there is a window displaying an agenda view, the new restriction takes |
| 6771 | effect immediately. | 6899 | effect immediately. |
| 6772 | @kindex > | 6900 | @orgcmdtkc{> @r{in the speedbar frame},>,org-agenda-remove-restriction-lock} |
| 6773 | @item > @r{in the speedbar frame} | ||
| 6774 | Lift the restriction. | 6901 | Lift the restriction. |
| 6775 | @end table | 6902 | @end table |
| 6776 | 6903 | ||
| @@ -6850,18 +6977,23 @@ paper agenda, showing all the tasks for the current week or day. | |||
| 6850 | 6977 | ||
| 6851 | @table @kbd | 6978 | @table @kbd |
| 6852 | @cindex org-agenda, command | 6979 | @cindex org-agenda, command |
| 6853 | @kindex C-c a a | 6980 | @orgcmd{C-c a a,org-agenda-list} |
| 6854 | @item C-c a a | ||
| 6855 | @vindex org-agenda-ndays | ||
| 6856 | Compile an agenda for the current week from a list of Org files. The agenda | 6981 | Compile an agenda for the current week from a list of Org files. The agenda |
| 6857 | shows the entries for each day. With a numeric prefix@footnote{For backward | 6982 | shows the entries for each day. With a numeric prefix@footnote{For backward |
| 6858 | compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be | 6983 | compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be |
| 6859 | listed before the agenda. This feature is deprecated, use the dedicated TODO | 6984 | listed before the agenda. This feature is deprecated, use the dedicated TODO |
| 6860 | list, or a block agenda instead (@pxref{Block agenda}).} (like @kbd{C-u 2 1 | 6985 | list, or a block agenda instead (@pxref{Block agenda}).} (like @kbd{C-u 2 1 |
| 6861 | C-c a a}) you may set the number of days to be displayed (see also the | 6986 | C-c a a}) you may set the number of days to be displayed. |
| 6862 | variable @code{org-agenda-ndays}) | ||
| 6863 | @end table | 6987 | @end table |
| 6864 | 6988 | ||
| 6989 | @vindex org-agenda-span | ||
| 6990 | @vindex org-agenda-ndays | ||
| 6991 | The default number of days displayed in the agenda is set by the variable | ||
| 6992 | @code{org-agenda-span} (or the obsolete @code{org-agenda-ndays}). This | ||
| 6993 | variable can be set to any number of days you want to see by default in the | ||
| 6994 | agenda, or to a span name, such a @code{day}, @code{week}, @code{month} or | ||
| 6995 | @code{year}. | ||
| 6996 | |||
| 6865 | Remote editing from the agenda buffer means, for example, that you can | 6997 | Remote editing from the agenda buffer means, for example, that you can |
| 6866 | change the dates of deadlines and appointments from the agenda buffer. | 6998 | change the dates of deadlines and appointments from the agenda buffer. |
| 6867 | The commands available in the Agenda buffer are listed in @ref{Agenda | 6999 | The commands available in the Agenda buffer are listed in @ref{Agenda |
| @@ -6972,22 +7104,20 @@ The global TODO list contains all unfinished TODO items formatted and | |||
| 6972 | collected into a single place. | 7104 | collected into a single place. |
| 6973 | 7105 | ||
| 6974 | @table @kbd | 7106 | @table @kbd |
| 6975 | @kindex C-c a t | 7107 | @orgcmd{C-c a t,org-todo-list} |
| 6976 | @item C-c a t | ||
| 6977 | Show the global TODO list. This collects the TODO items from all agenda | 7108 | Show the global TODO list. This collects the TODO items from all agenda |
| 6978 | files (@pxref{Agenda Views}) into a single buffer. By default, this lists | 7109 | files (@pxref{Agenda Views}) into a single buffer. By default, this lists |
| 6979 | items with a state the is not a DONE state. The buffer is in | 7110 | items with a state the is not a DONE state. The buffer is in |
| 6980 | @code{agenda-mode}, so there are commands to examine and manipulate the TODO | 7111 | @code{agenda-mode}, so there are commands to examine and manipulate the TODO |
| 6981 | entries directly from that buffer (@pxref{Agenda commands}). | 7112 | entries directly from that buffer (@pxref{Agenda commands}). |
| 6982 | @kindex C-c a T | 7113 | @orgcmd{C-c a T,org-todo-list} |
| 6983 | @item C-c a T | ||
| 6984 | @cindex TODO keyword matching | 7114 | @cindex TODO keyword matching |
| 6985 | @vindex org-todo-keywords | 7115 | @vindex org-todo-keywords |
| 6986 | Like the above, but allows selection of a specific TODO keyword. You can | 7116 | Like the above, but allows selection of a specific TODO keyword. You can |
| 6987 | also do this by specifying a prefix argument to @kbd{C-c a t}. You are | 7117 | also do this by specifying a prefix argument to @kbd{C-c a t}. You are |
| 6988 | prompted for a keyword, and you may also specify several keywords by | 7118 | prompted for a keyword, and you may also specify several keywords by |
| 6989 | separating them with @samp{|} as the boolean OR operator. With a numeric | 7119 | separating them with @samp{|} as the boolean OR operator. With a numeric |
| 6990 | prefix, the nth keyword in @code{org-todo-keywords} is selected. | 7120 | prefix, the Nth keyword in @code{org-todo-keywords} is selected. |
| 6991 | @kindex r | 7121 | @kindex r |
| 6992 | The @kbd{r} key in the agenda buffer regenerates it, and you can give | 7122 | The @kbd{r} key in the agenda buffer regenerates it, and you can give |
| 6993 | a prefix argument to this command to change the selected TODO keyword, | 7123 | a prefix argument to this command to change the selected TODO keyword, |
| @@ -7009,13 +7139,15 @@ it more compact: | |||
| 7009 | @item | 7139 | @item |
| 7010 | @vindex org-agenda-todo-ignore-scheduled | 7140 | @vindex org-agenda-todo-ignore-scheduled |
| 7011 | @vindex org-agenda-todo-ignore-deadlines | 7141 | @vindex org-agenda-todo-ignore-deadlines |
| 7142 | @vindex org-agenda-todo-ignore-timestamp | ||
| 7012 | @vindex org-agenda-todo-ignore-with-date | 7143 | @vindex org-agenda-todo-ignore-with-date |
| 7013 | Some people view a TODO item that has been @emph{scheduled} for execution or | 7144 | Some people view a TODO item that has been @emph{scheduled} for execution or |
| 7014 | have a @emph{deadline} (@pxref{Timestamps}) as no longer @emph{open}. | 7145 | have a @emph{deadline} (@pxref{Timestamps}) as no longer @emph{open}. |
| 7015 | Configure the variables @code{org-agenda-todo-ignore-scheduled}, | 7146 | Configure the variables @code{org-agenda-todo-ignore-scheduled}, |
| 7016 | @code{org-agenda-todo-ignore-deadlines}, and/or | 7147 | @code{org-agenda-todo-ignore-deadlines}, |
| 7017 | @code{org-agenda-todo-ignore-with-date} to exclude such items from the | 7148 | @code{org-agenda-todo-ignore-timestamp} and/or |
| 7018 | global TODO list. | 7149 | @code{org-agenda-todo-ignore-with-date} to exclude such items from the global |
| 7150 | TODO list. | ||
| 7019 | @item | 7151 | @item |
| 7020 | @vindex org-agenda-todo-list-sublevels | 7152 | @vindex org-agenda-todo-list-sublevels |
| 7021 | TODO items may have sublevels to break up the task into subtasks. In | 7153 | TODO items may have sublevels to break up the task into subtasks. In |
| @@ -7038,15 +7170,13 @@ syntax described here also applies when creating sparse trees with @kbd{C-c / | |||
| 7038 | m}. | 7170 | m}. |
| 7039 | 7171 | ||
| 7040 | @table @kbd | 7172 | @table @kbd |
| 7041 | @kindex C-c a m | 7173 | @orgcmd{C-c a m,org-tags-view} |
| 7042 | @item C-c a m | ||
| 7043 | Produce a list of all headlines that match a given set of tags. The | 7174 | Produce a list of all headlines that match a given set of tags. The |
| 7044 | command prompts for a selection criterion, which is a boolean logic | 7175 | command prompts for a selection criterion, which is a boolean logic |
| 7045 | expression with tags, like @samp{+work+urgent-withboss} or | 7176 | expression with tags, like @samp{+work+urgent-withboss} or |
| 7046 | @samp{work|home} (@pxref{Tags}). If you often need a specific search, | 7177 | @samp{work|home} (@pxref{Tags}). If you often need a specific search, |
| 7047 | define a custom command for it (@pxref{Agenda dispatcher}). | 7178 | define a custom command for it (@pxref{Agenda dispatcher}). |
| 7048 | @kindex C-c a M | 7179 | @orgcmd{C-c a M,org-tags-view} |
| 7049 | @item C-c a M | ||
| 7050 | @vindex org-tags-match-list-sublevels | 7180 | @vindex org-tags-match-list-sublevels |
| 7051 | @vindex org-agenda-tags-todo-honor-ignore-options | 7181 | @vindex org-agenda-tags-todo-honor-ignore-options |
| 7052 | Like @kbd{C-c a m}, but only select headlines that are also TODO items in a | 7182 | Like @kbd{C-c a m}, but only select headlines that are also TODO items in a |
| @@ -7197,8 +7327,7 @@ file in a @emph{time-sorted view}. The main purpose of this command is | |||
| 7197 | to give an overview over events in a project. | 7327 | to give an overview over events in a project. |
| 7198 | 7328 | ||
| 7199 | @table @kbd | 7329 | @table @kbd |
| 7200 | @kindex C-c a L | 7330 | @orgcmd{C-c a L,org-timeline} |
| 7201 | @item C-c a L | ||
| 7202 | Show a time-sorted view of the Org file, with all time-stamped items. | 7331 | Show a time-sorted view of the Org file, with all time-stamped items. |
| 7203 | When called with a @kbd{C-u} prefix, all unfinished TODO entries | 7332 | When called with a @kbd{C-u} prefix, all unfinished TODO entries |
| 7204 | (scheduled or not) are also listed under the current date. | 7333 | (scheduled or not) are also listed under the current date. |
| @@ -7218,8 +7347,7 @@ This agenda view is a general text search facility for Org-mode entries. | |||
| 7218 | It is particularly useful to find notes. | 7347 | It is particularly useful to find notes. |
| 7219 | 7348 | ||
| 7220 | @table @kbd | 7349 | @table @kbd |
| 7221 | @kindex C-c a s | 7350 | @orgcmd{C-c a s,org-search-view} |
| 7222 | @item C-c a s | ||
| 7223 | This is a special search that lets you select entries by matching a substring | 7351 | This is a special search that lets you select entries by matching a substring |
| 7224 | or specific words using a boolean logic. | 7352 | or specific words using a boolean logic. |
| 7225 | @end table | 7353 | @end table |
| @@ -7250,8 +7378,7 @@ Org-mode produces. During the review, you need to identify such | |||
| 7250 | projects and define next actions for them. | 7378 | projects and define next actions for them. |
| 7251 | 7379 | ||
| 7252 | @table @kbd | 7380 | @table @kbd |
| 7253 | @kindex C-c a # | 7381 | @orgcmd{C-c a #,org-agenda-list-stuck-projects} |
| 7254 | @item C-c a # | ||
| 7255 | List projects that are stuck. | 7382 | List projects that are stuck. |
| 7256 | @kindex C-c a ! | 7383 | @kindex C-c a ! |
| 7257 | @item C-c a ! | 7384 | @item C-c a ! |
| @@ -7336,6 +7463,10 @@ special category you want to apply as the value. | |||
| 7336 | The display in the agenda buffer looks best if the category is not | 7463 | The display in the agenda buffer looks best if the category is not |
| 7337 | longer than 10 characters. | 7464 | longer than 10 characters. |
| 7338 | 7465 | ||
| 7466 | @noindent | ||
| 7467 | You can set up icons for category by customizing the | ||
| 7468 | @code{org-agenda-category-icon-alist} variable. | ||
| 7469 | |||
| 7339 | @node Time-of-day specifications, Sorting of agenda items, Categories, Presentation and sorting | 7470 | @node Time-of-day specifications, Sorting of agenda items, Categories, Presentation and sorting |
| 7340 | @subsection Time-of-day specifications | 7471 | @subsection Time-of-day specifications |
| 7341 | @cindex time-of-day specification | 7472 | @cindex time-of-day specification |
| @@ -7438,40 +7569,26 @@ the other commands, the cursor needs to be in the desired line. | |||
| 7438 | @table @kbd | 7569 | @table @kbd |
| 7439 | @tsubheading{Motion} | 7570 | @tsubheading{Motion} |
| 7440 | @cindex motion commands in agenda | 7571 | @cindex motion commands in agenda |
| 7441 | @kindex n | 7572 | @orgcmd{n,org-agenda-next-line} |
| 7442 | @item n | ||
| 7443 | Next line (same as @key{up} and @kbd{C-p}). | 7573 | Next line (same as @key{up} and @kbd{C-p}). |
| 7444 | @kindex p | 7574 | @orgcmd{p,org-agenda-previous-line} |
| 7445 | @item p | ||
| 7446 | Previous line (same as @key{down} and @kbd{C-n}). | 7575 | Previous line (same as @key{down} and @kbd{C-n}). |
| 7447 | @tsubheading{View/Go to Org file} | 7576 | @tsubheading{View/Go to Org file} |
| 7448 | @kindex mouse-3 | 7577 | @orgcmdkkc{@key{SPC},mouse-3,org-agenda-show-and-scroll-up} |
| 7449 | @kindex @key{SPC} | ||
| 7450 | @item mouse-3 | ||
| 7451 | @itemx @key{SPC} | ||
| 7452 | Display the original location of the item in another window. | 7578 | Display the original location of the item in another window. |
| 7453 | With prefix arg, make sure that the entire entry is made visible in the | 7579 | With prefix arg, make sure that the entire entry is made visible in the |
| 7454 | outline, not only the heading. | 7580 | outline, not only the heading. |
| 7455 | @c | 7581 | @c |
| 7456 | @kindex L | 7582 | @orgcmd{L,org-agenda-recenter} |
| 7457 | @item L | ||
| 7458 | Display original location and recenter that window. | 7583 | Display original location and recenter that window. |
| 7459 | @c | 7584 | @c |
| 7460 | @kindex mouse-2 | 7585 | @orgcmdkkc{@key{TAB},mouse-2,org-agenda-goto} |
| 7461 | @kindex mouse-1 | 7586 | Go to the original location of the item in another window. |
| 7462 | @kindex @key{TAB} | ||
| 7463 | @item mouse-2 | ||
| 7464 | @itemx mouse-1 | ||
| 7465 | @itemx @key{TAB} | ||
| 7466 | Go to the original location of the item in another window. Under Emacs | ||
| 7467 | 22, @kbd{mouse-1} will also works for this. | ||
| 7468 | @c | 7587 | @c |
| 7469 | @kindex @key{RET} | 7588 | @orgcmd{@key{RET},org-agenda-switch-to} |
| 7470 | @itemx @key{RET} | ||
| 7471 | Go to the original location of the item and delete other windows. | 7589 | Go to the original location of the item and delete other windows. |
| 7472 | @c | 7590 | @c |
| 7473 | @kindex F | 7591 | @orgcmd{F,org-agenda-follow-mode} |
| 7474 | @item F | ||
| 7475 | @vindex org-agenda-start-with-follow-mode | 7592 | @vindex org-agenda-start-with-follow-mode |
| 7476 | Toggle Follow mode. In Follow mode, as you move the cursor through | 7593 | Toggle Follow mode. In Follow mode, as you move the cursor through |
| 7477 | the agenda buffer, the other window always shows the corresponding | 7594 | the agenda buffer, the other window always shows the corresponding |
| @@ -7479,15 +7596,13 @@ location in the Org file. The initial setting for this mode in new | |||
| 7479 | agenda buffers can be set with the variable | 7596 | agenda buffers can be set with the variable |
| 7480 | @code{org-agenda-start-with-follow-mode}. | 7597 | @code{org-agenda-start-with-follow-mode}. |
| 7481 | @c | 7598 | @c |
| 7482 | @kindex C-c C-x b | 7599 | @orgcmd{C-c C-x b,org-agenda-tree-to-indirect-buffer} |
| 7483 | @item C-c C-x b | ||
| 7484 | Display the entire subtree of the current item in an indirect buffer. With a | 7600 | Display the entire subtree of the current item in an indirect buffer. With a |
| 7485 | numeric prefix argument N, go up to level N and then take that tree. If N is | 7601 | numeric prefix argument N, go up to level N and then take that tree. If N is |
| 7486 | negative, go up that many levels. With a @kbd{C-u} prefix, do not remove the | 7602 | negative, go up that many levels. With a @kbd{C-u} prefix, do not remove the |
| 7487 | previously used indirect buffer. | 7603 | previously used indirect buffer. |
| 7488 | 7604 | ||
| 7489 | @kindex C-c C-o | 7605 | @orgcmd{C-c C-o,org-agenda-open-link} |
| 7490 | @item C-c C-o | ||
| 7491 | Follow a link in the entry. This will offer a selection of any links in the | 7606 | Follow a link in the entry. This will offer a selection of any links in the |
| 7492 | text belonging to the referenced Org node. If there is only one link, it | 7607 | text belonging to the referenced Org node. If there is only one link, it |
| 7493 | will be followed without a selection prompt. | 7608 | will be followed without a selection prompt. |
| @@ -7498,16 +7613,20 @@ will be followed without a selection prompt. | |||
| 7498 | @item o | 7613 | @item o |
| 7499 | Delete other windows. | 7614 | Delete other windows. |
| 7500 | @c | 7615 | @c |
| 7501 | @kindex v d | 7616 | @c @kindex v d |
| 7502 | @kindex d | 7617 | @c @kindex d |
| 7503 | @kindex v w | 7618 | @c @kindex v w |
| 7504 | @kindex w | 7619 | @c @kindex w |
| 7505 | @kindex v m | 7620 | @c @kindex v m |
| 7506 | @kindex v y | 7621 | @c @kindex v y |
| 7507 | @item v d @ @r{or short} @ d | 7622 | @c @item v d @ @r{or short} @ d |
| 7508 | @itemx v w @ @r{or short} @ w | 7623 | @c @itemx v w @ @r{or short} @ w |
| 7509 | @itemx v m | 7624 | @c @itemx v m |
| 7510 | @itemx v y | 7625 | @c @itemx v y |
| 7626 | @orgcmdkskc{v d,d,org-aganda-day-view} | ||
| 7627 | @xorgcmdkskc{v w,w,org-aganda-day-view} | ||
| 7628 | @xorgcmd{v m,org-agenda-month-view} | ||
| 7629 | @xorgcmd{v y,org-agenda-month-year} | ||
| 7511 | Switch to day/week/month/year view. When switching to day or week view, | 7630 | Switch to day/week/month/year view. When switching to day or week view, |
| 7512 | this setting becomes the default for subsequent agenda commands. Since | 7631 | this setting becomes the default for subsequent agenda commands. Since |
| 7513 | month and year views are slow to create, they do not become the default. | 7632 | month and year views are slow to create, they do not become the default. |
| @@ -7519,37 +7638,28 @@ argument as well. For example, @kbd{200712 w} will jump to week 12 in | |||
| 7519 | 2007. If such a year specification has only one or two digits, it will | 7638 | 2007. If such a year specification has only one or two digits, it will |
| 7520 | be mapped to the interval 1938-2037. | 7639 | be mapped to the interval 1938-2037. |
| 7521 | @c | 7640 | @c |
| 7522 | @kindex f | 7641 | @orgcmd{f,org-agenda-later} |
| 7523 | @item f | 7642 | Go forward in time to display the following @code{org-agenda-current-span} days. |
| 7524 | @vindex org-agenda-ndays | ||
| 7525 | Go forward in time to display the following @code{org-agenda-ndays} days. | ||
| 7526 | For example, if the display covers a week, switch to the following week. | 7643 | For example, if the display covers a week, switch to the following week. |
| 7527 | With prefix arg, go forward that many times @code{org-agenda-ndays} days. | 7644 | With prefix arg, go forward that many times @code{org-agenda-current-span} days. |
| 7528 | @c | 7645 | @c |
| 7529 | @kindex b | 7646 | @orgcmd{b,org-agenda-earlier} |
| 7530 | @item b | ||
| 7531 | Go backward in time to display earlier dates. | 7647 | Go backward in time to display earlier dates. |
| 7532 | @c | 7648 | @c |
| 7533 | @kindex . | 7649 | @orgcmd{.,org-agenda-goto-today} |
| 7534 | @item . | ||
| 7535 | Go to today. | 7650 | Go to today. |
| 7536 | @c | 7651 | @c |
| 7537 | @kindex j | 7652 | @orgcmd{j,org-agenda-goto-date} |
| 7538 | @item j | ||
| 7539 | Prompt for a date and go there. | 7653 | Prompt for a date and go there. |
| 7540 | @c | 7654 | @c |
| 7541 | @kindex J | 7655 | @orgcmd{J,org-agenda-clock-goto} |
| 7542 | @item J | 7656 | Go to the currently clocked-in task @i{in the agenda buffer}. |
| 7543 | Go to the currently clocked in task in the agenda buffer. | ||
| 7544 | @c | 7657 | @c |
| 7545 | @kindex D | 7658 | @orgcmd{D,org-agenda-toggle-diary} |
| 7546 | @item D | ||
| 7547 | Toggle the inclusion of diary entries. See @ref{Weekly/daily agenda}. | 7659 | Toggle the inclusion of diary entries. See @ref{Weekly/daily agenda}. |
| 7548 | @c | 7660 | @c |
| 7549 | @kindex v l | 7661 | @orgcmdkskc{v l,l,org-agenda-log-mode} |
| 7550 | @kindex v L | 7662 | @kindex v L |
| 7551 | @kindex l | ||
| 7552 | @item v l @ @r{or short} @ l | ||
| 7553 | @vindex org-log-done | 7663 | @vindex org-log-done |
| 7554 | @vindex org-agenda-log-mode-items | 7664 | @vindex org-agenda-log-mode-items |
| 7555 | Toggle Logbook mode. In Logbook mode, entries that were marked DONE while | 7665 | Toggle Logbook mode. In Logbook mode, entries that were marked DONE while |
| @@ -7561,34 +7671,29 @@ all possible logbook entries, including state changes. When called with two | |||
| 7561 | prefix args @kbd{C-u C-u}, show only logging information, nothing else. | 7671 | prefix args @kbd{C-u C-u}, show only logging information, nothing else. |
| 7562 | @kbd{v L} is equivalent to @kbd{C-u v l}. | 7672 | @kbd{v L} is equivalent to @kbd{C-u v l}. |
| 7563 | @c | 7673 | @c |
| 7564 | @kindex v [ | 7674 | @orgcmdkskc{v [,[,org-agenda-manipulate-query-add} |
| 7565 | @kindex [ | ||
| 7566 | @item v [ @ @r{or short} @ [ | ||
| 7567 | Include inactive timestamps into the current view. Only for weekly/daily | 7675 | Include inactive timestamps into the current view. Only for weekly/daily |
| 7568 | agenda and timeline views. | 7676 | agenda and timeline views. |
| 7569 | @c | 7677 | @c |
| 7570 | @kindex v a | 7678 | @orgcmd{v a,org-agenda-archives-mode} |
| 7571 | @kindex v A | 7679 | @xorgcmd{v A,org-agenda-archives-mode 'files} |
| 7572 | @item v a | ||
| 7573 | @itemx v A | ||
| 7574 | Toggle Archives mode. In Archives mode, trees that are marked | 7680 | Toggle Archives mode. In Archives mode, trees that are marked |
| 7575 | @code{ARCHIVED} are also scanned when producing the agenda. When you use the | 7681 | @code{ARCHIVED} are also scanned when producing the agenda. When you use the |
| 7576 | capital @kbd{A}, even all archive files are included. To exit archives mode, | 7682 | capital @kbd{A}, even all archive files are included. To exit archives mode, |
| 7577 | press @kbd{v a} again. | 7683 | press @kbd{v a} again. |
| 7578 | @c | 7684 | @c |
| 7579 | @kindex v R | 7685 | @orgcmdkskc{v R,R,org-agenda-clockreport-mode} |
| 7580 | @kindex R | ||
| 7581 | @item v R @ @r{or short} @ R | ||
| 7582 | @vindex org-agenda-start-with-clockreport-mode | 7686 | @vindex org-agenda-start-with-clockreport-mode |
| 7583 | Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will | 7687 | Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will |
| 7584 | always show a table with the clocked times for the timespan and file scope | 7688 | always show a table with the clocked times for the timespan and file scope |
| 7585 | covered by the current agenda view. The initial setting for this mode in new | 7689 | covered by the current agenda view. The initial setting for this mode in new |
| 7586 | agenda buffers can be set with the variable | 7690 | agenda buffers can be set with the variable |
| 7587 | @code{org-agenda-start-with-clockreport-mode}. | 7691 | @code{org-agenda-start-with-clockreport-mode}. By using a prefix argument |
| 7692 | when toggling this mode (i.e. @kbd{C-u R}), the clock table will not show | ||
| 7693 | contributions from entries that are hidden by agenda filtering@footnote{Only | ||
| 7694 | tags filtering will be respected here, effort filtering is ignored.}. | ||
| 7588 | @c | 7695 | @c |
| 7589 | @kindex v E | 7696 | @orgcmdkskc{v E,E,org-agenda-entry-text-mode} |
| 7590 | @kindex E | ||
| 7591 | @item v E @ @r{or short} @ E | ||
| 7592 | @vindex org-agenda-start-with-entry-text-mode | 7697 | @vindex org-agenda-start-with-entry-text-mode |
| 7593 | @vindex org-agenda-entry-text-maxlines | 7698 | @vindex org-agenda-entry-text-maxlines |
| 7594 | Toggle entry text mode. In entry text mode, a number of lines from the Org | 7699 | Toggle entry text mode. In entry text mode, a number of lines from the Org |
| @@ -7597,33 +7702,26 @@ The maximum number of lines is given by the variable | |||
| 7597 | @code{org-agenda-entry-text-maxlines}. Calling this command with a numeric | 7702 | @code{org-agenda-entry-text-maxlines}. Calling this command with a numeric |
| 7598 | prefix argument will temporarily modify that number to the prefix value. | 7703 | prefix argument will temporarily modify that number to the prefix value. |
| 7599 | @c | 7704 | @c |
| 7600 | @kindex G | 7705 | @orgcmd{G,org-agenda-toggle-time-grid} |
| 7601 | @item G | ||
| 7602 | @vindex org-agenda-use-time-grid | 7706 | @vindex org-agenda-use-time-grid |
| 7603 | @vindex org-agenda-time-grid | 7707 | @vindex org-agenda-time-grid |
| 7604 | Toggle the time grid on and off. See also the variables | 7708 | Toggle the time grid on and off. See also the variables |
| 7605 | @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. | 7709 | @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. |
| 7606 | @c | 7710 | @c |
| 7607 | @kindex r | 7711 | @orgcmd{r,org-agenda-rodo} |
| 7608 | @item r | ||
| 7609 | Recreate the agenda buffer, for example to reflect the changes after | 7712 | Recreate the agenda buffer, for example to reflect the changes after |
| 7610 | modification of the timestamps of items with @kbd{S-@key{left}} and | 7713 | modification of the timestamps of items with @kbd{S-@key{left}} and |
| 7611 | @kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix | 7714 | @kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix |
| 7612 | argument is interpreted to create a selective list for a specific TODO | 7715 | argument is interpreted to create a selective list for a specific TODO |
| 7613 | keyword. | 7716 | keyword. |
| 7614 | @kindex g | 7717 | @orgcmd{g,org-agenda-rodo} |
| 7615 | @item g | ||
| 7616 | Same as @kbd{r}. | 7718 | Same as @kbd{r}. |
| 7617 | @c | 7719 | @c |
| 7618 | @kindex s | 7720 | @orgcmdkskc{C-x C-s,s,org-save-all-org-buffers} |
| 7619 | @kindex C-x C-s | ||
| 7620 | @item s | ||
| 7621 | @itemx C-x C-s | ||
| 7622 | Save all Org buffers in the current Emacs session, and also the locations of | 7721 | Save all Org buffers in the current Emacs session, and also the locations of |
| 7623 | IDs. | 7722 | IDs. |
| 7624 | @c | 7723 | @c |
| 7625 | @kindex C-c C-x C-c | 7724 | @orgcmd{C-c C-x C-c,org-agenda-columns} |
| 7626 | @item C-c C-x C-c | ||
| 7627 | @vindex org-columns-default-format | 7725 | @vindex org-columns-default-format |
| 7628 | Invoke column view (@pxref{Column view}) in the agenda buffer. The column | 7726 | Invoke column view (@pxref{Column view}) in the agenda buffer. The column |
| 7629 | view format is taken from the entry at point, or (if there is no entry at | 7727 | view format is taken from the entry at point, or (if there is no entry at |
| @@ -7632,8 +7730,7 @@ that entry would be in the original buffer (taken from a property, from a | |||
| 7632 | @code{#+COLUMNS} line, or from the default variable | 7730 | @code{#+COLUMNS} line, or from the default variable |
| 7633 | @code{org-columns-default-format}), will be used in the agenda. | 7731 | @code{org-columns-default-format}), will be used in the agenda. |
| 7634 | 7732 | ||
| 7635 | @kindex C-c C-x > | 7733 | @orgcmd{C-c C-x >,org-agenda-remove-restriction-lock} |
| 7636 | @item C-c C-x > | ||
| 7637 | Remove the restriction lock on the agenda, if it is currently restricted to a | 7734 | Remove the restriction lock on the agenda, if it is currently restricted to a |
| 7638 | file or subtree (@pxref{Agenda files}). | 7735 | file or subtree (@pxref{Agenda files}). |
| 7639 | 7736 | ||
| @@ -7643,20 +7740,19 @@ file or subtree (@pxref{Agenda files}). | |||
| 7643 | @cindex effort filtering, in agenda | 7740 | @cindex effort filtering, in agenda |
| 7644 | @cindex query editing, in agenda | 7741 | @cindex query editing, in agenda |
| 7645 | 7742 | ||
| 7646 | @kindex / | 7743 | @orgcmd{/,org-agenda-filter-by-tag} |
| 7647 | @item / | ||
| 7648 | @vindex org-agenda-filter-preset | 7744 | @vindex org-agenda-filter-preset |
| 7649 | Filter the current agenda view with respect to a tag and/or effort estimates. | 7745 | Filter the current agenda view with respect to a tag and/or effort estimates. |
| 7650 | The difference between this and a custom agenda command is that filtering is | 7746 | The difference between this and a custom agenda command is that filtering is |
| 7651 | very fast, so that you can switch quickly between different filters without | 7747 | very fast, so that you can switch quickly between different filters without |
| 7652 | having to recreate the agenda@footnote{Custom commands can preset a filter by | 7748 | having to recreate the agenda.@footnote{Custom commands can preset a filter by |
| 7653 | binding the variable @code{org-agenda-filter-preset} as an option. This | 7749 | binding the variable @code{org-agenda-filter-preset} as an option. This |
| 7654 | filter will then be applied to the view and persist as a basic filter through | 7750 | filter will then be applied to the view and persist as a basic filter through |
| 7655 | refreshes and more secondary filtering. The filter is a global property of | 7751 | refreshes and more secondary filtering. The filter is a global property of |
| 7656 | the entire agenda view - in a block agenda, you should only set this in the | 7752 | the entire agenda view---in a block agenda, you should only set this in the |
| 7657 | global options section, not in the section of an individual block.} | 7753 | global options section, not in the section of an individual block.} |
| 7658 | 7754 | ||
| 7659 | You will be prompted for a tag selection letter, SPC will mean any tag at | 7755 | You will be prompted for a tag selection letter; @key{SPC} will mean any tag at |
| 7660 | all. Pressing @key{TAB} at that prompt will offer use completion to select a | 7756 | all. Pressing @key{TAB} at that prompt will offer use completion to select a |
| 7661 | tag (including any tags that do not have a selection character). The command | 7757 | tag (including any tags that do not have a selection character). The command |
| 7662 | then hides all entries that do not contain or inherit this tag. When called | 7758 | then hides all entries that do not contain or inherit this tag. When called |
| @@ -7668,7 +7764,7 @@ Instead of pressing @kbd{+} or @kbd{-} after @kbd{/}, you can also | |||
| 7668 | immediately use the @kbd{\} command. | 7764 | immediately use the @kbd{\} command. |
| 7669 | 7765 | ||
| 7670 | @vindex org-sort-agenda-noeffort-is-high | 7766 | @vindex org-sort-agenda-noeffort-is-high |
| 7671 | In order to filter for effort estimates, you should set-up allowed | 7767 | In order to filter for effort estimates, you should set up allowed |
| 7672 | efforts globally, for example | 7768 | efforts globally, for example |
| 7673 | @lisp | 7769 | @lisp |
| 7674 | (setq org-global-properties | 7770 | (setq org-global-properties |
| @@ -7711,13 +7807,13 @@ Internet, and outside of business hours, with something like this: | |||
| 7711 | @end group | 7807 | @end group |
| 7712 | @end lisp | 7808 | @end lisp |
| 7713 | 7809 | ||
| 7714 | @kindex \ | 7810 | @orgcmd{\,org-agenda-filter-by-tag-refine} |
| 7715 | @item \ | ||
| 7716 | Narrow the current agenda filter by an additional condition. When called with | 7811 | Narrow the current agenda filter by an additional condition. When called with |
| 7717 | prefix arg, remove the entries that @emph{do} have the tag, or that do match | 7812 | prefix arg, remove the entries that @emph{do} have the tag, or that do match |
| 7718 | the effort criterion. You can achieve the same effect by pressing @kbd{+} or | 7813 | the effort criterion. You can achieve the same effect by pressing @kbd{+} or |
| 7719 | @kbd{-} as the first key after the @kbd{/} command. | 7814 | @kbd{-} as the first key after the @kbd{/} command. |
| 7720 | 7815 | ||
| 7816 | @c | ||
| 7721 | @kindex [ | 7817 | @kindex [ |
| 7722 | @kindex ] | 7818 | @kindex ] |
| 7723 | @kindex @{ | 7819 | @kindex @{ |
| @@ -7733,7 +7829,6 @@ negative search term which @i{must not} occur/match in the entry for it to be | |||
| 7733 | selected. | 7829 | selected. |
| 7734 | @end table | 7830 | @end table |
| 7735 | 7831 | ||
| 7736 | @page | ||
| 7737 | @tsubheading{Remote editing} | 7832 | @tsubheading{Remote editing} |
| 7738 | @cindex remote editing, from agenda | 7833 | @cindex remote editing, from agenda |
| 7739 | 7834 | ||
| @@ -7742,115 +7837,89 @@ Digit argument. | |||
| 7742 | @c | 7837 | @c |
| 7743 | @cindex undoing remote-editing events | 7838 | @cindex undoing remote-editing events |
| 7744 | @cindex remote editing, undo | 7839 | @cindex remote editing, undo |
| 7745 | @kindex C-_ | 7840 | @orgcmd{C-_,org-agenda-undo} |
| 7746 | @item C-_ | ||
| 7747 | Undo a change due to a remote editing command. The change is undone | 7841 | Undo a change due to a remote editing command. The change is undone |
| 7748 | both in the agenda buffer and in the remote buffer. | 7842 | both in the agenda buffer and in the remote buffer. |
| 7749 | @c | 7843 | @c |
| 7750 | @kindex t | 7844 | @orgcmd{t,org-agenda-todo} |
| 7751 | @item t | ||
| 7752 | Change the TODO state of the item, both in the agenda and in the | 7845 | Change the TODO state of the item, both in the agenda and in the |
| 7753 | original org file. | 7846 | original org file. |
| 7754 | @c | 7847 | @c |
| 7755 | @kindex C-S-@key{right} | 7848 | @orgcmd{C-S-@key{right},org-agenda-todo-nextset} |
| 7756 | @kindex C-S-@key{left} | 7849 | @orgcmd{C-S-@key{left},org-agenda-todo-previousset} |
| 7757 | @item C-S-@key{right}@r{/}@key{left} | ||
| 7758 | Switch to the next/previous set of TODO keywords. | 7850 | Switch to the next/previous set of TODO keywords. |
| 7759 | @c | 7851 | @c |
| 7760 | @kindex C-k | 7852 | @orgcmd{C-k,org-agenda-kill} |
| 7761 | @item C-k | ||
| 7762 | @vindex org-agenda-confirm-kill | 7853 | @vindex org-agenda-confirm-kill |
| 7763 | Delete the current agenda item along with the entire subtree belonging | 7854 | Delete the current agenda item along with the entire subtree belonging |
| 7764 | to it in the original Org file. If the text to be deleted remotely | 7855 | to it in the original Org file. If the text to be deleted remotely |
| 7765 | is longer than one line, the kill needs to be confirmed by the user. See | 7856 | is longer than one line, the kill needs to be confirmed by the user. See |
| 7766 | variable @code{org-agenda-confirm-kill}. | 7857 | variable @code{org-agenda-confirm-kill}. |
| 7767 | @c | 7858 | @c |
| 7768 | @kindex C-c C-w | 7859 | @orgcmd{C-c C-w,org-agenda-refile} |
| 7769 | @item C-c C-w | ||
| 7770 | Refile the entry at point. | 7860 | Refile the entry at point. |
| 7771 | @c | 7861 | @c |
| 7772 | @kindex C-c C-x C-a | 7862 | @orgcmdkskc{C-c C-x C-a,a,org-agenda-archive-default-with-confirmation} |
| 7773 | @kindex a | ||
| 7774 | @item C-c C-x C-a @ @r{or short} @ a | ||
| 7775 | @vindex org-archive-default-command | 7863 | @vindex org-archive-default-command |
| 7776 | Archive the subtree corresponding to the entry at point using the default | 7864 | Archive the subtree corresponding to the entry at point using the default |
| 7777 | archiving command set in @code{org-archive-default-command}. When using the | 7865 | archiving command set in @code{org-archive-default-command}. When using the |
| 7778 | @code{a} key, confirmation will be required. | 7866 | @code{a} key, confirmation will be required. |
| 7779 | @c | 7867 | @c |
| 7780 | @kindex C-c C-x a | 7868 | @orgcmd{C-c C-x a,org-agenda-toggle-archive-tag} |
| 7781 | @item C-c C-x a | ||
| 7782 | Toggle the ARCHIVE tag for the current headline. | 7869 | Toggle the ARCHIVE tag for the current headline. |
| 7783 | @c | 7870 | @c |
| 7784 | @kindex C-c C-x A | 7871 | @orgcmd{C-c C-x A,org-agenda-archive-to-archive-sibling} |
| 7785 | @item C-c C-x A | ||
| 7786 | Move the subtree corresponding to the current entry to its @emph{archive | 7872 | Move the subtree corresponding to the current entry to its @emph{archive |
| 7787 | sibling}. | 7873 | sibling}. |
| 7788 | @c | 7874 | @c |
| 7789 | @kindex $ | 7875 | @orgcmdkskc{C-c C-x C-s,$,org-agenda-archive} |
| 7790 | @kindex C-c C-x C-s | ||
| 7791 | @item C-c C-x C-s @ @r{or short} @ $ | ||
| 7792 | Archive the subtree corresponding to the current headline. This means the | 7876 | Archive the subtree corresponding to the current headline. This means the |
| 7793 | entry will be moved to the configured archive location, most likely a | 7877 | entry will be moved to the configured archive location, most likely a |
| 7794 | different file. | 7878 | different file. |
| 7795 | @c | 7879 | @c |
| 7796 | @kindex T | 7880 | @orgcmd{T,org-agenda-show-tags} |
| 7797 | @item T | ||
| 7798 | @vindex org-agenda-show-inherited-tags | 7881 | @vindex org-agenda-show-inherited-tags |
| 7799 | Show all tags associated with the current item. This is useful if you have | 7882 | Show all tags associated with the current item. This is useful if you have |
| 7800 | turned off @code{org-agenda-show-inherited-tags}, but still want to see all | 7883 | turned off @code{org-agenda-show-inherited-tags}, but still want to see all |
| 7801 | tags of a headline occasionally. | 7884 | tags of a headline occasionally. |
| 7802 | @c | 7885 | @c |
| 7803 | @kindex : | 7886 | @orgcmd{:,org-agenda-set-tags} |
| 7804 | @item : | ||
| 7805 | Set tags for the current headline. If there is an active region in the | 7887 | Set tags for the current headline. If there is an active region in the |
| 7806 | agenda, change a tag for all headings in the region. | 7888 | agenda, change a tag for all headings in the region. |
| 7807 | @c | 7889 | @c |
| 7808 | @kindex , | 7890 | @kindex , |
| 7809 | @item , | 7891 | @item , |
| 7810 | Set the priority for the current item. Org-mode prompts for the | 7892 | Set the priority for the current item (@command{org-agenda-priority}). |
| 7811 | priority character. If you reply with @key{SPC}, the priority cookie | 7893 | Org-mode prompts for the priority character. If you reply with @key{SPC}, the |
| 7812 | is removed from the entry. | 7894 | priority cookie is removed from the entry. |
| 7813 | @c | 7895 | @c |
| 7814 | @kindex P | 7896 | @orgcmd{P,org-agenda-show-priority} |
| 7815 | @item P | ||
| 7816 | Display weighted priority of current item. | 7897 | Display weighted priority of current item. |
| 7817 | @c | 7898 | @c |
| 7818 | @kindex + | 7899 | @orgcmdkkc{+,S-@key{up},org-agenda-priority-up} |
| 7819 | @kindex S-@key{up} | ||
| 7820 | @item + | ||
| 7821 | @itemx S-@key{up} | ||
| 7822 | Increase the priority of the current item. The priority is changed in | 7900 | Increase the priority of the current item. The priority is changed in |
| 7823 | the original buffer, but the agenda is not resorted. Use the @kbd{r} | 7901 | the original buffer, but the agenda is not resorted. Use the @kbd{r} |
| 7824 | key for this. | 7902 | key for this. |
| 7825 | @c | 7903 | @c |
| 7826 | @kindex - | 7904 | @orgcmdkkc{-,S-@key{down},org-agenda-priority-down} |
| 7827 | @kindex S-@key{down} | ||
| 7828 | @item - | ||
| 7829 | @itemx S-@key{down} | ||
| 7830 | Decrease the priority of the current item. | 7905 | Decrease the priority of the current item. |
| 7831 | @c | 7906 | @c |
| 7832 | @kindex C-c C-z | 7907 | @orgcmdkkc{z,C-c C-z,org-agenda-add-note} |
| 7833 | @kindex z | ||
| 7834 | @item z @ @r{or also} @ C-c C-z | ||
| 7835 | @vindex org-log-into-drawer | 7908 | @vindex org-log-into-drawer |
| 7836 | Add a note to the entry. This note will be recorded, and then files to the | 7909 | Add a note to the entry. This note will be recorded, and then filed to the |
| 7837 | same location where state change notes are put. Depending on | 7910 | same location where state change notes are put. Depending on |
| 7838 | @code{org-log-into-drawer}, this maybe inside a drawer. | 7911 | @code{org-log-into-drawer}, this may be inside a drawer. |
| 7839 | @c | 7912 | @c |
| 7840 | @kindex C-c C-a | 7913 | @orgcmd{C-c C-a,org-attach} |
| 7841 | @item C-c C-a | ||
| 7842 | Dispatcher for all command related to attachments. | 7914 | Dispatcher for all command related to attachments. |
| 7843 | @c | 7915 | @c |
| 7844 | @kindex C-c C-s | 7916 | @orgcmd{C-c C-s,org-agenda-schedule} |
| 7845 | @item C-c C-s | 7917 | Schedule this item. With prefix arg remove the scheduling timestamp |
| 7846 | Schedule this item, with prefix arg remove the scheduling timestamp | ||
| 7847 | @c | 7918 | @c |
| 7848 | @kindex C-c C-d | 7919 | @orgcmd{C-c C-d,org-agenda-deadline} |
| 7849 | @item C-c C-d | 7920 | Set a deadline for this item. With prefix arg remove the deadline. |
| 7850 | Set a deadline for this item, with prefix arg remove the deadline. | ||
| 7851 | @c | 7921 | @c |
| 7852 | @kindex k | 7922 | @orgcmd{k,org-agenda-action} |
| 7853 | @item k | ||
| 7854 | Agenda actions, to set dates for selected items to the cursor date. | 7923 | Agenda actions, to set dates for selected items to the cursor date. |
| 7855 | This command also works in the calendar! The command prompts for an | 7924 | This command also works in the calendar! The command prompts for an |
| 7856 | additional key: | 7925 | additional key: |
| @@ -7865,8 +7934,7 @@ r @r{Call @code{org-capture} with the cursor date as default date.} | |||
| 7865 | Press @kbd{r} afterward to refresh the agenda and see the effect of the | 7934 | Press @kbd{r} afterward to refresh the agenda and see the effect of the |
| 7866 | command. | 7935 | command. |
| 7867 | @c | 7936 | @c |
| 7868 | @kindex S-@key{right} | 7937 | @orgcmd{S-@key{right},org-agenda-do-date-later} |
| 7869 | @item S-@key{right} | ||
| 7870 | Change the timestamp associated with the current line by one day into the | 7938 | Change the timestamp associated with the current line by one day into the |
| 7871 | future. With a numeric prefix argument, change it by that many days. For | 7939 | future. With a numeric prefix argument, change it by that many days. For |
| 7872 | example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a | 7940 | example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a |
| @@ -7876,57 +7944,48 @@ a double @kbd{C-u C-u} prefix, do the same for changing minutes. The stamp | |||
| 7876 | is changed in the original Org file, but the change is not directly reflected | 7944 | is changed in the original Org file, but the change is not directly reflected |
| 7877 | in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. | 7945 | in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. |
| 7878 | @c | 7946 | @c |
| 7879 | @kindex S-@key{left} | 7947 | @orgcmd{S-@key{left},org-agenda-do-date-earlier} |
| 7880 | @item S-@key{left} | ||
| 7881 | Change the timestamp associated with the current line by one day | 7948 | Change the timestamp associated with the current line by one day |
| 7882 | into the past. | 7949 | into the past. |
| 7883 | @c | 7950 | @c |
| 7884 | @kindex > | 7951 | @orgcmd{>,org-agenda-date-prompt} |
| 7885 | @item > | ||
| 7886 | Change the timestamp associated with the current line. The key @kbd{>} has | 7952 | Change the timestamp associated with the current line. The key @kbd{>} has |
| 7887 | been chosen, because it is the same as @kbd{S-.} on my keyboard. | 7953 | been chosen, because it is the same as @kbd{S-.} on my keyboard. |
| 7888 | @c | 7954 | @c |
| 7889 | @kindex I | 7955 | @orgcmd{I,org-agenda-clock-in} |
| 7890 | @item I | ||
| 7891 | Start the clock on the current item. If a clock is running already, it | 7956 | Start the clock on the current item. If a clock is running already, it |
| 7892 | is stopped first. | 7957 | is stopped first. |
| 7893 | @c | 7958 | @c |
| 7894 | @kindex O | 7959 | @orgcmd{O,org-agenda-clock-out} |
| 7895 | @item O | ||
| 7896 | Stop the previously started clock. | 7960 | Stop the previously started clock. |
| 7897 | @c | 7961 | @c |
| 7898 | @kindex X | 7962 | @orgcmd{X,org-agenda-clock-cancel} |
| 7899 | @item X | ||
| 7900 | Cancel the currently running clock. | 7963 | Cancel the currently running clock. |
| 7901 | 7964 | @c | |
| 7902 | @kindex J | 7965 | @orgcmd{J,org-agenda-clock-goto} |
| 7903 | @item J | ||
| 7904 | Jump to the running clock in another window. | 7966 | Jump to the running clock in another window. |
| 7905 | 7967 | ||
| 7906 | @tsubheading{Bulk remote editing selected entries} | 7968 | @tsubheading{Bulk remote editing selected entries} |
| 7907 | @cindex remote editing, bulk, from agenda | 7969 | @cindex remote editing, bulk, from agenda |
| 7908 | 7970 | ||
| 7909 | @kindex m | 7971 | @orgcmd{m,org-agenda-bulk-mark} |
| 7910 | @item m | 7972 | Mark the entry at point for bulk action. With prefix arg, mark that many |
| 7911 | Mark the entry at point for bulk action. | 7973 | successive entries. |
| 7912 | 7974 | @c | |
| 7913 | @kindex u | 7975 | @orgcmd{u,org-agenda-bulk-unmark} |
| 7914 | @item u | ||
| 7915 | Unmark entry for bulk action. | 7976 | Unmark entry for bulk action. |
| 7916 | 7977 | @c | |
| 7917 | @kindex U | 7978 | @orgcmd{U,org-agenda-bulk-remove-all-marks} |
| 7918 | @item U | ||
| 7919 | Unmark all marked entries for bulk action. | 7979 | Unmark all marked entries for bulk action. |
| 7920 | 7980 | @c | |
| 7921 | @kindex B | 7981 | @orgcmd{B,org-agenda-bulk-action} |
| 7922 | @item B | ||
| 7923 | Bulk action: act on all marked entries in the agenda. This will prompt for | 7982 | Bulk action: act on all marked entries in the agenda. This will prompt for |
| 7924 | another key to select the action to be applied. The prefix arg to @kbd{B} | 7983 | another key to select the action to be applied. The prefix arg to @kbd{B} |
| 7925 | will be passed through to the @kbd{s} and @kbd{d} commands, to bulk-remove | 7984 | will be passed through to the @kbd{s} and @kbd{d} commands, to bulk-remove |
| 7926 | these special timestamps. | 7985 | these special timestamps. |
| 7927 | @example | 7986 | @example |
| 7928 | r @r{Prompt for a single refile target and move all entries. The entries} | 7987 | r @r{Prompt for a single refile target and move all entries. The entries} |
| 7929 | @r{will no longer be in the agenda, refresh (@kbd{g}) to bring them back.} | 7988 | @r{will no longer be in the agenda; refresh (@kbd{g}) to bring them back.} |
| 7930 | $ @r{Archive all selected entries.} | 7989 | $ @r{Archive all selected entries.} |
| 7931 | A @r{Archive entries by moving them to their respective archive siblings.} | 7990 | A @r{Archive entries by moving them to their respective archive siblings.} |
| 7932 | t @r{Change TODO state. This prompts for a single TODO keyword and} | 7991 | t @r{Change TODO state. This prompts for a single TODO keyword and} |
| @@ -7937,23 +7996,24 @@ t @r{Change TODO state. This prompts for a single TODO keyword and} | |||
| 7937 | s @r{Schedule all items to a new date. To shift existing schedule dates} | 7996 | s @r{Schedule all items to a new date. To shift existing schedule dates} |
| 7938 | @r{by a fixed number of days, use something starting with double plus} | 7997 | @r{by a fixed number of days, use something starting with double plus} |
| 7939 | @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} | 7998 | @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} |
| 7999 | S @r{Reschedule randomly by N days. N will be prompted for. With prefix} | ||
| 8000 | @r{arg (@kbd{C-u B S}), scatter only accross weekdays.} | ||
| 7940 | d @r{Set deadline to a specific date.} | 8001 | d @r{Set deadline to a specific date.} |
| 7941 | @end example | 8002 | @end example |
| 7942 | 8003 | ||
| 7943 | 8004 | ||
| 7944 | @tsubheading{Calendar commands} | 8005 | @tsubheading{Calendar commands} |
| 7945 | @cindex calendar commands, from agenda | 8006 | @cindex calendar commands, from agenda |
| 7946 | @kindex c | 8007 | |
| 7947 | @item c | 8008 | @orgcmd{c,org-agenda-goto-calendar} |
| 7948 | Open the Emacs calendar and move to the date at the agenda cursor. | 8009 | Open the Emacs calendar and move to the date at the agenda cursor. |
| 7949 | @c | 8010 | @c |
| 7950 | @item c | 8011 | @orgcmd{c,org-calendar-goto-agenda} |
| 7951 | When in the calendar, compute and show the Org-mode agenda for the | 8012 | When in the calendar, compute and show the Org-mode agenda for the |
| 7952 | date at the cursor. | 8013 | date at the cursor. |
| 7953 | @c | 8014 | @c |
| 7954 | @cindex diary entries, creating from agenda | 8015 | @cindex diary entries, creating from agenda |
| 7955 | @kindex i | 8016 | @orgcmd{i,org-agenda-diary-entry} |
| 7956 | @item i | ||
| 7957 | @vindex org-agenda-diary-file | 8017 | @vindex org-agenda-diary-file |
| 7958 | Insert a new entry into the diary, using the date at the cursor and (for | 8018 | Insert a new entry into the diary, using the date at the cursor and (for |
| 7959 | block entries) the date at the mark. This will add to the Emacs diary | 8019 | block entries) the date at the mark. This will add to the Emacs diary |
| @@ -7967,28 +8027,24 @@ Org will create entries (in org-mode syntax) in that file instead. Most | |||
| 7967 | entries will be stored in a date-based outline tree that will later make it | 8027 | entries will be stored in a date-based outline tree that will later make it |
| 7968 | easy to archive appointments from previous months/years. The tree will be | 8028 | easy to archive appointments from previous months/years. The tree will be |
| 7969 | built under an entry with a @code{DATE_TREE} property, or else with years as | 8029 | built under an entry with a @code{DATE_TREE} property, or else with years as |
| 7970 | top-level entries. Emacs will prompt you for the entry text - if you specify | 8030 | top-level entries. Emacs will prompt you for the entry text---if you specify |
| 7971 | it, the entry will be created in @code{org-agenda-diary-file} without further | 8031 | it, the entry will be created in @code{org-agenda-diary-file} without further |
| 7972 | interaction. If you directly press @key{RET} at the prompt without typing | 8032 | interaction. If you directly press @key{RET} at the prompt without typing |
| 7973 | text, the target file will be shown in another window for you to finish the | 8033 | text, the target file will be shown in another window for you to finish the |
| 7974 | entry there. See also the @kbd{k r} command. | 8034 | entry there. See also the @kbd{k r} command. |
| 7975 | @c | 8035 | @c |
| 7976 | @kindex M | 8036 | @orgcmd{M,org-agenda-phases-of-moon} |
| 7977 | @item M | ||
| 7978 | Show the phases of the moon for the three months around current date. | 8037 | Show the phases of the moon for the three months around current date. |
| 7979 | @c | 8038 | @c |
| 7980 | @kindex S | 8039 | @orgcmd{S,org-agenda-sunrise-sunset} |
| 7981 | @item S | ||
| 7982 | Show sunrise and sunset times. The geographical location must be set | 8040 | Show sunrise and sunset times. The geographical location must be set |
| 7983 | with calendar variables, see the documentation for the Emacs calendar. | 8041 | with calendar variables, see the documentation for the Emacs calendar. |
| 7984 | @c | 8042 | @c |
| 7985 | @kindex C | 8043 | @orgcmd{C,org-agenda-convert-date} |
| 7986 | @item C | ||
| 7987 | Convert the date at cursor into many other cultural and historic | 8044 | Convert the date at cursor into many other cultural and historic |
| 7988 | calendars. | 8045 | calendars. |
| 7989 | @c | 8046 | @c |
| 7990 | @kindex H | 8047 | @orgcmd{H,org-agenda-holidays} |
| 7991 | @item H | ||
| 7992 | Show holidays for three months around the cursor date. | 8048 | Show holidays for three months around the cursor date. |
| 7993 | 8049 | ||
| 7994 | @item M-x org-export-icalendar-combine-agenda-files | 8050 | @item M-x org-export-icalendar-combine-agenda-files |
| @@ -7996,8 +8052,7 @@ Export a single iCalendar file containing entries from all agenda files. | |||
| 7996 | This is a globally available command, and also available in the agenda menu. | 8052 | This is a globally available command, and also available in the agenda menu. |
| 7997 | 8053 | ||
| 7998 | @tsubheading{Exporting to a file} | 8054 | @tsubheading{Exporting to a file} |
| 7999 | @kindex C-x C-w | 8055 | @orgcmd{C-x C-w,org-write-agenda} |
| 8000 | @item C-x C-w | ||
| 8001 | @cindex exporting agenda views | 8056 | @cindex exporting agenda views |
| 8002 | @cindex agenda views, exporting | 8057 | @cindex agenda views, exporting |
| 8003 | @vindex org-agenda-exporter-settings | 8058 | @vindex org-agenda-exporter-settings |
| @@ -8010,13 +8065,11 @@ argument, immediately open the newly created file. Use the variable | |||
| 8010 | for @file{htmlize} to be used during export. | 8065 | for @file{htmlize} to be used during export. |
| 8011 | 8066 | ||
| 8012 | @tsubheading{Quit and Exit} | 8067 | @tsubheading{Quit and Exit} |
| 8013 | @kindex q | 8068 | @orgcmd{q,org-agenda-quit} |
| 8014 | @item q | ||
| 8015 | Quit agenda, remove the agenda buffer. | 8069 | Quit agenda, remove the agenda buffer. |
| 8016 | @c | 8070 | @c |
| 8017 | @kindex x | ||
| 8018 | @cindex agenda files, removing buffers | 8071 | @cindex agenda files, removing buffers |
| 8019 | @item x | 8072 | @orgcmd{x,org-agenda-exit} |
| 8020 | Exit agenda, remove the agenda buffer and all buffers loaded by Emacs | 8073 | Exit agenda, remove the agenda buffer and all buffers loaded by Emacs |
| 8021 | for the compilation of the agenda. Buffers created by the user to | 8074 | for the compilation of the agenda. Buffers created by the user to |
| 8022 | visit Org files will not be removed. | 8075 | visit Org files will not be removed. |
| @@ -8182,7 +8235,7 @@ For command sets creating a block agenda, | |||
| 8182 | @code{org-agenda-custom-commands} has two separate spots for setting | 8235 | @code{org-agenda-custom-commands} has two separate spots for setting |
| 8183 | options. You can add options that should be valid for just a single | 8236 | options. You can add options that should be valid for just a single |
| 8184 | command in the set, and options that should be valid for all commands in | 8237 | command in the set, and options that should be valid for all commands in |
| 8185 | the set. The former are just added to the command entry, the latter | 8238 | the set. The former are just added to the command entry; the latter |
| 8186 | must come after the list of command entries. Going back to the block | 8239 | must come after the list of command entries. Going back to the block |
| 8187 | agenda example (@pxref{Block agenda}), let's change the sorting strategy | 8240 | agenda example (@pxref{Block agenda}), let's change the sorting strategy |
| 8188 | for the @kbd{C-c a h} commands to @code{priority-down}, but let's sort | 8241 | for the @kbd{C-c a h} commands to @code{priority-down}, but let's sort |
| @@ -8226,8 +8279,7 @@ a PDF file with also create the postscript file.}, and iCalendar files. If | |||
| 8226 | you want to do this only occasionally, use the command | 8279 | you want to do this only occasionally, use the command |
| 8227 | 8280 | ||
| 8228 | @table @kbd | 8281 | @table @kbd |
| 8229 | @kindex C-x C-w | 8282 | @orgcmd{C-x C-w,org-write-agenda} |
| 8230 | @item C-x C-w | ||
| 8231 | @cindex exporting agenda views | 8283 | @cindex exporting agenda views |
| 8232 | @cindex agenda views, exporting | 8284 | @cindex agenda views, exporting |
| 8233 | @vindex org-agenda-exporter-settings | 8285 | @vindex org-agenda-exporter-settings |
| @@ -8297,8 +8349,7 @@ Instead, there is a special command to produce @emph{all} specified | |||
| 8297 | files in one step: | 8349 | files in one step: |
| 8298 | 8350 | ||
| 8299 | @table @kbd | 8351 | @table @kbd |
| 8300 | @kindex C-c a e | 8352 | @orgcmd{C-c a e,org-store-agenda-views} |
| 8301 | @item C-c a e | ||
| 8302 | Export all agenda views that have export file names associated with | 8353 | Export all agenda views that have export file names associated with |
| 8303 | them. | 8354 | them. |
| 8304 | @end table | 8355 | @end table |
| @@ -8338,7 +8389,7 @@ or, if you need to modify some parameters@footnote{Quoting depends on the | |||
| 8338 | system you use, please check the FAQ for examples.} | 8389 | system you use, please check the FAQ for examples.} |
| 8339 | @example | 8390 | @example |
| 8340 | emacs -eval '(org-batch-store-agenda-views \ | 8391 | emacs -eval '(org-batch-store-agenda-views \ |
| 8341 | org-agenda-ndays 30 \ | 8392 | org-agenda-span month \ |
| 8342 | org-agenda-start-day "2007-11-01" \ | 8393 | org-agenda-start-day "2007-11-01" \ |
| 8343 | org-agenda-include-diary nil \ | 8394 | org-agenda-include-diary nil \ |
| 8344 | org-agenda-files (quote ("~/org/project.org")))' \ | 8395 | org-agenda-files (quote ("~/org/project.org")))' \ |
| @@ -8365,8 +8416,7 @@ quite useful to use column view also from the agenda, where entries are | |||
| 8365 | collected by certain criteria. | 8416 | collected by certain criteria. |
| 8366 | 8417 | ||
| 8367 | @table @kbd | 8418 | @table @kbd |
| 8368 | @kindex C-c C-x C-c | 8419 | @orgcmd{C-c C-x C-c,org-agenda-columns} |
| 8369 | @item C-c C-x C-c | ||
| 8370 | Turn on column view in the agenda. | 8420 | Turn on column view in the agenda. |
| 8371 | @end table | 8421 | @end table |
| 8372 | 8422 | ||
| @@ -8393,7 +8443,7 @@ turning on column view in the agenda will visit all relevant agenda files and | |||
| 8393 | make sure that the computations of this property are up to date. This is | 8443 | make sure that the computations of this property are up to date. This is |
| 8394 | also true for the special @code{CLOCKSUM} property. Org will then sum the | 8444 | also true for the special @code{CLOCKSUM} property. Org will then sum the |
| 8395 | values displayed in the agenda. In the daily/weekly agenda, the sums will | 8445 | values displayed in the agenda. In the daily/weekly agenda, the sums will |
| 8396 | cover a single day, in all other views they cover the entire block. It is | 8446 | cover a single day; in all other views they cover the entire block. It is |
| 8397 | vital to realize that the agenda may show the same entry @emph{twice} (for | 8447 | vital to realize that the agenda may show the same entry @emph{twice} (for |
| 8398 | example as scheduled and as a deadline), and it may show two entries from the | 8448 | example as scheduled and as a deadline), and it may show two entries from the |
| 8399 | same hierarchy (for example a @emph{parent} and its @emph{child}). In these | 8449 | same hierarchy (for example a @emph{parent} and its @emph{child}). In these |
| @@ -8416,7 +8466,7 @@ the agenda). | |||
| 8416 | 8466 | ||
| 8417 | When exporting Org-mode documents, the exporter tries to reflect the | 8467 | When exporting Org-mode documents, the exporter tries to reflect the |
| 8418 | structure of the document as accurately as possible in the backend. Since | 8468 | structure of the document as accurately as possible in the backend. Since |
| 8419 | export targets like HTML, La@TeX{}, or DocBook allow much richer formatting, | 8469 | export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, |
| 8420 | Org-mode has rules on how to prepare text for rich export. This section | 8470 | Org-mode has rules on how to prepare text for rich export. This section |
| 8421 | summarizes the markup rules used in an Org-mode buffer. | 8471 | summarizes the markup rules used in an Org-mode buffer. |
| 8422 | 8472 | ||
| @@ -8512,7 +8562,7 @@ the table of contents entirely, by configuring the variable | |||
| 8512 | 8562 | ||
| 8513 | Org-mode normally exports the text before the first headline, and even uses | 8563 | Org-mode normally exports the text before the first headline, and even uses |
| 8514 | the first line as the document title. The text will be fully marked up. If | 8564 | the first line as the document title. The text will be fully marked up. If |
| 8515 | you need to include literal HTML, La@TeX{}, or DocBook code, use the special | 8565 | you need to include literal HTML, @LaTeX{}, or DocBook code, use the special |
| 8516 | constructs described below in the sections for the individual exporters. | 8566 | constructs described below in the sections for the individual exporters. |
| 8517 | 8567 | ||
| 8518 | @vindex org-export-skip-text-before-1st-heading | 8568 | @vindex org-export-skip-text-before-1st-heading |
| @@ -8605,7 +8655,7 @@ different backends support this to varying degrees. | |||
| 8605 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} | 8655 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} |
| 8606 | and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text | 8656 | and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text |
| 8607 | in the code and verbatim string is not processed for Org-mode specific | 8657 | in the code and verbatim string is not processed for Org-mode specific |
| 8608 | syntax, it is exported verbatim. | 8658 | syntax; it is exported verbatim. |
| 8609 | 8659 | ||
| 8610 | @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements | 8660 | @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements |
| 8611 | @subheading Horizontal rules | 8661 | @subheading Horizontal rules |
| @@ -8653,7 +8703,7 @@ the object with @code{\ref@{tab:basic-data@}}: | |||
| 8653 | @end example | 8703 | @end example |
| 8654 | 8704 | ||
| 8655 | @cindex inlined images, markup rules | 8705 | @cindex inlined images, markup rules |
| 8656 | Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include | 8706 | Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include |
| 8657 | images into the exported document. Org does this, if a link to an image | 8707 | images into the exported document. Org does this, if a link to an image |
| 8658 | files does not have a description part, for example @code{[[./img/a.jpg]]}. | 8708 | files does not have a description part, for example @code{[[./img/a.jpg]]}. |
| 8659 | If you wish to define a caption for the image and maybe a label for internal | 8709 | If you wish to define a caption for the image and maybe a label for internal |
| @@ -8704,7 +8754,7 @@ If the example is source code from a programming language, or any other text | |||
| 8704 | that can be marked up by font-lock in Emacs, you can ask for the example to | 8754 | that can be marked up by font-lock in Emacs, you can ask for the example to |
| 8705 | look like the fontified Emacs buffer@footnote{This works automatically for | 8755 | look like the fontified Emacs buffer@footnote{This works automatically for |
| 8706 | the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, | 8756 | the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, |
| 8707 | which is distributed with Org.) Fontified code chunks in LaTeX can be | 8757 | which is distributed with Org). Fontified code chunks in LaTeX can be |
| 8708 | achieved using either the listings or the | 8758 | achieved using either the listings or the |
| 8709 | @url{http://code.google.com/p/minted, minted,} package. To use listings, turn | 8759 | @url{http://code.google.com/p/minted, minted,} package. To use listings, turn |
| 8710 | on the variable @code{org-export-latex-listings} and ensure that the listings | 8760 | on the variable @code{org-export-latex-listings} and ensure that the listings |
| @@ -8773,7 +8823,7 @@ switching to a temporary buffer with the source code. You need to exit by | |||
| 8773 | pressing @kbd{C-c '} again@footnote{Upon exit, lines starting with @samp{*} | 8823 | pressing @kbd{C-c '} again@footnote{Upon exit, lines starting with @samp{*} |
| 8774 | or @samp{#} will get a comma prepended, to keep them from being interpreted | 8824 | or @samp{#} will get a comma prepended, to keep them from being interpreted |
| 8775 | by Org as outline nodes or special comments. These commas will be stripped | 8825 | by Org as outline nodes or special comments. These commas will be stripped |
| 8776 | for editing with @kbd{C-c '}, and also for export.}, the edited version will | 8826 | for editing with @kbd{C-c '}, and also for export.}. The edited version will |
| 8777 | then replace the old version in the Org buffer. Fixed-width regions | 8827 | then replace the old version in the Org buffer. Fixed-width regions |
| 8778 | (where each line starts with a colon followed by a space) will be edited | 8828 | (where each line starts with a colon followed by a space) will be edited |
| 8779 | using @code{artist-mode}@footnote{You may select a different-mode with the | 8829 | using @code{artist-mode}@footnote{You may select a different-mode with the |
| @@ -8783,7 +8833,7 @@ fixed-width region. | |||
| 8783 | @kindex C-c l | 8833 | @kindex C-c l |
| 8784 | @item C-c l | 8834 | @item C-c l |
| 8785 | Calling @code{org-store-link} while editing a source code example in a | 8835 | Calling @code{org-store-link} while editing a source code example in a |
| 8786 | temporary buffer created with @kbd{C-c '} will prompt for a label, make sure | 8836 | temporary buffer created with @kbd{C-c '} will prompt for a label. Make sure |
| 8787 | that it is unique in the current buffer, and insert it with the proper | 8837 | that it is unique in the current buffer, and insert it with the proper |
| 8788 | formatting like @samp{(ref:label)} at the end of the current line. Then the | 8838 | formatting like @samp{(ref:label)} at the end of the current line. Then the |
| 8789 | label is stored as a link @samp{(label)}, for retrieval with @kbd{C-c C-l}. | 8839 | label is stored as a link @samp{(label)}, for retrieval with @kbd{C-c C-l}. |
| @@ -8804,12 +8854,14 @@ include your @file{.emacs} file, you could use: | |||
| 8804 | @noindent | 8854 | @noindent |
| 8805 | The optional second and third parameter are the markup (e.g. @samp{quote}, | 8855 | The optional second and third parameter are the markup (e.g. @samp{quote}, |
| 8806 | @samp{example}, or @samp{src}), and, if the markup is @samp{src}, the | 8856 | @samp{example}, or @samp{src}), and, if the markup is @samp{src}, the |
| 8807 | language for formatting the contents. The markup is optional, if it is not | 8857 | language for formatting the contents. The markup is optional; if it is not |
| 8808 | given, the text will be assumed to be in Org-mode format and will be | 8858 | given, the text will be assumed to be in Org-mode format and will be |
| 8809 | processed normally. The include line will also allow additional keyword | 8859 | processed normally. The include line will also allow additional keyword |
| 8810 | parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the | 8860 | parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the |
| 8811 | first line and for each following line, as well as any options accepted by | 8861 | first line and for each following line, @code{:minlevel} in order to get |
| 8812 | the selected markup. For example, to include a file as an item, use | 8862 | org-mode content demoted to a specified level, as well as any options |
| 8863 | accepted by the selected markup. For example, to include a file as an item, | ||
| 8864 | use | ||
| 8813 | 8865 | ||
| 8814 | @example | 8866 | @example |
| 8815 | #+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " | 8867 | #+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " |
| @@ -8865,20 +8917,19 @@ construct complex HTML code. | |||
| 8865 | 8917 | ||
| 8866 | 8918 | ||
| 8867 | @node Embedded LaTeX, , Macro replacement, Markup | 8919 | @node Embedded LaTeX, , Macro replacement, Markup |
| 8868 | @section Embedded La@TeX{} | 8920 | @section Embedded @LaTeX{} |
| 8869 | @cindex @TeX{} interpretation | 8921 | @cindex @TeX{} interpretation |
| 8870 | @cindex La@TeX{} interpretation | 8922 | @cindex @LaTeX{} interpretation |
| 8871 | 8923 | ||
| 8872 | Plain ASCII is normally sufficient for almost all note taking. One | 8924 | Plain ASCII is normally sufficient for almost all note taking. Exceptions |
| 8873 | exception, however, are scientific notes which need to be able to contain | 8925 | include scientific notes, which often require mathematical symbols and the |
| 8874 | mathematical symbols and the occasional formula. La@TeX{}@footnote{La@TeX{} | 8926 | occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on |
| 8875 | is a macro system based on Donald E. Knuth's @TeX{} system. Many of the | 8927 | Donald E. Knuth's @TeX{} system. Many of the features described here as |
| 8876 | features described here as ``La@TeX{}'' are really from @TeX{}, but for | 8928 | ``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this |
| 8877 | simplicity I am blurring this distinction.} is widely used to typeset | 8929 | distinction.} is widely used to typeset scientific documents. Org-mode |
| 8878 | scientific documents. Org-mode supports embedding La@TeX{} code into its | 8930 | supports embedding @LaTeX{} code into its files, because many academics are |
| 8879 | files, because many academics are used to writing and reading La@TeX{} source | 8931 | used to writing and reading @LaTeX{} source code, and because it can be |
| 8880 | code, and because it can be readily processed to produce pretty output for a | 8932 | readily processed to produce pretty output for a number of export backends. |
| 8881 | number of export backends. | ||
| 8882 | 8933 | ||
| 8883 | @menu | 8934 | @menu |
| 8884 | * Special symbols:: Greek letters and other symbols | 8935 | * Special symbols:: Greek letters and other symbols |
| @@ -8893,14 +8944,14 @@ number of export backends. | |||
| 8893 | @cindex math symbols | 8944 | @cindex math symbols |
| 8894 | @cindex special symbols | 8945 | @cindex special symbols |
| 8895 | @cindex @TeX{} macros | 8946 | @cindex @TeX{} macros |
| 8896 | @cindex La@TeX{} fragments, markup rules | 8947 | @cindex @LaTeX{} fragments, markup rules |
| 8897 | @cindex HTML entities | 8948 | @cindex HTML entities |
| 8898 | @cindex La@TeX{} entities | 8949 | @cindex @LaTeX{} entities |
| 8899 | 8950 | ||
| 8900 | You can use La@TeX{} macros to insert special symbols like @samp{\alpha} to | 8951 | You can use @LaTeX{} macros to insert special symbols like @samp{\alpha} to |
| 8901 | indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion | 8952 | indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion |
| 8902 | for these macros is available, just type @samp{\} and maybe a few letters, | 8953 | for these macros is available, just type @samp{\} and maybe a few letters, |
| 8903 | and press @kbd{M-@key{TAB}} to see possible completions. Unlike La@TeX{} | 8954 | and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{} |
| 8904 | code, Org-mode allows these macros to be present without surrounding math | 8955 | code, Org-mode allows these macros to be present without surrounding math |
| 8905 | delimiters, for example: | 8956 | delimiters, for example: |
| 8906 | 8957 | ||
| @@ -8911,13 +8962,13 @@ Angles are written as Greek letters \alpha, \beta and \gamma. | |||
| 8911 | @vindex org-entities | 8962 | @vindex org-entities |
| 8912 | During export, these symbols will be transformed into the native format of | 8963 | During export, these symbols will be transformed into the native format of |
| 8913 | the exporter backend. Strings like @code{\alpha} will be exported as | 8964 | the exporter backend. Strings like @code{\alpha} will be exported as |
| 8914 | @code{α} in the HTML output, and as @code{$\alpha$} in the La@TeX{} | 8965 | @code{α} in the HTML output, and as @code{$\alpha$} in the @LaTeX{} |
| 8915 | output. Similarly, @code{\nbsp} will become @code{ } in HTML and | 8966 | output. Similarly, @code{\nbsp} will become @code{ } in HTML and |
| 8916 | @code{~} in La@TeX{}. If you need such a symbol inside a word, terminate it | 8967 | @code{~} in @LaTeX{}. If you need such a symbol inside a word, terminate it |
| 8917 | like this: @samp{\Aacute@{@}stor}. | 8968 | like this: @samp{\Aacute@{@}stor}. |
| 8918 | 8969 | ||
| 8919 | A large number of entities is provided, with names taken from both HTML and | 8970 | A large number of entities is provided, with names taken from both HTML and |
| 8920 | La@TeX{}, see the variable @code{org-entities} for the complete list. | 8971 | @LaTeX{}; see the variable @code{org-entities} for the complete list. |
| 8921 | @samp{\-} is treated as a shy hyphen, and @samp{--}, @samp{---}, and | 8972 | @samp{\-} is treated as a shy hyphen, and @samp{--}, @samp{---}, and |
| 8922 | @samp{...} are all converted into special commands creating hyphens of | 8973 | @samp{...} are all converted into special commands creating hyphens of |
| 8923 | different lengths or a compact set of dots. | 8974 | different lengths or a compact set of dots. |
| @@ -8930,8 +8981,8 @@ variable @code{org-pretty-entities}, or on a per-file base with the | |||
| 8930 | @table @kbd | 8981 | @table @kbd |
| 8931 | @kindex C-c C-x \ | 8982 | @kindex C-c C-x \ |
| 8932 | @item C-c C-x \ | 8983 | @item C-c C-x \ |
| 8933 | Toggle display of entities as UTF8 characters. This does not change the | 8984 | Toggle display of entities as UTF-8 characters. This does not change the |
| 8934 | buffer content which remains plain ASCII, but it overlays the UTF8 character | 8985 | buffer content which remains plain ASCII, but it overlays the UTF-8 character |
| 8935 | for display purposes only. | 8986 | for display purposes only. |
| 8936 | @end table | 8987 | @end table |
| 8937 | 8988 | ||
| @@ -8940,14 +8991,14 @@ for display purposes only. | |||
| 8940 | @cindex subscript | 8991 | @cindex subscript |
| 8941 | @cindex superscript | 8992 | @cindex superscript |
| 8942 | 8993 | ||
| 8943 | Just like in La@TeX{}, @samp{^} and @samp{_} are used to indicate super- | 8994 | Just like in @LaTeX{}, @samp{^} and @samp{_} are used to indicate super- |
| 8944 | and subscripts. Again, these can be used without embedding them in | 8995 | and subscripts. Again, these can be used without embedding them in |
| 8945 | math-mode delimiters. To increase the readability of ASCII text, it is | 8996 | math-mode delimiters. To increase the readability of ASCII text, it is |
| 8946 | not necessary (but OK) to surround multi-character sub- and superscripts | 8997 | not necessary (but OK) to surround multi-character sub- and superscripts |
| 8947 | with curly braces. For example | 8998 | with curly braces. For example |
| 8948 | 8999 | ||
| 8949 | @example | 9000 | @example |
| 8950 | The mass if the sun is M_sun = 1.989 x 10^30 kg. The radius of | 9001 | The mass of the sun is M_sun = 1.989 x 10^30 kg. The radius of |
| 8951 | the sun is R_@{sun@} = 6.96 x 10^8 m. | 9002 | the sun is R_@{sun@} = 6.96 x 10^8 m. |
| 8952 | @end example | 9003 | @end example |
| 8953 | 9004 | ||
| @@ -8969,42 +9020,43 @@ subscript, but @samp{a_@{b@}} will. | |||
| 8969 | @table @kbd | 9020 | @table @kbd |
| 8970 | @kindex C-c C-x \ | 9021 | @kindex C-c C-x \ |
| 8971 | @item C-c C-x \ | 9022 | @item C-c C-x \ |
| 8972 | In addition to showing entities as UTF8 characters, this command will also | 9023 | In addition to showing entities as UTF-8 characters, this command will also |
| 8973 | format sub- and superscripts in a WYSIWYM way. | 9024 | format sub- and superscripts in a WYSIWYM way. |
| 8974 | @end table | 9025 | @end table |
| 8975 | 9026 | ||
| 8976 | @node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX | 9027 | @node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX |
| 8977 | @subsection La@TeX{} fragments | 9028 | @subsection @LaTeX{} fragments |
| 8978 | @cindex La@TeX{} fragments | 9029 | @cindex @LaTeX{} fragments |
| 8979 | 9030 | ||
| 8980 | @vindex org-format-latex-header | 9031 | @vindex org-format-latex-header |
| 8981 | Going beyond symbols and sub- and superscripts, a full formula language is | 9032 | Going beyond symbols and sub- and superscripts, a full formula language is |
| 8982 | needed. Org-mode can contain La@TeX{} math fragments, and it supports ways | 9033 | needed. Org-mode can contain @LaTeX{} math fragments, and it supports ways |
| 8983 | to process these for several export backends. When exporting to La@TeX{}, | 9034 | to process these for several export backends. When exporting to @LaTeX{}, |
| 8984 | the code is obviously left as it is. When exporting to HTML, Org invokes the | 9035 | the code is obviously left as it is. When exporting to HTML, Org invokes the |
| 8985 | @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in | 9036 | @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in |
| 8986 | HTML export}) to process and display the math@footnote{If you plan to use | 9037 | HTML export}) to process and display the math@footnote{If you plan to use |
| 8987 | this regularly or on pages with significant page views, you should install | 9038 | this regularly or on pages with significant page views, you should install |
| 8988 | @file{MathJax} on your own server in order to limit the load of our server.}. | 9039 | @file{MathJax} on your own |
| 8989 | Finally, it can also process the mathematical expressions into | 9040 | server in order to limit the load of our server.}. Finally, it can also |
| 8990 | images@footnote{For this to work you need to be on a system with a working | 9041 | process the mathematical expressions into images@footnote{For this to work |
| 8991 | La@TeX{} installation. You also need the @file{dvipng} program, available at | 9042 | you need to be on a system with a working @LaTeX{} installation. You also |
| 8992 | @url{http://sourceforge.net/projects/dvipng/}. The La@TeX{} header that will | 9043 | need the @file{dvipng} program, available at |
| 9044 | @url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will | ||
| 8993 | be used when processing a fragment can be configured with the variable | 9045 | be used when processing a fragment can be configured with the variable |
| 8994 | @code{org-format-latex-header}.} that can be displayed in a browser or in | 9046 | @code{org-format-latex-header}.} that can be displayed in a browser or in |
| 8995 | DocBook documents. | 9047 | DocBook documents. |
| 8996 | 9048 | ||
| 8997 | La@TeX{} fragments don't need any special marking at all. The following | 9049 | @LaTeX{} fragments don't need any special marking at all. The following |
| 8998 | snippets will be identified as La@TeX{} source code: | 9050 | snippets will be identified as @LaTeX{} source code: |
| 8999 | @itemize @bullet | 9051 | @itemize @bullet |
| 9000 | @item | 9052 | @item |
| 9001 | Environments of any kind@footnote{When @file{MathJax} is used, only the | 9053 | Environments of any kind@footnote{When @file{MathJax} is used, only the |
| 9002 | environment recognized by @file{MathJax} will be processed. When dvipng is | 9054 | environment recognized by @file{MathJax} will be processed. When |
| 9003 | used to create images, any La@TeX{} environments will be handled.}. The only | 9055 | @file{dvipng} is used to create images, any @LaTeX{} environments will be |
| 9004 | requirement is that the @code{\begin} statement appears on a new line, | 9056 | handled.}. The only requirement is that the @code{\begin} statement appears |
| 9005 | preceded by only whitespace. | 9057 | on a new line, preceded by only whitespace. |
| 9006 | @item | 9058 | @item |
| 9007 | Text within the usual La@TeX{} math delimiters. To avoid conflicts with | 9059 | Text within the usual @LaTeX{} math delimiters. To avoid conflicts with |
| 9008 | currency specifications, single @samp{$} characters are only recognized as | 9060 | currency specifications, single @samp{$} characters are only recognized as |
| 9009 | math delimiters if the enclosed text contains at most two line breaks, is | 9061 | math delimiters if the enclosed text contains at most two line breaks, is |
| 9010 | directly attached to the @samp{$} characters with no whitespace in between, | 9062 | directly attached to the @samp{$} characters with no whitespace in between, |
| @@ -9028,7 +9080,7 @@ either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \]. | |||
| 9028 | @vindex org-format-latex-options | 9080 | @vindex org-format-latex-options |
| 9029 | If you need any of the delimiter ASCII sequences for other purposes, you | 9081 | If you need any of the delimiter ASCII sequences for other purposes, you |
| 9030 | can configure the option @code{org-format-latex-options} to deselect the | 9082 | can configure the option @code{org-format-latex-options} to deselect the |
| 9031 | ones you do not wish to have interpreted by the La@TeX{} converter. | 9083 | ones you do not wish to have interpreted by the @LaTeX{} converter. |
| 9032 | 9084 | ||
| 9033 | @vindex org-export-with-LaTeX-fragments | 9085 | @vindex org-export-with-LaTeX-fragments |
| 9034 | LaTeX processing can be configured with the variable | 9086 | LaTeX processing can be configured with the variable |
| @@ -9040,7 +9092,7 @@ of these lines: | |||
| 9040 | @example | 9092 | @example |
| 9041 | #+OPTIONS: LaTeX:t @r{Do the right thing automatically (MathJax)} | 9093 | #+OPTIONS: LaTeX:t @r{Do the right thing automatically (MathJax)} |
| 9042 | #+OPTIONS: LaTeX:dvipng @r{Force using dvipng images} | 9094 | #+OPTIONS: LaTeX:dvipng @r{Force using dvipng images} |
| 9043 | #+OPTIONS: LaTeX:nil @r{Do not process La@TeX{} fragments at all} | 9095 | #+OPTIONS: LaTeX:nil @r{Do not process @LaTeX{} fragments at all} |
| 9044 | #+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} | 9096 | #+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} |
| 9045 | @end example | 9097 | @end example |
| 9046 | 9098 | ||
| @@ -9048,13 +9100,13 @@ of these lines: | |||
| 9048 | @subsection Previewing LaTeX fragments | 9100 | @subsection Previewing LaTeX fragments |
| 9049 | @cindex LaTeX fragments, preview | 9101 | @cindex LaTeX fragments, preview |
| 9050 | 9102 | ||
| 9051 | If you have @file{dvipng} installed, La@TeX{} fragments can be processed to | 9103 | If you have @file{dvipng} installed, @LaTeX{} fragments can be processed to |
| 9052 | produce preview images of the typeset expressions: | 9104 | produce preview images of the typeset expressions: |
| 9053 | 9105 | ||
| 9054 | @table @kbd | 9106 | @table @kbd |
| 9055 | @kindex C-c C-x C-l | 9107 | @kindex C-c C-x C-l |
| 9056 | @item C-c C-x C-l | 9108 | @item C-c C-x C-l |
| 9057 | Produce a preview image of the La@TeX{} fragment at point and overlay it | 9109 | Produce a preview image of the @LaTeX{} fragment at point and overlay it |
| 9058 | over the source code. If there is no fragment at point, process all | 9110 | over the source code. If there is no fragment at point, process all |
| 9059 | fragments in the current entry (between two headlines). When called | 9111 | fragments in the current entry (between two headlines). When called |
| 9060 | with a prefix argument, process the entire subtree. When called with | 9112 | with a prefix argument, process the entire subtree. When called with |
| @@ -9076,7 +9128,7 @@ preview images. | |||
| 9076 | @cindex CDLa@TeX{} | 9128 | @cindex CDLa@TeX{} |
| 9077 | 9129 | ||
| 9078 | CDLa@TeX{} mode is a minor mode that is normally used in combination with a | 9130 | CDLa@TeX{} mode is a minor mode that is normally used in combination with a |
| 9079 | major La@TeX{} mode like AUC@TeX{} in order to speed-up insertion of | 9131 | major @LaTeX{} mode like AUC@TeX{} in order to speed-up insertion of |
| 9080 | environments and math templates. Inside Org-mode, you can make use of | 9132 | environments and math templates. Inside Org-mode, you can make use of |
| 9081 | some of the features of CDLa@TeX{} mode. You need to install | 9133 | some of the features of CDLa@TeX{} mode. You need to install |
| 9082 | @file{cdlatex.el} and @file{texmathp.el} (the latter comes also with | 9134 | @file{cdlatex.el} and @file{texmathp.el} (the latter comes also with |
| @@ -9099,7 +9151,7 @@ Environment templates can be inserted with @kbd{C-c @{}. | |||
| 9099 | @item | 9151 | @item |
| 9100 | @kindex @key{TAB} | 9152 | @kindex @key{TAB} |
| 9101 | The @key{TAB} key will do template expansion if the cursor is inside a | 9153 | The @key{TAB} key will do template expansion if the cursor is inside a |
| 9102 | La@TeX{} fragment@footnote{Org-mode has a method to test if the cursor is | 9154 | @LaTeX{} fragment@footnote{Org-mode has a method to test if the cursor is |
| 9103 | inside such a fragment, see the documentation of the function | 9155 | inside such a fragment, see the documentation of the function |
| 9104 | @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will | 9156 | @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will |
| 9105 | expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor | 9157 | expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor |
| @@ -9113,7 +9165,7 @@ To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}. | |||
| 9113 | @kindex _ | 9165 | @kindex _ |
| 9114 | @kindex ^ | 9166 | @kindex ^ |
| 9115 | @vindex cdlatex-simplify-sub-super-scripts | 9167 | @vindex cdlatex-simplify-sub-super-scripts |
| 9116 | Pressing @kbd{_} and @kbd{^} inside a La@TeX{} fragment will insert these | 9168 | Pressing @kbd{_} and @kbd{^} inside a @LaTeX{} fragment will insert these |
| 9117 | characters together with a pair of braces. If you use @key{TAB} to move | 9169 | characters together with a pair of braces. If you use @key{TAB} to move |
| 9118 | out of the braces, and if the braces surround only a single character or | 9170 | out of the braces, and if the braces surround only a single character or |
| 9119 | macro, they are removed again (depending on the variable | 9171 | macro, they are removed again (depending on the variable |
| @@ -9121,14 +9173,14 @@ macro, they are removed again (depending on the variable | |||
| 9121 | @item | 9173 | @item |
| 9122 | @kindex ` | 9174 | @kindex ` |
| 9123 | Pressing the backquote @kbd{`} followed by a character inserts math | 9175 | Pressing the backquote @kbd{`} followed by a character inserts math |
| 9124 | macros, also outside La@TeX{} fragments. If you wait more than 1.5 seconds | 9176 | macros, also outside @LaTeX{} fragments. If you wait more than 1.5 seconds |
| 9125 | after the backquote, a help window will pop up. | 9177 | after the backquote, a help window will pop up. |
| 9126 | @item | 9178 | @item |
| 9127 | @kindex ' | 9179 | @kindex ' |
| 9128 | Pressing the single-quote @kbd{'} followed by another character modifies | 9180 | Pressing the single-quote @kbd{'} followed by another character modifies |
| 9129 | the symbol before point with an accent or a font. If you wait more than | 9181 | the symbol before point with an accent or a font. If you wait more than |
| 9130 | 1.5 seconds after the backquote, a help window will pop up. Character | 9182 | 1.5 seconds after the single-quote, a help window will pop up. Character |
| 9131 | modification will work only inside La@TeX{} fragments, outside the quote | 9183 | modification will work only inside @LaTeX{} fragments; outside the quote |
| 9132 | is normal. | 9184 | is normal. |
| 9133 | @end itemize | 9185 | @end itemize |
| 9134 | 9186 | ||
| @@ -9140,8 +9192,8 @@ Org-mode documents can be exported into a variety of other formats. For | |||
| 9140 | printing and sharing of notes, ASCII export produces a readable and simple | 9192 | printing and sharing of notes, ASCII export produces a readable and simple |
| 9141 | version of an Org file. HTML export allows you to publish a notes file on | 9193 | version of an Org file. HTML export allows you to publish a notes file on |
| 9142 | the web, while the XOXO format provides a solid base for exchange with a | 9194 | the web, while the XOXO format provides a solid base for exchange with a |
| 9143 | broad range of other applications. La@TeX{} export lets you use Org-mode and | 9195 | broad range of other applications. @LaTeX{} export lets you use Org-mode and |
| 9144 | its structured editing functions to easily create La@TeX{} files. DocBook | 9196 | its structured editing functions to easily create @LaTeX{} files. DocBook |
| 9145 | export makes it possible to convert Org files to many other formats using | 9197 | export makes it possible to convert Org files to many other formats using |
| 9146 | DocBook tools. For project management you can create gantt and resource | 9198 | DocBook tools. For project management you can create gantt and resource |
| 9147 | charts by using TaskJuggler export. To incorporate entries with associated | 9199 | charts by using TaskJuggler export. To incorporate entries with associated |
| @@ -9158,7 +9210,7 @@ enabled (default in Emacs 23). | |||
| 9158 | * The export dispatcher:: How to access exporter commands | 9210 | * The export dispatcher:: How to access exporter commands |
| 9159 | * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding | 9211 | * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding |
| 9160 | * HTML export:: Exporting to HTML | 9212 | * HTML export:: Exporting to HTML |
| 9161 | * LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF | 9213 | * LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF |
| 9162 | * DocBook export:: Exporting to DocBook | 9214 | * DocBook export:: Exporting to DocBook |
| 9163 | * TaskJuggler export:: Exporting to TaskJuggler | 9215 | * TaskJuggler export:: Exporting to TaskJuggler |
| 9164 | * Freemind export:: Exporting to Freemind mind maps | 9216 | * Freemind export:: Exporting to Freemind mind maps |
| @@ -9205,8 +9257,7 @@ In particular, note that you can place commonly-used (export) options in | |||
| 9205 | a separate file which can be included using @code{#+SETUPFILE}. | 9257 | a separate file which can be included using @code{#+SETUPFILE}. |
| 9206 | 9258 | ||
| 9207 | @table @kbd | 9259 | @table @kbd |
| 9208 | @kindex C-c C-e t | 9260 | @orgcmd{C-c C-e t,org-insert-export-options-template} |
| 9209 | @item C-c C-e t | ||
| 9210 | Insert template with export options, see example below. | 9261 | Insert template with export options, see example below. |
| 9211 | @end table | 9262 | @end table |
| 9212 | 9263 | ||
| @@ -9232,7 +9283,7 @@ Insert template with export options, see example below. | |||
| 9232 | @example | 9283 | @example |
| 9233 | #+TITLE: the title to be shown (default is the buffer name) | 9284 | #+TITLE: the title to be shown (default is the buffer name) |
| 9234 | #+AUTHOR: the author (default taken from @code{user-full-name}) | 9285 | #+AUTHOR: the author (default taken from @code{user-full-name}) |
| 9235 | #+DATE: a date, fixed, of a format string for @code{format-time-string} | 9286 | #+DATE: a date, fixed, or a format string for @code{format-time-string} |
| 9236 | #+EMAIL: his/her email address (default from @code{user-mail-address}) | 9287 | #+EMAIL: his/her email address (default from @code{user-mail-address}) |
| 9237 | #+DESCRIPTION: the page description, e.g. for the XHTML meta tag | 9288 | #+DESCRIPTION: the page description, e.g. for the XHTML meta tag |
| 9238 | #+KEYWORDS: the page keywords, e.g. for the XHTML meta tag | 9289 | #+KEYWORDS: the page keywords, e.g. for the XHTML meta tag |
| @@ -9252,8 +9303,8 @@ Insert template with export options, see example below. | |||
| 9252 | 9303 | ||
| 9253 | @noindent | 9304 | @noindent |
| 9254 | The OPTIONS line is a compact@footnote{If you want to configure many options | 9305 | The OPTIONS line is a compact@footnote{If you want to configure many options |
| 9255 | this way, you can use several OPTIONS lines.} form to specify export settings. Here | 9306 | this way, you can use several OPTIONS lines.} form to specify export |
| 9256 | you can: | 9307 | settings. Here you can: |
| 9257 | @cindex headline levels | 9308 | @cindex headline levels |
| 9258 | @cindex section-numbers | 9309 | @cindex section-numbers |
| 9259 | @cindex table of contents | 9310 | @cindex table of contents |
| @@ -9266,7 +9317,7 @@ you can: | |||
| 9266 | @cindex special strings | 9317 | @cindex special strings |
| 9267 | @cindex emphasized text | 9318 | @cindex emphasized text |
| 9268 | @cindex @TeX{} macros | 9319 | @cindex @TeX{} macros |
| 9269 | @cindex La@TeX{} fragments | 9320 | @cindex @LaTeX{} fragments |
| 9270 | @cindex author info, in export | 9321 | @cindex author info, in export |
| 9271 | @cindex time info, in export | 9322 | @cindex time info, in export |
| 9272 | @example | 9323 | @example |
| @@ -9288,7 +9339,7 @@ tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} | |||
| 9288 | <: @r{turn on/off inclusion of any time/date stamps like DEADLINES} | 9339 | <: @r{turn on/off inclusion of any time/date stamps like DEADLINES} |
| 9289 | *: @r{turn on/off emphasized text (bold, italic, underlined)} | 9340 | *: @r{turn on/off emphasized text (bold, italic, underlined)} |
| 9290 | TeX: @r{turn on/off simple @TeX{} macros in plain text} | 9341 | TeX: @r{turn on/off simple @TeX{} macros in plain text} |
| 9291 | LaTeX: @r{configure export of La@TeX{} fragments. Default @code{auto}} | 9342 | LaTeX: @r{configure export of @LaTeX{} fragments. Default @code{auto}} |
| 9292 | skip: @r{turn on/off skipping the text before the first heading} | 9343 | skip: @r{turn on/off skipping the text before the first heading} |
| 9293 | author: @r{turn on/off inclusion of author name/email into exported file} | 9344 | author: @r{turn on/off inclusion of author name/email into exported file} |
| 9294 | email: @r{turn on/off inclusion of author email into exported file} | 9345 | email: @r{turn on/off inclusion of author email into exported file} |
| @@ -9297,9 +9348,12 @@ timestamp: @r{turn on/off inclusion creation time into exported file} | |||
| 9297 | d: @r{turn on/off inclusion of drawers} | 9348 | d: @r{turn on/off inclusion of drawers} |
| 9298 | @end example | 9349 | @end example |
| 9299 | @noindent | 9350 | @noindent |
| 9300 | These options take effect in both the HTML and La@TeX{} export, except | 9351 | These options take effect in both the HTML and @LaTeX{} export, except for |
| 9301 | for @code{TeX} and @code{LaTeX}, which are respectively @code{t} and | 9352 | @code{TeX} and @code{LaTeX}, which are respectively @code{t} and @code{nil} |
| 9302 | @code{nil} for the La@TeX{} export. | 9353 | for the @LaTeX{} export. The default values for these and many other options |
| 9354 | are given by a set of variables. For a list of such variables, the | ||
| 9355 | corresponding OPTIONS keys and also the publishing keys (@pxref{Project | ||
| 9356 | alist}), see the constant @code{org-export-plist-vars}. | ||
| 9303 | 9357 | ||
| 9304 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before | 9358 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before |
| 9305 | calling an export command, the subtree can overrule some of the file's export | 9359 | calling an export command, the subtree can overrule some of the file's export |
| @@ -9318,8 +9372,7 @@ contains one outline tree, the first heading is used as document title and | |||
| 9318 | the subtrees are exported. | 9372 | the subtrees are exported. |
| 9319 | 9373 | ||
| 9320 | @table @kbd | 9374 | @table @kbd |
| 9321 | @kindex C-c C-e | 9375 | @orgcmd{C-c C-e,org-export} |
| 9322 | @item C-c C-e | ||
| 9323 | @vindex org-export-run-in-background | 9376 | @vindex org-export-run-in-background |
| 9324 | Dispatcher for export and publishing commands. Displays a help-window | 9377 | Dispatcher for export and publishing commands. Displays a help-window |
| 9325 | listing the additional key(s) needed to launch an export or publishing | 9378 | listing the additional key(s) needed to launch an export or publishing |
| @@ -9327,14 +9380,12 @@ command. The prefix arg is passed through to the exporter. A double prefix | |||
| 9327 | @kbd{C-u C-u} causes most commands to be executed in the background, in a | 9380 | @kbd{C-u C-u} causes most commands to be executed in the background, in a |
| 9328 | separate Emacs process@footnote{To make this behavior the default, customize | 9381 | separate Emacs process@footnote{To make this behavior the default, customize |
| 9329 | the variable @code{org-export-run-in-background}.}. | 9382 | the variable @code{org-export-run-in-background}.}. |
| 9330 | @kindex C-c C-e v | 9383 | @orgcmd{C-c C-e v,org-export-visible} |
| 9331 | @item C-c C-e v | ||
| 9332 | Like @kbd{C-c C-e}, but only export the text that is currently visible | 9384 | Like @kbd{C-c C-e}, but only export the text that is currently visible |
| 9333 | (i.e. not hidden by outline visibility). | 9385 | (i.e. not hidden by outline visibility). |
| 9334 | @kindex C-u C-u C-c C-e | 9386 | @orgcmd{C-u C-u C-c C-e,org-export} |
| 9335 | @item C-u C-u C-c C-e | ||
| 9336 | @vindex org-export-run-in-background | 9387 | @vindex org-export-run-in-background |
| 9337 | Call an the exporter, but reverse the setting of | 9388 | Call the exporter, but reverse the setting of |
| 9338 | @code{org-export-run-in-background}, i.e. request background processing if | 9389 | @code{org-export-run-in-background}, i.e. request background processing if |
| 9339 | not set, or force processing in the current Emacs process if set. | 9390 | not set, or force processing in the current Emacs process if set. |
| 9340 | @end table | 9391 | @end table |
| @@ -9353,8 +9404,7 @@ with special characters and symbols available in these encodings. | |||
| 9353 | @cindex active region | 9404 | @cindex active region |
| 9354 | @cindex transient-mark-mode | 9405 | @cindex transient-mark-mode |
| 9355 | @table @kbd | 9406 | @table @kbd |
| 9356 | @kindex C-c C-e a | 9407 | @orgcmd{C-c C-e a,org-export-as-ascii} |
| 9357 | @item C-c C-e a | ||
| 9358 | @cindex property, EXPORT_FILE_NAME | 9408 | @cindex property, EXPORT_FILE_NAME |
| 9359 | Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file | 9409 | Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file |
| 9360 | will be @file{myfile.txt}. The file will be overwritten without | 9410 | will be @file{myfile.txt}. The file will be overwritten without |
| @@ -9365,21 +9415,15 @@ current subtree, use @kbd{C-c @@}.}, the tree head will | |||
| 9365 | become the document title. If the tree head entry has or inherits an | 9415 | become the document title. If the tree head entry has or inherits an |
| 9366 | @code{EXPORT_FILE_NAME} property, that name will be used for the | 9416 | @code{EXPORT_FILE_NAME} property, that name will be used for the |
| 9367 | export. | 9417 | export. |
| 9368 | @kindex C-c C-e A | 9418 | @orgcmd{C-c C-e A,org-export-as-ascii-to-buffer} |
| 9369 | @item C-c C-e A | 9419 | Export to a temporary buffer. Do not create a file. |
| 9370 | Export to a temporary buffer, do not create a file. | 9420 | @orgcmd{C-c C-e n,org-export-as-latin1} |
| 9371 | @kindex C-c C-e n | 9421 | @xorgcmd{C-c C-e N,org-export-as-latin1-to-buffer} |
| 9372 | @kindex C-c C-e N | ||
| 9373 | @item C-c C-e n @ @ @r{and} @ @ C-c C-e N | ||
| 9374 | Like the above commands, but use Latin-1 encoding. | 9422 | Like the above commands, but use Latin-1 encoding. |
| 9375 | @kindex C-c C-e u | 9423 | @orgcmd{C-c C-e u,org-export-as-utf8} |
| 9376 | @kindex C-c C-e U | 9424 | @xorgcmd{C-c C-e U,org-export-as-utf8-to-buffer} |
| 9377 | @item C-c C-e u @ @ @r{and} @ @ C-c C-e U | ||
| 9378 | Like the above commands, but use UTF-8 encoding. | 9425 | Like the above commands, but use UTF-8 encoding. |
| 9379 | @kindex C-c C-e v a | 9426 | @item C-c C-e v a/n/u |
| 9380 | @kindex C-c C-e v n | ||
| 9381 | @kindex C-c C-e v u | ||
| 9382 | @item C-c C-e v a @ @ @r{and} @ @ C-c C-e v n @ @ @r{and} @ @ C-c C-e v u | ||
| 9383 | Export only the visible part of the document. | 9427 | Export only the visible part of the document. |
| 9384 | @end table | 9428 | @end table |
| 9385 | 9429 | ||
| @@ -9434,8 +9478,7 @@ language, but with additional support for tables. | |||
| 9434 | @cindex active region | 9478 | @cindex active region |
| 9435 | @cindex transient-mark-mode | 9479 | @cindex transient-mark-mode |
| 9436 | @table @kbd | 9480 | @table @kbd |
| 9437 | @kindex C-c C-e h | 9481 | @orgcmd{C-c C-e h,org-export-as-html} |
| 9438 | @item C-c C-e h | ||
| 9439 | @cindex property, EXPORT_FILE_NAME | 9482 | @cindex property, EXPORT_FILE_NAME |
| 9440 | Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, | 9483 | Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, |
| 9441 | the ASCII file will be @file{myfile.html}. The file will be overwritten | 9484 | the ASCII file will be @file{myfile.html}. The file will be overwritten |
| @@ -9445,25 +9488,15 @@ exported. If the selected region is a single tree@footnote{To select the | |||
| 9445 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 9488 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9446 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} | 9489 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} |
| 9447 | property, that name will be used for the export. | 9490 | property, that name will be used for the export. |
| 9448 | @kindex C-c C-e b | 9491 | @orgcmd{C-c C-e b,org-export-as-html-and-open} |
| 9449 | @item C-c C-e b | ||
| 9450 | Export as HTML file and immediately open it with a browser. | 9492 | Export as HTML file and immediately open it with a browser. |
| 9451 | @kindex C-c C-e H | 9493 | @orgcmd{C-c C-e H,org-export-as-html-to-buffer} |
| 9452 | @item C-c C-e H | 9494 | Export to a temporary buffer. Do not create a file. |
| 9453 | Export to a temporary buffer, do not create a file. | 9495 | @orgcmd{C-c C-e R,org-export-region-as-html} |
| 9454 | @kindex C-c C-e R | ||
| 9455 | @item C-c C-e R | ||
| 9456 | Export the active region to a temporary buffer. With a prefix argument, do | 9496 | Export the active region to a temporary buffer. With a prefix argument, do |
| 9457 | not produce the file header and footer, but just the plain HTML section for | 9497 | not produce the file header and footer, but just the plain HTML section for |
| 9458 | the region. This is good for cut-and-paste operations. | 9498 | the region. This is good for cut-and-paste operations. |
| 9459 | @kindex C-c C-e v h | 9499 | @item C-c C-e v h/b/H/R |
| 9460 | @kindex C-c C-e v b | ||
| 9461 | @kindex C-c C-e v H | ||
| 9462 | @kindex C-c C-e v R | ||
| 9463 | @item C-c C-e v h | ||
| 9464 | @item C-c C-e v b | ||
| 9465 | @item C-c C-e v H | ||
| 9466 | @item C-c C-e v R | ||
| 9467 | Export only the visible part of the document. | 9500 | Export only the visible part of the document. |
| 9468 | @item M-x org-export-region-as-html | 9501 | @item M-x org-export-region-as-html |
| 9469 | Convert the region to HTML under the assumption that it was Org-mode | 9502 | Convert the region to HTML under the assumption that it was Org-mode |
| @@ -9599,16 +9632,18 @@ and you could use @code{http} addresses just as well. | |||
| 9599 | @cindex MathJax | 9632 | @cindex MathJax |
| 9600 | @cindex dvipng | 9633 | @cindex dvipng |
| 9601 | 9634 | ||
| 9602 | La@TeX{} math snippets (@pxref{LaTeX fragments}) can be displayed in two | 9635 | @LaTeX{} math snippets (@pxref{LaTeX fragments}) can be displayed in two |
| 9603 | different ways on HTML pages. The default is to use the | 9636 | different ways on HTML pages. The default is to use the |
| 9604 | @uref{http://www.mathjax.org, MathJax system} which should work out of the | 9637 | @uref{http://www.mathjax.org, MathJax system} which should work out of the |
| 9605 | box with Org mode installation because @code{http://orgmode.org} serves | 9638 | box with Org mode installation because @code{http://orgmode.org} serves |
| 9606 | @file{MathJax} for Org-mode users for small applications and for testing | 9639 | @file{MathJax} for Org-mode users for small applications and for testing |
| 9607 | purposes. @b{If you plan to use this regularly or on pages with significant | 9640 | purposes. @b{If you plan to use this regularly or on pages with significant |
| 9608 | page views, you should install MathJax on your own server in order to limit | 9641 | page views, you should install@footnote{Installation instructions can be |
| 9609 | the load of our server.} To configure @file{MathJax}, use the variable | 9642 | found on the MathJax website, see |
| 9610 | @code{org-export-html-mathjax-options} or insert something like the following | 9643 | @uref{http://www.mathjax.org/resources/docs/?installation.html}.} MathJax on |
| 9611 | into the buffer: | 9644 | your own server in order to limit the load of our server.} To configure |
| 9645 | @file{MathJax}, use the variable @code{org-export-html-mathjax-options} or | ||
| 9646 | insert something like the following into the buffer: | ||
| 9612 | 9647 | ||
| 9613 | @example | 9648 | @example |
| 9614 | #+MATHJAX: align:"left" mathml:t path:"/MathJax/MathJax.js" | 9649 | #+MATHJAX: align:"left" mathml:t path:"/MathJax/MathJax.js" |
| @@ -9618,11 +9653,11 @@ into the buffer: | |||
| 9618 | @code{org-export-html-mathjax-options} for the meaning of the parameters in | 9653 | @code{org-export-html-mathjax-options} for the meaning of the parameters in |
| 9619 | this line. | 9654 | this line. |
| 9620 | 9655 | ||
| 9621 | If you prefer, you can also request that La@TeX{} are processed into small | 9656 | If you prefer, you can also request that @LaTeX{} fragments are processed |
| 9622 | images that will be inserted into the browser page. Before the availability | 9657 | into small images that will be inserted into the browser page. Before the |
| 9623 | of MathJax, this was the default method for Org files. This method requires | 9658 | availability of MathJax, this was the default method for Org files. This |
| 9624 | that the @file{dvipng} program is available on your system. You can still | 9659 | method requires that the @file{dvipng} program is available on your system. |
| 9625 | get this processing with | 9660 | You can still get this processing with |
| 9626 | 9661 | ||
| 9627 | @example | 9662 | @example |
| 9628 | #+OPTIONS: LaTeX:dvipng | 9663 | #+OPTIONS: LaTeX:dvipng |
| @@ -9705,7 +9740,7 @@ inclusion of these defaults off, customize | |||
| 9705 | @code{org-export-html-style-include-default}}. You may overwrite these | 9740 | @code{org-export-html-style-include-default}}. You may overwrite these |
| 9706 | settings, or add to them by using the variables @code{org-export-html-style} | 9741 | settings, or add to them by using the variables @code{org-export-html-style} |
| 9707 | (for Org-wide settings) and @code{org-export-html-style-extra} (for more | 9742 | (for Org-wide settings) and @code{org-export-html-style-extra} (for more |
| 9708 | granular settings, like file-local settings). To set the latter variable | 9743 | fine-grained settings, like file-local settings). To set the latter variable |
| 9709 | individually for each file, you can use | 9744 | individually for each file, you can use |
| 9710 | 9745 | ||
| 9711 | @cindex #+STYLE | 9746 | @cindex #+STYLE |
| @@ -9773,11 +9808,11 @@ sdepth: @r{Maximum headline level that will still become an independent} | |||
| 9773 | @r{@code{org-export-headline-levels} (= the @code{H} switch in @code{#+OPTIONS}).} | 9808 | @r{@code{org-export-headline-levels} (= the @code{H} switch in @code{#+OPTIONS}).} |
| 9774 | @r{If this is smaller than in @code{org-export-headline-levels}, each} | 9809 | @r{If this is smaller than in @code{org-export-headline-levels}, each} |
| 9775 | @r{info/folding section can still contain child headlines.} | 9810 | @r{info/folding section can still contain child headlines.} |
| 9776 | toc: @r{Should the table of content @emph{initially} be visible?} | 9811 | toc: @r{Should the table of contents @emph{initially} be visible?} |
| 9777 | @r{Even when @code{nil}, you can always get to the "toc" with @kbd{i}.} | 9812 | @r{Even when @code{nil}, you can always get to the "toc" with @kbd{i}.} |
| 9778 | tdepth: @r{The depth of the table of contents. The defaults are taken from} | 9813 | tdepth: @r{The depth of the table of contents. The defaults are taken from} |
| 9779 | @r{the variables @code{org-export-headline-levels} and @code{org-export-with-toc}.} | 9814 | @r{the variables @code{org-export-headline-levels} and @code{org-export-with-toc}.} |
| 9780 | ftoc: @r{Does the css of the page specify a fixed position for the "toc"?} | 9815 | ftoc: @r{Does the CSS of the page specify a fixed position for the "toc"?} |
| 9781 | @r{If yes, the toc will never be displayed as a section.} | 9816 | @r{If yes, the toc will never be displayed as a section.} |
| 9782 | ltoc: @r{Should there be short contents (children) in each section?} | 9817 | ltoc: @r{Should there be short contents (children) in each section?} |
| 9783 | @r{Make this @code{above} if the section should be above initial text.} | 9818 | @r{Make this @code{above} if the section should be above initial text.} |
| @@ -9794,41 +9829,40 @@ You can choose default values for these options by customizing the variable | |||
| 9794 | pages, configure the variable @code{org-export-html-use-infojs}. | 9829 | pages, configure the variable @code{org-export-html-use-infojs}. |
| 9795 | 9830 | ||
| 9796 | @node LaTeX and PDF export, DocBook export, HTML export, Exporting | 9831 | @node LaTeX and PDF export, DocBook export, HTML export, Exporting |
| 9797 | @section La@TeX{} and PDF export | 9832 | @section @LaTeX{} and PDF export |
| 9798 | @cindex La@TeX{} export | 9833 | @cindex @LaTeX{} export |
| 9799 | @cindex PDF export | 9834 | @cindex PDF export |
| 9800 | @cindex Guerry, Bastien | 9835 | @cindex Guerry, Bastien |
| 9801 | 9836 | ||
| 9802 | Org-mode contains a La@TeX{} exporter written by Bastien Guerry. With | 9837 | Org-mode contains a @LaTeX{} exporter written by Bastien Guerry. With |
| 9803 | further processing@footnote{The default LaTeX output is designed for | 9838 | further processing@footnote{The default LaTeX output is designed for |
| 9804 | processing with pdftex or latex. It includes packages that are not | 9839 | processing with pdftex or latex. It includes packages that are not |
| 9805 | compatible with xetex and possibly luatex. See the variables | 9840 | compatible with xetex and possibly luatex. See the variables |
| 9806 | @code{org-export-latex-default-packages-alist} and | 9841 | @code{org-export-latex-default-packages-alist} and |
| 9807 | @code{org-export-latex-packages-alist}.}, this backend is also used to | 9842 | @code{org-export-latex-packages-alist}.}, this backend is also used to |
| 9808 | produce PDF output. Since the La@TeX{} output uses @file{hyperref} to | 9843 | produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to |
| 9809 | implement links and cross references, the PDF output file will be fully | 9844 | implement links and cross references, the PDF output file will be fully |
| 9810 | linked. | 9845 | linked. |
| 9811 | 9846 | ||
| 9812 | @menu | 9847 | @menu |
| 9813 | * LaTeX/PDF export commands:: Which key invokes which commands | 9848 | * LaTeX/PDF export commands:: Which key invokes which commands |
| 9814 | * Header and sectioning:: Setting up the export file structure | 9849 | * Header and sectioning:: Setting up the export file structure |
| 9815 | * Quoting LaTeX code:: Incorporating literal La@TeX{} code | 9850 | * Quoting LaTeX code:: Incorporating literal @LaTeX{} code |
| 9816 | * Tables in LaTeX export:: Options for exporting tables to La@TeX{} | 9851 | * Tables in LaTeX export:: Options for exporting tables to @LaTeX{} |
| 9817 | * Images in LaTeX export:: How to insert figures into La@TeX{} output | 9852 | * Images in LaTeX export:: How to insert figures into @LaTeX{} output |
| 9818 | * Beamer class export:: Turning the file into a presentation | 9853 | * Beamer class export:: Turning the file into a presentation |
| 9819 | @end menu | 9854 | @end menu |
| 9820 | 9855 | ||
| 9821 | @node LaTeX/PDF export commands, Header and sectioning, LaTeX and PDF export, LaTeX and PDF export | 9856 | @node LaTeX/PDF export commands, Header and sectioning, LaTeX and PDF export, LaTeX and PDF export |
| 9822 | @subsection La@TeX{} export commands | 9857 | @subsection @LaTeX{} export commands |
| 9823 | 9858 | ||
| 9824 | @cindex region, active | 9859 | @cindex region, active |
| 9825 | @cindex active region | 9860 | @cindex active region |
| 9826 | @cindex transient-mark-mode | 9861 | @cindex transient-mark-mode |
| 9827 | @table @kbd | 9862 | @table @kbd |
| 9828 | @kindex C-c C-e l | 9863 | @orgcmd{C-c C-e l,org-export-as-latex} |
| 9829 | @item C-c C-e l | ||
| 9830 | @cindex property EXPORT_FILE_NAME | 9864 | @cindex property EXPORT_FILE_NAME |
| 9831 | Export as La@TeX{} file @file{myfile.tex}. For an Org file | 9865 | Export as @LaTeX{} file @file{myfile.tex}. For an Org file |
| 9832 | @file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will | 9866 | @file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will |
| 9833 | be overwritten without warning. If there is an active region@footnote{This | 9867 | be overwritten without warning. If there is an active region@footnote{This |
| 9834 | requires @code{transient-mark-mode} be turned on.}, only the region will be | 9868 | requires @code{transient-mark-mode} be turned on.}, only the region will be |
| @@ -9836,27 +9870,21 @@ exported. If the selected region is a single tree@footnote{To select the | |||
| 9836 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 9870 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9837 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} | 9871 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} |
| 9838 | property, that name will be used for the export. | 9872 | property, that name will be used for the export. |
| 9839 | @kindex C-c C-e L | 9873 | @orgcmd{C-c C-e L,org-export-as-latex-to-buffer} |
| 9840 | @item C-c C-e L | 9874 | Export to a temporary buffer. Do not create a file. |
| 9841 | Export to a temporary buffer, do not create a file. | 9875 | @item C-c C-e v l/L |
| 9842 | @kindex C-c C-e v l | ||
| 9843 | @kindex C-c C-e v L | ||
| 9844 | @item C-c C-e v l | ||
| 9845 | @item C-c C-e v L | ||
| 9846 | Export only the visible part of the document. | 9876 | Export only the visible part of the document. |
| 9847 | @item M-x org-export-region-as-latex | 9877 | @item M-x org-export-region-as-latex |
| 9848 | Convert the region to La@TeX{} under the assumption that it was Org-mode | 9878 | Convert the region to @LaTeX{} under the assumption that it was Org-mode |
| 9849 | syntax before. This is a global command that can be invoked in any | 9879 | syntax before. This is a global command that can be invoked in any |
| 9850 | buffer. | 9880 | buffer. |
| 9851 | @item M-x org-replace-region-by-latex | 9881 | @item M-x org-replace-region-by-latex |
| 9852 | Replace the active region (assumed to be in Org-mode syntax) by La@TeX{} | 9882 | Replace the active region (assumed to be in Org-mode syntax) by @LaTeX{} |
| 9853 | code. | 9883 | code. |
| 9854 | @kindex C-c C-e p | 9884 | @orgcmd{C-c C-e p,org-export-as-pdf} |
| 9855 | @item C-c C-e p | 9885 | Export as @LaTeX{} and then process to PDF. |
| 9856 | Export as La@TeX{} and then process to PDF. | 9886 | @orgcmd{C-c C-e d,org-export-as-pdf-and-open} |
| 9857 | @kindex C-c C-e d | 9887 | Export as @LaTeX{} and then process to PDF, then open the resulting PDF file. |
| 9858 | @item C-c C-e d | ||
| 9859 | Export as La@TeX{} and then process to PDF, then open the resulting PDF file. | ||
| 9860 | @end table | 9888 | @end table |
| 9861 | 9889 | ||
| 9862 | @cindex headline levels, for exporting | 9890 | @cindex headline levels, for exporting |
| @@ -9879,13 +9907,13 @@ creates two levels of headings and does the rest as items. | |||
| 9879 | 9907 | ||
| 9880 | @node Header and sectioning, Quoting LaTeX code, LaTeX/PDF export commands, LaTeX and PDF export | 9908 | @node Header and sectioning, Quoting LaTeX code, LaTeX/PDF export commands, LaTeX and PDF export |
| 9881 | @subsection Header and sectioning structure | 9909 | @subsection Header and sectioning structure |
| 9882 | @cindex La@TeX{} class | 9910 | @cindex @LaTeX{} class |
| 9883 | @cindex La@TeX{} sectioning structure | 9911 | @cindex @LaTeX{} sectioning structure |
| 9884 | @cindex La@TeX{} header | 9912 | @cindex @LaTeX{} header |
| 9885 | @cindex header, for LaTeX files | 9913 | @cindex header, for LaTeX files |
| 9886 | @cindex sectioning structure, for LaTeX export | 9914 | @cindex sectioning structure, for LaTeX export |
| 9887 | 9915 | ||
| 9888 | By default, the La@TeX{} output uses the class @code{article}. | 9916 | By default, the @LaTeX{} output uses the class @code{article}. |
| 9889 | 9917 | ||
| 9890 | @vindex org-export-latex-default-class | 9918 | @vindex org-export-latex-default-class |
| 9891 | @vindex org-export-latex-classes | 9919 | @vindex org-export-latex-classes |
| @@ -9912,12 +9940,12 @@ header. See the docstring of @code{org-export-latex-classes} for more | |||
| 9912 | information. | 9940 | information. |
| 9913 | 9941 | ||
| 9914 | @node Quoting LaTeX code, Tables in LaTeX export, Header and sectioning, LaTeX and PDF export | 9942 | @node Quoting LaTeX code, Tables in LaTeX export, Header and sectioning, LaTeX and PDF export |
| 9915 | @subsection Quoting La@TeX{} code | 9943 | @subsection Quoting @LaTeX{} code |
| 9916 | 9944 | ||
| 9917 | Embedded La@TeX{} as described in @ref{Embedded LaTeX}, will be correctly | 9945 | Embedded @LaTeX{} as described in @ref{Embedded LaTeX}, will be correctly |
| 9918 | inserted into the La@TeX{} file. This includes simple macros like | 9946 | inserted into the @LaTeX{} file. This includes simple macros like |
| 9919 | @samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, | 9947 | @samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, |
| 9920 | you can add special code that should only be present in La@TeX{} export with | 9948 | you can add special code that should only be present in @LaTeX{} export with |
| 9921 | the following constructs: | 9949 | the following constructs: |
| 9922 | 9950 | ||
| 9923 | @cindex #+LaTeX | 9951 | @cindex #+LaTeX |
| @@ -9937,10 +9965,10 @@ All lines between these markers are exported literally | |||
| 9937 | 9965 | ||
| 9938 | 9966 | ||
| 9939 | @node Tables in LaTeX export, Images in LaTeX export, Quoting LaTeX code, LaTeX and PDF export | 9967 | @node Tables in LaTeX export, Images in LaTeX export, Quoting LaTeX code, LaTeX and PDF export |
| 9940 | @subsection Tables in La@TeX{} export | 9968 | @subsection Tables in @LaTeX{} export |
| 9941 | @cindex tables, in La@TeX{} export | 9969 | @cindex tables, in @LaTeX{} export |
| 9942 | 9970 | ||
| 9943 | For La@TeX{} export of a table, you can specify a label and a caption | 9971 | For @LaTeX{} export of a table, you can specify a label and a caption |
| 9944 | (@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to | 9972 | (@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to |
| 9945 | request a @code{longtable} environment for the table, so that it may span | 9973 | request a @code{longtable} environment for the table, so that it may span |
| 9946 | several pages, or provide the @code{multicolumn} keyword that will make the | 9974 | several pages, or provide the @code{multicolumn} keyword that will make the |
| @@ -9960,13 +9988,13 @@ Finally, you can set the alignment string: | |||
| 9960 | 9988 | ||
| 9961 | 9989 | ||
| 9962 | @node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export | 9990 | @node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export |
| 9963 | @subsection Images in La@TeX{} export | 9991 | @subsection Images in @LaTeX{} export |
| 9964 | @cindex images, inline in La@TeX{} | 9992 | @cindex images, inline in @LaTeX{} |
| 9965 | @cindex inlining images in La@TeX{} | 9993 | @cindex inlining images in @LaTeX{} |
| 9966 | 9994 | ||
| 9967 | Images that are linked to without a description part in the link, like | 9995 | Images that are linked to without a description part in the link, like |
| 9968 | @samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF | 9996 | @samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF |
| 9969 | output file resulting from La@TeX{} processing. Org will use an | 9997 | output file resulting from @LaTeX{} processing. Org will use an |
| 9970 | @code{\includegraphics} macro to insert the image. If you have specified a | 9998 | @code{\includegraphics} macro to insert the image. If you have specified a |
| 9971 | caption and/or a label as described in @ref{Images and tables}, the figure | 9999 | caption and/or a label as described in @ref{Images and tables}, the figure |
| 9972 | will be wrapped into a @code{figure} environment and thus become a floating | 10000 | will be wrapped into a @code{figure} environment and thus become a floating |
| @@ -9997,7 +10025,7 @@ for @code{\includegraphics} and @code{wrapfigure}. | |||
| 9997 | @end example | 10025 | @end example |
| 9998 | 10026 | ||
| 9999 | If you need references to a label created in this way, write | 10027 | If you need references to a label created in this way, write |
| 10000 | @samp{\ref@{fig:SED-HR4049@}} just like in La@TeX{}. | 10028 | @samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. |
| 10001 | 10029 | ||
| 10002 | @node Beamer class export, , Images in LaTeX export, LaTeX and PDF export | 10030 | @node Beamer class export, , Images in LaTeX export, LaTeX and PDF export |
| 10003 | @subsection Beamer class export | 10031 | @subsection Beamer class export |
| @@ -10014,7 +10042,7 @@ exportable as a beamer presentation. By default, the top-level entries (or | |||
| 10014 | the first level below the selected subtree heading) will be turned into | 10042 | the first level below the selected subtree heading) will be turned into |
| 10015 | frames, and the outline structure below this level will become itemize lists. | 10043 | frames, and the outline structure below this level will become itemize lists. |
| 10016 | You can also configure the variable @code{org-beamer-frame-level} to a | 10044 | You can also configure the variable @code{org-beamer-frame-level} to a |
| 10017 | different level - then the hierarchy above frames will produce the sectioning | 10045 | different level---then the hierarchy above frames will produce the sectioning |
| 10018 | structure of the presentation. | 10046 | structure of the presentation. |
| 10019 | 10047 | ||
| 10020 | A template for useful in-buffer settings or properties can be inserted into | 10048 | A template for useful in-buffer settings or properties can be inserted into |
| @@ -10037,7 +10065,8 @@ The beamer-special arguments that should be used for the environment, like | |||
| 10037 | @code{[t]} or @code{[<+->]} of @code{<2-3>}. If the @code{BEAMER_col} | 10065 | @code{[t]} or @code{[<+->]} of @code{<2-3>}. If the @code{BEAMER_col} |
| 10038 | property is also set, something like @code{C[t]} can be added here as well to | 10066 | property is also set, something like @code{C[t]} can be added here as well to |
| 10039 | set an options argument for the implied @code{columns} environment. | 10067 | set an options argument for the implied @code{columns} environment. |
| 10040 | @code{c[t]} will set an option for the implied @code{column} environment. | 10068 | @code{c[t]} or @code{c<2->} will set an options for the implied @code{column} |
| 10069 | environment. | ||
| 10041 | @item BEAMER_col | 10070 | @item BEAMER_col |
| 10042 | The width of a column that should start with this entry. If this property is | 10071 | The width of a column that should start with this entry. If this property is |
| 10043 | set, the entry will also get a @code{:BMCOL:} property to make this visible. | 10072 | set, the entry will also get a @code{:BMCOL:} property to make this visible. |
| @@ -10076,8 +10105,7 @@ support with | |||
| 10076 | @end example | 10105 | @end example |
| 10077 | 10106 | ||
| 10078 | @table @kbd | 10107 | @table @kbd |
| 10079 | @kindex C-c C-b | 10108 | @orgcmd{C-c C-b,org-beamer-select-environment} |
| 10080 | @item C-c C-b | ||
| 10081 | In @code{org-beamer-mode}, this key offers fast selection of a beamer | 10109 | In @code{org-beamer-mode}, this key offers fast selection of a beamer |
| 10082 | environment or the @code{BEAMER_col} property. | 10110 | environment or the @code{BEAMER_col} property. |
| 10083 | @end table | 10111 | @end table |
| @@ -10155,8 +10183,7 @@ Currently DocBook exporter only supports DocBook V5.0. | |||
| 10155 | @cindex active region | 10183 | @cindex active region |
| 10156 | @cindex transient-mark-mode | 10184 | @cindex transient-mark-mode |
| 10157 | @table @kbd | 10185 | @table @kbd |
| 10158 | @kindex C-c C-e D | 10186 | @orgcmd{C-c C-e D,org-export-as-docbook} |
| 10159 | @item C-c C-e D | ||
| 10160 | @cindex property EXPORT_FILE_NAME | 10187 | @cindex property EXPORT_FILE_NAME |
| 10161 | Export as DocBook file. For an Org file, @file{myfile.org}, the DocBook XML | 10188 | Export as DocBook file. For an Org file, @file{myfile.org}, the DocBook XML |
| 10162 | file will be @file{myfile.xml}. The file will be overwritten without | 10189 | file will be @file{myfile.xml}. The file will be overwritten without |
| @@ -10166,8 +10193,7 @@ exported. If the selected region is a single tree@footnote{To select the | |||
| 10166 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 10193 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 10167 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} | 10194 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} |
| 10168 | property, that name will be used for the export. | 10195 | property, that name will be used for the export. |
| 10169 | @kindex C-c C-e V | 10196 | @orgcmd{C-c C-e V,org-export-as-docbook-pdf-and-open} |
| 10170 | @item C-c C-e V | ||
| 10171 | Export as DocBook file, process to PDF, then open the resulting PDF file. | 10197 | Export as DocBook file, process to PDF, then open the resulting PDF file. |
| 10172 | 10198 | ||
| 10173 | @vindex org-export-docbook-xslt-proc-command | 10199 | @vindex org-export-docbook-xslt-proc-command |
| @@ -10184,8 +10210,7 @@ variable @code{org-export-docbook-xslt-stylesheet}, which needs to be set by | |||
| 10184 | the user. You can also overrule this global setting on a per-file basis by | 10210 | the user. You can also overrule this global setting on a per-file basis by |
| 10185 | adding an in-buffer setting @code{#+XSLT:} to the Org file. | 10211 | adding an in-buffer setting @code{#+XSLT:} to the Org file. |
| 10186 | 10212 | ||
| 10187 | @kindex C-c C-e v D | 10213 | @orgkey{C-c C-e v D} |
| 10188 | @item C-c C-e v D | ||
| 10189 | Export only the visible part of the document. | 10214 | Export only the visible part of the document. |
| 10190 | @end table | 10215 | @end table |
| 10191 | 10216 | ||
| @@ -10220,7 +10245,7 @@ exported DocBook XML files invalid by not quoting DocBook code correctly. | |||
| 10220 | #+BEGIN_DOCBOOK | 10245 | #+BEGIN_DOCBOOK |
| 10221 | <warning> | 10246 | <warning> |
| 10222 | <para>You should know what you are doing when quoting DocBook XML code | 10247 | <para>You should know what you are doing when quoting DocBook XML code |
| 10223 | in your Org file. Invalid DocBook XML file may be generated by | 10248 | in your Org file. Invalid DocBook XML may be generated by |
| 10224 | DocBook exporter if you are not careful!</para> | 10249 | DocBook exporter if you are not careful!</para> |
| 10225 | </warning> | 10250 | </warning> |
| 10226 | #+END_DOCBOOK | 10251 | #+END_DOCBOOK |
| @@ -10349,12 +10374,10 @@ all the nodes. | |||
| 10349 | @subsection TaskJuggler export commands | 10374 | @subsection TaskJuggler export commands |
| 10350 | 10375 | ||
| 10351 | @table @kbd | 10376 | @table @kbd |
| 10352 | @kindex C-c C-e j | 10377 | @orgcmd{C-c C-e j,org-export-as-taskjuggler} |
| 10353 | @item C-c C-e j | ||
| 10354 | Export as TaskJuggler file. | 10378 | Export as TaskJuggler file. |
| 10355 | 10379 | ||
| 10356 | @kindex C-c C-e J | 10380 | @orgcmd{C-c C-e J,org-export-as-taskjuggler-and-open} |
| 10357 | @item C-c C-e J | ||
| 10358 | Export as TaskJuggler file and then open the file with TaskJugglerUI. | 10381 | Export as TaskJuggler file and then open the file with TaskJugglerUI. |
| 10359 | @end table | 10382 | @end table |
| 10360 | 10383 | ||
| @@ -10381,7 +10404,7 @@ with @code{:taskjuggler_resource:} (or whatever you customized | |||
| 10381 | identifier (named @samp{resource_id}) to the resources (using the standard | 10404 | identifier (named @samp{resource_id}) to the resources (using the standard |
| 10382 | Org properties commands, @pxref{Property syntax}) or you can let the exporter | 10405 | Org properties commands, @pxref{Property syntax}) or you can let the exporter |
| 10383 | generate identifiers automatically (the exporter picks the first word of the | 10406 | generate identifiers automatically (the exporter picks the first word of the |
| 10384 | headline as the identifier as long as it is unique, see the documentation of | 10407 | headline as the identifier as long as it is unique---see the documentation of |
| 10385 | @code{org-taskjuggler-get-unique-id}). Using that identifier you can then | 10408 | @code{org-taskjuggler-get-unique-id}). Using that identifier you can then |
| 10386 | allocate resources to tasks. This is again done with the @samp{allocate} | 10409 | allocate resources to tasks. This is again done with the @samp{allocate} |
| 10387 | property on the tasks. Do this in column view or when on the task type | 10410 | property on the tasks. Do this in column view or when on the task type |
| @@ -10407,7 +10430,7 @@ resource or resource node which is known to TaskJuggler, such as | |||
| 10407 | 10430 | ||
| 10408 | The exporter will handle dependencies that are defined in the tasks either | 10431 | The exporter will handle dependencies that are defined in the tasks either |
| 10409 | with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the | 10432 | with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the |
| 10410 | @samp{BLOCKER} attribute (see org-depend.el) or alternatively with a | 10433 | @samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a |
| 10411 | @samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} | 10434 | @samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} |
| 10412 | attribute can be either @samp{previous-sibling} or a reference to an | 10435 | attribute can be either @samp{previous-sibling} or a reference to an |
| 10413 | identifier (named @samp{task_id}) which is defined for another task in the | 10436 | identifier (named @samp{task_id}) which is defined for another task in the |
| @@ -10464,8 +10487,7 @@ For more information and examples see the Org-taskjuggler tutorial at | |||
| 10464 | The Freemind exporter was written by Lennart Borgman. | 10487 | The Freemind exporter was written by Lennart Borgman. |
| 10465 | 10488 | ||
| 10466 | @table @kbd | 10489 | @table @kbd |
| 10467 | @kindex C-c C-e m | 10490 | @orgcmd{C-c C-e m,org-export-as-freemind} |
| 10468 | @item C-c C-e m | ||
| 10469 | Export as Freemind mind map @file{myfile.mm}. | 10491 | Export as Freemind mind map @file{myfile.mm}. |
| 10470 | @end table | 10492 | @end table |
| 10471 | 10493 | ||
| @@ -10478,11 +10500,9 @@ Currently, this exporter only handles the general outline structure and | |||
| 10478 | does not interpret any additional Org-mode features. | 10500 | does not interpret any additional Org-mode features. |
| 10479 | 10501 | ||
| 10480 | @table @kbd | 10502 | @table @kbd |
| 10481 | @kindex C-c C-e x | 10503 | @orgcmd{C-c C-e x,org-export-as-xoxo} |
| 10482 | @item C-c C-e x | ||
| 10483 | Export as XOXO file @file{myfile.html}. | 10504 | Export as XOXO file @file{myfile.html}. |
| 10484 | @kindex C-c C-e v | 10505 | @orgkey{C-c C-e v x} |
| 10485 | @item C-c C-e v x | ||
| 10486 | Export only the visible part of the document. | 10506 | Export only the visible part of the document. |
| 10487 | @end table | 10507 | @end table |
| 10488 | 10508 | ||
| @@ -10525,18 +10545,15 @@ In this way the UID remains unique, but a synchronization program can still | |||
| 10525 | figure out from which entry all the different instances originate. | 10545 | figure out from which entry all the different instances originate. |
| 10526 | 10546 | ||
| 10527 | @table @kbd | 10547 | @table @kbd |
| 10528 | @kindex C-c C-e i | 10548 | @orgcmd{C-c C-e i,org-export-icalendar-this-file} |
| 10529 | @item C-c C-e i | ||
| 10530 | Create iCalendar entries for the current file and store them in the same | 10549 | Create iCalendar entries for the current file and store them in the same |
| 10531 | directory, using a file extension @file{.ics}. | 10550 | directory, using a file extension @file{.ics}. |
| 10532 | @kindex C-c C-e I | 10551 | @orgcmd{C-c C-e I, org-export-icalendar-all-agenda-files} |
| 10533 | @item C-c C-e I | ||
| 10534 | @vindex org-agenda-files | 10552 | @vindex org-agenda-files |
| 10535 | Like @kbd{C-c C-e i}, but do this for all files in | 10553 | Like @kbd{C-c C-e i}, but do this for all files in |
| 10536 | @code{org-agenda-files}. For each of these files, a separate iCalendar | 10554 | @code{org-agenda-files}. For each of these files, a separate iCalendar |
| 10537 | file will be written. | 10555 | file will be written. |
| 10538 | @kindex C-c C-e c | 10556 | @orgcmd{C-c C-e c,org-export-icalendar-combine-agenda-files} |
| 10539 | @item C-c C-e c | ||
| 10540 | @vindex org-combined-agenda-icalendar-file | 10557 | @vindex org-combined-agenda-icalendar-file |
| 10541 | Create a single large iCalendar file from all files in | 10558 | Create a single large iCalendar file from all files in |
| 10542 | @code{org-agenda-files} and write it to the file given by | 10559 | @code{org-agenda-files} and write it to the file given by |
| @@ -10674,6 +10691,9 @@ extension. | |||
| 10674 | @item @code{:include} | 10691 | @item @code{:include} |
| 10675 | @tab List of files to be included regardless of @code{:base-extension} | 10692 | @tab List of files to be included regardless of @code{:base-extension} |
| 10676 | and @code{:exclude}. | 10693 | and @code{:exclude}. |
| 10694 | |||
| 10695 | @item @code{:recursive} | ||
| 10696 | @tab Non-nil means, check base-directory recursively for files to publish. | ||
| 10677 | @end multitable | 10697 | @end multitable |
| 10678 | 10698 | ||
| 10679 | @node Publishing action, Publishing options, Selecting files, Configuration | 10699 | @node Publishing action, Publishing options, Selecting files, Configuration |
| @@ -10694,10 +10714,10 @@ produce @file{file.org} and @file{file.org.html} in the publishing | |||
| 10694 | directory@footnote{@file{file-source.org} and @file{file-source.org.html} if | 10714 | directory@footnote{@file{file-source.org} and @file{file-source.org.html} if |
| 10695 | source and publishing directories are equal. Note that with this kind of | 10715 | source and publishing directories are equal. Note that with this kind of |
| 10696 | setup, you need to add @code{:exclude "-source\\.org"} to the project | 10716 | setup, you need to add @code{:exclude "-source\\.org"} to the project |
| 10697 | definition in @code{org-publish-project-alist} to avoid that the published | 10717 | definition in @code{org-publish-project-alist} to prevent the published |
| 10698 | source files will be considered as new org files the next time the project is | 10718 | source files from being considered as new org files the next time the project |
| 10699 | published.}. Other files like images only need to be copied to the | 10719 | is published.}. Other files like images only need to be copied to the |
| 10700 | publishing destination, for this you may use @code{org-publish-attachment}. | 10720 | publishing destination; for this you may use @code{org-publish-attachment}. |
| 10701 | For non-Org files, you always need to specify the publishing function: | 10721 | For non-Org files, you always need to specify the publishing function: |
| 10702 | 10722 | ||
| 10703 | @multitable @columnfractions 0.3 0.7 | 10723 | @multitable @columnfractions 0.3 0.7 |
| @@ -10717,11 +10737,11 @@ should take the specified file, make the necessary transformation (if any) | |||
| 10717 | and place the result into the destination folder. | 10737 | and place the result into the destination folder. |
| 10718 | 10738 | ||
| 10719 | @node Publishing options, Publishing links, Publishing action, Configuration | 10739 | @node Publishing options, Publishing links, Publishing action, Configuration |
| 10720 | @subsection Options for the HTML/La@TeX{} exporters | 10740 | @subsection Options for the HTML/@LaTeX{} exporters |
| 10721 | @cindex options, for publishing | 10741 | @cindex options, for publishing |
| 10722 | 10742 | ||
| 10723 | The property list can be used to set many export options for the HTML | 10743 | The property list can be used to set many export options for the HTML |
| 10724 | and La@TeX{} exporters. In most cases, these properties correspond to user | 10744 | and @LaTeX{} exporters. In most cases, these properties correspond to user |
| 10725 | variables in Org. The table below lists these properties along | 10745 | variables in Org. The table below lists these properties along |
| 10726 | with the variable they belong to. See the documentation string for the | 10746 | with the variable they belong to. See the documentation string for the |
| 10727 | respective variable for details. | 10747 | respective variable for details. |
| @@ -10826,9 +10846,9 @@ respective variable for details. | |||
| 10826 | @end multitable | 10846 | @end multitable |
| 10827 | 10847 | ||
| 10828 | Most of the @code{org-export-with-*} variables have the same effect in | 10848 | Most of the @code{org-export-with-*} variables have the same effect in |
| 10829 | both HTML and La@TeX{} exporters, except for @code{:TeX-macros} and | 10849 | both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and |
| 10830 | @code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the | 10850 | @code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the |
| 10831 | La@TeX{} export. | 10851 | @LaTeX{} export. |
| 10832 | 10852 | ||
| 10833 | @vindex org-publish-project-alist | 10853 | @vindex org-publish-project-alist |
| 10834 | When a property is given a value in @code{org-publish-project-alist}, | 10854 | When a property is given a value in @code{org-publish-project-alist}, |
| @@ -11048,17 +11068,13 @@ right place on the web server, and publishing images to it. | |||
| 11048 | Once properly configured, Org can publish with the following commands: | 11068 | Once properly configured, Org can publish with the following commands: |
| 11049 | 11069 | ||
| 11050 | @table @kbd | 11070 | @table @kbd |
| 11051 | @kindex C-c C-e C | 11071 | @orgcmd{C-c C-e X,org-publish} |
| 11052 | @item C-c C-e C | ||
| 11053 | Prompt for a specific project and publish all files that belong to it. | 11072 | Prompt for a specific project and publish all files that belong to it. |
| 11054 | @kindex C-c C-e P | 11073 | @orgcmd{C-c C-e P,org-publish-current-project} |
| 11055 | @item C-c C-e P | ||
| 11056 | Publish the project containing the current file. | 11074 | Publish the project containing the current file. |
| 11057 | @kindex C-c C-e F | 11075 | @orgcmd{C-c C-e F,org-publish-current-file} |
| 11058 | @item C-c C-e F | ||
| 11059 | Publish only the current file. | 11076 | Publish only the current file. |
| 11060 | @kindex C-c C-e E | 11077 | @orgcmd{C-c C-e E,org-publish-all} |
| 11061 | @item C-c C-e E | ||
| 11062 | Publish every project. | 11078 | Publish every project. |
| 11063 | @end table | 11079 | @end table |
| 11064 | 11080 | ||
| @@ -11192,7 +11208,7 @@ can be used to map arbitrary language names to existing major modes. | |||
| 11192 | Controls the way Emacs windows are rearranged when the edit buffer is created. | 11208 | Controls the way Emacs windows are rearranged when the edit buffer is created. |
| 11193 | @item org-src-preserve-indentation | 11209 | @item org-src-preserve-indentation |
| 11194 | This variable is especially useful for tangling languages such as | 11210 | This variable is especially useful for tangling languages such as |
| 11195 | python, in which whitespace indentation in the output is critical. | 11211 | Python, in which whitespace indentation in the output is critical. |
| 11196 | @item org-src-ask-before-returning-to-edit-buffer | 11212 | @item org-src-ask-before-returning-to-edit-buffer |
| 11197 | By default, Org will ask before returning to an open edit buffer. Set | 11213 | By default, Org will ask before returning to an open edit buffer. Set |
| 11198 | this variable to nil to switch without asking. | 11214 | this variable to nil to switch without asking. |
| @@ -11234,7 +11250,7 @@ Neither the code block nor its results will be exported. | |||
| 11234 | @end table | 11250 | @end table |
| 11235 | 11251 | ||
| 11236 | It is possible to inhibit the evaluation of code blocks during export. | 11252 | It is possible to inhibit the evaluation of code blocks during export. |
| 11237 | Setting the the @code{org-export-babel-evaluate} variable to @code{nil} will | 11253 | Setting the @code{org-export-babel-evaluate} variable to @code{nil} will |
| 11238 | ensure that no code blocks are evaluated as part of the export process. This | 11254 | ensure that no code blocks are evaluated as part of the export process. This |
| 11239 | can be useful in situations where potentially untrusted Org-mode files are | 11255 | can be useful in situations where potentially untrusted Org-mode files are |
| 11240 | exported in an automated fashion, for example when Org-mode is used as the | 11256 | exported in an automated fashion, for example when Org-mode is used as the |
| @@ -11361,17 +11377,17 @@ Code blocks in the following languages are supported. | |||
| 11361 | @item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} | 11377 | @item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} |
| 11362 | @item Asymptote @tab asymptote @tab C @tab C | 11378 | @item Asymptote @tab asymptote @tab C @tab C |
| 11363 | @item C++ @tab C++ @tab Clojure @tab clojure | 11379 | @item C++ @tab C++ @tab Clojure @tab clojure |
| 11364 | @item css @tab css @tab ditaa @tab ditaa | 11380 | @item CSS @tab css @tab ditaa @tab ditaa |
| 11365 | @item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp | 11381 | @item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp |
| 11366 | @item gnuplot @tab gnuplot @tab Haskell @tab haskell | 11382 | @item gnuplot @tab gnuplot @tab Haskell @tab haskell |
| 11367 | @item LaTeX @tab latex @tab Matlab @tab matlab | 11383 | @item LaTeX @tab latex @tab MATLAB @tab matlab |
| 11368 | @item Mscgen @tab mscgen @tab Objective Caml @tab ocaml | 11384 | @item Mscgen @tab mscgen @tab Objective Caml @tab ocaml |
| 11369 | @item Octave @tab octave @tab OZ @tab oz | 11385 | @item Octave @tab octave @tab Oz @tab oz |
| 11370 | @item Perl @tab perl @tab Python @tab python | 11386 | @item Perl @tab perl @tab Python @tab python |
| 11371 | @item R @tab R @tab Ruby @tab ruby | 11387 | @item R @tab R @tab Ruby @tab ruby |
| 11372 | @item Sass @tab sass @tab GNU Screen @tab screen | 11388 | @item Sass @tab sass @tab GNU Screen @tab screen |
| 11373 | @item shell @tab sh @tab SQL @tab sql | 11389 | @item shell @tab sh @tab SQL @tab sql |
| 11374 | @item Sqlite @tab sqlite | 11390 | @item SQLite @tab sqlite |
| 11375 | @end multitable | 11391 | @end multitable |
| 11376 | 11392 | ||
| 11377 | Language-specific documentation is available for some languages. If | 11393 | Language-specific documentation is available for some languages. If |
| @@ -11771,8 +11787,8 @@ another by commas, as shown in the following example. | |||
| 11771 | @node results, file, var, Specific header arguments | 11787 | @node results, file, var, Specific header arguments |
| 11772 | @subsubsection @code{:results} | 11788 | @subsubsection @code{:results} |
| 11773 | 11789 | ||
| 11774 | There are three classes of @code{:results} header argument. Only one option of | 11790 | There are three classes of @code{:results} header argument. Only one option |
| 11775 | each type may be supplied per code block. | 11791 | per class may be supplied per code block. |
| 11776 | 11792 | ||
| 11777 | @itemize @bullet | 11793 | @itemize @bullet |
| 11778 | @item | 11794 | @item |
| @@ -11795,7 +11811,7 @@ should be collected from the code block. | |||
| 11795 | @item @code{value} | 11811 | @item @code{value} |
| 11796 | This is the default. The result is the value of the last statement in the | 11812 | This is the default. The result is the value of the last statement in the |
| 11797 | code block. This header argument places the evaluation in functional | 11813 | code block. This header argument places the evaluation in functional |
| 11798 | mode. Note that in some languages, e.g., python, use of this result type | 11814 | mode. Note that in some languages, e.g., Python, use of this result type |
| 11799 | requires that a @code{return} statement be included in the body of the source | 11815 | requires that a @code{return} statement be included in the body of the source |
| 11800 | code block. E.g., @code{:results value}. | 11816 | code block. E.g., @code{:results value}. |
| 11801 | @item @code{output} | 11817 | @item @code{output} |
| @@ -11815,6 +11831,9 @@ table or scalar depending on their value. | |||
| 11815 | The results should be interpreted as an Org-mode table. If a single value is | 11831 | The results should be interpreted as an Org-mode table. If a single value is |
| 11816 | returned, it will be converted into a table with one row and one column. | 11832 | returned, it will be converted into a table with one row and one column. |
| 11817 | E.g., @code{:results value table}. | 11833 | E.g., @code{:results value table}. |
| 11834 | @item @code{list} | ||
| 11835 | The results should be interpreted as an Org-mode list. If a single scalar | ||
| 11836 | value is returned it will be converted into a list with only one element. | ||
| 11818 | @item @code{scalar}, @code{verbatim} | 11837 | @item @code{scalar}, @code{verbatim} |
| 11819 | The results should be interpreted literally---they will not be | 11838 | The results should be interpreted literally---they will not be |
| 11820 | converted into a table. The results will be inserted into the Org-mode | 11839 | converted into a table. The results will be inserted into the Org-mode |
| @@ -11837,7 +11856,7 @@ Result are assumed to be parseable code and are enclosed in a code block. | |||
| 11837 | E.g., @code{:results value code}. | 11856 | E.g., @code{:results value code}. |
| 11838 | @item @code{pp} | 11857 | @item @code{pp} |
| 11839 | The result is converted to pretty-printed code and is enclosed in a code | 11858 | The result is converted to pretty-printed code and is enclosed in a code |
| 11840 | block. This option currently supports Emacs Lisp, python, and ruby. E.g., | 11859 | block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., |
| 11841 | @code{:results value pp}. | 11860 | @code{:results value pp}. |
| 11842 | @end itemize | 11861 | @end itemize |
| 11843 | 11862 | ||
| @@ -11875,7 +11894,7 @@ Note that for some languages, including R, gnuplot, LaTeX and ditaa, | |||
| 11875 | graphical output is sent to the specified file without the file being | 11894 | graphical output is sent to the specified file without the file being |
| 11876 | referenced explicitly in the code block. See the documentation for the | 11895 | referenced explicitly in the code block. See the documentation for the |
| 11877 | individual languages for details. In contrast, general purpose languages such | 11896 | individual languages for details. In contrast, general purpose languages such |
| 11878 | as python and ruby require that the code explicitly create output | 11897 | as Python and Ruby require that the code explicitly create output |
| 11879 | corresponding to the path indicated by @code{:file}. | 11898 | corresponding to the path indicated by @code{:file}. |
| 11880 | 11899 | ||
| 11881 | 11900 | ||
| @@ -11894,8 +11913,8 @@ When using @code{:dir}, you should supply a relative path for file output | |||
| 11894 | (e.g. @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which | 11913 | (e.g. @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which |
| 11895 | case that path will be interpreted relative to the default directory. | 11914 | case that path will be interpreted relative to the default directory. |
| 11896 | 11915 | ||
| 11897 | In other words, if you want your plot to go into a folder called Work in your | 11916 | In other words, if you want your plot to go into a folder called @file{Work} |
| 11898 | home directory, you could use | 11917 | in your home directory, you could use |
| 11899 | 11918 | ||
| 11900 | @example | 11919 | @example |
| 11901 | #+begin_src R :file myplot.png :dir ~/Work | 11920 | #+begin_src R :file myplot.png :dir ~/Work |
| @@ -11928,7 +11947,7 @@ and a link of the following form will be inserted in the org buffer: | |||
| 11928 | Most of this functionality follows immediately from the fact that @code{:dir} | 11947 | Most of this functionality follows immediately from the fact that @code{:dir} |
| 11929 | sets the value of the Emacs variable @code{default-directory}, thanks to | 11948 | sets the value of the Emacs variable @code{default-directory}, thanks to |
| 11930 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to | 11949 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to |
| 11931 | install tramp separately in order for the these features to work correctly. | 11950 | install tramp separately in order for these features to work correctly. |
| 11932 | 11951 | ||
| 11933 | @subsubheading Further points | 11952 | @subsubheading Further points |
| 11934 | 11953 | ||
| @@ -11974,7 +11993,7 @@ The @code{:tangle} header argument specifies whether or not the code | |||
| 11974 | block should be included in tangled extraction of source code files. | 11993 | block should be included in tangled extraction of source code files. |
| 11975 | 11994 | ||
| 11976 | @itemize @bullet | 11995 | @itemize @bullet |
| 11977 | @item @code{yes} | 11996 | @item @code{tangle} |
| 11978 | The code block is exported to a source code file named after the | 11997 | The code block is exported to a source code file named after the |
| 11979 | basename (name w/o extension) of the Org-mode file. E.g., @code{:tangle | 11998 | basename (name w/o extension) of the Org-mode file. E.g., @code{:tangle |
| 11980 | yes}. | 11999 | yes}. |
| @@ -12047,7 +12066,7 @@ expanded before the block is evaluated, tangled or exported. | |||
| 12047 | The default. No ``noweb'' syntax specific action is taken on evaluating | 12066 | The default. No ``noweb'' syntax specific action is taken on evaluating |
| 12048 | code blocks, However, noweb references will still be expanded during | 12067 | code blocks, However, noweb references will still be expanded during |
| 12049 | tangling. | 12068 | tangling. |
| 12050 | @item @code{yes} | 12069 | @item @code{tangle} |
| 12051 | All ``noweb'' syntax references in the body of the code block will be | 12070 | All ``noweb'' syntax references in the body of the code block will be |
| 12052 | expanded before the block is tangled, however ``noweb'' references will not | 12071 | expanded before the block is tangled, however ``noweb'' references will not |
| 12053 | be expanded when the block is evaluated or exported. | 12072 | be expanded when the block is evaluated or exported. |
| @@ -12091,7 +12110,7 @@ values: @code{yes} or @code{no}. | |||
| 12091 | The default. No caching takes place, and the code block will be evaluated | 12110 | The default. No caching takes place, and the code block will be evaluated |
| 12092 | every time it is called. | 12111 | every time it is called. |
| 12093 | @item @code{yes} | 12112 | @item @code{yes} |
| 12094 | Every time the code block is run a sha1 hash of the code and arguments | 12113 | Every time the code block is run a SHA1 hash of the code and arguments |
| 12095 | passed to the block will be generated. This hash is packed into the | 12114 | passed to the block will be generated. This hash is packed into the |
| 12096 | @code{#+results:} line and will be checked on subsequent | 12115 | @code{#+results:} line and will be checked on subsequent |
| 12097 | executions of the code block. If the code block has not | 12116 | executions of the code block. If the code block has not |
| @@ -12269,9 +12288,9 @@ vector of strings or numbers) when appropriate. | |||
| 12269 | This is the default. Internally, the value is obtained by wrapping the code | 12288 | This is the default. Internally, the value is obtained by wrapping the code |
| 12270 | in a function definition in the external language, and evaluating that | 12289 | in a function definition in the external language, and evaluating that |
| 12271 | function. Therefore, code should be written as if it were the body of such a | 12290 | function. Therefore, code should be written as if it were the body of such a |
| 12272 | function. In particular, note that python does not automatically return a | 12291 | function. In particular, note that Python does not automatically return a |
| 12273 | value from a function unless a @code{return} statement is present, and so a | 12292 | value from a function unless a @code{return} statement is present, and so a |
| 12274 | @samp{return} statement will usually be required in python. | 12293 | @samp{return} statement will usually be required in Python. |
| 12275 | 12294 | ||
| 12276 | This is the only one of the four evaluation contexts in which the code is | 12295 | This is the only one of the four evaluation contexts in which the code is |
| 12277 | automatically wrapped in a function definition. | 12296 | automatically wrapped in a function definition. |
| @@ -12282,12 +12301,12 @@ contents of the standard output stream are returned as text. (In certain | |||
| 12282 | languages this also contains the error output stream; this is an area for | 12301 | languages this also contains the error output stream; this is an area for |
| 12283 | future work.) | 12302 | future work.) |
| 12284 | 12303 | ||
| 12285 | @subsection @code{:session} | 12304 | @subsection Session |
| 12286 | @subsubsection @code{:results value} | 12305 | @subsubsection @code{:results value} |
| 12287 | The code is passed to the interpreter running as an interactive Emacs | 12306 | The code is passed to the interpreter running as an interactive Emacs |
| 12288 | inferior process. The result returned is the result of the last evaluation | 12307 | inferior process. The result returned is the result of the last evaluation |
| 12289 | performed by the interpreter. (This is obtained in a language-specific | 12308 | performed by the interpreter. (This is obtained in a language-specific |
| 12290 | manner: the value of the variable @code{_} in python and ruby, and the value | 12309 | manner: the value of the variable @code{_} in Python and Ruby, and the value |
| 12291 | of @code{.Last.value} in R). | 12310 | of @code{.Last.value} in R). |
| 12292 | 12311 | ||
| 12293 | @subsubsection @code{:results output} | 12312 | @subsubsection @code{:results output} |
| @@ -12310,7 +12329,7 @@ process. For example, compare the following two blocks: | |||
| 12310 | : bye | 12329 | : bye |
| 12311 | @end example | 12330 | @end example |
| 12312 | 12331 | ||
| 12313 | In non-session mode, the '2' is not printed and does not appear. | 12332 | In non-session mode, the `2' is not printed and does not appear. |
| 12314 | @example | 12333 | @example |
| 12315 | #+begin_src python :results output :session | 12334 | #+begin_src python :results output :session |
| 12316 | print "hello" | 12335 | print "hello" |
| @@ -12324,8 +12343,8 @@ In non-session mode, the '2' is not printed and does not appear. | |||
| 12324 | : bye | 12343 | : bye |
| 12325 | @end example | 12344 | @end example |
| 12326 | 12345 | ||
| 12327 | But in @code{:session} mode, the interactive interpreter receives input '2' | 12346 | But in @code{:session} mode, the interactive interpreter receives input `2' |
| 12328 | and prints out its value, '2'. (Indeed, the other print statements are | 12347 | and prints out its value, `2'. (Indeed, the other print statements are |
| 12329 | unnecessary here). | 12348 | unnecessary here). |
| 12330 | 12349 | ||
| 12331 | @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code | 12350 | @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code |
| @@ -12573,7 +12592,7 @@ For example, on an empty line, typing "<e" and then pressing TAB, will expand | |||
| 12573 | into a complete EXAMPLE template. | 12592 | into a complete EXAMPLE template. |
| 12574 | 12593 | ||
| 12575 | You can install additional templates by customizing the variable | 12594 | You can install additional templates by customizing the variable |
| 12576 | @code{org-structure-template-alist}. Refer docstring of the variable for | 12595 | @code{org-structure-template-alist}. See the docstring of the variable for |
| 12577 | additional details. | 12596 | additional details. |
| 12578 | 12597 | ||
| 12579 | @node Speed keys, Code evaluation security, Easy Templates, Miscellaneous | 12598 | @node Speed keys, Code evaluation security, Easy Templates, Miscellaneous |
| @@ -12588,7 +12607,7 @@ beginning of a headline, i.e. before the first star. Configure the variable | |||
| 12588 | pre-defined list of commands, and you can add more such commands using the | 12607 | pre-defined list of commands, and you can add more such commands using the |
| 12589 | variable @code{org-speed-commands-user}. Speed keys do not only speed up | 12608 | variable @code{org-speed-commands-user}. Speed keys do not only speed up |
| 12590 | navigation and other commands, but they also provide an alternative way to | 12609 | navigation and other commands, but they also provide an alternative way to |
| 12591 | execute commands bound to keys that are not or not easily available on a tty, | 12610 | execute commands bound to keys that are not or not easily available on a TTY, |
| 12592 | or on a small mobile device with a limited keyboard. | 12611 | or on a small mobile device with a limited keyboard. |
| 12593 | 12612 | ||
| 12594 | To see which commands are available, activate the feature and press @kbd{?} | 12613 | To see which commands are available, activate the feature and press @kbd{?} |
| @@ -12617,7 +12636,7 @@ Source code blocks can be evaluated during export, or when pressing @kbd{C-c | |||
| 12617 | C-c} in the block. The most important thing to realize here is that Org mode | 12636 | C-c} in the block. The most important thing to realize here is that Org mode |
| 12618 | files which contain code snippets are, in a certain sense, like executable | 12637 | files which contain code snippets are, in a certain sense, like executable |
| 12619 | files. So you should accept them and load them into Emacs only from trusted | 12638 | files. So you should accept them and load them into Emacs only from trusted |
| 12620 | sources - just like you would do with a program you install on your computer. | 12639 | sources---just like you would do with a program you install on your computer. |
| 12621 | 12640 | ||
| 12622 | Make sure you know what you are doing before customizing the variables | 12641 | Make sure you know what you are doing before customizing the variables |
| 12623 | which take off the default security brakes. | 12642 | which take off the default security brakes. |
| @@ -12692,7 +12711,7 @@ applies. | |||
| 12692 | @vindex org-table-formula-constants | 12711 | @vindex org-table-formula-constants |
| 12693 | @vindex org-table-formula | 12712 | @vindex org-table-formula |
| 12694 | Set file-local values for constants to be used in table formulas. This | 12713 | Set file-local values for constants to be used in table formulas. This |
| 12695 | line set the local variable @code{org-table-formula-constants-local}. | 12714 | line sets the local variable @code{org-table-formula-constants-local}. |
| 12696 | The global version of this variable is | 12715 | The global version of this variable is |
| 12697 | @code{org-table-formula-constants}. | 12716 | @code{org-table-formula-constants}. |
| 12698 | @item #+FILETAGS: :tag1:tag2:tag3: | 12717 | @item #+FILETAGS: :tag1:tag2:tag3: |
| @@ -12713,7 +12732,7 @@ These lines (several are allowed) specify link abbreviations. | |||
| 12713 | @vindex org-default-priority | 12732 | @vindex org-default-priority |
| 12714 | This line sets the limits and the default for the priorities. All three | 12733 | This line sets the limits and the default for the priorities. All three |
| 12715 | must be either letters A-Z or numbers 0-9. The highest priority must | 12734 | must be either letters A-Z or numbers 0-9. The highest priority must |
| 12716 | have a lower ASCII number that the lowest priority. | 12735 | have a lower ASCII number than the lowest priority. |
| 12717 | @item #+PROPERTY: Property_Name Value | 12736 | @item #+PROPERTY: Property_Name Value |
| 12718 | This line sets a default inheritance value for entries in the current | 12737 | This line sets a default inheritance value for entries in the current |
| 12719 | buffer, most useful for specifying the allowed values of a property. | 12738 | buffer, most useful for specifying the allowed values of a property. |
| @@ -12894,12 +12913,12 @@ hideblocks @r{Hide all begin/end blocks on startup} | |||
| 12894 | nohideblocks @r{Do not hide blocks on startup} | 12913 | nohideblocks @r{Do not hide blocks on startup} |
| 12895 | @end example | 12914 | @end example |
| 12896 | @cindex org-pretty-entities | 12915 | @cindex org-pretty-entities |
| 12897 | The the display of entities as UTF8 characters is governed by the variable | 12916 | The display of entities as UTF-8 characters is governed by the variable |
| 12898 | @code{org-pretty-entities} and the keywords | 12917 | @code{org-pretty-entities} and the keywords |
| 12899 | @cindex @code{entitiespretty}, STARTUP keyword | 12918 | @cindex @code{entitiespretty}, STARTUP keyword |
| 12900 | @cindex @code{entitiesplain}, STARTUP keyword | 12919 | @cindex @code{entitiesplain}, STARTUP keyword |
| 12901 | @example | 12920 | @example |
| 12902 | entitiespretty @r{Show entities as UTF8 characters where possible} | 12921 | entitiespretty @r{Show entities as UTF-8 characters where possible} |
| 12903 | entitiesplain @r{Leave entities plain} | 12922 | entitiesplain @r{Leave entities plain} |
| 12904 | @end example | 12923 | @end example |
| 12905 | @item #+TAGS: TAG1(c1) TAG2(c2) | 12924 | @item #+TAGS: TAG1(c1) TAG2(c2) |
| @@ -13023,7 +13042,7 @@ individual files using | |||
| 13023 | #+STARTUP: indent | 13042 | #+STARTUP: indent |
| 13024 | @end example | 13043 | @end example |
| 13025 | 13044 | ||
| 13026 | If you want a similar effect in earlier version of Emacs and/or Org, or if | 13045 | If you want a similar effect in an earlier version of Emacs and/or Org, or if |
| 13027 | you want the indentation to be hard space characters so that the plain text | 13046 | you want the indentation to be hard space characters so that the plain text |
| 13028 | file looks as similar as possible to the Emacs display, Org supports you in | 13047 | file looks as similar as possible to the Emacs display, Org supports you in |
| 13029 | the following way: | 13048 | the following way: |
| @@ -13181,7 +13200,7 @@ setup. See the installation instructions in the file | |||
| 13181 | @cindex @file{cdlatex.el} | 13200 | @cindex @file{cdlatex.el} |
| 13182 | @cindex Dominik, Carsten | 13201 | @cindex Dominik, Carsten |
| 13183 | Org-mode can make use of the CDLa@TeX{} package to efficiently enter | 13202 | Org-mode can make use of the CDLa@TeX{} package to efficiently enter |
| 13184 | La@TeX{} fragments into Org files. See @ref{CDLaTeX mode}. | 13203 | @LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}. |
| 13185 | @item @file{imenu.el} by Ake Stenhoff and Lars Lindberg | 13204 | @item @file{imenu.el} by Ake Stenhoff and Lars Lindberg |
| 13186 | @cindex @file{imenu.el} | 13205 | @cindex @file{imenu.el} |
| 13187 | Imenu allows menu access to an index of items in a file. Org-mode | 13206 | Imenu allows menu access to an index of items in a file. Org-mode |
| @@ -13221,12 +13240,10 @@ these tables directly in the buffer. Instead, you need to use the command | |||
| 13221 | @kbd{C-c '} to edit them, similar to source code snippets. | 13240 | @kbd{C-c '} to edit them, similar to source code snippets. |
| 13222 | 13241 | ||
| 13223 | @table @kbd | 13242 | @table @kbd |
| 13224 | @kindex C-c ' | 13243 | @orgcmd{C-c ',org-edit-special} |
| 13225 | @item C-c ' | ||
| 13226 | Edit a @file{table.el} table. Works when the cursor is in a table.el table. | 13244 | Edit a @file{table.el} table. Works when the cursor is in a table.el table. |
| 13227 | @c | 13245 | @c |
| 13228 | @kindex C-c ~ | 13246 | @orgcmd{C-c ~,org-table-create-with-table.el} |
| 13229 | @item C-c ~ | ||
| 13230 | Insert a @file{table.el} table. If there is already a table at point, this | 13247 | Insert a @file{table.el} table. If there is already a table at point, this |
| 13231 | command converts it between the @file{table.el} format and the Org-mode | 13248 | command converts it between the @file{table.el} format and the Org-mode |
| 13232 | format. See the documentation string of the command | 13249 | format. See the documentation string of the command |
| @@ -13288,7 +13305,7 @@ to have other replacement keys, look at the variable | |||
| 13288 | @item @file{yasnippet.el} | 13305 | @item @file{yasnippet.el} |
| 13289 | @cindex @file{yasnippet.el} | 13306 | @cindex @file{yasnippet.el} |
| 13290 | The way Org-mode binds the TAB key (binding to @code{[tab]} instead of | 13307 | The way Org-mode binds the TAB key (binding to @code{[tab]} instead of |
| 13291 | @code{"\t"}) overrules yasnippets' access to this key. The following code | 13308 | @code{"\t"}) overrules YASnippet's access to this key. The following code |
| 13292 | fixed this problem: | 13309 | fixed this problem: |
| 13293 | 13310 | ||
| 13294 | @lisp | 13311 | @lisp |
| @@ -13341,7 +13358,7 @@ Org. | |||
| 13341 | * Add-on packages:: Available extensions | 13358 | * Add-on packages:: Available extensions |
| 13342 | * Adding hyperlink types:: New custom link types | 13359 | * Adding hyperlink types:: New custom link types |
| 13343 | * Context-sensitive commands:: How to add functionality to such commands | 13360 | * Context-sensitive commands:: How to add functionality to such commands |
| 13344 | * Tables in arbitrary syntax:: Orgtbl for La@TeX{} and other programs | 13361 | * Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs |
| 13345 | * Dynamic blocks:: Automatically filled blocks | 13362 | * Dynamic blocks:: Automatically filled blocks |
| 13346 | * Special agenda views:: Customized views | 13363 | * Special agenda views:: Customized views |
| 13347 | * Extracting agenda information:: Postprocessing of agenda information | 13364 | * Extracting agenda information:: Postprocessing of agenda information |
| @@ -13470,7 +13487,7 @@ can also set the @code{:description} property to provide a default for | |||
| 13470 | the link description when the link is later inserted into an Org | 13487 | the link description when the link is later inserted into an Org |
| 13471 | buffer with @kbd{C-c C-l}. | 13488 | buffer with @kbd{C-c C-l}. |
| 13472 | 13489 | ||
| 13473 | When is makes sense for your new link type, you may also define a function | 13490 | When it makes sense for your new link type, you may also define a function |
| 13474 | @code{org-PREFIX-complete-link} that implements special (e.g. completion) | 13491 | @code{org-PREFIX-complete-link} that implements special (e.g. completion) |
| 13475 | support for inserting such a link with @kbd{C-c C-l}. Such a function should | 13492 | support for inserting such a link with @kbd{C-c C-l}. Such a function should |
| 13476 | not accept any arguments, and return the full link with prefix. | 13493 | not accept any arguments, and return the full link with prefix. |
| @@ -13521,7 +13538,7 @@ contexts. If the function finds it should do nothing locally, it returns @code{ | |||
| 13521 | 13538 | ||
| 13522 | Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a | 13539 | Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a |
| 13523 | frequent feature request has been to make it work with native tables in | 13540 | frequent feature request has been to make it work with native tables in |
| 13524 | specific languages, for example La@TeX{}. However, this is extremely | 13541 | specific languages, for example @LaTeX{}. However, this is extremely |
| 13525 | hard to do in a general way, would lead to a customization nightmare, | 13542 | hard to do in a general way, would lead to a customization nightmare, |
| 13526 | and would take away much of the simplicity of the Orgtbl-mode table | 13543 | and would take away much of the simplicity of the Orgtbl-mode table |
| 13527 | editor. | 13544 | editor. |
| @@ -13536,7 +13553,7 @@ for a very flexible system. | |||
| 13536 | Bastien added the ability to do the same with lists, in Orgstruct mode. You | 13553 | Bastien added the ability to do the same with lists, in Orgstruct mode. You |
| 13537 | can use Org's facilities to edit and structure lists by turning | 13554 | can use Org's facilities to edit and structure lists by turning |
| 13538 | @code{orgstruct-mode} on, then locally exporting such lists in another format | 13555 | @code{orgstruct-mode} on, then locally exporting such lists in another format |
| 13539 | (HTML, La@TeX{} or Texinfo.) | 13556 | (HTML, @LaTeX{} or Texinfo.) |
| 13540 | 13557 | ||
| 13541 | 13558 | ||
| 13542 | @menu | 13559 | @menu |
| @@ -13594,7 +13611,7 @@ additional columns. | |||
| 13594 | @noindent | 13611 | @noindent |
| 13595 | The one problem remaining is how to keep the source table in the buffer | 13612 | The one problem remaining is how to keep the source table in the buffer |
| 13596 | without disturbing the normal workings of the file, for example during | 13613 | without disturbing the normal workings of the file, for example during |
| 13597 | compilation of a C file or processing of a La@TeX{} file. There are a | 13614 | compilation of a C file or processing of a @LaTeX{} file. There are a |
| 13598 | number of different solutions: | 13615 | number of different solutions: |
| 13599 | 13616 | ||
| 13600 | @itemize @bullet | 13617 | @itemize @bullet |
| @@ -13605,7 +13622,7 @@ language. For example, in C mode you could wrap the table between | |||
| 13605 | @item | 13622 | @item |
| 13606 | Sometimes it is possible to put the table after some kind of @i{END} | 13623 | Sometimes it is possible to put the table after some kind of @i{END} |
| 13607 | statement, for example @samp{\bye} in @TeX{} and @samp{\end@{document@}} | 13624 | statement, for example @samp{\bye} in @TeX{} and @samp{\end@{document@}} |
| 13608 | in La@TeX{}. | 13625 | in @LaTeX{}. |
| 13609 | @item | 13626 | @item |
| 13610 | You can just comment the table line-by-line whenever you want to process | 13627 | You can just comment the table line-by-line whenever you want to process |
| 13611 | the file, and uncomment it whenever you need to edit the table. This | 13628 | the file, and uncomment it whenever you need to edit the table. This |
| @@ -13615,14 +13632,14 @@ key. | |||
| 13615 | @end itemize | 13632 | @end itemize |
| 13616 | 13633 | ||
| 13617 | @node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax | 13634 | @node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax |
| 13618 | @subsection A La@TeX{} example of radio tables | 13635 | @subsection A @LaTeX{} example of radio tables |
| 13619 | @cindex La@TeX{}, and Orgtbl mode | 13636 | @cindex @LaTeX{}, and Orgtbl mode |
| 13620 | 13637 | ||
| 13621 | The best way to wrap the source table in La@TeX{} is to use the | 13638 | The best way to wrap the source table in @LaTeX{} is to use the |
| 13622 | @code{comment} environment provided by @file{comment.sty}. It has to be | 13639 | @code{comment} environment provided by @file{comment.sty}. It has to be |
| 13623 | activated by placing @code{\usepackage@{comment@}} into the document | 13640 | activated by placing @code{\usepackage@{comment@}} into the document |
| 13624 | header. Orgtbl mode can insert a radio table skeleton@footnote{By | 13641 | header. Orgtbl mode can insert a radio table skeleton@footnote{By |
| 13625 | default this works only for La@TeX{}, HTML, and Texinfo. Configure the | 13642 | default this works only for @LaTeX{}, HTML, and Texinfo. Configure the |
| 13626 | variable @code{orgtbl-radio-tables} to install templates for other | 13643 | variable @code{orgtbl-radio-tables} to install templates for other |
| 13627 | modes.} with the command @kbd{M-x orgtbl-insert-radio-table}. You will | 13644 | modes.} with the command @kbd{M-x orgtbl-insert-radio-table}. You will |
| 13628 | be prompted for a table name, let's say we use @samp{salesfigures}. You | 13645 | be prompted for a table name, let's say we use @samp{salesfigures}. You |
| @@ -13639,13 +13656,13 @@ will then get the following template: | |||
| 13639 | @end example | 13656 | @end example |
| 13640 | 13657 | ||
| 13641 | @noindent | 13658 | @noindent |
| 13642 | @vindex La@TeX{}-verbatim-environments | 13659 | @vindex @LaTeX{}-verbatim-environments |
| 13643 | The @code{#+ORGTBL: SEND} line tells Orgtbl mode to use the function | 13660 | The @code{#+ORGTBL: SEND} line tells Orgtbl mode to use the function |
| 13644 | @code{orgtbl-to-latex} to convert the table into La@TeX{} and to put it | 13661 | @code{orgtbl-to-latex} to convert the table into @LaTeX{} and to put it |
| 13645 | into the receiver location with name @code{salesfigures}. You may now | 13662 | into the receiver location with name @code{salesfigures}. You may now |
| 13646 | fill in the table, feel free to use the spreadsheet features@footnote{If | 13663 | fill in the table---feel free to use the spreadsheet features@footnote{If |
| 13647 | the @samp{#+TBLFM} line contains an odd number of dollar characters, | 13664 | the @samp{#+TBLFM} line contains an odd number of dollar characters, |
| 13648 | this may cause problems with font-lock in La@TeX{} mode. As shown in the | 13665 | this may cause problems with font-lock in @LaTeX{} mode. As shown in the |
| 13649 | example you can fix this by adding an extra line inside the | 13666 | example you can fix this by adding an extra line inside the |
| 13650 | @code{comment} environment that is used to balance the dollar | 13667 | @code{comment} environment that is used to balance the dollar |
| 13651 | expressions. If you are using AUC@TeX{} with the font-latex library, a | 13668 | expressions. If you are using AUC@TeX{} with the font-latex library, a |
| @@ -13695,7 +13712,7 @@ Month & \multicolumn@{1@}@{c@}@{Days@} & Nr.\ sold & per day\\ | |||
| 13695 | \end@{comment@} | 13712 | \end@{comment@} |
| 13696 | @end example | 13713 | @end example |
| 13697 | 13714 | ||
| 13698 | The La@TeX{} translator function @code{orgtbl-to-latex} is already part of | 13715 | The @LaTeX{} translator function @code{orgtbl-to-latex} is already part of |
| 13699 | Orgtbl mode. It uses a @code{tabular} environment to typeset the table | 13716 | Orgtbl mode. It uses a @code{tabular} environment to typeset the table |
| 13700 | and marks horizontal lines with @code{\hline}. Furthermore, it | 13717 | and marks horizontal lines with @code{\hline}. Furthermore, it |
| 13701 | interprets the following parameters (see also @pxref{Translator functions}): | 13718 | interprets the following parameters (see also @pxref{Translator functions}): |
| @@ -13759,7 +13776,7 @@ As you can see, the properties passed into the function (variable | |||
| 13759 | @var{PARAMS}) are combined with the ones newly defined in the function | 13776 | @var{PARAMS}) are combined with the ones newly defined in the function |
| 13760 | (variable @var{PARAMS2}). The ones passed into the function (i.e. the | 13777 | (variable @var{PARAMS2}). The ones passed into the function (i.e. the |
| 13761 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you | 13778 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you |
| 13762 | would like to use the La@TeX{} translator, but wanted the line endings to | 13779 | would like to use the @LaTeX{} translator, but wanted the line endings to |
| 13763 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just | 13780 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just |
| 13764 | overrule the default with | 13781 | overrule the default with |
| 13765 | 13782 | ||
| @@ -13768,7 +13785,7 @@ overrule the default with | |||
| 13768 | @end example | 13785 | @end example |
| 13769 | 13786 | ||
| 13770 | For a new language, you can either write your own converter function in | 13787 | For a new language, you can either write your own converter function in |
| 13771 | analogy with the La@TeX{} translator, or you can use the generic function | 13788 | analogy with the @LaTeX{} translator, or you can use the generic function |
| 13772 | directly. For example, if you have a language where a table is started | 13789 | directly. For example, if you have a language where a table is started |
| 13773 | with @samp{!BTBL!}, ended with @samp{!ETBL!}, and where table lines are | 13790 | with @samp{!BTBL!}, ended with @samp{!ETBL!}, and where table lines are |
| 13774 | started with @samp{!BL!}, ended with @samp{!EL!}, and where the field | 13791 | started with @samp{!BL!}, ended with @samp{!EL!}, and where the field |
| @@ -13802,9 +13819,9 @@ others can benefit from your work. | |||
| 13802 | @cindex radio lists | 13819 | @cindex radio lists |
| 13803 | @cindex org-list-insert-radio-list | 13820 | @cindex org-list-insert-radio-list |
| 13804 | 13821 | ||
| 13805 | Sending and receiving radio lists works exactly the same way than sending and | 13822 | Sending and receiving radio lists works exactly the same way as sending and |
| 13806 | receiving radio tables (@pxref{Radio tables}). As for radio tables, you can | 13823 | receiving radio tables (@pxref{Radio tables}). As for radio tables, you can |
| 13807 | insert radio lists templates in HTML, La@TeX{} and Texinfo modes by calling | 13824 | insert radio list templates in HTML, @LaTeX{} and Texinfo modes by calling |
| 13808 | @code{org-list-insert-radio-list}. | 13825 | @code{org-list-insert-radio-list}. |
| 13809 | 13826 | ||
| 13810 | Here are the differences with radio tables: | 13827 | Here are the differences with radio tables: |
| @@ -13821,8 +13838,8 @@ parameters. | |||
| 13821 | @kbd{C-c C-c} will work when pressed on the first item of the list. | 13838 | @kbd{C-c C-c} will work when pressed on the first item of the list. |
| 13822 | @end itemize | 13839 | @end itemize |
| 13823 | 13840 | ||
| 13824 | Here is a La@TeX{} example. Let's say that you have this in your | 13841 | Here is a @LaTeX{} example. Let's say that you have this in your |
| 13825 | La@TeX{} file: | 13842 | @LaTeX{} file: |
| 13826 | 13843 | ||
| 13827 | @cindex #+ORGLST | 13844 | @cindex #+ORGLST |
| 13828 | @example | 13845 | @example |
| @@ -13839,7 +13856,7 @@ La@TeX{} file: | |||
| 13839 | @end example | 13856 | @end example |
| 13840 | 13857 | ||
| 13841 | Pressing `C-c C-c' on @code{a new house} and will insert the converted | 13858 | Pressing `C-c C-c' on @code{a new house} and will insert the converted |
| 13842 | La@TeX{} list between the two marker lines. | 13859 | @LaTeX{} list between the two marker lines. |
| 13843 | 13860 | ||
| 13844 | @node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Hacking | 13861 | @node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Hacking |
| 13845 | @section Dynamic blocks | 13862 | @section Dynamic blocks |
| @@ -13850,11 +13867,11 @@ specially marked regions that are updated by some user-written function. | |||
| 13850 | A good example for such a block is the clock table inserted by the | 13867 | A good example for such a block is the clock table inserted by the |
| 13851 | command @kbd{C-c C-x C-r} (@pxref{Clocking work time}). | 13868 | command @kbd{C-c C-x C-r} (@pxref{Clocking work time}). |
| 13852 | 13869 | ||
| 13853 | Dynamic block are enclosed by a BEGIN-END structure that assigns a name | 13870 | Dynamic blocks are enclosed by a BEGIN-END structure that assigns a name |
| 13854 | to the block and can also specify parameters for the function producing | 13871 | to the block and can also specify parameters for the function producing |
| 13855 | the content of the block. | 13872 | the content of the block. |
| 13856 | 13873 | ||
| 13857 | #+BEGIN:dynamic block | 13874 | @cindex #+BEGIN:dynamic block |
| 13858 | @example | 13875 | @example |
| 13859 | #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ... | 13876 | #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ... |
| 13860 | 13877 | ||
| @@ -13864,11 +13881,9 @@ the content of the block. | |||
| 13864 | Dynamic blocks are updated with the following commands | 13881 | Dynamic blocks are updated with the following commands |
| 13865 | 13882 | ||
| 13866 | @table @kbd | 13883 | @table @kbd |
| 13867 | @kindex C-c C-x C-u | 13884 | @orgcmd{C-c C-x C-u,org-dblock-update} |
| 13868 | @item C-c C-x C-u | ||
| 13869 | Update dynamic block at point. | 13885 | Update dynamic block at point. |
| 13870 | @kindex C-u C-c C-x C-u | 13886 | @orgkey{C-u C-c C-x C-u} |
| 13871 | @item C-u C-c C-x C-u | ||
| 13872 | Update all dynamic blocks in the current file. | 13887 | Update all dynamic blocks in the current file. |
| 13873 | @end table | 13888 | @end table |
| 13874 | 13889 | ||
| @@ -14037,7 +14052,7 @@ You may also modify parameters on the fly like this: | |||
| 14037 | @example | 14052 | @example |
| 14038 | emacs -batch -l ~/.emacs \ | 14053 | emacs -batch -l ~/.emacs \ |
| 14039 | -eval '(org-batch-agenda "a" \ | 14054 | -eval '(org-batch-agenda "a" \ |
| 14040 | org-agenda-ndays 30 \ | 14055 | org-agenda-span month \ |
| 14041 | org-agenda-include-diary nil \ | 14056 | org-agenda-include-diary nil \ |
| 14042 | org-agenda-files (quote ("~/org/project.org")))' \ | 14057 | org-agenda-files (quote ("~/org/project.org")))' \ |
| 14043 | | lpr | 14058 | | lpr |
| @@ -14115,7 +14130,7 @@ properties. | |||
| 14115 | Get all properties of the entry at point-or-marker POM.@* | 14130 | Get all properties of the entry at point-or-marker POM.@* |
| 14116 | This includes the TODO keyword, the tags, time strings for deadline, | 14131 | This includes the TODO keyword, the tags, time strings for deadline, |
| 14117 | scheduled, and clocking, and any additional properties defined in the | 14132 | scheduled, and clocking, and any additional properties defined in the |
| 14118 | entry. The return value is an alist, keys may occur multiple times | 14133 | entry. The return value is an alist. Keys may occur multiple times |
| 14119 | if the property key was used several times.@* | 14134 | if the property key was used several times.@* |
| 14120 | POM may also be nil, in which case the current entry is used. | 14135 | POM may also be nil, in which case the current entry is used. |
| 14121 | If WHICH is nil or `all', get all properties. If WHICH is | 14136 | If WHICH is nil or `all', get all properties. If WHICH is |
| @@ -14173,7 +14188,7 @@ values and check if VALUE is in this list. | |||
| 14173 | @end defun | 14188 | @end defun |
| 14174 | 14189 | ||
| 14175 | @defopt org-property-allowed-value-functions | 14190 | @defopt org-property-allowed-value-functions |
| 14176 | Hook for functions supplying allowed values for specific. | 14191 | Hook for functions supplying allowed values for a specific property. |
| 14177 | The functions must take a single argument, the name of the property, and | 14192 | The functions must take a single argument, the name of the property, and |
| 14178 | return a flat list of allowed values. If @samp{:ETC} is one of | 14193 | return a flat list of allowed values. If @samp{:ETC} is one of |
| 14179 | the values, use the values as completion help, but allow also other values | 14194 | the values, use the values as completion help, but allow also other values |
| @@ -14252,12 +14267,12 @@ information about the entry, or in order to change metadata in the entry. | |||
| 14252 | Here are a couple of functions that might be handy: | 14267 | Here are a couple of functions that might be handy: |
| 14253 | 14268 | ||
| 14254 | @defun org-todo &optional arg | 14269 | @defun org-todo &optional arg |
| 14255 | Change the TODO state of the entry, see the docstring of the functions for | 14270 | Change the TODO state of the entry. See the docstring of the functions for |
| 14256 | the many possible values for the argument ARG. | 14271 | the many possible values for the argument ARG. |
| 14257 | @end defun | 14272 | @end defun |
| 14258 | 14273 | ||
| 14259 | @defun org-priority &optional action | 14274 | @defun org-priority &optional action |
| 14260 | Change the priority of the entry, see the docstring of this function for the | 14275 | Change the priority of the entry. See the docstring of this function for the |
| 14261 | possible values for ACTION. | 14276 | possible values for ACTION. |
| 14262 | @end defun | 14277 | @end defun |
| 14263 | 14278 | ||
| @@ -14325,7 +14340,7 @@ in-buffer settings, but it will understand the logistics of TODO state | |||
| 14325 | @node Setting up the staging area, Pushing to MobileOrg, MobileOrg, MobileOrg | 14340 | @node Setting up the staging area, Pushing to MobileOrg, MobileOrg, MobileOrg |
| 14326 | @section Setting up the staging area | 14341 | @section Setting up the staging area |
| 14327 | 14342 | ||
| 14328 | MobileOrg needs to interact with Emacs through directory on a server. If you | 14343 | MobileOrg needs to interact with Emacs through a directory on a server. If you |
| 14329 | are using a public server, you should consider to encrypt the files that are | 14344 | are using a public server, you should consider to encrypt the files that are |
| 14330 | uploaded to the server. This can be done with Org-mode 7.02 and with | 14345 | uploaded to the server. This can be done with Org-mode 7.02 and with |
| 14331 | @i{MobileOrg 1.5} (iPhone version), and you need an @file{openssl} | 14346 | @i{MobileOrg 1.5} (iPhone version), and you need an @file{openssl} |
| @@ -14340,8 +14355,7 @@ variable. Note that encryption will apply only to the contents of the | |||
| 14340 | The easiest way to create that directory is to use a free | 14355 | The easiest way to create that directory is to use a free |
| 14341 | @uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use | 14356 | @uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use |
| 14342 | Dropbox, or if your version of MobileOrg does not support it, you can use a | 14357 | Dropbox, or if your version of MobileOrg does not support it, you can use a |
| 14343 | webdav server. For more information, check out the the documentation of | 14358 | webdav server. For more information, check out the documentation of MobileOrg and also this |
| 14344 | MobileOrg and also this | ||
| 14345 | @uref{http://orgmode.org/worg/org-faq.php#mobileorg_webdav, FAQ entry}.}. | 14359 | @uref{http://orgmode.org/worg/org-faq.php#mobileorg_webdav, FAQ entry}.}. |
| 14346 | When MobileOrg first connects to your Dropbox, it will create a directory | 14360 | When MobileOrg first connects to your Dropbox, it will create a directory |
| 14347 | @i{MobileOrg} inside the Dropbox. After the directory has been created, tell | 14361 | @i{MobileOrg} inside the Dropbox. After the directory has been created, tell |
| @@ -14361,7 +14375,7 @@ This operation copies all files currently listed in @code{org-mobile-files} | |||
| 14361 | to the directory @code{org-mobile-directory}. By default this list contains | 14375 | to the directory @code{org-mobile-directory}. By default this list contains |
| 14362 | all agenda files (as listed in @code{org-agenda-files}), but additional files | 14376 | all agenda files (as listed in @code{org-agenda-files}), but additional files |
| 14363 | can be included by customizing @code{org-mobiles-files}. File names will be | 14377 | can be included by customizing @code{org-mobiles-files}. File names will be |
| 14364 | staged with path relative to @code{org-directory}, so all files should be | 14378 | staged with paths relative to @code{org-directory}, so all files should be |
| 14365 | inside this directory. The push operation also creates a special Org file | 14379 | inside this directory. The push operation also creates a special Org file |
| 14366 | @file{agendas.org} with all custom agenda view defined by the | 14380 | @file{agendas.org} with all custom agenda view defined by the |
| 14367 | user@footnote{While creating the agendas, Org-mode will force ID properties | 14381 | user@footnote{While creating the agendas, Org-mode will force ID properties |
| @@ -14415,7 +14429,7 @@ another window and also push it onto the kill ring. So you could use @kbd{? | |||
| 14415 | z C-y C-c C-c} to store that flagging note as a normal note in the entry. | 14429 | z C-y C-c C-c} to store that flagging note as a normal note in the entry. |
| 14416 | Pressing @kbd{?} twice in succession will offer to remove the | 14430 | Pressing @kbd{?} twice in succession will offer to remove the |
| 14417 | @code{:FLAGGED:} tag along with the recorded flagging note (which is stored | 14431 | @code{:FLAGGED:} tag along with the recorded flagging note (which is stored |
| 14418 | in a property). In this way you indicate, that the intended processing for | 14432 | in a property). In this way you indicate that the intended processing for |
| 14419 | this flagged entry is finished. | 14433 | this flagged entry is finished. |
| 14420 | @end table | 14434 | @end table |
| 14421 | @end enumerate | 14435 | @end enumerate |
| @@ -14475,12 +14489,12 @@ Eric and Dan are jointly responsible for the Org-babel system, which turns | |||
| 14475 | Org into a multi-language environment for evaluating code and doing literate | 14489 | Org into a multi-language environment for evaluating code and doing literate |
| 14476 | programming and reproducible research. | 14490 | programming and reproducible research. |
| 14477 | @item John Wiegley | 14491 | @item John Wiegley |
| 14478 | John has also contributed a number of great ideas and patches | 14492 | John has contributed a number of great ideas and patches directly to Org, |
| 14479 | directly to Org, including the attachment system (@file{org-attach.el}), | 14493 | including the attachment system (@file{org-attach.el}), integration with |
| 14480 | integration with Apple Mail (@file{org-mac-message.el}), hierarchical | 14494 | Apple Mail (@file{org-mac-message.el}), hierarchical dependencies of TODO |
| 14481 | dependencies of TODO items, habit tracking (@file{org-habits.el}), and | 14495 | items, habit tracking (@file{org-habits.el}), and encryption |
| 14482 | encryption (@file{org-crypt.el}). Also, the capture system is really an | 14496 | (@file{org-crypt.el}). Also, the capture system is really an extended copy |
| 14483 | extended copy of his great @file{remember.el}. | 14497 | of his great @file{remember.el}. |
| 14484 | @item Sebastian Rose | 14498 | @item Sebastian Rose |
| 14485 | Without Sebastian, the HTML/XHTML publishing of Org would be the pitiful work | 14499 | Without Sebastian, the HTML/XHTML publishing of Org would be the pitiful work |
| 14486 | of an ignorant amateur. Sebastian has pushed this part of Org onto a much | 14500 | of an ignorant amateur. Sebastian has pushed this part of Org onto a much |
| @@ -14537,8 +14551,9 @@ asked for a way to narrow wide table columns. | |||
| 14537 | @i{Thomas S. Dye} contributed documentation on Worg and helped integrating | 14551 | @i{Thomas S. Dye} contributed documentation on Worg and helped integrating |
| 14538 | the Org-Babel documentation into the manual. | 14552 | the Org-Babel documentation into the manual. |
| 14539 | @item | 14553 | @item |
| 14540 | @i{Christian Egli} converted the documentation into Texinfo format, | 14554 | @i{Christian Egli} converted the documentation into Texinfo format, inspired |
| 14541 | patched CSS formatting into the HTML exporter, and inspired the agenda. | 14555 | the agenda, patched CSS formatting into the HTML exporter, and wrote |
| 14556 | @file{org-taskjuggler.el}. | ||
| 14542 | @item | 14557 | @item |
| 14543 | @i{David Emery} provided a patch for custom CSS support in exported | 14558 | @i{David Emery} provided a patch for custom CSS support in exported |
| 14544 | HTML agendas. | 14559 | HTML agendas. |
| @@ -14556,12 +14571,21 @@ around a match in a hidden outline tree. | |||
| 14556 | @item | 14571 | @item |
| 14557 | @i{Austin Frank} works as a mailing list moderator. | 14572 | @i{Austin Frank} works as a mailing list moderator. |
| 14558 | @item | 14573 | @item |
| 14574 | @i{Eric Fraga} drove the development of BEAMER export with ideas and | ||
| 14575 | testing. | ||
| 14576 | @item | ||
| 14577 | @i{Barry Gidden} did proofreading the manual in preparation for the book | ||
| 14578 | publication through Network Theory Ltd. | ||
| 14579 | @item | ||
| 14559 | @i{Niels Giesen} had the idea to automatically archive DONE trees. | 14580 | @i{Niels Giesen} had the idea to automatically archive DONE trees. |
| 14560 | @item | 14581 | @item |
| 14561 | @i{Nicolas Goaziou} rewrote much of the plain list code. | 14582 | @i{Nicolas Goaziou} rewrote much of the plain list code. |
| 14562 | @item | 14583 | @item |
| 14563 | @i{Kai Grossjohann} pointed out key-binding conflicts with other packages. | 14584 | @i{Kai Grossjohann} pointed out key-binding conflicts with other packages. |
| 14564 | @item | 14585 | @item |
| 14586 | @i{Brian Gough} of Network Theory Ltd publishes the Org mode manual as a | ||
| 14587 | book. | ||
| 14588 | @item | ||
| 14565 | @i{Bernt Hansen} has driven much of the support for auto-repeating tasks, | 14589 | @i{Bernt Hansen} has driven much of the support for auto-repeating tasks, |
| 14566 | task state change logging, and the clocktable. His clear explanations have | 14590 | task state change logging, and the clocktable. His clear explanations have |
| 14567 | been critical when we started to adopt the Git version control system. | 14591 | been critical when we started to adopt the Git version control system. |
| @@ -14578,7 +14602,7 @@ folded entries, and column view for properties. | |||
| 14578 | @item | 14602 | @item |
| 14579 | @i{Tokuya Kameshima} wrote @file{org-wl.el} and @file{org-mew.el}. | 14603 | @i{Tokuya Kameshima} wrote @file{org-wl.el} and @file{org-mew.el}. |
| 14580 | @item | 14604 | @item |
| 14581 | @i{Shidai Liu} ("Leo") asked for embedded La@TeX{} and tested it. He also | 14605 | @i{Shidai Liu} ("Leo") asked for embedded @LaTeX{} and tested it. He also |
| 14582 | provided frequent feedback and some patches. | 14606 | provided frequent feedback and some patches. |
| 14583 | @item | 14607 | @item |
| 14584 | @i{Matt Lundin} has proposed last-row references for table formulas and named | 14608 | @i{Matt Lundin} has proposed last-row references for table formulas and named |
| @@ -14610,7 +14634,7 @@ and being able to quickly restrict the agenda to a subtree. | |||
| 14610 | @i{Tim O'Callaghan} suggested in-file links, search options for general | 14634 | @i{Tim O'Callaghan} suggested in-file links, search options for general |
| 14611 | file links, and TAGS. | 14635 | file links, and TAGS. |
| 14612 | @item | 14636 | @item |
| 14613 | @i{Osamu Okano} wrote @file{orgcard2ref.pl}, a perl program to create a text | 14637 | @i{Osamu Okano} wrote @file{orgcard2ref.pl}, a Perl program to create a text |
| 14614 | version of the reference card. | 14638 | version of the reference card. |
| 14615 | @item | 14639 | @item |
| 14616 | @i{Takeshi Okano} translated the manual and David O'Toole's tutorial | 14640 | @i{Takeshi Okano} translated the manual and David O'Toole's tutorial |
| @@ -14680,6 +14704,9 @@ with links transformation to Org syntax. | |||
| 14680 | @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual | 14704 | @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual |
| 14681 | chapter about publishing. | 14705 | chapter about publishing. |
| 14682 | @item | 14706 | @item |
| 14707 | @i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and | ||
| 14708 | enabled source code highlighling in Gnus. | ||
| 14709 | @item | ||
| 14683 | @i{Stefan Vollmar} organized a video-recorded talk at the | 14710 | @i{Stefan Vollmar} organized a video-recorded talk at the |
| 14684 | Max-Planck-Institute for Neurology. He also inspired the creation of a | 14711 | Max-Planck-Institute for Neurology. He also inspired the creation of a |
| 14685 | concept index for HTML export. | 14712 | concept index for HTML export. |
| @@ -14739,6 +14766,8 @@ org-customize @key{RET}} and then click yourself through the tree. | |||
| 14739 | @c Local variables: | 14766 | @c Local variables: |
| 14740 | @c fill-column: 77 | 14767 | @c fill-column: 77 |
| 14741 | @c indent-tabs-mode: nil | 14768 | @c indent-tabs-mode: nil |
| 14769 | @c paragraph-start: "\\|^@[a-zA-Z]*[ \n]\\|^@x?org\\(key\\|cmd\\)\\|\f\\|[ ]*$" | ||
| 14770 | @c paragraph-separate: "\\|^@[a-zA-Z]*[ \n]\\|^@x?org\\(key\\|cmd\\)\\|[ \f]*$" | ||
| 14742 | @c End: | 14771 | @c End: |
| 14743 | 14772 | ||
| 14744 | 14773 | ||
diff --git a/etc/ChangeLog b/etc/ChangeLog index 03f2edb55b2..eba8529f63d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 2 | |||
| 3 | * refcards/orgcard.tex: Cleanup. | ||
| 4 | |||
| 1 | 2010-11-27 Ulrich Mueller <ulm@gentoo.org> | 5 | 2010-11-27 Ulrich Mueller <ulm@gentoo.org> |
| 2 | 6 | ||
| 3 | * HELLO: Add ancient Greek (Bug#7418). | 7 | * HELLO: Add ancient Greek (Bug#7418). |
| @@ -1,7 +1,7 @@ | |||
| 1 | Emacs TODO List -*-outline-*- | 1 | Emacs TODO List -*-outline-*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | Free Software Foundation, Inc. | 4 | 2010 Free Software Foundation, Inc. |
| 5 | See the end of the file for license conditions. | 5 | See the end of the file for license conditions. |
| 6 | 6 | ||
| 7 | 7 | ||
| @@ -40,7 +40,6 @@ make it. | |||
| 40 | fix_submap_inheritance hack and to more cleanly express the | 40 | fix_submap_inheritance hack and to more cleanly express the |
| 41 | relationship between minibuffer-local-*-map): I've had this locally | 41 | relationship between minibuffer-local-*-map): I've had this locally |
| 42 | for a long time, but the details of the semantics is somewhat ... delicate. | 42 | for a long time, but the details of the semantics is somewhat ... delicate. |
| 43 | *** Derive from prog-mode in more places, close bug#5532. | ||
| 44 | *** prog-mode could/should provide a better fill-paragraph default | 43 | *** prog-mode could/should provide a better fill-paragraph default |
| 45 | that uses syntax-tables to recognize string/comment boundaries. | 44 | that uses syntax-tables to recognize string/comment boundaries. |
| 46 | *** provide more completion-at-point-functions. Make existing | 45 | *** provide more completion-at-point-functions. Make existing |
| @@ -56,8 +55,6 @@ suitable for anyone from beginners to experts. | |||
| 56 | 55 | ||
| 57 | ** Convert modes that use view-mode to be derived from special-mode instead. | 56 | ** Convert modes that use view-mode to be derived from special-mode instead. |
| 58 | 57 | ||
| 59 | ** Replace some uses of the preprocessor code in Makefile.in with the equivalent autoconf. | ||
| 60 | |||
| 61 | ** Major modes should have a menu entry. Examples of modes that do | 58 | ** Major modes should have a menu entry. Examples of modes that do |
| 62 | not have one at the moment and probably should: text-mode, inferior-lisp-mode. | 59 | not have one at the moment and probably should: text-mode, inferior-lisp-mode. |
| 63 | 60 | ||
| @@ -206,8 +203,7 @@ Perspectives also need to interact with the tabs. | |||
| 206 | ** Imenu could be extended into a file-structure browsing mechanism | 203 | ** Imenu could be extended into a file-structure browsing mechanism |
| 207 | using code like that of customize-groups. | 204 | using code like that of customize-groups. |
| 208 | 205 | ||
| 209 | ** Display something in the margin on lines that have compilation | 206 | ** Display something in the margin on lines that have compilation errors. |
| 210 | errors. | ||
| 211 | 207 | ||
| 212 | ** Compilation error navigation bar, parallel to the scroll bar, | 208 | ** Compilation error navigation bar, parallel to the scroll bar, |
| 213 | indicating where in the buffer there are compilation errors. | 209 | indicating where in the buffer there are compilation errors. |
| @@ -325,8 +321,7 @@ typically due to pilot errors and should thus be in debug-ignored-errors. | |||
| 325 | 321 | ||
| 326 | ** ange-ftp | 322 | ** ange-ftp |
| 327 | *** understand sftp | 323 | *** understand sftp |
| 328 | This is hard to make work because sftp doesn't print status | 324 | This is hard to make work because sftp doesn't print status messages. |
| 329 | messages. | ||
| 330 | 325 | ||
| 331 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. | 326 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. |
| 332 | 327 | ||
| @@ -364,8 +359,7 @@ typically due to pilot errors and should thus be in debug-ignored-errors. | |||
| 364 | will then come in encoded in UTF-16. | 359 | will then come in encoded in UTF-16. |
| 365 | 360 | ||
| 366 | One advantage of switching to Unicode is to toss encoded-kbd usage, | 361 | One advantage of switching to Unicode is to toss encoded-kbd usage, |
| 367 | which will solve the problem with binding non-ASCII keys with | 362 | which will solve the problem with binding non-ASCII keys with modifiers. |
| 368 | modifiers. | ||
| 369 | 363 | ||
| 370 | Problem: using this on Windows 9x/ME requires installing the | 364 | Problem: using this on Windows 9x/ME requires installing the |
| 371 | Microsoft Layer for Unicode (MSLU), which might not implement all | 365 | Microsoft Layer for Unicode (MSLU), which might not implement all |
| @@ -391,8 +385,7 @@ typically due to pilot errors and should thus be in debug-ignored-errors. | |||
| 391 | ** Make desktop.el save the "frame configuration" of Emacs (in some | 385 | ** Make desktop.el save the "frame configuration" of Emacs (in some |
| 392 | useful sense). | 386 | useful sense). |
| 393 | 387 | ||
| 394 | ** Give desktop.el a feature to switch between different named | 388 | ** Give desktop.el a feature to switch between different named desktops. |
| 395 | desktops. | ||
| 396 | 389 | ||
| 397 | ** Add a cpio mode, more or less like tar mode. | 390 | ** Add a cpio mode, more or less like tar mode. |
| 398 | 391 | ||
| @@ -447,13 +440,12 @@ http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02234.html | |||
| 447 | 440 | ||
| 448 | ** Eliminate the storm of warnings concerning char/unsigned char | 441 | ** Eliminate the storm of warnings concerning char/unsigned char |
| 449 | mismatches that we get with GCC 4.x and proprietary compilers on | 442 | mismatches that we get with GCC 4.x and proprietary compilers on |
| 450 | various systems. They make it difficult to spot the important | 443 | various systems. They make it difficult to spot the important warnings. |
| 451 | warnings. | ||
| 452 | 444 | ||
| 453 | ** Fix anything necessary to use `long long' EMACS_INTs with GCC. | 445 | ** Fix anything necessary to use `long long' EMACS_INTs with GCC. |
| 454 | 446 | ||
| 455 | ** Split out parts of lisp.h and generate Makefile dependencies | 447 | ** Split out parts of lisp.h [and generate Makefile dependencies automatically.] |
| 456 | automatically. | 448 | [the last bit is done, see DEPFLAGS etc in src/Makefile.in ] |
| 457 | 449 | ||
| 458 | ** Update the FAQ. | 450 | ** Update the FAQ. |
| 459 | 451 | ||
| @@ -466,8 +458,7 @@ http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02234.html | |||
| 466 | [Do the existing -Q and -D cover this, or is more needed?] | 458 | [Do the existing -Q and -D cover this, or is more needed?] |
| 467 | 459 | ||
| 468 | ** Improve the GC (generational, incremental). (We may be able to use | 460 | ** Improve the GC (generational, incremental). (We may be able to use |
| 469 | the Boehm collector.) [See the Boehm-GC branch in CVS for work on | 461 | the Boehm collector.) [See the Boehm-GC branch in CVS for work on this.] |
| 470 | this.] | ||
| 471 | 462 | ||
| 472 | ** Check what hooks would help Emacspeak -- see the defadvising in W3. | 463 | ** Check what hooks would help Emacspeak -- see the defadvising in W3. |
| 473 | 464 | ||
| @@ -527,8 +518,7 @@ http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02234.html | |||
| 527 | ** Reorder defcustom's in each package so that the more important | 518 | ** Reorder defcustom's in each package so that the more important |
| 528 | options come first in the Customize buffers. This could be done by | 519 | options come first in the Customize buffers. This could be done by |
| 529 | either rearranging the file (since options are shown in the order | 520 | either rearranging the file (since options are shown in the order |
| 530 | they appear in the *.el files), or by adding a few :set-after | 521 | they appear in the *.el files), or by adding a few :set-after attributes. |
| 531 | attributes. | ||
| 532 | 522 | ||
| 533 | ** Maybe document the features of libraries missing from the manual (or | 523 | ** Maybe document the features of libraries missing from the manual (or |
| 534 | ancillary manuals, including the Lisp manual in some cases). | 524 | ancillary manuals, including the Lisp manual in some cases). |
| @@ -1230,4 +1220,3 @@ GNU General Public License for more details. | |||
| 1230 | You should have received a copy of the GNU General Public License | 1220 | You should have received a copy of the GNU General Public License |
| 1231 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 1221 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 1232 | 1222 | ||
| 1233 | ;;; arch-tag: b0a3e40b-726a-457d-9999-ba848321b036 | ||
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index cd1a2d9c1a4..c55c55dcf99 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{7.3} | 2 | \def\orgversionnumber{7.4} |
| 3 | \def\versionyear{2010} % latest update | 3 | \def\versionyear{2010} % latest update |
| 4 | \def\year{2010} % latest copyright year | 4 | \def\year{2010} % latest copyright year |
| 5 | 5 | ||
| @@ -266,6 +266,10 @@ are preserved on all copies. | |||
| 266 | \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad | 266 | \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad |
| 267 | &\kbd{#3}\hfil\quad\cr} | 267 | &\kbd{#3}\hfil\quad\cr} |
| 268 | 268 | ||
| 269 | \def\noteone{{\small \hfill [1]}} | ||
| 270 | \def\notetwo{{\small \hfill [2]}} | ||
| 271 | |||
| 272 | |||
| 269 | %**end of header | 273 | %**end of header |
| 270 | 274 | ||
| 271 | 275 | ||
| @@ -274,14 +278,6 @@ are preserved on all copies. | |||
| 274 | \centerline{(for version \orgversionnumber)} | 278 | \centerline{(for version \orgversionnumber)} |
| 275 | 279 | ||
| 276 | \section{Getting Started} | 280 | \section{Getting Started} |
| 277 | % | ||
| 278 | %\vskip -2mm | ||
| 279 | %\beginexample% | ||
| 280 | %(add-to-list 'auto-mode-alist '("\\\\.org\$" . org-mode)) | ||
| 281 | %(define-key global-map "\\C-cl" 'org-store-link)$^1$ | ||
| 282 | %(define-key global-map "\\C-ca" 'org-agenda)$^1$ | ||
| 283 | %\endexample | ||
| 284 | % | ||
| 285 | \metax{To read the on-line documentation try}{M-x org-info} | 281 | \metax{To read the on-line documentation try}{M-x org-info} |
| 286 | 282 | ||
| 287 | \section{Visibility Cycling} | 283 | \section{Visibility Cycling} |
| @@ -298,7 +294,7 @@ are preserved on all copies. | |||
| 298 | \key{next/previous heading, same level}{C-c C-f/b} | 294 | \key{next/previous heading, same level}{C-c C-f/b} |
| 299 | \key{backward to higher level heading}{C-c C-u} | 295 | \key{backward to higher level heading}{C-c C-u} |
| 300 | \key{jump to another place in document}{C-c C-j} | 296 | \key{jump to another place in document}{C-c C-j} |
| 301 | \key{previous/next plain list item}{S-UP/DOWN$^3$} | 297 | \key{previous/next plain list item}{S-UP/DOWN\notetwo} |
| 302 | 298 | ||
| 303 | \section{Structure Editing} | 299 | \section{Structure Editing} |
| 304 | 300 | ||
| @@ -310,17 +306,16 @@ are preserved on all copies. | |||
| 310 | \key{turn item/line into headline}{C-c *} | 306 | \key{turn item/line into headline}{C-c *} |
| 311 | \key{promote/demote heading}{M-LEFT/RIGHT} | 307 | \key{promote/demote heading}{M-LEFT/RIGHT} |
| 312 | \metax{promote/demote current subtree}{M-S-LEFT/RIGHT} | 308 | \metax{promote/demote current subtree}{M-S-LEFT/RIGHT} |
| 313 | |||
| 314 | \metax{move subtree/list item up/down}{M-S-UP/DOWN} | 309 | \metax{move subtree/list item up/down}{M-S-UP/DOWN} |
| 315 | \metax{sort subtree/region/plain-list}{C-c \^{}} | 310 | \metax{sort subtree/region/plain-list}{C-c \^{}} |
| 316 | \metax{clone a subtree}{C-c C-x c} | 311 | \metax{clone a subtree}{C-c C-x c} |
| 317 | \metax{refile subtree}{C-c C-w} | ||
| 318 | \metax{kill/copy subtree}{C-c C-x C-w/M-w} | 312 | \metax{kill/copy subtree}{C-c C-x C-w/M-w} |
| 319 | \metax{yank subtree}{C-c C-x C-y or C-y} | 313 | \metax{yank subtree}{C-c C-x C-y or C-y} |
| 320 | \metax{narrow buffer to subtree / widen}{C-x n s/w} | 314 | \metax{narrow buffer to subtree / widen}{C-x n s/w} |
| 321 | 315 | ||
| 322 | \section{Archiving} | 316 | \section{Capture - Refile - Archiving} |
| 323 | 317 | \key{capture a new item (C-u C-u = goto last)}{C-c c \noteone} | |
| 318 | \key{refile subtree (C-u C-u = goto last)}{C-c C-w} | ||
| 324 | \key{archive subtree using the default command}{C-c C-x C-a} | 319 | \key{archive subtree using the default command}{C-c C-x C-a} |
| 325 | \key{move subtree to archive file}{C-c C-x C-s} | 320 | \key{move subtree to archive file}{C-c C-x C-s} |
| 326 | \key{toggle ARCHIVE tag / to ARCHIVE sibling}{C-c C-x a/A} | 321 | \key{toggle ARCHIVE tag / to ARCHIVE sibling}{C-c C-x a/A} |
| @@ -330,7 +325,7 @@ are preserved on all copies. | |||
| 330 | 325 | ||
| 331 | \key{construct a sparse tree by various criteria}{C-c /} | 326 | \key{construct a sparse tree by various criteria}{C-c /} |
| 332 | \key{view TODO's in sparse tree}{C-c / t/T} | 327 | \key{view TODO's in sparse tree}{C-c / t/T} |
| 333 | \key{global TODO list in agenda mode}{C-c a t$^1$} | 328 | \key{global TODO list in agenda mode}{C-c a t \noteone} |
| 334 | \key{time sorted view of current org file}{C-c a L} | 329 | \key{time sorted view of current org file}{C-c a L} |
| 335 | 330 | ||
| 336 | \section{Tables} | 331 | \section{Tables} |
| @@ -428,7 +423,7 @@ formula, \kbd{:=} a field formula. | |||
| 428 | 423 | ||
| 429 | \section{Links} | 424 | \section{Links} |
| 430 | 425 | ||
| 431 | \key{globally store link to the current location}{C-c l$^1$} | 426 | \key{globally store link to the current location}{C-c l \noteone} |
| 432 | \key{insert a link (TAB completes stored links)}{C-c C-l} | 427 | \key{insert a link (TAB completes stored links)}{C-c C-l} |
| 433 | \key{insert file link with file name completion}{C-u C-c C-l} | 428 | \key{insert file link with file name completion}{C-u C-c C-l} |
| 434 | \key{edit (also hidden part of) link at point}{C-c C-l} | 429 | \key{edit (also hidden part of) link at point}{C-c C-l} |
| @@ -444,35 +439,6 @@ formula, \kbd{:=} a field formula. | |||
| 444 | \key{edit code snippet of file at point}{C-c '} | 439 | \key{edit code snippet of file at point}{C-c '} |
| 445 | \key{toggle inline display of linked images}{C-c C-x C-v} | 440 | \key{toggle inline display of linked images}{C-c C-x C-v} |
| 446 | 441 | ||
| 447 | % {\bf Internal Links} | ||
| 448 | |||
| 449 | % \key{\kbd{<<My Target>>}}{\rm target} | ||
| 450 | % \key{\kbd{<<<My Target>>>}}{\rm radio target$^2$} | ||
| 451 | % \key{\kbd{[[*this text]]}}{\rm find headline} | ||
| 452 | % \metax{\kbd{[[this text]]}}{\rm find target or text in buffer} | ||
| 453 | % \metax{\kbd{[[this text][description]]}}{\rm optional link text} | ||
| 454 | |||
| 455 | % {\bf External Links} | ||
| 456 | |||
| 457 | % \key{\kbd{file:/home/dominik/img/mars.jpg}}{\rm file, absolute} | ||
| 458 | % \key{\kbd{file:papers/last.pdf}}{\rm file, relative} | ||
| 459 | % \key{\kbd{file:projects.org::*that text}}{\rm find headline} | ||
| 460 | % \key{\kbd{file:projects.org::find me}}{\rm find trgt/string} | ||
| 461 | % %\key{\kbd{file:projects.org::/regexp/}}{\rm regexp search} | ||
| 462 | % \key{\kbd{http://www.astro.uva.nl/~dominik}}{\rm on the web} | ||
| 463 | % \key{\kbd{mailto:adent@galaxy.net}}{\rm Email address} | ||
| 464 | % \key{\kbd{news:comp.emacs}}{\rm Usenet group} | ||
| 465 | % \key{\kbd{bbdb:Richard Stallman}}{\rm BBDB person} | ||
| 466 | % \key{\kbd{gnus:group}}{\rm GNUS group} | ||
| 467 | % \key{\kbd{gnus:group\#id}}{\rm GNUS message} | ||
| 468 | % \key{\kbd{vm|wl|mhe|rmail:folder}}{\rm Mail folder} | ||
| 469 | % \key{\kbd{vm|wl|mhe|rmail:folder\#id}}{\rm Mail message} | ||
| 470 | % \key{\kbd{info:emacs:Regexps}}{\rm Info file:node} | ||
| 471 | % \key{\kbd{shell:ls *.org}}{\rm shell command} | ||
| 472 | % \key{\kbd{elisp:(calendar)}}{\rm elisp form} | ||
| 473 | % \metax{\kbd{[[external link][description]]}}{\rm optional link text} | ||
| 474 | % %\key{\kbd{vm://myself@some.where.org/folder\#id}}{\rm VM remote} | ||
| 475 | |||
| 476 | \section{Working with Code (Babel)} | 442 | \section{Working with Code (Babel)} |
| 477 | 443 | ||
| 478 | \key{execute code block at point}{C-c C-c} | 444 | \key{execute code block at point}{C-c C-c} |
| @@ -494,25 +460,6 @@ formula, \kbd{:=} a field formula. | |||
| 494 | \key{load expanded body of the current code block into a session}{C-c C-v l} | 460 | \key{load expanded body of the current code block into a session}{C-c C-v l} |
| 495 | \key{view sha1 hash of the current code block}{C-c C-v a} | 461 | \key{view sha1 hash of the current code block}{C-c C-v a} |
| 496 | 462 | ||
| 497 | % \section{Remember-mode Integration} | ||
| 498 | |||
| 499 | % See the manual for how to make remember.el use Org-mode links and | ||
| 500 | % files. The note-finishing command \kbd{C-c C-c} will first prompt for | ||
| 501 | % an org file. In the file, find a location with: | ||
| 502 | |||
| 503 | % \key{rotate subtree visibility}{TAB} | ||
| 504 | % \key{next heading}{DOWN} | ||
| 505 | % \key{previous heading}{UP} | ||
| 506 | |||
| 507 | % Insert the note with one of the following: | ||
| 508 | |||
| 509 | % \key{as sublevel of heading at cursor}{RET} | ||
| 510 | % \key{right here (cursor not on heading)}{RET} | ||
| 511 | % \key{before current heading}{LEFT} | ||
| 512 | % \key{after current heading}{RIGHT} | ||
| 513 | % \key{shortcut to end of buffer (cursor at buf-start)}{RET} | ||
| 514 | % \key{Abort}{q} | ||
| 515 | |||
| 516 | \section{Completion} | 463 | \section{Completion} |
| 517 | 464 | ||
| 518 | In-buffer completion completes TODO keywords at headline start, TeX | 465 | In-buffer completion completes TODO keywords at headline start, TeX |
| @@ -538,11 +485,7 @@ after ``{\tt :}'', and dictionary words elsewhere. | |||
| 538 | 485 | ||
| 539 | \key{set the priority of the current item}{C-c , [ABC]} | 486 | \key{set the priority of the current item}{C-c , [ABC]} |
| 540 | \key{remove priority cookie from current item}{C-c , SPC} | 487 | \key{remove priority cookie from current item}{C-c , SPC} |
| 541 | \key{raise/lower priority of current item}{S-UP/DOWN$^3$} | 488 | \key{raise/lower priority of current item}{S-UP/DOWN\notetwo} |
| 542 | %\key{lower priority of current item}{S-DOWN$^3$} | ||
| 543 | |||
| 544 | %\key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} | ||
| 545 | %\key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} | ||
| 546 | 489 | ||
| 547 | \key{insert new checkbox item in plain list}{M-S-RET} | 490 | \key{insert new checkbox item in plain list}{M-S-RET} |
| 548 | \key{toggle checkbox(es) in region/entry/at point}{C-c C-x C-b} | 491 | \key{toggle checkbox(es) in region/entry/at point}{C-c C-x C-b} |
| @@ -585,8 +528,8 @@ after ``{\tt :}'', and dictionary words elsewhere. | |||
| 585 | \key{insert SCHEDULED timestamp}{C-c C-s} | 528 | \key{insert SCHEDULED timestamp}{C-c C-s} |
| 586 | \key{create sparse tree with all deadlines due}{C-c / d} | 529 | \key{create sparse tree with all deadlines due}{C-c / d} |
| 587 | \key{the time between 2 dates in a time range}{C-c C-y} | 530 | \key{the time between 2 dates in a time range}{C-c C-y} |
| 588 | \key{change timestamp at cursor by $\pm 1$ day}{S-RIGHT/LEFT$^3$} | 531 | \metax{change timestamp at cursor $\pm 1$ day}{S-RIGHT/LEFT\notetwo} |
| 589 | \key{change year/month/day at cursor by $\pm 1$}{S-UP/DOWN$^3$} | 532 | \key{change year/month/day at cursor by $\pm 1$}{S-UP/DOWN\notetwo} |
| 590 | \key{access the calendar for the current date}{C-c >} | 533 | \key{access the calendar for the current date}{C-c >} |
| 591 | \key{insert timestamp matching date in calendar}{C-c <} | 534 | \key{insert timestamp matching date in calendar}{C-c <} |
| 592 | \key{access agenda for current date}{C-c C-o} | 535 | \key{access agenda for current date}{C-c C-o} |
| @@ -615,15 +558,15 @@ after ``{\tt :}'', and dictionary words elsewhere. | |||
| 615 | \key{cycle through agenda file list}{C-'} | 558 | \key{cycle through agenda file list}{C-'} |
| 616 | \key{set/remove restriction lock}{C-c C-x </>} | 559 | \key{set/remove restriction lock}{C-c C-x </>} |
| 617 | 560 | ||
| 618 | \key{compile agenda for the current week}{C-c a a$^1$} | 561 | \key{compile agenda for the current week}{C-c a a \noteone} |
| 619 | \key{compile global TODO list}{C-c a t$^1$} | 562 | \key{compile global TODO list}{C-c a t \noteone} |
| 620 | \key{compile TODO list for specific keyword}{C-c a T$^1$} | 563 | \key{compile TODO list for specific keyword}{C-c a T \noteone} |
| 621 | \key{match tags, TODO kwds, properties}{C-c a m$^1$} | 564 | \key{match tags, TODO kwds, properties}{C-c a m \noteone} |
| 622 | \key{match only in TODO entries}{C-c a M$^1$} | 565 | \key{match only in TODO entries}{C-c a M \noteone} |
| 623 | \key{find stuck projects}{C-c a \#$^1$} | 566 | \key{find stuck projects}{C-c a \# \noteone} |
| 624 | \key{show timeline of current org file}{C-c a L$^1$} | 567 | \key{show timeline of current org file}{C-c a L \noteone} |
| 625 | \key{configure custom commands}{C-c a C$^1$} | 568 | \key{configure custom commands}{C-c a C \noteone} |
| 626 | %\key{configure stuck projects}{C-c a !$^1$} | 569 | %\key{configure stuck projects}{C-c a ! \noteone} |
| 627 | \key{agenda for date at cursor}{C-c C-o} | 570 | \key{agenda for date at cursor}{C-c C-o} |
| 628 | 571 | ||
| 629 | {\bf Commands available in an agenda buffer} | 572 | {\bf Commands available in an agenda buffer} |
| @@ -664,10 +607,10 @@ after ``{\tt :}'', and dictionary words elsewhere. | |||
| 664 | \key{set/show tags of current headline}{: / T} | 607 | \key{set/show tags of current headline}{: / T} |
| 665 | \key{set effort property (prefix=nth)}{e} | 608 | \key{set effort property (prefix=nth)}{e} |
| 666 | \key{set / compute priority of current item}{, / P} | 609 | \key{set / compute priority of current item}{, / P} |
| 667 | \key{raise/lower priority of current item}{S-UP/DOWN$^3$} | 610 | \key{raise/lower priority of current item}{S-UP/DOWN\notetwo} |
| 668 | \key{run an attachment command}{C-c C-a} | 611 | \key{run an attachment command}{C-c C-a} |
| 669 | \key{schedule/set deadline for this item}{C-c C-s/d} | 612 | \key{schedule/set deadline for this item}{C-c C-s/d} |
| 670 | \key{change timestamp to one day earlier/later}{S-LEFT/RIGHT$^3$} | 613 | \metax{change timestamp one day earlier/later}{S-LEFT/RIGHT\notetwo} |
| 671 | \key{change timestamp to today}{>} | 614 | \key{change timestamp to today}{>} |
| 672 | \key{insert new entry into diary}{i} | 615 | \key{insert new entry into diary}{i} |
| 673 | \newcolumn | 616 | \newcolumn |
| @@ -713,43 +656,6 @@ some other place. | |||
| 713 | \key{toggle fixed width for entry or region}{C-c :} | 656 | \key{toggle fixed width for entry or region}{C-c :} |
| 714 | \key{toggle pretty display of scripts, entities}{C-c C-x {\tt\char`\\}} | 657 | \key{toggle pretty display of scripts, entities}{C-c C-x {\tt\char`\\}} |
| 715 | 658 | ||
| 716 | %{\bf HTML formatting} | ||
| 717 | |||
| 718 | %\key{make words {\bf bold}}{*bold*} | ||
| 719 | %\key{make words {\it italic}}{/italic/} | ||
| 720 | %\key{make words \underbar{underlined}}{_underlined_} | ||
| 721 | %\key{sub- and superscripts}{x\^{}3, J_dust} | ||
| 722 | %\key{\TeX{}-like macros}{\\alpha, \\to} | ||
| 723 | %\key{typeset lines in fixed width font}{start with :} | ||
| 724 | %\key{tables are exported as HTML tables}{start with |} | ||
| 725 | %\key{links become HTML links}{http:... etc} | ||
| 726 | %\key{include html tags}{@<b>...@</b>} | ||
| 727 | |||
| 728 | %{\bf Export options} | ||
| 729 | % | ||
| 730 | %Include additional information for export by putting these anywhere in the | ||
| 731 | %org file. Use {\tt M-TAB} completion to make sure to get the right | ||
| 732 | %keywords. {\tt M-TAB} again just after keyword is complete inserts examples. | ||
| 733 | % | ||
| 734 | %\key{the title to be shown}{\#+TITLE:} | ||
| 735 | %\key{the author}{\#+AUTHOR:} | ||
| 736 | %\key{authors email address}{\#+EMAIL:} | ||
| 737 | %\key{language code for html}{\#+LANGUAGE:} | ||
| 738 | %\key{free text description of file}{\#+TEXT:} | ||
| 739 | %\key{... which can carry over multiple lines}{\#+TEXT:} | ||
| 740 | %\key{settings for the export process}{\#+OPTIONS:} | ||
| 741 | |||
| 742 | %\key{set number of headline levels for export}{H:2} | ||
| 743 | %\key{turn on/off section numbers}{num:t} | ||
| 744 | %\key{turn on/off table of contents}{toc:t} | ||
| 745 | %\key{turn on/off linebreak preservation}{\\n:nil} | ||
| 746 | %\key{turn on/off quoted html tags}{@:t} | ||
| 747 | %\key{turn on/off fixed width sections}{::t} | ||
| 748 | %\key{turn on/off tables}{|:t} | ||
| 749 | %\key{turn on/off \TeX\ syntax for sub/super-scripts}{\^{}:t} | ||
| 750 | %\key{turn on/off emphasised text}{*:nil} | ||
| 751 | %\key{turn on/off \TeX\ macros}{TeX:t} | ||
| 752 | |||
| 753 | {\bf Comments: Text not being exported} | 659 | {\bf Comments: Text not being exported} |
| 754 | 660 | ||
| 755 | Lines starting with \kbd{\#} and subtrees starting with COMMENT are | 661 | Lines starting with \kbd{\#} and subtrees starting with COMMENT are |
| @@ -763,13 +669,10 @@ never exported. | |||
| 763 | \metax{update all dynamic blocks}{C-u C-c C-x C-u} | 669 | \metax{update all dynamic blocks}{C-u C-c C-x C-u} |
| 764 | 670 | ||
| 765 | \section{Notes} | 671 | \section{Notes} |
| 766 | $^1$ This is only a suggestion for a binding of this command. Choose | 672 | [1] This is only a suggestion for a binding of this command. Choose |
| 767 | your own key as shown under INSTALLATION. | 673 | your own key as shown under INSTALLATION. |
| 768 | 674 | ||
| 769 | $^2$ After changing a \kbd{\#+KEYWORD} or \kbd{<<<target>>>} line, | 675 | [2] Keybinding affected by {\tt org-support-shift-select} and also |
| 770 | press \kbd{C-c C-c} with the cursor still in the line to update. | ||
| 771 | |||
| 772 | $^3$ Keybinding affected by {\tt org-support-shift-select} and | ||
| 773 | {\tt org-replace-disputed-keys}. | 676 | {\tt org-replace-disputed-keys}. |
| 774 | 677 | ||
| 775 | \copyrightnotice | 678 | \copyrightnotice |
diff --git a/lisp/ChangeLog.trunk b/lisp/ChangeLog.trunk index 9587fabcb5b..5b0fab21cc9 100644 --- a/lisp/ChangeLog.trunk +++ b/lisp/ChangeLog.trunk | |||
| @@ -1,3 +1,30 @@ | |||
| 1 | 2010-12-12 Karl Fogel <kfogel@red-bean.com> | ||
| 2 | |||
| 3 | * bookmark.el (bookmark-name-from-full-record): Rename back to | ||
| 4 | this original name from `bookmark-name-from-record' reverting part | ||
| 5 | of 2010-12-08T08:09:27Z!kfogel@red-bean.com / kfogel@red-bean.com-20101208080927-5j9jqnb2xvcw4ogm. | ||
| 6 | As Drew Adams pointed out, there was no reason to cause churn for | ||
| 7 | third-party callers. | ||
| 8 | |||
| 9 | 2010-12-12 Alan Mackenzie <acm@muc.de> | ||
| 10 | |||
| 11 | * progmodes/cc-engine.el (c-forward-type): Before scanning a | ||
| 12 | template arglist, check that the current language supports this. | ||
| 13 | |||
| 14 | 2010-12-11 Glenn Morris <rgm@gnu.org> | ||
| 15 | |||
| 16 | * vc/vc-bzr.el (vc-bzr-state-heuristic): Also check that the executable | ||
| 17 | state of the file matches. (Bug#7544) | ||
| 18 | (vc-bzr-register, vc-bzr-checkin) | ||
| 19 | (vc-bzr-annotate-extract-revision-at-line): Doc fixes. | ||
| 20 | (vc-directory-exclusion-list): Remove unnecessary eval-after-load. | ||
| 21 | |||
| 22 | * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. | ||
| 23 | |||
| 24 | 2010-12-11 Karel Klíč <kklic@redhat.com> | ||
| 25 | |||
| 26 | * files.el (auto-mode-alist): Use html-mode for *.xhtml. (Bug#7606) | ||
| 27 | |||
| 1 | 2010-12-10 Stefan Monnier <monnier@iro.umontreal.ca> | 28 | 2010-12-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 29 | ||
| 3 | Derive from prog-mode, use derived-mode-p, and fix up various | 30 | Derive from prog-mode, use derived-mode-p, and fix up various |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 268a370cdb6..9c1034c636e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -305,7 +305,7 @@ This point is in `bookmark-current-buffer'.") | |||
| 305 | ;; need to know anything about the format of bookmark-alist entries. | 305 | ;; need to know anything about the format of bookmark-alist entries. |
| 306 | ;; Everyone else should go through them. | 306 | ;; Everyone else should go through them. |
| 307 | 307 | ||
| 308 | (defun bookmark-name-from-record (bookmark-record) | 308 | (defun bookmark-name-from-full-record (bookmark-record) |
| 309 | "Return the name of BOOKMARK-RECORD. BOOKMARK-RECORD is, e.g., | 309 | "Return the name of BOOKMARK-RECORD. BOOKMARK-RECORD is, e.g., |
| 310 | one element from `bookmark-alist'." | 310 | one element from `bookmark-alist'." |
| 311 | (car bookmark-record)) | 311 | (car bookmark-record)) |
| @@ -314,7 +314,7 @@ one element from `bookmark-alist'." | |||
| 314 | (defun bookmark-all-names () | 314 | (defun bookmark-all-names () |
| 315 | "Return a list of all current bookmark names." | 315 | "Return a list of all current bookmark names." |
| 316 | (bookmark-maybe-load-default-file) | 316 | (bookmark-maybe-load-default-file) |
| 317 | (mapcar 'bookmark-name-from-record bookmark-alist)) | 317 | (mapcar 'bookmark-name-from-full-record bookmark-alist)) |
| 318 | 318 | ||
| 319 | 319 | ||
| 320 | (defun bookmark-get-bookmark (bookmark-name-or-record &optional noerror) | 320 | (defun bookmark-get-bookmark (bookmark-name-or-record &optional noerror) |
| @@ -1391,13 +1391,13 @@ they conflict with existing bookmark names." | |||
| 1391 | (dolist (full-record new-list) | 1391 | (dolist (full-record new-list) |
| 1392 | (bookmark-maybe-rename full-record names) | 1392 | (bookmark-maybe-rename full-record names) |
| 1393 | (setq bookmark-alist (nconc bookmark-alist (list full-record))) | 1393 | (setq bookmark-alist (nconc bookmark-alist (list full-record))) |
| 1394 | (push (bookmark-name-from-record full-record) names)))) | 1394 | (push (bookmark-name-from-full-record full-record) names)))) |
| 1395 | 1395 | ||
| 1396 | 1396 | ||
| 1397 | (defun bookmark-maybe-rename (full-record names) | 1397 | (defun bookmark-maybe-rename (full-record names) |
| 1398 | "Rename bookmark FULL-RECORD if its current name is already used. | 1398 | "Rename bookmark FULL-RECORD if its current name is already used. |
| 1399 | This is a helper for `bookmark-import-new-list'." | 1399 | This is a helper for `bookmark-import-new-list'." |
| 1400 | (let ((found-name (bookmark-name-from-record full-record))) | 1400 | (let ((found-name (bookmark-name-from-full-record full-record))) |
| 1401 | (if (member found-name names) | 1401 | (if (member found-name names) |
| 1402 | ;; We've got a conflict, so generate a new name | 1402 | ;; We've got a conflict, so generate a new name |
| 1403 | (let ((count 2) | 1403 | (let ((count 2) |
| @@ -1555,7 +1555,7 @@ deletion, or > if it is flagged for displaying." | |||
| 1555 | (add-text-properties (point-min) (point) | 1555 | (add-text-properties (point-min) (point) |
| 1556 | '(font-lock-face bookmark-menu-heading)) | 1556 | '(font-lock-face bookmark-menu-heading)) |
| 1557 | (dolist (full-record (bookmark-maybe-sort-alist)) | 1557 | (dolist (full-record (bookmark-maybe-sort-alist)) |
| 1558 | (let ((name (bookmark-name-from-record full-record)) | 1558 | (let ((name (bookmark-name-from-full-record full-record)) |
| 1559 | (annotation (bookmark-get-annotation full-record)) | 1559 | (annotation (bookmark-get-annotation full-record)) |
| 1560 | (start (point)) | 1560 | (start (point)) |
| 1561 | end) | 1561 | end) |
| @@ -1745,7 +1745,7 @@ if an annotation exists." | |||
| 1745 | (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) | 1745 | (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) |
| 1746 | (delete-region (point-min) (point-max)) | 1746 | (delete-region (point-min) (point-max)) |
| 1747 | (dolist (full-record bookmark-alist) | 1747 | (dolist (full-record bookmark-alist) |
| 1748 | (let* ((name (bookmark-name-from-record full-record)) | 1748 | (let* ((name (bookmark-name-from-full-record full-record)) |
| 1749 | (ann (bookmark-get-annotation full-record))) | 1749 | (ann (bookmark-get-annotation full-record))) |
| 1750 | (insert (concat name ":\n")) | 1750 | (insert (concat name ":\n")) |
| 1751 | (if (and ann (not (string-equal ann ""))) | 1751 | (if (and ann (not (string-equal ann ""))) |
diff --git a/lisp/files.el b/lisp/files.el index 09e2a4e0725..460b005b9ef 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2232,7 +2232,7 @@ since only a single case-insensitive search through the alist is made." | |||
| 2232 | (lambda (elt) | 2232 | (lambda (elt) |
| 2233 | (cons (purecopy (car elt)) (cdr elt))) | 2233 | (cons (purecopy (car elt)) (cdr elt))) |
| 2234 | `(;; do this first, so that .html.pl is Polish html, not Perl | 2234 | `(;; do this first, so that .html.pl is Polish html, not Perl |
| 2235 | ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode) | 2235 | ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode) |
| 2236 | ("\\.svgz?\\'" . image-mode) | 2236 | ("\\.svgz?\\'" . image-mode) |
| 2237 | ("\\.svgz?\\'" . xml-mode) | 2237 | ("\\.svgz?\\'" . xml-mode) |
| 2238 | ("\\.x[bp]m\\'" . image-mode) | 2238 | ("\\.x[bp]m\\'" . image-mode) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 18cc915b111..2ff18436ed6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2010-12-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * proto-stream.el (proto-stream-open-network-only): New function to | ||
| 4 | have a way to specify non-STARTTLS upgrade connections. | ||
| 5 | |||
| 6 | 2010-12-10 Julien Danjou <julien@danjou.info> | ||
| 7 | |||
| 8 | * gnus-gravatar.el (gnus-gravatar-transform-address): Fix error when | ||
| 9 | email address is nil. | ||
| 10 | |||
| 11 | * message.el (message-bogus-recipient-p): Set address to "" if nil. | ||
| 12 | |||
| 13 | 2010-12-10 Andrew Cohen <cohen@andy.bu.edu> | ||
| 14 | |||
| 15 | * nnir.el (nnir-request-expire-articles): Ignore expiry except for | ||
| 16 | deletion. | ||
| 17 | (nnir-run-imap): Only need to parse list once. | ||
| 18 | |||
| 1 | 2010-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org> | 19 | 2010-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 20 | ||
| 3 | * shr.el (shr-tag-script): Ignore <script>. | 21 | * shr.el (shr-tag-script): Ignore <script>. |
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index 27f65c04094..1bd64e9533f 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el | |||
| @@ -65,7 +65,7 @@ If nil, default to `gravatar-size'." | |||
| 65 | (when (or force | 65 | (when (or force |
| 66 | (not (and gnus-gravatar-too-ugly | 66 | (not (and gnus-gravatar-too-ugly |
| 67 | (or (string-match gnus-gravatar-too-ugly | 67 | (or (string-match gnus-gravatar-too-ugly |
| 68 | (cadr address)) | 68 | (or (cadr address) "")) |
| 69 | (and name | 69 | (and name |
| 70 | (string-match gnus-gravatar-too-ugly | 70 | (string-match gnus-gravatar-too-ugly |
| 71 | name)))))) | 71 | name)))))) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index de9eef5ea73..78652fb2ee0 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -4261,9 +4261,10 @@ matching entry in `message-bogus-addresses'." | |||
| 4261 | ;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"? | 4261 | ;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"? |
| 4262 | (let (found) | 4262 | (let (found) |
| 4263 | (mapc (lambda (address) | 4263 | (mapc (lambda (address) |
| 4264 | (setq address (cadr address)) | 4264 | (setq address (or (cadr address) "")) |
| 4265 | (when | 4265 | (when |
| 4266 | (or (not | 4266 | (or (string= "" address) |
| 4267 | (not | ||
| 4267 | (or | 4268 | (or |
| 4268 | (not (string-match "@" address)) | 4269 | (not (string-match "@" address)) |
| 4269 | (string-match | 4270 | (string-match |
| @@ -4277,7 +4278,7 @@ matching entry in `message-bogus-addresses'." | |||
| 4277 | "\\|") | 4278 | "\\|") |
| 4278 | message-bogus-addresses))) | 4279 | message-bogus-addresses))) |
| 4279 | (string-match re address)))) | 4280 | (string-match re address)))) |
| 4280 | (push address found))) | 4281 | (push address found))) |
| 4281 | ;; | 4282 | ;; |
| 4282 | (mail-extract-address-components recipients t)) | 4283 | (mail-extract-address-components recipients t)) |
| 4283 | found)) | 4284 | found)) |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 726b01564e7..3b1d3246c01 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -688,23 +688,25 @@ Add an entry here when adding a new search engine.") | |||
| 688 | (gnus-group-real-name to-newsgroup))))) | 688 | (gnus-group-real-name to-newsgroup))))) |
| 689 | 689 | ||
| 690 | (deffoo nnir-request-expire-articles (articles group &optional server force) | 690 | (deffoo nnir-request-expire-articles (articles group &optional server force) |
| 691 | (let ((articles-by-group (nnir-categorize | 691 | (if force |
| 692 | articles nnir-article-group nnir-article-ids)) | 692 | (let ((articles-by-group (nnir-categorize |
| 693 | not-deleted) | 693 | articles nnir-article-group nnir-article-ids)) |
| 694 | (while (not (null articles-by-group)) | 694 | not-deleted) |
| 695 | (let* ((group-articles (pop articles-by-group)) | 695 | (while (not (null articles-by-group)) |
| 696 | (artgroup (car group-articles)) | 696 | (let* ((group-articles (pop articles-by-group)) |
| 697 | (articleids (cadr group-articles)) | 697 | (artgroup (car group-articles)) |
| 698 | (artlist (sort (mapcar 'cdr articleids) '<))) | 698 | (articleids (cadr group-articles)) |
| 699 | (unless (gnus-check-backend-function 'request-expire-articles | 699 | (artlist (sort (mapcar 'cdr articleids) '<))) |
| 700 | artgroup) | 700 | (unless (gnus-check-backend-function 'request-expire-articles |
| 701 | (error "The group %s does not support article deletion" artgroup)) | 701 | artgroup) |
| 702 | (unless (gnus-check-server (gnus-find-method-for-group artgroup)) | 702 | (error "The group %s does not support article deletion" artgroup)) |
| 703 | (error "Couldn't open server for group %s" artgroup)) | 703 | (unless (gnus-check-server (gnus-find-method-for-group artgroup)) |
| 704 | (push (gnus-request-expire-articles | 704 | (error "Couldn't open server for group %s" artgroup)) |
| 705 | artlist artgroup force) | 705 | (push (gnus-request-expire-articles |
| 706 | not-deleted))) | 706 | artlist artgroup force) |
| 707 | (sort (delq nil not-deleted) '<))) | 707 | not-deleted))) |
| 708 | (sort (delq nil not-deleted) '<)) | ||
| 709 | articles)) | ||
| 708 | 710 | ||
| 709 | (deffoo nnir-warp-to-article () | 711 | (deffoo nnir-warp-to-article () |
| 710 | (let* ((cur (if (> (gnus-summary-article-number) 0) | 712 | (let* ((cur (if (> (gnus-summary-article-number) 0) |
| @@ -792,12 +794,13 @@ details on the language and supported extensions" | |||
| 792 | (nnir-imap-make-query | 794 | (nnir-imap-make-query |
| 793 | criteria qstring))))) | 795 | criteria qstring))))) |
| 794 | (mapc | 796 | (mapc |
| 795 | (lambda (artnum) (push (vector group artnum 100) artlist) | 797 | (lambda (artnum) |
| 796 | (setq arts (1+ arts))) | 798 | (let ((artn (string-to-number artnum))) |
| 797 | (and (car result) | 799 | (when (> artn 0) |
| 798 | (delete 0 (mapcar #'string-to-number | 800 | (push (vector group artn 100) |
| 799 | (cdr (assoc "SEARCH" | 801 | artlist) |
| 800 | (cdr result))))))) | 802 | (setq arts (1+ arts))))) |
| 803 | (and (car result) (cdr (assoc "SEARCH" (cdr result))))) | ||
| 801 | (message "Searching %s... %d matches" group arts))) | 804 | (message "Searching %s... %d matches" group arts))) |
| 802 | (message "Searching %s...done" group)) | 805 | (message "Searching %s...done" group)) |
| 803 | (quit nil)) | 806 | (quit nil)) |
| @@ -1581,8 +1584,10 @@ server is of form 'backend:name'." | |||
| 1581 | (or nnir-summary-line-format gnus-summary-line-format)) | 1584 | (or nnir-summary-line-format gnus-summary-line-format)) |
| 1582 | (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) | 1585 | (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) |
| 1583 | (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) | 1586 | (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) |
| 1587 | (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) | ||
| 1584 | (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) | 1588 | (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) |
| 1585 | (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t))) | 1589 | (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) |
| 1590 | (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t))) | ||
| 1586 | 1591 | ||
| 1587 | 1592 | ||
| 1588 | 1593 | ||
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 9c9054a49c7..c0072a6ef2a 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -87,6 +87,8 @@ host. | |||
| 87 | 87 | ||
| 88 | Direct connections: | 88 | Direct connections: |
| 89 | - `nntp-open-network-stream' (the default), | 89 | - `nntp-open-network-stream' (the default), |
| 90 | - `network-only' (the same as the above, but don't do automatic | ||
| 91 | STARTTLS upgrades). | ||
| 90 | - `nntp-open-ssl-stream', | 92 | - `nntp-open-ssl-stream', |
| 91 | - `nntp-open-tls-stream', | 93 | - `nntp-open-tls-stream', |
| 92 | - `nntp-open-netcat-stream'. | 94 | - `nntp-open-netcat-stream'. |
| @@ -1267,6 +1269,7 @@ password contained in '~/.nntp-authinfo'." | |||
| 1267 | (let ((coding-system-for-read nntp-coding-system-for-read) | 1269 | (let ((coding-system-for-read nntp-coding-system-for-read) |
| 1268 | (coding-system-for-write nntp-coding-system-for-write) | 1270 | (coding-system-for-write nntp-coding-system-for-write) |
| 1269 | (map '((nntp-open-network-stream network) | 1271 | (map '((nntp-open-network-stream network) |
| 1272 | (network-only network-only) | ||
| 1270 | (nntp-open-ssl-stream tls) | 1273 | (nntp-open-ssl-stream tls) |
| 1271 | (nntp-open-tls-stream tls)))) | 1274 | (nntp-open-tls-stream tls)))) |
| 1272 | (if (assoc nntp-open-connection-function map) | 1275 | (if (assoc nntp-open-connection-function map) |
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index 6c90f3a112d..e8df945b946 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el | |||
| @@ -75,10 +75,11 @@ is a string representing the capabilities of the server (if any). | |||
| 75 | The PARAMETERS is a keyword list that can have the following | 75 | The PARAMETERS is a keyword list that can have the following |
| 76 | values: | 76 | values: |
| 77 | 77 | ||
| 78 | :type -- either `network', `tls', `shell' or `starttls'. If | 78 | :type -- either `network', `network-only, `tls', `shell' or |
| 79 | omitted, the default is `network'. `network' will be | 79 | `starttls'. If omitted, the default is `network'. `network' |
| 80 | opportunistically upgraded to STARTTLS if both the server and | 80 | will be opportunistically upgraded to STARTTLS if both the server |
| 81 | Emacs supports it. | 81 | and Emacs supports it. If you don't want STARTTLS upgrades, use |
| 82 | `network-only'. | ||
| 82 | 83 | ||
| 83 | :end-of-command -- a regexp saying what the end of a command is. | 84 | :end-of-command -- a regexp saying what the end of a command is. |
| 84 | This defaults to \"\\n\". | 85 | This defaults to \"\\n\". |
| @@ -109,6 +110,9 @@ command to switch on STARTTLS otherwise." | |||
| 109 | stream) | 110 | stream) |
| 110 | greeting capabilities)))) | 111 | greeting capabilities)))) |
| 111 | 112 | ||
| 113 | (defun proto-stream-open-network-only (name buffer host service parameters) | ||
| 114 | (open-network-stream name buffer host service)) | ||
| 115 | |||
| 112 | (defun proto-stream-open-network (name buffer host service parameters) | 116 | (defun proto-stream-open-network (name buffer host service parameters) |
| 113 | (let* ((start (with-current-buffer buffer (point))) | 117 | (let* ((start (with-current-buffer buffer (point))) |
| 114 | (stream (open-network-stream name buffer host service)) | 118 | (stream (open-network-stream name buffer host service)) |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 29295d67d17..2973ff4b579 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,684 @@ | |||
| 1 | 2010-12-11 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * org-footnote.el (org-footnote-create-definition): Place | ||
| 4 | Footnotes section before message-signature-separator also in modes | ||
| 5 | derived from message-mode. | ||
| 6 | |||
| 7 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 8 | |||
| 9 | * org.el (org-make-tags-matcher): Remove useless cat-p value. | ||
| 10 | |||
| 11 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 12 | |||
| 13 | * org.el (org-entry-properties): Enhance docstring. | ||
| 14 | |||
| 15 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 16 | |||
| 17 | * org-list.el (org-list-top-point-with-indent) | ||
| 18 | (org-list-bottom-point-with-indent): Pay also attention to | ||
| 19 | 'original-indentation property of text, as blocks are put to | ||
| 20 | column 0 upon exporting. | ||
| 21 | |||
| 22 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 23 | |||
| 24 | * ob.el (org-babel-remove-temporary-directory): Handle exception | ||
| 25 | with message informing of failure to remove directory. | ||
| 26 | |||
| 27 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 28 | |||
| 29 | * ob-clojure.el (org-babel-header-arg-names:clojure): Add | ||
| 30 | `package' to the list of Clojure header arguments which will be read | ||
| 31 | from heading properties. | ||
| 32 | |||
| 33 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 34 | |||
| 35 | * org-inlinetask.el (org-inlinetask-export-templates): Add | ||
| 36 | Sébastien Vauban's suggestion for LaTeX export in docstring. This is | ||
| 37 | not default as it requires an additional LaTeX package: "todonotes". | ||
| 38 | |||
| 39 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 40 | |||
| 41 | * org-inlinetask.el (org-inlinetask-export-templates): New variable. | ||
| 42 | |||
| 43 | * org-inlinetask.el (org-inlinetask-export-handler): Make use of | ||
| 44 | templates to export inline tasks. | ||
| 45 | |||
| 46 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 47 | |||
| 48 | * org.el (org-current-level): Ignore inline tasks when getting current | ||
| 49 | level of entry. | ||
| 50 | |||
| 51 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 52 | |||
| 53 | * org.el (org-indent-line-function): Ignore drawers inside inline | ||
| 54 | tasks if the line to indent isn't inside an inline task itself. | ||
| 55 | |||
| 56 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 57 | |||
| 58 | * org-inlinetask.el (org-inlinetask-get-task-level): New function. | ||
| 59 | |||
| 60 | * org-indent.el (org-indent-add-properties): Find true level of | ||
| 61 | indentation wrt inline tasks. | ||
| 62 | |||
| 63 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 64 | |||
| 65 | * org-inlinetask.el (org-inlinetask-outline-regexp): New function. | ||
| 66 | |||
| 67 | * org-inlinetask.el (org-inlinetask-goto-beginning): New function. | ||
| 68 | |||
| 69 | * org-inlinetask.el (org-inlinetask-goto-end): New function. | ||
| 70 | |||
| 71 | * org.el (org-mark-subtree): New command. | ||
| 72 | |||
| 73 | * org.el (org-speed-commands-default, org-mode-map): Make use of | ||
| 74 | new command. | ||
| 75 | |||
| 76 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 77 | |||
| 78 | * org-inlinetask.el (org-inlinetask-export-handler): Remove protection | ||
| 79 | from @<span class...> so it can be removed during LaTeX export. | ||
| 80 | |||
| 81 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 82 | |||
| 83 | * ob.el (org-babel-insert-result): More informative code block | ||
| 84 | evaluation messages. | ||
| 85 | |||
| 86 | 2010-12-11 Matt Lundin <mdl@imapmail.org> | ||
| 87 | |||
| 88 | * org.el (org-make-heading-search-string): Optionally limit number | ||
| 89 | of lines stored in file link search strings. | ||
| 90 | (org-context-in-file-links) Add option to set to integer specifying | ||
| 91 | number of lines. | ||
| 92 | |||
| 93 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 94 | |||
| 95 | * org-capture.el (org-capture-finalize): New prefix argument | ||
| 96 | STAY-WITH-CAPTURE. | ||
| 97 | (org-capture-refile): Improve docstring. | ||
| 98 | |||
| 99 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 100 | |||
| 101 | * ob-sql.el (org-babel-execute:sql): Add msosql as optional sql | ||
| 102 | interaction engine. | ||
| 103 | |||
| 104 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 105 | |||
| 106 | * org-agenda.el (org-agenda-list): | ||
| 107 | (org-agenda-goto-today): Use `org-today'. | ||
| 108 | |||
| 109 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 110 | |||
| 111 | * org-latex.el (org-export-latex-make-header): Swap \begin{document} | ||
| 112 | and the title/author definitions. | ||
| 113 | |||
| 114 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 115 | |||
| 116 | * org-macs.el: Better backup definition for | ||
| 117 | `with-silent-modifications'. | ||
| 118 | |||
| 119 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 120 | |||
| 121 | * ob-python.el (org-babel-execute:python): Rename "prefix" to | ||
| 122 | "preamble". | ||
| 123 | (org-babel-python-evaluate): Rename "prefix" to "preamble". | ||
| 124 | (org-babel-python-evaluate-external-process): Rename "prefix" to | ||
| 125 | "preamble". | ||
| 126 | |||
| 127 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 128 | |||
| 129 | * ob.el (org-babel-examplize-region): Check if `end' is a marker | ||
| 130 | or a point and handle appropriately. | ||
| 131 | |||
| 132 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 133 | |||
| 134 | * ob-sql.el (org-babel-execute:sql): Explicitly set field | ||
| 135 | separator to \t when importing tabular data. | ||
| 136 | |||
| 137 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 138 | |||
| 139 | * org-agenda.el (org-agenda-custom-commands-local-options): | ||
| 140 | Allow org-agenda-span to be a symbol. | ||
| 141 | (org-agenda-ndays): Make obsolete. | ||
| 142 | (org-agenda-span): New variable superseding org-agenda-ndays. | ||
| 143 | (org-agenda-menu): Use org-agenda-current-span. | ||
| 144 | (org-agenda-current-span): New local variable storing current | ||
| 145 | span. | ||
| 146 | (org-agenda-list): Take a span instead of ndays as argument. | ||
| 147 | This function is now responsible for computing the ndays based | ||
| 148 | on span. | ||
| 149 | (org-agenda-ndays-to-span): Return span only if number of days | ||
| 150 | really matches. | ||
| 151 | (org-agenda-span-to-ndays): New function. | ||
| 152 | (org-agenda-manipulate-query): Use org-agenda-compute-starting-span. | ||
| 153 | (org-agenda-goto-today): Use org-agenda-compute-starting-span. | ||
| 154 | (org-agenda-later): Do not give compute a new span, use the | ||
| 155 | current one. | ||
| 156 | (org-agenda-day-view, org-agenda-week-view) | ||
| 157 | (org-agenda-month-view, org-agenda-year-view): Stop touching | ||
| 158 | org-agenda-ndays. | ||
| 159 | (org-agenda-change-time-span): Only compute starting-span. | ||
| 160 | (org-agenda-compute-starting-span): New function derived from | ||
| 161 | the old org-agenda-compute-time-span. | ||
| 162 | (org-agenda-set-mode-name): Compute mode based on | ||
| 163 | org-agenda-current-span. | ||
| 164 | (org-agenda-span-name): New function. | ||
| 165 | |||
| 166 | 2010-12-11 Robert Pluim <rpluim@gmail.com> (tiny change) | ||
| 167 | |||
| 168 | * org-agenda.el (org-agenda-toggle-deadlines): Fix docstring. | ||
| 169 | |||
| 170 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 171 | |||
| 172 | * org-clock.el (org-quarter-to-date): Define variables. | ||
| 173 | (org-clock-special-range): Defin variables. Use org-floor*. | ||
| 174 | (org-clocktable-write-default): Define tcol. | ||
| 175 | |||
| 176 | * org-compat.el (org-floor*): New function. | ||
| 177 | |||
| 178 | * org-complete.el: New file. | ||
| 179 | |||
| 180 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 181 | |||
| 182 | * org-clock.el (org-clocktable-write-default): Fix the % formula. | ||
| 183 | |||
| 184 | 2010-12-11 Matt Lundin <mdl@imapmail.org> | ||
| 185 | |||
| 186 | * org-agenda.el: (org-format-agenda-item) The value of | ||
| 187 | org-category is not converted to a string unless it is defined. | ||
| 188 | |||
| 189 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 190 | |||
| 191 | * ob-python.el (org-babel-execute:python): Pass the new "prefix" | ||
| 192 | header argument through to external evaluation. | ||
| 193 | (org-babel-python-evaluate): Pass the new "prefix" header argument | ||
| 194 | through to external evaluation. | ||
| 195 | (org-babel-python-evaluate-external-process): When specified prepend | ||
| 196 | "prefix" to the file used in external evaluation. | ||
| 197 | |||
| 198 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 199 | |||
| 200 | * ob-python.el (org-babel-python-evaluate-session): Change python | ||
| 201 | module name from 'pp' to 'pprint'. | ||
| 202 | |||
| 203 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 204 | |||
| 205 | * ob-R.el (org-babel-R-evaluate-session): Removing empty lines | ||
| 206 | from R session output, these are often the result of variable | ||
| 207 | assignments. | ||
| 208 | |||
| 209 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 210 | |||
| 211 | * ob-sql.el (orgtbl-to-csv): Declaring an external function to | ||
| 212 | fix a compiler warning. | ||
| 213 | |||
| 214 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 215 | |||
| 216 | * ob-eval.el (require): No longer require ob.el to allow | ||
| 217 | requiring by ob.el. | ||
| 218 | |||
| 219 | * ob.el (ob-eval): Require ob-eval. | ||
| 220 | |||
| 221 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 222 | |||
| 223 | * ob.el (org-babel-confirm-evaluate): Show code block's name when | ||
| 224 | it is available during evaluation query. | ||
| 225 | |||
| 226 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 227 | |||
| 228 | * ob-sql.el (org-babel-expand-body:sql): Expand the body of a sql | ||
| 229 | code block. | ||
| 230 | (org-babel-execute:sql): Use sql specific body expansion function. | ||
| 231 | (org-babel-sql-expand-vars): Insert variables into a sql code block. | ||
| 232 | |||
| 233 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 234 | |||
| 235 | * ob.el (org-babel-insert-result): Using markers instead of | ||
| 236 | points for more robust buffer anchors. | ||
| 237 | |||
| 238 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 239 | |||
| 240 | * org-capture.el: Use org-today. | ||
| 241 | |||
| 242 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 243 | |||
| 244 | * org-habit.el: Use org-today. | ||
| 245 | |||
| 246 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 247 | |||
| 248 | * org.el (org-auto-repeat-maybe): Use org-today. | ||
| 249 | |||
| 250 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 251 | |||
| 252 | * test-org.el (test-org/org-link-escape-url-with-escaped-char): Add | ||
| 253 | test for escaping and unescaping url with already escaped char. | ||
| 254 | |||
| 255 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 256 | |||
| 257 | * org-clock.el (org-day-of-week): New function. | ||
| 258 | (org-quarter-to-date): New function. | ||
| 259 | (org-clock-special-range): Implement quarters. | ||
| 260 | |||
| 261 | 2010-12-11 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> | ||
| 262 | |||
| 263 | * org.el (org-complete-tags-always-offer-all-agenda-tags): Fix | ||
| 264 | docstring. | ||
| 265 | |||
| 266 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 267 | |||
| 268 | * org-agenda.el (org-format-agenda-item): Convert category to a string | ||
| 269 | if it is a symbol. This fixes the following call to | ||
| 270 | org-agenda-get-category-icon which fails if category is not a string. | ||
| 271 | |||
| 272 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 273 | |||
| 274 | * ob-clojure.el: Updated requirements documentation to mention | ||
| 275 | the minimum version of Clojure. | ||
| 276 | (org-babel-expand-body:clojure): Fully qualified function name. | ||
| 277 | |||
| 278 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 279 | |||
| 280 | * org-latex.el (org-export-latex-lists): do not add an | ||
| 281 | unnecessary newline character after a list. | ||
| 282 | |||
| 283 | * org-list.el (org-list-bottom-point-with-indent): ensure bottom | ||
| 284 | point is just after a non blank line. | ||
| 285 | |||
| 286 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 287 | |||
| 288 | * ob.el (org-babel-examplize-region): Remove old assertion which | ||
| 289 | no longer applies to the result insertion code. | ||
| 290 | |||
| 291 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 292 | |||
| 293 | * ob-python.el (org-babel-execute:python): Use a :return header | ||
| 294 | argument for external evaluation in which the code block body need | ||
| 295 | be wrapped in a function | ||
| 296 | |||
| 297 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 298 | |||
| 299 | * ob-clojure.el (org-babel-expand-body:clojure): Trapped free | ||
| 300 | variable. | ||
| 301 | |||
| 302 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 303 | |||
| 304 | * org.el (org-edit-special): Edit formulas when in TBLMF line | ||
| 305 | |||
| 306 | 2010-12-11 Allen S. Rout <asr@ufl.edu> (tiny change) | ||
| 307 | |||
| 308 | * org-capture.el (org-capture-after-finalize-hook): New hook. | ||
| 309 | (org-capture-finalize): Run the new hook. | ||
| 310 | |||
| 311 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 312 | |||
| 313 | * ob-clojure.el (org-babel-expand-body:clojure): Support for | ||
| 314 | pretty printing of Clojure code and data. | ||
| 315 | |||
| 316 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 317 | |||
| 318 | * ob.el (org-babel-insert-result): No longer escape results which | ||
| 319 | will be wrapped in a block. | ||
| 320 | |||
| 321 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 322 | |||
| 323 | * ob-eval.el (org-babel-eval-wipe-error-buffer): Fixed compiler | ||
| 324 | warning and added documentation string. | ||
| 325 | |||
| 326 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 327 | |||
| 328 | * ob-clojure.el (org-babel-execute:clojure): Remade using slime | ||
| 329 | for all code evaluation. | ||
| 330 | |||
| 331 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 332 | |||
| 333 | * org-beamer.el (org-beamer-sectioning): Allow overlay arguments for | ||
| 334 | the column as well. | ||
| 335 | |||
| 336 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 337 | |||
| 338 | * ob.el (org-babel-confirm-evaluate): More descriptive message | ||
| 339 | when evaluation is aborted or disabled. | ||
| 340 | |||
| 341 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 342 | |||
| 343 | * ob.el (org-babel-insert-result): Responds to new "wrap" header | ||
| 344 | argument. | ||
| 345 | (org-babel-merge-params): Includes new "wrap" header argument in | ||
| 346 | one of the results header argument exclusive groups. | ||
| 347 | |||
| 348 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 349 | |||
| 350 | * org-macs.el (with-silent-modifications): Fix condition for | ||
| 351 | with-silent-modification. | ||
| 352 | |||
| 353 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 354 | |||
| 355 | * ob.el (org-babel-parse-header-arguments): Stripping trailing | ||
| 356 | spaces off of header arguments (even the first one). | ||
| 357 | |||
| 358 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 359 | |||
| 360 | * ob-sh.el (org-babel-sh-var-to-sh): Wrap end token of heredoc in | ||
| 361 | single quotes which is the best practice. | ||
| 362 | (org-babel-sh-table-or-results): Use `org-babel-script-escape' for | ||
| 363 | more robust parsing of shell output. | ||
| 364 | |||
| 365 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 366 | |||
| 367 | * org.el (org-additional-option-like-keywords): Add more keywords, | ||
| 368 | and colons to some old ones. | ||
| 369 | |||
| 370 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 371 | |||
| 372 | * ob-eval.el (org-babel-error-buffer-name): Define new variable. | ||
| 373 | |||
| 374 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 375 | |||
| 376 | * ob-python.el (org-babel-python-table-or-string): Using | ||
| 377 | `org-babel-script-escape' for reading string input from scripting | ||
| 378 | languages. | ||
| 379 | |||
| 380 | 2010-12-11 Achim Gratz <Stromeko@nexgo.de> (tiny change) | ||
| 381 | |||
| 382 | * org-macs.el (org-called-interactively-p): Wrap function call in | ||
| 383 | with-no-warnings. | ||
| 384 | (with-silent-modifications) Declare macro for Emacs < 23.2. | ||
| 385 | |||
| 386 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 387 | |||
| 388 | * org-test.el (org-test-current-file): New function. Run all tests | ||
| 389 | for current file. | ||
| 390 | |||
| 391 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 392 | |||
| 393 | * ob.el (org-babel-parse-header-arguments): Removed addition of | ||
| 394 | ":" to singleton first header arguments as it was leading to errors. | ||
| 395 | |||
| 396 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 397 | |||
| 398 | * test-org.el (test-org/org-link-escape-ascii-character) | ||
| 399 | (test-org/org-link-escape-ascii-ctrl-character) | ||
| 400 | (test-org/org-link-escape-multibyte-character) | ||
| 401 | (test-org/org-link-escape-custom-table) | ||
| 402 | (test-org/org-link-escape-custom-table-merge) | ||
| 403 | (test-org/org-link-unescape-ascii-character) | ||
| 404 | (test-org/org-link-unescape-ascii-ctrl-character) | ||
| 405 | (test-org/org-link-unescape-multibyte-character) | ||
| 406 | (test-org/org-link-unescape-ascii-extended-char): New tests for | ||
| 407 | unicode aware percent escaping. | ||
| 408 | |||
| 409 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 410 | |||
| 411 | * org-latex.el (org-export-latex-make-header): Run the title through | ||
| 412 | `org-export-latex-fontify-headline'. | ||
| 413 | (org-export-latex-fontify-headline): Do the protection of math | ||
| 414 | snippets also here. | ||
| 415 | |||
| 416 | 2010-12-11 Richard Lawrence <richard.lawrence@berkeley.edu> | ||
| 417 | |||
| 418 | * org-latex.el (org-export-as-latex): Sent the section title | ||
| 419 | through the preprocessor. | ||
| 420 | |||
| 421 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 422 | |||
| 423 | * org-html.el (org-html-level-start): Mark listified headings | ||
| 424 | with a custom id. | ||
| 425 | |||
| 426 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 427 | |||
| 428 | * org.el (org-open-at-point): Don't do footnote action if cursor is | ||
| 429 | on a bracket link. | ||
| 430 | |||
| 431 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 432 | |||
| 433 | * org.el (org-edit-special): Check also for TBLFM line. | ||
| 434 | |||
| 435 | 2010-12-11 Achim Gratz <Stromeko@Stromeko.DE> (tiny change) | ||
| 436 | |||
| 437 | * org-clock.el (org-get-clocktable): previous patch incorrectly | ||
| 438 | required whitespace in front of #+BEGIN: and #+END: | ||
| 439 | |||
| 440 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 441 | |||
| 442 | * org-src.el (org-edit-src-code): Allow region to be inherited by | ||
| 443 | edit buffer when mark is one character beyond end of src block. | ||
| 444 | |||
| 445 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 446 | |||
| 447 | * org-list.el (org-cycle-list-bullet): ensure point is at bol before | ||
| 448 | checking item indentation. | ||
| 449 | |||
| 450 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 451 | |||
| 452 | * ob.el (org-babel-map-src-blocks): Moved to earlier in the file | ||
| 453 | and now autoloading. | ||
| 454 | |||
| 455 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 456 | |||
| 457 | * ob-ref.el (org-babel-ref-at-ref-p): Use higher level function | ||
| 458 | for testing list membership. | ||
| 459 | |||
| 460 | * ob.el (org-babel-read-result): Use higher level function for | ||
| 461 | testing list membership. | ||
| 462 | (org-babel-result-end): Use higher level function for testing list | ||
| 463 | membership. | ||
| 464 | |||
| 465 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 466 | |||
| 467 | * ob-sqlite.el (ob-eval): Require ob-eval for external command | ||
| 468 | execution. | ||
| 469 | (org-babel-execute:sqlite): No longer uses the init option for | ||
| 470 | passing commands to sqlite. | ||
| 471 | |||
| 472 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 473 | |||
| 474 | * org.el (org-indent-line-function): Drawers and blocks have no | ||
| 475 | influence on indentation of text below. Also fix indentation | ||
| 476 | problem with a block at column 0 and add a special case for | ||
| 477 | literal examples. | ||
| 478 | |||
| 479 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 480 | |||
| 481 | * ob.el (org-babel-map-src-blocks): Ensure that the file argument | ||
| 482 | is only evaluated once. | ||
| 483 | |||
| 484 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 485 | |||
| 486 | * ob-ref.el (org-babel-ref-resolve): Recognize `list' as a unique | ||
| 487 | type of data | ||
| 488 | (org-babel-ref-at-ref-p): Recognize `list' as a unique type of data | ||
| 489 | |||
| 490 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 491 | |||
| 492 | * ob-tangle.el (org-babel-load-file): Can be called interactively. | ||
| 493 | |||
| 494 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> (tiny change) | ||
| 495 | |||
| 496 | * org-table.el (orgtbl-after-send-table-hook): New hook. | ||
| 497 | (orgtbl-ctrl-c-ctrl-c): Run `orgtbl-after-send-table-hook' when a | ||
| 498 | table was sent. | ||
| 499 | (orgtbl-send-table): Return the number of sent tables, or nil if no | ||
| 500 | sending has happened. | ||
| 501 | |||
| 502 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 503 | |||
| 504 | * org.el (org-get-priority-function): New option. | ||
| 505 | (org-get-priority): Call `org-get-priority-function' if that | ||
| 506 | has been set. | ||
| 507 | |||
| 508 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 509 | |||
| 510 | * ob-table.el (org-babel-table-truncate-at-newline): Only add | ||
| 511 | "..." if there is something after the newline. | ||
| 512 | |||
| 513 | 2010-12-11 Achim Gratz <Stromeko@nexgo.de> (tiny change) | ||
| 514 | |||
| 515 | * org-clock.el (org-get-clocktable): | ||
| 516 | (org-in-clocktable-p): | ||
| 517 | (org-clocktable-shift): | ||
| 518 | (org-clocktable-steps): Fix regexp to allow for indented clock tables | ||
| 519 | |||
| 520 | 2010-12-11 Puneeth Chaganti <punchagan@gmail.com> | ||
| 521 | |||
| 522 | * org-exp.el (org-export-handle-include-files): Support :minlevel | ||
| 523 | property. | ||
| 524 | (org-get-file-contents): New argument minlevel to demote included | ||
| 525 | content. | ||
| 526 | |||
| 527 | 2010-12-11 Noorul Islam <noorul@noorul.com> | ||
| 528 | |||
| 529 | * org-latex.el (org-export-latex-hyperref-format): New option. | ||
| 530 | (org-export-latex-href-format): Renamed the existing variable | ||
| 531 | `org-export-latex-hyperref-format' as `org-export-latex-href-format' | ||
| 532 | (org-export-latex-links): Use `org-export-latex-hyperref-format' and | ||
| 533 | `org-export-latex-href-format' | ||
| 534 | |||
| 535 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 536 | |||
| 537 | * ob-calc.el (org-babel-execute:calc): Ensure the *Calculator* | ||
| 538 | buffer exists before it is used. | ||
| 539 | |||
| 540 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 541 | |||
| 542 | * org-exp.el (org-export-preprocess-string): delaying code block | ||
| 543 | processing a bit to allow correct list parsing in the export string | ||
| 544 | |||
| 545 | 2010-12-11 Christopher Allan Webber <cwebber@dustycloud.org> | ||
| 546 | |||
| 547 | * org-agenda.el (org-agenda-timegrid-use-ampm): New option. | ||
| 548 | (org-agenda-time-of-day-to-ampm): New function. | ||
| 549 | (org-agenda-time-of-day-to-ampm-maybe): New function. | ||
| 550 | (org-format-agenda-item): Call org-agenda-time-of-day-to-ampm-maybe. | ||
| 551 | |||
| 552 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 553 | |||
| 554 | * org-faces.el (org-cycle-level-faces): New option. | ||
| 555 | |||
| 556 | * org.el (org-get-level-face): Honor org-cycle-level-faces. | ||
| 557 | |||
| 558 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 559 | |||
| 560 | * org-agenda.el (org-agenda-today): New function. | ||
| 561 | (org-agenda-get-day-face): New function. | ||
| 562 | (org-timeline): Use org-agenda-today and org-agenda-get-day-face. | ||
| 563 | (org-agenda-list): Use org-agenda-today and org-agenda-get-day-face. | ||
| 564 | (org-todo-list): Use org-agenda-today. | ||
| 565 | (org-get-all-dates): Use org-agenda-today. | ||
| 566 | (org-agenda-day-face-function): New variable. | ||
| 567 | (org-agenda-get-day-face): Use org-agenda-day-face-function. | ||
| 568 | |||
| 569 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 570 | |||
| 571 | * org.el (org-ctrl-c-ctrl-c): Consider sending a radio table also | ||
| 572 | in Org. | ||
| 573 | |||
| 574 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 575 | |||
| 576 | * org-html.el (org-export-as-html): Do not treat partially | ||
| 577 | protected lines as if they were fully protected. | ||
| 578 | |||
| 579 | 2010-12-11 Dan Davison <dandavison7@gmail.com> | ||
| 580 | |||
| 581 | * org-exp.el: (org-export-format-source-code-or-example): | ||
| 582 | Remove hard-wired configuration of minted export | ||
| 583 | (org-export-latex-minted-with-line-numbers): Remove variable | ||
| 584 | |||
| 585 | 2010-12-11 Bastien Guerry <bzg@altern.org> | ||
| 586 | |||
| 587 | * org-clock.el (org-dblock-write:clocktable): Fix double | ||
| 588 | reference to `link' in let construct. | ||
| 589 | (org-clock-clocktable-formatter): Fix typo in docstring. | ||
| 590 | (org-clocktable-write-default): Fix typo in docstring. | ||
| 591 | |||
| 592 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 593 | |||
| 594 | * org-protocol.el (org-protocol-unhex-string): Normalize percent | ||
| 595 | escape sequence to upper case letters. | ||
| 596 | |||
| 597 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 598 | |||
| 599 | * ob-lob.el (org-babel-lob-get-info): including pass-through | ||
| 600 | header arguments in results variable header argument string | ||
| 601 | |||
| 602 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 603 | |||
| 604 | * org-exp.el (org-export-visible): Limit search for in-buffer options | ||
| 605 | beginning of first headline. | ||
| 606 | |||
| 607 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 608 | |||
| 609 | * org.el (org-open-at-point): Remove stale link handler for news: | ||
| 610 | links. | ||
| 611 | |||
| 612 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 613 | |||
| 614 | * org-clock.el (org-clocktable-write-default): Better handling of | ||
| 615 | narrowing. | ||
| 616 | |||
| 617 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 618 | |||
| 619 | * list/org-agenda.el (org-agenda-category-icon-alist): Fix defcustom | ||
| 620 | type. | ||
| 621 | |||
| 622 | 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 623 | |||
| 624 | * org.el (org-indent-line-function): simplify code and remove bug that | ||
| 625 | would insert a tab at the beginning of the line when trying to | ||
| 626 | indent the item. | ||
| 627 | |||
| 628 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 629 | |||
| 630 | * org.el (org-diary-sexp-entry): Split sexp result strings at semicolon. | ||
| 631 | |||
| 632 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 633 | |||
| 634 | * org-agenda.el (org-agenda-prefix-format): Insert place holder | ||
| 635 | for icon. | ||
| 636 | (org-agenda-category-icon-alist): New option. | ||
| 637 | (org-agenda-get-category-icon): New function. | ||
| 638 | (org-format-agenda-item): Support for icons. | ||
| 639 | (org-compile-prefix-format): Support for icons. | ||
| 640 | |||
| 641 | 2010-12-11 Julien Danjou <julien@danjou.info> | ||
| 642 | |||
| 643 | * org-compat.el: Create defalias for `string-match-p' and | ||
| 644 | looking-at-p. | ||
| 645 | |||
| 646 | 2010-12-11 Eric Schulte <schulte.eric@gmail.com> | ||
| 647 | |||
| 648 | * ob-calc.el (org-babel-execute:calc): support for variables -- | ||
| 649 | converts :var variables in calc variables | ||
| 650 | |||
| 651 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 652 | |||
| 653 | * org.el (org-sparse-tree): Mention [r] in dispatch menu | ||
| 654 | |||
| 655 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 656 | |||
| 657 | * org-list.el (org-list-parse-list): Use `org-looking-at-p'. | ||
| 658 | |||
| 659 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 660 | |||
| 661 | * org-id.el (org-id-store-link): Test for org-mode before checking | ||
| 662 | for IDs. | ||
| 663 | |||
| 664 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 665 | |||
| 666 | * org-test.el (org-test-current-defun): `which-function' does not | ||
| 667 | return a list, but the name of the function. | ||
| 668 | |||
| 669 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 670 | |||
| 671 | * org.el (org-shorten-string): New function. | ||
| 672 | |||
| 673 | * org-exp.el (org-export-convert-protected-spaces): New function. | ||
| 674 | (org-export-preprocess-string): Call | ||
| 675 | `org-export-convert-protected-spaces' to handle new hard spaces. | ||
| 676 | |||
| 677 | 2010-12-11 David Maus <dmaus@ictsoc.de> | ||
| 678 | |||
| 679 | * org.el (org-narrow-to-subtree): Check for heading that ends at end | ||
| 680 | of buffer. | ||
| 681 | |||
| 1 | 2010-11-12 Carsten Dominik <carsten.dominik@gmail.com> | 682 | 2010-11-12 Carsten Dominik <carsten.dominik@gmail.com> |
| 2 | 683 | ||
| 3 | * org-capture.el (org-capture-templates): Remove autoload from | 684 | * org-capture.el (org-capture-templates): Remove autoload from |
diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 1c8eac65ace..da0e76894f1 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index 81d628e4206..1f4fd87b0a3 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research, R, statistics | 6 | ;; Keywords: literate programming, reproducible research, R, statistics |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -277,16 +276,18 @@ last statement in BODY, as elisp." | |||
| 277 | (butlast | 276 | (butlast |
| 278 | (delq nil | 277 | (delq nil |
| 279 | (mapcar | 278 | (mapcar |
| 280 | (lambda (line) ;; cleanup extra prompts left in output | 279 | (lambda (line) (when (> (length line) 0) line)) |
| 281 | (if (string-match | 280 | (mapcar |
| 282 | "^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) | 281 | (lambda (line) ;; cleanup extra prompts left in output |
| 283 | (substring line (match-end 1)) | 282 | (if (string-match |
| 284 | line)) | 283 | "^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) |
| 285 | (org-babel-comint-with-output (session org-babel-R-eoe-output) | 284 | (substring line (match-end 1)) |
| 286 | (insert (mapconcat #'org-babel-chomp | 285 | line)) |
| 287 | (list body org-babel-R-eoe-indicator) | 286 | (org-babel-comint-with-output (session org-babel-R-eoe-output) |
| 288 | "\n")) | 287 | (insert (mapconcat #'org-babel-chomp |
| 289 | (inferior-ess-send-input)))) 2) "\n")))) | 288 | (list body org-babel-R-eoe-indicator) |
| 289 | "\n")) | ||
| 290 | (inferior-ess-send-input)))))) "\n")))) | ||
| 290 | 291 | ||
| 291 | (defun org-babel-R-process-value-result (result column-names-p) | 292 | (defun org-babel-R-process-value-result (result column-names-p) |
| 292 | "R-specific processing of return value. | 293 | "R-specific processing of return value. |
diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index 43d65462612..ab2abda28d8 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 426aafd154f..287bad31a29 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-calc.el --- org-babel functions for calc code evaluation | 1 | ;;; ob-calc.el --- org-babel functions for calc code evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -40,25 +40,55 @@ | |||
| 40 | 40 | ||
| 41 | (defun org-babel-execute:calc (body params) | 41 | (defun org-babel-execute:calc (body params) |
| 42 | "Execute a block of calc code with Babel." | 42 | "Execute a block of calc code with Babel." |
| 43 | (mapcar | 43 | (unless (get-buffer "*Calculator*") |
| 44 | (lambda (line) | 44 | (save-window-excursion (calc) (calc-quit))) |
| 45 | (when (> (length line) 0) | 45 | (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) |
| 46 | (if (string= "'" (substring line 0 1)) | 46 | (var-syms (mapcar #'car vars)) |
| 47 | (funcall (lookup-key calc-mode-map (substring line 1)) nil) | 47 | (var-names (mapcar #'symbol-name var-syms))) |
| 48 | (calc-push-list | 48 | (mapc |
| 49 | (list ((lambda (res) | 49 | (lambda (pair) |
| 50 | (cond | 50 | (calc-push-list (list (cdr pair))) |
| 51 | ((numberp res) res) | 51 | (calc-store-into (car pair))) |
| 52 | ((listp res) (error "calc error \"%s\" on input \"%s\"" | 52 | vars) |
| 53 | (cadr res) line)) | 53 | (mapc |
| 54 | (t res)) | 54 | (lambda (line) |
| 55 | (if (numberp res) res (math-read-number res))) | 55 | (when (> (length line) 0) |
| 56 | (calc-eval line))))))) | 56 | (cond |
| 57 | (mapcar #'org-babel-trim | 57 | ;; simple variable name |
| 58 | (split-string (org-babel-expand-body:calc body params) "[\n\r]"))) | 58 | ((member line var-names) (calc-recall (intern line))) |
| 59 | ;; stack operation | ||
| 60 | ((string= "'" (substring line 0 1)) | ||
| 61 | (funcall (lookup-key calc-mode-map (substring line 1)) nil)) | ||
| 62 | ;; complex expression | ||
| 63 | (t | ||
| 64 | (calc-push-list | ||
| 65 | (list ((lambda (res) | ||
| 66 | (cond | ||
| 67 | ((numberp res) res) | ||
| 68 | ((math-read-number res) (math-read-number res)) | ||
| 69 | ((listp res) (error "calc error \"%s\" on input \"%s\"" | ||
| 70 | (cadr res) line)) | ||
| 71 | (t (calc-eval | ||
| 72 | (math-evaluate-expr | ||
| 73 | ;; resolve user variables, calc built in | ||
| 74 | ;; variables are handled automatically | ||
| 75 | ;; upstream by calc | ||
| 76 | (mapcar (lambda (el) | ||
| 77 | (if (and (consp el) (equal 'var (car el)) | ||
| 78 | (member (cadr el) var-syms)) | ||
| 79 | (progn | ||
| 80 | (calc-recall (cadr el)) | ||
| 81 | (prog1 (calc-top 1) | ||
| 82 | (calc-pop 1))) | ||
| 83 | el)) | ||
| 84 | ;; parse line into calc objects | ||
| 85 | (car (math-read-exprs line)))))))) | ||
| 86 | (calc-eval line)))))))) | ||
| 87 | (mapcar #'org-babel-trim | ||
| 88 | (split-string (org-babel-expand-body:calc body params) "[\n\r]")))) | ||
| 59 | (save-excursion | 89 | (save-excursion |
| 60 | (set-buffer (get-buffer "*Calculator*")) | 90 | (with-current-buffer (get-buffer "*Calculator*") |
| 61 | (calc-eval (calc-top 1)))) | 91 | (calc-eval (calc-top 1))))) |
| 62 | 92 | ||
| 63 | (provide 'ob-calc) | 93 | (provide 'ob-calc) |
| 64 | 94 | ||
diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index 0a76e827125..d88c54b6dbe 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el | |||
| @@ -2,10 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Joel Boehland | 5 | ;; Author: Joel Boehland, Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -24,14 +24,14 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;;; ob support for evaluating clojure code | 27 | ;;; support for evaluating clojure code, relies on slime for all eval |
| 28 | 28 | ||
| 29 | ;;; Requirements: | 29 | ;;; Requirements: |
| 30 | 30 | ||
| 31 | ;;; A working clojure install. This also implies a working java executable | 31 | ;;; - clojure (at least 1.2.0) |
| 32 | ;;; clojure-mode | 32 | ;;; - clojure-mode |
| 33 | ;;; slime | 33 | ;;; - slime |
| 34 | ;;; swank-clojure | 34 | ;;; - swank-clojure |
| 35 | 35 | ||
| 36 | ;;; By far, the best way to install these components is by following | 36 | ;;; By far, the best way to install these components is by following |
| 37 | ;;; the directions as set out by Phil Hagelberg (Technomancy) on the | 37 | ;;; the directions as set out by Phil Hagelberg (Technomancy) on the |
| @@ -39,277 +39,47 @@ | |||
| 39 | 39 | ||
| 40 | ;;; Code: | 40 | ;;; Code: |
| 41 | (require 'ob) | 41 | (require 'ob) |
| 42 | (require 'ob-eval) | ||
| 43 | (eval-when-compile (require 'cl)) | ||
| 44 | 42 | ||
| 45 | (declare-function slime-eval-async "ext:slime" (sexp &optional cont package)) | ||
| 46 | (declare-function slime-eval "ext:slime" (sexp &optional package)) | 43 | (declare-function slime-eval "ext:slime" (sexp &optional package)) |
| 47 | (declare-function swank-clojure-concat-paths "ext:slime" (paths)) | ||
| 48 | (declare-function slime "ext:slime" (&optional command coding-system)) | ||
| 49 | (declare-function slime-output-buffer "ext:slime" (&optional noprompt)) | ||
| 50 | (declare-function slime-filter-buffers "ext:slime" (predicate)) | ||
| 51 | 44 | ||
| 52 | (add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj")) | 45 | (add-to-list 'org-babel-tangle-lang-exts '("clojure" . "clj")) |
| 53 | 46 | ||
| 54 | (defvar org-babel-default-header-args:clojure '()) | 47 | (defvar org-babel-default-header-args:clojure '()) |
| 55 | 48 | (defvar org-babel-header-arg-names:clojure '(package)) | |
| 56 | (defvar org-babel-clojure-wrapper-method | ||
| 57 | " | ||
| 58 | (defn spit | ||
| 59 | [f content] | ||
| 60 | (with-open [#^java.io.PrintWriter w | ||
| 61 | (java.io.PrintWriter. | ||
| 62 | (java.io.BufferedWriter. | ||
| 63 | (java.io.OutputStreamWriter. | ||
| 64 | (java.io.FileOutputStream. | ||
| 65 | (java.io.File. f)))))] | ||
| 66 | (.print w content))) | ||
| 67 | |||
| 68 | (defn main | ||
| 69 | [] | ||
| 70 | %s) | ||
| 71 | |||
| 72 | (spit \"%s\" (str (main)))") | ||
| 73 | ;;";; <-- syntax highlighting is messed without this double quote | ||
| 74 | |||
| 75 | ;;taken mostly from clojure-test-mode.el | ||
| 76 | (defun org-babel-clojure-clojure-slime-eval (string &optional handler) | ||
| 77 | "Evaluate a STRING of clojure code using `slime-eval-async'." | ||
| 78 | (slime-eval-async `(swank:eval-and-grab-output ,string) | ||
| 79 | (or handler #'identity))) | ||
| 80 | |||
| 81 | (defun org-babel-clojure-slime-eval-sync (string) | ||
| 82 | "Evaluate a STRING of clojure code using `slime-eval'." | ||
| 83 | (slime-eval `(swank:eval-and-grab-output ,string))) | ||
| 84 | |||
| 85 | ;;taken from swank-clojure.el | ||
| 86 | (defvar swank-clojure-binary) | ||
| 87 | (defvar swank-clojure-classpath) | ||
| 88 | (defvar swank-clojure-java-path) | ||
| 89 | (defvar swank-clojure-extra-vm-args) | ||
| 90 | (defvar swank-clojure-library-paths) | ||
| 91 | (defvar swank-clojure-extra-classpaths) | ||
| 92 | (defun org-babel-clojure-babel-clojure-cmd () | ||
| 93 | "Create the command to start clojure according to current settings." | ||
| 94 | (or (when swank-clojure-binary | ||
| 95 | (if (listp swank-clojure-binary) | ||
| 96 | swank-clojure-binary | ||
| 97 | (list swank-clojure-binary))) | ||
| 98 | (when swank-clojure-classpath | ||
| 99 | (delq | ||
| 100 | nil | ||
| 101 | (append | ||
| 102 | (list swank-clojure-java-path) | ||
| 103 | swank-clojure-extra-vm-args | ||
| 104 | (list | ||
| 105 | (when swank-clojure-library-paths | ||
| 106 | (concat "-Djava.library.path=" | ||
| 107 | (swank-clojure-concat-paths swank-clojure-library-paths))) | ||
| 108 | "-classpath" | ||
| 109 | (swank-clojure-concat-paths | ||
| 110 | (append | ||
| 111 | swank-clojure-classpath | ||
| 112 | swank-clojure-extra-classpaths)) | ||
| 113 | "clojure.main")))) | ||
| 114 | (error "%s" (concat "You must specifiy either a `swank-clojure-binary' " | ||
| 115 | "or a `swank-clojure-classpath'")))) | ||
| 116 | |||
| 117 | (defun org-babel-clojure-table-or-string (results) | ||
| 118 | "Convert RESULTS to an elisp value. | ||
| 119 | If RESULTS looks like a table, then convert to an Emacs-lisp | ||
| 120 | table, otherwise return the results as a string." | ||
| 121 | (org-babel-read | ||
| 122 | (if (string-match "^\\[.+\\]$" results) | ||
| 123 | (org-babel-read | ||
| 124 | (concat "'" | ||
| 125 | (replace-regexp-in-string | ||
| 126 | "\\[" "(" (replace-regexp-in-string | ||
| 127 | "\\]" ")" (replace-regexp-in-string | ||
| 128 | ", " " " (replace-regexp-in-string | ||
| 129 | "'" "\"" results)))))) | ||
| 130 | results))) | ||
| 131 | |||
| 132 | (defun org-babel-clojure-var-to-clojure (var) | ||
| 133 | "Convert an elisp value into a clojure variable. | ||
| 134 | The elisp value VAR is converted into a string of clojure source | ||
| 135 | code specifying a variable of the same value." | ||
| 136 | (if (listp var) | ||
| 137 | (format "'%s" var) | ||
| 138 | (format "%S" var))) | ||
| 139 | |||
| 140 | (defun org-babel-clojure-build-full-form (body vars) | ||
| 141 | "Construct a clojure let form with VARS as the let variables." | ||
| 142 | (let ((vars-forms | ||
| 143 | (mapconcat ;; define any variables | ||
| 144 | (lambda (pair) | ||
| 145 | (format "%s %s" | ||
| 146 | (car pair) (org-babel-clojure-var-to-clojure (cdr pair)))) | ||
| 147 | vars "\n ")) | ||
| 148 | (body (org-babel-trim body))) | ||
| 149 | (if (> (length vars-forms) 0) | ||
| 150 | (format "(let [%s]\n %s)" vars-forms body) | ||
| 151 | body))) | ||
| 152 | |||
| 153 | (defun org-babel-prep-session:clojure (session params) | ||
| 154 | "Prepare SESSION according to the header arguments specified in PARAMS." | ||
| 155 | (require 'slime) (require 'swank-clojure) | ||
| 156 | (let* ((session-buf (org-babel-clojure-initiate-session session)) | ||
| 157 | (vars (mapcar #'cdr (org-babel-get-header params :var))) | ||
| 158 | (var-lines (mapcar ;; define any top level session variables | ||
| 159 | (lambda (pair) | ||
| 160 | (format "(def %s %s)\n" (car pair) | ||
| 161 | (org-babel-clojure-var-to-clojure (cdr pair)))) | ||
| 162 | vars))) | ||
| 163 | session-buf)) | ||
| 164 | |||
| 165 | (defun org-babel-load-session:clojure (session body params) | ||
| 166 | "Load BODY into SESSION." | ||
| 167 | (require 'slime) (require 'swank-clojure) | ||
| 168 | (save-window-excursion | ||
| 169 | (let ((buffer (org-babel-prep-session:clojure session params))) | ||
| 170 | (with-current-buffer buffer | ||
| 171 | (goto-char (point-max)) | ||
| 172 | (insert (org-babel-chomp body))) | ||
| 173 | buffer))) | ||
| 174 | |||
| 175 | (defvar org-babel-clojure-buffers '()) | ||
| 176 | (defvar org-babel-clojure-pending-sessions '()) | ||
| 177 | |||
| 178 | (defun org-babel-clojure-session-buffer (session) | ||
| 179 | "Return the buffer associated with SESSION." | ||
| 180 | (cdr (assoc session org-babel-clojure-buffers))) | ||
| 181 | |||
| 182 | (defun org-babel-clojure-initiate-session-by-key (&optional session) | ||
| 183 | "Initiate a clojure session in an inferior-process-buffer. | ||
| 184 | If there is not a current inferior-process-buffer in SESSION | ||
| 185 | then create one. Return the initialized session." | ||
| 186 | (save-window-excursion | ||
| 187 | (let* ((session (if session | ||
| 188 | (if (stringp session) (intern session) | ||
| 189 | session) | ||
| 190 | :default)) | ||
| 191 | (clojure-buffer (org-babel-clojure-session-buffer session))) | ||
| 192 | (unless (and clojure-buffer (buffer-live-p clojure-buffer)) | ||
| 193 | (setq org-babel-clojure-buffers | ||
| 194 | (assq-delete-all session org-babel-clojure-buffers)) | ||
| 195 | (push session org-babel-clojure-pending-sessions) | ||
| 196 | (slime) | ||
| 197 | ;; we are waiting to finish setting up which will be done in | ||
| 198 | ;; org-babel-clojure-session-connected-hook below. | ||
| 199 | (let ((timeout 9)) | ||
| 200 | (while (and (not (org-babel-clojure-session-buffer session)) | ||
| 201 | (< 0 timeout)) | ||
| 202 | (message "Waiting for clojure repl for session: %s ... %i" | ||
| 203 | session timeout) | ||
| 204 | (sit-for 1) | ||
| 205 | (decf timeout))) | ||
| 206 | (setq org-babel-clojure-pending-sessions | ||
| 207 | (remove session org-babel-clojure-pending-sessions)) | ||
| 208 | (unless (org-babel-clojure-session-buffer session) | ||
| 209 | (error "Couldn't create slime clojure process")) | ||
| 210 | (setq clojure-buffer (org-babel-clojure-session-buffer session))) | ||
| 211 | session))) | ||
| 212 | |||
| 213 | (defun org-babel-clojure-initiate-session (&optional session params) | ||
| 214 | "Return the slime-clojure repl buffer bound to SESSION. | ||
| 215 | Returns nil if \"none\" is specified." | ||
| 216 | (require 'slime) (require 'swank-clojure) | ||
| 217 | (unless (and (stringp session) (string= session "none")) | ||
| 218 | (org-babel-clojure-session-buffer | ||
| 219 | (org-babel-clojure-initiate-session-by-key session)))) | ||
| 220 | |||
| 221 | (defun org-babel-clojure-session-connected-hook () | ||
| 222 | "Finish binding an org-babel session to a slime-clojure repl." | ||
| 223 | (let ((pending-session (pop org-babel-clojure-pending-sessions))) | ||
| 224 | (when pending-session | ||
| 225 | (save-excursion | ||
| 226 | (switch-to-buffer (slime-output-buffer)) | ||
| 227 | (rename-buffer | ||
| 228 | (if (stringp pending-session) | ||
| 229 | pending-session (symbol-name pending-session))) | ||
| 230 | (org-babel-clojure-bind-session-to-repl-buffer | ||
| 231 | pending-session (slime-output-buffer)))))) | ||
| 232 | |||
| 233 | (add-hook 'slime-connected-hook 'org-babel-clojure-session-connected-hook) | ||
| 234 | |||
| 235 | (defun org-babel-clojure-bind-session-to-repl-buffer (session repl-buffer) | ||
| 236 | "Associate SESSION with REPL-BUFFER." | ||
| 237 | (when (stringp session) (setq session (intern session))) | ||
| 238 | (setq org-babel-clojure-buffers | ||
| 239 | (cons (cons session repl-buffer) | ||
| 240 | (assq-delete-all session org-babel-clojure-buffers)))) | ||
| 241 | |||
| 242 | (defun org-babel-clojure-repl-buffer-pred () | ||
| 243 | "Test whether the current buffer is an active slime-clojure | ||
| 244 | repl buffer." | ||
| 245 | (and (buffer-live-p (current-buffer)) (eq major-mode 'slime-repl-mode))) | ||
| 246 | |||
| 247 | (defun org-babel-clojure-bind-session-to-repl (session) | ||
| 248 | "Bind SESSION to a clojure repl." | ||
| 249 | (interactive "sEnter session name: ") | ||
| 250 | (let ((repl-bufs (slime-filter-buffers 'org-babel-clojure-repl-buffer-pred))) | ||
| 251 | (unless repl-bufs (error "No existing slime-clojure repl buffers exist")) | ||
| 252 | (let ((repl-buf (read-buffer "Choose slime-clojure repl: " repl-bufs t))) | ||
| 253 | (org-babel-clojure-bind-session-to-repl-buffer session repl-buf)))) | ||
| 254 | |||
| 255 | (defun org-babel-clojure-evaluate-external-process | ||
| 256 | (buffer body &optional result-type) | ||
| 257 | "Evaluate the body in an external process." | ||
| 258 | (let ((cmd (format "%s -" (mapconcat #'identity | ||
| 259 | (org-babel-clojure-babel-clojure-cmd) | ||
| 260 | " ")))) | ||
| 261 | (case result-type | ||
| 262 | (output (org-babel-eval cmd body)) | ||
| 263 | (value (let* ((tmp-file (org-babel-temp-file "clojure-"))) | ||
| 264 | (org-babel-eval | ||
| 265 | cmd | ||
| 266 | (format | ||
| 267 | org-babel-clojure-wrapper-method | ||
| 268 | body | ||
| 269 | (org-babel-process-file-name tmp-file 'noquote))) | ||
| 270 | (org-babel-clojure-table-or-string | ||
| 271 | (org-babel-eval-read-file tmp-file))))))) | ||
| 272 | |||
| 273 | (defun org-babel-clojure-evaluate-session (buffer body &optional result-type) | ||
| 274 | "Evaluate the body in the context of a clojure session." | ||
| 275 | (require 'slime) (require 'swank-clojure) | ||
| 276 | (let ((raw nil) | ||
| 277 | (results nil)) | ||
| 278 | (with-current-buffer buffer | ||
| 279 | (setq raw (org-babel-clojure-slime-eval-sync body)) | ||
| 280 | (setq results (reverse (mapcar #'org-babel-trim raw))) | ||
| 281 | (cond | ||
| 282 | ((equal result-type 'output) | ||
| 283 | (mapconcat #'identity (reverse (cdr results)) "\n")) | ||
| 284 | ((equal result-type 'value) | ||
| 285 | (org-babel-clojure-table-or-string (car results))))))) | ||
| 286 | |||
| 287 | (defun org-babel-clojure-evaluate (buffer body &optional result-type) | ||
| 288 | "Pass BODY to the Clojure process in BUFFER. | ||
| 289 | If RESULT-TYPE equals 'output then return a list of the outputs | ||
| 290 | of the statements in BODY, if RESULT-TYPE equals 'value then | ||
| 291 | return the value of the last statement in BODY as elisp." | ||
| 292 | (if buffer | ||
| 293 | (org-babel-clojure-evaluate-session buffer body result-type) | ||
| 294 | (org-babel-clojure-evaluate-external-process buffer body result-type))) | ||
| 295 | 49 | ||
| 296 | (defun org-babel-expand-body:clojure (body params) | 50 | (defun org-babel-expand-body:clojure (body params) |
| 297 | "Expand BODY according to PARAMS, return the expanded body." | 51 | "Expand BODY according to PARAMS, return the expanded body." |
| 298 | (org-babel-clojure-build-full-form | 52 | (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) |
| 299 | body (mapcar #'cdr (org-babel-get-header params :var)))) | 53 | (result-params (cdr (assoc :result-params params))) |
| 54 | (print-level nil) (print-length nil) | ||
| 55 | (body (org-babel-trim | ||
| 56 | (if (> (length vars) 0) | ||
| 57 | (concat "(let [" | ||
| 58 | (mapconcat | ||
| 59 | (lambda (var) | ||
| 60 | (format "%S (quote %S)" (car var) (cdr var))) | ||
| 61 | vars "\n ") | ||
| 62 | "]\n" body ")") | ||
| 63 | body)))) | ||
| 64 | (if (or (member "code" result-params) | ||
| 65 | (member "pp" result-params)) | ||
| 66 | (format (concat "(let [org-mode-print-catcher (java.io.StringWriter.)]" | ||
| 67 | "(clojure.pprint/with-pprint-dispatch %s-dispatch" | ||
| 68 | "(clojure.pprint/pprint %s org-mode-print-catcher)" | ||
| 69 | "(str org-mode-print-catcher)))") | ||
| 70 | (if (member "code" result-params) "code" "simple") body) | ||
| 71 | body))) | ||
| 300 | 72 | ||
| 301 | (defun org-babel-execute:clojure (body params) | 73 | (defun org-babel-execute:clojure (body params) |
| 302 | "Execute a block of Clojure code." | 74 | "Execute a block of Clojure code with Babel." |
| 303 | (require 'slime) (require 'swank-clojure) | 75 | (require 'slime) (require 'swank-clojure) |
| 304 | (let* ((body (org-babel-expand-body:clojure body params)) | 76 | (with-temp-buffer |
| 305 | (session (org-babel-clojure-initiate-session | 77 | (insert (org-babel-expand-body:clojure body params)) |
| 306 | (cdr (assoc :session params))))) | 78 | (read |
| 307 | (org-babel-reassemble-table | 79 | (slime-eval |
| 308 | (org-babel-clojure-evaluate session body (cdr (assoc :result-type params))) | 80 | `(swank:interactive-eval-region |
| 309 | (org-babel-pick-name | 81 | ,(buffer-substring-no-properties (point-min) (point-max))) |
| 310 | (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) | 82 | (cdr (assoc :package params)))))) |
| 311 | (org-babel-pick-name | ||
| 312 | (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)))))) | ||
| 313 | 83 | ||
| 314 | (provide 'ob-clojure) | 84 | (provide 'ob-clojure) |
| 315 | 85 | ||
diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index d05b7fbfa40..064aad539c2 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research, comint | 6 | ;; Keywords: literate programming, reproducible research, comint |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el index d93f28dcebc..48ea9e3f937 100644 --- a/lisp/org/ob-css.el +++ b/lisp/org/ob-css.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index a9b6b3ceaf1..097f938e92d 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index c78f3dbee0d..36baddb1cd3 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index f1d41b3db0d..df6f505ffea 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation | 1 | ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index 57f4dc509aa..a71cb0dd691 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research, comint | 6 | ;; Keywords: literate programming, reproducible research, comint |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -28,12 +28,13 @@ | |||
| 28 | ;; shell commands. | 28 | ;; shell commands. |
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | (require 'ob) | ||
| 32 | (eval-when-compile (require 'cl)) | 31 | (eval-when-compile (require 'cl)) |
| 33 | 32 | ||
| 33 | (defvar org-babel-error-buffer-name "*Org-Babel Error Output*") | ||
| 34 | |||
| 34 | (defun org-babel-eval-error-notify (exit-code stderr) | 35 | (defun org-babel-eval-error-notify (exit-code stderr) |
| 35 | "Open a buffer to display STDERR and a message with the value of EXIT-CODE." | 36 | "Open a buffer to display STDERR and a message with the value of EXIT-CODE." |
| 36 | (let ((buf (get-buffer-create "*Org-Babel Error Output*"))) | 37 | (let ((buf (get-buffer-create org-babel-error-buffer-name))) |
| 37 | (with-current-buffer buf | 38 | (with-current-buffer buf |
| 38 | (goto-char (point-max)) | 39 | (goto-char (point-max)) |
| 39 | (save-excursion (insert stderr))) | 40 | (save-excursion (insert stderr))) |
| @@ -44,7 +45,7 @@ | |||
| 44 | "Run CMD on BODY. | 45 | "Run CMD on BODY. |
| 45 | If CMD succeeds then return its results, otherwise display | 46 | If CMD succeeds then return its results, otherwise display |
| 46 | STDERR with `org-babel-eval-error-notify'." | 47 | STDERR with `org-babel-eval-error-notify'." |
| 47 | (let ((err-buff (get-buffer-create "*Org-Babel Error*")) exit-code) | 48 | (let ((err-buff (get-buffer-create " *Org-Babel Error*")) exit-code) |
| 48 | (with-current-buffer err-buff (erase-buffer)) | 49 | (with-current-buffer err-buff (erase-buffer)) |
| 49 | (with-temp-buffer | 50 | (with-temp-buffer |
| 50 | (insert body) | 51 | (insert body) |
| @@ -138,9 +139,9 @@ specifies the value of ERROR-BUFFER." | |||
| 138 | (if error-buffer | 139 | (if error-buffer |
| 139 | (make-temp-file | 140 | (make-temp-file |
| 140 | (expand-file-name "scor" | 141 | (expand-file-name "scor" |
| 141 | (or (unless (featurep 'xemacs) | 142 | (if (featurep 'xemacs) |
| 142 | small-temporary-file-directory) | 143 | (temp-directory) |
| 143 | temporary-file-directory))) | 144 | temporary-file-directory))) |
| 144 | nil)) | 145 | nil)) |
| 145 | exit-status) | 146 | exit-status) |
| 146 | (if (or replace | 147 | (if (or replace |
| @@ -247,6 +248,13 @@ specifies the value of ERROR-BUFFER." | |||
| 247 | (delete-file error-file)) | 248 | (delete-file error-file)) |
| 248 | exit-status)) | 249 | exit-status)) |
| 249 | 250 | ||
| 251 | (defun org-babel-eval-wipe-error-buffer () | ||
| 252 | "Delete the contents of the Org code block error buffer. | ||
| 253 | This buffer is named by `org-babel-error-buffer-name'." | ||
| 254 | (when (get-buffer org-babel-error-buffer-name) | ||
| 255 | (with-current-buffer org-babel-error-buffer-name | ||
| 256 | (delete-region (point-min) (point-max))))) | ||
| 257 | |||
| 250 | (provide 'ob-eval) | 258 | (provide 'ob-eval) |
| 251 | 259 | ||
| 252 | ;; arch-tag: 5328b17f-957d-42d9-94da-a2952682d04d | 260 | ;; arch-tag: 5328b17f-957d-42d9-94da-a2952682d04d |
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 52da00103f6..8b6914c903c 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte, Dan Davison | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -39,8 +39,7 @@ | |||
| 39 | (defvar org-babel-lob-one-liner-regexp) | 39 | (defvar org-babel-lob-one-liner-regexp) |
| 40 | (defvar org-babel-ref-split-regexp) | 40 | (defvar org-babel-ref-split-regexp) |
| 41 | (declare-function org-babel-lob-get-info "ob-lob" ()) | 41 | (declare-function org-babel-lob-get-info "ob-lob" ()) |
| 42 | (declare-function org-babel-ref-literal "ob-ref" (ref)) | 42 | (declare-function org-babel-eval-wipe-error-buffer "ob-eval" ()) |
| 43 | |||
| 44 | (add-to-list 'org-export-interblocks '(src org-babel-exp-inline-src-blocks)) | 43 | (add-to-list 'org-export-interblocks '(src org-babel-exp-inline-src-blocks)) |
| 45 | (add-to-list 'org-export-interblocks '(lob org-babel-exp-lob-one-liners)) | 44 | (add-to-list 'org-export-interblocks '(lob org-babel-exp-lob-one-liners)) |
| 46 | (add-hook 'org-export-blocks-postblock-hook 'org-exp-res/src-name-cleanup) | 45 | (add-hook 'org-export-blocks-postblock-hook 'org-exp-res/src-name-cleanup) |
| @@ -289,6 +288,7 @@ inhibit insertion of results into the buffer." | |||
| 289 | (org-babel-process-params (nth 2 info)))) | 288 | (org-babel-process-params (nth 2 info)))) |
| 290 | ;; skip code blocks which we can't evaluate | 289 | ;; skip code blocks which we can't evaluate |
| 291 | (when (fboundp (intern (concat "org-babel-execute:" lang))) | 290 | (when (fboundp (intern (concat "org-babel-execute:" lang))) |
| 291 | (org-babel-eval-wipe-error-buffer) | ||
| 292 | (if (equal type 'inline) | 292 | (if (equal type 'inline) |
| 293 | (let ((raw (org-babel-execute-src-block | 293 | (let ((raw (org-babel-execute-src-block |
| 294 | nil info '((:results . "silent")))) | 294 | nil info '((:results . "silent")))) |
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 053d154610b..423e47e8669 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index 1ae8fba66b6..734e1f6c891 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -136,16 +136,7 @@ then create one. Return the initialized session." | |||
| 136 | "Convert RESULTS to an Emacs-lisp table or string. | 136 | "Convert RESULTS to an Emacs-lisp table or string. |
| 137 | If RESULTS look like a table, then convert them into an | 137 | If RESULTS look like a table, then convert them into an |
| 138 | Emacs-lisp table, otherwise return the results as a string." | 138 | Emacs-lisp table, otherwise return the results as a string." |
| 139 | (org-babel-read | 139 | (org-babel-script-escape results)) |
| 140 | (if (and (stringp results) (string-match "^\\[.+\\]$" results)) | ||
| 141 | (org-babel-read | ||
| 142 | (concat "'" | ||
| 143 | (replace-regexp-in-string | ||
| 144 | "\\[" "(" (replace-regexp-in-string | ||
| 145 | "\\]" ")" (replace-regexp-in-string | ||
| 146 | "," " " (replace-regexp-in-string | ||
| 147 | "'" "\"" results)))))) | ||
| 148 | results))) | ||
| 149 | 140 | ||
| 150 | (defun org-babel-haskell-var-to-haskell (var) | 141 | (defun org-babel-haskell-var-to-haskell (var) |
| 151 | "Convert an elisp value VAR into a haskell variable. | 142 | "Convert an elisp value VAR into a haskell variable. |
diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index dc652a95c96..05f8ea41754 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el | |||
| @@ -1,26 +1,28 @@ | |||
| 1 | ;;; ob-js.el --- org-babel functions for Javascript | 1 | ;;; ob-js.el --- org-babel functions for Javascript |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research, js | 6 | ;; Keywords: literate programming, reproducible research, js |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;;; License: |
| 11 | 11 | ||
| 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; This program is free software; you can redistribute it and/or modify |
| 13 | ;; it under the terms of the GNU General Public License as published by | 13 | ;; it under the terms of the GNU General Public License as published by |
| 14 | ;; the Free Software Foundation, either version 3 of the License, or | 14 | ;; the Free Software Foundation; either version 3, or (at your option) |
| 15 | ;; (at your option) any later version. | 15 | ;; any later version. |
| 16 | 16 | ;; | |
| 17 | ;; GNU Emacs is distributed in the hope that it will be useful, | 17 | ;; This program is distributed in the hope that it will be useful, |
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;; GNU General Public License for more details. | 20 | ;; GNU General Public License for more details. |
| 21 | 21 | ;; | |
| 22 | ;; You should have received a copy of the GNU General Public License | 22 | ;; You should have received a copy of the GNU General Public License |
| 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 24 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 25 | ;; Boston, MA 02110-1301, USA. | ||
| 24 | 26 | ||
| 25 | ;;; Commentary: | 27 | ;;; Commentary: |
| 26 | 28 | ||
| @@ -33,7 +35,7 @@ | |||
| 33 | 35 | ||
| 34 | ;; - a non-browser javascript engine such as node.js http://nodejs.org/ | 36 | ;; - a non-browser javascript engine such as node.js http://nodejs.org/ |
| 35 | ;; or mozrepl http://wiki.github.com/bard/mozrepl/ | 37 | ;; or mozrepl http://wiki.github.com/bard/mozrepl/ |
| 36 | ;; | 38 | ;; |
| 37 | ;; - for session based evaluation mozrepl and moz.el are required see | 39 | ;; - for session based evaluation mozrepl and moz.el are required see |
| 38 | ;; http://wiki.github.com/bard/mozrepl/emacs-integration for | 40 | ;; http://wiki.github.com/bard/mozrepl/emacs-integration for |
| 39 | ;; configuration instructions | 41 | ;; configuration instructions |
diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index e04d9ade6bc..af8190692cd 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index f4cf0802de6..96afbcd92a6 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-ledger.el b/lisp/org/ob-ledger.el index 33ec9d3a898..a02eb6fec86 100644 --- a/lisp/org/ob-ledger.el +++ b/lisp/org/ob-ledger.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric S Fraga | 5 | ;; Author: Eric S Fraga |
| 6 | ;; Keywords: literate programming, reproducible research, accounting | 6 | ;; Keywords: literate programming, reproducible research, accounting |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index 3f9ac673279..600b79ee7af 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el | |||
| @@ -1,27 +1,28 @@ | |||
| 1 | ;;; ob-lisp.el --- org-babel functions for Common Lisp | 1 | ;;; ob-lisp.el --- org-babel functions for Common Lisp |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: David T. O'Toole <dto@gnu.org> | 5 | ;; Author: David T. O'Toole <dto@gnu.org>, Eric Schulte |
| 6 | ;; Eric Schulte | ||
| 7 | ;; Keywords: literate programming, reproducible research, lisp | 6 | ;; Keywords: literate programming, reproducible research, lisp |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;;; License: |
| 12 | 11 | ||
| 13 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; This program is free software; you can redistribute it and/or modify |
| 14 | ;; it under the terms of the GNU General Public License as published by | 13 | ;; it under the terms of the GNU General Public License as published by |
| 15 | ;; the Free Software Foundation, either version 3 of the License, or | 14 | ;; the Free Software Foundation; either version 3, or (at your option) |
| 16 | ;; (at your option) any later version. | 15 | ;; any later version. |
| 17 | 16 | ;; | |
| 18 | ;; GNU Emacs is distributed in the hope that it will be useful, | 17 | ;; This program is distributed in the hope that it will be useful, |
| 19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | ;; GNU General Public License for more details. | 20 | ;; GNU General Public License for more details. |
| 22 | 21 | ;; | |
| 23 | ;; You should have received a copy of the GNU General Public License | 22 | ;; You should have received a copy of the GNU General Public License |
| 24 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 24 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 25 | ;; Boston, MA 02110-1301, USA. | ||
| 25 | 26 | ||
| 26 | ;;; Commentary: | 27 | ;;; Commentary: |
| 27 | 28 | ||
| @@ -40,16 +41,18 @@ | |||
| 40 | (require 'ob-ref) | 41 | (require 'ob-ref) |
| 41 | (require 'ob-comint) | 42 | (require 'ob-comint) |
| 42 | (require 'ob-eval) | 43 | (require 'ob-eval) |
| 43 | (declare-function slime-eval "ext:slime" (form)) | 44 | |
| 45 | (declare-function slime-eval "ext:slime" (sexp &optional package)) | ||
| 46 | (declare-function slime-process "ext:slime" (&optional connection)) | ||
| 44 | (declare-function slime-connected-p "ext:slime" ()) | 47 | (declare-function slime-connected-p "ext:slime" ()) |
| 45 | (declare-function slime-process "ext:slime" ()) | ||
| 46 | (require 'slime nil 'noerror) | ||
| 47 | 48 | ||
| 48 | (defvar org-babel-default-header-args:lisp '() | 49 | (defvar org-babel-default-header-args:lisp '() |
| 49 | "Default header arguments for lisp code blocks.") | 50 | "Default header arguments for lisp code blocks.") |
| 50 | 51 | ||
| 51 | (defcustom org-babel-lisp-cmd "sbcl --script" | 52 | (defcustom org-babel-lisp-cmd "sbcl --script" |
| 52 | "Name of command used to evaluate lisp blocks.") | 53 | "Name of command used to evaluate lisp blocks." |
| 54 | :group 'org-babel | ||
| 55 | :type 'string) | ||
| 53 | 56 | ||
| 54 | (defun org-babel-expand-body:lisp (body params) | 57 | (defun org-babel-expand-body:lisp (body params) |
| 55 | "Expand BODY according to PARAMS, return the expanded body." | 58 | "Expand BODY according to PARAMS, return the expanded body." |
| @@ -65,6 +68,7 @@ | |||
| 65 | (defun org-babel-execute:lisp (body params) | 68 | (defun org-babel-execute:lisp (body params) |
| 66 | "Execute a block of Lisp code with org-babel. | 69 | "Execute a block of Lisp code with org-babel. |
| 67 | This function is called by `org-babel-execute-src-block'" | 70 | This function is called by `org-babel-execute-src-block'" |
| 71 | (require 'slime) | ||
| 68 | (message "executing Lisp source code block") | 72 | (message "executing Lisp source code block") |
| 69 | (let* ((session (org-babel-lisp-initiate-session | 73 | (let* ((session (org-babel-lisp-initiate-session |
| 70 | (cdr (assoc :session params)))) | 74 | (cdr (assoc :session params)))) |
| @@ -96,6 +100,7 @@ This function is called by `org-babel-execute-src-block'" | |||
| 96 | (defun org-babel-lisp-initiate-session (&optional session) | 100 | (defun org-babel-lisp-initiate-session (&optional session) |
| 97 | "If there is not a current inferior-process-buffer in SESSION | 101 | "If there is not a current inferior-process-buffer in SESSION |
| 98 | then create. Return the initialized session." | 102 | then create. Return the initialized session." |
| 103 | (require 'slime) | ||
| 99 | (unless (string= session "none") | 104 | (unless (string= session "none") |
| 100 | (save-window-excursion | 105 | (save-window-excursion |
| 101 | (or (slime-connected-p) | 106 | (or (slime-connected-p) |
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 243666c0a1b..137a6bce9a3 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -26,7 +25,7 @@ | |||
| 26 | ;;; Commentary: | 25 | ;;; Commentary: |
| 27 | 26 | ||
| 28 | ;; See the online documentation for more information | 27 | ;; See the online documentation for more information |
| 29 | ;; | 28 | ;; |
| 30 | ;; http://orgmode.org/worg/org-contrib/babel/ | 29 | ;; http://orgmode.org/worg/org-contrib/babel/ |
| 31 | 30 | ||
| 32 | ;;; Code: | 31 | ;;; Code: |
| @@ -72,7 +71,8 @@ If you change the value of this variable then your files may | |||
| 72 | (concat | 71 | (concat |
| 73 | "^\\([ \t]*\\)#\\+\\(?:" | 72 | "^\\([ \t]*\\)#\\+\\(?:" |
| 74 | (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|") | 73 | (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|") |
| 75 | "\\):[ \t]+\\([^\(\)\n]+\\)\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\([^\n]*\\)") | 74 | "\\):[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" |
| 75 | "\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\([^\n]*\\)") | ||
| 76 | "Regexp to match calls to predefined source block functions.") | 76 | "Regexp to match calls to predefined source block functions.") |
| 77 | 77 | ||
| 78 | ;; functions for executing lob one-liners | 78 | ;; functions for executing lob one-liners |
| @@ -93,13 +93,16 @@ if so then run the appropriate source block from the Library." | |||
| 93 | (beginning-of-line 1) | 93 | (beginning-of-line 1) |
| 94 | (if (looking-at org-babel-lob-one-liner-regexp) | 94 | (if (looking-at org-babel-lob-one-liner-regexp) |
| 95 | (append | 95 | (append |
| 96 | (mapcar #'org-babel-clean-text-properties | 96 | (mapcar #'org-babel-clean-text-properties |
| 97 | (list | 97 | (list |
| 98 | (format "%s(%s)%s" | 98 | (format "%s%s(%s)%s" |
| 99 | (match-string 2) (match-string 3) (match-string 4)) | 99 | (match-string 2) |
| 100 | (match-string 5))) | 100 | (if (match-string 4) |
| 101 | (concat "[" (match-string 4) "]") "") | ||
| 102 | (or (match-string 6) "") (match-string 7)) | ||
| 103 | (match-string 8))) | ||
| 101 | (list (length (match-string 1)))))))) | 104 | (list (length (match-string 1)))))))) |
| 102 | 105 | ||
| 103 | (defun org-babel-lob-execute (info) | 106 | (defun org-babel-lob-execute (info) |
| 104 | "Execute the lob call specified by INFO." | 107 | "Execute the lob call specified by INFO." |
| 105 | (let ((params (org-babel-process-params | 108 | (let ((params (org-babel-process-params |
diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el index c75d806cc62..192c73d9081 100644 --- a/lisp/org/ob-matlab.el +++ b/lisp/org/ob-matlab.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Dan Davison | 5 | ;; Author: Dan Davison |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index 119d28cfba0..98230da56a3 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Juan Pechiar | 5 | ;; Author: Juan Pechiar |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 2217118e537..459dcf336f7 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index d6affecd74d..9fcd825f91e 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Dan Davison | 5 | ;; Author: Dan Davison |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index 86abbabfb13..c03fa07602a 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index 23c0353fcb0..1e0cecb1af0 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | ;;; ob-perl.el --- org-babel functions for perl evaluation | 1 | ;;; ob-perl.el --- org-babel functions for perl evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Dan Davison | 5 | ;; Author: Dan Davison, Eric Schulte |
| 6 | ;; Eric Schulte | ||
| 7 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index 37561020cb0..fb81dc8e60d 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Zhang Weize | 5 | ;; Author: Zhang Weize |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 22cb5337d7a..27b69bff5ab 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | ;;; ob-python.el --- org-babel functions for python evaluation | 1 | ;;; ob-python.el --- org-babel functions for python evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -57,11 +56,15 @@ This function is called by `org-babel-execute-src-block'." | |||
| 57 | (cdr (assoc :session params)))) | 56 | (cdr (assoc :session params)))) |
| 58 | (result-params (cdr (assoc :result-params params))) | 57 | (result-params (cdr (assoc :result-params params))) |
| 59 | (result-type (cdr (assoc :result-type params))) | 58 | (result-type (cdr (assoc :result-type params))) |
| 59 | (return-val (when (and (eq result-type 'value) (not session)) | ||
| 60 | (cdr (assoc :return params)))) | ||
| 61 | (preamble (cdr (assoc :preamble params))) | ||
| 60 | (full-body | 62 | (full-body |
| 61 | (org-babel-expand-body:generic | 63 | (org-babel-expand-body:generic |
| 62 | body params (org-babel-variable-assignments:python params))) | 64 | (concat body (if return-val (format "return %s" return-val) "")) |
| 65 | params (org-babel-variable-assignments:python params))) | ||
| 63 | (result (org-babel-python-evaluate | 66 | (result (org-babel-python-evaluate |
| 64 | session full-body result-type result-params))) | 67 | session full-body result-type result-params preamble))) |
| 65 | (or (cdr (assoc :file params)) | 68 | (or (cdr (assoc :file params)) |
| 66 | (org-babel-reassemble-table | 69 | (org-babel-reassemble-table |
| 67 | result | 70 | result |
| @@ -118,20 +121,7 @@ specifying a variable of the same value." | |||
| 118 | "Convert RESULTS into an appropriate elisp value. | 121 | "Convert RESULTS into an appropriate elisp value. |
| 119 | If the results look like a list or tuple, then convert them into an | 122 | If the results look like a list or tuple, then convert them into an |
| 120 | Emacs-lisp table, otherwise return the results as a string." | 123 | Emacs-lisp table, otherwise return the results as a string." |
| 121 | ((lambda (res) | 124 | (org-babel-script-escape results)) |
| 122 | (if (listp res) | ||
| 123 | (mapcar (lambda (el) (if (equal el 'None) 'hline el)) res) | ||
| 124 | res)) | ||
| 125 | (org-babel-read | ||
| 126 | (if (and (stringp results) (string-match "^[([].+[])]$" results)) | ||
| 127 | (org-babel-read | ||
| 128 | (concat "'" | ||
| 129 | (replace-regexp-in-string | ||
| 130 | "\\[" "(" (replace-regexp-in-string | ||
| 131 | "\\]" ")" (replace-regexp-in-string | ||
| 132 | ", " " " (replace-regexp-in-string | ||
| 133 | "'" "\"" results t)))))) | ||
| 134 | results)))) | ||
| 135 | 125 | ||
| 136 | (defvar org-babel-python-buffers '((:default . nil))) | 126 | (defvar org-babel-python-buffers '((:default . nil))) |
| 137 | 127 | ||
| @@ -192,35 +182,38 @@ def main(): | |||
| 192 | open('%s', 'w').write( pprint.pformat(main()) )") | 182 | open('%s', 'w').write( pprint.pformat(main()) )") |
| 193 | 183 | ||
| 194 | (defun org-babel-python-evaluate | 184 | (defun org-babel-python-evaluate |
| 195 | (session body &optional result-type result-params) | 185 | (session body &optional result-type result-params preamble) |
| 196 | "Evaluate BODY as python code." | 186 | "Evaluate BODY as python code." |
| 197 | (if session | 187 | (if session |
| 198 | (org-babel-python-evaluate-session | 188 | (org-babel-python-evaluate-session |
| 199 | session body result-type result-params) | 189 | session body result-type result-params) |
| 200 | (org-babel-python-evaluate-external-process | 190 | (org-babel-python-evaluate-external-process |
| 201 | body result-type result-params))) | 191 | body result-type result-params preamble))) |
| 202 | 192 | ||
| 203 | (defun org-babel-python-evaluate-external-process | 193 | (defun org-babel-python-evaluate-external-process |
| 204 | (body &optional result-type result-params) | 194 | (body &optional result-type result-params preamble) |
| 205 | "Evaluate BODY in external python process. | 195 | "Evaluate BODY in external python process. |
| 206 | If RESULT-TYPE equals 'output then return standard output as a | 196 | If RESULT-TYPE equals 'output then return standard output as a |
| 207 | string. If RESULT-TYPE equals 'value then return the value of the | 197 | string. If RESULT-TYPE equals 'value then return the value of the |
| 208 | last statement in BODY, as elisp." | 198 | last statement in BODY, as elisp." |
| 209 | (case result-type | 199 | (case result-type |
| 210 | (output (org-babel-eval org-babel-python-command body)) | 200 | (output (org-babel-eval org-babel-python-command |
| 201 | (concat (if preamble (concat preamble "\n") "") body))) | ||
| 211 | (value (let ((tmp-file (org-babel-temp-file "python-"))) | 202 | (value (let ((tmp-file (org-babel-temp-file "python-"))) |
| 212 | (org-babel-eval org-babel-python-command | 203 | (org-babel-eval org-babel-python-command |
| 213 | (format | 204 | (concat |
| 214 | (if (member "pp" result-params) | 205 | (if preamble (concat preamble "\n") "") |
| 215 | org-babel-python-pp-wrapper-method | 206 | (format |
| 216 | org-babel-python-wrapper-method) | 207 | (if (member "pp" result-params) |
| 217 | (mapconcat | 208 | org-babel-python-pp-wrapper-method |
| 218 | (lambda (line) (format "\t%s" line)) | 209 | org-babel-python-wrapper-method) |
| 219 | (split-string | 210 | (mapconcat |
| 220 | (org-remove-indentation | 211 | (lambda (line) (format "\t%s" line)) |
| 221 | (org-babel-trim body)) | 212 | (split-string |
| 222 | "[\r\n]") "\n") | 213 | (org-remove-indentation |
| 223 | (org-babel-process-file-name tmp-file 'noquote))) | 214 | (org-babel-trim body)) |
| 215 | "[\r\n]") "\n") | ||
| 216 | (org-babel-process-file-name tmp-file 'noquote)))) | ||
| 224 | ((lambda (raw) | 217 | ((lambda (raw) |
| 225 | (if (or (member "code" result-params) | 218 | (if (or (member "code" result-params) |
| 226 | (member "pp" result-params)) | 219 | (member "pp" result-params)) |
| @@ -240,7 +233,7 @@ last statement in BODY, as elisp." | |||
| 240 | (lambda (statement) (insert statement) (comint-send-input)) | 233 | (lambda (statement) (insert statement) (comint-send-input)) |
| 241 | (if pp | 234 | (if pp |
| 242 | (list | 235 | (list |
| 243 | "import pp" | 236 | "import pprint" |
| 244 | (format "open('%s', 'w').write(pprint.pformat(_))" | 237 | (format "open('%s', 'w').write(pprint.pformat(_))" |
| 245 | (org-babel-process-file-name tmp-file 'noquote))) | 238 | (org-babel-process-file-name tmp-file 'noquote))) |
| 246 | (list (format "open('%s', 'w').write(str(_))" | 239 | (list (format "open('%s', 'w').write(str(_))" |
diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index e104d6bd693..2ca99ca651c 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -52,11 +51,13 @@ | |||
| 52 | ;;; Code: | 51 | ;;; Code: |
| 53 | (require 'ob) | 52 | (require 'ob) |
| 54 | (eval-when-compile | 53 | (eval-when-compile |
| 54 | (require 'org-list) | ||
| 55 | (require 'cl)) | 55 | (require 'cl)) |
| 56 | 56 | ||
| 57 | (declare-function org-remove-if-not "org" (predicate seq)) | 57 | (declare-function org-remove-if-not "org" (predicate seq)) |
| 58 | (declare-function org-at-table-p "org" (&optional table-type)) | 58 | (declare-function org-at-table-p "org" (&optional table-type)) |
| 59 | (declare-function org-count "org" (CL-ITEM CL-SEQ)) | 59 | (declare-function org-count "org" (CL-ITEM CL-SEQ)) |
| 60 | (declare-function org-in-item-p "org-list" ()) | ||
| 60 | 61 | ||
| 61 | (defvar org-babel-ref-split-regexp | 62 | (defvar org-babel-ref-split-regexp |
| 62 | "[ \f\t\n\r\v]*\\(.+?\\)[ \f\t\n\r\v]*=[ \f\t\n\r\v]*\\(.+\\)[ \f\t\n\r\v]*") | 63 | "[ \f\t\n\r\v]*\\(.+?\\)[ \f\t\n\r\v]*=[ \f\t\n\r\v]*\\(.+\\)[ \f\t\n\r\v]*") |
| @@ -74,46 +75,39 @@ the variable." | |||
| 74 | (let ((var (match-string 1 assignment)) | 75 | (let ((var (match-string 1 assignment)) |
| 75 | (ref (match-string 2 assignment))) | 76 | (ref (match-string 2 assignment))) |
| 76 | (cons (intern var) | 77 | (cons (intern var) |
| 77 | ((lambda (val) | 78 | (let ((out (org-babel-read ref))) |
| 78 | (if (equal :ob-must-be-reference val) | 79 | (if (equal out ref) |
| 79 | (org-babel-ref-resolve ref) val)) | 80 | (if (string-match "^\".+\"$" ref) |
| 80 | (org-babel-ref-literal ref)))))) | 81 | (read ref) |
| 81 | 82 | (org-babel-ref-resolve ref)) | |
| 82 | (defun org-babel-ref-literal (ref) | 83 | out)))))) |
| 83 | "Return the value of REF if it is a literal value. | ||
| 84 | Determine if the right side of a header argument variable | ||
| 85 | assignment is a literal value or is a reference to some external | ||
| 86 | resource. REF should be a string of the right hand side of the | ||
| 87 | assignment. If REF is literal then return it's value, otherwise | ||
| 88 | return nil." | ||
| 89 | (let ((out (org-babel-read ref))) | ||
| 90 | (if (equal out ref) | ||
| 91 | (if (string-match "^\".+\"$" ref) | ||
| 92 | (read ref) | ||
| 93 | :ob-must-be-reference) | ||
| 94 | out))) | ||
| 95 | 84 | ||
| 96 | (defvar org-babel-library-of-babel) | 85 | (defvar org-babel-library-of-babel) |
| 97 | (defun org-babel-ref-resolve (ref) | 86 | (defun org-babel-ref-resolve (ref) |
| 98 | "Resolve the reference REF and return its value." | 87 | "Resolve the reference REF and return its value." |
| 99 | (save-excursion | 88 | (save-excursion |
| 100 | (let ((case-fold-search t) | 89 | (let ((case-fold-search t) |
| 101 | type args new-refere new-referent result lob-info split-file split-ref | 90 | type args new-refere new-header-args new-referent result |
| 102 | index index-row index-col) | 91 | lob-info split-file split-ref index index-row index-col) |
| 103 | ;; if ref is indexed grab the indices -- beware nested indices | 92 | ;; if ref is indexed grab the indices -- beware nested indices |
| 104 | (when (and (string-match "\\[\\(.+\\)\\]" ref) | 93 | (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) |
| 105 | (let ((str (substring ref 0 (match-beginning 0)))) | 94 | (let ((str (substring ref 0 (match-beginning 0)))) |
| 106 | (= (org-count ?( str) (org-count ?) str)))) | 95 | (= (org-count ?( str) (org-count ?) str)))) |
| 107 | (setq index (match-string 1 ref)) | 96 | (setq index (match-string 1 ref)) |
| 108 | (setq ref (substring ref 0 (match-beginning 0)))) | 97 | (setq ref (substring ref 0 (match-beginning 0)))) |
| 109 | ;; assign any arguments to pass to source block | 98 | ;; assign any arguments to pass to source block |
| 110 | (when (string-match "^\\(.+?\\)\(\\(.*\\)\)$" ref) | 99 | (when (string-match |
| 111 | (setq new-refere (match-string 1 ref)) | 100 | "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)\(\\(.*\\)\)$" ref) |
| 112 | (setq new-referent (match-string 2 ref)) | 101 | (setq new-refere (match-string 1 ref)) |
| 102 | (setq new-header-args (match-string 3 ref)) | ||
| 103 | (setq new-referent (match-string 5 ref)) | ||
| 113 | (when (> (length new-refere) 0) | 104 | (when (> (length new-refere) 0) |
| 114 | (if (> (length new-referent) 0) | 105 | (when (> (length new-referent) 0) |
| 115 | (setq args (mapcar (lambda (ref) (cons :var ref)) | 106 | (setq args (mapcar (lambda (ref) (cons :var ref)) |
| 116 | (org-babel-ref-split-args new-referent)))) | 107 | (org-babel-ref-split-args new-referent)))) |
| 108 | (when (> (length new-header-args) 0) | ||
| 109 | (setq args (append (org-babel-parse-header-arguments new-header-args) | ||
| 110 | args))) | ||
| 117 | (setq ref new-refere))) | 111 | (setq ref new-refere))) |
| 118 | (when (string-match "^\\(.+\\):\\(.+\\)$" ref) | 112 | (when (string-match "^\\(.+\\):\\(.+\\)$" ref) |
| 119 | (setq split-file (match-string 1 ref)) | 113 | (setq split-file (match-string 1 ref)) |
| @@ -155,6 +149,7 @@ return nil." | |||
| 155 | (case type | 149 | (case type |
| 156 | ('results-line (org-babel-read-result)) | 150 | ('results-line (org-babel-read-result)) |
| 157 | ('table (org-babel-read-table)) | 151 | ('table (org-babel-read-table)) |
| 152 | ('list (org-babel-read-list)) | ||
| 158 | ('file (org-babel-read-link)) | 153 | ('file (org-babel-read-link)) |
| 159 | ('source-block (org-babel-execute-src-block nil nil params)) | 154 | ('source-block (org-babel-execute-src-block nil nil params)) |
| 160 | ('lob (org-babel-execute-src-block nil lob-info params))))) | 155 | ('lob (org-babel-execute-src-block nil lob-info params))))) |
| @@ -222,6 +217,7 @@ to \"0:-1\"." | |||
| 222 | Return nil if none of the supported reference types are found. | 217 | Return nil if none of the supported reference types are found. |
| 223 | Supported reference types are tables and source blocks." | 218 | Supported reference types are tables and source blocks." |
| 224 | (cond ((org-at-table-p) 'table) | 219 | (cond ((org-at-table-p) 'table) |
| 220 | ((org-in-item-p) 'list) | ||
| 225 | ((looking-at "^[ \t]*#\\+BEGIN_SRC") 'source-block) | 221 | ((looking-at "^[ \t]*#\\+BEGIN_SRC") 'source-block) |
| 226 | ((looking-at org-bracket-link-regexp) 'file) | 222 | ((looking-at org-bracket-link-regexp) 'file) |
| 227 | ((looking-at org-babel-result-regexp) 'results-line))) | 223 | ((looking-at org-babel-result-regexp) 'results-line))) |
diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 70b46411086..3f2af394603 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-ruby.el --- org-babel functions for ruby evaluation | 1 | ;;; ob-ruby.el --- org-babel functions for ruby evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -29,10 +29,10 @@ | |||
| 29 | ;;; Requirements: | 29 | ;;; Requirements: |
| 30 | 30 | ||
| 31 | ;; - ruby and irb executables :: http://www.ruby-lang.org/ | 31 | ;; - ruby and irb executables :: http://www.ruby-lang.org/ |
| 32 | ;; | 32 | ;; |
| 33 | ;; - ruby-mode :: Can be installed through ELPA, or from | 33 | ;; - ruby-mode :: Can be installed through ELPA, or from |
| 34 | ;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el | 34 | ;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el |
| 35 | ;; | 35 | ;; |
| 36 | ;; - inf-ruby mode :: Can be installed through ELPA, or from | 36 | ;; - inf-ruby mode :: Can be installed through ELPA, or from |
| 37 | ;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el | 37 | ;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el |
| 38 | 38 | ||
| @@ -116,16 +116,7 @@ specifying a variable of the same value." | |||
| 116 | "Convert RESULTS into an appropriate elisp value. | 116 | "Convert RESULTS into an appropriate elisp value. |
| 117 | If RESULTS look like a table, then convert them into an | 117 | If RESULTS look like a table, then convert them into an |
| 118 | Emacs-lisp table, otherwise return the results as a string." | 118 | Emacs-lisp table, otherwise return the results as a string." |
| 119 | (org-babel-read | 119 | (org-babel-script-escape results)) |
| 120 | (if (and (stringp results) (string-match "^\\[.+\\]$" results)) | ||
| 121 | (org-babel-read | ||
| 122 | (concat "'" | ||
| 123 | (replace-regexp-in-string | ||
| 124 | "\\[" "(" (replace-regexp-in-string | ||
| 125 | "\\]" ")" (replace-regexp-in-string | ||
| 126 | ", " " " (replace-regexp-in-string | ||
| 127 | "'" "\"" results)))))) | ||
| 128 | results))) | ||
| 129 | 120 | ||
| 130 | (defun org-babel-ruby-initiate-session (&optional session params) | 121 | (defun org-babel-ruby-initiate-session (&optional session params) |
| 131 | "Initiate a ruby session. | 122 | "Initiate a ruby session. |
diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index 7f241e0320d..b3acc8b8d2c 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index c0e0a3fb6f9..b2b9fa6a01d 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el | |||
| @@ -1,26 +1,28 @@ | |||
| 1 | ;;; ob-scheme.el --- org-babel functions for Scheme | 1 | ;;; ob-scheme.el --- org-babel functions for Scheme |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research, scheme | 6 | ;; Keywords: literate programming, reproducible research, scheme |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;;; License: |
| 11 | 11 | ||
| 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; This program is free software; you can redistribute it and/or modify |
| 13 | ;; it under the terms of the GNU General Public License as published by | 13 | ;; it under the terms of the GNU General Public License as published by |
| 14 | ;; the Free Software Foundation, either version 3 of the License, or | 14 | ;; the Free Software Foundation; either version 3, or (at your option) |
| 15 | ;; (at your option) any later version. | 15 | ;; any later version. |
| 16 | 16 | ;; | |
| 17 | ;; GNU Emacs is distributed in the hope that it will be useful, | 17 | ;; This program is distributed in the hope that it will be useful, |
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;; GNU General Public License for more details. | 20 | ;; GNU General Public License for more details. |
| 21 | 21 | ;; | |
| 22 | ;; You should have received a copy of the GNU General Public License | 22 | ;; You should have received a copy of the GNU General Public License |
| 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 24 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 25 | ;; Boston, MA 02110-1301, USA. | ||
| 24 | 26 | ||
| 25 | ;;; Commentary: | 27 | ;;; Commentary: |
| 26 | 28 | ||
| @@ -33,7 +35,7 @@ | |||
| 33 | 35 | ||
| 34 | ;; - a working scheme implementation | 36 | ;; - a working scheme implementation |
| 35 | ;; (e.g. guile http://www.gnu.org/software/guile/guile.html) | 37 | ;; (e.g. guile http://www.gnu.org/software/guile/guile.html) |
| 36 | ;; | 38 | ;; |
| 37 | ;; - for session based evaluation cmuscheme.el is required which is | 39 | ;; - for session based evaluation cmuscheme.el is required which is |
| 38 | ;; included in Emacs | 40 | ;; included in Emacs |
| 39 | 41 | ||
diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 206e51b19fe..7f4af795499 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-screen.el --- org-babel support for interactive terminal | 1 | ;;; ob-screen.el --- org-babel support for interactive terminal |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Benjamin Andresen | 5 | ;; Author: Benjamin Andresen |
| 6 | ;; Keywords: literate programming, interactive shell | 6 | ;; Keywords: literate programming, interactive shell |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/ob-sh.el b/lisp/org/ob-sh.el index e86386426cd..e153d68b575 100644 --- a/lisp/org/ob-sh.el +++ b/lisp/org/ob-sh.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -100,7 +100,7 @@ var of the same value." | |||
| 100 | (if (listp el) | 100 | (if (listp el) |
| 101 | (mapcar #'deep-string el) | 101 | (mapcar #'deep-string el) |
| 102 | (org-babel-sh-var-to-sh el sep)))) | 102 | (org-babel-sh-var-to-sh el sep)))) |
| 103 | (format "$(cat <<BABEL_TABLE\n%s\nBABEL_TABLE\n)" | 103 | (format "$(cat <<'BABEL_TABLE'\n%s\nBABEL_TABLE\n)" |
| 104 | (orgtbl-to-generic | 104 | (orgtbl-to-generic |
| 105 | (deep-string (if (listp (car var)) var (list var))) | 105 | (deep-string (if (listp (car var)) var (list var))) |
| 106 | (list :sep (or sep "\t"))))) | 106 | (list :sep (or sep "\t"))))) |
| @@ -114,16 +114,7 @@ var of the same value." | |||
| 114 | "Convert RESULTS to an appropriate elisp value. | 114 | "Convert RESULTS to an appropriate elisp value. |
| 115 | If the results look like a table, then convert them into an | 115 | If the results look like a table, then convert them into an |
| 116 | Emacs-lisp table, otherwise return the results as a string." | 116 | Emacs-lisp table, otherwise return the results as a string." |
| 117 | (org-babel-read | 117 | (org-babel-script-escape results)) |
| 118 | (if (string-match "^\\[.+\\]$" results) | ||
| 119 | (org-babel-read | ||
| 120 | (concat "'" | ||
| 121 | (replace-regexp-in-string | ||
| 122 | "\\[" "(" (replace-regexp-in-string | ||
| 123 | "\\]" ")" (replace-regexp-in-string | ||
| 124 | ", " " " (replace-regexp-in-string | ||
| 125 | "'" "\"" results)))))) | ||
| 126 | results))) | ||
| 127 | 118 | ||
| 128 | (defun org-babel-sh-initiate-session (&optional session params) | 119 | (defun org-babel-sh-initiate-session (&optional session params) |
| 129 | "Initiate a session named SESSION according to PARAMS." | 120 | "Initiate a session named SESSION according to PARAMS." |
diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 78e8a3b4377..5bb123d631b 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -47,9 +47,15 @@ | |||
| 47 | (eval-when-compile (require 'cl)) | 47 | (eval-when-compile (require 'cl)) |
| 48 | 48 | ||
| 49 | (declare-function org-table-import "org-table" (file arg)) | 49 | (declare-function org-table-import "org-table" (file arg)) |
| 50 | (declare-function orgtbl-to-csv "org-table" (TABLE PARAMS)) | ||
| 50 | 51 | ||
| 51 | (defvar org-babel-default-header-args:sql '()) | 52 | (defvar org-babel-default-header-args:sql '()) |
| 52 | 53 | ||
| 54 | (defun org-babel-expand-body:sql (body params) | ||
| 55 | "Expand BODY according to the values of PARAMS." | ||
| 56 | (org-babel-sql-expand-vars | ||
| 57 | body (mapcar #'cdr (org-babel-get-header params :var)))) | ||
| 58 | |||
| 53 | (defun org-babel-execute:sql (body params) | 59 | (defun org-babel-execute:sql (body params) |
| 54 | "Execute a block of Sql code with Babel. | 60 | "Execute a block of Sql code with Babel. |
| 55 | This function is called by `org-babel-execute-src-block'." | 61 | This function is called by `org-babel-execute-src-block'." |
| @@ -60,6 +66,10 @@ This function is called by `org-babel-execute-src-block'." | |||
| 60 | (out-file (or (cdr (assoc :out-file params)) | 66 | (out-file (or (cdr (assoc :out-file params)) |
| 61 | (org-babel-temp-file "sql-out-"))) | 67 | (org-babel-temp-file "sql-out-"))) |
| 62 | (command (case (intern engine) | 68 | (command (case (intern engine) |
| 69 | ('msosql (format "osql %s -s \"\t\" -i %s -o %s" | ||
| 70 | (or cmdline "") | ||
| 71 | (org-babel-process-file-name in-file) | ||
| 72 | (org-babel-process-file-name out-file))) | ||
| 63 | ('mysql (format "mysql %s -e \"source %s\" > %s" | 73 | ('mysql (format "mysql %s -e \"source %s\" > %s" |
| 64 | (or cmdline "") | 74 | (or cmdline "") |
| 65 | (org-babel-process-file-name in-file) | 75 | (org-babel-process-file-name in-file) |
| @@ -70,11 +80,11 @@ This function is called by `org-babel-execute-src-block'." | |||
| 70 | (or cmdline ""))) | 80 | (or cmdline ""))) |
| 71 | (t (error "no support for the %s sql engine" engine))))) | 81 | (t (error "no support for the %s sql engine" engine))))) |
| 72 | (with-temp-file in-file | 82 | (with-temp-file in-file |
| 73 | (insert (org-babel-expand-body:generic body params))) | 83 | (insert (org-babel-expand-body:sql body params))) |
| 74 | (message command) | 84 | (message command) |
| 75 | (shell-command command) | 85 | (shell-command command) |
| 76 | (with-temp-buffer | 86 | (with-temp-buffer |
| 77 | (org-table-import out-file nil) | 87 | (org-table-import out-file '(16)) |
| 78 | (org-babel-reassemble-table | 88 | (org-babel-reassemble-table |
| 79 | (org-table-to-lisp) | 89 | (org-table-to-lisp) |
| 80 | (org-babel-pick-name (cdr (assoc :colname-names params)) | 90 | (org-babel-pick-name (cdr (assoc :colname-names params)) |
| @@ -82,6 +92,28 @@ This function is called by `org-babel-execute-src-block'." | |||
| 82 | (org-babel-pick-name (cdr (assoc :rowname-names params)) | 92 | (org-babel-pick-name (cdr (assoc :rowname-names params)) |
| 83 | (cdr (assoc :rownames params))))))) | 93 | (cdr (assoc :rownames params))))))) |
| 84 | 94 | ||
| 95 | (defun org-babel-sql-expand-vars (body vars) | ||
| 96 | "Expand the variables held in VARS in BODY." | ||
| 97 | (mapc | ||
| 98 | (lambda (pair) | ||
| 99 | (setq body | ||
| 100 | (replace-regexp-in-string | ||
| 101 | (format "\$%s" (car pair)) | ||
| 102 | ((lambda (val) | ||
| 103 | (if (listp val) | ||
| 104 | ((lambda (data-file) | ||
| 105 | (with-temp-file data-file | ||
| 106 | (insert (orgtbl-to-csv | ||
| 107 | val '(:fmt (lambda (el) (if (stringp el) | ||
| 108 | el | ||
| 109 | (format "%S" el))))))) | ||
| 110 | data-file) | ||
| 111 | (org-babel-temp-file "sql-data-")) | ||
| 112 | (if (stringp val) val (format "%S" val)))) | ||
| 113 | (cdr pair)) | ||
| 114 | body))) | ||
| 115 | vars) | ||
| 116 | body) | ||
| 85 | 117 | ||
| 86 | (defun org-babel-prep-session:sql (session params) | 118 | (defun org-babel-prep-session:sql (session params) |
| 87 | "Raise an error because Sql sessions aren't implemented." | 119 | "Raise an error because Sql sessions aren't implemented." |
diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index d1fa9ac4c5f..65e8091741f 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction | 1 | ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | (require 'ob) | 30 | (require 'ob) |
| 31 | (require 'ob-eval) | ||
| 31 | (require 'ob-ref) | 32 | (require 'ob-ref) |
| 32 | 33 | ||
| 33 | (declare-function org-fill-template "org" (template alist)) | 34 | (declare-function org-fill-template "org" (template alist)) |
| @@ -52,7 +53,6 @@ | |||
| 52 | "Execute a block of Sqlite code with Babel. | 53 | "Execute a block of Sqlite code with Babel. |
| 53 | This function is called by `org-babel-execute-src-block'." | 54 | This function is called by `org-babel-execute-src-block'." |
| 54 | (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) | 55 | (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) |
| 55 | (vars (org-babel-get-header params :var)) | ||
| 56 | (db (cdr (assoc :db params))) | 56 | (db (cdr (assoc :db params))) |
| 57 | (separator (cdr (assoc :separator params))) | 57 | (separator (cdr (assoc :separator params))) |
| 58 | (nullvalue (cdr (assoc :nullvalue params))) | 58 | (nullvalue (cdr (assoc :nullvalue params))) |
| @@ -65,15 +65,10 @@ This function is called by `org-babel-execute-src-block'." | |||
| 65 | (unless db (error "ob-sqlite: can't evaluate without a database.")) | 65 | (unless db (error "ob-sqlite: can't evaluate without a database.")) |
| 66 | (with-temp-buffer | 66 | (with-temp-buffer |
| 67 | (insert | 67 | (insert |
| 68 | (shell-command-to-string | 68 | (org-babel-eval |
| 69 | (org-fill-template | 69 | (org-fill-template |
| 70 | "%cmd -init %body %header %separator %nullvalue %others %csv %db " | 70 | "%cmd %header %separator %nullvalue %others %csv %db " |
| 71 | (list | 71 | (list |
| 72 | (cons "body" ((lambda (sql-file) | ||
| 73 | (with-temp-file sql-file | ||
| 74 | (insert (org-babel-expand-body:sqlite body params))) | ||
| 75 | sql-file) | ||
| 76 | (org-babel-temp-file "sqlite-sql-"))) | ||
| 77 | (cons "cmd" org-babel-sqlite3-command) | 72 | (cons "cmd" org-babel-sqlite3-command) |
| 78 | (cons "header" (if headers-p "-header" "-noheader")) | 73 | (cons "header" (if headers-p "-header" "-noheader")) |
| 79 | (cons "separator" | 74 | (cons "separator" |
| @@ -90,7 +85,9 @@ This function is called by `org-babel-execute-src-block'." | |||
| 90 | (member :html others) separator) | 85 | (member :html others) separator) |
| 91 | "" | 86 | "" |
| 92 | "-csv")) | 87 | "-csv")) |
| 93 | (cons "db " db))))) | 88 | (cons "db " db))) |
| 89 | ;; body of the code block | ||
| 90 | (org-babel-expand-body:sqlite body params))) | ||
| 94 | (if (or (member "scalar" result-params) | 91 | (if (or (member "scalar" result-params) |
| 95 | (member "html" result-params) | 92 | (member "html" result-params) |
| 96 | (member "code" result-params) | 93 | (member "code" result-params) |
diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index cdc7a6250fe..b7f9673c676 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -57,9 +57,9 @@ | |||
| 57 | "Replace newline character with ellipses. | 57 | "Replace newline character with ellipses. |
| 58 | If STRING ends in a newline character, then remove the newline | 58 | If STRING ends in a newline character, then remove the newline |
| 59 | character and replace it with ellipses." | 59 | character and replace it with ellipses." |
| 60 | (if (and (stringp string) (string-match "[\n\r]" string)) | 60 | (if (and (stringp string) (string-match "[\n\r]\\(.\\)?" string)) |
| 61 | (concat (substring string 0 (match-beginning 0)) "...") | 61 | (concat (substring string 0 (match-beginning 0)) |
| 62 | string)) | 62 | (if (match-string 1 string) "...")) string)) |
| 63 | 63 | ||
| 64 | (defmacro sbe (source-block &rest variables) | 64 | (defmacro sbe (source-block &rest variables) |
| 65 | "Return the results of calling SOURCE-BLOCK with VARIABLES. | 65 | "Return the results of calling SOURCE-BLOCK with VARIABLES. |
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index e197ff37d36..c5ef2a1fcea 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -125,6 +125,7 @@ evaluating BODY." | |||
| 125 | This function exports the source code using | 125 | This function exports the source code using |
| 126 | `org-babel-tangle' and then loads the resulting file using | 126 | `org-babel-tangle' and then loads the resulting file using |
| 127 | `load-file'." | 127 | `load-file'." |
| 128 | (interactive "fFile to load: ") | ||
| 128 | (flet ((age (file) | 129 | (flet ((age (file) |
| 129 | (float-time | 130 | (float-time |
| 130 | (time-subtract (current-time) | 131 | (time-subtract (current-time) |
diff --git a/lisp/org/ob.el b/lisp/org/ob.el index fe068de549f..1c9f9fdbc12 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte, Dan Davison |
| 6 | ;; Dan Davison | ||
| 7 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 12 | 11 | ||
| @@ -31,7 +30,9 @@ | |||
| 31 | 30 | ||
| 32 | ;;; Code: | 31 | ;;; Code: |
| 33 | (eval-when-compile | 32 | (eval-when-compile |
| 33 | (require 'org-list) | ||
| 34 | (require 'cl)) | 34 | (require 'cl)) |
| 35 | (require 'ob-eval) | ||
| 35 | (require 'org-macs) | 36 | (require 'org-macs) |
| 36 | 37 | ||
| 37 | (defvar org-babel-call-process-region-original) | 38 | (defvar org-babel-call-process-region-original) |
| @@ -43,7 +44,7 @@ | |||
| 43 | (declare-function tramp-file-name-host "tramp" (vec)) | 44 | (declare-function tramp-file-name-host "tramp" (vec)) |
| 44 | (declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body)) | 45 | (declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body)) |
| 45 | (declare-function org-icompleting-read "org" (&rest args)) | 46 | (declare-function org-icompleting-read "org" (&rest args)) |
| 46 | (declare-function org-edit-src-code "org-src" | 47 | (declare-function org-edit-src-code "org-src" |
| 47 | (&optional context code edit-buffer-name quietp)) | 48 | (&optional context code edit-buffer-name quietp)) |
| 48 | (declare-function org-edit-src-exit "org-src" (&optional context)) | 49 | (declare-function org-edit-src-exit "org-src" (&optional context)) |
| 49 | (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer)) | 50 | (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer)) |
| @@ -73,6 +74,10 @@ | |||
| 73 | (declare-function org-babel-ref-resolve "ob-ref" (ref)) | 74 | (declare-function org-babel-ref-resolve "ob-ref" (ref)) |
| 74 | (declare-function org-babel-lob-execute-maybe "ob-lob" ()) | 75 | (declare-function org-babel-lob-execute-maybe "ob-lob" ()) |
| 75 | (declare-function org-number-sequence "org-compat" (from &optional to inc)) | 76 | (declare-function org-number-sequence "org-compat" (from &optional to inc)) |
| 77 | (declare-function org-in-item-p "org-list" ()) | ||
| 78 | (declare-function org-list-parse-list "org-list" (&optional delete)) | ||
| 79 | (declare-function org-list-to-generic "org-list" (LIST PARAMS)) | ||
| 80 | (declare-function org-list-bottom-point "org-list" ()) | ||
| 76 | 81 | ||
| 77 | (defgroup org-babel nil | 82 | (defgroup org-babel nil |
| 78 | "Code block evaluation and management in `org-mode' documents." | 83 | "Code block evaluation and management in `org-mode' documents." |
| @@ -213,9 +218,13 @@ of potentially harmful code." | |||
| 213 | (if (or (equal eval "never") (equal eval "no") | 218 | (if (or (equal eval "never") (equal eval "no") |
| 214 | (and query | 219 | (and query |
| 215 | (not (yes-or-no-p | 220 | (not (yes-or-no-p |
| 216 | (format "Evaluate this%scode on your system? " | 221 | (format "Evaluate this%scode block%son your system? " |
| 217 | (if info (format " %s " (nth 0 info)) " ")))))) | 222 | (if info (format " %s " (nth 0 info)) " ") |
| 218 | (prog1 nil (message "evaluation aborted")) | 223 | (if (nth 4 info) |
| 224 | (format " (%s) " (nth 4 info)) " ")))))) | ||
| 225 | (prog1 nil (message "Evaluation %s" | ||
| 226 | (if (or (equal eval "never") (equal eval "no")) | ||
| 227 | "Disabled" "Aborted"))) | ||
| 219 | t))) | 228 | t))) |
| 220 | 229 | ||
| 221 | ;;;###autoload | 230 | ;;;###autoload |
| @@ -238,7 +247,8 @@ then run `org-babel-execute-src-block'." | |||
| 238 | (interactive) | 247 | (interactive) |
| 239 | (let ((info (org-babel-get-src-block-info))) | 248 | (let ((info (org-babel-get-src-block-info))) |
| 240 | (if info | 249 | (if info |
| 241 | (progn (org-babel-execute-src-block current-prefix-arg info) t) nil))) | 250 | (progn (org-babel-eval-wipe-error-buffer) |
| 251 | (org-babel-execute-src-block current-prefix-arg info) t) nil))) | ||
| 242 | 252 | ||
| 243 | ;;;###autoload | 253 | ;;;###autoload |
| 244 | (defun org-babel-expand-src-block-maybe () | 254 | (defun org-babel-expand-src-block-maybe () |
| @@ -363,10 +373,12 @@ block." | |||
| 363 | (new-hash (when cache? (org-babel-sha1-hash info))) | 373 | (new-hash (when cache? (org-babel-sha1-hash info))) |
| 364 | (old-hash (when cache? (org-babel-result-hash info))) | 374 | (old-hash (when cache? (org-babel-result-hash info))) |
| 365 | (body (setf (nth 1 info) | 375 | (body (setf (nth 1 info) |
| 366 | (if (and (cdr (assoc :noweb params)) | 376 | (let ((noweb (cdr (assoc :noweb params)))) |
| 367 | (string= "yes" (cdr (assoc :noweb params)))) | 377 | (if (and noweb |
| 368 | (org-babel-expand-noweb-references info) | 378 | (or (string= "yes" noweb) |
| 369 | (nth 1 info)))) | 379 | (string= "tangle" noweb))) |
| 380 | (org-babel-expand-noweb-references info) | ||
| 381 | (nth 1 info))))) | ||
| 370 | (cmd (intern (concat "org-babel-execute:" lang))) | 382 | (cmd (intern (concat "org-babel-execute:" lang))) |
| 371 | (dir (cdr (assoc :dir params))) | 383 | (dir (cdr (assoc :dir params))) |
| 372 | (default-directory | 384 | (default-directory |
| @@ -379,7 +391,7 @@ block." | |||
| 379 | result) | 391 | result) |
| 380 | (unwind-protect | 392 | (unwind-protect |
| 381 | (flet ((call-process-region (&rest args) | 393 | (flet ((call-process-region (&rest args) |
| 382 | (apply 'org-babel-tramp-handle-call-process-region args))) | 394 | (apply 'org-babel-tramp-handle-call-process-region args))) |
| 383 | (unless (fboundp cmd) | 395 | (unless (fboundp cmd) |
| 384 | (error "No org-babel-execute function for %s!" lang)) | 396 | (error "No org-babel-execute function for %s!" lang)) |
| 385 | (if (and (not arg) new-hash (equal new-hash old-hash)) | 397 | (if (and (not arg) new-hash (equal new-hash old-hash)) |
| @@ -584,6 +596,60 @@ results already exist." | |||
| 584 | t))) | 596 | t))) |
| 585 | 597 | ||
| 586 | ;;;###autoload | 598 | ;;;###autoload |
| 599 | (defmacro org-babel-map-src-blocks (file &rest body) | ||
| 600 | "Evaluate BODY forms on each source-block in FILE. | ||
| 601 | If FILE is nil evaluate BODY forms on source blocks in current | ||
| 602 | buffer. During evaluation of BODY the following local variables | ||
| 603 | are set relative to the currently matched code block. | ||
| 604 | |||
| 605 | full-block ------- string holding the entirety of the code block | ||
| 606 | beg-block -------- point at the beginning of the code block | ||
| 607 | end-block -------- point at the end of the matched code block | ||
| 608 | lang ------------- string holding the language of the code block | ||
| 609 | beg-lang --------- point at the beginning of the lang | ||
| 610 | end-lang --------- point at the end of the lang | ||
| 611 | switches --------- string holding the switches | ||
| 612 | beg-switches ----- point at the beginning of the switches | ||
| 613 | end-switches ----- point at the end of the switches | ||
| 614 | header-args ------ string holding the header-args | ||
| 615 | beg-header-args -- point at the beginning of the header-args | ||
| 616 | end-header-args -- point at the end of the header-args | ||
| 617 | body ------------- string holding the body of the code block | ||
| 618 | beg-body --------- point at the beginning of the body | ||
| 619 | end-body --------- point at the end of the body" | ||
| 620 | (declare (indent 1)) | ||
| 621 | (let ((tempvar (make-symbol "file"))) | ||
| 622 | `(let* ((,tempvar ,file) | ||
| 623 | (visited-p (or (null ,tempvar) | ||
| 624 | (get-file-buffer (expand-file-name ,tempvar)))) | ||
| 625 | (point (point)) to-be-removed) | ||
| 626 | (save-window-excursion | ||
| 627 | (when ,tempvar (find-file ,tempvar)) | ||
| 628 | (setq to-be-removed (current-buffer)) | ||
| 629 | (goto-char (point-min)) | ||
| 630 | (while (re-search-forward org-babel-src-block-regexp nil t) | ||
| 631 | (goto-char (match-beginning 0)) | ||
| 632 | (let ((full-block (match-string 0)) | ||
| 633 | (beg-block (match-beginning 0)) | ||
| 634 | (end-block (match-end 0)) | ||
| 635 | (lang (match-string 2)) | ||
| 636 | (beg-lang (match-beginning 2)) | ||
| 637 | (end-lang (match-end 2)) | ||
| 638 | (switches (match-string 3)) | ||
| 639 | (beg-switches (match-beginning 3)) | ||
| 640 | (end-switches (match-end 3)) | ||
| 641 | (header-args (match-string 4)) | ||
| 642 | (beg-header-args (match-beginning 4)) | ||
| 643 | (end-header-args (match-end 4)) | ||
| 644 | (body (match-string 5)) | ||
| 645 | (beg-body (match-beginning 5)) | ||
| 646 | (end-body (match-end 5))) | ||
| 647 | ,@body | ||
| 648 | (goto-char end-block)))) | ||
| 649 | (unless visited-p (kill-buffer to-be-removed)) | ||
| 650 | (goto-char point)))) | ||
| 651 | |||
| 652 | ;;;###autoload | ||
| 587 | (defun org-babel-execute-buffer (&optional arg) | 653 | (defun org-babel-execute-buffer (&optional arg) |
| 588 | "Execute source code blocks in a buffer. | 654 | "Execute source code blocks in a buffer. |
| 589 | Call `org-babel-execute-src-block' on every source block in | 655 | Call `org-babel-execute-src-block' on every source block in |
| @@ -757,57 +823,6 @@ portions of results lines." | |||
| 757 | (lambda () (org-add-hook 'change-major-mode-hook | 823 | (lambda () (org-add-hook 'change-major-mode-hook |
| 758 | 'org-babel-show-result-all 'append 'local))) | 824 | 'org-babel-show-result-all 'append 'local))) |
| 759 | 825 | ||
| 760 | (defmacro org-babel-map-src-blocks (file &rest body) | ||
| 761 | "Evaluate BODY forms on each source-block in FILE. | ||
| 762 | If FILE is nil evaluate BODY forms on source blocks in current | ||
| 763 | buffer. During evaluation of BODY the following local variables | ||
| 764 | are set relative to the currently matched code block. | ||
| 765 | |||
| 766 | full-block ------- string holding the entirety of the code block | ||
| 767 | beg-block -------- point at the beginning of the code block | ||
| 768 | end-block -------- point at the end of the matched code block | ||
| 769 | lang ------------- string holding the language of the code block | ||
| 770 | beg-lang --------- point at the beginning of the lang | ||
| 771 | end-lang --------- point at the end of the lang | ||
| 772 | switches --------- string holding the switches | ||
| 773 | beg-switches ----- point at the beginning of the switches | ||
| 774 | end-switches ----- point at the end of the switches | ||
| 775 | header-args ------ string holding the header-args | ||
| 776 | beg-header-args -- point at the beginning of the header-args | ||
| 777 | end-header-args -- point at the end of the header-args | ||
| 778 | body ------------- string holding the body of the code block | ||
| 779 | beg-body --------- point at the beginning of the body | ||
| 780 | end-body --------- point at the end of the body" | ||
| 781 | (declare (indent 1)) | ||
| 782 | `(let ((visited-p (or (null ,file) | ||
| 783 | (get-file-buffer (expand-file-name ,file)))) | ||
| 784 | (point (point)) to-be-removed) | ||
| 785 | (save-window-excursion | ||
| 786 | (when ,file (find-file ,file)) | ||
| 787 | (setq to-be-removed (current-buffer)) | ||
| 788 | (goto-char (point-min)) | ||
| 789 | (while (re-search-forward org-babel-src-block-regexp nil t) | ||
| 790 | (goto-char (match-beginning 0)) | ||
| 791 | (let ((full-block (match-string 0)) | ||
| 792 | (beg-block (match-beginning 0)) | ||
| 793 | (end-block (match-end 0)) | ||
| 794 | (lang (match-string 2)) | ||
| 795 | (beg-lang (match-beginning 2)) | ||
| 796 | (end-lang (match-end 2)) | ||
| 797 | (switches (match-string 3)) | ||
| 798 | (beg-switches (match-beginning 3)) | ||
| 799 | (end-switches (match-end 3)) | ||
| 800 | (header-args (match-string 4)) | ||
| 801 | (beg-header-args (match-beginning 4)) | ||
| 802 | (end-header-args (match-end 4)) | ||
| 803 | (body (match-string 5)) | ||
| 804 | (beg-body (match-beginning 5)) | ||
| 805 | (end-body (match-end 5))) | ||
| 806 | ,@body | ||
| 807 | (goto-char end-block)))) | ||
| 808 | (unless visited-p (kill-buffer to-be-removed)) | ||
| 809 | (goto-char point))) | ||
| 810 | |||
| 811 | (defvar org-file-properties) | 826 | (defvar org-file-properties) |
| 812 | (defun org-babel-params-from-properties (&optional lang) | 827 | (defun org-babel-params-from-properties (&optional lang) |
| 813 | "Retrieve parameters specified as properties. | 828 | "Retrieve parameters specified as properties. |
| @@ -893,17 +908,31 @@ may be specified at the top of the current buffer." | |||
| 893 | 908 | ||
| 894 | (defun org-babel-parse-header-arguments (arg-string) | 909 | (defun org-babel-parse-header-arguments (arg-string) |
| 895 | "Parse a string of header arguments returning an alist." | 910 | "Parse a string of header arguments returning an alist." |
| 896 | (if (> (length arg-string) 0) | 911 | (when (> (length arg-string) 0) |
| 897 | (delq nil | 912 | (delq nil |
| 898 | (mapcar | 913 | (mapcar |
| 899 | (lambda (arg) | 914 | (lambda (arg) |
| 900 | (if (string-match | 915 | (if (string-match |
| 901 | "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" | 916 | "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" |
| 902 | arg) | 917 | arg) |
| 903 | (cons (intern (concat ":" (match-string 1 arg))) | 918 | (cons (intern (match-string 1 arg)) |
| 904 | (org-babel-read (org-babel-chomp (match-string 2 arg)))) | 919 | (org-babel-read (org-babel-chomp (match-string 2 arg)))) |
| 905 | (cons (intern (concat ":" arg)) nil))) | 920 | (cons (intern (org-babel-chomp arg)) nil))) |
| 906 | (split-string (concat " " arg-string) "[ \f\t\n\r\v]+:" t))))) | 921 | (let ((balance 0) (partial nil) (lst nil) (last 0)) |
| 922 | (mapc (lambda (ch) ; split on [] balanced instances of [ \t]: | ||
| 923 | (setq balance (+ balance | ||
| 924 | (cond ((equal 91 ch) 1) | ||
| 925 | ((equal 93 ch) -1) | ||
| 926 | (t 0)))) | ||
| 927 | (setq partial (cons ch partial)) | ||
| 928 | (when (and (= ch 58) (= balance 0) | ||
| 929 | (or (= last 32) (= last 9))) | ||
| 930 | (setq lst (cons (apply #'string (nreverse (cddr partial))) | ||
| 931 | lst)) | ||
| 932 | (setq partial (list ch))) | ||
| 933 | (setq last ch)) | ||
| 934 | (string-to-list arg-string)) | ||
| 935 | (nreverse (cons (apply #'string (nreverse partial)) lst))))))) | ||
| 907 | 936 | ||
| 908 | (defun org-babel-process-params (params) | 937 | (defun org-babel-process-params (params) |
| 909 | "Expand variables in PARAMS and add summary parameters." | 938 | "Expand variables in PARAMS and add summary parameters." |
| @@ -1291,6 +1320,7 @@ following the source block." | |||
| 1291 | (let ((case-fold-search t) result-string) | 1320 | (let ((case-fold-search t) result-string) |
| 1292 | (cond | 1321 | (cond |
| 1293 | ((org-at-table-p) (org-babel-read-table)) | 1322 | ((org-at-table-p) (org-babel-read-table)) |
| 1323 | ((org-in-item-p) (org-babel-read-list)) | ||
| 1294 | ((looking-at org-bracket-link-regexp) (org-babel-read-link)) | 1324 | ((looking-at org-bracket-link-regexp) (org-babel-read-link)) |
| 1295 | ((looking-at org-block-regexp) (org-babel-trim (match-string 4))) | 1325 | ((looking-at org-block-regexp) (org-babel-trim (match-string 4))) |
| 1296 | ((looking-at "^[ \t]*: ") | 1326 | ((looking-at "^[ \t]*: ") |
| @@ -1316,6 +1346,10 @@ following the source block." | |||
| 1316 | (mapcar #'org-babel-read row))) | 1346 | (mapcar #'org-babel-read row))) |
| 1317 | (org-table-to-lisp))) | 1347 | (org-table-to-lisp))) |
| 1318 | 1348 | ||
| 1349 | (defun org-babel-read-list () | ||
| 1350 | "Read the list at `point' into emacs-lisp." | ||
| 1351 | (mapcar #'org-babel-read (cdr (org-list-parse-list)))) | ||
| 1352 | |||
| 1319 | (defvar org-link-types-re) | 1353 | (defvar org-link-types-re) |
| 1320 | (defun org-babel-read-link () | 1354 | (defun org-babel-read-link () |
| 1321 | "Read the link at `point' into emacs-lisp. | 1355 | "Read the link at `point' into emacs-lisp. |
| @@ -1349,7 +1383,9 @@ silent -- no results are inserted | |||
| 1349 | file ---- the results are interpreted as a file path, and are | 1383 | file ---- the results are interpreted as a file path, and are |
| 1350 | inserted into the buffer using the Org-mode file syntax | 1384 | inserted into the buffer using the Org-mode file syntax |
| 1351 | 1385 | ||
| 1352 | raw ----- results are added directly to the org-mode file. This | 1386 | list ---- the results are interpreted as an Org-mode list. |
| 1387 | |||
| 1388 | raw ----- results are added directly to the Org-mode file. This | ||
| 1353 | is a good option if you code block will output org-mode | 1389 | is a good option if you code block will output org-mode |
| 1354 | formatted text. | 1390 | formatted text. |
| 1355 | 1391 | ||
| @@ -1406,16 +1442,24 @@ code ---- the results are extracted in the syntax of the source | |||
| 1406 | ((member "replace" result-params) | 1442 | ((member "replace" result-params) |
| 1407 | (delete-region (point) (org-babel-result-end))) | 1443 | (delete-region (point) (org-babel-result-end))) |
| 1408 | ((member "append" result-params) | 1444 | ((member "append" result-params) |
| 1409 | (goto-char (org-babel-result-end)) (setq beg (point))) | 1445 | (goto-char (org-babel-result-end)) (setq beg (point-marker))) |
| 1410 | ((member "prepend" result-params) ;; already there | 1446 | ((member "prepend" result-params)))) ; already there |
| 1411 | ))) | ||
| 1412 | (setq results-switches | 1447 | (setq results-switches |
| 1413 | (if results-switches (concat " " results-switches) "")) | 1448 | (if results-switches (concat " " results-switches) "")) |
| 1449 | ;; insert results based on type | ||
| 1414 | (cond | 1450 | (cond |
| 1415 | ;; do nothing for an empty result | 1451 | ;; do nothing for an empty result |
| 1416 | ((= (length result) 0)) | 1452 | ((= (length result) 0)) |
| 1453 | ;; insert a list if preferred | ||
| 1454 | ((member "list" result-params) | ||
| 1455 | (insert | ||
| 1456 | (org-babel-trim | ||
| 1457 | (org-list-to-generic (cons 'unordered | ||
| 1458 | (if (listp result) result (list result))) | ||
| 1459 | '(:splicep nil :istart "- " :iend "\n"))))) | ||
| 1417 | ;; assume the result is a table if it's not a string | 1460 | ;; assume the result is a table if it's not a string |
| 1418 | ((not (stringp result)) | 1461 | ((not (stringp result)) |
| 1462 | (goto-char beg) | ||
| 1419 | (insert (concat (orgtbl-to-orgtbl | 1463 | (insert (concat (orgtbl-to-orgtbl |
| 1420 | (if (or (eq 'hline (car result)) | 1464 | (if (or (eq 'hline (car result)) |
| 1421 | (and (listp (car result)) | 1465 | (and (listp (car result)) |
| @@ -1425,24 +1469,34 @@ code ---- the results are extracted in the syntax of the source | |||
| 1425 | (goto-char beg) (when (org-at-table-p) (org-table-align))) | 1469 | (goto-char beg) (when (org-at-table-p) (org-table-align))) |
| 1426 | ((member "file" result-params) | 1470 | ((member "file" result-params) |
| 1427 | (insert result)) | 1471 | (insert result)) |
| 1428 | ((member "html" result-params) | 1472 | (t (goto-char beg) (insert result))) |
| 1429 | (insert (format "#+BEGIN_HTML%s\n%s#+END_HTML\n" | 1473 | (when (listp result) (goto-char (org-table-end))) |
| 1430 | results-switches result))) | 1474 | (setq end (point-marker)) |
| 1431 | ((member "latex" result-params) | 1475 | ;; possibly wrap result |
| 1432 | (insert (format "#+BEGIN_LaTeX%s\n%s#+END_LaTeX\n" | 1476 | (flet ((wrap (start finish) |
| 1433 | results-switches result))) | 1477 | (goto-char beg) (insert start) |
| 1434 | ((member "code" result-params) | 1478 | (goto-char end) (insert finish) |
| 1435 | (insert (format "#+BEGIN_SRC %s%s\n%s#+END_SRC\n" | 1479 | (setq end (point-marker)))) |
| 1436 | (or lang "none") results-switches result))) | 1480 | (cond |
| 1437 | ((member "org" result-params) | 1481 | ((member "html" result-params) |
| 1438 | (insert (format "#+BEGIN_SRC org\n%s#+END_SRC\n" result))) | 1482 | (wrap "#+BEGIN_HTML\n" "#+END_HTML")) |
| 1439 | ((member "raw" result-params) | 1483 | ((member "latex" result-params) |
| 1440 | (save-excursion (insert result)) (if (org-at-table-p) (org-cycle))) | 1484 | (wrap "#+BEGIN_LaTeX\n" "#+END_LaTeX")) |
| 1441 | (t | 1485 | ((member "code" result-params) |
| 1442 | (org-babel-examplize-region | 1486 | (wrap (format "#+BEGIN_SRC %s%s\n" (or lang "none") results-switches) |
| 1443 | (point) (progn (insert result) (point)) results-switches))) | 1487 | "#+END_SRC")) |
| 1488 | ((member "org" result-params) | ||
| 1489 | (wrap "#+BEGIN_ORG\n" "#+END_ORG")) | ||
| 1490 | ((member "raw" result-params) | ||
| 1491 | (goto-char beg) (if (org-at-table-p) (org-cycle))) | ||
| 1492 | ((member "wrap" result-params) | ||
| 1493 | (when (and (stringp result) (not (member "file" result-params))) | ||
| 1494 | (org-babel-examplize-region beg end results-switches)) | ||
| 1495 | (wrap "#+BEGIN_RESULT\n" "#+END_RESULT")) | ||
| 1496 | ((and (stringp result) (not (member "file" result-params))) | ||
| 1497 | (org-babel-examplize-region beg end results-switches) | ||
| 1498 | (setq end (point))))) | ||
| 1444 | ;; possibly indent the results to match the #+results line | 1499 | ;; possibly indent the results to match the #+results line |
| 1445 | (setq end (if (listp result) (org-table-end) (point))) | ||
| 1446 | (when (and indent (> indent 0) | 1500 | (when (and indent (> indent 0) |
| 1447 | ;; in this case `table-align' does the work for us | 1501 | ;; in this case `table-align' does the work for us |
| 1448 | (not (and (listp result) | 1502 | (not (and (listp result) |
| @@ -1450,9 +1504,9 @@ code ---- the results are extracted in the syntax of the source | |||
| 1450 | (indent-rigidly beg end indent)))) | 1504 | (indent-rigidly beg end indent)))) |
| 1451 | (if (= (length result) 0) | 1505 | (if (= (length result) 0) |
| 1452 | (if (member "value" result-params) | 1506 | (if (member "value" result-params) |
| 1453 | (message "No result returned by source block") | 1507 | (message "Code block returned no value.") |
| 1454 | (message "Source block produced no output")) | 1508 | (message "Code block produced no output.")) |
| 1455 | (message "finished")))) | 1509 | (message "Code block evaluation complete.")))) |
| 1456 | 1510 | ||
| 1457 | (defun org-babel-remove-result (&optional info) | 1511 | (defun org-babel-remove-result (&optional info) |
| 1458 | "Remove the result of the current source block." | 1512 | "Remove the result of the current source block." |
| @@ -1466,25 +1520,18 @@ code ---- the results are extracted in the syntax of the source | |||
| 1466 | (defun org-babel-result-end () | 1520 | (defun org-babel-result-end () |
| 1467 | "Return the point at the end of the current set of results" | 1521 | "Return the point at the end of the current set of results" |
| 1468 | (save-excursion | 1522 | (save-excursion |
| 1469 | (if (org-at-table-p) | 1523 | (cond |
| 1470 | (progn (goto-char (org-table-end)) (point)) | 1524 | ((org-at-table-p) (progn (goto-char (org-table-end)) (point))) |
| 1471 | (let ((case-fold-search t)) | 1525 | ((org-in-item-p) (- (org-list-bottom-point) 1)) |
| 1472 | (cond | 1526 | (t |
| 1473 | ((looking-at "[ \t]*#\\+begin_latex") | 1527 | (let ((case-fold-search t) |
| 1474 | (re-search-forward "[ \t]*#\\+end_latex" nil t) | 1528 | (blocks-re (regexp-opt |
| 1475 | (forward-line 1)) | 1529 | (list "latex" "html" "example" "src" "result")))) |
| 1476 | ((looking-at "[ \t]*#\\+begin_html") | 1530 | (if (looking-at (concat "[ \t]*#\\+begin_" blocks-re)) |
| 1477 | (re-search-forward "[ \t]*#\\+end_html" nil t) | 1531 | (re-search-forward (concat "[ \t]*#\\+end_" blocks-re) nil t) |
| 1478 | (forward-line 1)) | 1532 | (while (looking-at "[ \t]*\\(: \\|\\[\\[\\)") |
| 1479 | ((looking-at "[ \t]*#\\+begin_example") | 1533 | (forward-line 1)))) |
| 1480 | (re-search-forward "[ \t]*#\\+end_example" nil t) | 1534 | (point))))) |
| 1481 | (forward-line 1)) | ||
| 1482 | ((looking-at "[ \t]*#\\+begin_src") | ||
| 1483 | (re-search-forward "[ \t]*#\\+end_src" nil t) | ||
| 1484 | (forward-line 1)) | ||
| 1485 | (t (progn (while (looking-at "[ \t]*\\(: \\|\\[\\[\\)") | ||
| 1486 | (forward-line 1)))))) | ||
| 1487 | (point)))) | ||
| 1488 | 1535 | ||
| 1489 | (defun org-babel-result-to-file (result) | 1536 | (defun org-babel-result-to-file (result) |
| 1490 | "Convert RESULT into an `org-mode' link. | 1537 | "Convert RESULT into an `org-mode' link. |
| @@ -1505,9 +1552,7 @@ file's directory then expand relative links." | |||
| 1505 | (interactive "*r") | 1552 | (interactive "*r") |
| 1506 | (let ((size (count-lines beg end))) | 1553 | (let ((size (count-lines beg end))) |
| 1507 | (save-excursion | 1554 | (save-excursion |
| 1508 | (cond ((= size 0) | 1555 | (cond ((= size 0)) ; do nothing for an empty result |
| 1509 | (error (concat "This should not be impossible:" | ||
| 1510 | "a newline was appended to result if missing"))) | ||
| 1511 | ((< size org-babel-min-lines-for-block-output) | 1556 | ((< size org-babel-min-lines-for-block-output) |
| 1512 | (goto-char beg) | 1557 | (goto-char beg) |
| 1513 | (dotimes (n size) | 1558 | (dotimes (n size) |
| @@ -1517,7 +1562,7 @@ file's directory then expand relative links." | |||
| 1517 | (insert (if results-switches | 1562 | (insert (if results-switches |
| 1518 | (format "#+begin_example%s\n" results-switches) | 1563 | (format "#+begin_example%s\n" results-switches) |
| 1519 | "#+begin_example\n")) | 1564 | "#+begin_example\n")) |
| 1520 | (forward-char (- end beg)) | 1565 | (if (markerp end) (goto-char end) (forward-char (- end beg))) |
| 1521 | (insert "#+end_example\n")))))) | 1566 | (insert "#+end_example\n")))))) |
| 1522 | 1567 | ||
| 1523 | (defun org-babel-update-block-body (new-body) | 1568 | (defun org-babel-update-block-body (new-body) |
| @@ -1534,8 +1579,8 @@ Later elements of PLISTS override the values of previous element. | |||
| 1534 | This takes into account some special considerations for certain | 1579 | This takes into account some special considerations for certain |
| 1535 | parameters when merging lists." | 1580 | parameters when merging lists." |
| 1536 | (let ((results-exclusive-groups | 1581 | (let ((results-exclusive-groups |
| 1537 | '(("file" "vector" "table" "scalar" "raw" "org" | 1582 | '(("file" "list" "vector" "table" "scalar" "raw" "org" |
| 1538 | "html" "latex" "code" "pp") | 1583 | "html" "latex" "code" "pp" "wrap") |
| 1539 | ("replace" "silent" "append" "prepend") | 1584 | ("replace" "silent" "append" "prepend") |
| 1540 | ("output" "value"))) | 1585 | ("output" "value"))) |
| 1541 | (exports-exclusive-groups | 1586 | (exports-exclusive-groups |
| @@ -1599,7 +1644,7 @@ parameters when merging lists." | |||
| 1599 | (:tangle ;; take the latest -- always overwrite | 1644 | (:tangle ;; take the latest -- always overwrite |
| 1600 | (setq tangle (or (list (cdr pair)) tangle))) | 1645 | (setq tangle (or (list (cdr pair)) tangle))) |
| 1601 | (:noweb | 1646 | (:noweb |
| 1602 | (setq noweb (e-merge '(("yes" "no")) noweb | 1647 | (setq noweb (e-merge '(("yes" "no" "tangle")) noweb |
| 1603 | (split-string (or (cdr pair) ""))))) | 1648 | (split-string (or (cdr pair) ""))))) |
| 1604 | (:cache | 1649 | (:cache |
| 1605 | (setq cache (e-merge '(("yes" "no")) cache | 1650 | (setq cache (e-merge '(("yes" "no")) cache |
| @@ -1718,6 +1763,38 @@ block but are passed literally to the \"example-block\"." | |||
| 1718 | "Strip protective commas from bodies of source blocks." | 1763 | "Strip protective commas from bodies of source blocks." |
| 1719 | (replace-regexp-in-string "^,#" "#" body)) | 1764 | (replace-regexp-in-string "^,#" "#" body)) |
| 1720 | 1765 | ||
| 1766 | (defun org-babel-script-escape (str) | ||
| 1767 | "Safely convert tables into elisp lists." | ||
| 1768 | (let (in-single in-double out) | ||
| 1769 | (org-babel-read | ||
| 1770 | (if (and (stringp str) (string-match "^\\[.+\\]$" str)) | ||
| 1771 | (org-babel-read | ||
| 1772 | (concat | ||
| 1773 | "'" | ||
| 1774 | (progn | ||
| 1775 | (mapc | ||
| 1776 | (lambda (ch) | ||
| 1777 | (setq | ||
| 1778 | out | ||
| 1779 | (case ch | ||
| 1780 | (91 (if (or in-double in-single) ; [ | ||
| 1781 | (cons 91 out) | ||
| 1782 | (cons 40 out))) | ||
| 1783 | (93 (if (or in-double in-single) ; ] | ||
| 1784 | (cons 93 out) | ||
| 1785 | (cons 41 out))) | ||
| 1786 | (44 (if (or in-double in-single) (cons 44 out) out)) ; , | ||
| 1787 | (39 (if in-double ; ' | ||
| 1788 | (cons 39 out) | ||
| 1789 | (setq in-single (not in-single)) (cons 34 out))) | ||
| 1790 | (34 (if in-single ; " | ||
| 1791 | (append (list 34 32) out) | ||
| 1792 | (setq in-double (not in-double)) (cons 34 out))) | ||
| 1793 | (t (cons ch out))))) | ||
| 1794 | (string-to-list str)) | ||
| 1795 | (apply #'string (reverse out))))) | ||
| 1796 | str)))) | ||
| 1797 | |||
| 1721 | (defun org-babel-read (cell) | 1798 | (defun org-babel-read (cell) |
| 1722 | "Convert the string value of CELL to a number if appropriate. | 1799 | "Convert the string value of CELL to a number if appropriate. |
| 1723 | Otherwise if cell looks like lisp (meaning it starts with a | 1800 | Otherwise if cell looks like lisp (meaning it starts with a |
| @@ -1851,7 +1928,7 @@ of `org-babel-temporary-directory'." | |||
| 1851 | (if (file-remote-p default-directory) | 1928 | (if (file-remote-p default-directory) |
| 1852 | (make-temp-file | 1929 | (make-temp-file |
| 1853 | (concat (file-remote-p default-directory) | 1930 | (concat (file-remote-p default-directory) |
| 1854 | (expand-file-name | 1931 | (expand-file-name |
| 1855 | prefix temporary-file-directory) | 1932 | prefix temporary-file-directory) |
| 1856 | nil suffix)) | 1933 | nil suffix)) |
| 1857 | (let ((temporary-file-directory | 1934 | (let ((temporary-file-directory |
| @@ -1865,17 +1942,22 @@ of `org-babel-temporary-directory'." | |||
| 1865 | (when (and (boundp 'org-babel-temporary-directory) | 1942 | (when (and (boundp 'org-babel-temporary-directory) |
| 1866 | (file-exists-p org-babel-temporary-directory)) | 1943 | (file-exists-p org-babel-temporary-directory)) |
| 1867 | ;; taken from `delete-directory' in files.el | 1944 | ;; taken from `delete-directory' in files.el |
| 1868 | (mapc (lambda (file) | 1945 | (condition-case nil |
| 1869 | ;; This test is equivalent to | 1946 | (progn |
| 1870 | ;; (and (file-directory-p fn) (not (file-symlink-p fn))) | 1947 | (mapc (lambda (file) |
| 1871 | ;; but more efficient | 1948 | ;; This test is equivalent to |
| 1872 | (if (eq t (car (file-attributes file))) | 1949 | ;; (and (file-directory-p fn) (not (file-symlink-p fn))) |
| 1873 | (delete-directory file) | 1950 | ;; but more efficient |
| 1874 | (delete-file file))) | 1951 | (if (eq t (car (file-attributes file))) |
| 1875 | ;; We do not want to delete "." and "..". | 1952 | (delete-directory file) |
| 1876 | (directory-files org-babel-temporary-directory 'full | 1953 | (delete-file file))) |
| 1877 | "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) | 1954 | ;; We do not want to delete "." and "..". |
| 1878 | (delete-directory org-babel-temporary-directory))) | 1955 | (directory-files org-babel-temporary-directory 'full |
| 1956 | "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) | ||
| 1957 | (delete-directory org-babel-temporary-directory)) | ||
| 1958 | (error | ||
| 1959 | (message "Failed to remove temporary Org-babel directory %s" | ||
| 1960 | org-babel-temporary-directory))))) | ||
| 1879 | 1961 | ||
| 1880 | (add-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory) | 1962 | (add-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory) |
| 1881 | 1963 | ||
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 1c9d6d4a3de..6bcbf62da02 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -242,8 +242,12 @@ you can \"misuse\" it to also add other text to the header. However, | |||
| 242 | (const org-agenda-prefix-format :value " %-12:c%?-12t% s") | 242 | (const org-agenda-prefix-format :value " %-12:c%?-12t% s") |
| 243 | (string)) | 243 | (string)) |
| 244 | (list :tag "Number of days in agenda" | 244 | (list :tag "Number of days in agenda" |
| 245 | (const org-agenda-ndays) | 245 | (const org-agenda-span) |
| 246 | (integer :value 1)) | 246 | (choice (const :tag "Day" 'day) |
| 247 | (const :tag "Week" 'week) | ||
| 248 | (const :tag "Month" 'month) | ||
| 249 | (const :tag "Year" 'year) | ||
| 250 | (integer :tag "Custom"))) | ||
| 247 | (list :tag "Fixed starting date" | 251 | (list :tag "Fixed starting date" |
| 248 | (const org-agenda-start-day) | 252 | (const org-agenda-start-day) |
| 249 | (string :value "2007-11-01")) | 253 | (string :value "2007-11-01")) |
| @@ -562,6 +566,33 @@ See also the variable `org-agenda-tags-todo-honor-ignore-options'." | |||
| 562 | :group 'org-agenda-todo-list | 566 | :group 'org-agenda-todo-list |
| 563 | :type 'boolean) | 567 | :type 'boolean) |
| 564 | 568 | ||
| 569 | (defcustom org-agenda-todo-ignore-timestamp nil | ||
| 570 | "Non-nil means don't show entries with a timestamp. | ||
| 571 | This applies when creating the global todo list. | ||
| 572 | Valid values are: | ||
| 573 | |||
| 574 | past Don't show entries for today or in the past. | ||
| 575 | |||
| 576 | future Don't show entries with a timestamp in the future. | ||
| 577 | The idea behind this is that if it has a future | ||
| 578 | timestamp, you don't want to think about it until the | ||
| 579 | date. | ||
| 580 | |||
| 581 | all Don't show any entries with a timestamp in the global todo list. | ||
| 582 | The idea behind this is that by setting a timestamp, you | ||
| 583 | have already \"taken care\" of this item. | ||
| 584 | |||
| 585 | See also `org-agenda-todo-ignore-with-date'. | ||
| 586 | See also the variable `org-agenda-tags-todo-honor-ignore-options' if you want | ||
| 587 | to make his option also apply to the tags-todo list." | ||
| 588 | :group 'org-agenda-skip | ||
| 589 | :group 'org-agenda-todo-list | ||
| 590 | :type '(choice | ||
| 591 | (const :tag "Ignore future timestamp todos" future) | ||
| 592 | (const :tag "Ignore past or present timestamp todos" past) | ||
| 593 | (const :tag "Ignore all timestamp todos" all) | ||
| 594 | (const :tag "Show timestamp todos" nil))) | ||
| 595 | |||
| 565 | (defcustom org-agenda-todo-ignore-scheduled nil | 596 | (defcustom org-agenda-todo-ignore-scheduled nil |
| 566 | "Non-nil means, ignore some scheduled TODO items when making TODO list. | 597 | "Non-nil means, ignore some scheduled TODO items when making TODO list. |
| 567 | This applies when creating the global todo list. | 598 | This applies when creating the global todo list. |
| @@ -632,7 +663,8 @@ to make his option also apply to the tags-todo list." | |||
| 632 | "Non-nil means honor todo-list ...ignore options also in tags-todo search. | 663 | "Non-nil means honor todo-list ...ignore options also in tags-todo search. |
| 633 | The variables | 664 | The variables |
| 634 | `org-agenda-todo-ignore-with-date', | 665 | `org-agenda-todo-ignore-with-date', |
| 635 | `org-agenda-todo-ignore-scheduled' | 666 | `org-agenda-todo-ignore-timestamp', |
| 667 | `org-agenda-todo-ignore-scheduled', | ||
| 636 | `org-agenda-todo-ignore-deadlines' | 668 | `org-agenda-todo-ignore-deadlines' |
| 637 | make the global TODO list skip entries that have time stamps of certain | 669 | make the global TODO list skip entries that have time stamps of certain |
| 638 | kinds. If this option is set, the same options will also apply for the | 670 | kinds. If this option is set, the same options will also apply for the |
| @@ -860,12 +892,25 @@ option will be ignored." | |||
| 860 | :group 'org-agenda-windows | 892 | :group 'org-agenda-windows |
| 861 | :type 'boolean) | 893 | :type 'boolean) |
| 862 | 894 | ||
| 863 | (defcustom org-agenda-ndays 7 | 895 | (defcustom org-agenda-ndays nil |
| 864 | "Number of days to include in overview display. | 896 | "Number of days to include in overview display. |
| 865 | Should be 1 or 7. | 897 | Should be 1 or 7. |
| 898 | Obsolete, see `org-agenda-span'." | ||
| 899 | :group 'org-agenda-daily/weekly | ||
| 900 | :type 'integer) | ||
| 901 | |||
| 902 | (make-obsolete-variable 'org-agenda-ndays 'org-agenda-span "24.1") | ||
| 903 | |||
| 904 | (defcustom org-agenda-span 'week | ||
| 905 | "Number of days to include in overview display. | ||
| 906 | Can be day, week, month, year, or any number of days. | ||
| 866 | Custom commands can set this variable in the options section." | 907 | Custom commands can set this variable in the options section." |
| 867 | :group 'org-agenda-daily/weekly | 908 | :group 'org-agenda-daily/weekly |
| 868 | :type 'integer) | 909 | :type '(choice (const :tag "Day" day) |
| 910 | (const :tag "Week" week) | ||
| 911 | (const :tag "Month" month) | ||
| 912 | (const :tag "Year" year) | ||
| 913 | (integer :tag "Custom"))) | ||
| 869 | 914 | ||
| 870 | (defcustom org-agenda-start-on-weekday 1 | 915 | (defcustom org-agenda-start-on-weekday 1 |
| 871 | "Non-nil means start the overview always on the specified weekday. | 916 | "Non-nil means start the overview always on the specified weekday. |
| @@ -922,6 +967,35 @@ For example, 9:30am would become 09:30 rather than 9:30." | |||
| 922 | :group 'org-agenda-daily/weekly | 967 | :group 'org-agenda-daily/weekly |
| 923 | :type 'boolean) | 968 | :type 'boolean) |
| 924 | 969 | ||
| 970 | (defcustom org-agenda-timegrid-use-ampm nil | ||
| 971 | "When set, show AM/PM style timestamps on the timegrid." | ||
| 972 | :group 'org-agenda | ||
| 973 | :type 'boolean) | ||
| 974 | |||
| 975 | (defun org-agenda-time-of-day-to-ampm (time) | ||
| 976 | "Convert TIME of a string like '13:45' to an AM/PM style time string." | ||
| 977 | (let* ((hour-number (string-to-number (substring time 0 -3))) | ||
| 978 | (minute (substring time -2)) | ||
| 979 | (ampm "am")) | ||
| 980 | (cond | ||
| 981 | ((equal hour-number 12) | ||
| 982 | (setq ampm "pm")) | ||
| 983 | ((> hour-number 12) | ||
| 984 | (setq ampm "pm") | ||
| 985 | (setq hour-number (- hour-number 12)))) | ||
| 986 | (concat | ||
| 987 | (if org-agenda-time-leading-zero | ||
| 988 | (format "%02d" hour-number) | ||
| 989 | (format "%02s" (number-to-string hour-number))) | ||
| 990 | ":" minute ampm))) | ||
| 991 | |||
| 992 | (defun org-agenda-time-of-day-to-ampm-maybe (time) | ||
| 993 | "Conditionally convert TIME to AM/PM format | ||
| 994 | based on `org-agenda-timegrid-use-ampm'" | ||
| 995 | (if org-agenda-timegrid-use-ampm | ||
| 996 | (org-agenda-time-of-day-to-ampm time) | ||
| 997 | time)) | ||
| 998 | |||
| 925 | (defcustom org-agenda-weekend-days '(6 0) | 999 | (defcustom org-agenda-weekend-days '(6 0) |
| 926 | "Which days are weekend? | 1000 | "Which days are weekend? |
| 927 | These days get the special face `org-agenda-date-weekend' in the agenda | 1001 | These days get the special face `org-agenda-date-weekend' in the agenda |
| @@ -1211,11 +1285,11 @@ When nil, such items are sorted as 0 minutes effort." | |||
| 1211 | :group 'org-agenda) | 1285 | :group 'org-agenda) |
| 1212 | 1286 | ||
| 1213 | (defcustom org-agenda-prefix-format | 1287 | (defcustom org-agenda-prefix-format |
| 1214 | '((agenda . " %-12:c%?-12t% s") | 1288 | '((agenda . " %i %-12:c%?-12t% s") |
| 1215 | (timeline . " % s") | 1289 | (timeline . " % s") |
| 1216 | (todo . " %-12:c") | 1290 | (todo . " %i %-12:c") |
| 1217 | (tags . " %-12:c") | 1291 | (tags . " %i %-12:c") |
| 1218 | (search . " %-12:c")) | 1292 | (search . " %i %-12:c")) |
| 1219 | "Format specifications for the prefix of items in the agenda views. | 1293 | "Format specifications for the prefix of items in the agenda views. |
| 1220 | An alist with four entries, for the different agenda types. The keys to the | 1294 | An alist with four entries, for the different agenda types. The keys to the |
| 1221 | sublists are `agenda', `timeline', `todo', and `tags'. The values | 1295 | sublists are `agenda', `timeline', `todo', and `tags'. The values |
| @@ -1224,6 +1298,8 @@ This format works similar to a printf format, with the following meaning: | |||
| 1224 | 1298 | ||
| 1225 | %c the category of the item, \"Diary\" for entries from the diary, or | 1299 | %c the category of the item, \"Diary\" for entries from the diary, or |
| 1226 | as given by the CATEGORY keyword or derived from the file name. | 1300 | as given by the CATEGORY keyword or derived from the file name. |
| 1301 | %i the icon category of the item, as give in | ||
| 1302 | `org-agenda-category-icon-alist'. | ||
| 1227 | %T the *last* tag of the item. Last because inherited tags come | 1303 | %T the *last* tag of the item. Last because inherited tags come |
| 1228 | first in the list. | 1304 | first in the list. |
| 1229 | %t the time-of-day specification if one applies to the entry, in the | 1305 | %t the time-of-day specification if one applies to the entry, in the |
| @@ -1431,6 +1507,52 @@ determines if it is a foreground or a background color." | |||
| 1431 | (string :tag "Color") | 1507 | (string :tag "Color") |
| 1432 | (sexp :tag "Face")))))) | 1508 | (sexp :tag "Face")))))) |
| 1433 | 1509 | ||
| 1510 | (defcustom org-agenda-day-face-function nil | ||
| 1511 | "Function called to determine what face should be used to display a day. | ||
| 1512 | The only argument passed to that function is the day. It should | ||
| 1513 | returns a face, or nil if does not want to specify a face and let | ||
| 1514 | the normal rules apply." | ||
| 1515 | :group 'org-agenda-line-format | ||
| 1516 | :type 'function) | ||
| 1517 | |||
| 1518 | (defcustom org-agenda-category-icon-alist nil | ||
| 1519 | "Alist of category icon to be displayed in agenda views. | ||
| 1520 | |||
| 1521 | Each entry should have the following format: | ||
| 1522 | |||
| 1523 | (CATEGORY-REGEXP FILE-OR-DATA TYPE DATA-P PROPS) | ||
| 1524 | |||
| 1525 | Where CATEGORY-REGEXP is a regexp matching the categories where | ||
| 1526 | the icon should be displayed. | ||
| 1527 | FILE-OR-DATA either a file path or a string containing image data. | ||
| 1528 | |||
| 1529 | The other fields can be ommited safely if not needed: | ||
| 1530 | TYPE indicates the image type. | ||
| 1531 | DATA-P is a boolean indicating whether the FILE-OR-DATA string is | ||
| 1532 | image data. | ||
| 1533 | PROPS are additional image attributes to assign to the image, | ||
| 1534 | like, e.g. `:ascent center'. | ||
| 1535 | |||
| 1536 | (\"Org\" \"/path/to/icon.png\" nil nil :ascent center) | ||
| 1537 | |||
| 1538 | If you want to set the display properties yourself, just put a | ||
| 1539 | list as second element: | ||
| 1540 | |||
| 1541 | (CATEGORY-REGEXP (MY PROPERTY LIST)) | ||
| 1542 | |||
| 1543 | For example, to display a 16px horizontal space for Emacs | ||
| 1544 | category, you can use: | ||
| 1545 | |||
| 1546 | (\"Emacs\" '(space . (:width (16))))" | ||
| 1547 | :group 'org-agenda-line-format | ||
| 1548 | :type '(alist :key-type (string :tag "Regexp matching category") | ||
| 1549 | :value-type (choice (list :tag "Icon" | ||
| 1550 | (string :tag "File or data") | ||
| 1551 | (symbol :tag "Type") | ||
| 1552 | (boolean :tag "Data?") | ||
| 1553 | (repeat :tag "Extra image properties" :inline t symbol)) | ||
| 1554 | (list :tag "Display properties" sexp)))) | ||
| 1555 | |||
| 1434 | (defgroup org-agenda-column-view nil | 1556 | (defgroup org-agenda-column-view nil |
| 1435 | "Options concerning column view in the agenda." | 1557 | "Options concerning column view in the agenda." |
| 1436 | :tag "Org Agenda Column View" | 1558 | :tag "Org Agenda Column View" |
| @@ -1720,19 +1842,19 @@ The following commands are available: | |||
| 1720 | ("View" | 1842 | ("View" |
| 1721 | ["Day View" org-agenda-day-view | 1843 | ["Day View" org-agenda-day-view |
| 1722 | :active (org-agenda-check-type nil 'agenda) | 1844 | :active (org-agenda-check-type nil 'agenda) |
| 1723 | :style radio :selected (equal org-agenda-ndays 1) | 1845 | :style radio :selected (eq org-agenda-current-span 'day) |
| 1724 | :keys "v d (or just d)"] | 1846 | :keys "v d (or just d)"] |
| 1725 | ["Week View" org-agenda-week-view | 1847 | ["Week View" org-agenda-week-view |
| 1726 | :active (org-agenda-check-type nil 'agenda) | 1848 | :active (org-agenda-check-type nil 'agenda) |
| 1727 | :style radio :selected (equal org-agenda-ndays 7) | 1849 | :style radio :selected (eq org-agenda-current-span 'week) |
| 1728 | :keys "v w (or just w)"] | 1850 | :keys "v w (or just w)"] |
| 1729 | ["Month View" org-agenda-month-view | 1851 | ["Month View" org-agenda-month-view |
| 1730 | :active (org-agenda-check-type nil 'agenda) | 1852 | :active (org-agenda-check-type nil 'agenda) |
| 1731 | :style radio :selected (member org-agenda-ndays '(28 29 30 31)) | 1853 | :style radio :selected (eq org-agenda-current-span 'month) |
| 1732 | :keys "v m"] | 1854 | :keys "v m"] |
| 1733 | ["Year View" org-agenda-year-view | 1855 | ["Year View" org-agenda-year-view |
| 1734 | :active (org-agenda-check-type nil 'agenda) | 1856 | :active (org-agenda-check-type nil 'agenda) |
| 1735 | :style radio :selected (member org-agenda-ndays '(365 366)) | 1857 | :style radio :selected (eq org-agenda-current-span 'year) |
| 1736 | :keys "v y"] | 1858 | :keys "v y"] |
| 1737 | "--" | 1859 | "--" |
| 1738 | ["Include Diary" org-agenda-toggle-diary | 1860 | ["Include Diary" org-agenda-toggle-diary |
| @@ -2778,6 +2900,7 @@ removed from the entry content. Currently only `planning' is allowed here." | |||
| 2778 | (defvar org-agenda-columns-active nil) | 2900 | (defvar org-agenda-columns-active nil) |
| 2779 | (defvar org-agenda-name nil) | 2901 | (defvar org-agenda-name nil) |
| 2780 | (defvar org-agenda-filter nil) | 2902 | (defvar org-agenda-filter nil) |
| 2903 | (defvar org-agenda-filter-while-redo nil) | ||
| 2781 | (defvar org-agenda-filter-preset nil | 2904 | (defvar org-agenda-filter-preset nil |
| 2782 | "A preset of the tags filter used for secondary agenda filtering. | 2905 | "A preset of the tags filter used for secondary agenda filtering. |
| 2783 | This must be a list of strings, each string must be a single tag preceded | 2906 | This must be a list of strings, each string must be a single tag preceded |
| @@ -3065,6 +3188,16 @@ no longer in use." | |||
| 3065 | (progn (delete-overlay o) t))) | 3188 | (progn (delete-overlay o) t))) |
| 3066 | (overlays-in (point-min) (point-max))))) | 3189 | (overlays-in (point-min) (point-max))))) |
| 3067 | 3190 | ||
| 3191 | (defun org-agenda-get-day-face (date) | ||
| 3192 | "Return the face DATE should be displayed with." | ||
| 3193 | (or (and (functionp org-agenda-day-face-function) | ||
| 3194 | (funcall org-agenda-day-face-function date)) | ||
| 3195 | (cond ((org-agenda-todayp date) | ||
| 3196 | 'org-agenda-date-today) | ||
| 3197 | ((member (calendar-day-of-week date) org-agenda-weekend-days) | ||
| 3198 | 'org-agenda-date-weekend) | ||
| 3199 | (t 'org-agenda-date)))) | ||
| 3200 | |||
| 3068 | ;;; Agenda timeline | 3201 | ;;; Agenda timeline |
| 3069 | 3202 | ||
| 3070 | (defvar org-agenda-only-exact-dates nil) ; dynamically scoped | 3203 | (defvar org-agenda-only-exact-dates nil) ; dynamically scoped |
| @@ -3092,10 +3225,10 @@ dates." | |||
| 3092 | org-timeline-show-empty-dates)) | 3225 | org-timeline-show-empty-dates)) |
| 3093 | (org-deadline-warning-days 0) | 3226 | (org-deadline-warning-days 0) |
| 3094 | (org-agenda-only-exact-dates t) | 3227 | (org-agenda-only-exact-dates t) |
| 3095 | (today (time-to-days (current-time))) | 3228 | (today (org-today)) |
| 3096 | (past t) | 3229 | (past t) |
| 3097 | args | 3230 | args |
| 3098 | s e rtn d emptyp wd) | 3231 | s e rtn d emptyp) |
| 3099 | (setq org-agenda-redo-command | 3232 | (setq org-agenda-redo-command |
| 3100 | (list 'progn | 3233 | (list 'progn |
| 3101 | (list 'org-switch-to-buffer-other-window (current-buffer)) | 3234 | (list 'org-switch-to-buffer-other-window (current-buffer)) |
| @@ -3129,8 +3262,7 @@ dates." | |||
| 3129 | (progn | 3262 | (progn |
| 3130 | (setq past nil) | 3263 | (setq past nil) |
| 3131 | (insert (make-string 79 ?-) "\n"))) | 3264 | (insert (make-string 79 ?-) "\n"))) |
| 3132 | (setq date (calendar-gregorian-from-absolute d) | 3265 | (setq date (calendar-gregorian-from-absolute d)) |
| 3133 | wd (calendar-day-of-week date)) | ||
| 3134 | (setq s (point)) | 3266 | (setq s (point)) |
| 3135 | (setq rtn (and (not emptyp) | 3267 | (setq rtn (and (not emptyp) |
| 3136 | (apply 'org-agenda-get-day-entries entry | 3268 | (apply 'org-agenda-get-day-entries entry |
| @@ -3144,9 +3276,7 @@ dates." | |||
| 3144 | (funcall org-agenda-format-date date)) | 3276 | (funcall org-agenda-format-date date)) |
| 3145 | "\n") | 3277 | "\n") |
| 3146 | (put-text-property s (1- (point)) 'face | 3278 | (put-text-property s (1- (point)) 'face |
| 3147 | (if (member wd org-agenda-weekend-days) | 3279 | (org-agenda-get-day-face date)) |
| 3148 | 'org-agenda-date-weekend | ||
| 3149 | 'org-agenda-date)) | ||
| 3150 | (put-text-property s (1- (point)) 'org-date-line t) | 3280 | (put-text-property s (1- (point)) 'org-date-line t) |
| 3151 | (put-text-property s (1- (point)) 'org-agenda-date-header t) | 3281 | (put-text-property s (1- (point)) 'org-agenda-date-header t) |
| 3152 | (if (equal d today) | 3282 | (if (equal d today) |
| @@ -3172,7 +3302,7 @@ When EMPTY is non-nil, also include days without any entries." | |||
| 3172 | (if inactive org-ts-regexp-both org-ts-regexp))) | 3302 | (if inactive org-ts-regexp-both org-ts-regexp))) |
| 3173 | dates dates1 date day day1 day2 ts1 ts2) | 3303 | dates dates1 date day day1 day2 ts1 ts2) |
| 3174 | (if force-today | 3304 | (if force-today |
| 3175 | (setq dates (list (time-to-days (current-time))))) | 3305 | (setq dates (list (org-today)))) |
| 3176 | (save-excursion | 3306 | (save-excursion |
| 3177 | (goto-char beg) | 3307 | (goto-char beg) |
| 3178 | (while (re-search-forward re end t) | 3308 | (while (re-search-forward re end t) |
| @@ -3210,7 +3340,8 @@ When EMPTY is non-nil, also include days without any entries." | |||
| 3210 | (defvar org-agenda-last-arguments nil | 3340 | (defvar org-agenda-last-arguments nil |
| 3211 | "The arguments of the previous call to `org-agenda'.") | 3341 | "The arguments of the previous call to `org-agenda'.") |
| 3212 | (defvar org-starting-day nil) ; local variable in the agenda buffer | 3342 | (defvar org-starting-day nil) ; local variable in the agenda buffer |
| 3213 | (defvar org-agenda-span nil) ; local variable in the agenda buffer | 3343 | (defvar org-agenda-current-span nil |
| 3344 | "The current span used in the agenda view.") ; local variable in the agenda buffer | ||
| 3214 | (defvar org-include-all-loc nil) ; local variable | 3345 | (defvar org-include-all-loc nil) ; local variable |
| 3215 | 3346 | ||
| 3216 | (defvar org-agenda-entry-types '(:deadline :scheduled :timestamp :sexp) | 3347 | (defvar org-agenda-entry-types '(:deadline :scheduled :timestamp :sexp) |
| @@ -3247,7 +3378,7 @@ somewhat less efficient) way of determining what is included in | |||
| 3247 | the daily/weekly agenda, see `org-agenda-skip-function'.") | 3378 | the daily/weekly agenda, see `org-agenda-skip-function'.") |
| 3248 | 3379 | ||
| 3249 | ;;;###autoload | 3380 | ;;;###autoload |
| 3250 | (defun org-agenda-list (&optional include-all start-day ndays) | 3381 | (defun org-agenda-list (&optional include-all start-day span) |
| 3251 | "Produce a daily/weekly view from all files in variable `org-agenda-files'. | 3382 | "Produce a daily/weekly view from all files in variable `org-agenda-files'. |
| 3252 | The view will be for the current day or week, but from the overview buffer | 3383 | The view will be for the current day or week, but from the overview buffer |
| 3253 | you will be able to go to other days/weeks. | 3384 | you will be able to go to other days/weeks. |
| @@ -3258,37 +3389,36 @@ This feature is considered obsolete, please use the TODO list or a block | |||
| 3258 | agenda instead. | 3389 | agenda instead. |
| 3259 | 3390 | ||
| 3260 | With a numeric prefix argument in an interactive call, the agenda will | 3391 | With a numeric prefix argument in an interactive call, the agenda will |
| 3261 | span INCLUDE-ALL days. Lisp programs should instead specify NDAYS to change | 3392 | span INCLUDE-ALL days. Lisp programs should instead specify SPAN to change |
| 3262 | the number of days. NDAYS defaults to `org-agenda-ndays'. | 3393 | the number of days. SPAN defaults to `org-agenda-span'. |
| 3263 | 3394 | ||
| 3264 | START-DAY defaults to TODAY, or to the most recent match for the weekday | 3395 | START-DAY defaults to TODAY, or to the most recent match for the weekday |
| 3265 | given in `org-agenda-start-on-weekday'." | 3396 | given in `org-agenda-start-on-weekday'." |
| 3266 | (interactive "P") | 3397 | (interactive "P") |
| 3267 | (if (and (integerp include-all) (> include-all 0)) | 3398 | (if (and (integerp include-all) (> include-all 0)) |
| 3268 | (setq ndays include-all include-all nil)) | 3399 | (setq span include-all include-all nil)) |
| 3269 | (setq ndays (or ndays org-agenda-ndays) | 3400 | (setq start-day (or start-day org-agenda-start-day)) |
| 3270 | start-day (or start-day org-agenda-start-day)) | ||
| 3271 | (if org-agenda-overriding-arguments | 3401 | (if org-agenda-overriding-arguments |
| 3272 | (setq include-all (car org-agenda-overriding-arguments) | 3402 | (setq include-all (car org-agenda-overriding-arguments) |
| 3273 | start-day (nth 1 org-agenda-overriding-arguments) | 3403 | start-day (nth 1 org-agenda-overriding-arguments) |
| 3274 | ndays (nth 2 org-agenda-overriding-arguments))) | 3404 | span (nth 2 org-agenda-overriding-arguments))) |
| 3275 | (if (stringp start-day) | 3405 | (if (stringp start-day) |
| 3276 | ;; Convert to an absolute day number | 3406 | ;; Convert to an absolute day number |
| 3277 | (setq start-day (time-to-days (org-read-date nil t start-day)))) | 3407 | (setq start-day (time-to-days (org-read-date nil t start-day)))) |
| 3278 | (setq org-agenda-last-arguments (list include-all start-day ndays)) | 3408 | (setq org-agenda-last-arguments (list include-all start-day span)) |
| 3279 | (org-compile-prefix-format 'agenda) | 3409 | (org-compile-prefix-format 'agenda) |
| 3280 | (org-set-sorting-strategy 'agenda) | 3410 | (org-set-sorting-strategy 'agenda) |
| 3281 | (let* ((org-agenda-start-on-weekday | 3411 | (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays org-agenda-span))) |
| 3282 | (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays))) | 3412 | (today (org-today)) |
| 3283 | org-agenda-start-on-weekday nil)) | 3413 | (sd (or start-day today)) |
| 3414 | (ndays (org-agenda-span-to-ndays span sd)) | ||
| 3415 | (org-agenda-start-on-weekday | ||
| 3416 | (if (eq ndays 7) | ||
| 3417 | org-agenda-start-on-weekday)) | ||
| 3284 | (thefiles (org-agenda-files nil 'ifmode)) | 3418 | (thefiles (org-agenda-files nil 'ifmode)) |
| 3285 | (files thefiles) | 3419 | (files thefiles) |
| 3286 | (today (time-to-days | ||
| 3287 | (time-subtract (current-time) | ||
| 3288 | (list 0 (* 3600 org-extend-today-until) 0)))) | ||
| 3289 | (sd (or start-day today)) | ||
| 3290 | (start (if (or (null org-agenda-start-on-weekday) | 3420 | (start (if (or (null org-agenda-start-on-weekday) |
| 3291 | (< org-agenda-ndays 7)) | 3421 | (< ndays 7)) |
| 3292 | sd | 3422 | sd |
| 3293 | (let* ((nt (calendar-day-of-week | 3423 | (let* ((nt (calendar-day-of-week |
| 3294 | (calendar-gregorian-from-absolute sd))) | 3424 | (calendar-gregorian-from-absolute sd))) |
| @@ -3298,24 +3428,19 @@ given in `org-agenda-start-on-weekday'." | |||
| 3298 | (day-numbers (list start)) | 3428 | (day-numbers (list start)) |
| 3299 | (day-cnt 0) | 3429 | (day-cnt 0) |
| 3300 | (inhibit-redisplay (not debug-on-error)) | 3430 | (inhibit-redisplay (not debug-on-error)) |
| 3301 | s e rtn rtnall file date d start-pos end-pos todayp nd wd | 3431 | s e rtn rtnall file date d start-pos end-pos todayp |
| 3302 | clocktable-start clocktable-end) | 3432 | clocktable-start clocktable-end filter) |
| 3303 | (setq org-agenda-redo-command | 3433 | (setq org-agenda-redo-command |
| 3304 | (list 'org-agenda-list (list 'quote include-all) start-day ndays)) | 3434 | (list 'org-agenda-list (list 'quote include-all) start-day (list 'quote span))) |
| 3305 | ;; Make the list of days | 3435 | (dotimes (n (1- ndays)) |
| 3306 | (setq ndays (or ndays org-agenda-ndays) | 3436 | (push (1+ (car day-numbers)) day-numbers)) |
| 3307 | nd ndays) | ||
| 3308 | (while (> ndays 1) | ||
| 3309 | (push (1+ (car day-numbers)) day-numbers) | ||
| 3310 | (setq ndays (1- ndays))) | ||
| 3311 | (setq day-numbers (nreverse day-numbers)) | 3437 | (setq day-numbers (nreverse day-numbers)) |
| 3312 | (setq clocktable-start (car day-numbers) | 3438 | (setq clocktable-start (car day-numbers) |
| 3313 | clocktable-end (1+ (or (org-last day-numbers) 0))) | 3439 | clocktable-end (1+ (or (org-last day-numbers) 0))) |
| 3314 | (org-prepare-agenda "Day/Week") | 3440 | (org-prepare-agenda "Day/Week") |
| 3315 | (org-set-local 'org-starting-day (car day-numbers)) | 3441 | (org-set-local 'org-starting-day (car day-numbers)) |
| 3316 | (org-set-local 'org-include-all-loc include-all) | 3442 | (org-set-local 'org-include-all-loc include-all) |
| 3317 | (org-set-local 'org-agenda-span | 3443 | (org-set-local 'org-agenda-current-span (org-agenda-ndays-to-span span)) |
| 3318 | (org-agenda-ndays-to-span nd)) | ||
| 3319 | (when (and (or include-all org-agenda-include-all-todo) | 3444 | (when (and (or include-all org-agenda-include-all-todo) |
| 3320 | (member today day-numbers)) | 3445 | (member today day-numbers)) |
| 3321 | (setq files thefiles | 3446 | (setq files thefiles |
| @@ -3343,7 +3468,7 @@ given in `org-agenda-start-on-weekday'." | |||
| 3343 | (if org-agenda-overriding-header | 3468 | (if org-agenda-overriding-header |
| 3344 | (insert (org-add-props (copy-sequence org-agenda-overriding-header) | 3469 | (insert (org-add-props (copy-sequence org-agenda-overriding-header) |
| 3345 | nil 'face 'org-agenda-structure) "\n") | 3470 | nil 'face 'org-agenda-structure) "\n") |
| 3346 | (insert (capitalize (symbol-name (org-agenda-ndays-to-span nd))) | 3471 | (insert (org-agenda-span-name span) |
| 3347 | "-agenda" | 3472 | "-agenda" |
| 3348 | (if (< (- d2 d1) 350) | 3473 | (if (< (- d2 d1) 350) |
| 3349 | (if (= w1 w2) | 3474 | (if (= w1 w2) |
| @@ -3356,7 +3481,6 @@ given in `org-agenda-start-on-weekday'." | |||
| 3356 | (org-agenda-mark-header-line s)) | 3481 | (org-agenda-mark-header-line s)) |
| 3357 | (while (setq d (pop day-numbers)) | 3482 | (while (setq d (pop day-numbers)) |
| 3358 | (setq date (calendar-gregorian-from-absolute d) | 3483 | (setq date (calendar-gregorian-from-absolute d) |
| 3359 | wd (calendar-day-of-week date) | ||
| 3360 | s (point)) | 3484 | s (point)) |
| 3361 | (if (or (setq todayp (= d today)) | 3485 | (if (or (setq todayp (= d today)) |
| 3362 | (and (not start-pos) (= d sd))) | 3486 | (and (not start-pos) (= d sd))) |
| @@ -3400,19 +3524,16 @@ given in `org-agenda-start-on-weekday'." | |||
| 3400 | (funcall org-agenda-format-date date)) | 3524 | (funcall org-agenda-format-date date)) |
| 3401 | "\n") | 3525 | "\n") |
| 3402 | (put-text-property s (1- (point)) 'face | 3526 | (put-text-property s (1- (point)) 'face |
| 3403 | (if (member wd org-agenda-weekend-days) | 3527 | (org-agenda-get-day-face date)) |
| 3404 | 'org-agenda-date-weekend | ||
| 3405 | 'org-agenda-date)) | ||
| 3406 | (put-text-property s (1- (point)) 'org-date-line t) | 3528 | (put-text-property s (1- (point)) 'org-date-line t) |
| 3407 | (put-text-property s (1- (point)) 'org-agenda-date-header t) | 3529 | (put-text-property s (1- (point)) 'org-agenda-date-header t) |
| 3408 | (put-text-property s (1- (point)) 'org-day-cnt day-cnt) | 3530 | (put-text-property s (1- (point)) 'org-day-cnt day-cnt) |
| 3409 | (when todayp | 3531 | (when todayp |
| 3410 | (put-text-property s (1- (point)) 'org-today t) | 3532 | (put-text-property s (1- (point)) 'org-today t)) |
| 3411 | (put-text-property s (1- (point)) 'face 'org-agenda-date-today)) | ||
| 3412 | (if rtnall (insert | 3533 | (if rtnall (insert |
| 3413 | (org-finalize-agenda-entries | 3534 | (org-finalize-agenda-entries |
| 3414 | (org-agenda-add-time-grid-maybe | 3535 | (org-agenda-add-time-grid-maybe |
| 3415 | rtnall nd todayp)) | 3536 | rtnall ndays todayp)) |
| 3416 | "\n")) | 3537 | "\n")) |
| 3417 | (put-text-property s (1- (point)) 'day d) | 3538 | (put-text-property s (1- (point)) 'day d) |
| 3418 | (put-text-property s (1- (point)) 'org-day-cnt day-cnt)))) | 3539 | (put-text-property s (1- (point)) 'org-day-cnt day-cnt)))) |
| @@ -3425,6 +3546,15 @@ given in `org-agenda-start-on-weekday'." | |||
| 3425 | (setq p (plist-put p :tstart clocktable-start)) | 3546 | (setq p (plist-put p :tstart clocktable-start)) |
| 3426 | (setq p (plist-put p :tend clocktable-end)) | 3547 | (setq p (plist-put p :tend clocktable-end)) |
| 3427 | (setq p (plist-put p :scope 'agenda)) | 3548 | (setq p (plist-put p :scope 'agenda)) |
| 3549 | (when (and (eq org-agenda-clockreport-mode 'with-filter) | ||
| 3550 | (setq filter (or org-agenda-filter-while-redo | ||
| 3551 | (get 'org-agenda-filter :preset-filter)))) | ||
| 3552 | (setq p (plist-put p :tags (mapconcat (lambda (x) | ||
| 3553 | (if (string-match "[<>=]" x) | ||
| 3554 | "" | ||
| 3555 | x)) | ||
| 3556 | filter "")))) | ||
| 3557 | (message "%s" (plist-get p :tags)) (sit-for 2) | ||
| 3428 | (setq tbl (apply 'org-get-clocktable p)) | 3558 | (setq tbl (apply 'org-get-clocktable p)) |
| 3429 | (insert tbl))) | 3559 | (insert tbl))) |
| 3430 | (goto-char (point-min)) | 3560 | (goto-char (point-min)) |
| @@ -3444,7 +3574,31 @@ given in `org-agenda-start-on-weekday'." | |||
| 3444 | (message ""))) | 3574 | (message ""))) |
| 3445 | 3575 | ||
| 3446 | (defun org-agenda-ndays-to-span (n) | 3576 | (defun org-agenda-ndays-to-span (n) |
| 3447 | (cond ((< n 7) 'day) ((= n 7) 'week) ((< n 32) 'month) (t 'year))) | 3577 | "Return a span symbol for a span of N days, or N if none matches." |
| 3578 | (cond ((symbolp n) n) | ||
| 3579 | ((= n 1) 'day) | ||
| 3580 | ((= n 7) 'week) | ||
| 3581 | (t n))) | ||
| 3582 | |||
| 3583 | (defun org-agenda-span-to-ndays (span start-day) | ||
| 3584 | "Return ndays from SPAN starting at START-DAY." | ||
| 3585 | (cond ((numberp span) span) | ||
| 3586 | ((eq span 'day) 1) | ||
| 3587 | ((eq span 'week) 7) | ||
| 3588 | ((eq span 'month) | ||
| 3589 | (let ((date (calendar-gregorian-from-absolute start-day))) | ||
| 3590 | (calendar-last-day-of-month (car date) (caddr date)))) | ||
| 3591 | ((eq span 'year) | ||
| 3592 | (let ((date (calendar-gregorian-from-absolute start-day))) | ||
| 3593 | (if (calendar-leap-year-p (caddr date)) 366 365))))) | ||
| 3594 | |||
| 3595 | (defun org-agenda-span-name (span) | ||
| 3596 | "Return a SPAN name." | ||
| 3597 | (if (null span) | ||
| 3598 | "" | ||
| 3599 | (if (symbolp span) | ||
| 3600 | (capitalize (symbol-name span)) | ||
| 3601 | (format "%d days" span)))) | ||
| 3448 | 3602 | ||
| 3449 | ;;; Agenda word search | 3603 | ;;; Agenda word search |
| 3450 | 3604 | ||
| @@ -3723,7 +3877,7 @@ for a keyword. A numeric prefix directly selects the Nth keyword in | |||
| 3723 | (org-set-sorting-strategy 'todo) | 3877 | (org-set-sorting-strategy 'todo) |
| 3724 | (org-prepare-agenda "TODO") | 3878 | (org-prepare-agenda "TODO") |
| 3725 | (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil)) | 3879 | (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil)) |
| 3726 | (let* ((today (time-to-days (current-time))) | 3880 | (let* ((today (org-today)) |
| 3727 | (date (calendar-gregorian-from-absolute today)) | 3881 | (date (calendar-gregorian-from-absolute today)) |
| 3728 | (kwds org-todo-keywords-for-agenda) | 3882 | (kwds org-todo-keywords-for-agenda) |
| 3729 | (completion-ignore-case t) | 3883 | (completion-ignore-case t) |
| @@ -4347,7 +4501,8 @@ the documentation of `org-diary'." | |||
| 4347 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" | 4501 | "Do we have a reason to ignore this TODO entry because it has a time stamp?" |
| 4348 | (when (or org-agenda-todo-ignore-with-date | 4502 | (when (or org-agenda-todo-ignore-with-date |
| 4349 | org-agenda-todo-ignore-scheduled | 4503 | org-agenda-todo-ignore-scheduled |
| 4350 | org-agenda-todo-ignore-deadlines) | 4504 | org-agenda-todo-ignore-deadlines |
| 4505 | org-agenda-todo-ignore-timestamp) | ||
| 4351 | (setq end (or end (save-excursion (outline-next-heading) (point)))) | 4506 | (setq end (or end (save-excursion (outline-next-heading) (point)))) |
| 4352 | (save-excursion | 4507 | (save-excursion |
| 4353 | (or (and org-agenda-todo-ignore-with-date | 4508 | (or (and org-agenda-todo-ignore-with-date |
| @@ -4370,7 +4525,29 @@ the documentation of `org-diary'." | |||
| 4370 | (> (org-days-to-time (match-string 1)) 0)) | 4525 | (> (org-days-to-time (match-string 1)) 0)) |
| 4371 | ((eq org-agenda-todo-ignore-deadlines 'past) | 4526 | ((eq org-agenda-todo-ignore-deadlines 'past) |
| 4372 | (<= (org-days-to-time (match-string 1)) 0)) | 4527 | (<= (org-days-to-time (match-string 1)) 0)) |
| 4373 | (t (org-deadline-close (match-string 1))))))))) | 4528 | (t (org-deadline-close (match-string 1))))) |
| 4529 | (and org-agenda-todo-ignore-timestamp | ||
| 4530 | (let ((buffer (current-buffer)) | ||
| 4531 | (regexp | ||
| 4532 | (concat | ||
| 4533 | org-scheduled-time-regexp "\\|" org-deadline-time-regexp)) | ||
| 4534 | (start (point))) | ||
| 4535 | ;; Copy current buffer into a temporary one | ||
| 4536 | (with-temp-buffer | ||
| 4537 | (insert-buffer-substring buffer start end) | ||
| 4538 | (goto-char (point-min)) | ||
| 4539 | ;; Delete SCHEDULED and DEADLINE items | ||
| 4540 | (while (re-search-forward regexp end t) | ||
| 4541 | (delete-region (match-beginning 0) (match-end 0))) | ||
| 4542 | (goto-char (point-min)) | ||
| 4543 | ;; No search for timestamp left | ||
| 4544 | (when (re-search-forward org-ts-regexp nil t) | ||
| 4545 | (cond | ||
| 4546 | ((eq org-agenda-todo-ignore-timestamp 'future) | ||
| 4547 | (> (org-days-to-time (match-string 1)) 0)) | ||
| 4548 | ((eq org-agenda-todo-ignore-timestamp 'past) | ||
| 4549 | (<= (org-days-to-time (match-string 1)) 0)) | ||
| 4550 | (t)))))))))) | ||
| 4374 | 4551 | ||
| 4375 | (defconst org-agenda-no-heading-message | 4552 | (defconst org-agenda-no-heading-message |
| 4376 | "No heading for this item in buffer or region.") | 4553 | "No heading for this item in buffer or region.") |
| @@ -4924,6 +5101,14 @@ The flag is set if the currently compiled format contains a `%e'.") | |||
| 4924 | (defvar org-prefix-category-max-length nil | 5101 | (defvar org-prefix-category-max-length nil |
| 4925 | "Used by `org-compile-prefix-format' to remember the category field width.") | 5102 | "Used by `org-compile-prefix-format' to remember the category field width.") |
| 4926 | 5103 | ||
| 5104 | (defun org-agenda-get-category-icon (category) | ||
| 5105 | "Return an image for CATEGORY according to `org-agenda-category-icon-alist'." | ||
| 5106 | (dolist (entry org-agenda-category-icon-alist) | ||
| 5107 | (when (org-string-match-p (car entry) category) | ||
| 5108 | (if (listp (cadr entry)) | ||
| 5109 | (return (cadr entry)) | ||
| 5110 | (return (apply 'create-image (cdr entry))))))) | ||
| 5111 | |||
| 4927 | (defun org-format-agenda-item (extra txt &optional category tags dotime | 5112 | (defun org-format-agenda-item (extra txt &optional category tags dotime |
| 4928 | noprefix remove-re habitp) | 5113 | noprefix remove-re habitp) |
| 4929 | "Format TXT to be inserted into the agenda buffer. | 5114 | "Format TXT to be inserted into the agenda buffer. |
| @@ -4948,11 +5133,17 @@ Any match of REMOVE-RE will be removed from TXT." | |||
| 4948 | org-agenda-show-inherited-tags | 5133 | org-agenda-show-inherited-tags |
| 4949 | org-agenda-hide-tags-regexp)) | 5134 | org-agenda-hide-tags-regexp)) |
| 4950 | (let* ((category (or category | 5135 | (let* ((category (or category |
| 4951 | org-category | 5136 | (if (stringp org-category) |
| 5137 | org-category | ||
| 5138 | (and org-category (symbol-name org-category))) | ||
| 4952 | (if buffer-file-name | 5139 | (if buffer-file-name |
| 4953 | (file-name-sans-extension | 5140 | (file-name-sans-extension |
| 4954 | (file-name-nondirectory buffer-file-name)) | 5141 | (file-name-nondirectory buffer-file-name)) |
| 4955 | ""))) | 5142 | ""))) |
| 5143 | (category-icon (org-agenda-get-category-icon category)) | ||
| 5144 | (category-icon (if category-icon | ||
| 5145 | (propertize " " 'display category-icon) | ||
| 5146 | "")) | ||
| 4956 | ;; time, tag, effort are needed for the eval of the prefix format | 5147 | ;; time, tag, effort are needed for the eval of the prefix format |
| 4957 | (tag (if tags (nth (1- (length tags)) tags) "")) | 5148 | (tag (if tags (nth (1- (length tags)) tags) "")) |
| 4958 | time effort neffort | 5149 | time effort neffort |
| @@ -5038,8 +5229,15 @@ Any match of REMOVE-RE will be removed from TXT." | |||
| 5038 | (if noprefix | 5229 | (if noprefix |
| 5039 | (setq rtn txt) | 5230 | (setq rtn txt) |
| 5040 | ;; Prepare the variables needed in the eval of the compiled format | 5231 | ;; Prepare the variables needed in the eval of the compiled format |
| 5041 | (setq time (cond (s2 (concat s1 "-" s2)) | 5232 | (setq time (cond (s2 (concat |
| 5042 | (s1 (concat s1 "......")) | 5233 | (org-agenda-time-of-day-to-ampm-maybe s1) |
| 5234 | "-" (org-agenda-time-of-day-to-ampm-maybe s2) | ||
| 5235 | (if org-agenda-timegrid-use-ampm " "))) | ||
| 5236 | (s1 (concat | ||
| 5237 | (org-agenda-time-of-day-to-ampm-maybe s1) | ||
| 5238 | (if org-agenda-timegrid-use-ampm | ||
| 5239 | "........ " | ||
| 5240 | "......"))) | ||
| 5043 | (t "")) | 5241 | (t "")) |
| 5044 | extra (or (and (not habitp) extra) "") | 5242 | extra (or (and (not habitp) extra) "") |
| 5045 | category (if (symbolp category) (symbol-name category) category) | 5243 | category (if (symbolp category) (symbol-name category) category) |
| @@ -5163,11 +5361,11 @@ The resulting form is returned and stored in the variable | |||
| 5163 | (t " %-12:c%?-12t% s"))) | 5361 | (t " %-12:c%?-12t% s"))) |
| 5164 | (start 0) | 5362 | (start 0) |
| 5165 | varform vars var e c f opt) | 5363 | varform vars var e c f opt) |
| 5166 | (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([ctse]\\)" | 5364 | (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([ctsei]\\)" |
| 5167 | s start) | 5365 | s start) |
| 5168 | (setq var (cdr (assoc (match-string 4 s) | 5366 | (setq var (cdr (assoc (match-string 4 s) |
| 5169 | '(("c" . category) ("t" . time) ("s" . extra) | 5367 | '(("c" . category) ("t" . time) ("s" . extra) |
| 5170 | ("T" . tag) ("e" . effort)))) | 5368 | ("i" . category-icon) ("T" . tag) ("e" . effort)))) |
| 5171 | c (or (match-string 3 s) "") | 5369 | c (or (match-string 3 s) "") |
| 5172 | opt (match-beginning 1) | 5370 | opt (match-beginning 1) |
| 5173 | start (1+ (match-beginning 0))) | 5371 | start (1+ (match-beginning 0))) |
| @@ -5567,6 +5765,7 @@ When this is the global TODO list, a prefix argument will be interpreted." | |||
| 5567 | (let* ((org-agenda-keep-modes t) | 5765 | (let* ((org-agenda-keep-modes t) |
| 5568 | (filter org-agenda-filter) | 5766 | (filter org-agenda-filter) |
| 5569 | (preset (get 'org-agenda-filter :preset-filter)) | 5767 | (preset (get 'org-agenda-filter :preset-filter)) |
| 5768 | (org-agenda-filter-while-redo (or filter preset)) | ||
| 5570 | (cols org-agenda-columns-active) | 5769 | (cols org-agenda-columns-active) |
| 5571 | (line (org-current-line)) | 5770 | (line (org-current-line)) |
| 5572 | (window-line (- line (org-current-line (window-start)))) | 5771 | (window-line (- line (org-current-line (window-start)))) |
| @@ -5839,13 +6038,10 @@ Negative selection means regexp must not match for selection of an entry." | |||
| 5839 | (cond | 6038 | (cond |
| 5840 | (tdpos (goto-char tdpos)) | 6039 | (tdpos (goto-char tdpos)) |
| 5841 | ((eq org-agenda-type 'agenda) | 6040 | ((eq org-agenda-type 'agenda) |
| 5842 | (let* ((sd (time-to-days | 6041 | (let* ((sd (org-agenda-compute-starting-span |
| 5843 | (time-subtract (current-time) | 6042 | (org-today) (or org-agenda-ndays org-agenda-span))) |
| 5844 | (list 0 (* 3600 org-extend-today-until) 0)))) | ||
| 5845 | (comp (org-agenda-compute-time-span sd org-agenda-span)) | ||
| 5846 | (org-agenda-overriding-arguments org-agenda-last-arguments)) | 6043 | (org-agenda-overriding-arguments org-agenda-last-arguments)) |
| 5847 | (setf (nth 1 org-agenda-overriding-arguments) (car comp)) | 6044 | (setf (nth 1 org-agenda-overriding-arguments) sd) |
| 5848 | (setf (nth 2 org-agenda-overriding-arguments) (cdr comp)) | ||
| 5849 | (org-agenda-redo) | 6045 | (org-agenda-redo) |
| 5850 | (org-agenda-find-same-or-today-or-agenda))) | 6046 | (org-agenda-find-same-or-today-or-agenda))) |
| 5851 | (t (error "Cannot find today"))))) | 6047 | (t (error "Cannot find today"))))) |
| @@ -5862,28 +6058,28 @@ Negative selection means regexp must not match for selection of an entry." | |||
| 5862 | With prefix ARG, go forward that many times the current span." | 6058 | With prefix ARG, go forward that many times the current span." |
| 5863 | (interactive "p") | 6059 | (interactive "p") |
| 5864 | (org-agenda-check-type t 'agenda) | 6060 | (org-agenda-check-type t 'agenda) |
| 5865 | (let* ((span org-agenda-span) | 6061 | (let* ((span org-agenda-current-span) |
| 5866 | (sd org-starting-day) | 6062 | (sd org-starting-day) |
| 5867 | (greg (calendar-gregorian-from-absolute sd)) | 6063 | (greg (calendar-gregorian-from-absolute sd)) |
| 5868 | (cnt (org-get-at-bol 'org-day-cnt)) | 6064 | (cnt (org-get-at-bol 'org-day-cnt)) |
| 5869 | greg2 nd) | 6065 | greg2) |
| 5870 | (cond | 6066 | (cond |
| 5871 | ((eq span 'day) | 6067 | ((eq span 'day) |
| 5872 | (setq sd (+ arg sd) nd 1)) | 6068 | (setq sd (+ arg sd))) |
| 5873 | ((eq span 'week) | 6069 | ((eq span 'week) |
| 5874 | (setq sd (+ (* 7 arg) sd) nd 7)) | 6070 | (setq sd (+ (* 7 arg) sd))) |
| 5875 | ((eq span 'month) | 6071 | ((eq span 'month) |
| 5876 | (setq greg2 (list (+ (car greg) arg) (nth 1 greg) (nth 2 greg)) | 6072 | (setq greg2 (list (+ (car greg) arg) (nth 1 greg) (nth 2 greg)) |
| 5877 | sd (calendar-absolute-from-gregorian greg2)) | 6073 | sd (calendar-absolute-from-gregorian greg2)) |
| 5878 | (setcar greg2 (1+ (car greg2))) | 6074 | (setcar greg2 (1+ (car greg2)))) |
| 5879 | (setq nd (- (calendar-absolute-from-gregorian greg2) sd))) | ||
| 5880 | ((eq span 'year) | 6075 | ((eq span 'year) |
| 5881 | (setq greg2 (list (car greg) (nth 1 greg) (+ arg (nth 2 greg))) | 6076 | (setq greg2 (list (car greg) (nth 1 greg) (+ arg (nth 2 greg))) |
| 5882 | sd (calendar-absolute-from-gregorian greg2)) | 6077 | sd (calendar-absolute-from-gregorian greg2)) |
| 5883 | (setcar (nthcdr 2 greg2) (1+ (nth 2 greg2))) | 6078 | (setcar (nthcdr 2 greg2) (1+ (nth 2 greg2)))) |
| 5884 | (setq nd (- (calendar-absolute-from-gregorian greg2) sd)))) | 6079 | (t |
| 6080 | (setq sd (+ (* span arg) sd)))) | ||
| 5885 | (let ((org-agenda-overriding-arguments | 6081 | (let ((org-agenda-overriding-arguments |
| 5886 | (list (car org-agenda-last-arguments) sd nd t))) | 6082 | (list (car org-agenda-last-arguments) sd span t))) |
| 5887 | (org-agenda-redo) | 6083 | (org-agenda-redo) |
| 5888 | (org-agenda-find-same-or-today-or-agenda cnt)))) | 6084 | (org-agenda-find-same-or-today-or-agenda cnt)))) |
| 5889 | 6085 | ||
| @@ -5926,7 +6122,6 @@ With prefix ARG, go backward that many times the current span." | |||
| 5926 | "Switch to daily view for agenda. | 6122 | "Switch to daily view for agenda. |
| 5927 | With argument DAY-OF-YEAR, switch to that day of the year." | 6123 | With argument DAY-OF-YEAR, switch to that day of the year." |
| 5928 | (interactive "P") | 6124 | (interactive "P") |
| 5929 | (setq org-agenda-ndays 1) | ||
| 5930 | (org-agenda-change-time-span 'day day-of-year)) | 6125 | (org-agenda-change-time-span 'day day-of-year)) |
| 5931 | (defun org-agenda-week-view (&optional iso-week) | 6126 | (defun org-agenda-week-view (&optional iso-week) |
| 5932 | "Switch to daily view for agenda. | 6127 | "Switch to daily view for agenda. |
| @@ -5936,7 +6131,6 @@ week. Any digits before this encode a year. So 200712 means | |||
| 5936 | week 12 of year 2007. Years in the range 1938-2037 can also be | 6131 | week 12 of year 2007. Years in the range 1938-2037 can also be |
| 5937 | written as 2-digit years." | 6132 | written as 2-digit years." |
| 5938 | (interactive "P") | 6133 | (interactive "P") |
| 5939 | (setq org-agenda-ndays 7) | ||
| 5940 | (org-agenda-change-time-span 'week iso-week)) | 6134 | (org-agenda-change-time-span 'week iso-week)) |
| 5941 | (defun org-agenda-month-view (&optional month) | 6135 | (defun org-agenda-month-view (&optional month) |
| 5942 | "Switch to monthly view for agenda. | 6136 | "Switch to monthly view for agenda. |
| @@ -5961,70 +6155,61 @@ written as 2-digit years." | |||
| 5961 | "Change the agenda view to SPAN. | 6155 | "Change the agenda view to SPAN. |
| 5962 | SPAN may be `day', `week', `month', `year'." | 6156 | SPAN may be `day', `week', `month', `year'." |
| 5963 | (org-agenda-check-type t 'agenda) | 6157 | (org-agenda-check-type t 'agenda) |
| 5964 | (if (and (not n) (equal org-agenda-span span)) | 6158 | (if (and (not n) (equal org-agenda-current-span span)) |
| 5965 | (error "Viewing span is already \"%s\"" span)) | 6159 | (error "Viewing span is already \"%s\"" span)) |
| 5966 | (let* ((sd (or (org-get-at-bol 'day) | 6160 | (let* ((sd (or (org-get-at-bol 'day) |
| 5967 | org-starting-day)) | 6161 | org-starting-day)) |
| 5968 | (computed (org-agenda-compute-time-span sd span n)) | 6162 | (sd (org-agenda-compute-starting-span sd span n)) |
| 5969 | (org-agenda-overriding-arguments | 6163 | (org-agenda-overriding-arguments |
| 5970 | (list (car org-agenda-last-arguments) | 6164 | (list (car org-agenda-last-arguments) sd span t))) |
| 5971 | (car computed) (cdr computed) t))) | ||
| 5972 | (org-agenda-redo) | 6165 | (org-agenda-redo) |
| 5973 | (org-agenda-find-same-or-today-or-agenda)) | 6166 | (org-agenda-find-same-or-today-or-agenda)) |
| 5974 | (org-agenda-set-mode-name) | 6167 | (org-agenda-set-mode-name) |
| 5975 | (message "Switched to %s view" span)) | 6168 | (message "Switched to %s view" span)) |
| 5976 | 6169 | ||
| 5977 | (defun org-agenda-compute-time-span (sd span &optional n) | 6170 | (defun org-agenda-compute-starting-span (sd span &optional n) |
| 5978 | "Compute starting date and number of days for agenda. | 6171 | "Compute starting date for agenda. |
| 5979 | SPAN may be `day', `week', `month', `year'. The return value | 6172 | SPAN may be `day', `week', `month', `year'. The return value |
| 5980 | is a cons cell with the starting date and the number of days, | 6173 | is a cons cell with the starting date and the number of days, |
| 5981 | so that the date SD will be in that range." | 6174 | so that the date SD will be in that range." |
| 5982 | (let* ((greg (calendar-gregorian-from-absolute sd)) | 6175 | (let* ((greg (calendar-gregorian-from-absolute sd)) |
| 5983 | (dg (nth 1 greg)) | 6176 | (dg (nth 1 greg)) |
| 5984 | (mg (car greg)) | 6177 | (mg (car greg)) |
| 5985 | (yg (nth 2 greg)) | 6178 | (yg (nth 2 greg))) |
| 5986 | nd w1 y1 m1 thisweek) | ||
| 5987 | (cond | 6179 | (cond |
| 5988 | ((eq span 'day) | 6180 | ((eq span 'day) |
| 5989 | (when n | 6181 | (when n |
| 5990 | (setq sd (+ (calendar-absolute-from-gregorian | 6182 | (setq sd (+ (calendar-absolute-from-gregorian |
| 5991 | (list mg 1 yg)) | 6183 | (list mg 1 yg)) |
| 5992 | n -1))) | 6184 | n -1)))) |
| 5993 | (setq nd 1)) | ||
| 5994 | ((eq span 'week) | 6185 | ((eq span 'week) |
| 5995 | (let* ((nt (calendar-day-of-week | 6186 | (let* ((nt (calendar-day-of-week |
| 5996 | (calendar-gregorian-from-absolute sd))) | 6187 | (calendar-gregorian-from-absolute sd))) |
| 5997 | (d (if org-agenda-start-on-weekday | 6188 | (d (if org-agenda-start-on-weekday |
| 5998 | (- nt org-agenda-start-on-weekday) | 6189 | (- nt org-agenda-start-on-weekday) |
| 5999 | 0))) | 6190 | 0)) |
| 6191 | y1) | ||
| 6000 | (setq sd (- sd (+ (if (< d 0) 7 0) d))) | 6192 | (setq sd (- sd (+ (if (< d 0) 7 0) d))) |
| 6001 | (when n | 6193 | (when n |
| 6002 | (require 'cal-iso) | 6194 | (require 'cal-iso) |
| 6003 | (setq thisweek (car (calendar-iso-from-absolute sd))) | ||
| 6004 | (when (> n 99) | 6195 | (when (> n 99) |
| 6005 | (setq y1 (org-small-year-to-year (/ n 100)) | 6196 | (setq y1 (org-small-year-to-year (/ n 100)) |
| 6006 | n (mod n 100))) | 6197 | n (mod n 100))) |
| 6007 | (setq sd | 6198 | (setq sd |
| 6008 | (calendar-absolute-from-iso | 6199 | (calendar-absolute-from-iso |
| 6009 | (list n 1 | 6200 | (list n 1 |
| 6010 | (or y1 (nth 2 (calendar-iso-from-absolute sd))))))) | 6201 | (or y1 (nth 2 (calendar-iso-from-absolute sd))))))))) |
| 6011 | (setq nd 7))) | ||
| 6012 | ((eq span 'month) | 6202 | ((eq span 'month) |
| 6013 | (when (and n (> n 99)) | 6203 | (let (y1) |
| 6014 | (setq y1 (org-small-year-to-year (/ n 100)) | 6204 | (when (and n (> n 99)) |
| 6015 | n (mod n 100))) | 6205 | (setq y1 (org-small-year-to-year (/ n 100)) |
| 6016 | (setq sd (calendar-absolute-from-gregorian | 6206 | n (mod n 100))) |
| 6017 | (list (or n mg) 1 (or y1 yg))) | 6207 | (setq sd (calendar-absolute-from-gregorian |
| 6018 | nd (- (calendar-absolute-from-gregorian | 6208 | (list (or n mg) 1 (or y1 yg)))))) |
| 6019 | (list (1+ (or n mg)) 1 (or y1 yg))) | ||
| 6020 | sd))) | ||
| 6021 | ((eq span 'year) | 6209 | ((eq span 'year) |
| 6022 | (setq sd (calendar-absolute-from-gregorian | 6210 | (setq sd (calendar-absolute-from-gregorian |
| 6023 | (list 1 1 (or n yg))) | 6211 | (list 1 1 (or n yg)))))) |
| 6024 | nd (- (calendar-absolute-from-gregorian | 6212 | sd)) |
| 6025 | (list 1 1 (1+ (or n yg)))) | ||
| 6026 | sd)))) | ||
| 6027 | (cons sd nd))) | ||
| 6028 | 6213 | ||
| 6029 | (defun org-agenda-next-date-line (&optional arg) | 6214 | (defun org-agenda-next-date-line (&optional arg) |
| 6030 | "Jump to the next line indicating a date in agenda buffer." | 6215 | "Jump to the next line indicating a date in agenda buffer." |
| @@ -6094,11 +6279,15 @@ so that the date SD will be in that range." | |||
| 6094 | (if org-agenda-entry-text-mode "on" "off") | 6279 | (if org-agenda-entry-text-mode "on" "off") |
| 6095 | (if (integerp arg) arg org-agenda-entry-text-maxlines))) | 6280 | (if (integerp arg) arg org-agenda-entry-text-maxlines))) |
| 6096 | 6281 | ||
| 6097 | (defun org-agenda-clockreport-mode () | 6282 | (defun org-agenda-clockreport-mode (&optional with-filter) |
| 6098 | "Toggle clocktable mode in an agenda buffer." | 6283 | "Toggle clocktable mode in an agenda buffer. |
| 6099 | (interactive) | 6284 | With prefix arg WITH-FILTER, make the clocktable respect the current |
| 6285 | agenda filter." | ||
| 6286 | (interactive "P") | ||
| 6100 | (org-agenda-check-type t 'agenda) | 6287 | (org-agenda-check-type t 'agenda) |
| 6101 | (setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode)) | 6288 | (if with-filter |
| 6289 | (setq org-agenda-clockreport-mode 'with-filter) | ||
| 6290 | (setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode))) | ||
| 6102 | (org-agenda-set-mode-name) | 6291 | (org-agenda-set-mode-name) |
| 6103 | (org-agenda-redo) | 6292 | (org-agenda-redo) |
| 6104 | (message "Clocktable mode is %s" | 6293 | (message "Clocktable mode is %s" |
| @@ -6151,7 +6340,7 @@ When called with a prefix argument, include all archive files as well." | |||
| 6151 | (if org-agenda-include-diary "on" "off"))) | 6340 | (if org-agenda-include-diary "on" "off"))) |
| 6152 | 6341 | ||
| 6153 | (defun org-agenda-toggle-deadlines () | 6342 | (defun org-agenda-toggle-deadlines () |
| 6154 | "Toggle diary inclusion in an agenda buffer." | 6343 | "Toggle inclusion of entries with a deadline in an agenda buffer." |
| 6155 | (interactive) | 6344 | (interactive) |
| 6156 | (org-agenda-check-type t 'agenda) | 6345 | (org-agenda-check-type t 'agenda) |
| 6157 | (setq org-agenda-include-deadlines (not org-agenda-include-deadlines)) | 6346 | (setq org-agenda-include-deadlines (not org-agenda-include-deadlines)) |
| @@ -6173,33 +6362,36 @@ When called with a prefix argument, include all archive files as well." | |||
| 6173 | (defun org-agenda-set-mode-name () | 6362 | (defun org-agenda-set-mode-name () |
| 6174 | "Set the mode name to indicate all the small mode settings." | 6363 | "Set the mode name to indicate all the small mode settings." |
| 6175 | (setq mode-name | 6364 | (setq mode-name |
| 6176 | (concat "Org-Agenda" | 6365 | (list "Org-Agenda" |
| 6177 | (if (get 'org-agenda-files 'org-restrict) " []" "") | 6366 | (if (get 'org-agenda-files 'org-restrict) " []" "") |
| 6178 | (if (equal org-agenda-ndays 1) " Day" "") | 6367 | " " |
| 6179 | (if (equal org-agenda-ndays 7) " Week" "") | 6368 | '(:eval (org-agenda-span-name org-agenda-current-span)) |
| 6180 | (if org-agenda-follow-mode " Follow" "") | 6369 | (if org-agenda-follow-mode " Follow" "") |
| 6181 | (if org-agenda-entry-text-mode " ETxt" "") | 6370 | (if org-agenda-entry-text-mode " ETxt" "") |
| 6182 | (if org-agenda-include-diary " Diary" "") | 6371 | (if org-agenda-include-diary " Diary" "") |
| 6183 | (if org-agenda-include-deadlines " Ddl" "") | 6372 | (if org-agenda-include-deadlines " Ddl" "") |
| 6184 | (if org-agenda-use-time-grid " Grid" "") | 6373 | (if org-agenda-use-time-grid " Grid" "") |
| 6185 | (if (and (boundp 'org-habit-show-habits) | 6374 | (if (and (boundp 'org-habit-show-habits) |
| 6186 | org-habit-show-habits) " Habit" "") | 6375 | org-habit-show-habits) " Habit" "") |
| 6187 | (if (consp org-agenda-show-log) " LogAll" | 6376 | (if (consp org-agenda-show-log) " LogAll" |
| 6188 | (if org-agenda-show-log " Log" "")) | 6377 | (if org-agenda-show-log " Log" "")) |
| 6189 | (if (or org-agenda-filter (get 'org-agenda-filter | 6378 | (if (or org-agenda-filter (get 'org-agenda-filter |
| 6190 | :preset-filter)) | 6379 | :preset-filter)) |
| 6191 | (concat " {" (mapconcat | 6380 | (concat " {" (mapconcat |
| 6192 | 'identity | 6381 | 'identity |
| 6193 | (append (get 'org-agenda-filter | 6382 | (append (get 'org-agenda-filter |
| 6194 | :preset-filter) | 6383 | :preset-filter) |
| 6195 | org-agenda-filter) "") "}") | 6384 | org-agenda-filter) "") "}") |
| 6196 | "") | 6385 | "") |
| 6197 | (if org-agenda-archives-mode | 6386 | (if org-agenda-archives-mode |
| 6198 | (if (eq org-agenda-archives-mode t) | 6387 | (if (eq org-agenda-archives-mode t) |
| 6199 | " Archives" | 6388 | " Archives" |
| 6200 | (format " :%s:" org-archive-tag)) | 6389 | (format " :%s:" org-archive-tag)) |
| 6201 | "") | 6390 | "") |
| 6202 | (if org-agenda-clockreport-mode " Clock" ""))) | 6391 | (if org-agenda-clockreport-mode |
| 6392 | (if (eq org-agenda-clockreport-mode 'with-filter) | ||
| 6393 | " Clock{}" " Clock") | ||
| 6394 | ""))) | ||
| 6203 | (force-mode-line-update)) | 6395 | (force-mode-line-update)) |
| 6204 | 6396 | ||
| 6205 | (defun org-agenda-post-command-hook () | 6397 | (defun org-agenda-post-command-hook () |
| @@ -6216,7 +6408,6 @@ When called with a prefix argument, include all archive files as well." | |||
| 6216 | 6408 | ||
| 6217 | (defun org-agenda-previous-line () | 6409 | (defun org-agenda-previous-line () |
| 6218 | "Move cursor to the previous line, and show if follow-mode is active." | 6410 | "Move cursor to the previous line, and show if follow-mode is active." |
| 6219 | |||
| 6220 | (interactive) | 6411 | (interactive) |
| 6221 | (call-interactively 'previous-line) | 6412 | (call-interactively 'previous-line) |
| 6222 | (org-agenda-do-context-action)) | 6413 | (org-agenda-do-context-action)) |
| @@ -6642,8 +6833,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 6642 | (buffer (marker-buffer marker)) | 6833 | (buffer (marker-buffer marker)) |
| 6643 | (pos (marker-position marker)) | 6834 | (pos (marker-position marker)) |
| 6644 | (hdmarker (org-get-at-bol 'org-hd-marker)) | 6835 | (hdmarker (org-get-at-bol 'org-hd-marker)) |
| 6645 | (todayp (equal (org-get-at-bol 'day) | 6836 | (todayp (org-agenda-todayp (org-get-at-bol 'day))) |
| 6646 | (time-to-days (current-time)))) | ||
| 6647 | (inhibit-read-only t) | 6837 | (inhibit-read-only t) |
| 6648 | org-agenda-headline-snapshot-before-repeat newhead just-one) | 6838 | org-agenda-headline-snapshot-before-repeat newhead just-one) |
| 6649 | (org-with-remote-undo buffer | 6839 | (org-with-remote-undo buffer |
| @@ -7551,25 +7741,26 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 7551 | (eq (get-char-property (point-at-bol) 'type) | 7741 | (eq (get-char-property (point-at-bol) 'type) |
| 7552 | 'org-marked-entry-overlay)) | 7742 | 'org-marked-entry-overlay)) |
| 7553 | 7743 | ||
| 7554 | (defun org-agenda-bulk-mark () | 7744 | (defun org-agenda-bulk-mark (&optional arg) |
| 7555 | "Mark the entry at point for future bulk action." | 7745 | "Mark the entry at point for future bulk action." |
| 7556 | (interactive) | 7746 | (interactive "p") |
| 7557 | (org-agenda-check-no-diary) | 7747 | (dotimes (i (max arg 1)) |
| 7558 | (let* ((m (org-get-at-bol 'org-hd-marker)) | 7748 | (unless (org-get-at-bol 'org-agenda-diary-link) |
| 7559 | ov) | 7749 | (let* ((m (org-get-at-bol 'org-hd-marker)) |
| 7560 | (unless (org-agenda-bulk-marked-p) | 7750 | ov) |
| 7561 | (unless m (error "Nothing to mark at point")) | 7751 | (unless (org-agenda-bulk-marked-p) |
| 7562 | (push m org-agenda-bulk-marked-entries) | 7752 | (unless m (error "Nothing to mark at point")) |
| 7563 | (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) | 7753 | (push m org-agenda-bulk-marked-entries) |
| 7564 | (org-overlay-display ov "> " | 7754 | (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) |
| 7565 | (org-get-todo-face "TODO") | 7755 | (org-overlay-display ov "> " |
| 7566 | 'evaporate) | 7756 | (org-get-todo-face "TODO") |
| 7567 | (overlay-put ov 'type 'org-marked-entry-overlay)) | 7757 | 'evaporate) |
| 7568 | (beginning-of-line 2) | 7758 | (overlay-put ov 'type 'org-marked-entry-overlay)) |
| 7569 | (while (and (get-char-property (point) 'invisible) (not (eobp))) | 7759 | (beginning-of-line 2) |
| 7570 | (beginning-of-line 2)) | 7760 | (while (and (get-char-property (point) 'invisible) (not (eobp))) |
| 7571 | (message "%d entries marked for bulk action" | 7761 | (beginning-of-line 2)) |
| 7572 | (length org-agenda-bulk-marked-entries)))) | 7762 | (message "%d entries marked for bulk action" |
| 7763 | (length org-agenda-bulk-marked-entries)))))) | ||
| 7573 | 7764 | ||
| 7574 | (defun org-agenda-bulk-unmark () | 7765 | (defun org-agenda-bulk-unmark () |
| 7575 | "Unmark the entry at point for future bulk action." | 7766 | "Unmark the entry at point for future bulk action." |
| @@ -7619,7 +7810,7 @@ The prefix arg is passed through to the command if possible." | |||
| 7619 | (interactive "P") | 7810 | (interactive "P") |
| 7620 | (unless org-agenda-bulk-marked-entries | 7811 | (unless org-agenda-bulk-marked-entries |
| 7621 | (error "No entries are marked")) | 7812 | (error "No entries are marked")) |
| 7622 | (message "Bulk: [r]efile [$]archive [A]rch->sib [t]odo [+/-]tag [s]chedule [d]eadline") | 7813 | (message "Bulk: [r]efile [$]arch [A]rch->sib [t]odo [+/-]tag [s]chd [S]catter [d]eadline") |
| 7623 | (let* ((action (read-char-exclusive)) | 7814 | (let* ((action (read-char-exclusive)) |
| 7624 | (org-log-refile (if org-log-refile 'time nil)) | 7815 | (org-log-refile (if org-log-refile 'time nil)) |
| 7625 | (entries (reverse org-agenda-bulk-marked-entries)) | 7816 | (entries (reverse org-agenda-bulk-marked-entries)) |
| @@ -7681,6 +7872,29 @@ The prefix arg is passed through to the command if possible." | |||
| 7681 | (if bound | 7872 | (if bound |
| 7682 | (fset 'read-string old) | 7873 | (fset 'read-string old) |
| 7683 | (fmakunbound 'read-string))))))) | 7874 | (fmakunbound 'read-string))))))) |
| 7875 | |||
| 7876 | ((eq action '?S) | ||
| 7877 | (let ((days (read-number | ||
| 7878 | (format "Scatter tasks across how many %sdays: " | ||
| 7879 | (if arg "week" "")) 7))) | ||
| 7880 | (setq cmd | ||
| 7881 | `(let ((distance (random ,(1+ days)))) | ||
| 7882 | (if arg | ||
| 7883 | (let ((dist distance) | ||
| 7884 | (day-of-week | ||
| 7885 | (calendar-day-of-week | ||
| 7886 | (calendar-gregorian-from-absolute (org-today))))) | ||
| 7887 | (dotimes (i (1+ dist)) | ||
| 7888 | (while (member day-of-week org-agenda-weekend-days) | ||
| 7889 | (incf distance) | ||
| 7890 | (incf day-of-week) | ||
| 7891 | (if (= day-of-week 7) | ||
| 7892 | (setq day-of-week 0))) | ||
| 7893 | (incf day-of-week) | ||
| 7894 | (if (= day-of-week 7) | ||
| 7895 | (setq day-of-week 0))))) | ||
| 7896 | (org-agenda-date-later distance))))) | ||
| 7897 | |||
| 7684 | (t (error "Invalid bulk action"))) | 7898 | (t (error "Invalid bulk action"))) |
| 7685 | 7899 | ||
| 7686 | ;; Sort the markers, to make sure that parents are handled before children | 7900 | ;; Sort the markers, to make sure that parents are handled before children |
| @@ -7792,6 +8006,9 @@ belonging to the \"Work\" category." | |||
| 7792 | (let* ((cnt 0) ; count added events | 8006 | (let* ((cnt 0) ; count added events |
| 7793 | (org-agenda-new-buffers nil) | 8007 | (org-agenda-new-buffers nil) |
| 7794 | (org-deadline-warning-days 0) | 8008 | (org-deadline-warning-days 0) |
| 8009 | ;; Do not use `org-today' here because appt only takes | ||
| 8010 | ;; time and without date as argument, so it may pass wrong | ||
| 8011 | ;; information otherwise | ||
| 7795 | (today (org-date-to-gregorian | 8012 | (today (org-date-to-gregorian |
| 7796 | (time-to-days (current-time)))) | 8013 | (time-to-days (current-time)))) |
| 7797 | (org-agenda-restrict nil) | 8014 | (org-agenda-restrict nil) |
| @@ -7834,14 +8051,10 @@ belonging to the \"Work\" category." | |||
| 7834 | 8051 | ||
| 7835 | (defun org-agenda-todayp (date) | 8052 | (defun org-agenda-todayp (date) |
| 7836 | "Does DATE mean today, when considering `org-extend-today-until'?" | 8053 | "Does DATE mean today, when considering `org-extend-today-until'?" |
| 7837 | (let (today h) | 8054 | (let ((today (org-today)) |
| 7838 | (if (listp date) (setq date (calendar-absolute-from-gregorian date))) | 8055 | (date (if (and date (listp date)) (calendar-absolute-from-gregorian date) |
| 7839 | (setq today (calendar-absolute-from-gregorian (calendar-current-date))) | 8056 | date))) |
| 7840 | (setq h (nth 2 (decode-time (current-time)))) | 8057 | (eq date today))) |
| 7841 | (or (and (>= h org-extend-today-until) | ||
| 7842 | (= date today)) | ||
| 7843 | (and (< h org-extend-today-until) | ||
| 7844 | (= date (1- today)))))) | ||
| 7845 | 8058 | ||
| 7846 | (provide 'org-agenda) | 8059 | (provide 'org-agenda) |
| 7847 | 8060 | ||
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 8c1f9a13a12..e56b01f952a 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index b48f8efa1cd..99facb1e431 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index d98254cb659..a894064ed84 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: John Wiegley <johnw@newartisans.com> | 5 | ;; Author: John Wiegley <johnw@newartisans.com> |
| 6 | ;; Keywords: org data task | 6 | ;; Keywords: org data task |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index d5a09cab63b..4155f58b5f6 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Thomas Baumann <thomas dot baumann at ch dot tum dot de> | 7 | ;; Thomas Baumann <thomas dot baumann at ch dot tum dot de> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 7.3 | 10 | ;; Version: 7.4 |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
diff --git a/lisp/org/org-beamer.el b/lisp/org/org-beamer.el index d3f0f47e45c..c88df859f79 100644 --- a/lisp/org/org-beamer.el +++ b/lisp/org/org-beamer.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Version: 7.3 | 5 | ;; Version: 7.4 |
| 6 | ;; Author: Carsten Dominik <carsten.dominik AT gmail DOT com> | 6 | ;; Author: Carsten Dominik <carsten.dominik AT gmail DOT com> |
| 7 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> | 7 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> |
| 8 | ;; Keywords: org, wp, tex | 8 | ;; Keywords: org, wp, tex |
| @@ -246,14 +246,14 @@ in org-export-latex-classes." | |||
| 246 | (if (and (string-match "\\`[0-9.]+\\'" tmp) | 246 | (if (and (string-match "\\`[0-9.]+\\'" tmp) |
| 247 | (or (= (string-to-number tmp) 1.0) | 247 | (or (= (string-to-number tmp) 1.0) |
| 248 | (= (string-to-number tmp) 0.0))) | 248 | (= (string-to-number tmp) 0.0))) |
| 249 | ;; column width 1 means cloase columns, go back to full width | 249 | ;; column width 1 means close columns, go back to full width |
| 250 | (org-beamer-close-columns-maybe) | 250 | (org-beamer-close-columns-maybe) |
| 251 | (when (setq ass (assoc "BEAMER_envargs" props)) | 251 | (when (setq ass (assoc "BEAMER_envargs" props)) |
| 252 | (let (case-fold-search) | 252 | (let (case-fold-search) |
| 253 | (when (string-match "C\\(\\[[^][]*\\]\\)" (cdr ass)) | 253 | (while (string-match "C\\(\\[[^][]*\\]\\|<[^<>]*>\\)" (cdr ass)) |
| 254 | (setq columns-option (match-string 1 (cdr ass))) | 254 | (setq columns-option (match-string 1 (cdr ass))) |
| 255 | (setcdr ass (replace-match "" t t (cdr ass)))) | 255 | (setcdr ass (replace-match "" t t (cdr ass)))) |
| 256 | (when (string-match "c\\(\\[[^][]*\\]\\)" (cdr ass)) | 256 | (while (string-match "c\\(\\[[^][]*\\]\\|<[^<>]*>\\)" (cdr ass)) |
| 257 | (setq column-option (match-string 1 (cdr ass))) | 257 | (setq column-option (match-string 1 (cdr ass))) |
| 258 | (setcdr ass (replace-match "" t t (cdr ass)))))) | 258 | (setcdr ass (replace-match "" t t (cdr ass)))))) |
| 259 | (org-beamer-open-columns-maybe columns-option) | 259 | (org-beamer-open-columns-maybe columns-option) |
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index b9018b023ba..e34e1572cd3 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Bastien Guerry <bzg at altern dot org> | 5 | ;; Author: Bastien Guerry <bzg at altern dot org> |
| 6 | ;; Carsten Dominik <carsten dot dominik at gmail dot com> | 6 | ;; Carsten Dominik <carsten dot dominik at gmail dot com> |
| 7 | ;; Keywords: org, wp, remember | 7 | ;; Keywords: org, wp, remember |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 2abe5c72bf6..5c7b0386e04 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -133,7 +133,10 @@ target Specification of where the captured item should be placed. | |||
| 133 | File to the entry matching regexp | 133 | File to the entry matching regexp |
| 134 | 134 | ||
| 135 | (file+datetree \"path/to/file\") | 135 | (file+datetree \"path/to/file\") |
| 136 | Will create a heading in a date tree | 136 | Will create a heading in a date tree for today's date |
| 137 | |||
| 138 | (file+datetree+prompt \"path/to/file\") | ||
| 139 | Will create a heading in a date tree, promts for date | ||
| 137 | 140 | ||
| 138 | (file+function \"path/to/file\" function-finding-location) | 141 | (file+function \"path/to/file\" function-finding-location) |
| 139 | A function to find the right location in the file | 142 | A function to find the right location in the file |
| @@ -280,6 +283,9 @@ calendar | %:type %:date" | |||
| 280 | (list :tag "File & Date tree" | 283 | (list :tag "File & Date tree" |
| 281 | (const :format "" file+datetree) | 284 | (const :format "" file+datetree) |
| 282 | (file :tag " File")) | 285 | (file :tag " File")) |
| 286 | (list :tag "File & Date tree, prompt for date" | ||
| 287 | (const :format "" file+datetree+prompt) | ||
| 288 | (file :tag " File")) | ||
| 283 | (list :tag "File & function" | 289 | (list :tag "File & function" |
| 284 | (const :format "" file+function) | 290 | (const :format "" file+function) |
| 285 | (file :tag " File ") | 291 | (file :tag " File ") |
| @@ -313,6 +319,12 @@ The remember buffer is still current when this hook runs." | |||
| 313 | :group 'org-capture | 319 | :group 'org-capture |
| 314 | :type 'hook) | 320 | :type 'hook) |
| 315 | 321 | ||
| 322 | (defcustom org-capture-after-finalize-hook nil | ||
| 323 | "Hook that is run right after a capture process is finalized. | ||
| 324 | Suitable for window cleanup" | ||
| 325 | :group 'org-capture | ||
| 326 | :type 'hook) | ||
| 327 | |||
| 316 | ;;; The property list for keeping information about the capture process | 328 | ;;; The property list for keeping information about the capture process |
| 317 | 329 | ||
| 318 | (defvar org-capture-plist nil | 330 | (defvar org-capture-plist nil |
| @@ -461,9 +473,11 @@ bypassed." | |||
| 461 | (t (setq txt "* Invalid capture template"))) | 473 | (t (setq txt "* Invalid capture template"))) |
| 462 | (org-capture-put :template txt))) | 474 | (org-capture-put :template txt))) |
| 463 | 475 | ||
| 464 | (defun org-capture-finalize () | 476 | (defun org-capture-finalize (&optional stay-with-capture) |
| 465 | "Finalize the capture process." | 477 | "Finalize the capture process. |
| 466 | (interactive) | 478 | With prefix argument STAY-WITH-CAPTURE, jump to the location of the |
| 479 | captured item after finalizing." | ||
| 480 | (interactive "P") | ||
| 467 | (unless (and org-capture-mode | 481 | (unless (and org-capture-mode |
| 468 | (buffer-base-buffer (current-buffer))) | 482 | (buffer-base-buffer (current-buffer))) |
| 469 | (error "This does not seem to be a capture buffer for Org-mode")) | 483 | (error "This does not seem to be a capture buffer for Org-mode")) |
| @@ -548,17 +562,25 @@ bypassed." | |||
| 548 | 562 | ||
| 549 | ;; Restore the window configuration before capture | 563 | ;; Restore the window configuration before capture |
| 550 | (set-window-configuration return-wconf)) | 564 | (set-window-configuration return-wconf)) |
| 551 | (when abort-note | 565 | |
| 566 | (run-hooks 'org-capture-after-finalize-hook) | ||
| 567 | ;; Special cases | ||
| 568 | (cond | ||
| 569 | (abort-note | ||
| 552 | (cond | 570 | (cond |
| 553 | ((equal abort-note 'clean) | 571 | ((equal abort-note 'clean) |
| 554 | (message "Capture process aborted and target buffer cleaned up")) | 572 | (message "Capture process aborted and target buffer cleaned up")) |
| 555 | ((equal abort-note 'dirty) | 573 | ((equal abort-note 'dirty) |
| 556 | (error "Capture process aborted, but target buffer could not be cleaned up correctly")))))) | 574 | (error "Capture process aborted, but target buffer could not be cleaned up correctly")))) |
| 575 | (stay-with-capture | ||
| 576 | (org-capture-goto-last-stored))) | ||
| 577 | ;; Return if we did store something | ||
| 578 | (not abort-note))) | ||
| 557 | 579 | ||
| 558 | (defun org-capture-refile () | 580 | (defun org-capture-refile () |
| 559 | "Finalize the current capture and then refile the entry. | 581 | "Finalize the current capture and then refile the entry. |
| 560 | Refiling is done from the base buffer, because the indirect buffer is then | 582 | Refiling is done from the base buffer, because the indirect buffer is then |
| 561 | already gone." | 583 | already gone. Any prefix argument will be passed to the refile comand." |
| 562 | (interactive) | 584 | (interactive) |
| 563 | (unless (eq (org-capture-get :type 'local) 'entry) | 585 | (unless (eq (org-capture-get :type 'local) 'entry) |
| 564 | (error | 586 | (error |
| @@ -640,19 +662,28 @@ already gone." | |||
| 640 | (setq target-entry-p (and (org-mode-p) (org-at-heading-p)))) | 662 | (setq target-entry-p (and (org-mode-p) (org-at-heading-p)))) |
| 641 | (error "No match for target regexp in file %s" (nth 1 target)))) | 663 | (error "No match for target regexp in file %s" (nth 1 target)))) |
| 642 | 664 | ||
| 643 | ((eq (car target) 'file+datetree) | 665 | ((memq (car target) '(file+datetree file+datetree+prompt)) |
| 644 | (require 'org-datetree) | 666 | (require 'org-datetree) |
| 645 | (set-buffer (org-capture-target-buffer (nth 1 target))) | 667 | (set-buffer (org-capture-target-buffer (nth 1 target))) |
| 646 | ;; Make a date tree entry, with the current date (or yesterday, | 668 | ;; Make a date tree entry, with the current date (or yesterday, |
| 647 | ;; if we are extending dates for a couple of hours) | 669 | ;; if we are extending dates for a couple of hours) |
| 648 | (org-datetree-find-date-create | 670 | (org-datetree-find-date-create |
| 649 | (calendar-gregorian-from-absolute | 671 | (calendar-gregorian-from-absolute |
| 650 | (if org-overriding-default-time | 672 | (cond |
| 651 | (time-to-days org-overriding-default-time) | 673 | |
| 652 | (time-to-days | 674 | (org-overriding-default-time |
| 653 | (time-subtract (current-time) | 675 | ;; use the overriding default time |
| 654 | (list 0 (* 3600 org-extend-today-until) 0))))))) | 676 | (time-to-days org-overriding-default-time)) |
| 655 | 677 | ||
| 678 | ((eq (car target) 'file+datetree+prompt) | ||
| 679 | ;; prompt for date | ||
| 680 | (time-to-days (org-read-date | ||
| 681 | nil t nil "Date for tree entry:" | ||
| 682 | (days-to-time (org-today))))) | ||
| 683 | (t | ||
| 684 | ;; current date, possible corrected for late night workers | ||
| 685 | (org-today)))))) | ||
| 686 | |||
| 656 | ((eq (car target) 'file+function) | 687 | ((eq (car target) 'file+function) |
| 657 | (set-buffer (org-capture-target-buffer (nth 1 target))) | 688 | (set-buffer (org-capture-target-buffer (nth 1 target))) |
| 658 | (funcall (nth 2 target)) | 689 | (funcall (nth 2 target)) |
| @@ -1358,5 +1389,3 @@ The template may still contain \"%?\" for cursor positioning." | |||
| 1358 | ;; arch-tag: 986bf41b-8ada-4e28-bf20-e8388a7205a0 | 1389 | ;; arch-tag: 986bf41b-8ada-4e28-bf20-e8388a7205a0 |
| 1359 | 1390 | ||
| 1360 | ;;; org-capture.el ends here | 1391 | ;;; org-capture.el ends here |
| 1361 | |||
| 1362 | |||
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 457a4dcb2f0..93b0b524c80 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -34,7 +34,7 @@ | |||
| 34 | (eval-when-compile | 34 | (eval-when-compile |
| 35 | (require 'cl)) | 35 | (require 'cl)) |
| 36 | 36 | ||
| 37 | (declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) | 37 | (declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) |
| 38 | (declare-function notifications-notify "notifications" (&rest params)) | 38 | (declare-function notifications-notify "notifications" (&rest params)) |
| 39 | (defvar org-time-stamp-formats) | 39 | (defvar org-time-stamp-formats) |
| 40 | 40 | ||
| @@ -222,11 +222,48 @@ string as argument." | |||
| 222 | (string :tag "Program") | 222 | (string :tag "Program") |
| 223 | (function :tag "Function"))) | 223 | (function :tag "Function"))) |
| 224 | 224 | ||
| 225 | (defcustom org-clock-clocktable-default-properties '(:maxlevel 2 :scope file) | 225 | (defgroup org-clocktable nil |
| 226 | "Default properties for new clocktables." | 226 | "Options concerning the clock table in Org-mode." |
| 227 | :tag "Org Clock Table" | ||
| 228 | :group 'org-clock) | ||
| 229 | |||
| 230 | (defcustom org-clocktable-defaults | ||
| 231 | (list | ||
| 232 | :maxlevel 2 | ||
| 233 | :scope 'file | ||
| 234 | :block nil | ||
| 235 | :tstart nil | ||
| 236 | :tend nil | ||
| 237 | :step nil | ||
| 238 | :stepskip0 nil | ||
| 239 | :fileskip0 nil | ||
| 240 | :tags nil | ||
| 241 | :emphasize nil | ||
| 242 | :link nil | ||
| 243 | :narrow '40! | ||
| 244 | :indent t | ||
| 245 | :formula nil | ||
| 246 | :timestamp nil | ||
| 247 | :level nil | ||
| 248 | :tcolumns nil | ||
| 249 | :formatter nil) | ||
| 250 | "Default properties for clock tables." | ||
| 227 | :group 'org-clock | 251 | :group 'org-clock |
| 228 | :type 'plist) | 252 | :type 'plist) |
| 229 | 253 | ||
| 254 | (defcustom org-clock-clocktable-formatter 'org-clocktable-write-default | ||
| 255 | "Function to turn clocking data into a table. | ||
| 256 | For more information, see `org-clocktable-write-default'." | ||
| 257 | :group 'org-clocktable | ||
| 258 | :type 'function) | ||
| 259 | |||
| 260 | (defcustom org-clock-clocktable-default-properties '(:maxlevel 2 :scope file) | ||
| 261 | "Default properties for new clocktables. | ||
| 262 | These will be inserted into the BEGIN line, to make it easy for users to | ||
| 263 | play with them." | ||
| 264 | :group 'org-clocktable | ||
| 265 | :type 'plist) | ||
| 266 | |||
| 230 | (defcustom org-clock-idle-time nil | 267 | (defcustom org-clock-idle-time nil |
| 231 | "When non-nil, resolve open clocks if the user is idle more than X minutes." | 268 | "When non-nil, resolve open clocks if the user is idle more than X minutes." |
| 232 | :group 'org-clock | 269 | :group 'org-clock |
| @@ -1586,7 +1623,7 @@ fontified, and then returned." | |||
| 1586 | (font-lock-fontify-buffer) | 1623 | (font-lock-fontify-buffer) |
| 1587 | (forward-line 2) | 1624 | (forward-line 2) |
| 1588 | (buffer-substring (point) (progn | 1625 | (buffer-substring (point) (progn |
| 1589 | (re-search-forward "^#\\+END" nil t) | 1626 | (re-search-forward "^[ \t]*#\\+END" nil t) |
| 1590 | (point-at-bol))))) | 1627 | (point-at-bol))))) |
| 1591 | 1628 | ||
| 1592 | (defun org-clock-report (&optional arg) | 1629 | (defun org-clock-report (&optional arg) |
| @@ -1611,12 +1648,68 @@ buffer and update it." | |||
| 1611 | (let ((pos (point)) start) | 1648 | (let ((pos (point)) start) |
| 1612 | (save-excursion | 1649 | (save-excursion |
| 1613 | (end-of-line 1) | 1650 | (end-of-line 1) |
| 1614 | (and (re-search-backward "^#\\+BEGIN:[ \t]+clocktable" nil t) | 1651 | (and (re-search-backward "^[ \t]*#\\+BEGIN:[ \t]+clocktable" nil t) |
| 1615 | (setq start (match-beginning 0)) | 1652 | (setq start (match-beginning 0)) |
| 1616 | (re-search-forward "^#\\+END:.*" nil t) | 1653 | (re-search-forward "^[ \t]*#\\+END:.*" nil t) |
| 1617 | (>= (match-end 0) pos) | 1654 | (>= (match-end 0) pos) |
| 1618 | start)))) | 1655 | start)))) |
| 1619 | 1656 | ||
| 1657 | (defun org-day-of-week (day month year) | ||
| 1658 | "Returns the day of the week as an integer." | ||
| 1659 | (nth 6 | ||
| 1660 | (decode-time | ||
| 1661 | (date-to-time | ||
| 1662 | (format "%d-%02d-%02dT00:00:00" year month day))))) | ||
| 1663 | |||
| 1664 | (defun org-quarter-to-date (quarter year) | ||
| 1665 | "Get the date (week day year) of the first day of a given quarter." | ||
| 1666 | (let (startday) | ||
| 1667 | (cond | ||
| 1668 | ((= quarter 1) | ||
| 1669 | (setq startday (org-day-of-week 1 1 year)) | ||
| 1670 | (cond | ||
| 1671 | ((= startday 0) | ||
| 1672 | (list 52 7 (- year 1))) | ||
| 1673 | ((= startday 6) | ||
| 1674 | (list 52 6 (- year 1))) | ||
| 1675 | ((<= startday 4) | ||
| 1676 | (list 1 startday year)) | ||
| 1677 | ((> startday 4) | ||
| 1678 | (list 53 startday (- year 1))) | ||
| 1679 | ) | ||
| 1680 | ) | ||
| 1681 | ((= quarter 2) | ||
| 1682 | (setq startday (org-day-of-week 1 4 year)) | ||
| 1683 | (cond | ||
| 1684 | ((= startday 0) | ||
| 1685 | (list 13 startday year)) | ||
| 1686 | ((< startday 4) | ||
| 1687 | (list 14 startday year)) | ||
| 1688 | ((>= startday 4) | ||
| 1689 | (list 13 startday year)) | ||
| 1690 | ) | ||
| 1691 | ) | ||
| 1692 | ((= quarter 3) | ||
| 1693 | (setq startday (org-day-of-week 1 7 year)) | ||
| 1694 | (cond | ||
| 1695 | ((= startday 0) | ||
| 1696 | (list 26 startday year)) | ||
| 1697 | ((< startday 4) | ||
| 1698 | (list 27 startday year)) | ||
| 1699 | ((>= startday 4) | ||
| 1700 | (list 26 startday year)) | ||
| 1701 | ) | ||
| 1702 | ) | ||
| 1703 | ((= quarter 4) | ||
| 1704 | (setq startday (org-day-of-week 1 10 year)) | ||
| 1705 | (cond | ||
| 1706 | ((= startday 0) | ||
| 1707 | (list 39 startday year)) | ||
| 1708 | ((<= startday 4) | ||
| 1709 | (list 40 startday year)) | ||
| 1710 | ((> startday 4) | ||
| 1711 | (list 39 startday year))))))) | ||
| 1712 | |||
| 1620 | (defun org-clock-special-range (key &optional time as-strings) | 1713 | (defun org-clock-special-range (key &optional time as-strings) |
| 1621 | "Return two times bordering a special time range. | 1714 | "Return two times bordering a special time range. |
| 1622 | Key is a symbol specifying the range and can be one of `today', `yesterday', | 1715 | Key is a symbol specifying the range and can be one of `today', `yesterday', |
| @@ -1633,7 +1726,12 @@ the returned times will be formatted strings." | |||
| 1633 | (dow (nth 6 tm)) | 1726 | (dow (nth 6 tm)) |
| 1634 | (skey (symbol-name key)) | 1727 | (skey (symbol-name key)) |
| 1635 | (shift 0) | 1728 | (shift 0) |
| 1636 | s1 m1 h1 d1 month1 y1 diff ts te fm txt w date) | 1729 | (q (cond ((>= (nth 4 tm) 10) 4) |
| 1730 | ((>= (nth 4 tm) 7) 3) | ||
| 1731 | ((>= (nth 4 tm) 4) 2) | ||
| 1732 | ((>= (nth 4 tm) 1) 1))) | ||
| 1733 | s1 m1 h1 d1 month1 y1 diff ts te fm txt w date | ||
| 1734 | interval tmp shiftedy shiftedm shiftedq) | ||
| 1637 | (cond | 1735 | (cond |
| 1638 | ((string-match "^[0-9]+$" skey) | 1736 | ((string-match "^[0-9]+$" skey) |
| 1639 | (setq y (string-to-number skey) m 1 d 1 key 'year)) | 1737 | (setq y (string-to-number skey) m 1 d 1 key 'year)) |
| @@ -1650,6 +1748,15 @@ the returned times will be formatted strings." | |||
| 1650 | (setq d (nth 1 date) month (car date) y (nth 2 date) | 1748 | (setq d (nth 1 date) month (car date) y (nth 2 date) |
| 1651 | dow 1 | 1749 | dow 1 |
| 1652 | key 'week)) | 1750 | key 'week)) |
| 1751 | ((string-match "^\\([0-9]+\\)-[qQ]\\([1-4]\\)$" skey) | ||
| 1752 | (require 'cal-iso) | ||
| 1753 | (setq y (string-to-number (match-string 1 skey))) | ||
| 1754 | (setq q (string-to-number (match-string 2 skey))) | ||
| 1755 | (setq date (calendar-gregorian-from-absolute | ||
| 1756 | (calendar-absolute-from-iso (org-quarter-to-date q y)))) | ||
| 1757 | (setq d (nth 1 date) month (car date) y (nth 2 date) | ||
| 1758 | dow 1 | ||
| 1759 | key 'quarter)) | ||
| 1653 | ((string-match "^\\([0-9]+\\)-\\([0-9]\\{1,2\\}\\)-\\([0-9]\\{1,2\\}\\)$" skey) | 1760 | ((string-match "^\\([0-9]+\\)-\\([0-9]\\{1,2\\}\\)-\\([0-9]\\{1,2\\}\\)$" skey) |
| 1654 | (setq y (string-to-number (match-string 1 skey)) | 1761 | (setq y (string-to-number (match-string 1 skey)) |
| 1655 | month (string-to-number (match-string 2 skey)) | 1762 | month (string-to-number (match-string 2 skey)) |
| @@ -1657,12 +1764,17 @@ the returned times will be formatted strings." | |||
| 1657 | key 'day)) | 1764 | key 'day)) |
| 1658 | ((string-match "\\([-+][0-9]+\\)$" skey) | 1765 | ((string-match "\\([-+][0-9]+\\)$" skey) |
| 1659 | (setq shift (string-to-number (match-string 1 skey)) | 1766 | (setq shift (string-to-number (match-string 1 skey)) |
| 1660 | key (intern (substring skey 0 (match-beginning 1)))))) | 1767 | key (intern (substring skey 0 (match-beginning 1)))) |
| 1768 | (if(and (memq key '(quarter thisq)) (> shift 0)) | ||
| 1769 | (error "Looking forward with quarters isn't implemented.") | ||
| 1770 | ()))) | ||
| 1771 | |||
| 1661 | (when (= shift 0) | 1772 | (when (= shift 0) |
| 1662 | (cond ((eq key 'yesterday) (setq key 'today shift -1)) | 1773 | (cond ((eq key 'yesterday) (setq key 'today shift -1)) |
| 1663 | ((eq key 'lastweek) (setq key 'week shift -1)) | 1774 | ((eq key 'lastweek) (setq key 'week shift -1)) |
| 1664 | ((eq key 'lastmonth) (setq key 'month shift -1)) | 1775 | ((eq key 'lastmonth) (setq key 'month shift -1)) |
| 1665 | ((eq key 'lastyear) (setq key 'year shift -1)))) | 1776 | ((eq key 'lastyear) (setq key 'year shift -1)) |
| 1777 | ((eq key 'lastq) (setq key 'quarter shift -1)))) | ||
| 1666 | (cond | 1778 | (cond |
| 1667 | ((memq key '(day today)) | 1779 | ((memq key '(day today)) |
| 1668 | (setq d (+ d shift) h 0 m 0 h1 24 m1 0)) | 1780 | (setq d (+ d shift) h 0 m 0 h1 24 m1 0)) |
| @@ -1671,6 +1783,28 @@ the returned times will be formatted strings." | |||
| 1671 | m 0 h 0 d (- d diff) d1 (+ 7 d))) | 1783 | m 0 h 0 d (- d diff) d1 (+ 7 d))) |
| 1672 | ((memq key '(month thismonth)) | 1784 | ((memq key '(month thismonth)) |
| 1673 | (setq d 1 h 0 m 0 d1 1 month (+ month shift) month1 (1+ month) h1 0 m1 0)) | 1785 | (setq d 1 h 0 m 0 d1 1 month (+ month shift) month1 (1+ month) h1 0 m1 0)) |
| 1786 | ((memq key '(quarter thisq)) | ||
| 1787 | ; compute if this shift remains in this year | ||
| 1788 | ; if not, compute how many years and quarters we have to shift (via floor*) | ||
| 1789 | ; and compute the shifted years, months and quarters | ||
| 1790 | (cond | ||
| 1791 | ((< (+ (- q 1) shift) 0) ; shift not in this year | ||
| 1792 | (setq interval (* -1 (+ (- q 1) shift))) | ||
| 1793 | ; set tmp to ((years to shift) (quarters to shift)) | ||
| 1794 | (setq tmp (org-floor* interval 4)) | ||
| 1795 | ; due to the use of floor, 0 quarters actually means 4 | ||
| 1796 | (if (= 0 (nth 1 tmp)) | ||
| 1797 | (setq shiftedy (- y (nth 0 tmp)) | ||
| 1798 | shiftedm 1 | ||
| 1799 | shiftedq 1) | ||
| 1800 | (setq shiftedy (- y (+ 1 (nth 0 tmp))) | ||
| 1801 | shiftedm (- 13 (* 3 (nth 1 tmp))) | ||
| 1802 | shiftedq (- 5 (nth 1 tmp)))) | ||
| 1803 | (setq d 1 h 0 m 0 d1 1 month shiftedm month1 (+ 3 shiftedm) h1 0 m1 0 y shiftedy)) | ||
| 1804 | ((> (+ q shift) 0) ; shift is whitin this year | ||
| 1805 | (setq shiftedq (+ q shift)) | ||
| 1806 | (setq shiftedy y) | ||
| 1807 | (setq d 1 h 0 m 0 d1 1 month (+ 1 (* 3 (- (+ q shift) 1))) month1 (+ 4 (* 3 (- (+ q shift) 1))) h1 0 m1 0)))) | ||
| 1674 | ((memq key '(year thisyear)) | 1808 | ((memq key '(year thisyear)) |
| 1675 | (setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y))) | 1809 | (setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y))) |
| 1676 | (t (error "No such time block %s" key))) | 1810 | (t (error "No such time block %s" key))) |
| @@ -1686,11 +1820,21 @@ the returned times will be formatted strings." | |||
| 1686 | ((memq key '(month thismonth)) | 1820 | ((memq key '(month thismonth)) |
| 1687 | (setq txt (format-time-string "%B %Y" ts))) | 1821 | (setq txt (format-time-string "%B %Y" ts))) |
| 1688 | ((memq key '(year thisyear)) | 1822 | ((memq key '(year thisyear)) |
| 1689 | (setq txt (format-time-string "the year %Y" ts)))) | 1823 | (setq txt (format-time-string "the year %Y" ts))) |
| 1824 | ((memq key '(quarter thisq)) | ||
| 1825 | (setq txt (concatenate 'string (org-count-quarter shiftedq) " quarter of " (number-to-string shiftedy)))) | ||
| 1826 | ) | ||
| 1690 | (if as-strings | 1827 | (if as-strings |
| 1691 | (list (format-time-string fm ts) (format-time-string fm te) txt) | 1828 | (list (format-time-string fm ts) (format-time-string fm te) txt) |
| 1692 | (list ts te txt)))) | 1829 | (list ts te txt)))) |
| 1693 | 1830 | ||
| 1831 | (defun org-count-quarter (n) | ||
| 1832 | (cond | ||
| 1833 | ((= n 1) "1st") | ||
| 1834 | ((= n 2) "2nd") | ||
| 1835 | ((= n 3) "3rd") | ||
| 1836 | ((= n 4) "4th"))) | ||
| 1837 | |||
| 1694 | (defun org-clocktable-shift (dir n) | 1838 | (defun org-clocktable-shift (dir n) |
| 1695 | "Try to shift the :block date of the clocktable at point. | 1839 | "Try to shift the :block date of the clocktable at point. |
| 1696 | Point must be in the #+BEGIN: line of a clocktable, or this function | 1840 | Point must be in the #+BEGIN: line of a clocktable, or this function |
| @@ -1704,7 +1848,7 @@ the currently selected interval size." | |||
| 1704 | (and (memq dir '(left down)) (setq n (- n))) | 1848 | (and (memq dir '(left down)) (setq n (- n))) |
| 1705 | (save-excursion | 1849 | (save-excursion |
| 1706 | (goto-char (point-at-bol)) | 1850 | (goto-char (point-at-bol)) |
| 1707 | (if (not (looking-at "#\\+BEGIN: clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) | 1851 | (if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) |
| 1708 | (error "Line needs a :block definition before this command works") | 1852 | (error "Line needs a :block definition before this command works") |
| 1709 | (let* ((b (match-beginning 1)) (e (match-end 1)) | 1853 | (let* ((b (match-beginning 1)) (e (match-end 1)) |
| 1710 | (s (match-string 1)) | 1854 | (s (match-string 1)) |
| @@ -1713,90 +1857,95 @@ the currently selected interval size." | |||
| 1713 | ((equal s "yesterday") (setq s "today-1")) | 1857 | ((equal s "yesterday") (setq s "today-1")) |
| 1714 | ((equal s "lastweek") (setq s "thisweek-1")) | 1858 | ((equal s "lastweek") (setq s "thisweek-1")) |
| 1715 | ((equal s "lastmonth") (setq s "thismonth-1")) | 1859 | ((equal s "lastmonth") (setq s "thismonth-1")) |
| 1716 | ((equal s "lastyear") (setq s "thisyear-1"))) | 1860 | ((equal s "lastyear") (setq s "thisyear-1")) |
| 1717 | (cond | 1861 | ((equal s "lastq") (setq s "thisq-1"))) |
| 1718 | ((string-match "^\\(today\\|thisweek\\|thismonth\\|thisyear\\)\\([-+][0-9]+\\)?$" s) | 1862 | |
| 1719 | (setq block (match-string 1 s) | 1863 | (cond |
| 1720 | shift (if (match-end 2) | 1864 | ((string-match "^\\(today\\|thisweek\\|thismonth\\|thisyear\\|thisq\\)\\([-+][0-9]+\\)?$" s) |
| 1721 | (string-to-number (match-string 2 s)) | 1865 | (setq block (match-string 1 s) |
| 1722 | 0)) | 1866 | shift (if (match-end 2) |
| 1723 | (setq shift (+ shift n)) | 1867 | (string-to-number (match-string 2 s)) |
| 1724 | (setq ins (if (= shift 0) block (format "%s%+d" block shift)))) | 1868 | 0)) |
| 1725 | ((string-match "\\([0-9]+\\)\\(-\\([wW]?\\)\\([0-9]\\{1,2\\}\\)\\(-\\([0-9]\\{1,2\\}\\)\\)?\\)?" s) | 1869 | (setq shift (+ shift n)) |
| 1726 | ;; 1 1 2 3 3 4 4 5 6 6 5 2 | 1870 | (setq ins (if (= shift 0) block (format "%s%+d" block shift)))) |
| 1727 | (setq y (string-to-number (match-string 1 s)) | 1871 | ((string-match "\\([0-9]+\\)\\(-\\([wWqQ]?\\)\\([0-9]\\{1,2\\}\\)\\(-\\([0-9]\\{1,2\\}\\)\\)?\\)?" s) |
| 1728 | wp (and (match-end 3) (match-string 3 s)) | 1872 | ;; 1 1 2 3 3 4 4 5 6 6 5 2 |
| 1729 | mw (and (match-end 4) (string-to-number (match-string 4 s))) | 1873 | (setq y (string-to-number (match-string 1 s)) |
| 1730 | d (and (match-end 6) (string-to-number (match-string 6 s)))) | 1874 | wp (and (match-end 3) (match-string 3 s)) |
| 1731 | (cond | 1875 | mw (and (match-end 4) (string-to-number (match-string 4 s))) |
| 1732 | (d (setq ins (format-time-string | 1876 | d (and (match-end 6) (string-to-number (match-string 6 s)))) |
| 1733 | "%Y-%m-%d" | 1877 | (cond |
| 1734 | (encode-time 0 0 0 (+ d n) m y)))) | 1878 | (d (setq ins (format-time-string |
| 1735 | ((and wp mw (> (length wp) 0)) | 1879 | "%Y-%m-%d" |
| 1736 | (require 'cal-iso) | 1880 | (encode-time 0 0 0 (+ d n) m y)))) |
| 1737 | (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (list (+ mw n) 1 y)))) | 1881 | ((and wp (string-match "w\\|W" wp) mw (> (length wp) 0)) |
| 1738 | (setq ins (format-time-string | 1882 | (require 'cal-iso) |
| 1739 | "%G-W%V" | 1883 | (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (list (+ mw n) 1 y)))) |
| 1740 | (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) | 1884 | (setq ins (format-time-string |
| 1741 | (mw | 1885 | "%G-W%V" |
| 1742 | (setq ins (format-time-string | 1886 | (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) |
| 1743 | "%Y-%m" | 1887 | ((and wp (string-match "q\\|Q" wp) mw (> (length wp) 0)) |
| 1744 | (encode-time 0 0 0 1 (+ mw n) y)))) | 1888 | (require 'cal-iso) |
| 1745 | (y | 1889 | ; if the 4th + 1 quarter is requested we flip to the 1st quarter of the next year |
| 1746 | (setq ins (number-to-string (+ y n)))))) | 1890 | (if (> (+ mw n) 4) |
| 1747 | (t (error "Cannot shift clocktable block"))) | 1891 | (setq mw 0 |
| 1748 | (when ins | 1892 | y (+ 1 y)) |
| 1749 | (goto-char b) | 1893 | ()) |
| 1750 | (insert ins) | 1894 | ; if the 1st - 1 quarter is requested we flip to the 4th quarter of the previous year |
| 1751 | (delete-region (point) (+ (point) (- e b))) | 1895 | (if (= (+ mw n) 0) |
| 1752 | (beginning-of-line 1) | 1896 | (setq mw 5 |
| 1753 | (org-update-dblock) | 1897 | y (- y 1)) |
| 1754 | t))))) | 1898 | ()) |
| 1899 | (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y)))) | ||
| 1900 | (setq ins (format-time-string | ||
| 1901 | (concatenate 'string (number-to-string y) "-Q" (number-to-string (+ mw n))) | ||
| 1902 | (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) | ||
| 1903 | (mw | ||
| 1904 | (setq ins (format-time-string | ||
| 1905 | "%Y-%m" | ||
| 1906 | (encode-time 0 0 0 1 (+ mw n) y)))) | ||
| 1907 | (y | ||
| 1908 | (setq ins (number-to-string (+ y n)))))) | ||
| 1909 | (t (error "Cannot shift clocktable block"))) | ||
| 1910 | (when ins | ||
| 1911 | (goto-char b) | ||
| 1912 | (insert ins) | ||
| 1913 | (delete-region (point) (+ (point) (- e b))) | ||
| 1914 | (beginning-of-line 1) | ||
| 1915 | (org-update-dblock) | ||
| 1916 | t))))) | ||
| 1755 | 1917 | ||
| 1756 | (defun org-dblock-write:clocktable (params) | 1918 | (defun org-dblock-write:clocktable (params) |
| 1757 | "Write the standard clocktable." | 1919 | "Write the standard clocktable." |
| 1920 | (setq params (org-combine-plists org-clocktable-defaults params)) | ||
| 1758 | (catch 'exit | 1921 | (catch 'exit |
| 1759 | (let* ((hlchars '((1 . "*") (2 . "/"))) | 1922 | (let* ((scope (plist-get params :scope)) |
| 1760 | (ins (make-marker)) | 1923 | (block (plist-get params :block)) |
| 1761 | (total-time nil) | ||
| 1762 | (scope (plist-get params :scope)) | ||
| 1763 | (tostring (plist-get params :tostring)) | ||
| 1764 | (multifile (plist-get params :multifile)) | ||
| 1765 | (header (plist-get params :header)) | ||
| 1766 | (maxlevel (or (plist-get params :maxlevel) 3)) | ||
| 1767 | (step (plist-get params :step)) | ||
| 1768 | (emph (plist-get params :emphasize)) | ||
| 1769 | (timestamp (plist-get params :timestamp)) | ||
| 1770 | (ts (plist-get params :tstart)) | 1924 | (ts (plist-get params :tstart)) |
| 1771 | (te (plist-get params :tend)) | 1925 | (te (plist-get params :tend)) |
| 1772 | (block (plist-get params :block)) | ||
| 1773 | (link (plist-get params :link)) | 1926 | (link (plist-get params :link)) |
| 1774 | (tags (plist-get params :tags)) | 1927 | (maxlevel (or (plist-get params :maxlevel) 3)) |
| 1775 | (matcher (if tags (cdr (org-make-tags-matcher tags)))) | 1928 | (step (plist-get params :step)) |
| 1776 | ipos time p level hlc hdl tsp props content recalc formula pcol | 1929 | (timestamp (plist-get params :timestamp)) |
| 1777 | cc beg end pos tbl tbl1 range-text rm-file-column scope-is-list st) | 1930 | (formatter (or (plist-get params :formatter) |
| 1778 | (setq org-clock-file-total-minutes nil) | 1931 | org-clock-clocktable-formatter |
| 1932 | 'org-clocktable-write-default)) | ||
| 1933 | cc range-text ipos pos one-file-with-archives | ||
| 1934 | scope-is-list tbls level) | ||
| 1935 | |||
| 1936 | ;; Check if we need to do steps | ||
| 1937 | (when block | ||
| 1938 | ;; Get the range text for the header | ||
| 1939 | (setq cc (org-clock-special-range block nil t) | ||
| 1940 | ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) | ||
| 1779 | (when step | 1941 | (when step |
| 1942 | ;; Write many tables, in steps | ||
| 1780 | (unless (or block (and ts te)) | 1943 | (unless (or block (and ts te)) |
| 1781 | (error "Clocktable `:step' can only be used with `:block' or `:tstart,:end'")) | 1944 | (error "Clocktable `:step' can only be used with `:block' or `:tstart,:end'")) |
| 1782 | (org-clocktable-steps params) | 1945 | (org-clocktable-steps params) |
| 1783 | (throw 'exit nil)) | 1946 | (throw 'exit nil)) |
| 1784 | (when block | 1947 | |
| 1785 | (setq cc (org-clock-special-range block nil t) | 1948 | (setq ipos (point)) ; remember the insertion position |
| 1786 | ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) | ||
| 1787 | (when (integerp ts) (setq ts (calendar-gregorian-from-absolute ts))) | ||
| 1788 | (when (integerp te) (setq te (calendar-gregorian-from-absolute te))) | ||
| 1789 | (when (and ts (listp ts)) | ||
| 1790 | (setq ts (format "%4d-%02d-%02d" (nth 2 ts) (car ts) (nth 1 ts)))) | ||
| 1791 | (when (and te (listp te)) | ||
| 1792 | (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te)))) | ||
| 1793 | ;; Now the times are strings we can parse. | ||
| 1794 | (if ts (setq ts (org-float-time | ||
| 1795 | (apply 'encode-time (org-parse-time-string ts))))) | ||
| 1796 | (if te (setq te (org-float-time | ||
| 1797 | (apply 'encode-time (org-parse-time-string te))))) | ||
| 1798 | (move-marker ins (point)) | ||
| 1799 | (setq ipos (point)) | ||
| 1800 | 1949 | ||
| 1801 | ;; Get the right scope | 1950 | ;; Get the right scope |
| 1802 | (setq pos (point)) | 1951 | (setq pos (point)) |
| @@ -1810,166 +1959,271 @@ the currently selected interval size." | |||
| 1810 | (setq scope (org-add-archive-files scope))) | 1959 | (setq scope (org-add-archive-files scope))) |
| 1811 | ((eq scope 'file-with-archives) | 1960 | ((eq scope 'file-with-archives) |
| 1812 | (setq scope (org-add-archive-files (list (buffer-file-name))) | 1961 | (setq scope (org-add-archive-files (list (buffer-file-name))) |
| 1813 | rm-file-column t))) | 1962 | one-file-with-archives t))) |
| 1814 | (setq scope-is-list (and scope (listp scope))) | 1963 | (setq scope-is-list (and scope (listp scope))) |
| 1815 | (save-restriction | 1964 | (if scope-is-list |
| 1816 | (cond | 1965 | ;; we collect from several files |
| 1817 | ((not scope)) | ||
| 1818 | ((eq scope 'file) (widen)) | ||
| 1819 | ((eq scope 'subtree) (org-narrow-to-subtree)) | ||
| 1820 | ((eq scope 'tree) | ||
| 1821 | (while (org-up-heading-safe)) | ||
| 1822 | (org-narrow-to-subtree)) | ||
| 1823 | ((and (symbolp scope) (string-match "^tree\\([0-9]+\\)$" | ||
| 1824 | (symbol-name scope))) | ||
| 1825 | (setq level (string-to-number (match-string 1 (symbol-name scope)))) | ||
| 1826 | (catch 'exit | ||
| 1827 | (while (org-up-heading-safe) | ||
| 1828 | (looking-at outline-regexp) | ||
| 1829 | (if (<= (org-reduced-level (funcall outline-level)) level) | ||
| 1830 | (throw 'exit nil)))) | ||
| 1831 | (org-narrow-to-subtree)) | ||
| 1832 | (scope-is-list | ||
| 1833 | (let* ((files scope) | 1966 | (let* ((files scope) |
| 1834 | (scope 'agenda) | ||
| 1835 | (p1 (copy-sequence params)) | ||
| 1836 | file) | 1967 | file) |
| 1837 | (setq p1 (plist-put p1 :tostring t)) | ||
| 1838 | (setq p1 (plist-put p1 :multifile t)) | ||
| 1839 | (setq p1 (plist-put p1 :scope 'file)) | ||
| 1840 | (org-prepare-agenda-buffers files) | 1968 | (org-prepare-agenda-buffers files) |
| 1841 | (while (setq file (pop files)) | 1969 | (while (setq file (pop files)) |
| 1842 | (with-current-buffer (find-buffer-visiting file) | 1970 | (with-current-buffer (find-buffer-visiting file) |
| 1843 | (setq org-clock-file-total-minutes 0) | 1971 | (save-excursion |
| 1844 | (setq tbl1 (org-dblock-write:clocktable p1)) | 1972 | (save-restriction |
| 1845 | (when tbl1 | 1973 | (push (org-clock-get-table-data file params) tbls)))))) |
| 1846 | (push (org-clocktable-add-file | 1974 | ;; Just from the current file |
| 1847 | file | 1975 | (save-restriction |
| 1848 | (concat "| |*File time*|*" | 1976 | ;; get the right range into the restriction |
| 1849 | (org-minutes-to-hh:mm-string | 1977 | (org-prepare-agenda-buffers (list (buffer-file-name))) |
| 1850 | org-clock-file-total-minutes) | 1978 | (cond |
| 1851 | "*|\n" | 1979 | ((not scope)) ; use the restriction as it is now |
| 1852 | tbl1)) tbl) | 1980 | ((eq scope 'file) (widen)) |
| 1853 | (setq total-time (+ (or total-time 0) | 1981 | ((eq scope 'subtree) (org-narrow-to-subtree)) |
| 1854 | org-clock-file-total-minutes)))))))) | 1982 | ((eq scope 'tree) |
| 1855 | (goto-char pos) | 1983 | (while (org-up-heading-safe)) |
| 1856 | 1984 | (org-narrow-to-subtree)) | |
| 1857 | (unless scope-is-list | 1985 | ((and (symbolp scope) (string-match "^tree\\([0-9]+\\)$" |
| 1858 | (org-clock-sum ts te | 1986 | (symbol-name scope))) |
| 1859 | (unless (null matcher) | 1987 | (setq level (string-to-number (match-string 1 (symbol-name scope)))) |
| 1860 | (lambda () | 1988 | (catch 'exit |
| 1861 | (let ((tags-list | 1989 | (while (org-up-heading-safe) |
| 1862 | (org-split-string | 1990 | (looking-at outline-regexp) |
| 1863 | (or (org-entry-get (point) "ALLTAGS") "") | 1991 | (if (<= (org-reduced-level (funcall outline-level)) level) |
| 1864 | ":"))) | 1992 | (throw 'exit nil)))) |
| 1865 | (eval matcher))))) | 1993 | (org-narrow-to-subtree))) |
| 1866 | (goto-char (point-min)) | 1994 | ;; do the table, with no file name. |
| 1867 | (setq st t) | 1995 | (push (org-clock-get-table-data nil params) tbls))) |
| 1868 | (while (or (and (bobp) (prog1 st (setq st nil)) | 1996 | |
| 1869 | (get-text-property (point) :org-clock-minutes) | 1997 | ;; OK, at this point we tbls as a list of tables, one per file |
| 1870 | (setq p (point-min))) | 1998 | (setq tbls (nreverse tbls)) |
| 1871 | (setq p (next-single-property-change (point) :org-clock-minutes))) | 1999 | |
| 1872 | (goto-char p) | 2000 | (setq params (plist-put params :multifile scope-is-list)) |
| 1873 | (when (setq time (get-text-property p :org-clock-minutes)) | 2001 | (setq params (plist-put params :one-file-with-archives |
| 1874 | (save-excursion | 2002 | one-file-with-archives)) |
| 1875 | (beginning-of-line 1) | 2003 | |
| 1876 | (when (and (looking-at (org-re "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[[:alnum:]_@#%:]+:\\)?[ \t]*$")) | 2004 | (funcall formatter ipos tbls params)))) |
| 1877 | (setq level (org-reduced-level | 2005 | |
| 1878 | (- (match-end 1) (match-beginning 1)))) | 2006 | (defun org-clocktable-write-default (ipos tables params) |
| 1879 | (<= level maxlevel)) | 2007 | "Write out a clock table at position IPOS in the current buffer. |
| 1880 | (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") | 2008 | TABLES is a list of tables with clocking data as produced by |
| 1881 | hdl (if (not link) | 2009 | `org-clock-get-table-data'. PARAMS is the parameter property list obtained |
| 1882 | (match-string 2) | 2010 | from the dynamic block defintion." |
| 1883 | (org-make-link-string | 2011 | ;; This function looks quite complicated, mainly because there are a lot |
| 1884 | (format "file:%s::%s" | 2012 | ;; of options which can add or remove columns. I have massively commented |
| 1885 | (buffer-file-name) | 2013 | ;; function, to I hope it is understandable. If someone want to write |
| 1886 | (save-match-data | 2014 | ;; there own special formatter, this maybe much easier because there can |
| 1887 | (org-make-org-heading-search-string | 2015 | ;; be a fixed format with a well-defined number of columns... |
| 1888 | (match-string 2)))) | 2016 | (let* ((hlchars '((1 . "*") (2 . "/"))) |
| 1889 | (match-string 2))) | 2017 | (multifile (plist-get params :multifile)) |
| 1890 | tsp (when timestamp | 2018 | (block (plist-get params :block)) |
| 1891 | (setq props (org-entry-properties (point))) | 2019 | (ts (plist-get params :tstart)) |
| 1892 | (or (cdr (assoc "SCHEDULED" props)) | 2020 | (te (plist-get params :tend)) |
| 1893 | (cdr (assoc "TIMESTAMP" props)) | 2021 | (header (plist-get params :header)) |
| 1894 | (cdr (assoc "DEADLINE" props)) | 2022 | (narrow (plist-get params :narrow)) |
| 1895 | (cdr (assoc "TIMESTAMP_IA" props))))) | 2023 | (link (plist-get params :link)) |
| 1896 | (if (and (not multifile) (= level 1)) (push "|-" tbl)) | 2024 | (maxlevel (or (plist-get params :maxlevel) 3)) |
| 1897 | (push (concat | 2025 | (emph (plist-get params :emphasize)) |
| 1898 | "| " (int-to-string level) "|" | 2026 | (level-p (plist-get params :level)) |
| 1899 | (if timestamp (concat tsp "|") "") | 2027 | (timestamp (plist-get params :timestamp)) |
| 1900 | hlc hdl hlc " |" | 2028 | (ntcol (max 1 (or (plist-get params :tcolumns) 100))) |
| 1901 | (make-string (1- level) ?|) | 2029 | (rm-file-column (plist-get params :one-file-with-archives)) |
| 1902 | hlc (org-minutes-to-hh:mm-string time) hlc | 2030 | (indent (plist-get params :indent)) |
| 1903 | " |") tbl)))))) | 2031 | range-text total-time tbl level hlc formula pcol |
| 1904 | (setq tbl (nreverse tbl)) | 2032 | file-time entries entry headline |
| 1905 | (if tostring | 2033 | recalc content narrow-cut-p tcol) |
| 1906 | (if tbl (mapconcat 'identity tbl "\n") nil) | 2034 | |
| 1907 | (goto-char ins) | 2035 | ;; Implement abbreviations |
| 1908 | (insert-before-markers | 2036 | (when (plist-get params :compact) |
| 1909 | (or header | 2037 | (setq level nil indent t narrow (or narrow '40!) ntcol 1)) |
| 1910 | (concat | 2038 | |
| 1911 | "Clock summary at [" | 2039 | ;; Some consistency test for parameters |
| 1912 | (substring | 2040 | (unless (integerp ntcol) |
| 1913 | (format-time-string (cdr org-time-stamp-formats)) | 2041 | (setq params (plist-put params :tcolumns (setq ntcol 100)))) |
| 1914 | 1 -1) | 2042 | |
| 1915 | "]" | 2043 | (when (and narrow (integerp narrow) link) |
| 1916 | (if block (concat ", for " range-text ".") "") | 2044 | ;; We cannot have both integer narrow and link |
| 1917 | "\n\n")) | 2045 | (message |
| 1918 | (if scope-is-list "|File" "") | 2046 | "Using hard narrowing in clocktable to allow for links") |
| 1919 | "|L|" (if timestamp "Timestamp|" "") "Headline|Time|\n") | 2047 | (setq narrow (intern (format "%d!" narrow)))) |
| 1920 | (setq total-time (or total-time org-clock-file-total-minutes)) | 2048 | |
| 1921 | (insert-before-markers | 2049 | (when narrow |
| 1922 | "|-\n|" | 2050 | (cond |
| 1923 | (if scope-is-list "|" "") | 2051 | ((integerp narrow)) |
| 1924 | (if timestamp "|Timestamp|" "|") | 2052 | ((and (symbolp narrow) |
| 1925 | "*Total time*| *" | 2053 | (string-match "\\`[0-9]+!\\'" (symbol-name narrow))) |
| 1926 | (org-minutes-to-hh:mm-string (or total-time 0)) | 2054 | (setq narrow-cut-p t |
| 1927 | "*|\n|-\n") | 2055 | narrow (string-to-number (substring (symbol-name narrow) |
| 1928 | (setq tbl (delq nil tbl)) | 2056 | 0 -1)))) |
| 1929 | (if (and (stringp (car tbl)) (> (length (car tbl)) 1) | 2057 | (t |
| 1930 | (equal (substring (car tbl) 0 2) "|-")) | 2058 | (error "Invalid value %s of :narrow property in clock table" |
| 1931 | (pop tbl)) | 2059 | narrow)))) |
| 1932 | (insert-before-markers (mapconcat | 2060 | |
| 1933 | 'identity (delq nil tbl) | 2061 | (when block |
| 1934 | (if scope-is-list "\n|-\n" "\n"))) | 2062 | ;; Get the range text for the header |
| 1935 | (backward-delete-char 1) | 2063 | (setq range-text (nth 2 (org-clock-special-range block nil t)))) |
| 1936 | (if (setq formula (plist-get params :formula)) | 2064 | |
| 1937 | (cond | 2065 | ;; Compute the total time |
| 1938 | ((eq formula '%) | 2066 | (setq total-time (apply '+ (mapcar 'cadr tables))) |
| 1939 | (setq pcol (+ (if scope-is-list 1 0) maxlevel 3)) | 2067 | |
| 1940 | (insert | 2068 | ;; Now we need to output this tsuff |
| 1941 | (format | 2069 | (goto-char ipos) |
| 1942 | "\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f" | 2070 | |
| 1943 | pcol | 2071 | ;; Insert the text *before* the actual table |
| 1944 | 2 | 2072 | (insert-before-markers |
| 1945 | (+ 3 (if scope-is-list 1 0)) | 2073 | (or header |
| 1946 | (+ (if scope-is-list 1 0) 3) | 2074 | ;; Format the standard header |
| 1947 | (1- pcol))) | 2075 | (concat |
| 1948 | (setq recalc t)) | 2076 | "Clock summary at [" |
| 1949 | ((stringp formula) | 2077 | (substring |
| 1950 | (insert "\n#+TBLFM: " formula) | 2078 | (format-time-string (cdr org-time-stamp-formats)) |
| 1951 | (setq recalc t)) | 2079 | 1 -1) |
| 1952 | (t (error "invalid formula in clocktable"))) | 2080 | "]" |
| 1953 | ;; Should we rescue an old formula? | 2081 | (if block (concat ", for " range-text ".") "") |
| 1954 | (when (stringp (setq content (plist-get params :content))) | 2082 | "\n\n"))) |
| 1955 | (when (string-match "^\\([ \t]*#\\+TBLFM:.*\\)" content) | 2083 | |
| 1956 | (setq recalc t) | 2084 | ;; Insert the narrowing line |
| 1957 | (insert "\n" (match-string 1 (plist-get params :content))) | 2085 | (when (and narrow (integerp narrow) (not narrow-cut-p)) |
| 1958 | (beginning-of-line 0)))) | 2086 | (insert-before-markers |
| 1959 | (goto-char ipos) | 2087 | "|" ; table line starter |
| 1960 | (skip-chars-forward "^|") | 2088 | (if multifile "|" "") ; file column, maybe |
| 1961 | (org-table-align) | 2089 | (if level-p "|" "") ; level column, maybe |
| 1962 | (when recalc | 2090 | (if timestamp "|" "") ; timestamp column, maybe |
| 1963 | (if (eq formula '%) | 2091 | (format "<%d>| |\n" narrow))) ; headline and time columns |
| 1964 | (save-excursion (org-table-goto-column pcol nil 'force) | 2092 | |
| 1965 | (insert "%"))) | 2093 | ;; Insert the table header line |
| 1966 | (org-table-recalculate 'all)) | 2094 | (insert-before-markers |
| 1967 | (when rm-file-column | 2095 | "|" ; table line starter |
| 1968 | (forward-char 1) | 2096 | (if multifile "File|" "") ; file column, maybe |
| 1969 | (org-table-delete-column)) | 2097 | (if level-p "L|" "") ; level column, maybe |
| 1970 | total-time))))) | 2098 | (if timestamp "Timestamp|" "") ; timestamp column, maybe |
| 2099 | "Headline|Time|\n") ; headline and time columns | ||
| 2100 | |||
| 2101 | ;; Insert the total time in the table | ||
| 2102 | (insert-before-markers | ||
| 2103 | "|-\n" ; a hline | ||
| 2104 | "|" ; table line starter | ||
| 2105 | (if multifile "| ALL " "") ; file column, maybe | ||
| 2106 | (if level-p "|" "") ; level column, maybe | ||
| 2107 | (if timestamp "|" "") ; timestamp column, maybe | ||
| 2108 | "*Total time*| " ; instead of a headline | ||
| 2109 | "*" | ||
| 2110 | (org-minutes-to-hh:mm-string (or total-time 0)) ; the time | ||
| 2111 | "*|\n") ; close line | ||
| 2112 | |||
| 2113 | ;; Now iterate over the tables and insert the data | ||
| 2114 | ;; but only if any time has been collected | ||
| 2115 | (when (and total-time (> total-time 0)) | ||
| 2116 | |||
| 2117 | (while (setq tbl (pop tables)) | ||
| 2118 | ;; now tbl is the table resulting from one file. | ||
| 2119 | (setq file-time (nth 1 tbl)) | ||
| 2120 | (when (or (and file-time (> file-time 0)) | ||
| 2121 | (not (plist-get params :fileskip0))) | ||
| 2122 | (insert-before-markers "|-\n") ; a hline because a new file starts | ||
| 2123 | ;; First the file time, if we have multiple files | ||
| 2124 | (when multifile | ||
| 2125 | ;; Summarize the time colleted from this file | ||
| 2126 | (insert-before-markers | ||
| 2127 | (format "| %s %s | %s*File time* | *%s*|\n" | ||
| 2128 | (file-name-nondirectory (car tbl)) | ||
| 2129 | (if level-p "| " "") ; level column, maybe | ||
| 2130 | (if timestamp "| " "") ; timestamp column, maybe | ||
| 2131 | (org-minutes-to-hh:mm-string (nth 1 tbl))))) ; the time | ||
| 2132 | |||
| 2133 | ;; Get the list of node entries and iterate over it | ||
| 2134 | (setq entries (nth 2 tbl)) | ||
| 2135 | (while (setq entry (pop entries)) | ||
| 2136 | (setq level (car entry) | ||
| 2137 | headline (nth 1 entry) | ||
| 2138 | hlc (if emph (or (cdr (assoc level hlchars)) "") "")) | ||
| 2139 | (when narrow-cut-p | ||
| 2140 | (if (and (string-match (concat "\\`" org-bracket-link-regexp | ||
| 2141 | "\\'") | ||
| 2142 | headline) | ||
| 2143 | (match-end 3)) | ||
| 2144 | (setq headline | ||
| 2145 | (format "[[%s][%s]]" | ||
| 2146 | (match-string 1 headline) | ||
| 2147 | (org-shorten-string (match-string 3 headline) | ||
| 2148 | narrow))) | ||
| 2149 | (setq headline (org-shorten-string headline narrow)))) | ||
| 2150 | (insert-before-markers | ||
| 2151 | "|" ; start the table line | ||
| 2152 | (if multifile "|" "") ; free space for file name column? | ||
| 2153 | (if level-p (format "%d|" (car entry)) "") ; level, maybe | ||
| 2154 | (if timestamp (concat (nth 2 entry) "|") "") ; timestamp, maybe | ||
| 2155 | (if indent (org-clocktable-indent-string level) "") ; indentation | ||
| 2156 | hlc headline hlc "|" ; headline | ||
| 2157 | (make-string (min (1- ntcol) (or (- level 1))) ?|) | ||
| 2158 | ; empty fields for higher levels | ||
| 2159 | hlc (org-minutes-to-hh:mm-string (nth 3 entry)) hlc ; time | ||
| 2160 | "|\n" ; close line | ||
| 2161 | ))))) | ||
| 2162 | (backward-delete-char 1) | ||
| 2163 | (if (setq formula (plist-get params :formula)) | ||
| 2164 | (cond | ||
| 2165 | ((eq formula '%) | ||
| 2166 | ;; compute the column where the % numbers need to go | ||
| 2167 | (setq pcol (+ 2 | ||
| 2168 | (if multifile 1 0) | ||
| 2169 | (if level-p 1 0) | ||
| 2170 | (if timestamp 1 0) | ||
| 2171 | (min maxlevel (or ntcol 100)))) | ||
| 2172 | ;; compute the column where the total time is | ||
| 2173 | (setq tcol (+ 2 | ||
| 2174 | (if multifile 1 0) | ||
| 2175 | (if level-p 1 0) | ||
| 2176 | (if timestamp 1 0))) | ||
| 2177 | (insert | ||
| 2178 | (format | ||
| 2179 | "\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f" | ||
| 2180 | pcol ; the column where the % numbers should go | ||
| 2181 | (if (and narrow (not narrow-cut-p)) 3 2) ; row of the total time | ||
| 2182 | tcol ; column of the total time | ||
| 2183 | tcol (1- pcol) ; range of columns where times can be found | ||
| 2184 | )) | ||
| 2185 | (setq recalc t)) | ||
| 2186 | ((stringp formula) | ||
| 2187 | (insert "\n#+TBLFM: " formula) | ||
| 2188 | (setq recalc t)) | ||
| 2189 | (t (error "invalid formula in clocktable"))) | ||
| 2190 | ;; Should we rescue an old formula? | ||
| 2191 | (when (stringp (setq content (plist-get params :content))) | ||
| 2192 | (when (string-match "^\\([ \t]*#\\+TBLFM:.*\\)" content) | ||
| 2193 | (setq recalc t) | ||
| 2194 | (insert "\n" (match-string 1 (plist-get params :content))) | ||
| 2195 | (beginning-of-line 0)))) | ||
| 2196 | ;; Back to beginning, align the table, recalculate if necessary | ||
| 2197 | (goto-char ipos) | ||
| 2198 | (skip-chars-forward "^|") | ||
| 2199 | (org-table-align) | ||
| 2200 | (when org-hide-emphasis-markers | ||
| 2201 | ;; we need to align a second time | ||
| 2202 | (org-table-align)) | ||
| 2203 | (when recalc | ||
| 2204 | (if (eq formula '%) | ||
| 2205 | (save-excursion | ||
| 2206 | (if (and narrow (not narrow-cut-p)) (beginning-of-line 2)) | ||
| 2207 | (org-table-goto-column pcol nil 'force) | ||
| 2208 | (insert "%"))) | ||
| 2209 | (org-table-recalculate 'all)) | ||
| 2210 | (when rm-file-column | ||
| 2211 | ;; The file column is actually not wanted | ||
| 2212 | (forward-char 1) | ||
| 2213 | (org-table-delete-column)) | ||
| 2214 | total-time)) | ||
| 2215 | |||
| 2216 | (defun org-clocktable-indent-string (level) | ||
| 2217 | (if (= level 1) | ||
| 2218 | "" | ||
| 2219 | (let ((str "\\__")) | ||
| 2220 | (while (> level 2) | ||
| 2221 | (setq level (1- level) | ||
| 2222 | str (concat str "___"))) | ||
| 2223 | (concat str " ")))) | ||
| 1971 | 2224 | ||
| 1972 | (defun org-clocktable-steps (params) | 2225 | (defun org-clocktable-steps (params) |
| 2226 | "Step through the range to make a number of clock tables." | ||
| 1973 | (let* ((p1 (copy-sequence params)) | 2227 | (let* ((p1 (copy-sequence params)) |
| 1974 | (ts (plist-get p1 :tstart)) | 2228 | (ts (plist-get p1 :tstart)) |
| 1975 | (te (plist-get p1 :tend)) | 2229 | (te (plist-get p1 :tend)) |
| @@ -2008,29 +2262,107 @@ the currently selected interval size." | |||
| 2008 | (setq p1 (plist-put p1 :tend (format-time-string | 2262 | (setq p1 (plist-put p1 :tend (format-time-string |
| 2009 | (org-time-stamp-format nil t) | 2263 | (org-time-stamp-format nil t) |
| 2010 | (seconds-to-time (setq ts (+ ts step)))))) | 2264 | (seconds-to-time (setq ts (+ ts step)))))) |
| 2011 | (insert "\n" (if (eq step0 'day) "Daily report: " "Weekly report starting on: ") | 2265 | (insert "\n" (if (eq step0 'day) "Daily report: " |
| 2266 | "Weekly report starting on: ") | ||
| 2012 | (plist-get p1 :tstart) "\n") | 2267 | (plist-get p1 :tstart) "\n") |
| 2013 | (setq step-time (org-dblock-write:clocktable p1)) | 2268 | (setq step-time (org-dblock-write:clocktable p1)) |
| 2014 | (re-search-forward "#\\+END:") | 2269 | (re-search-forward "^[ \t]*#\\+END:") |
| 2015 | (when (and (equal step-time 0) stepskip0) | 2270 | (when (and (equal step-time 0) stepskip0) |
| 2016 | ;; Remove the empty table | 2271 | ;; Remove the empty table |
| 2017 | (delete-region (point-at-bol) | 2272 | (delete-region (point-at-bol) |
| 2018 | (save-excursion | 2273 | (save-excursion |
| 2019 | (re-search-backward "^\\(Daily\\|Weekly\\) report" nil t) | 2274 | (re-search-backward "^\\(Daily\\|Weekly\\) report" |
| 2275 | nil t) | ||
| 2020 | (point)))) | 2276 | (point)))) |
| 2021 | (end-of-line 0)))) | 2277 | (end-of-line 0)))) |
| 2022 | 2278 | ||
| 2023 | (defun org-clocktable-add-file (file table) | 2279 | (defun org-clock-get-table-data (file params) |
| 2024 | (if table | 2280 | "Get the clocktable data for file FILE, with parameters PARAMS. |
| 2025 | (let ((lines (org-split-string table "\n")) | 2281 | FILE is only for identification - this function assumes that |
| 2026 | (ff (file-name-nondirectory file))) | 2282 | the correct buffer is current, and that the wanted restriction is |
| 2027 | (mapconcat 'identity | 2283 | in place. |
| 2028 | (mapcar (lambda (x) | 2284 | The return value will be a list with the file name and the total |
| 2029 | (if (string-match org-table-dataline-regexp x) | 2285 | file time (in minutes) as 1st and 2nd elements. The third element |
| 2030 | (concat "|" ff x) | 2286 | of this list will be a list of headline entries. Each entry has the |
| 2031 | x)) | 2287 | following structure: |
| 2032 | lines) | 2288 | |
| 2033 | "\n")))) | 2289 | (LEVEL HEADLINE TIMESTAMP TIME) |
| 2290 | |||
| 2291 | LEVEL: The level of the headline, as an integer. This will be | ||
| 2292 | the reduced leve, so 1,2,3,... even if only odd levels | ||
| 2293 | are being used. | ||
| 2294 | HEADLINE: The text of the headline. Depending on PARAMS, this may | ||
| 2295 | already be formatted like a link. | ||
| 2296 | TIMESTAMP: If PARAMS require it, this will be a time stamp found in the | ||
| 2297 | entry, any of SCHEDULED, DEADLINE, NORMAL, or first inactive, | ||
| 2298 | in this sequence. | ||
| 2299 | TIME: The sum of all time spend in this tree, in minutes. This time | ||
| 2300 | will of cause be restricted to the time block and tags match | ||
| 2301 | specified in PARAMS." | ||
| 2302 | (let* ((maxlevel (or (plist-get params :maxlevel) 3)) | ||
| 2303 | (timestamp (plist-get params :timestamp)) | ||
| 2304 | (ts (plist-get params :tstart)) | ||
| 2305 | (te (plist-get params :tend)) | ||
| 2306 | (block (plist-get params :block)) | ||
| 2307 | (link (plist-get params :link)) | ||
| 2308 | (tags (plist-get params :tags)) | ||
| 2309 | (matcher (if tags (cdr (org-make-tags-matcher tags)))) | ||
| 2310 | cc range-text st p time level hdl props tsp tbl) | ||
| 2311 | |||
| 2312 | (setq org-clock-file-total-minutes nil) | ||
| 2313 | (when block | ||
| 2314 | (setq cc (org-clock-special-range block nil t) | ||
| 2315 | ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) | ||
| 2316 | (when (integerp ts) (setq ts (calendar-gregorian-from-absolute ts))) | ||
| 2317 | (when (integerp te) (setq te (calendar-gregorian-from-absolute te))) | ||
| 2318 | (when (and ts (listp ts)) | ||
| 2319 | (setq ts (format "%4d-%02d-%02d" (nth 2 ts) (car ts) (nth 1 ts)))) | ||
| 2320 | (when (and te (listp te)) | ||
| 2321 | (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te)))) | ||
| 2322 | ;; Now the times are strings we can parse. | ||
| 2323 | (if ts (setq ts (org-float-time | ||
| 2324 | (apply 'encode-time (org-parse-time-string ts))))) | ||
| 2325 | (if te (setq te (org-float-time | ||
| 2326 | (apply 'encode-time (org-parse-time-string te))))) | ||
| 2327 | (save-excursion | ||
| 2328 | (org-clock-sum ts te | ||
| 2329 | (unless (null matcher) | ||
| 2330 | (lambda () | ||
| 2331 | (let ((tags-list (org-get-tags-at))) | ||
| 2332 | (eval matcher))))) | ||
| 2333 | (goto-char (point-min)) | ||
| 2334 | (setq st t) | ||
| 2335 | (while (or (and (bobp) (prog1 st (setq st nil)) | ||
| 2336 | (get-text-property (point) :org-clock-minutes) | ||
| 2337 | (setq p (point-min))) | ||
| 2338 | (setq p (next-single-property-change | ||
| 2339 | (point) :org-clock-minutes))) | ||
| 2340 | (goto-char p) | ||
| 2341 | (when (setq time (get-text-property p :org-clock-minutes)) | ||
| 2342 | (save-excursion | ||
| 2343 | (beginning-of-line 1) | ||
| 2344 | (when (and (looking-at (org-re "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[[:alnum:]_@#%:]+:\\)?[ \t]*$")) | ||
| 2345 | (setq level (org-reduced-level | ||
| 2346 | (- (match-end 1) (match-beginning 1)))) | ||
| 2347 | (<= level maxlevel)) | ||
| 2348 | (setq hdl (if (not link) | ||
| 2349 | (match-string 2) | ||
| 2350 | (org-make-link-string | ||
| 2351 | (format "file:%s::%s" | ||
| 2352 | (buffer-file-name) | ||
| 2353 | (save-match-data | ||
| 2354 | (org-make-org-heading-search-string | ||
| 2355 | (match-string 2)))) | ||
| 2356 | (match-string 2))) | ||
| 2357 | tsp (when timestamp | ||
| 2358 | (setq props (org-entry-properties (point))) | ||
| 2359 | (or (cdr (assoc "SCHEDULED" props)) | ||
| 2360 | (cdr (assoc "DEADLINE" props)) | ||
| 2361 | (cdr (assoc "TIMESTAMP" props)) | ||
| 2362 | (cdr (assoc "TIMESTAMP_IA" props))))) | ||
| 2363 | (when (> time 0) (push (list level hdl tsp time) tbl)))))) | ||
| 2364 | (setq tbl (nreverse tbl)) | ||
| 2365 | (list file org-clock-file-total-minutes tbl)))) | ||
| 2034 | 2366 | ||
| 2035 | (defun org-clock-time% (total &rest strings) | 2367 | (defun org-clock-time% (total &rest strings) |
| 2036 | "Compute a time fraction in percent. | 2368 | "Compute a time fraction in percent. |
| @@ -2051,7 +2383,8 @@ This function is made for clock tables." | |||
| 2051 | (if (string-match "\\([0-9]+\\):\\([0-9]+\\)" s) | 2383 | (if (string-match "\\([0-9]+\\):\\([0-9]+\\)" s) |
| 2052 | (throw 'exit | 2384 | (throw 'exit |
| 2053 | (/ (* 100.0 (+ (string-to-number (match-string 2 s)) | 2385 | (/ (* 100.0 (+ (string-to-number (match-string 2 s)) |
| 2054 | (* 60 (string-to-number (match-string 1 s))))) | 2386 | (* 60 (string-to-number |
| 2387 | (match-string 1 s))))) | ||
| 2055 | tot)))) | 2388 | tot)))) |
| 2056 | 0)))) | 2389 | 0)))) |
| 2057 | 2390 | ||
| @@ -2081,7 +2414,8 @@ The details of what will be saved are regulated by the variable | |||
| 2081 | (buffer-file-name b) | 2414 | (buffer-file-name b) |
| 2082 | (or (not org-clock-persist-query-save) | 2415 | (or (not org-clock-persist-query-save) |
| 2083 | (y-or-n-p (concat "Save current clock (" | 2416 | (y-or-n-p (concat "Save current clock (" |
| 2084 | (substring-no-properties org-clock-heading) | 2417 | (substring-no-properties |
| 2418 | org-clock-heading) | ||
| 2085 | ") ")))) | 2419 | ") ")))) |
| 2086 | (insert "(setq resume-clock '(\"" | 2420 | (insert "(setq resume-clock '(\"" |
| 2087 | (buffer-file-name (org-clocking-buffer)) | 2421 | (buffer-file-name (org-clocking-buffer)) |
| @@ -2162,3 +2496,4 @@ The details of what will be saved are regulated by the variable | |||
| 2162 | ;; arch-tag: 7b42c5d4-9b36-48be-97c0-66a869daed4c | 2496 | ;; arch-tag: 7b42c5d4-9b36-48be-97c0-66a869daed4c |
| 2163 | 2497 | ||
| 2164 | ;;; org-clock.el ends here | 2498 | ;;; org-clock.el ends here |
| 2499 | |||
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 15dc7b37a62..c4f18c7c640 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 324464803f2..452a261fd1b 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -372,15 +372,15 @@ TIME defaults to the current time." | |||
| 372 | (time-to-seconds (or time (current-time))) | 372 | (time-to-seconds (or time (current-time))) |
| 373 | (float-time time))) | 373 | (float-time time))) |
| 374 | 374 | ||
| 375 | (defun org-string-match-p (&rest args) | 375 | (if (fboundp 'string-match-p) |
| 376 | (if (fboundp 'string-match-p) | 376 | (defalias 'org-string-match-p 'string-match-p) |
| 377 | (apply 'string-match-p args) | 377 | (defun org-string-match-p (regexp string &optional start) |
| 378 | (save-match-data | 378 | (save-match-data |
| 379 | (apply 'string-match args)))) | 379 | (funcall 'string-match regexp string start)))) |
| 380 | 380 | ||
| 381 | (defun org-looking-at-p (&rest args) | 381 | (if (fboundp 'looking-at-p) |
| 382 | (if (fboundp 'looking-at-p) | 382 | (defalias 'org-looking-at-p 'looking-at-p) |
| 383 | (apply 'looking-at-p args) | 383 | (defun org-looking-at-p (&rest args) |
| 384 | (save-match-data | 384 | (save-match-data |
| 385 | (apply 'looking-at args)))) | 385 | (apply 'looking-at args)))) |
| 386 | 386 | ||
| @@ -418,6 +418,12 @@ LIMIT." | |||
| 418 | (looking-at (concat "\\(?:" regexp "\\)\\'"))))) | 418 | (looking-at (concat "\\(?:" regexp "\\)\\'"))))) |
| 419 | (not (null pos))))) | 419 | (not (null pos))))) |
| 420 | 420 | ||
| 421 | (defun org-floor* (x &optional y) | ||
| 422 | "Return a list of the floor of X and the fractional part of X. | ||
| 423 | With two arguments, return floor and remainder of their quotient." | ||
| 424 | (let ((q (floor x y))) | ||
| 425 | (list q (- x (if y (* y q) q))))) | ||
| 426 | |||
| 421 | (provide 'org-compat) | 427 | (provide 'org-compat) |
| 422 | 428 | ||
| 423 | ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe | 429 | ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe |
diff --git a/lisp/org/org-complete.el b/lisp/org/org-complete.el new file mode 100644 index 00000000000..2eb1f4c3ff5 --- /dev/null +++ b/lisp/org/org-complete.el | |||
| @@ -0,0 +1,279 @@ | |||
| 1 | ;;; org-complete.el --- In-buffer completion code | ||
| 2 | |||
| 3 | ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 | ||
| 4 | ;; Free Software Foundation, Inc. | ||
| 5 | ;; | ||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | ||
| 7 | ;; John Wiegley <johnw at gnu dot org> | ||
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | ||
| 9 | ;; Homepage: http://orgmode.org | ||
| 10 | ;; Version: 7.4 | ||
| 11 | ;; | ||
| 12 | ;; This file is part of GNU Emacs. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 15 | ;; it under the terms of the GNU General Public License as published by | ||
| 16 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 17 | ;; (at your option) any later version. | ||
| 18 | |||
| 19 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 20 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 21 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 22 | ;; GNU General Public License for more details. | ||
| 23 | |||
| 24 | ;; You should have received a copy of the GNU General Public License | ||
| 25 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 27 | ;; | ||
| 28 | ;;; Code: | ||
| 29 | |||
| 30 | ;;;; Require other packages | ||
| 31 | |||
| 32 | (eval-when-compile | ||
| 33 | (require 'cl)) | ||
| 34 | |||
| 35 | (require 'org-macs) | ||
| 36 | (require 'pcomplete) | ||
| 37 | |||
| 38 | (declare-function org-split-string "org" (string &optional separators)) | ||
| 39 | (declare-function org-get-current-options "org-exp" ()) | ||
| 40 | (declare-function org-make-org-heading-search-string "org" | ||
| 41 | (&optional string heading)) | ||
| 42 | (declare-function org-get-buffer-tags "org" ()) | ||
| 43 | (declare-function org-get-tags "org" ()) | ||
| 44 | (declare-function org-buffer-property-keys "org" | ||
| 45 | (&optional include-specials include-defaults include-columns)) | ||
| 46 | (declare-function org-entry-properties "org" (&optional pom which specific)) | ||
| 47 | |||
| 48 | ;;;; Customization variables | ||
| 49 | |||
| 50 | (defgroup org-complete nil | ||
| 51 | "Outline-based notes management and organizer." | ||
| 52 | :tag "Org" | ||
| 53 | :group 'org) | ||
| 54 | |||
| 55 | (defun org-thing-at-point () | ||
| 56 | "Examine the thing at point and let the caller know what it is. | ||
| 57 | The return value is a string naming the thing at point." | ||
| 58 | (let ((beg1 (save-excursion | ||
| 59 | (skip-chars-backward (org-re "[:alnum:]_@")) | ||
| 60 | (point))) | ||
| 61 | (beg (save-excursion | ||
| 62 | (skip-chars-backward "a-zA-Z0-9_:$") | ||
| 63 | (point))) | ||
| 64 | (line-to-here (buffer-substring (point-at-bol) (point)))) | ||
| 65 | (cond | ||
| 66 | ((string-match "\\`[ \t]*#\\+begin: clocktable[ \t]+" line-to-here) | ||
| 67 | (cons "block-option" "clocktable")) | ||
| 68 | ((string-match "\\`[ \t]*#\\+begin_src[ \t]+" line-to-here) | ||
| 69 | (cons "block-option" "src")) | ||
| 70 | ((save-excursion | ||
| 71 | (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" | ||
| 72 | (line-beginning-position) t)) | ||
| 73 | (cons "file-option" (match-string-no-properties 1))) | ||
| 74 | ((string-match "\\`[ \t]*#\\+[a-zA-Z]*\\'" line-to-here) | ||
| 75 | (cons "file-option" nil)) | ||
| 76 | ((equal (char-before beg) ?\[) | ||
| 77 | (cons "link" nil)) | ||
| 78 | ((equal (char-before beg) ?\\) | ||
| 79 | (cons "tex" nil)) | ||
| 80 | ((string-match "\\`\\*+[ \t]+\\'" | ||
| 81 | (buffer-substring (point-at-bol) beg)) | ||
| 82 | (cons "todo" nil)) | ||
| 83 | ((equal (char-before beg) ?*) | ||
| 84 | (cons "searchhead" nil)) | ||
| 85 | ((and (equal (char-before beg1) ?:) | ||
| 86 | (equal (char-after (point-at-bol)) ?*)) | ||
| 87 | (cons "tag" nil)) | ||
| 88 | ((and (equal (char-before beg1) ?:) | ||
| 89 | (not (equal (char-after (point-at-bol)) ?*))) | ||
| 90 | (cons "prop" nil)) | ||
| 91 | (t nil)))) | ||
| 92 | |||
| 93 | (defun org-command-at-point () | ||
| 94 | "Return the qualified name of the Org completion entity at point. | ||
| 95 | When completing for #+STARTUP, for example, this function returns | ||
| 96 | \"file-option/startup\"." | ||
| 97 | (let ((thing (org-thing-at-point))) | ||
| 98 | (cond | ||
| 99 | ((string= "file-option" (car thing)) | ||
| 100 | (concat (car thing) "/" (downcase (cdr thing)))) | ||
| 101 | ((string= "block-option" (car thing)) | ||
| 102 | (concat (car thing) "/" (downcase (cdr thing)))) | ||
| 103 | (t | ||
| 104 | (car thing))))) | ||
| 105 | |||
| 106 | (defun org-parse-arguments () | ||
| 107 | "Parse whitespace separated arguments in the current region." | ||
| 108 | (let ((begin (line-beginning-position)) | ||
| 109 | (end (line-end-position)) | ||
| 110 | begins args) | ||
| 111 | (save-restriction | ||
| 112 | (narrow-to-region begin end) | ||
| 113 | (save-excursion | ||
| 114 | (goto-char (point-min)) | ||
| 115 | (while (not (eobp)) | ||
| 116 | (skip-chars-forward " \t\n[") | ||
| 117 | (setq begins (cons (point) begins)) | ||
| 118 | (skip-chars-forward "^ \t\n[") | ||
| 119 | (setq args (cons (buffer-substring-no-properties | ||
| 120 | (car begins) (point)) | ||
| 121 | args))) | ||
| 122 | (cons (reverse args) (reverse begins)))))) | ||
| 123 | |||
| 124 | |||
| 125 | (defun org-complete-initial () | ||
| 126 | "Calls the right completion function for first argument completions." | ||
| 127 | (ignore | ||
| 128 | (funcall (or (pcomplete-find-completion-function | ||
| 129 | (car (org-thing-at-point))) | ||
| 130 | pcomplete-default-completion-function)))) | ||
| 131 | |||
| 132 | (defvar org-additional-option-like-keywords) | ||
| 133 | (defun pcomplete/org-mode/file-option () | ||
| 134 | "Complete against all valid file options." | ||
| 135 | (require 'org-exp) | ||
| 136 | (pcomplete-here | ||
| 137 | (org-complete-case-double | ||
| 138 | (mapcar (lambda (x) | ||
| 139 | (if (= ?: (aref x (1- (length x)))) | ||
| 140 | (concat x " ") | ||
| 141 | x)) | ||
| 142 | (delq nil | ||
| 143 | (pcomplete-uniqify-list | ||
| 144 | (append | ||
| 145 | (mapcar (lambda (x) | ||
| 146 | (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) | ||
| 147 | (match-string 1 x))) | ||
| 148 | (org-split-string (org-get-current-options) "\n")) | ||
| 149 | org-additional-option-like-keywords))))) | ||
| 150 | (substring pcomplete-stub 2))) | ||
| 151 | |||
| 152 | (defvar org-startup-options) | ||
| 153 | (defun pcomplete/org-mode/file-option/startup () | ||
| 154 | "Complete arguments for the #+STARTUP file option." | ||
| 155 | (while (pcomplete-here | ||
| 156 | (let ((opts (pcomplete-uniqify-list | ||
| 157 | (mapcar 'car org-startup-options)))) | ||
| 158 | ;; Some options are mutually exclusive, and shouldn't be completed | ||
| 159 | ;; against if certain other options have already been seen. | ||
| 160 | (dolist (arg pcomplete-args) | ||
| 161 | (cond | ||
| 162 | ((string= arg "hidestars") | ||
| 163 | (setq opts (delete "showstars" opts))))) | ||
| 164 | opts)))) | ||
| 165 | |||
| 166 | (defun pcomplete/org-mode/file-option/bind () | ||
| 167 | "Complete arguments for the #+BIND file option, which are variable names" | ||
| 168 | (let (vars) | ||
| 169 | (mapatoms | ||
| 170 | (lambda (a) (if (boundp a) (setq vars (cons (symbol-name a) vars))))) | ||
| 171 | (pcomplete-here vars))) | ||
| 172 | |||
| 173 | (defvar org-link-abbrev-alist-local) | ||
| 174 | (defvar org-link-abbrev-alist) | ||
| 175 | (defun pcomplete/org-mode/link () | ||
| 176 | "Complete against defined #+LINK patterns." | ||
| 177 | (pcomplete-here | ||
| 178 | (pcomplete-uniqify-list (append (mapcar 'car org-link-abbrev-alist-local) | ||
| 179 | (mapcar 'car org-link-abbrev-alist))))) | ||
| 180 | |||
| 181 | (defvar org-entities) | ||
| 182 | (defun pcomplete/org-mode/tex () | ||
| 183 | "Complete against TeX-style HTML entity names." | ||
| 184 | (require 'org-entities) | ||
| 185 | (while (pcomplete-here | ||
| 186 | (pcomplete-uniqify-list (remove nil (mapcar 'car-safe org-entities))) | ||
| 187 | (substring pcomplete-stub 1)))) | ||
| 188 | |||
| 189 | (defvar org-todo-keywords-1) | ||
| 190 | (defun pcomplete/org-mode/todo () | ||
| 191 | "Complete against known TODO keywords." | ||
| 192 | (pcomplete-here (pcomplete-uniqify-list org-todo-keywords-1))) | ||
| 193 | |||
| 194 | (defvar org-todo-line-regexp) | ||
| 195 | (defun pcomplete/org-mode/searchhead () | ||
| 196 | "Complete against all headings. | ||
| 197 | This needs more work, to handle headings with lots of spaces in them." | ||
| 198 | (while | ||
| 199 | (pcomplete-here | ||
| 200 | (save-excursion | ||
| 201 | (goto-char (point-min)) | ||
| 202 | (let (tbl) | ||
| 203 | (while (re-search-forward org-todo-line-regexp nil t) | ||
| 204 | (push (org-make-org-heading-search-string | ||
| 205 | (match-string-no-properties 3) t) | ||
| 206 | tbl)) | ||
| 207 | (pcomplete-uniqify-list tbl))) | ||
| 208 | (substring pcomplete-stub 1)))) | ||
| 209 | |||
| 210 | (defvar org-tag-alist) | ||
| 211 | (defun pcomplete/org-mode/tag () | ||
| 212 | "Complete a tag name. Omit tags already set." | ||
| 213 | (while (pcomplete-here | ||
| 214 | (mapcar (lambda (x) | ||
| 215 | (concat x ":")) | ||
| 216 | (let ((lst (pcomplete-uniqify-list | ||
| 217 | (or (remove | ||
| 218 | nil | ||
| 219 | (mapcar (lambda (x) | ||
| 220 | (and (stringp (car x)) (car x))) | ||
| 221 | org-tag-alist)) | ||
| 222 | (mapcar 'car (org-get-buffer-tags)))))) | ||
| 223 | (dolist (tag (org-get-tags)) | ||
| 224 | (setq lst (delete tag lst))) | ||
| 225 | lst)) | ||
| 226 | (and (string-match ".*:" pcomplete-stub) | ||
| 227 | (substring pcomplete-stub (match-end 0)))))) | ||
| 228 | |||
| 229 | (defun pcomplete/org-mode/prop () | ||
| 230 | "Complete a property name. Omit properties already set." | ||
| 231 | (pcomplete-here | ||
| 232 | (mapcar (lambda (x) | ||
| 233 | (concat x ": ")) | ||
| 234 | (let ((lst (pcomplete-uniqify-list | ||
| 235 | (org-buffer-property-keys nil t t)))) | ||
| 236 | (dolist (prop (org-entry-properties)) | ||
| 237 | (setq lst (delete (car prop) lst))) | ||
| 238 | lst)) | ||
| 239 | (substring pcomplete-stub 1))) | ||
| 240 | |||
| 241 | (defun pcomplete/org-mode/block-option/src () | ||
| 242 | "Complete the arguments of a begin_src block. | ||
| 243 | Complete a language in the first field, the header arguments and switches." | ||
| 244 | (pcomplete-here | ||
| 245 | (mapcar | ||
| 246 | (lambda(x) (symbol-name (nth 3 x))) | ||
| 247 | (cdr (car (cdr (memq :key-type (plist-get | ||
| 248 | (symbol-plist | ||
| 249 | 'org-babel-load-languages) | ||
| 250 | 'custom-type))))))) | ||
| 251 | (while (pcomplete-here | ||
| 252 | '("-n" "-r" "-l" | ||
| 253 | ":cache" ":colnames" ":comments" ":dir" ":eval" ":exports" | ||
| 254 | ":file" ":hlines" ":no-expand" ":noweb" ":results" ":rownames" | ||
| 255 | ":session" ":shebang" ":tangle" ":var")))) | ||
| 256 | |||
| 257 | (defun pcomplete/org-mode/block-option/clocktable () | ||
| 258 | "Complete keywords in a clocktable line" | ||
| 259 | (while (pcomplete-here '(":maxlevel" ":scope" | ||
| 260 | ":tstart" ":tend" ":block" ":step" | ||
| 261 | ":stepskip0" ":fileskip0" | ||
| 262 | ":emphasize" ":link" ":narrow" ":indent" | ||
| 263 | ":tcolumns" ":level" ":compact" ":timestamp" | ||
| 264 | ":formula" ":formatter")))) | ||
| 265 | |||
| 266 | (defun org-complete-case-double (list) | ||
| 267 | "Return list with both upcase and downcase version of all strings in LIST." | ||
| 268 | (let (e res) | ||
| 269 | (while (setq e (pop list)) | ||
| 270 | (setq res (cons (downcase e) (cons (upcase e) res)))) | ||
| 271 | (nreverse res))) | ||
| 272 | |||
| 273 | ;;;; Finish up | ||
| 274 | |||
| 275 | (provide 'org-complete) | ||
| 276 | |||
| 277 | ;; arch-tag: | ||
| 278 | |||
| 279 | ;;; org-complete.el ends here | ||
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index 693f3ac6a87..1d761049bbb 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-crypt.el | 6 | ;; Filename: org-crypt.el |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; Keywords: org-mode | 8 | ;; Keywords: org-mode |
| 9 | ;; Author: John Wiegley <johnw@gnu.org> | 9 | ;; Author: John Wiegley <johnw@gnu.org> |
| 10 | ;; Maintainer: Peter Jones <pjones@pmade.com> | 10 | ;; Maintainer: Peter Jones <pjones@pmade.com> |
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 71e1b1b6a7e..f2c631afe24 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Paul Sexton <eeeickythump@gmail.com> | 5 | ;; Author: Paul Sexton <eeeickythump@gmail.com> |
| 6 | ;; Version: 7.3 | 6 | ;; Version: 7.4 |
| 7 | 7 | ||
| 8 | ;; Keywords: org, wp | 8 | ;; Keywords: org, wp |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index 286cdc9a1ae..8014f8f1f93 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index 7d90ec32fbe..91ebb971967 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-docbook.el | 6 | ;; Filename: org-docbook.el |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com> | 8 | ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com> |
| 9 | ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com> | 9 | ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com> |
| 10 | ;; Keywords: org, wp, docbook | 10 | ;; Keywords: org, wp, docbook |
diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 0c77b690765..cb0f24139a2 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Jan Böcker <jan.boecker at jboecker dot de> | 5 | ;; Author: Jan Böcker <jan.boecker at jboecker dot de> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 5ce5fd7531c..1c99b9eb5a5 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Ulf Stegemann <ulf at zeitform dot de> | 6 | ;; Ulf Stegemann <ulf at zeitform dot de> |
| 7 | ;; Keywords: outlines, calendar, wp | 7 | ;; Keywords: outlines, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el index 3751e68e057..57087e1dfc7 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Eric Schulte | 6 | ;; Author: Eric Schulte |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
| @@ -201,9 +201,6 @@ which defaults to the value of `org-export-blocks-witheld'." | |||
| 201 | (interblock start (point-max)) | 201 | (interblock start (point-max)) |
| 202 | (run-hooks 'org-export-blocks-postblock-hook))))) | 202 | (run-hooks 'org-export-blocks-postblock-hook))))) |
| 203 | 203 | ||
| 204 | (add-hook 'org-export-preprocess-after-include-files-hook | ||
| 205 | 'org-export-blocks-preprocess) | ||
| 206 | |||
| 207 | ;;================================================================================ | 204 | ;;================================================================================ |
| 208 | ;; type specific functions | 205 | ;; type specific functions |
| 209 | 206 | ||
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 73e0951334d..d45ef9cdd74 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -984,7 +984,7 @@ value of `org-export-run-in-background'." | |||
| 984 | (set-process-sentinel p 'org-export-process-sentinel) | 984 | (set-process-sentinel p 'org-export-process-sentinel) |
| 985 | (message "Background process \"%s\": started" p)) | 985 | (message "Background process \"%s\": started" p)) |
| 986 | ;; background processing not requested, or not possible | 986 | ;; background processing not requested, or not possible |
| 987 | (if subtree-p (progn (outline-mark-subtree) (activate-mark))) | 987 | (if subtree-p (progn (org-mark-subtree) (activate-mark))) |
| 988 | (call-interactively (nth 1 ass)) | 988 | (call-interactively (nth 1 ass)) |
| 989 | (when (and bpos (get-buffer-window cbuf)) | 989 | (when (and bpos (get-buffer-window cbuf)) |
| 990 | (let ((cw (selected-window))) | 990 | (let ((cw (selected-window))) |
| @@ -1080,12 +1080,18 @@ on this string to produce the exported version." | |||
| 1080 | ;; Mark end of lists | 1080 | ;; Mark end of lists |
| 1081 | (org-export-mark-list-ending backend) | 1081 | (org-export-mark-list-ending backend) |
| 1082 | 1082 | ||
| 1083 | ;; Export code blocks | ||
| 1084 | (org-export-blocks-preprocess) | ||
| 1085 | |||
| 1083 | ;; Handle source code snippets | 1086 | ;; Handle source code snippets |
| 1084 | (org-export-replace-src-segments-and-examples backend) | 1087 | (org-export-replace-src-segments-and-examples backend) |
| 1085 | 1088 | ||
| 1086 | ;; Protect short examples marked by a leading colon | 1089 | ;; Protect short examples marked by a leading colon |
| 1087 | (org-export-protect-colon-examples) | 1090 | (org-export-protect-colon-examples) |
| 1088 | 1091 | ||
| 1092 | ;; Protected spaces | ||
| 1093 | (org-export-convert-protected-spaces backend) | ||
| 1094 | |||
| 1089 | ;; Normalize footnotes | 1095 | ;; Normalize footnotes |
| 1090 | (when (plist-get parameters :footnotes) | 1096 | (when (plist-get parameters :footnotes) |
| 1091 | (org-footnote-normalize nil t)) | 1097 | (org-footnote-normalize nil t)) |
| @@ -1536,6 +1542,26 @@ from the buffer." | |||
| 1536 | (add-text-properties (point) (org-end-of-subtree t) | 1542 | (add-text-properties (point) (org-end-of-subtree t) |
| 1537 | '(org-protected t))))) | 1543 | '(org-protected t))))) |
| 1538 | 1544 | ||
| 1545 | (defun org-export-convert-protected-spaces (backend) | ||
| 1546 | "Convert strings like \\____ to protected spaces in all backends." | ||
| 1547 | (goto-char (point-min)) | ||
| 1548 | (while (re-search-forward "\\\\__+" nil t) | ||
| 1549 | (org-if-unprotected-1 | ||
| 1550 | (replace-match | ||
| 1551 | (org-add-props | ||
| 1552 | (cond | ||
| 1553 | ((eq backend 'latex) | ||
| 1554 | (format "\\hspace{%dex}" (- (match-end 0) (match-beginning 0)))) | ||
| 1555 | ((eq backend 'html) | ||
| 1556 | (org-add-props (match-string 0) nil | ||
| 1557 | 'org-whitespace (- (match-end 0) (match-beginning 0)))) | ||
| 1558 | ;; ((eq backend 'docbook)) | ||
| 1559 | ((eq backend 'ascii) | ||
| 1560 | (org-add-props (match-string 0) '(org-whitespace t))) | ||
| 1561 | (t (make-string (- (match-end 0) (match-beginning 0)) ?\ ))) | ||
| 1562 | '(org-protected t)) | ||
| 1563 | t t)))) | ||
| 1564 | |||
| 1539 | (defun org-export-protect-verbatim () | 1565 | (defun org-export-protect-verbatim () |
| 1540 | "Mark verbatim snippets with the protection property." | 1566 | "Mark verbatim snippets with the protection property." |
| 1541 | (goto-char (point-min)) | 1567 | (goto-char (point-min)) |
| @@ -2100,12 +2126,13 @@ TYPE must be a string, any of: | |||
| 2100 | (defun org-export-handle-include-files () | 2126 | (defun org-export-handle-include-files () |
| 2101 | "Include the contents of include files, with proper formatting." | 2127 | "Include the contents of include files, with proper formatting." |
| 2102 | (let ((case-fold-search t) | 2128 | (let ((case-fold-search t) |
| 2103 | params file markup lang start end prefix prefix1 switches all) | 2129 | params file markup lang start end prefix prefix1 switches all minlevel) |
| 2104 | (goto-char (point-min)) | 2130 | (goto-char (point-min)) |
| 2105 | (while (re-search-forward "^#\\+INCLUDE:?[ \t]+\\(.*\\)" nil t) | 2131 | (while (re-search-forward "^#\\+INCLUDE:?[ \t]+\\(.*\\)" nil t) |
| 2106 | (setq params (read (concat "(" (match-string 1) ")")) | 2132 | (setq params (read (concat "(" (match-string 1) ")")) |
| 2107 | prefix (org-get-and-remove-property 'params :prefix) | 2133 | prefix (org-get-and-remove-property 'params :prefix) |
| 2108 | prefix1 (org-get-and-remove-property 'params :prefix1) | 2134 | prefix1 (org-get-and-remove-property 'params :prefix1) |
| 2135 | minlevel (org-get-and-remove-property 'params :minlevel) | ||
| 2109 | file (org-symname-or-string (pop params)) | 2136 | file (org-symname-or-string (pop params)) |
| 2110 | markup (org-symname-or-string (pop params)) | 2137 | markup (org-symname-or-string (pop params)) |
| 2111 | lang (and (member markup '("src" "SRC")) | 2138 | lang (and (member markup '("src" "SRC")) |
| @@ -2128,7 +2155,7 @@ TYPE must be a string, any of: | |||
| 2128 | end (format "#+end_%s" markup)))) | 2155 | end (format "#+end_%s" markup)))) |
| 2129 | (insert (or start "")) | 2156 | (insert (or start "")) |
| 2130 | (insert (org-get-file-contents (expand-file-name file) | 2157 | (insert (org-get-file-contents (expand-file-name file) |
| 2131 | prefix prefix1 markup)) | 2158 | prefix prefix1 markup minlevel)) |
| 2132 | (or (bolp) (newline)) | 2159 | (or (bolp) (newline)) |
| 2133 | (insert (or end "")))) | 2160 | (insert (or end "")))) |
| 2134 | all)) | 2161 | all)) |
| @@ -2145,7 +2172,7 @@ TYPE must be a string, any of: | |||
| 2145 | (when intersection | 2172 | (when intersection |
| 2146 | (error "Recursive #+INCLUDE: %S" intersection)))))) | 2173 | (error "Recursive #+INCLUDE: %S" intersection)))))) |
| 2147 | 2174 | ||
| 2148 | (defun org-get-file-contents (file &optional prefix prefix1 markup) | 2175 | (defun org-get-file-contents (file &optional prefix prefix1 markup minlevel) |
| 2149 | "Get the contents of FILE and return them as a string. | 2176 | "Get the contents of FILE and return them as a string. |
| 2150 | If PREFIX is a string, prepend it to each line. If PREFIX1 | 2177 | If PREFIX is a string, prepend it to each line. If PREFIX1 |
| 2151 | is a string, prepend it to the first line instead of PREFIX. | 2178 | is a string, prepend it to the first line instead of PREFIX. |
| @@ -2167,6 +2194,9 @@ take care of the block they are in." | |||
| 2167 | (goto-char (match-beginning 0)) | 2194 | (goto-char (match-beginning 0)) |
| 2168 | (insert ",") | 2195 | (insert ",") |
| 2169 | (end-of-line 1))) | 2196 | (end-of-line 1))) |
| 2197 | (when minlevel | ||
| 2198 | (dotimes (lvl minlevel) | ||
| 2199 | (org-map-region 'org-demote (point-min) (point-max)))) | ||
| 2170 | (buffer-string))) | 2200 | (buffer-string))) |
| 2171 | 2201 | ||
| 2172 | (defun org-get-and-remove-property (listvar prop) | 2202 | (defun org-get-and-remove-property (listvar prop) |
| @@ -2235,8 +2265,6 @@ in the list) and remove property and value from the list in LISTVAR." | |||
| 2235 | (defvar org-export-latex-listings-langs) ;; defined in org-latex.el | 2265 | (defvar org-export-latex-listings-langs) ;; defined in org-latex.el |
| 2236 | (defvar org-export-latex-listings-w-names) ;; defined in org-latex.el | 2266 | (defvar org-export-latex-listings-w-names) ;; defined in org-latex.el |
| 2237 | (defvar org-export-latex-minted-langs) ;; defined in org-latex.el | 2267 | (defvar org-export-latex-minted-langs) ;; defined in org-latex.el |
| 2238 | (defvar org-export-latex-minted-with-line-numbers) ;; defined in org-latex.el | ||
| 2239 | |||
| 2240 | (defun org-export-format-source-code-or-example | 2268 | (defun org-export-format-source-code-or-example |
| 2241 | (backend lang code &optional opts indent caption) | 2269 | (backend lang code &optional opts indent caption) |
| 2242 | "Format CODE from language LANG and return it formatted for export. | 2270 | "Format CODE from language LANG and return it formatted for export. |
| @@ -2403,8 +2431,7 @@ INDENT was the original indentation of the block." | |||
| 2403 | (format "\n%s $\\equiv$ \n" | 2431 | (format "\n%s $\\equiv$ \n" |
| 2404 | (replace-regexp-in-string | 2432 | (replace-regexp-in-string |
| 2405 | "_" "\\\\_" caption))) | 2433 | "_" "\\\\_" caption))) |
| 2406 | (format | 2434 | (format "\\begin{minted}{%s}\n" minted-lang) |
| 2407 | "\\begin{minted}[mathescape,%s\nnumbersep=5pt,\nframe=lines,\nframesep=2mm]{%s}\n" (if org-export-latex-minted-with-line-numbers "\nlinenos," "") minted-lang) | ||
| 2408 | rtn "\\end{minted}\n")))) | 2435 | rtn "\\end{minted}\n")))) |
| 2409 | (t (concat (car org-export-latex-verbatim-wrap) | 2436 | (t (concat (car org-export-latex-verbatim-wrap) |
| 2410 | rtn (cdr org-export-latex-verbatim-wrap)))) | 2437 | rtn (cdr org-export-latex-verbatim-wrap)))) |
| @@ -2585,9 +2612,10 @@ command." | |||
| 2585 | ;; does do the trick. | 2612 | ;; does do the trick. |
| 2586 | (if (looking-at "#[^\r\n]*") | 2613 | (if (looking-at "#[^\r\n]*") |
| 2587 | (append-to-buffer buffer (match-beginning 0) (1+ (match-end 0)))) | 2614 | (append-to-buffer buffer (match-beginning 0) (1+ (match-end 0)))) |
| 2588 | (while (re-search-forward "[\n\r]#[^\n\r]*" nil t) | 2615 | (when (re-search-forward "^\\*+[ \t]+" nil t) |
| 2589 | (append-to-buffer buffer (1+ (match-beginning 0)) | 2616 | (while (re-search-backward "[\n\r]#[^\n\r]*" nil t) |
| 2590 | (min (point-max) (1+ (match-end 0)))))) | 2617 | (append-to-buffer buffer (1+ (match-beginning 0)) |
| 2618 | (min (point-max) (1+ (match-end 0))))))) | ||
| 2591 | (set-buffer buffer) | 2619 | (set-buffer buffer) |
| 2592 | (let ((buffer-file-name file) | 2620 | (let ((buffer-file-name file) |
| 2593 | (org-inhibit-startup t)) | 2621 | (org-inhibit-startup t)) |
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index e4e17f15c5d..3f8245758f7 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -685,6 +685,15 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc." | |||
| 685 | :type 'integer | 685 | :type 'integer |
| 686 | :group 'org-faces) | 686 | :group 'org-faces) |
| 687 | 687 | ||
| 688 | (defcustom org-cycle-level-faces t | ||
| 689 | "Non-nil means level styles cycle after level `org-n-level-faces'. | ||
| 690 | Then so level org-n-level-faces+1 is styled like level 1. | ||
| 691 | If nil, then all levels >=org-n-level-faces are styled like | ||
| 692 | level org-n-level-faces" | ||
| 693 | :group 'org-appearance | ||
| 694 | :group 'org-faces | ||
| 695 | :type 'boolean) | ||
| 696 | |||
| 688 | (defface org-latex-and-export-specials | 697 | (defface org-latex-and-export-specials |
| 689 | (let ((font (cond ((assq :inherit custom-face-attributes) | 698 | (let ((font (cond ((assq :inherit custom-face-attributes) |
| 690 | '(:inherit underline)) | 699 | '(:inherit underline)) |
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 8bda3098e0a..32da49b1cb8 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 2a97b54db6f..88ffd6e4842 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -303,7 +303,7 @@ or new, let the user edit the definition of the footnote." | |||
| 303 | (t | 303 | (t |
| 304 | (setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ \t]*$")) | 304 | (setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ \t]*$")) |
| 305 | (unless (re-search-forward re nil t) | 305 | (unless (re-search-forward re nil t) |
| 306 | (let ((max (if (and (eq major-mode 'message-mode) | 306 | (let ((max (if (and (derived-mode-p 'message-mode) |
| 307 | (re-search-forward message-signature-separator nil t)) | 307 | (re-search-forward message-signature-separator nil t)) |
| 308 | (progn (beginning-of-line) (point)) | 308 | (progn (beginning-of-line) (point)) |
| 309 | (goto-char (point-max))))) | 309 | (goto-char (point-max))))) |
diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index 736cc577ce7..d9486afa0b5 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Lennart Borgman (lennart O borgman A gmail O com) | 5 | ;; Author: Lennart Borgman (lennart O borgman A gmail O com) |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 6d782759a75..fccd3e9ee01 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Tassilo Horn <tassilo at member dot fsf dot org> | 7 | ;; Tassilo Horn <tassilo at member dot fsf dot org> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 7.3 | 10 | ;; Version: 7.4 |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index 394b4fb05db..b174a1f0879 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: John Wiegley <johnw at gnu dot org> | 5 | ;; Author: John Wiegley <johnw at gnu dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -197,10 +197,7 @@ This list represents a \"habit\" for the rest of this module." | |||
| 197 | "Determine the relative priority of a habit. | 197 | "Determine the relative priority of a habit. |
| 198 | This must take into account not just urgency, but consistency as well." | 198 | This must take into account not just urgency, but consistency as well." |
| 199 | (let ((pri 1000) | 199 | (let ((pri 1000) |
| 200 | (now (time-to-days | 200 | (now (if moment (time-to-days moment) (org-today))) |
| 201 | (or moment | ||
| 202 | (time-subtract (current-time) | ||
| 203 | (list 0 (* 3600 org-extend-today-until) 0))))) | ||
| 204 | (scheduled (org-habit-scheduled habit)) | 201 | (scheduled (org-habit-scheduled habit)) |
| 205 | (deadline (org-habit-deadline habit))) | 202 | (deadline (org-habit-deadline habit))) |
| 206 | ;; add 10 for every day past the scheduled date, and subtract for every | 203 | ;; add 10 for every day past the scheduled date, and subtract for every |
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 68fee5b8df5..47e82319873 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -1213,7 +1213,11 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1213 | (throw 'nextline nil)) | 1213 | (throw 'nextline nil)) |
| 1214 | 1214 | ||
| 1215 | ;; Protected HTML | 1215 | ;; Protected HTML |
| 1216 | (when (get-text-property 0 'org-protected line) | 1216 | (when (and (get-text-property 0 'org-protected line) |
| 1217 | ;; Make sure it is the entire line that is protected | ||
| 1218 | (not (< (or (next-single-property-change | ||
| 1219 | 0 'org-protected line) 10000) | ||
| 1220 | (length line)))) | ||
| 1217 | (let (par (ind (get-text-property 0 'original-indentation line))) | 1221 | (let (par (ind (get-text-property 0 'original-indentation line))) |
| 1218 | (when (re-search-backward | 1222 | (when (re-search-backward |
| 1219 | "\\(<p>\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) | 1223 | "\\(<p>\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) |
| @@ -2316,10 +2320,9 @@ When TITLE is nil, just close all open levels." | |||
| 2316 | (extra-class (and title (org-get-text-property-any 0 'html-container-class title))) | 2320 | (extra-class (and title (org-get-text-property-any 0 'html-container-class title))) |
| 2317 | (preferred (and target | 2321 | (preferred (and target |
| 2318 | (cdr (assoc target org-export-preferred-target-alist)))) | 2322 | (cdr (assoc target org-export-preferred-target-alist)))) |
| 2319 | (remove (or preferred target)) | ||
| 2320 | (l org-level-max) | 2323 | (l org-level-max) |
| 2321 | snumber snu href suffix) | 2324 | snumber snu href suffix) |
| 2322 | (setq extra-targets (remove remove extra-targets)) | 2325 | (setq extra-targets (remove (or preferred target) extra-targets)) |
| 2323 | (setq extra-targets | 2326 | (setq extra-targets |
| 2324 | (mapconcat (lambda (x) | 2327 | (mapconcat (lambda (x) |
| 2325 | (if (org-uuidgen-p x) (setq x (concat "ID-" x))) | 2328 | (if (org-uuidgen-p x) (setq x (concat "ID-" x))) |
| @@ -2358,12 +2361,13 @@ When TITLE is nil, just close all open levels." | |||
| 2358 | (progn | 2361 | (progn |
| 2359 | (org-close-li) | 2362 | (org-close-li) |
| 2360 | (if target | 2363 | (if target |
| 2361 | (insert (format "<li id=\"%s\">" target) extra-targets title "<br/>\n") | 2364 | (insert (format "<li id=\"%s\">" (or preferred target)) |
| 2365 | extra-targets title "<br/>\n") | ||
| 2362 | (insert "<li>" title "<br/>\n"))) | 2366 | (insert "<li>" title "<br/>\n"))) |
| 2363 | (aset org-levels-open (1- level) t) | 2367 | (aset org-levels-open (1- level) t) |
| 2364 | (org-close-par-maybe) | 2368 | (org-close-par-maybe) |
| 2365 | (if target | 2369 | (if target |
| 2366 | (insert (format "<ul>\n<li id=\"%s\">" target) | 2370 | (insert (format "<ul>\n<li id=\"%s\">" (or preferred target)) |
| 2367 | extra-targets title "<br/>\n") | 2371 | extra-targets title "<br/>\n") |
| 2368 | (insert "<ul>\n<li>" title "<br/>\n")))) | 2372 | (insert "<ul>\n<li>" title "<br/>\n")))) |
| 2369 | (aset org-levels-open (1- level) t) | 2373 | (aset org-levels-open (1- level) t) |
diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index fe6e97c72dd..d4034fe6d36 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index fcca58831d1..a8004afec8a 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -600,15 +600,18 @@ optional argument MARKERP, return the position as a new marker." | |||
| 600 | (defun org-id-store-link () | 600 | (defun org-id-store-link () |
| 601 | "Store a link to the current entry, using its ID." | 601 | "Store a link to the current entry, using its ID." |
| 602 | (interactive) | 602 | (interactive) |
| 603 | (let* ((link (org-make-link "id:" (org-id-get-create))) | 603 | (when (and (buffer-file-name (buffer-base-buffer)) (org-mode-p)) |
| 604 | (case-fold-search nil) | 604 | (let* ((link (org-make-link "id:" (org-id-get-create))) |
| 605 | (desc (save-excursion | 605 | (case-fold-search nil) |
| 606 | (org-back-to-heading t) | 606 | (desc (save-excursion |
| 607 | (or (and (looking-at org-complex-heading-regexp) | 607 | (org-back-to-heading t) |
| 608 | (if (match-end 4) (match-string 4) (match-string 0))) | 608 | (or (and (looking-at org-complex-heading-regexp) |
| 609 | link)))) | 609 | (if (match-end 4) |
| 610 | (org-store-link-props :link link :description desc :type "id") | 610 | (match-string 4) |
| 611 | link)) | 611 | (match-string 0))) |
| 612 | link)))) | ||
| 613 | (org-store-link-props :link link :description desc :type "id") | ||
| 614 | link))) | ||
| 612 | 615 | ||
| 613 | (defun org-id-open (id) | 616 | (defun org-id-open (id) |
| 614 | "Go to the entry with id ID." | 617 | "Go to the entry with id ID." |
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index 39ba445eb93..a177a6f2a04 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 4 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 5 | ;; Keywords: outlines, hypermedia, calendar, wp | 5 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 6 | ;; Homepage: http://orgmode.org | 6 | ;; Homepage: http://orgmode.org |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; | 8 | ;; |
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
| @@ -38,6 +38,10 @@ | |||
| 38 | (eval-when-compile | 38 | (eval-when-compile |
| 39 | (require 'cl)) | 39 | (require 'cl)) |
| 40 | 40 | ||
| 41 | (defvar org-inlinetask-min-level) | ||
| 42 | (declare-function org-inlinetask-get-task-level "org-inlinetask" ()) | ||
| 43 | (declare-function org-inlinetask-in-task-p "org-inlinetask" ()) | ||
| 44 | |||
| 41 | (defgroup org-indent nil | 45 | (defgroup org-indent nil |
| 42 | "Options concerning dynamic virtual outline indentation." | 46 | "Options concerning dynamic virtual outline indentation." |
| 43 | :tag "Org Indent" | 47 | :tag "Org Indent" |
| @@ -219,35 +223,49 @@ useful to make it ever so slightly different." | |||
| 219 | (defun org-indent-add-properties (beg end) | 223 | (defun org-indent-add-properties (beg end) |
| 220 | "Add indentation properties between BEG and END. | 224 | "Add indentation properties between BEG and END. |
| 221 | Assumes that BEG is at the beginning of a line." | 225 | Assumes that BEG is at the beginning of a line." |
| 222 | (when (or t org-indent-mode) | 226 | (let* ((inhibit-modification-hooks t) |
| 223 | (let ((inhibit-modification-hooks t) | 227 | (inlinetaskp (featurep 'org-inlinetask)) |
| 224 | ov b e n level exit nstars) | 228 | (get-real-level (lambda (pos lvl) |
| 225 | (with-silent-modifications | 229 | (save-excursion |
| 226 | (save-excursion | 230 | (goto-char pos) |
| 227 | (goto-char beg) | 231 | (if (and inlinetaskp (org-inlinetask-in-task-p)) |
| 228 | (while (not exit) | 232 | (org-inlinetask-get-task-level) |
| 229 | (setq e end) | 233 | lvl)))) |
| 230 | (if (not (re-search-forward org-indent-outline-re nil t)) | 234 | (b beg) |
| 231 | (setq e (point-max) exit t) | 235 | (e end) |
| 232 | (setq e (match-beginning 0)) | 236 | (level 0) |
| 233 | (if (>= e end) (setq exit t)) | 237 | (n 0) |
| 234 | (setq level (- (match-end 0) (match-beginning 0) 1)) | 238 | exit nstars) |
| 235 | (setq nstars (- (* (1- level) org-indent-indentation-per-level) | 239 | (with-silent-modifications |
| 236 | (1- level))) | 240 | (save-excursion |
| 237 | (add-text-properties | 241 | (goto-char beg) |
| 238 | (point-at-bol) (point-at-eol) | 242 | (while (not exit) |
| 239 | (list 'line-prefix | 243 | (setq e end) |
| 240 | (aref org-indent-stars nstars) | 244 | (if (not (re-search-forward org-indent-outline-re nil t)) |
| 241 | 'wrap-prefix | 245 | (setq e (point-max) exit t) |
| 242 | (aref org-indent-strings | 246 | (setq e (match-beginning 0)) |
| 243 | (* level org-indent-indentation-per-level))))) | 247 | (if (>= e end) (setq exit t)) |
| 244 | (when (and b (> e b)) | 248 | (unless (and inlinetaskp (org-inlinetask-in-task-p)) |
| 245 | (add-text-properties | 249 | (setq level (- (match-end 0) (match-beginning 0) 1))) |
| 246 | b e (list 'line-prefix (aref org-indent-strings n) | 250 | (setq nstars (* (1- (funcall get-real-level e level)) |
| 247 | 'wrap-prefix (aref org-indent-strings n)))) | 251 | (1- org-indent-indentation-per-level))) |
| 248 | (setq b (1+ (point-at-eol)) | 252 | (add-text-properties |
| 249 | n (* (or level 0) org-indent-indentation-per-level)))))))) | 253 | (point-at-bol) (point-at-eol) |
| 254 | (list 'line-prefix | ||
| 255 | (aref org-indent-stars nstars) | ||
| 256 | 'wrap-prefix | ||
| 257 | (aref org-indent-strings | ||
| 258 | (* (funcall get-real-level e level) | ||
| 259 | org-indent-indentation-per-level))))) | ||
| 260 | (when (> e b) | ||
| 261 | (add-text-properties | ||
| 262 | b e (list 'line-prefix (aref org-indent-strings n) | ||
| 263 | 'wrap-prefix (aref org-indent-strings n)))) | ||
| 264 | (setq b (1+ (point-at-eol)) | ||
| 265 | n (* (funcall get-real-level b level) | ||
| 266 | org-indent-indentation-per-level))))))) | ||
| 250 | 267 | ||
| 268 | (defvar org-inlinetask-min-level) | ||
| 251 | (defun org-indent-refresh-section () | 269 | (defun org-indent-refresh-section () |
| 252 | "Refresh indentation properties in the current outline section. | 270 | "Refresh indentation properties in the current outline section. |
| 253 | Point is assumed to be at the beginning of a headline." | 271 | Point is assumed to be at the beginning of a headline." |
| @@ -255,7 +273,11 @@ Point is assumed to be at the beginning of a headline." | |||
| 255 | (when org-indent-mode | 273 | (when org-indent-mode |
| 256 | (let (beg end) | 274 | (let (beg end) |
| 257 | (save-excursion | 275 | (save-excursion |
| 258 | (when (ignore-errors (org-back-to-heading)) | 276 | (when (ignore-errors (let ((outline-regexp (format "\\*\\{1,%s\\}[ \t]+" |
| 277 | (if (featurep 'org-inlinetask) | ||
| 278 | (1- org-inlinetask-min-level) | ||
| 279 | "")))) | ||
| 280 | (org-back-to-heading))) | ||
| 259 | (setq beg (point)) | 281 | (setq beg (point)) |
| 260 | (setq end (or (save-excursion (or (outline-next-heading) (point))))) | 282 | (setq end (or (save-excursion (or (outline-next-heading) (point))))) |
| 261 | (org-indent-remove-properties beg end) | 283 | (org-indent-remove-properties beg end) |
| @@ -268,7 +290,11 @@ Point is assumed to be at the beginning of a headline." | |||
| 268 | (when org-indent-mode | 290 | (when org-indent-mode |
| 269 | (let ((beg (point)) (end limit)) | 291 | (let ((beg (point)) (end limit)) |
| 270 | (save-excursion | 292 | (save-excursion |
| 271 | (and (ignore-errors (org-back-to-heading t)) | 293 | (and (ignore-errors (let ((outline-regexp (format "\\*\\{1,%s\\}[ \t]+" |
| 294 | (if (featurep 'org-inlinetask) | ||
| 295 | (1- org-inlinetask-min-level) | ||
| 296 | "")))) | ||
| 297 | (org-back-to-heading))) | ||
| 272 | (setq beg (point)))) | 298 | (setq beg (point)))) |
| 273 | (org-indent-remove-properties beg end) | 299 | (org-indent-remove-properties beg end) |
| 274 | (org-indent-add-properties beg end))) | 300 | (org-indent-add-properties beg end))) |
diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 6ea192b1765..250f438ab96 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 29d8c40eed2..3f2d6fbbf06 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -100,6 +100,60 @@ When nil, they will not be exported." | |||
| 100 | :group 'org-inlinetask | 100 | :group 'org-inlinetask |
| 101 | :type 'boolean) | 101 | :type 'boolean) |
| 102 | 102 | ||
| 103 | (defvar org-inlinetask-export-templates | ||
| 104 | '((html "<pre class=\"inlinetask\"><b>%s%s</b><br>%s</pre>" | ||
| 105 | '((unless (eq todo "") | ||
| 106 | (format "<span class=\"%s %s\">%s%s</span> " | ||
| 107 | class todo todo priority)) | ||
| 108 | heading content)) | ||
| 109 | (latex "\\begin\{description\}\\item[%s%s]%s\\end\{description\}" | ||
| 110 | '((unless (eq todo "") (format "\\textsc\{%s%s\} " todo priority)) | ||
| 111 | heading content)) | ||
| 112 | (ascii " -- %s%s%s" | ||
| 113 | '((unless (eq todo "") (format "%s%s " todo priority)) | ||
| 114 | heading | ||
| 115 | (unless (eq content "") | ||
| 116 | (format "\n ¦ %s" | ||
| 117 | (mapconcat 'identity (org-split-string content "\n") | ||
| 118 | "\n ¦ "))))) | ||
| 119 | (docbook "<variablelist> | ||
| 120 | <varlistentry> | ||
| 121 | <term>%s%s</term> | ||
| 122 | <listitem><para>%s</para></listitem> | ||
| 123 | </varlistentry> | ||
| 124 | </variablelist>" | ||
| 125 | '((unless (eq todo "") (format "%s%s " todo priority)) | ||
| 126 | heading content))) | ||
| 127 | "Templates for inline tasks in various exporters. | ||
| 128 | |||
| 129 | This variable is an alist in the shape of (BACKEND STRING OBJECTS). | ||
| 130 | |||
| 131 | BACKEND is the name of the backend for the template (ascii, html...). | ||
| 132 | |||
| 133 | STRING is a format control string. | ||
| 134 | |||
| 135 | OBJECTS is a list of elements to be substituted into the format | ||
| 136 | string. They can be of any type, from a string to a form | ||
| 137 | returning a value (thus allowing conditional insertion). A nil | ||
| 138 | object will be substituted as the empty string. Obviously, there | ||
| 139 | must be at least as many objects as %-sequences in the format | ||
| 140 | string. | ||
| 141 | |||
| 142 | Moreover, the following special keywords are provided: `todo', | ||
| 143 | `priority', `heading', `content', `tags'. If some of them are not | ||
| 144 | defined in an inline task, their value is the empty string. | ||
| 145 | |||
| 146 | As an example, valid associations are: | ||
| 147 | |||
| 148 | (html \"<ul><li>%s <p>%s</p></li></ul>\" (heading content)) | ||
| 149 | |||
| 150 | or, with the additional package \"todonotes\" for LaTeX, | ||
| 151 | |||
| 152 | (latex \"\\todo[inline]{\\textbf{\\textsf{%s %s}}\\linebreak{} %s}\" | ||
| 153 | '((unless (eq todo \"\") | ||
| 154 | (format \"\\textsc{%s%s}\" todo priority)) | ||
| 155 | heading content)))") | ||
| 156 | |||
| 103 | (defvar org-odd-levels-only) | 157 | (defvar org-odd-levels-only) |
| 104 | (defvar org-keyword-time-regexp) | 158 | (defvar org-keyword-time-regexp) |
| 105 | (defvar org-drawer-regexp) | 159 | (defvar org-drawer-regexp) |
| @@ -131,24 +185,56 @@ If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'." | |||
| 131 | (end-of-line -1)) | 185 | (end-of-line -1)) |
| 132 | (define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task) | 186 | (define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task) |
| 133 | 187 | ||
| 188 | (defun org-inlinetask-outline-regexp () | ||
| 189 | "Return string matching an inline task heading. | ||
| 190 | The number of levels is controlled by `org-inlinetask-min-level'." | ||
| 191 | (let ((nstars (if org-odd-levels-only | ||
| 192 | (1- (* org-inlinetask-min-level 2)) | ||
| 193 | org-inlinetask-min-level))) | ||
| 194 | (format "^\\(\\*\\{%d,\\}\\)[ \t]+" nstars))) | ||
| 195 | |||
| 134 | (defun org-inlinetask-in-task-p () | 196 | (defun org-inlinetask-in-task-p () |
| 135 | "Return true if point is inside an inline task." | 197 | "Return true if point is inside an inline task." |
| 136 | (save-excursion | 198 | (save-excursion |
| 137 | (let* ((nstars (if org-odd-levels-only | 199 | (let* ((stars-re (org-inlinetask-outline-regexp)) |
| 138 | (1- (* 2 (or org-inlinetask-min-level 200))) | ||
| 139 | (or org-inlinetask-min-level 200))) | ||
| 140 | (stars-re (concat "^\\(?:\\*\\{" | ||
| 141 | (format "%d" (- nstars 1)) | ||
| 142 | ",\\}\\)[ \t]+")) | ||
| 143 | (task-beg-re (concat stars-re "\\(?:.*\\)")) | 200 | (task-beg-re (concat stars-re "\\(?:.*\\)")) |
| 144 | (task-end-re (concat stars-re "\\(?:END\\|end\\)"))) | 201 | (task-end-re (concat stars-re "\\(?:END\\|end\\)[ \t]*$"))) |
| 145 | (beginning-of-line) | 202 | (beginning-of-line) |
| 146 | (or (looking-at task-beg-re) | 203 | (or (looking-at task-beg-re) |
| 147 | (and (re-search-forward "^\\*+[ \t]+" nil t) | 204 | (and (re-search-forward "^\\*+[ \t]+" nil t) |
| 148 | (progn (beginning-of-line) (looking-at task-end-re))))))) | 205 | (progn (beginning-of-line) (looking-at task-end-re))))))) |
| 149 | 206 | ||
| 150 | (defvar htmlp) ; dynamically scoped into the next function | 207 | (defun org-inlinetask-goto-beginning () |
| 151 | (defvar latexp) ; dynamically scoped into the next function | 208 | "Go to the beginning of the inline task at point." |
| 209 | (end-of-line) | ||
| 210 | (re-search-backward (org-inlinetask-outline-regexp) nil t) | ||
| 211 | (when (org-looking-at-p (concat (org-inlinetask-outline-regexp) "END[ \t]*$")) | ||
| 212 | (re-search-backward (org-inlinetask-outline-regexp) nil t))) | ||
| 213 | |||
| 214 | (defun org-inlinetask-goto-end () | ||
| 215 | "Go to the end of the inline task at point." | ||
| 216 | (beginning-of-line) | ||
| 217 | (cond | ||
| 218 | ((org-looking-at-p (concat (org-inlinetask-outline-regexp) "END[ \t]*$")) | ||
| 219 | (forward-line 1)) | ||
| 220 | ((org-looking-at-p (org-inlinetask-outline-regexp)) | ||
| 221 | (forward-line 1) | ||
| 222 | (when (org-inlinetask-in-task-p) | ||
| 223 | (re-search-forward (org-inlinetask-outline-regexp) nil t) | ||
| 224 | (forward-line 1))) | ||
| 225 | (t | ||
| 226 | (re-search-forward (org-inlinetask-outline-regexp) nil t) | ||
| 227 | (forward-line 1)))) | ||
| 228 | |||
| 229 | (defun org-inlinetask-get-task-level () | ||
| 230 | "Get the level of the inline task around. | ||
| 231 | This assumes the point is inside an inline task." | ||
| 232 | (save-excursion | ||
| 233 | (end-of-line) | ||
| 234 | (re-search-backward (org-inlinetask-outline-regexp) nil t) | ||
| 235 | (- (match-end 1) (match-beginning 1)))) | ||
| 236 | |||
| 237 | (defvar backend) ; dynamically scoped into the next function | ||
| 152 | (defun org-inlinetask-export-handler () | 238 | (defun org-inlinetask-export-handler () |
| 153 | "Handle headlines with level larger or equal to `org-inlinetask-min-level'. | 239 | "Handle headlines with level larger or equal to `org-inlinetask-min-level'. |
| 154 | Either remove headline and meta data, or do special formatting." | 240 | Either remove headline and meta data, or do special formatting." |
| @@ -158,7 +244,7 @@ Either remove headline and meta data, or do special formatting." | |||
| 158 | (or org-inlinetask-min-level 200))) | 244 | (or org-inlinetask-min-level 200))) |
| 159 | (re1 (format "^\\(\\*\\{%d,\\}\\) .*\n" nstars)) | 245 | (re1 (format "^\\(\\*\\{%d,\\}\\) .*\n" nstars)) |
| 160 | (re2 (concat "^[ \t]*" org-keyword-time-regexp)) | 246 | (re2 (concat "^[ \t]*" org-keyword-time-regexp)) |
| 161 | headline beg end stars content indent) | 247 | headline beg end stars content) |
| 162 | (while (re-search-forward re1 nil t) | 248 | (while (re-search-forward re1 nil t) |
| 163 | (setq headline (match-string 0) | 249 | (setq headline (match-string 0) |
| 164 | stars (match-string 1) | 250 | stars (match-string 1) |
| @@ -179,40 +265,34 @@ Either remove headline and meta data, or do special formatting." | |||
| 179 | (delete-region beg (1+ (match-end 0)))) | 265 | (delete-region beg (1+ (match-end 0)))) |
| 180 | (goto-char beg) | 266 | (goto-char beg) |
| 181 | (when org-inlinetask-export | 267 | (when org-inlinetask-export |
| 182 | (when (string-match org-complex-heading-regexp headline) | 268 | ;; content formatting |
| 183 | (setq headline (concat | 269 | (when content |
| 184 | (if (match-end 2) | ||
| 185 | (concat | ||
| 186 | (org-add-props | ||
| 187 | (format | ||
| 188 | "@<span class=\"%s %s\"> %s@</span>" | ||
| 189 | (if (member (match-string 2 headline) | ||
| 190 | org-done-keywords) | ||
| 191 | "done" "todo") | ||
| 192 | (match-string 2 headline) | ||
| 193 | (match-string 2 headline)) | ||
| 194 | nil 'org-protected t) | ||
| 195 | " ") "") | ||
| 196 | (match-string 4 headline))) | ||
| 197 | (when content | ||
| 198 | (if (not (string-match "\\S-" content)) | 270 | (if (not (string-match "\\S-" content)) |
| 199 | (setq content nil) | 271 | (setq content nil) |
| 200 | (if (string-match "[ \t\n]+\\'" content) | 272 | (if (string-match "[ \t\n]+\\'" content) |
| 201 | (setq content (substring content 0 (match-beginning 0)))) | 273 | (setq content (substring content 0 (match-beginning 0)))) |
| 202 | (setq content (org-remove-indentation content)) | 274 | (setq content (org-remove-indentation content)))) |
| 203 | (if latexp (setq content (concat "\\quad \\\\\n" content))))) | 275 | (setq content (or content "")) |
| 204 | (insert (make-string (org-inlinetask-get-current-indentation) ?\ ) | 276 | ;; grab elements to export |
| 205 | "- ") | 277 | (when (string-match org-complex-heading-regexp headline) |
| 206 | (setq indent (make-string (current-column) ?\ )) | 278 | (let* ((todo (or (match-string 2 headline) "")) |
| 207 | (insert headline " ::") | 279 | (class (or (and (eq "" todo) "") |
| 208 | (if content | 280 | (if (member todo org-done-keywords) "done" "todo"))) |
| 209 | (insert (if htmlp " " (concat "\n" indent)) | 281 | (priority (or (match-string 3 headline) "")) |
| 210 | (mapconcat 'identity (org-split-string content "\n") | 282 | (heading (or (match-string 4 headline) "")) |
| 211 | (concat "\n" indent)) "\n") | 283 | (tags (or (match-string 5 headline) "")) |
| 212 | (insert "\n")) | 284 | (backend-spec (assq backend org-inlinetask-export-templates)) |
| 213 | (insert indent) | 285 | (format-str (nth 1 backend-spec)) |
| 214 | (backward-delete-char 2) | 286 | (tokens (cadr (nth 2 backend-spec))) |
| 215 | (insert "THISISTHEINLINELISTTEMINATOR\n")))))) | 287 | ;; change nil arguments into empty strings |
| 288 | (nil-to-str (lambda (el) (or (eval el) ""))) | ||
| 289 | ;; build and protect export string | ||
| 290 | (export-str (org-add-props | ||
| 291 | (eval (append '(format format-str) | ||
| 292 | (mapcar nil-to-str tokens))) | ||
| 293 | nil 'org-protected t))) | ||
| 294 | ;; eventually insert it | ||
| 295 | (insert export-str "\n"))))))) | ||
| 216 | 296 | ||
| 217 | (defun org-inlinetask-get-current-indentation () | 297 | (defun org-inlinetask-get-current-indentation () |
| 218 | "Get the indentation of the last non-while line above this one." | 298 | "Get the indentation of the last non-while line above this one." |
| @@ -247,31 +327,11 @@ Either remove headline and meta data, or do special formatting." | |||
| 247 | org-inlinetask-min-level)) | 327 | org-inlinetask-min-level)) |
| 248 | (replace-match ""))) | 328 | (replace-match ""))) |
| 249 | 329 | ||
| 250 | (defun org-inlinetask-remove-terminator () | ||
| 251 | (let (beg end) | ||
| 252 | (save-excursion | ||
| 253 | (goto-char (point-min)) | ||
| 254 | (while (re-search-forward "THISISTHEINLINELISTTEMINATOR\n" nil t) | ||
| 255 | (setq beg (match-beginning 0) end (match-end 0)) | ||
| 256 | (save-excursion | ||
| 257 | (beginning-of-line 1) | ||
| 258 | (and (looking-at "<p\\(ara\\)?>THISISTHEINLINELISTTEMINATOR[ \t\n]*</p\\(ara\\)?>") | ||
| 259 | (setq beg (point) end (match-end 0)))) | ||
| 260 | (delete-region beg end))))) | ||
| 261 | |||
| 262 | (eval-after-load "org-exp" | 330 | (eval-after-load "org-exp" |
| 263 | '(add-hook 'org-export-preprocess-after-tree-selection-hook | 331 | '(add-hook 'org-export-preprocess-after-tree-selection-hook |
| 264 | 'org-inlinetask-export-handler)) | 332 | 'org-inlinetask-export-handler)) |
| 265 | (eval-after-load "org" | 333 | (eval-after-load "org" |
| 266 | '(add-hook 'org-font-lock-hook 'org-inlinetask-fontify)) | 334 | '(add-hook 'org-font-lock-hook 'org-inlinetask-fontify)) |
| 267 | (eval-after-load "org-html" | ||
| 268 | '(add-hook 'org-export-html-final-hook 'org-inlinetask-remove-terminator)) | ||
| 269 | (eval-after-load "org-latex" | ||
| 270 | '(add-hook 'org-export-latex-final-hook 'org-inlinetask-remove-terminator)) | ||
| 271 | (eval-after-load "org-ascii" | ||
| 272 | '(add-hook 'org-export-ascii-final-hook 'org-inlinetask-remove-terminator)) | ||
| 273 | (eval-after-load "org-docbook" | ||
| 274 | '(add-hook 'org-export-docbook-final-hook 'org-inlinetask-remove-terminator)) | ||
| 275 | 335 | ||
| 276 | (provide 'org-inlinetask) | 336 | (provide 'org-inlinetask) |
| 277 | 337 | ||
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 3dd9680c8ff..fba274156db 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Philip Jackson <emacs@shellarchive.co.uk> | 5 | ;; Author: Philip Jackson <emacs@shellarchive.co.uk> |
| 6 | ;; Keywords: erc, irc, link, org | 6 | ;; Keywords: erc, irc, link, org |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; | 8 | ;; |
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index d435d814679..e5c65b0fb0f 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 2cf947312d8..a29c9f37401 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-latex.el | 6 | ;; Filename: org-latex.el |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; Author: Bastien Guerry <bzg AT altern DOT org> | 8 | ;; Author: Bastien Guerry <bzg AT altern DOT org> |
| 9 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> | 9 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> |
| 10 | ;; Keywords: org, wp, tex | 10 | ;; Keywords: org, wp, tex |
| @@ -295,7 +295,14 @@ markup defined, the first one in the association list will be used." | |||
| 295 | :group 'org-export-latex | 295 | :group 'org-export-latex |
| 296 | :type 'string) | 296 | :type 'string) |
| 297 | 297 | ||
| 298 | (defcustom org-export-latex-hyperref-format "\\href{%s}{%s}" | 298 | (defcustom org-export-latex-href-format "\\href{%s}{%s}" |
| 299 | "A printf format string to be applied to href links. | ||
| 300 | The format must contain two %s instances. The first will be filled with | ||
| 301 | the link, the second with the link description." | ||
| 302 | :group 'org-export-latex | ||
| 303 | :type 'string) | ||
| 304 | |||
| 305 | (defcustom org-export-latex-hyperref-format "\\hyperref[%s]{%s}" | ||
| 299 | "A printf format string to be applied to hyperref links. | 306 | "A printf format string to be applied to hyperref links. |
| 300 | The format must contain two %s instances. The first will be filled with | 307 | The format must contain two %s instances. The first will be filled with |
| 301 | the link, the second with the link description." | 308 | the link, the second with the link description." |
| @@ -453,12 +460,6 @@ pygmentize -L lexers | |||
| 453 | (symbol :tag "Major mode ") | 460 | (symbol :tag "Major mode ") |
| 454 | (string :tag "Listings language")))) | 461 | (string :tag "Listings language")))) |
| 455 | 462 | ||
| 456 | (defcustom org-export-latex-minted-with-line-numbers nil | ||
| 457 | "Should source code line numbers be included when exporting | ||
| 458 | with the latex minted package?" | ||
| 459 | :group 'org-export-latex | ||
| 460 | :type 'boolean) | ||
| 461 | |||
| 462 | (defcustom org-export-latex-remove-from-headlines | 463 | (defcustom org-export-latex-remove-from-headlines |
| 463 | '(:todo nil :priority nil :tags nil) | 464 | '(:todo nil :priority nil :tags nil) |
| 464 | "A plist of keywords to remove from headlines. OBSOLETE. | 465 | "A plist of keywords to remove from headlines. OBSOLETE. |
| @@ -1280,12 +1281,13 @@ OPT-PLIST is the options plist for current buffer." | |||
| 1280 | (org-export-apply-macros-in-string org-export-latex-append-header) | 1281 | (org-export-apply-macros-in-string org-export-latex-append-header) |
| 1281 | ;; define alert if not yet defined | 1282 | ;; define alert if not yet defined |
| 1282 | "\n\\providecommand{\\alert}[1]{\\textbf{#1}}" | 1283 | "\n\\providecommand{\\alert}[1]{\\textbf{#1}}" |
| 1284 | ;; beginning of the document | ||
| 1285 | "\n\\begin{document}\n\n" | ||
| 1283 | ;; insert the title | 1286 | ;; insert the title |
| 1284 | (format | 1287 | (format |
| 1285 | "\n\n\\title{%s}\n" | 1288 | "\n\n\\title{%s}\n" |
| 1286 | ;; convert the title | 1289 | ;; convert the title |
| 1287 | (org-export-latex-content | 1290 | (org-export-latex-fontify-headline title)) |
| 1288 | title '(lists tables fixed-width keywords))) | ||
| 1289 | ;; insert author info | 1291 | ;; insert author info |
| 1290 | (if (plist-get opt-plist :author-info) | 1292 | (if (plist-get opt-plist :author-info) |
| 1291 | (format "\\author{%s}\n" | 1293 | (format "\\author{%s}\n" |
| @@ -1297,8 +1299,6 @@ OPT-PLIST is the options plist for current buffer." | |||
| 1297 | (format-time-string | 1299 | (format-time-string |
| 1298 | (or (plist-get opt-plist :date) | 1300 | (or (plist-get opt-plist :date) |
| 1299 | org-export-latex-date-format))) | 1301 | org-export-latex-date-format))) |
| 1300 | ;; beginning of the document | ||
| 1301 | "\n\\begin{document}\n\n" | ||
| 1302 | ;; insert the title command | 1302 | ;; insert the title command |
| 1303 | (when (string-match "\\S-" title) | 1303 | (when (string-match "\\S-" title) |
| 1304 | (if (string-match "%s" org-export-latex-title-command) | 1304 | (if (string-match "%s" org-export-latex-title-command) |
| @@ -1325,7 +1325,7 @@ If END is non-nil, it is the end of the region." | |||
| 1325 | (save-excursion | 1325 | (save-excursion |
| 1326 | (goto-char (or beg (point-min))) | 1326 | (goto-char (or beg (point-min))) |
| 1327 | (let* ((pt (point)) | 1327 | (let* ((pt (point)) |
| 1328 | (end (if (re-search-forward "^\\*+ " end t) | 1328 | (end (if (re-search-forward (org-get-limited-outline-regexp) end t) |
| 1329 | (goto-char (match-beginning 0)) | 1329 | (goto-char (match-beginning 0)) |
| 1330 | (goto-char (or end (point-max)))))) | 1330 | (goto-char (or end (point-max)))))) |
| 1331 | (prog1 | 1331 | (prog1 |
| @@ -1452,6 +1452,33 @@ links, keywords, lists, tables, fixed-width" | |||
| 1452 | ;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at | 1452 | ;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at |
| 1453 | ;; the beginning of the buffer - inserting "\n" is safe here though. | 1453 | ;; the beginning of the buffer - inserting "\n" is safe here though. |
| 1454 | (insert "\n" string) | 1454 | (insert "\n" string) |
| 1455 | |||
| 1456 | ;; Preserve math snippets | ||
| 1457 | |||
| 1458 | (let* ((matchers (plist-get org-format-latex-options :matchers)) | ||
| 1459 | (re-list org-latex-regexps) | ||
| 1460 | beg end re e m n block off) | ||
| 1461 | ;; Check the different regular expressions | ||
| 1462 | (while (setq e (pop re-list)) | ||
| 1463 | (setq m (car e) re (nth 1 e) n (nth 2 e) | ||
| 1464 | block (if (nth 3 e) "\n\n" "")) | ||
| 1465 | (setq off (if (member m '("$" "$1")) 1 0)) | ||
| 1466 | (when (and (member m matchers) (not (equal m "begin"))) | ||
| 1467 | (goto-char (point-min)) | ||
| 1468 | (while (re-search-forward re nil t) | ||
| 1469 | (setq beg (+ (match-beginning 0) off) end (- (match-end 0) 0)) | ||
| 1470 | (add-text-properties beg end | ||
| 1471 | '(org-protected t org-latex-math t)))))) | ||
| 1472 | |||
| 1473 | ;; Convert LaTeX to \LaTeX{} and TeX to \TeX{} | ||
| 1474 | (goto-char (point-min)) | ||
| 1475 | (let ((case-fold-search nil)) | ||
| 1476 | (while (re-search-forward "\\<\\(\\(La\\)?TeX\\)\\>" nil t) | ||
| 1477 | (unless (eq (char-before (match-beginning 1)) ?\\) | ||
| 1478 | (org-if-unprotected-1 | ||
| 1479 | (replace-match (org-export-latex-protect-string | ||
| 1480 | (concat "\\" (match-string 1) | ||
| 1481 | "{}")) t t))))) | ||
| 1455 | (goto-char (point-min)) | 1482 | (goto-char (point-min)) |
| 1456 | (let ((re (concat "\\\\\\([a-zA-Z]+\\)" | 1483 | (let ((re (concat "\\\\\\([a-zA-Z]+\\)" |
| 1457 | "\\(?:<[^<>\n]*>\\)*" | 1484 | "\\(?:<[^<>\n]*>\\)*" |
| @@ -2016,10 +2043,10 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 2016 | (insert (format | 2043 | (insert (format |
| 2017 | (org-export-get-coderef-format path desc) | 2044 | (org-export-get-coderef-format path desc) |
| 2018 | (cdr (assoc path org-export-code-refs))))) | 2045 | (cdr (assoc path org-export-code-refs))))) |
| 2019 | (radiop (insert (format "\\hyperref[%s]{%s}" | 2046 | (radiop (insert (format org-export-latex-hyperref-format |
| 2020 | (org-solidify-link-text raw-path) desc))) | 2047 | (org-solidify-link-text raw-path) desc))) |
| 2021 | ((not type) | 2048 | ((not type) |
| 2022 | (insert (format "\\hyperref[%s]{%s}" | 2049 | (insert (format org-export-latex-hyperref-format |
| 2023 | (org-remove-initial-hash | 2050 | (org-remove-initial-hash |
| 2024 | (org-solidify-link-text raw-path)) | 2051 | (org-solidify-link-text raw-path)) |
| 2025 | desc))) | 2052 | desc))) |
| @@ -2030,7 +2057,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 2030 | ;; a LaTeX issue, but we here implement a work-around anyway. | 2057 | ;; a LaTeX issue, but we here implement a work-around anyway. |
| 2031 | (setq path (org-export-latex-protect-amp path) | 2058 | (setq path (org-export-latex-protect-amp path) |
| 2032 | desc (org-export-latex-protect-amp desc))) | 2059 | desc (org-export-latex-protect-amp desc))) |
| 2033 | (insert (format org-export-latex-hyperref-format path desc))) | 2060 | (insert (format org-export-latex-href-format path desc))) |
| 2034 | 2061 | ||
| 2035 | ((functionp (setq fnc (nth 2 (assoc type org-link-protocols)))) | 2062 | ((functionp (setq fnc (nth 2 (assoc type org-link-protocols)))) |
| 2036 | ;; The link protocol has a function for formatting the link | 2063 | ;; The link protocol has a function for formatting the link |
| @@ -2356,7 +2383,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 2356 | "\n" | 2383 | "\n" |
| 2357 | (match-string 1 res)) | 2384 | (match-string 1 res)) |
| 2358 | t t res))) | 2385 | t t res))) |
| 2359 | (insert res "\n")))) | 2386 | (insert res)))) |
| 2360 | 2387 | ||
| 2361 | (defconst org-latex-entities | 2388 | (defconst org-latex-entities |
| 2362 | '("\\!" | 2389 | '("\\!" |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 4ea466f379d..bc8e7bddb5b 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Bastien Guerry <bzg AT altern DOT org> | 7 | ;; Bastien Guerry <bzg AT altern DOT org> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 7.3 | 10 | ;; Version: 7.4 |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
| @@ -462,7 +462,8 @@ List ending is determined by indentation of text. See | |||
| 462 | (forward-line -1) | 462 | (forward-line -1) |
| 463 | (catch 'exit | 463 | (catch 'exit |
| 464 | (while t | 464 | (while t |
| 465 | (let ((ind (org-get-indentation))) | 465 | (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0) |
| 466 | (org-get-indentation)))) | ||
| 466 | (cond | 467 | (cond |
| 467 | ((looking-at "^[ \t]*:END:") | 468 | ((looking-at "^[ \t]*:END:") |
| 468 | (throw 'exit item-ref)) | 469 | (throw 'exit item-ref)) |
| @@ -502,7 +503,8 @@ List ending is determined by the indentation of text. See | |||
| 502 | (catch 'exit | 503 | (catch 'exit |
| 503 | (while t | 504 | (while t |
| 504 | (skip-chars-forward " \t") | 505 | (skip-chars-forward " \t") |
| 505 | (let ((ind (org-get-indentation))) | 506 | (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0) |
| 507 | (org-get-indentation)))) | ||
| 506 | (cond | 508 | (cond |
| 507 | ((or (>= (point) limit) | 509 | ((or (>= (point) limit) |
| 508 | (looking-at ":END:")) | 510 | (looking-at ":END:")) |
| @@ -518,7 +520,11 @@ List ending is determined by the indentation of text. See | |||
| 518 | (setq ind-ref ind) | 520 | (setq ind-ref ind) |
| 519 | (forward-line 1)) | 521 | (forward-line 1)) |
| 520 | ((<= ind ind-ref) | 522 | ((<= ind ind-ref) |
| 521 | (throw 'exit (point-at-bol))) | 523 | (throw 'exit (progn |
| 524 | ;; Again, ensure bottom is just after a | ||
| 525 | ;; non-blank line. | ||
| 526 | (skip-chars-backward " \r\t\n") | ||
| 527 | (min (point-max) (1+ (point-at-eol)))))) | ||
| 522 | ((looking-at "#\\+begin_") | 528 | ((looking-at "#\\+begin_") |
| 523 | (re-search-forward "[ \t]*#\\+end_") | 529 | (re-search-forward "[ \t]*#\\+end_") |
| 524 | (forward-line 1)) | 530 | (forward-line 1)) |
| @@ -636,7 +642,7 @@ function ends." | |||
| 636 | ;; insert bullet above item in order to avoid bothering | 642 | ;; insert bullet above item in order to avoid bothering |
| 637 | ;; with possible blank lines ending last item. | 643 | ;; with possible blank lines ending last item. |
| 638 | (goto-char (org-get-item-beginning)) | 644 | (goto-char (org-get-item-beginning)) |
| 639 | (indent-to-column ind) | 645 | (org-indent-to-column ind) |
| 640 | (insert (concat bullet (when checkbox "[ ] ") after-bullet)) | 646 | (insert (concat bullet (when checkbox "[ ] ") after-bullet)) |
| 641 | ;; Stay between after-bullet and before text. | 647 | ;; Stay between after-bullet and before text. |
| 642 | (save-excursion | 648 | (save-excursion |
| @@ -1060,7 +1066,7 @@ so this really moves item trees." | |||
| 1060 | (org-list-exchange-items actual-item next-item bottom) | 1066 | (org-list-exchange-items actual-item next-item bottom) |
| 1061 | (org-list-repair nil nil bottom) | 1067 | (org-list-repair nil nil bottom) |
| 1062 | (goto-char (org-get-next-item (point) bottom)) | 1068 | (goto-char (org-get-next-item (point) bottom)) |
| 1063 | (move-to-column col))))) | 1069 | (org-move-to-column col))))) |
| 1064 | 1070 | ||
| 1065 | (defun org-move-item-up () | 1071 | (defun org-move-item-up () |
| 1066 | "Move the plain list item at point up, i.e. swap with previous item. | 1072 | "Move the plain list item at point up, i.e. swap with previous item. |
| @@ -1081,7 +1087,7 @@ so this really moves item trees." | |||
| 1081 | (error "Cannot move this item further up")) | 1087 | (error "Cannot move this item further up")) |
| 1082 | (org-list-exchange-items prev-item actual-item bottom) | 1088 | (org-list-exchange-items prev-item actual-item bottom) |
| 1083 | (org-list-repair nil top bottom) | 1089 | (org-list-repair nil top bottom) |
| 1084 | (move-to-column col))))) | 1090 | (org-move-to-column col))))) |
| 1085 | 1091 | ||
| 1086 | (defun org-insert-item (&optional checkbox) | 1092 | (defun org-insert-item (&optional checkbox) |
| 1087 | "Insert a new item at the current level. | 1093 | "Insert a new item at the current level. |
| @@ -1481,7 +1487,7 @@ BOTTOM is position at list ending." | |||
| 1481 | ;; this is not an empty line | 1487 | ;; this is not an empty line |
| 1482 | (let ((i (org-get-indentation))) | 1488 | (let ((i (org-get-indentation))) |
| 1483 | (when (and (> i 0) (> (+ i delta) 0)) | 1489 | (when (and (> i 0) (> (+ i delta) 0)) |
| 1484 | (indent-line-to (+ i delta))))) | 1490 | (org-indent-line-to (+ i delta))))) |
| 1485 | (beginning-of-line 0))))) | 1491 | (beginning-of-line 0))))) |
| 1486 | 1492 | ||
| 1487 | (defun org-outdent-item () | 1493 | (defun org-outdent-item () |
| @@ -1543,7 +1549,7 @@ Return t at each successful move." | |||
| 1543 | (ignore-errors | 1549 | (ignore-errors |
| 1544 | (org-list-indent-item-generic 1 t top bottom)))) | 1550 | (org-list-indent-item-generic 1 t top bottom)))) |
| 1545 | (t (back-to-indentation) | 1551 | (t (back-to-indentation) |
| 1546 | (indent-to-column (car org-tab-ind-state)) | 1552 | (org-indent-to-column (car org-tab-ind-state)) |
| 1547 | (end-of-line) | 1553 | (end-of-line) |
| 1548 | (org-list-repair (cdr org-tab-ind-state)) | 1554 | (org-list-repair (cdr org-tab-ind-state)) |
| 1549 | ;; Break cycle | 1555 | ;; Break cycle |
| @@ -1629,35 +1635,36 @@ If WHICH is a valid string, use that as the new bullet. If WHICH | |||
| 1629 | is an integer, 0 means `-', 1 means `+' etc. If WHICH is | 1635 | is an integer, 0 means `-', 1 means `+' etc. If WHICH is |
| 1630 | 'previous, cycle backwards." | 1636 | 'previous, cycle backwards." |
| 1631 | (interactive "P") | 1637 | (interactive "P") |
| 1632 | (let* ((top (org-list-top-point)) | 1638 | (save-excursion |
| 1633 | (bullet (save-excursion | 1639 | (let* ((top (org-list-top-point)) |
| 1634 | (goto-char (org-get-beginning-of-list top)) | 1640 | (bullet (progn |
| 1635 | (org-get-bullet))) | 1641 | (goto-char (org-get-beginning-of-list top)) |
| 1636 | (current (cond | 1642 | (org-get-bullet))) |
| 1637 | ((string-match "\\." bullet) "1.") | 1643 | (current (cond |
| 1638 | ((string-match ")" bullet) "1)") | 1644 | ((string-match "\\." bullet) "1.") |
| 1639 | (t bullet))) | 1645 | ((string-match ")" bullet) "1)") |
| 1640 | (bullet-rule-p (cdr (assq 'bullet org-list-automatic-rules))) | 1646 | (t bullet))) |
| 1641 | (bullet-list (append '("-" "+" ) | 1647 | (bullet-rule-p (cdr (assq 'bullet org-list-automatic-rules))) |
| 1642 | ;; *-bullets are not allowed at column 0 | 1648 | (bullet-list (append '("-" "+" ) |
| 1643 | (unless (and bullet-rule-p | 1649 | ;; *-bullets are not allowed at column 0 |
| 1644 | (looking-at "\\S-")) '("*")) | 1650 | (unless (and bullet-rule-p |
| 1645 | ;; Description items cannot be numbered | 1651 | (looking-at "\\S-")) '("*")) |
| 1646 | (unless (and bullet-rule-p | 1652 | ;; Description items cannot be numbered |
| 1647 | (or (eq org-plain-list-ordered-item-terminator ?\)) | 1653 | (unless (and bullet-rule-p |
| 1648 | (org-at-item-description-p))) '("1.")) | 1654 | (or (eq org-plain-list-ordered-item-terminator ?\)) |
| 1649 | (unless (and bullet-rule-p | 1655 | (org-at-item-description-p))) '("1.")) |
| 1650 | (or (eq org-plain-list-ordered-item-terminator ?.) | 1656 | (unless (and bullet-rule-p |
| 1651 | (org-at-item-description-p))) '("1)")))) | 1657 | (or (eq org-plain-list-ordered-item-terminator ?.) |
| 1652 | (len (length bullet-list)) | 1658 | (org-at-item-description-p))) '("1)")))) |
| 1653 | (item-index (- len (length (member current bullet-list)))) | 1659 | (len (length bullet-list)) |
| 1654 | (get-value (lambda (index) (nth (mod index len) bullet-list))) | 1660 | (item-index (- len (length (member current bullet-list)))) |
| 1655 | (new (cond | 1661 | (get-value (lambda (index) (nth (mod index len) bullet-list))) |
| 1656 | ((member which bullet-list) which) | 1662 | (new (cond |
| 1657 | ((numberp which) (funcall get-value which)) | 1663 | ((member which bullet-list) which) |
| 1658 | ((eq 'previous which) (funcall get-value (1- item-index))) | 1664 | ((numberp which) (funcall get-value which)) |
| 1659 | (t (funcall get-value (1+ item-index)))))) | 1665 | ((eq 'previous which) (funcall get-value (1- item-index))) |
| 1660 | (org-list-repair new top))) | 1666 | (t (funcall get-value (1+ item-index)))))) |
| 1667 | (org-list-repair new top)))) | ||
| 1661 | 1668 | ||
| 1662 | ;;; Checkboxes | 1669 | ;;; Checkboxes |
| 1663 | 1670 | ||
| @@ -2029,7 +2036,7 @@ sublevels as a list of strings." | |||
| 2029 | (while (org-search-forward-unenclosed org-item-beginning-re end t) | 2036 | (while (org-search-forward-unenclosed org-item-beginning-re end t) |
| 2030 | (save-excursion | 2037 | (save-excursion |
| 2031 | (beginning-of-line) | 2038 | (beginning-of-line) |
| 2032 | (setq ltype (cond ((looking-at-p "^[ \t]*[0-9]") 'ordered) | 2039 | (setq ltype (cond ((org-looking-at-p "^[ \t]*[0-9]") 'ordered) |
| 2033 | ((org-at-item-description-p) 'descriptive) | 2040 | ((org-at-item-description-p) 'descriptive) |
| 2034 | (t 'unordered)))) | 2041 | (t 'unordered)))) |
| 2035 | (let* ((indent1 (org-get-indentation)) | 2042 | (let* ((indent1 (org-get-indentation)) |
diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el index afac5ca71b1..a146cc86e2b 100644 --- a/lisp/org/org-mac-message.el +++ b/lisp/org/org-mac-message.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 6 | ;; Christopher Suckling <suckling at gmail dot com> | 6 | ;; Christopher Suckling <suckling at gmail dot com> |
| 7 | 7 | ||
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; Keywords: outlines, hypermedia, calendar, wp | 9 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 5a5612387fd..97a8fdc06e4 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -46,9 +46,16 @@ | |||
| 46 | (if (or (> emacs-major-version 23) | 46 | (if (or (> emacs-major-version 23) |
| 47 | (and (>= emacs-major-version 23) | 47 | (and (>= emacs-major-version 23) |
| 48 | (>= emacs-minor-version 2))) | 48 | (>= emacs-minor-version 2))) |
| 49 | (called-interactively-p ,kind) | 49 | (with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1 |
| 50 | (interactive-p)))) | 50 | (interactive-p)))) |
| 51 | 51 | ||
| 52 | (if (and (not (fboundp 'with-silent-modifications)) | ||
| 53 | (or (< emacs-major-version 23) | ||
| 54 | (and (= emacs-major-version 23) | ||
| 55 | (< emacs-minor-version 2)))) | ||
| 56 | (defmacro with-silent-modifications (&rest body) | ||
| 57 | `(org-unmodified ,@body))) | ||
| 58 | |||
| 52 | (defmacro org-bound-and-true-p (var) | 59 | (defmacro org-bound-and-true-p (var) |
| 53 | "Return the value of symbol VAR if it is bound, else nil." | 60 | "Return the value of symbol VAR if it is bound, else nil." |
| 54 | `(and (boundp (quote ,var)) ,var)) | 61 | `(and (boundp (quote ,var)) ,var)) |
diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el index efedef8ec5c..9636a1aa428 100644 --- a/lisp/org/org-mew.el +++ b/lisp/org/org-mew.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> | 5 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index b1024a000e2..c384062a3fa 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de> | 6 | ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-mks.el b/lisp/org/org-mks.el index 2d429a79152..df4ab3e2e75 100644 --- a/lisp/org/org-mks.el +++ b/lisp/org/org-mks.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index a278fb16d0a..4b16e2b8fcf 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 4 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 5 | ;; Keywords: outlines, hypermedia, calendar, wp | 5 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 6 | ;; Homepage: http://orgmode.org | 6 | ;; Homepage: http://orgmode.org |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; | 8 | ;; |
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 4a341d4272d..d1540c3f3f9 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el | |||
| @@ -1,11 +1,10 @@ | |||
| 1 | ;;; org-mouse.el --- Better mouse support for org-mode | 1 | ;;; org-mouse.el --- Better mouse support for org-mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation |
| 4 | ;; Free Software Foundation, Inc. | ||
| 5 | ;; | 4 | ;; |
| 6 | ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> | 5 | ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> |
| 7 | ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> |
| 8 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 9 | ;; | 8 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 10 | ;; |
| @@ -1101,10 +1100,10 @@ This means, between the beginning of line and the point." | |||
| 1101 | "--" | 1100 | "--" |
| 1102 | ["Day View" org-agenda-day-view | 1101 | ["Day View" org-agenda-day-view |
| 1103 | :active (org-agenda-check-type nil 'agenda) | 1102 | :active (org-agenda-check-type nil 'agenda) |
| 1104 | :style radio :selected (equal org-agenda-ndays 1)] | 1103 | :style radio :selected (eq org-agenda-current-span 'day)] |
| 1105 | ["Week View" org-agenda-week-view | 1104 | ["Week View" org-agenda-week-view |
| 1106 | :active (org-agenda-check-type nil 'agenda) | 1105 | :active (org-agenda-check-type nil 'agenda) |
| 1107 | :style radio :selected (equal org-agenda-ndays 7)] | 1106 | :style radio :selected (eq org-agenda-current-span 'week)] |
| 1108 | "--" | 1107 | "--" |
| 1109 | ["Show Logbook entries" org-agenda-log-mode | 1108 | ["Show Logbook entries" org-agenda-log-mode |
| 1110 | :style toggle :selected org-agenda-show-log | 1109 | :style toggle :selected org-agenda-show-log |
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 274d3f94c8a..374e2d43b5e 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte <schulte dot eric at gmail dot com> | 5 | ;; Author: Eric Schulte <schulte dot eric at gmail dot com> |
| 6 | ;; Keywords: tables, plotting | 6 | ;; Keywords: tables, plotting |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 3a20c5f729c..5d5059fbf0e 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | ;; Author: Ross Patterson <me AT rpatterson DOT net> | 9 | ;; Author: Ross Patterson <me AT rpatterson DOT net> |
| 10 | ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de> | 10 | ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de> |
| 11 | ;; Keywords: org, emacsclient, wp | 11 | ;; Keywords: org, emacsclient, wp |
| 12 | ;; Version: 7.3 | 12 | ;; Version: 7.4 |
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| 15 | ;; | 15 | ;; |
| @@ -313,7 +313,7 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'." | |||
| 313 | (let* ((start (match-beginning 0)) | 313 | (let* ((start (match-beginning 0)) |
| 314 | (end (match-end 0)) | 314 | (end (match-end 0)) |
| 315 | (hex (match-string 0 str)) | 315 | (hex (match-string 0 str)) |
| 316 | (replacement (org-protocol-unhex-compound hex))) | 316 | (replacement (org-protocol-unhex-compound (upcase hex)))) |
| 317 | (setq tmp (concat tmp (substring str 0 start) replacement)) | 317 | (setq tmp (concat tmp (substring str 0 start) replacement)) |
| 318 | (setq str (substring str end)))) | 318 | (setq str (substring str end)))) |
| 319 | (setq tmp (concat tmp str)) | 319 | (setq tmp (concat tmp str)) |
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 51db9f652d1..bb20cc60dff 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: David O'Toole <dto@gnu.org> | 5 | ;; Author: David O'Toole <dto@gnu.org> |
| 6 | ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com> | 6 | ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com> |
| 7 | ;; Keywords: hypermedia, outlines, wp | 7 | ;; Keywords: hypermedia, outlines, wp |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index a15825a51ec..c6e21ae057b 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el index 5574bf77ac4..73258685232 100644 --- a/lisp/org/org-rmail.el +++ b/lisp/org/org-rmail.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index c4f0065ec34..c932b4a70b2 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ;; Dan Davison <davison at stats dot ox dot ac dot uk> | 8 | ;; Dan Davison <davison at stats dot ox dot ac dot uk> |
| 9 | ;; Keywords: outlines, hypermedia, calendar, wp | 9 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 10 | ;; Homepage: http://orgmode.org | 10 | ;; Homepage: http://orgmode.org |
| 11 | ;; Version: 7.3 | 11 | ;; Version: 7.4 |
| 12 | ;; | 12 | ;; |
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| 14 | ;; | 14 | ;; |
| @@ -240,8 +240,8 @@ buffer." | |||
| 240 | block-nindent (nth 5 info) | 240 | block-nindent (nth 5 info) |
| 241 | lang-f (intern (concat lang "-mode")) | 241 | lang-f (intern (concat lang "-mode")) |
| 242 | begline (save-excursion (goto-char beg) (org-current-line))) | 242 | begline (save-excursion (goto-char beg) (org-current-line))) |
| 243 | (if (and mark (>= mark beg) (<= mark end)) | 243 | (if (and mark (>= mark beg) (<= mark (1+ end))) |
| 244 | (save-excursion (goto-char mark) | 244 | (save-excursion (goto-char (min mark end)) |
| 245 | (setq markline (org-current-line) | 245 | (setq markline (org-current-line) |
| 246 | markcol (current-column)))) | 246 | markcol (current-column)))) |
| 247 | (if (equal lang-f 'table.el-mode) | 247 | (if (equal lang-f 'table.el-mode) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 0d61a782270..116c3fc2312 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -48,6 +48,12 @@ | |||
| 48 | (defvar org-export-html-table-tag) ; defined in org-exp.el | 48 | (defvar org-export-html-table-tag) ; defined in org-exp.el |
| 49 | (defvar constants-unit-system) | 49 | (defvar constants-unit-system) |
| 50 | 50 | ||
| 51 | (defvar orgtbl-after-send-table-hook nil | ||
| 52 | "Hook for functions attaching to `C-c C-c', if the table is sent. | ||
| 53 | This can be used to add additional functionality after the table is sent | ||
| 54 | to the receiver position, othewise, if table is not sent, the functions | ||
| 55 | are not run.") | ||
| 56 | |||
| 51 | (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) | 57 | (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) |
| 52 | "Non-nil means use the optimized table editor version for `orgtbl-mode'. | 58 | "Non-nil means use the optimized table editor version for `orgtbl-mode'. |
| 53 | In the optimized version, the table editor takes over all simple keys that | 59 | In the optimized version, the table editor takes over all simple keys that |
| @@ -3729,7 +3735,8 @@ With prefix arg, also recompute table." | |||
| 3729 | (call-interactively 'org-table-recalculate) | 3735 | (call-interactively 'org-table-recalculate) |
| 3730 | (org-table-maybe-recalculate-line)) | 3736 | (org-table-maybe-recalculate-line)) |
| 3731 | (call-interactively 'org-table-align) | 3737 | (call-interactively 'org-table-align) |
| 3732 | (orgtbl-send-table 'maybe)) | 3738 | (when (orgtbl-send-table 'maybe) |
| 3739 | (run-hooks 'orgtbl-after-send-table-hook))) | ||
| 3733 | ((eq action 'recalc) | 3740 | ((eq action 'recalc) |
| 3734 | (save-excursion | 3741 | (save-excursion |
| 3735 | (beginning-of-line 1) | 3742 | (beginning-of-line 1) |
| @@ -3943,7 +3950,10 @@ this table." | |||
| 3943 | (orgtbl-send-replace-tbl name txt)) | 3950 | (orgtbl-send-replace-tbl name txt)) |
| 3944 | (setq ntbl (1+ ntbl))) | 3951 | (setq ntbl (1+ ntbl))) |
| 3945 | (message "Table converted and installed at %d receiver location%s" | 3952 | (message "Table converted and installed at %d receiver location%s" |
| 3946 | ntbl (if (> ntbl 1) "s" ""))))) | 3953 | ntbl (if (> ntbl 1) "s" "")) |
| 3954 | (if (> ntbl 0) | ||
| 3955 | ntbl | ||
| 3956 | nil)))) | ||
| 3947 | 3957 | ||
| 3948 | (defun org-remove-by-index (list indices &optional i0) | 3958 | (defun org-remove-by-index (list indices &optional i0) |
| 3949 | "Remove the elements in LIST with indices in INDICES. | 3959 | "Remove the elements in LIST with indices in INDICES. |
diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index d03cd591b81..d78e10d56a8 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-taskjuggler.el | 6 | ;; Filename: org-taskjuggler.el |
| 7 | ;; Version: 7.3 | 7 | ;; Version: 7.4 |
| 8 | ;; Author: Christian Egli | 8 | ;; Author: Christian Egli |
| 9 | ;; Maintainer: Christian Egli | 9 | ;; Maintainer: Christian Egli |
| 10 | ;; Keywords: org, taskjuggler, project planning | 10 | ;; Keywords: org, taskjuggler, project planning |
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 6c1f4984cf1..bac11870431 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el index 629258dec94..daef6713f41 100644 --- a/lisp/org/org-vm.el +++ b/lisp/org/org-vm.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index 072020a65e7..6965ac6b337 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com> | 5 | ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el index 54d35c98f2f..137bad9de89 100644 --- a/lisp/org/org-wl.el +++ b/lisp/org/org-wl.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; David Maus <dmaus at ictsoc dot de> | 7 | ;; David Maus <dmaus at ictsoc dot de> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 7.3 | 10 | ;; Version: 7.4 |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index b5656d9406f..2ce277ed6ce 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org.el b/lisp/org/org.el index f7e7c9fd2f4..eb919687325 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.3 | 9 | ;; Version: 7.4 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -75,6 +75,7 @@ | |||
| 75 | (require 'gnus-sum)) | 75 | (require 'gnus-sum)) |
| 76 | 76 | ||
| 77 | (require 'calendar) | 77 | (require 'calendar) |
| 78 | |||
| 78 | ;; Emacs 22 calendar compatibility: Make sure the new variables are available | 79 | ;; Emacs 22 calendar compatibility: Make sure the new variables are available |
| 79 | (when (fboundp 'defvaralias) | 80 | (when (fboundp 'defvaralias) |
| 80 | (unless (boundp 'calendar-view-holidays-initially-flag) | 81 | (unless (boundp 'calendar-view-holidays-initially-flag) |
| @@ -98,6 +99,7 @@ | |||
| 98 | (require 'org-compat) | 99 | (require 'org-compat) |
| 99 | (require 'org-faces) | 100 | (require 'org-faces) |
| 100 | (require 'org-list) | 101 | (require 'org-list) |
| 102 | (require 'org-complete) | ||
| 101 | (require 'org-src) | 103 | (require 'org-src) |
| 102 | (require 'org-footnote) | 104 | (require 'org-footnote) |
| 103 | 105 | ||
| @@ -186,7 +188,7 @@ identifier." | |||
| 186 | 188 | ||
| 187 | ;;; Version | 189 | ;;; Version |
| 188 | 190 | ||
| 189 | (defconst org-version "7.3" | 191 | (defconst org-version "7.4" |
| 190 | "The version number of the file org.el.") | 192 | "The version number of the file org.el.") |
| 191 | 193 | ||
| 192 | (defun org-version (&optional here) | 194 | (defun org-version (&optional here) |
| @@ -1383,12 +1385,15 @@ nil Never use an ID to make a link, instead link using a text search for | |||
| 1383 | (defcustom org-context-in-file-links t | 1385 | (defcustom org-context-in-file-links t |
| 1384 | "Non-nil means file links from `org-store-link' contain context. | 1386 | "Non-nil means file links from `org-store-link' contain context. |
| 1385 | A search string will be added to the file name with :: as separator and | 1387 | A search string will be added to the file name with :: as separator and |
| 1386 | used to find the context when the link is activated by the command | 1388 | used to find the context when the link is activated by the command |
| 1387 | `org-open-at-point'. | 1389 | `org-open-at-point'. When this option is t, the entire active region |
| 1390 | will be placed in the search string of the file link. If set to a | ||
| 1391 | positive integer, only the first n lines of context will be stored. | ||
| 1392 | |||
| 1388 | Using a prefix arg to the command \\[org-store-link] (`org-store-link') | 1393 | Using a prefix arg to the command \\[org-store-link] (`org-store-link') |
| 1389 | negates this setting for the duration of the command." | 1394 | negates this setting for the duration of the command." |
| 1390 | :group 'org-link-store | 1395 | :group 'org-link-store |
| 1391 | :type 'boolean) | 1396 | :type '(choice boolean integer)) |
| 1392 | 1397 | ||
| 1393 | (defcustom org-keep-stored-link-after-insertion nil | 1398 | (defcustom org-keep-stored-link-after-insertion nil |
| 1394 | "Non-nil means keep link in list for entire session. | 1399 | "Non-nil means keep link in list for entire session. |
| @@ -1958,7 +1963,7 @@ indicating if the keywords should be interpreted as a sequence of | |||
| 1958 | action steps, or as different types of TODO items. The first | 1963 | action steps, or as different types of TODO items. The first |
| 1959 | keywords are states requiring action - these states will select a headline | 1964 | keywords are states requiring action - these states will select a headline |
| 1960 | for inclusion into the global TODO list Org-mode produces. If one of | 1965 | for inclusion into the global TODO list Org-mode produces. If one of |
| 1961 | the \"keywords\" is the vertical bat \"|\" the remaining keywords | 1966 | the \"keywords\" is the vertical bar, \"|\", the remaining keywords |
| 1962 | signify that no further action is necessary. If \"|\" is not found, | 1967 | signify that no further action is necessary. If \"|\" is not found, |
| 1963 | the last keyword is treated as the only DONE state of the sequence. | 1968 | the last keyword is treated as the only DONE state of the sequence. |
| 1964 | 1969 | ||
| @@ -2473,6 +2478,16 @@ command used) one higher or lower that the default priority." | |||
| 2473 | :group 'org-priorities | 2478 | :group 'org-priorities |
| 2474 | :type 'boolean) | 2479 | :type 'boolean) |
| 2475 | 2480 | ||
| 2481 | (defcustom org-get-priority-function nil | ||
| 2482 | "Function to extract the priority from a string. | ||
| 2483 | The string is normally the headline. If this is nil Org computes the | ||
| 2484 | priority from the priority cookie like [#A] in the headline. It returns | ||
| 2485 | an integer, increasing by 1000 for each priority level. | ||
| 2486 | The user can set a different function here, which should take a string | ||
| 2487 | as an argument and return the numeric priority." | ||
| 2488 | :group 'org-priorities | ||
| 2489 | :type 'function) | ||
| 2490 | |||
| 2476 | (defgroup org-time nil | 2491 | (defgroup org-time nil |
| 2477 | "Options concerning time stamps and deadlines in Org-mode." | 2492 | "Options concerning time stamps and deadlines in Org-mode." |
| 2478 | :tag "Org Time" | 2493 | :tag "Org Time" |
| @@ -2613,7 +2628,7 @@ This may t or nil, or the symbol `org-read-date-prefer-future'." | |||
| 2613 | :group 'org-agenda | 2628 | :group 'org-agenda |
| 2614 | :group 'org-time | 2629 | :group 'org-time |
| 2615 | :type '(choice | 2630 | :type '(choice |
| 2616 | (const :tag "Use org-aread-date-prefer-future" | 2631 | (const :tag "Use org-read-date-prefer-future" |
| 2617 | org-read-date-prefer-future) | 2632 | org-read-date-prefer-future) |
| 2618 | (const :tag "Never" nil) | 2633 | (const :tag "Never" nil) |
| 2619 | (const :tag "Always" t))) | 2634 | (const :tag "Always" t))) |
| @@ -2719,10 +2734,10 @@ To disable these tags on a per-file basis, insert anywhere in the file: | |||
| 2719 | (defcustom org-complete-tags-always-offer-all-agenda-tags nil | 2734 | (defcustom org-complete-tags-always-offer-all-agenda-tags nil |
| 2720 | "If non-nil, always offer completion for all tags of all agenda files. | 2735 | "If non-nil, always offer completion for all tags of all agenda files. |
| 2721 | Instead of customizing this variable directly, you might want to | 2736 | Instead of customizing this variable directly, you might want to |
| 2722 | set it locally for remember buffers, because there no list of | 2737 | set it locally for capture buffers, because there no list of |
| 2723 | tags in that file can be created dynamically (there are none). | 2738 | tags in that file can be created dynamically (there are none). |
| 2724 | 2739 | ||
| 2725 | (add-hook 'org-remember-mode-hook | 2740 | (add-hook 'org-capture-mode-hook |
| 2726 | (lambda () | 2741 | (lambda () |
| 2727 | (set (make-local-variable | 2742 | (set (make-local-variable |
| 2728 | 'org-complete-tags-always-offer-all-agenda-tags) | 2743 | 'org-complete-tags-always-offer-all-agenda-tags) |
| @@ -3422,7 +3437,7 @@ After a match, the match groups contain these elements: | |||
| 3422 | (defcustom org-emphasis-regexp-components | 3437 | (defcustom org-emphasis-regexp-components |
| 3423 | '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1) | 3438 | '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1) |
| 3424 | "Components used to build the regular expression for emphasis. | 3439 | "Components used to build the regular expression for emphasis. |
| 3425 | This is a list with 6 entries. Terminology: In an emphasis string | 3440 | This is a list with five entries. Terminology: In an emphasis string |
| 3426 | like \" *strong word* \", we call the initial space PREMATCH, the final | 3441 | like \" *strong word* \", we call the initial space PREMATCH, the final |
| 3427 | space POSTMATCH, the stars MARKERS, \"s\" and \"d\" are BORDER characters | 3442 | space POSTMATCH, the stars MARKERS, \"s\" and \"d\" are BORDER characters |
| 3428 | and \"trong wor\" is the body. The different components in this variable | 3443 | and \"trong wor\" is the body. The different components in this variable |
| @@ -3506,8 +3521,8 @@ Note that this variable has only an effect if `org-completion-use-ido' is nil." | |||
| 3506 | :type 'boolean) | 3521 | :type 'boolean) |
| 3507 | 3522 | ||
| 3508 | (defcustom org-completion-fallback-command 'hippie-expand | 3523 | (defcustom org-completion-fallback-command 'hippie-expand |
| 3509 | "The expansion command called by \\[org-complete] in normal context. | 3524 | "The expansion command called by \\[pcomplete] in normal context. |
| 3510 | Normal means no org-mode-specific context." | 3525 | Normal means, no org-mode-specific context." |
| 3511 | :group 'org-completion | 3526 | :group 'org-completion |
| 3512 | :type 'function) | 3527 | :type 'function) |
| 3513 | 3528 | ||
| @@ -3555,10 +3570,13 @@ Normal means no org-mode-specific context." | |||
| 3555 | "org-agenda" (&optional end)) | 3570 | "org-agenda" (&optional end)) |
| 3556 | (declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ()) | 3571 | (declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ()) |
| 3557 | (declare-function org-inlinetask-in-task-p "org-inlinetask" ()) | 3572 | (declare-function org-inlinetask-in-task-p "org-inlinetask" ()) |
| 3573 | (declare-function org-inlinetask-goto-beginning "org-inlinetask" ()) | ||
| 3574 | (declare-function org-inlinetask-goto-end "org-inlinetask" ()) | ||
| 3558 | (declare-function org-indent-mode "org-indent" (&optional arg)) | 3575 | (declare-function org-indent-mode "org-indent" (&optional arg)) |
| 3559 | (declare-function parse-time-string "parse-time" (string)) | 3576 | (declare-function parse-time-string "parse-time" (string)) |
| 3560 | (declare-function org-attach-reveal "org-attach" (&optional if-exists)) | 3577 | (declare-function org-attach-reveal "org-attach" (&optional if-exists)) |
| 3561 | (declare-function org-export-latex-fix-inputenc "org-latex" ()) | 3578 | (declare-function org-export-latex-fix-inputenc "org-latex" ()) |
| 3579 | (declare-function orgtbl-send-table "org-table" (&optional maybe)) | ||
| 3562 | (defvar remember-data-file) | 3580 | (defvar remember-data-file) |
| 3563 | (defvar texmathp-why) | 3581 | (defvar texmathp-why) |
| 3564 | (declare-function speedbar-line-directory "speedbar" (&optional depth)) | 3582 | (declare-function speedbar-line-directory "speedbar" (&optional depth)) |
| @@ -4739,6 +4757,17 @@ The following commands are available: | |||
| 4739 | ;; Turn on org-beamer-mode? | 4757 | ;; Turn on org-beamer-mode? |
| 4740 | (and org-startup-with-beamer-mode (org-beamer-mode 1)) | 4758 | (and org-startup-with-beamer-mode (org-beamer-mode 1)) |
| 4741 | 4759 | ||
| 4760 | ;; Setup the pcomplete hooks | ||
| 4761 | (set (make-local-variable 'pcomplete-command-completion-function) | ||
| 4762 | 'org-complete-initial) | ||
| 4763 | (set (make-local-variable 'pcomplete-command-name-function) | ||
| 4764 | 'org-command-at-point) | ||
| 4765 | (set (make-local-variable 'pcomplete-default-completion-function) | ||
| 4766 | 'ignore) | ||
| 4767 | (set (make-local-variable 'pcomplete-parse-arguments-function) | ||
| 4768 | 'org-parse-arguments) | ||
| 4769 | (set (make-local-variable 'pcomplete-termination-string) "") | ||
| 4770 | |||
| 4742 | ;; If empty file that did not turn on org-mode automatically, make it to. | 4771 | ;; If empty file that did not turn on org-mode automatically, make it to. |
| 4743 | (if (and org-insert-mode-line-in-empty-file | 4772 | (if (and org-insert-mode-line-in-empty-file |
| 4744 | (interactive-p) | 4773 | (interactive-p) |
| @@ -4773,6 +4802,12 @@ The following commands are available: | |||
| 4773 | (nthcdr 2 time)))) | 4802 | (nthcdr 2 time)))) |
| 4774 | (current-time))) | 4803 | (current-time))) |
| 4775 | 4804 | ||
| 4805 | (defun org-today () | ||
| 4806 | "Return today date, considering `org-extend-today-until'." | ||
| 4807 | (time-to-days | ||
| 4808 | (time-subtract (current-time) | ||
| 4809 | (list 0 (* 3600 org-extend-today-until) 0)))) | ||
| 4810 | |||
| 4776 | ;;;; Font-Lock stuff, including the activators | 4811 | ;;;; Font-Lock stuff, including the activators |
| 4777 | 4812 | ||
| 4778 | (defvar org-mouse-map (make-sparse-keymap)) | 4813 | (defvar org-mouse-map (make-sparse-keymap)) |
| @@ -5581,14 +5616,17 @@ needs to be inserted at a specific position in the font-lock sequence.") | |||
| 5581 | (defvar org-l nil) | 5616 | (defvar org-l nil) |
| 5582 | (defvar org-f nil) | 5617 | (defvar org-f nil) |
| 5583 | (defun org-get-level-face (n) | 5618 | (defun org-get-level-face (n) |
| 5584 | "Get the right face for match N in font-lock matching of headlines." | 5619 | "Get the right face for match N in font-lock matching of headlines." |
| 5585 | (setq org-l (- (match-end 2) (match-beginning 1) 1)) | 5620 | (setq org-l (- (match-end 2) (match-beginning 1) 1)) |
| 5586 | (if org-odd-levels-only (setq org-l (1+ (/ org-l 2)))) | 5621 | (if org-odd-levels-only (setq org-l (1+ (/ org-l 2)))) |
| 5587 | (setq org-f (nth (% (1- org-l) org-n-level-faces) org-level-faces)) | 5622 | (if org-cycle-level-faces |
| 5588 | (cond | 5623 | (setq org-f (nth (% (1- org-l) org-n-level-faces) org-level-faces)) |
| 5589 | ((eq n 1) (if org-hide-leading-stars 'org-hide org-f)) | 5624 | (setq org-f (nth (1- (min org-l org-n-level-faces)) org-level-faces))) |
| 5590 | ((eq n 2) org-f) | 5625 | (cond |
| 5591 | (t (if org-level-color-stars-only nil org-f)))) | 5626 | ((eq n 1) (if org-hide-leading-stars 'org-hide org-f)) |
| 5627 | ((eq n 2) org-f) | ||
| 5628 | (t (if org-level-color-stars-only nil org-f)))) | ||
| 5629 | |||
| 5592 | 5630 | ||
| 5593 | (defun org-get-todo-face (kwd) | 5631 | (defun org-get-todo-face (kwd) |
| 5594 | "Get the right face for a TODO keyword KWD. | 5632 | "Get the right face for a TODO keyword KWD. |
| @@ -6040,8 +6078,8 @@ With a numeric prefix, show all headlines up to that level." | |||
| 6040 | (interactive) | 6078 | (interactive) |
| 6041 | (let (org-show-entry-below state) | 6079 | (let (org-show-entry-below state) |
| 6042 | (save-excursion | 6080 | (save-excursion |
| 6043 | (goto-char (point-max)) | 6081 | (goto-char (point-min)) |
| 6044 | (while (re-search-backward | 6082 | (while (re-search-forward |
| 6045 | "^[ \t]*:VISIBILITY:[ \t]+\\([a-z]+\\)" | 6083 | "^[ \t]*:VISIBILITY:[ \t]+\\([a-z]+\\)" |
| 6046 | nil t) | 6084 | nil t) |
| 6047 | (setq state (match-string 1)) | 6085 | (setq state (match-string 1)) |
| @@ -6982,11 +7020,12 @@ in the region." | |||
| 6982 | "Return the level of the current entry, or nil if before the first headline. | 7020 | "Return the level of the current entry, or nil if before the first headline. |
| 6983 | The level is the number of stars at the beginning of the headline." | 7021 | The level is the number of stars at the beginning of the headline." |
| 6984 | (save-excursion | 7022 | (save-excursion |
| 6985 | (condition-case nil | 7023 | (let ((outline-regexp (org-get-limited-outline-regexp))) |
| 6986 | (progn | 7024 | (condition-case nil |
| 6987 | (org-back-to-heading t) | 7025 | (progn |
| 6988 | (funcall outline-level)) | 7026 | (org-back-to-heading t) |
| 6989 | (error nil)))) | 7027 | (funcall outline-level)) |
| 7028 | (error nil))))) | ||
| 6990 | 7029 | ||
| 6991 | (defun org-get-previous-line-level () | 7030 | (defun org-get-previous-line-level () |
| 6992 | "Return the outline depth of the last headline before the current line. | 7031 | "Return the outline depth of the last headline before the current line. |
| @@ -7501,12 +7540,13 @@ If yes, remember the marker and the distance to BEG." | |||
| 7501 | (narrow-to-region | 7540 | (narrow-to-region |
| 7502 | (progn (org-back-to-heading t) (point)) | 7541 | (progn (org-back-to-heading t) (point)) |
| 7503 | (progn (org-end-of-subtree t t) | 7542 | (progn (org-end-of-subtree t t) |
| 7504 | (if (org-on-heading-p) (backward-char 1)) | 7543 | (if (and (org-on-heading-p) (not (eobp))) (backward-char 1)) |
| 7505 | (point)))))) | 7544 | (point)))))) |
| 7506 | 7545 | ||
| 7507 | (eval-when-compile | 7546 | (eval-when-compile |
| 7508 | (defvar org-property-drawer-re)) | 7547 | (defvar org-property-drawer-re)) |
| 7509 | 7548 | ||
| 7549 | (defvar org-property-start-re) ;; defined below | ||
| 7510 | (defun org-clone-subtree-with-time-shift (n &optional shift) | 7550 | (defun org-clone-subtree-with-time-shift (n &optional shift) |
| 7511 | "Clone the task (subtree) at point N times. | 7551 | "Clone the task (subtree) at point N times. |
| 7512 | The clones will be inserted as siblings. | 7552 | The clones will be inserted as siblings. |
| @@ -7570,7 +7610,7 @@ and still retain the repeater to cover future instances of the task." | |||
| 7570 | (and idprop (if org-clone-delete-id | 7610 | (and idprop (if org-clone-delete-id |
| 7571 | (org-entry-delete nil "ID") | 7611 | (org-entry-delete nil "ID") |
| 7572 | (org-id-get-create t))) | 7612 | (org-id-get-create t))) |
| 7573 | (while (re-search-forward org-property-drawer-re nil t) | 7613 | (while (re-search-forward org-property-start-re nil t) |
| 7574 | (org-remove-empty-drawer-at "PROPERTIES" (point))) | 7614 | (org-remove-empty-drawer-at "PROPERTIES" (point))) |
| 7575 | (goto-char (point-min)) | 7615 | (goto-char (point-min)) |
| 7576 | (when doshift | 7616 | (when doshift |
| @@ -8468,7 +8508,8 @@ according to FMT (default from `org-email-link-description-format')." | |||
| 8468 | (defun org-make-org-heading-search-string (&optional string heading) | 8508 | (defun org-make-org-heading-search-string (&optional string heading) |
| 8469 | "Make search string for STRING or current headline." | 8509 | "Make search string for STRING or current headline." |
| 8470 | (interactive) | 8510 | (interactive) |
| 8471 | (let ((s (or string (org-get-heading)))) | 8511 | (let ((s (or string (org-get-heading))) |
| 8512 | (lines org-context-in-file-links)) | ||
| 8472 | (unless (and string (not heading)) | 8513 | (unless (and string (not heading)) |
| 8473 | ;; We are using a headline, clean up garbage in there. | 8514 | ;; We are using a headline, clean up garbage in there. |
| 8474 | (if (string-match org-todo-regexp s) | 8515 | (if (string-match org-todo-regexp s) |
| @@ -8482,6 +8523,13 @@ according to FMT (default from `org-email-link-description-format')." | |||
| 8482 | (while (string-match org-ts-regexp s) | 8523 | (while (string-match org-ts-regexp s) |
| 8483 | (setq s (replace-match "" t t s)))) | 8524 | (setq s (replace-match "" t t s)))) |
| 8484 | (or string (setq s (concat "*" s))) ; Add * for headlines | 8525 | (or string (setq s (concat "*" s))) ; Add * for headlines |
| 8526 | (when (and string (integerp lines) (> lines 0)) | ||
| 8527 | (let ((slines (org-split-string s "\n"))) | ||
| 8528 | (when (< lines (length slines)) | ||
| 8529 | (setq s (mapconcat | ||
| 8530 | 'identity | ||
| 8531 | (reverse (nthcdr (- (length slines) lines) | ||
| 8532 | (reverse slines))) "\n"))))) | ||
| 8485 | (mapconcat 'identity (org-split-string s "[ \t]+") " "))) | 8533 | (mapconcat 'identity (org-split-string s "[ \t]+") " "))) |
| 8486 | 8534 | ||
| 8487 | (defun org-make-link (&rest strings) | 8535 | (defun org-make-link (&rest strings) |
| @@ -9054,7 +9102,8 @@ application the system uses for this file type." | |||
| 9054 | (progn (require 'org-attach) (org-attach-reveal 'if-exists)))) | 9102 | (progn (require 'org-attach) (org-attach-reveal 'if-exists)))) |
| 9055 | ((run-hook-with-args-until-success 'org-open-at-point-functions)) | 9103 | ((run-hook-with-args-until-success 'org-open-at-point-functions)) |
| 9056 | ((org-at-timestamp-p t) (org-follow-timestamp-link)) | 9104 | ((org-at-timestamp-p t) (org-follow-timestamp-link)) |
| 9057 | ((or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) | 9105 | ((and (or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) |
| 9106 | (not (org-in-regexp org-bracket-link-regexp))) | ||
| 9058 | (org-footnote-action)) | 9107 | (org-footnote-action)) |
| 9059 | (t | 9108 | (t |
| 9060 | (let (type path link line search (pos (point))) | 9109 | (let (type path link line search (pos (point))) |
| @@ -9170,10 +9219,6 @@ application the system uses for this file type." | |||
| 9170 | (dired path) | 9219 | (dired path) |
| 9171 | (org-open-file path in-emacs line search))) | 9220 | (org-open-file path in-emacs line search))) |
| 9172 | 9221 | ||
| 9173 | ((string= type "news") | ||
| 9174 | (require 'org-gnus) | ||
| 9175 | (org-gnus-follow-link path)) | ||
| 9176 | |||
| 9177 | ((string= type "shell") | 9222 | ((string= type "shell") |
| 9178 | (let ((cmd path)) | 9223 | (let ((cmd path)) |
| 9179 | (if (or (not org-confirm-shell-link-function) | 9224 | (if (or (not org-confirm-shell-link-function) |
| @@ -10464,6 +10509,7 @@ blocks in the buffer." | |||
| 10464 | "Update the dynamic block at point. | 10509 | "Update the dynamic block at point. |
| 10465 | This means to empty the block, parse for parameters and then call | 10510 | This means to empty the block, parse for parameters and then call |
| 10466 | the correct writing function." | 10511 | the correct writing function." |
| 10512 | (interactive) | ||
| 10467 | (save-window-excursion | 10513 | (save-window-excursion |
| 10468 | (let* ((pos (point)) | 10514 | (let* ((pos (point)) |
| 10469 | (line (org-current-line)) | 10515 | (line (org-current-line)) |
| @@ -10505,6 +10551,7 @@ Error if there is no such block at point." | |||
| 10505 | (defun org-update-all-dblocks () | 10551 | (defun org-update-all-dblocks () |
| 10506 | "Update all dynamic blocks in the buffer. | 10552 | "Update all dynamic blocks in the buffer. |
| 10507 | This function can be used in a hook." | 10553 | This function can be used in a hook." |
| 10554 | (interactive) | ||
| 10508 | (when (org-mode-p) | 10555 | (when (org-mode-p) |
| 10509 | (org-map-dblocks 'org-update-dblock))) | 10556 | (org-map-dblocks 'org-update-dblock))) |
| 10510 | 10557 | ||
| @@ -10512,10 +10559,10 @@ This function can be used in a hook." | |||
| 10512 | ;;;; Completion | 10559 | ;;;; Completion |
| 10513 | 10560 | ||
| 10514 | (defconst org-additional-option-like-keywords | 10561 | (defconst org-additional-option-like-keywords |
| 10515 | '("BEGIN_HTML" "END_HTML" "HTML:" "ATTR_HTML" | 10562 | '("BEGIN_HTML" "END_HTML" "HTML:" "ATTR_HTML:" |
| 10516 | "BEGIN_DocBook" "END_DocBook" "DocBook:" "ATTR_DocBook" | 10563 | "BEGIN_DocBook" "END_DocBook" "DocBook:" "ATTR_DocBook:" |
| 10517 | "BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" | 10564 | "BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" |
| 10518 | "LATEX_CLASS:" "LATEX_CLASS_OPTIONS:" "ATTR_LaTeX" | 10565 | "LATEX_CLASS:" "LATEX_CLASS_OPTIONS:" "ATTR_LaTeX:" |
| 10519 | "BEGIN:" "END:" | 10566 | "BEGIN:" "END:" |
| 10520 | "ORGTBL" "TBLFM:" "TBLNAME:" | 10567 | "ORGTBL" "TBLFM:" "TBLNAME:" |
| 10521 | "BEGIN_EXAMPLE" "END_EXAMPLE" | 10568 | "BEGIN_EXAMPLE" "END_EXAMPLE" |
| @@ -10523,11 +10570,17 @@ This function can be used in a hook." | |||
| 10523 | "BEGIN_VERSE" "END_VERSE" | 10570 | "BEGIN_VERSE" "END_VERSE" |
| 10524 | "BEGIN_CENTER" "END_CENTER" | 10571 | "BEGIN_CENTER" "END_CENTER" |
| 10525 | "BEGIN_SRC" "END_SRC" | 10572 | "BEGIN_SRC" "END_SRC" |
| 10526 | "CATEGORY" "COLUMNS" "PROPERTY" | 10573 | "BEGIN_RESULT" "END_RESULT" |
| 10527 | "CAPTION" "LABEL" | 10574 | "SOURCE:" "SRCNAME:" "FUNCTION:" |
| 10528 | "SETUPFILE" | 10575 | "RESULTS:" |
| 10529 | "BIND" | 10576 | "HEADER:" "HEADERS:" |
| 10530 | "MACRO")) | 10577 | "BABEL:" |
| 10578 | "CATEGORY:" "COLUMNS:" "PROPERTY:" | ||
| 10579 | "CAPTION:" "LABEL:" | ||
| 10580 | "SETUPFILE:" | ||
| 10581 | "INCLUDE:" | ||
| 10582 | "BIND:" | ||
| 10583 | "MACRO:")) | ||
| 10531 | 10584 | ||
| 10532 | (defcustom org-structure-template-alist | 10585 | (defcustom org-structure-template-alist |
| 10533 | '( | 10586 | '( |
| @@ -10609,137 +10662,6 @@ expands them." | |||
| 10609 | (insert rpl) | 10662 | (insert rpl) |
| 10610 | (if (re-search-backward "\\?" start t) (delete-char 1)))) | 10663 | (if (re-search-backward "\\?" start t) (delete-char 1)))) |
| 10611 | 10664 | ||
| 10612 | |||
| 10613 | (defun org-complete (&optional arg) | ||
| 10614 | "Perform completion on word at point. | ||
| 10615 | At the beginning of a headline, this completes TODO keywords as given in | ||
| 10616 | `org-todo-keywords'. | ||
| 10617 | If the current word is preceded by a backslash, completes the TeX symbols | ||
| 10618 | that are supported for HTML support. | ||
| 10619 | If the current word is preceded by \"#+\", completes special words for | ||
| 10620 | setting file options. | ||
| 10621 | In the line after \"#+STARTUP:, complete valid keywords.\" | ||
| 10622 | At all other locations, this simply calls the value of | ||
| 10623 | `org-completion-fallback-command'." | ||
| 10624 | (interactive "P") | ||
| 10625 | (org-without-partial-completion | ||
| 10626 | (catch 'exit | ||
| 10627 | (let* ((a nil) | ||
| 10628 | (end (point)) | ||
| 10629 | (beg1 (save-excursion | ||
| 10630 | (skip-chars-backward (org-re "[:alnum:]_@#%")) | ||
| 10631 | (point))) | ||
| 10632 | (beg (save-excursion | ||
| 10633 | (skip-chars-backward "a-zA-Z0-9_:$") | ||
| 10634 | (point))) | ||
| 10635 | (confirm (lambda (x) (stringp (car x)))) | ||
| 10636 | (searchhead (equal (char-before beg) ?*)) | ||
| 10637 | (struct | ||
| 10638 | (when (and (member (char-before beg1) '(?. ?<)) | ||
| 10639 | (setq a (assoc (buffer-substring beg1 (point)) | ||
| 10640 | org-structure-template-alist))) | ||
| 10641 | (org-complete-expand-structure-template (1- beg1) a) | ||
| 10642 | (throw 'exit t))) | ||
| 10643 | (tag (and (equal (char-before beg1) ?:) | ||
| 10644 | (equal (char-after (point-at-bol)) ?*))) | ||
| 10645 | (prop (or (and (equal (char-before beg1) ?:) | ||
| 10646 | (not (equal (char-after (point-at-bol)) ?*))) | ||
| 10647 | (string-match "^#\\+PROPERTY:.*" | ||
| 10648 | (buffer-substring (point-at-bol) (point))))) | ||
| 10649 | (texp (equal (char-before beg) ?\\)) | ||
| 10650 | (link (equal (char-before beg) ?\[)) | ||
| 10651 | (opt (equal (buffer-substring (max (point-at-bol) (- beg 2)) | ||
| 10652 | beg) | ||
| 10653 | "#+")) | ||
| 10654 | (startup (string-match "^#\\+STARTUP:.*" | ||
| 10655 | (buffer-substring (point-at-bol) (point)))) | ||
| 10656 | (completion-ignore-case opt) | ||
| 10657 | (type nil) | ||
| 10658 | (tbl nil) | ||
| 10659 | (table (cond | ||
| 10660 | (opt | ||
| 10661 | (setq type :opt) | ||
| 10662 | (require 'org-exp) | ||
| 10663 | (append | ||
| 10664 | (delq nil | ||
| 10665 | (mapcar | ||
| 10666 | (lambda (x) | ||
| 10667 | (if (string-match | ||
| 10668 | "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x) | ||
| 10669 | (cons (match-string 2 x) | ||
| 10670 | (match-string 1 x)))) | ||
| 10671 | (org-split-string (org-get-current-options) "\n"))) | ||
| 10672 | (mapcar 'list org-additional-option-like-keywords))) | ||
| 10673 | (startup | ||
| 10674 | (setq type :startup) | ||
| 10675 | org-startup-options) | ||
| 10676 | (link (append org-link-abbrev-alist-local | ||
| 10677 | org-link-abbrev-alist)) | ||
| 10678 | (texp | ||
| 10679 | (setq type :tex) | ||
| 10680 | (append org-entities-user org-entities)) | ||
| 10681 | ((string-match "\\`\\*+[ \t]+\\'" | ||
| 10682 | (buffer-substring (point-at-bol) beg)) | ||
| 10683 | (setq type :todo) | ||
| 10684 | (mapcar 'list org-todo-keywords-1)) | ||
| 10685 | (searchhead | ||
| 10686 | (setq type :searchhead) | ||
| 10687 | (save-excursion | ||
| 10688 | (goto-char (point-min)) | ||
| 10689 | (while (re-search-forward org-todo-line-regexp nil t) | ||
| 10690 | (push (list | ||
| 10691 | (org-make-org-heading-search-string | ||
| 10692 | (match-string 3) t)) | ||
| 10693 | tbl))) | ||
| 10694 | tbl) | ||
| 10695 | (tag (setq type :tag beg beg1) | ||
| 10696 | (or org-tag-alist (org-get-buffer-tags))) | ||
| 10697 | (prop (setq type :prop beg beg1) | ||
| 10698 | (mapcar 'list (org-buffer-property-keys nil t t))) | ||
| 10699 | (t (progn | ||
| 10700 | (call-interactively org-completion-fallback-command) | ||
| 10701 | (throw 'exit nil))))) | ||
| 10702 | (pattern (buffer-substring-no-properties beg end)) | ||
| 10703 | (completion (try-completion pattern table confirm))) | ||
| 10704 | (cond ((eq completion t) | ||
| 10705 | (if (not (assoc (upcase pattern) table)) | ||
| 10706 | (message "Already complete") | ||
| 10707 | (if (and (equal type :opt) | ||
| 10708 | (not (member (car (assoc (upcase pattern) table)) | ||
| 10709 | org-additional-option-like-keywords))) | ||
| 10710 | (insert (substring (cdr (assoc (upcase pattern) table)) | ||
| 10711 | (length pattern))) | ||
| 10712 | (if (memq type '(:tag :prop)) (insert ":"))))) | ||
| 10713 | ((null completion) | ||
| 10714 | (message "Can't find completion for \"%s\"" pattern) | ||
| 10715 | (ding)) | ||
| 10716 | ((not (string= pattern completion)) | ||
| 10717 | (delete-region beg end) | ||
| 10718 | (if (string-match " +$" completion) | ||
| 10719 | (setq completion (replace-match "" t t completion))) | ||
| 10720 | (insert completion) | ||
| 10721 | (if (get-buffer-window "*Completions*") | ||
| 10722 | (delete-window (get-buffer-window "*Completions*"))) | ||
| 10723 | (if (assoc completion table) | ||
| 10724 | (if (eq type :todo) (insert " ") | ||
| 10725 | (if (and (memq type '(:tag :prop)) | ||
| 10726 | (not (string-match "^#[ \t]*\\+property:" | ||
| 10727 | (org-current-line-string t)))) | ||
| 10728 | (insert ":")))) | ||
| 10729 | (if (and (equal type :opt) (assoc completion table)) | ||
| 10730 | (message "%s" (substitute-command-keys | ||
| 10731 | "Press \\[org-complete] again to insert example settings")))) | ||
| 10732 | (t | ||
| 10733 | (message "Making completion list...") | ||
| 10734 | (let ((list (sort (all-completions pattern table confirm) | ||
| 10735 | 'string<))) | ||
| 10736 | (with-output-to-temp-buffer "*Completions*" | ||
| 10737 | (condition-case nil | ||
| 10738 | ;; Protection needed for XEmacs and emacs 21 | ||
| 10739 | (display-completion-list list pattern) | ||
| 10740 | (error (display-completion-list list))))) | ||
| 10741 | (message "Making completion list...%s" "done"))))))) | ||
| 10742 | |||
| 10743 | ;;;; TODO, DEADLINE, Comments | 10665 | ;;;; TODO, DEADLINE, Comments |
| 10744 | 10666 | ||
| 10745 | (defun org-toggle-comment () | 10667 | (defun org-toggle-comment () |
| @@ -11962,13 +11884,13 @@ T Show entries with a specific TODO keyword. | |||
| 11962 | m Show entries selected by a tags/property match. | 11884 | m Show entries selected by a tags/property match. |
| 11963 | p Enter a property name and its value (both with completion on existing | 11885 | p Enter a property name and its value (both with completion on existing |
| 11964 | names/values) and show entries with that property. | 11886 | names/values) and show entries with that property. |
| 11965 | / Show entries matching a regular expression (`r' can be used as well) | 11887 | r Show entries matching a regular expression (`/' can be used as well) |
| 11966 | d Show deadlines due within `org-deadline-warning-days'. | 11888 | d Show deadlines due within `org-deadline-warning-days'. |
| 11967 | b Show deadlines and scheduled items before a date. | 11889 | b Show deadlines and scheduled items before a date. |
| 11968 | a Show deadlines and scheduled items after a date." | 11890 | a Show deadlines and scheduled items after a date." |
| 11969 | (interactive "P") | 11891 | (interactive "P") |
| 11970 | (let (ans kwd value) | 11892 | (let (ans kwd value) |
| 11971 | (message "Sparse tree: [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty [d]eadlines\n [b]efore-date [a]fter-date") | 11893 | (message "Sparse tree: [r]egexp [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date") |
| 11972 | (setq ans (read-char-exclusive)) | 11894 | (setq ans (read-char-exclusive)) |
| 11973 | (cond | 11895 | (cond |
| 11974 | ((equal ans ?d) | 11896 | ((equal ans ?d) |
| @@ -12213,11 +12135,13 @@ ACTION can be `set', `up', `down', or a character." | |||
| 12213 | 12135 | ||
| 12214 | (defun org-get-priority (s) | 12136 | (defun org-get-priority (s) |
| 12215 | "Find priority cookie and return priority." | 12137 | "Find priority cookie and return priority." |
| 12216 | (save-match-data | 12138 | (if (functionp org-get-priority-function) |
| 12217 | (if (not (string-match org-priority-regexp s)) | 12139 | (funcall org-get-priority-function) |
| 12218 | (* 1000 (- org-lowest-priority org-default-priority)) | 12140 | (save-match-data |
| 12219 | (* 1000 (- org-lowest-priority | 12141 | (if (not (string-match org-priority-regexp s)) |
| 12220 | (string-to-char (match-string 2 s))))))) | 12142 | (* 1000 (- org-lowest-priority org-default-priority)) |
| 12143 | (* 1000 (- org-lowest-priority | ||
| 12144 | (string-to-char (match-string 2 s)))))))) | ||
| 12221 | 12145 | ||
| 12222 | ;;;; Tags | 12146 | ;;;; Tags |
| 12223 | 12147 | ||
| @@ -12458,7 +12382,7 @@ also TODO lines." | |||
| 12458 | minus tag mm | 12382 | minus tag mm |
| 12459 | tagsmatch todomatch tagsmatcher todomatcher kwd matcher | 12383 | tagsmatch todomatch tagsmatcher todomatcher kwd matcher |
| 12460 | orterms term orlist re-p str-p level-p level-op time-p | 12384 | orterms term orlist re-p str-p level-p level-op time-p |
| 12461 | prop-p pn pv po cat-p gv rest) | 12385 | prop-p pn pv po gv rest) |
| 12462 | (if (string-match "/+" match) | 12386 | (if (string-match "/+" match) |
| 12463 | ;; match contains also a todo-matching request | 12387 | ;; match contains also a todo-matching request |
| 12464 | (progn | 12388 | (progn |
| @@ -12498,7 +12422,6 @@ also TODO lines." | |||
| 12498 | (setq pn (match-string 5 term) | 12422 | (setq pn (match-string 5 term) |
| 12499 | po (match-string 6 term) | 12423 | po (match-string 6 term) |
| 12500 | pv (match-string 7 term) | 12424 | pv (match-string 7 term) |
| 12501 | cat-p (equal pn "CATEGORY") | ||
| 12502 | re-p (equal (string-to-char pv) ?{) | 12425 | re-p (equal (string-to-char pv) ?{) |
| 12503 | str-p (equal (string-to-char pv) ?\") | 12426 | str-p (equal (string-to-char pv) ?\") |
| 12504 | time-p (save-match-data | 12427 | time-p (save-match-data |
| @@ -13459,7 +13382,7 @@ if the property key was used several times. | |||
| 13459 | POM may also be nil, in which case the current entry is used. | 13382 | POM may also be nil, in which case the current entry is used. |
| 13460 | If WHICH is nil or `all', get all properties. If WHICH is | 13383 | If WHICH is nil or `all', get all properties. If WHICH is |
| 13461 | `special' or `standard', only get that subclass. If WHICH | 13384 | `special' or `standard', only get that subclass. If WHICH |
| 13462 | is a string only get exactly this property. Specific can be a string, the | 13385 | is a string only get exactly this property. SPECIFIC can be a string, the |
| 13463 | specific property we are interested in. Specifying it can speed | 13386 | specific property we are interested in. Specifying it can speed |
| 13464 | things up because then unnecessary parsing is avoided." | 13387 | things up because then unnecessary parsing is avoided." |
| 13465 | (setq which (or which 'all)) | 13388 | (setq which (or which 'all)) |
| @@ -15025,7 +14948,7 @@ D may be an absolute day number, or a calendar-type list (month day year)." | |||
| 15025 | (org-current-line) | 14948 | (org-current-line) |
| 15026 | (buffer-file-name) sexp) | 14949 | (buffer-file-name) sexp) |
| 15027 | (sleep-for 2)))))) | 14950 | (sleep-for 2)))))) |
| 15028 | (cond ((stringp result) result) | 14951 | (cond ((stringp result) (split-string result "; ")) |
| 15029 | ((and (consp result) | 14952 | ((and (consp result) |
| 15030 | (not (consp (cdr result))) | 14953 | (not (consp (cdr result))) |
| 15031 | (stringp (cdr result))) (cdr result)) | 14954 | (stringp (cdr result))) (cdr result)) |
| @@ -16285,9 +16208,9 @@ BEG and END default to the buffer boundaries." | |||
| 16285 | (org-defkey org-mode-map "\C-i" 'org-cycle) | 16208 | (org-defkey org-mode-map "\C-i" 'org-cycle) |
| 16286 | (org-defkey org-mode-map [(tab)] 'org-cycle) | 16209 | (org-defkey org-mode-map [(tab)] 'org-cycle) |
| 16287 | (org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived) | 16210 | (org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived) |
| 16288 | (org-defkey org-mode-map [(meta tab)] 'org-complete) | 16211 | (org-defkey org-mode-map [(meta tab)] 'pcomplete) |
| 16289 | (org-defkey org-mode-map "\M-\t" 'org-complete) | 16212 | (org-defkey org-mode-map "\M-\t" 'pcomplete) |
| 16290 | (org-defkey org-mode-map "\M-\C-i" 'org-complete) | 16213 | (org-defkey org-mode-map "\M-\C-i" 'pcomplete) |
| 16291 | ;; The following line is necessary under Suse GNU/Linux | 16214 | ;; The following line is necessary under Suse GNU/Linux |
| 16292 | (unless (featurep 'xemacs) | 16215 | (unless (featurep 'xemacs) |
| 16293 | (org-defkey org-mode-map [S-iso-lefttab] 'org-shifttab)) | 16216 | (org-defkey org-mode-map [S-iso-lefttab] 'org-shifttab)) |
| @@ -16352,7 +16275,7 @@ BEG and END default to the buffer boundaries." | |||
| 16352 | (org-defkey org-mode-map [?\C-c (right)] 'org-shiftright) | 16275 | (org-defkey org-mode-map [?\C-c (right)] 'org-shiftright) |
| 16353 | (org-defkey org-mode-map [?\C-c ?\C-x (right)] 'org-shiftcontrolright) | 16276 | (org-defkey org-mode-map [?\C-c ?\C-x (right)] 'org-shiftcontrolright) |
| 16354 | (org-defkey org-mode-map [?\C-c ?\C-x (left)] 'org-shiftcontrolleft) | 16277 | (org-defkey org-mode-map [?\C-c ?\C-x (left)] 'org-shiftcontrolleft) |
| 16355 | (org-defkey org-mode-map [?\e (tab)] 'org-complete) | 16278 | (org-defkey org-mode-map [?\e (tab)] 'pcomplete) |
| 16356 | (org-defkey org-mode-map [?\e (shift return)] 'org-insert-todo-heading) | 16279 | (org-defkey org-mode-map [?\e (shift return)] 'org-insert-todo-heading) |
| 16357 | (org-defkey org-mode-map [?\e (shift left)] 'org-shiftmetaleft) | 16280 | (org-defkey org-mode-map [?\e (shift left)] 'org-shiftmetaleft) |
| 16358 | (org-defkey org-mode-map [?\e (shift right)] 'org-shiftmetaright) | 16281 | (org-defkey org-mode-map [?\e (shift right)] 'org-shiftmetaright) |
| @@ -16433,6 +16356,7 @@ BEG and END default to the buffer boundaries." | |||
| 16433 | (org-defkey org-mode-map "\C-c\C-xf" 'org-footnote-action) | 16356 | (org-defkey org-mode-map "\C-c\C-xf" 'org-footnote-action) |
| 16434 | (org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull) | 16357 | (org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull) |
| 16435 | (org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push) | 16358 | (org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push) |
| 16359 | (org-defkey org-mode-map "\C-c@" 'org-mark-subtree) | ||
| 16436 | (org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree) | 16360 | (org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree) |
| 16437 | ;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree) | 16361 | ;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree) |
| 16438 | 16362 | ||
| @@ -16506,7 +16430,7 @@ BEG and END default to the buffer boundaries." | |||
| 16506 | ("^" . org-sort) | 16430 | ("^" . org-sort) |
| 16507 | ("w" . org-refile) | 16431 | ("w" . org-refile) |
| 16508 | ("a" . org-archive-subtree-default-with-confirmation) | 16432 | ("a" . org-archive-subtree-default-with-confirmation) |
| 16509 | ("." . outline-mark-subtree) | 16433 | ("." . org-mark-subtree) |
| 16510 | ("Clock Commands") | 16434 | ("Clock Commands") |
| 16511 | ("I" . org-clock-in) | 16435 | ("I" . org-clock-in) |
| 16512 | ("O" . org-clock-out) | 16436 | ("O" . org-clock-out) |
| @@ -17246,11 +17170,13 @@ When in an #+include line, visit the include file. Otherwise call | |||
| 17246 | ((org-edit-fixed-width-region)) | 17170 | ((org-edit-fixed-width-region)) |
| 17247 | ((org-at-table.el-p) | 17171 | ((org-at-table.el-p) |
| 17248 | (org-edit-src-code)) | 17172 | (org-edit-src-code)) |
| 17249 | ((org-at-table-p) | 17173 | ((or (org-at-table-p) |
| 17174 | (save-excursion | ||
| 17175 | (beginning-of-line 1) | ||
| 17176 | (looking-at "[ \t]*#\\+TBLFM:"))) | ||
| 17250 | (call-interactively 'org-table-edit-formulas)) | 17177 | (call-interactively 'org-table-edit-formulas)) |
| 17251 | (t (call-interactively 'ffap)))) | 17178 | (t (call-interactively 'ffap)))) |
| 17252 | 17179 | ||
| 17253 | |||
| 17254 | (defun org-ctrl-c-ctrl-c (&optional arg) | 17180 | (defun org-ctrl-c-ctrl-c (&optional arg) |
| 17255 | "Set tags in headline, or update according to changed information at point. | 17181 | "Set tags in headline, or update according to changed information at point. |
| 17256 | 17182 | ||
| @@ -17324,7 +17250,8 @@ This command does many different things, depending on context: | |||
| 17324 | (if arg | 17250 | (if arg |
| 17325 | (call-interactively 'org-table-recalculate) | 17251 | (call-interactively 'org-table-recalculate) |
| 17326 | (org-table-maybe-recalculate-line)) | 17252 | (org-table-maybe-recalculate-line)) |
| 17327 | (call-interactively 'org-table-align)) | 17253 | (call-interactively 'org-table-align) |
| 17254 | (orgtbl-send-table 'maybe)) | ||
| 17328 | ((or (org-footnote-at-reference-p) | 17255 | ((or (org-footnote-at-reference-p) |
| 17329 | (org-footnote-at-definition-p)) | 17256 | (org-footnote-at-definition-p)) |
| 17330 | (call-interactively 'org-footnote-action)) | 17257 | (call-interactively 'org-footnote-action)) |
| @@ -17681,7 +17608,7 @@ See the individual commands for more information." | |||
| 17681 | ("Select keyword" | 17608 | ("Select keyword" |
| 17682 | ["Next keyword" org-shiftright (org-on-heading-p)] | 17609 | ["Next keyword" org-shiftright (org-on-heading-p)] |
| 17683 | ["Previous keyword" org-shiftleft (org-on-heading-p)] | 17610 | ["Previous keyword" org-shiftleft (org-on-heading-p)] |
| 17684 | ["Complete Keyword" org-complete (assq :todo-keyword (org-context))] | 17611 | ["Complete Keyword" pcomplete (assq :todo-keyword (org-context))] |
| 17685 | ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))] | 17612 | ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))] |
| 17686 | ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))]) | 17613 | ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))]) |
| 17687 | ["Show TODO Tree" org-show-todo-tree :active t :keys "C-c / t"] | 17614 | ["Show TODO Tree" org-show-todo-tree :active t :keys "C-c / t"] |
| @@ -18066,6 +17993,23 @@ upon the next fontification round." | |||
| 18066 | (setq l (- l (get-text-property b 'org-dwidth-n s)))) | 17993 | (setq l (- l (get-text-property b 'org-dwidth-n s)))) |
| 18067 | l)) | 17994 | l)) |
| 18068 | 17995 | ||
| 17996 | (defun org-shorten-string (s maxlength) | ||
| 17997 | "Shorten string S so tht it is no longer than MAXLENGTH characters. | ||
| 17998 | If the string is shorter or has length MAXLENGTH, just return the | ||
| 17999 | original string. If it is longer, the functions finds a space in the | ||
| 18000 | string, breaks this string off at that locations and adds three dots | ||
| 18001 | as ellipsis. Including the ellipsis, the string will not be longer | ||
| 18002 | than MAXLENGTH. If finding a good breaking point in the string does | ||
| 18003 | not work, the string is just chopped off in the middle of a word | ||
| 18004 | if necessary." | ||
| 18005 | (if (<= (length s) maxlength) | ||
| 18006 | s | ||
| 18007 | (let* ((n (max (- maxlength 4) 1)) | ||
| 18008 | (re (concat "\\`\\(.\\{1," (int-to-string n) "\\}[^ ]\\)\\([ ]\\|\\'\\)"))) | ||
| 18009 | (if (string-match re s) | ||
| 18010 | (concat (match-string 1 s) "...") | ||
| 18011 | (concat (substring s 0 (max (- maxlength 3) 0)) "..."))))) | ||
| 18012 | |||
| 18069 | (defun org-get-indentation (&optional line) | 18013 | (defun org-get-indentation (&optional line) |
| 18070 | "Get the indentation of the current line, interpreting tabs. | 18014 | "Get the indentation of the current line, interpreting tabs. |
| 18071 | When LINE is given, assume it represents a line and compute its indentation." | 18015 | When LINE is given, assume it represents a line and compute its indentation." |
| @@ -18636,11 +18580,36 @@ which make use of the date at the cursor." | |||
| 18636 | (message | 18580 | (message |
| 18637 | "Entry marked for action; press `k' at desired date in agenda or calendar")) | 18581 | "Entry marked for action; press `k' at desired date in agenda or calendar")) |
| 18638 | 18582 | ||
| 18583 | (defun org-mark-subtree () | ||
| 18584 | "Mark the current subtree. | ||
| 18585 | This puts point at the start of the current subtree, and mark at the end. | ||
| 18586 | |||
| 18587 | If point is in an inline task, mark that task instead." | ||
| 18588 | (interactive) | ||
| 18589 | (let ((inline-task-p | ||
| 18590 | (and (featurep 'org-inlinetask) | ||
| 18591 | (org-inlinetask-in-task-p))) | ||
| 18592 | (beg)) | ||
| 18593 | ;; Get beginning of subtree | ||
| 18594 | (cond | ||
| 18595 | (inline-task-p (org-inlinetask-goto-beginning)) | ||
| 18596 | ((org-at-heading-p) (beginning-of-line)) | ||
| 18597 | (t (let ((outline-regexp (org-get-limited-outline-regexp))) | ||
| 18598 | (outline-previous-visible-heading 1)))) | ||
| 18599 | (setq beg (point)) | ||
| 18600 | ;; Get end of it | ||
| 18601 | (if inline-task-p | ||
| 18602 | (org-inlinetask-goto-end) | ||
| 18603 | (org-end-of-subtree)) | ||
| 18604 | ;; Mark zone | ||
| 18605 | (push-mark (point) nil t) | ||
| 18606 | (goto-char beg))) | ||
| 18607 | |||
| 18639 | ;;; Paragraph filling stuff. | 18608 | ;;; Paragraph filling stuff. |
| 18640 | ;; We want this to be just right, so use the full arsenal. | 18609 | ;; We want this to be just right, so use the full arsenal. |
| 18641 | 18610 | ||
| 18642 | (defun org-indent-line-function () | 18611 | (defun org-indent-line-function () |
| 18643 | "Indent line like previous, but further if previous was headline or item." | 18612 | "Indent line depending on context." |
| 18644 | (interactive) | 18613 | (interactive) |
| 18645 | (let* ((pos (point)) | 18614 | (let* ((pos (point)) |
| 18646 | (itemp (org-at-item-p)) | 18615 | (itemp (org-at-item-p)) |
| @@ -18648,14 +18617,16 @@ which make use of the date at the cursor." | |||
| 18648 | (org-drawer-regexp (or org-drawer-regexp "\000")) | 18617 | (org-drawer-regexp (or org-drawer-regexp "\000")) |
| 18649 | (inline-task-p (and (featurep 'org-inlinetask) | 18618 | (inline-task-p (and (featurep 'org-inlinetask) |
| 18650 | (org-inlinetask-in-task-p))) | 18619 | (org-inlinetask-in-task-p))) |
| 18651 | column bpos bcol tpos tcol bullet btype bullet-type) | 18620 | column bpos bcol tpos tcol) |
| 18652 | ;; Find the previous relevant line | ||
| 18653 | (beginning-of-line 1) | 18621 | (beginning-of-line 1) |
| 18654 | (cond | 18622 | (cond |
| 18655 | ;; Comments | 18623 | ;; Comments |
| 18656 | ((looking-at "#") (setq column 0)) | 18624 | ((looking-at "# ") (setq column 0)) |
| 18657 | ;; Headings | 18625 | ;; Headings |
| 18658 | ((looking-at "\\*+ ") (setq column 0)) | 18626 | ((looking-at "\\*+ ") (setq column 0)) |
| 18627 | ;; Literal examples | ||
| 18628 | ((looking-at "[ \t]*:[ \t]") | ||
| 18629 | (setq column (org-get-indentation))) ; do nothing | ||
| 18659 | ;; Drawers | 18630 | ;; Drawers |
| 18660 | ((and (looking-at "[ \t]*:END:") | 18631 | ((and (looking-at "[ \t]*:END:") |
| 18661 | (save-excursion (re-search-backward org-drawer-regexp nil t))) | 18632 | (save-excursion (re-search-backward org-drawer-regexp nil t))) |
| @@ -18683,36 +18654,29 @@ which make use of the date at the cursor." | |||
| 18683 | (looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\(:?\\[@\\(:?start:\\)?[0-9]+\\][ \t]*\\)?\\[[- X]\\][ \t]*\\|.*? :: \\)?") | 18654 | (looking-at "[ \t]*\\(\\S-+\\)[ \t]*\\(\\(:?\\[@\\(:?start:\\)?[0-9]+\\][ \t]*\\)?\\[[- X]\\][ \t]*\\|.*? :: \\)?") |
| 18684 | (setq bpos (match-beginning 1) tpos (match-end 0) | 18655 | (setq bpos (match-beginning 1) tpos (match-end 0) |
| 18685 | bcol (progn (goto-char bpos) (current-column)) | 18656 | bcol (progn (goto-char bpos) (current-column)) |
| 18686 | tcol (progn (goto-char tpos) (current-column)) | 18657 | tcol (progn (goto-char tpos) (current-column))) |
| 18687 | bullet (match-string 1) | ||
| 18688 | bullet-type (if (string-match "[0-9]" bullet) "n" bullet)) | ||
| 18689 | (if (> tcol (+ bcol org-description-max-indent)) | 18658 | (if (> tcol (+ bcol org-description-max-indent)) |
| 18690 | (setq tcol (+ bcol 5))) | 18659 | (setq tcol (+ bcol 5))) |
| 18691 | (if (not itemp) | 18660 | (goto-char pos) |
| 18692 | (setq column tcol) | 18661 | (setq column (if itemp (org-get-indentation) tcol))) |
| 18693 | (beginning-of-line 1) | 18662 | ;; This line has nothing special, look at the previous relevant |
| 18694 | (goto-char pos) | 18663 | ;; line to compute indentation |
| 18695 | (if (looking-at "\\S-") | ||
| 18696 | (progn | ||
| 18697 | (looking-at "[ \t]*\\(\\S-+\\)[ \t]*") | ||
| 18698 | (setq bullet (match-string 1) | ||
| 18699 | btype (if (string-match "[0-9]" bullet) "n" bullet)) | ||
| 18700 | (setq column (if (equal btype bullet-type) bcol tcol))) | ||
| 18701 | (setq column (org-get-indentation))))) | ||
| 18702 | ;; This line has nothing special, look upside to get a clue about | ||
| 18703 | ;; what to do. | ||
| 18704 | (t | 18664 | (t |
| 18705 | (beginning-of-line 0) | 18665 | (beginning-of-line 0) |
| 18706 | (while (and (not (bobp)) | 18666 | (while (and (not (bobp)) |
| 18667 | (not (looking-at org-drawer-regexp)) | ||
| 18707 | ;; skip comments, verbatim, empty lines, tables, | 18668 | ;; skip comments, verbatim, empty lines, tables, |
| 18708 | ;; inline tasks | 18669 | ;; inline tasks, lists, drawers and blocks |
| 18709 | (or (looking-at "[ \t]*[\n:#|]") | 18670 | (or (and (looking-at "[ \t]*:END:") |
| 18671 | (re-search-backward org-drawer-regexp nil t)) | ||
| 18672 | (and (looking-at "[ \t]*#\\+end_") | ||
| 18673 | (re-search-backward "[ \t]*#\\+begin_"nil t)) | ||
| 18674 | (looking-at "[ \t]*[\n:#|]") | ||
| 18710 | (and (org-in-item-p) (goto-char (org-list-top-point))) | 18675 | (and (org-in-item-p) (goto-char (org-list-top-point))) |
| 18711 | (and (not inline-task-p) | 18676 | (and (not inline-task-p) |
| 18712 | (featurep 'org-inlinetask) | 18677 | (featurep 'org-inlinetask) |
| 18713 | (org-inlinetask-in-task-p))) | 18678 | (org-inlinetask-in-task-p) |
| 18714 | (not (looking-at "[ \t]*:END:")) | 18679 | (or (org-inlinetask-goto-beginning) t)))) |
| 18715 | (not (looking-at org-drawer-regexp))) | ||
| 18716 | (beginning-of-line 0)) | 18680 | (beginning-of-line 0)) |
| 18717 | (cond | 18681 | (cond |
| 18718 | ;; There was an heading above. | 18682 | ;; There was an heading above. |
| @@ -18721,20 +18685,18 @@ which make use of the date at the cursor." | |||
| 18721 | (setq column 0) | 18685 | (setq column 0) |
| 18722 | (goto-char (match-end 0)) | 18686 | (goto-char (match-end 0)) |
| 18723 | (setq column (current-column)))) | 18687 | (setq column (current-column)))) |
| 18724 | ;; A drawer had started and is unfinished: indent consequently. | 18688 | ;; A drawer had started and is unfinished |
| 18725 | ((looking-at org-drawer-regexp) | 18689 | ((looking-at org-drawer-regexp) |
| 18726 | (goto-char (1- (match-beginning 1))) | 18690 | (goto-char (1- (match-beginning 1))) |
| 18727 | (setq column (current-column))) | 18691 | (setq column (current-column))) |
| 18728 | ;; The drawer had ended: indent like its :END: line. | ||
| 18729 | ((looking-at "\\([ \t]*\\):END:") | ||
| 18730 | (goto-char (match-end 1)) | ||
| 18731 | (setq column (current-column))) | ||
| 18732 | ;; Else, nothing noticeable found: get indentation and go on. | 18692 | ;; Else, nothing noticeable found: get indentation and go on. |
| 18733 | (t (setq column (org-get-indentation)))))) | 18693 | (t (setq column (org-get-indentation)))))) |
| 18694 | ;; Now apply indentation and move cursor accordingly | ||
| 18734 | (goto-char pos) | 18695 | (goto-char pos) |
| 18735 | (if (<= (current-column) (current-indentation)) | 18696 | (if (<= (current-column) (current-indentation)) |
| 18736 | (org-indent-line-to column) | 18697 | (org-indent-line-to column) |
| 18737 | (save-excursion (org-indent-line-to column))) | 18698 | (save-excursion (org-indent-line-to column))) |
| 18699 | ;; Special polishing for properties, see `org-property-format' | ||
| 18738 | (setq column (current-column)) | 18700 | (setq column (current-column)) |
| 18739 | (beginning-of-line 1) | 18701 | (beginning-of-line 1) |
| 18740 | (if (looking-at | 18702 | (if (looking-at |
| @@ -19005,8 +18967,6 @@ beyond the end of the headline." | |||
| 19005 | 18967 | ||
| 19006 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) | 18968 | (define-key org-mode-map "\C-a" 'org-beginning-of-line) |
| 19007 | (define-key org-mode-map "\C-e" 'org-end-of-line) | 18969 | (define-key org-mode-map "\C-e" 'org-end-of-line) |
| 19008 | (define-key org-mode-map [home] 'org-beginning-of-line) | ||
| 19009 | (define-key org-mode-map [end] 'org-end-of-line) | ||
| 19010 | 18970 | ||
| 19011 | (defun org-backward-sentence (&optional arg) | 18971 | (defun org-backward-sentence (&optional arg) |
| 19012 | "Go to beginning of sentence, or beginning of table field. | 18972 | "Go to beginning of sentence, or beginning of table field. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 18010407eda..c9e162c91b9 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5846,7 +5846,8 @@ comment at the start of cc-engine.el for more info." | |||
| 5846 | ;; `c-record-type-identifiers' is non-nil. | 5846 | ;; `c-record-type-identifiers' is non-nil. |
| 5847 | ;; | 5847 | ;; |
| 5848 | ;; This function might do hidden buffer changes. | 5848 | ;; This function might do hidden buffer changes. |
| 5849 | (when (looking-at "<") | 5849 | (when (and c-recognize-<>-arglists |
| 5850 | (looking-at "<")) | ||
| 5850 | (c-forward-<>-arglist t) | 5851 | (c-forward-<>-arglist t) |
| 5851 | (c-forward-syntactic-ws)) | 5852 | (c-forward-syntactic-ws)) |
| 5852 | 5853 | ||
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 47d2f7a45e0..a525c1a7e2c 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -384,6 +384,9 @@ a DOCTYPE or an XML declaration." | |||
| 384 | (save-excursion | 384 | (save-excursion |
| 385 | (goto-char (point-min)) | 385 | (goto-char (point-min)) |
| 386 | (or (string= "xml" (file-name-extension (or buffer-file-name ""))) | 386 | (or (string= "xml" (file-name-extension (or buffer-file-name ""))) |
| 387 | ;; Maybe the buffer-size check isn't needed, I don't know. | ||
| 388 | (and (zerop (buffer-size)) | ||
| 389 | (string= "xhtml" (file-name-extension (or buffer-file-name "")))) | ||
| 387 | (looking-at "\\s-*<\\?xml") | 390 | (looking-at "\\s-*<\\?xml") |
| 388 | (when (re-search-forward | 391 | (when (re-search-forward |
| 389 | (eval-when-compile | 392 | (eval-when-compile |
| @@ -2153,5 +2156,4 @@ Can be used as a value for `html-mode-hook'." | |||
| 2153 | 2156 | ||
| 2154 | (provide 'sgml-mode) | 2157 | (provide 'sgml-mode) |
| 2155 | 2158 | ||
| 2156 | ;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401 | ||
| 2157 | ;;; sgml-mode.el ends here | 2159 | ;;; sgml-mode.el ends here |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 9c253e027e4..9b0d402c078 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | ;;; vc-bzr.el --- VC backend for the bzr revision control system | 1 | ;;; vc-bzr.el --- VC backend for the bzr revision control system |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Dave Love <fx@gnu.org> | 6 | ;; Author: Dave Love <fx@gnu.org> |
| 6 | ;; Riccardo Murri <riccardo.murri@gmail.com> | 7 | ;; Riccardo Murri <riccardo.murri@gmail.com> |
| 8 | ;; Maintainer: FSF | ||
| 7 | ;; Keywords: vc tools | 9 | ;; Keywords: vc tools |
| 8 | ;; Created: Sept 2006 | 10 | ;; Created: Sept 2006 |
| 9 | ;; Version: 2008-01-04 | ||
| 10 | ;; URL: http://launchpad.net/vc-bzr | ||
| 11 | ;; Package: vc | 11 | ;; Package: vc |
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| @@ -27,11 +27,9 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Commentary: | 28 | ;;; Commentary: |
| 29 | 29 | ||
| 30 | ;; See <URL:http://bazaar-vcs.org/> concerning bzr. See | 30 | ;; See <URL:http://bazaar.canonical.com/> concerning bzr. |
| 31 | ;; <URL:http://launchpad.net/vc-bzr> for alternate development | ||
| 32 | ;; branches of `vc-bzr'. | ||
| 33 | 31 | ||
| 34 | ;; Load this library to register bzr support in VC. | 32 | ;; This library provides bzr support in VC. |
| 35 | 33 | ||
| 36 | ;; Known bugs | 34 | ;; Known bugs |
| 37 | ;; ========== | 35 | ;; ========== |
| @@ -42,9 +40,6 @@ | |||
| 42 | ;; (that is, the target contents) are changed. | 40 | ;; (that is, the target contents) are changed. |
| 43 | ;; See https://bugs.launchpad.net/vc-bzr/+bug/116607 | 41 | ;; See https://bugs.launchpad.net/vc-bzr/+bug/116607 |
| 44 | 42 | ||
| 45 | ;; For an up-to-date list of bugs, please see: | ||
| 46 | ;; https://bugs.launchpad.net/vc-bzr/+bugs | ||
| 47 | |||
| 48 | ;;; Properties of the backend | 43 | ;;; Properties of the backend |
| 49 | 44 | ||
| 50 | (defun vc-bzr-revision-granularity () 'repository) | 45 | (defun vc-bzr-revision-granularity () 'repository) |
| @@ -104,6 +99,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 104 | ;;;###autoload | 99 | ;;;###autoload |
| 105 | (defconst vc-bzr-admin-dirname ".bzr" | 100 | (defconst vc-bzr-admin-dirname ".bzr" |
| 106 | "Name of the directory containing Bzr repository status files.") | 101 | "Name of the directory containing Bzr repository status files.") |
| 102 | ;; Used in the autoloaded vc-bzr-registered; see below. | ||
| 107 | ;;;###autoload | 103 | ;;;###autoload |
| 108 | (defconst vc-bzr-admin-checkout-format-file | 104 | (defconst vc-bzr-admin-checkout-format-file |
| 109 | (concat vc-bzr-admin-dirname "/checkout/format")) | 105 | (concat vc-bzr-admin-dirname "/checkout/format")) |
| @@ -154,7 +150,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 154 | 150 | ||
| 155 | (defun vc-bzr-state-heuristic (file) | 151 | (defun vc-bzr-state-heuristic (file) |
| 156 | "Like `vc-bzr-state' but hopefully without running Bzr." | 152 | "Like `vc-bzr-state' but hopefully without running Bzr." |
| 157 | ;; `bzr status' was excrutiatingly slow with large histories and | 153 | ;; `bzr status' was excruciatingly slow with large histories and |
| 158 | ;; pending merges, so try to avoid using it until they fix their | 154 | ;; pending merges, so try to avoid using it until they fix their |
| 159 | ;; performance problems. | 155 | ;; performance problems. |
| 160 | ;; This function tries first to parse Bzr internal file | 156 | ;; This function tries first to parse Bzr internal file |
| @@ -188,12 +184,16 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 188 | "\\([^\0]*\\)\0" ;"a/f/d", a=removed? | 184 | "\\([^\0]*\\)\0" ;"a/f/d", a=removed? |
| 189 | "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)? | 185 | "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)? |
| 190 | "\\([^\0]*\\)\0" ;size?p | 186 | "\\([^\0]*\\)\0" ;size?p |
| 191 | "[^\0]*\0" ;"y/n", executable? | 187 | ;; y/n. Whether or not the current copy |
| 188 | ;; was executable the last time bzr checked? | ||
| 189 | "[^\0]*\0" | ||
| 192 | "[^\0]*\0" ;? | 190 | "[^\0]*\0" ;? |
| 193 | "\\([^\0]*\\)\0" ;"a/f/d" a=added? | 191 | "\\([^\0]*\\)\0" ;"a/f/d" a=added? |
| 194 | "\\([^\0]*\\)\0" ;sha1 again? | 192 | "\\([^\0]*\\)\0" ;sha1 again? |
| 195 | "\\([^\0]*\\)\0" ;size again? | 193 | "\\([^\0]*\\)\0" ;size again? |
| 196 | "[^\0]*\0" ;"y/n", executable again? | 194 | ;; y/n. Whether or not the repo thinks |
| 195 | ;; the file should be executable? | ||
| 196 | "\\([^\0]*\\)\0" | ||
| 197 | "[^\0]*\0" ;last revid? | 197 | "[^\0]*\0" ;last revid? |
| 198 | ;; There are more fields when merges are pending. | 198 | ;; There are more fields when merges are pending. |
| 199 | ) | 199 | ) |
| @@ -207,8 +207,22 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 207 | ((eq (char-after (match-beginning 4)) ?a) 'added) | 207 | ((eq (char-after (match-beginning 4)) ?a) 'added) |
| 208 | ((or (and (eq (string-to-number (match-string 3)) | 208 | ((or (and (eq (string-to-number (match-string 3)) |
| 209 | (nth 7 (file-attributes file))) | 209 | (nth 7 (file-attributes file))) |
| 210 | (equal (match-string 5) | 210 | (equal (match-string 5) |
| 211 | (vc-bzr-sha1 file))) | 211 | (vc-bzr-sha1 file)) |
| 212 | ;; For a file, does the executable state match? | ||
| 213 | ;; (Bug#7544) | ||
| 214 | (or (not | ||
| 215 | (eq (char-after (match-beginning 1)) ?f)) | ||
| 216 | (let ((exe | ||
| 217 | (memq | ||
| 218 | ?x | ||
| 219 | (mapcar | ||
| 220 | 'identity | ||
| 221 | (nth 8 (file-attributes file)))))) | ||
| 222 | (if (eq (char-after (match-beginning 7)) | ||
| 223 | ?y) | ||
| 224 | exe | ||
| 225 | (not exe))))) | ||
| 212 | (and | 226 | (and |
| 213 | ;; It looks like for lightweight | 227 | ;; It looks like for lightweight |
| 214 | ;; checkouts \2 is empty and we need to | 228 | ;; checkouts \2 is empty and we need to |
| @@ -523,7 +537,7 @@ If any error occurred in running `bzr status', then return nil." | |||
| 523 | (error "Don't know how to compute the next revision of %s" rev))) | 537 | (error "Don't know how to compute the next revision of %s" rev))) |
| 524 | 538 | ||
| 525 | (defun vc-bzr-register (files &optional rev comment) | 539 | (defun vc-bzr-register (files &optional rev comment) |
| 526 | "Register FILE under bzr. | 540 | "Register FILES under bzr. |
| 527 | Signal an error unless REV is nil. | 541 | Signal an error unless REV is nil. |
| 528 | COMMENT is ignored." | 542 | COMMENT is ignored." |
| 529 | (if rev (error "Can't register explicit revision with bzr")) | 543 | (if rev (error "Can't register explicit revision with bzr")) |
| @@ -555,7 +569,7 @@ or a superior directory.") | |||
| 555 | (declare-function log-edit-extract-headers "log-edit" (headers string)) | 569 | (declare-function log-edit-extract-headers "log-edit" (headers string)) |
| 556 | 570 | ||
| 557 | (defun vc-bzr-checkin (files rev comment) | 571 | (defun vc-bzr-checkin (files rev comment) |
| 558 | "Check FILE in to bzr with log message COMMENT. | 572 | "Check FILES in to bzr with log message COMMENT. |
| 559 | REV non-nil gets an error." | 573 | REV non-nil gets an error." |
| 560 | (if rev (error "Can't check in a specific revision with bzr")) | 574 | (if rev (error "Can't check in a specific revision with bzr")) |
| 561 | (apply 'vc-bzr-command "commit" nil 0 | 575 | (apply 'vc-bzr-command "commit" nil 0 |
| @@ -744,7 +758,7 @@ property containing author and date information." | |||
| 744 | (string-to-number (substring str 0 4)))))))) | 758 | (string-to-number (substring str 0 4)))))))) |
| 745 | 759 | ||
| 746 | (defun vc-bzr-annotate-extract-revision-at-line () | 760 | (defun vc-bzr-annotate-extract-revision-at-line () |
| 747 | "Return revision for current line of annoation buffer, or nil. | 761 | "Return revision for current line of annotation buffer, or nil. |
| 748 | Return nil if current line isn't annotated." | 762 | Return nil if current line isn't annotated." |
| 749 | (save-excursion | 763 | (save-excursion |
| 750 | (beginning-of-line) | 764 | (beginning-of-line) |
| @@ -1040,7 +1054,7 @@ stream. Standard error output is discarded." | |||
| 1040 | (defun vc-bzr-shelve-delete-at-point () | 1054 | (defun vc-bzr-shelve-delete-at-point () |
| 1041 | (interactive) | 1055 | (interactive) |
| 1042 | (let ((shelve (vc-bzr-shelve-get-at-point (point)))) | 1056 | (let ((shelve (vc-bzr-shelve-get-at-point (point)))) |
| 1043 | (when (y-or-n-p (format "Remove shelf %s ?" shelve)) | 1057 | (when (y-or-n-p (format "Remove shelf %s ? " shelve)) |
| 1044 | (vc-bzr-command "unshelve" nil 0 nil "--delete-only" shelve) | 1058 | (vc-bzr-command "unshelve" nil 0 nil "--delete-only" shelve) |
| 1045 | (vc-dir-refresh)))) | 1059 | (vc-dir-refresh)))) |
| 1046 | 1060 | ||
| @@ -1150,9 +1164,6 @@ stream. Standard error output is discarded." | |||
| 1150 | vc-bzr-revision-keywords)) | 1164 | vc-bzr-revision-keywords)) |
| 1151 | string pred)))))) | 1165 | string pred)))))) |
| 1152 | 1166 | ||
| 1153 | (eval-after-load "vc" | ||
| 1154 | '(add-to-list 'vc-directory-exclusion-list vc-bzr-admin-dirname t)) | ||
| 1155 | |||
| 1156 | (provide 'vc-bzr) | 1167 | (provide 'vc-bzr) |
| 1157 | ;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06 | 1168 | |
| 1158 | ;;; vc-bzr.el ends here | 1169 | ;;; vc-bzr.el ends here |
| @@ -441,7 +441,7 @@ echo "Making links to \`lwlib'" | |||
| 441 | echo "Making links to \`etc' and its subdirectories" | 441 | echo "Making links to \`etc' and its subdirectories" |
| 442 | for f in `find etc -type f`; do | 442 | for f in `find etc -type f`; do |
| 443 | case $f in | 443 | case $f in |
| 444 | etc/DOC*) continue ;; | 444 | etc/DOC*|etc/*.pyc) continue ;; |
| 445 | esac | 445 | esac |
| 446 | ln $f $tempdir/$f | 446 | ln $f $tempdir/$f |
| 447 | done | 447 | done |
diff --git a/src/ChangeLog.trunk b/src/ChangeLog.trunk index eeba4192e25..18c482c2e92 100644 --- a/src/ChangeLog.trunk +++ b/src/ChangeLog.trunk | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-12-11 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (Fx_show_tip): Call try_window with last argument | ||
| 4 | TRY_WINDOW_IGNORE_FONTS_CHANGE. Delete the TODO ifdef: problem | ||
| 5 | solved. Round up the tip height to an integral multiple of the | ||
| 6 | frame's line height. Add FRAME_COLUMN_WIDTH to the tip width. | ||
| 7 | (Bug#7398) | ||
| 8 | |||
| 1 | 2010-12-08 Glenn Morris <rgm@gnu.org> | 9 | 2010-12-08 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * fileio.c (Fverify_visited_file_modtime): Default to current buffer. | 11 | * fileio.c (Fverify_visited_file_modtime): Default to current buffer. |
| @@ -5690,7 +5698,7 @@ | |||
| 5690 | * s/netbsd.h (LIB_GCC): | 5698 | * s/netbsd.h (LIB_GCC): |
| 5691 | Move to configure. | 5699 | Move to configure. |
| 5692 | 5700 | ||
| 5693 | 2010-05-11 Karel Klic <kklic@redhat.com> | 5701 | 2010-05-11 Karel Klíč <kklic@redhat.com> |
| 5694 | 5702 | ||
| 5695 | * ftfont.c: Fix incorrect parentheses of #if condition for | 5703 | * ftfont.c: Fix incorrect parentheses of #if condition for |
| 5696 | definining M17N_FLT_USE_NEW_FEATURE. | 5704 | definining M17N_FLT_USE_NEW_FEATURE. |
diff --git a/src/eval.c b/src/eval.c index 63ea95513b3..74dd7e63aa1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -179,7 +179,7 @@ int handling_signal; | |||
| 179 | Lisp_Object Vmacro_declaration_function; | 179 | Lisp_Object Vmacro_declaration_function; |
| 180 | 180 | ||
| 181 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args, | 181 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args, |
| 182 | Lisp_Object lexenv) | 182 | Lisp_Object lexenv); |
| 183 | static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object *, | 183 | static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object *, |
| 184 | Lisp_Object); | 184 | Lisp_Object); |
| 185 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 185 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
diff --git a/src/w32fns.c b/src/w32fns.c index 04358b77bf5..31feadc2d70 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5782,7 +5782,7 @@ Text larger than the specified size is clipped. */) | |||
| 5782 | clear_glyph_matrix (w->desired_matrix); | 5782 | clear_glyph_matrix (w->desired_matrix); |
| 5783 | clear_glyph_matrix (w->current_matrix); | 5783 | clear_glyph_matrix (w->current_matrix); |
| 5784 | SET_TEXT_POS (pos, BEGV, BEGV_BYTE); | 5784 | SET_TEXT_POS (pos, BEGV, BEGV_BYTE); |
| 5785 | try_window (FRAME_ROOT_WINDOW (f), pos, 0); | 5785 | try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); |
| 5786 | 5786 | ||
| 5787 | /* Compute width and height of the tooltip. */ | 5787 | /* Compute width and height of the tooltip. */ |
| 5788 | width = height = seen_reversed_p = 0; | 5788 | width = height = seen_reversed_p = 0; |
| @@ -5804,16 +5804,12 @@ Text larger than the specified size is clipped. */) | |||
| 5804 | { | 5804 | { |
| 5805 | if (!row->reversed_p) | 5805 | if (!row->reversed_p) |
| 5806 | { | 5806 | { |
| 5807 | #ifdef TODO /* Investigate why some fonts need more width than is | ||
| 5808 | calculated for some tooltips. */ | ||
| 5809 | |||
| 5810 | /* There's a glyph at the end of rows that is used to | 5807 | /* There's a glyph at the end of rows that is used to |
| 5811 | place the cursor there. Don't include the width of | 5808 | place the cursor there. Don't include the width of |
| 5812 | this glyph. */ | 5809 | this glyph. */ |
| 5813 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 5810 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 5814 | if (INTEGERP (last->object)) | 5811 | if (INTEGERP (last->object)) |
| 5815 | row_width -= last->pixel_width; | 5812 | row_width -= last->pixel_width; |
| 5816 | #endif | ||
| 5817 | } | 5813 | } |
| 5818 | else | 5814 | else |
| 5819 | { | 5815 | { |
| @@ -5830,7 +5826,6 @@ Text larger than the specified size is clipped. */) | |||
| 5830 | } | 5826 | } |
| 5831 | } | 5827 | } |
| 5832 | 5828 | ||
| 5833 | /* TODO: find why tips do not draw along baseline as instructed. */ | ||
| 5834 | height += row->height; | 5829 | height += row->height; |
| 5835 | width = max (width, row_width); | 5830 | width = max (width, row_width); |
| 5836 | } | 5831 | } |
| @@ -5847,9 +5842,10 @@ Text larger than the specified size is clipped. */) | |||
| 5847 | w->total_cols = make_number (width); | 5842 | w->total_cols = make_number (width); |
| 5848 | FRAME_TOTAL_COLS (f) = width; | 5843 | FRAME_TOTAL_COLS (f) = width; |
| 5849 | adjust_glyphs (f); | 5844 | adjust_glyphs (f); |
| 5845 | w->pseudo_window_p = 1; | ||
| 5850 | clear_glyph_matrix (w->desired_matrix); | 5846 | clear_glyph_matrix (w->desired_matrix); |
| 5851 | clear_glyph_matrix (w->current_matrix); | 5847 | clear_glyph_matrix (w->current_matrix); |
| 5852 | try_window (FRAME_ROOT_WINDOW (f), pos, 0); | 5848 | try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); |
| 5853 | width = height = 0; | 5849 | width = height = 0; |
| 5854 | /* Recompute width and height of the tooltip. */ | 5850 | /* Recompute width and height of the tooltip. */ |
| 5855 | for (i = 0; i < w->desired_matrix->nrows; ++i) | 5851 | for (i = 0; i < w->desired_matrix->nrows; ++i) |
| @@ -5862,21 +5858,22 @@ Text larger than the specified size is clipped. */) | |||
| 5862 | break; | 5858 | break; |
| 5863 | row->full_width_p = 1; | 5859 | row->full_width_p = 1; |
| 5864 | row_width = row->pixel_width; | 5860 | row_width = row->pixel_width; |
| 5865 | #ifdef TODO /* See above. */ | ||
| 5866 | if (row->used[TEXT_AREA] && !row->reversed_p) | 5861 | if (row->used[TEXT_AREA] && !row->reversed_p) |
| 5867 | { | 5862 | { |
| 5868 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 5863 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 5869 | if (INTEGERP (last->object)) | 5864 | if (INTEGERP (last->object)) |
| 5870 | row_width -= last->pixel_width; | 5865 | row_width -= last->pixel_width; |
| 5871 | } | 5866 | } |
| 5872 | #endif | ||
| 5873 | 5867 | ||
| 5874 | height += row->height; | 5868 | height += row->height; |
| 5875 | width = max (width, row_width); | 5869 | width = max (width, row_width); |
| 5876 | } | 5870 | } |
| 5877 | } | 5871 | } |
| 5878 | 5872 | ||
| 5879 | /* Add the frame's internal border to the width and height the X | 5873 | /* Round up the height to an integral multiple of FRAME_LINE_HEIGHT. */ |
| 5874 | if (height % FRAME_LINE_HEIGHT (f) != 0) | ||
| 5875 | height += FRAME_LINE_HEIGHT (f) - height % FRAME_LINE_HEIGHT (f); | ||
| 5876 | /* Add the frame's internal border to the width and height the w32 | ||
| 5880 | window should have. */ | 5877 | window should have. */ |
| 5881 | height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); | 5878 | height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); |
| 5882 | width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); | 5879 | width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); |
| @@ -5895,11 +5892,13 @@ Text larger than the specified size is clipped. */) | |||
| 5895 | FRAME_EXTERNAL_MENU_BAR (f)); | 5892 | FRAME_EXTERNAL_MENU_BAR (f)); |
| 5896 | 5893 | ||
| 5897 | /* Position and size tooltip, and put it in the topmost group. | 5894 | /* Position and size tooltip, and put it in the topmost group. |
| 5898 | The add-on of 3 to the 5th argument is a kludge: without it, | 5895 | The add-on of FRAME_COLUMN_WIDTH to the 5th argument is a |
| 5899 | some fonts cause the last character of the tip to be truncated, | 5896 | peculiarity of w32 display: without it, some fonts cause the |
| 5900 | for some obscure reason. */ | 5897 | last character of the tip to be truncated or wrapped around to |
| 5898 | the next line. */ | ||
| 5901 | SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, | 5899 | SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, |
| 5902 | root_x, root_y, rect.right - rect.left + 3, | 5900 | root_x, root_y, |
| 5901 | rect.right - rect.left + FRAME_COLUMN_WIDTH (f), | ||
| 5903 | rect.bottom - rect.top, SWP_NOACTIVATE); | 5902 | rect.bottom - rect.top, SWP_NOACTIVATE); |
| 5904 | 5903 | ||
| 5905 | /* Ensure tooltip is on top of other topmost windows (eg menus). */ | 5904 | /* Ensure tooltip is on top of other topmost windows (eg menus). */ |