[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-15 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other prog

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-15 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other prog

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Jameson Graef Rollins
On Sun, 15 Jan 2012 12:16:36 +, Mark Walters wrote: > Define a keymap for attachment buttons to allow multiple actions. > Define 3 possible actions: > save attachment: exactly as currently, > view attachment: uses mailcap entry, > view attachment with user chosen program Great im

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 16 at 11:31 am: > On Sun, 15 Jan 2012 12:16:36 +, Mark Walters gmail.com> wrote: > > Define a keymap for attachment buttons to allow multiple actions. > > Define 3 possible actions: > > save attachment: exactly as currently, > > view attachment: uses

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Mark Walters
(My apologies, owing to various errors on my part the patch has ended up in a separate thread: id:"1326749910-30437-1-git-send-email-markwalters1009 at gmail.com") On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins wrote: > > Keymap on a button is: s for save, v for view and o for view wi

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Austin Clements
Quoth Mark Walters on Jan 16 at 9:44 pm: > On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins finestructure.net> wrote: > > > Keymap on a button is: s for save, v for view and o for view with > > > other program. Default (i.e. enter or mouse button) is save but is > > > easily configurable

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > 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

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 9:06 am: > > > > 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,

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > 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 this the right id? I couldn't find it in the list archive. Sorry I messed up: it should be id:"87mxehqhbl.fsf at r102

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Aaron Ecay
On Tue, 17 Jan 2012 15:26:03 -0500, Austin Clements wrote: > Quoth Mark Walters on Jan 17 at 9:06 am: > > > > > > 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

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 8:39 pm: > > > 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 this the right id? I couldn't find it in the list archive. > > Sor

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> In general, yes, I think so. A few comments on your draft below. Ok I include a newer version which I am fairly happy with but I do have some queries. > > +(defvar notmuch-show-part-button-map > > + (let ((map (make-sparse-keymap))) > > + (set-keymap-parent map button-map) > > +

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 10:27 pm: > > (defmacro notmuch-with-temp-part-buffer (message-id nth &rest body) > > (declare (indent 2)) > > (let ((process-crypto (make-symbol "process-crypto"))) > > `(let ((,process-crypto notmuch-show-process-crypto)) > >(with-temp-buffer > >

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > Oops, actually there was a bug in that macro. It should have been > > (defmacro notmuch-with-temp-part-buffer (message-id nth &rest body) > (declare (indent 2)) > (let ((process-crypto (make-symbol "process-crypto"))) > `(let ((,process-crypto notmuch-show-process-crypto)) >(

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Jameson Graef Rollins
On Sun, 15 Jan 2012 12:16:36 +, Mark Walters wrote: > Define a keymap for attachment buttons to allow multiple actions. > Define 3 possible actions: > save attachment: exactly as currently, > view attachment: uses mailcap entry, > view attachment with user chosen program Great im

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 16 at 11:31 am: > On Sun, 15 Jan 2012 12:16:36 +, Mark Walters > wrote: > > Define a keymap for attachment buttons to allow multiple actions. > > Define 3 possible actions: > > save attachment: exactly as currently, > > view attachment: uses mailcap

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Mark Walters
(My apologies, owing to various errors on my part the patch has ended up in a separate thread: id:"1326749910-30437-1-git-send-email-markwalters1...@gmail.com") On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins wrote: > > Keymap on a button is: s for save, v for view and o for view with

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Austin Clements
Quoth Mark Walters on Jan 16 at 9:44 pm: > On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins > wrote: > > > Keymap on a button is: s for save, v for view and o for view with > > > other program. Default (i.e. enter or mouse button) is save but is > > > easily configurable e.g. set to vie

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > 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

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 9:06 am: > > > > 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,

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > I am happy to make that change. My original patch in the summer was more > > like that: > > id:"caludzswato+4mcuoomk+8vfs+pog-xuma6u-aqx2m6-sbyq...@mail.gmail.com" > > Is this the right id? I couldn't find it in the list archive. Sorry I messed up: it should be id:"87mxehqhbl.fsf@r102.confi

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Aaron Ecay
On Tue, 17 Jan 2012 15:26:03 -0500, Austin Clements wrote: > Quoth Mark Walters on Jan 17 at 9:06 am: > > > > > > 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

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 8:39 pm: > > > I am happy to make that change. My original patch in the summer was more > > > like that: > > > id:"caludzswato+4mcuoomk+8vfs+pog-xuma6u-aqx2m6-sbyq...@mail.gmail.com" > > > > Is this the right id? I couldn't find it in the list archive. > > Sorry

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> In general, yes, I think so. A few comments on your draft below. Ok I include a newer version which I am fairly happy with but I do have some queries. > > +(defvar notmuch-show-part-button-map > > + (let ((map (make-sparse-keymap))) > > + (set-keymap-parent map button-map) > > +

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Austin Clements
Quoth Mark Walters on Jan 17 at 10:27 pm: > > (defmacro notmuch-with-temp-part-buffer (message-id nth &rest body) > > (declare (indent 2)) > > (let ((process-crypto (make-symbol "process-crypto"))) > > `(let ((,process-crypto notmuch-show-process-crypto)) > >(with-temp-buffer > >

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
> > Oops, actually there was a bug in that macro. It should have been > > (defmacro notmuch-with-temp-part-buffer (message-id nth &rest body) > (declare (indent 2)) > (let ((process-crypto (make-symbol "process-crypto"))) > `(let ((,process-crypto notmuch-show-process-crypto)) >(