emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: [Babel] Need for an extra literal block construct


From: Dan Davison
Subject: [Orgmode] Re: [Babel] Need for an extra literal block construct
Date: Fri, 19 Nov 2010 22:36:08 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)


Hi Seb,

In addition to the Org example, would you mind supplying a concise,
explicit statement of what the putative bug is? With just the Org
example on its own, the bug is implicit and I at least feel that I'm
having to work hard to get there!

Dan

p.s. However, your emails did motivate the following trivial function a
few months ago which I now use every day for various purposes.

(defun dan/switch-to-org-scratch ()
  "Switch to a temp Org buffer.
If the region is active, insert it."
  (interactive)
  (let ((contents
         (and (region-active-p)
              (buffer-substring (region-beginning)
                                (region-end)))))
    (find-file "/tmp/org-scratch.org")
    (if contents (insert contents))))

Sébastien Vauban <address@hidden>
writes:

> Hi Christian,
>
> Christian Moe wrote:
>>> Along this (still open -- at least, I hope so) discussion, I have a request
>>> for a new literal block.
>>>
>>> Currently, when looking at http://orgmode.org/manual/Literal-examples.html, 
>>> we
>>> see we only have two "environments" that keep line breaks as they are in the
>>> Org buffer, that is SRC and EXAMPLE, both mapped in HTML to PRE.
>>
>> There's VERSE, too.
>
> #+TITLE:     Is VERSE a real PRE environment?
> #+DATE:      2010-11-19
> #+LANGUAGE:  en_US
>
> If VERSE was really handled "verbatim" (for lists, etc.), then, yes,
> definitively, I don't need a new "environment" for emails. Was forgetting
> about that one, thanks for the reminder!
>
> Though, if the following is not a bug, but a deliberative choice, then no,
> it's not what I'm looking for...
>
> * Source block
>
> ** Source
>
> #+begin_src emacs-lisp
> (update this-var)
> (echo "OK")
> #+end_src
>
> ** Results
>
> #+begin_example
> <pre class="src src-emacs-lisp">(update this-var)
> (echo <span class="org-string">"OK"</span>)
> </pre>
> #+end_example
>
>
> * Example
>
> ** Source
>
> #+begin_example
>>> Does it work?
>>
>> Yes, if you:
>> - update =this-var=
>> - restart
>
> OK. Confirmed, but you need to:
> 1. delete the =cache=.
> 2. redo it.
>
> Thanks to:
> - you
> - me
> #+end_example
>
>
> ** Results
>
> #+begin_example
> <pre class="example">&gt;&gt; Does it work?
> &gt;
> &gt; Yes, if you:
> &gt; - update =this-var=
> &gt; - restart
>
> OK. Confirmed, but you need to:
> 1. delete the =cache=.
> 2. redo it.
>
> Thanks to:
> - you
> - me
> </pre>
> #+end_example
>
>
> * Verse
>
> ** Source
>
> #+begin_verse
>>> Does it work?
>>
>> Yes, if you:
>> - update =this-var=
>> - restart
>
> OK. Confirmed, but you need to:
> 1. delete the =cache=.
> 2. redo it.
>
> Thanks to:
> - you
> - me
> #+end_verse
>
>
> ** Results
>
> #+begin_example
> <p class="verse">
> &gt;&gt; Does it work?<br/>
> &gt;<br/>
> &gt; Yes, if you:<br/>
>
> &gt; - update <code>this-var</code><br/>
> &gt; - restart<br/>
> <br/>
> OK. Confirmed, but you need to:<br/>
> </p><ol>
> <li>
> delete the <code>cache</code>.<br/>
> </li>
>
> <li>
> redo it.<br/>
> <br/>
> Thanks to:<br/>
> </li>
> <li>
> you<br/>
> </li>
> <li>
> me<br/>
> </p>
> #+end_example
>
>
> ** Right thing or wrong thing?
>
> The verse "mail" is badly translated into HTML:
>
> 1. lists are not copied "verbatim" in the PRE
> 2. they're even wrong: mix of OL and UL, because there is no ending /OL...
>
> While the second is clearly a bug, what about the first point?
>
> Best regards,
>   Seb




reply via email to

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