Function: bookmark-insert

bookmark-insert is an autoloaded, interactive and byte-compiled function defined in bookmark.el.gz.

Signature

(bookmark-insert BOOKMARK-NAME)

Documentation

Insert the text of the file pointed to by bookmark BOOKMARK-NAME.

BOOKMARK-NAME is a bookmark name (a string), not a bookmark record.

You may have a problem using this function if the value of variable bookmark-alist is nil. If that happens, you need to load in some bookmarks. See help on function bookmark-load for more about this.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
;;;###autoload
(defun bookmark-insert (bookmark-name)
  "Insert the text of the file pointed to by bookmark BOOKMARK-NAME.
BOOKMARK-NAME is a bookmark name (a string), not a bookmark record.

You may have a problem using this function if the value of variable
`bookmark-alist' is nil.  If that happens, you need to load in some
bookmarks.  See help on function `bookmark-load' for more about
this."
  (interactive (list (bookmark-completing-read "Insert bookmark contents")))
  (bookmark-maybe-historicize-string bookmark-name)
  (bookmark-maybe-load-default-file)
  (let ((orig-point (point))
	(str-to-insert
	 (save-current-buffer
           (bookmark-handle-bookmark bookmark-name)
	   (buffer-string))))
    (insert str-to-insert)
    (push-mark)
    (goto-char orig-point)))