From 2fd696716a9411793dbd2e4916d7d05695111945 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 19 Aug 2012 15:51:55 +0200 Subject: [PATCH 1/2] Forgot a `save-excursion' * lisp/org.el (org-fill-paragraph): Add a `save-excursion' to avoid returning funny results. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 5e7807d43..163fe703d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21072,7 +21072,7 @@ a footnote definition, try to fill the first paragraph within." ;; in current paragraph nor text before message ;; body. ((derived-mode-p 'message-mode) - (let ((body-start (message-goto-body))) + (let ((body-start (save-excursion (message-goto-body)))) (when body-start (setq beg (max body-start beg)))) (when (save-excursion (re-search-forward From c81bcccbf324647d9f35552b2b45e8cd7a534a11 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 19 Aug 2012 15:59:24 +0200 Subject: [PATCH 2/2] org-md: Fix export of paragraph starting with an hash sign * contrib/lisp/org-md.el (org-md-paragraph): Fix export of paragraph starting with an hash sign. --- contrib/lisp/org-md.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-md.el b/contrib/lisp/org-md.el index 2fb417288..4579ca31e 100644 --- a/contrib/lisp/org-md.el +++ b/contrib/lisp/org-md.el @@ -334,7 +334,7 @@ a communication channel." (let ((first-object (car (org-element-contents paragraph)))) ;; If paragraph starts with a #, protect it. (if (and (stringp first-object) (string-match "\\`#" first-object)) - (replace-match "\\#" nil t first-object) + (replace-regexp-in-string "\\`#" "\\#" contents nil t) contents)))