From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: moving some indentation tests Date: Mon, 03 Apr 2017 12:11:38 +0100 Message-ID: <87y3vhd9ud.fsf@russet.org.uk> References: <878tnj2lap.fsf@tromey.com> <874ly6ft50.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1491217959 31335 195.159.176.226 (3 Apr 2017 11:12:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Apr 2017 11:12:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: Tom Tromey , Emacs discussions To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 03 13:12:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuzuM-0006in-09 for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 13:12:26 +0200 Original-Received: from localhost ([::1]:58553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuzuQ-0000Cg-5n for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 07:12:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuztg-0000CZ-6W for emacs-devel@gnu.org; Mon, 03 Apr 2017 07:11:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuztd-0007lu-EX for emacs-devel@gnu.org; Mon, 03 Apr 2017 07:11:44 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:38892) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuztd-0007le-40 for emacs-devel@gnu.org; Mon, 03 Apr 2017 07:11:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Yr16Tr2atMem9l9PUE0H1pv9xLoo632wHs6qcdrOcTw=; b=QMrbXM5YQTKs3aLPGZA/iq+Jd NgWaKe92B/0l5W9FQ69rucoGTyapPW3RYJ17yXSZfBKZea3eYCfQgc5ss7T6vWdC5HXC1cOKP4FLT vmJhDl9ADFLp6OPIYPkkMxL8BhoXfzFmRfBSzhZW+SKBuPIelkytyceTzybc+H2hM+2xNeS4LgUji XoVPR3V6U6VWWWpPoPLBTgfFN5K2m8WaVvxOfjjjbC9mrwhcfMSrzQ1Z5LVTNxAtdxl1tvzQ8Zqy/ L01DFVPXsc2WBZCOmWry8uE0ifWil+oxM1lR0QU4EIkE0hxEkVZNhTdVL0bsJkyzDZMXQYWMkM7jN A3Er17PVw==; Original-Received: from janus-nat-128-240-225-75.ncl.ac.uk ([128.240.225.75]:32809 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88) (envelope-from ) id 1cuzta-0003nJ-LY; Mon, 03 Apr 2017 11:11:38 +0000 In-Reply-To: (Noam Postavsky's message of "Sun, 2 Apr 2017 17:02:45 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 78.129.138.110 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213611 Archived-At: Noam Postavsky writes: > On Sun, Apr 2, 2017 at 4:31 PM, Phillip Lord wrote: >> >> My own package, assess, provides good support for this kind of >> functionality. In particular, you can do this: >> >> >> (assess-roundtrip-indentation= >> 'emacs-lisp-mode >> " >> (assess-with-find-file >> \"~/.emacs\" >> (buffer-string))") > > For indent-sexp tests I just wrote this sort of thing in line (see > test/lisp/emacs-lisp/lisp-mode-tests.el). Would have been handy to > have some pre-written functions for it. After a quick glance I think > there are two issues that would get in the way of using the code > currently in assess for those tests though (ignoring the non-Emacs > deps). > > I found that adding indentation and then reindenting turned up some > different bugs than removing indentation and reindenting. It looks > like assess only does the latter right now. Indeed it does. Do you have an example of the former? I am not sure exactly the test proceedure that you are thinking of but I'd be happy to add this. I think this kind of thing is why having pre-rolled functions is good; getting this right is worth the effort. > Also, AFAICT, it doesn't preserve indentation inside multi-line string > literals. It should do. This example: (assess-roundtrip-indentation= 'emacs-lisp-mode " (assess-with-find-file \"~/.emacs\" (buffer-string))") returns "t" for me. Phil