From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#21699: 24.5; Bug in backup-buffer-copy and/or set-file-extended-attributes etc Date: Sun, 18 Oct 2015 17:05:43 -0400 Message-ID: References: <22051.8546.40000.221633@gargle.gargle.HOWL> <83wpuki2sf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1445202387 19357 80.91.229.3 (18 Oct 2015 21:06:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 21:06:27 +0000 (UTC) Cc: 21699@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 18 23:06:16 2015 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 1Znv9j-00082g-FZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Oct 2015 23:06:15 +0200 Original-Received: from localhost ([::1]:35533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znv9i-0002gf-KR for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Oct 2015 17:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znv9e-0002gT-PA for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 17:06:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znv9W-0002PF-Ms for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 17:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znv9W-0002PA-Jh for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 17:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Znv9W-0008JT-57 for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 17:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Barzilay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2015 21:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21699 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21699-submit@debbugs.gnu.org id=B21699.144520234931932 (code B ref 21699); Sun, 18 Oct 2015 21:06:02 +0000 Original-Received: (at 21699) by debbugs.gnu.org; 18 Oct 2015 21:05:49 +0000 Original-Received: from localhost ([127.0.0.1]:55451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Znv9I-0008Iw-HZ for submit@debbugs.gnu.org; Sun, 18 Oct 2015 17:05:49 -0400 Original-Received: from mail-ig0-f172.google.com ([209.85.213.172]:34777) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Znv9E-0008Il-Me for 21699@debbugs.gnu.org; Sun, 18 Oct 2015 17:05:45 -0400 Original-Received: by igbni9 with SMTP id ni9so43025158igb.1 for <21699@debbugs.gnu.org>; Sun, 18 Oct 2015 14:05:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mRKX3cRYH48wXVLkJb3YsBNysxkycr7qzu7XarZ1hLI=; b=RDMS5Xz1GSwZtvXWHaRE/aIONTn9c0jjcEPLfODe5uC0lRZF5E/XJTmgc5uOmEF7IV ilajmkp8pkdFCpQVyRIy0/5a9lQOUuubosI2GL8L3qZMJVii8CI2VP9zM4UdUeaKOTrp dTqjgz1JP/PiOGU4Kokzbfqq75Fnx3FZQTyOZ2XJlppQOs+PyrdPeRw1S60ah8Enbdku 6kVj2K3pNF5VELRkLqx032AmEXJGYvdKbuR0zIadG5Py9lL/Ez6TwK1drQjSFO0Q7uo/ cbzfn7Txp4DG61QFtwdpK1b2oyfkHy4Z8oMJOtp5FsgCmDJBL//ZHGW4qTYqyQWuiSQU W05w== X-Gm-Message-State: ALoCoQmph7JA/23Nc+nBLANXuie4d0jC1rgin6wpbHgFyoMz/t/ojhNR1ywNtVko3A4hsk74Z0W4 X-Received: by 10.50.39.52 with SMTP id m20mr10211185igk.60.1445202343873; Sun, 18 Oct 2015 14:05:43 -0700 (PDT) Original-Received: by 10.79.28.211 with HTTP; Sun, 18 Oct 2015 14:05:43 -0700 (PDT) In-Reply-To: <83wpuki2sf.fsf@gnu.org> 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: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107723 Archived-At: On Sun, Oct 18, 2015 at 12:01 PM, Eli Zaretskii wrote: > > Do you mean to say that backup-buffer-copy fails in your case? If so, > it means you have some customizations, or maybe the way your volume is > mounted causes backup-buffer-copy be called. It isn't normally called > in "emacs -Q" and with local files, AFAICT. > > Is that what happens in your case? > > Do you see the problem in "emacs -Q"? Yes, I do have customizations. Overall I'm not doing anything that should be done -- though I'm guessing that not many people get to that situation. The main thing in my setup is that backups are done by copying the file into a single directory for backups -- and in the problem case the backup is on a local windows directory when the original file is coming from a remote mount (on linux). But the bugs are easy to see: 1. `with-demoted-errors' is used in a bunch of places without a format string. This is not a bug since the macro supports the case of a non-literal-string being the first expression, but's for legacy, so it's either better to add that format string, or the macro should support that without qualifying it as a legacy feature. 2. The `set-file-extended-attributes' function always returns nil, which is a proper bug: - In `backup-buffer-copy' its return value is used as if it indicates whether it succeeded -- that's currently broken because it always returns nil. - It's also used in `basic-save-buffer' -- but there its result is not used, and the code looks like it's expecting it to throw an error on failure. - It's also used in `basic-save-buffer-2', in a `with-demoted-errors' The commit message that I pointed to makes me think that it's expected to return nil on failure -- so it should be fixed to do that. Another solution would be if it's expected to throw an error when it fails, and in this case the first use is broken and should not look at its result. 3. The third problem happens *if* the solution to #2 is to make it return a meaningful result. In that case, the problem I'll run into is that on windows my extended modes include (selinux nil nil nil nil) which I'm guessing is because there's no selinux support, but then `set-file-selinux-context' should not fail when getting a value of (nil nil nil nil). 4. The last problem of chmod-ing failing after setting the windows acl is probably better to defer after resolving the above. -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life!