Browse Source

ox-texinfo: Fix anchors for all elements and objects

* lisp/ox-texinfo.el (org-texinfo--get-node): Fix function, too strict
  about allowed types.  One can always fallback to
  `org-export-get-reference'.

Reported-by: wlharvey4@mac.com
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00274.html>
Nicolas Goaziou 2 months ago
parent
commit
fadc83d4fe
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lisp/ox-texinfo.el

+ 5 - 5
lisp/ox-texinfo.el

@@ -479,12 +479,12 @@ node or anchor name is unique."
 		    (org-texinfo--sanitize-title
 		     (org-export-get-alt-title datum info) info))
 		   (`radio-target
-		    (org-texinfo--sanitize-title
-		     (org-element-contents datum) info))
+		    (org-export-data (org-element-contents datum) info))
 		   (`target
-		    (org-export-data (org-element-property :value datum) info))
-		   (type
-		    (error "Cannot generate node name for type: %S" type)))))
+		    (org-element-property :value datum))
+		   (_
+		    (or (org-element-property :name datum)
+			(org-export-get-reference datum info))))))
 	       (name basename))
 	  ;; Org exports deeper elements before their parents.  If two
 	  ;; node names collide -- e.g., they have the same title --