[PATCH 1/1] Make buttons for attachments allow viewing as well as saving
Mark Walters
markwalters1009 at gmail.com
Tue Jan 17 01:06:11 PST 2012
> > I wonder if the "problem" comes from me doing things in a non-lispy
> > fashion (I am completely new to lisp). Thus
> > notmuch-show-part-button-default-action is a variable that gets passed
> > around rather than a function.
>
> Sorry, I should have looked at the bigger context in this patch. I
> think Jameson was implying that notmuch-show-part-button-default
> should change to
>
> (defun notmuch-show-part-button-default (&optional button)
> (interactive)
> (funcall notmuch-show-part-button-default-action button))
>
> I would go one step further and say that each action should probably
> be a separate function. That is, break notmuch-show-part-action into
> separate functions and simply invoke the appropriate function, rather
> than performing a fixed data dispatch. This would be more flexible
> and Lispy. It may be that your approach works out better, but I'd at
> least give this a shot.
I am happy to make that change. My original patch in the summer was more
like that:
id:"CALUdzSWAto+4mCUOOMk+8vFs+Pog-xUma6u-Aqx2M6-sbyQROg at mail.gmail.com"
Is that more what you had in mind? (Only in broad terms: Obviously I
would need to add in the customization and default function etc). I
decided that I didn't like the code duplication (but I am completely new
to lisp) which is why I changed it for this submission.
Best wishes
Mark
More information about the notmuch
mailing list