[PATCH 1/4] emacs: unify search mechanisms

2012-01-17 Thread Dmitry Kurochkin
Hello.

On Mon, 16 Jan 2012 12:21:20 +, Jani Nikula  wrote:
> On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin  gmail.com> wrote:
> > On Mon, 16 Jan 2012 11:35:37 +, David Edmondson  wrote:
> > > On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  > > gmail.com> wrote:
> > > > Before the change, there were two ways to do search in Emacs UI:
> > > > search widget in notmuch-hello buffer and `notmuch-search'
> > > > function bound to "s".  Internally, notmuch-hello search widget
> > > > uses `notmuch-search' function.  But it uses widget field input
> > > > instead of minibuffer.  Such duplication is a major issue for
> > > > notmuch-hello usability: search interface is inconsistent and
> > > > lacks features that are available in minibuffer (e.g. history and
> > > > auto completion).  Some of these features may be relatively easy
> > > > to implement for notmuch-hello search, others would be much more
> > > > tricky.  So to avoid duplication, make UI more consistent, bring
> > > > notmuch-hello search to feature parity with the minibuffer
> > > > search, the patch replaces notmuch-hello search widget and with a
> > > > button that works the same way as "s" key binding.
> > > 
> > > Dmitry, if Daniel re-submits his patches to allow the construction of
> > > `notmuch-hello' buffers to be configured, it seems that this patchset
> > > would become unnecessary. Is that correct?
> > 
> > Right.  We will just need to fix the 's' key binding.  Looking forward
> > for that.
> 
> Isn't (something like) this still needed to merge the search histories:
> 
> id:"1324698436-8532-1-git-send-email-dmitry.kurochkin at gmail.com"
> 

I have sent a new patch series implementing the changes [1].

Regards,
  Dmitry

[1] id:1326828850-8519-1-git-send-email-dmitry.kurochkin at gmail.com

> 
> Jani.


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-17 Thread Dmitry Kurochkin
Hello.

On Mon, 16 Jan 2012 12:21:20 +, Jani Nikula j...@nikula.org wrote:
 On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin 
 dmitry.kuroch...@gmail.com wrote:
  On Mon, 16 Jan 2012 11:35:37 +, David Edmondson d...@dme.org wrote:
   On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
   dmitry.kuroch...@gmail.com wrote:
Before the change, there were two ways to do search in Emacs UI:
search widget in notmuch-hello buffer and `notmuch-search'
function bound to s.  Internally, notmuch-hello search widget
uses `notmuch-search' function.  But it uses widget field input
instead of minibuffer.  Such duplication is a major issue for
notmuch-hello usability: search interface is inconsistent and
lacks features that are available in minibuffer (e.g. history and
auto completion).  Some of these features may be relatively easy
to implement for notmuch-hello search, others would be much more
tricky.  So to avoid duplication, make UI more consistent, bring
notmuch-hello search to feature parity with the minibuffer
search, the patch replaces notmuch-hello search widget and with a
button that works the same way as s key binding.
   
   Dmitry, if Daniel re-submits his patches to allow the construction of
   `notmuch-hello' buffers to be configured, it seems that this patchset
   would become unnecessary. Is that correct?
  
  Right.  We will just need to fix the 's' key binding.  Looking forward
  for that.
 
 Isn't (something like) this still needed to merge the search histories:
 
 id:1324698436-8532-1-git-send-email-dmitry.kuroch...@gmail.com
 

I have sent a new patch series implementing the changes [1].

Regards,
  Dmitry

[1] id:1326828850-8519-1-git-send-email-dmitry.kuroch...@gmail.com

 
 Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread Dmitry Kurochkin
On Mon, 16 Jan 2012 11:35:37 +, David Edmondson  wrote:
> On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  gmail.com> wrote:
> > Before the change, there were two ways to do search in Emacs UI:
> > search widget in notmuch-hello buffer and `notmuch-search'
> > function bound to "s".  Internally, notmuch-hello search widget
> > uses `notmuch-search' function.  But it uses widget field input
> > instead of minibuffer.  Such duplication is a major issue for
> > notmuch-hello usability: search interface is inconsistent and
> > lacks features that are available in minibuffer (e.g. history and
> > auto completion).  Some of these features may be relatively easy
> > to implement for notmuch-hello search, others would be much more
> > tricky.  So to avoid duplication, make UI more consistent, bring
> > notmuch-hello search to feature parity with the minibuffer
> > search, the patch replaces notmuch-hello search widget and with a
> > button that works the same way as "s" key binding.
> 
> Dmitry, if Daniel re-submits his patches to allow the construction of
> `notmuch-hello' buffers to be configured, it seems that this patchset
> would become unnecessary. Is that correct?

Right.  We will just need to fix the 's' key binding.  Looking forward
for that.

Regards,
  Dmitry


[PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread Jani Nikula
On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin  wrote:
> On Mon, 16 Jan 2012 11:35:37 +, David Edmondson  wrote:
> > On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  > gmail.com> wrote:
> > > Before the change, there were two ways to do search in Emacs UI:
> > > search widget in notmuch-hello buffer and `notmuch-search'
> > > function bound to "s".  Internally, notmuch-hello search widget
> > > uses `notmuch-search' function.  But it uses widget field input
> > > instead of minibuffer.  Such duplication is a major issue for
> > > notmuch-hello usability: search interface is inconsistent and
> > > lacks features that are available in minibuffer (e.g. history and
> > > auto completion).  Some of these features may be relatively easy
> > > to implement for notmuch-hello search, others would be much more
> > > tricky.  So to avoid duplication, make UI more consistent, bring
> > > notmuch-hello search to feature parity with the minibuffer
> > > search, the patch replaces notmuch-hello search widget and with a
> > > button that works the same way as "s" key binding.
> > 
> > Dmitry, if Daniel re-submits his patches to allow the construction of
> > `notmuch-hello' buffers to be configured, it seems that this patchset
> > would become unnecessary. Is that correct?
> 
> Right.  We will just need to fix the 's' key binding.  Looking forward
> for that.

Isn't (something like) this still needed to merge the search histories:

id:"1324698436-8532-1-git-send-email-dmitry.kurochkin at gmail.com"


Jani.


[PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread David Edmondson
On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin  wrote:
> > Dmitry, if Daniel re-submits his patches to allow the construction of
> > `notmuch-hello' buffers to be configured, it seems that this patchset
> > would become unnecessary. Is that correct?
> 
> Right.  We will just need to fix the 's' key binding.  Looking forward
> for that.

Can I mark this set 'obsolete' then? (I'd be relying on you to remember
to post a patch to fix the keybinding later.)
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread David Edmondson
On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  wrote:
> Before the change, there were two ways to do search in Emacs UI:
> search widget in notmuch-hello buffer and `notmuch-search'
> function bound to "s".  Internally, notmuch-hello search widget
> uses `notmuch-search' function.  But it uses widget field input
> instead of minibuffer.  Such duplication is a major issue for
> notmuch-hello usability: search interface is inconsistent and
> lacks features that are available in minibuffer (e.g. history and
> auto completion).  Some of these features may be relatively easy
> to implement for notmuch-hello search, others would be much more
> tricky.  So to avoid duplication, make UI more consistent, bring
> notmuch-hello search to feature parity with the minibuffer
> search, the patch replaces notmuch-hello search widget and with a
> button that works the same way as "s" key binding.

Dmitry, if Daniel re-submits his patches to allow the construction of
`notmuch-hello' buffers to be configured, it seems that this patchset
would become unnecessary. Is that correct?
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread David Edmondson
On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 Before the change, there were two ways to do search in Emacs UI:
 search widget in notmuch-hello buffer and `notmuch-search'
 function bound to s.  Internally, notmuch-hello search widget
 uses `notmuch-search' function.  But it uses widget field input
 instead of minibuffer.  Such duplication is a major issue for
 notmuch-hello usability: search interface is inconsistent and
 lacks features that are available in minibuffer (e.g. history and
 auto completion).  Some of these features may be relatively easy
 to implement for notmuch-hello search, others would be much more
 tricky.  So to avoid duplication, make UI more consistent, bring
 notmuch-hello search to feature parity with the minibuffer
 search, the patch replaces notmuch-hello search widget and with a
 button that works the same way as s key binding.

Dmitry, if Daniel re-submits his patches to allow the construction of
`notmuch-hello' buffers to be configured, it seems that this patchset
would become unnecessary. Is that correct?


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


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread Dmitry Kurochkin
On Mon, 16 Jan 2012 11:35:37 +, David Edmondson d...@dme.org wrote:
 On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
 dmitry.kuroch...@gmail.com wrote:
  Before the change, there were two ways to do search in Emacs UI:
  search widget in notmuch-hello buffer and `notmuch-search'
  function bound to s.  Internally, notmuch-hello search widget
  uses `notmuch-search' function.  But it uses widget field input
  instead of minibuffer.  Such duplication is a major issue for
  notmuch-hello usability: search interface is inconsistent and
  lacks features that are available in minibuffer (e.g. history and
  auto completion).  Some of these features may be relatively easy
  to implement for notmuch-hello search, others would be much more
  tricky.  So to avoid duplication, make UI more consistent, bring
  notmuch-hello search to feature parity with the minibuffer
  search, the patch replaces notmuch-hello search widget and with a
  button that works the same way as s key binding.
 
 Dmitry, if Daniel re-submits his patches to allow the construction of
 `notmuch-hello' buffers to be configured, it seems that this patchset
 would become unnecessary. Is that correct?

Right.  We will just need to fix the 's' key binding.  Looking forward
for that.

Regards,
  Dmitry
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread David Edmondson
On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
  Dmitry, if Daniel re-submits his patches to allow the construction of
  `notmuch-hello' buffers to be configured, it seems that this patchset
  would become unnecessary. Is that correct?
 
 Right.  We will just need to fix the 's' key binding.  Looking forward
 for that.

Can I mark this set 'obsolete' then? (I'd be relying on you to remember
to post a patch to fix the keybinding later.)


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


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-16 Thread Jani Nikula
On Mon, 16 Jan 2012 15:39:14 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 On Mon, 16 Jan 2012 11:35:37 +, David Edmondson d...@dme.org wrote:
  On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
  dmitry.kuroch...@gmail.com wrote:
   Before the change, there were two ways to do search in Emacs UI:
   search widget in notmuch-hello buffer and `notmuch-search'
   function bound to s.  Internally, notmuch-hello search widget
   uses `notmuch-search' function.  But it uses widget field input
   instead of minibuffer.  Such duplication is a major issue for
   notmuch-hello usability: search interface is inconsistent and
   lacks features that are available in minibuffer (e.g. history and
   auto completion).  Some of these features may be relatively easy
   to implement for notmuch-hello search, others would be much more
   tricky.  So to avoid duplication, make UI more consistent, bring
   notmuch-hello search to feature parity with the minibuffer
   search, the patch replaces notmuch-hello search widget and with a
   button that works the same way as s key binding.
  
  Dmitry, if Daniel re-submits his patches to allow the construction of
  `notmuch-hello' buffers to be configured, it seems that this patchset
  would become unnecessary. Is that correct?
 
 Right.  We will just need to fix the 's' key binding.  Looking forward
 for that.

Isn't (something like) this still needed to merge the search histories:

id:1324698436-8532-1-git-send-email-dmitry.kuroch...@gmail.com


Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-03 Thread Xavier Maillard
On Mon, 02 Jan 2012 15:23:17 +0200, Tomi Ollila tomi.oll...@nixu.com wrote:
 On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula j...@nikula.org wrote:
  On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
  
   Personally I would like to be able to customize the hello screen to
   remove the search box. I find it confusing that that 's' jumps to the
   search box there, and everywhere else brings up the mini-buffer. That
   might be just me, and the fact that I bind C-c s globally to
   notmuch-search.  I could easily believe that for new users having a
   search box is nicer.
  
  Would it be a suitable compromise to bind 's' to notmuch-search (the
  mini-buffer search) also in notmuch-hello, while leaving the search box
  there with a common history?
 
 I like this approach!

+1 but, like David, I'd like to be able to display/to hide the search
box via a keybinding and/or a configuration option.

/Xavier
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/4] emacs: unify search mechanisms

2012-01-02 Thread Xavier Maillard
On Mon, 02 Jan 2012 15:23:17 +0200, Tomi Ollila  wrote:
> On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula  wrote:
> > On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner  
> > wrote:
> > 
> > > Personally I would like to be able to customize the hello screen to
> > > remove the search box. I find it confusing that that 's' jumps to the
> > > search box there, and everywhere else brings up the mini-buffer. That
> > > might be just me, and the fact that I bind "C-c s" globally to
> > > notmuch-search.  I could easily believe that for new users having a
> > > search box is nicer.
> > 
> > Would it be a suitable compromise to bind 's' to notmuch-search (the
> > mini-buffer search) also in notmuch-hello, while leaving the search box
> > there with a common history?
> 
> I like this approach!

+1 but, like David, I'd like to be able to display/to hide the search
box via a keybinding and/or a configuration option.

/Xavier


[PATCH 1/4] emacs: unify search mechanisms

2012-01-02 Thread Tomi Ollila
On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula  wrote:
> On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner  
> wrote:
> 
> > Personally I would like to be able to customize the hello screen to
> > remove the search box. I find it confusing that that 's' jumps to the
> > search box there, and everywhere else brings up the mini-buffer. That
> > might be just me, and the fact that I bind "C-c s" globally to
> > notmuch-search.  I could easily believe that for new users having a
> > search box is nicer.
> 
> Would it be a suitable compromise to bind 's' to notmuch-search (the
> mini-buffer search) also in notmuch-hello, while leaving the search box
> there with a common history?

I like this approach!

> I'm not sure moving the point to search box needs a keybinding (but
> notmuch-hello-goto-search could still be there if the user wants to add
> a keybinding).

yes.

> 
> 
> BR,
> Jani.

Tomi


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-02 Thread Tomi Ollila
On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula j...@nikula.org wrote:
 On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
 
  Personally I would like to be able to customize the hello screen to
  remove the search box. I find it confusing that that 's' jumps to the
  search box there, and everywhere else brings up the mini-buffer. That
  might be just me, and the fact that I bind C-c s globally to
  notmuch-search.  I could easily believe that for new users having a
  search box is nicer.
 
 Would it be a suitable compromise to bind 's' to notmuch-search (the
 mini-buffer search) also in notmuch-hello, while leaving the search box
 there with a common history?

I like this approach!

 I'm not sure moving the point to search box needs a keybinding (but
 notmuch-hello-goto-search could still be there if the user wants to add
 a keybinding).

yes.

 
 
 BR,
 Jani.

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/4] emacs: unify search mechanisms

2011-12-31 Thread Jani Nikula
On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner  wrote:
> On Fri, 30 Dec 2011 10:44:28 +, David Edmondson  wrote:
> > On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  > gmail.com> 
> > Were there actual complaints about the usability of the current
> > approach?
> > 
> > I much preferred your alternative approach (merging the history while
> > leaving the UI alone).

FWIW, I liked this approach too. I do use the notmuch-hello view, and
also the search box.

> Personally I would like to be able to customize the hello screen to
> remove the search box. I find it confusing that that 's' jumps to the
> search box there, and everywhere else brings up the mini-buffer. That
> might be just me, and the fact that I bind "C-c s" globally to
> notmuch-search.  I could easily believe that for new users having a
> search box is nicer.

Would it be a suitable compromise to bind 's' to notmuch-search (the
mini-buffer search) also in notmuch-hello, while leaving the search box
there with a common history?

I'm not sure moving the point to search box needs a keybinding (but
notmuch-hello-goto-search could still be there if the user wants to add
a keybinding).


BR,
Jani.


[PATCH 1/4] emacs: unify search mechanisms

2011-12-31 Thread David Edmondson
On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula  wrote:
> Would it be a suitable compromise to bind 's' to notmuch-search (the
> mini-buffer search) also in notmuch-hello, while leaving the search
> box there with a common history?
> 
> I'm not sure moving the point to search box needs a keybinding (but
> notmuch-hello-goto-search could still be there if the user wants to
> add a keybinding).

I'd be happy with that. I don't use 's' in notmuch-hello.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH 1/4] emacs: unify search mechanisms

2011-12-31 Thread David Bremner
On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula  wrote:

> Would it be a suitable compromise to bind 's' to notmuch-search (the
> mini-buffer search) also in notmuch-hello, while leaving the search box
> there with a common history?

That would be fine for me. But other people might find it weird I guess.

d


Re: [PATCH 1/4] emacs: unify search mechanisms

2011-12-31 Thread Jani Nikula
On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
 On Fri, 30 Dec 2011 10:44:28 +, David Edmondson d...@dme.org wrote:
  On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
  dmitry.kuroch...@gmail.com 
  Were there actual complaints about the usability of the current
  approach?
  
  I much preferred your alternative approach (merging the history while
  leaving the UI alone).

FWIW, I liked this approach too. I do use the notmuch-hello view, and
also the search box.

 Personally I would like to be able to customize the hello screen to
 remove the search box. I find it confusing that that 's' jumps to the
 search box there, and everywhere else brings up the mini-buffer. That
 might be just me, and the fact that I bind C-c s globally to
 notmuch-search.  I could easily believe that for new users having a
 search box is nicer.

Would it be a suitable compromise to bind 's' to notmuch-search (the
mini-buffer search) also in notmuch-hello, while leaving the search box
there with a common history?

I'm not sure moving the point to search box needs a keybinding (but
notmuch-hello-goto-search could still be there if the user wants to add
a keybinding).


BR,
Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/4] emacs: unify search mechanisms

2011-12-31 Thread David Edmondson
On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula j...@nikula.org wrote:
 Would it be a suitable compromise to bind 's' to notmuch-search (the
 mini-buffer search) also in notmuch-hello, while leaving the search
 box there with a common history?
 
 I'm not sure moving the point to search box needs a keybinding (but
 notmuch-hello-goto-search could still be there if the user wants to
 add a keybinding).

I'd be happy with that. I don't use 's' in notmuch-hello.


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


[PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread Aaron Ecay
On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner  wrote:
> Personally I would like to be able to customize the hello screen to
> remove the search box. I find it confusing that that 's' jumps to the
> search box there, and everywhere else brings up the mini-buffer.

+1.  I rarely use notmuch-hello, but when I do, I press `s' then look to
the bottom of the screen and am always confused not to see a minibuffer
prompt.

-- 
Aaron Ecay


[PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread David Edmondson
On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  wrote:
> Before the change, there were two ways to do search in Emacs UI:
> search widget in notmuch-hello buffer and `notmuch-search' function
> bound to "s".  Internally, notmuch-hello search widget uses
> `notmuch-search' function.  But it uses widget field input instead of
> minibuffer.
> 
> Such duplication is a major issue for notmuch-hello usability: search
> interface is inconsistent and lacks features that are available in
> minibuffer (e.g. history and auto completion).

Were there actual complaints about the usability of the current
approach?

I much preferred your alternative approach (merging the history while
leaving the UI alone).
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread David Bremner
On Fri, 30 Dec 2011 10:44:28 +, David Edmondson  wrote:
> On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin  gmail.com> 
> Were there actual complaints about the usability of the current
> approach?
> 
> I much preferred your alternative approach (merging the history while
> leaving the UI alone).

Personally I would like to be able to customize the hello screen to
remove the search box. I find it confusing that that 's' jumps to the
search box there, and everywhere else brings up the mini-buffer. That
might be just me, and the fact that I bind "C-c s" globally to
notmuch-search.  I could easily believe that for new users having a
search box is nicer.

d


Re: [PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread David Edmondson
On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 Before the change, there were two ways to do search in Emacs UI:
 search widget in notmuch-hello buffer and `notmuch-search' function
 bound to s.  Internally, notmuch-hello search widget uses
 `notmuch-search' function.  But it uses widget field input instead of
 minibuffer.
 
 Such duplication is a major issue for notmuch-hello usability: search
 interface is inconsistent and lacks features that are available in
 minibuffer (e.g. history and auto completion).

Were there actual complaints about the usability of the current
approach?

I much preferred your alternative approach (merging the history while
leaving the UI alone).


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


Re: [PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread David Edmondson
On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
 On Fri, 30 Dec 2011 10:44:28 +, David Edmondson d...@dme.org wrote:
  On Sun, 25 Dec 2011 08:14:52 +0400, Dmitry Kurochkin 
  dmitry.kuroch...@gmail.com 
  Were there actual complaints about the usability of the current
  approach?
  
  I much preferred your alternative approach (merging the history while
  leaving the UI alone).
 
 Personally I would like to be able to customize the hello screen to
 remove the search box.

id:1318253982-23588-2-git-send-email-dan...@schoepe.org ?

 I find it confusing that that 's' jumps to the search box there, and
 everywhere else brings up the mini-buffer. That might be just me, and
 the fact that I bind C-c s globally to notmuch-search.  I could
 easily believe that for new users having a search box is nicer.

It was intended for people coming from more traditional clients, to help
get them into the swing of notmuch. Maybe also a bit of a joke in
comparison to the gmail interface. (Carl came up with the original idea
- I just knocked out some code.)


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


Re: [PATCH 1/4] emacs: unify search mechanisms

2011-12-30 Thread Aaron Ecay
On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
 Personally I would like to be able to customize the hello screen to
 remove the search box. I find it confusing that that 's' jumps to the
 search box there, and everywhere else brings up the mini-buffer.

+1.  I rarely use notmuch-hello, but when I do, I press `s' then look to
the bottom of the screen and am always confused not to see a minibuffer
prompt.

-- 
Aaron Ecay
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/4] emacs: unify search mechanisms

2011-12-25 Thread Dmitry Kurochkin
Before the change, there were two ways to do search in Emacs UI:
search widget in notmuch-hello buffer and `notmuch-search'
function bound to "s".  Internally, notmuch-hello search widget
uses `notmuch-search' function.  But it uses widget field input
instead of minibuffer.  Such duplication is a major issue for
notmuch-hello usability: search interface is inconsistent and
lacks features that are available in minibuffer (e.g. history and
auto completion).  Some of these features may be relatively easy
to implement for notmuch-hello search, others would be much more
tricky.  So to avoid duplication, make UI more consistent, bring
notmuch-hello search to feature parity with the minibuffer
search, the patch replaces notmuch-hello search widget and with a
button that works the same way as "s" key binding.
---
 emacs/notmuch-hello.el |   84 +++-
 emacs/notmuch-lib.el   |9 +
 emacs/notmuch.el   |   20 ++-
 3 files changed, 46 insertions(+), 67 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 333d4c1..eb08a09 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -29,11 +29,8 @@
 (declare-function notmuch-search "notmuch" (query  oldest-first 
target-thread target-line continuation))
 (declare-function notmuch-poll "notmuch" ())

-(defvar notmuch-hello-search-bar-marker nil
-  "The position of the search bar within the notmuch-hello buffer.")
-
-(defcustom notmuch-recent-searches-max 10
-  "The number of recent searches to store and display."
+(defcustom notmuch-hello-recent-searches-max 10
+  "The number of recent searches to display."
   :type 'integer
   :group 'notmuch)

@@ -154,16 +151,6 @@ International Bureau of Weights and Measures."
 (defvar notmuch-hello-url "http://notmuchmail.org;
   "The `notmuch' web site.")

-(defvar notmuch-hello-recent-searches nil)
-
-(defun notmuch-hello-remember-search (search)
-  (setq notmuch-hello-recent-searches
-   (delete search notmuch-hello-recent-searches))
-  (push search notmuch-hello-recent-searches)
-  (if (> (length notmuch-hello-recent-searches)
-notmuch-recent-searches-max)
-  (setq notmuch-hello-recent-searches (butlast 
notmuch-hello-recent-searches
-
 (defun notmuch-hello-nice-number (n)
   (let (result)
 (while (> n 0)
@@ -176,16 +163,10 @@ International Bureau of Weights and Measures."
  (format "%s%03d" notmuch-hello-thousands-separator elem))
 (cdr result)

-(defun notmuch-hello-trim (search)
-  "Trim whitespace."
-  (if (string-match "^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" search)
-  (match-string 1 search)
-search))
-
-(defun notmuch-hello-search (search)
-  (let ((search (notmuch-hello-trim search)))
-(notmuch-hello-remember-search search)
-(notmuch-search search notmuch-search-oldest-first nil nil 
#'notmuch-hello-search-continuation)))
+(defun notmuch-hello-search ( search)
+  (interactive)
+  (notmuch-search search notmuch-search-oldest-first nil nil
+ #'notmuch-hello-search-continuation))

 (defun notmuch-hello-add-saved-search (widget)
   (interactive)
@@ -319,11 +300,6 @@ should be. Returns a cons cell `(tags-per-line width)'."
(widget-insert "\n"))
 found-target-pos))

-(defun notmuch-hello-goto-search ()
-  "Put point inside the `search' widget."
-  (interactive)
-  (goto-char notmuch-hello-search-bar-marker))
-
 (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))

 (defun notmuch-hello-search-continuation()
@@ -353,7 +329,7 @@ should be. Returns a cons cell `(tags-per-line width)'."
 (define-key map "G" 'notmuch-hello-poll-and-update)
 (define-key map (kbd "") 'widget-backward)
 (define-key map "m" 'notmuch-mua-new-mail)
-(define-key map "s" 'notmuch-hello-goto-search)
+(define-key map "s" 'notmuch-hello-search)
 map)
   "Keymap for \"notmuch hello\" buffers.")
 (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
@@ -466,7 +442,8 @@ Complete list of currently available key bindings:
   (widget-insert " messages.\n"))

 (let ((found-target-pos nil)
- (final-target-pos nil))
+ (final-target-pos nil)
+ (default-pos))
   (let* ((saved-alist
  ;; Filter out empty saved searches if required.
  (if notmuch-show-empty-saved-searches
@@ -497,33 +474,26 @@ Complete list of currently available key bindings:
(setq final-target-pos found-target-pos))
(indent-rigidly start (point) notmuch-hello-indent)))

-   (widget-insert "\nSearch: ")
-   (setq notmuch-hello-search-bar-marker (point-marker))
-   (widget-create 'editable-field
-  ;; Leave some space at the start and end of the
-  ;; search boxes.
-  :size (max 8 (- (window-width) notmuch-hello-indent
-  (length "Search: ")))
-  :action