[Pmwiki-users] Re: Attach (was Re: spaces in uploaded files)

Christian Ridderström chr
Sun May 9 05:44:53 CDT 2004


On Sun, 9 May 2004, Steven Leite wrote:

> I've always felt that Attach: should be a directive, as in, [[Attach:]]
> or [[attach:]].

I'm of two minds here... on one hand

	Markup:				Rendered as:
	Attach:aFile.txt	->	Attach:aFile.txt	

is just like any other inter-wiki link, eg Cookbook:UploadExtended, and 
from that point of view it's consistent.

On the other hand, I agree with an earlier suggestion that I'd prefer

	Attach:aFile.txt	->	aFile.txt

so that you don't have to write [[Attach:aFile.txt aFile.txt]].

Now Steve suggests we use

	[[attach:aFile.txt]]	->	aFile.txt

and I think I like that... 

> It doesn't feel right to include it as plain text along with the other
> WikiText.  If it's special, and it's doing something (internally), it
> should be apparent from it's syntax.  I vote to have this syntax put in
> [[Square Brackets]].  Same with Attachlist .. should be [[attachlist:]].
> I prefer all lower case to be consistent with other directives.

Here's the current syntax:

  attach       ::= 'Attach:' upload-path upload-name
  attachlist   ::= '[[Attachlist:' upload-path
                                   [+ws attachlist-sort *ws] ']]'

Adding a parallell syntax for [[attach:]] should be "orthogonal" if we use 
lower case, i.e. the two alternatives can be used in parallell:

  attach2      ::= '[[attach:' upload-path upload-name ']]'

An advantage with [[attach:]] is that it easily lets you use spaces in the 
filename. If we have [[attach:]], do we still need:

	Attach:"some file name"

I don't think so... and I'll therefore implement [[attach:]], and while
I'm at it, I'll allow [[attachlist:]] as well per Steve's request.

There may still be a problem with spaces in the directory names with 
[[attachlist:]], since whitespace is the separator just before the 
optional sort argument :-)

Finally, I don't really like the word 'attachlist', can anyone think of a
better name for a directive that lists files in the upload directory, or
"lists attachments". Maybe it's that 'attachlist' is a noun, and I'd like
the word to be a verb instead?

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list