emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export options processed in example block
@ 2012-10-18  9:33 Nicolas Quiniou
  2012-10-18 10:32 ` Suvayu Ali
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Quiniou @ 2012-10-18  9:33 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

When I put #+TITLE in a block example and try to export an Org file in
HTML (with org-export), results are unexpected :

Org file
--
#+TITLE: Testing example block
#+begin_example
#+TITLE: My title
#+end_example

HTML file
--
[..]
<title>My title</title>
[..]

To obtain expected results, I found two solutions :
- prefix "#+TITLE: My title" with ';'
- put "#+TITLE: Testing example block" *after* "#+TITLE: My title"

To my mind, example is a protecting-block. Therefore, as mentionned in
org-protecting-blocks documentation, his content should not be
"processed as Org syntax".

Regards,
--
Emacs  : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4)
 of 2012-08-28 on shaun
Package: Org-mode version 7.9.2 (7.9.2-dist @
/usr/share/emacs/site-lisp/org/)

Value of org-exporting-blocks :
("src" "example" "latex" "ascii" "html" "docbook" "ditaa" "dot" "r" "R")

Tested with org-minimal.el.

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

* Re: Export options processed in example block
  2012-10-18  9:33 Export options processed in example block Nicolas Quiniou
@ 2012-10-18 10:32 ` Suvayu Ali
  2012-10-18 12:59   ` Nicolas Quiniou
  0 siblings, 1 reply; 4+ messages in thread
From: Suvayu Ali @ 2012-10-18 10:32 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

On Thu, Oct 18, 2012 at 11:33:33AM +0200, Nicolas Quiniou wrote:
> Hi,
> 
> When I put #+TITLE in a block example and try to export an Org file in
> HTML (with org-export), results are unexpected :
> 
> Org file
> --
> #+TITLE: Testing example block
> #+begin_example
> #+TITLE: My title
> #+end_example
> 

As far as I know org syntax in example blocks need to be protected by a
comma.  So something like this should work:

#+TITLE: Testing example block

#+begin_example
  ,#+TITLE: My title
#+end_example

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Export options processed in example block
  2012-10-18 10:32 ` Suvayu Ali
@ 2012-10-18 12:59   ` Nicolas Quiniou
  2012-10-18 14:55     ` Suvayu Ali
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Quiniou @ 2012-10-18 12:59 UTC (permalink / raw)
  To: emacs-orgmode

Le 18/10/2012 12:32, Suvayu Ali a écrit :
> So something like this should work:
> 
> #+TITLE: Testing example block
> 
> #+begin_example
>   ,#+TITLE: My title
> #+end_example

That's right. Thanks you.

Could we improve org-protecting-blocks documentation or Org manual on
that point ?

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

* Re: Export options processed in example block
  2012-10-18 12:59   ` Nicolas Quiniou
@ 2012-10-18 14:55     ` Suvayu Ali
  0 siblings, 0 replies; 4+ messages in thread
From: Suvayu Ali @ 2012-10-18 14:55 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

On Thu, Oct 18, 2012 at 02:59:05PM +0200, Nicolas Quiniou wrote:
> Le 18/10/2012 12:32, Suvayu Ali a écrit :
> > So something like this should work:
> > 
> > #+TITLE: Testing example block
> > 
> > #+begin_example
> >   ,#+TITLE: My title
> > #+end_example
> 
> That's right. Thanks you.
> 
> Could we improve org-protecting-blocks documentation or Org manual on
> that point ?
> 

It is documented in the manual; see here: 

  [[info:org#Literal%20examples][info:org#Literal examples]]

If you edit the example block with C-c ', then Org mode takes care of
the comment characters.  However I'm not sure how to tell that what you
are entering is org source when all you have is a line with keywords or
comments.

If you feel the documentation could be clearer, please feel free to send
a patch.  One immediate improvement I could think of was to include that
little discussion and footnote in the manual index under comments.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.

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

end of thread, other threads:[~2012-10-18 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  9:33 Export options processed in example block Nicolas Quiniou
2012-10-18 10:32 ` Suvayu Ali
2012-10-18 12:59   ` Nicolas Quiniou
2012-10-18 14:55     ` Suvayu Ali

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).