emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Need some help in customizing ox-texinfo
Date: Fri, 18 Dec 2015 22:37:19 +0100	[thread overview]
Message-ID: <87d1u3moa8.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87bn9nn9rq.fsf@gmail.com> (Oleh Krehel's message of "Fri, 18 Dec 2015 14:53:13 +0100")

Hello,

Oleh Krehel <ohwoeowho@gmail.com> writes:

> I'm exporting an Org-mode document to Texinfo currently, but I'm having
> an inconvenience with production of @subsubheading items.
>
> What I'm doing right now:
>
>     #+BEGIN_TEXINFO
>     @subsubheading <Title>
>     #+END_TEXINFO
>     <Content>
>
> What I would like to have instead:
>
>     * <Title>        :@subsubheading
>     <Content>
>
> And have it export to the same thing. I didn't find an easy way to do
> it, since this requires embedding the content of a headline into the
> parent headline. What I've got so far is adding this code to
> `org-texinfo--normalize-headlines':
>
>     (org-element-map tree 'headline
>         (lambda (hl)
>           (when (member "@subsubheading" (org-element-property :tags hl))
>             (setcar (nthcdr (cl-position hl (org-element-property :parent hl))
>                             (org-element-property :parent hl))
>                     (cons `(paragraph
>                             ()
>                             ,(format
>                               "@subsubheading %s"
>                               (org-element-property
>                                :raw-value hl)))
>                           (org-element-contents hl)))))
>         info)
>
> It almost works, the only issue is that "@" is escaped later on and I
> get "@@subsubheading" in the end. How can I fix that? Is there an easier
> way to do this in general?

I'm not sure to understand your use case, but couldn't you customize
`org-texinfo-classes'? In particular, see the last paragraph in its
docstring.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2015-12-18 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 13:53 Need some help in customizing ox-texinfo Oleh Krehel
2015-12-18 21:37 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1u3moa8.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=ohwoeowho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).