bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#55894: 26.3; [PATCH] `find-lisp.el' bugs


From: Drew Adams
Subject: bug#55894: 26.3; [PATCH] `find-lisp.el' bugs
Date: Sat, 11 Jun 2022 16:46:35 +0000

Summary:

 1. Thanks for considering making some improvements
    to `find-lisp.el', and starting with the fixes
    I suggested.

 2. I'm OK with changes you suggested.  Please do
    whatever you think helps best.

Some detailed feedback below.
___

Yes, Emacs typically uses "subdirectory" to mean a
descendent directory (i.e., any level), and not just
a child directory.  So might as well be consistent
with that.

I don't think that "sub" generally suggests such a
meaning, however.  It's typically ambiguous whether
it means child or descendant - which, in effect,
means that it means descendant.

When appropriate we'd be better off using "parent"
and "child" or "ancestor" and "descendant".

But yes, it's no doubt too late to change, and Emacs
is certainly not going to change this everywhere.

Perhaps we could start to rename places (e.g. doc,
if not fun/var names) where we really mean children
to use "child" and "children" instead of "sub___".
Maybe we consistently do that already; dunno.  
___

The existing prompts could be improved, IMO,
by quoting the command names `find' and `ls',
rather than just using them as words.  And I
think "Run Lisp version of `find'..." is
clearer than "Run find (Lisp version)...".

I agree about not using "dired" as a verb, at
least in the first line of a doc string.  I was
trying to avoid a too-long first line.  I'm OK
with whatever you do here.
___

> > +If `dired-actual-switches' is non-nil in BUFFER then preserve it."
> What does it mean in this context to "preserve it"?  

I don't have a good suggestion for the wording,
and I don't insist that the point be communicated
in the doc string.

The point is that `dired-actual-switches', and not
"", is used as the starting point.

The problem with not making this fix is that the
code inserts subdir names without trailing "/",
and yet if `dired-actual-switches' (e.g. from
`dired-listing-switches') contains switch `F' then
functions such as `dired-move-to-end-of-filename'
don't work, because they're off-by-one for dir
names - e.g.:

(and (dired-check-switches dired-actual-switches
                           "F" "classify") ; used-F 
     (or (memq file-type '(?d ?s ?p)) executable)
     (forward-char -1))

> The comment says this was lifted from ls-lisp.el,
> but the latter has since improved its formatting
> capabilities _a_lot_.  How about making this
> version more like what ls-lisp.el does nowadays.

Please do whatever's right here.  I didn't write
that comment, and I didn't try to bring `find-lisp'
completely up-to-date.  I'm quite sure there are
lots of ways the library could/should be improved.

Perhaps the `ls-lisp' code takes care of the `F'
bug.  If not, that should be done in `find-lisp'.





reply via email to

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