[augeas-devel] Playing with comments

Raphaël Pinson raphink at gmail.com
Mon Jul 14 19:49:33 UTC 2008


On Mon, Jul 14, 2008 at 7:46 PM, David Lutterkort <dlutter at redhat.com>
wrote:

> On Fri, 2008-07-11 at 17:22 +0200, Raphaël Pinson wrote:
> > I've been playing with comments a bit. Here is the code I've been
> > playing with. I hope it can be useful :
>
> This is really nice - my only concern is how usable that is from
> applications: now, you need to make sure that a node with a value does
> not have a 'commented' subnode - otherwise you might have changed the
> value, but have the setting still commented out.


Yes indeed. There's also still the problem of finding out what is a
commented value vs a real comment. A comment could not be declared as 'del
/#[ \t]*/ "# " . store /[^ \t][\n]*/' or so anymore since it would conflict
with the commented value. I would have to use a '-
whatever_definition_of_a_valid_value' in the regex defining the comment. As
you pointed out, it makes it a bit tricky to use because the commented flag
has to be checked for each value. On the other hand, it might slightly
improve the usability by allowing people to easily comment/uncomment
settings without losing them.


Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080714/62131f0f/attachment.htm>


More information about the augeas-devel mailing list