[sork] Patch for vacation forwards-driver (.forward-parser)
Eric Rostetter
eric.rostetter at physics.utexas.edu
Tue Apr 6 09:25:18 PDT 2004
Quoting Espen Jürgensen <espen at hhkol.dk>:
> I suppose you by 'all .forward files' mean only those, which are generated
> by Vacation and Forward?
Yes, and by all drivers that create .forward files in those modules. But
you also need to be able to at least tell and react if the .forward file
isn't in the format they generate.
> I am pretty sure the parser can't handle every
> existing kind of .forward file, but there isn't really any particular need
> for that.
It must at least be able to handle any thing these modules generate, and
to recognize and have a resolution for those that are not in that format.
This includes things like End of Line characters (or lack thereof), handling
backquotes properly, etc.
> The parser should be able to handle unrecognisable content in a graceful
> way. That means either:
Yes.
> 1) Raise a warning about 'Unrecognisable content' and discard it when saving
> .forward
Or, raise a warning about the content, and refuse to over-write it.
> 2) Save the unrecognisable content in a buffer and save it along with
> changes
But this is full of problems. Simple examples: do you put the new code
before of after the old code? Or mix it in between?
> I'm currently going for 1, but that's only because it's easier.
I really hate discarding user data. So I'm not happy with #1. Maybe
a modified #1 that doesn't take any action if unknown data is found
would be better?
> The parser is certainly pretty simple, but I can't see any way it can do any
> harm. It should be a step in the right direction. If there are situations
> where it fails please let me know, so I can improve it.
I've yet to look at it.
> Regards,
> Espen
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Why get even? Get odd!
More information about the sork
mailing list