emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Ed White <wtomed@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org, Tom Ed White <wtomed@gmail.com>
Subject: Re: Unable to follow gnus links
Date: Sun, 03 Oct 2021 11:54:52 -0400	[thread overview]
Message-ID: <874k9ycddf.fsf@fiddlebike.us> (raw)
In-Reply-To: <8735pi7bfx.fsf@localhost> (Ihor Radchenko's message of "Sun, 03 Oct 2021 16:35:30 +0800")

Ihor Radchenko <yantar92@gmail.com> writes:

> Tom Ed White <wtomed@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+Eg@mail.gmail.com")
  funcall(org-gnus-open "nnmaildir+Old Fiddlebike:Inbox#CAJ6ZS8+TP6gVGckVQA-e1-5cdKfQSnKG8Gm69o8emu1ZYq5+Eg@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)



  reply	other threads:[~2021-10-03 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 17:55 Unable to follow gnus links Tom Ed White
2021-10-03  8:35 ` Ihor Radchenko
2021-10-03 15:54   ` Tom Ed White [this message]
2021-10-04  8:24     ` Ihor Radchenko
2021-10-04 19:33       ` Tom Ed White

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k9ycddf.fsf@fiddlebike.us \
    --to=wtomed@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).