[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] coderef does not provide file path for org-insert-link when not
From: |
stardiviner |
Subject: |
Re: [O] coderef does not provide file path for org-insert-link when not in original buffre |
Date: |
Sat, 27 Oct 2018 10:55:52 +0800 |
User-agent: |
mu4e 1.1.0; emacs 26.1 |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> stardiviner <address@hidden> writes:
>
>> Thanks for this hint, I added a new entry in org-src--babel-info list to
>> pass the original parent file path.
>
> Thank you. Some comments follow.
>
>> - (language body arguments switches name start coderef)"
>> + (language body arguments switches name start coderef parent-file-path)"
>
> This is not needed. It would be better to create a new variable, e.g.
> `org-src-source-file', get the file name at the beginning of the
> function `org-src--edit-element', and set it from its INITIALIZE
> argument.
>
>> + (insert (format coderef-format label))
>> + (setq link (format "file:%s::%s"
>> + (car (last org-src--babel-info))
>> + (concat "(" label ")")))
>
> You can get the file name by reading `org-src-source-file' value.
>
> Does that make sense?
>
> Could you also provide some tests?
>
> Regards,
I regenerated the patch.
0001-org.el-fix-org-coderef-does-not-support-adaptive-fil.patch
Description: Text Data
--
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3