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

Transcluded files opened as buffers. #170

Closed dynameow closed 4 months ago

dynameow commented 1 year ago

Hello, I'm not sure if this is a bug or the intended behavior that I've missed somewhere when reading the docs. I apologize if it's the latter.

I'm having an issue with transcluded files getting opened after toggling the org-transclusion minor mode. Apart from this problem, transclude works as intended. I've also tried the solutions mentioned in #19 just in case, as it seemed similar to my issue.

2023-03-04-022352_3000x1920_scrot 2023-03-04-022405_3000x1920_scrot

I'm using transclude on Doom Emacs with the default configuration. I've confirmed the issue is not caused by org-roam or my org configuration. Version info:


GNU Emacs     v28.2            nil
Doom core     v3.0.0-pre       grafted, HEAD -> master, origin/master, origin/HEAD d5ccac5 2022-12-02 00:36:06 +0100
Doom modules  v22.10.0-pre     grafted, HEAD -> master, origin/master, origin/HEAD d5ccac5 2022-12-02 00:36:06 +0100```
nobiot commented 1 year ago

Can you check if it works without Doom, please?

There is also known limitation with Doom:

Doom’s customization may interfere with Org-transclusion Refer to issue #52. The symptom is that in Doom you get an error message that includes this: “progn: ‘recenter’ing a window that does not display current-buffer.” Adding this in your configuration has been reported to fix the issue: (advice-remove 'org-link-search '+org--recenter-after-follow-link-a)

It is probably rather drastic a measure. I will appreciate it if you find a less drastic way that works. Thank you.

dynameow commented 1 year ago

Thanks for the response. I've confirmed it does indeed work in vanilla emacs. I've also tried both vanilla doom emacs and spacemacs, and the issue occurs in both of them. Sadly, (advice-remove 'org-link-search '+org--recenter-after-follow-link-a) hasn't worked.

I don't have much experience with the emacs config nor lisp, but while trying different solutions I've discovered, that if I open org-agenda, org-transclusion suddenly works as intended, though I have no idea why this is the case.

nobiot commented 1 year ago

You say spacemacs does not work with org-transclusion. Spacemacs’ org layer supports it. See https://develop.spacemacs.org/layers/%2Bemacs/org/README.html

if the issue persists for either Doom or Spacemacs, I would suggest to raise an issue in their respective repository.