[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] FW: [RFC] Link-type for attachments, more attach options
From: |
stardiviner |
Subject: |
Re: [O] FW: [RFC] Link-type for attachments, more attach options |
Date: |
Sat, 18 Jan 2020 22:56:19 +0800 |
User-agent: |
mu4e 1.3.2; emacs 27.0.50 |
stardiviner <address@hidden> writes:
I finally figured out why the link always failed. Because it use wrong variable
which is old filename path. I attached a patch.
> Gustav Wikström <address@hidden> writes:
>
>> Hi,
>>
>>> -----Original Message-----
>>> From: stardiviner <address@hidden>
>>> Sent: den 15 januari 2020 07:21
>>> To: Gustav Wikström <address@hidden>
>>> Cc: address@hidden; address@hidden
>>> Subject: Re: [O] FW: [RFC] Link-type for attachments, more attach options
>>>
>>> [...]
>>>
>>> >> I found when I set option ~(setq org-attach-store-link-p t)~. Then
>>> >> attach a file, store file link with =[C-c C-l]=. The stored link. I
>>> >> open this link got error "No such file: ....". I tested this with
>>> >> minimal Emacs config. confirmed this problem.
>>> >>
>>> >
>>> > I cannot reproduce this. In my try with a minimal Emacs (emacs -q) and
>>> with only that single customization it works for me. I'm testing it in
>>> linux. A wild guess.. Could it be that you used the move operation instead
>>> of the copy operation when attaching the file?
>>> >
>>> > Regards
>>> > Gustav
>>>
>>> Did you reproduce this issue with =emacs -q= ? That is a built-in Org Mode
>>> version which does not contains the latest version =org-attach.el=.
>>>
>>> Here is my minimal Emacs config:
>>>
>>> [...]
>>>
>>> ;;========================================================================
>>> ======
>>> ;;; Here is org-attach.el customization
>>>
>>> (require 'org-attach)
>>>
>>> ;; store link auto with `org-store-link' using `file:' link type or
>>> `attachment:' link type.
>>> (setq org-attach-store-link-p 'attached) (setq org-attach-dir-relative t)
>>> (setq org-attach-preferred-new-method 'ask) #+end_src
>>>
>>> #+begin_src sh :eval no
>>> emacs -q -l '~/.config/emacs/minimal-init.el'
>>> #+end_src
>>
>
>> Hmm, in the first mail you said that you set org-attach-store-link-p to t,
>> but
>> in your config it says 'attached.
>
> Sorry about this.
>
>> I've tried with a minimal config as well
>> (using emacs -q because I build the newest org mode version into the emacs
>> folder) and can only reproduce your issue when using the attached option for
>> org-attach-store-link-p and then inserting that link with C-c C-l /in another
>> heading/. Pasting the link in another heading is expected to break since the
>> attachment link is context dependent (i.e. requires an attachment folder).
>> Makes sense? If I'm still misunderstanding your use-case, would you care to
>> describe the steps to reproduce it more in detail?
>
> After updated commit, don't know why, but all links worked again. I'm not good
> at expressing thanks, but you got all my thanks on this. :)
>
>> Regards
>> Gustav
>>
--
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
0001-Fix-org-attach-store-link-use-old-filename.patch
Description: Text Data
- Re: [O] FW: [RFC] Link-type for attachments, more attach options, stardiviner, 2020/01/13
- RE: [O] FW: [RFC] Link-type for attachments, more attach options, Gustav Wikström, 2020/01/14
- Re: [O] FW: [RFC] Link-type for attachments, more attach options, stardiviner, 2020/01/15
- RE: [O] FW: [RFC] Link-type for attachments, more attach options, Gustav Wikström, 2020/01/15
- Re: [O] FW: [RFC] Link-type for attachments, more attach options, stardiviner, 2020/01/16
- Re: [O] FW: [RFC] Link-type for attachments, more attach options,
stardiviner <=
- RE: [O] FW: [RFC] Link-type for attachments, more attach options, Gustav Wikström, 2020/01/18
- Re: [O] FW: [RFC] Link-type for attachments, more attach options, stardiviner, 2020/01/18
- RE: [O] FW: [RFC] Link-type for attachments, more attach options, Gustav Wikström, 2020/01/19