[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping the point at the same position in multiple buffers

From: Andreas Politz
Subject: Re: Keeping the point at the same position in multiple buffers
Date: Fri, 22 Aug 2008 01:03:51 +0200
User-agent: Mozilla-Thunderbird (X11/20080724)

Xah wrote:
On Aug 21, 7:39 am, Corey Foote <address@hidden> wrote:
Hi everybody,

When editing several files in Emacs, each in its own buffer, each buffer has 
its own point location. I have Emacs displaying two buffers, each in it's own 
window. I was wondering if there's an easy way to make it so that each of these 
buffers will keep the point at the same place in both buffers (or at least on 
the same line) even though this is not the default behavior.

So, for example, when I press C-n in the current buffer, the other buffer will 
also move it's point to the next line.

You can try “Alt+x 2C-two-columns” (shortuct Ctrl+x 6 2). This split a
window into 2 vertical columns. Page up/down one will also page up/
down the other. However, cursor doesn't follow.

related is a Alt+x follow-mode, which is for viewing one long file in
2 verticle frames as if you have a long monitor.

i'm pretty sure what you want is already implemented somewhere.


Here it is :

scroll-all-mode is an interactive compiled Lisp function in `scroll-all.el'.
(scroll-all-mode &optional arg)

Toggle Scroll-All minor mode.
With arg, turn Scroll-All minor mode on if arg is positive, off otherwise.
When Scroll-All mode is on, scrolling commands entered in one window
apply to all visible windows in the same frame.

Looking at the code it should be easy to extend this to other commands
(like forward-char).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]