From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Fri, 13 Jan 2012 15:06:08 +0100 Message-ID: <878vlbofxr.fsf@gmail.com> References: <87mx9su32g.fsf@web.de> <87sjjkfvwt.fsf@gmail.com> <8362ggkquq.fsf@gnu.org> <87pqeoro8p.fsf@gmail.com> <83wr8vki5t.fsf@gnu.org> <8762gfdael.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326463602 6064 80.91.229.12 (13 Jan 2012 14:06:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2012 14:06:42 +0000 (UTC) Cc: Juanma Barranquero , 10489@debbugs.gnu.org, Michael Albinus To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 15:06:38 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rlhm9-0007l6-Rc for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 15:06:37 +0100 Original-Received: from localhost ([::1]:35246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlhm9-0000Xx-23 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 09:06:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlhm2-0000WG-OK for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 09:06:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rlhlw-0007w5-VJ for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 09:06:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlhlw-0007vz-Tj for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 09:06:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RlhmX-0003Y1-Ln for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2012 09:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2012 14:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10489-submit@debbugs.gnu.org id=B10489.132646361913629 (code B ref 10489); Fri, 13 Jan 2012 14:07:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 13 Jan 2012 14:06:59 +0000 Original-Received: from localhost ([127.0.0.1]:56077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlhmR-0003Xj-Qz for submit@debbugs.gnu.org; Fri, 13 Jan 2012 09:06:59 -0500 Original-Received: from mail-ww0-f46.google.com ([74.125.82.46]:56221) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlhmM-0003XX-CK for 10489@debbugs.gnu.org; Fri, 13 Jan 2012 09:06:54 -0500 Original-Received: by wgbdy1 with SMTP id dy1so174160wgb.15 for <10489@debbugs.gnu.org>; Fri, 13 Jan 2012 06:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=s3+FXabJPUif2cP4jn6W9o+PcXMQKfB0bDKPZNUxb28=; b=LUOdSwoLltaVp1tJCUdY9ptjqio14PXOKkiH3scdC4/QkdglwuEEqJmvLlj7IQl3BJ H6S3dMcxgjzzQDpmT1BGdiUtcAW5zjwuDvT1rVe1WQn7fba0sOOOUL6x6+epgN09iRQm qJyEbWZiNgWyZ0/inDu/bdEJUqX3PxcKZ/EA0= Original-Received: by 10.180.91.42 with SMTP id cb10mr30580wib.15.1326463572565; Fri, 13 Jan 2012 06:06:12 -0800 (PST) Original-Received: from thierry-MM061 (121.77.197.77.rev.sfr.net. [77.197.77.121]) by mx.google.com with ESMTPS id eu3sm16009151wib.6.2012.01.13.06.06.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jan 2012 06:06:11 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Fri, 13 Jan 2012 08:27:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55690 Archived-At: Stefan Monnier writes: > IIUC the problem at hand can be solved by disregarding names and > comparing (file-attributes) instead, since we're checking whether two > names refer to the exact same (existing) directory. > >>> As this seems like a common occurrence, how comes that we don't have >>> >>> (defun file-name-compare (name1 name2 &optional dir) >>> "..." >>> (let ((n1 (file-truename (expand-file-name name1 dir))) >>> (n2 (file-truename (expand-file-name name2 dir)))) >>> (when (memq system-type '(ms-dos windows-nt)) >>> (setq n1 (downcase n1) >>> n2 (downcase n2))) >>> (string= n1 n2))) > > file-name-equal-p would be nice, indeed, as discussed a few months > (years?) ago. I am for `file-name-equal-p', would be really helpful specially for this patch. >> I wouldn't check for `system-type', there might be other systems which >> do not care filename cases (VMS?). I would let-bind `case-fold-search', >> derived from `read-file-name-completion-ignore-case'. > > read-file-name-completion-ignore-case is a user configuration which only > reflects the underlying system's sensitivity by default but the user is > free to modify it. I used to set it to t under GNU/Linux, for instance. So would be better to let-bind case-fold-search as suggested by Michael. It's what I did in last version of this patch. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997