From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [Babel] Need for an extra literal block construct Date: Fri, 19 Nov 2010 22:36:08 +0000 Message-ID: <87mxp5q6uf.fsf@gmail.com> References: <87zkvhoh18.fsf@mundaneum.com> <87fwx5c98w.fsf@gmail.com> <87sk14p6y6.fsf@mundaneum.com> <87mxrbdyhs.fsf@gmail.com> <87tylfsd7h.fsf@mundaneum.com> <4C9D1196.8030309@gmail.com> <87r5gfppob.fsf@mundaneum.com> <8039qxmojd.fsf_-_@mundaneum.com> <4CE694F1.2050409@christianmoe.com> <8039qx3wff.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33886 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJZZp-0001C1-9U for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 17:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJZZn-0003A2-Vb for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 17:37:05 -0500 Received: from plane.gmane.org ([80.91.229.3]:59847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJZZn-00038j-In for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 17:37:03 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1PJZZk-0007KZ-1M for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 23:37:00 +0100 In-Reply-To: <8039qx3wff.fsf@missioncriticalit.com> (=?utf-8?Q?=22S=C3=A9b?= =?utf-8?Q?astien?= Vauban"'s message of "Fri, 19 Nov 2010 21:12:04 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org 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=C3=A9bastien Vauban writes: > Hi Christian, > > Christian Moe wrote: >>> Along this (still open -- at least, I hope so) discussion, I have a req= uest >>> for a new literal block. >>> >>> Currently, when looking at http://orgmode.org/manual/Literal-examples.h= tml, we >>> see we only have two "environments" that keep line breaks as they are i= n 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 >
(update this-var)
> (echo "OK")
> 
> #+end_example > > > * Example > > ** Source > > #+begin_example >>> Does it work? >> >> Yes, if you: >> - update =3Dthis-var=3D >> - restart > > OK. Confirmed, but you need to: > 1. delete the =3Dcache=3D. > 2. redo it. > > Thanks to: > - you > - me > #+end_example > > > ** Results > > #+begin_example >
>> Does it work?
> >
> > Yes, if you:
> > - update =3Dthis-var=3D
> > - restart
>
> OK. Confirmed, but you need to:
> 1. delete the =3Dcache=3D.
> 2. redo it.
>
> Thanks to:
> - you
> - me
> 
> #+end_example > > > * Verse > > ** Source > > #+begin_verse >>> Does it work? >> >> Yes, if you: >> - update =3Dthis-var=3D >> - restart > > OK. Confirmed, but you need to: > 1. delete the =3Dcache=3D. > 2. redo it. > > Thanks to: > - you > - me > #+end_verse > > > ** Results > > #+begin_example >

> >> Does it work?
> >
> > Yes, if you:
> > > - update this-var
> > - restart
>
> OK. Confirmed, but you need to:
>

    >
  1. > delete the cache.
    >
  2. > >
  3. > redo it.
    >
    > Thanks to:
    >
  4. >
  5. > you
    >
  6. >
  7. > me
    >

    > #+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