Okay , it used to work falwlessly ...but now throwing an error while invoking... I understand , you will say, "what changes since then?" ...a lot ..not sure which one is bugging this ...but the code and output text are below ...take a peek :

capture template code:

.........

("b" "Books" entry (file "~/.emacs.d/OrgFiles/books.org"

"* %(let* ((url (substring-no-properties (current-kill 0)))

(details (org-books-get-details url)))

(when details (apply #'org-books-format 1 details)))")

Now here is the output I am getting once select/press "b" from capture menu ...in the capture buffer it is showing this :

%![Error: (void-function org-books-get-details)]

Now, here is the actual code in the org-books.el :

(defun org-books-get-details (url)

"Fetch book details from given URL.Return a list of three items: title (string), author (string) andan alist of properties to be applied to the org entry. If the url is not supported, throw an error."

(let ((output 'no-match)

(url-host-string (url-host (url-generic-parse-url url))))

(cl-dolist (pattern-fn-pair org-books-url-pattern-dispatches)

(when (s-matches? (car pattern-fn-pair) url-host-string)

(setq output (funcall (cdr pattern-fn-pair) url))

(cl-return)))

(if (eq output 'no-match)

(error (format "Url %s not understood" url))

output)))

What is going wrong...I am not able to figure it out. I am sure , that I haven't change the file to something else.

Shed some light.

submitted by /u/unixbhaskar
[link] [comments]