help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporarily disable a write hook?


From: Yuri Khan
Subject: Re: Temporarily disable a write hook?
Date: Fri, 14 Jul 2017 22:11:00 +0700

On Fri, Jul 14, 2017 at 10:03 PM, Skip Montanaro
<skip.montanaro@gmail.com> 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’t help.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]