unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33195: 27.0.50; user-login-name has no group-login-name
@ 2018-10-29 18:52 Jules Tamagnan
  2018-10-30 10:34 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Jules Tamagnan @ 2018-10-29 18:52 UTC (permalink / raw)
  To: 33195


I've found it difficult to go from an integer group id to the name of
that group. I've looked at the source for `user-login-name` and
`system-groups` and could not find a way to do what I needed.

As such I think it would be great to add a function to do that. This is
my first change to emacs C code, so I'm unsure how to make an argument
not be optional. I have signed the FSF CLA for emacs.

diff --git a/src/editfns.c b/src/editfns.c
index 84cfbb2..c25164a 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1352,6 +1352,24 @@ of the user with that uid, or nil if there is no such user.  */)
   return (pw ? build_string (pw->pw_name) : Qnil);
 }

+DEFUN ("group-name", Fgroup_name, Sgroup_name, 0, 1, 0,
+       doc: /* If argument GID is an integer or a float, return the login name
+of the group with that GID, or nil if there is no such GID.  */)
+  (Lisp_Object gid)
+{
+  struct group *gr;
+  gid_t id;
+
+  if (NILP (gid))
+    return Qnil;
+
+  CONS_TO_INTEGER (gid, gid_t, id);
+  block_input ();
+  gr = getgrgid (id);
+  unblock_input ();
+  return (gr ? build_string (gr->gr_name) : Qnil);
+}
+
 DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name,
        0, 0, 0,
        doc: /* Return the name of the user's real uid, as a string.
@@ -5517,6 +5535,7 @@ functions if all the text being accessed has this property.  */);
   defsubr (&Sinsert_byte);

   defsubr (&Suser_login_name);
+  defsubr (&Sgroup_name);
   defsubr (&Suser_real_login_name);
   defsubr (&Suser_uid);
   defsubr (&Suser_real_uid);


In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2018-10-29 built on jat-delphix-lap
Repository revision: 5b5f441ff8986800aa5f175bb5db2dd90e642a3a
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.04.5 LTS

Recent messages:
Quit
Type "q" to delete help window.
mouse-2, RET: find function's definition
Company backend ’company-clang’ could not be initialized:
Company found no clang executable
Loading /home/jat/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
Quit
Mark set
Quit

Configured using:
 'configure --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  recentf-mode: t
  diff-auto-refine-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  fancy-battery-mode: t
  projectile-mode: t
  imagex-global-sticky-mode: t
  imagex-sticky-mode: t
  async-bytecomp-package-mode: t
  pyvenv-tracking-mode: t
  pyvenv-mode: t
  pdf-occur-dired-minor-mode: t
  pdf-occur-global-minor-mode: t
  persistent-scratch-autosave-mode: t
  winner-mode: t
  ivy-rich-mode: t
  ivy-mode: t
  shell-dirtrack-mode: t
  global-undo-tree-mode: t
  display-time-mode: t
  minibuffer-line-mode: t
  minions-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  global-company-mode: t
  company-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  show-paren-mode: t
  override-global-mode: t
  electric-pair-mode: t
  image-diredx-async-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: 1

Load-path shadows:
~/Development/git/fork/ace-window/ace-window hides /home/jat/.emacs.d/elpa/ace-window-20180814.1516/ace-window
~/Development/git/fork/ivy-rich/ivy-rich hides /home/jat/.emacs.d/elpa/ivy-rich-20181001.1147/ivy-rich
~/Development/git/writeable/multiple-cursors.el/mc-mark-pop hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-mark-pop
~/Development/git/writeable/multiple-cursors.el/mc-separate-operations hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-separate-operations
~/Development/git/writeable/multiple-cursors.el/rectangular-region-mode hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/rectangular-region-mode
~/Development/git/writeable/multiple-cursors.el/mc-mark-more hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-mark-more
~/Development/git/writeable/multiple-cursors.el/multiple-cursors hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/multiple-cursors
~/Development/git/writeable/multiple-cursors.el/mc-hide-unmatched-lines-mode hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-hide-unmatched-lines-mode
~/Development/git/writeable/multiple-cursors.el/multiple-cursors-pkg hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/multiple-cursors-pkg
~/Development/git/writeable/multiple-cursors.el/multiple-cursors-core hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/multiple-cursors-core
~/Development/git/writeable/multiple-cursors.el/mc-cycle-cursors hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-cycle-cursors
~/Development/git/writeable/multiple-cursors.el/mc-edit-lines hides /home/jat/.emacs.d/elpa/multiple-cursors-20180913.1237/mc-edit-lines
/home/jat/.emacs.d/elpa/org-20181001/org-habit hides /home/jat/Development/emacs/lisp/org/org-habit
/home/jat/.emacs.d/elpa/org-20181001/org-bibtex hides /home/jat/Development/emacs/lisp/org/org-bibtex
/home/jat/.emacs.d/elpa/org-20181001/ob-ebnf hides /home/jat/Development/emacs/lisp/org/ob-ebnf
/home/jat/.emacs.d/elpa/org-20181001/ob-scheme hides /home/jat/Development/emacs/lisp/org/ob-scheme
/home/jat/.emacs.d/elpa/org-20181001/ob-stan hides /home/jat/Development/emacs/lisp/org/ob-stan
/home/jat/.emacs.d/elpa/org-20181001/ox-man hides /home/jat/Development/emacs/lisp/org/ox-man
/home/jat/.emacs.d/elpa/org-20181001/ob-ocaml hides /home/jat/Development/emacs/lisp/org/ob-ocaml
/home/jat/.emacs.d/elpa/org-20181001/ob-lilypond hides /home/jat/Development/emacs/lisp/org/ob-lilypond
/home/jat/.emacs.d/elpa/org-20181001/ob-css hides /home/jat/Development/emacs/lisp/org/ob-css
/home/jat/.emacs.d/elpa/org-20181001/ox-md hides /home/jat/Development/emacs/lisp/org/ox-md
/home/jat/.emacs.d/elpa/org-20181001/ob-hledger hides /home/jat/Development/emacs/lisp/org/ob-hledger
/home/jat/.emacs.d/elpa/org-20181001/org-agenda hides /home/jat/Development/emacs/lisp/org/org-agenda
/home/jat/.emacs.d/elpa/org-20181001/org-gnus hides /home/jat/Development/emacs/lisp/org/org-gnus
/home/jat/.emacs.d/elpa/org-20181001/ox-odt hides /home/jat/Development/emacs/lisp/org/ox-odt
/home/jat/.emacs.d/elpa/org-20181001/org-datetree hides /home/jat/Development/emacs/lisp/org/org-datetree
/home/jat/.emacs.d/elpa/org-20181001/ob-ditaa hides /home/jat/Development/emacs/lisp/org/ob-ditaa
/home/jat/.emacs.d/elpa/org-20181001/org-src hides /home/jat/Development/emacs/lisp/org/org-src
/home/jat/.emacs.d/elpa/org-20181001/org-mouse hides /home/jat/Development/emacs/lisp/org/org-mouse
/home/jat/.emacs.d/elpa/org-20181001/ob-abc hides /home/jat/Development/emacs/lisp/org/ob-abc
/home/jat/.emacs.d/elpa/org-20181001/ob-calc hides /home/jat/Development/emacs/lisp/org/ob-calc
/home/jat/.emacs.d/elpa/org-20181001/ob-vala hides /home/jat/Development/emacs/lisp/org/ob-vala
/home/jat/.emacs.d/elpa/org-20181001/org-macro hides /home/jat/Development/emacs/lisp/org/org-macro
/home/jat/.emacs.d/elpa/org-20181001/ob-comint hides /home/jat/Development/emacs/lisp/org/ob-comint
/home/jat/.emacs.d/elpa/org-20181001/ob-tangle hides /home/jat/Development/emacs/lisp/org/ob-tangle
/home/jat/.emacs.d/elpa/org-20181001/ob hides /home/jat/Development/emacs/lisp/org/ob
/home/jat/.emacs.d/elpa/org-20181001/ox-latex hides /home/jat/Development/emacs/lisp/org/ox-latex
/home/jat/.emacs.d/elpa/org-20181001/ob-forth hides /home/jat/Development/emacs/lisp/org/ob-forth
/home/jat/.emacs.d/elpa/org-20181001/org-lint hides /home/jat/Development/emacs/lisp/org/org-lint
/home/jat/.emacs.d/elpa/org-20181001/ob-octave hides /home/jat/Development/emacs/lisp/org/ob-octave
/home/jat/.emacs.d/elpa/org-20181001/ox-texinfo hides /home/jat/Development/emacs/lisp/org/ox-texinfo
/home/jat/.emacs.d/elpa/org-20181001/org-w3m hides /home/jat/Development/emacs/lisp/org/org-w3m
/home/jat/.emacs.d/elpa/org-20181001/ox hides /home/jat/Development/emacs/lisp/org/ox
/home/jat/.emacs.d/elpa/org-20181001/ob-clojure hides /home/jat/Development/emacs/lisp/org/ob-clojure
/home/jat/.emacs.d/elpa/org-20181001/org-install hides /home/jat/Development/emacs/lisp/org/org-install
/home/jat/.emacs.d/elpa/org-20181001/ob-table hides /home/jat/Development/emacs/lisp/org/ob-table
/home/jat/.emacs.d/elpa/org-20181001/ob-C hides /home/jat/Development/emacs/lisp/org/ob-C
/home/jat/.emacs.d/elpa/org-20181001/ob-fortran hides /home/jat/Development/emacs/lisp/org/ob-fortran
/home/jat/.emacs.d/elpa/org-20181001/ob-python hides /home/jat/Development/emacs/lisp/org/ob-python
/home/jat/.emacs.d/elpa/org-20181001/ob-picolisp hides /home/jat/Development/emacs/lisp/org/ob-picolisp
/home/jat/.emacs.d/elpa/org-20181001/ob-lua hides /home/jat/Development/emacs/lisp/org/ob-lua
/home/jat/.emacs.d/elpa/org-20181001/org-eshell hides /home/jat/Development/emacs/lisp/org/org-eshell
/home/jat/.emacs.d/elpa/org-20181001/ob-dot hides /home/jat/Development/emacs/lisp/org/ob-dot
/home/jat/.emacs.d/elpa/org-20181001/ox-ascii hides /home/jat/Development/emacs/lisp/org/ox-ascii
/home/jat/.emacs.d/elpa/org-20181001/org-attach hides /home/jat/Development/emacs/lisp/org/org-attach
/home/jat/.emacs.d/elpa/org-20181001/ob-org hides /home/jat/Development/emacs/lisp/org/ob-org
/home/jat/.emacs.d/elpa/org-20181001/ob-screen hides /home/jat/Development/emacs/lisp/org/ob-screen
/home/jat/.emacs.d/elpa/org-20181001/ob-shell hides /home/jat/Development/emacs/lisp/org/ob-shell
/home/jat/.emacs.d/elpa/org-20181001/org-indent hides /home/jat/Development/emacs/lisp/org/org-indent
/home/jat/.emacs.d/elpa/org-20181001/ob-eval hides /home/jat/Development/emacs/lisp/org/ob-eval
/home/jat/.emacs.d/elpa/org-20181001/org-capture hides /home/jat/Development/emacs/lisp/org/org-capture
/home/jat/.emacs.d/elpa/org-20181001/ob-keys hides /home/jat/Development/emacs/lisp/org/ob-keys
/home/jat/.emacs.d/elpa/org-20181001/org-inlinetask hides /home/jat/Development/emacs/lisp/org/org-inlinetask
/home/jat/.emacs.d/elpa/org-20181001/ob-perl hides /home/jat/Development/emacs/lisp/org/ob-perl
/home/jat/.emacs.d/elpa/org-20181001/ob-J hides /home/jat/Development/emacs/lisp/org/ob-J
/home/jat/.emacs.d/elpa/org-20181001/org-macs hides /home/jat/Development/emacs/lisp/org/org-macs
/home/jat/.emacs.d/elpa/org-20181001/ob-emacs-lisp hides /home/jat/Development/emacs/lisp/org/ob-emacs-lisp
/home/jat/.emacs.d/elpa/org-20181001/ob-exp hides /home/jat/Development/emacs/lisp/org/ob-exp
/home/jat/.emacs.d/elpa/org-20181001/ob-sqlite hides /home/jat/Development/emacs/lisp/org/ob-sqlite
/home/jat/.emacs.d/elpa/org-20181001/org-mhe hides /home/jat/Development/emacs/lisp/org/org-mhe
/home/jat/.emacs.d/elpa/org-20181001/ob-maxima hides /home/jat/Development/emacs/lisp/org/ob-maxima
/home/jat/.emacs.d/elpa/org-20181001/ox-html hides /home/jat/Development/emacs/lisp/org/ox-html
/home/jat/.emacs.d/elpa/org-20181001/ob-lob hides /home/jat/Development/emacs/lisp/org/ob-lob
/home/jat/.emacs.d/elpa/org-20181001/ob-sed hides /home/jat/Development/emacs/lisp/org/ob-sed
/home/jat/.emacs.d/elpa/org-20181001/org-eww hides /home/jat/Development/emacs/lisp/org/org-eww
/home/jat/.emacs.d/elpa/org-20181001/org-rmail hides /home/jat/Development/emacs/lisp/org/org-rmail
/home/jat/.emacs.d/elpa/org-20181001/ob-processing hides /home/jat/Development/emacs/lisp/org/ob-processing
/home/jat/.emacs.d/elpa/org-20181001/org hides /home/jat/Development/emacs/lisp/org/org
/home/jat/.emacs.d/elpa/org-20181001/org-loaddefs hides /home/jat/Development/emacs/lisp/org/org-loaddefs
/home/jat/.emacs.d/elpa/org-20181001/org-id hides /home/jat/Development/emacs/lisp/org/org-id
/home/jat/.emacs.d/elpa/org-20181001/org-mobile hides /home/jat/Development/emacs/lisp/org/org-mobile
/home/jat/.emacs.d/elpa/org-20181001/ob-ref hides /home/jat/Development/emacs/lisp/org/ob-ref
/home/jat/.emacs.d/elpa/org-20181001/org-entities hides /home/jat/Development/emacs/lisp/org/org-entities
/home/jat/.emacs.d/elpa/org-20181001/ob-java hides /home/jat/Development/emacs/lisp/org/ob-java
/home/jat/.emacs.d/elpa/org-20181001/ob-latex hides /home/jat/Development/emacs/lisp/org/ob-latex
/home/jat/.emacs.d/elpa/org-20181001/org-plot hides /home/jat/Development/emacs/lisp/org/org-plot
/home/jat/.emacs.d/elpa/org-20181001/ob-lisp hides /home/jat/Development/emacs/lisp/org/ob-lisp
/home/jat/.emacs.d/elpa/org-20181001/ob-awk hides /home/jat/Development/emacs/lisp/org/ob-awk
/home/jat/.emacs.d/elpa/org-20181001/ob-ledger hides /home/jat/Development/emacs/lisp/org/ob-ledger
/home/jat/.emacs.d/elpa/org-20181001/ob-sass hides /home/jat/Development/emacs/lisp/org/ob-sass
/home/jat/.emacs.d/elpa/org-20181001/org-ctags hides /home/jat/Development/emacs/lisp/org/org-ctags
/home/jat/.emacs.d/elpa/org-20181001/org-clock hides /home/jat/Development/emacs/lisp/org/org-clock
/home/jat/.emacs.d/elpa/org-20181001/org-compat hides /home/jat/Development/emacs/lisp/org/org-compat
/home/jat/.emacs.d/elpa/org-20181001/org-list hides /home/jat/Development/emacs/lisp/org/org-list
/home/jat/.emacs.d/elpa/org-20181001/ob-ruby hides /home/jat/Development/emacs/lisp/org/ob-ruby
/home/jat/.emacs.d/elpa/org-20181001/ob-shen hides /home/jat/Development/emacs/lisp/org/ob-shen
/home/jat/.emacs.d/elpa/org-20181001/org-version hides /home/jat/Development/emacs/lisp/org/org-version
/home/jat/.emacs.d/elpa/org-20181001/ob-haskell hides /home/jat/Development/emacs/lisp/org/ob-haskell
/home/jat/.emacs.d/elpa/org-20181001/ob-io hides /home/jat/Development/emacs/lisp/org/ob-io
/home/jat/.emacs.d/elpa/org-20181001/ob-core hides /home/jat/Development/emacs/lisp/org/ob-core
/home/jat/.emacs.d/elpa/org-20181001/ob-coq hides /home/jat/Development/emacs/lisp/org/ob-coq
/home/jat/.emacs.d/elpa/org-20181001/org-protocol hides /home/jat/Development/emacs/lisp/org/org-protocol
/home/jat/.emacs.d/elpa/org-20181001/org-docview hides /home/jat/Development/emacs/lisp/org/org-docview
/home/jat/.emacs.d/elpa/org-20181001/ob-R hides /home/jat/Development/emacs/lisp/org/ob-R
/home/jat/.emacs.d/elpa/org-20181001/ob-gnuplot hides /home/jat/Development/emacs/lisp/org/ob-gnuplot
/home/jat/.emacs.d/elpa/org-20181001/org-duration hides /home/jat/Development/emacs/lisp/org/org-duration
/home/jat/.emacs.d/elpa/org-20181001/org-footnote hides /home/jat/Development/emacs/lisp/org/org-footnote
/home/jat/.emacs.d/elpa/org-20181001/org-timer hides /home/jat/Development/emacs/lisp/org/org-timer
/home/jat/.emacs.d/elpa/org-20181001/org-bbdb hides /home/jat/Development/emacs/lisp/org/org-bbdb
/home/jat/.emacs.d/elpa/org-20181001/ox-publish hides /home/jat/Development/emacs/lisp/org/ox-publish
/home/jat/.emacs.d/elpa/org-20181001/org-element hides /home/jat/Development/emacs/lisp/org/org-element
/home/jat/.emacs.d/elpa/org-20181001/org-faces hides /home/jat/Development/emacs/lisp/org/org-faces
/home/jat/.emacs.d/elpa/org-20181001/ob-makefile hides /home/jat/Development/emacs/lisp/org/ob-makefile
/home/jat/.emacs.d/elpa/org-20181001/ox-beamer hides /home/jat/Development/emacs/lisp/org/ox-beamer
/home/jat/.emacs.d/elpa/org-20181001/org-colview hides /home/jat/Development/emacs/lisp/org/org-colview
/home/jat/.emacs.d/elpa/org-20181001/ob-plantuml hides /home/jat/Development/emacs/lisp/org/ob-plantuml
/home/jat/.emacs.d/elpa/org-20181001/org-crypt hides /home/jat/Development/emacs/lisp/org/org-crypt
/home/jat/.emacs.d/elpa/org-20181001/org-table hides /home/jat/Development/emacs/lisp/org/org-table
/home/jat/.emacs.d/elpa/org-20181001/ob-asymptote hides /home/jat/Development/emacs/lisp/org/ob-asymptote
/home/jat/.emacs.d/elpa/org-20181001/ox-icalendar hides /home/jat/Development/emacs/lisp/org/ox-icalendar
/home/jat/.emacs.d/elpa/org-20181001/ob-js hides /home/jat/Development/emacs/lisp/org/ob-js
/home/jat/.emacs.d/elpa/org-20181001/org-archive hides /home/jat/Development/emacs/lisp/org/org-archive
/home/jat/.emacs.d/elpa/org-20181001/ox-org hides /home/jat/Development/emacs/lisp/org/ox-org
/home/jat/.emacs.d/elpa/org-20181001/ob-mscgen hides /home/jat/Development/emacs/lisp/org/ob-mscgen
/home/jat/.emacs.d/elpa/org-20181001/ob-matlab hides /home/jat/Development/emacs/lisp/org/ob-matlab
/home/jat/.emacs.d/elpa/org-20181001/ob-sql hides /home/jat/Development/emacs/lisp/org/ob-sql
/home/jat/.emacs.d/elpa/org-20181001/ob-groovy hides /home/jat/Development/emacs/lisp/org/ob-groovy
/home/jat/.emacs.d/elpa/org-20181001/org-pcomplete hides /home/jat/Development/emacs/lisp/org/org-pcomplete
/home/jat/.emacs.d/elpa/org-20181001/org-irc hides /home/jat/Development/emacs/lisp/org/org-irc
/home/jat/.emacs.d/elpa/org-20181001/org-info hides /home/jat/Development/emacs/lisp/org/org-info
/home/jat/.emacs.d/elpa/org-20181001/org-feed hides /home/jat/Development/emacs/lisp/org/org-feed
/home/jat/.emacs.d/elpa/soap-client-3.1.4/soap-client hides /home/jat/Development/emacs/lisp/net/soap-client
/home/jat/.emacs.d/elpa/soap-client-3.1.4/soap-inspect hides /home/jat/Development/emacs/lisp/net/soap-inspect

Features:
(shadow sort mail-extr emacsbug recentf tree-widget vc-git diff-mode
eieio-opt speedbar sb-image ezimage dframe help-fns radix-tree
jat-counsel-describe-function ace-window avy jat-counsel-hydra
jat-main-hydra alert log4e notifications dbus gntp jat-exwm exwm-randr
xcb-randr exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating
xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh
xcb-icccm xelb xcb xcb-xproto xcb-types calfw holidays hol-loaddefs
cal-menu calendar cal-loaddefs debbugs soap-client url-http url-auth
url-gw nsm url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap warnings rng-xsd rng-dt rng-util
xsd-regexp xml readline-complete sh-script smie executable shx
jat-eshell em-term term disp-table ehelp flycheck-arcanist
flycheck-pos-tip flycheck fancy-battery battery electric-operator
projectile image+ image-file dlpx docker docker-volume docker-network
docker-machine docker-image docker-container docker-process docker-utils
docker-group magit-popup async-bytecomp async make-mode puppet-mode
align markdown-mode noutline outline jat-python blacken pyvenv esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell
esh-module esh-mode esh-util python-environment json-mode json-reformat
json-snatcher js sgml-mode dom json map cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs jat-keys
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local find-func cedet pdf-isearch let-alist pdf-misc
imenu pdf-tools pdf-view bookmark pp jka-compr pdf-cache pdf-info tq
pdf-util backup-each-save solaire-mode persistent-scratch winner
visual-regexp-steroids visual-regexp hydra lv smex ido counsel swiper
ivy-rich ivy delsel colir ivy-overlay ffap thingatpt docker-tramp
tramp-cache tramp tramp-compat tramp-loaddefs trampver ucs-normalize
shell pcomplete undo-tree diff cus-edit cus-start cus-load
jat-simple-gui jat-time time jat-modeline spaceline-config
spaceline-segments minibuffer-line spaceline powerline
powerline-separators powerline-themes minions dash jat-theme
doom-themes-org doom-tomorrow-night-theme doom-themes doom-themes-common
jat-fonts jat-disabled-functions deferred subr-x jat-mail jat-gnus
gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc
nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader
wid-edit jat-bbdb bbdb-mua bbdb-com crm bbdb bbdb-site timezone jat-smtp
starttls message rmc puny rfc822 mml mml-sec gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader smtpmail sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils rainbow-mode color free-keys
wgrep grep compile comint ansi-color highlight-numbers parent-mode s
server pinentry epa-file epa derived epg autorevert filenotify
company-quickhelp pos-tip company-oddmuse company-keywords company-etags
etags xref project ring company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-clang company-semantic company-eclim company-template
company-bbdb company pcase yasnippet flyspell ispell hi-lock whitespace
paren vlf vlf-base vlf-tune vlf-setup cl-extra help-mode diminish
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core elec-pair
finder-inf tex-site edmacro kmacro image-dired+ image-dired image-mode
format-spec dired dired-loaddefs cl advice rx info package easymenu
epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 694806 54778)
 (symbols 48 62375 2)
 (miscs 40 1737 244)
 (strings 32 153949 9421)
 (string-bytes 1 5075497)
 (vectors 16 108082)
 (vector-slots 8 1753701 20672)
 (floats 8 714 568)
 (intervals 56 1321 212)
 (buffers 992 17)
 (heap 1024 95291 10918))





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-10-29 18:52 bug#33195: 27.0.50; user-login-name has no group-login-name Jules Tamagnan
@ 2018-10-30 10:34 ` Eli Zaretskii
  2018-10-30 18:25   ` Jules Tamagnan
  2018-10-30 18:28   ` Jules Tamagnan
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2018-10-30 10:34 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 33195

> From: Jules Tamagnan <jtamagnan@gmail.com>
> Date: Mon, 29 Oct 2018 11:52:17 -0700
> 
> I've found it difficult to go from an integer group id to the name of
> that group. I've looked at the source for `user-login-name` and
> `system-groups` and could not find a way to do what I needed.
> 
> As such I think it would be great to add a function to do that.

Thanks.  Please allow me a few comments:

Please always provide a ChangeLog-style commit log message describing
your changes.  The file CONTRIBUTE has more about that.

> I'm unsure how to make an argument not be optional.

You want the argument NOT to be optional?  If so, make this:

> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 0, 1, 0,

say this instead:

> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 1, 1, 0,

See the node "Writing Emacs Primitives" in the ELisp manual, which
describes how to use the DEFUN macro.

> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 0, 1, 0,
> +       doc: /* If argument GID is an integer or a float, return the login name
> +of the group with that GID, or nil if there is no such GID.  */)
> +  (Lisp_Object gid)
> +{
> +  struct group *gr;
> +  gid_t id;
> +
> +  if (NILP (gid))
> +    return Qnil;

Wouldn't it be more useful to return user's group name when the
argument is nil or omitted?

Also, would you please write a couple of simple tests for this new
function?

Finally, this function should be announced in NEWS and documented in
the ELisp manual.





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-10-30 10:34 ` Eli Zaretskii
@ 2018-10-30 18:25   ` Jules Tamagnan
  2018-11-10 18:36     ` Glenn Morris
  2018-10-30 18:28   ` Jules Tamagnan
  1 sibling, 1 reply; 12+ messages in thread
From: Jules Tamagnan @ 2018-10-30 18:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33195

[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]


First off I want to say thank you for your review and your time

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Jules Tamagnan <jtamagnan@gmail.com>
>> Date: Mon, 29 Oct 2018 11:52:17 -0700
>>
>> I've found it difficult to go from an integer group id to the name of
>> that group. I've looked at the source for `user-login-name` and
>> `system-groups` and could not find a way to do what I needed.
>>
>> As such I think it would be great to add a function to do that.
>
> Thanks.  Please allow me a few comments:
>
> Please always provide a ChangeLog-style commit log message describing
> your changes.  The file CONTRIBUTE has more about that.
>
>> I'm unsure how to make an argument not be optional.
>
> You want the argument NOT to be optional?  If so, make this:
>
>> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 0, 1, 0,
>
> say this instead:
>
>> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 1, 1, 0,
>
> See the node "Writing Emacs Primitives" in the ELisp manual, which
> describes how to use the DEFUN macro.

Turns out there is a word for not optional... required :)

>> +DEFUN ("group-name", Fgroup_name, Sgroup_name, 0, 1, 0,
>> +       doc: /* If argument GID is an integer or a float, return the login name
>> +of the group with that GID, or nil if there is no such GID.  */)
>> +  (Lisp_Object gid)
>> +{
>> +  struct group *gr;
>> +  gid_t id;
>> +
>> +  if (NILP (gid))
>> +    return Qnil;
>
> Wouldn't it be more useful to return user's group name when the
> argument is nil or omitted?

I always thought that user could have many groups, for example if I run

    $ groups $(id -un)

I get a long list of groups. I'm not sure if I misunderstood your
statement or the desired behavior but for the moment I think a separate
function would be best for this. Or maybe the `system-groups` function
could be modified to take in a UID and then list groups for that UID,
then if no argument is passed in, it would return the full list of
system-groups as it does now.

> Also, would you please write a couple of simple tests for this new
> function?

I've tried my hand at writing a test for this but am dubious it will
pass on all machines, I believe it should work on gnu/linux

> Finally, this function should be announced in NEWS and documented in
> the ELisp manual.

I've added a short entry in NEWS under "Lisp Changes in Emacs 27.1" and
in os.texi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch --]
[-- Type: text/x-diff, Size: 2932 bytes --]

From 671c8b55d80743a13d6fda99f5181558cd56eea6 Mon Sep 17 00:00:00 2001
From: Jules Tamagnan <jtamagnan@gmail.com>
Date: Tue, 30 Oct 2018 10:22:03 -0700
Subject: [PATCH] src/editfns.c (group-name): New function.

---
 doc/lispref/os.texi       |  5 +++++
 etc/NEWS                  |  3 +++
 src/editfns.c             | 16 ++++++++++++++++
 test/src/editfns-tests.el |  7 +++++++
 4 files changed, 31 insertions(+)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index cb33757..dc32958 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1230,6 +1230,11 @@ User Identification
 return value is @code{nil}.
 @end defun
 
+@defun user-login-name &optional gid
+This runction returns the group name that corresponds to @var{gid},
+or @code{nil} if there is no such group.
+@end defun
+
 
 @node Time of Day
 @section Time of Day
diff --git a/etc/NEWS b/etc/NEWS
index 226ae1e..a0bcbb5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1228,6 +1228,9 @@ where there's no better alternative.  We believe that the incorrect
 uses of this function all but disappeared by now, so we are
 un-obsoleting it.
 
++++
+** New function 'group-name' returns a group name based on a group-GID
+
 \f
 * Changes in Emacs 27.1 on Non-Free Operating Systems
 
diff --git a/src/editfns.c b/src/editfns.c
index e995b38..15a0fa7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1143,6 +1143,21 @@ of the user with that uid, or nil if there is no such user.  */)
   return (pw ? build_string (pw->pw_name) : Qnil);
 }
 
+DEFUN ("group-name", Fgroup_name, Sgroup_name, 1, 1, 0,
+       doc: /* If argument GID is an integer or a float, return the login name
+of the group with that gid, or nil if there is no such GID.  */)
+  (Lisp_Object gid)
+{
+  struct group *gr;
+  gid_t id;
+
+  CONS_TO_INTEGER (gid, gid_t, id);
+  block_input ();
+  gr = getgrgid (id);
+  unblock_input ();
+  return (gr ? build_string (gr->gr_name) : Qnil);
+}
+
 DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name,
        0, 0, 0,
        doc: /* Return the name of the user's real uid, as a string.
@@ -4487,6 +4502,7 @@ it to be non-nil.  */);
   defsubr (&Sinsert_byte);
 
   defsubr (&Suser_login_name);
+  defsubr (&Sgroup_name);
   defsubr (&Suser_real_login_name);
   defsubr (&Suser_uid);
   defsubr (&Suser_real_uid);
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 17b2c51..6ee0ab0 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -351,4 +351,11 @@ transpose-test-get-byte-positions
     (should (equal (format "%-#50.40x" v3)
                    "-0x000000003ffffffffffffffe000000000000000        "))))
 
+(ert-deftest group-name ()
+  (let ((list `((0 . "root")
+                (1000 . ,(user-login-name 1000))
+                (1212345 . nil))))
+    (dolist (test list)
+      (should (equal (group-name (car test)) (cdr test))))))
+
 ;;; editfns-tests.el ends here
-- 
2.7.4


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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-10-30 10:34 ` Eli Zaretskii
  2018-10-30 18:25   ` Jules Tamagnan
@ 2018-10-30 18:28   ` Jules Tamagnan
  2018-11-10  9:24     ` Eli Zaretskii
  1 sibling, 1 reply; 12+ messages in thread
From: Jules Tamagnan @ 2018-10-30 18:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33195

[-- Attachment #1: Type: text/plain, Size: 94 bytes --]

I noticed that I had marked GID as optional in the manual, below is a
patch with that fixed.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch-2 --]
[-- Type: text/x-diff, Size: 2922 bytes --]

From 5c67d0177ba14428e6e3f5acdaf34c2be7ee93be Mon Sep 17 00:00:00 2001
From: Jules Tamagnan <jtamagnan@gmail.com>
Date: Tue, 30 Oct 2018 10:22:03 -0700
Subject: [PATCH] src/editfns.c (group-name): New function.

---
 doc/lispref/os.texi       |  5 +++++
 etc/NEWS                  |  3 +++
 src/editfns.c             | 16 ++++++++++++++++
 test/src/editfns-tests.el |  7 +++++++
 4 files changed, 31 insertions(+)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index cb33757..6d1b3f3 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1230,6 +1230,11 @@ User Identification
 return value is @code{nil}.
 @end defun
 
+@defun user-login-name gid
+This runction returns the group name that corresponds to @var{gid},
+or @code{nil} if there is no such group.
+@end defun
+
 
 @node Time of Day
 @section Time of Day
diff --git a/etc/NEWS b/etc/NEWS
index 226ae1e..a0bcbb5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1228,6 +1228,9 @@ where there's no better alternative.  We believe that the incorrect
 uses of this function all but disappeared by now, so we are
 un-obsoleting it.
 
++++
+** New function 'group-name' returns a group name based on a group-GID
+
 \f
 * Changes in Emacs 27.1 on Non-Free Operating Systems
 
diff --git a/src/editfns.c b/src/editfns.c
index e995b38..15a0fa7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1143,6 +1143,21 @@ of the user with that uid, or nil if there is no such user.  */)
   return (pw ? build_string (pw->pw_name) : Qnil);
 }
 
+DEFUN ("group-name", Fgroup_name, Sgroup_name, 1, 1, 0,
+       doc: /* If argument GID is an integer or a float, return the login name
+of the group with that gid, or nil if there is no such GID.  */)
+  (Lisp_Object gid)
+{
+  struct group *gr;
+  gid_t id;
+
+  CONS_TO_INTEGER (gid, gid_t, id);
+  block_input ();
+  gr = getgrgid (id);
+  unblock_input ();
+  return (gr ? build_string (gr->gr_name) : Qnil);
+}
+
 DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name,
        0, 0, 0,
        doc: /* Return the name of the user's real uid, as a string.
@@ -4487,6 +4502,7 @@ it to be non-nil.  */);
   defsubr (&Sinsert_byte);
 
   defsubr (&Suser_login_name);
+  defsubr (&Sgroup_name);
   defsubr (&Suser_real_login_name);
   defsubr (&Suser_uid);
   defsubr (&Suser_real_uid);
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 17b2c51..6ee0ab0 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -351,4 +351,11 @@ transpose-test-get-byte-positions
     (should (equal (format "%-#50.40x" v3)
                    "-0x000000003ffffffffffffffe000000000000000        "))))
 
+(ert-deftest group-name ()
+  (let ((list `((0 . "root")
+                (1000 . ,(user-login-name 1000))
+                (1212345 . nil))))
+    (dolist (test list)
+      (should (equal (group-name (car test)) (cdr test))))))
+
 ;;; editfns-tests.el ends here
-- 
2.7.4


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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-10-30 18:28   ` Jules Tamagnan
@ 2018-11-10  9:24     ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2018-11-10  9:24 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 33195-done

> From: Jules Tamagnan <jtamagnan@gmail.com>
> Cc: 33195@debbugs.gnu.org
> Date: Tue, 30 Oct 2018 11:28:16 -0700
> 
> I noticed that I had marked GID as optional in the manual, below is a
> patch with that fixed.

Thanks, I pushed this to the master branch, and I'm closing the bug
report.

Please note the following nits for the future:

 . Please include a ChangeLog-style commit log message, which names
   all the new/modified functions and nodes in the manuals.
 . Arguments to functions should be tested for validity, to avoid
   crashes if called with invalid arguments.
 . The first line a of a doc string should be a complete sentence
   shorter than 80 characters, so it fits on a single screen line, and
   it should mention all the mandatory arguments of the function.





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-10-30 18:25   ` Jules Tamagnan
@ 2018-11-10 18:36     ` Glenn Morris
  2018-11-10 18:49       ` Glenn Morris
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Glenn Morris @ 2018-11-10 18:36 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 33195

Jules Tamagnan wrote:

> I've tried my hand at writing a test for this but am dubious it will
> pass on all machines, I believe it should work on gnu/linux
[...]
> +(ert-deftest group-name ()
> +  (let ((list `((0 . "root")
> +                (1000 . ,(user-login-name 1000))
> +                (1212345 . nil))))
> +    (dolist (test list)
> +      (should (equal (group-name (car test)) (cdr test))))))

This assumes that user 1000's primary group is the same as their login name.
This is not at all guaranteed, so I will remove it.
Eg it fails for me on rhel 7.5, and also on hydra.nixos.org, ref
https://hydra.nixos.org/eval/1488740

I guess that UID 0 is always the root group, but I wouldn't swear to it.
The 1212345 thing relies on UID 1212345 not existing.
It seems to me that this is fragile too.
So all in all, I'm not sure this test is very useful.





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 18:36     ` Glenn Morris
@ 2018-11-10 18:49       ` Glenn Morris
  2018-11-10 19:00         ` Jules Tamagnan
  2018-11-10 19:15       ` Eli Zaretskii
  2018-11-10 21:02       ` Andreas Schwab
  2 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2018-11-10 18:49 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 33195

Glenn Morris wrote:

> This assumes that user 1000's primary group is the same as their login name.

Correction, it assumes gid 1000 exists and has the same name as uid 1000
has user name. Anyway, neither of these need be true.






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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 18:49       ` Glenn Morris
@ 2018-11-10 19:00         ` Jules Tamagnan
  2018-11-10 19:12           ` Glenn Morris
  0 siblings, 1 reply; 12+ messages in thread
From: Jules Tamagnan @ 2018-11-10 19:00 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33195

Glenn Morris <rgm@gnu.org> writes:

> Glenn Morris wrote:
>
>> This assumes that user 1000's primary group is the same as their login name.
>
> Correction, it assumes gid 1000 exists and has the same name as uid 1000
> has user name. Anyway, neither of these need be true.

Hi Glenn, I totally agree with removing that test. I was very unsure
about how to test this change but it was my best effort. I would have
been surprised if it had worked on all machines. Thank you for dealing
with the fallout of my change and I'm sorry for any inconvenience.

Best,
Jules





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 19:00         ` Jules Tamagnan
@ 2018-11-10 19:12           ` Glenn Morris
  0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2018-11-10 19:12 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 33195


No worries!

I think a better test might be something like checking for equality of:

Emacs: (group-name (group-gid))
shell: getent group GID | cut -d: -f1
 if and only if the latter returns non-zero





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 18:36     ` Glenn Morris
  2018-11-10 18:49       ` Glenn Morris
@ 2018-11-10 19:15       ` Eli Zaretskii
  2018-11-10 21:02       ` Andreas Schwab
  2 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2018-11-10 19:15 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33195, jtamagnan

> From: Glenn Morris <rgm@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  33195@debbugs.gnu.org
> Date: Sat, 10 Nov 2018 13:36:47 -0500
> 
> Jules Tamagnan wrote:
> 
> > I've tried my hand at writing a test for this but am dubious it will
> > pass on all machines, I believe it should work on gnu/linux
> [...]
> > +(ert-deftest group-name ()
> > +  (let ((list `((0 . "root")
> > +                (1000 . ,(user-login-name 1000))
> > +                (1212345 . nil))))
> > +    (dolist (test list)
> > +      (should (equal (group-name (car test)) (cdr test))))))
> 
> This assumes that user 1000's primary group is the same as their login name.
> This is not at all guaranteed, so I will remove it.
> Eg it fails for me on rhel 7.5, and also on hydra.nixos.org, ref
> https://hydra.nixos.org/eval/1488740
> 
> I guess that UID 0 is always the root group, but I wouldn't swear to it.
> The 1212345 thing relies on UID 1212345 not existing.
> It seems to me that this is fragile too.
> So all in all, I'm not sure this test is very useful.

Maybe all platforms should use the same code as MS-Windows for this
test, then.





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 18:36     ` Glenn Morris
  2018-11-10 18:49       ` Glenn Morris
  2018-11-10 19:15       ` Eli Zaretskii
@ 2018-11-10 21:02       ` Andreas Schwab
  2018-11-11  3:17         ` Glenn Morris
  2 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2018-11-10 21:02 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33195, Jules Tamagnan

On Nov 10 2018, Glenn Morris <rgm@gnu.org> wrote:

> I guess that UID 0 is always the root group, but I wouldn't swear to it.

GID 0 is typically called wheel on BSD.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





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

* bug#33195: 27.0.50; user-login-name has no group-login-name
  2018-11-10 21:02       ` Andreas Schwab
@ 2018-11-11  3:17         ` Glenn Morris
  0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2018-11-11  3:17 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 33195, Jules Tamagnan

Andreas Schwab wrote:

> On Nov 10 2018, Glenn Morris <rgm@gnu.org> wrote:
>
>> I guess that UID 0 is always the root group, but I wouldn't swear to it.
>
> GID 0 is typically called wheel on BSD.

Thanks for the info. I hope I've made this test more portable in c30f24d03d.





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

end of thread, other threads:[~2018-11-11  3:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 18:52 bug#33195: 27.0.50; user-login-name has no group-login-name Jules Tamagnan
2018-10-30 10:34 ` Eli Zaretskii
2018-10-30 18:25   ` Jules Tamagnan
2018-11-10 18:36     ` Glenn Morris
2018-11-10 18:49       ` Glenn Morris
2018-11-10 19:00         ` Jules Tamagnan
2018-11-10 19:12           ` Glenn Morris
2018-11-10 19:15       ` Eli Zaretskii
2018-11-10 21:02       ` Andreas Schwab
2018-11-11  3:17         ` Glenn Morris
2018-10-30 18:28   ` Jules Tamagnan
2018-11-10  9:24     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).