[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to create the patch from current file
From: |
Pascal J. Bourguignon |
Subject: |
Re: how to create the patch from current file |
Date: |
Wed, 15 Jul 2009 11:46:06 +0200 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) |
Michal <rabbitko@tenbit.pl> writes:
> Hallo group readers.
>
> 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?
C-x C-w newfile RET
M-x diff RET newfile RET oldfile RET
Eventually: M-x rename-file RET newfile RET oldfile RET
to override the oldfile by the newfile.
> Optionally I can imagine that this might even be possible after I saved
> a file. Then file~ could be used as a version before changes?
Don't count on it. The time when a backup file is created is not
always what you'd want it to be.
--
__Pascal Bourguignon__