From: Chong Yidong <cyd@gnu.org>
To: emacs-devel@gnu.org
Subject: Future of `[set-]file-extended-attributes'?
Date: Sat, 28 Dec 2013 12:27:51 +0800 [thread overview]
Message-ID: <87fvpdbnw8.fsf@gnu.org> (raw)
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.
next reply other threads:[~2013-12-28 4:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 4:27 Chong Yidong [this message]
2013-12-28 9:13 ` Future of `[set-]file-extended-attributes'? Eli Zaretskii
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=87fvpdbnw8.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=emacs-devel@gnu.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.