summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-01-30 11:59:25 +0100
committerBastien Guerry <bzg@altern.org>2014-01-30 11:59:25 +0100
commit3c71ab34dd4d8cc0706246383afc9af432dc4d1f (patch)
tree2b150fed54872ae3ea697c4e40300dd3010ea128
parentca69fdd88467cb65859c497770e00ebc717c9564 (diff)
downloadorg-mode-3c71ab34dd4d8cc0706246383afc9af432dc4d1f.tar.gz
org.el (org-sort-entries): Restore the point location when there is nothing to sort
* org.el (org-sort-entries): Restore the point location when there is nothing to sort.
-rw-r--r--lisp/org.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index e607235..ded2dc7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8637,7 +8637,7 @@ links."
(show-all)))
(setq beg (point))
- (if (>= beg end) (user-error "Nothing to sort"))
+ (when (>= beg end) (goto-char start) (user-error "Nothing to sort"))
(looking-at "\\(\\*+\\)")
(setq stars (match-string 1)