diff options
| author | Joakim Verona | 2013-03-01 00:04:00 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-01 00:04:00 +0100 |
| commit | 1fb561e710e892d96da2681824984d2d4f106487 (patch) | |
| tree | cb82521e46906e064b3688867a3ca5c18349ec14 | |
| parent | aa1ff60c7bba6f944522ca2f75f688c1323bdb39 (diff) | |
| parent | 9d232fc451d9abc3e3ee3eead61176067470b24e (diff) | |
| download | emacs-1fb561e710e892d96da2681824984d2d4f106487.tar.gz emacs-1fb561e710e892d96da2681824984d2d4f106487.zip | |
auto upstream
37 files changed, 974 insertions, 441 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-02-28 Ken Brown <kbrown@cornell.edu> | ||
| 2 | |||
| 3 | * configure.ac (HAVE_DATA_START): Fix test. (Bug#13818) | ||
| 4 | |||
| 1 | 2013-02-25 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2013-02-25 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | Simplify data_start configuration (Bug#13783). | 7 | Simplify data_start configuration (Bug#13783). |
diff --git a/autogen/configure b/autogen/configure index 8f5ee260426..b8ced336979 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -10032,7 +10032,7 @@ extern char data_start[]; char ch; | |||
| 10032 | int | 10032 | int |
| 10033 | main () | 10033 | main () |
| 10034 | { | 10034 | { |
| 10035 | return data_start == &ch; | 10035 | return data_start < &ch; |
| 10036 | ; | 10036 | ; |
| 10037 | return 0; | 10037 | return 0; |
| 10038 | } | 10038 | } |
diff --git a/configure.ac b/configure.ac index 26388eeffa4..4d3c6f0c018 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1650,7 +1650,7 @@ else | |||
| 1650 | [AC_LINK_IFELSE( | 1650 | [AC_LINK_IFELSE( |
| 1651 | [AC_LANG_PROGRAM( | 1651 | [AC_LANG_PROGRAM( |
| 1652 | [[extern char data_start[]; char ch;]], | 1652 | [[extern char data_start[]; char ch;]], |
| 1653 | [[return data_start == &ch;]])], | 1653 | [[return data_start < &ch;]])], |
| 1654 | [emacs_cv_data_start=yes], | 1654 | [emacs_cv_data_start=yes], |
| 1655 | [emacs_cv_data_start=no])]) | 1655 | [emacs_cv_data_start=no])]) |
| 1656 | if test $emacs_cv_data_start = yes; then | 1656 | if test $emacs_cv_data_start = yes; then |
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..48561089dc0 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-02-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * tramp.texi (External methods): Mention `tramp-adb-program'. | ||
| 4 | |||
| 5 | 2013-02-28 Bastien Guerry <bzg@gnu.org> | ||
| 6 | |||
| 7 | * org.texi (Visibility cycling): Suggest to set | ||
| 8 | `org-agenda-inhibit-startup' to nil if user wants the startup | ||
| 9 | visibility settings to be honored in any circumstances. | ||
| 10 | (Progress logging, Checkboxes): Fix typos. | ||
| 11 | |||
| 12 | 2013-02-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 13 | |||
| 14 | * tramp.texi (top) [xxx, yyy, trampfn]: Provide two versions of | ||
| 15 | the macros, for Texinfo 4.13 and 5.0. | ||
| 16 | |||
| 1 | 2013-02-24 Michael Albinus <michael.albinus@gmx.de> | 17 | 2013-02-24 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 18 | ||
| 3 | Port Tramp documentation to Texinfo 5.0. | 19 | 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..1052b030691 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. |
| @@ -998,9 +1023,11 @@ name. | |||
| 998 | @cindex adb method | 1023 | @cindex adb method |
| 999 | 1024 | ||
| 1000 | This special method uses the Android Debug Bridge for connecting | 1025 | This special method uses the Android Debug Bridge for connecting |
| 1001 | Android devices. The Android Debug Bridge, part of the Android SDK, | 1026 | Android devices. The Android Debug Bridge must be installed locally. |
| 1002 | must be installed locally. The variable @var{tramp-adb-sdk-dir} must | 1027 | Some GNU/Linux distributions offer it for installation, otherwise it |
| 1003 | be set to its installation directory. | 1028 | can be installed as part of the Android SDK. If @command{adb} is not |
| 1029 | found via the @code{$PATH} environment variable, the variable | ||
| 1030 | @var{tramp-adb-program} must point to its absolute path. | ||
| 1004 | 1031 | ||
| 1005 | @end table | 1032 | @end table |
| 1006 | 1033 | ||
| @@ -3892,3 +3919,4 @@ for @value{emacsothername}. | |||
| 3892 | @c * Use `filename' resp. `file name' consistently. | 3919 | @c * Use `filename' resp. `file name' consistently. |
| 3893 | @c * Use `host' resp. `machine' consistently. | 3920 | @c * Use `host' resp. `machine' consistently. |
| 3894 | @c * Consistent small or capitalized words especially in menus. | 3921 | @c * Consistent small or capitalized words especially in menus. |
| 3922 | @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 822a4a26870..44109a5095f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,65 @@ | |||
| 1 | 2013-02-28 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * dired-aux.el (dired-diff): If file at point is a backup file, | ||
| 4 | use its original as the default value, and reverse the order | ||
| 5 | of arguments to the `diff' call. Doc fix. (Bug#13772) | ||
| 6 | |||
| 7 | 2013-02-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 8 | |||
| 9 | * net/tramp-adb.el (tramp-adb-sdk-dir): Remove. Replaced by ... | ||
| 10 | (tramp-adb-program): New defcustom. Remove function. Adapt calls. | ||
| 11 | |||
| 12 | 2013-02-28 AgustÃn MartÃn Domingo <agustin.martin@hispalinux.es> | ||
| 13 | |||
| 14 | Initial support for hunspell dictionaries auto-detection (Bug#13639) | ||
| 15 | |||
| 16 | * textmodes/ispell.el (ispell-find-hunspell-dictionaries): | ||
| 17 | Ask hunspell about available and default dictionaries. | ||
| 18 | (ispell-parse-hunspell-affix-file): Extract relevant info from | ||
| 19 | hunspell affix file. | ||
| 20 | (ispell-hunspell-fill-dictionary-entry): Fill non-initialized | ||
| 21 | `ispell-dictionary-alist' entry for given dictionary after info | ||
| 22 | provided by `ispell-parse-hunspell-affix-file'. | ||
| 23 | (ispell-hunspell-dict-paths-alist): New defvar to contain an alist | ||
| 24 | of parsed hunspell dicts and associated affix files. | ||
| 25 | (ispell-hunspell-dictionary-alist): New defvar to contain an alist | ||
| 26 | of parsed hunspell dicts and associated parameters. | ||
| 27 | (ispell-set-spellchecker-params): | ||
| 28 | Call `ispell-find-hunspell-dictionaries' if hunspell and not | ||
| 29 | previously done. | ||
| 30 | (ispell-start-process): | ||
| 31 | Call `ispell-hunspell-fill-dictionary-entry' for current | ||
| 32 | dictionary if it is not initialized. | ||
| 33 | |||
| 34 | 2013-02-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 35 | |||
| 36 | * imenu.el: Comment nitpicks. | ||
| 37 | |||
| 38 | 2013-02-28 Sam Steingold <sds@gnu.org> | ||
| 39 | |||
| 40 | * vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces. | ||
| 41 | See <http://stackoverflow.com/questions/14720205>. | ||
| 42 | |||
| 43 | 2013-02-28 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 44 | |||
| 45 | * net/net-utils.el (net-utils--revert-function): New fun (bug#13831). | ||
| 46 | (net-utils-mode): Use it. | ||
| 47 | (net-utils--revert-cmd): New var. | ||
| 48 | (net-utils-run-simple): Set it, and remove bogus interactive spec. | ||
| 49 | (traceroute): Use net-utils-run-simple. | ||
| 50 | |||
| 51 | 2013-02-28 Glenn Morris <rgm@gnu.org> | ||
| 52 | |||
| 53 | * textmodes/paragraphs.el (mark-paragraph): Doc fix. | ||
| 54 | |||
| 55 | 2013-02-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 56 | |||
| 57 | * doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c. | ||
| 58 | (doc-view-fallback-mode): Remove overlays here. | ||
| 59 | (doc-view-toggle-display): Instead of here. Don't throw away | ||
| 60 | image-mode-winprops-alist. | ||
| 61 | (doc-view-goto-page): Don't mess with hscroll. | ||
| 62 | |||
| 1 | 2013-02-27 Thierry Volpiatto <thierry.volpiatto@gmail.com> | 63 | 2013-02-27 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
| 2 | 64 | ||
| 3 | * font-lock.el (lisp-font-lock-keywords-2): Fix highlighting of | 65 | * font-lock.el (lisp-font-lock-keywords-2): Fix highlighting of |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 13443419bd7..f6ff32b0b01 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -55,7 +55,8 @@ into this list; they also should call `dired-log' to log the errors.") | |||
| 55 | (defun dired-diff (file &optional switches) | 55 | (defun dired-diff (file &optional switches) |
| 56 | "Compare file at point with file FILE using `diff'. | 56 | "Compare file at point with file FILE using `diff'. |
| 57 | If called interactively, prompt for FILE. If the file at point | 57 | If called interactively, prompt for FILE. If the file at point |
| 58 | has a backup file, use that as the default. If the mark is active | 58 | has a backup file, use that as the default. If the file at point |
| 59 | is a backup file, use its original. If the mark is active | ||
| 59 | in Transient Mark mode, use the file at the mark as the default. | 60 | in Transient Mark mode, use the file at the mark as the default. |
| 60 | \(That's the mark set by \\[set-mark-command], not by Dired's | 61 | \(That's the mark set by \\[set-mark-command], not by Dired's |
| 61 | \\[dired-mark] command.) | 62 | \\[dired-mark] command.) |
| @@ -67,8 +68,10 @@ With prefix arg, prompt for second argument SWITCHES, which is | |||
| 67 | the string of command switches for the third argument of `diff'." | 68 | the string of command switches for the third argument of `diff'." |
| 68 | (interactive | 69 | (interactive |
| 69 | (let* ((current (dired-get-filename t)) | 70 | (let* ((current (dired-get-filename t)) |
| 70 | ;; Get the latest existing backup file. | 71 | ;; Get the latest existing backup file or its original. |
| 71 | (oldf (diff-latest-backup-file current)) | 72 | (oldf (if (backup-file-name-p current) |
| 73 | (file-name-sans-versions current) | ||
| 74 | (diff-latest-backup-file current))) | ||
| 72 | ;; Get the file at the mark. | 75 | ;; Get the file at the mark. |
| 73 | (file-at-mark (if (and transient-mark-mode mark-active) | 76 | (file-at-mark (if (and transient-mark-mode mark-active) |
| 74 | (save-excursion (goto-char (mark t)) | 77 | (save-excursion (goto-char (mark t)) |
| @@ -107,7 +110,10 @@ the string of command switches for the third argument of `diff'." | |||
| 107 | (equal (expand-file-name current file) | 110 | (equal (expand-file-name current file) |
| 108 | (expand-file-name current)))) | 111 | (expand-file-name current)))) |
| 109 | (error "Attempt to compare the file to itself")) | 112 | (error "Attempt to compare the file to itself")) |
| 110 | (diff file current switches))) | 113 | (if (and (backup-file-name-p current) |
| 114 | (equal file (file-name-sans-versions current))) | ||
| 115 | (diff current file switches) | ||
| 116 | (diff file current switches)))) | ||
| 111 | 117 | ||
| 112 | ;;;###autoload | 118 | ;;;###autoload |
| 113 | (defun dired-backup-diff (&optional switches) | 119 | (defun dired-backup-diff (&optional switches) |
diff --git a/lisp/dired.el b/lisp/dired.el index 28045043c82..f03e0aca475 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3864,13 +3864,14 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3864 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3864 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3865 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3865 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3866 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3866 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3867 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "066bb17769887a7fbc0490003f59e4b3") | 3867 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d6a694b6d13fa948465fde52a9ffb3ba") |
| 3868 | ;;; Generated autoloads from dired-aux.el | 3868 | ;;; Generated autoloads from dired-aux.el |
| 3869 | 3869 | ||
| 3870 | (autoload 'dired-diff "dired-aux" "\ | 3870 | (autoload 'dired-diff "dired-aux" "\ |
| 3871 | Compare file at point with file FILE using `diff'. | 3871 | Compare file at point with file FILE using `diff'. |
| 3872 | If called interactively, prompt for FILE. If the file at point | 3872 | If called interactively, prompt for FILE. If the file at point |
| 3873 | has a backup file, use that as the default. If the mark is active | 3873 | has a backup file, use that as the default. If the file at point |
| 3874 | is a backup file, use its original. If the mark is active | ||
| 3874 | in Transient Mark mode, use the file at the mark as the default. | 3875 | in Transient Mark mode, use the file at the mark as the default. |
| 3875 | \(That's the mark set by \\[set-mark-command], not by Dired's | 3876 | \(That's the mark set by \\[set-mark-command], not by Dired's |
| 3876 | \\[dired-mark] command.) | 3877 | \\[dired-mark] command.) |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 89d2edd3dbb..0cfdc9a22d1 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -485,8 +485,7 @@ Typically \"page-%s.png\".") | |||
| 485 | (defun doc-view-goto-page (page) | 485 | (defun doc-view-goto-page (page) |
| 486 | "View the page given by PAGE." | 486 | "View the page given by PAGE." |
| 487 | (interactive "nPage: ") | 487 | (interactive "nPage: ") |
| 488 | (let ((len (doc-view-last-page-number)) | 488 | (let ((len (doc-view-last-page-number))) |
| 489 | (hscroll (window-hscroll))) | ||
| 490 | (if (< page 1) | 489 | (if (< page 1) |
| 491 | (setq page 1) | 490 | (setq page 1) |
| 492 | (when (and (> page len) | 491 | (when (and (> page len) |
| @@ -520,7 +519,6 @@ Typically \"page-%s.png\".") | |||
| 520 | (format doc-view--image-file-pattern page) | 519 | (format doc-view--image-file-pattern page) |
| 521 | (doc-view-current-cache-dir)))) | 520 | (doc-view-current-cache-dir)))) |
| 522 | (doc-view-insert-image file :pointer 'arrow) | 521 | (doc-view-insert-image file :pointer 'arrow) |
| 523 | (set-window-hscroll (selected-window) hscroll) | ||
| 524 | (when (and (not (file-exists-p file)) | 522 | (when (and (not (file-exists-p file)) |
| 525 | doc-view-current-converter-processes) | 523 | doc-view-current-converter-processes) |
| 526 | ;; The PNG file hasn't been generated yet. | 524 | ;; The PNG file hasn't been generated yet. |
| @@ -1381,8 +1379,6 @@ For now these keys are useful: | |||
| 1381 | (progn | 1379 | (progn |
| 1382 | (doc-view-kill-proc) | 1380 | (doc-view-kill-proc) |
| 1383 | (setq buffer-read-only nil) | 1381 | (setq buffer-read-only nil) |
| 1384 | (remove-overlays (point-min) (point-max) 'doc-view t) | ||
| 1385 | (setq-local image-mode-winprops-alist t) | ||
| 1386 | ;; Switch to the previously used major mode or fall back to | 1382 | ;; Switch to the previously used major mode or fall back to |
| 1387 | ;; normal mode. | 1383 | ;; normal mode. |
| 1388 | (doc-view-fallback-mode) | 1384 | (doc-view-fallback-mode) |
| @@ -1725,6 +1721,7 @@ toggle between displaying the document or editing it as text. | |||
| 1725 | (mapcar (lambda (var) (cons var (symbol-value var))) | 1721 | (mapcar (lambda (var) (cons var (symbol-value var))) |
| 1726 | '(doc-view-resolution | 1722 | '(doc-view-resolution |
| 1727 | image-mode-winprops-alist))))) | 1723 | image-mode-winprops-alist))))) |
| 1724 | (remove-overlays (point-min) (point-max) 'doc-view t) | ||
| 1728 | (if doc-view-previous-major-mode | 1725 | (if doc-view-previous-major-mode |
| 1729 | (funcall doc-view-previous-major-mode) | 1726 | (funcall doc-view-previous-major-mode) |
| 1730 | (let ((auto-mode-alist | 1727 | (let ((auto-mode-alist |
diff --git a/lisp/imenu.el b/lisp/imenu.el index c1077a49d1a..d79b0abeebc 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -405,11 +405,11 @@ Don't move point." | |||
| 405 | ;; Regular expression to find C functions | 405 | ;; Regular expression to find C functions |
| 406 | (defvar imenu-example--function-name-regexp-c | 406 | (defvar imenu-example--function-name-regexp-c |
| 407 | (concat | 407 | (concat |
| 408 | "^[a-zA-Z0-9]+[ \t]?" ; type specs; there can be no | 408 | "^[a-zA-Z0-9]+[ \t]?" ; Type specs; there can be no |
| 409 | "\\([a-zA-Z0-9_*]+[ \t]+\\)?" ; more than 3 tokens, right? | 409 | "\\([a-zA-Z0-9_*]+[ \t]+\\)?" ; more than 3 tokens, right? |
| 410 | "\\([a-zA-Z0-9_*]+[ \t]+\\)?" | 410 | "\\([a-zA-Z0-9_*]+[ \t]+\\)?" |
| 411 | "\\([*&]+[ \t]*\\)?" ; pointer | 411 | "\\([*&]+[ \t]*\\)?" ; Pointer. |
| 412 | "\\([a-zA-Z0-9_*]+\\)[ \t]*(" ; name | 412 | "\\([a-zA-Z0-9_*]+\\)[ \t]*(" ; Name. |
| 413 | )) | 413 | )) |
| 414 | 414 | ||
| 415 | (defun imenu-example--create-c-index (&optional regexp) | 415 | (defun imenu-example--create-c-index (&optional regexp) |
| @@ -556,7 +556,7 @@ NOT share structure with ALIST." | |||
| 556 | (defun imenu--truncate-items (menulist) | 556 | (defun imenu--truncate-items (menulist) |
| 557 | "Truncate all strings in MENULIST to `imenu-max-item-length'." | 557 | "Truncate all strings in MENULIST to `imenu-max-item-length'." |
| 558 | (mapc (lambda (item) | 558 | (mapc (lambda (item) |
| 559 | ;; truncate if necessary | 559 | ;; Truncate if necessary. |
| 560 | (when (and (numberp imenu-max-item-length) | 560 | (when (and (numberp imenu-max-item-length) |
| 561 | (> (length (car item)) imenu-max-item-length)) | 561 | (> (length (car item)) imenu-max-item-length)) |
| 562 | (setcar item (substring (car item) 0 imenu-max-item-length))) | 562 | (setcar item (substring (car item) 0 imenu-max-item-length))) |
| @@ -575,7 +575,7 @@ See `imenu--index-alist' for the format of the index alist." | |||
| 575 | (or (not imenu-auto-rescan) | 575 | (or (not imenu-auto-rescan) |
| 576 | (and imenu-auto-rescan | 576 | (and imenu-auto-rescan |
| 577 | (> (buffer-size) imenu-auto-rescan-maxout)))) | 577 | (> (buffer-size) imenu-auto-rescan-maxout)))) |
| 578 | ;; Get the index; truncate if necessary | 578 | ;; Get the index; truncate if necessary. |
| 579 | (progn | 579 | (progn |
| 580 | (setq imenu--index-alist | 580 | (setq imenu--index-alist |
| 581 | (save-excursion | 581 | (save-excursion |
| @@ -687,8 +687,9 @@ The alternate method, which is the one most often used, is to call | |||
| 687 | (save-excursion | 687 | (save-excursion |
| 688 | (setq name (funcall imenu-extract-index-name-function))) | 688 | (setq name (funcall imenu-extract-index-name-function))) |
| 689 | (and (stringp name) | 689 | (and (stringp name) |
| 690 | ;; [ydi] updated for imenu-use-markers | 690 | ;; [ydi] Updated for imenu-use-markers. |
| 691 | (push (cons name (if imenu-use-markers (point-marker) (point))) | 691 | (push (cons name |
| 692 | (if imenu-use-markers (point-marker) (point))) | ||
| 692 | index-alist))) | 693 | index-alist))) |
| 693 | index-alist)) | 694 | index-alist)) |
| 694 | ;; Use generic expression if possible. | 695 | ;; Use generic expression if possible. |
| @@ -741,12 +742,12 @@ depending on PATTERNS." | |||
| 741 | (modify-syntax-entry c (cdr syn) table)) | 742 | (modify-syntax-entry c (cdr syn) table)) |
| 742 | (car syn)))) | 743 | (car syn)))) |
| 743 | (goto-char (point-max)) | 744 | (goto-char (point-max)) |
| 744 | (unwind-protect ; for syntax table | 745 | (unwind-protect ; For syntax table. |
| 745 | (save-match-data | 746 | (save-match-data |
| 746 | (set-syntax-table table) | 747 | (set-syntax-table table) |
| 747 | 748 | ||
| 748 | ;; map over the elements of imenu-generic-expression | 749 | ;; Map over the elements of imenu-generic-expression |
| 749 | ;; (typically functions, variables ...) | 750 | ;; (typically functions, variables ...). |
| 750 | (dolist (pat patterns) | 751 | (dolist (pat patterns) |
| 751 | (let ((menu-title (car pat)) | 752 | (let ((menu-title (car pat)) |
| 752 | (regexp (nth 1 pat)) | 753 | (regexp (nth 1 pat)) |
| @@ -1002,7 +1003,7 @@ The ignored args just make this function have the same interface as a | |||
| 1002 | function placed in a special index-item." | 1003 | function placed in a special index-item." |
| 1003 | (if (or (< position (point-min)) | 1004 | (if (or (< position (point-min)) |
| 1004 | (> position (point-max))) | 1005 | (> position (point-max))) |
| 1005 | ;; widen if outside narrowing | 1006 | ;; Widen if outside narrowing. |
| 1006 | (widen)) | 1007 | (widen)) |
| 1007 | (goto-char position)) | 1008 | (goto-char position)) |
| 1008 | 1009 | ||
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 28fd5c67ff8..cc28bab733f 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el | |||
| @@ -285,7 +285,8 @@ This variable is only used if the variable | |||
| 285 | (define-derived-mode net-utils-mode special-mode "NetworkUtil" | 285 | (define-derived-mode net-utils-mode special-mode "NetworkUtil" |
| 286 | "Major mode for interacting with an external network utility." | 286 | "Major mode for interacting with an external network utility." |
| 287 | (set (make-local-variable 'font-lock-defaults) | 287 | (set (make-local-variable 'font-lock-defaults) |
| 288 | '((net-utils-font-lock-keywords)))) | 288 | '((net-utils-font-lock-keywords))) |
| 289 | (setq-local revert-buffer-function #'net-utils--revert-function)) | ||
| 289 | 290 | ||
| 290 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 291 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 291 | ;; Utility functions | 292 | ;; Utility functions |
| @@ -354,20 +355,38 @@ This variable is only used if the variable | |||
| 354 | ;; General network utilities (diagnostic) | 355 | ;; General network utilities (diagnostic) |
| 355 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 356 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 356 | 357 | ||
| 357 | (defun net-utils-run-simple (buffer-name program-name args) | 358 | ;; Todo: This data could be saved in a bookmark. |
| 359 | (defvar net-utils--revert-cmd nil) | ||
| 360 | |||
| 361 | (defun net-utils-run-simple (buffer program-name args) | ||
| 358 | "Run a network utility for diagnostic output only." | 362 | "Run a network utility for diagnostic output only." |
| 359 | (interactive) | 363 | (with-current-buffer (if (stringp buffer) (get-buffer-create buffer) buffer) |
| 360 | (when (get-buffer buffer-name) | 364 | (let ((proc (get-buffer-process (current-buffer)))) |
| 361 | (kill-buffer buffer-name)) | 365 | (when proc |
| 362 | (get-buffer-create buffer-name) | 366 | (set-process-filter proc nil) |
| 363 | (with-current-buffer buffer-name | 367 | (delete-process proc))) |
| 368 | (let ((inhibit-read-only t)) | ||
| 369 | (erase-buffer)) | ||
| 364 | (net-utils-mode) | 370 | (net-utils-mode) |
| 371 | (setq-local net-utils--revert-cmd | ||
| 372 | `(net-utils-run-simple ,(current-buffer) ,program-name ,args)) | ||
| 365 | (set-process-filter | 373 | (set-process-filter |
| 366 | (apply 'start-process (format "%s" program-name) | 374 | (apply 'start-process program-name |
| 367 | buffer-name program-name args) | 375 | (current-buffer) program-name args) |
| 368 | 'net-utils-remove-ctrl-m-filter) | 376 | 'net-utils-remove-ctrl-m-filter) |
| 369 | (goto-char (point-min))) | 377 | (goto-char (point-min)) |
| 370 | (display-buffer buffer-name)) | 378 | (display-buffer (current-buffer)))) |
| 379 | |||
| 380 | (defun net-utils--revert-function (&optional ignore-auto noconfirm) | ||
| 381 | (message "Reverting `%s'..." (buffer-name)) | ||
| 382 | (apply (car net-utils--revert-cmd) (cdr net-utils--revert-cmd)) | ||
| 383 | (let ((proc (get-buffer-process (current-buffer)))) | ||
| 384 | (when proc | ||
| 385 | (set-process-sentinel | ||
| 386 | proc | ||
| 387 | (lambda (process event) | ||
| 388 | (when (string= event "finished\n") | ||
| 389 | (message "Reverting `%s' done" (process-buffer process)))))))) | ||
| 371 | 390 | ||
| 372 | ;;;###autoload | 391 | ;;;###autoload |
| 373 | (defun ifconfig () | 392 | (defun ifconfig () |
| @@ -428,9 +447,8 @@ This variable is only used if the variable | |||
| 428 | (if traceroute-program-options | 447 | (if traceroute-program-options |
| 429 | (append traceroute-program-options (list target)) | 448 | (append traceroute-program-options (list target)) |
| 430 | (list target)))) | 449 | (list target)))) |
| 431 | (net-utils-run-program | 450 | (net-utils-run-simple |
| 432 | (concat "Traceroute" " " target) | 451 | (concat "Traceroute" " " target) |
| 433 | (concat "** Traceroute ** " traceroute-program " ** " target) | ||
| 434 | traceroute-program | 452 | traceroute-program |
| 435 | options))) | 453 | options))) |
| 436 | 454 | ||
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 809623280bc..766dcdbbe6a 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -23,10 +23,11 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; The Android Debug Bridge must be installed on your local machine. | 26 | ;; The Android Debug Bridge "adb" must be installed on your local |
| 27 | ;; Add the following form into your .emacs: | 27 | ;; machine. If it is not in your $PATH, add the following form into |
| 28 | ;; your .emacs: | ||
| 28 | ;; | 29 | ;; |
| 29 | ;; (setq tramp-adb-sdk-dir "/path/to/android/sdk") | 30 | ;; (setq tramp-adb-program "/path/to/adb") |
| 30 | ;; | 31 | ;; |
| 31 | ;; Due to security it is not possible to access non-root devices. | 32 | ;; Due to security it is not possible to access non-root devices. |
| 32 | 33 | ||
| @@ -37,11 +38,11 @@ | |||
| 37 | 38 | ||
| 38 | (defvar dired-move-to-filename-regexp) | 39 | (defvar dired-move-to-filename-regexp) |
| 39 | 40 | ||
| 40 | (defcustom tramp-adb-sdk-dir "~/Android/sdk" | 41 | (defcustom tramp-adb-program "adb" |
| 41 | "Set to the directory containing the Android SDK." | 42 | "Name of the Android Debug Bridge program." |
| 42 | :type 'string | 43 | :group 'tramp |
| 43 | :version "24.4" | 44 | :version "24.4" |
| 44 | :group 'tramp) | 45 | :type 'string) |
| 45 | 46 | ||
| 46 | ;;;###tramp-autoload | 47 | ;;;###tramp-autoload |
| 47 | (defconst tramp-adb-method "adb" | 48 | (defconst tramp-adb-method "adb" |
| @@ -149,17 +150,12 @@ pass to the OPERATION." | |||
| 149 | (save-match-data (apply (cdr fn) args)) | 150 | (save-match-data (apply (cdr fn) args)) |
| 150 | (tramp-run-real-handler operation args)))) | 151 | (tramp-run-real-handler operation args)))) |
| 151 | 152 | ||
| 152 | ;; This cannot be a constant, because `tramp-adb-sdk-dir' is customizable. | ||
| 153 | (defun tramp-adb-program () | ||
| 154 | "The Android Debug Bridge." | ||
| 155 | (expand-file-name "platform-tools/adb" tramp-adb-sdk-dir)) | ||
| 156 | |||
| 157 | ;;;###tramp-autoload | 153 | ;;;###tramp-autoload |
| 158 | (defun tramp-adb-parse-device-names (ignore) | 154 | (defun tramp-adb-parse-device-names (ignore) |
| 159 | "Return a list of (nil host) tuples allowed to access." | 155 | "Return a list of (nil host) tuples allowed to access." |
| 160 | (with-timeout (10) | 156 | (with-timeout (10) |
| 161 | (with-temp-buffer | 157 | (with-temp-buffer |
| 162 | (when (zerop (call-process (tramp-adb-program) nil t nil "devices")) | 158 | (when (zerop (call-process tramp-adb-program nil t nil "devices")) |
| 163 | (let (result) | 159 | (let (result) |
| 164 | (goto-char (point-min)) | 160 | (goto-char (point-min)) |
| 165 | (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t) | 161 | (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t) |
| @@ -982,11 +978,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | |||
| 982 | (setq args (append (list "-s" (tramp-file-name-host vec)) args))) | 978 | (setq args (append (list "-s" (tramp-file-name-host vec)) args))) |
| 983 | (with-temp-buffer | 979 | (with-temp-buffer |
| 984 | (prog1 | 980 | (prog1 |
| 985 | (unless (zerop (apply 'call-process (tramp-adb-program) nil t nil args)) | 981 | (unless (zerop (apply 'call-process tramp-adb-program nil t nil args)) |
| 986 | (buffer-string)) | 982 | (buffer-string)) |
| 987 | (tramp-message | 983 | (tramp-message |
| 988 | vec 6 "%s %s\n%s" | 984 | vec 6 "%s %s\n%s" |
| 989 | (tramp-adb-program) (mapconcat 'identity args " ") (buffer-string))))) | 985 | tramp-adb-program (mapconcat 'identity args " ") (buffer-string))))) |
| 990 | 986 | ||
| 991 | (defun tramp-adb-find-test-command (vec) | 987 | (defun tramp-adb-find-test-command (vec) |
| 992 | "Checks, whether the ash has a builtin \"test\" command. | 988 | "Checks, whether the ash has a builtin \"test\" command. |
| @@ -1103,7 +1099,7 @@ connection if a previous connection has died for some reason." | |||
| 1103 | (p (let ((default-directory | 1099 | (p (let ((default-directory |
| 1104 | (tramp-compat-temporary-file-directory))) | 1100 | (tramp-compat-temporary-file-directory))) |
| 1105 | (apply 'start-process (tramp-get-connection-name vec) buf | 1101 | (apply 'start-process (tramp-get-connection-name vec) buf |
| 1106 | (tramp-adb-program) args)))) | 1102 | tramp-adb-program args)))) |
| 1107 | (tramp-message | 1103 | (tramp-message |
| 1108 | vec 6 "%s" (mapconcat 'identity (process-command p) " ")) | 1104 | vec 6 "%s" (mapconcat 'identity (process-command p) " ")) |
| 1109 | ;; Wait for initial prompt. | 1105 | ;; Wait for initial prompt. |
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/ispell.el b/lisp/textmodes/ispell.el index 50a10dba9a2..d785b938f67 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1129,6 +1129,170 @@ Return the new dictionary alist." | |||
| 1129 | (push (cons aliasname (cdr realdict)) alist)))))) | 1129 | (push (cons aliasname (cdr realdict)) alist)))))) |
| 1130 | alist)) | 1130 | alist)) |
| 1131 | 1131 | ||
| 1132 | ;; Make ispell.el work better with hunspell. | ||
| 1133 | |||
| 1134 | (defvar ispell-hunspell-dict-paths-alist nil | ||
| 1135 | "Alist of parsed hunspell dicts and associated affix files. | ||
| 1136 | Will be used to parse corresponding .aff file and create associated | ||
| 1137 | parameters to be inserted into `ispell-hunspell-dictionary-alist'. | ||
| 1138 | Internal use.") | ||
| 1139 | |||
| 1140 | (defvar ispell-hunspell-dictionary-alist nil | ||
| 1141 | "Alist of parsed hunspell dicts and associated parameters. | ||
| 1142 | This alist will initially contain names of found dicts. Associated | ||
| 1143 | parameters will be added when dict is used for the first time. | ||
| 1144 | Internal use.") | ||
| 1145 | |||
| 1146 | (defun ispell-hunspell-fill-dictionary-entry (dict) | ||
| 1147 | "Fill `ispell-dictionary-alist' uninitialized entries for `DICT' and aliases. | ||
| 1148 | Value will be extracted from hunspell affix file and used for | ||
| 1149 | all uninitialized dicts using that affix file." | ||
| 1150 | (if (cadr (assoc dict ispell-dictionary-alist)) | ||
| 1151 | (message "ispell-hfde: Non void entry for %s. Skipping.\n" dict) | ||
| 1152 | (let ((dict-alias (cadr (assoc dict ispell-hunspell-dictionary-equivs-alist))) | ||
| 1153 | (use-for-dicts (list dict)) | ||
| 1154 | (dict-args-cdr (cdr (ispell-parse-hunspell-affix-file dict))) | ||
| 1155 | newlist) | ||
| 1156 | ;; Get a list of unitialized dicts using the same affix file. | ||
| 1157 | (dolist (dict-equiv-alist-entry ispell-hunspell-dictionary-equivs-alist) | ||
| 1158 | (let ((dict-equiv-key (car dict-equiv-alist-entry)) | ||
| 1159 | (dict-equiv-value (cadr dict-equiv-alist-entry))) | ||
| 1160 | (if (or (member dict dict-equiv-alist-entry) | ||
| 1161 | (member dict-alias dict-equiv-alist-entry)) | ||
| 1162 | (dolist ( tmp-dict (list dict-equiv-key dict-equiv-value)) | ||
| 1163 | (if (cadr (assoc tmp-dict ispell-dictionary-alist)) | ||
| 1164 | (ispell-print-if-debug (format "ispell-hfde: %s already expanded. Skipping.\n" tmp-dict)) | ||
| 1165 | (add-to-list 'use-for-dicts tmp-dict)))))) | ||
| 1166 | (ispell-print-if-debug (format "ispell-hfde: Filling %s entry. Use for %s.\n" dict use-for-dicts)) | ||
| 1167 | ;; The final loop | ||
| 1168 | (dolist (entry ispell-dictionary-alist) | ||
| 1169 | (if (member (car entry) use-for-dicts) | ||
| 1170 | (add-to-list 'newlist | ||
| 1171 | (append (list (car entry)) dict-args-cdr)) | ||
| 1172 | (add-to-list 'newlist entry))) | ||
| 1173 | (setq ispell-dictionary-alist newlist)))) | ||
| 1174 | |||
| 1175 | (defun ispell-parse-hunspell-affix-file (dict-key) | ||
| 1176 | "Parse hunspell affix file to extract parameters for `DICT-KEY'. | ||
| 1177 | Return a list in `ispell-dictionary-alist' format." | ||
| 1178 | (let ((affix-file (cadr (assoc dict-key ispell-hunspell-dict-paths-alist)))) | ||
| 1179 | (unless affix-file | ||
| 1180 | (error "ispell-phaf: No matching entry for %s.\n" dict-name)) | ||
| 1181 | (if (file-exists-p affix-file) | ||
| 1182 | (let ((dict-name (file-name-sans-extension (file-name-nondirectory affix-file))) | ||
| 1183 | otherchars-string otherchars-list) | ||
| 1184 | (with-temp-buffer | ||
| 1185 | (insert-file-contents affix-file) | ||
| 1186 | (setq otherchars-string | ||
| 1187 | (save-excursion | ||
| 1188 | (beginning-of-buffer) | ||
| 1189 | (if (search-forward-regexp "^WORDCHARS +" nil t ) | ||
| 1190 | (buffer-substring (point) | ||
| 1191 | (progn (end-of-line) (point)))))) | ||
| 1192 | ;; Remove trailing whitespace and extra stuff. Make list if non-nil. | ||
| 1193 | (setq otherchars-list | ||
| 1194 | (if otherchars-string | ||
| 1195 | (split-string | ||
| 1196 | (if (string-match " +.*$" otherchars-string) | ||
| 1197 | (replace-match "" nil nil otherchars-string) | ||
| 1198 | otherchars-string) | ||
| 1199 | "" t))) | ||
| 1200 | |||
| 1201 | ;; Fill dict entry | ||
| 1202 | (list dict-key | ||
| 1203 | "[[:alpha:]]" | ||
| 1204 | "[^[:alpha:]]" | ||
| 1205 | (if otherchars-list | ||
| 1206 | (regexp-opt otherchars-list) | ||
| 1207 | "") | ||
| 1208 | t ;; many-otherchars-p: We can't tell, set to t | ||
| 1209 | (list "-d" dict-name) | ||
| 1210 | nil ;; extended-char-mode: not supported by hunspell | ||
| 1211 | 'utf-8))) | ||
| 1212 | (error "ispell-phaf: File \"%s\" not found.\n" affix-file)))) | ||
| 1213 | |||
| 1214 | (defun ispell-find-hunspell-dictionaries () | ||
| 1215 | "Look for installed hunspell dictionaries. | ||
| 1216 | Will initialize `ispell-hunspell-dictionary-alist' and | ||
| 1217 | `ispell-hunspell-dictionary-alist' after values found | ||
| 1218 | and remove `ispell-hunspell-dictionary-equivs-alist' | ||
| 1219 | entries if a specific dict was found." | ||
| 1220 | (let ((hunspell-found-dicts | ||
| 1221 | (split-string | ||
| 1222 | (with-temp-buffer | ||
| 1223 | (ispell-call-process ispell-program-name | ||
| 1224 | null-device | ||
| 1225 | t | ||
| 1226 | nil | ||
| 1227 | "-D") | ||
| 1228 | (buffer-string)) | ||
| 1229 | "[\n\r]+" | ||
| 1230 | t)) | ||
| 1231 | hunspell-default-dict | ||
| 1232 | hunspell-default-dict-entry) | ||
| 1233 | (dolist (dict hunspell-found-dicts) | ||
| 1234 | (let* ((full-name (file-name-nondirectory dict)) | ||
| 1235 | (basename (file-name-sans-extension full-name)) | ||
| 1236 | (affix-file (concat dict ".aff"))) | ||
| 1237 | (if (string-match "\\.aff$" dict) | ||
| 1238 | ;; Found default dictionary | ||
| 1239 | (if hunspell-default-dict | ||
| 1240 | (error "ispell-fhd: Default dict already defined as %s. Not using %s.\n" | ||
| 1241 | hunspell-default-dict dict) | ||
| 1242 | (setq affix-file dict) | ||
| 1243 | (setq hunspell-default-dict (list basename affix-file))) | ||
| 1244 | (if (and (not (assoc basename ispell-hunspell-dict-paths-alist)) | ||
| 1245 | (file-exists-p affix-file)) | ||
| 1246 | ;; Entry has an associated .aff file and no previous value. | ||
| 1247 | (progn | ||
| 1248 | (ispell-print-if-debug | ||
| 1249 | (format "++ ispell-fhd: dict-entry:%s name:%s basename:%s affix-file:%s\n" | ||
| 1250 | dict full-name basename affix-file)) | ||
| 1251 | (add-to-list 'ispell-hunspell-dict-paths-alist | ||
| 1252 | (list basename affix-file))) | ||
| 1253 | (ispell-print-if-debug | ||
| 1254 | (format "-- ispell-fhd: Skipping entry: %s\n" dict)))))) | ||
| 1255 | ;; Remove entry from aliases alist if explicit dict was found. | ||
| 1256 | (let (newlist) | ||
| 1257 | (dolist (dict ispell-hunspell-dictionary-equivs-alist) | ||
| 1258 | (if (assoc (car dict) ispell-hunspell-dict-paths-alist) | ||
| 1259 | (ispell-print-if-debug | ||
| 1260 | (format "-- ispell-fhd: Excluding %s alias. Standalone dict found.\n" | ||
| 1261 | (car dict))) | ||
| 1262 | (add-to-list 'newlist dict))) | ||
| 1263 | (setq ispell-hunspell-dictionary-equivs-alist newlist)) | ||
| 1264 | ;; Add known hunspell aliases | ||
| 1265 | (dolist (dict-equiv ispell-hunspell-dictionary-equivs-alist) | ||
| 1266 | (let ((dict-equiv-key (car dict-equiv)) | ||
| 1267 | (dict-equiv-value (cadr dict-equiv)) | ||
| 1268 | (exclude-aliases (list ;; Exclude TeX aliases | ||
| 1269 | "esperanto-tex" | ||
| 1270 | "francais7" | ||
| 1271 | "francais-tex" | ||
| 1272 | "norsk7-tex"))) | ||
| 1273 | (if (and (assoc dict-equiv-value ispell-hunspell-dict-paths-alist) | ||
| 1274 | (not (assoc dict-equiv-key ispell-hunspell-dict-paths-alist)) | ||
| 1275 | (not (member dict-equiv-key exclude-aliases))) | ||
| 1276 | (let ((affix-file (cadr (assoc dict-equiv-value ispell-hunspell-dict-paths-alist)))) | ||
| 1277 | (ispell-print-if-debug (format "++ ispell-fhd: Adding alias %s -> %s.\n" | ||
| 1278 | dict-equiv-key affix-file)) | ||
| 1279 | (add-to-list | ||
| 1280 | 'ispell-hunspell-dict-paths-alist | ||
| 1281 | (list dict-equiv-key affix-file)))))) | ||
| 1282 | ;; Parse and set values for default dictionary. | ||
| 1283 | (setq hunspell-default-dict (car hunspell-default-dict)) | ||
| 1284 | (setq hunspell-default-dict-entry | ||
| 1285 | (ispell-parse-hunspell-affix-file hunspell-default-dict)) | ||
| 1286 | ;; Create an alist of found dicts with only names, except for default dict. | ||
| 1287 | (setq ispell-hunspell-dictionary-alist | ||
| 1288 | (list (append (list nil) (cdr hunspell-default-dict-entry)))) | ||
| 1289 | (dolist (dict (mapcar 'car ispell-hunspell-dict-paths-alist)) | ||
| 1290 | (if (string= dict hunspell-default-dict) | ||
| 1291 | (add-to-list 'ispell-hunspell-dictionary-alist | ||
| 1292 | hunspell-default-dict-entry) | ||
| 1293 | (add-to-list 'ispell-hunspell-dictionary-alist | ||
| 1294 | (list dict)))))) | ||
| 1295 | |||
| 1132 | ;; Set params according to the selected spellchecker | 1296 | ;; Set params according to the selected spellchecker |
| 1133 | 1297 | ||
| 1134 | (defvar ispell-last-program-name nil | 1298 | (defvar ispell-last-program-name nil |
| @@ -1154,20 +1318,30 @@ aspell is used along with Emacs).") | |||
| 1154 | (setq ispell-library-directory (ispell-check-version)) | 1318 | (setq ispell-library-directory (ispell-check-version)) |
| 1155 | t) | 1319 | t) |
| 1156 | (error nil)) | 1320 | (error nil)) |
| 1157 | ispell-really-aspell | ||
| 1158 | ispell-encoding8-command | 1321 | ispell-encoding8-command |
| 1159 | ispell-emacs-alpha-regexp) | 1322 | ispell-emacs-alpha-regexp) |
| 1160 | (unless ispell-aspell-dictionary-alist | 1323 | ;; auto-detection will only be used if spellchecker is not |
| 1161 | (ispell-find-aspell-dictionaries))) | 1324 | ;; ispell, supports a way to set communication to UTF-8 and |
| 1162 | 1325 | ;; Emacs flavor supports [:alpha:] | |
| 1163 | ;; Substitute ispell-dictionary-alist with the list of dictionaries | 1326 | (if ispell-really-aspell |
| 1164 | ;; corresponding to the given spellchecker. If a recent aspell, use | 1327 | (or ispell-aspell-dictionary-alist |
| 1165 | ;; the list of really installed dictionaries and add to it elements | 1328 | (ispell-find-aspell-dictionaries)) |
| 1166 | ;; of the original list that are not present there. Allow distro info. | 1329 | (if ispell-really-hunspell |
| 1330 | (or ispell-hunspell-dictionary-alist | ||
| 1331 | (ispell-find-hunspell-dictionaries))))) | ||
| 1332 | |||
| 1333 | ;; Substitute ispell-dictionary-alist with the list of | ||
| 1334 | ;; dictionaries corresponding to the given spellchecker. | ||
| 1335 | ;; If a recent aspell or hunspell, use the list of really | ||
| 1336 | ;; installed dictionaries and add to it elements of the original | ||
| 1337 | ;; list that are not present there. Allow distro info. | ||
| 1167 | (let ((found-dicts-alist | 1338 | (let ((found-dicts-alist |
| 1168 | (if (and ispell-really-aspell | 1339 | (if (and ispell-encoding8-command |
| 1169 | ispell-encoding8-command) | 1340 | ispell-emacs-alpha-regexp) |
| 1170 | ispell-aspell-dictionary-alist | 1341 | (if ispell-really-aspell |
| 1342 | ispell-aspell-dictionary-alist | ||
| 1343 | (if ispell-really-hunspell | ||
| 1344 | ispell-hunspell-dictionary-alist)) | ||
| 1171 | nil)) | 1345 | nil)) |
| 1172 | (ispell-dictionary-base-alist ispell-dictionary-base-alist) | 1346 | (ispell-dictionary-base-alist ispell-dictionary-base-alist) |
| 1173 | ispell-base-dicts-override-alist ; Override only base-dicts-alist | 1347 | ispell-base-dicts-override-alist ; Override only base-dicts-alist |
| @@ -1237,19 +1411,21 @@ aspell is used along with Emacs).") | |||
| 1237 | (if ispell-emacs-alpha-regexp | 1411 | (if ispell-emacs-alpha-regexp |
| 1238 | (let (tmp-dicts-alist) | 1412 | (let (tmp-dicts-alist) |
| 1239 | (dolist (adict ispell-dictionary-alist) | 1413 | (dolist (adict ispell-dictionary-alist) |
| 1240 | (add-to-list 'tmp-dicts-alist | 1414 | (if (cadr adict) ;; Do not touch hunspell uninitialized entries |
| 1241 | (list | 1415 | (add-to-list 'tmp-dicts-alist |
| 1242 | (nth 0 adict) ; dict name | 1416 | (list |
| 1243 | "[[:alpha:]]" ; casechars | 1417 | (nth 0 adict) ; dict name |
| 1244 | "[^[:alpha:]]" ; not-casechars | 1418 | "[[:alpha:]]" ; casechars |
| 1245 | (nth 3 adict) ; otherchars | 1419 | "[^[:alpha:]]" ; not-casechars |
| 1246 | (nth 4 adict) ; many-otherchars-p | 1420 | (nth 3 adict) ; otherchars |
| 1247 | (nth 5 adict) ; ispell-args | 1421 | (nth 4 adict) ; many-otherchars-p |
| 1248 | (nth 6 adict) ; extended-character-mode | 1422 | (nth 5 adict) ; ispell-args |
| 1249 | (if ispell-encoding8-command | 1423 | (nth 6 adict) ; extended-character-mode |
| 1250 | 'utf-8 | 1424 | (if ispell-encoding8-command |
| 1251 | (nth 7 adict))))) | 1425 | 'utf-8 |
| 1252 | (setq ispell-dictionary-alist tmp-dicts-alist))))) | 1426 | (nth 7 adict)))) |
| 1427 | (add-to-list 'tmp-dicts-alist adict))) | ||
| 1428 | (setq ispell-dictionary-alist tmp-dicts-alist))))) | ||
| 1253 | 1429 | ||
| 1254 | (defun ispell-valid-dictionary-list () | 1430 | (defun ispell-valid-dictionary-list () |
| 1255 | "Return a list of valid dictionaries. | 1431 | "Return a list of valid dictionaries. |
| @@ -2737,6 +2913,12 @@ When asynchronous processes are not supported, `run' is always returned." | |||
| 2737 | Keeps argument list for future Ispell invocations for no async support." | 2913 | Keeps argument list for future Ispell invocations for no async support." |
| 2738 | ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary' | 2914 | ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary' |
| 2739 | ;; are properly set in `ispell-internal-change-dictionary'. | 2915 | ;; are properly set in `ispell-internal-change-dictionary'. |
| 2916 | |||
| 2917 | ;; Parse hunspell affix file if using hunspell and entry is uninitialized. | ||
| 2918 | (if ispell-really-hunspell | ||
| 2919 | (or (cadr (assoc ispell-current-dictionary ispell-dictionary-alist)) | ||
| 2920 | (ispell-hunspell-fill-dictionary-entry ispell-current-dictionary))) | ||
| 2921 | |||
| 2740 | (let* ((default-directory | 2922 | (let* ((default-directory |
| 2741 | (if (and (file-directory-p default-directory) | 2923 | (if (and (file-directory-p default-directory) |
| 2742 | (file-readable-p default-directory)) | 2924 | (file-readable-p default-directory)) |
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/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 940457b6cc0..d9224b29c2e 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -821,9 +821,11 @@ If the OLD prefix arg is passed, tell the file NAME of the old file." | |||
| 821 | (progn (diff-hunk-prev) (point)) | 821 | (progn (diff-hunk-prev) (point)) |
| 822 | (error (point-min))))) | 822 | (error (point-min))))) |
| 823 | (header-files | 823 | (header-files |
| 824 | (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+] \\(\\S-+\\)") | 824 | ;; handle filenames with spaces; |
| 825 | (list (if old (match-string 1) (match-string 3)) | 825 | ;; cf. diff-font-lock-keywords / diff-file-header-face |
| 826 | (if old (match-string 3) (match-string 1))) | 826 | (if (looking-at "[-*][-*][-*] \\([^\t]+\\)\t.*\n[-+][-+][-+] \\([^\t]+\\)") |
| 827 | (list (if old (match-string 1) (match-string 2)) | ||
| 828 | (if old (match-string 2) (match-string 1))) | ||
| 827 | (forward-line 1) nil))) | 829 | (forward-line 1) nil))) |
| 828 | (delq nil | 830 | (delq nil |
| 829 | (append | 831 | (append |
| @@ -832,6 +834,7 @@ If the OLD prefix arg is passed, tell the file NAME of the old file." | |||
| 832 | (re-search-backward "^Index: \\(.+\\)" limit t))) | 834 | (re-search-backward "^Index: \\(.+\\)" limit t))) |
| 833 | (list (match-string 1))) | 835 | (list (match-string 1))) |
| 834 | header-files | 836 | header-files |
| 837 | ;; this assumes that there are no spaces in filenames | ||
| 835 | (when (re-search-backward | 838 | (when (re-search-backward |
| 836 | "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" | 839 | "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" |
| 837 | nil t) | 840 | nil t) |
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 | ||