From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#35564: [PATCH v5] Tweak dired warning about "wildcard" characters Date: Sun, 22 Dec 2019 17:02:07 +0100 Message-ID: <87v9q85oxs.fsf@gmail.com> References: <87zho2cd4f.fsf@gmail.com> <87wohvf22u.fsf@gmail.com> <87h88cvpkj.fsf_-_@gmail.com> <87imsinbmr.fsf_-_@gmail.com> <87o8yoign9.fsf_-_@gmail.com> <87a77qhzvm.fsf@gmail.com> <87v9qcf00w.fsf@mail.linkov.net> <837e2r1iph.fsf@gnu.org> <87a77mn3cw.fsf@gmail.com> <834kxu17hm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134113"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, 35564@debbugs.gnu.org, npostavs@gmail.com, juri@linkov.net, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 22 17:03:17 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 1ij3hM-000YkX-5h for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Dec 2019 17:03:16 +0100 Original-Received: from localhost ([::1]:48700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ij3hK-0003gN-W3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Dec 2019 11:03:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ij3h9-0003fo-Dp for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 11:03:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ij3h8-0004u7-3X for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 11:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ij3h7-0004sx-To for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 11:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ij3h7-0008Po-Pq for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 11:03:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87zho2cd4f.fsf@gmail.com> Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2019 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35564-submit@debbugs.gnu.org id=B35564.157703054032291 (code B ref 35564); Sun, 22 Dec 2019 16:03:01 +0000 Original-Received: (at 35564) by debbugs.gnu.org; 22 Dec 2019 16:02:20 +0000 Original-Received: from localhost ([127.0.0.1]:50155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ij3gR-0008Ol-Hb for submit@debbugs.gnu.org; Sun, 22 Dec 2019 11:02:19 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:40065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ij3gQ-0008OY-Hi for 35564@debbugs.gnu.org; Sun, 22 Dec 2019 11:02:19 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id t14so13825277wmi.5 for <35564@debbugs.gnu.org>; Sun, 22 Dec 2019 08:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=YGewpqLeV/3yk1z0OqYPeuor0Kqcv2xj43fTKf0MSeI=; b=Yqd0Dw4AOojijQBhpAWnD9cXYMPSDYdhwnHgRICqkbjvcwRUDnv4WNq1kFJfSDQCO4 DlZXT+5L0aWgEuoOypqBO7eUmpJVu7EnzT6at2GCWtUfo5ktBplbfw55wPS3IA4eMqtf 1lKYJP10gX3zVNVnAcMgHoNQVr3pmjBHxO7tBZNeAafmNG6TpylKy9qtBhc4fEiF0E4T R0TNVeu6qmmLZDk1WWC5bdjZyad2NTvqiNIDfKCZgVLt/rdJFwcn/eA+N32YLy7sZOxb 8VyeLbA6Cefmsr+1AOkfNr6uvJjzwRB6XHrSet8poCRtoKki/DFIS2ry583++dmUHQGr TFfg== 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:message-id :user-agent:mime-version:content-transfer-encoding; bh=YGewpqLeV/3yk1z0OqYPeuor0Kqcv2xj43fTKf0MSeI=; b=R5G0fy1d7Tr6loJpwxk/rwpEDuPcUkJezvxIB7FcjgUeJ2t6fdHXT0Qc4knGTSSHsi TeOC4mRJzCR4WUDvbc3YsL1TieUdwlgRECPbRJapVRU6rKlSV2pTv6PqF6RuHt7blQTG iPTd6tTdnBympN+2xL29GYnDZnxs9GhOVeHBXoiXl+f20LwTFB0kNwIbvPJYzzvcTzJ3 lBQ7Z5VtwhO/Cvh0aPVCumwbBgvbJGDgPSqLYpEiYFZIMjy77lkWOR0cvyWdnfkthiNf fdBrefhEj+qiKeKQV6ElNDZWN6qecKGNN4PsN2SnLvQSkjVZ/6sFKeXusnQlbwMlNxGW Fp6Q== X-Gm-Message-State: APjAAAUAiD264MMoEyJOICaHbnD7yk1LV2BR/+QxxnEl1ZEvGgvDG0MY ZNyGsBtfvve76e8ONI80l8o= X-Google-Smtp-Source: APXvYqzxAPNV+6DZErsK0lvYzdctFchnLnXFGfBCT4isE7TMR+XA/OCCyTc6RPtfanGCn46juiLTDw== X-Received: by 2002:a7b:c30b:: with SMTP id k11mr27514757wmj.36.1577030532316; Sun, 22 Dec 2019 08:02:12 -0800 (PST) Original-Received: from little-buster ([109.190.253.11]) by smtp.gmail.com with ESMTPSA id r6sm17575984wrq.92.2019.12.22.08.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 08:02:11 -0800 (PST) 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:173639 Archived-At: Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: Juri Linkov , 35564@debbugs.gnu.org, >> michael_heerdegen@web.de, npostavs@gmail.com, monnier@iro.umontreal.= ca, >> drew.adams@oracle.com >> Date: Fri, 20 Dec 2019 21:34:07 +0100 >>=20 >> - in the simplest case, the UI change is minor: it turns this message: >>=20 >> > Confirm--do you mean to use =E2=80=98?=E2=80=99 as a wildcard? (y or= n) >>=20 >> into this one: >>=20 >> > 1 occurrence of =E2=80=98?=E2=80=99 will not be substituted. Procee= d? (y, n, ?) ? >>=20 >> (or, with read-multiple-choice:) >>=20 >> > 1 occurrence of =E2=80=98?=E2=80=99 will not be substituted. Procee= d? (_y_es, _n_o, toggle _d_etails, _?_):=20 > > Is this the best wording you've been able to arrive at? It sounds > slightly confusing to me (but then I don't use this facility too > much). The confusing part is that it talks about "substitution", and > the user might not be aware that there is any substitution going on. Indeed, that's why the prompt now supports an additional action to pop a help buffer explaining what the deal is[1]. Fundamentally, this prompt *is* about the substitution feature. Dired detects non-isolated occurrences of '*' and '?', and requests confirmation before proceeding without substituting them. With this in mind, explicitly mentioning "substitution" doesn't sound too outlandish=E2= =80=A6 ( Or, we could assume that the current message is correct (i.e. it's the wildcards we want to warn about) but the condition that triggers it is wrong, i.e. Dired should be smarter and only warn when the characters are unquoted and unescaped. That sounds complex to implement though. As Drew noted[2], another way to handle this would be asking users whether they want to substitute the non-isolated characters. That still implies talking about "substitution" though. Also, users can already mark occurrences of '?' for substitution using backquotes, as explained in the new help buffer. ) To wrap up, I'd say that the current message makes me go: "Huh? No, I don't want to use these characters as wildcards." *hits "n", command is aborted* *confusion: extreme & growing* I'm hoping that the new message will have users go: "Huh? Why would Dired substitute these characters?" *hits "?", skims, hits "y", moves on* *confusion: mild & receding* Thank you for your patience, and for reviewing this. [1]=20 > If your command contains occurrences of =E2=80=98*=E2=80=99 surrounded by > whitespace, =E2=80=98dired-do-shell-command=E2=80=99 substitutes them for= the > entire file list to process. Otherwise, if your command contains > occurrences of =E2=80=98?=E2=80=99 surrounded by whitespace or =E2=80=98`= =E2=80=99, Dired will > run the command once for each file, substituting =E2=80=98?=E2=80=99 for = each > file name. >=20 > Your command contains occurrences of =E2=80=98?=E2=80=99 that will not be > substituted, and will be passed through normally to the shell. >=20 > sed 's/?/!/' >=20 > (Press ^ to add markers below these occurrences.) [2] bug#35564#83