GNU bug report logs -
#6817
(Feature request w/ patch) wdired should create directories needed for destination files
Previous Next
Reported by: Phil Sung <philbert <at> gmail.com>
Date: Fri, 6 Aug 2010 21:28:03 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6817 in the body.
You can then email your comments to 6817 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6817
; Package
emacs
.
(Fri, 06 Aug 2010 21:28:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Phil Sung <philbert <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 06 Aug 2010 21:28:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
It is sometimes useful in wdired to be able to move files into
directories that don't yet exist, e.g. when one is reorganizing files
and directories. The attached patch (against git HEAD), based on
previous work by Joakim Verona (source:
http://www.emacswiki.org/emacs/WDired), makes wdired create parent
directories needed as necessary for the destination files, conditional
on the variable `wdired-create-parent-directories'.
What do others think of this feature?
Regards,
Phil
[wdired-create-parent-directories.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6817
; Package
emacs
.
(Fri, 26 Feb 2016 06:46:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 6817 <at> debbugs.gnu.org (full text, mbox):
Phil Sung <philbert <at> gmail.com> writes:
> It is sometimes useful in wdired to be able to move files into
> directories that don't yet exist, e.g. when one is reorganizing files
> and directories. The attached patch (against git HEAD), based on
> previous work by Joakim Verona (source:
> http://www.emacswiki.org/emacs/WDired), makes wdired create parent
> directories needed as necessary for the destination files, conditional
> on the variable `wdired-create-parent-directories'.
>
> What do others think of this feature?
[...]
> +(defcustom wdired-create-parent-directories nil
> + "If non-nil, create parent directories of destination files.
> +
> +If non-nil, when you rename a file to a destination path within a
> +nonexistent directory, wdired will create any parent directories
> +necessary. When nil, attempts to rename a file into a nonexistent
> +directory will fail."
> + :type 'boolean
> + :group 'wdired)
[...]
> +(defun wdired-create-parentdirs (file-new)
> + "Create parent directories for FILE-NEW if they don't exist."
> + (and (not (file-exists-p (file-name-directory file-new)))
> + (message "Creating directory for file %s" file-new)
> + (make-directory (file-name-directory file-new) t)))
I think this makes sense, but I've used wdired very little, so I don't
quite have a handle on whether this is a use case that people would
like. (And if so, the default should probably be t, here.)
Opinions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6817
; Package
emacs
.
(Fri, 26 Feb 2016 17:50:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 6817 <at> debbugs.gnu.org (full text, mbox):
On Fri, Feb 26 2016 17:14 (+1030), Lars Ingebrigtsen wrote:
> Phil Sung <philbert <at> gmail.com> writes:
>
>> It is sometimes useful in wdired to be able to move files into
>> directories that don't yet exist, e.g. when one is reorganizing files
>> and directories. The attached patch (against git HEAD), based on
>> previous work by Joakim Verona (source:
>> http://www.emacswiki.org/emacs/WDired), makes wdired create parent
>> directories needed as necessary for the destination files, conditional
>> on the variable `wdired-create-parent-directories'.
>>
>> What do others think of this feature?
>
> [...]
>
>> +(defcustom wdired-create-parent-directories nil
>> + "If non-nil, create parent directories of destination files.
>> +
>> +If non-nil, when you rename a file to a destination path within a
>> +nonexistent directory, wdired will create any parent directories
>> +necessary. When nil, attempts to rename a file into a nonexistent
>> +directory will fail."
>> + :type 'boolean
>> + :group 'wdired)
>
> [...]
>
>> +(defun wdired-create-parentdirs (file-new)
>> + "Create parent directories for FILE-NEW if they don't exist."
>> + (and (not (file-exists-p (file-name-directory file-new)))
>> + (message "Creating directory for file %s" file-new)
>> + (make-directory (file-name-directory file-new) t)))
>
> I think this makes sense, but I've used wdired very little, so I don't
> quite have a handle on whether this is a use case that people would
> like. (And if so, the default should probably be t, here.)
>
> Opinions?
I've been running with this patch for years (though not extensively
using it), and it has never failed me. I think this is a very useful
addition, and would also like the "t"-default, though that is not
essential..
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6817
; Package
emacs
.
(Sat, 27 Feb 2016 00:54:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 6817 <at> debbugs.gnu.org (full text, mbox):
>>>>> Ingo Lohmar <i.lohmar <at> gmail.com> writes:
> I've been running with this patch for years (though not extensively using
> it), and it has never failed me. I think this is a very useful addition, and
> would also like the "t"-default, though that is not essential..
I think that having wdired DRTR with regard to what the renamed version of a
file should "mean" (i.e., if it implies the existence of directories that
don't yet exist, and so create them), sounds useful to me.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6817
; Package
emacs
.
(Sun, 28 Feb 2016 04:32:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 6817 <at> debbugs.gnu.org (full text, mbox):
John Wiegley <jwiegley <at> gmail.com> writes:
>>>>>> Ingo Lohmar <i.lohmar <at> gmail.com> writes:
>
>> I've been running with this patch for years (though not extensively using
>> it), and it has never failed me. I think this is a very useful addition, and
>> would also like the "t"-default, though that is not essential..
>
> I think that having wdired DRTR with regard to what the renamed version of a
> file should "mean" (i.e., if it implies the existence of directories that
> don't yet exist, and so create them), sounds useful to me.
Ok; I'll apply the patch to the trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 28 Feb 2016 04:38:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
6817 <at> debbugs.gnu.org and Phil Sung <philbert <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 28 Feb 2016 04:38:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 27 Mar 2016 11:24:03 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.