[PATCH v3 2/4] emacs: add support for replying just to the sender

Jani Nikula jani at nikula.org
Wed Jan 11 00:45:35 PST 2012


On Wed, 11 Jan 2012 08:20:56 +0000, David Edmondson <dme at dme.org> wrote:
> On Tue, 10 Jan 2012 21:54:02 +0200, Jani Nikula <jani at nikula.org> wrote:
> > Provide reply to sender counterparts to the search and show reply
> > functions. Add key binding 'R' to reply to sender, while keeping 'r' as
> > reply to all, both in search and show views.
> 
> All looks fine. My only comments are nits.
> 
> > -(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))))
> 
> But even that is not very nice.

I think the original looks better, and is easier to grasp, even if it's
perhaps not as lispy. Besides, the last time you thought this was fine
(id:"cunehv91e05.fsf at hotblack-desiato.hh.sledj.net"), and the patch
hasn't changed since. ;)

BR,
Jani.


More information about the notmuch mailing list