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

Unable to transclude org-roam files without any headings #193

Closed nigo81 closed 1 year ago

nigo81 commented 1 year ago

when i embed a org-roam file without heading:#+transclude: [[id:c597f234-bf83-48c4-8762-a9706f984891][原子化笔记 Atomic Note]], minibuffer shows error:No content found with "id:c597f234-bf83-48c4-8762-a9706f984891". Check the link at point 154, line 9 the org-roam file is: image After add a header as below: image It works, and will transclude the information after heading: image

I wan't to know how to transclude a org-roam file without any headings? Thanks very much.

nobiot commented 1 year ago

I suggest you check the value of customizing variable org-transclusion-include-first-section. It needs to be non-nil. It works on my end.

The variable should be t by default. You might be in a much earlier release, when it was nil by default -- if so, I'd also suggest to update the package.

nigo81 commented 1 year ago

I suggest you check the value of customizing variable org-transclusion-include-first-section. It needs to be non-nil. It works on my end.

The variable should be t by default. You might be in a much earlier release, when it was nil by default -- if so, I'd also suggest to update the package.

Thanks a lot, I check the org-transclusion-include-first-section value is nil ,because I set (setq org-transclusion-include-first-section nil), I change it to t then works.

But it also include the title of org-roam file,is anyway to transclude text without title? image

nobiot commented 1 year ago

It is a keyword, so I suggest you try :exclude-elements property and exclude “keyword”. User manual here .

Example:

#+transclude: [[file:path/to/file.org]] :exclude-elements "keyword"
nigo81 commented 1 year ago

:exclude-elements "keyword"

I add :exclude-elements "keyword title" and it works ,thanks.

nigo81 commented 1 year ago

I want to ask a more question. If i set org-transclusion-include-first-section to t, and i want to exclude first section before heading,is anyway to achieve it? Just like the method :exclude-elements "keyword title".

nobiot commented 1 year ago

No, the variable is the only way; we have not implemented per-transclusion filter yet. It's a little more complicated than others...

nigo81 commented 1 year ago

Thanks!