[darcs-users] Suggestion: replace with regular expressions?

Albert Reiner areiner at tph.tuwien.ac.at
Mon Dec 12 16:14:23 UTC 2005


[Wolfgang Jeltsch <wolfgang at jeltsch.net>, Sun, 11 Dec 2005 23:34:38 +0100]:
> I think that darcs replace isn't powerful enough.

Give me a more powerful `darcs replace` any time!

E.g., the use of pretty printers to generate a canonical form of the
file contents for a given (say) programming language has been
discussed in the past, but then you run into problems with giving line
numbers in the user interface (which I use rarely if ever, but others
seem to find them important).  Or one might want to be able to make
replacements that span multiple lines.

> Changing identifiers can result in different layout of your code.
> If this happens, darcs replace doesn't help you.  Or am I missing
> something?

If this happens, and if layout of the code is important to you, I
don't think that `darcs replace` can help you, both now and with the
proposed two-regexp scheme.

But my proposal was aimed at expanding the possibilities of what can
be done with `darcs replace`, not the least because replace patches
should commute in a simple way, and because they capture the patch
author's intent much better than a set of line changes does.

Regards,

Albert.




More information about the darcs-users mailing list