Function: group-name
group-name is a function defined in editfns.c.
Signature
(group-name GID)
Documentation
Return the name of the group whose numeric group ID is GID.
The argument GID should be an integer or a float. Return nil if a group with such GID does not exists or is not known.
Probably introduced at or before Emacs version 27.1.
Source Code
// Defined in /usr/src/emacs/src/editfns.c
{
struct group *gr;
gid_t id;
if (!NUMBERP (gid) && !CONSP (gid))
error ("Invalid GID specification");
CONS_TO_INTEGER (gid, gid_t, id);
block_input ();
gr = getgrgid (id);
unblock_input ();
return gr ? build_string (gr->gr_name) : Qnil;
}