From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mead Subject: Re: requested feature Date: Mon, 15 Nov 2010 15:01:09 +0000 Message-ID: <87zktahbre.fsf@gmail.com> References: <87k4kfvh0y.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=56276 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PI0Yv-00058Y-Th for emacs-orgmode@gnu.org; Mon, 15 Nov 2010 10:01:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PI0Yo-0007Oj-Vf for emacs-orgmode@gnu.org; Mon, 15 Nov 2010 10:01:40 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:41222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PI0Yo-0007OS-Nh for emacs-orgmode@gnu.org; Mon, 15 Nov 2010 10:01:34 -0500 Received: by wwe15 with SMTP id 15so236497wwe.0 for ; Mon, 15 Nov 2010 07:01:33 -0800 (PST) In-Reply-To: (Marvin Doyley's message of "Mon, 15 Nov 2010 09:01:42 -0500") 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: Marvin Doyley Cc: David Maus , emacs-orgmode@gnu.org 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 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 wrote: > > At Fri, 29 Oct 2010 19:24:32 -0400, > Marvin Doyley wrote: > > > > [1 =C2=A0] > > [1.1 =C2=A0] > > 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 >=20=20=20=20 > Maybe something like this: >=20=20=20=20 > (defun dmj:turn-word-into-org-mode-link () > =C2=A0"Replace word at point by an Org mode link." > =C2=A0(interactive) > =C2=A0(let ((word (thing-at-point 'word))) > =C2=A0 =C2=A0(when word > =C2=A0 =C2=A0 =C2=A0(re-search-backward "\\W" nil t) > =C2=A0 =C2=A0 =C2=A0(replace-string > =C2=A0 =C2=A0 =C2=A0 word (format "[[file:%s.org][%s]]" word word) t) > =C2=A0 =C2=A0 =C2=A0(point) (+ (point) (length word))))) >=20=20=20=20 > Grab word at point, go to its beginning, replace with an Org mode > link. >=20=20=20=20 > Best, > =C2=A0-- David > -- > OpenPGP... 0x99ADB83B5A4478E6 > Jabber.... dmjena@jabber.org > Email..... dmaus@ictsoc.de > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode