emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible? Markdown-syntax for links in org-mode
@ 2006-12-01 19:49 Phil
  2006-12-04 10:52 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Phil @ 2006-12-01 19:49 UTC (permalink / raw)
  To: emacs-orgmode

-----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-----

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

* Possible? Markdown-syntax for links in org-mode
@ 2006-12-01 19:49 Phil
  0 siblings, 0 replies; 3+ messages in thread
From: Phil @ 2006-12-01 19:49 UTC (permalink / raw)
  To: emacs-orgmode

-----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-----

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

* Re: Possible? Markdown-syntax for links in org-mode
  2006-12-01 19:49 Possible? Markdown-syntax for links in org-mode Phil
@ 2006-12-04 10:52 ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2006-12-04 10:52 UTC (permalink / raw)
  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

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

end of thread, other threads:[~2006-12-04 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 19:49 Possible? Markdown-syntax for links in org-mode Phil
2006-12-04 10:52 ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2006-12-01 19:49 Phil

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).