emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: code blocks with multiple word names create single word res


From: Sebastien Vauban
Subject: Re: [O] Bug: code blocks with multiple word names create single word result-blocks leading to collisions [8.2.10 (8.2.10-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20141013/)]
Date: Wed, 18 Feb 2015 14:59:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Joost Helberg wrote:
> "Sebastien" == Sebastien Vauban <address@hidden> writes:
>> Joost Helberg wrote:
>>> noweb-syntax allows blanks in names of code blocks.
>
>> Are you sure?  Where did you read that?
>
> It's in https://www.cs.tufts.edu/~nr/noweb/johnson-lj.pdf.

Well, that's the real noweb, not Org's partial implementation.

> In org-mode it works as specified; the noweb expansion of names with
> multiple words works fine.
>
>>> The result-blocks of these code blocks are named as well, but have
>>> everything behind the first word stripped. This leads to
>>> result-block collisions in case there are two code blocks starting
>>> with the same word.
>
>> Quite logic if, in fact, it just reads the first token... which is
>> what happens, IIUC.
>
> I expect it to read the full name, which may have more than one word.
>
>> Of course, you could expect to get an error or warning reported.
>
> In order to run snippets of code which are also in use as noweb-items,
> it's currently impossible to use names with multiple words where the
> first word collides with other names. My patch allows the use of code
> blocks with sentences as names hence enjoying the literate in literate
> programming a lot more.
>
> I fail to see a reason for the result-blocks to have only one-word
> names, it doesn't break anything if these carry the full name of the
> code block.

I understand you may desire that, and that it can be useful, but I'm not
sure whether this is so obvious to implement.

Nicolas will certainly give you more information on that.

Best regards,
  Seb

-- 
Sebastien Vauban



reply via email to

[Prev in Thread] Current Thread [Next in Thread]