[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35367: 26.2; `dired-copy-how-to-fn' and HOW-TO arg of `dired-create-
bug#35367: 26.2; `dired-copy-how-to-fn' and HOW-TO arg of `dired-create-files'
Thu, 11 Jul 2019 16:04:48 +0200
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Mike Kupfer <address@hidden> 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