Problem . I have two buffers separated side by side. I go to the line in the left buffer, and I want to do something that moves the point in the right buffer to the same line number. For example, if I am on line 26 in the left buffer, I run some kind of macro and voila. I am on line 26 in the right buffer.
Things I tried that didn't work as I liked (or at all):
scroll-all-mode. It works if the buffers are synchronized to start (for example, the point is on the same line number in both buffers), and if I adhere to the basic line movement. But it quickly loses sync if I isearch-forward-regexpor page-up / page-down. If there was a team that could “re-synchronize”, then this solves my problem.- Store the current line number in the register and use this register value in
goto-line. Saving and restoring positions always returns to the same buffer.
source
share