From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Behr Subject: Re: Bug: Can't export subtree with links to headlines outside of the subtree [8.3.1 (8.3.1-95-g1dbb25-elpa)] Date: Tue, 1 Sep 2015 14:39:42 -0400 Message-ID: References: <871tei2dsu.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f3c70b781c7051eb3e04b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqbW-00053p-0g for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:48:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWqbU-0007xy-Oq for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:48:21 -0400 Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]:33302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqbU-0007xl-IR for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:48:20 -0400 Received: by iofh134 with SMTP id h134so12246814iof.0 for ; Tue, 01 Sep 2015 11:48:20 -0700 (PDT) In-Reply-To: <871tei2dsu.fsf@nicolasgoaziou.fr> 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: Michael Behr , emacs-orgmode@gnu.org --001a113f3c70b781c7051eb3e04b Content-Type: text/plain; charset=UTF-8 My use case is a large file of notes that I want to typeset frequently as I update it, so that won't work for me unless there's an easy way to pass a filtered version of the file to the exporter. Personally I'd prefer a customization option to change this behavior, but if that's not doable I'll work around it. Might be worth putting a note about it in the manual, though. (I can't find the previous discussion of this, so sorry if I'm retreading old ground.) Thanks, Michael On Tue, Sep 1, 2015 at 2:29 PM, Nicolas Goaziou wrote: > Hello, > > Michael Behr writes: > > > I want to export a subtree of a file, but that subtree has links to > > headings in the file that are outside of the subtree. I expect the > > exporting process to produce some sort of valid result, but instead it > > throws an "Unable to resolve link" error. Here's a test file to > > reproduce: > > > > * Foo > > * Bar :export: > > [[*Foo][Foo]] > > > > Making a file with those contents and trying to export it to e.g. > > latex will fail, but if the :export: tag is removed, exporting > > succeeds. I can't easily get a backtrace because the error comes from > > user-error, but it happens in org-export-resolve-fuzzy-link. > > > > Of course the exported file can't link to a target that doesn't exist, > > but it's probably better to strip out the link in this case than to > > throw an error, right? > > Actually, wrong. It was discussed already, and the current trend is to > throw an error instead of silently dropping the link. > > Can't you just filter it out before exporting? > > > Regards, > > -- > Nicolas Goaziou > --001a113f3c70b781c7051eb3e04b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
My use case is a large file of notes that I want to typese= t frequently as I update it, so that won't work for me unless there'= ;s an easy way to pass a filtered version of the file to the exporter.
=
Personally I'd prefer a customization option to change t= his behavior, but if that's not doable I'll work around it. Might b= e worth putting a note about it in the manual, though.

=
(I can't find the previous discussion of this, so sorry if I'm= retreading old ground.)

Thanks,
Michael=

On Tu= e, Sep 1, 2015 at 2:29 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Michael Behr <
mkbehr@gmail.com&g= t; writes:

> I want to export a subtree of a file, but that subtree has links to > headings in the file that are outside of the subtree. I expect the
> exporting process to produce some sort of valid result, but instead it=
> throws an "Unable to resolve link" error. Here's a test = file to
> reproduce:
>
> * Foo
> * Bar :export:
> [[*Foo][Foo]]
>
> Making a file with those contents and trying to export it to e.g.
> latex will fail, but if the :export: tag is removed, exporting
> succeeds. I can't easily get a backtrace because the error comes f= rom
> user-error, but it happens in org-export-resolve-fuzzy-link.
>
> Of course the exported file can't link to a target that doesn'= t exist,
> but it's probably better to strip out the link in this case than t= o
> throw an error, right?

Actually, wrong. It was discussed already, and the current trend is = to
throw an error instead of silently dropping the link.

Can't you just filter it out before exporting?


Regards,

--
Nicolas Goaziou

--001a113f3c70b781c7051eb3e04b--