From 63c02666888c7bb7efe1afa70f12b9d53108a5c0 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Tue, 16 Jan 2018 18:42:57 +0000 Subject: [PATCH] Update URLs in source code or tests TINYCHANGE --- lisp/org-element.el | 6 ++-- lisp/org-protocol.el | 6 ++-- testing/lisp/test-ob-tangle.el | 4 +-- testing/lisp/test-org-clock.el | 16 +++++------ testing/lisp/test-org-colview.el | 2 +- testing/lisp/test-org-element.el | 46 +++++++++++++++---------------- testing/lisp/test-org-feed.el | 4 +-- testing/lisp/test-org-footnote.el | 2 +- testing/lisp/test-org.el | 12 ++++---- testing/lisp/test-ox.el | 16 +++++------ 10 files changed, 57 insertions(+), 57 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index c6e576cfb..c39195aa9 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3065,7 +3065,7 @@ Assume point is at the beginning of the link." (setq path (match-string-no-properties 1)) (setq contents-begin (match-beginning 1)) (setq contents-end (match-end 1))) - ;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]] + ;; Type 2: Standard link, i.e. [[https://orgmode.org][homepage]] ((looking-at org-bracket-link-regexp) (setq format 'bracket) (setq contents-begin (match-beginning 3)) @@ -3114,14 +3114,14 @@ Assume point is at the beginning of the link." (t (setq type "fuzzy") (setq path raw-link)))) - ;; Type 3: Plain link, e.g., http://orgmode.org + ;; Type 3: Plain link, e.g., https://orgmode.org ((looking-at org-plain-link-re) (setq format 'plain) (setq raw-link (match-string-no-properties 0)) (setq type (match-string-no-properties 1)) (setq link-end (match-end 0)) (setq path (match-string-no-properties 2))) - ;; Type 4: Angular link, e.g., . Unlike to + ;; Type 4: Angular link, e.g., . Unlike to ;; bracket links, follow RFC 3986 and remove any extra ;; whitespace in URI. ((looking-at org-angle-link-re) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 3cbbc78dc..a0e2e4228 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -184,10 +184,10 @@ Possible properties are: Example: (setq org-protocol-project-alist - \\='((\"http://orgmode.org/worg/\" + \\='((\"https://orgmode.org/worg/\" :online-suffix \".php\" :working-suffix \".org\" - :base-url \"http://orgmode.org/worg/\" + :base-url \"https://orgmode.org/worg/\" :working-directory \"/home/user/org/Worg/\") (\"http://localhost/org-notes/\" :online-suffix \".html\" @@ -688,7 +688,7 @@ the cdr of an element in `org-publish-project-alist', reuse (let ((working-dir (expand-file-name (or (plist-get project-plist :base-directory) default-directory))) - (base-url "http://orgmode.org/worg/") + (base-url "https://orgmode.org/worg/") (strip-suffix (or (plist-get project-plist :html-extension) ".html")) (working-suffix (if (plist-get project-plist :base-extension) (concat "." (plist-get project-plist :base-extension)) diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el index 73b75323e..560cc6c56 100644 --- a/testing/lisp/test-ob-tangle.el +++ b/testing/lisp/test-ob-tangle.el @@ -82,9 +82,9 @@ "Test commenting of links at left margin." (should (string-match - (regexp-quote "# [[http://orgmode.org][Org mode]]") + (regexp-quote "# [[https://orgmode.org][Org mode]]") (org-test-with-temp-text-in-file - "[[http://orgmode.org][Org mode]] + "[[https://orgmode.org][Org mode]] #+header: :comments org :tangle \"test-ob-tangle.sh\" #+begin_src sh echo 1 diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el index 1388c50df..6300be856 100644 --- a/testing/lisp/test-org-clock.el +++ b/testing/lisp/test-org-clock.el @@ -640,20 +640,20 @@ CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00" |--------------+---------| | *Total time* | *26:00* | |--------------+---------| -| [[Foo %5B%5Bhttp://orgmode.org%5D%5BOrg mode%5D%5D][Foo Org mode]] | 26:00 |" +| [[Foo %5B%5Bhttps://orgmode.org%5D%5BOrg mode%5D%5D][Foo Org mode]] | 26:00 |" (org-test-with-temp-text - "* Foo [[http://orgmode.org][Org mode]] + "* Foo [[https://orgmode.org][Org mode]] CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00" (test-org-clock-clocktable-contents ":link t")))) (should (equal - "| Headline | Time | -|------------------------+---------| -| *Total time* | *26:00* | -|------------------------+---------| -| [[Foo %5B%5Bhttp://orgmode.org%5D%5D][Foo http://orgmode.org]] | 26:00 |" + "| Headline | Time | +|-------------------------+---------| +| *Total time* | *26:00* | +|-------------------------+---------| +| [[Foo %5B%5Bhttps://orgmode.org%5D%5D][Foo https://orgmode.org]] | 26:00 |" (org-test-with-temp-text - "* Foo [[http://orgmode.org]] + "* Foo [[https://orgmode.org]] CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00" (test-org-clock-clocktable-contents ":link t"))))) diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el index 5e1fe560b..15d26bb2c 100644 --- a/testing/lisp/test-org-colview.el +++ b/testing/lisp/test-org-colview.el @@ -143,7 +143,7 @@ (should (equal '("* [123]" . 7) - (org-test-with-temp-text "* [[http://orgmode.org][123]]" + (org-test-with-temp-text "* [[https://orgmode.org][123]]" (let ((org-columns-default-format "%ITEM")) (org-columns)) (cons (get-char-property (point) 'org-columns-value-modified) (aref org-columns-current-maxwidths 0))))) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 7c359aabc..6deb3812b 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1697,14 +1697,14 @@ e^{i\\pi}+1=0 (should (equal '("Orgmode.org") - (org-test-with-temp-text "[[http://orgmode.org][Orgmode.org]]" + (org-test-with-temp-text "[[https://orgmode.org][Orgmode.org]]" (org-element-contents (org-element-map (org-element-parse-buffer) 'link 'identity nil t))))) ;; ... without description. (should (equal - "http" - (org-test-with-temp-text "[[http://orgmode.org]]" + "https" + (org-test-with-temp-text "[[https://orgmode.org]]" (org-element-property :type (org-element-map (org-element-parse-buffer) 'link 'identity nil t))))) @@ -1713,7 +1713,7 @@ e^{i\\pi}+1=0 (equal "//orgmode.org/worg" (org-test-with-temp-text "[[Org:worg]]" - (let ((org-link-abbrev-alist '(("Org" . "http://orgmode.org/")))) + (let ((org-link-abbrev-alist '(("Org" . "https://orgmode.org/")))) (org-element-property :path (org-element-map (org-element-parse-buffer) 'link 'identity nil t)))))) @@ -1721,7 +1721,7 @@ e^{i\\pi}+1=0 (should (equal "127.0.0.1" - (org-test-with-temp-text "[[http://orgmode.org]]" + (org-test-with-temp-text "[[https://orgmode.org]]" (let ((org-link-translation-function (lambda (type _) (cons type "127.0.0.1")))) (org-element-property @@ -1794,30 +1794,30 @@ e^{i\\pi}+1=0 (org-element-property :path (org-element-context))))) ;; Plain link. (should - (org-test-with-temp-text "A link: http://orgmode.org" + (org-test-with-temp-text "A link: https://orgmode.org" (org-element-map (org-element-parse-buffer) 'link 'identity))) ;; Angular link. Follow RFC 3986. (should (eq 'link - (org-test-with-temp-text "A link: " + (org-test-with-temp-text "A link: " (org-element-type (org-element-context))))) (should (equal "//orgmode.org" - (org-test-with-temp-text "A link: " + (org-test-with-temp-text "A link: " (org-element-property :path (org-element-context))))) ;; Link abbreviation. (should - (equal "http" + (equal "https" (org-test-with-temp-text - "#+LINK: orgmode http://www.orgmode.org/\n[[orgmode:#docs]]" + "#+LINK: orgmode https://www.orgmode.org/\n[[orgmode:#docs]]" (progn (org-mode-restart) (goto-char (1- (point-max))) (org-element-property :type (org-element-context)))))) ;; Link abbreviation in a secondary string. (should - (equal "http" + (equal "https" (org-test-with-temp-text - "#+LINK: orgmode http://www.orgmode.org/\n* H [[orgmode:#docs]]" + "#+LINK: orgmode https://www.orgmode.org/\n* H [[orgmode:#docs]]" (progn (org-mode-restart) (org-element-map (org-element-parse-buffer) 'link (lambda (link) (org-element-property :type link)) @@ -3100,15 +3100,15 @@ DEADLINE: <2012-03-29 thu.> SCHEDULED: <2012-03-29 thu.> CLOSED: [2012-03-29 thu (org-test-parse-and-interpret "a radio-target")) "a radio-target\n")) ;; Links without description. - (should (equal (org-test-parse-and-interpret "[[http://orgmode.org]]") - "[[http://orgmode.org]]\n")) + (should (equal (org-test-parse-and-interpret "[[https://orgmode.org]]") + "[[https://orgmode.org]]\n")) ;; Links with a description, even one containing a link. (should (equal (org-test-parse-and-interpret - "[[http://orgmode.org][Org mode]]") - "[[http://orgmode.org][Org mode]]\n")) + "[[https://orgmode.org][Org mode]]") + "[[https://orgmode.org][Org mode]]\n")) (should (equal (org-test-parse-and-interpret - "[[http://orgmode.org][http://orgmode.org]]") - "[[http://orgmode.org][http://orgmode.org]]\n")) + "[[https://orgmode.org][https://orgmode.org]]") + "[[https://orgmode.org][https://orgmode.org]]\n")) ;; File links. (should (equal (org-test-parse-and-interpret "[[file+emacs:todo.org]]") @@ -3123,11 +3123,11 @@ DEADLINE: <2012-03-29 thu.> SCHEDULED: <2012-03-29 thu.> CLOSED: [2012-03-29 thu ;; Code-ref links. (should (equal (org-test-parse-and-interpret "[[(ref)]]") "[[(ref)]]\n")) ;; Plain links. - (should (equal (org-test-parse-and-interpret "http://orgmode.org") - "http://orgmode.org\n")) + (should (equal (org-test-parse-and-interpret "https://orgmode.org") + "https://orgmode.org\n")) ;; Angular links. - (should (equal (org-test-parse-and-interpret "") - "\n")) + (should (equal (org-test-parse-and-interpret "") + "\n")) ;; Pathological case: link with a %-sign in description. (should (equal (org-test-parse-and-interpret "[[file://path][%s]]") "[[file://path][%s]]\n"))) @@ -3550,7 +3550,7 @@ Text ;; Special case: objects in inline footnotes. (should (eq 'link - (org-test-with-temp-text "[fn::[[http://orgmode.org]]]" + (org-test-with-temp-text "[fn::[[https://orgmode.org]]]" (org-element-type (org-element-context))))) ;; Special case: tags looking like a link. (should-not diff --git a/testing/lisp/test-org-feed.el b/testing/lisp/test-org-feed.el index d28abb990..52689673c 100644 --- a/testing/lisp/test-org-feed.el +++ b/testing/lisp/test-org-feed.el @@ -37,8 +37,8 @@ (org-feed-format-entry nil "%(concat \"success\" \"!\")" nil))) ;; %a placeholder. (should - (equal "[[http://orgmode.org]]\n" - (org-feed-format-entry '(:link "http://orgmode.org") "%a" nil))) + (equal "[[https://orgmode.org]]\n" + (org-feed-format-entry '(:link "https://orgmode.org") "%a" nil))) ;; %t and %T placeholders. (should (equal (format-time-string (org-time-stamp-format nil nil)) diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el index b2347cb97..d23d44ae3 100644 --- a/testing/lisp/test-org-footnote.el +++ b/testing/lisp/test-org-footnote.el @@ -74,7 +74,7 @@ (let ((org-footnote-auto-label t)) (org-footnote-new)) (buffer-string)))) (should-error - (org-test-with-temp-text " [[http://orgmode.org][Org mode]]" + (org-test-with-temp-text " [[https://orgmode.org][Org mode]]" (org-footnote-new))) ;; Allow new footnotes in blank lines after an element or white ;; spaces after an object. diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index a102d5eda..17e7a223c 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -1795,12 +1795,12 @@ (should (equal '("Org") (org-test-with-temp-text - "* [[http://orgmode.org][Org]]\n** S" + "* [[https://orgmode.org][Org]]\n** S" (org-get-outline-path)))) (should - (equal '("http://orgmode.org") + (equal '("https://orgmode.org") (org-test-with-temp-text - "* [[http://orgmode.org]]\n** S" + "* [[https://orgmode.org]]\n** S" (org-get-outline-path)))) ;; When WITH-SELF is non-nil, include current heading. (should @@ -3221,12 +3221,12 @@ SCHEDULED: <2017-05-06 Sat> (progn (org-beginning-of-line) (looking-at-p "Item")))))) ;; Leave point before invisible characters at column 0. (should - (org-test-with-temp-text "[[http://orgmode.org]]" + (org-test-with-temp-text "[[https://orgmode.org]]" (let ((org-special-ctrl-a/e nil)) (org-beginning-of-line) (bolp)))) (should - (org-test-with-temp-text "[[http://orgmode.org]]" + (org-test-with-temp-text "[[https://orgmode.org]]" (let ((org-special-ctrl-a/e t)) (org-beginning-of-line) (bolp)))) @@ -3367,7 +3367,7 @@ SCHEDULED: <2017-05-06 Sat> (eobp)))) ;; Get past invisible characters at the end of line. (should - (org-test-with-temp-text "[[http://orgmode.org]]" + (org-test-with-temp-text "[[https://orgmode.org]]" (org-end-of-line) (eolp)))) diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 70d22a7a0..4832d178f 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -2835,19 +2835,19 @@ Para2" "Test `org-export-insert-image-links' specifications." (should-not (member "file" - (org-test-with-parsed-data "[[http://orgmode.org][file:image.png]]" + (org-test-with-parsed-data "[[https://orgmode.org][file:image.png]]" (org-element-map tree 'link (lambda (l) (org-element-property :type l)))))) (should (member "file" - (org-test-with-parsed-data "[[http://orgmode.org][file:image.png]]" + (org-test-with-parsed-data "[[https://orgmode.org][file:image.png]]" (org-element-map (org-export-insert-image-links tree info) 'link (lambda (l) (org-element-property :type l)))))) ;; Properly set `:parent' property when replace contents with image ;; link. (should (memq 'link - (org-test-with-parsed-data "[[http://orgmode.org][file:image.png]]" + (org-test-with-parsed-data "[[https://orgmode.org][file:image.png]]" (org-element-map (org-export-insert-image-links tree info) 'link (lambda (l) (org-element-type (org-element-property :parent l))))))) @@ -2855,12 +2855,12 @@ Para2" ;; images. (should-not (member "file" - (org-test-with-parsed-data "[[http://orgmode.org][file:image.xxx]]" + (org-test-with-parsed-data "[[https://orgmode.org][file:image.xxx]]" (org-element-map (org-export-insert-image-links tree info) 'link (lambda (l) (org-element-property :type l)))))) (should (member "file" - (org-test-with-parsed-data "[[http://orgmode.org][file:image.xxx]]" + (org-test-with-parsed-data "[[https://orgmode.org][file:image.xxx]]" (org-element-map (org-export-insert-image-links tree info '(("file" . "xxx"))) 'link @@ -4362,7 +4362,7 @@ Another text. (ref:text) ;; Replace plain links with contents, or with path. (should (equal "H Org mode\n" - (org-test-with-temp-text "* H [[http://orgmode.org][Org mode]]" + (org-test-with-temp-text "* H [[https://orgmode.org][Org mode]]" (let (org-export-registered-backends) (org-export-define-backend 'test '((headline . (lambda (h _c i) (org-export-data-with-backend @@ -4371,8 +4371,8 @@ Another text. (ref:text) i))))) (org-export-as 'test))))) (should - (equal "H http://orgmode.org\n" - (org-test-with-temp-text "* H [[http://orgmode.org]]" + (equal "H https://orgmode.org\n" + (org-test-with-temp-text "* H [[https://orgmode.org]]" (let (org-export-registered-backends) (org-export-define-backend 'test '((headline . (lambda (h _c i) (org-export-data-with-backend