summaryrefslogtreecommitdiff
path: root/dotfiles/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.emacs.d/init.el')
-rw-r--r--dotfiles/.emacs.d/init.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el
index 6311ecd..822961c 100644
--- a/dotfiles/.emacs.d/init.el
+++ b/dotfiles/.emacs.d/init.el
@@ -356,8 +356,14 @@ indentation."
(defun org-sort-by-priority-and-todo ()
"Sort org entries first by priority, and then by TODO status."
(interactive)
- (org-sort-entries nil ?p)
- (org-sort-entries nil ?o))
+ (push-mark)
+ (push-mark (point-max) nil t)
+ (lexical-let ((p (point)))
+ (goto-char (point-min))
+ (org-sort-entries nil ?p)
+ (org-sort-entries nil ?o)
+ (goto-char p))
+ (pop-mark))
(add-hook 'org-mode-hook
(lambda ()