emacs/lisp/net
Jim Porter 0bb8a011d5 Add 'file-user-uid' to get the connection-local effective UID
In particular, this lets Eshell show a "#" root prompt sigil when the
user has sudo'ed via "cd /sudo::" (bug#60722).

* lisp/simple.el (file-user-uid): New function.

* lisp/net/tramp.el (tramp-file-name-for-operation): Add
'file-user-uid'.
(tramp-handle-file-user-uid): New function.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'file-user-uid'.

* lisp/net/tramp-archive.el (tramp-archive-handle-file-user-uid): New
function...
(tramp-archive-file-name-handler-alist): ... use it.

* lisp/eshell/em-prompt.el (eshell-prompt-function): Use
'file-user-uid'.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add '$UID'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/uid-var): New test.

* doc/lispref/os.texi (User Identification): Document 'file-user-uid'.

* doc/lispref/files.texi (Magic File Names): Mention 'file-user-uid'.

* doc/misc/eshell.texi (Variables): Document '$UID'.  Add a missing
index entry for '$INSIDE_EMACS'.

* etc/NEWS: Announce 'file-user-uid'.
2023-01-16 17:11:02 -08:00
..
ange-ftp.el Add remote-file-name-inhibit-delete-by-moving-to-trash 2023-01-08 19:24:17 +01:00
browse-url.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dbus.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dictionary-connection.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dictionary.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dig.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dns.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc-bob.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc-capf.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc-export.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc-hotlist.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc-vars.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-bbdb.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-ecomplete.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-ldap.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-mab.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-macos-contacts.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eudcb-mailabbrev.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eww.el Teach 'eww-open-file' about prefix argument 2023-01-14 11:48:55 +02:00
gnutls.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
goto-addr.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hmac-def.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hmac-md5.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
imap.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ldap.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mailcap.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mairix.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
net-utils.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
network-stream.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
newst-backend.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
newst-plainview.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
newst-reader.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
newst-ticker.el Run newsticker's ticker only periodically (bug#59856) 2023-01-16 09:20:11 +01:00
newst-treeview.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
newsticker.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
nsm.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ntlm.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pop3.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
puny.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rcirc.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
rfc2104.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl-cram.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl-digest.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl-ntlm.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl-scram-rfc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl-scram-sha256.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sasl.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
secrets.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shr-color.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shr.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sieve-manage.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sieve-mode.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sieve.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
snmp-mode.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
soap-client.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
soap-inspect.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
socks.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
telnet.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tramp-adb.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-archive.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-cache.el Remove Emacs 26 compatibility from Tramp 2023-01-06 13:34:33 +01:00
tramp-cmds.el Improve Tramp robustness 2023-01-15 18:49:37 +01:00
tramp-compat.el Upgrade to length* functions in Tramp 2023-01-15 17:50:17 +01:00
tramp-container.el Add new Tramp method "toolbox" 2023-01-07 12:14:26 +01:00
tramp-crypt.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-ftp.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tramp-fuse.el Add remote-file-name-inhibit-delete-by-moving-to-trash 2023-01-08 19:24:17 +01:00
tramp-gvfs.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-integration.el Remove Emacs 26 compatibility from Tramp 2023-01-06 13:34:33 +01:00
tramp-rclone.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-sh.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-smb.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-sshfs.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-sudoedit.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
tramp-uu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tramp.el Add 'file-user-uid' to get the connection-local effective UID 2023-01-16 17:11:02 -08:00
trampver.el Remove Emacs 26 compatibility from Tramp 2023-01-06 13:34:33 +01:00
webjump.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
zeroconf.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00