;;; elpher.el --- A friendly gopher and gemini client -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2020 Tim Vaughan
+;; Copyright (C) 2021 Jens Östlund <jostlund@gmail.com>
+;; Copyright (C) 2021 F. Jason Park <jp@neverwas.me>
+;; Copyright (C) 2021 Christopher Brannon <chris@the-brannons.com>
+;; Copyright (C) 2021 Omar Polo <op@omarpolo.com>
+;; Copyright (C) 2021 Noodles! <nnoodle@chiru.no>
+;; Copyright (C) 2020-2021 Alex Schroeder <alex@gnu.org>
++;; Copyright (C) 2020 Alexis <flexibeast@gmail.com>
+;; Copyright (C) 2020 Étienne Deparis <etienne@depar.is>
+;; Copyright (C) 2020 Simon Nicolussi <sinic@sinic.name>
+;; Copyright (C) 2020 Michel Alexandre Salim <michel@michel-slm.name>
+;; Copyright (C) 2020 Koushk Roy <kroy@twilio.com>
+;; Copyright (C) 2020 Vee <vee@vnsf.xyz>
+;; Copyright (C) 2020 Simon South <simon@simonsouth.net>
+;; Copyright (C) 2019-2020 Tim Vaughan <plugd@thelambdalab.xyz>
;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
;; Created: 11 April 2019
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
(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)