emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org mode export to HTML not working correctly with code blocks i


From: Thorsten Jolitz
Subject: Re: [O] Org mode export to HTML not working correctly with code blocks if block is after an item (-) and its delimiters are indented
Date: Wed, 16 Oct 2013 04:41:06 +0200
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

Omid <address@hidden> writes:

> - This does NOT export correctly (code block is not detected)
>   #+BEGIN_SRC sh
> ls
>   #+END_SRC
>
> Is there any way around this behavior without removing the indentation
> for the code block delimiters?

I think the 'official'regexp to detect a src-block starts like this

,----------------------------------
| "^\\([ \t]*\\)#\\+begin_src [...]
`----------------------------------

so I would guess that this should work, and its a bug if it doesn't.

Inside a list like this

 - First item

   #+begin_src emacs-lisp :exports both
    (+ 3 4)
   #+end_src

 - Second Item

   Some text

it should work too, lets test:

#+begin_src emacs-lisp :exports value
   (with-current-buffer
       (current-buffer)
     (org-export-as 'ascii))
#+end_src

,-----------------------------------------------------------------------
| #+results:
|                            _________________
|
|                                   427
|
|                             Thorsten Jolitz
|                            _________________
|
|
|
|
|
| 1 --text follows this line--
| ============================
|
|   Omid <address@hidden> writes:
|
|   > - This does NOT export correctly (code block is not detected)
|   > #+BEGIN_SRC sh ls #+END_SRC Is there any way around this behavior
|   > without removing the indentation for the code block delimiters?
|
|   I think the 'official'regexp to detect a src-block starts like this
|
|   ,----------------------------------
|   "^\\([ \t]*\\)#\\+begin_src [...]
|   `----------------------------------
|
|   so I would guess that this should work, and its a bug if it doesn't.
|
|   Inside a list like like this
|
|   - First item
|
|     ,----
|     | (+ 3 4)
|     `----
|
|   ,----
|   | 7
|   `----
|
|
|   - Second Item
|
|     Some text
|
|   it should work too, lets test:
|
|   ,----
|   | (with-current-buffer
|   |     (current-buffer)
|   |   (org-export-as 'ascii))
|   `----
|
|
|   -- cheers, Thorsten
`-----------------------------------------------------------------------

looks as if it works for me ...

--
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]