From: Yuri Khan <yuri.v.khan@gmail.com>
To: Skip Montanaro <skip.montanaro@gmail.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Temporarily disable a write hook?
Date: Fri, 14 Jul 2017 22:11:00 +0700 [thread overview]
Message-ID: <CAP_d_8XvPBA7QLOB_yoDAny+=-4XZt3U6f2MTABpv1d+vNQPzQ@mail.gmail.com> (raw)
In-Reply-To: <CANc-5UzAS=+XXQ5CeUT6OnqspsGHvpiODN935xPK3xydTF27bQ@mail.gmail.com>
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.
next prev parent reply other threads:[~2017-07-14 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 15:03 Temporarily disable a write hook? Skip Montanaro
2017-07-14 15:11 ` Yuri Khan [this message]
2017-07-14 15:43 ` Skip Montanaro
2017-07-14 16:13 ` Lele Gaifax
2017-07-14 17:29 ` Skip Montanaro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP_d_8XvPBA7QLOB_yoDAny+=-4XZt3U6f2MTABpv1d+vNQPzQ@mail.gmail.com' \
--to=yuri.v.khan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=skip.montanaro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).