unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 46884@debbugs.gnu.org
Subject: bug#46884: [PATCH] 27.1; Cannot run find-dired with -maxdepth
Date: Wed, 03 Mar 2021 20:50:23 -0800	[thread overview]
Message-ID: <80ft1bed4g.fsf@felesatra.moe> (raw)
In-Reply-To: <83ft1c62hk.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 Mar 2021 10:55:03 +0200")

Eli Zaretskii <eliz@gnu.org> writes:
>> From: Allen Li <darkfeline@felesatra.moe>
>> 
>>  This is okay, IMO, but it would be better to allow the user to specify
>>  GLOBAL-ARGS interactively if the user invokes the command with a
>>  prefix argument.
>> 
>>  How would that interact with find-args-history?
>
> Sorry, I don't understand the question.  What does prefix arg have to
> do with history?  Maybe I'm missing something.

Currently, `find-dired' stores the `completing-read' history for `args' in
`find-args-history'.  It also stores the value for `args' in `find-args'
to use as the default for the next `find-dired' interactive call.

If we were to make `global-args' accessible interactively, how would the
history for it be stored?  The obvious solution would be to add a
completing-read for `global-args' and create `find-global-args-history'
and `find-global-args' variables to be treated similarly to
`find-args-history' and `find-args' are now.

There are two issues with this.

First, consider what the user would do if they want to repeat a
`find-dired' with `global-args' three calls in the past:

C-u M-x find-dired RET
some/directory RET
M-p M-p M-p RET ; going back three items in the history for args
M-p M-p M-p RET ; going back three items in the history for global-args

This is a poor user experience.

Second, if the user mistakenly omits the C-u, then they might run a
previous command without the global-args that were supplied.

Consider if the user runs find-dired like so:

C-u M-x find-dired RET
some/dir RET
-some -query RET
-maxdepth 3 RET

Then the user wants to repeat the query for another directory:

M-x find-dired RET
other/dir RET
M-p RET ; get previous input, M-p can be omitted since there's a default

Because the user didn't supply the C-u, the "-maxdepth 3" is omitted.
Even though it was the user's intent to repeat the last query, the user
is now running a fundamentally different query.  Again, this is a poor
user experience.





  reply	other threads:[~2021-03-04  4:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  1:12 bug#46884: 27.1; Cannot run find-dired with -maxdepth Allen Li
2021-03-03  1:20 ` bug#46884: [PATCH] " Allen Li
2021-03-03  3:38   ` Allen Li
2021-03-03  6:28     ` Eli Zaretskii
2021-03-03  8:22       ` Allen Li
2021-03-03  8:55         ` Eli Zaretskii
2021-03-04  4:50           ` Allen Li [this message]
2021-03-04  9:35             ` Juri Linkov
2021-03-05  3:21               ` Allen Li
2021-03-05  7:27                 ` Eli Zaretskii
2021-03-12  8:08                   ` Allen Li
2021-03-12 15:49                     ` bug#46884: [External] : " Drew Adams
2021-03-13  0:42                       ` Allen Li
2021-03-13  1:09                         ` Drew Adams
2021-03-13  9:46                     ` Eli Zaretskii
2021-03-13  9:58                       ` Andreas Schwab
2021-03-13 21:38                       ` Allen Li
2021-03-13 21:53                         ` Juri Linkov
2021-03-14  0:40                           ` Allen Li
2021-03-18 18:52                             ` Juri Linkov
2022-06-19 23:55                               ` bug#46884: " Lars Ingebrigtsen
2022-06-26  3:54                                 ` Allen Li
2022-06-27  7:46                                   ` Lars Ingebrigtsen
2021-03-04 13:53             ` bug#46884: [PATCH] " Eli Zaretskii
2021-03-03  9:03         ` Juri Linkov
2021-03-03 15:42         ` bug#46884: [External] : " Drew Adams
2021-03-03 16:20           ` Eli Zaretskii
2021-03-03  6:15   ` Eli Zaretskii
2021-03-03  1:34 ` bug#46884: [External] : bug#46884: " Drew Adams

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=80ft1bed4g.fsf@felesatra.moe \
    --to=darkfeline@felesatra.moe \
    --cc=46884@debbugs.gnu.org \
    --cc=eliz@gnu.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).