From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: diffs between a buffer and the underlying file Date: Thu, 14 Sep 2006 09:13:11 +0200 Organization: disorganized Message-ID: <87sliuly48.fsf@robotron.kosmorama> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158218664 16325 80.91.229.2 (14 Sep 2006 07:24:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2006 07:24:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 14 09:24:14 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNlZp-0002LV-Vw for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 09:24:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNlZp-00076J-Dg for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 03:24:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNlZQ-00075d-Sy for help-gnu-emacs@gnu.org; Thu, 14 Sep 2006 03:23:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNlZP-00075R-6W for help-gnu-emacs@gnu.org; Thu, 14 Sep 2006 03:23:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNlZP-00075O-1M for help-gnu-emacs@gnu.org; Thu, 14 Sep 2006 03:23:35 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GNlbI-0007zV-F6 for help-gnu-emacs@gnu.org; Thu, 14 Sep 2006 03:25:32 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GNlZC-0002EM-Mo for help-gnu-emacs@gnu.org; Thu, 14 Sep 2006 09:23:23 +0200 Original-Received: from e178035134.adsl.alicedsl.de ([85.178.35.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Sep 2006 09:23:22 +0200 Original-Received: from david.hansen by e178035134.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Sep 2006 09:23:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-To: help-gnu-emacs@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178035134.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:AUtDmDkC6b9VHDRYnvW8Q2pJ4AA= 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:37362 Archived-At: On 14 Sep 2006 08:19:28 +0200 Urs Thuermann wrote: > I sometimes get into the following situation: I open a file, make > some changes, then I want to see the changes before saving the file. > The best way to do this seems to be to set the region to the whole > buffer, write the region to some temporary file, and run diff on the > two files. But I find this very unconvenient. > > I'd like to have a function in emacs which can be applied to a buffer, > say buffer A, that opens a new buffer displaying all the changes > between the buffer A and the disk file, opened in buffer A. > > Searching the emacs documentation I haven't found anything like this. > Only functions for diff'ing two buffers or two files. M-x apropos RET diff.*buf RET gives me (GNU Emacs 22) as the first hit: diff-buffer-with-file Command: View the differences between BUFFER and its associated file. But maybe Emacs/20.7 is a bit old... David