emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Strip out #+title in #+include
@ 2024-06-12 12:14 Risto Stevcev
  2024-06-17 14:34 ` Fraga, Eric
  0 siblings, 1 reply; 3+ messages in thread
From: Risto Stevcev @ 2024-06-12 12:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

There doesn't seem to be a way to strip out the `#+title` from an
`#+include`d org file. As a result, for complex org documents, if you end
up `#+include`ing multiple org files that have `#+title`s, it ends up
appending them all, which can often not be what you want, which is true in
my case.

There's this solution I found, but it strips out the title entirely, rather
than controlling which `#+title`s get exported, such as only the title of
the root doc:
https://emacs.stackexchange.com/questions/18420/unwanted-concatenation-of-multiple-title-and-author-when-using-include

[-- Attachment #2: Type: text/html, Size: 786 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strip out #+title in #+include
  2024-06-12 12:14 Strip out #+title in #+include Risto Stevcev
@ 2024-06-17 14:34 ` Fraga, Eric
  2024-06-17 15:06   ` Risto Stevcev
  0 siblings, 1 reply; 3+ messages in thread
From: Fraga, Eric @ 2024-06-17 14:34 UTC (permalink / raw)
  To: Risto Stevcev; +Cc: emacs-orgmode@gnu.org

What I do in such cases is include the file starting at some line number
that avoids the header information for that file (title, date, author,
document settings).

Example:

     #+include: "introduction.org" :lines "10-"


-- 
: Eric S Fraga, with org release_9.7.3-44-g959534 in Emacs 30.0.50

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strip out #+title in #+include
  2024-06-17 14:34 ` Fraga, Eric
@ 2024-06-17 15:06   ` Risto Stevcev
  0 siblings, 0 replies; 3+ messages in thread
From: Risto Stevcev @ 2024-06-17 15:06 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

I tried that, and it did sort of work, but the problem is that I need to do
that for dozens of org roam files that may or may not have roam_refs, so it
felt really fragile.

On Mon, Jun 17, 2024, 16:34 Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> What I do in such cases is include the file starting at some line number
> that avoids the header information for that file (title, date, author,
> document settings).
>
> Example:
>
>      #+include: "introduction.org" :lines "10-"
>
>
> --
> : Eric S Fraga, with org release_9.7.3-44-g959534 in Emacs 30.0.50

[-- Attachment #2: Type: text/html, Size: 948 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-17 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 12:14 Strip out #+title in #+include Risto Stevcev
2024-06-17 14:34 ` Fraga, Eric
2024-06-17 15:06   ` Risto Stevcev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).