diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 1 | ||||
| -rw-r--r-- | lisp/help.el | 5 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 3 | ||||
| -rw-r--r-- | lisp/net/gnutls.el | 18 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 103 | ||||
| -rw-r--r-- | lisp/org/ob-plantuml.el | 3 | ||||
| -rw-r--r-- | lisp/org/ob.el | 20 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 4 | ||||
| -rw-r--r-- | lisp/org/org-bibtex.el | 5 | ||||
| -rw-r--r-- | lisp/org/org-exp-blocks.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-list.el | 66 | ||||
| -rw-r--r-- | lisp/org/org-lparse.el | 3 | ||||
| -rw-r--r-- | lisp/org/org-odt.el | 7 | ||||
| -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 | 104 |
18 files changed, 307 insertions, 115 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3ba1caf608..3a71d8edfa5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-05-27 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mail/sendmail.el (mail-yank-region): Recognize | ||
| 4 | rmail-yank-current-message in addition to insert-buffer. Fixes | ||
| 5 | mail-mode's "C-c C-r" that otherwise does nothing when invoked in | ||
| 6 | a *mail* buffer created through rmail-start-mail with sendmail as | ||
| 7 | mail-user-agent. | ||
| 8 | |||
| 9 | 2012-05-27 Chong Yidong <cyd@gnu.org> | ||
| 10 | |||
| 11 | * net/gnutls.el (gnutls-min-prime-bits): Improve docstring. | ||
| 12 | Default to 256 (Bug#11267). | ||
| 13 | |||
| 14 | * help.el (describe-mode): Doc fix. | ||
| 15 | |||
| 1 | 2012-05-26 Glenn Morris <rgm@gnu.org> | 16 | 2012-05-26 Glenn Morris <rgm@gnu.org> |
| 2 | 17 | ||
| 3 | * w32-fns.el (w32-init-info): Remove. | 18 | * w32-fns.el (w32-init-info): Remove. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 50ce9075dc0..3060c08ec51 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-05-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is | ||
| 4 | a string so that Gcc works (bug#11514). | ||
| 5 | |||
| 1 | 2012-05-26 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2012-05-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * legacy-gnus-agent.el (gnus-agent-unhook-expire-days): | 8 | * legacy-gnus-agent.el (gnus-agent-unhook-expire-days): |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 815bd9e44a6..c6d0c3213a0 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -490,6 +490,7 @@ instead." | |||
| 490 | (message-mail to subject other-headers continue | 490 | (message-mail to subject other-headers continue |
| 491 | nil yank-action send-actions return-action) | 491 | nil yank-action send-actions return-action) |
| 492 | (let ((buf (current-buffer)) | 492 | (let ((buf (current-buffer)) |
| 493 | (gnus-newsgroup-name (or gnus-newsgroup-name "")) | ||
| 493 | mail-buf) | 494 | mail-buf) |
| 494 | (gnus-setup-message 'message | 495 | (gnus-setup-message 'message |
| 495 | (message-mail to subject other-headers continue | 496 | (message-mail to subject other-headers continue |
diff --git a/lisp/help.el b/lisp/help.el index 1a6aa9d13d2..317d5cf8f46 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -783,7 +783,10 @@ descriptions of the minor modes, each on a separate page. | |||
| 783 | 783 | ||
| 784 | For this to work correctly for a minor mode, the mode's indicator | 784 | For this to work correctly for a minor mode, the mode's indicator |
| 785 | variable \(listed in `minor-mode-alist') must also be a function | 785 | variable \(listed in `minor-mode-alist') must also be a function |
| 786 | whose documentation describes the minor mode." | 786 | whose documentation describes the minor mode. |
| 787 | |||
| 788 | If called from Lisp with a non-nil BUFFER argument, display | ||
| 789 | documentation for the major and minor modes of that buffer." | ||
| 787 | (interactive "@") | 790 | (interactive "@") |
| 788 | (unless buffer (setq buffer (current-buffer))) | 791 | (unless buffer (setq buffer (current-buffer))) |
| 789 | (help-setup-xref (list #'describe-mode buffer) | 792 | (help-setup-xref (list #'describe-mode buffer) |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index cd3862985bd..3b262e3fb53 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1678,7 +1678,8 @@ Just \\[universal-argument] as argument means don't indent, insert no prefix, | |||
| 1678 | and don't delete any header fields." | 1678 | and don't delete any header fields." |
| 1679 | (interactive "P") | 1679 | (interactive "P") |
| 1680 | (and (consp mail-reply-action) | 1680 | (and (consp mail-reply-action) |
| 1681 | (eq (car mail-reply-action) 'insert-buffer) | 1681 | (memq (car mail-reply-action) |
| 1682 | '(rmail-yank-current-message insert-buffer)) | ||
| 1682 | (with-current-buffer (nth 1 mail-reply-action) | 1683 | (with-current-buffer (nth 1 mail-reply-action) |
| 1683 | (or (mark t) | 1684 | (or (mark t) |
| 1684 | (error "No mark set: %S" (current-buffer)))) | 1685 | (error "No mark set: %S" (current-buffer)))) |
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 1bc319c796e..a306384c775 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el | |||
| @@ -66,14 +66,16 @@ The files may not exist, in which case they will be ignored." | |||
| 66 | (repeat (file :tag "Bundle filename")))) | 66 | (repeat (file :tag "Bundle filename")))) |
| 67 | 67 | ||
| 68 | ;;;###autoload | 68 | ;;;###autoload |
| 69 | (defcustom gnutls-min-prime-bits nil | 69 | (defcustom gnutls-min-prime-bits 256 |
| 70 | "The minimum number of bits to be used in Diffie-Hellman key exchange. | 70 | ;; Several mail servers send fewer bits than the GnuTLS default. |
| 71 | 71 | ;; Currently, 256 appears to be a reasonable choice (Bug#11267). | |
| 72 | This sets the minimum accepted size of the key to be used in a | 72 | "Minimum number of prime bits accepted by GnuTLS for key exchange. |
| 73 | client-server handshake. If the server sends a prime with fewer than | 73 | During a Diffie-Hellman handshake, if the server sends a prime |
| 74 | the specified number of bits the handshake will fail. | 74 | number with fewer than this number of bits, the handshake is |
| 75 | 75 | rejected. \(The smaller the prime number, the less secure the | |
| 76 | A value of nil says to use the default gnutls value." | 76 | key exchange is against man-in-the-middle attacks.) |
| 77 | |||
| 78 | A value of nil says to use the default GnuTLS value." | ||
| 77 | :type '(choice (const :tag "Use default value" nil) | 79 | :type '(choice (const :tag "Use default value" nil) |
| 78 | (integer :tag "Number of bits" 512)) | 80 | (integer :tag "Number of bits" 512)) |
| 79 | :group 'gnutls) | 81 | :group 'gnutls) |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 8cdc90109b3..2d2bf699749 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,106 @@ | |||
| 1 | 2012-05-27 Mark Shoulson <mark@kli.org> (tiny change) | ||
| 2 | |||
| 3 | * org.el (org-fontify-entities): Fix bug: The entities \sup[123] and | ||
| 4 | \there4 were not "prettified" when org-pretty-entities was enabled. | ||
| 5 | |||
| 6 | 2012-05-27 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 7 | |||
| 8 | * org.el (org-font-lock-add-priority-faces): | ||
| 9 | Restrict priorities fontification to headlines and inlinetasks. | ||
| 10 | |||
| 11 | 2012-05-27 Jambunathan K <kjambunathan@gmail.com> | ||
| 12 | |||
| 13 | * org-odt.el (org-odt-init-outfile) | ||
| 14 | (org-odt-write-manifest-file): | ||
| 15 | Disable `nxml-auto-insert-xml-declaration-flag'. | ||
| 16 | |||
| 17 | * org-lparse.el (org-do-lparse): Don't trigger auto-mode processing. | ||
| 18 | |||
| 19 | 2012-05-27 Bastien Guerry <bzg@gnu.org> | ||
| 20 | |||
| 21 | * org.el (org-scan-tags): Fix bug when building the scanner regexp. | ||
| 22 | |||
| 23 | 2012-05-27 Eric Schulte <eric.schulte@gmx.com> | ||
| 24 | |||
| 25 | * ob.el (org-babel-capitalize-examplize-region-markers): | ||
| 26 | Controls the capitalization of begin and end example blocks. | ||
| 27 | (org-babel-examplize-region): | ||
| 28 | Optionally capitalize example block delimiters. | ||
| 29 | |||
| 30 | * ob-plantuml.el (org-babel-execute:plantuml): | ||
| 31 | Add a :java header argument to plantuml. | ||
| 32 | |||
| 33 | * org-exp-blocks.el (org-export-blocks-preprocess): | ||
| 34 | Even when the body of a block is not indented the boundary markers | ||
| 35 | should be indented to their original positions so things like list | ||
| 36 | indentation still work. | ||
| 37 | |||
| 38 | * ob.el (org-babel-parse-src-block-match): | ||
| 39 | Save match data during indentation check. | ||
| 40 | |||
| 41 | 2012-05-27 Bastien Guerry <bzg@gnu.org> | ||
| 42 | |||
| 43 | * org.el (org-scan-tags): Correctly match TODO keywords. | ||
| 44 | |||
| 45 | 2012-05-27 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 46 | |||
| 47 | * org-list.el (org-list-struct): Fix white spaces. | ||
| 48 | (org-list-swap-items, org-list-send-item): Fix visibility preservation. | ||
| 49 | |||
| 50 | * org-list.el (org-list-swap-items, org-list-send-item): | ||
| 51 | Preserve visibility when moving items. | ||
| 52 | |||
| 53 | 2012-05-27 Mark E. Shoulson <mark@kli.org> (tiny change) | ||
| 54 | |||
| 55 | * org.el (org-fontify-entities): Hide {} when prettifying entities. | ||
| 56 | |||
| 57 | 2012-05-27 Bastien Guerry <bzg@gnu.org> | ||
| 58 | |||
| 59 | * org.el (org-cycle-internal-global): Prevent the display of | ||
| 60 | messages when cycling from with a Gnus article buffer. | ||
| 61 | |||
| 62 | * org-table.el (org-table-time-seconds-to-string): | ||
| 63 | Fix bug about handling a negative duration value. | ||
| 64 | |||
| 65 | 2012-05-27 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 66 | |||
| 67 | * org.el (org-link-expand-abbrev): Fix docstring. | ||
| 68 | |||
| 69 | * org.el (org-translate-link): Fix bug. | ||
| 70 | |||
| 71 | 2012-05-27 Bastien Guerry <bzg@gnu.org> | ||
| 72 | |||
| 73 | * org-agenda.el (org-agenda-bulk-mark-regexp): | ||
| 74 | Fix bug when setting the number of marked entries. | ||
| 75 | |||
| 76 | * org-table.el (org-tbl-calc-modes): Rename from `org-table-modes'. | ||
| 77 | (org-set-calc-mode, org-table-eval-formula): Use it. | ||
| 78 | |||
| 79 | 2012-05-27 Eric Schulte <eric.schulte@gmx.com> | ||
| 80 | |||
| 81 | * ob.el (org-babel-find-named-result): | ||
| 82 | Fix bug finding empty named results. | ||
| 83 | |||
| 84 | 2012-05-27 Nicolas Goaziou <n.goaziou@gmail.com> | ||
| 85 | |||
| 86 | * org.el (org-set-regexps-and-options): | ||
| 87 | Fix `org-planning-or-clock-line-re' regexp. Indeed "\\>" will never | ||
| 88 | match since time keywords must end with colons, which are not word | ||
| 89 | constituents. | ||
| 90 | |||
| 91 | 2012-05-27 Bastien Guerry <bzg@gnu.org> | ||
| 92 | |||
| 93 | * org-ctags.el (org-ctags-new-topic-template): | ||
| 94 | Fix the option default value back again. | ||
| 95 | |||
| 96 | 2012-05-27 Eric Schulte <eric.schulte@gmx.com> | ||
| 97 | |||
| 98 | * org-bibtex.el (org-bibtex-export-to-kill-ring): | ||
| 99 | Don't rely on kill-new to return a string. | ||
| 100 | |||
| 101 | * org-bibtex.el (org-bibtex-headline): | ||
| 102 | Remove call to bibtex-reformat which often hangs. | ||
| 103 | |||
| 1 | 2012-04-27 Glenn Morris <rgm@gnu.org> | 104 | 2012-04-27 Glenn Morris <rgm@gnu.org> |
| 2 | 105 | ||
| 3 | * org-ctags.el (org-ctags-new-topic-template): | 106 | * org-ctags.el (org-ctags-new-topic-template): |
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index 55729eb4172..7da689393a3 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el | |||
| @@ -55,9 +55,10 @@ This function is called by `org-babel-execute-src-block'." | |||
| 55 | (error "plantuml requires a \":file\" header argument"))) | 55 | (error "plantuml requires a \":file\" header argument"))) |
| 56 | (cmdline (cdr (assoc :cmdline params))) | 56 | (cmdline (cdr (assoc :cmdline params))) |
| 57 | (in-file (org-babel-temp-file "plantuml-")) | 57 | (in-file (org-babel-temp-file "plantuml-")) |
| 58 | (java (or (cdr (assoc :java params)) "")) | ||
| 58 | (cmd (if (not org-plantuml-jar-path) | 59 | (cmd (if (not org-plantuml-jar-path) |
| 59 | (error "`org-plantuml-jar-path' is not set") | 60 | (error "`org-plantuml-jar-path' is not set") |
| 60 | (concat "java -jar " | 61 | (concat "java " java " -jar " |
| 61 | (shell-quote-argument | 62 | (shell-quote-argument |
| 62 | (expand-file-name org-plantuml-jar-path)) | 63 | (expand-file-name org-plantuml-jar-path)) |
| 63 | (if (string= (file-name-extension out-file) "svg") | 64 | (if (string= (file-name-extension out-file) "svg") |
diff --git a/lisp/org/ob.el b/lisp/org/ob.el index ac6de9f1bbf..05122487588 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el | |||
| @@ -1159,7 +1159,8 @@ may be specified in the properties of the current outline entry." | |||
| 1159 | (substring body 0 sub-length) | 1159 | (substring body 0 sub-length) |
| 1160 | (or body ""))))) | 1160 | (or body ""))))) |
| 1161 | (preserve-indentation (or org-src-preserve-indentation | 1161 | (preserve-indentation (or org-src-preserve-indentation |
| 1162 | (string-match "-i\\>" switches)))) | 1162 | (save-match-data |
| 1163 | (string-match "-i\\>" switches))))) | ||
| 1163 | (list lang | 1164 | (list lang |
| 1164 | ;; get block body less properties, protective commas, and indentation | 1165 | ;; get block body less properties, protective commas, and indentation |
| 1165 | (with-temp-buffer | 1166 | (with-temp-buffer |
| @@ -1498,7 +1499,7 @@ buffer or nil if no such result exists." | |||
| 1498 | (catch 'is-a-code-block | 1499 | (catch 'is-a-code-block |
| 1499 | (when (re-search-forward | 1500 | (when (re-search-forward |
| 1500 | (concat org-babel-result-regexp | 1501 | (concat org-babel-result-regexp |
| 1501 | "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]+") nil t) | 1502 | "[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]") nil t) |
| 1502 | (when (and (string= "name" (downcase (match-string 1))) | 1503 | (when (and (string= "name" (downcase (match-string 1))) |
| 1503 | (or (beginning-of-line 1) | 1504 | (or (beginning-of-line 1) |
| 1504 | (looking-at org-babel-src-block-regexp) | 1505 | (looking-at org-babel-src-block-regexp) |
| @@ -1957,11 +1958,16 @@ file's directory then expand relative links." | |||
| 1957 | (stringp (car result)) (stringp (cadr result))) | 1958 | (stringp (car result)) (stringp (cadr result))) |
| 1958 | (format "[[file:%s][%s]]" (car result) (cadr result)))))) | 1959 | (format "[[file:%s][%s]]" (car result) (cadr result)))))) |
| 1959 | 1960 | ||
| 1961 | (defvar org-babel-capitalize-examplize-region-markers nil | ||
| 1962 | "Make true to capitalize begin/end example markers inserted by code blocks.") | ||
| 1963 | |||
| 1960 | (defun org-babel-examplize-region (beg end &optional results-switches) | 1964 | (defun org-babel-examplize-region (beg end &optional results-switches) |
| 1961 | "Comment out region using the inline '==' or ': ' org example quote." | 1965 | "Comment out region using the inline '==' or ': ' org example quote." |
| 1962 | (interactive "*r") | 1966 | (interactive "*r") |
| 1963 | (flet ((chars-between (b e) | 1967 | (flet ((chars-between (b e) |
| 1964 | (not (string-match "^[\\s]*$" (buffer-substring b e))))) | 1968 | (not (string-match "^[\\s]*$" (buffer-substring b e)))) |
| 1969 | (maybe-cap (str) (if org-babel-capitalize-examplize-region-markers | ||
| 1970 | (upcase str) str))) | ||
| 1965 | (if (or (chars-between (save-excursion (goto-char beg) (point-at-bol)) beg) | 1971 | (if (or (chars-between (save-excursion (goto-char beg) (point-at-bol)) beg) |
| 1966 | (chars-between end (save-excursion (goto-char end) (point-at-eol)))) | 1972 | (chars-between end (save-excursion (goto-char end) (point-at-eol)))) |
| 1967 | (save-excursion | 1973 | (save-excursion |
| @@ -1978,10 +1984,12 @@ file's directory then expand relative links." | |||
| 1978 | (t | 1984 | (t |
| 1979 | (goto-char beg) | 1985 | (goto-char beg) |
| 1980 | (insert (if results-switches | 1986 | (insert (if results-switches |
| 1981 | (format "#+begin_example%s\n" results-switches) | 1987 | (format "%s%s\n" |
| 1982 | "#+begin_example\n")) | 1988 | (maybe-cap "#+begin_example") |
| 1989 | results-switches) | ||
| 1990 | (maybe-cap "#+begin_example\n"))) | ||
| 1983 | (if (markerp end) (goto-char end) (forward-char (- end beg))) | 1991 | (if (markerp end) (goto-char end) (forward-char (- end beg))) |
| 1984 | (insert "#+end_example\n")))))))) | 1992 | (insert (maybe-cap "#+end_example\n"))))))))) |
| 1985 | 1993 | ||
| 1986 | (defun org-babel-update-block-body (new-body) | 1994 | (defun org-babel-update-block-body (new-body) |
| 1987 | "Update the body of the current code block to NEW-BODY." | 1995 | "Update the body of the current code block to NEW-BODY." |
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-exp-blocks.el b/lisp/org/org-exp-blocks.el index 7d466cec65d..fbac6592090 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el | |||
| @@ -211,7 +211,13 @@ which defaults to the value of `org-export-blocks-witheld'." | |||
| 211 | (when replacement | 211 | (when replacement |
| 212 | (delete-region match-start match-end) | 212 | (delete-region match-start match-end) |
| 213 | (goto-char match-start) (insert replacement) | 213 | (goto-char match-start) (insert replacement) |
| 214 | (unless preserve-indent | 214 | (if preserve-indent |
| 215 | ;; indent only the code block markers | ||
| 216 | (save-excursion | ||
| 217 | (indent-line-to indentation) ; indent end_block | ||
| 218 | (goto-char match-start) | ||
| 219 | (indent-line-to indentation)) ; indent begin_block | ||
| 220 | ;; indent everything | ||
| 215 | (indent-code-rigidly match-start (point) indentation))))) | 221 | (indent-code-rigidly match-start (point) indentation))))) |
| 216 | ;; cleanup markers | 222 | ;; cleanup markers |
| 217 | (set-marker match-start nil) | 223 | (set-marker match-start nil) |
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-lparse.el b/lisp/org/org-lparse.el index c9669dd8ab4..9c3cd5b4811 100644 --- a/lisp/org/org-lparse.el +++ b/lisp/org/org-lparse.el | |||
| @@ -1111,9 +1111,6 @@ version." | |||
| 1111 | (unless body-only | 1111 | (unless body-only |
| 1112 | (org-lparse-end 'DOCUMENT-CONTENT)) | 1112 | (org-lparse-end 'DOCUMENT-CONTENT)) |
| 1113 | 1113 | ||
| 1114 | (unless (plist-get opt-plist :buffer-will-be-killed) | ||
| 1115 | (set-auto-mode t)) | ||
| 1116 | |||
| 1117 | (org-lparse-end 'EXPORT) | 1114 | (org-lparse-end 'EXPORT) |
| 1118 | 1115 | ||
| 1119 | ;; kill collection buffer | 1116 | ;; kill collection buffer |
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index 2e984a575bd..ca43d05bdbd 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el | |||
| @@ -2211,7 +2211,9 @@ captions on export.") | |||
| 2211 | (content-file (expand-file-name "content.xml" outdir))) | 2211 | (content-file (expand-file-name "content.xml" outdir))) |
| 2212 | 2212 | ||
| 2213 | ;; init conten.xml | 2213 | ;; init conten.xml |
| 2214 | (with-current-buffer (find-file-noselect content-file t)) | 2214 | (require 'nxml-mode) |
| 2215 | (let ((nxml-auto-insert-xml-declaration-flag nil)) | ||
| 2216 | (find-file-noselect content-file t)) | ||
| 2215 | 2217 | ||
| 2216 | ;; reset variables | 2218 | ;; reset variables |
| 2217 | (setq org-odt-manifest-file-entries nil | 2219 | (setq org-odt-manifest-file-entries nil |
| @@ -2320,7 +2322,8 @@ visually." | |||
| 2320 | (make-directory "META-INF") | 2322 | (make-directory "META-INF") |
| 2321 | (let ((manifest-file (expand-file-name "META-INF/manifest.xml"))) | 2323 | (let ((manifest-file (expand-file-name "META-INF/manifest.xml"))) |
| 2322 | (with-current-buffer | 2324 | (with-current-buffer |
| 2323 | (find-file-noselect manifest-file t) | 2325 | (let ((nxml-auto-insert-xml-declaration-flag nil)) |
| 2326 | (find-file-noselect manifest-file t)) | ||
| 2324 | (insert | 2327 | (insert |
| 2325 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | 2328 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?> |
| 2326 | <manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\" manifest:version=\"1.2\">\n") | 2329 | <manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\" manifest:version=\"1.2\">\n") |
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 419a1ffcaa4..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..972f7801afc 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.11 |
| 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.11" |
| 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 | "\\\\\\(there4\\|sup[123]\\|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)))) |
| @@ -5986,14 +5990,15 @@ When FACE-OR-COLOR is not a string, just return it." | |||
| 5986 | (defun org-font-lock-add-priority-faces (limit) | 5990 | (defun org-font-lock-add-priority-faces (limit) |
| 5987 | "Add the special priority faces." | 5991 | "Add the special priority faces." |
| 5988 | (while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t) | 5992 | (while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t) |
| 5989 | (add-text-properties | 5993 | (when (save-match-data (org-at-heading-p)) |
| 5990 | (match-beginning 0) (match-end 0) | 5994 | (add-text-properties |
| 5991 | (list 'face (or (org-face-from-face-or-color | 5995 | (match-beginning 0) (match-end 0) |
| 5992 | 'priority 'org-special-keyword | 5996 | (list 'face (or (org-face-from-face-or-color |
| 5993 | (cdr (assoc (char-after (match-beginning 1)) | 5997 | 'priority 'org-special-keyword |
| 5994 | org-priority-faces))) | 5998 | (cdr (assoc (char-after (match-beginning 1)) |
| 5995 | 'org-special-keyword) | 5999 | org-priority-faces))) |
| 5996 | 'font-lock-fontified t)))) | 6000 | 'org-special-keyword) |
| 6001 | 'font-lock-fontified t))))) | ||
| 5997 | 6002 | ||
| 5998 | (defun org-get-tag-face (kwd) | 6003 | (defun org-get-tag-face (kwd) |
| 5999 | "Get the right face for a TODO keyword KWD. | 6004 | "Get the right face for a TODO keyword KWD. |
| @@ -6255,34 +6260,36 @@ in special contexts. | |||
| 6255 | 6260 | ||
| 6256 | (defun org-cycle-internal-global () | 6261 | (defun org-cycle-internal-global () |
| 6257 | "Do the global cycling action." | 6262 | "Do the global cycling action." |
| 6258 | (cond | 6263 | ;; Hack to avoid display of messages for .org attachments in Gnus |
| 6259 | ((and (eq last-command this-command) | 6264 | (let ((ga (string-match "\\*fontification" (buffer-name)))) |
| 6260 | (eq org-cycle-global-status 'overview)) | 6265 | (cond |
| 6261 | ;; We just created the overview - now do table of contents | 6266 | ((and (eq last-command this-command) |
| 6262 | ;; This can be slow in very large buffers, so indicate action | 6267 | (eq org-cycle-global-status 'overview)) |
| 6263 | (run-hook-with-args 'org-pre-cycle-hook 'contents) | 6268 | ;; We just created the overview - now do table of contents |
| 6264 | (message "CONTENTS...") | 6269 | ;; This can be slow in very large buffers, so indicate action |
| 6265 | (org-content) | 6270 | (run-hook-with-args 'org-pre-cycle-hook 'contents) |
| 6266 | (message "CONTENTS...done") | 6271 | (unless ga (message "CONTENTS...")) |
| 6267 | (setq org-cycle-global-status 'contents) | 6272 | (org-content) |
| 6268 | (run-hook-with-args 'org-cycle-hook 'contents)) | 6273 | (unless ga (message "CONTENTS...done")) |
| 6269 | 6274 | (setq org-cycle-global-status 'contents) | |
| 6270 | ((and (eq last-command this-command) | 6275 | (run-hook-with-args 'org-cycle-hook 'contents)) |
| 6271 | (eq org-cycle-global-status 'contents)) | 6276 | |
| 6272 | ;; We just showed the table of contents - now show everything | 6277 | ((and (eq last-command this-command) |
| 6273 | (run-hook-with-args 'org-pre-cycle-hook 'all) | 6278 | (eq org-cycle-global-status 'contents)) |
| 6274 | (show-all) | 6279 | ;; We just showed the table of contents - now show everything |
| 6275 | (message "SHOW ALL") | 6280 | (run-hook-with-args 'org-pre-cycle-hook 'all) |
| 6276 | (setq org-cycle-global-status 'all) | 6281 | (show-all) |
| 6277 | (run-hook-with-args 'org-cycle-hook 'all)) | 6282 | (unless ga (message "SHOW ALL")) |
| 6283 | (setq org-cycle-global-status 'all) | ||
| 6284 | (run-hook-with-args 'org-cycle-hook 'all)) | ||
| 6278 | 6285 | ||
| 6279 | (t | 6286 | (t |
| 6280 | ;; Default action: go to overview | 6287 | ;; Default action: go to overview |
| 6281 | (run-hook-with-args 'org-pre-cycle-hook 'overview) | 6288 | (run-hook-with-args 'org-pre-cycle-hook 'overview) |
| 6282 | (org-overview) | 6289 | (org-overview) |
| 6283 | (message "OVERVIEW") | 6290 | (unless ga (message "OVERVIEW")) |
| 6284 | (setq org-cycle-global-status 'overview) | 6291 | (setq org-cycle-global-status 'overview) |
| 6285 | (run-hook-with-args 'org-cycle-hook 'overview)))) | 6292 | (run-hook-with-args 'org-cycle-hook 'overview))))) |
| 6286 | 6293 | ||
| 6287 | (defun org-cycle-internal-local () | 6294 | (defun org-cycle-internal-local () |
| 6288 | "Do the local cycling action." | 6295 | "Do the local cycling action." |
| @@ -8574,7 +8581,7 @@ call CMD." | |||
| 8574 | ;;; Link abbreviations | 8581 | ;;; Link abbreviations |
| 8575 | 8582 | ||
| 8576 | (defun org-link-expand-abbrev (link) | 8583 | (defun org-link-expand-abbrev (link) |
| 8577 | "Apply replacements as defined in `org-link-abbrev-alist." | 8584 | "Apply replacements as defined in `org-link-abbrev-alist'." |
| 8578 | (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link) | 8585 | (if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link) |
| 8579 | (let* ((key (match-string 1 link)) | 8586 | (let* ((key (match-string 1 link)) |
| 8580 | (as (or (assoc key org-link-abbrev-alist-local) | 8587 | (as (or (assoc key org-link-abbrev-alist-local) |
| @@ -9432,7 +9439,7 @@ If the link is in hidden text, expose it." | |||
| 9432 | (string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s)) | 9439 | (string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s)) |
| 9433 | (progn | 9440 | (progn |
| 9434 | (setq s (funcall org-link-translation-function | 9441 | (setq s (funcall org-link-translation-function |
| 9435 | (match-string 1) (match-string 2))) | 9442 | (match-string 1 s) (match-string 2 s))) |
| 9436 | (concat (car s) ":" (cdr s))) | 9443 | (concat (car s) ":" (cdr s))) |
| 9437 | s)) | 9444 | s)) |
| 9438 | 9445 | ||
| @@ -12822,8 +12829,7 @@ headlines matching this string." | |||
| 12822 | org-outline-regexp) | 12829 | org-outline-regexp) |
| 12823 | " *\\(\\<\\(" | 12830 | " *\\(\\<\\(" |
| 12824 | (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") | 12831 | (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") |
| 12825 | (org-re | 12832 | (org-re "\\)\\>\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) |
| 12826 | "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) | ||
| 12827 | (props (list 'face 'default | 12833 | (props (list 'face 'default |
| 12828 | 'done-face 'org-agenda-done | 12834 | 'done-face 'org-agenda-done |
| 12829 | 'undone-face 'default | 12835 | 'undone-face 'default |