From 662cb9868474b01da31413fd034111373e662edb Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 25 Feb 2013 11:12:55 +0100 Subject: [PATCH] org.el (org-sort-remove-invisible): Remove emphasis markers * org.el (org-sort-remove-invisible): Remove emphasis markers. --- lisp/org.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index af6499a5d..4cc10358a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8326,6 +8326,10 @@ Optional argument WITH-CASE means sort case-sensitively." (setq s (replace-match (if (match-end 2) (match-string 3 s) (match-string 1 s)) t t s))) + (let ((st (format " %s " s))) + (while (string-match org-emph-re st) + (setq st (replace-match (format " %s " (match-string 4 st)) t t st))) + (setq s (substring st 1 -1))) s) (defvar org-priority-regexp) ; defined later in the file