emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jacob Gerlach <jacobgerlach@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Stop export on bad link?
Date: Wed, 20 Aug 2014 13:40:16 -0400	[thread overview]
Message-ID: <CAA6UvuGibVD_g9fCGnOhpcSzcWnGjCSdheyLLxKehNUNRyqwJg@mail.gmail.com> (raw)
In-Reply-To: <87k36xgzw3.fsf@bzg.ath.cx>

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

On Sun, Jul 27, 2014 at 7:27 AM, Bastien <bzg@gnu.org> wrote:

> Hi Jacob,
> Jacob Gerlach <jacobgerlach@gmail.com> 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:
In \texttt{frst}, we see the ECM.

* First
In [[First]], we see the ECM.
exports as:
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

[-- Attachment #2: Type: text/html, Size: 3676 bytes --]

      reply	other threads:[~2014-08-20 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 20:15 Stop export on bad link? Jacob Gerlach
2014-07-27 11:27 ` Bastien
2014-08-20 17:40   ` Jacob Gerlach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA6UvuGibVD_g9fCGnOhpcSzcWnGjCSdheyLLxKehNUNRyqwJg@mail.gmail.com \
    --to=jacobgerlach@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).