diff --git a/README.md b/README.md index b7ce402..8b5e0bb 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,6 @@ Finger, born at Stanford in 1971, is arguably the first social network: your who ``` .plan — l back · n/p next/prev · g refresh · q quit -random@happynetbox.com -────────────────────── - Emily Carter Marine biologist. Coffee, kayaks and old maps. @@ -73,7 +70,7 @@ Back from sampling on the coast. Three jars of plankton to review. - **Asynchronous connections**: connections use `:nowait`, so Emacs never freezes even when a host resolves but never answers on port 79 (the common case today). - **Connection timeout**: a stalled connection is abandoned after `efinger-connection-timeout` seconds with a clear message, instead of hanging. - **Graceful errors**: refused or timed-out connections are reported in the content pane, never as a backtrace. -- **One-off finger**: `M-x efinger-finger` fingers a single `user@host` in its own buffer. +- **One-off finger**: `M-x efinger-finger` fingers a single `user@host` in its own buffer, showing the server reply raw, with no title header. - **Configurable layout**: list on the left and content on the right (`horizontal`), or list on top and content below (`vertical`). - **Ports and listing**: targets accept an optional `:port`; omitting the user (`host` or `@host`) asks the server to list every user. - **UTF-8**: replies are decoded as UTF-8, so accents and box drawing render correctly. diff --git a/efinger.el b/efinger.el index 1d33b67..d7c6594 100644 --- a/efinger.el +++ b/efinger.el @@ -4,7 +4,7 @@ ;; Author: Andros Fenollosa ;; Maintainer: Andros Fenollosa -;; Version: 0.1.0 +;; Version: 1.0.0 ;; Package-Requires: ((emacs "28.1")) ;; Keywords: comm ;; URL: https://git.andros.dev/andros/efinger.el @@ -287,8 +287,10 @@ Emacs never blocks while the handshake is retried." #'efinger--timeout process))) process)) -(defun efinger--start (buffer account) - "Finger ACCOUNT and render the reply into BUFFER." +(defun efinger--start (buffer account &optional raw) + "Finger ACCOUNT and render the reply into BUFFER. +When RAW is non-nil, stream the reply verbatim without the title +header, so the buffer shows exactly what the server sent." (with-current-buffer buffer (when (process-live-p efinger--owner) (efinger--cancel-timer efinger--owner) @@ -297,8 +299,9 @@ Emacs never blocks while the handshake is retried." (let ((inhibit-read-only t) (title (efinger--account-title account))) (erase-buffer) - (insert (propertize title 'face 'efinger-header-face) "\n") - (insert (make-string (max 12 (length title)) ?─) "\n\n") + (unless raw + (insert (propertize title 'face 'efinger-header-face) "\n") + (insert (make-string (max 12 (length title)) ?─) "\n\n")) (setq efinger--received nil) (setq efinger--body-start (copy-marker (point))) (insert (propertize "Fingering…" 'face 'efinger-status-face)) @@ -528,7 +531,7 @@ Emacs never blocks while the handshake is retried." (with-current-buffer buffer (unless (derived-mode-p 'efinger-plan-mode) (efinger-plan-mode))) - (efinger--start buffer account) + (efinger--start buffer account t) (pop-to-buffer buffer))) (provide 'efinger)