dtk01 / dtk

Read the Bible or other diatheke-accessible material in emacs
GNU General Public License v3.0
24 stars 10 forks source link

helm-M-x-execute-command: Invalid function: return #17

Closed jajpater closed 3 years ago

jajpater commented 3 years ago

When I try to use dtk after selecting chapter and verse I get this error:

helm-M-x-execute-command: Invalid function: return

This is in my messages buffer. The same thing happens when using the dtk-select-module function. So dtk seems not to be working with helm.

I'm using spacemacs on emacs 27.1

thomp commented 3 years ago

This may be unrelated to helm and may simply be a reflection of failure to use the Common Lisp package correctly. If you redefine the following functions as indicated, is the problem resolved?

(defun dtk-module-get-category-for-module (module)
  (cl-loop
   for modulelist-entry in (dtk-modulelist)
   if (member module (dtk-module-names-from-modulelist-entry modulelist-entry))
   do (cl-return (cl-first modulelist-entry))))

(defun dtk-module-map-get-inserter (module-name)
  "Return the inserter description associated with the module specified by MODULE-NAME. FORMAT is a keyword. See the DTK-DIATHEKE docstring description of DIATHEKE-OUTPUT-FORMAT for specifics."
  (cl-third (cl-rest (dtk-module-map-entry module-name))))

(defun dtk-module-map-get-parser (module-name)
  "Return the parser description associated with the module specified by MODULE-NAME."
  (cl-second (cl-rest (dtk-module-map-entry module-name))))

(defun dtk-module-map-get-retriever (module-name)
  "Return the retriever description associated with the module specified by MODULE-NAME."
  (cl-first (cl-rest (dtk-module-map-entry module-name))))
jajpater commented 3 years ago

Yes! That solves the issue!

jajpater commented 3 years ago

Maybe I was a bit to quick to close this, since this should be added as a new commit?

thomp commented 3 years ago

New commit: https://github.com/dtk01/dtk/commit/270320f5a31dbef543f95b15608526629d613366