unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Using Org as the source format to generate org.texi
Date: Thu, 08 Mar 2018 11:13:02 +0100	[thread overview]
Message-ID: <87ina6dgep.fsf@bzg.fr> (raw)
In-Reply-To: <837eqnrdck.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Mar 2018 19:43:07 +0200")

Eli Zaretskii <eliz@gnu.org> 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 texinfo-insert-@kbd.

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)
#+end_src

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!

-- 
 Bastien



  parent reply	other threads:[~2018-03-08 10:13 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 18:04 Using Org as the source format to generate org.texi Bastien
2018-03-06 20:20 ` Stefan Monnier
2018-03-06 20:24   ` Kaushal Modi
2018-03-06 21:54   ` Achim Gratz
2018-03-07  0:22   ` Bastien
2018-03-07 17:43     ` Eli Zaretskii
2018-03-07 17:52       ` Kaushal Modi
2018-03-08 10:04         ` Bastien Guerry
2018-03-08  7:28       ` Michael Albinus
2018-03-08 10:06         ` Bastien Guerry
2018-03-08 10:13       ` Bastien Guerry [this message]
2018-03-07 17:39   ` Glenn Morris
2018-03-07 22:57   ` Richard Stallman
2018-03-09 11:30     ` Bastien
2018-03-10 21:26     ` Nicolas Goaziou
2018-03-11  3:40       ` Eli Zaretskii
2018-03-11 14:59       ` Michael Albinus
2018-03-11 18:13         ` Nicolas Goaziou
2018-03-11 23:26       ` Richard Stallman
2018-03-12 14:07         ` Nicolas Goaziou
2018-03-12 15:51           ` Eli Zaretskii
2018-03-12 16:42             ` Nicolas Goaziou
2018-03-12 17:32               ` Eli Zaretskii
2018-03-12 17:57                 ` Nicolas Goaziou
2018-03-12 20:16                   ` Eli Zaretskii
2018-03-12 21:37                     ` Nicolas Goaziou
2018-03-13 15:55                       ` Eli Zaretskii
2018-03-13 17:24                         ` Nicolas Goaziou
2018-03-13 17:43                           ` Eli Zaretskii
2018-03-13 21:37                             ` Nicolas Goaziou
2018-04-14 17:10                         ` @key{...} mis-use (was: Using Org as the source format to generate org.texi) Nicolas Goaziou
2018-04-19  9:22                           ` Eli Zaretskii
2018-03-06 21:30 ` Using Org as the source format to generate org.texi Paul Eggert
2018-03-07  0:19   ` Bastien
2018-03-07  1:08     ` Paul Eggert
2018-03-07  7:33       ` Achim Gratz
2018-03-09 17:52         ` Achim Gratz
2018-03-09 18:02           ` Paul Eggert
2018-03-09 18:23             ` Achim Gratz
2018-03-07 17:41       ` Glenn Morris
2018-03-09 11:19         ` Phillip Lord
2018-03-12 17:12           ` Glenn Morris
2018-03-09 17:39         ` Achim Gratz
2018-03-10 20:07           ` Phillip Lord
2018-03-11  3:00             ` Paul Eggert
2018-03-11  3:55               ` Stefan Monnier
2018-03-11 21:46                 ` Phillip Lord
2018-03-12 21:04             ` Radon Rosborough
2018-03-13  9:10               ` Phillip Lord
2018-03-13 12:29                 ` Stefan Monnier
2018-03-13 16:47                   ` Phillip Lord
2018-04-14 19:15 ` Joshua Branson

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ina6dgep.fsf@bzg.fr \
    --to=bzg@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.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).