From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs 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) Message-ID: <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522382417 28974 195.159.176.226 (30 Mar 2018 04:00:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2018 04:00:17 +0000 (UTC) Cc: 30938@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 06:00:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1lD2-0007RJ-9v for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2018 06:00:12 +0200 Original-Received: from localhost ([::1]:56992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1lF5-0006V8-Vf for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2018 00:02:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1lEs-0006Ta-DN for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2018 00:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1lEp-0005M4-8j for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2018 00:02:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1lEp-0005Lr-3f for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2018 00:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1lEo-0001Gs-Kh for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2018 00:02: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: Fri, 30 Mar 2018 04:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15223825164866 (code B ref 30938); Fri, 30 Mar 2018 04:02:02 +0000 Original-Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 04:01:56 +0000 Original-Received: from localhost ([127.0.0.1]:59242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1lEi-0001GQ-0j for submit@debbugs.gnu.org; Fri, 30 Mar 2018 00:01:56 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:42288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1lEf-0001GC-K6 for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 00:01:54 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2U3gwcI006630; Fri, 30 Mar 2018 04:01:47 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-2017-10-26; bh=0uXyWm0eRLAoLOajO8ZpDBq43x/JPfFQ3YpUA2FdKxU=; b=dEGOnQmRzVZG2XouP58zlcyLeZ1CEanKhDe5vmJNTSz3SVo+E5InfhAb4/dpG4t7uxY2 AyyxH6ghdp4eQoDb1oXLe6bhgU2ea15ro1Bc1I2upLcL17kYpPKre4nBIadQLTiPXkDg msUqTNP6I3+yDEetpderPOR/mx8tUdFbvImRPHGZL1oMDJDZofwuHURVfqqAXprdH7vu cY2zA8HGbxYAxRqdo46LI35pdyudQgCTOP9lzHyO4Fe3QIguYwcXvmsbhetU1S8cph4i x9lT0hRPRcRDJA629hDKTN9AjVrTLbZ7z/RP9epGK8CMHgmIF0X3B8t3cEUD7i6Br4yT Rw== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2h1djrg0va-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 04:01:47 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2U41klG032614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 04:01:46 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2U41jvv015133; Fri, 30 Mar 2018 04:01:46 GMT In-Reply-To: <87o9j6k5qx.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8847 signatures=668697 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-1711220000 definitions=main-1803300029 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: 208.118.235.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:144713 Archived-At: > > 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. >=20 > 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.