From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Possible? Markdown-syntax for links in org-mode Date: Mon, 4 Dec 2006 11:52:45 +0100 Message-ID: References: <88F220E2-A7DD-4570-AA1D-1ED9FDB85229@snapup.net> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GrBRR-0000Y2-BF for emacs-orgmode@gnu.org; Mon, 04 Dec 2006 05:52:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GrBRO-0000UR-7U for emacs-orgmode@gnu.org; Mon, 04 Dec 2006 05:52:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrBRO-0000U6-10 for emacs-orgmode@gnu.org; Mon, 04 Dec 2006 05:52:54 -0500 Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GrBRN-0007Dv-Uq for emacs-orgmode@gnu.org; Mon, 04 Dec 2006 05:52:54 -0500 In-Reply-To: <88F220E2-A7DD-4570-AA1D-1ED9FDB85229@snapup.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Phil Cc: emacs-orgmode Hi Phil, this is currently not possible. I guess my solution would be to create a special command to insert links, similar to C-c C-l in org-mode. If you then bind this function also to C-c C-l in whatever mode you are using for writing markdown, this command would prompt you for link and description just like the Org-mode command, but then insert the markdown syntax into the buffer. Something like: (defun my-insert-markdown-link (link description title) "Insert a markdown link." (interactive "sLink: \nsDescription: \nsTitle: ") (if (string-match "\\S-" title) ;; we do have a non-empty title (insert (format "[%s](%s \"%s\")" description link title)) (insert (format "[%s](%s)" description link)))) (add-hook 'my-markdown-mode-hook (lambda () (define-key (current-local-map) "\C-c\C-l" 'my-insert-markdown-link))) "my-markdown-mode-hook" must be the correct hook for the mode you are using. Hope this helps. - Carsten On Dec 1, 2006, at 20:49, Phil wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm using Markdown on my wordpress-powered-blog and I'm always > confused when switching applications, because the syntax is different: > > + org-mode: [[LINK-TEXT][URL]] > documentation: > http://staff.science.uva.nl/~dominik/Tools/org/org.html#Hyperlinks > > + markdown: [LINK-TEXT](URL "optional TITLE") > documentation: > http://daringfireball.net/projects/markdown/syntax#link > > QUESTION: Is there a way to setup org-mode to use the markdown-syntax? > > regards from Berlin > > - - Phil > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (Darwin) > > iD8DBQFFcIdMuJlsHqDZFGYRAhCRAJ0ZjWxXzh+Tz03060yJNqFcaODGNwCfayn6 > R0eNy37oPszVlflhUOFIXEo= > =oG+1 > -----END PGP SIGNATURE----- > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477