-
-
Save alex2600/8a27a4abdb64115b39716a67876d3f8d to your computer and use it in GitHub Desktop.
[emacs] ediff command line launcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# diff and merge two files using emacs ediff-mode | |
import os | |
import os.path | |
import sys | |
if len(sys.argv)<3: | |
sys.stderr.write("Usage: ediff file1 file2") | |
else: | |
file1 = os.path.abspath(sys.argv[1]) | |
file2 = os.path.abspath(sys.argv[2]) | |
cmd = """emacs --eval "(ediff-files \\"%s\\" \\"%s\\")" """ % (file1, file2) | |
print cmd | |
os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment