help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to create the patch from current file


From: Bernardo
Subject: Re: how to create the patch from current file
Date: Wed, 15 Jul 2009 20:34:29 +1000
User-agent: Thunderbird 2.0.0.22 (X11/20090605)



Teemu Likonen said the following on 15/07/09 19:40:
On 2009-07-15 11:22 (+0200), Michal wrote:

Imagine the following situation:
I just changed some part of file, but did not save it.
Now I want to create a patch comparing to the original file.
Do You know any emacs command that would do it for me?

 1) M-x diff-buffer-with-file

 2) Save the file with C-u C-u C-x C-s, that is, the normal save command
    with two prefix arguments. It will force the previously saved file
    to become backup file and the current version is saved as the main
    file. Then compare them.

an alternative is (before saving the file) to type:
C-x s d
this will show you the diff

if you bail out with C-g you can still switch back to *Diff* buffer and save it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]