publicimageltd / delve

Delve into your org-roam zettelkasten
GNU General Public License v3.0
186 stars 8 forks source link

"Mandatory ARGLIST is missing" #17

Closed DavidFeest closed 1 year ago

DavidFeest commented 1 year ago

Hi, when starting delve I get a the error message "Mandatory ARGLIST is missing".

DavidFeest commented 1 year ago

I'm using delve 0.9.4 and org-roam 2.2.2, both installed with straight. My configuration is standard as described in the manual:

DavidFeest commented 1 year ago

(use-package delve :straight (:repo "publicimageltd/delve" :host github :type git) :after (org-roam) ;; this is necessary if use-package-always-defer is true :demand t :bind ;; the main entry point, offering a list of all stored collections ;; and of all open Delve buffers: (("" . delve))
:config ;; set meaningful tag names for the dashboard query (setq delve-dashboard-tags '("Tag1" "Tag2")) ;; optionally turn on compact view as default (add-hook #'delve-mode-hook #'delve-compact-view-mode) ;; turn on delve-minor-mode when Org Roam file is opened: (delve-global-minor-mode)) ; one file name -- one directory: (setq delve-storage-paths "/home/XXX/org/delve")

publicimageltd commented 1 year ago

Thanks for reporting the issue! Did you get the warning when you executed the use-package declaration? For it looks like you do not provide a key binding for :bind. Anyways, please turn on toggle-debug-on-error (M-x toggle-debug-on-error), then paste the result of the buffer with the error here.

DavidFeest commented 1 year ago

Sorry, there is a key binding in my .emacs file, but it somehow got lost when copying and pasting the code. It is

:bind
 (("<f11>" . delve))     

Here is my backtrace output:

Debugger entered--Lisp error: (error "Mandatory ARGLIST is missing") signal(error ("Mandatory ARGLIST is missing")) error("Mandatory ARGLIST is missing") transient--expand-define-args(([["Select and insert" ("n" "New node(s)" delve--key--insert-node) ("T" "New node(s) having #tag" delve--key--insert-node-by-tags)] ["Insert all" ("b" "All backlinks of node at point" delve--key--insert-backlink) ("f" "All links from current node" delve--key--insert-fromlink) ("t" "All links matching tag(s)" delve--key--insert-tagged) ("i" delve--key--insert-query-or-pile :description (lambda nil (pcase (delve--current-item ...) (... "Results from query at point") (... "Nodes from current pile, dissolving it") (_ "Cannot be used here"))) :if (lambda nil (delve--current-item '...)))]] [["Edit" ("+" delve--key--add-tags :description (lambda nil (concat "Add tag(s)" (when ... " in region")))) ("-" delve--key--remove-tags :description (lambda nil (concat "Remove tag(s)" (when ... " in region"))))] ["Marked nodes" :if (lambda nil (delve--marked-items-p)) ("c" delve--key--collect-into-buffer :description "Add marked items to (new) collection") ("p" delve--key--collect-into-pile :description "Move marked items into a pile") ("" delve--key--multi-delete :description "Delete all marked items") ("U" lister-mode-unmark-all :description "Unmark all" :if-non-nil lister-mode)]] [["Visit" :if (lambda nil (delve--current-item 'delve--zettel)) ("o" "Open Org Roam file with this node" delve--key--open-zettel)] ["Structure" ("h" "Insert heading" delve--key--insert-heading)]] [["Quit" ("q" "Quit" transient-quit-one)]]) "Transient for doing stuff with node(s).")

f(compiled-function (arg1 arg2 &rest rest) "Define NAME as a transient prefix command.\n\nARGLIST are the arguments that command takes.\nDOCSTRING is the documentation string and is optional.\n\nThese arguments can optionally be followed by key-value pairs.\nEach key has to be a keyword symbol, either :class' or a keyword\nargument supported by the constructor of that class. The\ntransient-prefix' class is used if the class is not specified\nexplicitly.\n\nGROUPs add key bindings for infix and suffix commands and specify\nhow these bindings are presented in the popup buffer. At least\none GROUP has to be specified. See info node (transient)Binding\nSuffix and Infix Commands'.\n\nThe BODY is optional. If it is omitted, then ARGLIST is also\nignored and the function definition becomes:\n\n (lambda ()\n (interactive)\n (transient-setup \\='NAME))\n\nIf BODY is specified, then it must begin with aninteractive'\nform that matches ARGLIST, and it must call transient-setup'.\nIt may however call that function only when some condition is\nsatisfied; that is one of the reason why you might want to use\nan explicit BODY.\n\nAll transients have a (possibly nil) value, which is exported\nwhen suffix commands are called, so that they can consume that\nvalue. For some transients it might be necessary to have a sort\nof secondary value, called a scope. Such a scope would usually\nbe set in the commandsinteractive' form and has to be passed\nto the setup function:\n\n (transient-setup \='NAME nil nil :scope SCOPE)" #<bytecode 0x156b7e61ea1d>)(delve--node-transient-key "Transient for doing stuff with node(s)." [["Select and insert" ("n" "New node(s)" delve--key--insert-node) ("T" "New node(s) having #tag" delve--key--insert-node-by-tags)] ["Insert all" ("b" "All backlinks of node at point" delve--key--insert-backlink) ("f" "All links from current node" delve--key--insert-fromlink) ("t" "All links matching tag(s)" delve--key--insert-tagged) ("i" delve--key--insert-query-or-pile :description (lambda nil (pcase (delve--current-item '...) ((cl-type delve--query) "Results from query at point") ((cl-type delve--pile) "Nodes from current pile, dissolving it") (_ "Cannot be used here"))) :if (lambda nil (delve--current-item '(delve--query delve--pile))))]] [["Edit" ("+" delve--key--add-tags :description (lambda nil (concat "Add tag(s)" (when (delve--marked-items-p) " in region")))) ("-" delve--key--remove-tags :description (lambda nil (concat "Remove tag(s)" (when (delve--marked-items-p) " in region"))))] ["Marked nodes" :if (lambda nil (delve--marked-items-p)) ("c" delve--key--collect-into-buffer :description "Add marked items to (new) collection") ("p" delve--key--collect-into-pile :description "Move marked items into a pile") ("" delve--key--multi-delete :description "Delete all marked items") ("U" lister-mode-unmark-all :description "Unmark all" :if-non-nil lister-mode)]] [["Visit" :if (lambda nil (delve--current-item 'delve--zettel)) ("o" "Open Org Roam file with this node" delve--key--open-zettel)] ["Structure" ("h" "Insert heading" delve--key--insert-heading)]] [["Quit" ("q" "Quit" transient-quit-one)]])

(transient-define-prefix delve--node-transient-key "Transient for doing stuff with node(s)." [["Select and insert" ("n" "New node(s)" delve--key--insert-node) ("T" "New node(s) having #tag" delve--key--insert-node-by-tags)] ["Insert all" ("b" "All backlinks of node at point" delve--key--insert-backlink) ("f" "All links from current node" delve--key--insert-fromlink) ("t" "All links matching tag(s)" delve--key--insert-tagged) ("i" delve--key--insert-query-or-pile :description (lambda nil (pcase (delve--current-item '...) ((cl-type delve--query) "Results from query at point") ((cl-type delve--pile) "Nodes from current pile, dissolving it") (_ "Cannot be used here"))) :if (lambda nil (delve--current-item '(delve--query delve--pile))))]] [["Edit" ("+" delve--key--add-tags :description (lambda nil (concat "Add tag(s)" (when (delve--marked-items-p) " in region")))) ("-" delve--key--remove-tags :description (lambda nil (concat "Remove tag(s)" (when (delve--marked-items-p) " in region"))))] ["Marked nodes" :if (lambda nil (delve--marked-items-p)) ("c" delve--key--collect-into-buffer :description "Add marked items to (new) collection") ("p" delve--key--collect-into-pile :description "Move marked items into a pile") ("" delve--key--multi-delete :description "Delete all marked items") ("U" lister-mode-unmark-all :description "Unmark all" :if-non-nil lister-mode)]] [["Visit" :if (lambda nil (delve--current-item 'delve--zettel)) ("o" "Open Org Roam file with this node" delve--key--open-zettel)] ["Structure" ("h" "Insert heading" delve--key--insert-heading)]] [["Quit" ("q" "Quit" transient-quit-one)]]) eval-buffer(#<buffer load-771765> nil "/home/david/.emacs.d/straight/build/delve/delve.el" nil t) ; Reading at buffer position 80814 load-with-code-conversion("/home/david/.emacs.d/straight/build/delve/delve.el" "/home/david/.emacs.d/straight/build/delve/delve.el" t t) require(delve nil t) (not (require 'delve nil t)) (if (not (require 'delve nil t)) (display-warning 'use-package (format "Cannot load %s" 'delve) :error) (condition-case err (progn (setq delve-dashboard-tags '("Tag1" "Tag2")) (add-hook #'delve-mode-hook #'delve-compact-view-mode) (delve-global-minor-mode) t) ((debug error) (funcall use-package--warning11 :config err)))) (progn (if (not (require 'delve nil t)) (display-warning 'use-package (format "Cannot load %s" 'delve) :error) (condition-case err (progn (setq delve-dashboard-tags '("Tag1" "Tag2")) (add-hook #'delve-mode-hook #'delve-compact-view-mode) (delve-global-minor-mode) t) ((debug error) (funcall use-package--warning11 :config err)))) (let ((name "") (key [f11]) (kmap (or (if (and nil (symbolp nil)) (symbol-value nil) nil) global-map)) (kdesc (cons (if (stringp name) name (key-description name)) (if (symbolp nil) nil 'nil))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list #'delve (if (numberp binding) nil binding)))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'delve))) (lambda nil (progn (if (not (require 'delve nil t)) (display-warning 'use-package (format "Cannot load %s" 'delve) :error) (condition-case err (progn (setq delve-dashboard-tags '("Tag1" "Tag2")) (add-hook #'delve-mode-hook #'delve-compact-view-mode) (delve-global-minor-mode) t) ((debug error) (funcall use-package--warning11 :config err)))) (let ((name "") (key [f11]) (kmap (or (if (and nil ...) (symbol-value nil) nil) global-map)) (kdesc (cons (if (stringp name) name (key-description name)) (if (symbolp nil) nil 'nil))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list #'delve (if ... nil binding)))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'delve))))() eval-after-load(org-roam (lambda nil (progn (if (not (require 'delve nil t)) (display-warning 'use-package (format "Cannot load %s" 'delve) :error) (condition-case err (progn (setq delve-dashboard-tags '...) (add-hook #'delve-mode-hook #'delve-compact-view-mode) (delve-global-minor-mode) t) ((debug error) (funcall use-package--warning11 :config err)))) (let ((name "") (key [f11]) (kmap (or (if ... ... nil) global-map)) (kdesc (cons (if ... name ...) (if ... nil ...))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list ... ...))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'delve))))) (condition-case err (eval-after-load 'org-roam #'(lambda nil (progn (if (not (require ... nil t)) (display-warning 'use-package (format "Cannot load %s" ...) :error) (condition-case err (progn ... ... ... t) (... ...))) (let ((name "") (key ...) (kmap ...) (kdesc ...) (binding ...)) (let (... ...) (if entry ... ...)) (define-key kmap key #'delve))))) ((debug error) (funcall use-package--warning11 :catch err))) eval-buffer(#<buffer load> nil "/home/david/.emacs" nil t) ; Reading at buffer position 30889 load-with-code-conversion("/home/david/.emacs" "/home/david/.emacs" t t) load("~/.emacs" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x156b7d8a23ad>) #f(compiled-function () #<bytecode 0x156b7d8a23c1>) t) command-line() normal-top-level()

publicimageltd commented 1 year ago

Ah, that's the issue with the missing () in the transient. That should be resolved, please update Delve and check again.

DavidFeest commented 1 year ago

I thought I had the recent version, but I just didn't understand how updates in straight work! Now everything is fixed. Thank you so much, and while I'm at it: thank you for "delve". It's a very important addition to org-roam!