Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't push mark as much #159
(This is tested in latex and org-mode)
In my configuration I have to pop mark 8 times before I'm finally taken to the previous location. I understand
Thanks for the great package!
Yeah, I've wanted to solve this issue, but never been able to do so in a good way.
This is some code from my emacs settings which alleviates the problem somewhat:
;; When popping the mark, continue popping until the cursor actually moves ;; Also, if the last command was a copy - skip past all the expand-region cruft. (defadvice pop-to-mark-command (around ensure-new-position activate) (let ((p (point))) (when (eq last-command 'kill-ring-save) ad-do-it ad-do-it ad-do-it) (dotimes (i 10) (when (= p (point)) ad-do-it))))
I use something similar from endless parentheses
(defun modi/multi-pop-to-mark (orig-fun &rest args) "Call ORIG-FUN until the cursor moves. Try the repeated popping up to 10 times." (let ((p (point))) (dotimes (i 10) (when (= p (point)) (apply orig-fun args))))) (advice-add 'pop-to-mark-command :around #'modi/multi-pop-to-mark)
and set this