* file-subdir-of-p should also apply to files
@ 2012-03-30 20:54 Stefan Monnier
2012-03-31 6:44 ` Thierry Volpiatto
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2012-03-30 20:54 UTC (permalink / raw)
To: emacs-devel
Rather than (file-subdir-of-p DIR1 DIR2) we should have
(file-within-p FILE DIR). Could someone take care of this
adjustment ASAP?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: file-subdir-of-p should also apply to files
2012-03-30 20:54 file-subdir-of-p should also apply to files Stefan Monnier
@ 2012-03-31 6:44 ` Thierry Volpiatto
2012-03-31 15:09 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Volpiatto @ 2012-03-31 6:44 UTC (permalink / raw)
To: emacs-devel
Hi Stefan,
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Rather than (file-subdir-of-p DIR1 DIR2) we should have
> (file-within-p FILE DIR).
Why and where?
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?
> Could someone take care of this adjustment ASAP?
>
>
> Stefan
>
>
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: file-subdir-of-p should also apply to files
2012-03-31 6:44 ` Thierry Volpiatto
@ 2012-03-31 15:09 ` Stefan Monnier
2012-03-31 15:28 ` Deniz Dogan
2012-04-01 2:46 ` Chong Yidong
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2012-03-31 15:09 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: emacs-devel
>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: file-subdir-of-p should also apply to files
2012-03-31 15:09 ` Stefan Monnier
@ 2012-03-31 15:28 ` Deniz Dogan
2012-04-01 2:46 ` Chong Yidong
1 sibling, 0 replies; 5+ messages in thread
From: Deniz Dogan @ 2012-03-31 15:28 UTC (permalink / raw)
To: emacs-devel
On 2012-03-31 17:09, Stefan Monnier wrote:
>>> Rather than (file-subdir-of-p DIR1 DIR2) we should have
>>> (file-within-p FILE DIR).
>> Why and where?
>
> Why not?
>
Where?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: file-subdir-of-p should also apply to files
2012-03-31 15:09 ` Stefan Monnier
2012-03-31 15:28 ` Deniz Dogan
@ 2012-04-01 2:46 ` Chong Yidong
1 sibling, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2012-04-01 2:46 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel, Thierry Volpiatto
Stefan Monnier <monnier@iro.umontreal.ca> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-01 2:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 20:54 file-subdir-of-p should also apply to files Stefan Monnier
2012-03-31 6:44 ` Thierry Volpiatto
2012-03-31 15:09 ` Stefan Monnier
2012-03-31 15:28 ` Deniz Dogan
2012-04-01 2:46 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.