Re: Failure to resolve internal links on ox-html export?

2021-06-20 Thread Tim Visher
On Fri, Jun 18, 2021 at 6:22 PM Tim Cross  wrote:

>
> Tim Visher  writes:
>
> > Hi Juan Manuel,
> >
> > On Fri, Jun 11, 2021 at 2:31 PM Juan Manuel Macías <
> maciasch...@posteo.net> wrote:
> >
> >  Try setting this variable to non-nil:
> >
> >  (setq org-export-with-broken-links t)
> >
> > Thanks for the tip here! This is definitely close to what I want. I
> think I'm going to need to code up something additional though in that none
> of the
> > default options (mark or ignore) are really the behavior that I want.
> >
> > - mark: I don't like the way the text comes out here. I don't want to
> have BROKEN LINK in the exported text at all.
> > - ignore: I don't like how the text of the link simply disappears in
> this case.
> >
> > What I really want is something that keeps the link text but drops the
> link, essentially converting it into plain text (or stylized text if the
> link text is in
> > markup).
> >
> > I'll have to play around with how to do that.
>
> Although I've never used them, I think export filters sound like they
> might be what you want. Have a look at the Advanced Export configuration
> section of the manual and how to define export filters. You should be
> able to define an org-export-filter-link-function that will tranform
> links into just the title text from the original link.
>

Thanks, Tim! I'll check them out. I hadn't heard of them before.


Re: Failure to resolve internal links on ox-html export?

2021-06-18 Thread Tim Cross


Tim Visher  writes:

> Hi Juan Manuel,
>
> On Fri, Jun 11, 2021 at 2:31 PM Juan Manuel Macías  
> wrote:
>
>  Try setting this variable to non-nil:
>
>  (setq org-export-with-broken-links t)
>
> Thanks for the tip here! This is definitely close to what I want. I think I'm 
> going to need to code up something additional though in that none of the
> default options (mark or ignore) are really the behavior that I want.
>
> - mark: I don't like the way the text comes out here. I don't want to have 
> BROKEN LINK in the exported text at all.
> - ignore: I don't like how the text of the link simply disappears in this 
> case.
>
> What I really want is something that keeps the link text but drops the link, 
> essentially converting it into plain text (or stylized text if the link text 
> is in
> markup).
>
> I'll have to play around with how to do that.

Although I've never used them, I think export filters sound like they
might be what you want. Have a look at the Advanced Export configuration
section of the manual and how to define export filters. You should be
able to define an org-export-filter-link-function that will tranform
links into just the title text from the original link.

-- 
Tim Cross



Re: Failure to resolve internal links on ox-html export?

2021-06-18 Thread Juan Manuel Macías
Hi Tim,

Tim Visher writes:

> What I really want is something that keeps the link text but drops the
> link, essentially converting it into plain text (or stylized text if
> the link text is in markup).

According to the `org-export-with-broken-links' docstring:

---
[...] If it is set to ‘mark’, broken links are marked as such in the
output, with a string like

  [BROKEN LINK: path]

where PATH is the un-resolvable reference.

This option can also be set with the OPTIONS keyword, e.g.,
"broken-links:mark".
---

It's not exactly what you're looking for, but it can help you find a
solution.

Best regards,

Juan Manuel 



Re: Failure to resolve internal links on ox-html export?

2021-06-18 Thread Tim Visher
Hi Juan Manuel,

On Fri, Jun 11, 2021 at 2:31 PM Juan Manuel Macías 
wrote:

> Try setting this variable to non-nil:
>
> (setq org-export-with-broken-links t)
>

Thanks for the tip here! This is definitely close to what I want. I think
I'm going to need to code up something additional though in that none of
the default options (mark or ignore) are really the behavior that I want.

- mark: I don't like the way the text comes out here. I don't want to have
BROKEN LINK in the exported text at all.
- ignore: I don't like how the text of the link simply disappears in this
case.

What I really want is something that keeps the link text but drops the
link, essentially converting it into plain text (or stylized text if the
link text is in markup).

I'll have to play around with how to do that.

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es


Re: Failure to resolve internal links on ox-html export?

2021-06-11 Thread Juan Manuel Macías
Hi Tim,

Try setting this variable to non-nil:

(setq org-export-with-broken-links t)

Best regards,

Juan Manuel 

Tim Visher writes:

> Hi Everyone,
>
> I'd like to be able to link to various areas of a large wiki file I
> maintain for when I'm looking at an entry in emacs. However, I will
> often email exported subtrees and when I do that if I have a link to a
> heading that's outside the current subtree it fails with a
> `user-error: Unable to resolve link: …`, I assume because the export
> tree doesn't contain that heading.
>
> Is there any way to tell the exporter to simply make those into plain
> text _or_ to simply ignore the error?
>
> Thanks in advance!
>
> --
>
> In Christ,
>
> Timmy V.
>
> https://blog.twonegatives.com
> http://five.sentenc.es
>



Failure to resolve internal links on ox-html export?

2021-06-11 Thread Tim Visher
Hi Everyone,

I'd like to be able to link to various areas of a large wiki file I
maintain for when I'm looking at an entry in emacs. However, I will often
email exported subtrees and when I do that if I have a link to a heading
that's outside the current subtree it fails with a `user-error: Unable to
resolve link: …`, I assume because the export tree doesn't contain that
heading.

Is there any way to tell the exporter to simply make those into plain text
_or_ to simply ignore the error?

Thanks in advance!

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es