[X4U] .Mac Homepage Public Folder

Eugene list-themacintoshguy at fsck.net
Fri Jun 13 15:34:23 PDT 2008


On Tue, Jun 10, 2008 at 03:11:10PM CDT, Doug McNutt <douglist at macnauchtan.com> wrote:
> At 09:22 -0700 6/10/08, Zane H. Healy wrote:
> >At 10:22 AM -0500 6/10/08, Eugene wrote:
> >>
> >>Many apps do poorly with filenames containing underlines.
> >>Even though lots of people prefer to use an underline as
> >>simple replacement for a space character, apps tend to see
> >>the underline as another alphanumeric character and fails
> >>to see it as a word delimiter.  By default, just about every
> >>Unix editor does this (including vi and emacs) as well as
> >>most GUI apps.
> >
> >That is interesting as I've used the underbar for half of forever on
> >UNIX, VMS, Windows, various versions of the Mac Operating systems,
> >and a bunch of other OS's.  I've NEVER had a single problem with any
> >program using it.  I would be interested in knowing exactly what
> >you're trying to describe here.

I named vi and emacs.  And most any Mac app that has a GUI with
selectable text.  Want examples?  Here:

- In vi, open a new text file containing the following two lines:

	This is a filename.jpg
	This_is_a_filename.jpg

Then move the cursor to the top of the file.  In command mode, use 'w'
to move the cursor to the next word.  On line one, it works as expected.
On line two, starting at 'T', the command jumps to the '.' character
instead of 'i', then 'a', then 'f'.  Why?  Because the underline is not
recognized as a delimeter.

- In emacs, do the same (with meta-f).  Note the similar results,
including the failure in line two.

- In TextEdit.app, do the same (with option-f).  Note the similar
results, including the failure in line two.  Note that double-clicking
any English word within the filename (excluding the filename extension)
selects the entire filename (sans extension).  Fail.

> The point is that the underline character IS NOT a delimiter. In UNIX
> it's used in place of the space that IS a delimiter. The whole point
> is to distinguish different file names in a list without having to
> quote filenames or escape each space that's part of a file name.
> 
> I think Zane would like to see an example of some English text which
> does use the underscore as a delimiter. Something like underscore as a
> unary minus operator in APL, for instance.

This would be a silly request for such an example, since filenames do
not have to contain purely English text.

Of course we could get technical and unsilly and split hairs and mention
that perhaps Zane et.al. is focusing on programs that must deal with
multiple files by filename, and I am focusing on programs that deal with
the text string that is the filename itself.


-- 
Eugene
http://www.coxar.pwp.blueyonder.co.uk/


More information about the X4U mailing list