* prevent auto appending #+INCLUDE files title
@ 2015-11-23 14:57 Manuel Koell
2015-11-23 17:13 ` Rasmus
0 siblings, 1 reply; 5+ messages in thread
From: Manuel Koell @ 2015-11-23 14:57 UTC (permalink / raw)
To: org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
I tried to use #+INCLUDE "sitemap.org" :only-contents t with the
:auto-sitemap option on my publishing project, but whenever I include a
file this way the title appends to the exported document title.
example file (test.org)
```
#+TITLE: My title
#+INCLUDE "sitemap.org" :only-contents t
```
Now the exported document title test.html contains the title: My title
Sitemap
Expected behaviour: the title I set with #+TITLE
Why is orgmode doingt such "smart" things for me?
[-- Attachment #2: Type: text/html, Size: 744 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prevent auto appending #+INCLUDE files title
2015-11-23 14:57 prevent auto appending #+INCLUDE files title Manuel Koell
@ 2015-11-23 17:13 ` Rasmus
2015-11-23 17:28 ` Manuel Koell
0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-11-23 17:13 UTC (permalink / raw)
To: emacs-orgmode
Hi Manuel,
Manuel Koell <man.koell@gmail.com> writes:
> I tried to use #+INCLUDE "sitemap.org" :only-contents t with the
> :auto-sitemap option on my publishing project, but whenever I include a
> file this way the title appends to the exported document title.
>
> example file (test.org)
>
> ```
>
> #+TITLE: My title
>
> #+INCLUDE "sitemap.org" :only-contents t
> ```
>
> Now the exported document title test.html contains the title: My title
> Sitemap
> Expected behaviour: the title I set with #+TITLE
Currently :only-contents is just referring to a headline or so. E.g.
#+include: "test.org::#head1" :only-contents t
will limit the input to the sense of contents as understood by
org-element.
I agree that it might extend the meaning of :only-contents to also work on
full files, though it’s not clear what the proper behavior is. In
particular, what keywords would it extend to? E.g. what about
#+backend_header lines, e.g. #+html_header? To me, this sounds like a
difficult problem to get right...
An easy fix in your problem in this case is probably :lines "2-".
Rasmus
--
I feel emotional landscapes they puzzle me
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prevent auto appending #+INCLUDE files title
2015-11-23 17:13 ` Rasmus
@ 2015-11-23 17:28 ` Manuel Koell
2015-11-23 17:33 ` Rasmus
0 siblings, 1 reply; 5+ messages in thread
From: Manuel Koell @ 2015-11-23 17:28 UTC (permalink / raw)
To: Rasmus; +Cc: org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]
Hello Rasmus,
I think you got me wrong or I don't understand correctly ^^
The problem is, when I export a file which uses #+INCLUDE inside, for
example my index.org where I want to include the latest 5 posts (generated
from sitemap.org). The exported index.html has the wrong title/h1 then:
<title>My title Sitemap</title>. The files I used to include append their
title to the index.org document then. This is not something I would expect
if I already set the #+TITLE option. Idk if this is a bug or a feature. Do
you've any workaround? I dont know why orgmode is mess up my title.
2015-11-23 18:13 GMT+01:00 Rasmus <rasmus@gmx.us>:
> Hi Manuel,
>
> Manuel Koell <man.koell@gmail.com> writes:
>
> > I tried to use #+INCLUDE "sitemap.org" :only-contents t with the
> > :auto-sitemap option on my publishing project, but whenever I include a
> > file this way the title appends to the exported document title.
> >
> > example file (test.org)
> >
> > ```
> >
> > #+TITLE: My title
> >
> > #+INCLUDE "sitemap.org" :only-contents t
> > ```
> >
> > Now the exported document title test.html contains the title: My title
> > Sitemap
> > Expected behaviour: the title I set with #+TITLE
>
> Currently :only-contents is just referring to a headline or so. E.g.
>
> #+include: "test.org::#head1" :only-contents t
>
> will limit the input to the sense of contents as understood by
> org-element.
>
> I agree that it might extend the meaning of :only-contents to also work on
> full files, though it’s not clear what the proper behavior is. In
> particular, what keywords would it extend to? E.g. what about
> #+backend_header lines, e.g. #+html_header? To me, this sounds like a
> difficult problem to get right...
>
> An easy fix in your problem in this case is probably :lines "2-".
>
> Rasmus
>
> --
> I feel emotional landscapes they puzzle me
>
>
>
[-- Attachment #2: Type: text/html, Size: 2868 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prevent auto appending #+INCLUDE files title
2015-11-23 17:28 ` Manuel Koell
@ 2015-11-23 17:33 ` Rasmus
2015-11-23 18:28 ` Manuel Koell
0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-11-23 17:33 UTC (permalink / raw)
To: man.koell; +Cc: emacs-orgmode
Manuel Koell <man.koell@gmail.com> writes:
> I think you got me wrong or I don't understand correctly ^^
I don’t think so.
> The problem is, when I export a file which uses #+INCLUDE inside, for
> example my index.org where I want to include the latest 5 posts (generated
> from sitemap.org). The exported index.html has the wrong title/h1 then:
> <title>My title Sitemap</title>. The files I used to include append their
> title to the index.org document then. This is not something I would expect
> if I already set the #+TITLE option. Idk if this is a bug or a feature.
This is a feature. Basically, it follows from the fact that you can write
something like this:
#+title: the first part of long title
#+title: and the second part
#+include works by inserting the included document at the right place.
So the buffer ox parses looks something like this.
#+Title: main title
# ...
#+Title: sitemap
# ...
> Do you've any workaround? I dont know why orgmode is mess up my title.
Use :lines "2-", since your unwanted #+title is probably at line 1.
Rasmus
--
Er du tosset for noge' lårt!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prevent auto appending #+INCLUDE files title
2015-11-23 17:33 ` Rasmus
@ 2015-11-23 18:28 ` Manuel Koell
0 siblings, 0 replies; 5+ messages in thread
From: Manuel Koell @ 2015-11-23 18:28 UTC (permalink / raw)
To: Rasmus; +Cc: org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]
Oh, you're right!
Your example opened my eyes thanks!
Thanks a lot, Rasmus!
2015-11-23 18:33 GMT+01:00 Rasmus <rasmus@gmx.us>:
> Manuel Koell <man.koell@gmail.com> writes:
>
> > I think you got me wrong or I don't understand correctly ^^
>
> I don’t think so.
>
> > The problem is, when I export a file which uses #+INCLUDE inside, for
> > example my index.org where I want to include the latest 5 posts
> (generated
> > from sitemap.org). The exported index.html has the wrong title/h1 then:
> > <title>My title Sitemap</title>. The files I used to include append their
> > title to the index.org document then. This is not something I would
> expect
> > if I already set the #+TITLE option. Idk if this is a bug or a feature.
>
> This is a feature. Basically, it follows from the fact that you can write
> something like this:
>
> #+title: the first part of long title
> #+title: and the second part
>
> #+include works by inserting the included document at the right place.
> So the buffer ox parses looks something like this.
>
> #+Title: main title
> # ...
> #+Title: sitemap
> # ...
>
> > Do you've any workaround? I dont know why orgmode is mess up my title.
>
> Use :lines "2-", since your unwanted #+title is probably at line 1.
>
> Rasmus
>
> --
> Er du tosset for noge' lårt!
>
[-- Attachment #2: Type: text/html, Size: 2187 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-23 18:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 14:57 prevent auto appending #+INCLUDE files title Manuel Koell
2015-11-23 17:13 ` Rasmus
2015-11-23 17:28 ` Manuel Koell
2015-11-23 17:33 ` Rasmus
2015-11-23 18:28 ` Manuel Koell
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).