diff options
| author | Glenn Morris | 2013-02-27 22:30:48 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-02-27 22:30:48 -0800 |
| commit | 929aeac608c271b2448dffec29aeea85c69d6bff (patch) | |
| tree | d49650ea52e9c6f1bc89efae4937057dc9df6bcf | |
| parent | e7a1c32dda4ec7d937e9810b23584945286f2e25 (diff) | |
| parent | b6e99fe463fd9610eadd181e39aa4b4ba632eb61 (diff) | |
| download | emacs-929aeac608c271b2448dffec29aeea85c69d6bff.tar.gz emacs-929aeac608c271b2448dffec29aeea85c69d6bff.zip | |
Merge from emacs-24; up to 2012-12-23T02:41:17Z!rgm@gnu.org
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/xresources.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 2 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/misc/org.texi | 13 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 26 | ||||
| -rw-r--r-- | etc/NEWS | 76 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 70 | ||||
| -rw-r--r-- | lisp/org/ob-tangle.el | 9 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 271 | ||||
| -rw-r--r-- | lisp/org/org-clock.el | 6 | ||||
| -rw-r--r-- | lisp/org/org-datetree.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-docview.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-id.el | 10 | ||||
| -rw-r--r-- | lisp/org/org-indent.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-macs.el | 3 | ||||
| -rw-r--r-- | lisp/org/org-mobile.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-version.el | 4 | ||||
| -rw-r--r-- | lisp/org/org.el | 152 | ||||
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32.c | 2 | ||||
| -rw-r--r-- | test/ChangeLog | 19 | ||||
| -rw-r--r-- | test/automated/python-tests.el | 269 |
26 files changed, 618 insertions, 357 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 44245441791..bd70b1fdebf 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-28 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * xresources.texi (GTK resources): Fix broken link. | ||
| 4 | |||
| 1 | 2013-02-25 Eli Zaretskii <eliz@gnu.org> | 5 | 2013-02-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * files.texi (Interlocking): Don't refer to symlinks as the | 7 | * files.texi (Interlocking): Don't refer to symlinks as the |
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 7274a9df71c..3723c8e5e1d 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi | |||
| @@ -507,7 +507,7 @@ those are governed by normal X resources (@pxref{Resources}). | |||
| 507 | 507 | ||
| 508 | The following sections describe how to customize GTK+ resources for | 508 | The following sections describe how to customize GTK+ resources for |
| 509 | Emacs. For details about GTK+ resources, see the GTK+ API document at | 509 | Emacs. For details about GTK+ resources, see the GTK+ API document at |
| 510 | @uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}. | 510 | @uref{http://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}. |
| 511 | 511 | ||
| 512 | In GTK+ version 3, GTK+ resources have been replaced by a completely | 512 | In GTK+ version 3, GTK+ resources have been replaced by a completely |
| 513 | different system. The appearance of GTK+ widgets is now determined by | 513 | different system. The appearance of GTK+ widgets is now determined by |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index c4f45d02a05..42f5b5f5536 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-28 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * variables.texi (File Local Variables): Fix reference. | ||
| 4 | |||
| 1 | 2013-02-24 Eli Zaretskii <eliz@gnu.org> | 5 | 2013-02-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * files.texi (Magic File Names): Improve wording and indexing. | 7 | * files.texi (Magic File Names): Improve wording and indexing. |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 3f4edebfb8b..4bcf7985f0c 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -1556,7 +1556,7 @@ an ordinary evaluated argument. | |||
| 1556 | 1556 | ||
| 1557 | A file can specify local variable values; Emacs uses these to create | 1557 | A file can specify local variable values; Emacs uses these to create |
| 1558 | buffer-local bindings for those variables in the buffer visiting that | 1558 | buffer-local bindings for those variables in the buffer visiting that |
| 1559 | file. @xref{File variables, , Local Variables in Files, emacs, The | 1559 | file. @xref{File Variables, , Local Variables in Files, emacs, The |
| 1560 | GNU Emacs Manual}, for basic information about file-local variables. | 1560 | GNU Emacs Manual}, for basic information about file-local variables. |
| 1561 | This section describes the functions and variables that affect how | 1561 | This section describes the functions and variables that affect how |
| 1562 | file-local variables are processed. | 1562 | file-local variables are processed. |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 632f06d22b1..15b2b95026b 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-02-28 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.texi (Visibility cycling): Suggest to set | ||
| 4 | `org-agenda-inhibit-startup' to nil if user wants the startup | ||
| 5 | visibility settings to be honored in any circumstances. | ||
| 6 | (Progress logging, Checkboxes): Fix typos. | ||
| 7 | |||
| 8 | 2013-02-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 9 | |||
| 10 | * tramp.texi (top) [xxx, yyy, trampfn]: Provide two versions of | ||
| 11 | the macros, for Texinfo 4.13 and 5.0. | ||
| 12 | |||
| 1 | 2013-02-24 Michael Albinus <michael.albinus@gmx.de> | 13 | 2013-02-24 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 14 | ||
| 3 | Port Tramp documentation to Texinfo 5.0. | 15 | Port Tramp documentation to Texinfo 5.0. |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 16015e49362..1d7de18ada6 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @c %**start of header | 2 | @c %**start of header |
| 3 | @setfilename ../../info/org | 3 | @setfilename ../../info/org |
| 4 | @settitle The Org Manual | 4 | @settitle The Org Manual |
| 5 | @set VERSION 7.9.3e (GNU Emacs 24.3) | 5 | @set VERSION 7.9.3f (GNU Emacs 24.3) |
| 6 | 6 | ||
| 7 | @c Use proper quote and backtick for code sections in PDF output | 7 | @c Use proper quote and backtick for code sections in PDF output |
| 8 | @c Cf. Texinfo manual 14.2 | 8 | @c Cf. Texinfo manual 14.2 |
| @@ -1296,6 +1296,7 @@ Copy the @i{visible} text in the region into the kill ring. | |||
| 1296 | @end table | 1296 | @end table |
| 1297 | 1297 | ||
| 1298 | @vindex org-startup-folded | 1298 | @vindex org-startup-folded |
| 1299 | @vindex org-agenda-inhibit-startup | ||
| 1299 | @cindex @code{overview}, STARTUP keyword | 1300 | @cindex @code{overview}, STARTUP keyword |
| 1300 | @cindex @code{content}, STARTUP keyword | 1301 | @cindex @code{content}, STARTUP keyword |
| 1301 | @cindex @code{showall}, STARTUP keyword | 1302 | @cindex @code{showall}, STARTUP keyword |
| @@ -1314,6 +1315,10 @@ buffer: | |||
| 1314 | #+STARTUP: showeverything | 1315 | #+STARTUP: showeverything |
| 1315 | @end example | 1316 | @end example |
| 1316 | 1317 | ||
| 1318 | The startup visibility options are ignored when the file is open for the | ||
| 1319 | first time during the agenda generation: if you want the agenda to honor | ||
| 1320 | the startup visibility, set @code{org-agenda-inhibit-startup} to nil. | ||
| 1321 | |||
| 1317 | @cindex property, VISIBILITY | 1322 | @cindex property, VISIBILITY |
| 1318 | @noindent | 1323 | @noindent |
| 1319 | Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties | 1324 | Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties |
| @@ -2439,7 +2444,7 @@ You may reference a rectangular range of fields by specifying two field | |||
| 2439 | references connected by two dots @samp{..}. If both fields are in the | 2444 | references connected by two dots @samp{..}. If both fields are in the |
| 2440 | current row, you may simply use @samp{$2..$7}, but if at least one field | 2445 | current row, you may simply use @samp{$2..$7}, but if at least one field |
| 2441 | is in a different row, you need to use the general @code{@@row$column} | 2446 | is in a different row, you need to use the general @code{@@row$column} |
| 2442 | format at least for the first field (i.e., the reference must start with | 2447 | format at least for the first field (i.e the reference must start with |
| 2443 | @samp{@@} in order to be interpreted correctly). Examples: | 2448 | @samp{@@} in order to be interpreted correctly). Examples: |
| 2444 | 2449 | ||
| 2445 | @example | 2450 | @example |
| @@ -4075,7 +4080,7 @@ module @file{org-depend.el}. | |||
| 4075 | 4080 | ||
| 4076 | Org mode can automatically record a timestamp and possibly a note when | 4081 | Org mode can automatically record a timestamp and possibly a note when |
| 4077 | you mark a TODO item as DONE, or even each time you change the state of | 4082 | you mark a TODO item as DONE, or even each time you change the state of |
| 4078 | a TODO item. This system is highly configurable, settings can be on a | 4083 | a TODO item. This system is highly configurable; settings can be on a |
| 4079 | per-keyword basis and can be localized to a file or even a subtree. For | 4084 | per-keyword basis and can be localized to a file or even a subtree. For |
| 4080 | information on how to clock working time for a task, see @ref{Clocking | 4085 | information on how to clock working time for a task, see @ref{Clocking |
| 4081 | work time}. | 4086 | work time}. |
| @@ -4431,7 +4436,7 @@ lists. But you can allow it by modifying @code{org-list-automatic-rules} | |||
| 4431 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting | 4436 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting |
| 4432 | it with the string @samp{[ ]}. This feature is similar to TODO items | 4437 | it with the string @samp{[ ]}. This feature is similar to TODO items |
| 4433 | (@pxref{TODO Items}), but is more lightweight. Checkboxes are not included | 4438 | (@pxref{TODO Items}), but is more lightweight. Checkboxes are not included |
| 4434 | into the global TODO list, so they are often great to split a task into a | 4439 | in the global TODO list, so they are often great to split a task into a |
| 4435 | number of simple steps. Or you can use them in a shopping list. To toggle a | 4440 | number of simple steps. Or you can use them in a shopping list. To toggle a |
| 4436 | checkbox, use @kbd{C-c C-c}, or use the mouse (thanks to Piotr Zielinski's | 4441 | checkbox, use @kbd{C-c C-c}, or use the mouse (thanks to Piotr Zielinski's |
| 4437 | @file{org-mouse.el}). | 4442 | @file{org-mouse.el}). |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 00b5e1e8dc1..20598f2d9e5 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -20,6 +20,11 @@ | |||
| 20 | @c xxx and yyy are auxiliary macros in order to omit leading and | 20 | @c xxx and yyy are auxiliary macros in order to omit leading and |
| 21 | @c trailing whitespace. Not very elegant, but I don't know it better. | 21 | @c trailing whitespace. Not very elegant, but I don't know it better. |
| 22 | 22 | ||
| 23 | @c There are subtle differences between texinfo 4.13 and 5.0. We must | ||
| 24 | @c declare two versions of the macro. This will be improved, hopefully. | ||
| 25 | |||
| 26 | @c Texinfo 5.0. | ||
| 27 | @ifset txicommandconditionals | ||
| 23 | @macro xxx {one} | 28 | @macro xxx {one} |
| 24 | @set \one\ | 29 | @set \one\ |
| 25 | @end macro | 30 | @end macro |
| @@ -38,6 +43,26 @@ | |||
| 38 | @yyy{\user\,@@}@c | 43 | @yyy{\user\,@@}@c |
| 39 | \host\@value{postfix}\localname\ | 44 | \host\@value{postfix}\localname\ |
| 40 | @end macro | 45 | @end macro |
| 46 | @end ifset | ||
| 47 | |||
| 48 | @c Texinfo 4.13. | ||
| 49 | @ifclear txicommandconditionals | ||
| 50 | @macro xxx {one}@c | ||
| 51 | @set \one\@c | ||
| 52 | @end macro | ||
| 53 | |||
| 54 | @macro yyy {one, two}@c | ||
| 55 | @xxx{x\one\}@c | ||
| 56 | @ifclear x@c | ||
| 57 | \one\@w{}\two\@c | ||
| 58 | @end ifclear | ||
| 59 | @clear x\one\@c | ||
| 60 | @end macro | ||
| 61 | |||
| 62 | @macro trampfn {method, user, host, localname}@c | ||
| 63 | @value{prefix}@yyy{\method\,@value{postfixhop}}@yyy{\user\,@@}\host\@value{postfix}\localname\@c | ||
| 64 | @end macro | ||
| 65 | @end ifclear | ||
| 41 | 66 | ||
| 42 | @copying | 67 | @copying |
| 43 | Copyright @copyright{} 1999--2013 Free Software Foundation, Inc. | 68 | Copyright @copyright{} 1999--2013 Free Software Foundation, Inc. |
| @@ -3892,3 +3917,4 @@ for @value{emacsothername}. | |||
| 3892 | @c * Use `filename' resp. `file name' consistently. | 3917 | @c * Use `filename' resp. `file name' consistently. |
| 3893 | @c * Use `host' resp. `machine' consistently. | 3918 | @c * Use `host' resp. `machine' consistently. |
| 3894 | @c * Consistent small or capitalized words especially in menus. | 3919 | @c * Consistent small or capitalized words especially in menus. |
| 3920 | @c * Make a unique declaration of @trampfn. | ||
| @@ -829,6 +829,63 @@ See the variable `calendar-month-header'. | |||
| 829 | *** The calendars produced by cal-html include holidays. | 829 | *** The calendars produced by cal-html include holidays. |
| 830 | Customize `cal-html-holidays' to change this. | 830 | Customize `cal-html-holidays' to change this. |
| 831 | 831 | ||
| 832 | ** CEDET | ||
| 833 | |||
| 834 | *** The major modes from the parser generators "Bovine" and "Wisent" | ||
| 835 | are now properly integrated in Emacs. The file suffixes ".by" and ".wy" | ||
| 836 | are in `auto-mode-alist', and the corresponding manuals are included. | ||
| 837 | |||
| 838 | *** EDE | ||
| 839 | |||
| 840 | **** Menu support for the "Configuration" feature. This allows users to | ||
| 841 | choose the active configuration (such as debug or install) from the menu. | ||
| 842 | |||
| 843 | **** New command `ede-set' to interactively set project-local variables. | ||
| 844 | |||
| 845 | **** Support for compiling, debugging, and running in "generic" projects. | ||
| 846 | |||
| 847 | **** Autoconf editing support for M4 macros with complex arguments. | ||
| 848 | |||
| 849 | **** Compilation support for the "linux" project type. | ||
| 850 | |||
| 851 | **** "simple" projects have been removed; use "generic" projects instead. | ||
| 852 | |||
| 853 | *** Semantic | ||
| 854 | |||
| 855 | **** Support for parsing #include statements inside a namespace in C/C++. | ||
| 856 | |||
| 857 | **** Improved support for 'extern "C"' declarations in C/C++. | ||
| 858 | |||
| 859 | **** The ability to ignore more common special C/C++ preprocessor symbols, | ||
| 860 | such as '__nonnull' and '__asm'. Add '__cplusplus' macro when parsing C++. | ||
| 861 | If available, include cdefs.h as an additional source of preprocessor symbols. | ||
| 862 | |||
| 863 | **** Improved C/C++ function pointer parsing. | ||
| 864 | |||
| 865 | **** In Python, support for converting imports to include file names. | ||
| 866 | |||
| 867 | **** Ability to dynamically determine the Python load path. | ||
| 868 | |||
| 869 | **** Support for the Python 'WITH' and 'AT' keywords. | ||
| 870 | |||
| 871 | **** Improved tooltip completion. | ||
| 872 | |||
| 873 | *** SRecode | ||
| 874 | |||
| 875 | **** The SRecode manual is now included. | ||
| 876 | |||
| 877 | **** Tag generation supports constructor/destructor settings and system | ||
| 878 | include differentiation. | ||
| 879 | |||
| 880 | **** Addition of 'Framework' support: Frameworks are specified when a | ||
| 881 | particular kind of library (such as Android) is needed in a common language | ||
| 882 | mode (like Java). | ||
| 883 | |||
| 884 | **** Support for nested templates and let variables override based on priority. | ||
| 885 | |||
| 886 | **** Support for merging tables from multiple related modes, such as | ||
| 887 | default -> c++ -> arduino. | ||
| 888 | |||
| 832 | ** Compile has a new option `compilation-always-kill'. | 889 | ** Compile has a new option `compilation-always-kill'. |
| 833 | 890 | ||
| 834 | ** Customize | 891 | ** Customize |
| @@ -1168,6 +1225,25 @@ accessed via the new `timer--psecs' accessor. | |||
| 1168 | *** Last-modified time stamps in undo lists now are of the form | 1225 | *** Last-modified time stamps in undo lists now are of the form |
| 1169 | (t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS). | 1226 | (t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS). |
| 1170 | 1227 | ||
| 1228 | ** EIEIO | ||
| 1229 | |||
| 1230 | *** Improved security when handling persistent objects: | ||
| 1231 | |||
| 1232 | **** `eieio-persistent-read' now features optional arguments for specifying | ||
| 1233 | the class to load, as well as a flag stating whether subclasses are allowed; | ||
| 1234 | if provided, other classes will be rejected by the reader. For | ||
| 1235 | compatibility with existing code, if the class is omitted only a | ||
| 1236 | warning is issued. | ||
| 1237 | |||
| 1238 | **** New specialized reader for pulling in classes and signaling errors | ||
| 1239 | without evaluation of suspicious code. | ||
| 1240 | |||
| 1241 | **** All slots that contain objects must have a :type. Slots with lists | ||
| 1242 | of objects must use a new type predicate for a list of an object type. | ||
| 1243 | |||
| 1244 | *** Support for `find-function' and similar utilities, through the addition | ||
| 1245 | of filename support to generated symbols. | ||
| 1246 | |||
| 1171 | ** Floating point functions now always return special values like NaN, | 1247 | ** Floating point functions now always return special values like NaN, |
| 1172 | instead of signaling errors, if given invalid args; e.g., (log -1.0). | 1248 | instead of signaling errors, if given invalid args; e.g., (log -1.0). |
| 1173 | Previously, they returned NaNs on some platforms but signaled errors | 1249 | Previously, they returned NaNs on some platforms but signaled errors |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d12c7043303..5c19dd26489 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * textmodes/paragraphs.el (mark-paragraph): Doc fix. | ||
| 4 | |||
| 1 | 2013-02-28 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2013-02-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c. | 7 | * doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c. |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 16d456ed51f..5626b611f0d 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,73 @@ | |||
| 1 | 2013-02-28 Achim Gratz <Stromeko@Stromeko.DE> | ||
| 2 | |||
| 3 | * org.el (org-org-menu): Use correct key "C-u C-c C-x !" to do | ||
| 4 | org-reload uncompiled in the menu. | ||
| 5 | |||
| 6 | 2013-02-28 Bastien Guerry <bzg@gnu.org> | ||
| 7 | |||
| 8 | * org-indent.el (org-indent-add-properties): Bugfix: prevent | ||
| 9 | negative value for `added-ind-per-lvl'. | ||
| 10 | |||
| 11 | * org.el (org-mode): Add `org-fix-ellipsis-at-bol' to | ||
| 12 | `isearch-mode-end-hook' so that any isearch fixes the problem with | ||
| 13 | ellipsis on the first line. | ||
| 14 | (org-fix-ellipsis-at-bol): New defsubst. | ||
| 15 | (org-show-context, org-isearch-end): Use it. | ||
| 16 | |||
| 17 | * org.el (org-show-context): Remove useless catch. | ||
| 18 | Make sure the top of the window is a visible headline. | ||
| 19 | (org-activate-plain-links): Remove unused catch. | ||
| 20 | |||
| 21 | * org-macs.el (org-get-alist-option): Return nil, not (nil), | ||
| 22 | so that `org-show-context' DTRT. | ||
| 23 | |||
| 24 | * org.el (org-imenu-get-tree): Fix bug when matching against empty | ||
| 25 | headlines. | ||
| 26 | |||
| 27 | * org.el (org-overview): Stay on current line. | ||
| 28 | (org-map-entries): Fix docstring. | ||
| 29 | (org-at-clock-log-p): Delete. | ||
| 30 | * org-clock.el (org-at-clock-log-p): Move here. | ||
| 31 | |||
| 32 | * org.el (org-tsr-regexp-both): Don't activate dates in links. | ||
| 33 | (org-activate-dates): Change match boundaries according to the new | ||
| 34 | value of `org-tsr-regexp-both'. | ||
| 35 | |||
| 36 | * org-agenda.el (org-agenda-to-appt): Fix typos. | ||
| 37 | |||
| 38 | * org-agenda.el (org-agenda-local-vars): Don't include | ||
| 39 | `org-agenda-show-window' as it needs to be checked outside of the | ||
| 40 | agenda window. | ||
| 41 | |||
| 42 | * org.el (org-set-tags-command): Fix bug when setting tags for | ||
| 43 | multiple headlines in an active region. | ||
| 44 | |||
| 45 | * org-mobile.el (org-mobile-edit): DTRT when inserting a heading | ||
| 46 | in an invisible region. | ||
| 47 | |||
| 48 | * org.el (org-insert-heading-respect-content): Add docstring. | ||
| 49 | New `invisible-ok' parameter. | ||
| 50 | (org-insert-todo-heading-respect-content): Add docstring. | ||
| 51 | |||
| 52 | * ob-tangle.el (org-babel-tangle-collect-blocks): | ||
| 53 | Bugfix: remove code references from blocks. | ||
| 54 | |||
| 55 | * org-agenda.el (org-agenda-schedule, org-agenda-deadline): | ||
| 56 | Cosmetic changes. | ||
| 57 | (org-agenda-show-new-time): Fix bug when displaying a temporary | ||
| 58 | overlay with the scheduled/deadline information. | ||
| 59 | |||
| 60 | * org.el (org-fill-paragraph-with-timestamp-nobreak-p): New function. | ||
| 61 | (org-setup-filling): Use it to prevent breaking a timestamp when | ||
| 62 | filling a paragraph. | ||
| 63 | |||
| 64 | * org-id.el (org-id-get-with-outline-path-completion): Fix docstring. | ||
| 65 | |||
| 66 | 2013-02-28 Tim Burt <tcburt@rochester.rr.com> (tiny change) | ||
| 67 | |||
| 68 | * org-datetree.el (org-datetree-find-year-create): | ||
| 69 | Match headlines with tags. | ||
| 70 | |||
| 1 | 2013-02-07 Bastien Guerry <bzg@gnu.org> | 71 | 2013-02-07 Bastien Guerry <bzg@gnu.org> |
| 2 | 72 | ||
| 3 | * org-agenda.el (org-agenda-get-deadlines) | 73 | * org-agenda.el (org-agenda-get-deadlines) |
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 89457f19141..c3b6a483ee6 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el | |||
| @@ -371,6 +371,10 @@ code blocks by language." | |||
| 371 | (unless (and language (not (string= language src-lang))) | 371 | (unless (and language (not (string= language src-lang))) |
| 372 | (let* ((info (org-babel-get-src-block-info)) | 372 | (let* ((info (org-babel-get-src-block-info)) |
| 373 | (params (nth 2 info)) | 373 | (params (nth 2 info)) |
| 374 | (extra (nth 3 info)) | ||
| 375 | (cref-fmt (or (and (string-match "-l \"\\(.+\\)\"" extra) | ||
| 376 | (match-string 1 extra)) | ||
| 377 | org-coderef-label-format)) | ||
| 374 | (link ((lambda (link) | 378 | (link ((lambda (link) |
| 375 | (and (string-match org-bracket-link-regexp link) | 379 | (and (string-match org-bracket-link-regexp link) |
| 376 | (match-string 1 link))) | 380 | (match-string 1 link))) |
| @@ -388,6 +392,11 @@ code blocks by language." | |||
| 388 | ((lambda (body) ;; run the tangle-body-hook | 392 | ((lambda (body) ;; run the tangle-body-hook |
| 389 | (with-temp-buffer | 393 | (with-temp-buffer |
| 390 | (insert body) | 394 | (insert body) |
| 395 | (when (string-match "-r" extra) | ||
| 396 | (goto-char (point-min)) | ||
| 397 | (while (re-search-forward | ||
| 398 | (replace-regexp-in-string "%s" ".+" cref-fmt) nil t) | ||
| 399 | (replace-match ""))) | ||
| 391 | (run-hooks 'org-babel-tangle-body-hook) | 400 | (run-hooks 'org-babel-tangle-body-hook) |
| 392 | (buffer-string))) | 401 | (buffer-string))) |
| 393 | ((lambda (body) ;; expand the body in language specific manner | 402 | ((lambda (body) ;; expand the body in language specific manner |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 9b6dcaed8c2..79217b6a6e6 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -1934,11 +1934,6 @@ When nil, `q' will kill the single agenda buffer." | |||
| 1934 | (message "Sticky agenda was %s" | 1934 | (message "Sticky agenda was %s" |
| 1935 | (if org-agenda-sticky "enabled" "disabled")))))) | 1935 | (if org-agenda-sticky "enabled" "disabled")))))) |
| 1936 | 1936 | ||
| 1937 | (autoload 'org-toggle-sticky-agenda "org-agenda" "\ | ||
| 1938 | Toggle `org-agenda-sticky'. | ||
| 1939 | |||
| 1940 | \(fn &optional ARG)" t nil) | ||
| 1941 | |||
| 1942 | (defvar org-agenda-buffer nil | 1937 | (defvar org-agenda-buffer nil |
| 1943 | "Agenda buffer currently being generated.") | 1938 | "Agenda buffer currently being generated.") |
| 1944 | 1939 | ||
| @@ -1971,7 +1966,6 @@ Toggle `org-agenda-sticky'. | |||
| 1971 | org-agenda-last-search-view-search-was-boolean | 1966 | org-agenda-last-search-view-search-was-boolean |
| 1972 | org-agenda-filtered-by-category | 1967 | org-agenda-filtered-by-category |
| 1973 | org-agenda-filter-form | 1968 | org-agenda-filter-form |
| 1974 | org-agenda-show-window | ||
| 1975 | org-agenda-cycle-counter | 1969 | org-agenda-cycle-counter |
| 1976 | org-agenda-last-prefix-arg) | 1970 | org-agenda-last-prefix-arg) |
| 1977 | "Variables that must be local in agenda buffers to allow multiple buffers.") | 1971 | "Variables that must be local in agenda buffers to allow multiple buffers.") |
| @@ -2615,43 +2609,6 @@ Pressing `<' twice means to restrict to the current subtree or region | |||
| 2615 | ((equal org-keys "!") (customize-variable 'org-stuck-projects)) | 2609 | ((equal org-keys "!") (customize-variable 'org-stuck-projects)) |
| 2616 | (t (error "Invalid agenda key")))))) | 2610 | (t (error "Invalid agenda key")))))) |
| 2617 | 2611 | ||
| 2618 | (autoload 'org-agenda "org-agenda" "\ | ||
| 2619 | Dispatch agenda commands to collect entries to the agenda buffer. | ||
| 2620 | Prompts for a command to execute. Any prefix arg will be passed | ||
| 2621 | on to the selected command. The default selections are: | ||
| 2622 | |||
| 2623 | a Call `org-agenda-list' to display the agenda for current day or week. | ||
| 2624 | t Call `org-todo-list' to display the global todo list. | ||
| 2625 | T Call `org-todo-list' to display the global todo list, select only | ||
| 2626 | entries with a specific TODO keyword (the user gets a prompt). | ||
| 2627 | m Call `org-tags-view' to display headlines with tags matching | ||
| 2628 | a condition (the user is prompted for the condition). | ||
| 2629 | M Like `m', but select only TODO entries, no ordinary headlines. | ||
| 2630 | L Create a timeline for the current buffer. | ||
| 2631 | e Export views to associated files. | ||
| 2632 | s Search entries for keywords. | ||
| 2633 | S Search entries for keywords, only with TODO keywords. | ||
| 2634 | / Multi occur across all agenda files and also files listed | ||
| 2635 | in `org-agenda-text-search-extra-files'. | ||
| 2636 | < Restrict agenda commands to buffer, subtree, or region. | ||
| 2637 | Press several times to get the desired effect. | ||
| 2638 | > Remove a previous restriction. | ||
| 2639 | # List \"stuck\" projects. | ||
| 2640 | ! Configure what \"stuck\" means. | ||
| 2641 | C Configure custom agenda commands. | ||
| 2642 | |||
| 2643 | More commands can be added by configuring the variable | ||
| 2644 | `org-agenda-custom-commands'. In particular, specific tags and TODO keyword | ||
| 2645 | searches can be pre-defined in this way. | ||
| 2646 | |||
| 2647 | If the current buffer is in Org-mode and visiting a file, you can also | ||
| 2648 | first press `<' once to indicate that the agenda should be temporarily | ||
| 2649 | \(until the next use of \\[org-agenda]) restricted to the current file. | ||
| 2650 | Pressing `<' twice means to restrict to the current subtree or region | ||
| 2651 | \(if active). | ||
| 2652 | |||
| 2653 | \(fn &optional ARG ORG-KEYS RESTRICTION)" t nil) | ||
| 2654 | |||
| 2655 | (defun org-agenda-append-agenda () | 2612 | (defun org-agenda-append-agenda () |
| 2656 | "Append another agenda view to the current one. | 2613 | "Append another agenda view to the current one. |
| 2657 | This function allows interactive building of block agendas. | 2614 | This function allows interactive building of block agendas. |
| @@ -2947,17 +2904,6 @@ before running the agenda command." | |||
| 2947 | (set-buffer org-agenda-buffer-name) | 2904 | (set-buffer org-agenda-buffer-name) |
| 2948 | (princ (buffer-string))) | 2905 | (princ (buffer-string))) |
| 2949 | 2906 | ||
| 2950 | (autoload 'org-batch-agenda "org-agenda" "\ | ||
| 2951 | Run an agenda command in batch mode and send the result to STDOUT. | ||
| 2952 | If CMD-KEY is a string of length 1, it is used as a key in | ||
| 2953 | `org-agenda-custom-commands' and triggers this command. If it is a | ||
| 2954 | longer string it is used as a tags/todo match string. | ||
| 2955 | Parameters are alternating variable names and values that will be bound | ||
| 2956 | before running the agenda command. | ||
| 2957 | |||
| 2958 | \(fn CMD-KEY &rest PARAMETERS)" nil t) | ||
| 2959 | (def-edebug-spec org-batch-agenda (form &rest sexp)) | ||
| 2960 | |||
| 2961 | (defvar org-agenda-info nil) | 2907 | (defvar org-agenda-info nil) |
| 2962 | 2908 | ||
| 2963 | ;;;###autoload | 2909 | ;;;###autoload |
| @@ -3015,44 +2961,6 @@ agenda-day The day in the agenda where this is listed" | |||
| 3015 | ",")) | 2961 | ",")) |
| 3016 | (princ "\n"))))) | 2962 | (princ "\n"))))) |
| 3017 | 2963 | ||
| 3018 | (autoload 'org-batch-agenda-csv "org-agenda" "\ | ||
| 3019 | Run an agenda command in batch mode and send the result to STDOUT. | ||
| 3020 | If CMD-KEY is a string of length 1, it is used as a key in | ||
| 3021 | `org-agenda-custom-commands' and triggers this command. If it is a | ||
| 3022 | longer string it is used as a tags/todo match string. | ||
| 3023 | Parameters are alternating variable names and values that will be bound | ||
| 3024 | before running the agenda command. | ||
| 3025 | |||
| 3026 | The output gives a line for each selected agenda item. Each | ||
| 3027 | item is a list of comma-separated values, like this: | ||
| 3028 | |||
| 3029 | category,head,type,todo,tags,date,time,extra,priority-l,priority-n | ||
| 3030 | |||
| 3031 | category The category of the item | ||
| 3032 | head The headline, without TODO kwd, TAGS and PRIORITY | ||
| 3033 | type The type of the agenda entry, can be | ||
| 3034 | todo selected in TODO match | ||
| 3035 | tagsmatch selected in tags match | ||
| 3036 | diary imported from diary | ||
| 3037 | deadline a deadline on given date | ||
| 3038 | scheduled scheduled on given date | ||
| 3039 | timestamp entry has timestamp on given date | ||
| 3040 | closed entry was closed on given date | ||
| 3041 | upcoming-deadline warning about deadline | ||
| 3042 | past-scheduled forwarded scheduled item | ||
| 3043 | block entry has date block including g. date | ||
| 3044 | todo The todo keyword, if any | ||
| 3045 | tags All tags including inherited ones, separated by colons | ||
| 3046 | date The relevant date, like 2007-2-14 | ||
| 3047 | time The time, like 15:00-16:50 | ||
| 3048 | extra Sting with extra planning info | ||
| 3049 | priority-l The priority letter if any was given | ||
| 3050 | priority-n The computed numerical priority | ||
| 3051 | agenda-day The day in the agenda where this is listed | ||
| 3052 | |||
| 3053 | \(fn CMD-KEY &rest PARAMETERS)" nil t) | ||
| 3054 | (def-edebug-spec org-batch-agenda-csv (form &rest sexp)) | ||
| 3055 | |||
| 3056 | (defun org-fix-agenda-info (props) | 2964 | (defun org-fix-agenda-info (props) |
| 3057 | "Make sure all properties on an agenda item have a canonical form. | 2965 | "Make sure all properties on an agenda item have a canonical form. |
| 3058 | This ensures the export commands can easily use it." | 2966 | This ensures the export commands can easily use it." |
| @@ -3100,11 +3008,6 @@ This ensures the export commands can easily use it." | |||
| 3100 | (interactive) | 3008 | (interactive) |
| 3101 | (eval (list 'org-batch-store-agenda-views))) | 3009 | (eval (list 'org-batch-store-agenda-views))) |
| 3102 | 3010 | ||
| 3103 | (autoload 'org-store-agenda-views "org-agenda" "\ | ||
| 3104 | |||
| 3105 | |||
| 3106 | \(fn &rest PARAMETERS)" t nil) | ||
| 3107 | |||
| 3108 | ;;;###autoload | 3011 | ;;;###autoload |
| 3109 | (defmacro org-batch-store-agenda-views (&rest parameters) | 3012 | (defmacro org-batch-store-agenda-views (&rest parameters) |
| 3110 | "Run all custom agenda commands that have a file argument." | 3013 | "Run all custom agenda commands that have a file argument." |
| @@ -3140,12 +3043,6 @@ This ensures the export commands can easily use it." | |||
| 3140 | (and (get-buffer bufname) | 3043 | (and (get-buffer bufname) |
| 3141 | (kill-buffer bufname))))))) | 3044 | (kill-buffer bufname))))))) |
| 3142 | 3045 | ||
| 3143 | (autoload 'org-batch-store-agenda-views "org-agenda" "\ | ||
| 3144 | Run all custom agenda commands that have a file argument. | ||
| 3145 | |||
| 3146 | \(fn &rest PARAMETERS)" nil t) | ||
| 3147 | (def-edebug-spec org-batch-store-agenda-views (&rest sexp)) | ||
| 3148 | |||
| 3149 | (defvar org-agenda-current-span nil | 3046 | (defvar org-agenda-current-span nil |
| 3150 | "The current span used in the agenda view.") ; local variable in the agenda buffer | 3047 | "The current span used in the agenda view.") ; local variable in the agenda buffer |
| 3151 | (defun org-agenda-mark-header-line (pos) | 3048 | (defun org-agenda-mark-header-line (pos) |
| @@ -4204,20 +4101,6 @@ given in `org-agenda-start-on-weekday'." | |||
| 4204 | (setq buffer-read-only t) | 4101 | (setq buffer-read-only t) |
| 4205 | (message "")))) | 4102 | (message "")))) |
| 4206 | 4103 | ||
| 4207 | (autoload 'org-agenda-list "org-agenda" "\ | ||
| 4208 | Produce a daily/weekly view from all files in variable `org-agenda-files'. | ||
| 4209 | The view will be for the current day or week, but from the overview buffer | ||
| 4210 | you will be able to go to other days/weeks. | ||
| 4211 | |||
| 4212 | With a numeric prefix argument in an interactive call, the agenda will | ||
| 4213 | span ARG days. Lisp programs should instead specify SPAN to change | ||
| 4214 | the number of days. SPAN defaults to `org-agenda-span'. | ||
| 4215 | |||
| 4216 | START-DAY defaults to TODAY, or to the most recent match for the weekday | ||
| 4217 | given in `org-agenda-start-on-weekday'. | ||
| 4218 | |||
| 4219 | \(fn &optional ARG START-DAY SPAN)" t nil) | ||
| 4220 | |||
| 4221 | (defun org-agenda-ndays-to-span (n) | 4104 | (defun org-agenda-ndays-to-span (n) |
| 4222 | "Return a span symbol for a span of N days, or N if none matches." | 4105 | "Return a span symbol for a span of N days, or N if none matches." |
| 4223 | (cond ((symbolp n) n) | 4106 | (cond ((symbolp n) n) |
| @@ -4527,52 +4410,6 @@ in `org-agenda-text-search-extra-files'." | |||
| 4527 | (org-agenda-finalize) | 4410 | (org-agenda-finalize) |
| 4528 | (setq buffer-read-only t)))) | 4411 | (setq buffer-read-only t)))) |
| 4529 | 4412 | ||
| 4530 | (autoload 'org-search-view "org-agenda" "\ | ||
| 4531 | Show all entries that contain a phrase or words or regular expressions. | ||
| 4532 | |||
| 4533 | With optional prefix argument TODO-ONLY, only consider entries that are | ||
| 4534 | TODO entries. The argument STRING can be used to pass a default search | ||
| 4535 | string into this function. If EDIT-AT is non-nil, it means that the | ||
| 4536 | user should get a chance to edit this string, with cursor at position | ||
| 4537 | EDIT-AT. | ||
| 4538 | |||
| 4539 | The search string can be viewed either as a phrase that should be found as | ||
| 4540 | is, or it can be broken into a number of snippets, each of which must match | ||
| 4541 | in a Boolean way to select an entry. The default depends on the variable | ||
| 4542 | `org-agenda-search-view-always-boolean'. | ||
| 4543 | Even if this is turned off (the default) you can always switch to | ||
| 4544 | Boolean search dynamically by preceding the first word with \"+\" or \"-\". | ||
| 4545 | |||
| 4546 | The default is a direct search of the whole phrase, where each space in | ||
| 4547 | the search string can expand to an arbitrary amount of whitespace, | ||
| 4548 | including newlines. | ||
| 4549 | |||
| 4550 | If using a Boolean search, the search string is split on whitespace and | ||
| 4551 | each snippet is searched separately, with logical AND to select an entry. | ||
| 4552 | Words prefixed with a minus must *not* occur in the entry. Words without | ||
| 4553 | a prefix or prefixed with a plus must occur in the entry. Matching is | ||
| 4554 | case-insensitive. Words are enclosed by word delimiters (i.e. they must | ||
| 4555 | match whole words, not parts of a word) if | ||
| 4556 | `org-agenda-search-view-force-full-words' is set (default is nil). | ||
| 4557 | |||
| 4558 | Boolean search snippets enclosed by curly braces are interpreted as | ||
| 4559 | regular expressions that must or (when preceded with \"-\") must not | ||
| 4560 | match in the entry. Snippets enclosed into double quotes will be taken | ||
| 4561 | as a whole, to include whitespace. | ||
| 4562 | |||
| 4563 | - If the search string starts with an asterisk, search only in headlines. | ||
| 4564 | - If (possibly after the leading star) the search string starts with an | ||
| 4565 | exclamation mark, this also means to look at TODO entries only, an effect | ||
| 4566 | that can also be achieved with a prefix argument. | ||
| 4567 | - If (possibly after star and exclamation mark) the search string starts | ||
| 4568 | with a colon, this will mean that the (non-regexp) snippets of the | ||
| 4569 | Boolean search must match as full words. | ||
| 4570 | |||
| 4571 | This command searches the agenda files, and in addition the files listed | ||
| 4572 | in `org-agenda-text-search-extra-files'. | ||
| 4573 | |||
| 4574 | \(fn &optional TODO-ONLY STRING EDIT-AT)" t nil) | ||
| 4575 | |||
| 4576 | ;;; Agenda TODO list | 4413 | ;;; Agenda TODO list |
| 4577 | 4414 | ||
| 4578 | (defvar org-select-this-todo-keyword nil) | 4415 | (defvar org-select-this-todo-keyword nil) |
| @@ -4663,15 +4500,6 @@ for a keyword. A numeric prefix directly selects the Nth keyword in | |||
| 4663 | (org-agenda-finalize) | 4500 | (org-agenda-finalize) |
| 4664 | (setq buffer-read-only t)))) | 4501 | (setq buffer-read-only t)))) |
| 4665 | 4502 | ||
| 4666 | (autoload 'org-todo-list "org-agenda" "\ | ||
| 4667 | Show all (not done) TODO entries from all agenda file in a single list. | ||
| 4668 | The prefix arg can be used to select a specific TODO keyword and limit | ||
| 4669 | the list to these. When using \\[universal-argument], you will be prompted | ||
| 4670 | for a keyword. A numeric prefix directly selects the Nth keyword in | ||
| 4671 | `org-todo-keywords-1'. | ||
| 4672 | |||
| 4673 | \(fn &optional ARG)" t nil) | ||
| 4674 | |||
| 4675 | ;;; Agenda tags match | 4503 | ;;; Agenda tags match |
| 4676 | 4504 | ||
| 4677 | ;;;###autoload | 4505 | ;;;###autoload |
| @@ -4757,12 +4585,6 @@ The prefix arg TODO-ONLY limits the search to TODO entries." | |||
| 4757 | (org-agenda-finalize) | 4585 | (org-agenda-finalize) |
| 4758 | (setq buffer-read-only t)))) | 4586 | (setq buffer-read-only t)))) |
| 4759 | 4587 | ||
| 4760 | (autoload 'org-tags-view "org-agenda" "\ | ||
| 4761 | Show all headlines for all `org-agenda-files' matching a TAGS criterion. | ||
| 4762 | The prefix arg TODO-ONLY limits the search to TODO entries. | ||
| 4763 | |||
| 4764 | \(fn &optional TODO-ONLY MATCH)" t nil) | ||
| 4765 | |||
| 4766 | ;;; Agenda Finding stuck projects | 4588 | ;;; Agenda Finding stuck projects |
| 4767 | 4589 | ||
| 4768 | (defvar org-agenda-skip-regexp nil | 4590 | (defvar org-agenda-skip-regexp nil |
| @@ -4991,14 +4813,6 @@ of what a project is and how to check if it stuck, customize the variable | |||
| 4991 | (setq org-agenda-redo-command | 4813 | (setq org-agenda-redo-command |
| 4992 | `(org-agenda-list-stuck-projects ,current-prefix-arg))))) | 4814 | `(org-agenda-list-stuck-projects ,current-prefix-arg))))) |
| 4993 | 4815 | ||
| 4994 | (autoload 'org-agenda-list-stuck-projects "org-agenda" "\ | ||
| 4995 | Create agenda view for projects that are stuck. | ||
| 4996 | Stuck projects are project that have no next actions. For the definitions | ||
| 4997 | of what a project is and how to check if it stuck, customize the variable | ||
| 4998 | `org-stuck-projects'. | ||
| 4999 | |||
| 5000 | \(fn &rest IGNORE)" t nil) | ||
| 5001 | |||
| 5002 | ;;; Diary integration | 4816 | ;;; Diary integration |
| 5003 | 4817 | ||
| 5004 | (defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param. | 4818 | (defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param. |
| @@ -5177,35 +4991,6 @@ function from a program - use `org-agenda-get-day-entries' instead." | |||
| 5177 | (if results | 4991 | (if results |
| 5178 | (concat (org-agenda-finalize-entries results) "\n")))) | 4992 | (concat (org-agenda-finalize-entries results) "\n")))) |
| 5179 | 4993 | ||
| 5180 | (autoload 'org-diary "org-agenda" "\ | ||
| 5181 | Return diary information from org files. | ||
| 5182 | This function can be used in a \"sexp\" diary entry in the Emacs calendar. | ||
| 5183 | It accesses org files and extracts information from those files to be | ||
| 5184 | listed in the diary. The function accepts arguments specifying what | ||
| 5185 | items should be listed. For a list of arguments allowed here, see the | ||
| 5186 | variable `org-agenda-entry-types'. | ||
| 5187 | |||
| 5188 | The call in the diary file should look like this: | ||
| 5189 | |||
| 5190 | &%%(org-diary) ~/path/to/some/orgfile.org | ||
| 5191 | |||
| 5192 | Use a separate line for each org file to check. Or, if you omit the file name, | ||
| 5193 | all files listed in `org-agenda-files' will be checked automatically: | ||
| 5194 | |||
| 5195 | &%%(org-diary) | ||
| 5196 | |||
| 5197 | If you don't give any arguments (as in the example above), the default | ||
| 5198 | arguments (:deadline :scheduled :timestamp :sexp) are used. | ||
| 5199 | So the example above may also be written as | ||
| 5200 | |||
| 5201 | &%%(org-diary :deadline :timestamp :sexp :scheduled) | ||
| 5202 | |||
| 5203 | The function expects the lisp variables `entry' and `date' to be provided | ||
| 5204 | by the caller, because this is how the calendar works. Don't use this | ||
| 5205 | function from a program - use `org-agenda-get-day-entries' instead. | ||
| 5206 | |||
| 5207 | \(fn &rest ARGS)" nil nil) | ||
| 5208 | |||
| 5209 | ;;; Agenda entry finders | 4994 | ;;; Agenda entry finders |
| 5210 | 4995 | ||
| 5211 | (defun org-agenda-get-day-entries (file date &rest args) | 4996 | (defun org-agenda-get-day-entries (file date &rest args) |
| @@ -5401,11 +5186,6 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', | |||
| 5401 | (match-string 1) org-agenda-todo-ignore-timestamp)) | 5186 | (match-string 1) org-agenda-todo-ignore-timestamp)) |
| 5402 | (t)))))))))) | 5187 | (t)))))))))) |
| 5403 | 5188 | ||
| 5404 | (autoload 'org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item "org-agenda" "\ | ||
| 5405 | Do we have a reason to ignore this TODO entry because it has a time stamp? | ||
| 5406 | |||
| 5407 | \(fn &optional END)" nil nil) | ||
| 5408 | |||
| 5409 | (defun org-agenda-get-timestamps (&optional deadline-results) | 5189 | (defun org-agenda-get-timestamps (&optional deadline-results) |
| 5410 | "Return the date stamp information for agenda display." | 5190 | "Return the date stamp information for agenda display." |
| 5411 | (let* ((props (list 'face 'org-agenda-calendar-event | 5191 | (let* ((props (list 'face 'org-agenda-calendar-event |
| @@ -8686,9 +8466,8 @@ Called with a universal prefix arg, show the priority instead of setting it." | |||
| 8686 | (defun org-agenda-show-new-time (marker stamp &optional prefix) | 8466 | (defun org-agenda-show-new-time (marker stamp &optional prefix) |
| 8687 | "Show new date stamp via text properties." | 8467 | "Show new date stamp via text properties." |
| 8688 | ;; We use text properties to make this undoable | 8468 | ;; We use text properties to make this undoable |
| 8689 | (let ((inhibit-read-only t) | 8469 | (let ((inhibit-read-only t)) |
| 8690 | (buffer-invisibility-spec)) | 8470 | (setq stamp (concat prefix " => " stamp " ")) |
| 8691 | (setq stamp (concat " " prefix " => " stamp)) | ||
| 8692 | (save-excursion | 8471 | (save-excursion |
| 8693 | (goto-char (point-max)) | 8472 | (goto-char (point-max)) |
| 8694 | (while (not (bobp)) | 8473 | (while (not (bobp)) |
| @@ -8750,7 +8529,7 @@ ARG is passed through to `org-schedule'." | |||
| 8750 | (widen) | 8529 | (widen) |
| 8751 | (goto-char pos) | 8530 | (goto-char pos) |
| 8752 | (setq ts (org-schedule arg time))) | 8531 | (setq ts (org-schedule arg time))) |
| 8753 | (org-agenda-show-new-time marker ts "S")) | 8532 | (org-agenda-show-new-time marker ts " S")) |
| 8754 | (message "%s" ts))) | 8533 | (message "%s" ts))) |
| 8755 | 8534 | ||
| 8756 | (defun org-agenda-deadline (arg &optional time) | 8535 | (defun org-agenda-deadline (arg &optional time) |
| @@ -8770,7 +8549,7 @@ ARG is passed through to `org-deadline'." | |||
| 8770 | (widen) | 8549 | (widen) |
| 8771 | (goto-char pos) | 8550 | (goto-char pos) |
| 8772 | (setq ts (org-deadline arg time))) | 8551 | (setq ts (org-deadline arg time))) |
| 8773 | (org-agenda-show-new-time marker ts "D")) | 8552 | (org-agenda-show-new-time marker ts " D")) |
| 8774 | (message "%s" ts))) | 8553 | (message "%s" ts))) |
| 8775 | 8554 | ||
| 8776 | (defun org-agenda-clock-in (&optional arg) | 8555 | (defun org-agenda-clock-in (&optional arg) |
| @@ -9131,12 +8910,6 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 9131 | (calendar-cursor-to-date)) | 8910 | (calendar-cursor-to-date)) |
| 9132 | nil)) | 8911 | nil)) |
| 9133 | 8912 | ||
| 9134 | (autoload 'org-calendar-goto-agenda "org-agenda" "\ | ||
| 9135 | Compute the Org-mode agenda for the calendar date displayed at the cursor. | ||
| 9136 | This is a command that has to be installed in `calendar-mode-map'. | ||
| 9137 | |||
| 9138 | \(fn)" t nil) | ||
| 9139 | |||
| 9140 | (defun org-agenda-convert-date () | 8913 | (defun org-agenda-convert-date () |
| 9141 | (interactive) | 8914 | (interactive) |
| 9142 | (org-agenda-check-type t 'agenda 'timeline) | 8915 | (org-agenda-check-type t 'agenda 'timeline) |
| @@ -9519,7 +9292,7 @@ By default `org-agenda-to-appt' will use :deadline, :scheduled | |||
| 9519 | and :timestamp entries. See the docstring of `org-diary' for | 9292 | and :timestamp entries. See the docstring of `org-diary' for |
| 9520 | details and examples. | 9293 | details and examples. |
| 9521 | 9294 | ||
| 9522 | If an entry as a APPT_WARNTIME property, its value will be used | 9295 | If an entry has a APPT_WARNTIME property, its value will be used |
| 9523 | to override `appt-message-warning-time'." | 9296 | to override `appt-message-warning-time'." |
| 9524 | (interactive "P") | 9297 | (interactive "P") |
| 9525 | (if refresh (setq appt-time-msg-list nil)) | 9298 | (if refresh (setq appt-time-msg-list nil)) |
| @@ -9579,40 +9352,6 @@ to override `appt-message-warning-time'." | |||
| 9579 | (message "No event to add") | 9352 | (message "No event to add") |
| 9580 | (message "Added %d event%s for today" cnt (if (> cnt 1) "s" ""))))) | 9353 | (message "Added %d event%s for today" cnt (if (> cnt 1) "s" ""))))) |
| 9581 | 9354 | ||
| 9582 | (autoload 'org-agenda-to-appt "org-agenda" "\ | ||
| 9583 | Activate appointments found in `org-agenda-files'. | ||
| 9584 | With a \\[universal-argument] prefix, refresh the list of | ||
| 9585 | appointments. | ||
| 9586 | |||
| 9587 | If FILTER is t, interactively prompt the user for a regular | ||
| 9588 | expression, and filter out entries that don't match it. | ||
| 9589 | |||
| 9590 | If FILTER is a string, use this string as a regular expression | ||
| 9591 | for filtering entries out. | ||
| 9592 | |||
| 9593 | If FILTER is a function, filter out entries against which | ||
| 9594 | calling the function returns nil. This function takes one | ||
| 9595 | argument: an entry from `org-agenda-get-day-entries'. | ||
| 9596 | |||
| 9597 | FILTER can also be an alist with the car of each cell being | ||
| 9598 | either 'headline or 'category. For example: | ||
| 9599 | |||
| 9600 | '((headline \"IMPORTANT\") | ||
| 9601 | (category \"Work\")) | ||
| 9602 | |||
| 9603 | will only add headlines containing IMPORTANT or headlines | ||
| 9604 | belonging to the \"Work\" category. | ||
| 9605 | |||
| 9606 | ARGS are symbols indicating what kind of entries to consider. | ||
| 9607 | By default `org-agenda-to-appt' will use :deadline, :scheduled | ||
| 9608 | and :timestamp entries. See the docstring of `org-diary' for | ||
| 9609 | details and examples. | ||
| 9610 | |||
| 9611 | If an entry as a APPT_WARNTIME property, its value will be used | ||
| 9612 | to override `appt-message-warning-time'. | ||
| 9613 | |||
| 9614 | \(fn &optional REFRESH FILTER &rest ARGS)" t nil) | ||
| 9615 | |||
| 9616 | (defun org-agenda-todayp (date) | 9355 | (defun org-agenda-todayp (date) |
| 9617 | "Does DATE mean today, when considering `org-extend-today-until'?" | 9356 | "Does DATE mean today, when considering `org-extend-today-until'?" |
| 9618 | (let ((today (org-today)) | 9357 | (let ((today (org-today)) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index bc0c431ddd3..a536d025c04 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1545,12 +1545,6 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." | |||
| 1545 | (org-remove-empty-drawer-at clock-drawer (point)) | 1545 | (org-remove-empty-drawer-at clock-drawer (point)) |
| 1546 | (forward-line 1)))))) | 1546 | (forward-line 1)))))) |
| 1547 | 1547 | ||
| 1548 | (defun org-at-clock-log-p nil | ||
| 1549 | "Is the cursor on the clock log line?" | ||
| 1550 | (save-excursion | ||
| 1551 | (move-beginning-of-line 1) | ||
| 1552 | (looking-at "^[ \t]*CLOCK:"))) | ||
| 1553 | |||
| 1554 | (defun org-clock-timestamps-up nil | 1548 | (defun org-clock-timestamps-up nil |
| 1555 | "Increase CLOCK timestamps at cursor." | 1549 | "Increase CLOCK timestamps at cursor." |
| 1556 | (interactive) | 1550 | (interactive) |
diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index f2e35fa2dfd..e0f4d10bc2d 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el | |||
| @@ -72,7 +72,7 @@ tree can be found." | |||
| 72 | (goto-char (prog1 (point) (widen)))))) | 72 | (goto-char (prog1 (point) (widen)))))) |
| 73 | 73 | ||
| 74 | (defun org-datetree-find-year-create (year) | 74 | (defun org-datetree-find-year-create (year) |
| 75 | (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\s-*$") | 75 | (let ((re "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:\\)?\\s-*$\\)") |
| 76 | match) | 76 | match) |
| 77 | (goto-char (point-min)) | 77 | (goto-char (point-min)) |
| 78 | (while (and (setq match (re-search-forward re nil t)) | 78 | (while (and (setq match (re-search-forward re nil t)) |
diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 64c215d8db5..be99ad99a69 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | (declare-function image-mode-window-get "ext:image-mode" | 49 | (declare-function image-mode-window-get "ext:image-mode" |
| 50 | (prop &optional winprops)) | 50 | (prop &optional winprops)) |
| 51 | 51 | ||
| 52 | (autoload 'doc-view-goto-page "doc-view") | 52 | (org-autoload "doc-view" '(doc-view-goto-page)) |
| 53 | 53 | ||
| 54 | (org-add-link-type "docview" 'org-docview-open) | 54 | (org-add-link-type "docview" 'org-docview-open) |
| 55 | (add-hook 'org-store-link-functions 'org-docview-store-link) | 55 | (add-hook 'org-store-link-functions 'org-docview-store-link) |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 6e865b50c2c..ecf67f72f3a 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -259,11 +259,11 @@ In any case, the ID of the entry is returned." | |||
| 259 | id))))) | 259 | id))))) |
| 260 | 260 | ||
| 261 | (defun org-id-get-with-outline-path-completion (&optional targets) | 261 | (defun org-id-get-with-outline-path-completion (&optional targets) |
| 262 | "Use outline-path-completion to retrieve the ID of an entry. | 262 | "Use `outline-path-completion' to retrieve the ID of an entry. |
| 263 | TARGETS may be a setting for `org-refile-targets' to define the eligible | 263 | TARGETS may be a setting for `org-refile-targets' to define |
| 264 | headlines. When omitted, all headlines in all agenda files are | 264 | eligible headlines. When omitted, all headlines in the current |
| 265 | eligible. | 265 | file are eligible. This function returns the ID of the entry. |
| 266 | It returns the ID of the entry. If necessary, the ID is created." | 266 | If necessary, the ID is created." |
| 267 | (let* ((org-refile-targets (or targets '((nil . (:maxlevel . 10))))) | 267 | (let* ((org-refile-targets (or targets '((nil . (:maxlevel . 10))))) |
| 268 | (org-refile-use-outline-path | 268 | (org-refile-use-outline-path |
| 269 | (if (caar org-refile-targets) 'file t)) | 269 | (if (caar org-refile-targets) 'file t)) |
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index d5f17b2cb69..6e6f2bf1589 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el | |||
| @@ -328,7 +328,7 @@ stopped." | |||
| 328 | ;; inline task or not. | 328 | ;; inline task or not. |
| 329 | (let* ((case-fold-search t) | 329 | (let* ((case-fold-search t) |
| 330 | (limited-re (org-get-limited-outline-regexp)) | 330 | (limited-re (org-get-limited-outline-regexp)) |
| 331 | (added-ind-per-lvl (1- org-indent-indentation-per-level)) | 331 | (added-ind-per-lvl (abs (1- org-indent-indentation-per-level))) |
| 332 | (pf (save-excursion | 332 | (pf (save-excursion |
| 333 | (and (ignore-errors (let ((outline-regexp limited-re)) | 333 | (and (ignore-errors (let ((outline-regexp limited-re)) |
| 334 | (org-back-to-heading t))) | 334 | (org-back-to-heading t))) |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index ceee30601bd..57b2d8a577e 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -263,7 +263,8 @@ in `org-rm-props'." | |||
| 263 | (cond ((eq key t) t) | 263 | (cond ((eq key t) t) |
| 264 | ((eq option t) t) | 264 | ((eq option t) t) |
| 265 | ((assoc key option) (cdr (assoc key option))) | 265 | ((assoc key option) (cdr (assoc key option))) |
| 266 | (t (cdr (assq 'default option))))) | 266 | (t (let ((r (cdr (assq 'default option)))) |
| 267 | (if (listp r) (delq nil r) r))))) | ||
| 267 | 268 | ||
| 268 | (defsubst org-check-external-command (cmd &optional use no-error) | 269 | (defsubst org-check-external-command (cmd &optional use no-error) |
| 269 | "Check if external program CMD for USE exists, error if not. | 270 | "Check if external program CMD for USE exists, error if not. |
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index a410de0d775..293d2a000c0 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el | |||
| @@ -1064,7 +1064,7 @@ be returned that indicates what went wrong." | |||
| 1064 | (if (org-on-heading-p) ; if false we are in top-level of file | 1064 | (if (org-on-heading-p) ; if false we are in top-level of file |
| 1065 | (progn | 1065 | (progn |
| 1066 | (end-of-line 1) | 1066 | (end-of-line 1) |
| 1067 | (org-insert-heading-respect-content) | 1067 | (org-insert-heading-respect-content t) |
| 1068 | (org-demote)) | 1068 | (org-demote)) |
| 1069 | (beginning-of-line) | 1069 | (beginning-of-line) |
| 1070 | (insert "* ")) | 1070 | (insert "* ")) |
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 1910d3f7b4f..4fa865308e9 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | (defun org-release () | 5 | (defun org-release () |
| 6 | "The release version of org-mode. | 6 | "The release version of org-mode. |
| 7 | Inserted by installing org-mode or when a release is made." | 7 | Inserted by installing org-mode or when a release is made." |
| 8 | (let ((org-release "7.9.3e")) | 8 | (let ((org-release "7.9.3f")) |
| 9 | org-release)) | 9 | org-release)) |
| 10 | ;;;###autoload | 10 | ;;;###autoload |
| 11 | (defun org-git-version () | 11 | (defun org-git-version () |
| 12 | "The Git version of org-mode. | 12 | "The Git version of org-mode. |
| 13 | Inserted by installing org-mode or when a release is made." | 13 | Inserted by installing org-mode or when a release is made." |
| 14 | (let ((org-git-version "7.9.3e-3-gb07a9b")) | 14 | (let ((org-git-version "release_7.9.3f-17-g7524ef")) |
| 15 | org-git-version)) | 15 | org-git-version)) |
| 16 | ;;;###autoload | 16 | ;;;###autoload |
| 17 | (defvar org-odt-data-dir "/usr/share/emacs/etc/org" | 17 | (defvar org-odt-data-dir "/usr/share/emacs/etc/org" |
diff --git a/lisp/org/org.el b/lisp/org/org.el index ede633a0a93..cc4c93f22eb 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -114,7 +114,6 @@ Stars are put in group 1 and the trimmed body in group 2.") | |||
| 114 | (declare-function org-inlinetask-outline-regexp "org-inlinetask" ()) | 114 | (declare-function org-inlinetask-outline-regexp "org-inlinetask" ()) |
| 115 | (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ()) | 115 | (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ()) |
| 116 | (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) | 116 | (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) |
| 117 | (declare-function org-at-clock-log-p "org-clock" ()) | ||
| 118 | (declare-function org-clock-timestamps-up "org-clock" ()) | 117 | (declare-function org-clock-timestamps-up "org-clock" ()) |
| 119 | (declare-function org-clock-timestamps-down "org-clock" ()) | 118 | (declare-function org-clock-timestamps-down "org-clock" ()) |
| 120 | (declare-function org-clock-sum-current-item "org-clock" (&optional tstart)) | 119 | (declare-function org-clock-sum-current-item "org-clock" (&optional tstart)) |
| @@ -467,7 +466,11 @@ the following lines anywhere in the buffer: | |||
| 467 | #+STARTUP: fold (or `overview', this is equivalent) | 466 | #+STARTUP: fold (or `overview', this is equivalent) |
| 468 | #+STARTUP: nofold (or `showall', this is equivalent) | 467 | #+STARTUP: nofold (or `showall', this is equivalent) |
| 469 | #+STARTUP: content | 468 | #+STARTUP: content |
| 470 | #+STARTUP: showeverything" | 469 | #+STARTUP: showeverything |
| 470 | |||
| 471 | By default, this option is ignored when Org opens agenda files | ||
| 472 | for the first time. If you want the agenda to honor the startup | ||
| 473 | option, set `org-agenda-inhibit-startup' to nil." | ||
| 471 | :group 'org-startup | 474 | :group 'org-startup |
| 472 | :type '(choice | 475 | :type '(choice |
| 473 | (const :tag "nofold: show all" nil) | 476 | (const :tag "nofold: show all" nil) |
| @@ -3913,6 +3916,7 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 3913 | (save-excursion | 3916 | (save-excursion |
| 3914 | (goto-char (org-table-begin 'any)) | 3917 | (goto-char (org-table-begin 'any)) |
| 3915 | (looking-at org-table1-hline-regexp)))) | 3918 | (looking-at org-table1-hline-regexp)))) |
| 3919 | |||
| 3916 | (defun org-table-recognize-table.el () | 3920 | (defun org-table-recognize-table.el () |
| 3917 | "If there is a table.el table nearby, recognize it and move into it." | 3921 | "If there is a table.el table nearby, recognize it and move into it." |
| 3918 | (if org-table-tab-recognizes-table.el | 3922 | (if org-table-tab-recognizes-table.el |
| @@ -3948,7 +3952,6 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 3948 | nil)) | 3952 | nil)) |
| 3949 | 3953 | ||
| 3950 | (defvar org-table-clean-did-remove-column nil) | 3954 | (defvar org-table-clean-did-remove-column nil) |
| 3951 | |||
| 3952 | (defun org-table-map-tables (function &optional quietly) | 3955 | (defun org-table-map-tables (function &optional quietly) |
| 3953 | "Apply FUNCTION to the start of all tables in the buffer." | 3956 | "Apply FUNCTION to the start of all tables in the buffer." |
| 3954 | (save-excursion | 3957 | (save-excursion |
| @@ -4969,7 +4972,8 @@ The following commands are available: | |||
| 4969 | (org-add-hook 'isearch-mode-end-hook 'org-isearch-end 'append 'local) | 4972 | (org-add-hook 'isearch-mode-end-hook 'org-isearch-end 'append 'local) |
| 4970 | ;; Emacs 22 deals with this through a special variable | 4973 | ;; Emacs 22 deals with this through a special variable |
| 4971 | (org-set-local 'outline-isearch-open-invisible-function | 4974 | (org-set-local 'outline-isearch-open-invisible-function |
| 4972 | (lambda (&rest ignore) (org-show-context 'isearch)))) | 4975 | (lambda (&rest ignore) (org-show-context 'isearch))) |
| 4976 | (org-add-hook 'isearch-mode-end-hook 'org-fix-ellipsis-at-bol 'append 'local)) | ||
| 4973 | 4977 | ||
| 4974 | ;; Setup the pcomplete hooks | 4978 | ;; Setup the pcomplete hooks |
| 4975 | (set (make-local-variable 'pcomplete-command-completion-function) | 4979 | (set (make-local-variable 'pcomplete-command-completion-function) |
| @@ -5008,6 +5012,8 @@ The following commands are available: | |||
| 5008 | 5012 | ||
| 5009 | (put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) | 5013 | (put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) |
| 5010 | 5014 | ||
| 5015 | (defsubst org-fix-ellipsis-at-bol () | ||
| 5016 | (save-excursion (goto-char (window-start)) (recenter 0))) | ||
| 5011 | 5017 | ||
| 5012 | (defun org-find-invisible-foreground () | 5018 | (defun org-find-invisible-foreground () |
| 5013 | (let ((candidates (remove | 5019 | (let ((candidates (remove |
| @@ -5205,8 +5211,9 @@ on a string that terminates immediately after the date.") | |||
| 5205 | (defconst org-tsr-regexp (concat org-ts-regexp "\\(--?-?" | 5211 | (defconst org-tsr-regexp (concat org-ts-regexp "\\(--?-?" |
| 5206 | org-ts-regexp "\\)?") | 5212 | org-ts-regexp "\\)?") |
| 5207 | "Regular expression matching a time stamp or time stamp range.") | 5213 | "Regular expression matching a time stamp or time stamp range.") |
| 5208 | (defconst org-tsr-regexp-both (concat org-ts-regexp-both "\\(--?-?" | 5214 | (defconst org-tsr-regexp-both |
| 5209 | org-ts-regexp-both "\\)?") | 5215 | (concat org-ts-regexp-both "\\(--?-?" |
| 5216 | org-ts-regexp-both "\\)?") | ||
| 5210 | "Regular expression matching a time stamp or time stamp range. | 5217 | "Regular expression matching a time stamp or time stamp range. |
| 5211 | The time stamps may be either active or inactive.") | 5218 | The time stamps may be either active or inactive.") |
| 5212 | 5219 | ||
| @@ -5298,21 +5305,20 @@ will be prompted for." | |||
| 5298 | 5305 | ||
| 5299 | (defun org-activate-plain-links (limit) | 5306 | (defun org-activate-plain-links (limit) |
| 5300 | "Run through the buffer and add overlays to links." | 5307 | "Run through the buffer and add overlays to links." |
| 5301 | (catch 'exit | 5308 | (let (f) |
| 5302 | (let (f) | 5309 | (when (and (re-search-forward (concat org-plain-link-re) limit t) |
| 5303 | (when (and (re-search-forward (concat org-plain-link-re) limit t) | 5310 | (not (org-in-src-block-p))) |
| 5304 | (not (org-in-src-block-p))) | 5311 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) |
| 5305 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) | 5312 | (setq f (get-text-property (match-beginning 0) 'face)) |
| 5306 | (setq f (get-text-property (match-beginning 0) 'face)) | 5313 | (unless (or (org-in-src-block-p) |
| 5307 | (unless (or (org-in-src-block-p) | 5314 | (eq f 'org-tag) |
| 5308 | (eq f 'org-tag) | 5315 | (and (listp f) (memq 'org-tag f))) |
| 5309 | (and (listp f) (memq 'org-tag f))) | 5316 | (add-text-properties (match-beginning 0) (match-end 0) |
| 5310 | (add-text-properties (match-beginning 0) (match-end 0) | 5317 | (list 'mouse-face 'highlight |
| 5311 | (list 'mouse-face 'highlight | 5318 | 'face 'org-link |
| 5312 | 'face 'org-link | 5319 | 'keymap org-mouse-map)) |
| 5313 | 'keymap org-mouse-map)) | 5320 | (org-rear-nonsticky-at (match-end 0))) |
| 5314 | (org-rear-nonsticky-at (match-end 0))) | 5321 | t))) |
| 5315 | t)))) | ||
| 5316 | 5322 | ||
| 5317 | (defun org-activate-code (limit) | 5323 | (defun org-activate-code (limit) |
| 5318 | (if (re-search-forward "^[ \t]*\\(:\\(?: .*\\|$\\)\n?\\)" limit t) | 5324 | (if (re-search-forward "^[ \t]*\\(:\\(?: .*\\|$\\)\n?\\)" limit t) |
| @@ -5510,7 +5516,8 @@ by a #." | |||
| 5510 | 5516 | ||
| 5511 | (defun org-activate-dates (limit) | 5517 | (defun org-activate-dates (limit) |
| 5512 | "Run through the buffer and add overlays to dates." | 5518 | "Run through the buffer and add overlays to dates." |
| 5513 | (if (re-search-forward org-tsr-regexp-both limit t) | 5519 | (if (and (re-search-forward org-tsr-regexp-both limit t) |
| 5520 | (not (equal (char-before (match-beginning 0)) 91))) | ||
| 5514 | (progn | 5521 | (progn |
| 5515 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) | 5522 | (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) |
| 5516 | (add-text-properties (match-beginning 0) (match-end 0) | 5523 | (add-text-properties (match-beginning 0) (match-end 0) |
| @@ -6431,13 +6438,16 @@ of the first headline in the buffer. This is important, because if the | |||
| 6431 | first headline is not level one, then (hide-sublevels 1) gives confusing | 6438 | first headline is not level one, then (hide-sublevels 1) gives confusing |
| 6432 | results." | 6439 | results." |
| 6433 | (interactive) | 6440 | (interactive) |
| 6434 | (let ((level (save-excursion | 6441 | (let ((l (org-current-line)) |
| 6442 | (level (save-excursion | ||
| 6435 | (goto-char (point-min)) | 6443 | (goto-char (point-min)) |
| 6436 | (if (re-search-forward (concat "^" outline-regexp) nil t) | 6444 | (if (re-search-forward (concat "^" outline-regexp) nil t) |
| 6437 | (progn | 6445 | (progn |
| 6438 | (goto-char (match-beginning 0)) | 6446 | (goto-char (match-beginning 0)) |
| 6439 | (funcall outline-level)))))) | 6447 | (funcall outline-level)))))) |
| 6440 | (and level (hide-sublevels level)))) | 6448 | (and level (hide-sublevels level)) |
| 6449 | (recenter '(4)) | ||
| 6450 | (org-goto-line l))) | ||
| 6441 | 6451 | ||
| 6442 | (defun org-content (&optional arg) | 6452 | (defun org-content (&optional arg) |
| 6443 | "Show all headlines in the buffer, like a table of contents. | 6453 | "Show all headlines in the buffer, like a table of contents. |
| @@ -7231,12 +7241,14 @@ This is a list with the following elements: | |||
| 7231 | (org-move-subtree-down) | 7241 | (org-move-subtree-down) |
| 7232 | (end-of-line 1)) | 7242 | (end-of-line 1)) |
| 7233 | 7243 | ||
| 7234 | (defun org-insert-heading-respect-content () | 7244 | (defun org-insert-heading-respect-content (invisible-ok) |
| 7235 | (interactive) | 7245 | "Insert heading with `org-insert-heading-respect-content' set to t." |
| 7246 | (interactive "P") | ||
| 7236 | (let ((org-insert-heading-respect-content t)) | 7247 | (let ((org-insert-heading-respect-content t)) |
| 7237 | (org-insert-heading t))) | 7248 | (org-insert-heading t invisible-ok))) |
| 7238 | 7249 | ||
| 7239 | (defun org-insert-todo-heading-respect-content (&optional force-state) | 7250 | (defun org-insert-todo-heading-respect-content (&optional force-state) |
| 7251 | "Insert TODO heading with `org-insert-heading-respect-content' set to t." | ||
| 7240 | (interactive "P") | 7252 | (interactive "P") |
| 7241 | (let ((org-insert-heading-respect-content t)) | 7253 | (let ((org-insert-heading-respect-content t)) |
| 7242 | (org-insert-todo-heading force-state t))) | 7254 | (org-insert-todo-heading force-state t))) |
| @@ -12835,27 +12847,27 @@ How much context is shown depends upon the variables | |||
| 12835 | (following-p (org-get-alist-option org-show-following-heading key)) | 12847 | (following-p (org-get-alist-option org-show-following-heading key)) |
| 12836 | (entry-p (org-get-alist-option org-show-entry-below key)) | 12848 | (entry-p (org-get-alist-option org-show-entry-below key)) |
| 12837 | (siblings-p (org-get-alist-option org-show-siblings key))) | 12849 | (siblings-p (org-get-alist-option org-show-siblings key))) |
| 12838 | (catch 'exit | 12850 | ;; Show heading or entry text |
| 12839 | ;; Show heading or entry text | 12851 | (if (and heading-p (not entry-p)) |
| 12840 | (if (and heading-p (not entry-p)) | 12852 | (org-flag-heading nil) ; only show the heading |
| 12841 | (org-flag-heading nil) ; only show the heading | 12853 | (and (or entry-p (outline-invisible-p) (org-invisible-p2)) |
| 12842 | (and (or entry-p (outline-invisible-p) (org-invisible-p2)) | 12854 | (org-show-hidden-entry))) ; show entire entry |
| 12843 | (org-show-hidden-entry))) ; show entire entry | 12855 | (when following-p |
| 12844 | (when following-p | 12856 | ;; Show next sibling, or heading below text |
| 12845 | ;; Show next sibling, or heading below text | 12857 | (save-excursion |
| 12846 | (save-excursion | 12858 | (and (if heading-p (org-goto-sibling) (outline-next-heading)) |
| 12847 | (and (if heading-p (org-goto-sibling) (outline-next-heading)) | 12859 | (org-flag-heading nil)))) |
| 12848 | (org-flag-heading nil)))) | 12860 | (when siblings-p (org-show-siblings)) |
| 12849 | (when siblings-p (org-show-siblings)) | 12861 | (when hierarchy-p |
| 12850 | (when hierarchy-p | 12862 | ;; show all higher headings, possibly with siblings |
| 12851 | ;; show all higher headings, possibly with siblings | 12863 | (save-excursion |
| 12852 | (save-excursion | 12864 | (while (and (condition-case nil |
| 12853 | (while (and (condition-case nil | 12865 | (progn (org-up-heading-all 1) t) |
| 12854 | (progn (org-up-heading-all 1) t) | 12866 | (error nil)) |
| 12855 | (error nil)) | 12867 | (not (bobp))) |
| 12856 | (not (bobp))) | 12868 | (org-flag-heading nil) |
| 12857 | (org-flag-heading nil) | 12869 | (when siblings-p (org-show-siblings))))) |
| 12858 | (when siblings-p (org-show-siblings)))))))) | 12870 | (org-fix-ellipsis-at-bol))) |
| 12859 | 12871 | ||
| 12860 | (defvar org-reveal-start-hook nil | 12872 | (defvar org-reveal-start-hook nil |
| 12861 | "Hook run before revealing a location.") | 12873 | "Hook run before revealing a location.") |
| @@ -13597,7 +13609,9 @@ If ONOFF is `on' or `off', don't toggle but set to this state." | |||
| 13597 | (if (or (org-at-heading-p) (and arg (org-before-first-heading-p))) | 13609 | (if (or (org-at-heading-p) (and arg (org-before-first-heading-p))) |
| 13598 | (org-set-tags arg just-align) | 13610 | (org-set-tags arg just-align) |
| 13599 | (save-excursion | 13611 | (save-excursion |
| 13600 | (org-back-to-heading t) | 13612 | (unless (and (org-region-active-p) |
| 13613 | org-loop-over-headlines-in-active-region) | ||
| 13614 | (org-back-to-heading t)) | ||
| 13601 | (org-set-tags arg just-align)))) | 13615 | (org-set-tags arg just-align)))) |
| 13602 | 13616 | ||
| 13603 | (defun org-set-tags-to (data) | 13617 | (defun org-set-tags-to (data) |
| @@ -14101,13 +14115,13 @@ agenda-with-archives | |||
| 14101 | The remaining args are treated as settings for the skipping facilities of | 14115 | The remaining args are treated as settings for the skipping facilities of |
| 14102 | the scanner. The following items can be given here: | 14116 | the scanner. The following items can be given here: |
| 14103 | 14117 | ||
| 14104 | archive skip trees with the archive tag. | 14118 | archive skip trees with the archive tag |
| 14105 | comment skip trees with the COMMENT keyword | 14119 | comment skip trees with the COMMENT keyword |
| 14106 | function or Emacs Lisp form: | 14120 | function or Emacs Lisp form: |
| 14107 | will be used as value for `org-agenda-skip-function', so whenever | 14121 | will be used as value for `org-agenda-skip-function', so |
| 14108 | the function returns t, FUNC will not be called for that | 14122 | whenever the function returns a position, FUNC will not be |
| 14109 | entry and search will continue from the point where the | 14123 | called for that entry and search will continue from the |
| 14110 | function leaves it. | 14124 | position returned |
| 14111 | 14125 | ||
| 14112 | If your function needs to retrieve the tags including inherited tags | 14126 | If your function needs to retrieve the tags including inherited tags |
| 14113 | at the *current* entry, you can use the value of the variable | 14127 | at the *current* entry, you can use the value of the variable |
| @@ -16401,6 +16415,12 @@ With prefix ARG, change that many days." | |||
| 16401 | (message "Timestamp is now %sactive" | 16415 | (message "Timestamp is now %sactive" |
| 16402 | (if (equal (char-after beg) ?<) "" "in"))))) | 16416 | (if (equal (char-after beg) ?<) "" "in"))))) |
| 16403 | 16417 | ||
| 16418 | (defun org-at-clock-log-p nil | ||
| 16419 | "Is the cursor on the clock log line?" | ||
| 16420 | (save-excursion | ||
| 16421 | (move-beginning-of-line 1) | ||
| 16422 | (looking-at "^[ \t]*CLOCK:"))) | ||
| 16423 | |||
| 16404 | (defvar org-clock-history) ; defined in org-clock.el | 16424 | (defvar org-clock-history) ; defined in org-clock.el |
| 16405 | (defvar org-clock-adjust-closest nil) ; defined in org-clock.el | 16425 | (defvar org-clock-adjust-closest nil) ; defined in org-clock.el |
| 16406 | (defun org-timestamp-change (n &optional what updown) | 16426 | (defun org-timestamp-change (n &optional what updown) |
| @@ -18737,8 +18757,7 @@ this function returns t, nil otherwise." | |||
| 18737 | (throw 'exit t)))) | 18757 | (throw 'exit t)))) |
| 18738 | nil)))) | 18758 | nil)))) |
| 18739 | 18759 | ||
| 18740 | (autoload 'org-element-at-point "org-element") | 18760 | (org-autoload "org-element" '(org-element-at-point org-element-type)) |
| 18741 | (autoload 'org-element-type "org-element") | ||
| 18742 | 18761 | ||
| 18743 | (declare-function org-element-at-point "org-element" (&optional keep-trail)) | 18762 | (declare-function org-element-at-point "org-element" (&optional keep-trail)) |
| 18744 | (declare-function org-element-type "org-element" (element)) | 18763 | (declare-function org-element-type "org-element" (element)) |
| @@ -19840,7 +19859,7 @@ See the individual commands for more information." | |||
| 19840 | ("Refresh/Reload" | 19859 | ("Refresh/Reload" |
| 19841 | ["Refresh setup current buffer" org-mode-restart t] | 19860 | ["Refresh setup current buffer" org-mode-restart t] |
| 19842 | ["Reload Org (after update)" org-reload t] | 19861 | ["Reload Org (after update)" org-reload t] |
| 19843 | ["Reload Org uncompiled" (org-reload t) :active t :keys "C-u C-c C-x r"]) | 19862 | ["Reload Org uncompiled" (org-reload t) :active t :keys "C-u C-c C-x !"]) |
| 19844 | )) | 19863 | )) |
| 19845 | 19864 | ||
| 19846 | (defun org-info (&optional node) | 19865 | (defun org-info (&optional node) |
| @@ -20970,7 +20989,8 @@ hierarchy of headlines by UP levels before marking the subtree." | |||
| 20970 | (org-uniquify | 20989 | (org-uniquify |
| 20971 | (append fill-nobreak-predicate | 20990 | (append fill-nobreak-predicate |
| 20972 | '(org-fill-paragraph-separate-nobreak-p | 20991 | '(org-fill-paragraph-separate-nobreak-p |
| 20973 | org-fill-line-break-nobreak-p))))) | 20992 | org-fill-line-break-nobreak-p |
| 20993 | org-fill-paragraph-with-timestamp-nobreak-p))))) | ||
| 20974 | (org-set-local 'fill-paragraph-function 'org-fill-paragraph) | 20994 | (org-set-local 'fill-paragraph-function 'org-fill-paragraph) |
| 20975 | (org-set-local 'auto-fill-inhibit-regexp nil) | 20995 | (org-set-local 'auto-fill-inhibit-regexp nil) |
| 20976 | (org-set-local 'adaptive-fill-function 'org-adaptive-fill-function) | 20996 | (org-set-local 'adaptive-fill-function 'org-adaptive-fill-function) |
| @@ -20989,6 +21009,11 @@ hierarchy of headlines by UP levels before marking the subtree." | |||
| 20989 | (skip-chars-backward "\\\\") | 21009 | (skip-chars-backward "\\\\") |
| 20990 | (looking-at "\\\\\\\\\\($\\|[^\\\\]\\)"))) | 21010 | (looking-at "\\\\\\\\\\($\\|[^\\\\]\\)"))) |
| 20991 | 21011 | ||
| 21012 | (defun org-fill-paragraph-with-timestamp-nobreak-p () | ||
| 21013 | "Non-nil when a line break at point would insert a new item." | ||
| 21014 | (and (org-at-timestamp-p t) | ||
| 21015 | (not (looking-at org-ts-regexp-both)))) | ||
| 21016 | |||
| 20992 | (declare-function message-in-body-p "message" ()) | 21017 | (declare-function message-in-body-p "message" ()) |
| 20993 | (defvar org-element--affiliated-re) ; From org-element.el | 21018 | (defvar org-element--affiliated-re) ; From org-element.el |
| 20994 | (defvar orgtbl-line-start-regexp) ; From org-table.el | 21019 | (defvar orgtbl-line-start-regexp) ; From org-table.el |
| @@ -22159,7 +22184,8 @@ Show the heading too, if it is currently invisible." | |||
| 22159 | isearch-mode-end-hook-quit) | 22184 | isearch-mode-end-hook-quit) |
| 22160 | ;; Only when the isearch was not quitted. | 22185 | ;; Only when the isearch was not quitted. |
| 22161 | (org-add-hook 'post-command-hook 'org-isearch-post-command | 22186 | (org-add-hook 'post-command-hook 'org-isearch-post-command |
| 22162 | 'append 'local))))) | 22187 | 'append 'local))) |
| 22188 | (org-fix-ellipsis-at-bol))) | ||
| 22163 | 22189 | ||
| 22164 | (defun org-isearch-post-command () | 22190 | (defun org-isearch-post-command () |
| 22165 | "Remove self from hook, and show context." | 22191 | "Remove self from hook, and show context." |
| @@ -22190,7 +22216,7 @@ Show the heading too, if it is currently invisible." | |||
| 22190 | (re (concat "^" (org-get-limited-outline-regexp))) | 22216 | (re (concat "^" (org-get-limited-outline-regexp))) |
| 22191 | (subs (make-vector (1+ n) nil)) | 22217 | (subs (make-vector (1+ n) nil)) |
| 22192 | (last-level 0) | 22218 | (last-level 0) |
| 22193 | m level head) | 22219 | m level head0 head) |
| 22194 | (save-excursion | 22220 | (save-excursion |
| 22195 | (save-restriction | 22221 | (save-restriction |
| 22196 | (widen) | 22222 | (widen) |
| @@ -22198,9 +22224,9 @@ Show the heading too, if it is currently invisible." | |||
| 22198 | (while (re-search-backward re nil t) | 22224 | (while (re-search-backward re nil t) |
| 22199 | (setq level (org-reduced-level (funcall outline-level))) | 22225 | (setq level (org-reduced-level (funcall outline-level))) |
| 22200 | (when (and (<= level n) | 22226 | (when (and (<= level n) |
| 22201 | (looking-at org-complex-heading-regexp)) | 22227 | (looking-at org-complex-heading-regexp) |
| 22202 | (setq head (org-link-display-format | 22228 | (setq head0 (org-match-string-no-properties 4))) |
| 22203 | (org-match-string-no-properties 4)) | 22229 | (setq head (org-link-display-format head0) |
| 22204 | m (org-imenu-new-marker)) | 22230 | m (org-imenu-new-marker)) |
| 22205 | (org-add-props head nil 'org-imenu-marker m 'org-imenu t) | 22231 | (org-add-props head nil 'org-imenu-marker m 'org-imenu t) |
| 22206 | (if (>= level last-level) | 22232 | (if (>= level last-level) |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 4e17af1acb4..e773b53a73f 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -379,8 +379,8 @@ the number of paragraphs marked equals ARG. | |||
| 379 | If ARG is negative, point is put at end of this paragraph, mark is put | 379 | If ARG is negative, point is put at end of this paragraph, mark is put |
| 380 | at beginning of this or a previous paragraph. | 380 | at beginning of this or a previous paragraph. |
| 381 | 381 | ||
| 382 | Interactively, if this command is repeated | 382 | Interactively (or if ALLOW-EXTEND is non-nil), if this command is |
| 383 | or (in Transient Mark mode) if the mark is active, | 383 | repeated or (in Transient Mark mode) if the mark is active, |
| 384 | it marks the next ARG paragraphs after the ones already marked." | 384 | it marks the next ARG paragraphs after the ones already marked." |
| 385 | (interactive "p\np") | 385 | (interactive "p\np") |
| 386 | (unless arg (setq arg 1)) | 386 | (unless arg (setq arg 1)) |
diff --git a/src/ChangeLog b/src/ChangeLog index 4135dadf28a..1b8b3c56004 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-02-28 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32.c (sys_open): Don't reset the flags for FD in fd_info[]. | ||
| 4 | (Bug#13546). | ||
| 5 | |||
| 1 | 2013-02-27 Eli Zaretskii <eliz@gnu.org> | 6 | 2013-02-27 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with | 8 | * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with |
| @@ -3411,8 +3411,6 @@ sys_open (const char * path, int oflag, int mode) | |||
| 3411 | res = _open (mpath, (oflag & ~_O_CREAT) | _O_NOINHERIT, mode); | 3411 | res = _open (mpath, (oflag & ~_O_CREAT) | _O_NOINHERIT, mode); |
| 3412 | if (res < 0) | 3412 | if (res < 0) |
| 3413 | res = _open (mpath, oflag | _O_NOINHERIT, mode); | 3413 | res = _open (mpath, oflag | _O_NOINHERIT, mode); |
| 3414 | if (res >= 0 && res < MAXDESC) | ||
| 3415 | fd_info[res].flags = 0; | ||
| 3416 | 3414 | ||
| 3417 | return res; | 3415 | return res; |
| 3418 | } | 3416 | } |
diff --git a/test/ChangeLog b/test/ChangeLog index f1281c8ed72..fbd27021b5c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2013-02-28 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 2 | |||
| 3 | * automated/python-tests.el (python-tests-with-temp-buffer): Doc fix. | ||
| 4 | (python-tests-with-temp-file): New macro. | ||
| 5 | (python-tests-shell-interpreter): New var. | ||
| 6 | (python-shell-get-process-name-1) | ||
| 7 | (python-shell-internal-get-process-name-1) | ||
| 8 | (python-shell-parse-command-1) | ||
| 9 | (python-shell-calculate-process-environment-1) | ||
| 10 | (python-shell-calculate-process-environment-2) | ||
| 11 | (python-shell-calculate-process-environment-3) | ||
| 12 | (python-shell-calculate-exec-path-1) | ||
| 13 | (python-shell-calculate-exec-path-2) | ||
| 14 | (python-shell-make-comint-1) | ||
| 15 | (python-shell-make-comint-2) | ||
| 16 | (python-shell-get-process-1) | ||
| 17 | (python-shell-get-or-create-process-1) | ||
| 18 | (python-shell-internal-get-or-create-process-1): New tests. | ||
| 19 | |||
| 1 | 2013-02-21 Fabián Ezequiel Gallina <fgallina@cuca> | 20 | 2013-02-21 Fabián Ezequiel Gallina <fgallina@cuca> |
| 2 | 21 | ||
| 3 | * automated/python-tests.el: New file. | 22 | * automated/python-tests.el: New file. |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index b38fbdd122f..ab8eb4816d3 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -34,6 +34,21 @@ always located at the beginning of buffer." | |||
| 34 | (goto-char (point-min)) | 34 | (goto-char (point-min)) |
| 35 | ,@body)) | 35 | ,@body)) |
| 36 | 36 | ||
| 37 | (defmacro python-tests-with-temp-file (contents &rest body) | ||
| 38 | "Create a `python-mode' enabled file with CONTENTS. | ||
| 39 | BODY is code to be executed within the temp buffer. Point is | ||
| 40 | always located at the beginning of buffer." | ||
| 41 | (declare (indent 1) (debug t)) | ||
| 42 | `(let* ((temp-file (concat (make-temp-file "python-tests") ".py")) | ||
| 43 | (buffer (find-file-noselect temp-file))) | ||
| 44 | (unwind-protect | ||
| 45 | (with-current-buffer buffer | ||
| 46 | (python-mode) | ||
| 47 | (insert ,contents) | ||
| 48 | (goto-char (point-min)) | ||
| 49 | ,@body) | ||
| 50 | (and buffer (kill-buffer buffer))))) | ||
| 51 | |||
| 37 | (defun python-tests-look-at (string &optional num restore-point) | 52 | (defun python-tests-look-at (string &optional num restore-point) |
| 38 | "Move point at beginning of STRING in the current buffer. | 53 | "Move point at beginning of STRING in the current buffer. |
| 39 | Optional argument NUM defaults to 1 and is an integer indicating | 54 | Optional argument NUM defaults to 1 and is an integer indicating |
| @@ -1161,6 +1176,260 @@ def f(): | |||
| 1161 | 1176 | ||
| 1162 | ;;; Shell integration | 1177 | ;;; Shell integration |
| 1163 | 1178 | ||
| 1179 | (defvar python-tests-shell-interpreter "python") | ||
| 1180 | |||
| 1181 | (ert-deftest python-shell-get-process-name-1 () | ||
| 1182 | "Check process name calculation on different scenarios." | ||
| 1183 | (python-tests-with-temp-buffer | ||
| 1184 | "" | ||
| 1185 | (should (string= (python-shell-get-process-name nil) | ||
| 1186 | python-shell-buffer-name)) | ||
| 1187 | ;; When the `current-buffer' doesn't have `buffer-file-name', even | ||
| 1188 | ;; if dedicated flag is non-nil should not include its name. | ||
| 1189 | (should (string= (python-shell-get-process-name t) | ||
| 1190 | python-shell-buffer-name))) | ||
| 1191 | (python-tests-with-temp-file | ||
| 1192 | "" | ||
| 1193 | ;; `buffer-file-name' is non-nil but the dedicated flag is nil and | ||
| 1194 | ;; should be respected. | ||
| 1195 | (should (string= (python-shell-get-process-name nil) | ||
| 1196 | python-shell-buffer-name)) | ||
| 1197 | (should (string= | ||
| 1198 | (python-shell-get-process-name t) | ||
| 1199 | (format "%s[%s]" python-shell-buffer-name buffer-file-name))))) | ||
| 1200 | |||
| 1201 | (ert-deftest python-shell-internal-get-process-name-1 () | ||
| 1202 | "Check the internal process name is config-unique." | ||
| 1203 | (let* ((python-shell-interpreter python-tests-shell-interpreter) | ||
| 1204 | (python-shell-interpreter-args "") | ||
| 1205 | (python-shell-prompt-regexp ">>> ") | ||
| 1206 | (python-shell-prompt-block-regexp "[.][.][.] ") | ||
| 1207 | (python-shell-setup-codes "") | ||
| 1208 | (python-shell-process-environment "") | ||
| 1209 | (python-shell-extra-pythonpaths "") | ||
| 1210 | (python-shell-exec-path "") | ||
| 1211 | (python-shell-virtualenv-path "") | ||
| 1212 | (expected (python-tests-with-temp-buffer | ||
| 1213 | "" (python-shell-internal-get-process-name)))) | ||
| 1214 | ;; Same configurations should match. | ||
| 1215 | (should | ||
| 1216 | (string= expected | ||
| 1217 | (python-tests-with-temp-buffer | ||
| 1218 | "" (python-shell-internal-get-process-name)))) | ||
| 1219 | (let ((python-shell-interpreter-args "-B")) | ||
| 1220 | ;; A minimal change should generate different names. | ||
| 1221 | (should | ||
| 1222 | (not (string= | ||
| 1223 | expected | ||
| 1224 | (python-tests-with-temp-buffer | ||
| 1225 | "" (python-shell-internal-get-process-name)))))))) | ||
| 1226 | |||
| 1227 | (ert-deftest python-shell-parse-command-1 () | ||
| 1228 | "Check the command to execute is calculated correctly. | ||
| 1229 | Using `python-shell-interpreter' and | ||
| 1230 | `python-shell-interpreter-args'." | ||
| 1231 | :expected-result (if (executable-find python-tests-shell-interpreter) | ||
| 1232 | :passed | ||
| 1233 | :failed) | ||
| 1234 | (let ((python-shell-interpreter (executable-find | ||
| 1235 | python-tests-shell-interpreter)) | ||
| 1236 | (python-shell-interpreter-args "-B")) | ||
| 1237 | (should (string= | ||
| 1238 | (format "%s %s" | ||
| 1239 | python-shell-interpreter | ||
| 1240 | python-shell-interpreter-args) | ||
| 1241 | (python-shell-parse-command))))) | ||
| 1242 | |||
| 1243 | (ert-deftest python-shell-calculate-process-environment-1 () | ||
| 1244 | "Test `python-shell-process-environment' modification." | ||
| 1245 | (let* ((original-process-environment process-environment) | ||
| 1246 | (python-shell-process-environment | ||
| 1247 | '("TESTVAR1=value1" "TESTVAR2=value2")) | ||
| 1248 | (process-environment | ||
| 1249 | (python-shell-calculate-process-environment))) | ||
| 1250 | (should (equal (getenv "TESTVAR1") "value1")) | ||
| 1251 | (should (equal (getenv "TESTVAR2") "value2")))) | ||
| 1252 | |||
| 1253 | (ert-deftest python-shell-calculate-process-environment-2 () | ||
| 1254 | "Test `python-shell-extra-pythonpaths' modification." | ||
| 1255 | (let* ((original-process-environment process-environment) | ||
| 1256 | (original-pythonpath (getenv "PYTHONPATH")) | ||
| 1257 | (paths '("path1" "path2")) | ||
| 1258 | (python-shell-extra-pythonpaths paths) | ||
| 1259 | (process-environment | ||
| 1260 | (python-shell-calculate-process-environment))) | ||
| 1261 | (should (equal (getenv "PYTHONPATH") | ||
| 1262 | (concat | ||
| 1263 | (mapconcat 'identity paths path-separator) | ||
| 1264 | path-separator original-pythonpath))))) | ||
| 1265 | |||
| 1266 | (ert-deftest python-shell-calculate-process-environment-3 () | ||
| 1267 | "Test `python-shell-virtualenv-path' modification." | ||
| 1268 | (let* ((original-process-environment process-environment) | ||
| 1269 | (original-path (or (getenv "PATH") "")) | ||
| 1270 | (python-shell-virtualenv-path | ||
| 1271 | (directory-file-name user-emacs-directory)) | ||
| 1272 | (process-environment | ||
| 1273 | (python-shell-calculate-process-environment))) | ||
| 1274 | (should (not (getenv "PYTHONHOME"))) | ||
| 1275 | (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-path)) | ||
| 1276 | (should (equal (getenv "PATH") | ||
| 1277 | (format "%s/bin%s%s" | ||
| 1278 | python-shell-virtualenv-path | ||
| 1279 | path-separator original-path))))) | ||
| 1280 | |||
| 1281 | (ert-deftest python-shell-calculate-exec-path-1 () | ||
| 1282 | "Test `python-shell-exec-path' modification." | ||
| 1283 | (let* ((original-exec-path exec-path) | ||
| 1284 | (python-shell-exec-path '("path1" "path2")) | ||
| 1285 | (exec-path (python-shell-calculate-exec-path))) | ||
| 1286 | (should (equal | ||
| 1287 | exec-path | ||
| 1288 | (append python-shell-exec-path | ||
| 1289 | original-exec-path))))) | ||
| 1290 | |||
| 1291 | (ert-deftest python-shell-calculate-exec-path-2 () | ||
| 1292 | "Test `python-shell-exec-path' modification." | ||
| 1293 | (let* ((original-exec-path exec-path) | ||
| 1294 | (python-shell-virtualenv-path | ||
| 1295 | (directory-file-name user-emacs-directory)) | ||
| 1296 | (exec-path (python-shell-calculate-exec-path))) | ||
| 1297 | (should (equal | ||
| 1298 | exec-path | ||
| 1299 | (append (cons | ||
| 1300 | (format "%s/bin" python-shell-virtualenv-path) | ||
| 1301 | original-exec-path)))))) | ||
| 1302 | |||
| 1303 | (ert-deftest python-shell-make-comint-1 () | ||
| 1304 | "Check comint creation for global shell buffer." | ||
| 1305 | :expected-result (if (executable-find python-tests-shell-interpreter) | ||
| 1306 | :passed | ||
| 1307 | :failed) | ||
| 1308 | (let* ((python-shell-interpreter | ||
| 1309 | (executable-find python-tests-shell-interpreter)) | ||
| 1310 | (proc-name (python-shell-get-process-name nil)) | ||
| 1311 | (shell-buffer | ||
| 1312 | (python-tests-with-temp-buffer | ||
| 1313 | "" (python-shell-make-comint | ||
| 1314 | (python-shell-parse-command) proc-name))) | ||
| 1315 | (process (get-buffer-process shell-buffer))) | ||
| 1316 | (unwind-protect | ||
| 1317 | (progn | ||
| 1318 | (set-process-query-on-exit-flag process nil) | ||
| 1319 | (should (process-live-p process)) | ||
| 1320 | (with-current-buffer shell-buffer | ||
| 1321 | (should (eq major-mode 'inferior-python-mode)) | ||
| 1322 | (should (string= (buffer-name) (format "*%s*" proc-name))))) | ||
| 1323 | (kill-buffer shell-buffer)))) | ||
| 1324 | |||
| 1325 | (ert-deftest python-shell-make-comint-2 () | ||
| 1326 | "Check comint creation for internal shell buffer." | ||
| 1327 | :expected-result (if (executable-find python-tests-shell-interpreter) | ||
| 1328 | :passed | ||
| 1329 | :failed) | ||
| 1330 | (let* ((python-shell-interpreter | ||
| 1331 | (executable-find python-tests-shell-interpreter)) | ||
| 1332 | (proc-name (python-shell-internal-get-process-name)) | ||
| 1333 | (shell-buffer | ||
| 1334 | (python-tests-with-temp-buffer | ||
| 1335 | "" (python-shell-make-comint | ||
| 1336 | (python-shell-parse-command) proc-name nil t))) | ||
| 1337 | (process (get-buffer-process shell-buffer))) | ||
| 1338 | (unwind-protect | ||
| 1339 | (progn | ||
| 1340 | (set-process-query-on-exit-flag process nil) | ||
| 1341 | (should (process-live-p process)) | ||
| 1342 | (with-current-buffer shell-buffer | ||
| 1343 | (should (eq major-mode 'inferior-python-mode)) | ||
| 1344 | (should (string= (buffer-name) (format " *%s*" proc-name))))) | ||
| 1345 | (kill-buffer shell-buffer)))) | ||
| 1346 | |||
| 1347 | (ert-deftest python-shell-get-process-1 () | ||
| 1348 | "Check dedicated shell process preference over global." | ||
| 1349 | :expected-result (if (executable-find python-tests-shell-interpreter) | ||
| 1350 | :passed | ||
| 1351 | :failed) | ||
| 1352 | (python-tests-with-temp-file | ||
| 1353 | "" | ||
| 1354 | (let* ((python-shell-interpreter | ||
| 1355 | (executable-find python-tests-shell-interpreter)) | ||
| 1356 | (global-proc-name (python-shell-get-process-name nil)) | ||
| 1357 | (dedicated-proc-name (python-shell-get-process-name t)) | ||
| 1358 | (global-shell-buffer | ||
| 1359 | (python-shell-make-comint | ||
| 1360 | (python-shell-parse-command) global-proc-name)) | ||
| 1361 | (dedicated-shell-buffer | ||
| 1362 | (python-shell-make-comint | ||
| 1363 | (python-shell-parse-command) dedicated-proc-name)) | ||
| 1364 | (global-process (get-buffer-process global-shell-buffer)) | ||
| 1365 | (dedicated-process (get-buffer-process dedicated-shell-buffer))) | ||
| 1366 | (unwind-protect | ||
| 1367 | (progn | ||
| 1368 | (set-process-query-on-exit-flag global-process nil) | ||
| 1369 | (set-process-query-on-exit-flag dedicated-process nil) | ||
| 1370 | ;; Prefer dedicated if global also exists. | ||
| 1371 | (should (equal (python-shell-get-process) dedicated-process)) | ||
| 1372 | (kill-buffer dedicated-shell-buffer) | ||
| 1373 | ;; If there's only global, use it. | ||
| 1374 | (should (equal (python-shell-get-process) global-process)) | ||
| 1375 | (kill-buffer global-shell-buffer) | ||
| 1376 | ;; No buffer available. | ||
| 1377 | (should (not (python-shell-get-process)))) | ||
| 1378 | (ignore-errors (kill-buffer global-shell-buffer)) | ||
| 1379 | (ignore-errors (kill-buffer dedicated-shell-buffer)))))) | ||
| 1380 | |||
| 1381 | (ert-deftest python-shell-get-or-create-process-1 () | ||
| 1382 | "Check shell process creation fallback." | ||
| 1383 | :expected-result :failed | ||
| 1384 | (python-tests-with-temp-file | ||
| 1385 | "" | ||
| 1386 | ;; XXX: Break early until we can skip stuff. We need to mimic | ||
| 1387 | ;; user interaction because `python-shell-get-or-create-process' | ||
| 1388 | ;; asks for all arguments interactively when a shell process | ||
| 1389 | ;; doesn't exist. | ||
| 1390 | (should nil) | ||
| 1391 | (let* ((python-shell-interpreter | ||
| 1392 | (executable-find python-tests-shell-interpreter)) | ||
| 1393 | (use-dialog-box) | ||
| 1394 | (dedicated-process-name (python-shell-get-process-name t)) | ||
| 1395 | (dedicated-process (python-shell-get-or-create-process)) | ||
| 1396 | (dedicated-shell-buffer (process-buffer dedicated-process))) | ||
| 1397 | (unwind-protect | ||
| 1398 | (progn | ||
| 1399 | (set-process-query-on-exit-flag dedicated-process nil) | ||
| 1400 | ;; Prefer dedicated if not buffer exist. | ||
| 1401 | (should (equal (process-name dedicated-process) | ||
| 1402 | dedicated-process-name)) | ||
| 1403 | (kill-buffer dedicated-shell-buffer) | ||
| 1404 | ;; No buffer available. | ||
| 1405 | (should (not (python-shell-get-process)))) | ||
| 1406 | (ignore-errors (kill-buffer dedicated-shell-buffer)))))) | ||
| 1407 | |||
| 1408 | (ert-deftest python-shell-internal-get-or-create-process-1 () | ||
| 1409 | "Check internal shell process creation fallback." | ||
| 1410 | :expected-result (if (executable-find python-tests-shell-interpreter) | ||
| 1411 | :passed | ||
| 1412 | :failed) | ||
| 1413 | (python-tests-with-temp-file | ||
| 1414 | "" | ||
| 1415 | (should (not (process-live-p (python-shell-internal-get-process-name)))) | ||
| 1416 | (let* ((python-shell-interpreter | ||
| 1417 | (executable-find python-tests-shell-interpreter)) | ||
| 1418 | (internal-process-name (python-shell-internal-get-process-name)) | ||
| 1419 | (internal-process (python-shell-internal-get-or-create-process)) | ||
| 1420 | (internal-shell-buffer (process-buffer internal-process))) | ||
| 1421 | (unwind-protect | ||
| 1422 | (progn | ||
| 1423 | (set-process-query-on-exit-flag internal-process nil) | ||
| 1424 | (should (equal (process-name internal-process) | ||
| 1425 | internal-process-name)) | ||
| 1426 | (should (equal internal-process | ||
| 1427 | (python-shell-internal-get-or-create-process))) | ||
| 1428 | ;; No user buffer available. | ||
| 1429 | (should (not (python-shell-get-process))) | ||
| 1430 | (kill-buffer internal-shell-buffer)) | ||
| 1431 | (ignore-errors (kill-buffer internal-shell-buffer)))))) | ||
| 1432 | |||
| 1164 | 1433 | ||
| 1165 | ;;; Shell completion | 1434 | ;;; Shell completion |
| 1166 | 1435 | ||