On Wed, 11 Jan 2012 08:20:56 +0000, David Edmondson <[email protected]> wrote:
> On Tue, 10 Jan 2012 21:54:02 +0200, Jani Nikula <[email protected]> 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=all")))
> > +      (setq args (append args '("--reply-to=sender"))))
> >      (setq args (append args (list query-string)))
> 
> I don't like how this ends up. How about something like:
> 
> (defun notmuch-mua-reply (query-string &optional sender)
>   (let (headers
>       body
>       (args (nconc (list "reply"
>                            (concat "--reply-to="
>                                    (if reply-all "all" "sender")))
>                    (when notmuch-show-process-crypto
>                      (list "--decrypt"))
>                    (list query-string))))

What about using ‘format’:

(let (...
      (args (format "reply --reply-to=%s %s %s"
                    (if reply-all "all" "sender")
                    (if notmuch-show-process-crypto "--decrypt" "")
                    query-string)))
  ...)

It’s still not beautiful, but maybe it is better?

-- 
Aaron Ecay
_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to