From: Carsten Dominik <dominik@science.uva.nl>
To: Phil <phil@snapup.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Possible? Markdown-syntax for links in org-mode
Date: Mon, 4 Dec 2006 11:52:45 +0100 [thread overview]
Message-ID: <e5e5fe9935582abf66aaa23722c816f8@science.uva.nl> (raw)
In-Reply-To: <88F220E2-A7DD-4570-AA1D-1ED9FDB85229@snapup.net>
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
next prev parent reply other threads:[~2006-12-04 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 19:49 Possible? Markdown-syntax for links in org-mode Phil
2006-12-04 10:52 ` Carsten Dominik [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-01 19:49 Phil
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://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5e5fe9935582abf66aaa23722c816f8@science.uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=phil@snapup.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public 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).