Is it possible to have the default bookmark name ( when we add a bookmark ) as the "name of the file: line number" instead of prompting us everytime ? Trying to get the bookmark+.el package be similar to bm.el.
A:
You can customize the bookmark-make-record-function
variable to a new routine which creates a default name that you want:
(setq bookmark-make-record-function 'my-bookmark-make-record-default)
(defun my-bookmark-make-record-default ()
"add on a default name for the bookmark"
(cons (format "%s:%d" (bookmark-buffer-name) (line-number-at-pos (point)))
(bookmark-make-record-default)))
Note: this makes the default name be what you requested (file:line), but you're still prompted - just press RET to accept the new name.
Trey Jackson
2010-10-10 22:16:01