With helm
and in org-mode
insert an internal link to a heading by starting a helm search, selecting the target, and typing C-c l
.
Typing C-h k C-c l
in the helm buffer shows the following description:
C-c l runs the command helm-org-run-insert-link-to-heading-at-marker
(found in helm-org-headings-map), which is an interactive compiled
Lisp function in ‘helm-org.el’.
You can further bind the helm search to something very convenient, C-.
. In .emacs
:
(add-hook 'org-mode-hook
(lambda () (local-set-key (kbd "C-.") 'helm-org-in-buffer-headings))) ;Outline search.
Note: the inserted link is not as messy as with the helm-imenu
method, but does prepend a '*' to the link text:
* Test inserting internal link in org-mode with helm
** A sub-heading target to link to
* Another top-level heading
** Link from here: [[*A sub-heading target to link to]]