emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: Marvin Doyley <marvinpas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: requested feature
Date: Sun, 14 Nov 2010 20:31:25 +0100	[thread overview]
Message-ID: <87k4kfvh0y.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <AANLkTi=kX4gnLc9h55NFcPgke=Ga1=uDwEnQrhCx9_5v@mail.gmail.com>

[-- Attachment #1.1: Type: text/plain, Size: 1013 bytes --]

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."
  (let ((word (thing-at-point 'word)))
    (when word
      (re-search-backward "\\W" nil t)
       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

  -- David
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.

  reply	other threads:[~2010-11-14 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 23:24 requested feature Marvin Doyley
2010-11-14 19:31 ` David Maus [this message]
2010-11-15 14:01   ` Marvin Doyley
2010-11-15 15:01     ` Paul Mead
2010-11-15 18:02       ` David Maus
2010-11-15 18:23         ` Marvin Doyley
2010-11-16 19:43           ` Suvayu Ali

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:

  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=87k4kfvh0y.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=marvinpas@gmail.com \


* 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


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