Function: projectile-bookmark--default-name
projectile-bookmark--default-name is a byte-compiled function defined
in projectile.el.
Signature
(projectile-bookmark--default-name ROOT)
Documentation
Return the suggested name for a new bookmark at point in ROOT.
That's the name bookmark-make-record suggests (normally the file or
buffer name), prefixed with the project's name. Buffers bookmark.el
cannot record at all (those visiting neither a file nor a directory,
unless their mode knows how to bookmark itself) are refused with a
user-error rather than with a bare error and a backtrace.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-bookmark--default-name (root)
"Return the suggested name for a new bookmark at point in ROOT.
That's the name `bookmark-make-record' suggests (normally the file or
buffer name), prefixed with the project's name. Buffers `bookmark.el'
cannot record at all (those visiting neither a file nor a directory,
unless their mode knows how to bookmark itself) are refused with a
`user-error' rather than with a bare error and a backtrace."
(concat (projectile-bookmark--name-prefix root)
;; Without this binding the record's name falls back to that of
;; the bookmark last used, which has nothing to do with the
;; location being bookmarked now.
(let ((bookmark-current-bookmark nil))
(condition-case err
(bookmark-name-from-full-record (bookmark-make-record))
(user-error (signal (car err) (cdr err)))
(error (user-error "%s" (error-message-string err)))))))