[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: requested feature
From: |
Paul Mead |
Subject: |
[Orgmode] Re: requested feature |
Date: |
Mon, 15 Nov 2010 15:01:09 +0000 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) |
This looks pretty interesting to me, but how would you change this so
that it used the whole heading text, not just one word?
Paul
Marvin Doyley <address@hidden> writes:
> Hi David,
>
> This is exactly what I was looking for, thank you.
>
> cheers
> M
>
> On Sun, Nov 14, 2010 at 2:31 PM, David Maus <address@hidden> wrote:
>
> At Fri, 29 Oct 2010 19:24:32 -0400,
> Marvin Doyley wrote:
> >
> > [1 <multipart/alternative (7bit)>]
> > [1.1 <text/plain; ISO-8859-1 (7bit)>]
> > Does anybody have a function that turns a org header into file with a
> link
> > to the file where it originated from ?
> > For example, lets say I have the following heading
> >
> > * Apples
> > * Cherry
> > * Tomatoes
> >
> > Lets say I have a mini project on Apples, it would be nice to issue a
> single
> > command that turns Applies into Apples.org with a link
>
> Maybe something like this:
>
> (defun dmj:turn-word-into-org-mode-link ()
> "Replace word at point by an Org mode link."
> (interactive)
> (let ((word (thing-at-point 'word)))
> (when word
> (re-search-backward "\\W" nil t)
> (replace-string
> word (format "[[file:%s.org][%s]]" word word) t)
> (point) (+ (point) (length word)))))
>
> Grab word at point, go to its beginning, replace with an Org mode
> link.
>
> Best,
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... address@hidden
> Email..... address@hidden
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode