unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: lennart.borgman.073@student.lu.se, emacs-devel@gnu.org
Subject: Re: assoc-delete-all
Date: Mon, 04 Jul 2005 03:16:54 +0300	[thread overview]
Message-ID: <87zmt3nsx8.fsf@jurta.org> (raw)
In-Reply-To: <E1DpBIx-00027Y-32@fencepost.gnu.org> (Richard M. Stallman's message of "Sun, 03 Jul 2005 16:43:07 -0400")

>     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/

  reply	other threads:[~2005-07-04  0:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-03  0:23 assoc-delete-all Lennart Borgman
2005-07-03  0:52 ` assoc-delete-all Juanma Barranquero
2005-07-03  7:30   ` assoc-delete-all Lennart Borgman
2005-07-03 10:24 ` assoc-delete-all Lute Kamstra
2005-07-03 10:51   ` assoc-delete-all Lennart Borgman
2005-07-03 10:58   ` assoc-delete-all Lennart Borgman
2005-07-03 20:43 ` assoc-delete-all Richard M. Stallman
2005-07-04  0:16   ` Juri Linkov [this message]
2005-07-04  9:00     ` assoc-delete-all Juanma Barranquero
2005-07-05  5:33       ` assoc-delete-all Juri Linkov
2005-07-05  4:35     ` assoc-delete-all Richard M. Stallman
2005-07-05  5:27       ` assoc-delete-all Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zmt3nsx8.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman.073@student.lu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).