From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>
Cc: 30938@debbugs.gnu.org
Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files
Date: Thu, 29 Mar 2018 21:01:44 -0700 (PDT) [thread overview]
Message-ID: <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> (raw)
In-Reply-To: <87o9j6k5qx.fsf@mail.linkov.net>
> > Emacs has already updated those 13 commands (there's one
> > also in dired-x.el) to add the 5th arg to their calls to
> > `dired-get-marked-files'. The only further change needed
> > is to pass that arg as non-nil only when the command is
> > called interactively. It is only in the interactive case
> > that we can know (assume) that such an error should be
> > raised.
>
> Don't you see there is something wrong in adding the same INTERACTIVEP
> arg to all these 13 commands and possibly to more 15 other commands?
> What I'm asking for is an alternative, e.g. to detect if the command is
> called interactively and raise an error only in this case.
Instead of asking me if I don't see there is something
wrong with that, why don't you tell us what you think
is wrong with it?
I said from the beginning:
Please revert this change as soon as possible,
while you look for a better way to do what you
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
intended to do for it.
I'm open to other ways to do what is needed, if they
are better. Feel free to propose something.
I'm fine with what I proposed - either proposal:
1. What I proposed at the outset: revert the bad change
and do nothing until a better approach is decided on.
2. What I proposed in my follow-up: provide an INTERACTIVEP
arg to distinguish interactive use, and (at most) raise
a `user-error' only in the interactive-call case.
You asked if there was a better approach than doing #2.
I replied that #2 seems fine, to me. But please feel free
to propose another approach, explaining why you think it's
better.
Someone apparently thought it was OK to change 13 commands
to ALWAYS raise an error in the no-files case. Why are
you shocked to hear that I would be OK with changing those
same commands to not raise the error in the non-interactive
case - IOW, to return them to their longstanding behavior
in that case?
As for the other 15 commands: I don't know whether whoever
changed the 13 also considered the 15 and decided no error
was ever needed in their case. But if not then the same
attention would be needed for them either to fix them as I
suggested (#2) or to break them as has been done for the
13.
I see no problem at all with having different behavior
when interactive and when not, especially when the only
difference is whether to raise an error in a corner case.
And the way to do that (explicitly recommended in the
manual) to make that distinction is to add an optional
INTERACTIVEP arg.
next prev parent reply other threads:[~2018-03-30 4: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 [this message]
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
[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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default \
--to=drew.adams@oracle.com \
--cc=30938@debbugs.gnu.org \
--cc=juri@linkov.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.