unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Don't signal an error when reaching the end of the search results.
@ 2011-12-20  8:45 David Edmondson
  2011-12-26  4:15 ` Aaron Ecay
  2011-12-28 20:33 ` Tomi Ollila
  0 siblings, 2 replies; 5+ messages in thread
From: David Edmondson @ 2011-12-20  8:45 UTC (permalink / raw)
  To: notmuch

With the default configuration ('space' moves through the messages
matching the search and back to the results index at the end) it's
unnecessary to signal an error when the last message has been read, as
this is the common case.

Moreover, it's very annoying when `debug-on-error' is t.
---
 emacs/notmuch.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 675a110..2e9973e 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -438,7 +438,7 @@ Complete list of currently available key bindings:
 				 "*")
 			 32 nil nil t))
 		      crypto-switch)
-      (error "End of search results"))))
+      (message "End of search results."))))
 
 (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
   "Begin composing a reply to the entire current thread in a new buffer."
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Don't signal an error when reaching the end of the search results.
  2011-12-20  8:45 [PATCH] emacs: Don't signal an error when reaching the end of the search results David Edmondson
@ 2011-12-26  4:15 ` Aaron Ecay
  2011-12-28 20:33 ` Tomi Ollila
  1 sibling, 0 replies; 5+ messages in thread
From: Aaron Ecay @ 2011-12-26  4:15 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Tue, 20 Dec 2011 08:45:14 +0000, David Edmondson <dme@dme.org> wrote:
> With the default configuration ('space' moves through the messages
> matching the search and back to the results index at the end) it's
> unnecessary to signal an error when the last message has been read, as
> this is the common case.
> 
> Moreover, it's very annoying when `debug-on-error' is t.

+1 from me on this change.  I had added this to `debug-ignored-errors'
long ago, and forgotten how annoying it was.

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Don't signal an error when reaching the end of the search results.
  2011-12-20  8:45 [PATCH] emacs: Don't signal an error when reaching the end of the search results David Edmondson
  2011-12-26  4:15 ` Aaron Ecay
@ 2011-12-28 20:33 ` Tomi Ollila
  2011-12-29  8:46   ` David Edmondson
  1 sibling, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2011-12-28 20:33 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Tue, 20 Dec 2011 08:45:14 +0000, David Edmondson <dme@dme.org> wrote:
> With the default configuration ('space' moves through the messages
> matching the search and back to the results index at the end) it's
> unnecessary to signal an error when the last message has been read, as
> this is the common case.
> 
> Moreover, it's very annoying when `debug-on-error' is t.
> ---

I'd say '+1' but I could not reproduce the case. In case this is case
that should not happen then I just don't know whetner emacs should
signal error to user or not.

Tomi

>  emacs/notmuch.el |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index 675a110..2e9973e 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -438,7 +438,7 @@ Complete list of currently available key bindings:
>  				 "*")
>  			 32 nil nil t))
>  		      crypto-switch)
> -      (error "End of search results"))))
> +      (message "End of search results."))))
>  
>  (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
>    "Begin composing a reply to the entire current thread in a new buffer."
> -- 
> 1.7.7.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Don't signal an error when reaching the end of the search results.
  2011-12-28 20:33 ` Tomi Ollila
@ 2011-12-29  8:46   ` David Edmondson
  2011-12-29  9:04     ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: David Edmondson @ 2011-12-29  8:46 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Wed, 28 Dec 2011 22:33:09 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Tue, 20 Dec 2011 08:45:14 +0000, David Edmondson <dme@dme.org> wrote:
> > With the default configuration ('space' moves through the messages
> > matching the search and back to the results index at the end) it's
> > unnecessary to signal an error when the last message has been read, as
> > this is the common case.
> > 
> > Moreover, it's very annoying when `debug-on-error' is t.
> > ---
> 
> I'd say '+1' but I could not reproduce the case.

That's puzzling. Without the patch, if you hit 'space' on the last
message in a `notmuch-show' buffer that is the last thread in a
`notmuch-search' buffer, you should see the error when you are returned
to the `notmuch-search' buffer. Does that not happen?

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Don't signal an error when reaching the end of the search results.
  2011-12-29  8:46   ` David Edmondson
@ 2011-12-29  9:04     ` Tomi Ollila
  0 siblings, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2011-12-29  9:04 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Thu, 29 Dec 2011 08:46:32 +0000, David Edmondson <dme@dme.org> wrote:
> On Wed, 28 Dec 2011 22:33:09 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> > On Tue, 20 Dec 2011 08:45:14 +0000, David Edmondson <dme@dme.org> wrote:
> > > With the default configuration ('space' moves through the messages
> > > matching the search and back to the results index at the end) it's
> > > unnecessary to signal an error when the last message has been read, as
> > > this is the common case.
> > > 
> > > Moreover, it's very annoying when `debug-on-error' is t.
> > > ---
> > 
> > I'd say '+1' but I could not reproduce the case.
> 
> That's puzzling. Without the patch, if you hit 'space' on the last
> message in a `notmuch-show' buffer that is the last thread in a
> `notmuch-search' buffer, you should see the error when you are returned
> to the `notmuch-search' buffer. Does that not happen?

Now that you said it I knew what to test (and I had temporarily
restored " " binding to it's original in notmuch show mode).

+1 for the patch.

Tomi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-29  9:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  8:45 [PATCH] emacs: Don't signal an error when reaching the end of the search results David Edmondson
2011-12-26  4:15 ` Aaron Ecay
2011-12-28 20:33 ` Tomi Ollila
2011-12-29  8:46   ` David Edmondson
2011-12-29  9:04     ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).