public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Orgmode (.org) to Markdown (.md) not handling in-page link correctly
@ 2020-12-02 21:25 TRS-80
       [not found] ` <2e5032e461d6c74bef1c4226956bf7b9-C7oIis/24ff2zvSPaPeTFA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: TRS-80 @ 2020-12-02 21:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hallo,

First time I ever emailed this list.  I would like to thank everyone for
all their hard work.  I think Pandoc is the neatest thing since sliced
bread and I recommend it to people all the time.  :)

I ran into small issue recently, trying to convert Orgmode to Markdown.
I was using command line (v 2.9.2.1-1+b1, amd64, Debian Testing):

```
pandoc -f org -t commonmark README.org
```

I actually tried all flavors of Markdown as output, as I recall all had
the same result.  Which was that an inline link to somewhere in the same
page did not end up in the output correctly.  Example:

```
[[*Setup][Setup]]
```

Which in Orgmode is a link to the headline Setup on the same page, with
the description "Setup."

However this gets converted to italicized text, instead of a link for
some reason?  Output becomes:

```
*Setup*
```

I don't know enough about pandoc internals to know whether it's on the
Orgmode part or the Markdown part, or somewhere in between.

As instructed on Help page[0], I searched both the mailing list as well
as GitHub issues but did not seem to find anything related.  So I
thought the best first step might be to start here on the mailing list.

Cheers,
TRS-80

[0] https://pandoc.org/help.html


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

* Re: Orgmode (.org) to Markdown (.md) not handling in-page link correctly
       [not found] ` <2e5032e461d6c74bef1c4226956bf7b9-C7oIis/24ff2zvSPaPeTFA@public.gmane.org>
@ 2020-12-02 21:50   ` Joost Kremers
       [not found]     ` <87k0tzop2m.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2020-12-02 22:09   ` John MacFarlane
  1 sibling, 1 reply; 5+ messages in thread
From: Joost Kremers @ 2020-12-02 21:50 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Wed, Dec 02 2020, TRS-80 wrote:
[...]
> ```
> [[*Setup][Setup]]
> ```
>
> Which in Orgmode is a link to the headline Setup on the same page, with
> the description "Setup."
>
> However this gets converted to italicized text, instead of a link for
> some reason?  Output becomes:
>
> ```
> *Setup*
> ```
>
> I don't know enough about pandoc internals to know whether it's on the
> Orgmode part or the Markdown part, or somewhere in between.

It's apparently the Org reader: if you use the native output format, the output
contains the following (I used "Go to Setup" as the link description):

Para [Emph [Str "Go",Space,Str "to",Space,Str "Setup"]

So the Org reader reads the link as emphasised text.



-- 
Joost Kremers
Life has its moments


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

* Re: Orgmode (.org) to Markdown (.md) not handling in-page link correctly
       [not found] ` <2e5032e461d6c74bef1c4226956bf7b9-C7oIis/24ff2zvSPaPeTFA@public.gmane.org>
  2020-12-02 21:50   ` Joost Kremers
@ 2020-12-02 22:09   ` John MacFarlane
       [not found]     ` <m24kl3q2qh.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2020-12-02 22:09 UTC (permalink / raw)
  To: TRS-80, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


I don't know the answer -- if Albert Krewinkel sees this,
he'll be able to answer.  (If you don't hear anything,
go ahead and create an issue.)

I like your email name.  A large part of my programming
education consisted in writing video games on a neighbor's
TRS-80!


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

* Re: Orgmode (.org) to Markdown (.md) not handling in-page link correctly
       [not found]     ` <m24kl3q2qh.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-12-02 22:56       ` TRS-80
  0 siblings, 0 replies; 5+ messages in thread
From: TRS-80 @ 2020-12-02 22:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

> On 2020-12-02 17:09, John MacFarlane wrote:
> I don't know the answer -- if Albert Krewinkel sees this,
> he'll be able to answer.  (If you don't hear anything,
> go ahead and create an issue.)

Appreciate that, will do.

> I like your email name.  A large part of my programming
> education consisted in writing video games on a neighbor's
> TRS-80!

One of my earliest experiences with a computer, was on one in elementary
school, hence the moniker!  :)

Cheers,
TRS-80


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

* Re: Orgmode (.org) to Markdown (.md) not handling in-page link correctly
       [not found]     ` <87k0tzop2m.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2020-12-03  8:18       ` Albert Krewinkel
  0 siblings, 0 replies; 5+ messages in thread
From: Albert Krewinkel @ 2020-12-03  8:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Joost Kremers writes:

> On Wed, Dec 02 2020, TRS-80 wrote:
> [...]
>> ```
>> [[*Setup][Setup]]
>> ```
>>
>> Which in Orgmode is a link to the headline Setup on the same page, with
>> the description "Setup."
>>
>> However this gets converted to italicized text, instead of a link for
>> some reason?  Output becomes:
>>
>> ```
>> *Setup*
>> ```
>>
>> I don't know enough about pandoc internals to know whether it's on the
>> Orgmode part or the Markdown part, or somewhere in between.
>
> It's apparently the Org reader: if you use the native output format, the output
> contains the following (I used "Go to Setup" as the link description):
>
> Para [Emph [Str "Go",Space,Str "to",Space,Str "Setup"]
>
> So the Org reader reads the link as emphasised text.

Indeed, it's the Org reader that is to blame here. This case is not
handled at all.

What's more is that the conversion from Link to Emph is based on the
behavior of Emacs Org exporters: invalid and unknown links are converted
to emphasized text. So we can't even use a pandoc filter to fix it. We
may want to change that as well.

Please raise an issue on the GitHub issue tracker so we won't forget
about it.


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


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

end of thread, other threads:[~2020-12-03  8:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 21:25 Orgmode (.org) to Markdown (.md) not handling in-page link correctly TRS-80
     [not found] ` <2e5032e461d6c74bef1c4226956bf7b9-C7oIis/24ff2zvSPaPeTFA@public.gmane.org>
2020-12-02 21:50   ` Joost Kremers
     [not found]     ` <87k0tzop2m.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2020-12-03  8:18       ` Albert Krewinkel
2020-12-02 22:09   ` John MacFarlane
     [not found]     ` <m24kl3q2qh.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-12-02 22:56       ` TRS-80

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 NNTP newsgroup(s).