Org-mode mailing list
 help / color / mirror / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "turbo.cafe@clovermail.net" <turbo.cafe@clovermail.net>
Cc: emacs-orgmode@gnu.org, TEC <tecosaur@gmail.com>
Subject: Re: [PATCH] ox-md.el/markdown-hyperlink
Date: Fri, 22 Jan 2021 00:13:14 -0500
Message-ID: <875z3ptuz9.fsf@kyleam.com> (raw)
In-Reply-To: <874km51v6o.fsf@clovermail.net>

[ Sorry for the delay. ]

turbo.cafe@clovermail.net writes:

> exporting to markdown loses radio target hyperlinks.

Thanks for the patch, and thanks TEC for testing it out.

Pushed (3916a5740).

> Subject: [PATCH] ox-md.el/markdown-hyperlink
>
> * ox-md.el (org-md-link): format markdown hyperlink from org radio target

The subject you posted in the other thread at
<https://orgmode.org/list/87wnz2fa2h.fsf@atk.sk> was a bit more
descriptive, so I've used that and made a few other tweaks to the commit
message when applying.

> diff --git a/lisp/ox-md.el b/lisp/ox-md.el
> index 1d20c04f4..a63815e43 100644
> --- a/lisp/ox-md.el
> +++ b/lisp/ox-md.el
> @@ -543,7 +543,13 @@ INFO is a plist holding contextual information.  See
>       ((string= type "coderef")
>        (format (org-export-get-coderef-format path desc)
>  	      (org-export-resolve-coderef path info)))
> -     ((equal type "radio") desc)
> +     ((string= type "radio")
> +      (let ((destination (org-export-resolve-radio-link link info)))
> +	(if (not destination) desc
> +	  (format "<a href=\"#%s\"%s>%s</a>"
> +		  (org-export-get-reference destination info)
> +		  ""

I dropped this second argument, which is unnecessary (and I suspect a
leftover from copying and adjusting what's in ox-html).

> +		  desc))))


      parent reply	other threads:[~2021-01-22  5:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  6:40 turbo.cafe
2021-01-03 10:06 ` TEC
2021-01-22  5:13 ` Kyle Meyer [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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

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

  git send-email \
    --in-reply-to=875z3ptuz9.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    --cc=turbo.cafe@clovermail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git