all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* -I switch to ls and dired.
@ 2004-06-09  3:42 Luc Teirlinck
  2004-06-09  3:49 ` Luc Teirlinck
  2004-06-10  6:55 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Luc Teirlinck @ 2004-06-09  3:42 UTC (permalink / raw)


Using both the -R switch (to ls) and the -I switch with a pattern
containing R in dired can cause trouble.

Make sure to have a file with an "R" in its name, say "aRa", in a
subdir, say "subdir" of ~/.  Make sure that "subdir" contains other
files, say myfile1 and myfile2.  Then do `C-u C-x d RET -al -I *R* RET
RET, then do 'i' on subdir.  Note that not only "aRa" is not listed
(clearly it should not), but also myfile{1,2} are not listed.

The reason for this is that dired and dired-aux systematically check
whether the "R" switch has been used by just checking whether the
string passed as switches to ls contains _some_ "R" _anywhere_ and if
for some reason the "R" switch needs to be removed, _all_ R's in the
string are removed.  Thus the shell pattern `*R* becomes `**' matching
anything (except `.' and `..' for technical reasons).

There is no telling what pattern the user might want to ignore with
-I.  There is no reason why that pattern could not contain "R". 

What do we do with the above?  Completely ignore it?  Just document
it?  Fix it?  Fixing it unconditionally might be difficult, but fixing
it modulo some (to be documented) conventions seems very feasible.
Conventions making things easy would be to always use -I instead of
the long --ignore= option (that is what people would do anyway) and, if
one is going to use both the -R switch and -I *R*, use the R switch
_before_ the -I switch (that again is what people would probably do
anyway).

Sincerely,

Luc.

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

end of thread, other threads:[~2004-06-11 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09  3:42 -I switch to ls and dired Luc Teirlinck
2004-06-09  3:49 ` Luc Teirlinck
2004-06-10  6:55 ` Richard Stallman
2004-06-10 20:47   ` Luc Teirlinck
2004-06-11 11:55     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.