Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
Don't sort if no headlines available
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfochrist committed Apr 9, 2015
1 parent f3464e1 commit d366398
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions interleave.el
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,16 @@ of .pdf)."
(with-current-buffer *interleave--org-buffer*
(widen)
(goto-char (point-min))
(interleave--sort-notes interleave--sort-order)
(org-overview)
(when (interleave--headlines-available-p)
(interleave--sort-notes interleave--sort-order)
(org-overview))
(interleave 0))
(interleave--pdf-kill-proc-and-buffer))

(defun interleave--headlines-available-p ()
(save-excursion
(re-search-forward "^\* .*" nil t)))

(defcustom interleave--sort-order 'asc
"Specifiy the notes' sort order in the notes buffer.
Expand Down

0 comments on commit d366398

Please sign in to comment.