unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Do not query on notmuch-search exit
@ 2011-08-22 13:49 Michal Sojka
  2011-08-22 14:28 ` Tomi Ollila
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Michal Sojka @ 2011-08-22 13:49 UTC (permalink / raw)
  To: notmuch

Emacs 23.2 queries by default about killing existing processes. This
is annoying when one wants to interrupt long search with 'q' key.
Disable this behavior for notmuch.
--

I'm resending this again as jrollins requested in
id:"871uwhz228.fsf@servo.factory.finestructure.net". Can anyone check
whether this works with emacs earlier than 23.2 or whether we need
to check for version or something in the code?

-Michal


 emacs/notmuch.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 3d82f0d..8858f3e 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -858,7 +858,9 @@ The optional parameters are used as follows:
 		       "--sort=newest-first")
 		     query)))
 	  (set-process-sentinel proc 'notmuch-search-process-sentinel)
-	  (set-process-filter proc 'notmuch-search-process-filter))))
+	  (set-process-filter proc 'notmuch-search-process-filter)
+	  (set-process-query-on-exit-flag proc nil)))
+      )
     (run-hooks 'notmuch-search-hook)))
 
 (defun notmuch-search-refresh-view ()
-- 
1.7.5.4

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 13:49 [PATCH] Do not query on notmuch-search exit Michal Sojka
@ 2011-08-22 14:28 ` Tomi Ollila
  2011-08-22 15:11   ` Tomi Ollila
  2011-08-22 17:03 ` Jameson Graef Rollins
  2011-08-22 18:39 ` James Vasile
  2 siblings, 1 reply; 12+ messages in thread
From: Tomi Ollila @ 2011-08-22 14:28 UTC (permalink / raw)
  To: Michal Sojka; +Cc: notmuch

On Mon 22 Aug 2011 16:49, Michal Sojka <sojkam1@fel.cvut.cz> writes:

> Emacs 23.2 queries by default about killing existing processes. This
> is annoying when one wants to interrupt long search with 'q' key.
> Disable this behavior for notmuch.

> --
>
> I'm resending this again as jrollins requested in
> id:"871uwhz228.fsf@servo.factory.finestructure.net". Can anyone check
> whether this works with emacs earlier than 23.2 or whether we need
> to check for version or something in the code?

It works with emacs 22.2.1 -- is no-op there...

>
> -Michal
>

Tomi

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 14:28 ` Tomi Ollila
@ 2011-08-22 15:11   ` Tomi Ollila
  2011-08-22 16:14     ` Michal Sojka
  0 siblings, 1 reply; 12+ messages in thread
From: Tomi Ollila @ 2011-08-22 15:11 UTC (permalink / raw)
  To: Michal Sojka; +Cc: notmuch

On Mon 22 Aug 2011 17:28, Tomi Ollila <tomi.ollila@nixu.com> writes:

> On Mon 22 Aug 2011 16:49, Michal Sojka <sojkam1@fel.cvut.cz> writes:
>> id:"871uwhz228.fsf@servo.factory.finestructure.net". Can anyone check
>> whether this works with emacs earlier than 23.2 or whether we need
>> to check for version or something in the code?
>
> It works with emacs 22.2.1 -- is no-op there...

No-op meaning that killing the process is not asked even
without this patch...

>> -Michal

> Tomi

Tomi

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 15:11   ` Tomi Ollila
@ 2011-08-22 16:14     ` Michal Sojka
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Sojka @ 2011-08-22 16:14 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch

On Mon, 22 Aug 2011, Tomi Ollila wrote:
> On Mon 22 Aug 2011 17:28, Tomi Ollila <tomi.ollila@nixu.com> writes:
> 
> > On Mon 22 Aug 2011 16:49, Michal Sojka <sojkam1@fel.cvut.cz> writes:
> >> id:"871uwhz228.fsf@servo.factory.finestructure.net". Can anyone check
> >> whether this works with emacs earlier than 23.2 or whether we need
> >> to check for version or something in the code?
> >
> > It works with emacs 22.2.1 -- is no-op there...
> 
> No-op meaning that killing the process is not asked even
> without this patch...

Yes, this was the behavior I remember from earlier versions. Thanks.

-Michal

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 13:49 [PATCH] Do not query on notmuch-search exit Michal Sojka
  2011-08-22 14:28 ` Tomi Ollila
@ 2011-08-22 17:03 ` Jameson Graef Rollins
  2011-08-22 20:28   ` Michal Sojka
  2011-08-22 18:39 ` James Vasile
  2 siblings, 1 reply; 12+ messages in thread
From: Jameson Graef Rollins @ 2011-08-22 17:03 UTC (permalink / raw)
  To: Michal Sojka, notmuch

On Mon, 22 Aug 2011 15:49:21 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> Emacs 23.2 queries by default about killing existing processes. This
> is annoying when one wants to interrupt long search with 'q' key.
> Disable this behavior for notmuch.

Thanks for resubmitting this patch, Michal.  I definitely prefer this
behavior.

> --

fwiw, I think this separator needs to be three dashes long, ie. '---'.
Otherwise "git am" doesn't seem to recognize it as a separator and
includes the rest of the text below this in the log.

jamie.

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 13:49 [PATCH] Do not query on notmuch-search exit Michal Sojka
  2011-08-22 14:28 ` Tomi Ollila
  2011-08-22 17:03 ` Jameson Graef Rollins
@ 2011-08-22 18:39 ` James Vasile
  2 siblings, 0 replies; 12+ messages in thread
From: James Vasile @ 2011-08-22 18:39 UTC (permalink / raw)
  To: Michal Sojka, notmuch

Thanks for this, Michal.  I've applied it to my local tree.

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 17:03 ` Jameson Graef Rollins
@ 2011-08-22 20:28   ` Michal Sojka
  2011-08-22 20:29     ` Michal Sojka
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Sojka @ 2011-08-22 20:28 UTC (permalink / raw)
  To: Jameson Graef Rollins, notmuch

On Mon, 22 Aug 2011, Jameson Graef Rollins wrote:
> On Mon, 22 Aug 2011 15:49:21 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> > Emacs 23.2 queries by default about killing existing processes. This
> > is annoying when one wants to interrupt long search with 'q' key.
> > Disable this behavior for notmuch.
> 
> Thanks for resubmitting this patch, Michal.  I definitely prefer this
> behavior.
> 
> > --
> 
> fwiw, I think this separator needs to be three dashes long, ie. '---'.
> Otherwise "git am" doesn't seem to recognize it as a separator and
> includes the rest of the text below this in the log.

Oh, sorry. Of course I know that, but I was in hurry when sending the
patch and didn't notice. I'm sending a new version for that is easy to
apply (for cworth).

-Michal

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

* [PATCH] Do not query on notmuch-search exit
  2011-08-22 20:28   ` Michal Sojka
@ 2011-08-22 20:29     ` Michal Sojka
  2011-08-23 23:39       ` Jameson Graef Rollins
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Sojka @ 2011-08-22 20:29 UTC (permalink / raw)
  To: notmuch

Emacs 23.2 queries by default about killing existing processes. This
is annoying when one wants to interrupt long search with 'q' key.
Disable this behavior for notmuch.
---
 emacs/notmuch.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 3d82f0d..8858f3e 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -858,7 +858,9 @@ The optional parameters are used as follows:
 		       "--sort=newest-first")
 		     query)))
 	  (set-process-sentinel proc 'notmuch-search-process-sentinel)
-	  (set-process-filter proc 'notmuch-search-process-filter))))
+	  (set-process-filter proc 'notmuch-search-process-filter)
+	  (set-process-query-on-exit-flag proc nil)))
+      )
     (run-hooks 'notmuch-search-hook)))
 
 (defun notmuch-search-refresh-view ()
-- 
1.7.5.4

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-22 20:29     ` Michal Sojka
@ 2011-08-23 23:39       ` Jameson Graef Rollins
  2011-08-27 12:38         ` Michal Sojka
  0 siblings, 1 reply; 12+ messages in thread
From: Jameson Graef Rollins @ 2011-08-23 23:39 UTC (permalink / raw)
  To: Michal Sojka, notmuch

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

On Mon, 22 Aug 2011 22:29:03 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> -	  (set-process-filter proc 'notmuch-search-process-filter))))
> +	  (set-process-filter proc 'notmuch-search-process-filter)
> +	  (set-process-query-on-exit-flag proc nil)))
> +      )

As very minor stylistic point, I think we tend to group all closing
parens together on the same line.  Otherwise I think this patch looks
great.

Thanks, Michal.

jamie.

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

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-23 23:39       ` Jameson Graef Rollins
@ 2011-08-27 12:38         ` Michal Sojka
  2011-10-09  3:46           ` Jameson Graef Rollins
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Sojka @ 2011-08-27 12:38 UTC (permalink / raw)
  To: Jameson Graef Rollins, notmuch

On Tue, 23 Aug 2011, Jameson Graef Rollins wrote:
> On Mon, 22 Aug 2011 22:29:03 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> > -	  (set-process-filter proc 'notmuch-search-process-filter))))
> > +	  (set-process-filter proc 'notmuch-search-process-filter)
> > +	  (set-process-query-on-exit-flag proc nil)))
> > +      )
> 
> As very minor stylistic point, I think we tend to group all closing
> parens together on the same line.  Otherwise I think this patch looks
> great.

Hi,

here is the version without standalone paren. (Note: This patch can be
applied directly with 'git am -c').

-Michal

--8<---------------cut here---------------start------------->8---
Emacs 23.2 queries by default about killing existing processes. This
is annoying when one wants to interrupt long search with 'q' key.
Disable this behavior for notmuch.
---
 emacs/notmuch.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 3d82f0d..4430219 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -858,7 +858,8 @@ The optional parameters are used as follows:
 		       "--sort=newest-first")
 		     query)))
 	  (set-process-sentinel proc 'notmuch-search-process-sentinel)
-	  (set-process-filter proc 'notmuch-search-process-filter))))
+	  (set-process-filter proc 'notmuch-search-process-filter)
+	  (set-process-query-on-exit-flag proc nil))))
     (run-hooks 'notmuch-search-hook)))
 
 (defun notmuch-search-refresh-view ()
-- 
1.7.5.4

--8<---------------cut here---------------end--------------->8---

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-08-27 12:38         ` Michal Sojka
@ 2011-10-09  3:46           ` Jameson Graef Rollins
  2011-11-11  0:19             ` Pieter Praet
  0 siblings, 1 reply; 12+ messages in thread
From: Jameson Graef Rollins @ 2011-10-09  3:46 UTC (permalink / raw)
  To: Michal Sojka, notmuch

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

On Sat, 27 Aug 2011 14:38:26 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> Emacs 23.2 queries by default about killing existing processes. This
> is annoying when one wants to interrupt long search with 'q' key.
> Disable this behavior for notmuch.

I would like to advocate that this patch gets pushed soon so that it
doesn't get lost.

jamie.

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

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

* Re: [PATCH] Do not query on notmuch-search exit
  2011-10-09  3:46           ` Jameson Graef Rollins
@ 2011-11-11  0:19             ` Pieter Praet
  0 siblings, 0 replies; 12+ messages in thread
From: Pieter Praet @ 2011-11-11  0:19 UTC (permalink / raw)
  To: Jameson Graef Rollins, Michal Sojka, notmuch

On Sat, 08 Oct 2011 20:46:44 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Sat, 27 Aug 2011 14:38:26 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> > Emacs 23.2 queries by default about killing existing processes. This
> > is annoying when one wants to interrupt long search with 'q' key.
> > Disable this behavior for notmuch.
> 
> I would like to advocate that this patch gets pushed soon so that it
> doesn't get lost.
> 
> jamie.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Appears to have been merged in by the powers that be: commit 0234a16b

Thanks!


Peace

-- 
Pieter

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

end of thread, other threads:[~2011-11-11  0:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 13:49 [PATCH] Do not query on notmuch-search exit Michal Sojka
2011-08-22 14:28 ` Tomi Ollila
2011-08-22 15:11   ` Tomi Ollila
2011-08-22 16:14     ` Michal Sojka
2011-08-22 17:03 ` Jameson Graef Rollins
2011-08-22 20:28   ` Michal Sojka
2011-08-22 20:29     ` Michal Sojka
2011-08-23 23:39       ` Jameson Graef Rollins
2011-08-27 12:38         ` Michal Sojka
2011-10-09  3:46           ` Jameson Graef Rollins
2011-11-11  0:19             ` Pieter Praet
2011-08-22 18:39 ` James Vasile

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).