From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Leech-Pepin Subject: Re: [new exporter][texinfo] Macro definition section Date: Mon, 12 Nov 2012 13:39:36 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdca92c888b2404ce509fdf Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXyv6-0000VF-3L for emacs-orgmode@gnu.org; Mon, 12 Nov 2012 13:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXyv3-0006I9-1J for emacs-orgmode@gnu.org; Mon, 12 Nov 2012 13:39:40 -0500 Received: from mail-qa0-f48.google.com ([209.85.216.48]:50848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXyv2-0006I1-Rm for emacs-orgmode@gnu.org; Mon, 12 Nov 2012 13:39:36 -0500 Received: by mail-qa0-f48.google.com with SMTP id s11so2131750qaa.0 for ; Mon, 12 Nov 2012 10:39:36 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org-mode --047d7bdca92c888b2404ce509fdf Content-Type: text/plain; charset=UTF-8 Hello Tom On 12 November 2012 13:03, Thomas S. Dye wrote: > Aloha Jon, > > I'm working on an Org version of the Org manual that (hopefully) can be > used to generate the required texinfo version. > > My goal at this point is to export a document that matches org.texi. > Do you want it to match org.texi exactly? Or that the generated info document end up matching? > My problem is not with the macro definitions, which can be wrapped as > you point out. It is with their placement in org.texi between @finalout > and @copying. IIUC, this should happen around line 670 of > org-e-texinfo.el, but the code seems to expect that there are two blank > lines between these commands and no macro definitions or other material. > I didn't mean wrapping the macro definitions themselves. I meant replacing the macro definitions with equivalent Org macros. For example the =orgcmd{key,command}= macro could be replaced with something like (ommiting the ifset and iftex logic): #+MACRO: tkbd @@info:@kbd{@@$1@@info:}@@ #+MACRO: tcode @@info:@code{@@$1@@info:}@@ #+MACRO: tkindex @@info:@kindex $1@@ #+MACRO: tfindex @@info:@findex $1@@ # - instead of @item since items are list elements #+MACRO: orgcmd {{{tkindex($1)}}}\\{{{tfindex($2)}}}\\- {{{tkbd($1)}}} {{{tcode($2)}}} And you could them use {{{orgcmd(C-c C-r,org-reveal)}}} (org.texi line 1316). It would also then be backend agnostic, since non-texinfo exporters would be read the line as: - $1 $2 Would that work for your needs? Or would you rather still be able to generate the macros themselves for use on export? > In view of my goal, it would be nice to have something like > #+TEXINFO_POST_HEADER that would pass the macro definitions through to > this location in the texinfo document. > > All the best, > Tom > > Regards, -- Jon > > Jonathan Leech-Pepin writes: > > > Hello, (helps if I hit paste before hitting send) > > > > On 11 November 2012 15:22, Thomas S. Dye wrote: > > > >> Aloha all, > >> > >> The texinfo source for the Org manual has a number of macro definitions > >> for commands and keys between the end of the header (@finalout) and the > >> beginning of the Copying section. > >> > >> The texinfo back-end for the new exporter doesn't have a slot here and > >> I'm wondering if it needs one? > >> > >> > > I believe I accounted for most of the special strings that are > > directly transcoded in texinfo. There may be some that are missing, > > however they can be added directly in the document using the > > =@@info:@@= syntax (inline export snippets). > > > > Are there any particular pieces of synxtax that you believe would be > > useful to have added to org-entities that would also be useful in > > other backends? > > > > > >> All the best, > >> Tom > >> -- > >> T.S. Dye & Colleagues, Archaeologists > >> 735 Bishop St, Suite 315, Honolulu, HI 96813 > >> Tel: 808-529-0866, Fax: 808-529-0884 > >> http://www.tsdye.com > >> > >> > > Regards, > > > > -- > > Jon > > Hello, (helps if I hit paste before hitting send) > > > > On 11 November 2012 15:22, Thomas S. Dye wrote: > > > > Aloha all, > > > > The texinfo source for the Org manual has a number of macro > > definitions > > for commands and keys between the end of the header (@finalout) > > and the > > beginning of the Copying section. > > > > The texinfo back-end for the new exporter doesn't have a slot here > > and > > I'm wondering if it needs one? > > > > > > > > I believe I accounted for most of the special strings that are > > directly transcoded in texinfo. There may be some that are missing, > > however they can be added directly in the document using the > > =@@info:@@= syntax (inline export snippets). > > > > Are there any particular pieces of synxtax that you believe would be > > useful to have added to org-entities that would also be useful in > > other backends? > > > > > > All the best, > > Tom > > -- > > T.S. Dye & Colleagues, Archaeologists > > 735 Bishop St, Suite 315, Honolulu, HI 96813 > > Tel: 808-529-0866, Fax: 808-529-0884 > > http://www.tsdye.com > > > > > > > > Regards, > > > > -- > > Jon > > -- > Thomas S. Dye > http://www.tsdye.com > --047d7bdca92c888b2404ce509fdf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Tom

On 12 November 2012 13:03, Thom= as S. Dye <tsd@tsdye.com> wrote:
Aloha Jon,

I'm working on an Org version of the Org manual that (hopefully) can be=
used to generate the required texinfo version.

My goal at this point is to export a document that matches org.texi.

Do you want it to match org.texi exactly?=C2=A0 Or that = the generated info
document end up matching?
=C2=A0
My problem is not with the macro definitions, which can be wrapped as
you point out. =C2=A0It is with their placement in org.texi between @finalo= ut
and @copying. =C2=A0IIUC, this should happen around line 670 of
org-e-texinfo.el, but the code seems to expect that there are two blank
lines between these commands and no macro definitions or other material.

I didn't mean wrapping the macro definitions the= mselves.=C2=A0 I meant
replacing the macro definitions with equivalent O= rg macros.

For example the =3Dorgcmd{key,command}=3D macro could be replaced with<= br>something like (ommiting the ifset and iftex logic):

#+MACRO: tkb= d @@info:@kbd{@@$1@@info:}@@
#+MACRO: tcode @@info:@code{@@$1@@info:}@@<= br> #+MACRO: tkindex @@info:@kindex $1@@
#+MACRO: tfindex @@info:@findex $1@= @

# - instead of @item since items are list elements
#+MACRO: org= cmd {{{tkindex($1)}}}\\{{{tfindex($2)}}}\\- {{{tkbd($1)}}}=C2=A0 {{{tcode($= 2)}}}

And you could them use {{{orgcmd(C-c C-r,org-reveal)}}} (org.texi line<= br>1316).=C2=A0 It would also then be backend agnostic, since non-texinfoexporters would be read the line as:

- $1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 $2

Would that work for your needs?=C2=A0 Or would you rather = still be able to
generate the macros themselves for use on export?
=C2=A0
In view of my goal, it would be nice to have something like
#+TEXINFO_POST_HEADER that would pass the macro definitions through to
this location in the texinfo document.

All the best,
Tom

<= br>Regards,

--
Jon

Jonathan Leech-Pepin <j= onathan.leechpepin@gmail.com> writes:

> Hello, =C2=A0(helps if I hit paste before hitting send)
>
> On 11 November 2012 15:22, Thomas S. Dye <tsd@tsdye.com> wrote:
>
>> Aloha all,
>>
>> The texinfo source for the Org manual has a number of macro defini= tions
>> for commands and keys between the end of the header (@finalout) an= d the
>> beginning of the Copying section.
>>
>> The texinfo back-end for the new exporter doesn't have a slot = here and
>> I'm wondering if it needs one?
>>
>>
> I believe I accounted for most of the special strings that are
> directly transcoded in texinfo. =C2=A0There may be some that are missi= ng,
> however they can be added directly in the document using the
> =3D@@info:<texinfo command>@@=3D syntax (inline export snippets)= .
>
> Are there any particular pieces of synxtax that you believe would be > useful to have added to org-entities that would also be useful in
> other backends?
>
>
>> All the best,
>> Tom
>> --
>> T.S. Dye & Colleagues, Archaeologists
>> 735 Bishop St, Suite 315, Honolulu, HI 96813
>> Tel: 808-529-0= 866, Fax: 808-529-0= 884
>> http://www.tsdy= e.com
>>
>>
> Regards,
>
> --
> Jon
> Hello,=C2=A0 (helps if I hit paste before hitting send)
>
> On 11 November 2012 15:22, Thomas S. Dye <tsd@tsdye.com> wrote:
>
> =C2=A0 =C2=A0 Aloha all,
>
> =C2=A0 =C2=A0 The texinfo source for the Org manual has a number of ma= cro
> =C2=A0 =C2=A0 definitions
> =C2=A0 =C2=A0 for commands and keys between the end of the header (@fi= nalout)
> =C2=A0 =C2=A0 and the
> =C2=A0 =C2=A0 beginning of the Copying section.
>
> =C2=A0 =C2=A0 The texinfo back-end for the new exporter doesn't ha= ve a slot here
> =C2=A0 =C2=A0 and
> =C2=A0 =C2=A0 I'm wondering if it needs one?
>
>
>
> I believe I accounted for most of the special strings that are
> directly transcoded in texinfo.=C2=A0 There may be some that are missi= ng,
> however they can be added directly in the document using the
> =3D@@info:<texinfo command>@@=3D syntax (inline export snippets)= .
>
> Are there any particular pieces of synxtax that you believe would be > useful to have added to org-entities that would also be useful in
> other backends?
> =C2=A0
>
> =C2=A0 =C2=A0 All the best,
> =C2=A0 =C2=A0 Tom
> =C2=A0 =C2=A0 --
> =C2=A0 =C2=A0 T.S. Dye & Colleagues, Archaeologists
> =C2=A0 =C2=A0 735 Bishop St, Suite 315, Honolulu, HI 96813
> =C2=A0 =C2=A0 Tel: 808-529-0866, Fax: 808-529-0884
> =C2=A0 =C2=A0 http:= //www.tsdye.com
>
>
>
> Regards,
>
> --
> Jon

--
Thomas S. Dye
http://www.tsdye.com=

--047d7bdca92c888b2404ce509fdf--