From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Checking in files with trailing white space Date: Mon, 04 Apr 2016 22:05:11 +0200 Message-ID: References: <56F038E3.2080003@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459800355 32389 80.91.229.3 (4 Apr 2016 20:05:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 20:05:55 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 04 22:05:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1anAkp-0001BJ-E6 for ged-emacs-devel@m.gmane.org; Mon, 04 Apr 2016 22:05:43 +0200 Original-Received: from localhost ([::1]:60899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anAko-0005Cz-IY for ged-emacs-devel@m.gmane.org; Mon, 04 Apr 2016 16:05:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anAkQ-00058x-ON for emacs-devel@gnu.org; Mon, 04 Apr 2016 16:05:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anAkN-0004tr-EM for emacs-devel@gnu.org; Mon, 04 Apr 2016 16:05:18 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:48424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anAkN-0004th-7D for emacs-devel@gnu.org; Mon, 04 Apr 2016 16:05:15 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1anAkJ-0006tT-FM; Mon, 04 Apr 2016 22:05:13 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEV8LTEVEDWpwc95Z3KV n5f4+PfWwgebAAACUklEQVQ4jXWUy3bjIBBE8WP2xvLsIx77oMZ7Q6N9gtX//yspEPZkMxwfCeuK 7qoSklJn46y+qKNpR3XQfWDWQNEap99AtZFNCQ0YUYr1AGeAaEoa4GQGUce91qwvA9jRIvdarfup gbOZBzB7E4c/A1waOJ87OBoDMdkLZqkD3KsuvYmetL43EA57iw5UnvUafgMoUc1Lfl4l6b9NlX6v aHajeJkBWKXLufs+7kCJYMW1ekmX+9wDAcDp5GVT+vqt70mt26HdelS6JysPpW8AQfntcXsgyw7g 7Uvp6VuvVsnXOQ+gkYZ/dqDWKqUYNwDE+Yo5wB+Rko353MFlMYjjsLYVAGYH824U3WUAZNq01qYX 4EPJk4oX2Yr5aD0kXVvwzAtKmMKLKPOpTgBP/wFAFKVEnFhURBS6pbGpaiMVl7kwsWu+ZW5A7gJA ZbWEUQC81A5ELC8U70/OuAFPDld2UBM5omyZbxM/mugBNq0p6Gxx0JNrCwYoU1jIllwi8S3e32Cb Jrql4niiyJb8GzwnooXC+gwUKep/K2YKtCyLrzFiDS1vQMwFDmQLcE78BhsuxsTsawM6tih3MFEf frMxckm3lw8bqMBHkMoUY0n0AqlVpinBT9AIgGmAJaF24CgC46SvYfId1P3tmifIg27qG78DVO5P T8bAbhqqMKu1+j1oqeYl1xW+vYCZqWJr7IBzmjaYZ+tiDHgZ3V5qK1DpLI62hMi6uLI3t+3TgOae cnaYF46xA+xJB120JMJeNYZbng14j58Rs25NDjZoKYhRyX/GD76yzr8rivSgAAAAAElFTkSuQmCC In-Reply-To: <56F038E3.2080003@cs.ucla.edu> (Paul Eggert's message of "Mon, 21 Mar 2016 11:09:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202714 Archived-At: Paul Eggert writes: > Another possibility is to design your own escape convention for > trailing white space and remove it just before the test. You could > strip backslash just before newline, say. This will be more robust in > the presence of tools that routinely strip trailing white space. I kinda wanted to keep the HTML files and the results as close to the input/output from eww as possible. That is, you can just say `M-x eww-open-file' on the HTML test files and twiddle the shr code until it looks right, and then you copy the output to the .txt file. That's a really convenient way to create the regression test cases. > If you do keep trailing whitespace, please check that it survives > editing the file by an Emacs configured something like this: > > (setq whitespace-action '(auto-cleanup)) > (setq whitespace-style '(trailing empty)) > (global-whitespace-mode t) > > as this is how I edit Emacs source code. Yeah, the files do not survive editing with those values. > I assume you can do this by setting local variables in the affected > files. I've never played around with local variables in text files. Can these local variables be put into a dot file of some kind? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no