From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <12410.1562824271@alto> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140848"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35367@debbugs.gnu.org To: Mike Kupfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 11 16:05:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlZhA-000aUX-Dt for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 16:05:12 +0200 Original-Received: from localhost ([::1]:42050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlZh9-0006T2-55 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 10:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54705) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlZh1-0006QG-5V for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 10:05:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlZh0-0007Hw-0W for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 10:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlZgz-0007Hl-Sm for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 10:05:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlZgz-0001iN-Lt for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 10:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35367 X-GNU-PR-Package: emacs Original-Received: via spool by 35367-submit@debbugs.gnu.org id=B35367.15628538986577 (code B ref 35367); Thu, 11 Jul 2019 14:05:01 +0000 Original-Received: (at 35367) by debbugs.gnu.org; 11 Jul 2019 14:04:58 +0000 Original-Received: from localhost ([127.0.0.1]:38267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlZgv-0001i1-KJ for submit@debbugs.gnu.org; Thu, 11 Jul 2019 10:04:57 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:55496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlZgt-0001hs-SE for 35367@debbugs.gnu.org; Thu, 11 Jul 2019 10:04:56 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlZgm-0004Fb-I8; Thu, 11 Jul 2019 16:04:51 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUTBw9zPz9SJy0xFR0B AAPQiX8FAQaWYcGaAAACbklEQVQ4jVWTTY/aMBCGB4x8xo5yx7a25+Dp7hm1lu9hlbt3ieb//4S+ 4wTaWsBhHt75HlpFpBa8Kv89KiLry77Wf0G3l0piG63d+LED9XRjvKOz8oDR7q4UGJNyuvqLbTC2 Dmqzp1JiZs4x+omsNKW0FrnYUthw9j56lyyRPUsjKVCuQpxydM47Z8mazw5WzZLgCv8H+iA5GkKC pUipJzLMYXb3GD+aHOgJyto4xHFZFp9RxIGaBn+spa6P7JyC2V1e4AhgTdjA4s9WDkbU1eFU6o/j bl/8QHKYNvCz3C7XF/AAbHfF7ePdhQ3McZJDEtLgyEuCD8sG+Gy/tHxElnWtzucwziNUPNjv2F1h FmuNSQtMCDUB8A7gKzO6fs8hBgKgJ6jEPPF1Di57wkxaB/WB5mY0t4e/mz6RHvz7JBUdcUgJn4uZ 5DF1cFSAlLZ0BzPI46LgZlapvNe3zGeA73NXNDlVfkrmMwrZFFph5TS6613BhSeE7grCBpkhOI4A w8QT7cBCYSJqU18Dv0DRrXz4nHsd6QlkA0fHqBwhpico5TfpVl6Zx2UePf919UsBpsZvWIWEjXwq bjuY3pc5aPcTzAZAOvhKiOFCigBwxrTFlnY4GzQypGuKA4DRbe+XZT4p+wjgHRJQsJ1d835C3JAC QEx/FS1h3Tk6gOBi5A00K1h2Y3JwcAXgBu5A04OcgvObwjnNqjYcB84JFShAmyOUGpxID9Mlxj3h q+NX0NRRQtO9hgCIbzN+CP9HnR1EN8foFv+mq01Nu8mJI96oZzsPOhdPOabJoHWwB3UexvtVR09R TQpQnb443nX0yx+sc/ADNfhj2wAAAABJRU5ErkJggg== In-Reply-To: <12410.1562824271@alto> (Mike Kupfer's message of "Wed, 10 Jul 2019 22:51:11 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162694 Archived-At: Mike Kupfer 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