From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Show unsaved changes (as diff) Date: Tue, 25 Sep 2007 09:14:28 +0200 Message-ID: <874phjnrmz.fsf@thievol.homelinux.org> References: <85tzplo37k.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1190707865 22919 80.91.229.12 (25 Sep 2007 08:11:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2007 08:11:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 10:11:00 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ia5VM-0000Ev-9f for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Sep 2007 10:10:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ia5VJ-0002H8-4l for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Sep 2007 04:10:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ia5Tk-0001gI-Ry for help-gnu-emacs@gnu.org; Tue, 25 Sep 2007 04:09:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ia5Tj-0001fo-VT for help-gnu-emacs@gnu.org; Tue, 25 Sep 2007 04:09:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ia5Tj-0001fe-Hu for help-gnu-emacs@gnu.org; Tue, 25 Sep 2007 04:09:11 -0400 Original-Received: from sp604003mt.neufgp.fr ([84.96.92.56] helo=smTp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ia5Tj-0001jP-5B for help-gnu-emacs@gnu.org; Tue, 25 Sep 2007 04:09:11 -0400 Original-Received: from thievol.homelinux.org ([88.141.48.106]) by sp604003mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0JOW00FI5X535FG2@sp604003mt.gpm.neuf.ld> for help-gnu-emacs@gnu.org; Tue, 25 Sep 2007 09:07:51 +0200 (CEST) In-reply-to: Cancel-Lock: sha1:rLwnjYRmwNV/mT1ixjoabe0H03s= Posted-To: gnu.emacs.help Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) X-Detected-Kernel: Windows 98 (3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47831 Archived-At: The following message is a courtesy copy of an article that has been posted to gnu.emacs.help as well. >>>>> "Martin" == Martin Fischer writes: >>>>>> David Kastrup writes: >> Date: Sun, 23 Sep 2007 16:39:59 +0200 >> >> Florian Lorenzen writes: >> >>> Hello, >>> >>> I have a very innocent question, I'm sorry that I could not >>> figure out the answer myself: is there a quick way to ask Emacs >>> to show the unsaved changes in a file's buffer as a diff? >>> Sometimes, I attempt to kill a bufer and Emacs asks me if I want >>> do discard the changes. As my memory is very weak sometimes, I >>> cannot recall what I had changed and if this was important in >>> any way. So, I'd simply like to see what I'd throw away. Of >>> course, I can copy the file's buffer's content to a new buffer, >>> revert the file's buffer and make a diff on these two. But is >>> there something ready-made for this kind of situation, like M-x >>> show-unsaved-changes? >> >> M-x diff-buffer-with-file RET >> >> -- David Kastrup, Kriemhildstr. 15, 44793 Bochum >> Hi, Martin> by the way, is it possible to use this in some way with the Martin> more "readable" representation of ediff and how could it be Martin> done (moderate lisp knowledge) ? Thierry> Hello, you can use C-x s instead of C-x C-s you will have a Thierry> prompt for d (diff) s q etc.. (only with emacs >=22) -- A + Thierry pubkey: http://pgp.mit.edu/