From: Stefan Kangas Date: Wed, 25 Oct 2023 10:27:31 +0000 (+0200) Subject: Prefer HTTPS in `M-x webjump´ X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fef7150d6be20b1a2154d501f75bee4977328b5;p=emacs.git 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. --- diff --git a/etc/NEWS b/etc/NEWS index 29744d3ad77..746d4a8a3df 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index b377d0798ed..77f00578a48 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -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)))))