├── .gitignore ├── Makefile ├── README.md └── ox-texinfo+.el /.gitignore: -------------------------------------------------------------------------------- 1 | /*.elc 2 | /*-autoloads.el 3 | /.config.mk 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | -include .config.mk 2 | 3 | PKG = ox-texinfo+ 4 | 5 | ELS = $(PKG).el 6 | ELCS = $(ELS:.el=.elc) 7 | 8 | DEPS = org/lisp 9 | 10 | EMACS ?= emacs 11 | EMACS_ARGS ?= 12 | 13 | LOAD_PATH ?= $(addprefix -L ../,$(DEPS)) 14 | LOAD_PATH += -L . 15 | 16 | all: lisp 17 | 18 | help: 19 | $(info make all - generate byte-code and autoloads) 20 | $(info make lisp - generate byte-code and autoloads) 21 | $(info make clean - remove generated files) 22 | @printf "\n" 23 | 24 | lisp: $(ELCS) loaddefs 25 | 26 | loaddefs: $(PKG)-autoloads.el 27 | 28 | %.elc: %.el 29 | @printf "Compiling $<\n" 30 | @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $< 31 | 32 | CLEAN = $(ELCS) $(PKG)-autoloads.el 33 | 34 | clean: 35 | @printf "Cleaning...\n" 36 | @rm -rf $(CLEAN) 37 | 38 | define LOADDEFS_TMPL 39 | ;;; $(PKG)-autoloads.el --- automatically extracted autoloads 40 | ;; 41 | ;;; Code: 42 | (add-to-list 'load-path (directory-file-name \ 43 | (or (file-name-directory #$$) (car load-path)))) 44 | 45 | ;; Local Variables: 46 | ;; version-control: never 47 | ;; no-byte-compile: t 48 | ;; no-update-autoloads: t 49 | ;; End: 50 | ;;; $(PKG)-autoloads.el ends here 51 | endef 52 | export LOADDEFS_TMPL 53 | #' 54 | 55 | $(PKG)-autoloads.el: $(ELS) 56 | @printf "Generating $@\n" 57 | @printf "%s" "$$LOADDEFS_TMPL" > $@ 58 | @$(EMACS) -Q --batch --eval "(progn\ 59 | (setq make-backup-files nil)\ 60 | (setq vc-handled-backends nil)\ 61 | (setq default-directory (file-truename default-directory))\ 62 | (setq generated-autoload-file (expand-file-name \"$@\"))\ 63 | (setq find-file-visit-truename t)\ 64 | (update-directory-autoloads default-directory))" 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This package is going to be obsolete soon 2 | ========================================= 3 | 4 | If you create a new manual and are thinking about using `ox-texinfo+` in 5 | addition to `ox-texinfo`, then you should instead use the development version 6 | of Org. 7 | 8 | Org's `main` branch (which will be released as Org-9.6 eventually) contains 9 | an improved implementation of the main feature (1) of this package. It works 10 | basically the same as described below, but you now have to use a "description 11 | list", which essentially means that the first line of all its items have to 12 | end with ` ::`. For more information see the *Plain lists in Texinfo export* 13 | section in Org's info manual. 14 | 15 | I have also added support for automatic use the `@itemx` command where 16 | appropriate, which is described in the same section. 17 | 18 | The other features described below have not made it into the new, merged 19 | implementation. 20 | 21 | 1. The merged feature. 22 | 2. I now recommend using Org macros to add version strings and such. 23 | 3. This does not appear to be necessary anymore; if it ever was. 24 | 4. I would still like this behavior but think it should be implemented 25 | by patching `org-cycle`. I have heard rumors that that command is 26 | being rewritten, so I will wait until that is done, before teaching 27 | that function about my preferences. 28 | 29 | Extensions for Org's Texinfo exporter 30 | ===================================== 31 | 32 | This package provides some extensions for Org's `texinfo` exporter 33 | defined in `ox-texinfo`. 34 | 35 | 1. Create `@deffn` and similar definition items by writing list 36 | items in Org that look similar to what they will look like in 37 | Info. To enable this, add: 38 | 39 | ``` 40 | #+TEXINFO_DEFFN: t 41 | ``` 42 | 43 | to your Org file. After doing that, you can create definition 44 | items like so: 45 | 46 | ``` 47 | - Command: magit-section-show 48 | 49 | Show the body of the current section. 50 | 51 | - Function: magit-git-exit-code &rest args 52 | - Macro: magit-insert-section &rest args 53 | - Variable: magit-display-buffer-noselect 54 | - User Option: magit-display-buffer-function 55 | - Key: q, magit-mode-bury-buffer 56 | ``` 57 | 58 | 2. Optionally modify the Org file before exporting it. This is 59 | implemented using a hook that can be set using the `BIND` 60 | property: 61 | 62 | ``` 63 | #+BIND: ox-texinfo+-before-export-hook some-function 64 | #+BIND: ox-texinfo+-before-export-hook another-function 65 | ``` 66 | 67 | The function `ox-texinfo+-update-version-strings` is provided 68 | as an example. It makes some assumptions that might not be 69 | appropriate for your manuals, so you might have to define your 70 | own variant. 71 | 72 | 3. Fully respect the local value of `indent-tabs-mode` from the Org 73 | file when editing source blocks and exporting. This affects all 74 | source blocks and all exporters. 75 | 76 | I recommend you add this at the end of Org files to avoid 77 | strange indentation, at least with the `texinfo` exporter: 78 | 79 | ``` 80 | # Local Variables: 81 | # indent-tabs-mode: nil 82 | # End: 83 | ``` 84 | 85 | 4. Optionally dissolve certain headlines tilted "_" when using the 86 | `texinfo` exporter. This is useful when you want a headline's 87 | section to be collapsed when `org-cycle` reaches the CONTENTS 88 | state, just like the sections of sub-headlines are collapsed in 89 | that state, while in the export you do not want that sub-heading, 90 | which would be redundant outside of Org where similar visibility 91 | folding is not available. 92 | 93 | If the first child of a headline is a sub-headline titled "_", 94 | then the sub-headline is removed and its section is used as the 95 | section of the parent headline. 96 | 97 | I recommend that you enable this in individual Org files: 98 | 99 | ``` 100 | # Local Variables: 101 | # eval: (require 'ox-texinfo+ nil t) 102 | # org-texinfo+-dissolve-noexport-headlines: t 103 | # End: 104 | ``` 105 | -------------------------------------------------------------------------------- /ox-texinfo+.el: -------------------------------------------------------------------------------- 1 | ;;; ox-texinfo+.el --- [obsolete] Extensions for Org's Texinfo exporter -*- lexical-binding: t -*- 2 | 3 | ;; Copyright (C) 2012-2017 Free Software Foundation, Inc. 4 | ;; Copyright (C) 2015-2022 Jonas Bernoulli 5 | 6 | ;; Author: Jonas Bernoulli 7 | ;; Package-Requires: ((org "9.4")) 8 | ;; Homepage: https://github.com/tarsius/ox-texinfo-plus 9 | ;; Keywords: outlines, hypermedia, calendar, wp 10 | 11 | ;; SPDX-License-Identifier: GPL-3.0-or-later 12 | 13 | ;; This file is free software; you can redistribute it and/or modify 14 | ;; it under the terms of the GNU General Public License as published by 15 | ;; the Free Software Foundation; either version 3, or (at your option) 16 | ;; any later version. 17 | ;; 18 | ;; This file is distributed in the hope that it will be useful, 19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | ;; GNU General Public License for more details. 22 | ;; 23 | ;; For a full copy of the GNU General Public License 24 | ;; see . 25 | 26 | ;;; Commentary: 27 | 28 | ;; ***** This package is going to be obsolete soon. ***** 29 | ;; ***** Please see README.md for more information. ***** 30 | 31 | ;; This package provides some extensions for Org's `texinfo' exporter 32 | ;; defined in `ox-texinfo'. 33 | 34 | ;; 1. Create `@deffn' and similar definition items by writing list 35 | ;; items in Org that look similar to what they will look like in 36 | ;; Info. To enable this, add: 37 | ;; 38 | ;; #+TEXINFO_DEFFN: t 39 | ;; 40 | ;; to your Org file. After doing that, you can create definition 41 | ;; items like so: 42 | ;; 43 | ;; - Command: magit-section-show 44 | ;; 45 | ;; Show the body of the current section. 46 | ;; 47 | ;; - Function: magit-git-exit-code &rest args 48 | ;; - Macro: magit-insert-section &rest args 49 | ;; - Variable: magit-display-buffer-noselect 50 | ;; - User Option: magit-display-buffer-function 51 | ;; - Key: q, magit-mode-bury-buffer 52 | 53 | ;; 2. Optionally modify the Org file before exporting it. This is 54 | ;; implemented using a hook that can be set using the `BIND' 55 | ;; property: 56 | ;; 57 | ;; #+BIND: ox-texinfo+-before-export-hook some-function 58 | ;; #+BIND: ox-texinfo+-before-export-hook another-function 59 | ;; 60 | ;; The function `ox-texinfo+-update-version-strings' is provided 61 | ;; as an example. It makes some assumptions that might not be 62 | ;; appropriate for your manuals, so you might have to define your 63 | ;; own variant. 64 | 65 | ;; 3. Fully respect the local value of `indent-tabs-mode' from the Org 66 | ;; file when editing source blocks and exporting. This affects all 67 | ;; source blocks and all exporters. 68 | ;; 69 | ;; I recommend you add this at the end of Org files to avoid 70 | ;; strange indentation, at least with the `texinfo' exporter: 71 | ;; 72 | ;; # Local Variables: 73 | ;; # indent-tabs-mode: nil 74 | ;; # End: 75 | 76 | ;; 4. Optionally dissolve certain headlines tilted "_" when using the 77 | ;; `texinfo' exporter. This is useful when you want a headline's 78 | ;; section to be collapsed when `org-cycle' reaches the CONTENTS 79 | ;; state, just like the sections of sub-headlines are collapsed in 80 | ;; that state, while in the export you do not want that sub-heading, 81 | ;; which would be redundant outside of Org where similar visibility 82 | ;; folding is not available. 83 | ;; 84 | ;; If the first child of a headline is a sub-headline titled "_", 85 | ;; then the sub-headline is removed and its section is used as the 86 | ;; section of the parent headline. 87 | ;; 88 | ;; I recommend that you enable this in individual Org files: 89 | ;; 90 | ;; # Local Variables: 91 | ;; # eval: (require 'ox-texinfo+ nil t) 92 | ;; # org-texinfo+-dissolve-noexport-headlines: t 93 | ;; # End: 94 | 95 | ;;; Code: 96 | 97 | (require 'cl-lib) 98 | (require 'ox-texinfo) 99 | 100 | ;;; Definition Items 101 | 102 | (let* ((exporter (org-export-get-backend 'texinfo)) 103 | (options (org-export-backend-options exporter))) 104 | (unless (assoc :texinfo-deffn options) 105 | (setf (org-export-backend-options exporter) 106 | (cons '(:texinfo-deffn "TEXINFO_DEFFN" nil nil t) 107 | options)))) 108 | 109 | (defun org-texinfo-plain-list--ox-texinfo+ (fn plain-list contents info) 110 | "If TEXINFO_DEFFN is t, then maybe use a @deffn or similar item." 111 | (if (equal (plist-get info :texinfo-deffn) "t") 112 | (org-texinfo+-plain-list plain-list contents info) 113 | (funcall fn plain-list contents info))) 114 | (advice-add 'org-texinfo-plain-list :around 115 | 'org-texinfo-plain-list--ox-texinfo+) 116 | 117 | (defun org-texinfo-item--ox-texinfo+ (fn item contents info) 118 | "If TEXINFO_DEFFN is t, then maybe use a @deffn or similar item." 119 | (if (equal (plist-get info :texinfo-deffn) "t") 120 | (org-texinfo+-item item contents info) 121 | (funcall fn item contents info))) 122 | (advice-add 'org-texinfo-item :around 123 | 'org-texinfo-item--ox-texinfo+) 124 | 125 | (defconst org-texinfo+-item-regexp 126 | (format "\\`%s: \\(.*\\)\n" 127 | (regexp-opt '("deffn" ; CATEGORY NAME ARGUMENTS 128 | "Command" ; deffn Command NAME ARGUMENTS 129 | "defun" "Function" ; NAME ARGUMENTS 130 | "defmac" "Macro" ; NAME ARGUMENTS 131 | "defspec" ; NAME ARGUMENTS 132 | "defvr" ; CATEGORY NAME 133 | "defvar" "Variable" ; NAME 134 | "defopt" "User Option" ; NAME 135 | "Face" ; NAME 136 | "Key") ; KEY COMMAND 137 | t))) 138 | 139 | (defun org-texinfo+-get-list-type (item) 140 | (plist-get (cadr (plist-get (cadr item) :parent)) :previous-list-type)) 141 | 142 | (defun org-texinfo+-set-list-type (item value) 143 | (let ((parent (plist-get (cadr item) :parent))) 144 | (setf (cadr parent) 145 | (plist-put (cadr parent) :previous-list-type value)))) 146 | 147 | (defun org-texinfo+-maybe-begin-list (this type) 148 | (prog1 (pcase (list (org-texinfo+-get-list-type this) type) 149 | (`(list table) "@end itemize\n\n@table @asis\n") 150 | (`(,(or `nil `single) table) "@table @asis\n") 151 | (`(table list) "@end table\n\n@itemize\n") 152 | (`(,(or `nil `single) list) "@itemize\n")) 153 | (org-texinfo+-set-list-type this type))) 154 | 155 | (defun org-texinfo+-maybe-end-list (this type) 156 | (prog1 (pcase (list (if (eq (car this) 'item) 157 | (org-texinfo+-get-list-type this) 158 | (plist-get (cadr this) :previous-list-type)) 159 | type) 160 | (`(list ,_) "@end itemize\n\n") 161 | (`(table ,_) "@end table\n\n")) 162 | (org-texinfo+-set-list-type this type))) 163 | 164 | (defun org-texinfo+-plain-list (plain-list contents _info) 165 | (concat contents (org-texinfo+-maybe-end-list plain-list nil))) 166 | 167 | (defun org-texinfo+-item (item contents info) 168 | (if (let ((case-fold-search nil)) 169 | (string-match org-texinfo+-item-regexp contents)) 170 | (pcase (match-string 1 contents) 171 | ("Face" (org-texinfo+-face-item item contents info)) 172 | ("Key" (org-texinfo+-key-item item contents info)) 173 | (_ (org-texinfo+-def-item item contents info))) 174 | (let* ((plain-list (plist-get (cadr item) :parent)) 175 | (attr (org-export-read-attribute :attr_texinfo plain-list)) 176 | (indic (or (plist-get attr :indic) 177 | (plist-get info :texinfo-def-table-markup))) 178 | (type (org-element-property :type plain-list))) 179 | (concat (let ((str (org-texinfo+-maybe-begin-list 180 | item (if (equal type "table") 'table 'list)))) 181 | (if str 182 | (concat str (and (eq type 'descriptive) 183 | (concat " " indic))) 184 | "\n")) 185 | "@item\n" 186 | (let ((tag (org-element-property :tag item))) 187 | (and tag (concat " " (org-export-data tag info)))) 188 | contents)))) 189 | 190 | (defun org-texinfo+-face-item (item contents _info) 191 | (concat (org-texinfo+-maybe-begin-list item 'table) 192 | (format "@item @w{ }--- Face: %s\n%s" 193 | (match-string 2 contents) 194 | (substring contents (match-end 0))))) 195 | 196 | (defun org-texinfo+-key-item (item contents _info) 197 | (concat (org-texinfo+-maybe-begin-list item 'table) 198 | (let ((head (match-string 2 contents)) 199 | (body (substring contents (match-end 0)))) 200 | (if (string-match ", " head) 201 | (let ((key (substring head 0 (match-beginning 0))) 202 | (cmd (substring head (match-end 0)))) 203 | (format "\ 204 | @kindex %s 205 | @cindex %s 206 | @item @kbd{%s} @tie{}@tie{}@tie{}@tie{}(@code{%s}) 207 | %s" key cmd key cmd body)) 208 | (error "Bad Key item %s" head))))) 209 | 210 | (defun org-texinfo+-def-item (item contents _info) 211 | (let ((type (match-string 1 contents)) 212 | (head (match-string 2 contents)) 213 | (body (substring contents (match-end 0))) 214 | (prefix "")) 215 | (pcase type 216 | ("Command" 217 | (setq prefix (format "@cindex %s\n" head)) 218 | (setq type "deffn") 219 | (setq head (concat "Command " head))) 220 | ("Function" (setq type "defun")) 221 | ("Macro" (setq type "defmac")) 222 | ("Variable" (setq type "defvar")) 223 | ("User Option" (setq type "defopt"))) 224 | (format "%s%s@%s %s\n%s@end %s\n\n" 225 | (or (org-texinfo+-maybe-end-list item 'single) "") 226 | prefix type head body type))) 227 | 228 | ;;; Before Export Hook 229 | 230 | (defvar ox-texinfo+--before-export-hook nil) 231 | 232 | (defun ox-texinfo+--before-export-hook (&rest _ignored) 233 | "Run the hook `ox-texinfo+--before-export-hook'." 234 | (let ((ox-texinfo+--before-export-hook 235 | (cl-mapcan (pcase-lambda (`(,var ,val)) 236 | (and (eq var 'ox-texinfo+-before-export-hook) 237 | (list val))) 238 | (let ((org-export-allow-bind-keywords t)) 239 | (org-export--list-bound-variables))))) 240 | (run-hooks 'ox-texinfo+--before-export-hook))) 241 | 242 | (advice-add 'org-texinfo-export-to-info :before 'ox-texinfo+--before-export-hook) 243 | (advice-add 'org-texinfo-export-to-texinfo :before 'ox-texinfo+--before-export-hook) 244 | 245 | (defun ox-texinfo+-update-copyright-years () 246 | "Update copyright years in the current buffer. 247 | How the copyright years are located and formatted is hard-coded, 248 | so you might have to write your own version of this function." 249 | (let ((year (format-time-string "%Y")) 250 | (years "\\(\\([0-9]\\{4\\}\\)\\(?:-\\([0-9]\\{4\\}\\)\\)?\\)")) 251 | (cl-flet ((bump (re) 252 | (goto-char (point-min)) 253 | (while (re-search-forward (concat re years) nil t) 254 | (if (match-end 3) 255 | (replace-match year t t nil 3) 256 | (replace-match (concat (match-string 2) "-" year) 257 | t t nil 1))))) 258 | (save-excursion 259 | (bump "^#\\+DATE: ") 260 | (bump "^Copyright (C) ")))) 261 | (save-buffer)) 262 | 263 | (defun ox-texinfo+-update-version-strings () 264 | "Update version strings in the current buffer. 265 | How the version strings are located and formatted is hard-coded, 266 | so you might have to write your own version of this function." 267 | (interactive) 268 | (let ((desc (ox-texinfo+-get-version 'mixed nil t))) 269 | (save-excursion 270 | (goto-char (point-min)) 271 | (when (re-search-forward "^#\\+SUBTITLE: for version \\(.+\\)" nil t) 272 | (replace-match desc t t nil 1)) 273 | (when (re-search-forward "^This manual is for [^ ]+ version \\(.+\\)" nil t) 274 | (replace-match (concat desc ".") t t nil 1))) 275 | (save-buffer) 276 | (when noninteractive 277 | (message "Generating %s.texi" 278 | (file-name-sans-extension 279 | (file-name-nondirectory buffer-file-name)))))) 280 | 281 | (defun ox-texinfo+-get-version (&optional style no-trim verbose rev) 282 | (let* ((force (and noninteractive (getenv "VERSION"))) 283 | (amend (and noninteractive (getenv "AMEND"))) 284 | (rev (or rev (if amend "HEAD~" "HEAD"))) 285 | (exact (ox-texinfo+--describe-revision rev "--exact-match")) 286 | (tag (ox-texinfo+--describe-revision rev "--abbrev=0")) 287 | (raw (ox-texinfo+--describe-revision rev)) 288 | (always (ox-texinfo+--describe-revision rev "--always")) 289 | (version 290 | (or force 291 | exact 292 | (and tag 293 | (pcase style 294 | ((or 'raw 'nil) (concat raw "+1")) 295 | ('tag tag) 296 | ((or 'count (pred stringp)) 297 | (format "%s%s%s" tag 298 | (if (stringp style) style "+") 299 | (if (string-match "-\\([0-9]+\\)" raw) 300 | (1+ (string-to-number (match-string 1 raw))) 301 | 1))) 302 | ('mixed (format "%s (%s+1)" tag raw)) 303 | (_ (error "Unknown ox-texinfo+-get-version style: %s" 304 | style)))))) 305 | (version 306 | (cond (version 307 | (if (and (not no-trim) 308 | (string-match "\\`[^0-9]+" version)) 309 | (substring version (match-end 0)) 310 | version)) 311 | (always) 312 | (t (error "No such revision: %s" rev))))) 313 | (when verbose 314 | (message "Setting version in %s to %s%s" 315 | (file-name-nondirectory buffer-file-name) 316 | version 317 | (cond (force " [for release]") 318 | (amend " [for amend]") 319 | (t "")))) 320 | version)) 321 | 322 | (defun ox-texinfo+--describe-revision (rev &rest args) 323 | (with-temp-buffer 324 | (and (zerop (apply #'call-process "git" nil (current-buffer) nil 325 | "describe" "--tags" (append args (list rev)))) 326 | (progn (goto-char (point-min)) 327 | (buffer-substring-no-properties 328 | (line-beginning-position) 329 | (line-end-position)))))) 330 | 331 | ;;; Untabify 332 | 333 | (defun org-export-to--ox-texinfo+-disable-indent-tabs-mode 334 | (fn backend file-or-buffer 335 | &optional async subtreep visible-only body-only ext-plist post-process) 336 | "Fix handling of `indent-tabs-mode'." 337 | (let ((saved-indent-tabs-mode (default-value 'indent-tabs-mode))) 338 | (setq-default indent-tabs-mode indent-tabs-mode) 339 | (unwind-protect 340 | (funcall fn backend file-or-buffer 341 | async subtreep visible-only body-only ext-plist post-process) 342 | (setq-default indent-tabs-mode saved-indent-tabs-mode)))) 343 | 344 | (advice-add 'org-export-to-file :around 345 | 'org-export-to--ox-texinfo+-disable-indent-tabs-mode) 346 | (advice-add 'org-export-to-buffer :around 347 | 'org-export-to--ox-texinfo+-disable-indent-tabs-mode) 348 | 349 | (defun org-src-mode--ox-texinfo+-maybe-disable-indent-tabs-mode () 350 | "Fix handling of `indent-tabs-mode'." 351 | (when (= org-src--tab-width 0) 352 | (setq indent-tabs-mode nil))) 353 | 354 | (add-hook 'org-src-mode-hook 355 | 'org-src-mode--ox-texinfo+-maybe-disable-indent-tabs-mode) 356 | 357 | ;;; Dissolvable Headlines 358 | 359 | (defvar-local org-texinfo+-dissolve-noexport-headlines nil 360 | "Whether to dissolve certain headlines titled \"_\".") 361 | 362 | ;;;###autoload (put 'org-texinfo+-dissolve-noexport-headlines 363 | ;;;###autoload 'safe-local-variable #'booleanp) 364 | ;;;###autoload (cl-pushnew '(require 'ox-texinfo+ nil t) safe-local-eval-forms) 365 | 366 | (cl-pushnew 'org-texinfo+--dissolve-noexport-headlines 367 | org-export-filter-parse-tree-functions) 368 | 369 | (defun org-texinfo+--dissolve-noexport-headlines (tree backend info) 370 | (when (and (eq backend 'texinfo) org-texinfo+-dissolve-noexport-headlines) 371 | (org-element-map tree 'headline 372 | (lambda (headline) 373 | (let ((contents (org-element-contents headline))) 374 | (when contents 375 | (pcase-let ((`(,s ,h) (org-element-map contents '(section headline) 376 | #'identity info))) 377 | ;; `org-texinfo--normalize-headlines' runs before this 378 | ;; function and adds an empty section `s', which we have 379 | ;; to remove again or we get two identical menus at the 380 | ;; beginning and end of the final exported section. 381 | ;; Likewise after some `texinfo' mangling, if the outer 382 | ;; headline has properties, then we get an emtpy 383 | ;; section, which we have to remove. 384 | (when (and (equal (org-element-type s) 'section) 385 | (or (not (org-element-property :begin s)) 386 | (= (length (org-element-contents s)) 0)) 387 | (equal (org-element-type h) 'headline) 388 | (equal (org-element-property :raw-value h) "_")) 389 | (org-element-set-element h (car (org-element-contents h))) 390 | (org-element-extract-element s)))))) 391 | info)) 392 | tree) 393 | 394 | ;;; ox-texinfo+.el ends soon 395 | (provide 'ox-texinfo+) 396 | ;; Local Variables: 397 | ;; indent-tabs-mode: nil 398 | ;; End: 399 | ;;; ox-texinfo+.el ends here 400 | --------------------------------------------------------------------------------