unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Dziulko <weaselboy1976@yahoo.com>
Subject: Re: Trying to merge two files with emacs... need help!
Date: Wed, 12 May 2004 05:21:15 -0700 (PDT)	[thread overview]
Message-ID: <20040512122115.19419.qmail@web41807.mail.yahoo.com> (raw)
In-Reply-To: <b0141914.0405111925.7f5756e1@posting.google.com>


[-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --]

Gary Z <gzimak@yahoo.com> wrote:
I'm new to emacs and I'm trying to use it to merge two files into one.
Some time ago, I watched a co-worker step through a file and
selectively merge changes into it from another file. Unfortunately, I
don't recall how he did it! Currently, I'm opening a file with emacs,
selecting diff (2 files) from the menu, specifying the current file
and the file I want to merge into the current file. I hit the space
bar and the first difference is displayed. I am able to accept what is
in buffer a or buffer b, but I can't figure out how to combine both of
them. The buffers look something like this:

Buffer A
here is the first line.
here is the second line.

Buffer B
here is the third line.
here is the fourth line.

The result that I want is:

here is the first line.
here is the second line.
here is the third line.
here is the fourth line.

Any ideas on how I can do this? I guess it's tricky because emacs
views it as a conflict, but I want to combine everything, not choose
one or the other.

Thanks,
Gary
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

If what you are doing isn't different from your example, you can use insert file.  Just open new buffer C, hit cntrl-x, then i, type fileA.  The do the same to insert fileB right after A.  If you're trying to inter-mix lines from A and lines from B, that's a different stotry ...


		
---------------------------------
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2' 

[-- Attachment #1.2: Type: text/html, Size: 1995 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

      parent reply	other threads:[~2004-05-12 12:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12  3:25 Trying to merge two files with emacs... need help! Gary Z
2004-05-12  6:00 ` Eli Zaretskii
     [not found] ` <mailman.4725.1084338189.1061.help-gnu-emacs@gnu.org>
2004-05-12 11:50   ` Gary Z
2004-05-12 20:42     ` Eli Zaretskii
2004-05-12 20:44     ` LEE Sau Dan
2004-05-12 12:21 ` Kevin Dziulko [this message]

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=20040512122115.19419.qmail@web41807.mail.yahoo.com \
    --to=weaselboy1976@yahoo.com \
    /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).