diff options
author | Bastien Guerry <bzg@altern.org> | 2011-01-14 08:39:28 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-01-14 08:39:28 +0100 |
commit | 0bb05568452bdd0343ed32358f48ccd3b946983f (patch) | |
tree | c8756f353fd0eba3ba43ee7abffc54018bbe2e21 | |
parent | a379f9c6ad32d6cfc1907493b11687ee6aee6919 (diff) | |
parent | 163cd58ffd6461c98a96b1b63a3cf082b2825a52 (diff) | |
download | org-mode-0bb05568452bdd0343ed32358f48ccd3b946983f.tar.gz |
Merge branch 'master' of orgmode.org:org-mode
-rw-r--r-- | contrib/lisp/org-mime.el | 9 | ||||
-rw-r--r-- | lisp/ob-tangle.el | 30 | ||||
-rw-r--r-- | lisp/ob.el | 2 | ||||
-rw-r--r-- | lisp/org-gnus.el | 16 | ||||
-rw-r--r-- | lisp/org-html.el | 4 |
5 files changed, 33 insertions, 28 deletions
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el index 68a3498..83f4597 100644 --- a/contrib/lisp/org-mime.el +++ b/contrib/lisp/org-mime.el @@ -232,9 +232,9 @@ export that region, otherwise export the entire body." (run-hooks 'org-mime-send-subtree-hook) (let* ((file (buffer-file-name (current-buffer))) (subject (nth 4 (org-heading-components))) - (to (org-entry-get nil "MAIL_TO")) - (cc (org-entry-get nil "MAIL_CC")) - (bcc (org-entry-get nil "MAIL_BCC")) + (to (org-entry-get nil "MAIL_TO" org-use-property-inheritance)) + (cc (org-entry-get nil "MAIL_CC" org-use-property-inheritance)) + (bcc (org-entry-get nil "MAIL_BCC" org-use-property-inheritance)) (body (buffer-substring (save-excursion (goto-char (point-min)) (forward-line 1) @@ -311,6 +311,7 @@ export that region, otherwise export the entire body." exported to a org format or to the format specified by the MAIL_FMT property of the subtree." (interactive) - (org-mime-send-subtree (or (org-entry-get nil "MAIL_FMT") 'org))) + (org-mime-send-subtree + (or (org-entry-get nil "MAIL_FMT" org-use-property-inheritance) 'org))) (provide 'org-mime) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index c5ef2a1..0dbb621 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -393,7 +393,7 @@ form (insert-comment (org-fill-template org-babel-tangle-comment-format-end link-data)))))) -;; detangling functions +;; dangling functions (defvar org-bracket-link-analytic-regexp) (defun org-babel-detangle (&optional source-code-file) "Propagate changes in source file back original to Org-mode file. @@ -420,20 +420,24 @@ which enable the original code blocks to be found." "Jump from a tangled code file to the related Org-mode file." (interactive) (let ((mid (point)) - target-buffer target-char - start end link path block-name body) + start end done + target-buffer target-char link path block-name body) (save-window-excursion (save-excursion - (unless (and (re-search-backward org-bracket-link-analytic-regexp nil t) - (setq start (point-at-eol)) - (setq link (match-string 0)) - (setq path (match-string 3)) - (setq block-name (match-string 5)) - (re-search-forward - (concat " " (regexp-quote block-name) " ends here") nil t) - (setq end (point-at-bol)) - (< start mid) (< mid end)) - (error "not in tangled code")) + (while (and (re-search-backward org-bracket-link-analytic-regexp nil t) + (not ; ever wider searches until matching block comments + (and (setq start (point-at-eol)) + (setq link (match-string 0)) + (setq path (match-string 3)) + (setq block-name (match-string 5)) + (save-excursion + (save-match-data + (re-search-forward + (concat " " (regexp-quote block-name) + " ends here") nil t) + (setq end (point-at-bol)))))))) + (unless (and start (< start mid) (< mid end)) + (error "not in tangled code")) (setq body (org-babel-trim (buffer-substring start end)))) (when (string-match "::" path) (setq path (substring path 0 (match-beginning 0)))) @@ -1594,7 +1594,7 @@ file's directory then expand relative links." (if (not (org-babel-where-is-src-block-head)) (error "not in source block") (save-match-data - (replace-match (concat (org-babel-trim new-body) "\n") nil nil nil 5)) + (replace-match (concat (org-babel-trim new-body) "\n") nil t nil 5)) (indent-rigidly (match-beginning 5) (match-end 5) 2))) (defun org-babel-merge-params (&rest plists) diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index ae5dc52..e543f0e 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -153,15 +153,15 @@ If `org-store-link' was called with a prefix arg the meaning of (message-id (org-remove-angle-brackets (mail-header-id header))) (date (org-trim (mail-header-date header))) (date-ts (and date - (condition-case nil - (format-time-string - (org-time-stamp-format t) - (date-to-time date))))) + (ignore-errors + (format-time-string + (org-time-stamp-format t) + (date-to-time date))))) (date-ts-ia (and date - (condition-case nil - (format-time-string - (org-time-stamp-format t t) - (date-to-time date))))) + (ignore-errors + (format-time-string + (org-time-stamp-format t t) + (date-to-time date))))) (subject (copy-sequence (mail-header-subject header))) (to (cdr (assq 'To (mail-header-extra header)))) newsgroups x-no-archive desc link) diff --git a/lisp/org-html.el b/lisp/org-html.el index 312e716..9a5d225 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1308,8 +1308,6 @@ lang=\"%s\" xml:lang=\"%s\"> "@</a> ") t t line))))) - (setq line (org-html-handle-time-stamps line)) - ;; replace "&" by "&", "<" and ">" by "<" and ">" ;; handle @<..> HTML tags (replace "@>..<" by "<..>") ;; Also handle sub_superscripts and checkboxes @@ -1474,6 +1472,8 @@ lang=\"%s\" xml:lang=\"%s\"> (setq line (replace-match rpl t t line) start (+ start (length rpl)))) + (setq line (org-html-handle-time-stamps line)) + ;; TODO items (if (and (string-match org-todo-line-regexp line) (match-beginning 2)) |