Browse Source

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.
Bastien Guerry 7 years ago
parent
commit
3c71ab34dd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
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)