]> git.eshelyaron.com Git - emacs.git/commitdiff
Add more text-based browser alternatives
authorStefan Kangas <stefankangas@gmail.com>
Fri, 3 Jan 2025 16:32:58 +0000 (17:32 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:56:26 +0000 (21:56 +0100)
* lisp/net/browse-url.el (browse-url-text-browser): Add more
alternatives.

(cherry picked from commit e0b4e9ece907ca86410835d2cd374917830eabae)

lisp/net/browse-url.el

index 9f322e6df88c60e0111d50455614e2c5a6817263..1a0612bba89c82e331daa813a3fab5759e43a89b 100644 (file)
@@ -481,10 +481,14 @@ You might want to set this to somewhere with restricted read permissions
 for privacy's sake."
   :type 'string)
 
-(defcustom browse-url-text-browser "lynx"
+(defcustom browse-url-text-browser
+  (cond ((executable-find "lynx") "lynx")
+        ((executable-find "links") "links")
+        ((executable-find "elinks") "elinks")
+        ("lynx"))
   "The name of the text browser to invoke."
   :type 'string
-  :version "23.1")
+  :version "31.1")
 
 (defcustom browse-url-text-emacs-args (and (not window-system)
                                           '("-show_cursor"))