From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: file-subdir-of-p should also apply to files Date: Sun, 01 Apr 2012 10:46:01 +0800 Message-ID: <87wr602mqe.fsf@gnu.org> References: <87k421qnfw.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333248381 8136 80.91.229.3 (1 Apr 2012 02:46:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2012 02:46:21 +0000 (UTC) Cc: emacs-devel@gnu.org, Thierry Volpiatto To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 04:46: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 1SEAo8-0006Fd-EF for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2012 04:46:20 +0200 Original-Received: from localhost ([::1]:40627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEAo7-0002yn-Pk for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2012 22:46:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEAo3-0002yN-LR for emacs-devel@gnu.org; Sat, 31 Mar 2012 22:46:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEAo1-0006gj-Ui for emacs-devel@gnu.org; Sat, 31 Mar 2012 22:46:15 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:38154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEAo1-0006gf-R6 for emacs-devel@gnu.org; Sat, 31 Mar 2012 22:46:13 -0400 Original-Received: from bb121-6-72-34.singnet.com.sg ([121.6.72.34]:60882 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SEAny-0007it-Tl; Sat, 31 Mar 2012 22:46:12 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 31 Mar 2012 11:09:11 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.10 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:149261 Archived-At: Stefan Monnier writes: >> 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). Good point. I went ahead and did that, so that the change will be in the next pretest. I called the function file-in-directory-p rather than file-within-p, to match existing file function names more closely.