Function: actypes::link-to-texinfo-node

actypes::link-to-texinfo-node is an interactive and byte-compiled function defined in hactypes.el.

Signature

(actypes::link-to-texinfo-node FILE NODE)

Documentation

Display the Texinfo FILE and NODE (a string).

FILE may be a string or nil, in which case the current buffer is used.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hactypes.el
(defact link-to-texinfo-node (file node)
  "Display the Texinfo FILE and NODE (a string).
FILE may be a string or nil, in which case the current buffer is used."
  (interactive "fTexinfo file to link to: \nsNode within file to link to: ")
  (if (stringp node)
      ;; Remove any tabs or newlines that might be in node name.
      (setq node (replace-regexp-in-string "[ \t\n\r\f]+" " " (string-trim node) t t))
    (setq node "Top"))
  (let (node-point)
    (when (equal file "hyperbole.texi")
      (setq file (expand-file-name file (hpath:expand "${hyperb:dir}/man/"))))
    (if file
        (set-buffer (find-file-noselect (hpath:substitute-value file)))
      (setq file (hypb:buffer-file-name)))
    (save-excursion
      (goto-char (point-min))
      (if (re-search-forward (format "^@node[ \t]+%s *[,\n\r]" node) nil t)
	  (setq node-point (match-beginning 0))
	(hypb:error "(link-to-texinfo-node): Non-existent node: \"%s%s\""
                    (if file
                        (format "(%s)" (file-name-nondirectory file))
                      "")
		    node)))
    (if file
        (hact 'link-to-file file node-point)
      (hypb:error "(link-to-texinfo-node): Non-existent node: \"%s\""
		  node))))