unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
@ 2011-09-14 17:37 Benjamin Slade
  2011-09-14 19:15 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2011-09-14 17:37 UTC (permalink / raw)
  To: emacs-devel

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

Using Emacs 24.0.50.1 with the flyspell package generates a (constantly
repeating and annoying) message "blocking call to accept-process-output with
quit inhibited!!". It doesn't actually seem to "block" anything as flyspell
still functions as expected, but it's annoying. Is there any way to simply
inhibit (block) this "blocking call to accept-process-output with quit
inhibited!!" message?

Or something which can be fixed/hacked in Flyspell?

thanks,
-----------------------------------------------------------------------------------------------------
Benjamin Slade <slade@uta.edu>
Dept. of Linguistics & TESOL - University of Texas at Arlington


132E Hammond Hall | Office Hours: tba
[http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]

Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com
-----------------------------------------------------------------------------------------------------
Ongietan sceal gleaw hæle         hu gæstlic bið,
þonne ealre þisse worulde wela   weste stondeð.
                                                     --*The Wanderer*, ll.
73-4.

[-- Attachment #2: Type: text/html, Size: 1608 bytes --]

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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-09-14 17:37 Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!" Benjamin Slade
@ 2011-09-14 19:15 ` Stefan Monnier
  2011-10-11 23:10   ` Benjamin Slade
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-09-14 19:15 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: emacs-devel

> Using Emacs 24.0.50.1 with the flyspell package generates a (constantly
> repeating and annoying) message "blocking call to accept-process-output with
> quit inhibited!!". It doesn't actually seem to "block" anything as flyspell
> still functions as expected, but it's annoying.

The message simply indicates that the code waits for some external event
(in this case answer from ispell) while quit is inhibited, which implies
that if ispell decides to take its time, Emacs will hang.
I.e. it indicates of a latent bug in flyspell.el.

> Or something which can be fixed/hacked in Flyspell?

Can you try the patch below?


        Stefan


=== modified file 'lisp/textmodes/flyspell.el'
--- lisp/textmodes/flyspell.el	2011-09-11 02:14:10 +0000
+++ lisp/textmodes/flyspell.el	2011-09-14 19:14:21 +0000
@@ -931,9 +931,10 @@
 ;;*       previous word nor the current word                            */
 ;;*---------------------------------------------------------------------*/
 (defun flyspell-post-command-hook ()
-  "The `post-command-hook' used by flyspell to check a word in-the-fly."
+  "The `post-command-hook' used by flyspell to check a word on-the-fly."
   (interactive)
   (when flyspell-mode
+    (with-local-quit
     (let ((command this-command)
 	  ;; Prevent anything we do from affecting the mark.
 	  deactivate-mark)
@@ -946,6 +947,7 @@
       (if (flyspell-check-word-p)
 	  (progn
 	    '(flyspell-debug-signal-word-checked)
+              ;; FIXME: This should be asynchronous!
 	    (flyspell-word)
 	    ;; we remember which word we have just checked.
 	    ;; this will be used next time we will check a word
@@ -960,7 +962,8 @@
 	  (setq flyspell-pre-pre-point  nil)
 	  ;; when a word is not checked because of a delayed command
 	  ;; we do not disable the ispell cache.
-	  (if (and (symbolp this-command) (get this-command 'flyspell-delayed))
+            (if (and (symbolp this-command)
+                     (get this-command 'flyspell-delayed))
 	      (progn
 		(setq flyspell-word-cache-end -1)
 		(setq flyspell-word-cache-result '_)))))
@@ -973,7 +976,7 @@
 		(goto-char start)
 		(flyspell-word)))
 	  (setq flyspell-changes (cdr flyspell-changes))))
-      (setq flyspell-previous-command command))))
+        (setq flyspell-previous-command command)))))
 
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-notify-misspell ...                                     */
@@ -1100,14 +1103,10 @@
                   ;; we mark the ispell process so it can be killed
                   ;; when emacs is exited without query
                   (set-process-query-on-exit-flag ispell-process nil)
-                  ;; Wait until ispell has processed word.  Since this
-                  ;; code is often executed from post-command-hook but
-                  ;; the ispell process may not be responsive, it's
-                  ;; important to make sure we re-enable C-g.
-                  (with-local-quit
+                  ;; Wait until ispell has processed word.
                     (while (progn
                              (accept-process-output ispell-process)
-                             (not (string= "" (car ispell-filter))))))
+                           (not (string= "" (car ispell-filter)))))
                   ;; (ispell-send-string "!\n")
                   ;; back to terse mode.
                   ;; Remove leading empty element




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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-09-14 19:15 ` Stefan Monnier
@ 2011-10-11 23:10   ` Benjamin Slade
  2011-10-12  2:49     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2011-10-11 23:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Hi Stefan,

When I try to apply the patch you provided, I get error messages ("Hunk #1
FAILED at 931. Hunk #2 FAILED at 946. Hunk #3 FAILED at 960. Hunk #4 FAILED
at 973. Hunk #5 FAILED at 1100."). I'm not sure why.

Could you send me the patched flyspell.el file directly?

thanks,
  --Ben
-----------------------------------------------------------------------------------------------------
Dr Benjamin Slade <slade@uta.edu>
Dept. of Linguistics & TESOL - University of Texas at Arlington


132E Hammond Hall | Office Hours: tba
[http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]

Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com
-----------------------------------------------------------------------------------------------------
Ongietan sceal gleaw hæle         hu gæstlic bið,
þonne ealre þisse worulde wela   weste stondeð.
                                                     --*The Wanderer*, ll.
73-4.


On 14 September 2011 14:15, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > Using Emacs 24.0.50.1 with the flyspell package generates a (constantly
> > repeating and annoying) message "blocking call to accept-process-output
> with
> > quit inhibited!!". It doesn't actually seem to "block" anything as
> flyspell
> > still functions as expected, but it's annoying.
>
> The message simply indicates that the code waits for some external event
> (in this case answer from ispell) while quit is inhibited, which implies
> that if ispell decides to take its time, Emacs will hang.
> I.e. it indicates of a latent bug in flyspell.el.
>
> > Or something which can be fixed/hacked in Flyspell?
>
> Can you try the patch below?
>
>
>        Stefan
>
>
> === modified file 'lisp/textmodes/flyspell.el'
> --- lisp/textmodes/flyspell.el  2011-09-11 02:14:10 +0000
> +++ lisp/textmodes/flyspell.el  2011-09-14 19:14:21 +0000
> @@ -931,9 +931,10 @@
>  ;;*       previous word nor the current word                            */
>  ;;*---------------------------------------------------------------------*/
>  (defun flyspell-post-command-hook ()
> -  "The `post-command-hook' used by flyspell to check a word in-the-fly."
> +  "The `post-command-hook' used by flyspell to check a word on-the-fly."
>   (interactive)
>   (when flyspell-mode
> +    (with-local-quit
>     (let ((command this-command)
>          ;; Prevent anything we do from affecting the mark.
>          deactivate-mark)
> @@ -946,6 +947,7 @@
>       (if (flyspell-check-word-p)
>          (progn
>            '(flyspell-debug-signal-word-checked)
> +              ;; FIXME: This should be asynchronous!
>            (flyspell-word)
>            ;; we remember which word we have just checked.
>            ;; this will be used next time we will check a word
> @@ -960,7 +962,8 @@
>          (setq flyspell-pre-pre-point  nil)
>          ;; when a word is not checked because of a delayed command
>          ;; we do not disable the ispell cache.
> -         (if (and (symbolp this-command) (get this-command
> 'flyspell-delayed))
> +            (if (and (symbolp this-command)
> +                     (get this-command 'flyspell-delayed))
>              (progn
>                (setq flyspell-word-cache-end -1)
>                (setq flyspell-word-cache-result '_)))))
> @@ -973,7 +976,7 @@
>                (goto-char start)
>                (flyspell-word)))
>          (setq flyspell-changes (cdr flyspell-changes))))
> -      (setq flyspell-previous-command command))))
> +        (setq flyspell-previous-command command)))))
>
>  ;;*---------------------------------------------------------------------*/
>  ;;*    flyspell-notify-misspell ...                                     */
> @@ -1100,14 +1103,10 @@
>                   ;; we mark the ispell process so it can be killed
>                   ;; when emacs is exited without query
>                   (set-process-query-on-exit-flag ispell-process nil)
> -                  ;; Wait until ispell has processed word.  Since this
> -                  ;; code is often executed from post-command-hook but
> -                  ;; the ispell process may not be responsive, it's
> -                  ;; important to make sure we re-enable C-g.
> -                  (with-local-quit
> +                  ;; Wait until ispell has processed word.
>                     (while (progn
>                              (accept-process-output ispell-process)
> -                             (not (string= "" (car ispell-filter))))))
> +                           (not (string= "" (car ispell-filter)))))
>                   ;; (ispell-send-string "!\n")
>                   ;; back to terse mode.
>                   ;; Remove leading empty element
>
>


--

[-- Attachment #2: Type: text/html, Size: 6258 bytes --]

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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-10-11 23:10   ` Benjamin Slade
@ 2011-10-12  2:49     ` Stefan Monnier
       [not found]       ` <CAH+j8rAUacPONszJPBhJ9eXKKved6qyEZOFRVB+q31awP7y4DA@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-10-12  2:49 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: emacs-devel

> When I try to apply the patch you provided, I get error messages ("Hunk #1
> FAILED at 931. Hunk #2 FAILED at 946. Hunk #3 FAILED at 960. Hunk #4 FAILED
> at 973. Hunk #5 FAILED at 1100."). I'm not sure why.

> Could you send me the patched flyspell.el file directly?

I've just installed the patch into the trunk, so you can try it
from there.


        Stefan



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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
       [not found]       ` <CAH+j8rAUacPONszJPBhJ9eXKKved6qyEZOFRVB+q31awP7y4DA@mail.gmail.com>
@ 2011-10-12  3:55         ` Benjamin Slade
  2011-10-12 14:36           ` Benjamin Slade
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2011-10-12  3:55 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Thanks, Stefan.

Ok, using the patched version of flyspell from the trunk, the "blocking call
to accept-process-output with quit inhibited!!"  message now appears
somewhat less frequently than before, but unfortunately it still appears.

The message now seems to occur when the cursor moves across certain
characters, including (but likely not limited to) space, comma, forward
slash.

--Ben


> On 11 October 2011 21:49, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>>
>> I've just installed the patch into the trunk, so you can try it
>> from there.
>>
>>
>>        Stefan
>>
>
>
-----------------------------------------------------------------------------------------------------
Dr Benjamin Slade <slade@uta.edu>
Dept. of Linguistics & TESOL - University of Texas at Arlington


132E Hammond Hall | Office Hours: tba
[http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]

Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com
-----------------------------------------------------------------------------------------------------
Ongietan sceal gleaw hæle         hu gæstlic bið,
þonne ealre þisse worulde wela   weste stondeð.
                                                     --*The Wanderer*, ll.
73-4.

[-- Attachment #2: Type: text/html, Size: 2227 bytes --]

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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-10-12  3:55         ` Benjamin Slade
@ 2011-10-12 14:36           ` Benjamin Slade
  2011-10-12 17:51             ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2011-10-12 14:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Nevermind, forgot to byte-compile. Patched version does indeed work without
displaying the "blocking call" message.

thanks!

--Ben

On 11 October 2011 22:55, Benjamin Slade <slade@jnanam.net> wrote:

> Thanks, Stefan.
>
> Ok, using the patched version of flyspell from the trunk, the "blocking
> call to accept-process-output with quit inhibited!!"  message now appears
> somewhat less frequently than before, but unfortunately it still appears.
>
> The message now seems to occur when the cursor moves across certain
> characters, including (but likely not limited to) space, comma, forward
> slash.
>
> --Ben
>
>
>> On 11 October 2011 21:49, Stefan Monnier <monnier@iro.umontreal.ca>wrote:
>>
>>>
>>> I've just installed the patch into the trunk, so you can try it
>>> from there.
>>>
>>>
>>>        Stefan
>>>
>>
>>
>
> -----------------------------------------------------------------------------------------------------
> Dr Benjamin Slade <slade@uta.edu>
> Dept. of Linguistics & TESOL - University of Texas at Arlington
>
>
> 132E Hammond Hall | Office Hours: tba
> [http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]
>
> Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
> The Babbage Files (techblog) - http://babbagefiles.blogspot.com
>
> -----------------------------------------------------------------------------------------------------
> Ongietan sceal gleaw hæle         hu gæstlic bið,
> þonne ealre þisse worulde wela   weste stondeð.
>                                                      --*The Wanderer*, ll.
> 73-4.
>
>


-- 
-----------------------------------------------------------------------------------------------------
Dr Benjamin Slade <slade@uta.edu>
Dept. of Linguistics & TESOL - University of Texas at Arlington


132E Hammond Hall | Office Hours: tba
[http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]

Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com
-----------------------------------------------------------------------------------------------------
Ongietan sceal gleaw hæle         hu gæstlic bið,
þonne ealre þisse worulde wela   weste stondeð.
                                                     --*The Wanderer*, ll.
73-4.

[-- Attachment #2: Type: text/html, Size: 3905 bytes --]

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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-10-12 14:36           ` Benjamin Slade
@ 2011-10-12 17:51             ` Stefan Monnier
  2011-10-12 20:27               ` Benjamin Slade
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-10-12 17:51 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: emacs-devel

> Nevermind, forgot to byte-compile. Patched version does indeed work without
> displaying the "blocking call" message.

Great to hear, thank you.  So we can put it to rest.


        Stefan


> On 11 October 2011 22:55, Benjamin Slade <slade@jnanam.net> wrote:

>> Thanks, Stefan.
>> 
>> Ok, using the patched version of flyspell from the trunk, the "blocking
>> call to accept-process-output with quit inhibited!!"  message now appears
>> somewhat less frequently than before, but unfortunately it still appears.
>> 
>> The message now seems to occur when the cursor moves across certain
>> characters, including (but likely not limited to) space, comma, forward
>> slash.
>> 
>> --Ben
>> 
>> 
>>> On 11 October 2011 21:49, Stefan Monnier <monnier@iro.umontreal.ca>wrote:
>>> 
>>>> 
>>>> I've just installed the patch into the trunk, so you can try it
>>>> from there.
>>>> 
>>>> 
>>>> Stefan
>>>> 
>>> 
>>> 
>> 
>> -----------------------------------------------------------------------------------------------------
>> Dr Benjamin Slade <slade@uta.edu>
>> Dept. of Linguistics & TESOL - University of Texas at Arlington
>> 
>> 
>> 132E Hammond Hall | Office Hours: tba
>> [http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]
>> 
>> Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
>> The Babbage Files (techblog) - http://babbagefiles.blogspot.com
>> 
>> -----------------------------------------------------------------------------------------------------
>> Ongietan sceal gleaw hæle         hu gæstlic bið,
>> þonne ealre þisse worulde wela   weste stondeð.
>> --*The Wanderer*, ll.
>> 73-4.
>> 
>> 


> -- 
> -----------------------------------------------------------------------------------------------------
> Dr Benjamin Slade <slade@uta.edu>
> Dept. of Linguistics & TESOL - University of Texas at Arlington


> 132E Hammond Hall | Office Hours: tba
> [http://ling.uta.edu/~ben/ <http://ling.uta.edu/%7Eben/%20>]

> Stæfcræft & Vyākaraṇa (lingblog) - http://staefcraeft.blogspot.com
> The Babbage Files (techblog) - http://babbagefiles.blogspot.com
> -----------------------------------------------------------------------------------------------------
> Ongietan sceal gleaw hæle         hu gæstlic bið,
> þonne ealre þisse worulde wela   weste stondeð.
>                                                      --*The Wanderer*, ll.
> 73-4.



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

* Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!"
  2011-10-12 17:51             ` Stefan Monnier
@ 2011-10-12 20:27               ` Benjamin Slade
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Slade @ 2011-10-12 20:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

On 12 October 2011 12:51, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > Nevermind, forgot to byte-compile. Patched version does indeed work
> without
> > displaying the "blocking call" message.
>
> Great to hear, thank you.  So we can put it to rest.
>
>
>        Stefan
>

Yes.

[-- Attachment #2: Type: text/html, Size: 590 bytes --]

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

end of thread, other threads:[~2011-10-12 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-14 17:37 Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!" Benjamin Slade
2011-09-14 19:15 ` Stefan Monnier
2011-10-11 23:10   ` Benjamin Slade
2011-10-12  2:49     ` Stefan Monnier
     [not found]       ` <CAH+j8rAUacPONszJPBhJ9eXKKved6qyEZOFRVB+q31awP7y4DA@mail.gmail.com>
2011-10-12  3:55         ` Benjamin Slade
2011-10-12 14:36           ` Benjamin Slade
2011-10-12 17:51             ` Stefan Monnier
2011-10-12 20:27               ` Benjamin Slade

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

	https://git.savannah.gnu.org/cgit/emacs.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).