From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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, 01 Sep 2015 20:29:53 +0200 Message-ID: <871tei2dsu.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqI6-00006j-64 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWqI5-0004Nv-Fl for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:28:18 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:37319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWqI5-0004Mi-1e for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 14:28:17 -0400 In-Reply-To: (Michael Behr's message of "Tue, 1 Sep 2015 14:14:49 -0400") 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 Cc: emacs-orgmode@gnu.org 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