unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Keeping the point at the same position in multiple buffers
Date: Fri, 22 Aug 2008 01:03:51 +0200	[thread overview]
Message-ID: <1219359948.356266@arno.fh-trier.de> (raw)
In-Reply-To: <6c0dd113-e258-4bee-96fa-c8bf1952795f@w24g2000prd.googlegroups.com>

Xah wrote:
> On Aug 21, 7:39 am, Corey Foote <coreyfo...@hotmail.com> 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



  reply	other threads:[~2008-08-21 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.17246.1219329568.18990.help-gnu-emacs@gnu.org>
2008-08-21 21:47 ` Keeping the point at the same position in multiple buffers Xah
2008-08-21 23:03   ` Andreas Politz [this message]
2008-08-22  5:57 martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2008-08-21 14:39 Corey Foote
2008-08-21 16:04 ` Alex Bennee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1219359948.356266@arno.fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).