From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#16133: 24.3; copy-file fails on chmod when copying to FAT filesystem Date: Sun, 22 Dec 2013 10:54:48 -0800 Organization: UCLA Computer Science Department Message-ID: <52B73578.3070407@cs.ucla.edu> References: <52B62BC3.4050508@cs.ucla.edu> <83ob498s3q.fsf@gnu.org> <52B66414.1090709@cs.ucla.edu> <83ioug97lu.fsf@gnu.org> <52B72356.7000103@cs.ucla.edu> <83eh5491j8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1387738518 26300 80.91.229.3 (22 Dec 2013 18:55:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Dec 2013 18:55:18 +0000 (UTC) Cc: ran@lasgalen.net, 16133@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 22 19:55:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VuoBN-00016R-9G for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Dec 2013 19:55:21 +0100 Original-Received: from localhost ([::1]:58909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuoBM-0002zU-UZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Dec 2013 13:55:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuoBC-0002od-EW for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2013 13:55:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VuoB4-0006Fs-W1 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2013 13:55:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuoB4-0006Fg-Sk for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2013 13:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VuoB4-0005NY-En for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2013 13:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2013 18:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 16133-submit@debbugs.gnu.org id=B16133.138773849720657 (code B ref 16133); Sun, 22 Dec 2013 18:55:02 +0000 Original-Received: (at 16133) by debbugs.gnu.org; 22 Dec 2013 18:54:57 +0000 Original-Received: from localhost ([127.0.0.1]:34856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuoAu-0005N1-GP for submit@debbugs.gnu.org; Sun, 22 Dec 2013 13:54:57 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34445) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuoAs-0005Ms-Lc for 16133@debbugs.gnu.org; Sun, 22 Dec 2013 13:54:51 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A7A5639E8113; Sun, 22 Dec 2013 10:54:49 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HY-aezm1SXyx; Sun, 22 Dec 2013 10:54:49 -0800 (PST) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 345F039E8108; Sun, 22 Dec 2013 10:54:49 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <83eh5491j8.fsf@gnu.org> X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82402 Archived-At: Eli Zaretskii wrote: > A library function should > never decide on its own when to call it quits Copy-file signals errors in many circumstances; this is just one of them. If the goal is to have a library function that does not "decide on its own when to call it quits", then the function should return a value indicating the error, rather than throwing an exception. That might be too much of a change to copy-file, but we could have a variant of copy-file that does that, suitable for library use. > It is only justified to do that when the > error is fatal; this one isn't: the file was copied. The contents of the file were copied, but the permissions were not. The specification of copy-file says that it copies both contents and permissions. I would favor changing the specification of copy-file, so that it doesn't copy the permissions unless its 6th argument is non-nil. We could change the name of the 6th argument to PRESERVE-PERMISSIONS. The 6th argument already governs how permissions are preserved, so this would be a reasonable change. I don't think it'd hurt existing applications, since the default permissions when creating a file would be the same as it is now -- the only change would be that copy-file wouldn't attempt to change the permissions of an already-existing file unless PRESERVE-PERMISSIONS is non-nil.