all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Future of `[set-]file-extended-attributes'?
@ 2013-12-28  4:27 Chong Yidong
  2013-12-28  9:13 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Chong Yidong @ 2013-12-28  4:27 UTC (permalink / raw)
  To: emacs-devel

I wonder how future-proof the `file-extended-attributes' and
`set-file-extended-attributes' functions, new to Emacs 24.4, are.

The names of these functions imply that they provide an Emacs Lisp
interface for retrieving and setting extended attributes.  Actually,
they are currently just wrappers for the special cases of ACLs and
SELinux contexts, which have special OS interfaces.

In the future, we may want to provide an Emacs Lisp interface to handle
arbitrary attributes.  Currently, `set-file-extended-attributes' has
the form:

  (set-file-extended-attributes FILENAME ATTRIBUTES)

ATTRIBUTES is expected to be an alist like

 ((acl . ACL) (selinux-context . SEL-CONTEXT))

where ACL and SEL-CONTEXT seem to have some non-trivial structure not
corresponding directly to the actual extended attributes to be set.
That's because they are set via the special interfaces for ACLs
(acl_set_file) and SELinux contexts (context_*_set), not the general
interface for setting extended file attributes (setxattr).

Is there a plan for extending `set-file-extended-attributes' to set an
extended attribute, with a particular namespace, name, and value?  I
guess we could each element in ATTRIBUTES could be one of

  (SYMBOL . SPECIALLY-FORMATTED-ATTRIBUTES)
  (NAME-STRING VALUE [FLAGS])

where the first form is what we currently have and the second form would
be for setting general attributes.  Thoughts?

I also wonder if it might not be cleaner to have a singular
`set-file-extended-attribute' function instead.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-28  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28  4:27 Future of `[set-]file-extended-attributes'? Chong Yidong
2013-12-28  9:13 ` Eli Zaretskii

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.