[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entering filenames with spaces

From: Thien-Thi Nguyen
Subject: Re: Entering filenames with spaces
Date: 13 Aug 2005 12:48:51 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Kastrup <address@hidden> writes:

> Wrong.  Spaces in filenames are no problem to pretty much _any_
> "unixoid" tool.  The only place where they need escaping is in shells;
> and if you use file name completion, it will be provided automatically
> (i.e. by bash).

well, i consider the shell a unixoid tool (perhaps the quintessential
one, since with it you can compose even more tools).  in any case,
programs and scripts often invoke(d) the shell, passing it unprocessed
filenames, assuming that filenames don't have spaces.

the lack of quoting discipline in these programs' communications is a
self-reenforcing phenomenon.  cool-prog.sh can't handle spaces in
filenames but i find cool-prog.sh useful, so i don't use spaces in
filenames i pass it.  when writing my-hack (in whatever language), which
invokes cool-prog.sh, it's so much easier to propagate the ingrained
mindset.  etc.

> Since desktop environments become more and more common for unixoid
> systems including free systems, spaces in file names become more and
> more common as well: certainly more common than most other special
> characters in file names.

no doubt.

> The "many" are not just Windows users (by the way: spaces need quoting
> in the Windows command line, too).  They are all users that don't rely
> on the command line for most of their work.  And that certainly
> includes most users of free systems.

of course, it is worth the effort to change things to be more robust.
iirc, first couple releases of osx had this very problem (among others).
apple had to invest engineer hours to fix it.

however, we are not talking about robustness per se; indeed, emacs can
handle spaces in filenames.  we are talking about the age-old class of
problem called "preferred default keybindings".  towards that end, i am
in favor of leaving SPC for completion, and adding a blurb and fragment
of ~/.emacs code to the manual explaining how to (1) self-insert SPC for
filenames; (2) arrange for (1) to be the default.

wherever the blurb lands, a pointer to it will surely find its way into
every faq and wiki searched by the desperately disenfranchised.  cue
next 20 messages: "but those people SHOULDN'T HAVE TO munge ~/.emacs for
such a simple thing!"  feh.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]