9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 17:58 [9fans] spaces in file/dir names? (and acme)? Fco.J.Ballesteros
@ 2002-05-30 17:10 ` Sam
  0 siblings, 0 replies; 42+ messages in thread
From: Sam @ 2002-05-30 17:10 UTC (permalink / raw)
  To: 9fans

Userland needs file names?  What?

On Thu, 30 May 2002, Fco.J.Ballesteros
wrote:

> > Vowels in file names are a curse!  All filenames should have only
> > upper case consonents!  Compare:
> >
> > 	readme.text to RDM.TXT
> >
> > Nuff said!
>
> touche.
> I'll be using qids as file names since now on, as a penitence.
>



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 17:58 Fco.J.Ballesteros
  2002-05-30 17:10 ` Sam
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-05-30 17:58 UTC (permalink / raw)
  To: 9fans

> Vowels in file names are a curse!  All filenames should have only
> upper case consonents!  Compare:
>
> 	readme.text to RDM.TXT
>
> Nuff said!

touche.
I'll be using qids as file names since now on, as a penitence.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-06-06 10:29 Fco.J.Ballesteros
@ 2002-06-06 10:48 ` Axel Belinfante
  0 siblings, 0 replies; 42+ messages in thread
From: Axel Belinfante @ 2002-06-06 10:48 UTC (permalink / raw)
  To: 9fans

The approach could work, but currently I only edit
(because I only see) one path element at a time --
we would have to remember some 'context' information
(names of parent directories).
For the general case probably substfs should build its
own file tree structure (in a demand driven, lazy, way)
(based on the remote one combined with editing script(s)),
use that structure for the directory structure shown to its
user, and use the remote server to access the real data.

I'll send the current code off-line.

Axel.

> Hmm, assuming you have an mp3info like program (which is actually
> inside the mad mp3 player that I'm using in Plan 9) you could generate
> a translation table for your file system. Something like:
>
> translate ' ' to '_' # general case
> translate '/a/b/x.mp3' to 'The Best of Alan Parsons'
> translate '/a/b/y.mp3' to 'All You Wanted to Listen from Alan Parsons'
>
> The table could be generated offline by a script, perhaps.
>
> Regarding the source code, I'd still like to take a look, just for fun.




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-06 10:29 Fco.J.Ballesteros
  2002-06-06 10:48 ` Axel Belinfante
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-06-06 10:29 UTC (permalink / raw)
  To: 9fans

Hmm, assuming you have an mp3info like program (which is actually
inside the mad mp3 player that I'm using in Plan 9) you could generate
a translation table for your file system. Something like:

translate ' ' to '_' # general case
translate '/a/b/x.mp3' to 'The Best of Alan Parsons'
translate '/a/b/y.mp3' to 'All You Wanted to Listen from Alan Parsons'

The table could be generated offline by a script, perhaps.

Regarding the source code, I'd still like to take a look, just for fun.

thanks


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-06-06  8:11 Fco.J.Ballesteros
@ 2002-06-06 10:22 ` Axel Belinfante
  0 siblings, 0 replies; 42+ messages in thread
From: Axel Belinfante @ 2002-06-06 10:22 UTC (permalink / raw)
  To: 9fans

[I started this as an off-list reply (the 'w.r.t the code' part at the end);
 then I started talking about how 'substfs' works, and decided to send it
 to the list, because it seemed suited there as well. It got a bit long:-( ]

> :  To solve my particular case at hand (playing mp3 files made available
> :  via u9fs, where I don't want to do any special work at the remote end),
> :  I resorted to writing (hacking) what I've named so far 'substfs',
> :  ...
> :  When it is slightly more complete (and there is interest?)
>
> I'd love both to take a look at it and to try it.
> Another use would be to use mp3info as one of your edit
> programs to replace file names
> with the author/title kept inside the mp3.

I'm learning now -- thanks! -- I had not realized there is that info
in mp3 (but now that you mention it, I recall seeing it displayed).
Still, we have to see how easy it is to add to the current approach
I have taken.
Right now the 'substfs' just gets a 9p message from the user,
edits it if needed, forwards it to the remote server (e.g. u9fs),
gets the response from the remote server, edits it if needed,
and returns the (potentially edited) response to the user.
Editing is only done on file names.
So, there is a clear one-to-one mapping between messages.
I'm aware of the fact that this may break, e.g. when editing
the data of a read on a big directory edits it such that
the new filenames are so much longer that the edited data no
longer fits in a single message. It's just a prototype.
The right solution would probably be to keep slightly more
state in substfs.
Also, substfs does just use/handle the fids and qids of the
user resp. the remote server.
This means that if substfs wants to do its 'own' requests to
the remote fs (like: to get (part of) the mp3 data to get to
the mp3 info), it has to choose fids that do not conflict with
those of the user.

Still, an interesting question is whether I could use this
approach for the 'file system stacking problem' I asked
about on the list, about a year ago. The idea of stacking
was the following:
to have one file server (A) that generates a file system
with a regular structure (like the tcp directories in /net or
the mail message directories of upas/fs), and then have a
second file server (B) that adds a file to each of the
subdirectories generated by A, where the name of the
new (added) file is the same for all the subdirectories,
but the contents of the new files depend on the contents
of one or more of the 'original' files in the directory.
And, Ideally, achieving this all in B without having to
make special provisions in A.
The basic idea/question was to use (combine) file servers
in the same way as (text) filters are used in a pipe line.
Some of the replies I got then included references to
existing code that does something like this already;
at that time I only had a look at that code but did
not do anything more -- and I haven't had a recent look at
that code while working on substfs -- probably I should have.


W.r.t. the code -- if you don't mind seeing code that might benefit
from some good reviewing I can send you it 'as is' (as I'm using it
right now), because, of course I would like to clean it up before
'general distribution', but on the other hand it is sort-of working
(sufficiently well for my needs) right now, so I fear it might
take a while before I get to cleaning up.

Regards,
Axel.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-06  8:11 Fco.J.Ballesteros
  2002-06-06 10:22 ` Axel Belinfante
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-06-06  8:11 UTC (permalink / raw)
  To: 9fans


:  To solve my particular case at hand (playing mp3 files made available
:  via u9fs, where I don't want to do any special work at the remote end),
:  I resorted to writing (hacking) what I've named so far 'substfs',
:  ...
:  When it is slightly more complete (and there is interest?)

I'd love both to take a look at it and to try it.
Another use would be to use mp3info as one of your edit programs
to replace file names
with the author/title kept inside the mp3.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-05 18:39 Geoff Collyer
  0 siblings, 0 replies; 42+ messages in thread
From: Geoff Collyer @ 2002-06-05 18:39 UTC (permalink / raw)
  To: 9fans

> [...] and have people who want to uses spaces in file names go through
> a little extra work to use these tools

I think the real problem is that people who *don't* want to use spaces
(or other odd characters) in file names have to do extra work to cope
with files created by those who do want to use spaces.  and as rog and
others observed more clearly, shell and acme quoting are the least of
the problems.  I too was relieved upon first reading intro(2) to see
whitespace in file names banned.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-05 17:55 rog
  0 siblings, 0 replies; 42+ messages in thread
From: rog @ 2002-06-05 17:55 UTC (permalink / raw)
  To: 9fans

> it's entirely reasonable to optimize for the comman (and
> in this case, simple) case, and have people who want to
> uses spaces in file names go through a little extra work
> to use these tools. it would seem a much more tractable
> problem to make acme/plumbing deal with exact text
> strings - as they pretty much do already - which might
> include spaces than to try and have them figure out
> where the magic delimiters are.

but by using a special "space" character to represent spaces in
filenames you get all your desirable behaviour for free, and don't
have to worry about broken up text (rc-style quotes aren't
synchronisable which doesn't mix well with the generally editable text
in acme and rio), the fact you can no longer parse filenames with sed
or awk, or the visual confusion of having something that looks like
two filenames but is in fact one.  (should acme quote the filename in
its tag text?)

god knows how many times i've written stuff like:

	du -a . | awk '{print $2}'

or (in inferno)

	(n, toks) := sys->tokenize(line, " \t\n");
	filename := hd toks;

by making a literal space illegal in filenames, many things are
simplified; conversely if it's legal, many old assumptions are
potentially broken, and a fair amount of code becomes gratuituously
more complex and error-prone.

i was so happy when i first read that plan 9 didn't allow spaces in
its filenames, "hurray, i can use the backquote operator and not worry
about it!".  i hope we don't have to go back to the old days.

  cheers,
    rog.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-05 17:04 anothy
  0 siblings, 0 replies; 42+ messages in thread
From: anothy @ 2002-06-05 17:04 UTC (permalink / raw)
  To: 9fans

//the things that break are mainly things like
//plumbing and acme tag windows, which derive their
//power from the fact that they treat all text
//equally and _don't_ have to worry about
//complex state like quoting.

but wouldn't it be reasonable for acme/plumbing/etc. to
hold onto this assumption, unless instructed otherwise?
i mean, sure, i don't want the default text expansion to
go looking for quotes every time i click, but we can
already override the default text expansion by sweeping
out the exact text we want.

it's entirely reasonable to optimize for the comman (and
in this case, simple) case, and have people who want to
uses spaces in file names go through a little extra work
to use these tools. it would seem a much more tractable
problem to make acme/plumbing deal with exact text
strings - as they pretty much do already - which might
include spaces than to try and have them figure out
where the magic delimiters are.
ア


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-05 13:46 Russ Cox
  0 siblings, 0 replies; 42+ messages in thread
From: Russ Cox @ 2002-06-05 13:46 UTC (permalink / raw)
  To: 9fans

> > Everything starts to break when you deal with spaces
> > in file names.

> I find that interesting since it sounds like regression instead of
> progress.

this is a stupid discussion, but who am i to stop it?

the things that break are mainly things like
plumbing and acme tag windows, which derive their
power from the fact that they treat all text
equally and _don't_ have to worry about
complex state like quoting.  for example, if i
click on this line:

	/usr/rsc/lib/profile

in acme, i don't want it to expand the selection back
and forward until it hits the two apostrophes in my
do not contractions.  so in those contexts, spaces
in file names do break everything.

my point was that acme (and to a lesser extent,
plumbing) don't interact well with spaces in file names.
this is a fundamental problem.

you can pick your poison.  acme employs sensible
defaults that make my editing and interaction with
the system a whole lot easier.  i won't give them up
just to get spaces in my file names.

russ


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-06-03 16:05 ` Dan Cross
@ 2002-06-05 10:05   ` Douglas A. Gwyn
  0 siblings, 0 replies; 42+ messages in thread
From: Douglas A. Gwyn @ 2002-06-05 10:05 UTC (permalink / raw)
  To: 9fans

Dan Cross wrote:
> Perhaps if you use the Unicode space symbol, no one will be able to
> listen to it.

? In Unicode space, no one can hear you scream?


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 17:03 ` Lucio De Re
@ 2002-06-05  9:55   ` Douglas A. Gwyn
  0 siblings, 0 replies; 42+ messages in thread
From: Douglas A. Gwyn @ 2002-06-05  9:55 UTC (permalink / raw)
  To: 9fans

Lucio De Re wrote:
> ... I suppose the word delimiter on the command line could have
> been something less convenient...

That just changes the symptoms.
For fully general processing of "arguments" in the presence of
special-character handling, some form of "escape" is necessary
to prevent unwanted special-character handling.  However, that
in general also requires use of an additional special character.
Just one character can suffice to escape a whole raft of s.c.s.
It helps immensely if different apps that might be used in
conjunction employ *different* escapes (and s.c.s); if you have
ever seen a Unix shell script generating a troff macro, with
perhaps 16 \s in a row needed to get it to collapse to one \ at
the stage where it is needed, you can appreciate the problem.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 16:30 rsc
  2002-05-30 16:35 ` Axel Belinfante
@ 2002-06-05  9:54 ` Douglas A. Gwyn
  1 sibling, 0 replies; 42+ messages in thread
From: Douglas A. Gwyn @ 2002-06-05  9:54 UTC (permalink / raw)
  To: 9fans

rsc@plan9.bell-labs.com wrote:
> Everything starts to break when you deal with spaces
> in file names.

I find that interesting since it sounds like regression instead of
progress.
On Unix, the only real problem with spaces in file names was in avoiding
inappropriate parsing of arguments on shell command lines, usually
addressed
by 'quoting'.  Note also that the "xargs" utility, otherwise extremely
useful, was misimplemented in that it did not quote arguments before
invoking commands via a subshell.  (Proper quoting is tricky since there
can be embedded ' " \ NL, etc.  Much better would be to simply pass the
arguments uninterpreted via execv().)


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 18:16 rog
@ 2002-06-04 16:23 ` Axel Belinfante
  0 siblings, 0 replies; 42+ messages in thread
From: Axel Belinfante @ 2002-06-04 16:23 UTC (permalink / raw)
  To: 9fans

To solve my particular case at hand (playing mp3 files made available
via u9fs, where I don't want to do any special work at the remote end),
I resorted to writing (hacking) what I've named so far 'substfs',
a file server that is supposed to sit between 'the user'
(usually mount) and the remote u9fs, and does do file name substitution.
Apart from the file server that it should work on, it is given
two edit programs (filter scripts) that (should) do the remote->local
and local->remote conversions. The edit programs could then
be 'tr '' '' `{unicode whatever}' (and the reverse).
(actually, I use something like: cat|tcs -f 8859-1| tr ' ' @
 where @ is one of the special space characters mentioned in this thread
 which number I don't recall right now).

So far it seems to work -- even though the editing is not yet done
for all message types, and mememory management is a joke.
I also haven't tried yet what happens if I mount its /srv/bla
file in two different places and try to access it 'simultaniously'.
I built by glueing together bits and pieces taken from u9fs, 9pcon,
lib9p and probably some other places.
When it is slightly more complete (and there is interest?)
I will probably post it to 9fans or it make available via the web.
Writing it has been quite instructive in getting more insight in
the 9p2000 protocol.

Regards,
Axel.

> i quite like the way that spaces in r3 dosfs map to colons (and vice
> versa, presumably).  of course you wouldn't want to do that in general
> 'cos colon is a useful char, but what about that glyph that i've seen
> in Word (i think) that looks like a very small dot at the bottom of
> the line and represents a space; that's fairly unambiguous, and if
> most fonts displayed 0xa0 as that glyph, and if /lib/keyboard mapped
> ALT-space to 0xa0, and imported filesystems mapped 0xa0 1-1 with 0x20,
> we'd have quite a workable situation and no confused
> shellscripts/cut&paste/double-click.




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-06-03  7:48 Fco.J.Ballesteros
@ 2002-06-03 16:05 ` Dan Cross
  2002-06-05 10:05   ` Douglas A. Gwyn
  0 siblings, 1 reply; 42+ messages in thread
From: Dan Cross @ 2002-06-03 16:05 UTC (permalink / raw)
  To: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

> Probably you didn't listen it enough, AP is like tonic water, gets better
> each time you listen it again (That's why Repeat exists in aplay ☺).

Wow, you listen to tonic water?  :-)

> :  I need to do more soul searching before I really know where I stand on
> :  the space-in-filenames issue.
>
> I thought we had found that `spaces or not' was not the issue.
> So getting back on-topic, should I export for 9fs all the Alan Parsons
> Project files? Or should I wait until 9P changes to admit as legal file
> names only those that start with 'Alan Parsons' (despite the white space)?

Perhaps if you use the Unicode space symbol, no one will be able to listen
to it.  :-)  Hmm, perhaps I shouldn't talk; my music tastes have been
described as distasteful before.

Maybe I should steal brucee's 8-track of Elvis covers.

	- Dan C.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-03  7:48 Fco.J.Ballesteros
  2002-06-03 16:05 ` Dan Cross
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-06-03  7:48 UTC (permalink / raw)
  To: 9fans

:  I was thinking of the music.  (No offense, Nemo.)  Those of you who

Probably you didn't listen it enough, AP is like tonic water, gets better
each time you listen it again (That's why Repeat exists in aplay ☺).

:  I need to do more soul searching before I really know where I stand on
:  the space-in-filenames issue.

I thought we had found that `spaces or not' was not the issue.
So getting back on-topic, should I export for 9fs all the Alan Parsons
Project files? Or should I wait until 9P changes to admit as legal file
names only those that start with 'Alan Parsons' (despite the white space)?



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-06-01 21:37 jmk
@ 2002-06-01 22:06 ` Dan Cross
  0 siblings, 0 replies; 42+ messages in thread
From: Dan Cross @ 2002-06-01 22:06 UTC (permalink / raw)
  To: 9fans

> > I'm sorry.
>
> For the spaces or the music?
>

I was thinking of the music.  (No offense, Nemo.)  Those of you who
read, ``The Onion'' will just have to look out for my pirate radio
station (funnily, I *do* have a copy of Black Flag's `TV Party'
somewhere).

I need to do more soul searching before I really know where I stand on
the space-in-filenames issue.

	- Dan `vive la revolutione' C.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-06-01 21:37 jmk
  2002-06-01 22:06 ` Dan Cross
  0 siblings, 1 reply; 42+ messages in thread
From: jmk @ 2002-06-01 21:37 UTC (permalink / raw)
  To: 9fans

On Sat Jun  1 17:35:14 EDT 2002, cross@math.psu.edu wrote:
> > 01_Alan_Parsons_The_Time_Machine -> ../realdir/01 Alan Parsons The Time Machine
>
> I'm sorry.
>
> 	- Dan C.

For the spaces or the music?


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 17:00 Fco.J.Ballesteros
@ 2002-06-01 21:34 ` Dan Cross
  0 siblings, 0 replies; 42+ messages in thread
From: Dan Cross @ 2002-06-01 21:34 UTC (permalink / raw)
  To: 9fans

> 01_Alan_Parsons_The_Time_Machine -> ../realdir/01 Alan Parsons The Time Machine

I'm sorry.

	- Dan C.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-31  4:53 ` Lucio De Re
@ 2002-05-31  8:59   ` Boyd Roberts
  0 siblings, 0 replies; 42+ messages in thread
From: Boyd Roberts @ 2002-05-31  8:59 UTC (permalink / raw)
  To: 9fans

Lucio De Re wrote:
> Specially as there are two vowels in the conventional representation

Conventional representation?  No way -- binary is all we need.

Flatten the character set down to 1 bit.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 18:13 Geoff Collyer
@ 2002-05-31  4:53 ` Lucio De Re
  2002-05-31  8:59   ` Boyd Roberts
  0 siblings, 1 reply; 42+ messages in thread
From: Lucio De Re @ 2002-05-31  4:53 UTC (permalink / raw)
  To: 9fans

On Thu, May 30, 2002 at 11:13:17AM -0700, Geoff Collyer wrote:
>
> Vowels at least don't bugger parsing and don't require the use of
> quoting schemes, which will become increasingly complicated to deal
> with embedded spaces, newlines, slashes, and NUL bytes, and which will
> make hex file names look appealing.  Vowels can stay.  ?

Specially as there are two vowels in the conventional representation
of hex values.  But no lower case letters, please.
(for the humour impaired, insert smiling face here - my mailer is
still antidiluvian).

++L


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 22:01 forsyth
  0 siblings, 0 replies; 42+ messages in thread
From: forsyth @ 2002-05-30 22:01 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

>>really?
>>the only ones i could find were misc/unicode.6x13.font and
>>misc/latin1.6x1[30].font.  maybe fonts have been updated for the 4th
>>edition?

you're right.  it has changed.  try it in the office.

>	2420	symbol for space
>is in lucida/unicode.*.font

oh i see!  not having found it in the fonts i'd assumed it was the conventional symbol
for space anciently, but that little SP is not what i'd expected.

[-- Attachment #2: Type: message/rfc822, Size: 1615 bytes --]

To: 9fans@cse.psu.edu
Subject: Re: [9fans] spaces in file/dir names? (and acme)?
Date: Thu, 30 May 2002 21:16:03 +0100
Message-ID: <20020530201120.CFF9A19AB0@mail.cse.psu.edu>

> i tend to use no-break space (00a0) which has dots in two corners in
> the usual plan 9 fonts, although

really?
the only ones i could find were misc/unicode.6x13.font and
misc/latin1.6x1[30].font.  maybe fonts have been updated for the 4th
edition?

>	2420	symbol for space

is in lucida/unicode.*.font

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 20:16 rog
  0 siblings, 0 replies; 42+ messages in thread
From: rog @ 2002-05-30 20:16 UTC (permalink / raw)
  To: 9fans

> i tend to use no-break space (00a0) which has dots in two corners in
> the usual plan 9 fonts, although

really?
the only ones i could find were misc/unicode.6x13.font and
misc/latin1.6x1[30].font.  maybe fonts have been updated for the 4th
edition?

>	2420	symbol for space

is in lucida/unicode.*.font



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 20:14 rsc
  0 siblings, 0 replies; 42+ messages in thread
From: rsc @ 2002-05-30 20:14 UTC (permalink / raw)
  To: 9fans

i figured he was right and i just was missing something,
but i don't see them either.

maybe the emporer really doesn't have any clothes.
hmm.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 19:29 rog
  0 siblings, 0 replies; 42+ messages in thread
From: rog @ 2002-05-30 19:29 UTC (permalink / raw)
  To: 9fans

> sorry, i told you the wrong character.  2423.

yes i like that (...having finally found a font that displays it).

mind you, then there's the issue of the ambiguity with the genuine
open box character.  at least with 00a0 the loss of that character in
the remote fs is understandable; and it would be nice to be able to
pick a glyph with no other equivalent in unicode (there doesn't seem
to be a "dot below" equivalent to 02d9).



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 19:12 forsyth
  0 siblings, 0 replies; 42+ messages in thread
From: forsyth @ 2002-05-30 19:12 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

i tend to use no-break space (00a0) which has dots in two corners in
the usual plan 9 fonts, although
	2420	symbol for space
might be better (i assume it's the traditional symbol) except
that it isn't in the few fonts i tried.  fraction slash (2044) differs
from / although it's perhaps a little subtle.

[-- Attachment #2: Type: message/rfc822, Size: 1507 bytes --]

To: 9fans@cse.psu.edu
Subject: Re: [9fans] spaces in file/dir names? (and acme)?
Date: Thu, 30 May 2002 19:58:29 +0100
Message-ID: <20020530185346.F0EC919ADA@mail.cse.psu.edu>

> or you could use the picture that acme displays for ,
> which looks quite reasonable to me.

it might be just me, but i'd be happier if the visual ambiguity
was avoided as well as the encoding ambiguity.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:58 rog
  0 siblings, 0 replies; 42+ messages in thread
From: rog @ 2002-05-30 18:58 UTC (permalink / raw)
  To: 9fans

> or you could use the picture that acme displays for  ,
> which looks quite reasonable to me.

it might be just me, but i'd be happier if the visual ambiguity
was avoided as well as the encoding ambiguity.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:55 rsc
  0 siblings, 0 replies; 42+ messages in thread
From: rsc @ 2002-05-30 18:55 UTC (permalink / raw)
  To: 9fans

sorry, i told you the wrong character.  2423.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:16 rog
  2002-06-04 16:23 ` Axel Belinfante
  0 siblings, 1 reply; 42+ messages in thread
From: rog @ 2002-05-30 18:16 UTC (permalink / raw)
  To: 9fans

i quite like the way that spaces in r3 dosfs map to colons (and vice
versa, presumably).  of course you wouldn't want to do that in general
'cos colon is a useful char, but what about that glyph that i've seen
in Word (i think) that looks like a very small dot at the bottom of
the line and represents a space; that's fairly unambiguous, and if
most fonts displayed 0xa0 as that glyph, and if /lib/keyboard mapped
ALT-space to 0xa0, and imported filesystems mapped 0xa0 1-1 with 0x20,
we'd have quite a workable situation and no confused
shellscripts/cut&paste/double-click.

  cheers,
    rog.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:15 rsc
  0 siblings, 0 replies; 42+ messages in thread
From: rsc @ 2002-05-30 18:15 UTC (permalink / raw)
  To: 9fans

or you could use the picture that acme displays for ␣,
which looks quite reasonable to me.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:13 Geoff Collyer
  2002-05-31  4:53 ` Lucio De Re
  0 siblings, 1 reply; 42+ messages in thread
From: Geoff Collyer @ 2002-05-30 18:13 UTC (permalink / raw)
  To: 9fans

Vowels at least don't bugger parsing and don't require the use of
quoting schemes, which will become increasingly complicated to deal
with embedded spaces, newlines, slashes, and NUL bytes, and which will
make hex file names look appealing.  Vowels can stay.  ☺



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 18:09 Sape Mullender
  0 siblings, 0 replies; 42+ messages in thread
From: Sape Mullender @ 2002-05-30 18:09 UTC (permalink / raw)
  To: 9fans

> Vowels in file names are a curse!  All filenames should have only
> upper case consonents!  Compare:
>
> 	readme.text to RDM.TXT

Vowels?  It's Characters in file names that are the real curse.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 17:52 presotto
  0 siblings, 0 replies; 42+ messages in thread
From: presotto @ 2002-05-30 17:52 UTC (permalink / raw)
  To: 9fans

Vowels in file names are a curse!  All filenames should have only
upper case consonents!  Compare:

	readme.text to RDM.TXT

Nuff said!


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 17:46 Geoff Collyer
  0 siblings, 0 replies; 42+ messages in thread
From: Geoff Collyer @ 2002-05-30 17:46 UTC (permalink / raw)
  To: 9fans

Spaces in file names are a curse.  I have to live with them everyday
on Mac OS X, and it's maddening.  File names are supposed to be simple
identifiers, not your whole entire life story, complete with 8×10
colour glossy photos and bibliography.  (Yeah, that's what we can do
with 64k-byte file names: put a little JPEG and the md5 hash of the
file contents in every file name.  User-friendly, like.)

Having said that, we do have whitespace other than the canonical
space, tab and newline available, and these other characters have no
special meaning to most software yet:

00a0	no-break space
2002	en space
2003	em space
2004	three-per-em space
2005	four-per-em space
2006	six-per-em space
2007	figure space
2008	punctuation space
2009	thin space
200a	hair space
200b	zero width space
2420	symbol for space
3000	ideographic space
303f	ideographic half fill space
feff	zero width no-break space

If one *must* put spaces in file names, using one of these will cause
less grief than space, tab or newline, though there is likely to still
be visual confusion for the poor users.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 16:57 Fco.J.Ballesteros
@ 2002-05-30 17:03 ` Lucio De Re
  2002-06-05  9:55   ` Douglas A. Gwyn
  0 siblings, 1 reply; 42+ messages in thread
From: Lucio De Re @ 2002-05-30 17:03 UTC (permalink / raw)
  To: 9fans

On Thu, May 30, 2002 at 06:57:42PM +0200, Fco.J.Ballesteros wrote:
>
> I still dislike file names with spaces because of the madness
> that may cause in scripts and program arguments, but perhaps
> others think otherwise.

Allow is not the same as encourage, and my sentiments are only a
little stronger than yours:  spaces in file names are an unavoidable
curse.  I suppose the word delimiter on the command line could have
been something less convenient...

++L


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 17:00 Fco.J.Ballesteros
  2002-06-01 21:34 ` Dan Cross
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-05-30 17:00 UTC (permalink / raw)
  To: 9fans

I see know why you want spaces in file names...


:  I was trying aplay on a directory of directories of mp3's,
:  mounted via u9fs.

What I do in this case is to make a directory with links to the
mp3s on the unix machine. Then I start aplay on it.

You know, a directory with stuff like

01_Alan_Parsons_The_Time_Machine -> ../realdir/01 Alan Parsons The Time Machine



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 16:57 Fco.J.Ballesteros
  2002-05-30 17:03 ` Lucio De Re
  0 siblings, 1 reply; 42+ messages in thread
From: Fco.J.Ballesteros @ 2002-05-30 16:57 UTC (permalink / raw)
  To: 9fans

However, the support in 9p and the kernel for spaces is
IMHO all that we need. We're now able to

9fs unixmachine
f='file with spaces'
cp /n/unixmachine/$f /n/fs/`{echo $f | sed 's/ /_/g'}

I still dislike file names with spaces because of the madness
that may cause in scripts and program arguments, but perhaps
others think otherwise.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 16:30 rsc
@ 2002-05-30 16:35 ` Axel Belinfante
  2002-06-05  9:54 ` Douglas A. Gwyn
  1 sibling, 0 replies; 42+ messages in thread
From: Axel Belinfante @ 2002-05-30 16:35 UTC (permalink / raw)
  To: 9fans

> Everything starts to break when you deal with spaces
> in file names.  Ls -q and various other hacks start to
> deal with it, but we're not there yet.

Probably that's what confused me: I saw it working in ls,
and build my assumptions on that.

Thanks,
Axel.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 16:30 rsc
  2002-05-30 16:35 ` Axel Belinfante
  2002-06-05  9:54 ` Douglas A. Gwyn
  0 siblings, 2 replies; 42+ messages in thread
From: rsc @ 2002-05-30 16:30 UTC (permalink / raw)
  To: 9fans

> Can acme not deal with spaces in file names?

No.  Most of the system doesn't deal well
with spaces in file names.

> When I tried creating files (touch) and directories (mkdir)
> with names containing spaces on kfs and on fake worm fs,
> that was refused with an error message 'bad character in ... name'.

That's because you don't want to do that.  Really.

> However, intro(5) states
>
>     Plan 9 names may contain any printable character (that is, any
>     character outside hexadecimal 00-1F and 80-9F) except slash.)

The Plan 9 kernel is being discussed there.  Other file servers
may impose their own restrictions.  For example, you can't put
a colon in a dossrv file name.

> But /sys/src/fs/port/9p2.c:155 contains
>
>                 if((*p & 0xFF) <= 040)
>                         return Ename;
>
> and /sys/src/fs/port/sub.c and /sys/src/cmd/disk/kfs/^(9p2.c sub.c)
> contain similar checks.

And, at the moment, you can't put spaces in Plan 9 file server
file names.

Everything starts to break when you deal with spaces
in file names.  Ls -q and various other hacks start to
deal with it, but we're not there yet.  I was tempted a few
years ago to replace spaces with ␣ in dossrv's file names.
We couldn't do that then because of the name length
restrictions (␣ is three precious bytes).

Russ



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 16:30 rsc
  0 siblings, 0 replies; 42+ messages in thread
From: rsc @ 2002-05-30 16:30 UTC (permalink / raw)
  To: 9fans

> 1+p
> 40

yes.  i believe he was complaining about the boundary
case here.  the 1+, as it were.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [9fans] spaces in file/dir names? (and acme)?
  2002-05-30 16:21 Axel Belinfante
@ 2002-05-30 16:27 ` Boyd Roberts
  0 siblings, 0 replies; 42+ messages in thread
From: Boyd Roberts @ 2002-05-30 16:27 UTC (permalink / raw)
  To: 9fans

Axel Belinfante wrote:
> However, intro(5) states
>
>     Plan 9 names may contain any printable character (that is, any
>     character outside hexadecimal 00-1F and 80-9F) except slash.)
>
> But /sys/src/fs/port/9p2.c:155 contains
>
>                 if((*p & 0xFF) <= 040)
>                         return Ename;
>
> and /sys/src/fs/port/sub.c and /sys/src/cmd/disk/kfs/^(9p2.c sub.c)
> contain similar checks.

% dc
16i 8o
1Fp
37
1+p
40


^ permalink raw reply	[flat|nested] 42+ messages in thread

* [9fans] spaces in file/dir names? (and acme)?
@ 2002-05-30 16:21 Axel Belinfante
  2002-05-30 16:27 ` Boyd Roberts
  0 siblings, 1 reply; 42+ messages in thread
From: Axel Belinfante @ 2002-05-30 16:21 UTC (permalink / raw)
  To: 9fans

Can acme not deal with spaces in file names?

I was trying aplay on a directory of directories of mp3's,
mounted via u9fs.
Both the mp3 files and the directories that contain them contain
spaces in their names. When I open acme in such a directory,
the tag contains the directory name upto the first space,
but the body contains the correct directory listing.
If I start 'aplay playprog .' in such a body,
aplay does not list the songs in the current directory,
but the song-directories of which the current directory is one,
i.e. ..  ; it does single-quote these were needed.
Right-mouse-click on such a quoted subdirectory name does not work.

When I tried creating files (touch) and directories (mkdir)
with names containing spaces on kfs and on fake worm fs,
that was refused with an error message 'bad character in ... name'.

However, intro(5) states

    Plan 9 names may contain any printable character (that is, any
    character outside hexadecimal 00-1F and 80-9F) except slash.)

But /sys/src/fs/port/9p2.c:155 contains

                if((*p & 0xFF) <= 040)
                        return Ename;

and /sys/src/fs/port/sub.c and /sys/src/cmd/disk/kfs/^(9p2.c sub.c)
contain similar checks.

Confused,
Axel.



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2002-06-06 10:48 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-30 17:58 [9fans] spaces in file/dir names? (and acme)? Fco.J.Ballesteros
2002-05-30 17:10 ` Sam
  -- strict thread matches above, loose matches on Subject: below --
2002-06-06 10:29 Fco.J.Ballesteros
2002-06-06 10:48 ` Axel Belinfante
2002-06-06  8:11 Fco.J.Ballesteros
2002-06-06 10:22 ` Axel Belinfante
2002-06-05 18:39 Geoff Collyer
2002-06-05 17:55 rog
2002-06-05 17:04 anothy
2002-06-05 13:46 Russ Cox
2002-06-03  7:48 Fco.J.Ballesteros
2002-06-03 16:05 ` Dan Cross
2002-06-05 10:05   ` Douglas A. Gwyn
2002-06-01 21:37 jmk
2002-06-01 22:06 ` Dan Cross
2002-05-30 22:01 forsyth
2002-05-30 20:16 rog
2002-05-30 20:14 rsc
2002-05-30 19:29 rog
2002-05-30 19:12 forsyth
2002-05-30 18:58 rog
2002-05-30 18:55 rsc
2002-05-30 18:16 rog
2002-06-04 16:23 ` Axel Belinfante
2002-05-30 18:15 rsc
2002-05-30 18:13 Geoff Collyer
2002-05-31  4:53 ` Lucio De Re
2002-05-31  8:59   ` Boyd Roberts
2002-05-30 18:09 Sape Mullender
2002-05-30 17:52 presotto
2002-05-30 17:46 Geoff Collyer
2002-05-30 17:00 Fco.J.Ballesteros
2002-06-01 21:34 ` Dan Cross
2002-05-30 16:57 Fco.J.Ballesteros
2002-05-30 17:03 ` Lucio De Re
2002-06-05  9:55   ` Douglas A. Gwyn
2002-05-30 16:30 rsc
2002-05-30 16:35 ` Axel Belinfante
2002-06-05  9:54 ` Douglas A. Gwyn
2002-05-30 16:30 rsc
2002-05-30 16:21 Axel Belinfante
2002-05-30 16:27 ` Boyd Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).