From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Temporarily suppress a hook? Date: Sun, 8 Jul 2018 19:02:15 -0500 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1531094485 7180 195.159.176.226 (9 Jul 2018 00:01:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 00:01:25 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 02:01:20 2018 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 1fcJcF-0001lZ-SA for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 02:01:20 +0200 Original-Received: from localhost ([::1]:38614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcJeN-0008Au-2I for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 20:03:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcJdd-00089g-M8 for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 20:02:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcJdc-0006bQ-Tu for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 20:02:45 -0400 Original-Received: from mail-pl0-x235.google.com ([2607:f8b0:400e:c01::235]:43604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcJdc-0006av-Oc for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 20:02:44 -0400 Original-Received: by mail-pl0-x235.google.com with SMTP id c41-v6so5168372plj.10 for ; Sun, 08 Jul 2018 17:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wuawMf8CtyjVUrmm2MvygRycNeFSldbfV9Kuw2zFBXg=; b=uHN1208JlUz7S2P0KxVQajwa95gb0mar2J34f/0nUNrl9naYZJ8hYTEDT+Md9XOh4+ KdJLrNdxwKfWBG5TU4N+rLuk5TwKmPdGhbWb/OK91u1lHEkr7ASD7oMr2IKAOC3qWecn 1IW57idHsDaC23UCb1/9iRwi+v3G64kQ6jkaLZb0jvDkzoU0jl5iDvC98ubzUYWnqjyI IRyPgKZijEdBU0C5/8TlCIwoFSxbQ3oiriqI0zCK3Q5ZLbhTsayexUuVc47LTJoVfJHi GwCDoNvjqzOzeJ+alXaH1uRP6ePEOQTSb3ify/tbTBHjQZ4193gzM5XITkwhBchEh8O6 +Rcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wuawMf8CtyjVUrmm2MvygRycNeFSldbfV9Kuw2zFBXg=; b=XtfA7DJeCB1NGtzw1x31Iyc9dHQAbxG2sC/rqRp4ZqAIrfaZS8+dxJEJu5b5kFg6nO e0jL8Rrv5LrtWLmtFKueVCgH6oV6igK/pDXBgcxkHC4IPen3J4UPe5g2bv5dJN7joN5q 1baXwwRKS/ZEDUngs2Da5qbXhUTml8jD69VaIX0vHLtHaRNvRqSvBSaRbZXAw0mEOy7T 8BkXy099LVLrMjWnMakNRSHH4nRcMQ7nvjE6hxCBo261baznD70WIZXRjaQ/p/PeEpGp tWoY6tuIb6O83S6nDf/ckObc7bBds8vx6Y1SLuzCajIy3GqStbhYFui+Op3rguKL3Ec5 NSNQ== X-Gm-Message-State: APt69E3cB8Wm3cYbdSbDq+Cwq7LjZawmZW1w6FK565h9fud3ku6BBUwh E/YYTw2TB6SJtxoS9hUCfMRMJukdTZbJsb/vhP4xiYvlpf8i X-Google-Smtp-Source: AAOMgpe49Fv62KjuW85C9VO/ryy28UPCPJaggbujfcqvL2i6m8KtMDbBmnJm1ct1NNxnWQ5NIigJEkgwHSzLIxIhwKE= X-Received: by 2002:a17:902:b18e:: with SMTP id s14-v6mr16763083plr.44.1531094561953; Sun, 08 Jul 2018 17:02:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::235 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:117389 Archived-At: I have before-save-hook defined in ~/.emacs (add-hook 'before-save-hook 'delete-trailing-whitespace) This is useful almost all the time. I just discovered a case where it's not so helpful (a file full of regular expressions to feed into "grep -E -f ..." I can think of various ways to tweak the regular expressions to not require trailing whitespace, but let's assume for a moment that's not possible. Is it possible to suppress the before-save-hook on a per-file basis? Thx, Skip