From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Temporarily disable a write hook? Date: Fri, 14 Jul 2017 22:11:00 +0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500045117 22480 195.159.176.226 (14 Jul 2017 15:11:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 15:11:57 +0000 (UTC) Cc: Help GNU Emacs To: Skip Montanaro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 14 17:11:54 2017 Return-path: Envelope-to: geh-help-gnu-emacs@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 1dW2Fy-0005UP-Ou for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 17:11:50 +0200 Original-Received: from localhost ([::1]:38468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW2G4-0004nW-70 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 11:11:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW2FW-0004mj-Sz for help-gnu-emacs@gnu.org; Fri, 14 Jul 2017 11:11:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dW2FW-00010V-4v for help-gnu-emacs@gnu.org; Fri, 14 Jul 2017 11:11:22 -0400 Original-Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:35960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dW2FV-000107-W6 for help-gnu-emacs@gnu.org; Fri, 14 Jul 2017 11:11:22 -0400 Original-Received: by mail-io0-x22d.google.com with SMTP id z62so15933486ioi.3 for ; Fri, 14 Jul 2017 08:11:21 -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:content-transfer-encoding; bh=luuZJH2IlL+E6a+PUtS7YG4hIboeV2imTXW40Kaeodc=; b=U+ySu6XpJfsS6bJXPlMVKmIP6GAwY5GCaKktOu4sDWFhpW03TkFxwH4BuBII8MUpgm 3NJUWLg9g+++3yTAit7MXBldVy+f+02rNbuNGyoV0BJmtHvEP29YEw8ROhi5ATGMENZR aM9KislF9238rD5IGycNMDTmkDME5HWn6b6mqYsQmxNBNkuEW+11jtE7rhRVW+gDgldG fb6rV+LfJmSKL7Fk8I1mjS2HCvTnLhfX/mCP9WOAKiXxaxgkQVPcU2jzgDXbOsm5pfc/ 4O45OHli8oziR7gJ7GXTLhESW5L2epaKGjl7Z9nMm5YsEOmPc3GREga4JuoVrf9ZgQJw alWw== 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:content-transfer-encoding; bh=luuZJH2IlL+E6a+PUtS7YG4hIboeV2imTXW40Kaeodc=; b=qJL/ziGGZrwc8FGZNvperY2fNea9VxwKMeJR8ZbPB0udkYeEyefVQWMjOOK/p6jUL4 fjaxEkYLWx5o5uWjMUdkSGLDCGdBU2yVV0Wovb6114tvkxXh+cdRvbQR4WNUHqcEuN1I Cuk8RxuafBnQ7uDqWHOFhGT3Tl+X3QwLKVo/oHDOt0zyl1RYepbalbZe/5XfGmYh/KAy jKc6UrjqX8UddIYsjOpuNezM1c+uijUuVvebmcftJiHz0Iw+D014+IjgCbj1bWdgXv1v zaNRX1xKd7RpEI4cycwZrt1E4kKi0UabJiqzxEAHRIhbiWhuPv4kMGokr+RWBtkbBPdC QJPA== X-Gm-Message-State: AIVw113cD515oEHVxy/gmb0IBEUNO/4SToqmRaN6W0kvtxxf81AtLAkG 5zkya/eLmPuapLi1rdTHVBjfdQWjtA== X-Received: by 10.107.12.28 with SMTP id w28mr9905438ioi.150.1500045081240; Fri, 14 Jul 2017 08:11:21 -0700 (PDT) Original-Received: by 10.79.128.213 with HTTP; Fri, 14 Jul 2017 08:11:00 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: wwv3CnZs8L5yilHsSWQ6gkzisAU X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113765 Archived-At: On Fri, Jul 14, 2017 at 10:03 PM, Skip Montanaro wrote: > (add-hook 'before-save-hook 'delete-trailing-whitespace) > > Well, I got burned by this. I was editing a CSV file in which one cell > in the last column of a row ended with a space. It was, unfortunately, > a regular expression, so the space was significant. Are you in full control of how this CSV file is edited? If you are, you could double-quote the cell that has the significant trailing space. (Of course this assumes a specification-compliant parser.) On the other hand, if that CSV file is intermediate data subject to import/export, that won=E2=80=99t help.