unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Bernardo <bernardo.bacic@pobox.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to create the patch from current file
Date: Wed, 15 Jul 2009 20:34:29 +1000	[thread overview]
Message-ID: <4A5DB0B5.8040505@pobox.com> (raw)
In-Reply-To: <87ab36jnco.fsf@iki.fi>



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




      parent reply	other threads:[~2009-07-15 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  9:22 how to create the patch from current file Michal
2009-07-15  9:40 ` Teemu Likonen
2009-07-15  9:52   ` Pascal J. Bourguignon
2009-07-15 15:04   ` Michal
2009-07-15  9:46 ` Pascal J. Bourguignon
     [not found] ` <87ab36jnco.fsf@iki.fi>
2009-07-15 10:34   ` Bernardo [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=4A5DB0B5.8040505@pobox.com \
    --to=bernardo.bacic@pobox.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).