Last active
January 17, 2016 16:32
-
-
Save yveszoundi/4ed6e60b4294472edd50 to your computer and use it in GitHub Desktop.
ELISP-Jump easily to a file register using completing-read (default, IDO or Helm)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun jump-to-file-register () | |
"Jump to a file register using completing-read" | |
(interactive) | |
(let* ((reg-list (cl-loop for ptr-reg in register-alist | |
when (eq 'file (first (last ptr-reg))) | |
collect (concat (char-to-string (car ptr-reg)) "|" (cdr (last ptr-reg))))) | |
(reg-data (completing-read "Pick file register: " reg-list)) | |
(reg-location (string-to-char (car (split-string reg-data "|"))))) | |
(jump-to-register reg-location))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment