On Mon, 7 Jun 2010 17:59:26 -0700 (PDT)
thyrsus <[email protected]> wrote:

> In @root arguments (which become the last component of the file name),
> the tangle.setRootFromText() method iremoves surrounding character
> pairs <> and "", but not '', then removes any leading and trailing
> whitespace.
> 
> In @path arguments, the the g.stripPathCruft() method removes
> character pairs <>, "", and '', then removes any leading and trailing
> whitespace.
> 
> I urge that the behavior be made consistent.
> 
> Which way should it go?
> 
> Since @root is much less used than @path, there's a strong argument
> for using the @path convention.
> 
> Were I designing things from the beginning, I'd give a function to the
> quoting characters pairs that they suppress the leading and trailing
> whitespace removal - if you want whitespace removal from around the
> file name, don't quote it!

Am I understanding, that would allow you to create (or load, I guess), files 
with leading or trailing spaces in their names?

Hmm, on the one hand, why would you ever want to do that, on the other, we'd 
want Leo to be able to edit files with any valid filename, even a really odd 
one.

Seems to me the simplest thing (sort of starting from scratch) would be to 
allow either a naked filename (leading/trailing whitespace stripped), or a 
subset of python string representations, i.e. if, after the initial whitespace 
stripping, first and last character are "'" or '"', one level of such 
characters would be stripped, and the result used, regardless of further 
leading or trailing whitespace, and regardless of further characters from the 
set ['"><].

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to