Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8FE264196F0 for ; Thu, 3 Jun 2010 17:29:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.8 X-Spam-Level: X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VPvcA0852iE9 for ; Thu, 3 Jun 2010 17:29:38 -0700 (PDT) Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU [18.7.68.35]) by olra.theworths.org (Postfix) with ESMTP id 54717431FC1 for ; Thu, 3 Jun 2010 17:29:38 -0700 (PDT) X-AuditID: 12074423-b7c0bae0000030f0-ed-4c0848f1ba27 Received: from mailhub-auth-4.mit.edu (MAILHUB-AUTH-4.MIT.EDU [18.7.62.39]) by dmz-mailsec-scanner-6.mit.edu (Symantec Brightmail Gateway) with SMTP id 1E.E8.12528.1F8480C4; Thu, 3 Jun 2010 20:29:37 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id o540TaSO028733 for ; Thu, 3 Jun 2010 20:29:36 -0400 Received: from localhost.localdomain (ET-SIXTY.MIT.EDU [18.208.1.60]) (authenticated bits=0) (User authenticated as davidben@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o540TWgG011376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 3 Jun 2010 20:29:36 -0400 (EDT) From: David Benjamin To: notmuch@notmuchmail.org Subject: [PATCH] Don't involve the shell in notmuch searches Date: Thu, 3 Jun 2010 20:29:32 -0400 Message-Id: <1275611372-5810-1-git-send-email-davidben@mit.edu> X-Mailer: git-send-email 1.7.1.1.gee92 X-Brightmail-Tracker: AAAAAA== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2010 00:29:48 -0000 The shell isn't needed to interpret any of the arguments, so don't bother using it at all. Signed-off-by: David Benjamin --- emacs/notmuch.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 57e1140..874ccb9 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -710,10 +710,10 @@ The optional parameters are used as follows: (erase-buffer) (goto-char (point-min)) (save-excursion - (let ((proc (start-process-shell-command + (let ((proc (start-process "notmuch-search" buffer notmuch-command "search" (if oldest-first "--sort=oldest-first" "--sort=newest-first") - (shell-quote-argument query)))) + query))) (set-process-sentinel proc 'notmuch-search-process-sentinel) (set-process-filter proc 'notmuch-search-process-filter)))) (run-hooks 'notmuch-search-hook))) -- 1.7.1.1.gee92