Re: Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)]

2021-04-06 Thread Simon Braß
Thanks for an answer, in any place first :).

Am Di., 6. Apr. 2021 um 05:46 Uhr schrieb Kyle Meyer :

> [ Sorry for the slow reply. ]
>
> Simon Braß writes:
>
> > 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
>
> Hmm, this looks like an inaccessible state for Org 9.4.4.  Here's how
> org-link-open would handle an attachment type:
>
>   (let ((f (org-link-get-parameter type :follow)))
> (when (functionp f)
>   ;; Function defined in `:follow' parameter may use a single
>   ;; argument, as it was mandatory before Org 9.4.  This is
>   ;; deprecated, but support it for now.
>   (condition-case nil
>   (funcall (org-link-get-parameter type :follow) path arg)
> (wrong-number-of-arguments
>  (funcall (org-link-get-parameter type :follow) path)
>
> So it first calls with the expected 2 arguments and then falls back to
> the single one.
>
Thanks, good to know. I'm clearly not a Lisp expert...

Follow attachment links works okay on my end, and, aside from a mixed
> installation, I can't think of a way to get into that state.
>
>   https://orgmode.org/worg/org-faq.html#mixed-install
>
> > After adding == 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
>
> That function was added in 9.4 and is in the same file as the caller,
> org-link-open.  The fact that it's not defined also points to a mixed
> install, with an older ol.el taking precedence.
>

It seems to work with the recent Emacs version: GNU Emacs 27.2 (build 1,
x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) of
2021-03-26.
So, it actually points to a mixed installation on my side.
Next time I will follow the instructions in
https://orgmode.org/manual/Feedback.html more carefully, and remind myself
of a possible mixed installation.

Thanks, again, Kyle for your answer.

Cheers,
Simon


Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)]

2021-02-06 Thread Simon Braß
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 == 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/)


Bug: org-attach-follow with wrong-number-of-arguments [ ( @ /home/sbrass/.emacs.d/elpa/org-9.4.4/)]

2021-02-06 Thread Simon Braß
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 == 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/)


Re: [O] Bug: Nested \caption and \label in LaTeX export [9.1.14 (9.1.14-1-g4931fc-elpaplus @ /home/simon/.emacs.d/elpa/26.1/develop/org-plus-contrib-20180910/)]

2018-09-13 Thread Simon Braß
Dear Eric,

thanks for the fast reply!
Indeed, I had a look at the lshort documentation.
It actually never states that \label must come after the full \caption{}
command - nesting works - good to know.
I'm sorry for the inconvenience.

Cheers,
Simon

On 9/13/18 8:05 AM, Eric S Fraga wrote:
> On Tuesday, 11 Sep 2018 at 09:31, Simon Braß wrote:
>> Exporting a table (or figure) with a CAPTION and NAME tag leads to
>> following result:
>> \caption{\label{whatever-tag} I am a caption.}
>> Any LaTeX compiler won't understand this line correctly and won't be able
>> to reference to the assigned label.
> Simon,
>
> In my experience, LaTeX has no problem with this.  I have always (when
> writing LaTeX directly) put the label inside the caption as it's the
> caption that defines the numbering of the table/figure.  Have you
> actually tried this?  What happens when you do?
>