emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Vladimir Panteleev <thecybershadow@gmail.com>
Cc: emacs-orgmode@gnu.org, Vladimir Panteleev <git@thecybershadow.net>
Subject: Re: [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in arguments
Date: Sun, 18 Mar 2018 23:24:31 +0100	[thread overview]
Message-ID: <87a7v5c99c.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <d1d7f4fc-1ec9-a517-58e1-c1f7e5189d9f@gmail.com> (Vladimir Panteleev's message of "Wed, 14 Mar 2018 16:23:58 +0000")

Hello,

Vladimir Panteleev <thecybershadow@gmail.com> writes:

> On 2018-03-14 15:00, Nicolas Goaziou wrote:

>> I disagree. You are testing an implementation detail here: the fact that
>> "$" is not necessarily a prefix. According to the docstring, it should
>> be, so the test should use that, too. What if we rewrite `org-sbe' at
>> some point?
>
> I'm sorry if I didn't explain it properly in my previous messages.
> I'll try again.
>
> The fact that $"foo" and $ "foo" mean the same thing is not an
> implementation detail of org-sbe. It is a consequence of Emacs Lisp
> grammar.

[...]

> So, whether the test case has a space between $ and "a\"b\"c" is as
> relevant as whether it has comments, or uses tabs instead of spaces
> for indentation.
>
> I hope this explanation can put this issue to rest.

We're clearly mis-communicating. I know the difference between a symbol
and a string, and how `read' operates. I think what puzzles me is some
design choices made in `org-sbe', and the fact that the second note of
its docstring is clear as mud.

> org-sbe's docstring is misleading:

I agree.

> $ is not a way to quote just table references, but any string literals
> in general. Had it been otherwise (i.e. $-prefixing being part of the
> table reference syntax), there would be no way to pass a string
> literal (which isn't an interpolated table cell value) to the
> indicated function. The doc string should probably be improved in this
> regard.

I consider it to be a bug if you need to write $"string" instead of
"string" in any `org-sbe' call. We should not test such a mis-feature,
which should be removed.

> Adding a test which uses a table reference instead of a string literal
> won't hurt, but it would be testing several layers at once, and,
> assuming cell value interpolation into emacs lisp table formulas is
> already tested somewhere else, superfluous.

Let me insist on this. $"string" (or $ "string") is very wrong. Please
do not write your tests on top of this. IIUC, `org-sbe' is about passing
table fields into source blocks. Let's test that instead, with a table,
and a source block. I don't mind superfluous coverage.

It is just a matter of tests. Your changes sound good. So, would you
mind adjusting your tests so we can move forward?

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2018-03-18 22:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 22:58 [PATCH 0/3] org-sbe fixes Vladimir Panteleev
2018-03-07 22:58 ` [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in arguments Vladimir Panteleev
2018-03-12 23:15   ` Nicolas Goaziou
2018-03-13 19:16     ` Vladimir Panteleev
2018-03-14 13:49       ` Nicolas Goaziou
2018-03-14 14:03         ` Vladimir Panteleev
2018-03-14 15:00           ` Nicolas Goaziou
2018-03-14 16:23             ` Vladimir Panteleev
2018-03-18 22:24               ` Nicolas Goaziou [this message]
2018-03-18 22:43                 ` Vladimir Panteleev
2018-03-18 23:30                   ` Nicolas Goaziou
2018-03-19  0:23                     ` [PATCH v2 0/3] org-sbe fixes Vladimir Panteleev
2018-03-19  0:23                       ` [PATCH v2 1/3] ob-table: Fix org-sbe's handling of quotes in cell values Vladimir Panteleev
2018-03-19  0:23                       ` [PATCH v2 2/3] ob-table: Fix org-sbe's handling of list arguments Vladimir Panteleev
2018-03-19  0:23                       ` [PATCH v2 3/3] ob-table: Mention passing ranges as lists in org-sbe's documentation Vladimir Panteleev
2018-03-19 23:07                       ` [PATCH v2 0/3] org-sbe fixes Nicolas Goaziou
2018-03-25 18:24                         ` Alan Schmitt
2018-03-25 20:26                           ` Nicolas Goaziou
2018-03-25 20:40                             ` Vladimir Panteleev
2018-03-25 21:06                               ` Nicolas Goaziou
2018-03-25 22:08                                 ` Vladimir Panteleev
2018-03-26 20:16                                   ` Nicolas Goaziou
2018-03-26 21:33                                     ` Vladimir Panteleev
2018-03-26 21:42                                       ` Nicolas Goaziou
2018-03-26 21:53                                         ` Vladimir Panteleev
2018-03-27  6:21                                           ` Nicolas Goaziou
2018-03-26  8:12                                 ` Alan Schmitt
2018-03-26 21:40                                   ` Nicolas Goaziou
2018-03-27  1:01                                     ` Bastien
2018-03-07 22:58 ` [PATCH 2/3] ob-table: Fix org-sbe's handling of list arguments Vladimir Panteleev
2018-03-07 22:58 ` [PATCH 3/3] ob-table: Mention passing ranges as lists in org-sbe's documentation Vladimir Panteleev

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=87a7v5c99c.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=git@thecybershadow.net \
    --cc=thecybershadow@gmail.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).