diff options
| author | Bastien Guerry | 2012-05-16 19:33:50 +0200 |
|---|---|---|
| committer | Bastien Guerry | 2012-05-16 19:33:50 +0200 |
| commit | 8c8b834fa997dbfd1b87abc1368a4680d1833e15 (patch) | |
| tree | c0b64251aad5d535486ec064213263b064419cee | |
| parent | 4f32cc6c579a7cad630732643088e89ed3868b53 (diff) | |
| download | emacs-8c8b834fa997dbfd1b87abc1368a4680d1833e15.tar.gz emacs-8c8b834fa997dbfd1b87abc1368a4680d1833e15.zip | |
Merge Org 7.8.10 -- important bug fixes since Org 7.8.09.
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/org.texi | 10 | ||||
| -rw-r--r-- | etc/refcards/orgcard.pdf | bin | 118982 -> 118613 bytes | |||
| -rw-r--r-- | etc/refcards/orgcard.tex | 2 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 76 | ||||
| -rw-r--r-- | lisp/org/ob.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-bibtex.el | 5 | ||||
| -rw-r--r-- | lisp/org/org-list.el | 66 | ||||
| -rw-r--r-- | lisp/org/org-protocol.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-table.el | 50 | ||||
| -rw-r--r-- | lisp/org/org.el | 88 |
12 files changed, 219 insertions, 90 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 99c14897db0..7f29b930709 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.texi (Durations and time values): Fix typo. | ||
| 4 | |||
| 1 | 2012-05-12 Andreas Schwab <schwab@linux-m68k.org> | 5 | 2012-05-12 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 6 | ||
| 3 | * cc-mode.texi: Avoid space before macro in 4th argument of cross | 7 | * cc-mode.texi: Avoid space before macro in 4th argument of cross |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 775ff638eef..d4353e26eba 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | @setfilename ../../info/org | 4 | @setfilename ../../info/org |
| 5 | @settitle The Org Manual | 5 | @settitle The Org Manual |
| 6 | 6 | ||
| 7 | @set VERSION 7.8.09 | 7 | @set VERSION 7.8.10 |
| 8 | @set DATE April 2012 | 8 | @set DATE May 2012 |
| 9 | 9 | ||
| 10 | @c Use proper quote and backtick for code sections in PDF output | 10 | @c Use proper quote and backtick for code sections in PDF output |
| 11 | @c Cf. Texinfo manual 14.2 | 11 | @c Cf. Texinfo manual 14.2 |
| @@ -2625,7 +2625,7 @@ formulas or Elisp formulas: | |||
| 2625 | 2625 | ||
| 2626 | Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds | 2626 | Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds |
| 2627 | are optional. With the @code{T} flag, computed durations will be displayed | 2627 | are optional. With the @code{T} flag, computed durations will be displayed |
| 2628 | as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag, | 2628 | as @code{HH:MM:SS} (see the first formula above). With the @code{t} flag, |
| 2629 | computed durations will be displayed according to the value of the variable | 2629 | computed durations will be displayed according to the value of the variable |
| 2630 | @code{org-table-duration-custom-format}, which defaults to @code{'hours} and | 2630 | @code{org-table-duration-custom-format}, which defaults to @code{'hours} and |
| 2631 | will display the result as a fraction of hours (see the second formula in the | 2631 | will display the result as a fraction of hours (see the second formula in the |
| @@ -7900,9 +7900,9 @@ Interactively select another agenda view and append it to the current view. | |||
| 7900 | Delete other windows. | 7900 | Delete other windows. |
| 7901 | @c | 7901 | @c |
| 7902 | @orgcmdkskc{v d,d,org-agenda-day-view} | 7902 | @orgcmdkskc{v d,d,org-agenda-day-view} |
| 7903 | @xorgcmdkskc{v w,w,org-agenda-day-view} | 7903 | @xorgcmdkskc{v w,w,org-agenda-week-view} |
| 7904 | @xorgcmd{v m,org-agenda-month-view} | 7904 | @xorgcmd{v m,org-agenda-month-view} |
| 7905 | @xorgcmd{v y,org-agenda-month-year} | 7905 | @xorgcmd{v y,org-agenda-year-view} |
| 7906 | @xorgcmd{v SPC,org-agenda-reset-view} | 7906 | @xorgcmd{v SPC,org-agenda-reset-view} |
| 7907 | @vindex org-agenda-span | 7907 | @vindex org-agenda-span |
| 7908 | Switch to day/week/month/year view. When switching to day or week view, this | 7908 | Switch to day/week/month/year view. When switching to day or week view, this |
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf index 3bedb6f2cf5..44cc7bf89ae 100644 --- a/etc/refcards/orgcard.pdf +++ b/etc/refcards/orgcard.pdf | |||
| Binary files differ | |||
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index d06afca8083..6bebbaa9f61 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{7.8.09} | 2 | \def\orgversionnumber{7.8.10} |
| 3 | \def\versionyear{2012} % latest update | 3 | \def\versionyear{2012} % latest update |
| 4 | \def\year{2012} % latest copyright year | 4 | \def\year{2012} % latest copyright year |
| 5 | 5 | ||
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 1f4c1f90997..3839100ff4d 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,79 @@ | |||
| 1 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 2 | |||
| 3 | * org.el (org-scan-tags): Correctly match TODO keywords. | ||
| 4 | |||
| 5 | 2012-05-16 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 6 | |||
| 7 | * org-list.el (org-list-struct): Fix white spaces. | ||
| 8 | (org-list-swap-items, org-list-send-item): Fix visibility | ||
| 9 | preservation. | ||
| 10 | |||
| 11 | 2012-05-16 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 12 | |||
| 13 | * org-list.el (org-list-swap-items, org-list-send-item): Preserve | ||
| 14 | visibility when moving items. | ||
| 15 | |||
| 16 | 2012-05-16 Mark E. Shoulson <mark@kli.org> (tiny change) | ||
| 17 | |||
| 18 | * org.el (org-fontify-entities): Hide {} when prettifying | ||
| 19 | entities. | ||
| 20 | |||
| 21 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 22 | |||
| 23 | * org.el (org-cycle-internal-global): Prevent the display of | ||
| 24 | messages when cycling from with a Gnus article buffer. | ||
| 25 | |||
| 26 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 27 | |||
| 28 | * org-table.el (org-table-time-seconds-to-string): Fix bug about | ||
| 29 | handling a negative duration value. | ||
| 30 | |||
| 31 | 2012-05-16 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 32 | |||
| 33 | * org.el (org-link-expand-abbrev): Fix docstring. | ||
| 34 | |||
| 35 | 2012-05-16 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 36 | |||
| 37 | * org.el (org-translate-link): Fix bug. | ||
| 38 | |||
| 39 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 40 | |||
| 41 | * org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug when | ||
| 42 | setting the number of marked entries. | ||
| 43 | |||
| 44 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 45 | |||
| 46 | * org-table.el (org-tbl-calc-modes): Rename from | ||
| 47 | `org-table-modes'. | ||
| 48 | (org-set-calc-mode, org-table-eval-formula): Use it. | ||
| 49 | |||
| 50 | 2012-05-16 Eric Schulte <eric.schulte@gmx.com> | ||
| 51 | |||
| 52 | * ob.el (org-babel-find-named-result): Fix bug finding empty named | ||
| 53 | results. | ||
| 54 | |||
| 55 | 2012-05-16 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 56 | |||
| 57 | * org.el (org-set-regexps-and-options): Fix | ||
| 58 | `org-planning-or-clock-line-re' regexp. Indeed "\\>" will never | ||
| 59 | match since time keywords must end with colons, which are not word | ||
| 60 | constituent. | ||
| 61 | |||
| 62 | 2012-05-16 Bastien Guerry <bzg@gnu.org> | ||
| 63 | |||
| 64 | * org-ctags.el (org-ctags-new-topic-template): Fix the option | ||
| 65 | default value back again. | ||
| 66 | |||
| 67 | 2012-05-16 Eric Schulte <eric.schulte@gmx.com> | ||
| 68 | |||
| 69 | * org-bibtex.el (org-bibtex-export-to-kill-ring): Don't rely on | ||
| 70 | kill-new to return a string. | ||
| 71 | |||
| 72 | 2012-05-16 Eric Schulte <eric.schulte@gmx.com> | ||
| 73 | |||
| 74 | * org-bibtex.el (org-bibtex-headline): Remove call to | ||
| 75 | bibtex-reformat which often hangs. | ||
| 76 | |||
| 1 | 2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com> | 77 | 2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com> |
| 2 | 78 | ||
| 3 | * org-table.el (org-table-number-fraction): Fix typo. | 79 | * org-table.el (org-table-number-fraction): Fix typo. |
diff --git a/lisp/org/ob.el b/lisp/org/ob.el index ac6de9f1bbf..f3b7d6814bd 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el | |||
| @@ -1498,7 +1498,7 @@ buffer or nil if no such result exists." | |||
| 1498 | (catch 'is-a-code-block | 1498 | (catch 'is-a-code-block |
| 1499 | (when (re-search-forward | 1499 | (when (re-search-forward |
| 1500 | (concat org-babel-result-regexp | 1500 | (concat org-babel-result-regexp |
| 1501 | "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]+") nil t) | 1501 | "[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]") nil t) |
| 1502 | (when (and (string= "name" (downcase (match-string 1))) | 1502 | (when (and (string= "name" (downcase (match-string 1))) |
| 1503 | (or (beginning-of-line 1) | 1503 | (or (beginning-of-line 1) |
| 1504 | (looking-at org-babel-src-block-regexp) | 1504 | (looking-at org-babel-src-block-regexp) |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index ddb56ca4bac..367d8e84471 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -8315,13 +8315,13 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 8315 | (defun org-agenda-bulk-mark-regexp (regexp) | 8315 | (defun org-agenda-bulk-mark-regexp (regexp) |
| 8316 | "Mark entries match REGEXP." | 8316 | "Mark entries match REGEXP." |
| 8317 | (interactive "sMark entries matching regexp: ") | 8317 | (interactive "sMark entries matching regexp: ") |
| 8318 | (let (entries-marked) | 8318 | (let ((entries-marked 0)) |
| 8319 | (save-excursion | 8319 | (save-excursion |
| 8320 | (goto-char (point-min)) | 8320 | (goto-char (point-min)) |
| 8321 | (goto-char (next-single-property-change (point) 'txt)) | 8321 | (goto-char (next-single-property-change (point) 'txt)) |
| 8322 | (while (re-search-forward regexp nil t) | 8322 | (while (re-search-forward regexp nil t) |
| 8323 | (when (string-match regexp (get-text-property (point) 'txt)) | 8323 | (when (string-match regexp (get-text-property (point) 'txt)) |
| 8324 | (setq entries-marked (+ entries-marked 1)) | 8324 | (setq entries-marked (1+ entries-marked)) |
| 8325 | (call-interactively 'org-agenda-bulk-mark)))) | 8325 | (call-interactively 'org-agenda-bulk-mark)))) |
| 8326 | (if (not entries-marked) | 8326 | (if (not entries-marked) |
| 8327 | (message "No entry matching this regexp.")))) | 8327 | (message "No entry matching this regexp.")))) |
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 21e36a7c187..4c852fcb875 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el | |||
| @@ -369,7 +369,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." | |||
| 369 | (progn (goto-char (match-end 1)) (insert ", ")) | 369 | (progn (goto-char (match-end 1)) (insert ", ")) |
| 370 | (bibtex-make-field "keywords" t t)) | 370 | (bibtex-make-field "keywords" t t)) |
| 371 | (insert (mapconcat #'identity tags ", "))) | 371 | (insert (mapconcat #'identity tags ", "))) |
| 372 | (bibtex-reformat) (buffer-string))))))) | 372 | (buffer-string))))))) |
| 373 | 373 | ||
| 374 | (defun org-bibtex-ask (field) | 374 | (defun org-bibtex-ask (field) |
| 375 | (unless (assoc field org-bibtex-fields) | 375 | (unless (assoc field org-bibtex-fields) |
| @@ -661,7 +661,8 @@ This uses `bibtex-parse-entry'." | |||
| 661 | (defun org-bibtex-export-to-kill-ring () | 661 | (defun org-bibtex-export-to-kill-ring () |
| 662 | "Export current headline to kill ring as bibtex entry." | 662 | "Export current headline to kill ring as bibtex entry." |
| 663 | (interactive) | 663 | (interactive) |
| 664 | (kill-new (org-bibtex-headline))) | 664 | (let ((result (org-bibtex-headline))) |
| 665 | (kill-new result) result)) | ||
| 665 | 666 | ||
| 666 | (defun org-bibtex-search (string) | 667 | (defun org-bibtex-search (string) |
| 667 | "Search for bibliographical entries in agenda files. | 668 | "Search for bibliographical entries in agenda files. |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 4498280ac77..8d3948698fc 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -714,15 +714,15 @@ Assume point is at an item." | |||
| 714 | ;; equally indented than BEG-CELL's cdr. Also, store ending | 714 | ;; equally indented than BEG-CELL's cdr. Also, store ending |
| 715 | ;; position of items in END-LST-2. | 715 | ;; position of items in END-LST-2. |
| 716 | (catch 'exit | 716 | (catch 'exit |
| 717 | (while t | 717 | (while t |
| 718 | (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0) | 718 | (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0) |
| 719 | (org-get-indentation)))) | 719 | (org-get-indentation)))) |
| 720 | (cond | 720 | (cond |
| 721 | ((>= (point) lim-down) | 721 | ((>= (point) lim-down) |
| 722 | ;; At downward limit: this is de facto the end of the | 722 | ;; At downward limit: this is de facto the end of the |
| 723 | ;; list. Save point as an ending position, and jump to | 723 | ;; list. Save point as an ending position, and jump to |
| 724 | ;; part 3. | 724 | ;; part 3. |
| 725 | (throw 'exit | 725 | (throw 'exit |
| 726 | (push (cons 0 (funcall end-before-blank)) end-lst-2))) | 726 | (push (cons 0 (funcall end-before-blank)) end-lst-2))) |
| 727 | ;; At a verbatim block, move to its end. Point is at bol | 727 | ;; At a verbatim block, move to its end. Point is at bol |
| 728 | ;; and 'org-example property is set by whole lines: | 728 | ;; and 'org-example property is set by whole lines: |
| @@ -1071,8 +1071,10 @@ It determines the number of whitespaces to append by looking at | |||
| 1071 | 1071 | ||
| 1072 | (defun org-list-swap-items (beg-A beg-B struct) | 1072 | (defun org-list-swap-items (beg-A beg-B struct) |
| 1073 | "Swap item starting at BEG-A with item starting at BEG-B in STRUCT. | 1073 | "Swap item starting at BEG-A with item starting at BEG-B in STRUCT. |
| 1074 | Blank lines at the end of items are left in place. Return the | 1074 | |
| 1075 | new structure after the changes. | 1075 | Blank lines at the end of items are left in place. Item |
| 1076 | visibility is preserved. Return the new structure after the | ||
| 1077 | changes. | ||
| 1076 | 1078 | ||
| 1077 | Assume BEG-A is lesser than BEG-B and that BEG-A and BEG-B belong | 1079 | Assume BEG-A is lesser than BEG-B and that BEG-A and BEG-B belong |
| 1078 | to the same sub-list. | 1080 | to the same sub-list. |
| @@ -1089,7 +1091,17 @@ This function modifies STRUCT." | |||
| 1089 | (body-B (buffer-substring beg-B end-B-no-blank)) | 1091 | (body-B (buffer-substring beg-B end-B-no-blank)) |
| 1090 | (between-A-no-blank-and-B (buffer-substring end-A-no-blank beg-B)) | 1092 | (between-A-no-blank-and-B (buffer-substring end-A-no-blank beg-B)) |
| 1091 | (sub-A (cons beg-A (org-list-get-subtree beg-A struct))) | 1093 | (sub-A (cons beg-A (org-list-get-subtree beg-A struct))) |
| 1092 | (sub-B (cons beg-B (org-list-get-subtree beg-B struct)))) | 1094 | (sub-B (cons beg-B (org-list-get-subtree beg-B struct))) |
| 1095 | ;; Store overlays responsible for visibility status. We | ||
| 1096 | ;; also need to store their boundaries as they will be | ||
| 1097 | ;; removed from buffer. | ||
| 1098 | (overlays (cons | ||
| 1099 | (mapcar (lambda (ov) | ||
| 1100 | (list ov (overlay-start ov) (overlay-end ov))) | ||
| 1101 | (overlays-in beg-A end-A)) | ||
| 1102 | (mapcar (lambda (ov) | ||
| 1103 | (list ov (overlay-start ov) (overlay-end ov))) | ||
| 1104 | (overlays-in beg-B end-B))))) | ||
| 1093 | ;; 1. Move effectively items in buffer. | 1105 | ;; 1. Move effectively items in buffer. |
| 1094 | (goto-char beg-A) | 1106 | (goto-char beg-A) |
| 1095 | (delete-region beg-A end-B-no-blank) | 1107 | (delete-region beg-A end-B-no-blank) |
| @@ -1122,7 +1134,22 @@ This function modifies STRUCT." | |||
| 1122 | (setcar e (+ pos (- size-B size-A))) | 1134 | (setcar e (+ pos (- size-B size-A))) |
| 1123 | (setcar (nthcdr 6 e) (+ end-e (- size-B size-A)))))))) | 1135 | (setcar (nthcdr 6 e) (+ end-e (- size-B size-A)))))))) |
| 1124 | struct) | 1136 | struct) |
| 1125 | (sort struct (lambda (e1 e2) (< (car e1) (car e2))))))) | 1137 | (setq struct (sort struct (lambda (e1 e2) (< (car e1) (car e2))))) |
| 1138 | ;; Restore visibility status, by moving overlays to their new | ||
| 1139 | ;; position. | ||
| 1140 | (mapc (lambda (ov) | ||
| 1141 | (move-overlay | ||
| 1142 | (car ov) | ||
| 1143 | (+ (nth 1 ov) (- (+ beg-B (- size-B size-A)) beg-A)) | ||
| 1144 | (+ (nth 2 ov) (- (+ beg-B (- size-B size-A)) beg-A)))) | ||
| 1145 | (car overlays)) | ||
| 1146 | (mapc (lambda (ov) | ||
| 1147 | (move-overlay (car ov) | ||
| 1148 | (+ (nth 1 ov) (- beg-A beg-B)) | ||
| 1149 | (+ (nth 2 ov) (- beg-A beg-B)))) | ||
| 1150 | (cdr overlays)) | ||
| 1151 | ;; Return structure. | ||
| 1152 | struct))) | ||
| 1126 | 1153 | ||
| 1127 | (defun org-list-separating-blank-lines-number (pos struct prevs) | 1154 | (defun org-list-separating-blank-lines-number (pos struct prevs) |
| 1128 | "Return number of blank lines that should separate items in list. | 1155 | "Return number of blank lines that should separate items in list. |
| @@ -1340,8 +1367,8 @@ If DEST is a buffer position, the function will assume it points | |||
| 1340 | to another item in the same list as ITEM, and will move the | 1367 | to another item in the same list as ITEM, and will move the |
| 1341 | latter just before the former. | 1368 | latter just before the former. |
| 1342 | 1369 | ||
| 1343 | If DEST is `begin' \(respectively `end'\), ITEM will be moved at | 1370 | If DEST is `begin' (respectively `end'), ITEM will be moved at |
| 1344 | the beginning \(respectively end\) of the list it belongs to. | 1371 | the beginning (respectively end) of the list it belongs to. |
| 1345 | 1372 | ||
| 1346 | If DEST is a string like \"N\", where N is an integer, ITEM will | 1373 | If DEST is a string like \"N\", where N is an integer, ITEM will |
| 1347 | be moved at the Nth position in the list. | 1374 | be moved at the Nth position in the list. |
| @@ -1351,6 +1378,8 @@ added to the kill-ring. | |||
| 1351 | 1378 | ||
| 1352 | If DEST is `delete', ITEM will be deleted. | 1379 | If DEST is `delete', ITEM will be deleted. |
| 1353 | 1380 | ||
| 1381 | Visibility of item is preserved. | ||
| 1382 | |||
| 1354 | This function returns, destructively, the new list structure." | 1383 | This function returns, destructively, the new list structure." |
| 1355 | (let* ((prevs (org-list-prevs-alist struct)) | 1384 | (let* ((prevs (org-list-prevs-alist struct)) |
| 1356 | (item-end (org-list-get-item-end item struct)) | 1385 | (item-end (org-list-get-item-end item struct)) |
| @@ -1393,7 +1422,9 @@ This function returns, destructively, the new list structure." | |||
| 1393 | (org-list-get-last-item item struct prevs)) | 1422 | (org-list-get-last-item item struct prevs)) |
| 1394 | (point-at-eol))))) | 1423 | (point-at-eol))))) |
| 1395 | (t dest))) | 1424 | (t dest))) |
| 1396 | (org-M-RET-may-split-line nil)) | 1425 | (org-M-RET-may-split-line nil) |
| 1426 | ;; Store visibility. | ||
| 1427 | (visibility (overlays-in item item-end))) | ||
| 1397 | (cond | 1428 | (cond |
| 1398 | ((eq dest 'delete) (org-list-delete-item item struct)) | 1429 | ((eq dest 'delete) (org-list-delete-item item struct)) |
| 1399 | ((eq dest 'kill) | 1430 | ((eq dest 'kill) |
| @@ -1429,9 +1460,14 @@ This function returns, destructively, the new list structure." | |||
| 1429 | (+ end shift))))))) | 1460 | (+ end shift))))))) |
| 1430 | moved-items)) | 1461 | moved-items)) |
| 1431 | (lambda (e1 e2) (< (car e1) (car e2)))))) | 1462 | (lambda (e1 e2) (< (car e1) (car e2)))))) |
| 1432 | ;; 2. Eventually delete extra copy of the item and clean marker. | 1463 | ;; 2. Restore visibility. |
| 1433 | (prog1 | 1464 | (mapc (lambda (ov) |
| 1434 | (org-list-delete-item (marker-position item) struct) | 1465 | (move-overlay ov |
| 1466 | (+ (overlay-start ov) (- (point) item)) | ||
| 1467 | (+ (overlay-end ov) (- (point) item)))) | ||
| 1468 | visibility) | ||
| 1469 | ;; 3. Eventually delete extra copy of the item and clean marker. | ||
| 1470 | (prog1 (org-list-delete-item (marker-position item) struct) | ||
| 1435 | (move-marker item nil))) | 1471 | (move-marker item nil))) |
| 1436 | (t struct)))) | 1472 | (t struct)))) |
| 1437 | 1473 | ||
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 775f60990d0..74fc35f2db1 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -225,7 +225,7 @@ Consider using the interactive functions `org-protocol-create' and | |||
| 225 | :type 'alist) | 225 | :type 'alist) |
| 226 | 226 | ||
| 227 | (defcustom org-protocol-protocol-alist nil | 227 | (defcustom org-protocol-protocol-alist nil |
| 228 | "* Register custom handlers for org-protocol. | 228 | "Register custom handlers for org-protocol. |
| 229 | 229 | ||
| 230 | Each element of this list must be of the form: | 230 | Each element of this list must be of the form: |
| 231 | 231 | ||
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 37e5c4f91a6..e02062a2b93 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -2368,7 +2368,7 @@ of the new mark." | |||
| 2368 | (looking-at org-table-auto-recalculate-regexp)) | 2368 | (looking-at org-table-auto-recalculate-regexp)) |
| 2369 | (org-table-recalculate) t)) | 2369 | (org-table-recalculate) t)) |
| 2370 | 2370 | ||
| 2371 | (defvar org-table-modes) | 2371 | (defvar org-tbl-calc-modes) ;; Dynamically bound in `org-table-eval-formula' |
| 2372 | (defsubst org-set-calc-mode (var &optional value) | 2372 | (defsubst org-set-calc-mode (var &optional value) |
| 2373 | (if (stringp var) | 2373 | (if (stringp var) |
| 2374 | (setq var (assoc var '(("D" calc-angle-mode deg) | 2374 | (setq var (assoc var '(("D" calc-angle-mode deg) |
| @@ -2376,10 +2376,10 @@ of the new mark." | |||
| 2376 | ("F" calc-prefer-frac t) | 2376 | ("F" calc-prefer-frac t) |
| 2377 | ("S" calc-symbolic-mode t))) | 2377 | ("S" calc-symbolic-mode t))) |
| 2378 | value (nth 2 var) var (nth 1 var))) | 2378 | value (nth 2 var) var (nth 1 var))) |
| 2379 | (if (memq var org-table-modes) | 2379 | (if (memq var org-tbl-calc-modes) |
| 2380 | (setcar (cdr (memq var org-table-modes)) value) | 2380 | (setcar (cdr (memq var org-tbl-calc-modes)) value) |
| 2381 | (cons var (cons value org-table-modes))) | 2381 | (cons var (cons value org-tbl-calc-modes))) |
| 2382 | org-table-modes) | 2382 | org-tbl-calc-modes) |
| 2383 | 2383 | ||
| 2384 | (defun org-table-eval-formula (&optional arg equation | 2384 | (defun org-table-eval-formula (&optional arg equation |
| 2385 | suppress-align suppress-const | 2385 | suppress-align suppress-const |
| @@ -2437,7 +2437,7 @@ not overwrite the stored one." | |||
| 2437 | equation | 2437 | equation |
| 2438 | (org-table-get-formula equation (equal arg '(4))))) | 2438 | (org-table-get-formula equation (equal arg '(4))))) |
| 2439 | (n0 (org-table-current-column)) | 2439 | (n0 (org-table-current-column)) |
| 2440 | (modes (copy-sequence org-calc-default-modes)) | 2440 | (org-tbl-calc-modes (copy-sequence org-calc-default-modes)) |
| 2441 | (numbers nil) ; was a variable, now fixed default | 2441 | (numbers nil) ; was a variable, now fixed default |
| 2442 | (keep-empty nil) | 2442 | (keep-empty nil) |
| 2443 | n form form0 formrpl formrg bw fmt x ev orig c lispp literal | 2443 | n form form0 formrpl formrg bw fmt x ev orig c lispp literal |
| @@ -2453,12 +2453,13 @@ not overwrite the stored one." | |||
| 2453 | (setq c (string-to-char (match-string 1 fmt)) | 2453 | (setq c (string-to-char (match-string 1 fmt)) |
| 2454 | n (string-to-number (match-string 2 fmt))) | 2454 | n (string-to-number (match-string 2 fmt))) |
| 2455 | (if (= c ?p) | 2455 | (if (= c ?p) |
| 2456 | (setq modes (org-set-calc-mode 'calc-internal-prec n)) | 2456 | (setq org-tbl-calc-modes (org-set-calc-mode 'calc-internal-prec n)) |
| 2457 | (setq modes (org-set-calc-mode | 2457 | (setq org-tbl-calc-modes |
| 2458 | 'calc-float-format | 2458 | (org-set-calc-mode |
| 2459 | (list (cdr (assoc c '((?n . float) (?f . fix) | 2459 | 'calc-float-format |
| 2460 | (?s . sci) (?e . eng)))) | 2460 | (list (cdr (assoc c '((?n . float) (?f . fix) |
| 2461 | n)))) | 2461 | (?s . sci) (?e . eng)))) |
| 2462 | n)))) | ||
| 2462 | (setq fmt (replace-match "" t t fmt))) | 2463 | (setq fmt (replace-match "" t t fmt))) |
| 2463 | (if (string-match "T" fmt) | 2464 | (if (string-match "T" fmt) |
| 2464 | (setq duration t numbers t | 2465 | (setq duration t numbers t |
| @@ -2479,7 +2480,7 @@ not overwrite the stored one." | |||
| 2479 | (setq keep-empty t | 2480 | (setq keep-empty t |
| 2480 | fmt (replace-match "" t t fmt))) | 2481 | fmt (replace-match "" t t fmt))) |
| 2481 | (while (string-match "[DRFS]" fmt) | 2482 | (while (string-match "[DRFS]" fmt) |
| 2482 | (setq modes (org-set-calc-mode (match-string 0 fmt))) | 2483 | (setq org-tbl-calc-modes (org-set-calc-mode (match-string 0 fmt))) |
| 2483 | (setq fmt (replace-match "" t t fmt))) | 2484 | (setq fmt (replace-match "" t t fmt))) |
| 2484 | (unless (string-match "\\S-" fmt) | 2485 | (unless (string-match "\\S-" fmt) |
| 2485 | (setq fmt nil)))) | 2486 | (setq fmt nil)))) |
| @@ -2588,7 +2589,7 @@ not overwrite the stored one." | |||
| 2588 | duration-output-format) ev)) | 2589 | duration-output-format) ev)) |
| 2589 | (or (fboundp 'calc-eval) | 2590 | (or (fboundp 'calc-eval) |
| 2590 | (error "Calc does not seem to be installed, and is needed to evaluate the formula")) | 2591 | (error "Calc does not seem to be installed, and is needed to evaluate the formula")) |
| 2591 | (setq ev (calc-eval (cons form modes) (if numbers 'num)) | 2592 | (setq ev (calc-eval (cons form org-tbl-calc-modes) (if numbers 'num)) |
| 2592 | ev (if duration (org-table-time-seconds-to-string | 2593 | ev (if duration (org-table-time-seconds-to-string |
| 2593 | (string-to-number ev) | 2594 | (string-to-number ev) |
| 2594 | duration-output-format) ev))) | 2595 | duration-output-format) ev))) |
| @@ -3309,15 +3310,18 @@ If S is a string representing a number, keep this number." | |||
| 3309 | "Convert a number of seconds to a time string. | 3310 | "Convert a number of seconds to a time string. |
| 3310 | If OUTPUT-FORMAT is non-nil, return a number of days, hours, | 3311 | If OUTPUT-FORMAT is non-nil, return a number of days, hours, |
| 3311 | minutes or seconds." | 3312 | minutes or seconds." |
| 3312 | (cond ((eq output-format 'days) | 3313 | (let* ((secs0 (abs secs)) |
| 3313 | (format "%.3f" (/ (float secs) 86400))) | 3314 | (res |
| 3314 | ((eq output-format 'hours) | 3315 | (cond ((eq output-format 'days) |
| 3315 | (format "%.2f" (/ (float secs) 3600))) | 3316 | (format "%.3f" (/ (float secs0) 86400))) |
| 3316 | ((eq output-format 'minutes) | 3317 | ((eq output-format 'hours) |
| 3317 | (format "%.1f" (/ (float secs) 60))) | 3318 | (format "%.2f" (/ (float secs0) 3600))) |
| 3318 | ((eq output-format 'seconds) | 3319 | ((eq output-format 'minutes) |
| 3319 | (format "%d" secs)) | 3320 | (format "%.1f" (/ (float secs0) 60))) |
| 3320 | (t (org-format-seconds "%.2h:%.2m:%.2s" secs)))) | 3321 | ((eq output-format 'seconds) |
| 3322 | (format "%d" secs0)) | ||
| 3323 | (t (org-format-seconds "%.2h:%.2m:%.2s" secs0))))) | ||
| 3324 | (if (< secs 0) (concat "-" res) res))) | ||
| 3321 | 3325 | ||
| 3322 | (defun org-table-fedit-convert-buffer (function) | 3326 | (defun org-table-fedit-convert-buffer (function) |
| 3323 | "Convert all references in this buffer, using FUNCTION." | 3327 | "Convert all references in this buffer, using FUNCTION." |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 838a9a18ad4..4710bd5bd86 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Maintainer: Bastien Guerry <bzg at gnu dot org> | 6 | ;; Maintainer: Bastien Guerry <bzg at gnu dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 7.8.09 | 9 | ;; Version: 7.8.10 |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -206,7 +206,7 @@ identifier." | |||
| 206 | 206 | ||
| 207 | ;;; Version | 207 | ;;; Version |
| 208 | 208 | ||
| 209 | (defconst org-version "7.8.09" | 209 | (defconst org-version "7.8.10" |
| 210 | "The version number of the file org.el.") | 210 | "The version number of the file org.el.") |
| 211 | 211 | ||
| 212 | ;;;###autoload | 212 | ;;;###autoload |
| @@ -4789,10 +4789,11 @@ but the stars and the body are.") | |||
| 4789 | "\\|" org-clock-string "\\)\\)?" | 4789 | "\\|" org-clock-string "\\)\\)?" |
| 4790 | " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)") | 4790 | " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)") |
| 4791 | org-planning-or-clock-line-re | 4791 | org-planning-or-clock-line-re |
| 4792 | (concat "\\(?:^[ \t]*\\(" org-scheduled-string | 4792 | (concat "^[ \t]*\\(" |
| 4793 | "\\|" org-deadline-string | 4793 | org-scheduled-string "\\|" |
| 4794 | "\\|" org-closed-string "\\|" org-clock-string | 4794 | org-deadline-string "\\|" |
| 4795 | "\\)\\>\\)") | 4795 | org-closed-string "\\|" |
| 4796 | org-clock-string "\\)") | ||
| 4796 | org-all-time-keywords | 4797 | org-all-time-keywords |
| 4797 | (mapcar (lambda (w) (substring w 0 -1)) | 4798 | (mapcar (lambda (w) (substring w 0 -1)) |
| 4798 | (list org-scheduled-string org-deadline-string | 4799 | (list org-scheduled-string org-deadline-string |
| @@ -5916,16 +5917,19 @@ needs to be inserted at a specific position in the font-lock sequence.") | |||
| 5916 | (when org-pretty-entities | 5917 | (when org-pretty-entities |
| 5917 | (catch 'match | 5918 | (catch 'match |
| 5918 | (while (re-search-forward | 5919 | (while (re-search-forward |
| 5919 | "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)" | 5920 | "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)" |
| 5920 | limit t) | 5921 | limit t) |
| 5921 | (if (and (not (org-in-indented-comment-line)) | 5922 | (if (and (not (org-in-indented-comment-line)) |
| 5922 | (setq ee (org-entity-get (match-string 1))) | 5923 | (setq ee (org-entity-get (match-string 1))) |
| 5923 | (= (length (nth 6 ee)) 1)) | 5924 | (= (length (nth 6 ee)) 1)) |
| 5924 | (progn | 5925 | (let* |
| 5926 | ((end (if (equal (match-string 2) "{}") | ||
| 5927 | (match-end 2) | ||
| 5928 | (match-end 1)))) | ||
| 5925 | (add-text-properties | 5929 | (add-text-properties |
| 5926 | (match-beginning 0) (match-end 1) | 5930 | (match-beginning 0) end |
| 5927 | (list 'font-lock-fontified t)) | 5931 | (list 'font-lock-fontified t)) |
| 5928 | (compose-region (match-beginning 0) (match-end 1) | 5932 | (compose-region (match-beginning 0) end |
| 5929 | (nth 6 ee) nil) | 5933 | (nth 6 ee) nil) |
| 5930 | (backward-char 1) | 5934 | (backward-char 1) |
| 5931 | (throw 'match t)))) | 5935 | (throw 'match t)))) |
| @@ -6255,34 +6259,36 @@ in special contexts. | |||
| 6255 | 6259 | ||
| 6256 | (defun org-cycle-internal-global () | 6260 | (defun org-cycle-internal-global () |
| 6257 | "Do the global cycling action." | 6261 | "Do the global cycling action." |
| 6258 | (cond | 6262 | ;; Hack to avoid display of messages for .org attachments in Gnus |
| 6259 | ((and (eq last-command this-command) | 6263 | (let ((ga (string-match "\\*fontification" (buffer-name)))) |
| 6260 | (eq org-cycle-global-status 'overview)) | 6264 | (cond |
| 6261 | ;; We just created the overview - now do table of contents | 6265 | ((and (eq last-command this-command) |
| 6262 | ;; This can be slow in very large buffers, so indicate action | 6266 | (eq org-cycle-global-status 'overview)) |
| 6263 | (run-hook-with-args 'org-pre-cycle-hook 'contents) | 6267 | ;; We just created the overview - now do table of contents |
| 6264 | (message "CONTENTS...") | 6268 | ;; This can be slow in very large buffers, so indicate action |
| 6265 | (org-content) | 6269 | (run-hook-with-args 'org-pre-cycle-hook 'contents) |
| 6266 | (message "CONTENTS...done") | 6270 | (unless ga (message "CONTENTS...")) |
| 6267 | (setq org-cycle-global-status 'contents) | 6271 | (org-content) |
| 6268 | (run-hook-with-args 'org-cycle-hook 'contents)) | 6272 | (unless ga (message "CONTENTS...done")) |
| 6269 | 6273 | (setq org-cycle-global-status 'contents) | |
| 6270 | ((and (eq last-command this-command) | 6274 | (run-hook-with-args 'org-cycle-hook 'contents)) |
| 6271 | (eq org-cycle-global-status 'contents)) | 6275 | |
| 6272 | ;; We just showed the table of contents - now show everything | 6276 | ((and (eq last-command this-command) |
| 6273 | (run-hook-with-args 'org-pre-cycle-hook 'all) | 6277 | (eq org-cycle-global-status 'contents)) |
| 6274 | (show-all) | 6278 | ;; We just showed the table of contents - now show everything |
| 6275 | (message "SHOW ALL") | 6279 | (run-hook-with-args 'org-pre-cycle-hook 'all) |
| 6276 | (setq org-cycle-global-status 'all) | 6280 | (show-all) |
| 6277 | (run-hook-with-args 'org-cycle-hook 'all)) | 6281 | (unless ga (message "SHOW ALL")) |
| 6282 | (setq org-cycle-global-status 'all) | ||
| 6283 | (run-hook-with-args 'org-cycle-hook 'all)) | ||
| 6278 | 6284 | ||
| 6279 | (t | 6285 | (t |
| 6280 | ;; Default action: go to overview | 6286 | ;; Default action: go to overview |
| 6281 | (run-hook-with-args 'org-pre-cycle-hook 'overview) | 6287 | (run-hook-with-args 'org-pre-cycle-hook 'overview) |
| 6282 | (org-overview) | 6288 | (org-overview) |
| 6283 | (message "OVERVIEW") | 6289 | (unless ga (message "OVERVIEW")) |
| 6284 | (setq org-cycle-global-status 'overview) | 6290 | (setq org-cycle-global-status 'overview) |
| 6285 | (run-hook-with-args 'org-cycle-hook 'overview)))) | 6291 | (run-hook-with-args 'org-cycle-hook 'overview))))) |
| 6286 | 6292 | ||
| 6287 | (defun org-cycle-internal-local () | 6293 | (defun org-cycle-internal-local () |
| 6288 | "Do the local cycling action." | 6294 | "Do the local cycling action." |
| @@ -8574,7 +8580,7 @@ call CMD." | |||
| 8574 | ;;; Link abbreviations | 8580 | ;;; Link abbreviations |
| 8575 | 8581 | ||
| 8576 | (defun org-link-expand-abbrev (link) | 8582 | (defun org-link-expand-abbrev (link) |
| 8577 | "Apply replacements as defined in `org-link-abbrev-alist." | 8583 | "Apply replacements as defined in `org-link-abbrev-alist'." |
| 8578 | (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link) | 8584 | (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link) |
| 8579 | (let* ((key (match-string 1 link)) | 8585 | (let* ((key (match-string 1 link)) |
| 8580 | (as (or (assoc key org-link-abbrev-alist-local) | 8586 | (as (or (assoc key org-link-abbrev-alist-local) |
| @@ -9432,7 +9438,7 @@ If the link is in hidden text, expose it." | |||
| 9432 | (string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s)) | 9438 | (string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s)) |
| 9433 | (progn | 9439 | (progn |
| 9434 | (setq s (funcall org-link-translation-function | 9440 | (setq s (funcall org-link-translation-function |
| 9435 | (match-string 1) (match-string 2))) | 9441 | (match-string 1 s) (match-string 2 s))) |
| 9436 | (concat (car s) ":" (cdr s))) | 9442 | (concat (car s) ":" (cdr s))) |
| 9437 | s)) | 9443 | s)) |
| 9438 | 9444 | ||
| @@ -12823,7 +12829,9 @@ headlines matching this string." | |||
| 12823 | " *\\(\\<\\(" | 12829 | " *\\(\\<\\(" |
| 12824 | (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") | 12830 | (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") |
| 12825 | (org-re | 12831 | (org-re |
| 12826 | "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) | 12832 | (if todo-only |
| 12833 | "\\>\\)\\)[ \t]+\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$" | ||
| 12834 | "\\>\\)\\)? *\\([^ ].*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))) | ||
| 12827 | (props (list 'face 'default | 12835 | (props (list 'face 'default |
| 12828 | 'done-face 'org-agenda-done | 12836 | 'done-face 'org-agenda-done |
| 12829 | 'undone-face 'default | 12837 | 'undone-face 'default |