emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Code blocks in lists?


From: Eric Schulte
Subject: Re: [O] Code blocks in lists?
Date: Fri, 18 May 2012 09:08:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Sebastien Vauban" <address@hidden> writes:

> Hi Nicolas,
>
> Nicolas Goaziou wrote:
>> "Sebastien Vauban" writes:
>>> As demonstrated by the following ECM, it seems that I can't put code blocks
>>> inside lists.
>>>
>>> I guess this is the same root cause as the problem I tried to described at
>>> http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00247.html.
>>>
>>> Here, the fact that it is an enumerated list makes the problem stand
>>> out.
>>
>> I still cannot reproduce it.
>>
>> What happens if you eval:
>>
>>   (let ((org-current-export-file (current-buffer)))
>>     (org-export-blocks-preprocess))
>>
>> in your buffer?
>
> * Before command
>
> --8<---------------cut here---------------start------------->8---
> 1. Download and install color-theme.
>
>    #+begin_src emacs-lisp
>    (add-to-list 'load-path "/path/to/color-theme-6.6.0")
>    (require 'color-theme)
>    #+end_src
>
> 2. Download and install color-theme-leuven.
>
>    #+begin_src emacs-lisp
>    (add-to-list 'load-path "/path/to/color-theme-leuven")
>    (require 'color-theme-leuven)
>    #+end_src
>
> 3. Restart Emacs.
> --8<---------------cut here---------------end--------------->8---
>
> * Command to execute
>
> --8<---------------cut here---------------start------------->8---
> (let ((org-current-export-file (current-buffer)))
>   (org-export-blocks-preprocess))
> --8<---------------cut here---------------end--------------->8---
>
> * After command
>
> --8<---------------cut here---------------start------------->8---
> 1. Download and install color-theme.
>
> #+BEGIN_SRC emacs-lisp 
>    (add-to-list 'load-path "/path/to/color-theme-6.6.0")
>    (require 'color-theme)
> #+END_SRC
>
> 2. Download and install color-theme-leuven.
>
> #+BEGIN_SRC emacs-lisp 
>    (add-to-list 'load-path "/path/to/color-theme-leuven")
>    (require 'color-theme-leuven)
> #+END_SRC
>
> 3. Restart Emacs.
> --8<---------------cut here---------------end--------------->8---
>
> * Summary of the changes
>
> The code blocks "meta data":
> - is indented in column 0
> - becomes uppercased
> - gets a trailing space added
>
> * Note
>
> If I go at the end of (or just below) the text "3. Restart Emacs", and press
> C-RET, I get:
>
> --8<---------------cut here---------------start------------->8---
> 3. Restart Emacs.
>
> 4. 
> --8<---------------cut here---------------end--------------->8---
>
> in the "Before command" section, while I get:
>
> --8<---------------cut here---------------start------------->8---
> 1. Restart Emacs.
> 2. 
> --8<---------------cut here---------------end--------------->8---
>
> in the "After command" section.
>
> Hence, they do not share the same view on identifying the current list.
>
> Best regards,
>   Seb

Hi Seb,

Sorry I missed the bit about `org-src-preserve-indentation', indeed
there was a bug in the block indentation during export.  I've just
pushed up a fix, please let me know if you continue to have problems.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

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