Skip to content

Commit

Permalink
New function Notes-view-body
Browse files Browse the repository at this point in the history
  • Loading branch information
leoliu committed Sep 26, 2013
1 parent c8987e7 commit 1900cc1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Notes.el
Original file line number Diff line number Diff line change
Expand Up @@ -418,5 +418,15 @@ If region is active it is used for BODY."
2))
(Notes-export-org-subtree)))))))

(defun Notes-view-body ()
"View the html source of the note body."
(interactive)
(let ((note-id (or (org-entry-get-with-inheritance "note-id")
(error "No existing note at point")))
(print-escape-newlines nil))
(with-output-to-temp-buffer "*note-html*"
(princ (read (applescript "\
tell application \"Notes\" to get body of note id #{note-id}"))))))

(provide 'Notes)
;;; Notes.el ends here

0 comments on commit 1900cc1

Please sign in to comment.