emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] Tiny "problems"
Date: Fri, 04 Dec 2009 22:24:47 -0700	[thread overview]
Message-ID: <m2hbs6gfhc.fsf@gmail.com> (raw)
In-Reply-To: <87vdgpzf9i.fsf@mundaneum.com> ("Sébastien Vauban"'s message of "Wed, 02 Dec 2009 14:17:45 +0100")

Hi Sébastien,

Sébastien Vauban <wxhgmqzgwmuf@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 condition                                   << OK
> pfiAuth = 1                                              << not
> AND SUBSTRING(etpCPNum, 1, 3) = "111"                    << not
> ORDER BY pfiID
> -- CP111.sql ends here
>
> Best regards,
>   Seb

  reply	other threads:[~2009-12-05  5:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 13:17 [babel] Tiny "problems" Sébastien Vauban
2009-12-05  5:24 ` Eric Schulte [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2hbs6gfhc.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).