emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Stop export on bad link?


From: Jacob Gerlach
Subject: Re: [O] Stop export on bad link?
Date: Wed, 20 Aug 2014 13:40:16 -0400

On Sun, Jul 27, 2014 at 7:27 AM, Bastien <address@hidden> wrote:
Hi Jacob,

Jacob Gerlach <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]