Re: [Orgmode] [babel] Tiny problems

2009-12-05 Thread Dan Davison
Eric Schulte schulte.e...@gmail.com writes:

 Hi Sébastien,

 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 [...]

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

[...]
 - *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).

This is a minor bug in org-src.el. When I was looking at that code last
I couldn't see a clean way to fix it.

Dan

p.s. As was mentioned in a couple of other posts recently, I also wonder
whether we should think of creating an org-mode bug repository so that
minor things like this don't get forgotten (I did mention this bug on
list once; maybe Carsten has it tracked somewhere).


___
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


Re: [Orgmode] [babel] Tiny problems

2009-12-04 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

[...]

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

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


The syntax highlighting is really just org-mode comment highlighting,
and I don't know that it would be desirable to start highlighting
comments which don't start at the beginning of a line.

Maybe once babel is able to recognize #+source: and #+results: lines
which don't start at column 0 -- currently it doesn't -- then it would
make sense from a babel perspective to put some pressure on the syntax
coloring.


 - *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:


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...

Best -- Eric


 -- 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 conditionOK
 pfiAuth = 1   not
 AND SUBSTRING(etpCPNum, 1, 3) = 111 not
 ORDER BY pfiID
 -- CP111.sql ends here

 Best regards,
   Seb


___
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


[Orgmode] [babel] Tiny problems

2009-12-02 Thread Sébastien Vauban
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 conditionOK
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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode