From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#46884: [PATCH] 27.1; Cannot run find-dired with -maxdepth Date: Wed, 03 Mar 2021 20:50:23 -0800 Message-ID: <80ft1bed4g.fsf@felesatra.moe> References: <83k0qo699n.fsf@gnu.org> <83ft1c62hk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33923"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 46884@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 04 05:51:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHfx9-0008jp-79 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 05:51:11 +0100 Original-Received: from localhost ([::1]:60044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHfx7-0004zG-RS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Mar 2021 23:51:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHfx0-0004yY-Am for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 23:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHfx0-0004qX-35 for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 23:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHfx0-0005wa-26 for bug-gnu-emacs@gnu.org; Wed, 03 Mar 2021 23:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Mar 2021 04:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46884 X-GNU-PR-Package: emacs Original-Received: via spool by 46884-submit@debbugs.gnu.org id=B46884.161483343422804 (code B ref 46884); Thu, 04 Mar 2021 04:51:02 +0000 Original-Received: (at 46884) by debbugs.gnu.org; 4 Mar 2021 04:50:34 +0000 Original-Received: from localhost ([127.0.0.1]:57408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHfwX-0005vj-Kk for submit@debbugs.gnu.org; Wed, 03 Mar 2021 23:50:33 -0500 Original-Received: from mail-pf1-f178.google.com ([209.85.210.178]:44306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHfwV-0005vT-12 for 46884@debbugs.gnu.org; Wed, 03 Mar 2021 23:50:32 -0500 Original-Received: by mail-pf1-f178.google.com with SMTP id t29so18027825pfg.11 for <46884@debbugs.gnu.org>; Wed, 03 Mar 2021 20:50:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dsC6Hwqf8HPlSV63eWavVV/N7E8do6OZAlfoFqF6dNI=; b=bnMOKzbQtCV9cbQsVol9W7wozKNotHv1+PeKHwlk3lXNG+AUS7OxR97mdMVttK7CYp BT/IHXLwVsTBJGuLRmQvOIiX4ptD1VYZ7pXa6rZcDajaFg58SleoftZzu16I6RW5bQkg Xr5ZivC2x2O9ihUReJpQCpdIZpD9Rd3mtKI4Ir2daXc9f5lPxTBf9qDEKaVqqM8LeBnG NfYsD4H/z9wMIJvXPV1ySdCdE98aaDxEYwwksdj3sSoI0fwgxdtNTjSrgfrHN/bg9dC7 B/FzZg+uZffkxJumSuNtQNDm6ZietuD4zCQPIpTexvTH3ECKNssvbcLMedBNHYxeQFId 0TBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=dsC6Hwqf8HPlSV63eWavVV/N7E8do6OZAlfoFqF6dNI=; b=mDxwNOuq3ZYBXw1jMT9Uc0Y6ATWF8Zyi6fEVk5KW2Jnp5+hUaRs3eWWzsp80rvy8+q ClvkUgmqzDVQPGWx9Mojb8chUrnJHH8PSPniYYZcOLfYiDEPOxnhbQmk3qGLgGj/zrxy AHy8B6xYP0zsCToE70Z5LFVosT0KgLFjGzNND3AkovrDtDlpkmC/idDigrH38bJhofFf AeDFzj6ChuXGymxx59Wuqv3lPoNzhuCEOHfzemJIG33NznJU5Na+PJNJZztprDWTeC0P vCScb5thhN3pihrrLSs+0ZTFJ83PlSlG1lsyFk7CodHsZWVod/VjFJQNX3FocPO0vK/h NFEw== X-Gm-Message-State: AOAM532hFH0Fr8GrASPh9+0W87O1FpPR8+5t0hBxzopkt9TgZiZ34COI jLBbQstZnXnUrNQ0CrtTFOxoUkshHsqYqg== X-Google-Smtp-Source: ABdhPJxnzqocfj43dhpsnlwO1Cv0vPkprm5Gy6GIrqe7hHWBUJp2HOpellO3FZKBFv8jUHiGE6dqPw== X-Received: by 2002:a65:4584:: with SMTP id o4mr2097291pgq.266.1614833425080; Wed, 03 Mar 2021 20:50:25 -0800 (PST) Original-Received: from localhost ([2600:1700:7270:7d1f:fa59:71ff:fe00:10cc]) by smtp.gmail.com with ESMTPSA id v1sm8238507pjh.29.2021.03.03.20.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 20:50:24 -0800 (PST) In-Reply-To: <83ft1c62hk.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 Mar 2021 10:55:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201358 Archived-At: Eli Zaretskii writes: >> From: Allen Li >> >> 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.