emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)]
@ 2021-02-04 17:08 Simon Braß
  2021-04-06  3:46 ` Kyle Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Braß @ 2021-02-04 17:08 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]

Hi all,

I've tried to open an attached file (added with org-attach-attach), however,
when I try to open it with C-c C-o I got the following backtrace:

#+begin_example
Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1)
  org-attach-follow("1805.00020.pdf")
  org-link-open((link (:type "attachment" :path "1805.00020.pdf" :format
bracket :raw-link "attachment:1805.00020.pdf" :application nil
:search-option nil :begin 717 :end 818 :contents-begin 746 :contents-end
816 :post-blank 0 :parent (paragraph (:begin 717 :end 819 :contents-begin
717 :contents-end 819 :post-blank 0 :post-affiliated 717 :parent (item
(:bullet "- " :begin 708 :end 819 :contents-begin 717 :contents-end 819
:checkbox off :counter nil :structure (... ... ... ... ...) :pre-blank 0
:post-blank 0 :post-affiliated 708 :tag nil :parent (plain-list ...)))))))
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)
#+end_example

After adding =&optional= to the definition of =org-attach-follow=, and
reloading org-mode (uncompiled) I could get through org-attach-follow.
But, then I hit another issue:

#+begin_example
Debugger entered--Lisp error: (void-function org-link-open-as-file)
  (org-link-open-as-file (org-attach-expand file) arg)
  org-attach-follow("0906.4487.pdf")
  …
#+end_example

After an =eval-defun= on =org-link-open-as-file=, I finally could
open my attachment.

I used =emacs -q=, installed org freshly and used a clean org-file with
only a single header entry and the attachment to reproduce my issue.

Cheers,
Simon Braß

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.22, cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version  ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)

[-- Attachment #2: Type: text/html, Size: 2121 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)]
@ 2021-02-06 13:52 Simon Braß
  2022-05-06  9:40 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Braß @ 2021-02-06 13:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

Hi all,

I've tried to open an attached file (added with org-attach-attach), however,
when I try to open it with C-c C-o I got the following backtrace:

#+begin_example
Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1)
  org-attach-follow("1805.00020.pdf")
  org-link-open((link (:type "attachment" :path "1805.00020.pdf" :format
bracket :raw-link "attachment:1805.00020.pdf" :application nil
:search-option nil :begin 717 :end 818 :contents-begin 746 :contents-end
816 :post-blank 0 :parent (paragraph (:begin 717 :end 819 :contents-begin
717 :contents-end 819 :post-blank 0 :post-affiliated 717 :parent (item
(:bullet "- " :begin 708 :end 819 :contents-begin 717 :contents-end 819
:checkbox off :counter nil :structure (... ... ... ... ...) :pre-blank 0
:post-blank 0 :post-affiliated 708 :tag nil :parent (plain-list ...)))))))
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)
#+end_example

After adding =&optional= to the definition of =org-attach-follow=
and
reloading org-mode (uncompiled) I could get through org-attach-follow.
But, then I hit another issue:

#+begin_example
Debugger entered--Lisp error: (void-function org-link-open-as-file)
  (org-link-open-as-file (org-attach-expand file) arg)
  org-attach-follow("0906.4487.pdf")
  =E2=80=A6
#+end_example

After an =eval-defun= on =org-link-open-as-file=, I finally could
open my attachment.

I used =emacs -q=, installed org freshly and used a clean org-file with
only a single header entry and the attachment to reproduce my issue.

Cheers,
Simon Braß

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.22, cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version  ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)

[-- Attachment #2: Type: text/html, Size: 2093 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-06  9:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-04 17:08 Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)] Simon Braß
2021-04-06  3:46 ` Kyle Meyer
2021-04-06  6:12   ` Simon Braß
  -- strict thread matches above, loose matches on Subject: below --
2021-02-06 13:52 Simon Braß
2022-05-06  9:40 ` Ihor Radchenko

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).