GNU bug report logs - #35367
26.2; `dired-copy-how-to-fn' and HOW-TO arg of `dired-create-files'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 21 Apr 2019 19:37:03 UTC

Severity: minor

Found in version 26.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: 35367 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#35367: 26.2; `dired-copy-how-to-fn' and HOW-TO arg of `dired-create-files'
Date: Thu, 11 Jul 2019 16:04:48 +0200
Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:

> Presumably it's so you could override dired's behavior for handling a
> target.  If the target is a symlink to a directory, the default behavior
> would be to treat it as a directory, but maybe there are cases where you
> want to replace the link instead.

Ah, I see.

[More useful explanation deleted; thanks for figuring it out.]

>> My interpretation of t is that all files you copy will up in the same
>> file if it's t, which is a supremely useless thing, you'd think...
>
> No, you can only copy one file if the target is a plain file.  From
> earlier in the docstring for dired-do-create-files:
>
>     The target may also be a non-directory file, if only
>     one file is marked.
>
> Maybe this sentence should be deleted:
>
>     Otherwise, the target is a plain file;
>     an error is raised unless there is exactly one marked file.
>
> The way the docstring is currently written, it seems to imply that the
> error only gets raised in the case where HOW-TO is nil.
>
> I agree that this is all very complicated and confusing.  It doesn't
> help that if HOW-TO is t, the target is treated as a plain file.  But if
> HOW-TO is a function, it returns nil to indicate a plain file.

Could you perhaps propose a rewrite of the doc string here to make it
more understandable; both what it does and say when it might be useful?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.