emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ISSUE: Unable to resolve link (html export)
@ 2020-08-06 18:24 Anthony Carrico
  2020-08-16  9:18 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Carrico @ 2020-08-06 18:24 UTC (permalink / raw)
  To: emacs-orgmode

* Steps to reproduce:

1. Create a file called test.org:

#+TITLE: test.org

2. Create a file called test2.org:

#+TITLE: test2.org
[[file:test.org::+TITLE: test][test]]

3. Export C-c C-e h H

* Expected result:

An html buffer

* Actual result:

Unable to resolve link: "No match for fuzzy expression: +TITLE: test"

* Additional data

The link was created by going to the first line of test.org and hitting 
C-c l, then the second line of test2.org and hitting C-c C-l.

* Work around

It seems like changing the link to:

[[file:test.org::#+TITLE: test][test]]

allows the export to succeed. On the other hand, the original link works 
fine internally. This leads me to suspect that export is using different 
code to follow links, but also that the insert link code is buggy, 
skipping the pound symbol.

-- 
Anthony Carrico


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ISSUE: Unable to resolve link (html export)
  2020-08-06 18:24 ISSUE: Unable to resolve link (html export) Anthony Carrico
@ 2020-08-16  9:18 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-08-16  9:18 UTC (permalink / raw)
  To: Anthony Carrico; +Cc: emacs-orgmode

Hello,

Anthony Carrico <acarrico@memebeam.org> writes:

> * Steps to reproduce:
>
> 1. Create a file called test.org:
>
> #+TITLE: test.org
>
> 2. Create a file called test2.org:
>
> #+TITLE: test2.org
> [[file:test.org::+TITLE: test][test]]
>
> 3. Export C-c C-e h H
>
> * Expected result:
>
> An html buffer
>
> * Actual result:
>
> Unable to resolve link: "No match for fuzzy expression: +TITLE: test"
>
> * Additional data
>
> The link was created by going to the first line of test.org and hitting 
> C-c l, then the second line of test2.org and hitting C-c C-l.
>
> * Work around
>
> It seems like changing the link to:
>
> [[file:test.org::#+TITLE: test][test]]
>
> allows the export to succeed. On the other hand, the original link works 
> fine internally. This leads me to suspect that export is using different 
> code to follow links, but also that the insert link code is buggy, 
> skipping the pound symbol.

The pound character has a special meaning in links. It denotes custom
IDs. Here,

  [[file:test.org::#+TITLE: test]]

means you're looking for a headline with the CUSTOM_ID property set to
"+TITLE: test" in the file "test.org"

Therefore, it is automatically removed in another context, e.g., in text
search.

However, the export process doesn't resolve text searches. 

If you want to link to a specific part of the text, you can use
a target.

Regards,
-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-16  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 18:24 ISSUE: Unable to resolve link (html export) Anthony Carrico
2020-08-16  9:18 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).