X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;ds=sidebyside;f=elpher.el;h=eaa112391db2d32f83cb536aef3f272c8af85e82;hb=e24ed079befa8284c02ec9cb53231a2d70e66a4b;hp=acb7083e3ceff81a814b5b7d821fc76a7db643ad;hpb=c0ff9d26c2e5cf62ade93852e7eb8a0f081bf028;p=elpher.git diff --git a/elpher.el b/elpher.el index acb7083..eaa1123 100644 --- a/elpher.el +++ b/elpher.el @@ -88,7 +88,7 @@ (gemini elpher-get-gemini-node elpher-render-gemini "gem" elpher-gemini) (telnet elpher-get-telnet-node nil "tel" elpher-telnet) (other-url elpher-get-other-url-node nil "url" elpher-other-url) - ((special bookmarks) elpher-get-bookmarks-node nil) + ((special bookmarks) elpher-get-bookmarks-node nil "/" elpher-index) ((special start) elpher-get-start-node nil)) "Association list from types to getters, renderers, margin codes and index faces.") @@ -426,11 +426,13 @@ unless PRESERVE-PARENT is non-nil." (if elpher-use-header (let* ((display-string (elpher-node-display-string elpher-current-node)) (address (elpher-node-address elpher-current-node)) - (url-string (if (elpher-address-special-p address) - "" - (concat " - " (elpher-address-to-url address) ""))) - (header (replace-regexp-in-string "%" "%%" (concat display-string - url-string)))) + (tls-string (if (and (not (elpher-address-special-p address)) + (member (elpher-address-protocol address) + '("gophers" "gemini"))) + " [TLS encryption]" + "")) + (header (concat display-string + (propertize tls-string 'face 'bold)))) (setq header-line-format header)))) (defmacro elpher-with-clean-buffer (&rest args) @@ -594,7 +596,9 @@ once they are retrieved from the gopher server." (defun elpher-node-button-help (node) "Return a string containing the help text for a button corresponding to NODE." (let ((address (elpher-node-address node))) - (format "mouse-1, RET: open '%s'" (elpher-address-to-url address)))) + (format "mouse-1, RET: open '%s'" (if (elpher-address-special-p address) + address + (elpher-address-to-url address))))) (defun elpher-insert-index-record (display-string &optional address) "Function to insert an index record into the current buffer. @@ -654,7 +658,7 @@ If ADDRESS is not supplied or nil the record is rendered as an (insert string) (goto-char (point-min)) (while (re-search-forward elpher-url-regex nil t) - (let ((node (elpher-make-node (match-string 0) + (let ((node (elpher-make-node (substring-no-properties (match-string 0)) (elpher-address-from-url (match-string 0))))) (make-text-button (match-beginning 0) (match-end 0) @@ -779,6 +783,7 @@ The response is stored in the variable ‘elpher-gemini-response’." (error "Cannot establish gemini connection: GnuTLS not available") (condition-case the-error (let* ((kill-buffer-query-functions nil) + (network-security-level 'medium) (proc (open-network-stream "elpher-process" nil (elpher-address-host address) @@ -1049,6 +1054,9 @@ For instance, the filename /a/b/../c/./d will reduce to /a/c/d" "Alternatively, select the following item and enter some search terms:\n") (elpher-insert-index-record "Veronica-2 Gopher Search Engine" (elpher-make-gopher-address ?7 "/v2/vs" "gopher.floodgap.com" 70)) + (insert "\n" + "This page contains your bookmarked sites (also visit with B):\n") + (elpher-insert-index-record "Your Bookmarks" 'bookmarks) (insert "\n" "** Refer to the ") (let ((help-string "RET,mouse-1: Open Elpher info manual (if available)"))