[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Regression bug in tangle/weave
From: |
Eric Schulte |
Subject: |
Re: [O] Regression bug in tangle/weave |
Date: |
Sun, 10 Jul 2011 09:46:10 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Neeum Zawan <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>> Hi,
>>
>> Indeed this example below no longer works, however I believe the new
>> behavior is both desired and permanent. I'll explain and include an
>> option for how your example could be restructured to work with the new
>> code.
>>
>> We ran into problems automatically removing trailing newlines from code
>> block bodies as in some languages (looking at you Python and Haskell)
>> things like trailing newlines are of syntactic importance. In your
>> example this behavior results in the insertion of newlines after
>> file-name and file-version. Babel is careful to preserve line prefixes
>> when expanding references in comments, so it then reproduces the
>>
>> # Generated from
>>
>> portion of that line for every line of the expanded noweb references.
>>
>> I would suggest the following alternatives, either using a data
>> references in stead of a code block reference as in the file-version
>> example below, or using an evaluated code block as in the file-name
>> example below. Hope this helps.
>
> Oh dear. Am I to blame for this?
>
> When I reported the newline issue, somewhere in the back of my mind I
> knew it probably would have some ugly consequences. Now I see them.
>
> An evaluated code block seems inelegant/confusing if one intends to
> export that code as part of the document. A data reference seems OK, but
> I take it you can't have references within it?
>
> Unfortunately, I see no easy solution...
>
In these cases, I feel that a data reference is the simplest, most
natural solution, and lightest-syntax solution in these cases, and I
don't see it as an ugly compromise. Just my opinion.
As I mentioned above I feel that the current behavior is both desired
and permanent, and I'm happy that you raised the newline issue that help
lead to this behavior.
Best -- Eric
--
Eric Schulte
http://cs.unm.edu/~eschulte/