emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Tiny "problems"
@ 2009-12-02 13:17 Sébastien Vauban
  2009-12-05  5:24 ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sébastien Vauban @ 2009-12-02 13:17 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Here is the Org file is use to illustrate my saying:

--8<---------------cut here---------------start------------->8---
* 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
              <<Condition>>
          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
--8<---------------cut here---------------end--------------->8---

Here the "problems" (details, though) I've observed:

- srcname must be in column 0 for the highlighting to be correct.

- *after* =C-c '= 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 file;
  only the first line is:

--8<---------------cut here---------------start------------->8---
-- generated by org-babel-tangle
-- [[id:d7557df2-6921-428f-8433-68fad551abec][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                                   << OK
pfiAuth = 1                                              << not
AND SUBSTRING(etpCPNum, 1, 3) = "111"                    << not
ORDER BY pfiID
-- CP111.sql ends here
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sébastien 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-12-18 18:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-02 13:17 [babel] Tiny "problems" Sébastien Vauban
2009-12-05  5:24 ` Eric Schulte
2009-12-05 17:57   ` Dan Davison
2009-12-07 10:10     ` Sébastien Vauban
2009-12-07 10:07   ` Sébastien Vauban
2009-12-16 21:17     ` Eric Schulte
2009-12-17  9:05       ` Sébastien Vauban
2009-12-17 14:24         ` Sébastien Vauban
2009-12-17 16:58           ` Eric Schulte
2009-12-17 18:23             ` Eric Schulte
2009-12-18  9:12               ` Sébastien Vauban
2009-12-18 18:48                 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).