소스 검색

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 14 년 전
부모
커밋
0bb0556845
5개의 변경된 파일33개의 추가작업 그리고 28개의 파일을 삭제
  1. 5 4
      contrib/lisp/org-mime.el
  2. 17 13
      lisp/ob-tangle.el
  3. 1 1
      lisp/ob.el
  4. 8 8
      lisp/org-gnus.el
  5. 2 2
      lisp/org-html.el

+ 5 - 4
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)

+ 17 - 13
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))))

+ 1 - 1
lisp/ob.el

@@ -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)

+ 8 - 8
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)

+ 2 - 2
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 "&amp;", "<" and ">" by "&lt;" and "&gt;"
 	  ;; handle @<..> HTML tags (replace "@&gt;..&lt;" 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))