From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#34338: 26.1; delete-file return codes and failures Date: Tue, 5 Feb 2019 16:47:37 -0500 Message-ID: <20190205214737.vswyk7sfmgkliv7v@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260509"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 To: 34338@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 05 22:49:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr8ad-0015cz-Jq for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2019 22:49:11 +0100 Original-Received: from localhost ([127.0.0.1]:41411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr8ac-00082f-Ho for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2019 16:49:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr8aV-00082O-P7 for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:49:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr8aV-0002Yx-1x for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:49:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34538) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr8aU-0002Yg-Tu for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gr8aU-0003Bz-MY for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Feb 2019 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34338 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Reporting Original-Received: via spool by submit@debbugs.gnu.org id=B.154940328812200 (code B ref -1); Tue, 05 Feb 2019 21:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Feb 2019 21:48:08 +0000 Original-Received: from localhost ([127.0.0.1]:33819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gr8Zc-0003Ai-3m for submit@debbugs.gnu.org; Tue, 05 Feb 2019 16:48:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gr8Za-0003AF-Cr for submit@debbugs.gnu.org; Tue, 05 Feb 2019 16:48:06 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gr8ZU-0001Lr-6W for submit@debbugs.gnu.org; Tue, 05 Feb 2019 16:48:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr8ZT-0007pG-9k for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:48:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr8ZR-0001I3-6N for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:47:59 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:46689) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr8ZP-00014c-UW for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2019 16:47:56 -0500 Original-Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LrIPo-1hGgFt3wo0-0133CI for ; Tue, 05 Feb 2019 22:47:43 +0100 Content-Disposition: inline X-Provags-ID: V03:K1:8zQFuRgsN6o3PGJ8eZwXpgxFXmfbrpF391An4LhJar/pcU2eeaa JQKIg4LMIxSzvlrBGTMmj5Do7t9cT3/H07LpzIQZi3cg8Ejms2WVcNMd67UT134J97dGAgD 9ypJTvuHzwwCZsSG+zILBAnipb8kfDseq8JVf3MBq8O7Zqc7PXjS08MqkdgZrLvvMbzxrcB E1dottLC1zonm4FxELMwg== X-UI-Out-Filterresults: notjunk:1;V03:K0:8q/RaxgJeS8=:POwY6v4Cz0LugKLoy5qpF0 KC/poUouvpHdHnaucXaWdteK5hPtRbcYOM3wo3qfz+Y9VuBY1SyqVnudodIb4/Vfv0ttWT+dp 9FEd5MKJhH0aG+KAOwrg7c/nEWdVxQ5+lB3gOKBFA3y3VhCBI/zfORQdO0h34McmQ6ZrzEYiC 3ydd3HqKQkcKQo5JtlAYa4IAlplvqjPDxCdpUXIkafsLjPxfXpJJu7nRFQ7XydX2g0kFe/qAN QU9zZ7VsKoNJFKcxwQomuOtgySdEJrC3/kv0QI6CEhpanEzktpjHZLGIbACsFF8bq9xLEpTGM kTPJW7bANUCssdlEPte4y2C+htuyDei3Cw0fICjgNztTraW+kQQoQMPCrFnsFcIKSNm1FO7ZZ vSPA3DIiiFZw0sREbMa9UtBu2CSuszRQHtTDH2AMYyz1LcLnGzOujhS/IepnV+WFa2qZ2DI8Z 3CXRxH8rzS2TnEHsdMOQnlt6jfqtxs3U8KAt3gx8AO0qrC875ec4igYBNn8SXXrWnHsSdzaEh aOUBBi5r/F7RC741kAMSCY7voDS3CLqvPgwvuA0zCyzwDhZlBr6f6S/ZMlXWrBkl4H4UxwiyE 0naVXeQQP/dxgHgqZ5vmpxQhgalmx6zqfqtzzY/qADORIdhG+txtYj7hy//D6xVOvIPvFqmht FdMOvkZf8eowOnI7GMtkiS44NjsVsjlYEDIi6DBJtL1/boLQgMPKz31M3tz6TVtCxZnKzt3jF u6s+KrIj514NQKuaj1J84A/Br77wz3SNCcq7qkOxY/muMPrSNTsXh34YyRkb2TFe9VLI+Di3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155160 Archived-At: Subject: 26.1; delete-file return codes and failures Currently: A1) When delete-file successfully deletes a file, the function returns nil, not t. A2) When the file does not exist, the function returns the same value - nil. A3) When the file has been chmod'ed -w, the function performs the operation, with no regard to any option to emulate or not emulate 'rm -f', and also returns the identical value - nil. A4) When either the file's containing folder is chmod'ed -x, or the file is chattr'ed +i, the function crashes. I'd like to suggest: delete-file FILE &optional NOERROR FORCE B1) return t on success B2) raise an error when (not NOERROR) and: B2.1) file doesn't exist B2.2) (and (chmod -w) (not FORCE)) B2.3) another form of permission denial is encountered B3) return nil when NOERROR and: B2.1) file doesn't exist B2.2) another form of permission denial is encountered C) maybe log the exact error or reason for nil to *Messages*. In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.2) of 2018-12-26, modified by Debian built on x86-ubc-01 System Description: Devuan GNU/Linux 2.0.0 (ascii) -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0