Hi,

On 2018-03-14 13:49, Nicolas Goaziou wrote:
Vladimir Panteleev <thecybersha...@gmail.com> writes:
I agree that it is strange. I mentioned it (and its strangeness) in
the cover-letter. The documentation of org-sbe describes it as well.

AFAICT, it doesn't. "org-sbe" describes a dollar _prefix_, but yours
stands on its own. It prefixes nothing.

I wrote about this in the cover letter too. $"foo" and $ "foo" are both the same thing. In both cases, they are two distinct lisp tokens. The way $ is presented as a string/reference "prefix" is through convention only.

Or are you objecting on stylistic grounds, that the test case from my patch doesn't follow the convention of omitting whitespace after the $ token, thus making it look like a prefix? This is, of course, subjective, but I would prefer to not perpetuate the illusion that $"foo" is some magical Emacs Lisp language syntax for a new kind of string literal, at least in the test suite.

Also, it seems to apply only to
cell's references, whereas your example provides a strings which is
clearly not a reference. I'm confused.

The references are substituted with string literals before the $-prefix handling occurs. This is why it doesn't work with ranges.

I agree that it is all very confusing, and there is a lot of room for improvement. That doesn't stand in the way of this patch series, though.

What happens if you use (org-sbe "identity" (x ...)) instead?

No difference. As can be seen from org-sbe's implementation, the normalization of symbols and string literals occurs before attempting to resolve references.

--
Best regards,
 Vladimir

Reply via email to