From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: file-subdir-of-p should also apply to files Date: Sat, 31 Mar 2012 11:09:11 -0400 Message-ID: References: <87k421qnfw.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333206562 5541 80.91.229.3 (31 Mar 2012 15:09:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 31 Mar 2012 15:09:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 31 17:09:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SDzvb-0002Bx-QV for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2012 17:09:19 +0200 Original-Received: from localhost ([::1]:37131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDzvb-0003Rc-4k for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2012 11:09:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDzvY-0003RX-CZ for emacs-devel@gnu.org; Sat, 31 Mar 2012 11:09:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDzvW-0000A3-QC for emacs-devel@gnu.org; Sat, 31 Mar 2012 11:09:15 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDzvW-00009d-MD for emacs-devel@gnu.org; Sat, 31 Mar 2012 11:09:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqRV/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="170833623" Original-Received: from 76-10-164-85.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 31 Mar 2012 11:09:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EAF6259445; Sat, 31 Mar 2012 11:09:11 -0400 (EDT) In-Reply-To: <87k421qnfw.fsf@gmail.com> (Thierry Volpiatto's message of "Sat, 31 Mar 2012 08:44:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149259 Archived-At: >> Rather than (file-subdir-of-p DIR1 DIR2) we should have >> (file-within-p FILE DIR). > Why and where? Why not? > It is not a problem to copy a single file of TREE to a subdirectory of > TREE, but it is a problem to copy TREE to one of its subdirectories, > isn't it? We're not talking about copying but about file-subdir-of-p. The copy operation only uses file-subdir-of-p with a first argument which is a directory, but that doesn't mean we shouldn't also handle the case where the first argument is a file (which occurs in some places which currently use string-prefix-p). Stefan