From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: [babel] Tiny "problems" Date: Fri, 18 Dec 2009 10:12:44 +0100 Message-ID: <87pr6cabn7.fsf@mundaneum.com> References: <87vdgpzf9i.fsf@mundaneum.com> <87ocmbyu57.fsf@mundaneum.com> <87zl5im0mb.fsf@mundaneum.com> <87vdg5lluu.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Eric, "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: >>> >>> In fact, a better specification is: copy whatever (any character) is in >>> front of `<<>>' in front of every line of the referenced blo= ck >>> (same amount of characters, be it spaces or something else). >>> >>> That way, a commented SQL source block like the following would be >>> correctly outputted: >>> >>> -- -- set flag >>> -- UPDATE dossier >>> -- SET DossierSentToSector =3D @now >>> -- WHERE ID >>> -- IN (SELECT actID_fk >>> -- FROM actions >>> -- WHERE (actID =3D 338 AND actEtat =3D 3)) >>> -- AND F1SignDate < @firstDayOfThisMonth >>> -- AND DossierSentToSector IS NULL >>> -- AND >>> -- <> >>> >>> Currently, the first line of the "condition" block is commented, the >>> others not, resulting in incorrect code being tangled. >>> >>> With the above "spec", I guess all cases are covered. What do you think? >> >> I like it a lot, I'll add this to the TODO. Thanks -- Eric > > I just pushed up a commit which should implement your idea mentioned belo= w. > > Please try it out and let me know if it doesn't work as expected. Simply perfect! The only impact is that we cannot expect a multi-line block to be correctly exported in the following case: --8<---------------cut here---------------start------------->8--- -- set flag UPDATE dossier SET DossierSentToSector =3D @now WHERE ID IN (SELECT actID_fk FROM actions WHERE (actID =3D 338 AND actEtat =3D 3)) AND F1SignDate < @firstDayOfThisMonth AND DossierSentToSector IS NULL AND <> --8<---------------cut here---------------end--------------->8--- Because `AND' would be copied in front of every line, which may not be OK. But, for me, that's both perfectly comprehensible and perfectly acceptable. Would the source block be mono-line, the above must perfectly work. Do we agree on this? Thank you very much, anyway, for this very nice fix, which fixes the above problem of commented block, and the indentation one... 2 flies with 1 stone. Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode