From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: Re: Keeping the point at the same position in multiple buffers Date: Fri, 22 Aug 2008 01:03:51 +0200 Organization: FH-Trier Message-ID: <1219359948.356266@arno.fh-trier.de> References: <6c0dd113-e258-4bee-96fa-c8bf1952795f@w24g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1219362097 27582 80.91.229.12 (21 Aug 2008 23:41:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 23:41:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 01:42:29 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KWJnQ-0005Tc-1i for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Aug 2008 01:42:28 +0200 Original-Received: from localhost ([127.0.0.1]:38431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWJmS-0000Bh-1q for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 19:41:28 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.straub-nv.de!news.k-dsl.de!news.uni-stuttgart.de!news.belwue.de!news.uni-kl.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 143-93-54-11.arno.fh-trier.de Original-X-Trace: news.uni-kl.de 1219359945 26326 143.93.54.11 (21 Aug 2008 23:05:45 GMT) Original-X-Complaints-To: usenet@news.uni-kl.de Original-NNTP-Posting-Date: Thu, 21 Aug 2008 23:05:45 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) In-Reply-To: <6c0dd113-e258-4bee-96fa-c8bf1952795f@w24g2000prd.googlegroups.com> Cache-Post-Path: arno.fh-trier.de!unknown@dslb-084-059-201-160.pools.arcor-ip.net X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) Original-Xref: news.stanford.edu gnu.emacs.help:161525 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56868 Archived-At: Xah wrote: > On Aug 21, 7:39 am, Corey Foote 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. > > Xah > ∑ http://xahlee.org/ > > ☄ 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). -ap