Function: finger
finger is an autoloaded, interactive and byte-compiled function
defined in net-utils.el.gz.
Signature
(finger USER HOST)
Documentation
Finger USER on HOST.
This command uses finger-X.500-host-regexps
and network-connection-service-alist, which see.
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/net-utils.el.gz
;; Finger protocol
;;;###autoload
(defun finger (user host)
"Finger USER on HOST.
This command uses `finger-X.500-host-regexps'
and `network-connection-service-alist', which see."
;; One of those great interactive statements that's actually
;; longer than the function call! The idea is that if the user
;; uses a string like "pbreton@cs.umb.edu", we won't ask for the
;; host name. If we don't see an "@", we'll prompt for the host.
(interactive
(let* ((answer (let ((default (ffap-url-at-point)))
(read-string (format-prompt "Finger User" default) nil nil default)))
(index (string-match (regexp-quote "@") answer)))
(if index
(list (substring answer 0 index)
(substring answer (1+ index)))
(list answer
(let ((default (ffap-machine-at-point)))
(read-string (format-prompt "At Host" default) nil nil default))))))
(let* ((user-and-host (concat user "@" host))
(process-name (concat "Finger [" user-and-host "]"))
(regexps finger-X.500-host-regexps)
) ;; found
(when regexps
(while (not (string-match (car regexps) host))
(setq regexps (cdr regexps)))
(when regexps
(setq user-and-host user)))
(run-network-program
process-name
host
(cdr (assoc 'finger network-connection-service-alist))
user-and-host)))