[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: assoc-delete-all
From: |
Juri Linkov |
Subject: |
Re: assoc-delete-all |
Date: |
Mon, 04 Jul 2005 03:16:54 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> There is an assq-delete-all, but I am missing assoc-delete-all ... or,
>
> We don't want to add assoc-delete-all merely for symmetry.
> It would have to be needed in practice.
Well, assoc-delete-all will help to fix the bug in dired-compare-directories.
Sometimes the number of marked files it reports is wrong. That's
because it compares the file attributes of directories "." and "..",
but dired mark-functions don't mark them.
assoc-delete-all could filter out "." and ".." from the list of file
attributes returned by dired-files-attributes, which is an alist
with string keys
(("." "<full-name>" <attributes>)
(".." "<full-name>" <attributes>)
("file" "<full-name>" <attributes>))
with this function
(assoc-delete-all "." (assoc-delete-all ".." file-alist1))
Even better would be to allow a test function like in assoc-default:
(assoc-delete-all nil file-alist1 (lambda (key) (string-match "^\.\.?$" key)))
--
Juri Linkov
http://www.jurta.org/emacs/