From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: moving some indentation tests Date: Mon, 3 Apr 2017 09:20:01 -0400 Message-ID: References: <878tnj2lap.fsf@tromey.com> <874ly6ft50.fsf@russet.org.uk> <87y3vhd9ud.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1491225628 12261 195.159.176.226 (3 Apr 2017 13:20:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Apr 2017 13:20:28 +0000 (UTC) Cc: Tom Tromey , Emacs discussions To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 03 15:20:24 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 1cv1u0-0001l4-9o for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 15:20:12 +0200 Original-Received: from localhost ([::1]:59363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv1u6-0005O4-6m for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 09:20:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv1tw-0005Kr-Qp for emacs-devel@gnu.org; Mon, 03 Apr 2017 09:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cv1tr-00012Q-85 for emacs-devel@gnu.org; Mon, 03 Apr 2017 09:20:08 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:32770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cv1tr-000127-37 for emacs-devel@gnu.org; Mon, 03 Apr 2017 09:20:03 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id b187so125241082oif.0 for ; Mon, 03 Apr 2017 06:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=wzCeDREvf1/LlTrnele6yVIPTc4tlYcvt0vDSRJcT8c=; b=QCkah3yTF9ga9jw6vdqQlJL1l2XLXhgd02/gWMtgH8acsD5heHd2Ju7mjCD3mu9HeV sJ4wN8WQjKBO0hFZRWwVlfp0m4TP/C2hES3eDchMZyizI7zDnaFx8SGdMkluaVZQu+lY i/qG8EmoYWo2cFfAZ30SG9RDwqy56KcvlBqKZKrS72MZjsXNRBiJffcf2yJhwLz8iHI+ rGW6nc8WSNwI1sjsLB3Y80tHMvLv7myXXy45VsoeshDTc3V0PAxgHUoju+weSQZS58+e 3gxqCcPZGSV6cBUwBF6iZNLYlzJ1D0RA1V7vX1X7jaZlVQ80/6gnI7gKuaXK9Biec9wA pnbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=wzCeDREvf1/LlTrnele6yVIPTc4tlYcvt0vDSRJcT8c=; b=WltR5KqHnpMfgVhVa9EZSe8fLJq8nFLAxOFD8dH4l9YPNXVWp9ycf+cLrGjb7mDee+ n1Mbsq6ziSHPoYCgYmJvJ+LGO65r/uLG329m+/FTjLchTEyUrcbjpLj+Id1bp3uu/IQc fKv/899E7XlplBfZWGojoAwzH2I5jeYKfuVqJk8xEULhN1kS+EqBW/hKevvhfMUwbyya iy100Fx+dJZB8bY/N1O13OIeWVhx9YMaf9sDJpBEMxOgxJ2lvOv7xhHYgkiKFiw8BUpm CfM1hUhcWyACmK5uQY0WGZAINuj/r7y8XD1JaQMtf1Y24jn+4Xbn1KQshdxG3GYkEtyE dcMw== X-Gm-Message-State: AFeK/H0EI2ker9FJm1Y7Iy9bW9+oZKSu65lyO4Ln3pammkWLl+YIn84YFwz8vPucmYfxVucdetQhBDUAi5iO5A== X-Received: by 10.202.74.87 with SMTP id x84mr9716405oia.187.1491225602176; Mon, 03 Apr 2017 06:20:02 -0700 (PDT) Original-Received: by 10.157.80.133 with HTTP; Mon, 3 Apr 2017 06:20:01 -0700 (PDT) In-Reply-To: <87y3vhd9ud.fsf@russet.org.uk> X-Google-Sender-Auth: ej98JKlmXr1onLt7jG1CylM-774 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::235 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:213613 Archived-At: On Mon, Apr 3, 2017 at 7:11 AM, Phillip Lord wrote: >> >> 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? In (ert-deftest indent-sexp ()...) in test/lisp/emacs-lisp/lisp-mode-tests.el where it says ";; Correctly remove indentation". It's fairly simplistic, I just add an increasing number of leading spaces to every line except for blank ones and lines containing "noindent" (that's to avoid string literals). Oh, current master is missing the check for blanks lines though, that's still pending on my local branch: (unless (looking-at "noindent\\|^[[:blank:]]*$") (insert (make-string n ?\s))) > > (assess-roundtrip-indentation= > 'emacs-lisp-mode > " > (assess-with-find-file > \"~/.emacs\" > (buffer-string))") > > returns "t" for me. I meant multi-line string literals in the code being indented. I might be misreading, but I think (assess-roundtrip-indentation= 'emacs-lisp-mode "\ \"a \s\s\s\s\smulti \s\sline string-literal \s\s\swith random leading space\"") would return nil.