Prefer HTTPS in `M-x webjump´

* lisp/net/webjump.el (webjump-url-fix): Prefer HTTPS to HTTP.
(webjump-sites): Document the above change.
(webjump-sample-sites): Change some links to HTTP only.
This commit is contained in:
Stefan Kangas 2023-10-25 12:27:31 +02:00
parent 5e451b8b30
commit 8fef7150d6
2 changed files with 14 additions and 4 deletions

View file

@ -922,6 +922,14 @@ When this is non-nil, the lines of key sequences are displayed with
the most recent line first. This is can be useful when working with
macros with many lines, such as from 'kmacro-edit-lossage'.
** Miscellaneous
---
*** Webjump now assumes URIs are HTTPS instead of HTTP.
For links in 'webjump-sites' without an explicit URI scheme, it was
previously assumed that they should be prefixed with "http://". Such
URIs are now prefixed with "https://" instead.
* New Modes and Packages in Emacs 30.1

View file

@ -123,7 +123,7 @@ external browser like IceCat."
;; Misc. general interest.
("National Weather Service" . webjump-to-iwin)
("Usenet FAQs" .
"www.faqs.org/faqs/")
"http://www.faqs.org/faqs/")
("RTFM Usenet FAQs by Group" .
"ftp://rtfm.mit.edu/pub/usenet-by-group/")
("RTFM Usenet FAQs by Hierarchy" .
@ -132,7 +132,7 @@ external browser like IceCat."
;; Computer social issues, privacy, professionalism.
("Association for Computing Machinery" . "www.acm.org")
("Computer Professionals for Social Responsibility" . "www.cpsr.org")
("Computer Professionals for Social Responsibility" . "http://www.cpsr.org")
("Electronic Frontier Foundation" . "www.eff.org")
("IEEE Computer Society" . "www.computer.org")
("Risks Digest" . webjump-to-risks)
@ -194,7 +194,7 @@ If the symbol of a function is given, then the function will be called with the
Web site name (the one you specified in the CAR of the alist cell) as a
parameter. This might come in handy for various kludges.
For convenience, if the `http://', `ftp://', or `file://' prefix is missing
For convenience, if the `https://', `ftp://', or `file://' prefix is missing
from a URL, WebJump will make a guess at what you wanted and prepend it before
submitting the URL."
:type '(alist :key-type (string :tag "Name")
@ -369,9 +369,11 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
((string-match "^[a-zA-Z]+:" url) url)
((string-match "^/" url) (concat "file://" url))
((string-match "^\\([^\\./]+\\)" url)
;; FIXME: ftp.gnu.org and many others now prefer HTTPS instead
;; of FTP. Does this heuristic make sense these days?
(concat (if (string= (downcase (match-string 1 url)) "ftp")
"ftp"
"http")
"https")
"://"
url))
(t url)))))