From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gerlach Subject: Stop export on bad link? Date: Sat, 26 Jul 2014 16:15:08 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11345e0eb26dd104ff1e5857 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XB8N7-0001PS-4S for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 16:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XB8N4-00062J-Vs for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 16:15:13 -0400 Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:45030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XB8N4-00061Y-O8 for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 16:15:10 -0400 Received: by mail-la0-f43.google.com with SMTP id hr17so4122022lab.2 for ; Sat, 26 Jul 2014 13:15:09 -0700 (PDT) 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: emacs-orgmode@gnu.org --001a11345e0eb26dd104ff1e5857 Content-Type: text/plain; charset=UTF-8 Is it possible to configure the exporter to stop and throw an error for a bad link? I found this old thread with a patch to make the format configurable, but I'd rather receive an explicit warning. Thanks, Jake --001a11345e0eb26dd104ff1e5857 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Is it possible to configure the exporter to stop and throw= an error for a bad link?

I found this old thread=C2=A0with a p= atch to make the format configurable, but I'd rather receive an explici= t warning.

Thanks,
Jake
--001a11345e0eb26dd104ff1e5857-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Stop export on bad link? Date: Sun, 27 Jul 2014 13:27:26 +0200 Message-ID: <87k36xgzw3.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBofC-0006dj-8n for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:24:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBof5-0005IO-GW for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:24:42 -0400 Received: from mail-s76.mailgun.info ([184.173.153.204]:45624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBof5-0005Hn-9c for emacs-orgmode@gnu.org; Mon, 28 Jul 2014 13:24:35 -0400 In-Reply-To: (Jacob Gerlach's message of "Sat, 26 Jul 2014 16:15:08 -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: Jacob Gerlach Cc: emacs-orgmode@gnu.org Hi Jacob, Jacob Gerlach writes: > Is it possible to configure the exporter to stop and throw an error > for a bad link? No. But what is really a "bad link"? Is it bad because it cannot be exported to a specific backend? -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gerlach Subject: Re: Stop export on bad link? Date: Wed, 20 Aug 2014 13:40:16 -0400 Message-ID: References: <87k36xgzw3.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1133a9b8d821fb05011318cf Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK9rw-0001bQ-Rk for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 13:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK9rv-0001XJ-Ce for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 13:40:20 -0400 Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:36590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK9ru-0001XB-VZ for emacs-orgmode@gnu.org; Wed, 20 Aug 2014 13:40:19 -0400 Received: by mail-lb0-f172.google.com with SMTP id z11so7078535lbi.31 for ; Wed, 20 Aug 2014 10:40:16 -0700 (PDT) In-Reply-To: <87k36xgzw3.fsf@bzg.ath.cx> 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: emacs-orgmode@gnu.org --001a1133a9b8d821fb05011318cf Content-Type: text/plain; charset=UTF-8 On Sun, Jul 27, 2014 at 7:27 AM, Bastien wrote: > Hi Jacob, > > Jacob Gerlach writes: > > > Is it possible to configure the exporter to stop and throw an error > > for a bad link? > > No. But what is really a "bad link"? Is it bad because it cannot be > exported to a specific backend? > By bad, I meant a link that can't be resolved (perhaps because of a typo). Org already handles this by formatting the "bad" link with texttt in latex. For example: ----- * First In [[frst]], we see the ECM. ----- Exports to: ----- \section{First} \label{sec-1} In \texttt{frst}, we see the ECM. ----- Whereas ---- * First In [[First]], we see the ECM. ---- exports as: ---- \section{First} \label{sec-1} In \ref{sec-1}, we see the ECM. ---- After further digging, I found org-latex-link-with-unknown-path-format. Since I usually export directly to pdf, I can achieve my desired result by customizing this variable to some undefined control sequence (i.e. \BADLINK), in which case latex complains, but I have to hunt down the error in the *Org PDF LaTeX Output* buffer. It would be great if the export would just quit and move point to the offending link > > -- > Bastien > --001a1133a9b8d821fb05011318cf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On S= un, Jul 27, 2014 at 7:27 AM, Bastien <bzg@gnu.org> wrote:
Hi Jacob,

Jacob Gerlach <jacobgerlach@gm= ail.com> writes:

> Is it possible to configure the exporter to stop and throw an error > for a bad link?

No.=C2=A0 But what is really a "bad link"?=C2=A0 Is it bad = because it cannot be
exported to a specific backend?

By bad, I meant a link that can't be resolved (perhaps because of a t= ypo). Org already handles this by formatting the "bad" link with = texttt in latex. For example:

-----
* First
In [[frst]], we see the ECM.
-----
Exports to:
-----
\section{First}
\label{sec-1}
In \= texttt{frst}, we see the ECM.
-----

Whereas=C2=A0
----
* First
In [[First]], we see the ECM.
----
=
= exports as:
= ----
\section{First}
\label{sec-1}
In \ref{se= c-1}, we see the ECM.
----

After further digging, I found=C2=A0org-latex-link-with-unknown-path-format= . Since I usually export directly to pdf, I can achieve my desired result b= y customizing this variable to some undefined control sequence (i.e. \BADLI= NK), in which case latex complains, but I have to hunt down the error in th= e=C2=A0*Org PDF LaTeX Output* buffer. It would be great if the export would= just quit and move point to the offending link
=C2=A0

--
=C2=A0Bastien

--001a1133a9b8d821fb05011318cf--