emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: New source block results option for attaching file to no


From: Ihor Radchenko
Subject: Re: [PATCH] Re: New source block results option for attaching file to node
Date: Sat, 02 Oct 2021 16:32:53 +0800

Ryan Scott <ryan@vicarious-living.com> writes:

>        (default-directory
> -        (or (and dir (file-name-as-directory dir)) default-directory))
> +        (or (and dir (if (eq dir 'attach)
> +                            (org-attach-dir t)
> +                          (file-name-as-directory dir)))
> +               default-directory))

This does not always work.  Some ob-*.el code (namely, ob-lisp have the
following:

(let ((dir (if (assq :dir params)
               (cdr (assq :dir params))
              default-directory)))

As you can see, :dir parameter is overriding default-directory.  If :dir
is set to symbol 'attach, execution will fail.

I think that you also need to override :dir in the parameter list and
put actual path to attachment dir instead of symbol.  That way, we will
not need to change every possible ob-*.el implementation to account for
new 'attach option.

Also, marking this as patch.

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]