Function: hyrolo-rename
hyrolo-rename is an interactive and byte-compiled function defined in
hyrolo.el.
Signature
(hyrolo-rename OLD-FILE NEW-FILE)
Documentation
Prompt user to rename OLD-FILE to NEW-FILE.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hyrolo.el
(defun hyrolo-rename (old-file new-file)
"Prompt user to rename OLD-FILE to NEW-FILE."
(interactive (if hyperb:microsoft-os-p
'("c:/_rolo.otl" "~/.rolo.otl")
'("~/.rolodex.otl" "~/.rolo.otl")))
(if (and (equal (car (hyrolo-get-file-list)) new-file)
(file-readable-p old-file)
(progn (beep)
(or (hyrolo-prompt
'y-or-n-p
(format "(hyrolo-rename): Rename \"%s\" to the new standard \"%s\"? "
old-file new-file))
;; Setup to get rolo matches from OLD-FILE.
(progn (setq hyrolo-file-list
(cons old-file (cdr (hyrolo-get-file-list))))
nil))))
(progn (rename-file old-file new-file 1)
;; Also rename backup file if it exists.
(when (file-readable-p (concat old-file "~"))
(rename-file (concat old-file "~") (concat new-file "~") 1))
(when (get-file-buffer old-file)
(with-current-buffer (get-file-buffer old-file)
(rename-buffer (file-name-nondirectory new-file))
(setq buffer-file-name (expand-file-name new-file))))
(message "(HyRolo): Your personal rolo file is now: \"%s\"."
new-file))))