i'm starting use quite heavily commands c-x r w , c-x r j store windows configuration registers , recall them @ later point, find bit annoying cursor positions stored per time when window configuration saved.
basically cursor positions not stored (or updated automatically), whenever "jump" stored window configuration same view when last visited it, not when created it.
any ideas? Ángel
if take source code
(defun window-configuration-to-register (register &optional arg) ... (set-register register (list (current-window-configuration) (point-marker))))
you'll see stores point second argument. re-define
(defun my-window-configuration-to-register (register &optional arg) (interactive "cwindow configuration register: \np") (set-register register (list (current-window-configuration) nil)))
and redefine c-x r w shortcut use my-window-configuration-to-register
(define-key (current-global-map) (kbd "c-x r w") 'my-window-configuration-to-register)
or define advice
(defadvice window-configuration-to-register (after window-configuration-to-register-no-point activate) "avoid storing current buffer's position in register. want stay on last used position, not jump saved one" (set-register register (list (current-window-configuration) nil)))
the problem brings error message when jump it. may redefine jump-to-register
avoid it
Comments
Post a Comment