0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:37:52 +00:00

Fix sorting with a bold emphasis at beginning of line

* lisp/org.el (org-sort-entries): Fix sorting with a bold emphasis at bol
This commit is contained in:
Carsten Dominik 2011-01-11 20:34:08 +01:00
parent bff981d23f
commit 378beac762

View file

@ -7744,7 +7744,7 @@ WITH-CASE, the sorting considers case as well."
(looking-at "\\(\\*+\\)")
(setq stars (match-string 1)
re (concat "^" (regexp-quote stars) " +")
re2 (concat "^" (regexp-quote (substring stars 0 -1)) "[^*]")
re2 (concat "^" (regexp-quote (substring stars 0 -1)) "[ \t\n]")
txt (buffer-substring beg end))
(if (not (equal (substring txt -1) "\n")) (setq txt (concat txt "\n")))
(if (and (not (equal stars "*")) (string-match re2 txt))