This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

comparing two files

3 posts · 4366 views

Hello,
I have two files text1 and text2. these two file share some lines in common. I want to find out what are not common.
assume contents of files:
text1:
a
b
c
and text2:
a
r
h
b
w
e
c

so I guess line comparision is good. I used perl to get my job done but want to know how to do it in emacs. I have started learning emacs-lisp. Any piece of code would be helpful.

Thanks

Re: comparing two files

Take a look at the function diff-buffer-with-file and the others functions started by diff.

Re: comparing two files

Also check out ediff-files and relatives like ediff-buffers. They're easy to use, and ediff-revision is good with version control.