Function: org-texinfo--format-entries

org-texinfo--format-entries is a byte-compiled function defined in ox-texinfo.el.gz.

Signature

(org-texinfo--format-entries ENTRIES INFO)

Documentation

Format all direct menu entries in SCOPE, as a string.

SCOPE is either a headline or a full Org document. INFO is a plist containing contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
(defun org-texinfo--format-entries (entries info)
  "Format all direct menu entries in SCOPE, as a string.
SCOPE is either a headline or a full Org document.  INFO is
a plist containing contextual information."
  (org-element-normalize-string
   (mapconcat
    (lambda (h)
      (let* ((title
	      ;; Colons are used as a separator between title and node
	      ;; name.  Remove them.
	      (replace-regexp-in-string
	       "[ \t]*:+" ""
	       (org-texinfo--sanitize-title
		(org-export-get-alt-title h info) info)))
	     (node (org-texinfo--get-node h info))
	     (entry (concat "* " title ":"
			    (if (string= title node) ":"
			      (concat " " node ". "))))
	     (desc (org-element-property :DESCRIPTION h)))
	(if (not desc) entry
	  (format (format "%%-%ds %%s" org-texinfo-node-description-column)
		  entry desc))))
    entries "\n")))