From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gordon Beaton Newsgroups: gmane.emacs.help Subject: Re: Show unsaved changes (as diff) Date: 25 Sep 2007 05:54:11 GMT Organization: - Message-ID: <46f8a282$0$3210$8404b019@news.wineasy.se> References: <85tzplo37k.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1190702476 7492 80.91.229.12 (25 Sep 2007 06:41:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2007 06:41:16 +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 08:41:12 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 1Ia46Z-0001Bh-Qv for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Sep 2007 08:41:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ia46W-0002qP-Cm for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Sep 2007 02:41:08 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fi.sn.net!newsfeed2.fi.sn.net!news.song.fi!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Linux) Original-Lines: 28 Original-NNTP-Posting-Host: cube.smaltan.org Original-X-Trace: 1190699651 news.wineasy.se 3210 195.42.215.17:61807 Original-X-Complaints-To: abuse@tdcsong.se Original-Xref: shelby.stanford.edu gnu.emacs.help:152320 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:47829 Archived-At: On Mon, 24 Sep 2007 18:44:58 +0100, Martin Fischer wrote: > by the way, is it possible to use this in some way with the more > "readable" representation of ediff and how could it be done > (moderate lisp knowledge) ? Not ediff, but I use this: (defun tkdiff-buffer-with-file () "Use tkdiff to compare the current buffer with the disk file contents." (interactive) (if (and (buffer-file-name) (file-exists-p (buffer-file-name))) (let ((temp-file (make-temp-file (concat "/tmp/buffer-" (file-name-nondirectory (buffer-file-name)) "-")))) (save-restriction (widen) (write-region (point-min) (point-max) temp-file nil 'nomessage) (set-process-sentinel (start-process "tkdiff" nil "tkdiff" (buffer-file-name) temp-file) `(lambda (process event) (if (file-exists-p ,temp-file) (delete-file ,temp-file)))))) (message "Current buffer is not associated with any existing file"))) /gordon --