From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Mar 2018 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30938@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.152199578615053 (code B ref -1); Sun, 25 Mar 2018 16:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Mar 2018 16:36:26 +0000 Received: from localhost ([127.0.0.1]:53130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08d8-0003ui-GF for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:36:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08d6-0003uT-Iu for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f08d0-0007EY-Bg for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:36:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f08d0-0007Du-95 for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:36:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f08cy-000172-W7 for bug-gnu-emacs@gnu.org; Sun, 25 Mar 2018 12:36:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f08cu-000782-Vk for bug-gnu-emacs@gnu.org; Sun, 25 Mar 2018 12:36:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:49050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f08cu-00075Q-Ku for bug-gnu-emacs@gnu.org; Sun, 25 Mar 2018 12:36:12 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2PGU9Vs191357 for ; Sun, 25 Mar 2018 16:36:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=vwT1jUhTgHKtpq+7rBgDXgkKx5lGcJ2NdG/+TYyLtB4=; b=VFhRwUThb7rO8C+WRsEAJKsAds+Nu0G7dqkG+SoONNsi9fByiRX1sZGpSooIDjpo6nSo 4vD2eFtxWPB5YKSVfdgCLdjuT0Y+prfJtb69xswAnrz26SkWKyyJoNvrAB/AP+6+9TiF nZWcsvv7q5WsMln6SU19gn1yijL6dEPzQ94dYHVbX1W5PT3UG0z7cxMAXbixuZWYchNs s/gb/jcC4W38sItpS/+ZgeQo6VDp6K5WGqST3f064SaO7rohDd41PAsey8FQhMPwm7BI Hov9+hHIMSL59bZoG7Zn6zaIj57Z3RQzJSNRPQe2A/m9r1KzVa75Ctp9Jd8z7tNwh4UG 6Q== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2gxf5r8123-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 25 Mar 2018 16:36:09 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2PGa9sH009837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 25 Mar 2018 16:36:09 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2PGa8jq030048 for ; Sun, 25 Mar 2018 16:36:09 GMT MIME-Version: 1.0 Message-ID: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> Date: Sun, 25 Mar 2018 09:36:08 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8843 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=869 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803250197 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Emacs 27 has introduced an unfortunate incompatible change. It has added an extra optional arg, ERROR, to `dired-get-marked-files', which is fine. The bug is that calls to `dired-get-marked-files' have been changed all over the place to systematically pass a non-nil value for optional arg ERROR. In general, this is completely inappropriate when the command invoking `dired-get-marked-files' is not called interactively. There is NO reason to suppose that a `user-error' occurred when a given command is invoked non-interactively. The logic behind this change is wrong - much too simplistic. A non-nil ERROR arg should perhaps be passed when called from some commands, but typically only when such a command is called interactively. Only then might Emacs legitimately assume (and even this is arguable, in general) that the user has committed an error. Please revert this change as soon as possible, while you look for a better way to do what you intended to do for it. Please do not impose raising such a user error on commands when they are not invoked interactively. It is perfectly reasonable for some such commands to be invoked when there are no marked files, in which case the action should typically be a no-op - it should not be to raise an error (much less a "user" error). In GNU Emacs 27.0.50 (build 3, x86_64-w64-mingw32) of 2018-03-21 Repository revision: e70d0c9e66d7a8609450b2889869d16aeb0363b5 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install -C 'CFLAGS=3D-O2 -static -g3'' From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Mar 2018 16:47:01 +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: To: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152199636715931 (code B ref 30938); Sun, 25 Mar 2018 16:47:01 +0000 Received: (at 30938) by debbugs.gnu.org; 25 Mar 2018 16:46:07 +0000 Received: from localhost ([127.0.0.1]:53135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08mV-00048s-Is for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:46:07 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:53622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08mT-000489-Iz for 30938@debbugs.gnu.org; Sun, 25 Mar 2018 12:46:05 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2PGUjMQ047211 for <30938@debbugs.gnu.org>; Sun, 25 Mar 2018 16:45:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=oGbTxby5gSQUo86eZWo6RtaYeDABqVXelW1zk3P3Uhg=; b=QYR7AiVwMgmFqaSRZW2V21X+7b3rkcooOtAD1I4fX0wdgZGtZvPY5qFaJx1wR92cv38B qv1D3oC3mZfvZ61Rm32JYh75JKHlHox/zbnOoNpPn12iUMDej1na/8IPhD7rwUZ5Qlco GWbudqio3VTcV8C+SVVRZ1UdEHMFDYxdsKt1IkeLxfQ4aElAGJEoFS5LfEuliJzVkOKS 9z16dvl5H5Nb8wlag5XrEfHs8M3FdoYPqY05+gLTPcfe8rOULalW3Q1yku3IHOCtCp3Y 20uvlWeI8bTP7Qrs0splp0K8/TYZ9Ix8BLtWXD48XCpOYZ4WfydenpnVsGKBZB29BUDU oQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2gxf5r01fv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <30938@debbugs.gnu.org>; Sun, 25 Mar 2018 16:45:59 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2PGjwoU021192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <30938@debbugs.gnu.org>; Sun, 25 Mar 2018 16:45:58 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2PGjvO2007019 for <30938@debbugs.gnu.org>; Sun, 25 Mar 2018 16:45:58 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 25 Mar 2018 09:45:57 -0700 (PDT) From: Drew Adams References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> In-Reply-To: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8843 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=506 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803250197 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) For example, `dired-do-isearch' could be called non-interactively in a context where it should do nothing (or something else should be done) if there are no marked files. Something like this is better: (defun dired-do-isearch (&optional interactivep) "Search for a string through all marked files using Isearch. When invoked interactively, raise an error if no files are marked." (interactive "p") (multi-isearch-files (dired-get-marked-files nil nil 'dired-nondirectory-p nil interactivep))) From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Mar 2018 16:51:01 +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: To: Drew Adams Cc: 30938@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152199664316333 (code B ref 30938); Sun, 25 Mar 2018 16:51:01 +0000 Received: (at 30938) by debbugs.gnu.org; 25 Mar 2018 16:50:43 +0000 Received: from localhost ([127.0.0.1]:53143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08qx-0004FN-Iu for submit@debbugs.gnu.org; Sun, 25 Mar 2018 12:50:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f08qw-0004F9-7w for 30938@debbugs.gnu.org; Sun, 25 Mar 2018 12:50:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f08qn-0006Cw-Vl for 30938@debbugs.gnu.org; Sun, 25 Mar 2018 12:50:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f08qn-0006Cm-Rx; Sun, 25 Mar 2018 12:50:33 -0400 Received: from [176.228.60.248] (port=1960 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f08qn-0001o9-Ac; Sun, 25 Mar 2018 12:50:33 -0400 Date: Sun, 25 Mar 2018 19:50:41 +0300 Message-Id: <83zi2wf6am.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> (message from Drew Adams on Sun, 25 Mar 2018 09:36:08 -0700 (PDT)) References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 25 Mar 2018 09:36:08 -0700 (PDT) > From: Drew Adams > > The bug is that calls to `dired-get-marked-files' have been changed all > over the place to systematically pass a non-nil value for optional arg > ERROR. In general, this is completely inappropriate when the command > invoking `dired-get-marked-files' is not called interactively. > > There is NO reason to suppose that a `user-error' occurred when a given > command is invoked non-interactively. > > The logic behind this change is wrong - much too simplistic. A non-nil > ERROR arg should perhaps be passed when called from some commands, but > typically only when such a command is called interactively. Only then > might Emacs legitimately assume (and even this is arguable, in general) > that the user has committed an error. Please provide at least one example (preferably more than one) of a real-life use case where these changes get in the way. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2018 20:30: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: To: Drew Adams Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15222689482796 (code B ref 30938); Wed, 28 Mar 2018 20:30:02 +0000 Received: (at 30938) by debbugs.gnu.org; 28 Mar 2018 20:29:08 +0000 Received: from localhost ([127.0.0.1]:57697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1Hgx-0000j2-On for submit@debbugs.gnu.org; Wed, 28 Mar 2018 16:29:07 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:49154 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1Hgv-0000it-Lu for 30938@debbugs.gnu.org; Wed, 28 Mar 2018 16:29:06 -0400 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id BE4561C0065; Wed, 28 Mar 2018 13:29:04 -0700 (PDT) Received: from localhost.linkov.net (m91-129-101-145.cust.tele2.ee [91.129.101.145]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPSA id CBE6D1C0058; Wed, 28 Mar 2018 13:29:03 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> Date: Wed, 28 Mar 2018 23:27:04 +0300 In-Reply-To: (Drew Adams's message of "Sun, 25 Mar 2018 09:45:57 -0700 (PDT)") Message-ID: <87605g7xpj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > For example, `dired-do-isearch' could be called non-interactively > in a context where it should do nothing (or something else should > be done) if there are no marked files. Something like this is > better: > > (defun dired-do-isearch (&optional interactivep) > "Search for a string through all marked files using Isearch. > When invoked interactively, raise an error if no files are marked." > (interactive "p") > (multi-isearch-files > (dired-get-marked-files > nil nil 'dired-nondirectory-p nil interactivep))) Is there a better way than doing the same by adding such a formal arg to all 12 affected commands? From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Mar 2018 23:46: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: To: Juri Linkov Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152228076019961 (code B ref 30938); Wed, 28 Mar 2018 23:46:02 +0000 Received: (at 30938) by debbugs.gnu.org; 28 Mar 2018 23:46:00 +0000 Received: from localhost ([127.0.0.1]:57761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1KlU-0005Bt-F1 for submit@debbugs.gnu.org; Wed, 28 Mar 2018 19:46:00 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:47672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1KlT-0005Be-Ip for 30938@debbugs.gnu.org; Wed, 28 Mar 2018 19:45:59 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2SNTXct080518; Wed, 28 Mar 2018 23:45:53 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=kCcq8Xeqlmhpuik6jwc+M/slihwasqtZlnzQevTw1j4=; b=Z4uvn2dQVSjFcNvOlaWCUlMcinp/3HG0OXGq7o7TJrzyx52Qz3LhYBPQLf1d1DsabENX pQUkL4L0YsNaq0+ZIWdhsFsQ7fhBv/M34HxKBCGNKJuuAkOhOhwElCt3ZCPTAdVaNDKU Pabhmz2rNYMSVca+gldT7HoPCh8b9PyafKoc7vX5uuS4T9KSobVbM1w7HaSqs+RusZbc vu12Z3zxSiOjP2q2xEQCJrb+r1ySVy1Orqjzf59qOh7ee8nszfy8zy9ZSJ91z7qZMujC NLVHIZ2hgJdiJesWNeYOV/372yQM2otZC8zuDFjMrPtI3bLqdQOkqi8PGOF7ujB8eZc6 eg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2h0ms6818b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Mar 2018 23:45:53 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2SNjqOm011314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Mar 2018 23:45:52 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2SNjpss023177; Wed, 28 Mar 2018 23:45:51 GMT MIME-Version: 1.0 Message-ID: <70149736-0c90-4059-91d0-155144bf4abd@default> Date: Wed, 28 Mar 2018 16:45:50 -0700 (PDT) From: Drew Adams References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> In-Reply-To: <87605g7xpj.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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8846 signatures=668695 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-1803280233 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > For example, `dired-do-isearch' could be called non-interactively > > in a context where it should do nothing (or something else should > > be done) if there are no marked files. Something like this is > > better: > > > > (defun dired-do-isearch (&optional interactivep) > > "Search for a string through all marked files using Isearch. > > When invoked interactively, raise an error if no files are marked." > > (interactive "p") > > (multi-isearch-files > > (dired-get-marked-files > > nil nil 'dired-nondirectory-p nil interactivep))) >=20 > Is there a better way than doing the same by adding such a formal arg > to all 12 affected commands? Are you asking whether adding an optional INTERACTIVEP arg to commands that call `dired-get-marked-files', and passing that as the 5th arg, is better than having them systematically raise a `user-error' (i.e., even in the non-interactive case) when `dired-get-marked-files' finds no marked files? If so, yes; that was the point I was making in that mail. There is not necessarily any user error - or any error at all - when no files are marked (e.g., when the function is called on a non-file-line part of the buffer). That's what I've done in my code (dired+.el), for example: ;; Updated for Emacs 27-pretest-2 change in dired-get-marked-files signatur= e. ;; dired-get-marked-files: Added optional arg ERROR-IF-NONE-P. ;; diredp-list-marked, diredp-insert-subdirs, dired-do-(i)search(-regexp), ;; dired-do-query-replace-regexp, dired-do-find-marked-files, ;; diredp-describe-marked-autofiles: ;; Added optional arg INTERACTIVEP. ;; Pass non-nil ERROR-IF-NONE-P to dired-get-marked-files when INTERACTI= VEP. ;; (See Emacs bug #30938.) 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. [Dunno whether any of the 15 _other_ commands that call `dired-get-marked-files' need similar treatment, i.e., those where NO 5th arg is passed yet (in dired.el, image-dired.el, epa-dired.el, thumbs.el, and message.el).] From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2018 20:06: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: To: Drew Adams Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152235393019726 (code B ref 30938); Thu, 29 Mar 2018 20:06:02 +0000 Received: (at 30938) by debbugs.gnu.org; 29 Mar 2018 20:05:30 +0000 Received: from localhost ([127.0.0.1]:59065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1dne-000586-I3 for submit@debbugs.gnu.org; Thu, 29 Mar 2018 16:05:30 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:53963 helo=homiemail-a19.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1dnb-00057v-2a for 30938@debbugs.gnu.org; Thu, 29 Mar 2018 16:05:29 -0400 Received: from homiemail-a19.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTP id 28231604076; Thu, 29 Mar 2018 13:05:26 -0700 (PDT) Received: from localhost.linkov.net (m91-129-101-145.cust.tele2.ee [91.129.101.145]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPSA id 4EDA560406B; Thu, 29 Mar 2018 13:05:25 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> Date: Thu, 29 Mar 2018 23:04:54 +0300 In-Reply-To: <70149736-0c90-4059-91d0-155144bf4abd@default> (Drew Adams's message of "Wed, 28 Mar 2018 16:45:50 -0700 (PDT)") Message-ID: <87o9j6k5qx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 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. 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. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2018 20:27:01 +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: To: Juri Linkov Cc: 30938@debbugs.gnu.org, Drew Adams Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152235516221603 (code B ref 30938); Thu, 29 Mar 2018 20:27:01 +0000 Received: (at 30938) by debbugs.gnu.org; 29 Mar 2018 20:26:02 +0000 Received: from localhost ([127.0.0.1]:59086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1e7U-0005c3-GU for submit@debbugs.gnu.org; Thu, 29 Mar 2018 16:26:01 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:36543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1e7S-0005bp-6R for 30938@debbugs.gnu.org; Thu, 29 Mar 2018 16:25:58 -0400 Received: by mail-oi0-f43.google.com with SMTP id t16-v6so6260534oih.3 for <30938@debbugs.gnu.org>; Thu, 29 Mar 2018 13:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g0LXqXBe3RQ5Wwc+unYkU9An8yZrWNurzBVqxT9dJFk=; b=GjuI/g+W8L8x234ZyzkbFHdKP+n5ldg/EHKGE2yXrdsCRbOweStgnQ9RqTp6d5fHwC THpYGphHAA8sPwLOqajqNkLg/3ehOiGcMleBl9ZOnudpIyVyFWQNJcpQz7aF7vFeQ8O/ lWUJmMRG4wWx5s2ww7HtT2ttCwCTxk7o6oJHO/fyz23/tpUBPeLe/Dk9Z0f9NHELKfES ppQbffGmBpgdAbnftzbohwQklKK2D7Mk+EElUohXOejKWymdEbJOITR/kG5w8MSkG/cb wrnMNYFRxvuLDkWdHBS0uwGsSsnP72KDk21NEZlnWUtERc1UuWpco8rNgOfd0XE1pUGw pGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g0LXqXBe3RQ5Wwc+unYkU9An8yZrWNurzBVqxT9dJFk=; b=kMtxu4NbZBwS+z3OGVerkkg1j25VgKka+g5lRH3OpdQWa3Ux3kBwefgZBcgehx4vIk I3AoDwk8pGh+dJ2LfKQzwvCV8iErHXj9oqU1iJdOv52SCnBXCu/SRYZjUAXObT+oXLuB tDrdlvIzKOX/4H0STHJFbMAyl/fv2/RPPoLYWJXCrdcjSqbOU7FoA1xDoNhE6c0PQuq2 3ZWgGLWn1B1Mgaa7860vga1fIYbomNNhOM9hlRE6D5GIID+Jt3inK3cK6geD8pkYm9Bu 3mZK5FY/9FmuXUoJw+5BqJn28D747U984Z87TPVx0vHADh+Q3IMtCgqHM2w+zpyYy/8R zrcw== X-Gm-Message-State: AElRT7HF4SS4dUAYZ6FISUbt/x6ozFPj7yJ+qUgKEPpK3UHHl/HebJzJ ijSOMkc1gvfEcDSzO6YfN/SKISfOXPTd4IwbuS4= X-Google-Smtp-Source: AIpwx4/+Uw2eSQKP1c2Tmo9NMtL2wL7DJrhxDdI5NYBWCgVnIb1ciaL2NFAa9BCoI7VKrbyaPDzs3gyDHEMYdxW4W/8= X-Received: by 10.202.208.84 with SMTP id h81mr5026603oig.330.1522355152566; Thu, 29 Mar 2018 13:25:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.139.213 with HTTP; Thu, 29 Mar 2018 13:25:52 -0700 (PDT) In-Reply-To: <87o9j6k5qx.fsf@mail.linkov.net> References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> From: Noam Postavsky Date: Thu, 29 Mar 2018 16:25:52 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 29 March 2018 at 16:04, Juri Linkov wrote: > 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? The parameter should be named THROW-ERROR-P, then it's clear that there is nothing wrong with it, all commands just happen to share this interface feature: they may throw error, or not. (and they can still work correctly if called non-interactively from some other interactive command) From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files 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: To: Juri Linkov Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15223825164866 (code B ref 30938); Fri, 30 Mar 2018 04:02:02 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 04:01:56 +0000 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 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 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== 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 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 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 MIME-Version: 1.0 Message-ID: <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> Date: Thu, 29 Mar 2018 21:01:44 -0700 (PDT) From: Drew Adams References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> 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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > 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. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 04:02:03 +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: To: Noam Postavsky , Juri Linkov Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15223825224895 (code B ref 30938); Fri, 30 Mar 2018 04:02:03 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 04:02:02 +0000 Received: from localhost ([127.0.0.1]:59246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1lEo-0001Gp-9Z for submit@debbugs.gnu.org; Fri, 30 Mar 2018 00:02:02 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:49544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1lEl-0001GN-Tr for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 00:02:00 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2U3xcCg149235; Fri, 30 Mar 2018 04:01:52 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=1nXG5ZsKpLzqaetjFCL7WhdLDK78kYXqdiG9kfuPCwQ=; b=ha81+fT9/qDpM2sd0Zb2O6QYIzid6xZ8vamoEqa/INFBt8IRY2UFFO7a/FApyBBOf96N z8znIx+DmN0ldY6GyPf4semsIL36dF/2O5s0E6m99Ovc1xBKE6Dp13njbdGdgEnsElt5 xwu6WD2YJqqaYSexNOtYYSSf49Dhxj4zABB//Xw560mI07ZfzCm+wdewIDC3MASX+Mx8 vrTz6CIDHB2wzVADyLqt0bq6AUWJSg3sDzolpT09Op1KVqqIIJAb6YtTzyJeXXdnsnvd 4BEVEp/zyl6jsluVrxkMn6GehLdaJmKK3iNQZXogDAG+cF5C3EI8BzvxxB6ZotpQUjMU 7w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2h1dtq804j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 04:01:52 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2U41oVl001245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 04:01:51 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2U41oIl011287; Fri, 30 Mar 2018 04:01:50 GMT MIME-Version: 1.0 Message-ID: <073d8109-fb1e-44c0-9565-fed5e8a59257@default> Date: Thu, 29 Mar 2018 21:01:49 -0700 (PDT) From: Drew Adams References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=549 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803300029 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > 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? >=20 > The parameter should be named THROW-ERROR-P, then it's clear that > there is nothing wrong with it, all commands just happen to share this > interface feature: they may throw error, or not. > (and they can still work correctly if called non-interactively from > some other interactive command) Actually, as you can see from the change log I cited, I call the optional arg for `dired-get-marked-files' ERROR-IF-NONE-P (which is better than THROW-ERROR-P, which doesn't say what the error is about). That's precisely what that optional arg means for `dired-get-marked-files'. And it will only ever mean that, no doubt. However, for the individual commands that call that function, the arg can be called either that or just INTERACTIVEP. Yes, it is the case _currently_ that in those commands distinguishing the interactive case is used only in the call to `dired-get-marked-files', i.e., only to make it raise the corner-case error, so far. So I'm OK with calling the arg ERROR-IF-NONE-P there also. I'm also OK with calling it INTERACTIVEP there. In neither place should it be called THROW-ERROR-P, IMO. But as long as the problem gets fixed I don't really care much about the parameter name. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 07:58:01 +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: To: Drew Adams Cc: 30938@debbugs.gnu.org, juri@linkov.net Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.1522396652922 (code B ref 30938); Fri, 30 Mar 2018 07:58:01 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 07:57:32 +0000 Received: from localhost ([127.0.0.1]:59310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1ouh-0000Eo-NU for submit@debbugs.gnu.org; Fri, 30 Mar 2018 03:57:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1oud-0000EX-LN for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 03:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1ouU-00021X-1I for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 03:57:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1ouT-00021T-TR; Fri, 30 Mar 2018 03:57:17 -0400 Received: from [176.228.60.248] (port=3860 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f1ouT-0005OV-3M; Fri, 30 Mar 2018 03:57:17 -0400 Date: Fri, 30 Mar 2018 10:57:03 +0300 Message-Id: <83lgeac7xs.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> (message from Drew Adams on Thu, 29 Mar 2018 21:01:44 -0700 (PDT)) References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Thu, 29 Mar 2018 21:01:44 -0700 (PDT) > From: Drew Adams > Cc: 30938@debbugs.gnu.org > > 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? A lot of discussion gone under the bridge, but I asked a question in the very beginning that was apparently ignored: Please provide at least one example (preferably more than one) of a real-life use case where these changes get in the way. Without an answer to that, I cannot see why we have to do anything about this issue, because up front I see no problem here at all, not one that has been spelled out. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 15:02:01 +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: To: Eli Zaretskii Cc: 30938@debbugs.gnu.org, juri@linkov.net Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15224221154882 (code B ref 30938); Fri, 30 Mar 2018 15:02:01 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 15:01:55 +0000 Received: from localhost ([127.0.0.1]:60351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1vXP-0001Gf-I2 for submit@debbugs.gnu.org; Fri, 30 Mar 2018 11:01:55 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:48180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1vXN-0001GM-6P for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 11:01:53 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2UEswri094097; Fri, 30 Mar 2018 15: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=B+4pEW/8X26+wp4Ckq2yIS6NtPtBLgOq1dPRCkiq91E=; b=j1nLuHr8JmhcDwq7rxaw36usJBS7OUoLZ4sJvu2BDINfZC2/o+WZySLve59meU5wJJ4c 4TKk7NINyJtuyys/4Zt+rbltHWXFWDH0/7BooB1umN/QHFfxC2JYHpmQRJm2UJNhPzoa AueuOUMDgtxx/zXDcNCH31xocV9gxbf8vXbe/SkTxjBIWl6OyJQbrQPpDaGwQPDlYHGI ItvqX3NBqrjuOuww3+rZMp1YvS19Ozr1k8XvMDX1DYqfIGTDF6jJdje/F1wftcsXxs4X 8UJPebpaAvHEYtnyLmiipTH0U1P/HaEoUuGEVfpL6B0Wt4BS6CuEjyiZp5QxA560JzfE tg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2h1qdyr0xd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 15:01:46 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2UF1jSA022910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 15:01:45 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2UF1iAS018861; Fri, 30 Mar 2018 15:01:44 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 30 Mar 2018 08:01:42 -0700 (PDT) From: Drew Adams References: <<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>> <<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>> <<83lgeac7xs.fsf@gnu.org>> In-Reply-To: <<83lgeac7xs.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-1803300148 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > A lot of discussion gone under the bridge, but I asked a question in > the very beginning that was apparently ignored: >=20 > Please provide at least one example (preferably more than one) of a > real-life use case where these changes get in the way. >=20 > Without an answer to that, I cannot see why we have to do anything > about this issue, because up front I see no problem here at all, not > one that has been spelled out. I answered your question, pointing to the example of calling `dired-do-isearch' (or any of the other such commands) non-interactively - e.g., by creating a command that uses it. If you don't believe that a user or another library could or would define such a command (or in any other way would call an existing function that calls the workhorse function `dired-get-marked-files', then too bad. In that case your idea of real-life use of Emacs Lisp differs from mine; you will close the bug; and we will move on. I've already fixed my code to work around this change (except for `dired-do-chxxx' repercussions - see below). --- `dired-get-marked-files' is no less a utility function than is, say, `dired-get-filename'. And functions, including commands, that call it are themselves candidates for reuse in defining other functions, including other commands. In addition, users often look to the definitions of Emacs commands when creating similar or derivative commands. Imagine that a user wants a command similar to `dired-do-search' but that does things a bit differently. S?he might look at the def of `dired-do-isearch' for inspiration, and thus copy its use of `dired-marked-files'. Hard-coding a non-nil 5th arg for it is a bad model. (Same thing for `dired-do-search' etc. and the other commands that, for some reason (?), have not yet undergone this change.) --- Similarly, for `dired-do-chxxx', which is NOT a command, and which currently hardcodes a non-nil 5th arg to `dired-get-marked-files' just like the commands do. To fix that aberration a bit more surgery is required, no doubt. We could add an optional ERROR-IF-NONE-P arg to `dired-do-chxxx', and obtain that from an optional INTERACTIVEP arg to `dired-do-chmod' etc. IOW, same kind of fix. Or perhaps Juri has a better fix in mind. And as for "real-life" examples, BTW, I do define `-mouse-' versions of the `dired-do-ch*' commands. E.g.: (defun diredp-mouse-do-chmod (event) "Change the mode of this file. This calls chmod, so symbolic modes like `g+w' are allowed." (interactive "e") (let ((mouse-pos (event-start event))) (select-window (posn-window mouse-pos)) (goto-char (posn-point mouse-pos))) (dired-do-chxxx "Mode" "chmod" 'chmod 1) (diredp-previous-line 1)) As I haven't yet bothered to fix the now-bugged `dired-do-chxxx' locally, such "real-life" commands of mine are still broken by this recent change (for the moment). You can do nothing to fix this bug, and wait to see whether Drew is the only one who has or will ever have code that gets bitten by it. Or you can DTRT and not hardcode raising an error systematically whenever `dired-get-marked-files' would come up with no files. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 15:31:01 +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: To: Drew Adams Cc: 30938@debbugs.gnu.org, juri@linkov.net Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15224238247520 (code B ref 30938); Fri, 30 Mar 2018 15:31:01 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 15:30:24 +0000 Received: from localhost ([127.0.0.1]:60364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1vyy-0001xE-6M for submit@debbugs.gnu.org; Fri, 30 Mar 2018 11:30:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1vyv-0001wx-Di for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 11:30:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1vyn-0001P5-Hv for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 11:30:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1vyn-0001P1-E0; Fri, 30 Mar 2018 11:30:13 -0400 Received: from [176.228.60.248] (port=2103 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f1vym-00033i-Ow; Fri, 30 Mar 2018 11:30:13 -0400 Date: Fri, 30 Mar 2018 18:30:10 +0300 Message-Id: <83k1tt8ttp.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Fri, 30 Mar 2018 08:01:42 -0700 (PDT)) References: <<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>> <<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>> <<83lgeac7xs.fsf@gnu.org>> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Fri, 30 Mar 2018 08:01:42 -0700 (PDT) > From: Drew Adams > Cc: juri@linkov.net, 30938@debbugs.gnu.org > > > Please provide at least one example (preferably more than one) of a > > real-life use case where these changes get in the way. > > > > Without an answer to that, I cannot see why we have to do anything > > about this issue, because up front I see no problem here at all, not > > one that has been spelled out. > > I answered your question, pointing to the example of calling > `dired-do-isearch' (or any of the other such commands) > non-interactively - e.g., by creating a command that uses it. I don't see how I was supposed to understand that this as an answer to my question: my question was not cited, and the text you posted had no immediate relation to the issue at hand, it just says that dired-get-marked-files could be called non-interactively, and intended to do nothing when no files were marked, which is already possible. I don't want to guess what that has to do with the issue you raised, and why. Please spell that out. > If you don't believe that a user or another library could > or would define such a command (or in any other way would > call an existing function that calls the workhorse function > `dired-get-marked-files', then too bad. Such uses can always call dired-get-marked-files with the last argument nil or omitted. Where's the problem? From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 15:44: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: To: Eli Zaretskii Cc: 30938@debbugs.gnu.org, juri@linkov.net Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.15224246198591 (code B ref 30938); Fri, 30 Mar 2018 15:44:02 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 15:43:39 +0000 Received: from localhost ([127.0.0.1]:60370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1wBn-0002EU-Fw for submit@debbugs.gnu.org; Fri, 30 Mar 2018 11:43:39 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:56850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1wBl-0002EH-Mb for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 11:43:38 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2UFTSt4125077; Fri, 30 Mar 2018 15:43:32 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=GAD1vvpy89nsso7hYrc8ZLoaBUZLnp/kW7o7ctnoVvE=; b=IY4vD/p0vfeO3tlq1mCd2GqQZ+YAXh3wK4SDijCY4SSujG+XYQkUFR4MI7XFYD/ZgPeu ad6XiPRrOHhwElWaeU7gv4IWYQJFfgpj+PVajAfLai2DtzTSyi9LSTxVJhGMrFm3XCvF ZN6JZ6mYHJ7PZHatKMAbIBRLczYKAa33nnSEjD6//LbYO9EltgNsOPAdrFW0KUD1Vs7S eA2CTozG94xeF3u7WBSwRAXdSc2nbRB7y9eBkTO/h7i+Nh9UzHnBAAS9tpJGM5ItTMkM 5yzLNFgNwjIpt0df253WwmBPC3cgADN+vF+0gedvt5rYfi3eJw9BeHgSIk1NrmSoNKP0 1w== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2h1qx50244-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 15:43:32 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2UFhVwe032434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 15:43:31 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2UFhV4o016795; Fri, 30 Mar 2018 15:43:31 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 30 Mar 2018 08:43:29 -0700 (PDT) From: Drew Adams References: <<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>> <<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>> <<<83lgeac7xs.fsf@gnu.org>>> <> <<83k1tt8ttp.fsf@gnu.org>> In-Reply-To: <<83k1tt8ttp.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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=578 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803300158 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > If you don't believe that a user or another library could > > or would define such a command (or in any other way would > > call an existing function that calls the workhorse function > > `dired-get-marked-files', then too bad. >=20 > Such uses can always call dired-get-marked-files with the last > argument nil or omitted. Where's the problem? I won't repeat myself this time. If you don't want to see or fix the problem, so be it. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 16:08: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: To: Drew Adams Cc: 30938@debbugs.gnu.org, juri@linkov.net Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152242603510631 (code B ref 30938); Fri, 30 Mar 2018 16:08:02 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 16:07:15 +0000 Received: from localhost ([127.0.0.1]:60375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1wYd-0002lP-DM for submit@debbugs.gnu.org; Fri, 30 Mar 2018 12:07:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1wYb-0002lC-79 for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 12:07:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1wYS-0003yc-9t for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 12:07:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1wYS-0003yU-5E; Fri, 30 Mar 2018 12:07:04 -0400 Received: from [176.228.60.248] (port=2121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f1wYR-0004DF-Kc; Fri, 30 Mar 2018 12:07:04 -0400 Date: Fri, 30 Mar 2018 19:07:00 +0300 Message-Id: <83in9d8s4b.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Fri, 30 Mar 2018 08:43:29 -0700 (PDT)) References: <<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>> <<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>> <<<83lgeac7xs.fsf@gnu.org>>> <> <<83k1tt8ttp.fsf@gnu.org>> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Fri, 30 Mar 2018 08:43:29 -0700 (PDT) > From: Drew Adams > Cc: juri@linkov.net, 30938@debbugs.gnu.org > > > > If you don't believe that a user or another library could > > > or would define such a command (or in any other way would > > > call an existing function that calls the workhorse function > > > `dired-get-marked-files', then too bad. > > > > Such uses can always call dired-get-marked-files with the last > > argument nil or omitted. Where's the problem? > > I won't repeat myself this time. If you don't want to see or > fix the problem, so be it. I might agree that it's a bug if I understand it. But since you refuse to explain it, I guess I never will. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2018 17:19:01 +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: To: Eli Zaretskii Cc: 30938@debbugs.gnu.org, juri@linkov.net Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152243033816780 (code B ref 30938); Fri, 30 Mar 2018 17:19:01 +0000 Received: (at 30938) by debbugs.gnu.org; 30 Mar 2018 17:18:58 +0000 Received: from localhost ([127.0.0.1]:60406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1xg2-0004Ma-Lh for submit@debbugs.gnu.org; Fri, 30 Mar 2018 13:18:58 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:54120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1xfz-0004ML-V3 for 30938@debbugs.gnu.org; Fri, 30 Mar 2018 13:18:56 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2UH6WQi004883; Fri, 30 Mar 2018 17:18:50 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=a0/yPav4yg73zROHOGc2YQpQMwHsa4nXaha+UUX2Peo=; b=F1HO8ViAnVX/qNPPkMy4sc74LtE6DUuKmWSOyLT7df/4YoKWEVa2mJMunBg2iZ3ZWGqa ePPgGetneDYE8W4/FflaEYPCIEefzRK6xn3FRWebLWgLOZwoTyJe+EAc1WiyyhEUqf8i ew8xdiG9GVyKcJrkxWiU1o6VOw/wHr8NJEDeh0AuklaDYztHFuKYoPWFmir+IBzN+EUL 7wna3bbqnTqJyXR3lgmgJ68ntb3XiEJtjeNl3nBQ6xb5vvZjHaHuEdvGSeSC8Rsh+4dK Swfr9tUhU8YkGEYbtwuirWvozu5igiREaBMoSBCY1kIfBAoI5GMD4ETaKAEfYmxcyOiW vA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2h1sabg3fw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 17:18:36 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2UHCFBa027431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Mar 2018 17:12:15 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2UHCFJO006617; Fri, 30 Mar 2018 17:12:15 GMT MIME-Version: 1.0 Message-ID: <9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default> Date: Fri, 30 Mar 2018 10:12:13 -0700 (PDT) From: Drew Adams References: <<<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>>> <<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>>> <<<<83lgeac7xs.fsf@gnu.org>>>> <<>> <<<83k1tt8ttp.fsf@gnu.org>>> <> <<83in9d8s4b.fsf@gnu.org>> In-Reply-To: <<83in9d8s4b.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8848 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-1803300175 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > I might agree that it's a bug if I understand it. But since you > refuse to explain it, I guess I never will. Maybe this will help (but I doubt it) - 1. Existing Dired+ command (updated to accommodate this bug by adding INTERACTIVEP and passing that to `dired-get-marked-files'): (defun diredp-insert-subdirs (&optional switches interactivep) "Insert the marked subdirectories. Like using \\`\\[dired-maybe-insert-subdir]' at \ each marked directory line." (interactive (list (and current-prefix-arg (read-string "Switches for listing: " (or dired-subdir-switches dired-actual-switches))) t)) (dolist (subdir (dired-get-marked-files nil nil (lambda (fl) (and (file-directory-p fl) (not (diredp-string-match-p "/[.][.]?\\'" fl)))) nil interactivep)) (dired-maybe-insert-subdir subdir switches))) Imaginary function that uses that command as a utility: (defun insert-marked-subdirs-and-do-stuff () (DO-STUFF) (diredp-insert-subdirs) (DO-OTHER-STUFF)) If you assume that the insertion of marked subdirs is not a requirement for the main behavior of this function, e.g., that it acts on any that get inserted but it doesn't _require_ any such insertions to do its job in general, then without some change as proposed this function can end in error without ever trying to DO-OTHER-STUFF. I'm arguing that similar considerations can apply to other existing commands. Whether each such case is actually problematic is not so important (IMO). The point is for individual such commands to, a priori, treat the non-interactive case separately. A non-interactive use case for an arbitrary command that calls ` dired-get-marked-files' does not necessarily have `user-error' as the right behavior for an empty set of marked files. That's all I'm saying. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Mar 2018 09:08:01 +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: To: Drew Adams Cc: 30938@debbugs.gnu.org, juri@linkov.net Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.1522487261474 (code B ref 30938); Sat, 31 Mar 2018 09:08:01 +0000 Received: (at 30938) by debbugs.gnu.org; 31 Mar 2018 09:07:41 +0000 Received: from localhost ([127.0.0.1]:60648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2CU8-00007a-SS for submit@debbugs.gnu.org; Sat, 31 Mar 2018 05:07:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2CU7-00007O-8k for 30938@debbugs.gnu.org; Sat, 31 Mar 2018 05:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2CTy-000250-4h for 30938@debbugs.gnu.org; Sat, 31 Mar 2018 05:07:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2CTy-00024s-0T; Sat, 31 Mar 2018 05:07:30 -0400 Received: from [176.228.60.248] (port=2805 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f2CTx-0005hs-L3; Sat, 31 Mar 2018 05:07:29 -0400 Date: Sat, 31 Mar 2018 12:07:28 +0300 Message-Id: <838ta88vfz.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default> (message from Drew Adams on Fri, 30 Mar 2018 10:12:13 -0700 (PDT)) References: <<<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>>> <<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>>> <<<<83lgeac7xs.fsf@gnu.org>>>> <<>> <<<83k1tt8ttp.fsf@gnu.org>>> <> <<83in9d8s4b.fsf@gnu.org>> <9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Fri, 30 Mar 2018 10:12:13 -0700 (PDT) > From: Drew Adams > Cc: juri@linkov.net, 30938@debbugs.gnu.org > > A non-interactive use case for an arbitrary command that > calls ` dired-get-marked-files' does not necessarily > have `user-error' as the right behavior for an empty set > of marked files. That's all I'm saying. I'm sorry, but you lost me. Let me try explaining this from my POV. First, dired-get-marked-files _can_ be invoked when no files are marked, without risking a user-error: it has the ARG argument for that. So if your hypothetical command needs for some reason to work when no files are marked, it can, at least in principle. Why your dired-insert-subdirs didn't go that way, or at least didn't pass nil as ERROR, I don't understand (and I'm not sure it's related to the issue at hand). It is true that dired-aux.el commands that call dired-get-marked-files all pass nil as ARG (and t as ERROR), but what would be the semantics of, say, dired-do-isearch-regexp when no files are marked? That command, and all the others which call dired-get-marked-files in the same manner, is to do something on "all marked files", as their doc string clearly says. So why do we need to allow these commands to be invoked when no files are marked, and expect them not to signal a user-error? IOW, even if dired-do-isearch-regexp and its ilk are invoked non-interactively, they are invoked as result of some command up the call-stack, so the invocation does come from the user. And since dired-do-isearch-regexp etc. are documented to act on marked files, it sounds appropriate to signal an error when no files are marked. A feature which wants to allow users to get away silently in this case can always check whether any files are marked and avoid calling dired-do-isearch-regexp etc. if none are. That is why I asked for real-time use-cases where this gets in the way: your argument sounds like a general philosophical issue to me: you claim that it's "completely inappropriate" for a utility function to signal an error on theoretical grounds, while in reality I still don't see any practical problem that cannot be easily resolved. If your diredp-insert-subdirs is an example of a problem, then as I said above, I don't understand why you couldn't just omit the last optional argument to dired-get-marked-files, and be done. (And since ERROR was _added_ in Emacs 27, your original code should have been already future-proof against such changes anyway.) From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Mar 2018 16:18:01 +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: To: Eli Zaretskii Cc: 30938@debbugs.gnu.org, juri@linkov.net Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152251304821317 (code B ref 30938); Sat, 31 Mar 2018 16:18:01 +0000 Received: (at 30938) by debbugs.gnu.org; 31 Mar 2018 16:17:28 +0000 Received: from localhost ([127.0.0.1]:33165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2JC4-0005Xl-7o for submit@debbugs.gnu.org; Sat, 31 Mar 2018 12:17:28 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:41356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2JC2-0005XZ-Nw for 30938@debbugs.gnu.org; Sat, 31 Mar 2018 12:17:27 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2VGGwt5193611; Sat, 31 Mar 2018 16:17:19 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=bvlsEvcDzXfYV/0bdS2KuCq+NpnOO0lfW+05d2Se2+I=; b=P5JYYN8jJ+LSsrxxwG1LrtGleyQanWa9/JEp3tA7vy9rVSxJ8DdoFCMNIXax170yKp5K mzuMvwELr0I1ZgkjKISuh4YvPrRCYUEb1MoE/M59JnINZVDEcdPBmI6IKjuou8rlzjpo 5ikfXTs2PdoECFl24bhKvMCxTxrMbbfEtym0exovU5Nm+s/rqVHUqbqUgYaGAnDQYYQ8 ffNUXnCwkav5nlm7ee+mRDf0d5SNkFCFg9KMUle7smpDT4L8getiYavKmC55iOIlKHPF euKYtmG1LlBmB2y44CSJsuIlKuli/AtqD9eNJe6XGPcy6r1iwFXr+UiOkjl4Yf17nY5p NQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2h2dqa80p8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 31 Mar 2018 16:17:18 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2VGAhFV024120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 31 Mar 2018 16:10:43 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2VGAgKd015349; Sat, 31 Mar 2018 16:10:43 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 31 Mar 2018 09:10:41 -0700 (PDT) From: Drew Adams References: <<<<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>>>> <<<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>>>> <<<<<83lgeac7xs.fsf@gnu.org>>>>> <<<>>> <<<<83k1tt8ttp.fsf@gnu.org>>>> <<>> <<<83in9d8s4b.fsf@gnu.org>>> <<9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default>> <<838ta88vfz.fsf@gnu.org>> In-Reply-To: <<838ta88vfz.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8849 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-1803310168 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > A non-interactive use case for an arbitrary command that > > calls ` dired-get-marked-files' does not necessarily > > have `user-error' as the right behavior for an empty set > > of marked files. That's all I'm saying. >=20 > I'm sorry, but you lost me. Let me try explaining this from my POV. >=20 > First, dired-get-marked-files _can_ be invoked when no files are > marked, without risking a user-error: it has the ARG argument for > that. So if your hypothetical command needs for some reason to work > when no files are marked, it can, at least in principle. Why your > dired[p]-insert-subdirs didn't go that way, or at least didn't pass nil > as ERROR, I don't understand (and I'm not sure it's related to the > issue at hand). Don't confuse a command that invokes `dired-get-marked-files' with a command that invokes a command that invokes `dired-get-marked-files'. Their behaviors can differ (and in the general case they do), including wrt interactive and non-interactive use. `diredp-insert-subdirs' inserts the subdir of the current line, if no subdirs are marked. If none are marked and it is called from a non-subdir line then it _should_ raise an error interactively (and it does). Should it also do so non-interactively? Why should it decide that? Why not let its caller do that? When called non-interactively it cannot (and need not) know what is the right way to handle that case. Imaginary command `insert-marked-subdirs-and-do-stuff' should _not_ raise an error, and its invocation of `diredp-insert-subdirs' should be a _no-op_, in the same situation where invoking `diredp-insert-subdirs' interactively would raise an error. Code can tell `dired-get-marked-files' directly whether it should raise an error if there are no files gathered. What's missing is for callers of `dired-get-marked-files' to tell it that conditionally, based on whether they are called interactively. Being able to do that is for the benefit of reusing a command that calls `dired-get-marked-files' in different ways. It is not needed for the benefit of a command that calls `dired-get-marked-files' directly, as that choice is already under its control. > It is true that dired-aux.el commands that call dired-get-marked-files > all pass nil as ARG (and t as ERROR), but what would be the semantics > of, say, dired-do-isearch-regexp when no files are marked? That > command, and all the others which call dired-get-marked-files in the > same manner, is to do something on "all marked files", as their doc > string clearly says. >=20 > So why do we need to allow these commands to be invoked when no files > are marked, and expect them not to signal a user-error? For the benefit of a function that might call them and not want to raise that error. The interactive case for a command that calls `dired-get-marked-files' is completely known by that command. The context of a non-interactive use of the same command is not known to it. Its code should not prejudice the behavior intended by its caller. In the example of `insert-marked-subdirs-and-do-stuff', its call to `diredp-insert-subdirs' is _not_ its main purpose, and it is fine if there are no marked subdirs and thus none get inserted. For `i-m-s-a-d-s' to do its overall job, the call to `d-i-s' needs to tolerate no subdirs being marked and inserted, by being benign - a no-op. Although no marked subdirs (and point not on a subdir) _is_ a user error for interactively called `d-i-s', it is _not_ an error for interactively (or not) `i-m-s-a-d-s'. > IOW, even if dired-do-isearch-regexp and its ilk are invoked > non-interactively, they are invoked as result of some command up the > call-stack, so the invocation does come from the user.=20 The invocation of `d-d-i-r' comes ultimately from the user, as does the invocation of pretty much everything in Emacs. But the intention and purpose of `d-d-i-r' can be different - including wrt what no markings of particular files might mean - from the intention and purpose of an upstream command that directly or indirectly invokes `d-d-i-r'. There is no reason to assume that interactive and non-interactive use of a given command should have the same behavior wrt the new `dired-get-marked-files' arg ERROR. Such hardcoding provides no benefit and can get in the way. > And since > dired-do-isearch-regexp etc. are documented to act on marked files, it > sounds appropriate to signal an error when no files are marked. It is appropriate for _them_, i.e., when invoked interactively. It is not necessarily appropriate for something that calls them. > A feature which wants to allow users to get away silently in this case > can always check whether any files are marked and avoid calling > dired-do-isearch-regexp etc. if none are. It shouldn't have to. You are essentially suggesting that it too should invoke `dired-get-marked-files'. That shouldn't be necessary (not to mention that it can be costly). > That is why I asked for real-time use-cases where this gets in the > way: your argument sounds like a general philosophical issue to me: Call it what you like. Your argument hasn't even been presented so far, AFAICT. What are supporting reasons for a claim that we should _not_ distinguish interactive from non-interactive use for such commands and pass this along to `d-g-m-f'? > you claim that it's "completely inappropriate" for a utility function > to signal an error on theoretical grounds, while in reality I still > don't see any practical problem that cannot be easily resolved. If > your diredp-insert-subdirs is an example of a problem, then as I said > above, I don't understand why you couldn't just omit the last optional > argument to dired-get-marked-files, and be done. (And since ERROR was > _added_ in Emacs 27, your original code should have been already > future-proof against such changes anyway.) See above. The addition of optional arg ERROR was a _good_ thing. No, no code could have taken care of this before, without it. Typically, point is on a file line, and when no files are marked the command acts (purposefully) on the file of the current line. It is only rarely that point is in a buffer position where the new error kicks in. Another, more common, case where the error can kick in is (as for the case of `diredp-insert-subdirs') when a FILTER passed to `dired-get-marked-files' results in an empty file list. While it is typically a user error if nothing is marked and point is not on any file line, it is not necessarily an error when neither of those is the case - even for an interactive case. The individual command needs to decide whether that is an error case. Similarly, for a command B that _invokes_ such a command A. It is up to B to decide whether to raise an error. If A systematically causes `d-g-m-f' to raise an error in a context where an error makes sense for A, that can conflict with what makes sense for B. To me, the solution is simple: let a command that invokes `d-g-m-f' pass non-nil ERROR when the command is called interactively. That just gives the command (and its author) more choice. No reason to assume that its interactive use is the same as its non-interactive use, including wrt its use of `dired-get-marked-files'. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Mar 2018 16:51: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: To: Drew Adams Cc: 30938@debbugs.gnu.org, juri@linkov.net Reply-To: Eli Zaretskii Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152251502624186 (code B ref 30938); Sat, 31 Mar 2018 16:51:02 +0000 Received: (at 30938) by debbugs.gnu.org; 31 Mar 2018 16:50:26 +0000 Received: from localhost ([127.0.0.1]:33170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2Jhy-0006I1-1k for submit@debbugs.gnu.org; Sat, 31 Mar 2018 12:50:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2Jhw-0006Hn-7p for 30938@debbugs.gnu.org; Sat, 31 Mar 2018 12:50:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2Jhn-0004gI-0b for 30938@debbugs.gnu.org; Sat, 31 Mar 2018 12:50:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2Jhm-0004g2-ST; Sat, 31 Mar 2018 12:50:14 -0400 Received: from [176.228.60.248] (port=2850 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f2Jhm-0005J3-CI; Sat, 31 Mar 2018 12:50:14 -0400 Date: Sat, 31 Mar 2018 19:50:14 +0300 Message-Id: <83370g8a0p.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Drew Adams on Sat, 31 Mar 2018 09:10:41 -0700 (PDT)) References: <<<<<7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net>>>>> <<<<<8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default>>>>> <<<<<83lgeac7xs.fsf@gnu.org>>>>> <<<>>> <<<<83k1tt8ttp.fsf@gnu.org>>>> <<>> <<<83in9d8s4b.fsf@gnu.org>>> <<9b80ae9e-06e3-4217-89b1-eb8a3b0c93b8@default>> <<838ta88vfz.fsf@gnu.org>> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 31 Mar 2018 09:10:41 -0700 (PDT) > From: Drew Adams > Cc: juri@linkov.net, 30938@debbugs.gnu.org > > > First, dired-get-marked-files _can_ be invoked when no files are > > marked, without risking a user-error: it has the ARG argument for > > that. So if your hypothetical command needs for some reason to work > > when no files are marked, it can, at least in principle. Why your > > dired[p]-insert-subdirs didn't go that way, or at least didn't pass nil > > as ERROR, I don't understand (and I'm not sure it's related to the > > issue at hand). > > Don't confuse a command that invokes `dired-get-marked-files' > with a command that invokes a command that invokes > `dired-get-marked-files'. Their behaviors can differ (and > in the general case they do), including wrt interactive and > non-interactive use. Summary: I'm not convinced. Some details below. > `diredp-insert-subdirs' inserts the subdir of the current > line, if no subdirs are marked. If none are marked and it > is called from a non-subdir line then it _should_ raise an > error interactively (and it does). > > Should it also do so non-interactively? Why should it > decide that? Why not let its caller do that? When > called non-interactively it cannot (and need not) know > what is the right way to handle that case. AFAIU, you have all the tools to make it do that, by judicious use of the ARG and ERROR arguments. > Imaginary command `insert-marked-subdirs-and-do-stuff' > should _not_ raise an error, and its invocation of > `diredp-insert-subdirs' should be a _no-op_, in the > same situation where invoking `diredp-insert-subdirs' > interactively would raise an error. If diredp-insert-subdirs is designed to support that, its interface should allow that. Commands that aren't designed to support that have no obligations to allow calling them like that. IOW freedom of applications to invoke commands and functions outside their intended domain is not unlimited, and asking for it to be unlimited, or insisting that the limits be made wider, no matter the costs, is IMO unreasonable. > Being able to do that is for the benefit of reusing a > command that calls `dired-get-marked-files' in different > ways. Such reuses have their limitations. One of them is when no files are marked and there's no "current file". Those commands signal an error because they cannot fulfill their contract; silently doing nothing in this case is against that contract. > While it is typically a user error if nothing is marked > and point is not on any file line, it is not necessarily > an error when neither of those is the case - even for an > interactive case. Signaling an error is a widely accepted way of telling the caller "you asked me to do something; I didn't, and here's why". If worse comes to worst, the caller can always catch the error and recover from it. > To me, the solution is simple: let a command that invokes > `d-g-m-f' pass non-nil ERROR when the command is called > interactively. That solution causes unreasonable complication on a dozen of commands for no good reason, so I don't see why we should do that. From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Apr 2018 19:56: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: To: Drew Adams Cc: 30938@debbugs.gnu.org Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.152269893914483 (code B ref 30938); Mon, 02 Apr 2018 19:56:02 +0000 Received: (at 30938) by debbugs.gnu.org; 2 Apr 2018 19:55:39 +0000 Received: from localhost ([127.0.0.1]:35419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f35YJ-0003lW-BH for submit@debbugs.gnu.org; Mon, 02 Apr 2018 15:55:39 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:36402 helo=homiemail-a11.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f35YI-0003lO-Ef for 30938@debbugs.gnu.org; Mon, 02 Apr 2018 15:55:38 -0400 Received: from homiemail-a11.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTP id 3F496314C069; Mon, 2 Apr 2018 12:55:37 -0700 (PDT) Received: from localhost.linkov.net (m91-129-105-236.cust.tele2.ee [91.129.105.236]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTPSA id 629C6314C066; Mon, 2 Apr 2018 12:55:36 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> Date: Mon, 02 Apr 2018 22:30:50 +0300 In-Reply-To: <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> (Drew Adams's message of "Thu, 29 Mar 2018 21:01:44 -0700 (PDT)") Message-ID: <87tvstwpl9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > I'm open to other ways to do what is needed, if they > are better. Feel free to propose something. I still don't see why raising the error should depend on command's interactivity, i.e. why these commands should not signal a user-error in the non-interactive case. We have thousands calls of such core functions as (search-forward STRING &optional BOUND NOERROR COUNT) and none of them binds the NOERROR arg to the command INTERACTIVE arg. That's because it would make the control flow unmanageable in a chain of commands, i.e. when a command that invokes a command that invokes such core functions. In very rare cases when you absolutely need to ignore errors, just use (ignore-errors (dired-do-chmod)) From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Apr 2022 13:21:01 +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: To: Juri Linkov Cc: 30938@debbugs.gnu.org, Drew Adams Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.165054721410136 (code B ref 30938); Thu, 21 Apr 2022 13:21:01 +0000 Received: (at 30938) by debbugs.gnu.org; 21 Apr 2022 13:20:14 +0000 Received: from localhost ([127.0.0.1]:48687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhWjG-0002dO-3D for submit@debbugs.gnu.org; Thu, 21 Apr 2022 09:20:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhWjD-0002d1-Vo for 30938@debbugs.gnu.org; Thu, 21 Apr 2022 09:20:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hIYpG6nzy+Z8AGhAHghvCzzaOHpnN7LLNFQcDQdZrg0=; b=i0v0GZyEm43IYmqkOhkAqiPMUS invQ0PKIVP3HR7I5us8j9TIFeLXE82Lfi9ydXpIf3M3yBeUOJ3HdbK/AWsOddSfosmH259uLIldDK AKh02tYx8lZrzKW65eXc8zV3SyYKFrgDX0W+zS5+3xtAGwhOJx7UL3xKPxihDFH874S0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhWj3-0005MS-6y; Thu, 21 Apr 2022 15:20:03 +0200 From: Lars Ingebrigtsen References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> <87tvstwpl9.fsf@mail.linkov.net> X-Now-Playing: William Basinski's _The Disintegration Loops_: "DLP 1.1" Date: Thu, 21 Apr 2022 15:20:00 +0200 In-Reply-To: <87tvstwpl9.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 02 Apr 2018 22:30:50 +0300") Message-ID: <875yn27ev3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Skimming this bug report, it seems like the conclusion was that we don't want to change anything here, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Skimming this bug report, it seems like the conclusion was that we don't want to change anything here, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 09:20:17 2022 Received: (at control) by debbugs.gnu.org; 21 Apr 2022 13:20:17 +0000 Received: from localhost ([127.0.0.1]:48690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhWjJ-0002dg-A9 for submit@debbugs.gnu.org; Thu, 21 Apr 2022 09:20:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhWjH-0002d9-AT for control@debbugs.gnu.org; Thu, 21 Apr 2022 09:20:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CGdQqhrd2wrv2VPiprTmrBotStxgFx4z2n2Y23mtxjA=; b=pDWRmtBXUqSENtX6z9LyUB1VgF Bu7ppkh24w+06fR/c9Xamx49J/I3LVlup53VyKFk1g+x1mXSOSxpG8ocGmDseXPGcRcTmO4KLnuF0 Q+n07lXYUaqFqVK6im6CeZ+7fJW+vdPx7E9PNxxzOExe7VgfWal3jyqB5O5MjOATfPX0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhWj9-0005Me-QC for control@debbugs.gnu.org; Thu, 21 Apr 2022 15:20:09 +0200 Date: Thu, 21 Apr 2022 15:20:06 +0200 Message-Id: <874k2m7eux.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #30938 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 30938 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 30938 quit From unknown Sun Jun 22 07:59:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Apr 2022 15:03: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: To: Lars Ingebrigtsen , Juri Linkov Cc: "30938@debbugs.gnu.org" <30938@debbugs.gnu.org> Received: via spool by 30938-submit@debbugs.gnu.org id=B30938.165055332325203 (code B ref 30938); Thu, 21 Apr 2022 15:03:02 +0000 Received: (at 30938) by debbugs.gnu.org; 21 Apr 2022 15:02:03 +0000 Received: from localhost ([127.0.0.1]:50713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhYJm-0006YO-Ii for submit@debbugs.gnu.org; Thu, 21 Apr 2022 11:02:03 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:50832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhYJh-0006Xu-45 for 30938@debbugs.gnu.org; Thu, 21 Apr 2022 11:02:01 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23LCrtlt009531; Thu, 21 Apr 2022 15:01:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=Uq8WBR645WaZTRJhF2lgG1MQ4E9Bvm/pqg+UfWbkZ8M=; b=tB4Zmn9Z+kAr9vBdlARoD8Bo0lND+R/VyHKDBUDj4Eeu9X5FWW47tpRnELAAY0rkTAPj bPRjbG8PL6e7azQaooa1T5BsGZtMgZePFWVmMgrz+RQrf29mM6Q/9tJ8KjAh5eFXBoTV 9B4uMdDlN9cxXnAltDUNvtOGKjV2mX7Pz7vQ2BpEqbJkuWS0GRn0i6/T7OKCB4AiD+Og sHcyJP41ZS+0kD5AUIOAolE/hjcjDytnIhZGKOb0qRS9iz2AEyPmULNIoUzEFWxB+blD boec9bxAwLBFfwLecWy6MMMt2ipC6PzqrFO0sDjYgWHwHxfV2BYwD0lJS+CxsmIPGMDH sg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com with ESMTP id 3ffmk2v8ys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 15:01:50 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23LEv4Q5008640; Thu, 21 Apr 2022 15:01:49 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam08lp2043.outbound.protection.outlook.com [104.47.74.43]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3ffm88uq18-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Apr 2022 15:01:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d3D1460mUSkXLV9DkMA93/kXhuTC396MunoSmeSi3URtxXG329LlUQC4RZ1PDFiYUQeuNs7jKTRh3bjOlw/OIKjtmuoNccLYih9s9CXL5hBINEaFY/5PNyRj6TIULf9dyIC5tdPLBpXW2G5WzQUedFggmgjoreIaZI2pSjNA00h1NS5KOXD6ka+Bjjhuw8C2E1vRQJobXysvmE4OQXDJ19V0qkStcAE/ePhW1ez/9uf1QchSVMyq3Md0VaCGN6AIaY7+D8qOMCnKdQNt0A6fYIVkubHkCCMcG2v4di5f9oxjwMHZRysYJTLfwDzLAiNQCvOiT/h13Kc8g3bbcexOKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Uq8WBR645WaZTRJhF2lgG1MQ4E9Bvm/pqg+UfWbkZ8M=; b=JXdx+U/v+lxsyHADAJ/IylGUWFn0nQVgcq1f54p8vD2lPwhfMpbUoZ06X+mUbMQa1JApDyFL45GrEhmgOYoHZnqyNXgytkC7vrbS02YFtvCM9/W6x1MC/yGeWILIjsCJNw1Vc3pK550JJw/nKx4U+8nLyvrcKo40N66bwbPLPeX2w4QODSIVjPanseBKumtDelUyfH38/yglx0DkogGw4gWsxjEYyIEt2puIOrvwioYOT7CtwyTX8YYndYqvRSHJjUjO8ANs096e/PZUGQIPFp6M2IGFSrpS/lbsE+Z+7uvmgC4PeLWCeA6QjrUQj/3GwA9Vtd7Z4fcqaSOCt4bJsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uq8WBR645WaZTRJhF2lgG1MQ4E9Bvm/pqg+UfWbkZ8M=; b=PGU1fAMnBopCBXtPkdUjPvVQb9Lbx/ifRAzqC0TUdJkdsCm3HKQT+V5bH9FFcb54m6fN7Y1J6WHXiemAXckfz3TjU1wUdrKUGb2I37nhYbkcsE+JWPVQy1PkRp0LVzoSz1x37RnaqS97G/UdjJo+AMA0jGbB5RmB6f9AiVoxgMw= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BLAPR10MB4834.namprd10.prod.outlook.com (2603:10b6:208:307::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Thu, 21 Apr 2022 15:01:48 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a0e7:5f38:ab50:5123]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a0e7:5f38:ab50:5123%9]) with mapi id 15.20.5186.015; Thu, 21 Apr 2022 15:01:48 +0000 From: Drew Adams Thread-Topic: [External] : Re: bug#30938: 27.0; `dired-do-create-files' etc.: do NOT always raise error if no files Thread-Index: AQHYVYKLq1N+YzKGK0CgP2JIDN+W/Kz6dETA Date: Thu, 21 Apr 2022 15:01:47 +0000 Message-ID: References: <7ea429b5-b12e-4639-9d77-11db71504d9c@default> <87605g7xpj.fsf@mail.linkov.net> <70149736-0c90-4059-91d0-155144bf4abd@default> <87o9j6k5qx.fsf@mail.linkov.net> <8111e8b0-a7fb-4de4-9371-fd69c74c46e5@default> <87tvstwpl9.fsf@mail.linkov.net> <875yn27ev3.fsf@gnus.org> In-Reply-To: <875yn27ev3.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7f8d5a8a-6062-4520-5200-08da23a7dbbf x-ms-traffictypediagnostic: BLAPR10MB4834:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uA7xajYomGMrGODGDAOBoXessbwiDh5hjTlA6V68sqQ6vRwQpJNLZxc/XOYijt2BiDvYXoD4ZxJZfGvu8wkWjYFVAYqz852hjeGKvY3GSnaJZKdqCFUkMLdI1KK4JK5FtkGNJjNGTdK/iHMWYuc57kyRXHgkGQTrVD4Gab8RLVUq7iAtBMvlYnoJZ6EvxEGMtTM+vK0bljIc0MR1GpRER0WmOLktU+CamGS559x+tUiHiCSSIvGU5Vjxz4lQsOOKq1DJmvYdshef+voJGhtKyLNMVCtMc+KPCjz3hcm2ZgDfVl34m+3qckyGEiMihao3vO1VUalDqYoKxaQWtICnQHF6/EjeC1OcPo6SUns/8Iq31/xcmu1ZgA9bXXVf8hlvg1/ZlpG+WHrfv//WTuAj0ZhjTPU6n9h7HnocRn5uPv3K7JhWI07a3cRyMZmVRU7dB/yrYZKgAppu3vaWIqNakqZNcQq1z6JaKK4uicM/kuNNE0cCVHC6FF8jXuFj0JfbIc763NAoiShobptifcVYDprm3LKoPmVfvbMDljJASmGtWiw1Cpu7WDWLtulZ+GXtqfyHgr+/HgREbO0mIcow3niZO16VsOYycJ+TQzuK//OKEX6McTD2NfWu4e668fO89Mj5V5fDciXwiEwzK6BJUBltEHjH4RX0p/sb1Iw88CcwMvKmbRO1+SwUhM8+StbqF/3rBV0Maz7YgNA6SRMOE3N4ZK8V094M7NKnSl3q3q0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(64756008)(66476007)(66446008)(7696005)(4326008)(86362001)(83380400001)(76116006)(66556008)(186003)(122000001)(316002)(2906002)(66946007)(8676002)(55016003)(44832011)(110136005)(9686003)(8936002)(38100700002)(5660300002)(6506007)(508600001)(52536014)(38070700005)(33656002)(26005)(71200400001)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: SdUZItEEfDSNJXYEze85vRAYSoS2xrA5i7Jfr16qAzqQQIRv7ANpSh8R/QAsE80ZDRBpp6neW5XA0F3ggpINRBW1RzenrhL0d2qYG1EyFUfLixtYCVwla5ent6kmlocVVDU9vbO1i0QmiW1QszlTfvJYronsTvBo5yX65D/OvYWBHcZF7mDPnil5j0ue+TQzNdfNb62+6GrVdslmf8SnDNhvipOAuK00A/6nPWBGM28PDgTzEsLjQqhZkpdryyn901YPlDdZMnopl3+HKRYSL+joodP2AjkLv4XzSLs4cvMKhs+/ssfZJiu/nTMnoSrBe5fpXxSuNzMZWHoW/VfulBEDKlQDe3EEBcNXGqD+FW/KFDnArV5xqJ+FC4DDB3V2RM+lBI/TTgEfPt9n12ck7gf122p1NJ3uEO/cv2iKzvkmL7y9FxGyHhQmzvAIUNE93eqfr50+psyb3YWpX2BrSiZepsNZX5fvV7FhxCWFLJYgyDKkzhL4TGgHEL90A6g6cTthsxG0Euc+FpsVo87VUn6W3fArqFHZ3ospjb6WlQ5ud1O0AU6GjYZHG2fl9qJOTWAIcl9vqirFo+7zHjPlkZewpyRjClbUng33F6Mwte+8Kp4BaV4SH2zH1SO+T/KYroKEqLLpJU6xYSQArI81Gu41UuX6jrVCUiP+YqBGu9tTvr9RAZE5pN0NNvRrbMutB1WU6/U+dLSsATptNSQFpoIcSygZkrE/KW0EhSnAaEko9NohySRbI5JY7bSLAA7KnWjJxey3rqrkJ1VgHEMJ+uodjGQ7+wAv9R2QghFYfOB28WdTw1XLLIsYf9GvZhvTi9rL4+aAyW3W3U/YypvepFFfFvkzcd+/Ix3JwnOwB+cbSWUpexZyfbv/frCuZpY/YyG7/8CblxV44d2RdyP1NYP2o2lTFDy4BGSKC/RtI8EZmbXoOKiGhO/gbjicrcejOo5qNKdGg0/B7FRCZgX46bzHGoLtyonkiVpgaLA7EGwWVo985JFB1tDveg7nOKTUxJMVRB12l/jYHbJyE19E3WkfzUObUo6BOFt+KKYQzbSn3tsZOtoXM83Ca8S+d8nhTbYXs2gUE45woFoSHFpgpqjBcmlWGR/yk+nw3vYsWdomjGvidYxe1dYFNAqGKcgrYsdiI0PIQmtYhtLaK1y2+Ot/pXYf6JnL5V6+ng0ihA2Fjzy4WuGj1GilJQmsgkEVPnnIQ819Ks1m5QMH3axRAhq3GQ5OAOCfP7pZGJWL4lURipQTOXVU86lzeQ6UXwGePZ4LSHjlPeNU+kOgceR3ONQkOP4hm4dAZMLBx++owAm/5gZT9sO76nUeg9W0r9RmnT4XGRDXOH90Ln8aiih6Tnk99fOisgELL6wsFRKOCmmIgHrJR3ybYJW8oWFg/5C0gAE929YJP86bMUEIig0ahn00Nkf8/+YLc636lWijYVPoQDtBtbPNSJDqA/1+V/toyJM5Gd+S7NRXozV4sQW9nUGbVnfF7wVPYv3N72WalTyZOFQQ2CVKHPkUh/zdzZSkizw+zJVdgbgU7mjFk5fNlhw1daR14/+Jrr4SjymBXhL310nPrkje2CnQG7l+2o9HtjT2YQMB+JcxhO5E/Es4eUEJu388fTDE/j0+MIHPNIbjLnWpfL/nFZ7nrINqnP1ZP09heNwQJwhDzGhDkyjLPewAodBNYjVXWERjFcZod6DpVCJ2cU507MHzdGxFm9vz5i5MaEYZNTmwhnyHaS/QUA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f8d5a8a-6062-4520-5200-08da23a7dbbf X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2022 15:01:47.8980 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ao7QKNo2F+7W3U7Xnx1VuEftsvG5zl6Wq5UYQLWEnHGoS1UFlW1Su3tfs3aJekbG0jsdIqjiDyAU+Kx52iJNig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4834 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-04-21_02:2022-04-21, 2022-04-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 mlxlogscore=797 spamscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210081 X-Proofpoint-GUID: fajJwnWa9LnZQz4Z4Hr2bpC7OqE28hRk X-Proofpoint-ORIG-GUID: fajJwnWa9LnZQz4Z4Hr2bpC7OqE28hRk X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Skimming this bug report, it seems like the conclusion was that we > don't want to change anything here, so I'm closing this bug report. Very unfortunate. For the record, and for Someone who might care to fix this mistake in the future, here's a summary, with text from previous messages. ___ There's no reason to assume that interactive and non-interactive use of a given command should have the same behavior wrt `dired-get-marked-files' arg ERROR. Such hardcoding provides no benefit and can get in the way. A non-interactive use case for an arbitrary command that calls ` dired-get-marked-files' does not necessarily have `user-error' as the right behavior for an empty set of marked files. A common use case where the error can kick in is when a FILTER passed to `dired-get-marked-files' results in an empty file list. While it is typically a user error if nothing is marked and point is not on any file line, it is not necessarily an error when neither of those is the case - even for an interactive case. The individual command needs to decide whether that is an error case. Similarly, for a command B that _invokes_ such a command A. It's up to _B to decide_ whether to raise an error. If A systematically causes `dired-get-marked-files' to raise an error in a context where an error makes sense for A, that can conflict with what makes sense for B.