all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43723@debbugs.gnu.org
Subject: bug#43723: 27.1; Errors in file-extended-attributes prevent from saving buffer
Date: Tue, 07 Jun 2022 14:35:17 +0300	[thread overview]
Message-ID: <83leu87ll6.fsf@gnu.org> (raw)
In-Reply-To: <87mteoomdi.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue,  07 Jun 2022 11:26:17 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 43723@debbugs.gnu.org
> Date: Tue, 07 Jun 2022 11:26:17 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > You can easily simulate this situation by writing a replacement for
> > file-acl that always signals a file-error, or advising it to that
> > effect.
> 
> It's always better to have an actual test case so that we're not fixing
> the wrong thing...

Yes, but all of my actual examples were fixed "by other means".  So
only the theoretical issue is left.

> But in this case, I guess it's `set-file-extended-attributes' that
> should be signalling an error if we want to emulate the problem?
> `file-acl' would presumably just return nil in these cases, so there'd
> be no warnings or errors?

No, the problem is exactly that file-extended-attributes signals an
error.  The set-file-extended-attributes part is handled correctly:

	       ;; If set-file-extended-attributes fails, fall back on
	       ;; set-file-modes.
	       (unless
		   (with-demoted-errors "Error setting attributes: %s"
		     (set-file-extended-attributes buffer-file-name
						   (nth 1 setmodes)))
		 (set-file-modes buffer-file-name
				 (logior (car setmodes) 128)))))

Which to me is just one more argument in favor of showing a simple
message when file-extended-attributes fails, instead of signaling an
error and breaking the save-buffer command.





  reply	other threads:[~2022-06-07 11:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 14:43 bug#43723: 27.1; Errors in file-extended-attributes prevent from saving buffer Eli Zaretskii
2022-06-06 16:22 ` Lars Ingebrigtsen
2022-06-06 16:53   ` Eli Zaretskii
2022-06-07  9:26     ` Lars Ingebrigtsen
2022-06-07 11:35       ` Eli Zaretskii [this message]
2022-06-07 11:52         ` Lars Ingebrigtsen
2022-06-07 13:07           ` Eli Zaretskii
2022-06-07 18:04             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83leu87ll6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=43723@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.