summaryrefslogtreecommitdiff
path: root/devdocs/elisp/user-identification.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/user-identification.html')
-rw-r--r--devdocs/elisp/user-identification.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/devdocs/elisp/user-identification.html b/devdocs/elisp/user-identification.html
new file mode 100644
index 00000000..25829c03
--- /dev/null
+++ b/devdocs/elisp/user-identification.html
@@ -0,0 +1,36 @@
+ <h3 class="section">User Identification</h3> <dl> <dt id="init-file-user">Variable: <strong>init-file-user</strong>
+</dt> <dd>
+<p>This variable says which user’s init files should be used by Emacs—or <code>nil</code> if none. <code>""</code> stands for the user who originally logged in. The value reflects command-line options such as ‘<samp>-q</samp>’ or ‘<samp>-u <var>user</var></samp>’. </p> <p>Lisp packages that load files of customizations, or any other sort of user profile, should obey this variable in deciding where to find it. They should load the profile of the user name found in this variable. If <code>init-file-user</code> is <code>nil</code>, meaning that the ‘<samp>-q</samp>’, ‘<samp>-Q</samp>’, or ‘<samp>-batch</samp>’ option was used, then Lisp packages should not load any customization files or user profile. </p>
+</dd>
+</dl> <dl> <dt id="user-mail-address">User Option: <strong>user-mail-address</strong>
+</dt> <dd><p>This holds the email address of the user who is using Emacs. </p></dd>
+</dl> <dl> <dt id="user-login-name">Function: <strong>user-login-name</strong> <em>&amp;optional uid</em>
+</dt> <dd>
+<p>This function returns the name under which the user is logged in. It uses the environment variables <code>LOGNAME</code> or <code>USER</code> if either is set. Otherwise, the value is based on the effective <acronym>UID</acronym>, not the real <acronym>UID</acronym>. </p> <p>If you specify <var>uid</var> (a number), the result is the user name that corresponds to <var>uid</var>, or <code>nil</code> if there is no such user. </p>
+</dd>
+</dl> <dl> <dt id="user-real-login-name">Function: <strong>user-real-login-name</strong>
+</dt> <dd><p>This function returns the user name corresponding to Emacs’s real <acronym>UID</acronym>. This ignores the effective <acronym>UID</acronym>, and the environment variables <code>LOGNAME</code> and <code>USER</code>. </p></dd>
+</dl> <dl> <dt id="user-full-name">Function: <strong>user-full-name</strong> <em>&amp;optional uid</em>
+</dt> <dd>
+<p>This function returns the full name of the logged-in user—or the value of the environment variable <code>NAME</code>, if that is set. </p> <p>If the Emacs process’s user-id does not correspond to any known user (and provided <code>NAME</code> is not set), the result is <code>"unknown"</code>. </p> <p>If <var>uid</var> is non-<code>nil</code>, then it should be a number (a user-id) or a string (a login name). Then <code>user-full-name</code> returns the full name corresponding to that user-id or login name. If you specify a user-id or login name that isn’t defined, it returns <code>nil</code>. </p>
+</dd>
+</dl> <p>The symbols <code>user-login-name</code>, <code>user-real-login-name</code> and <code>user-full-name</code> are variables as well as functions. The functions return the same values that the variables hold. These variables allow you to fake out Emacs by telling the functions what to return. The variables are also useful for constructing frame titles (see <a href="frame-titles">Frame Titles</a>). </p> <dl> <dt id="user-real-uid">Function: <strong>user-real-uid</strong>
+</dt> <dd><p>This function returns the real <acronym>UID</acronym> of the user. </p></dd>
+</dl> <dl> <dt id="user-uid">Function: <strong>user-uid</strong>
+</dt> <dd><p>This function returns the effective <acronym>UID</acronym> of the user. </p></dd>
+</dl> <dl> <dt id="group-gid">Function: <strong>group-gid</strong>
+</dt> <dd><p>This function returns the effective <acronym>GID</acronym> of the Emacs process. </p></dd>
+</dl> <dl> <dt id="group-real-gid">Function: <strong>group-real-gid</strong>
+</dt> <dd><p>This function returns the real <acronym>GID</acronym> of the Emacs process. </p></dd>
+</dl> <dl> <dt id="system-users">Function: <strong>system-users</strong>
+</dt> <dd><p>This function returns a list of strings, listing the user names on the system. If Emacs cannot retrieve this information, the return value is a list containing just the value of <code>user-real-login-name</code>. </p></dd>
+</dl> <dl> <dt id="system-groups">Function: <strong>system-groups</strong>
+</dt> <dd><p>This function returns a list of strings, listing the names of user groups on the system. If Emacs cannot retrieve this information, the return value is <code>nil</code>. </p></dd>
+</dl> <dl> <dt id="group-name">Function: <strong>group-name</strong> <em>gid</em>
+</dt> <dd><p>This function returns the group name that corresponds to the numeric group ID <var>gid</var>, or <code>nil</code> if there is no such group. </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/User-Identification.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/User-Identification.html</a>
+ </p>
+</div>