[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: howto: 2 users interactively edit the same file ?
From: |
Tim X |
Subject: |
Re: howto: 2 users interactively edit the same file ? |
Date: |
30 Oct 2005 15:29:02 +1100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Matt Carlson <mrcarlso@cs.purdue.edu> writes:
> Hi all,
> I'm trying to figure out how to accomplish the following: My friend
> and I need to work with the same file at the same time. It would be
> nice to be able to code simultaneously and see each others changes
> in something like real time. I've googled everywhere and found only
> information on how emacs handles locks.. I'd like both he and I to
> be able to edit the same file and see each others changes as close to
> instantaneously as possible.
>
> The sky is the limit with emacs, so I'm sure there's a way to do this,
> I'm just in need of some direction as to how to do it, or even what
> words to google.
>
> It would be very nice to have a shell open in one buffer to chat
> with the other person editing the file, and then the file we're both
> editing open in another.. Thanks in advance,
>
> -regards,
> Matt
>
I would say fairly confidently, you have not a hope in hell of doing
what you want. It is actaully very complicated to achieve multiple
real-time editing of a document and emacs has none of the necessary
infrastructure to achieve this. Issues which would need to be resolved
(most non-trivial) include -
1. Emacs does its editing in buffers and changes are only written
to disk when you save the buffer. There is no way for two eamcs
instances to communicate information regarding buffer
contents. There is also no way to ensure one user doesn't save
the file and then have it over written by the second user when
they save the file.
2. Conflict resolution. If two users change the same section of
text at about the same time, which one will take precedence?
In a way, what you want is a shared buffer which two separate emacs
sessions can operate on at the same time. This would need shared
memory with a coordination layer which would ensure both users have
equal access to modifying the memory and some way of rsolving conflict
and merging changes. Very difficult.
About the best you can do would be to use CVS to manage the
files. Using CVS won't give you real-time, but it will simplify the
merging of changes. You would have to ensure you both inform the other
once you have made some changes and checked them into CVS. There will
be times when CVS cannot resolve conflict - in these situations, you
will have to work it out together.
tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
- howto: 2 users interactively edit the same file ?, Matt Carlson, 2005/10/26
- Re: howto: 2 users interactively edit the same file ?, Tim X, 2005/10/31
- Re: howto: 2 users interactively edit the same file ?, Eli Zaretskii, 2005/10/31
- Re: howto: 2 users interactively edit the same file ?, kgold, 2005/10/31
- Re: howto: 2 users interactively edit the same file ?, Matt Carlson, 2005/10/31