[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Org as the source format to generate org.texi

From: Bastien Guerry
Subject: Re: Using Org as the source format to generate org.texi
Date: Thu, 08 Mar 2018 11:13:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> For example, how does one insert all those {{{kbd(foo bar)}}} -- I
> presume you don't type that literally, but I couldn't find a command
> similar to address@hidden

I don't know if having an org-insert-macro command in org.el would be
useful, we may consider it.

In the meantime I suggest we add this in a new section of the manual:

#+begin_src emacs-lisp
(define-skeleton var-macro-skeleton
  "Insert a {{{var(...)}}} macro."
  "Variable: "
  "{{{var(" str ")}}}")
(define-skeleton cite-macro-skeleton
  "Insert a {{{cite(...)}}} macro."
  "Cite: "
  "{{{cite(" str ")}}}")
(define-skeleton kbd-macro-skeleton
  "Insert a {{{kbd(...)}}} macro."
  "Keybinding: "
  "{{{kbd(" str ")}}}")

(define-key org-mode-map "\C-c\C-xv" #'var-macro-skeleton)
(define-key org-mode-map "\C-c\C-xc" #'cite-macro-skeleton)
(define-key org-mode-map "\C-c\C-xk" #'kbd-macro-skeleton)

Hitting C-c C-c on the #+begin_src line will evaluated the code,
and then C-c C-x v will help inserting a {{{var(...)}}} macro.

> (If there's no such command, I
> think it should be added, as well as commands to insert other kinds
> of markup that is more than one or two characters long.  For
> example, the code-block delimiters "#+begin_src emacs-lisp",
> cross-references, @noindent, etc.  The equivalent commands in
> texinfo-mode are significant time-savers.)

For this you need (require 'org-tempo), which loads templates.
Then, hitting "< s TAB" (without the spaces) will expand into
a #+begin_src ... #+end_src block.

> Also, I see some omissions in converting the Texinfo manual to
> manual.org: all the uses of @key disappeared (expect Michael Albinus
> to be very unhappy ;-), and likewise with @command -- is that
> intentional?

I guess it needs to be fixed.

> And what is the difference between cross-references that begin with an
> asterisk and those that don't?  I couldn't find that in the manual.

I don't know -- I'll let Nicolas explain.

Thanks for your questions and feedback!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]