From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Exporting to ODT with links to radio targets Date: Sun, 30 Jun 2019 14:28:56 -0400 Message-ID: References: <87o92kl2ve.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a41a89058c8eaf6a" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39611) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hheZY-0008RB-1S for emacs-orgmode@gnu.org; Sun, 30 Jun 2019 14:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hheZW-0004l3-Ls for emacs-orgmode@gnu.org; Sun, 30 Jun 2019 14:29:07 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:55769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hheZW-0004jY-4k for emacs-orgmode@gnu.org; Sun, 30 Jun 2019 14:29:06 -0400 Received: by mail-wm1-x32a.google.com with SMTP id a15so13625200wmj.5 for ; Sun, 30 Jun 2019 11:29:05 -0700 (PDT) In-Reply-To: <87o92kl2ve.fsf@ucl.ac.uk> 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" To: "Fraga, Eric" Cc: Emacs Org mode mailing list --000000000000a41a89058c8eaf6a Content-Type: text/plain; charset="UTF-8" I wasn't able to reproduce that issue, for me the target just doesn't show up. you can lightly redefine the behavior of the export functions like this: #+BEGIN_SRC emacs-lisp (cl-letf (((symbol-function 'org-odt-target) (lambda (target contents info) (org-element-property :value target)))) (let ((hfy-user-sheet-assoc nil)) (org-open-file-with-system (org-export-to-file 'odt "test4.odt")))) #+END_SRC you could also use around advices for this. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Jun 26, 2019 at 12:43 PM Fraga, Eric wrote: > Hello all, > > I need to share a document I have been writing in org which I would > normally export to PDF (via LaTeX, and which works very well). To > share, I am exporting to ODT. In general, the export is good enough for > my collaborator to make changes to the text (with track changes enabled > in whatever word processor he uses). The exception is that links to > radio targets get exported to look like > > "some text OrgXref.org7b3090d more text" > > where the Orgxxx is where I expected the text which would link to the > radio target. I hope I am making sense... > > Is there an easy way to tell org to simply output the radio link text? > > I have written an export filter to remove the extraneous XML stuff > around the text but this seems like overkill so I wonder if I missed > something simple. No worries if not! > > Many thanks. > > PS - radio targets are brilliant for long documents without needing to > create a full index. > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae > --000000000000a41a89058c8eaf6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I wasn't able to reproduce that issue, for me the targ= et just doesn't show up. you can lightly redefine the behavior of the e= xport functions like this:

#+BEGIN_SRC emacs-lisp
(cl= -letf (((symbol-function 'org-odt-target) (lambda (target contents info= )
=C2=A0 =C2=A0 =C2=A0 (org-element-property :value target))))
= =C2=A0 (let ((hfy-user-sheet-assoc nil))
=C2=A0 =C2=A0 (org-open-file-wi= th-system (org-export-to-file 'odt "test4.odt"))))
#+END_S= RC

you could also use around advices for this.

Joh= n

-----------------------------------
Professor John Kitchin=C2= =A0
Doherty Hall A207F
Department of Chemical Engineering
Carnegie= Mellon University
Pittsburgh, PA 15213
412-268-7803
=


On Wed, Jun 26, 2019 at 12:43 PM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
=
Hello all,

I need to share a document I have been writing in org which I would
normally export to PDF (via LaTeX, and which works very well).=C2=A0 To
share, I am exporting to ODT.=C2=A0 In general, the export is good enough f= or
my collaborator to make changes to the text (with track changes enabled
in whatever word processor he uses).=C2=A0 The exception is that links to radio targets get exported to look like

=C2=A0 =C2=A0 =C2=A0 "some text OrgXref.org7b3090d more text"
where the Orgxxx is where I expected the text which would link to the
radio target.=C2=A0 I hope I am making sense...

Is there an easy way to tell org to simply output the radio link text?

I have written an export filter to remove the extraneous XML stuff
around the text but this seems like overkill so I wonder if I missed
something simple.=C2=A0 No worries if not!

Many thanks.

PS - radio targets are brilliant for long documents without needing to
=C2=A0 =C2=A0 =C2=A0create a full index.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae
--000000000000a41a89058c8eaf6a--