From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy Date: Sat, 25 Feb 2012 09:05:02 +0200 Message-ID: <83k43bs89t.fsf@gnu.org> References: <87mx9su32g.fsf@web.de> <871uqz651u.fsf@gmx.de> <87pqd89lh4.fsf@gmail.com> <87mx8b3nvb.fsf@gmail.com> <87pqd6wnvv.fsf@gmail.com> <87d395y1w0.fsf@gmail.com> <87zkc8x04p.fsf@gmail.com> <87vcmwwvk7.fsf@gmail.com> <834nugtwqf.fsf@gnu.org> <87r4xkwhky.fsf@gmail.com> <83vcmws3bs.fsf@gnu.org> <87ehtkwaiz.fsf@gmail.com> <87wr7cgsm3.fsf@gmx.de> <8762eww77b.fsf@gmail.com> <83pqd4roav.fsf@gnu.org> <87haygx97t.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1330153422 29481 80.91.229.3 (25 Feb 2012 07:03:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2012 07:03:42 +0000 (UTC) Cc: 10489@debbugs.gnu.org, thierry.volpiatto@gmail.com To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 25 08:03:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S1BfP-0006pL-Di for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2012 08:03:39 +0100 Original-Received: from localhost ([::1]:36233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1BfO-0006wg-V6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2012 02:03:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1BfH-0006h0-20 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2012 02:03:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1BfB-0001w8-CJ for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2012 02:03:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1BfB-0001vy-8X for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2012 02:03:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S1Bhh-000516-QW for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2012 02:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2012 07:06: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: patch Original-Received: via spool by 10489-submit@debbugs.gnu.org id=B10489.133015354519259 (code B ref 10489); Sat, 25 Feb 2012 07:06:01 +0000 Original-Received: (at 10489) by debbugs.gnu.org; 25 Feb 2012 07:05:45 +0000 Original-Received: from localhost ([127.0.0.1]:55015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1BhQ-00050Z-Kj for submit@debbugs.gnu.org; Sat, 25 Feb 2012 02:05:45 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60363) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1BhM-00050Q-U7 for 10489@debbugs.gnu.org; Sat, 25 Feb 2012 02:05:42 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LZX00H00SWDNA00@a-mtaout22.012.net.il> for 10489@debbugs.gnu.org; Sat, 25 Feb 2012 09:03:00 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.12.178]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZX00H4ISWZN010@a-mtaout22.012.net.il>; Sat, 25 Feb 2012 09:03:00 +0200 (IST) In-reply-to: <87haygx97t.fsf@gmx.de> X-012-Sender: halo1@inter.net.il 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:57224 Archived-At: > From: Michael Albinus > Cc: Thierry Volpiatto , 10489@debbugs.gnu.org > Date: Fri, 24 Feb 2012 21:33:26 +0100 > > Eli Zaretskii writes: > > >> From: Thierry Volpiatto > >> Cc: Eli Zaretskii , 10489@debbugs.gnu.org > >> Date: Fri, 24 Feb 2012 17:02:16 +0100 > >> > >> (defun files-equal-p (file1 file2) > >> "Return non-nil if FILE1 and FILE2 name the same file." > >> (let ((handler (or (find-file-name-handler file1 'files-equal-p) > >> (find-file-name-handler file2 'files-equal-p)))) > >> (if handler > >> (funcall handler 'files-equal-p file1 file2) > > > > If FILE1 and FILE2 have different 'files-equal-p handlers, which one > > of them, if any, should be invoked here? > > The one for FILE1. Can you explain why? My question wasn't rhetorical, it was due to a real confusion about what should be done in this situation and why. > > IOW, shouldn't we invoke a file handler only if it can handle _both_ > > files? Also, if each file has a different handler, doesn't that in > > itself already mean the files are not equal? > > We shouldn't add too much to file name handler optimization here. The > handler will know what to do. "Will know" how? Is it documented anywhere how to write a handler so it handles such situations? If so, please point me to that documentation, and perhaps I will see the light there. > Likely, there won't be different handlers. It's always > `tramp-file-name-handler', which calls the respective sub-handlers. ??? Are we to assume that a file-handler is always the Tramp handler? What about others, like jka-compr?