unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Juri Linkov <juri@linkov.net>
Cc: "30938@debbugs.gnu.org" <30938@debbugs.gnu.org>
Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files
Date: Thu, 21 Apr 2022 15:01:47 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488E058D3765AA4DEA104A8F3F49@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <875yn27ev3.fsf@gnus.org>

> Skimming this bug report, it seems like the conclusion was that we
> don't want to change anything here, so I'm closing this bug report.

Very unfortunate.

For the record, and for Someone who might care to
fix this mistake in the future, here's a summary,
with text from previous messages.
___

There's no reason to assume that interactive and
non-interactive use of a given command should have
the same behavior wrt `dired-get-marked-files' arg
ERROR. Such hardcoding provides no benefit and can
get in the way.

A non-interactive use case for an arbitrary command
that calls ` dired-get-marked-files' does not
necessarily have `user-error' as the right behavior
for an empty set of marked files.

A common use case where the error can kick in is
when a FILTER passed to `dired-get-marked-files'
results in an empty file list.

While it is typically a user error if nothing is
marked and point is not on any file line, it is
not necessarily an error when neither of those is
the case - even for an interactive case.  The
individual command needs to decide whether that
is an error case.

Similarly, for a command B that _invokes_ such a
command A.  It's up to _B to decide_ whether to
raise an error.  If A systematically causes
`dired-get-marked-files' to raise an error in a
context where an error makes sense for A, that
can conflict with what makes sense for B.





  reply	other threads:[~2022-04-21 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-25 16:36 bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Drew Adams
2018-03-25 16:45 ` Drew Adams
2018-03-28 20:27   ` Juri Linkov
2018-03-28 23:45     ` Drew Adams
2018-03-29 20:04       ` Juri Linkov
2018-03-29 20:25         ` Noam Postavsky
2018-03-30  4:01           ` Drew Adams
2018-03-30  4:01         ` Drew Adams
2018-03-30  7:57           ` Eli Zaretskii
2018-04-02 19:30           ` Juri Linkov
2022-04-21 13:20             ` Lars Ingebrigtsen
2022-04-21 15:01               ` Drew Adams [this message]
     [not found]         ` <<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>
     [not found]           ` <<83lgeac7xs.fsf@gnu.org>
2018-03-30 15:01             ` Drew Adams
2018-03-30 15:30               ` Eli Zaretskii
     [not found]         ` <<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>
     [not found]           ` <<<83lgeac7xs.fsf@gnu.org>
     [not found]             ` <<ea1c9d9f-2405-4377-bd42-de7f020cf9d4@default>
     [not found]               ` <<83k1tt8ttp.fsf@gnu.org>
2018-03-30 15:43                 ` Drew Adams
2018-03-30 16:07                   ` Eli Zaretskii
     [not found]         ` <<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>
     [not found]           ` <<<<83lgeac7xs.fsf@gnu.org>
     [not found]             ` <<<ea1c9d9f-2405-4377-bd42-de7f020cf9d4@default>
     [not found]               ` <<<83k1tt8ttp.fsf@gnu.org>
     [not found]                 ` <<ceb6e79f-5f03-45a5-a7a4-5fe954661d5d@default>
     [not found]                   ` <<83in9d8s4b.fsf@gnu.org>
2018-03-30 17:12                     ` Drew Adams
2018-03-31  9:07                       ` Eli Zaretskii
     [not found]         ` <<<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>
     [not found]           ` <<<<<83lgeac7xs.fsf@gnu.org>
     [not found]             ` <<<<ea1c9d9f-2405-4377-bd42-de7f020cf9d4@default>
     [not found]               ` <<<<83k1tt8ttp.fsf@gnu.org>
     [not found]                 ` <<<ceb6e79f-5f03-45a5-a7a4-5fe954661d5d@default>
     [not found]                   ` <<<83in9d8s4b.fsf@gnu.org>
     [not found]                     ` <<9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default>
     [not found]                       ` <<838ta88vfz.fsf@gnu.org>
2018-03-31 16:10                         ` Drew Adams
2018-03-31 16:50                           ` Eli Zaretskii
2018-03-25 16:50 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB5488E058D3765AA4DEA104A8F3F49@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=30938@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).