emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Word under cursor to internal link


From: Leu Zhe
Subject: [O] Word under cursor to internal link
Date: Fri, 19 Dec 2014 10:45:09 +0900

You can use the function below to make it.
But in order to replace it rightly, you need to put you cursor inside the word or at the beginning of the word.

(defun word-to-link ()
  (interactive)
  (let ((word (thing-at-point 'word)))
    (forward-word)
    (kill-word -1)
    (insert (format "[[%s]]" word))))

Hope it helps. And any improvement will be welcome.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]