From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 827C5429E21 for ; Wed, 11 Jan 2012 14:08:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 f5Q-k3pgBpxZ for ; Wed, 11 Jan 2012 14:08:36 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9A6B1431FB6 for ; Wed, 11 Jan 2012 14:08:36 -0800 (PST) Received: by eaah10 with SMTP id h10so540062eaa.26 for ; Wed, 11 Jan 2012 14:08:34 -0800 (PST) Received: by 10.213.15.12 with SMTP id i12mr277597eba.107.1326319713765; Wed, 11 Jan 2012 14:08:33 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id u53sm11140517eeu.6.2012.01.11.14.08.30 (version=SSLv3 cipher=OTHER); Wed, 11 Jan 2012 14:08:31 -0800 (PST) From: Jani Nikula To: Aaron Ecay , David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH v3 2/4] emacs: add support for replying just to the sender In-Reply-To: References: <069a0cddd4e848314fb64da861b3bf5b4f053f14.1326224339.git.jani@nikula.org> User-Agent: Notmuch/0.10.2+193~ga73a411 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Thu, 12 Jan 2012 00:08:29 +0200 Message-ID: <8762gh3naa.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Wed, 11 Jan 2012 22:08:47 -0000 On Wed, 11 Jan 2012 16:15:30 -0500, Aaron Ecay wrote: > On Wed, 11 Jan 2012 08:20:56 +0000, David Edmondson wrote: > > On Tue, 10 Jan 2012 21:54:02 +0200, Jani Nikula wrote: > > > -(defun notmuch-mua-reply (query-string &optional sender) > > > +(defun notmuch-mua-reply (query-string &optional sender reply-all) > > > (let (headers > > > body > > > (args '("reply"))) > > > (if notmuch-show-process-crypto > > > (setq args (append args '("--decrypt")))) > > > + (if reply-all > > > + (setq args (append args '("--reply-to=3Dall"))) > > > + (setq args (append args '("--reply-to=3Dsender")))) > > > (setq args (append args (list query-string))) > >=20 > > I don't like how this ends up. How about something like: > >=20 > > (defun notmuch-mua-reply (query-string &optional sender) > > (let (headers > > body > > (args (nconc (list "reply" > > (concat "--reply-to=3D" > > (if reply-all "all" "sender"))) > > (when notmuch-show-process-crypto > > (list "--decrypt")) > > (list query-string)))) >=20 > What about using =E2=80=98format=E2=80=99: >=20 > (let (... > (args (format "reply --reply-to=3D%s %s %s" > (if reply-all "all" "sender") > (if notmuch-show-process-crypto "--decrypt" "") > query-string))) > ...) >=20 > It=E2=80=99s still not beautiful, but maybe it is better? I don't think it works. The arguments to call-process need to be a list, not a string. BR, Jani.