When insert org links with org-insert-link, an Org Links buffer is created.
How can I hide it?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityAfter investigating the definition of the command (pressing M-. org-insert-link
),
I modified the body by commenting these lines out
;; (org-switch-to-buffer-other-window "*Org Links*")
;; (with-current-buffer "*Org Links*"
;; (erase-buffer)
;; (insert "Insert a link.
;; Use TAB to complete link prefixes, then RET for type-specific completion support\n")
;; (when org-stored-links
;; (insert "\nStored links are available with <up>/<down> or M-p/n \
;; \(most recent with RET):\n\n")
;; (insert (mapconcat #'org-link--prettify
;; (reverse org-stored-links)
;; "\n")))
;; (goto-char (point-min)))
;; (let ((cw (selected-window)))
;; (select-window (get-buffer-window "*Org Links*" 'visible))
;; (with-current-buffer "*Org Links*" (setq truncate-lines t))
;; (unless (pos-visible-in-window-p (point-max))
;; (org-fit-window-to-buffer))
;; (and (window-live-p cw) (select-window cw)))
and it seems to be working fine without displaying Org Links buffer, though you may have to test this for a while. It's tedious to do this every time org receives an update. Try redefining the function without the mentioned lines if it works for you.