Ihor Radchenko <yanta...@gmail.com> writes: > Tom Ed White <wto...@gmail.com> writes: > >> Following gnus links in org fails with the message: >> >> funcall: Wrong number of arguments: ((t) (path _) "Follow the Gnus >> message or folder link specified by PATH." (if (string-match >> "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path) nil (error "Error in Gnus link >> %S" path)) (let ((group (match-string-no-properties 1 path)) (article >> (match-string-no-properties 3 path))) (org-gnus-follow-link group >> article))), 1 > > This should not happen. Do you open the link using org-link-open? Can > you share backtrace after M-x debug-on-entry org-gnus-open? > > Best, > Ihor
I was able to fix the problem for the time being by changing the arguments to: (defun org-gnus-open (path &rest _) The keystroke I use is C-c C-o, which runs org-open-at-point which is in org.el. Regards, Tom Ed White Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1) org-gnus-open("nnmaildir+Old Fiddlebike:Inbox#caj6zs8+tp6gvgckvqa-e1-5cdkfqsnkg8gm69o8emu1zyq5...@mail.gmail.com") funcall(org-gnus-open "nnmaildir+Old Fiddlebike:Inbox#caj6zs8+tp6gvgckvqa-e1-5cdkfqsnkg8gm69o8emu1zyq5...@mail.gmail.com") (cond ((equal type "file") (if (string-match "[*?{]" (file-name-nondirectory path)) (dired path) (let* ((option (org-element-property :search-option link)) (app (org-element-property :application link)) (dedicated-function (org-link-get-parameter (if app ... type) :follow))) (if dedicated-function (funcall dedicated-function (concat path (and option ...))) (apply #'org-open-file path (cond (arg) (... ...) (... ...)) (cond (... nil) (... ...) (t ...))))))) ((functionp (org-link-get-parameter type :follow)) (funcall (org-link-get-parameter type :follow) path)) ((member type '("coderef" "custom-id" "fuzzy" "radio")) (if (run-hook-with-args-until-success 'org-open-link-functions path) nil (if (not arg) (org-mark-ring-push) (switch-to-buffer-other-window (org-link--buffer-for-internals))) (let ((destination (save-excursion (save-restriction ... ... ...)))) (if (and (<= (point-min) destination) (>= (point-max) destination)) nil (widen)) (goto-char destination)))) (t (browse-url-at-point))) (let ((type (org-element-property :type link)) (path (org-element-property :path link))) (cond ((equal type "file") (if (string-match "[*?{]" (file-name-nondirectory path)) (dired path) (let* ((option (org-element-property :search-option link)) (app (org-element-property :application link)) (dedicated-function (org-link-get-parameter ... :follow))) (if dedicated-function (funcall dedicated-function (concat path ...)) (apply #'org-open-file path (cond ... ... ...) (cond ... ... ...)))))) ((functionp (org-link-get-parameter type :follow)) (funcall (org-link-get-parameter type :follow) path)) ((member type '("coderef" "custom-id" "fuzzy" "radio")) (if (run-hook-with-args-until-success 'org-open-link-functions path) nil (if (not arg) (org-mark-ring-push) (switch-to-buffer-other-window (org-link--buffer-for-internals))) (let ((destination (save-excursion ...))) (if (and (<= ... destination) (>= ... destination)) nil (widen)) (goto-char destination)))) (t (browse-url-at-point)))) org-link-open((link (:type "gnus" :path "nnmaildir+Old Fiddlebike:Inbox#CAJ6ZS8+TP6gVGckVQA..." :format bracket :raw-link "gnus:nnmaildir+Old Fiddlebike:Inbox#CAJ6ZS8+TP6gVG..." :application nil :search-option nil :begin 19723 :end 19880 :contents-begin 19829 :contents-end 19878 :post-blank 0 :parent (headline (:raw-value "Debug gnus org links [[gnus:nnmaildir+Old Fiddl..." :begin 19691 :end 19882 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword #("TODO" 0 4 (face org-todo org-category "personal" fontified t)) :todo-type todo :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 19691 :title "Debug gnus org links [[gnus:nnmaildir+Old Fiddl...")))) nil) org-open-at-point(nil) funcall-interactively(org-open-at-point nil) call-interactively(org-open-at-point nil nil) command-execute(org-open-at-point)