Re: [O] [RFC] New "kbd" macro?

2017-09-17 Thread Nicolas Goaziou
Completing myself: Nicolas Goaziou writes: > Kaushal Modi writes: > >> Makes me think.. instead of hard-codng the kbd export forms in the macro, >> wouldn't it be better to define those in the respective exporter >> backends? > > We don't have a

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Nicolas Goaziou
Hello, Kaushal Modi writes: > Makes me think.. instead of hard-codng the kbd export forms in the macro, > wouldn't it be better to define those in the respective exporter > backends? We don't have a syntax for these. > Can a mechanism be put in place so that we can

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Kaushal Modi
On Fri, Sep 15, 2017, 8:54 AM Kaushal Modi wrote: > On Thu, Sep 14, 2017 at 6:03 PM Nicolas Goaziou > wrote: > >> >> > - HTML, MD :: as Kaushal points out, please use .. >> >> This is (almost) already the case. >> > > Thanks. I tried the second

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Kaushal Modi
On Thu, Sep 14, 2017 at 6:03 PM Nicolas Goaziou wrote: > > > - HTML, MD :: as Kaushal points out, please use .. > > This is (almost) already the case. > Thanks. I tried the second version of the patch and it works great. About the /almost/, the same .. export worked for

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Nicolas Goaziou
Rasmus writes: > You are right, for LaTeX, you would probably want two. So > > {{{kbd(CTRL-x-f)}}} > > would be initiated for org-latex-kdb-format string, which would default to > > \texttt{%s} > > Whether a key is needed depends on what it exactly entrails. If each of >

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Rasmus
Nicolas Goaziou writes: > Hello, > > Rasmus writes: > >> I quite like the fbox look, but it would — perhaps – be rather heavy >> inline! >> >> How about making it a format-string for LaTeX and a separate style for >> ODT? Then you could change it on a

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Nicolas Goaziou
Hello, Rasmus writes: > I quite like the fbox look, but it would — perhaps – be rather heavy > inline! > > How about making it a format-string for LaTeX and a separate style for > ODT? Then you could change it on a document-basis if needed. Could you elaborate? Where would the

Re: [O] [RFC] New "kbd" macro?

2017-09-15 Thread Rasmus
Nicolas Goaziou writes: > Hello, > > Rasmus writes: > >> I am not sure where it makes sense to print in "plain" text as opposed to >> code or verbatim by default. Anyway, I think it makes sense to add >> specific export mechanisms for several backends,

Re: [O] [RFC] New "kbd" macro?

2017-09-14 Thread Nicolas Goaziou
Hello, Rasmus writes: > I am not sure where it makes sense to print in "plain" text as opposed to > code or verbatim by default. Anyway, I think it makes sense to add > specific export mechanisms for several backends, which might make it > possible to remove that argument.

Re: [O] [RFC] New "kbd" macro?

2017-09-14 Thread Oleh Krehel
> Copying Oleh, as I believe he would also have some interest in this. Thanks for the info. I still prefer to denote keys as ~C-x C-f~, and code as =forward-char=: 1. It looks good in text. 2. It looks good on Github/Gitlab render. 3. It still exports as C-x C-f for HTML, and @kbd{C-x C-f} for

Re: [O] [RFC] New "kbd" macro?

2017-09-14 Thread Rasmus
Hi Nicolas, Thanks for looking into this. Nicolas Goaziou writes: > I would like to submit a new minor macro for integration within Org: the > "kbd" macro. > > The "kbd" macro focuses on normalizing keybinding during export. For > example, during Texinfo export,

Re: [O] [RFC] New "kbd" macro?

2017-09-13 Thread Marcin Borkowski
On 2017-09-13, at 16:03, Kaushal Modi wrote: > On Wed, Sep 13, 2017 at 9:23 AM Nicolas Goaziou > wrote: > >> Hello, >> >> I would like to submit a new minor macro for integration within Org: the >> "kbd" macro. >> > > Awesome! +1, I really

Re: [O] [RFC] New "kbd" macro?

2017-09-13 Thread Nicolas Goaziou
Hello, Kaushal Modi writes: > Can we have {{{kbd(v SPC)}}} export to below for HTML? > > v SPC Good idea. New patch follows. > *Also stuff within angle brackets will hide in HTML if you choose to leave > the export as "v " for HTML too!* Indeed. This is fixed per the

Re: [O] [RFC] New "kbd" macro?

2017-09-13 Thread Eric S Fraga
On Wednesday, 13 Sep 2017 at 15:22, Nicolas Goaziou wrote: > Hello, > > I would like to submit a new minor macro for integration within Org: the > "kbd" macro. My first inclination was to say that something like this belongs in org-contrib (or on Worg, I guess) but if there is a need for this for

Re: [O] [RFC] New "kbd" macro?

2017-09-13 Thread Kaushal Modi
Oh, and the reference to [1] that I forgot to paste.. [1]: https://github.com/kaushalmodi/ox-hugo/blob/a486141e4e2c3f9f67e799e20af150611d77f850/ox-hugo.el#L535-L542 On Wed, Sep 13, 2017 at 10:03 AM Kaushal Modi wrote: > On Wed, Sep 13, 2017 at 9:23 AM Nicolas Goaziou

Re: [O] [RFC] New "kbd" macro?

2017-09-13 Thread Kaushal Modi
On Wed, Sep 13, 2017 at 9:23 AM Nicolas Goaziou wrote: > Hello, > > I would like to submit a new minor macro for integration within Org: the > "kbd" macro. > Awesome! > The "kbd" macro focuses on normalizing keybinding during export. For > example, during Texinfo

[O] [RFC] New "kbd" macro?

2017-09-13 Thread Nicolas Goaziou
Hello, I would like to submit a new minor macro for integration within Org: the "kbd" macro. The "kbd" macro focuses on normalizing keybinding during export. For example, during Texinfo export, {{{kbd(v SPC)}}} becomes @kbd{v @key{SPC}} whereas in another back-end, it becomes v More