emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Sebastien Vauban <sva-news@mygooglest.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] Specified colnames
Date: Sat, 27 Apr 2013 10:47:04 -0600	[thread overview]
Message-ID: <87obcz3oqf.fsf@gmail.com> (raw)
In-Reply-To: <86li84vtyc.fsf@somewhere.org> (Sebastien Vauban's message of "Sat, 27 Apr 2013 18:06:51 +0200")

>
> OK. That's true I've set:
>
> --8<---------------cut here---------------start------------->8---
>   ;; keep lower-case
>   (setq org-babel-results-keyword "results")
> --8<---------------cut here---------------end--------------->8---
>

If you like you could let-bind this around any future tests.

>
> since we've got nice keyword fontification -- as Carsten once said, he only
> choose uppercase keywords, a while ago, when it was much more difficult to
> clearly view the distinction between text, code and results (before the nice
> fontification we now have). Otherwise, he'd have chosen lower-case keywords.
>
> Because of that feature, which I completely had out of my mind, I'm thinking
> at another thing that could help reduce the size of the tests. Currently, we
> copy once the code block, and once the code block + its results.
>
> Maybe we could have a function to locate (via a regexp for
> #+results/#+RESULTS) the results, and only check (for strict or loose
> equality [1]) on the results.
>
> So, something along those lines:
>
> --8<---------------cut here---------------start------------->8---
> (should
>  (equal (results-part (org-babel-execute-src-block "code block only"))
>         "results only"))
> --8<---------------cut here---------------end--------------->8---
>
> No duplication of the input...
>
> Does this make sense?
>

Yes, that would be an improvement, see the other tests in that file for
examples of similar functionality.

>
>> In the future more flexible tests (such as regular expression searches)
>> rather than strict equality should be preferable.
>>
>> Thanks for contributing this test!
>
> My pleasure.
>
> Best regards,
>   Seb
>

Cheers,

>
> [1] Regexp match

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

      reply	other threads:[~2013-04-27 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07 20:11 [babel] Specified colnames Sebastien Vauban
2013-04-08 16:41 ` Eric Schulte
2013-04-08 19:45   ` Sebastien Vauban
2013-04-08 20:15     ` Eric Schulte
2013-04-08 20:49       ` Sebastien Vauban
2013-04-12 21:42         ` Eric Schulte
2013-04-18 21:25           ` Sebastien Vauban
2013-04-20 10:11             ` Eric Schulte
2013-04-25 13:28               ` Sebastien Vauban
2013-04-27 15:02                 ` Eric Schulte
2013-04-27 16:06                   ` Sebastien Vauban
2013-04-27 16:47                     ` Eric Schulte [this message]

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=87obcz3oqf.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sva-news@mygooglest.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).