From b1cd1595dff16e712654895200dfd64e7ebe47c1 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Wed, 8 Jan 2020 16:13:49 -0800 Subject: [PATCH 1/3] org-manual: Use ol-man.el in "Adding Hyperlink Types" doc/org-manual.org (Adding Hyperlink Types): Update the name of the example file from org-man.el to ol-man.el to reflect the renaming of files related to Org links. I found this thoroughly confusing when trying to (require 'org-man) since it was clearly referenced as being in "contrib/", hopefully this change will prevent anyone else from encountering the same confusion. --- doc/org-manual.org | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 22c2a9fb6..f9437976c 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19695,10 +19695,11 @@ process of adding Org links to Unix man pages, which look like this : [[man:printf][The printf manual]] #+texinfo: @noindent -The following =org-man.el= file implements it +The following =ol-man.el= file implements it #+begin_src emacs-lisp -;;; org-man.el - Support for links to man pages in Org mode +;;; ol-man.el - Support for links to man pages in Org mode +(require 'ol) (require 'org) (org-link-set-parameters "man" @@ -19741,8 +19742,8 @@ The following =org-man.el= file implements it (`ascii (format "%s (%s)" desc path)) (t path)))) -(provide 'org-man) -;;; org-man.el ends here +(provide ol-man) +;;; ol-man.el ends here #+end_src #+texinfo: @noindent @@ -19750,13 +19751,15 @@ To activate links to man pages in Org, enter this in the Emacs init file: #+begin_src emacs-lisp -(require 'org-man) +(require 'ol-man) #+end_src #+texinfo: @noindent -A review of =org-man.el=: +A review of =ol-man.el=: + +1. First, =(require 'ol)= ensures that =ol.el= is loaded and + =(require 'org)= ensures =org.el= is loaded. -1. First, =(require 'org)= ensures =org.el= is loaded. 2. From 5f47639ec3dc795f559a9809f504a132422d18a3 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 9 Jan 2020 17:48:12 +0100 Subject: [PATCH 2/3] ol-man: Silence byte-compiler --- contrib/lisp/ol-man.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/lisp/ol-man.el b/contrib/lisp/ol-man.el index cdbf47131..fce70110f 100644 --- a/contrib/lisp/ol-man.el +++ b/contrib/lisp/ol-man.el @@ -24,7 +24,6 @@ ;;; Commentary: (require 'ol) -(require 'org) (org-link-set-parameters "man" :follow #'org-man-open @@ -48,7 +47,7 @@ PATH should be a topic that can be thrown at the man command." (let* ((page (org-man-get-page-name)) (link (concat "man:" page)) (description (format "Manpage for %s" page))) - (org-store-link-props + (org-link-store-props :type "man" :link link :description description)))) From 2c598d7499e16caae660068d2b6b5c6f9baa21dd Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 9 Jan 2020 17:49:15 +0100 Subject: [PATCH 3/3] org-manual: Update "ol-man.el" example * doc/org-manual.org (Adding Hyperlink Types): Remove unnecessary (require 'org) in example and fix function name. --- doc/org-manual.org | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index f9437976c..4b1df8e9d 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19700,7 +19700,6 @@ The following =ol-man.el= file implements it #+begin_src emacs-lisp ;;; ol-man.el - Support for links to man pages in Org mode (require 'ol) -(require 'org) (org-link-set-parameters "man" :follow org-man-command @@ -19719,7 +19718,7 @@ The following =ol-man.el= file implements it (let* ((page (org-man-get-page-name)) (link (concat "man:" page)) (description (format "Man page for %s" page))) - (org-store-link-props + (org-link-store-props :type "man" :link link :description description)))) @@ -19757,9 +19756,7 @@ file: #+texinfo: @noindent A review of =ol-man.el=: -1. First, =(require 'ol)= ensures that =ol.el= is loaded and - =(require 'org)= ensures =org.el= is loaded. - +1. First, =(require 'ol)= ensures that =ol.el= is loaded. 2.