From f26547e320ac768f6806cd8c02184da9df8fe926 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Feb 2013 10:52:11 +0100 Subject: [PATCH 1/3] Fix false positives in `org-in-verbatim-emphasis' * lisp/org.el (org-in-verbatim-emphasis): Fix false positive when point is just after the closing emphasis marker. --- lisp/org.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 4c5aa2498..c306205bb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20733,7 +20733,10 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (defun org-in-verbatim-emphasis () (save-match-data - (and (org-in-regexp org-emph-re 2) (member (match-string 3) '("=" "~"))))) + (and (org-in-regexp org-emph-re 2) + (>= (point) (match-beginning 3)) + (<= (point) (match-end 4)) + (member (match-string 3) '("=" "~"))))) (defun org-goto-marker-or-bmk (marker &optional bookmark) "Go to MARKER, widen if necessary. When marker is not live, try BOOKMARK." From 309ccd96499a3b4f7ceba8a53994eb0f8b3e2ddd Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Feb 2013 11:03:56 +0100 Subject: [PATCH 2/3] ox-latex: Do not add optional section name when section is unnumbered * lisp/ox-latex.el (org-latex-headline): Do not add optional section name when section is unnumbered. --- lisp/ox-latex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 0ac251f2a..f1f528f3f 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1482,7 +1482,7 @@ holding contextual information." (org-export-data (org-export-get-optional-title headline info) info) (and (eq (plist-get info :with-tags) t) tags)))) - (if (and opt-title (string-match "\\`\\\\\\(.*?\\){" section-fmt)) + (if (and opt-title (string-match "\\`\\\\\\(.*?\\)[^*]{" section-fmt)) (format (replace-match "\\1[%s]" nil nil section-fmt 1) ;; Replace square brackets with parenthesis ;; since square brackets are not supported in From 87c553d268817b5bc917b5c15d2b9cc07d6fbb07 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Feb 2013 11:14:57 +0100 Subject: [PATCH 3/3] ox-latex: Fix 309ccd96499a3b4f7ceba8a53994eb0f8b3e2ddd * lisp/ox-latex.el (org-latex-headline): Fix regexp in commit 309ccd96499a3b4f7ceba8a53994eb0f8b3e2ddd. --- lisp/ox-latex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index f1f528f3f..3b0924c51 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1482,7 +1482,7 @@ holding contextual information." (org-export-data (org-export-get-optional-title headline info) info) (and (eq (plist-get info :with-tags) t) tags)))) - (if (and opt-title (string-match "\\`\\\\\\(.*?\\)[^*]{" section-fmt)) + (if (and opt-title (string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt)) (format (replace-match "\\1[%s]" nil nil section-fmt 1) ;; Replace square brackets with parenthesis ;; since square brackets are not supported in