From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0IrlLd5r514CdAAA0tVLHw (envelope-from ) for ; Mon, 15 Jun 2020 12:38:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eLHyKd5r516FHQAA1q6Kng (envelope-from ) for ; Mon, 15 Jun 2020 12:38:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A4C1E94050A for ; Mon, 15 Jun 2020 12:38:53 +0000 (UTC) Received: from localhost ([::1]:38296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkoO2-00081y-Qk for larch@yhetil.org; Mon, 15 Jun 2020 08:38:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkZhN-0000A5-Ro for emacs-orgmode@gnu.org; Sun, 14 Jun 2020 16:57:49 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:55581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkZhL-0003RL-Fn for emacs-orgmode@gnu.org; Sun, 14 Jun 2020 16:57:49 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 58B9340C for ; Sun, 14 Jun 2020 16:57:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 14 Jun 2020 16:57:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jiby.tech; h= from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=KXdDghr0fldfGf0nWy4+wrffzs836VzsKcil9Ro3ZEE=; b=eaBzDhh9 l2/kzGhSdZUBE1C+3ttRc4kySwiVmf+Bi4bnCtFg+F7cTmdvvZA/dmK7aULNBOJk cexL70hQ463GfkdMbO+L13Ut32zdz0SgA2xcNLYBzMbAeiK7RKfSC1FlgsPzZpb6 LNKB9ZE8n464DHf1kqfQ9SUSP5P5YO/rxB6O1R0S8cprrGQUV6IfrLOQnI4Rnl1h pbsdII4524tSwB0vVOZFSkGEBU1llTXJaDGPnhmxANH0HxFdLqV3/sv4ST5aRmRC YMT48p2hsns6ZkdUvNrkfvoLtzP3z8pnnPCkqnPyg9mCdZUlxyvtakfXuDYS7kJC Lhx2qf3Ju/qEjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=KXdDghr0fldfGf0nWy4+wrffzs836 VzsKcil9Ro3ZEE=; b=NNk8NfkzlhDHDag1ZrMZt+B4y4eW3i0j0NCCuZTXdAaoT XHbVrN0vz4MXI3lFhPY99hITyYyhURvOiA2ulNtd3PaN3Nfd86CE/bdSRKiSq9Bd 5wx1E2Q0v+vvr/y/V/IBy5D+kbutOzdbqUYvN+gtIpPEBC9fZvIZEgd0FTK4WJ+N 3M4Qrlh7ikrQIQr5N/smA/4xgqsb2ty9JXkzxHfHxSsWCV5UNwMHkU+r8UG1OzL+ wvmQ4dPhNM9vN4r7hjXhmxPlG1itZxyrgF14oiganl+H/l/7pOIvHVBEXUCwL9An uFjFvnaaFnJPB/e/Z18icWEqB81iT7U6Hmi0/rXpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiiedgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehmtderre dtredtnecuhfhrohhmpeflsgcuoehjsgesjhhisgihrdhtvggthheqnecuggftrfgrthht vghrnhepjedvgeejteefffehgedttdekhfeghefhgeetgeehvdetvedtteeiffejjedufe fhnecuffhomhgrihhnpehmohguihdrohhrghdphhgvrdhnvghtnecukfhppedukeehrdei hedrudefgedrvdefvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjsgesjhhisgihrdhtvggthh X-ME-Proxy: Received: from xeo (unknown [185.65.134.232]) by mail.messagingengine.com (Postfix) with ESMTPA id A0F8F328005E for ; Sun, 14 Jun 2020 16:57:42 -0400 (EDT) User-agent: mu4e 1.2.0; emacs 26.3 From: Jb To: emacs-orgmode@gnu.org Subject: [PATCH] Add markdown support to contrib/org-man export Date: Sun, 14 Jun 2020 21:56:55 +0100 Message-ID: <87eeqhv014.fsf@jb.jiby.tech> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.147.123.25; envelope-from=jb@jiby.tech; helo=wout2-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/14 16:57:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Mon, 15 Jun 2020 08:37:28 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=jiby.tech header.s=fm1 header.b=eaBzDhh9; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=NNk8Nfkz; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: ebAmysXJ1ENi --=-=-= Content-Type: text/plain; format=flowed Hey Org-mode enthusiasts, Find attached a patch adding export of manual links for markdown. I wanted to get links to man pages to work nicely for my blog using ox-hugo, an org exporter based on markdown, built by well-known org enthusiast Kaushal Modi. Org snippet to demonstrate export to markdown feature: --8<---------------cut here---------------start------------->8--- I sure love [[man:emacs][GNU Emacs]]. --8<---------------cut here---------------end--------------->8--- org-md-export-to-markdown before (link description missing, booh): --8<---------------cut here---------------start------------->8--- I sure love http://man.he.net/?topic=emacs§ion=all. --8<---------------cut here---------------end--------------->8--- Export to markdown after (pretty, valid markdown, yey): --8<---------------cut here---------------start------------->8--- I sure love [GNU Emacs](http://man.he.net/?topic=emacs§ion=all). --8<---------------cut here---------------end--------------->8--- This is my first contribution (I welcome feedback regarding patch formatting etc). No FSF papers due to contrib/. Happy I can finally contribute /something/ back, and scratching that itch feels nice. Have a fantastic day. -- Jb --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-contrib-ol-man.el-Add-markdown-support-to-org-man-ex.patch >From c7c2fe978a134347a0b6c30667015c687803eb12 Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Sun, 14 Jun 2020 21:19:20 +0100 Subject: [PATCH] contrib/ol-man.el: Add markdown support to org-man export --- contrib/lisp/ol-man.el | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/lisp/ol-man.el b/contrib/lisp/ol-man.el index 580556a..5cb7e01 100644 --- a/contrib/lisp/ol-man.el +++ b/contrib/lisp/ol-man.el @@ -68,6 +68,7 @@ PATH should be a topic that can be thrown at the man command." ((eq format 'latex) (format "\\href{%s}{%s}" path desc)) ((eq format 'texinfo) (format "@uref{%s,%s}" path desc)) ((eq format 'ascii) (format "%s (%s)" desc path)) + ((eq format 'md) (format "[%s](%s)" desc path)) (t path)))) (provide 'ol-man) -- 2.20.1 --=-=-=--