This patch fixes some grammatical issues in ol-info (mostly missing
articles). See
https://lists.gnu.org/archive/html/emacs-orgmode/2025-09/msg00105.html
for context.

>From 4e1f51f9c5f1709fe8cdacd2bdf473ae4ffd53ec Mon Sep 17 00:00:00 2001
From: Steven Allen <[email protected]>
Date: Wed, 17 Sep 2025 17:13:51 -0700
Subject: [PATCH] ; Fix grammar and improve ol-info documentation

* lisp/ol-info.el:
(org-info--link-file-node):
(org-info-description-as-command):
(org-info-map-html-url):
(org-info--expand-node-name): Fix grammar and improve wording of
docstrings.
---
 lisp/ol-info.el | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/lisp/ol-info.el b/lisp/ol-info.el
index cd797d551..7363510a2 100644
--- a/lisp/ol-info.el
+++ b/lisp/ol-info.el
@@ -68,11 +68,12 @@ defun org-info-open
   (org-info-follow-link path))
 
 (defun org-info--link-file-node (path)
-  "Extract file name and node from info link PATH.
+  "Extract the file name and info node from the info link PATH.
 
-Return cons consisting of file name and node name or \"Top\" if node
-part is not specified.  Components may be separated by \":\" or by \"#\".
-File may be a virtual one, see `Info-virtual-files'."
+Return a cons consisting of the file name and node name or \"Top\" if
+the node part is not specified.  Components may be separated by \":\"
+or by \"#\".  The file name may be a virtual one, see
+`Info-virtual-files'."
   (if (not path)
       '("dir" . "Top")
     (string-match "\\`\\([^#:]*\\)\\(?:[#:]:?\\(.*\\)\\)?\\'" path)
@@ -84,7 +85,7 @@ defun org-info--link-file-node
        (if (org-string-nw-p node) (org-trim node) "Top")))))
 
 (defun org-info-description-as-command (link desc)
-  "Info link description that can be pasted as command.
+  "Return an info link description that can be evaluated as a command.
 
 For the following LINK
 
@@ -99,8 +100,8 @@ defun org-info-description-as-command
 in Emacs.
 
 Calling convention is similar to `org-link-make-description-function'.
-DESC has higher priority and returned when it is not nil or empty string.
-If LINK is not an info link then DESC is returned."
+DESC has higher priority and returned when it is both non-nil and
+non-empty.  If LINK is not an info link, DESC is returned."
   (let* ((prefix "info:")
          (need-file-node (and (not (org-string-nw-p desc))
                               (string-prefix-p prefix link))))
@@ -152,11 +153,12 @@ defcustom org-info-other-documents
   :safe #'listp)
 
 (defun org-info-map-html-url (filename)
-  "Return URL or HTML file associated to Info FILENAME.
-If FILENAME refers to an official GNU document, return a URL pointing to
-the official page for that document, e.g., use \"gnu.org\" for all Emacs
-related documents.  Otherwise, append \".html\" extension to FILENAME.
-See `org-info-emacs-documents' and `org-info-other-documents' for details."
+  "Return the URL or HTML file associated with the Info FILENAME.
+If FILENAME refers to an official GNU document, return the URL of the
+official page for that document, e.g., use \"gnu.org\" for all Emacs
+related documents.  Otherwise, append \".html\" to the FILENAME.  See
+`org-info-emacs-documents' and `org-info-other-documents' for
+details."
   (cond ((cdr (assoc filename org-info-other-documents)))
         ((member filename org-info-emacs-documents)
          (format "https://www.gnu.org/software/emacs/manual/html_mono/%s.html";
@@ -164,7 +166,7 @@ defun org-info-map-html-url
         (t (concat filename ".html"))))
 
 (defun org-info--expand-node-name (node)
-  "Expand Info NODE to HTML cross reference."
+  "Expand the Info NODE to an HTML cross reference."
   ;; See (info "(texinfo) HTML Xref Node Name Expansion") for the
   ;; expansion rule.
   (let ((node (replace-regexp-in-string
-- 
2.51.0

Reply via email to