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]]
Something like this seems to do approximately what you want:
#+BEGIN_SRC emacs-lisp
(defun word-to-link ()
(interactive)
(save-excursion
(let (start end word)
(backward-word)
(setq start (point))
(forward-word)
(setq end (point))
(setq word (buffer-subs
Hello there,
Is there a shortcut to change word under cursor to an internal link?
Basically it is a pain trying to surround with two braces all the time!
C-c C-l does not prompt me to create an internal link.
Best regards,
Chai