emacs-devel
[Top][All Lists]
Advanced

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

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


From: Nicolas Goaziou
Subject: Re: Using Org as the source format to generate org.texi
Date: Mon, 12 Mar 2018 22:37:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> It can't be both, because then you cannot distinguish between
> @kbd{FOO}, which means type the 3 characters F O O, and @key{FOO},
> which means press the key labeled "FOO".

I understand the difference between @kbd{FOO} and @key{FOO}, but you
probably didn't look at the implementation of {{{kbd(...)}}}. 

There, I hard-code a number of keys (e.g., SPC, RET, LFD, TAB, BS...)
which, when matching case sensitively the macro value, are replaced with
@key{...}. So,

  {{{kbd(FOO)}}}   => @kbd{FOO}
  {{{kbd(spc)}}}   => @kbd{spc}
  {{{kbd(S P C)}}} => @kbd{S P C}

but

  {{{kbd(SPC)}}}       => @address@hidden
  {{{kbd(R E T M-RET)}}} => @kbd{R E T address@hidden

> Yes, something else: we need a separate {{{key(...)}}} construct, or
> something else that will produce @key{...} in Texinfo.

I still think we may not need that, as shown above. This works pretty
well for Org manual, actually.

So, if you need @key alone, I was simply suggesting that, for example

    {{{kbd(SPC)}}}   => @key{SPC}
    {{{kbd(S P C)}}} => @kbd{S P C}

It would be very wrong to write @kbd{SPC} if you mean type the
3 characters S P C anyway.



reply via email to

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