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

Commit

Permalink
Ask for pdf-file-name if #+interleave_pdf is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfochrist committed Apr 9, 2015
1 parent 44c098a commit f3464e1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions interleave.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ SPLIT-WINDOW is a function that actually splits the window, so it must be either
(progn
(delete-other-windows)
(funcall split-window)
(find-file (expand-file-name (interleave--find-pdf-path buf)))
(interleave-pdf-mode 1))
(find-file (expand-file-name (interleave--find-pdf-path buf))))
('error
(message "Please specify PDF file with #+INTERLEAVE_PDF document property.")
(interleave--quit)))))
(let ((pdf-file-name
(read-file-name "No #+INTERLEAVE_PDF property found. Please specify path: " "~/")))
(find-file (expand-file-name pdf-file-name))
(with-current-buffer buf
(insert "#+INTERLEAVE_PDF: " pdf-file-name)))))
(interleave-pdf-mode 1)))

(defun interleave--go-to-page-note (page)
"Searches the notes buffer for an headline with the `interleave_page_note'
Expand Down

0 comments on commit f3464e1

Please sign in to comment.