nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
917 stars 44 forks source link

property `:expand-links` auto expand link relative path to real absolute path is not right #168

Closed stardiviner closed 1 year ago

stardiviner commented 1 year ago

Before enable org-transclude-mode, here is the screenshot describe it:

CleanShot 2023-03-01 at 09 52 02@2x

After enabled org-transclude-mode, the link path is expanded but wrong:

CleanShot 2023-03-01 at 09 56 56@2x

I added text annotated on image described what it should be.

stardiviner commented 1 year ago

Also confirmed emacs -Q also can reproduce this problem.

CleanShot 2023-03-02 at 19 23 41@2x

nobiot commented 1 year ago

@stardiviner I have hard time understanding what the files look like. Would you mind providing me a set of example files?

At the moment, I have these two files and don't think they correctly reflect your situation:

# transcluding file: ~/src/org-transclusion/test/168.org

#+transclude: [[file:~/Org/Beauty/Beauty.org::#Film Title (1999)]] :expand-links 
# source file: ~/Org/Beauty/Beauty.org

* Film Title (1999)
:PROPERTIES:
:CUSTOM_ID: Film Title (1999)
:END:
#+begin_example
[[[[file:~/Org/Beauty/Beauty.org::# Film Title (1999)]]]]
#+end_example
stardiviner commented 1 year ago

CleanShot 2023-03-05 at 00 18 54

You have not noticed the file: string INSIDE the link.

stardiviner commented 1 year ago

The problem and fix is here:

image
nobiot commented 1 year ago

Managed to reproduce the issue. Took time. Thank you for the report and the proposal.