emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] Attachments not resolved correctly from symlinked Org files


From: Ihor Radchenko
Subject: Re: [BUG] Attachments not resolved correctly from symlinked Org files
Date: Sat, 04 May 2024 07:52:12 +0000

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>> I can see the problem.
>> But what would you expect to happen if there was no attachment in the
>> original directory? Should the attachment be created relative to the
>> original file? To the symlink?
>
> I don't know.  I would expect the attachment to always be created
> relative to the original file, but other users might have the opposite
> expectation.

What about the approach we already use in
`org-attach-id-to-path-function-list' - check if an attachment directory
already exists, generated using any rule, and only if not, create a new?

Similarly, in `org-attach-dir', we can first check local attachment
directory and return it if it exists. Then, we check attachment
directory for the symlink source, and return it when it exists.
If none exists, create attachment locally or relative to the symlink
source, according to some customization. The default will be creating
locally, to follow the existing behavior.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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