From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21699: 24.5; Bug in backup-buffer-copy and/or set-file-extended-attributes etc [set-file-extended-attributes] Date: Mon, 19 Oct 2015 10:09:36 +0300 Message-ID: <83wpujgwr3.fsf@gnu.org> References: <831tcricrz.fsf@gnu.org> <83zizfgxnl.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445238630 19183 80.91.229.3 (19 Oct 2015 07:10:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 07:10:30 +0000 (UTC) Cc: 21699@debbugs.gnu.org To: eli@barzilay.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 19 09:10:20 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 1Zo4aG-0007vb-U8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Oct 2015 09:10:17 +0200 Original-Received: from localhost ([::1]:36896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo4aB-0000CQ-4p for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Oct 2015 03:10:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo4a6-000081-2E for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 03:10:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo4a2-0007Mc-T4 for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 03:10:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo4a2-0007MX-Nu for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 03:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zo4a2-0005PW-Ct for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2015 03:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2015 07:10: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.144523859420779 (code B ref 21699); Mon, 19 Oct 2015 07:10:02 +0000 Original-Received: (at 21699) by debbugs.gnu.org; 19 Oct 2015 07:09:54 +0000 Original-Received: from localhost ([127.0.0.1]:55651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zo4Zu-0005P5-2g for submit@debbugs.gnu.org; Mon, 19 Oct 2015 03:09:54 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40809) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zo4Zr-0005Ot-A8 for 21699@debbugs.gnu.org; Mon, 19 Oct 2015 03:09:52 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NWG00600H7BAZ00@a-mtaout20.012.net.il> for 21699@debbugs.gnu.org; Mon, 19 Oct 2015 10:09:34 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWG006HQH7X1250@a-mtaout20.012.net.il>; Mon, 19 Oct 2015 10:09:34 +0300 (IDT) In-reply-to: <83zizfgxnl.fsf@gnu.org> X-012-Sender: halo1@inter.net.il 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:107735 Archived-At: > Date: Mon, 19 Oct 2015 09:50:06 +0300 > From: Eli Zaretskii > Cc: 21699@debbugs.gnu.org > > > Date: Mon, 19 Oct 2015 09:38:08 +0300 > > From: Eli Zaretskii > > Cc: 21699@debbugs.gnu.org > > > > So after fixing set-file-extended-attributes as you suggest, does the > > problem still happen for you? > > Actually, your suggested variant also returns nil for me. I need > something like this instead: > > (defun set-file-extended-attributes (filename attributes) > "Set extended attributes of file FILENAME to ATTRIBUTES. > > ATTRIBUTES must be an alist of file attributes as returned by > `file-extended-attributes'." > (let (result) > (dolist (elt attributes) > (let ((attr (car elt)) > (val (cdr elt))) > (cond ((eq attr 'acl) > (setq result (or result > (set-file-acl filename val)))) > ((eq attr 'selinux-context) > (setq result (or result > (set-file-selinux-context filename val))))))) > result)) I installed a slightly different variant of this (which always invokes the corresponding low-level primitive for each type of extended attributes, instead of skipping all those after the first success), to keep the original semantics.