From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artem Chuprina Newsgroups: gmane.emacs.bugs Subject: bug#16133: 24.3; copy-file fails on chmod when copying to FAT filesystem Date: Sun, 15 Dec 2013 18:38:15 +0400 Message-ID: <87zjo2tc14.fsf@wizzle.ran.pp.ru> References: <87vbysv8av.fsf@wizzle.ran.pp.ru> <87ob4jvj45.fsf@wizzle.ran.pp.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1387118356 19948 80.91.229.3 (15 Dec 2013 14:39:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Dec 2013 14:39:16 +0000 (UTC) Cc: Paul Eggert , 16133@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 15 15:39:22 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 1VsCql-0003V9-DQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2013 15:39:19 +0100 Original-Received: from localhost ([::1]:51275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsCqk-0003W3-L0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2013 09:39:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsCqb-0003ID-0f for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2013 09:39:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsCqV-0005MD-67 for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2013 09:39:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsCqV-0005M0-2I for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2013 09:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VsCqU-0004Fq-Eq for bug-gnu-emacs@gnu.org; Sun, 15 Dec 2013 09:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Artem Chuprina Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Dec 2013 14:39: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: Original-Received: via spool by 16133-submit@debbugs.gnu.org id=B16133.138711832016326 (code B ref 16133); Sun, 15 Dec 2013 14:39:02 +0000 Original-Received: (at 16133) by debbugs.gnu.org; 15 Dec 2013 14:38:40 +0000 Original-Received: from localhost ([127.0.0.1]:50994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VsCq7-0004FF-MA for submit@debbugs.gnu.org; Sun, 15 Dec 2013 09:38:40 -0500 Original-Received: from minas.ran.pp.ru ([178.63.209.8]:41698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VsCq3-0004F4-Fi for 16133@debbugs.gnu.org; Sun, 15 Dec 2013 09:38:36 -0500 Original-Received: from [83.220.236.119] (helo=wizzle.ran.pp.ru) by minas.ran.pp.ru with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VsCq0-0005ri-5z; Sun, 15 Dec 2013 14:38:34 +0000 Original-Received: from ran by wizzle.ran.pp.ru with local (Exim 4.80) (envelope-from ) id 1VsCpj-0000Rx-A4; Sun, 15 Dec 2013 18:38:15 +0400 In-Reply-To: (Glenn Morris's message of "Sat, 14 Dec 2013 15:19:33 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) 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:82015 Archived-At: Glenn Morris -> Artem Chuprina @ Sat, 14 Dec 2013 15:19:33 -0500: GM> I think you are right that it is a problem. GM> I think the problem was in documenting copy-file to always copy GM> permissions in the first place. But I imagine it is far too late to GM> change that. Not sure what the right thing to do is here... GM> Someone may be relying on the fact that copy-file copies permissions, GM> and want it it throw an error if it fails: GM> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8306 GM> Others, like you, may not care. To clarify, many others, including me, CARE of copy-file NOT throwing error when it can copy file, but not its permissions, as it did for many years before. That is, the mentioned patch broke that for-many-years successful behavior, and me personally had to return back to emacs 23 to avoid it. Also, it seems that backup facility also depends on copy-file (probably not, I've not done a research, but I've seen message "cannot make a backup file, backing up to ~/.emacs.d/%backup" (or like this) when editing file on the same VFAT filesystem. GM> Since copy-file has only relatively recently starting giving an error, GM> maybe the least bad thing would be for it to give a message instead of GM> an error? As for me, this would be OK, because I cannot imagine any scenario when I'd prefer copied file to be left at target, but copy-file throwing an error. I want either success if file contents was copied successfully (and possibly a message informing me that chmod or chown failed), or, if I REALLY CARE OF EXACT COPY, that file itself is NOT copied at all (that is, reverted if ok-if-exist was true). Yes, I think that chown or copying ACLs also should not throw an error on failure. GM> I don't know how we tidy this up for the future though. GM> Add yet another optional argument "error-if-permissions-fail"? Yuck. I think no one will end up with that argument set true. Probably, someone will try to, but his users will soon ask him not to do so. Another possible solution would be to introduce a global variable, say, copy-file-signal-error-on-content-only :), allowing end-user (that is, not a library author who calls copy-file, like org-mobile-push in my case, but end user, like me) to disable throwing errors if file content copied ok, but meta information copying failed (not only chmod, but also chown, copying ACLs, times etc.) I expect that most users would like that variable to be true by default :)