From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [babel] Verbatim output from SQL command Date: Wed, 19 Oct 2011 11:19:55 +0200 Message-ID: <808vohbao4.fsf@somewhere.org> References: <80mxcymo6a.fsf@somewhere.org> <87k4822s4a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: 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: >> Babel seems to interpret every *leading space* as *one empty column*. >> Normal, feature, bug? >> >> Is there some workaround to this? I thought stating "scalar" would really >> completely override any interpretation... > > I've just pushed up a fix which should resolve this issue. It does better things, but at least at the wrong place. --8<---------------cut here---------------start------------->8--- #+BABEL: :engine msosql :cmdline -S -U -P -d -n -w 700 :results output #+begin_src sql :eval yes :results scalar EXEC sp_helptext 'reset_me' #+end_src --8<---------------cut here---------------end--------------->8--- becomes, after evaluation (indented for the sake of clarity): --8<---------------cut here---------------start------------->8--- #+BABEL: :engine msosql :cmdline -S -U -P -d -n -w 700 :results output Text --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CREATE PROCEDURE reset_me @pfi varchar(16) AS BEGIN PRINT 'Done!' END #+begin_src sql :eval yes :results scalar EXEC sp_helptext 'reset_me' #+end_src #+results: #+begin_example #+BABEL: :engine msosql :cmdline -S -U -P -d -n -w 700 :results output Text --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CREATE PROCEDURE reset_me @pfi varchar(16) AS BEGIN PRINT 'Done!' END #+begin_src sql :eval yes :results scalar EXEC sp_helptext 'reset_me' #+end_src #+end_example --8<---------------cut here---------------end--------------->8--- In short, it seems that: - results is inserted at point's position (in the above case, I was using the eval speed command `e', thus being at #). - the results is duplicated, with some part of the source buffer being repeated as well... See the presence of 2 `#+BABEL:' lines in the buffer, after the evaluation. - depending on the point from which I run the code evaluation, there is (or there isn't) an `#+begin_example' directive. The `#+end_example' is always present. Best regards, Seb -- Sebastien Vauban