emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)]
@ 2021-05-11 15:26 Phil Marneweck
  2021-05-12  5:05 ` Tim Cross
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Marneweck @ 2021-05-11 15:26 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi

Is this by design?

I expected to following

[[file:some-file.org::#some-heading][some text]]

to translate to this

[some text](some-file.md#some-heading)

So in org-md-link I would have thought that the default would be more like
this

(t (if (not desc) (format "<%s>" path)
 (format "[%s](%s%s)" desc path (or (org-element-property :search-option
link) ""))))

You would of course have to do some sanity checking on search-option to
just take care of id versus headline searches etc.

Regards
Phil

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

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

* Re: Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)]
  2021-05-11 15:26 Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)] Phil Marneweck
@ 2021-05-12  5:05 ` Tim Cross
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Cross @ 2021-05-12  5:05 UTC (permalink / raw)
  To: emacs-orgmode


Phil Marneweck <haragx@gmail.com> writes:

> Hi
>
> Is this by design? 
>
> I expected to following
>
> [[file:some-file.org::#some-heading][some text]] 
>
> to translate to this
>
> [some text](some-file.md#some-heading)
>
> So in org-md-link I would have thought that the default would be more like this
>
> (t (if (not desc) (format "<%s>" path)
>  (format "[%s](%s%s)" desc path (or (org-element-property :search-option link) ""))))
>
> You would of course have to do some sanity checking on search-option to just take care of id versus headline searches etc.
>

I'm not sure if this is by design or because of limitations in the
markdown dialect used by org mode (see
http://daringfireball.net/projects/markdown) or just a bug. My
suspicion, after a quick review of the markdown syntax on the
daringfireball site is that search links are not supported.

This is one of those examples of the problems arising from a format type
which does not have a specification. There are numerous different
markdown dialects and org had to select one. Problem is, everyone gets
use to a particular dialect and then is often disappointed when org's
dialect does not match their expectations. One reason we also have the
github flavoured markdown exporter.


-- 
Tim Cross


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

end of thread, other threads:[~2021-05-12  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 15:26 Q: ox-md does not translate link searches to #bookmarks in markdown [9.4.4 (release_9.4.4 @ /snap/emacs/current/usr/share/emacs/27.2/lisp/org/)] Phil Marneweck
2021-05-12  5:05 ` Tim Cross

Code repositories for project(s) associated with this 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).