From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: requested feature Date: Sun, 14 Nov 2010 20:31:25 +0100 Message-ID: <87k4kfvh0y.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============1682551632==" Return-path: Received: from [140.186.70.92] (port=52583 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHiIa-0008T0-5b for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 14:31:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHiIT-0007zh-HV for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 14:31:35 -0500 Received: from mailout110.xlhost.de ([213.202.242.110]:55982 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHiIT-0007zB-Bw for emacs-orgmode@gnu.org; Sun, 14 Nov 2010 14:31:29 -0500 In-Reply-To: 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: emacs-orgmode@gnu.org --===============1682551632== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Nov_14_20:31:25_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Sun_Nov_14_20:31:25_2010-1 Content-Type: text/plain; charset=US-ASCII At Fri, 29 Oct 2010 19:24:32 -0400, Marvin Doyley wrote: > > [1 ] > [1.1 ] > 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.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sun_Nov_14_20:31:25_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkzgOQ0ACgkQma24O1pEeOZCYAEAzzzEJo2MFVjaVA1aOndcCALd IBOYqZjnAycdpea9IhEBAJyt0T1o90eb3X8VhjaHrX/+GumpoKXFhxtUX8KJdpz+ =rwt/ -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Nov_14_20:31:25_2010-1-- --===============1682551632== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1682551632==--