[PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-30 Thread David Edmondson
On Mon, 30 Jan 2012 09:37:17 +, David Edmondson  wrote:
> On Sun, 29 Jan 2012 12:06:57 -0800, Jameson Graef Rollins  finestructure.net> wrote:
> > > My inclination is to remove `notmuch-crypto-process-mime' altogether
> > > (declared it an obsolete variable) and allow users to set a default
> > > for `notmuch-show-process-crypto' directly, but that is not done in
> > > this patchset while awaiting feedback.
> > 
> > I'm not sure I understand this.  `notmuch-show-process-crypto' *is* what
> > sets the default for the `notmuch-show-process-crypto' buffer-local
> > variable.  How would you change the current behavior or settings (beyond
> > just a variable rename)?
> 
> [...]
>
> I'm sure that I can figure out either some `defcustom' goop or worse to
> sort it out so that the initialisation happens correctly.

The simplest approach is to have `notmuch-show-process-crypto' inherit
the value of `notmuch-crypto-process-mime' when any `notmuch-show-mode'
buffers are first created. Currently that happens in only one place
(`notmuch-show'), which makes things straightforward.

Updated patches soon.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-30 Thread David Edmondson
On Sun, 29 Jan 2012 12:06:57 -0800, Jameson Graef Rollins  wrote:
> > My inclination is to remove `notmuch-crypto-process-mime' altogether
> > (declared it an obsolete variable) and allow users to set a default
> > for `notmuch-show-process-crypto' directly, but that is not done in
> > this patchset while awaiting feedback.
> 
> I'm not sure I understand this.  `notmuch-show-process-crypto' *is* what
> sets the default for the `notmuch-show-process-crypto' buffer-local
> variable.  How would you change the current behavior or settings (beyond
> just a variable rename)?

The problem with the code as I posted can be seen if you imagine the
following ~/.emacs.el sequence:

-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/emacs-lisp
Size: 521 bytes
Desc: not available
URL: 

-- next part --

I'm sure that I can figure out either some `defcustom' goop or worse to
sort it out so that the initialisation happens correctly.

> > `notmuch-crypto-process-mime' is used only in notmuch-show.el, so the
> > setting really belongs there with an appropriate name.
> 
> I intentionally put this in a separate section in case there were
> eventually other needs for this setting beyond just show mode.  I
> personally think we should just leave it where it is, particularly
> since it's been there for a while.

Okay.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: [PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-30 Thread David Edmondson
On Sun, 29 Jan 2012 12:06:57 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
  My inclination is to remove `notmuch-crypto-process-mime' altogether
  (declared it an obsolete variable) and allow users to set a default
  for `notmuch-show-process-crypto' directly, but that is not done in
  this patchset while awaiting feedback.
 
 I'm not sure I understand this.  `notmuch-show-process-crypto' *is* what
 sets the default for the `notmuch-show-process-crypto' buffer-local
 variable.  How would you change the current behavior or settings (beyond
 just a variable rename)?

The problem with the code as I posted can be seen if you imagine the
following ~/.emacs.el sequence:



bin6NS6r8HTtY.bin
Description: application/emacs-lisp

I'm sure that I can figure out either some `defcustom' goop or worse to
sort it out so that the initialisation happens correctly.

  `notmuch-crypto-process-mime' is used only in notmuch-show.el, so the
  setting really belongs there with an appropriate name.
 
 I intentionally put this in a separate section in case there were
 eventually other needs for this setting beyond just show mode.  I
 personally think we should just leave it where it is, particularly
 since it's been there for a while.

Okay.


pgptcBnLBlO8m.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-30 Thread Jameson Graef Rollins
On Mon, 30 Jan 2012 11:26:32 +, David Edmondson d...@dme.org wrote:
 The simplest approach is to have `notmuch-show-process-crypto' inherit
 the value of `notmuch-crypto-process-mime' when any `notmuch-show-mode'
 buffers are first created. Currently that happens in only one place
 (`notmuch-show'), which makes things straightforward.
 
 Updated patches soon.

Nice.  That's the right solution.  Thanks.

jamie.


pgppSB2uDzcu2.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-29 Thread Jameson Graef Rollins
On Wed, 25 Jan 2012 10:18:46 +, David Edmondson  wrote:
> The crypto toggle previously worked using an argument to
> `notmuch-show' and various other functions and relied on killing and
> re-creating the notmuch-show-mode buffer. Various other
> pseudo-buffer-local variables were present based on an ad-hoc scheme.
>
> Replace the ad-hoc scheme with real buffer-local variables and then
> update `notmuch-show-refresh-view' to erase and re-paint rather than
> kill and re-create. Update the crypto switch accordingly.

Hey, David.  Thank you so much for this!  I was really hoping someone
would eventually pick this up, and your solution is great!  This new
behavior is *much* nicer.  I really like it.

I haven't done a full code review, though, just tested it out.  I may
not be able to get to it for a while, so please don't hold this patch up
on my account).

> Add two other toggles:
> - whether non-matching messages are available,
> - the indentation of message contents.
> Both of these default to the current behaviour.

These new features enabled by this are very cool!  I love them both.  I
bet there are other interesting toggle features that could be enabled by
this.

> My inclination is to remove `notmuch-crypto-process-mime' altogether
> (declared it an obsolete variable) and allow users to set a default
> for `notmuch-show-process-crypto' directly, but that is not done in
> this patchset while awaiting feedback.

I'm not sure I understand this.  `notmuch-show-process-crypto' *is* what
sets the default for the `notmuch-show-process-crypto' buffer-local
variable.  How would you change the current behavior or settings (beyond
just a variable rename)?

> `notmuch-crypto-process-mime' is used only in notmuch-show.el, so the
> setting really belongs there with an appropriate name.

I intentionally put this in a separate section in case there were
eventually other needs for this setting beyond just show mode.  I
personally think we should just leave it where it is, particularly since
it's been there for a while.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



[PATCH 0/3] reworked crypto toggle, plus a couple of other toggles

2012-01-25 Thread David Edmondson
The crypto toggle previously worked using an argument to
`notmuch-show' and various other functions and relied on killing and
re-creating the notmuch-show-mode buffer. Various other
pseudo-buffer-local variables were present based on an ad-hoc scheme.

Replace the ad-hoc scheme with real buffer-local variables and then
update `notmuch-show-refresh-view' to erase and re-paint rather than
kill and re-create. Update the crypto switch accordingly.

Add two other toggles:
- whether non-matching messages are available,
- the indentation of message contents.
Both of these default to the current behaviour.

A wart in the first patch is the handling of the
`notmuch-show-process-crypto' default. It is set based on
`notmuch-crypto-process-mime', but the users choice of setting for
that variable may not have been applied at the point where
`notmuch-show-process-crypto' inherits it.

My inclination is to remove `notmuch-crypto-process-mime' altogether
(declared it an obsolete variable) and allow users to set a default
for `notmuch-show-process-crypto' directly, but that is not done in
this patchset while awaiting feedback.

`notmuch-crypto-process-mime' is used only in notmuch-show.el, so the
setting really belongs there with an appropriate name.

David Edmondson (3):
  emacs: Rework crypto switch toggle.
  emacs: Allow `notmuch-show-mode' to display only matching messages.
  emacs: Allow the indentation of content to be toggled.

 emacs/notmuch-show.el |  143 +
 emacs/notmuch.el  |7 +--
 2 files changed, 87 insertions(+), 63 deletions(-)

-- 
1.7.8.3