From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: sandro dentella Newsgroups: gmane.emacs.help Subject: Re: ediff & No newline at end of file Date: Sat, 21 Jun 2008 10:45:52 +0200 Message-ID: <20080621084552.GA4217@ubuntu> References: <871w2r2no5.fsf@thievol.homelinux.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214039997 21325 80.91.229.12 (21 Jun 2008 09:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2008 09:19:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thierry Volpiatto Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 21 11:20:42 2008 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 1K9zGy-00005U-83 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jun 2008 11:20:40 +0200 Original-Received: from localhost ([127.0.0.1]:50485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9zG8-0006CG-TI for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jun 2008 05:19:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K9zFg-0006C7-6L for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 05:19:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K9zFe-0006BR-90 for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 05:19:19 -0400 Original-Received: from [199.232.76.173] (port=52005 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9zFd-0006B7-3Z for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 05:19:17 -0400 Original-Received: from adsl-161-130.38-151.net24.it ([151.38.130.161]:49369 helo=casa.e-den.it) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9zFc-0006Wp-B2 for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 05:19:16 -0400 Original-Received: by casa.e-den.it (Postfix, from userid 1000) id 22E8D1CCE717; Sat, 21 Jun 2008 10:45:53 +0200 (CEST) Content-Disposition: inline In-Reply-To: <871w2r2no5.fsf@thievol.homelinux.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-Greylist: delayed 1991 seconds by postgrey-1.27 at monty-python; Sat, 21 Jun 2008 05:19:07 EDT 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:55021 Archived-At: On Sat, Jun 21, 2008 at 10:32:42AM +0200, Thierry Volpiatto wrote: > sandro dentella writes: > > > On 21 Giu, 07:03, Thierry Volpiatto > > wrote: > >> Hi, > >> that will not correct your problem but help in the future. > >> > >> ,---- > >> | ;; Add newline at end of files > >> | (setq require-final-newline t) > >> `---- > >> Now when you edit a file and you save it it will have a newline at end. > > > > > > I already have it, the fact is that I use if with files generated by > > others as well... > You can easily write a small function that take as args file1 and file2 > and modify these files before calling ediff. > something like: my wrote my 'emadiff' as: for f in $1 $2 do if [ $(tail -n1 $f|wc -c |sed 's/ //') -gt 0 ] ; then echo -e "\n" >> $f fi done #gnuclient --eval "(ediff-buffers \"$f1\" \"$f2\")" $f1 $f2 emacs --eval "(ediff-files \"$1\" \"$2\")" so does exactly what you suggest, but I think is a workaround that I'd like to avoid. It seems strange to me that emacs just stops working when it could just issue a waring on nothing at all. I'd expect a configuration parameter to silent it as there's a configuration parameter that says "add a newline at the end". Thanks anyhow sandro *:-)