From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#35564: [PATCH v3] Tweak dired warning about "wildcard" characters Date: Sat, 29 Jun 2019 07:30:01 -0700 (PDT) Message-ID: References: <87zho2cd4f.fsf@gmail.com> <87wohvf22u.fsf@gmail.com> <87h88cvpkj.fsf_-_@gmail.com> <87a7e27gh5.fsf@gmail.com> <8736jujkvj.fsf@gmail.com> <32acf7a4-70d2-4c33-a3f5-18b082903d4a@default> <87ef3dvbgq.fsf@gmail.com> <581e7cf3-a99f-415d-a999-3b2f3f419c8f@default> <87pnmw5wpi.fsf@gmail.com> 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="50646"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35564@debbugs.gnu.org, Stefan Monnier , =?UTF-8?Q?K=C3=A9vin?= Le Gouguec To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 29 16:31:28 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 1hhEO0-000Cwl-6F for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 16:31:28 +0200 Original-Received: from localhost ([::1]:40098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhENp-0004Zd-1P for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jun 2019 10:31:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57162) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhENf-0004Xf-TU for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 10:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhENd-00070S-Mp for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 10:31:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59469) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhENa-0006ym-BY for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 10:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhENa-0000tv-4h for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2019 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jun 2019 14:31:02 +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.15618186183401 (code B ref 35564); Sat, 29 Jun 2019 14:31:02 +0000 Original-Received: (at 35564) by debbugs.gnu.org; 29 Jun 2019 14:30:18 +0000 Original-Received: from localhost ([127.0.0.1]:44778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhEMs-0000sm-5D for submit@debbugs.gnu.org; Sat, 29 Jun 2019 10:30:18 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:60912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhEMm-0000rU-Rh for 35564@debbugs.gnu.org; Sat, 29 Jun 2019 10:30:13 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5TESVN4117879; Sat, 29 Jun 2019 14:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=YKWfO8VqEn7nOO20lukKHFJdV9GXeqOKl+DxZPSeRtI=; b=FfOTp4vkgMjPRMnS5Y0RUbzIfP8wg7ODpoirkOyYvyDv2ToGfGQXEGkfsNBMCF8oQRM3 Sv9hB7pDlIW841oUfni2oYCdwM4cNol0kEnvmmvCdwhD7bi/rXdjsJ0HZKTYNM4aPQsJ viRCbxhpvb2eExx/1OuK1zwYeqOtFPBnTPcHNfUqGFB2zpmP3Qc82PMRR3LshY7VxsA9 XC0rNKgMOKQboC9mxIjMRPocu6ZstL74Y3Ltr5xSY9BCXDHTOOKesiQdzlHO7I2jyFGt ka4GGGK4JWefgaAHkicboB2H0DowNWVZgSgZX28kCIpKu4pERVQnFEUmH2fA8UIlBR7f 1Q== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2te5tb8b2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 29 Jun 2019 14:30:06 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5TEU47u067355; Sat, 29 Jun 2019 14:30:05 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2tdw3sd979-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 29 Jun 2019 14:30:05 +0000 Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5TEU2tR031080; Sat, 29 Jun 2019 14:30:02 GMT In-Reply-To: <87pnmw5wpi.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9303 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906290182 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9303 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906290182 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:161833 Archived-At: > >> > Confirm--do you mean to send these characters as-is to the shell? > >> > sed -e 's/foo?/foo!/' -e 's/bar?/bar!' > >> > ^ ^ >=20 > I don't know about the '^' trick, if the minibuffer window is narrow > enough to cause line wrapping the result won't be very readable. And I > doubt a screen reader would handle this kind of thing any better than > highlighting (someone please correct me if I'm wrong about that). Another possibility I almost mentioned is to use, by default, a face that uses `:box' or `:overline', or some such properties to make the char occurrences stand out without relying on color. That might at least help with some who have difficulty distinguishing color, but it's not an ideal solution either. I don't think we should try to jump through too many hoops about this. The main thing, I think, is to put the char itself in the sentence preceding the quoted command text. The use of `^' is not too bad, I think, even given the problems you mention. If the char occurrences that are problematic are not obvious then a user can cancel the command and check `*Messages*' for the full feedback. > Agreed on both these points. Updated patch is below, it produces > prompts like these (still using highlighting): >=20 > echo foo* > Send 1 occurence of =E2=80=98*=E2=80=99 as-is to shell? (y or n) >=20 > echo foo* bar* * > Send 2 occurences of =E2=80=98*=E2=80=99 as-is to shell? (y or n) Good. But "occurrences", not "occurences". > The last case (where there are both as-is and substituted "*") isn't so > great without highlighting (you have to count the "*"s and work out if > something unexpected is happening), but I think it's at least not worse > than the current situation. I vote for also adding the ^ indications underneath. If you think that is too often too problematic then maybe do something like one of these: 1. Give users a way to opt out or to remove that on demand. 2. Automatically remove it, based on window width, whether there are multiple lines, or whatever. But this should be controllable by a user (e.g. an option). Agreed about use of screenreaders. Users should be able to turn off the ^ indicators.