From: Alex Schroeder Date: Mon, 28 Jun 2021 05:44:29 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/patch_cache-gemini-page-links' into main X-Git-Tag: v3.0.0~22^2~34 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=04e86074f82969f0e99036bbc801aede48bcd86c;p=elpher.git Merge remote-tracking branch 'upstream/patch_cache-gemini-page-links' into main --- 04e86074f82969f0e99036bbc801aede48bcd86c diff --cc elpher.el index 64ec7ca,8230377..66fa275 --- a/elpher.el +++ b/elpher.el @@@ -1,18 -1,6 +1,19 @@@ ;;; elpher.el --- A friendly gopher and gemini client -*- lexical-binding:t -*- -;; Copyright (C) 2019-2020 Tim Vaughan +;; Copyright (C) 2021 Jens Östlund +;; Copyright (C) 2021 F. Jason Park +;; Copyright (C) 2021 Christopher Brannon +;; Copyright (C) 2021 Omar Polo +;; Copyright (C) 2021 Noodles! +;; Copyright (C) 2020-2021 Alex Schroeder ++;; Copyright (C) 2020 Alexis +;; Copyright (C) 2020 Étienne Deparis +;; Copyright (C) 2020 Simon Nicolussi +;; Copyright (C) 2020 Michel Alexandre Salim +;; Copyright (C) 2020 Koushk Roy +;; Copyright (C) 2020 Vee +;; Copyright (C) 2020 Simon South +;; Copyright (C) 2019-2020 Tim Vaughan ;; Author: Tim Vaughan ;; Created: 11 April 2019 @@@ -212,11 -187,11 +222,16 @@@ This can be useful when browsing from some servers which do not support IPv6 can take a long time to time-out." :type '(boolean)) +(defcustom elpher-socks-always nil + "If non-nil, elpher will establish network connections over a SOCKS proxy. +Otherwise, the SOCKS proxy is only used for connections to onion services." + :type '(boolean)) + + (defcustom elpher-gemini-number-links nil + "If non-nil, number links in gemini pages when rendering. + Links can be accessed by pressing `v' ('visit') followed by the link number." + :type '(boolean)) + ;; Face customizations (defgroup elpher-faces nil @@@ -501,15 -468,20 +516,20 @@@ unless NO-HISTORY is non-nil. (equal (elpher-page-address elpher-current-page) (elpher-page-address page))) (push elpher-current-page elpher-history)) - (setq elpher-current-page page) + (setq-local elpher-current-page page) (let* ((address (elpher-page-address page)) (type (elpher-address-type address)) - (type-record (cdr (assoc type elpher-type-map)))) + (type-record (cdr (assoc type elpher-type-map))) + (page-links nil)) (if type-record - (funcall (car type-record) - (if renderer - renderer - (cadr type-record))) + (progn + (funcall (car type-record) + (if renderer + renderer + (cadr type-record))) + (setq page-links (gethash address elpher--gemini-page-links-cache)) + (if page-links + (setq elpher--gemini-page-links page-links))) (elpher-visit-previous-page) (pcase type (`(gopher ,type-char)