esv.el: improve documentation
This commit is contained in:
parent
892af96051
commit
7bd2e3db37
1 changed files with 4 additions and 5 deletions
9
esv.el
9
esv.el
|
@ -64,20 +64,19 @@
|
|||
|
||||
(defun esv (book verses)
|
||||
"Fetch the Bible passage identified by BOOK and VERSES.
|
||||
The result will be redirected to a buffer specified by `esv-buffer'."
|
||||
The result will be redirected to a buffer specified by `esv-buffer'.
|
||||
|
||||
Requires the esv command line tool to be in the system's PATH.
|
||||
esv can be acquired at <https://sr.ht/~jeremy/esv>."
|
||||
(interactive "MBook: \nMVerses: ")
|
||||
(let ((buffer (concat book " " verses)))
|
||||
(catch 'buffer-exists
|
||||
(when (get-buffer buffer)
|
||||
(message "Buffer `%s' already exists" buffer)
|
||||
(throw 'buffer-exists nil))
|
||||
;; execute esv
|
||||
(call-process esv-program nil buffer t
|
||||
;; arguments
|
||||
(format "-l%d" esv-columns) book verses)
|
||||
;; display buffer in another window
|
||||
(display-buffer buffer)
|
||||
;; move point to the beginning of the buffer
|
||||
(with-current-buffer buffer
|
||||
(esv-mode)
|
||||
(goto-char (point-min)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue