From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [babel] Tiny "problems" Date: Wed, 16 Dec 2009 14:17:14 -0700 Message-ID: References: <87vdgpzf9i.fsf@mundaneum.com> <87ocmbyu57.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NL60j-0001DI-N7 for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 21:22:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NL60e-0001C9-Bp for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 21:22:36 -0500 Received: from [199.232.76.173] (port=47164 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL60e-0001C5-7d for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 21:22:32 -0500 Received: from mail-iw0-f188.google.com ([209.85.223.188]:40786) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NL60e-0005Ce-17 for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 21:22:32 -0500 Received: by iwn26 with SMTP id 26so1096540iwn.14 for ; Wed, 16 Dec 2009 18:22:30 -0800 (PST) In-Reply-To: <87ocmbyu57.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Mon, 07 Dec 2009 11:07:32 +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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: [...] >>> - *after* =3DC-c '=3D forth and back, all the blank lines in my source = block (in >>> my example, the one between "SET NOCOUNT ON" and "SELECT TOP 10") are= filled >>> with an amount of whitespaces (and, in my Emacs config, highlighted as >>> useless spaces). >>> >>> - the condition block is not indented properly in the tangled output fi= le; >>> only the first line is: >>> >> >> Maybe the above two issues could be fixed by setting the >> `org-src-preserve-indentation' variable's value to t. Since I only need = this >> in some org-mode buffers I set it as a buffer local variable by placing a >> line like the following at the top of these buffers. >> >> # -*- org-src-preserve-indentation: t -*- >> >> again this should/will be in the documentation somewhere... > > That's not it (already tried before posting). That variable, when set, ma= kes > Org removes the minimum common number of whitespaces. > > That does not fix the problem of useless whitespaces in blank lines, and = has > no impact on the indentation of tangled blocks: > Hi Seb, I misunderstood your indentation issue earlier. Currently I don't think we support indentation to the level of the noweb reference in the original source-code block. At first glance that does however seem to be a better default behavior. I'll look into this. As a work-around you may want to try the attached version of your file --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=seb.org # -*- org-src-preserve-indentation: t -*- * Test file Here is the main SQL script. #+srcname: CP111.sql #+begin_src sql :tangle CP111.sql -- no longer display the count message SET NOCOUNT ON SELECT TOP 10 etpNom, etpID, FROM etp WHERE etpID IN (SELECT actID FROM actions WHERE actID = 338) AND <> ORDER BY pfiID #+end_src And here the extra condition: #+srcname: Condition #+begin_src sql -- extra condition pfiAuth = 1 AND SUBSTRING(etpCPNum, 1, 3) = "111" #+end_src --=-=-= which results in this following sql file --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=CP111.sql -- generated by org-babel-tangle -- [[file:~/Desktop/seb.org::*Test%20file][CP111.sql]] -- no longer display the count message SET NOCOUNT ON SELECT TOP 10 etpNom, etpID, FROM etp WHERE etpID IN (SELECT actID FROM actions WHERE actID = 338) AND -- extra condition pfiAuth = 1 AND SUBSTRING(etpCPNum, 1, 3) = "111" ORDER BY pfiID -- CP111.sql ends here --=-=-= Best -- Eric --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--