emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] Specified colnames
Date: Fri, 12 Apr 2013 15:42:35 -0600	[thread overview]
Message-ID: <871uaffk5g.fsf@gmail.com> (raw)
In-Reply-To: 86a9p8928u.fsf@somewhere.org

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> Eric,
>
> Eric Schulte wrote:
>>> Extra question: tested with a sh block, both of the above do work, that is
>>> with strings or symbols. Which one is supposed to be better (that is, will be
>>> more portable with time), if there is one?
>>
>> Both will be maintained.  The contribution of a test exercising both
>> options could provide an extra guarantee of perseverance.  This is also
>> a good first step towards editing the code. :)
>
> Here's my trial to do so.
>
> --8<---------------cut here---------------start------------->8---
> (ert-deftest test-ob/specific-column-names-symbols ()
>   "Test passing specific column names as a list of symbols."
>   (should
>    (equal "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
>
> #+results:
> | Rev | Author |
> |-----+--------|
> |   1 | bar    |
> |   2 | baz    |
>
> "
> 	  (org-test-with-temp-text "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
> "
> 				   (org-babel-execute-src-block)
> 				   (buffer-string)))))
> --8<---------------cut here---------------end--------------->8---
>
> Does this correspond to what you're asking for?
>

Close, could you prepare this as a patch against the current code base?
That way I can simply apply it locally and more easily test it.

>
> However, running it did not succeed. I must do something wrong, or NOT do
> something good...
>
>   ╭────
>   │ Selector: t
>   │ Passed: 0
>   │ Failed: 0
>   │ Total:  0/1
>   │ 
>   │ Started at:   2013-04-08 22:45:19+0200
>   │ Aborted.
>   │ Aborted at:   2013-04-08 22:45:19+0200
>   │ 
>   │ A
>   │ 
>   │ A test-ob/specific-column-names-symbols
>   │     Test passing specific column names as a list of symbols.
>   │     aborted
>   ╰────
>
> The worse is that I don't get a backtrace, even after:
>
> - setting debug-on-error to t, or
> - M-x'ing toggle-debug-on-error.
>
> Weird, but not the first time -- seems related to Emacs 24.2 or so (+ my
> config?).
>

Integration these tests with the existing tests should help to
illuminate whatever is causing these failures.  Assuming that the
existing tests are passing on your system that is.

Cheers,

>
> Best regards,
>   Seb

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

  reply	other threads:[~2013-04-12 22:40 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 [this message]
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

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=871uaffk5g.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).