From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Slade Newsgroups: gmane.emacs.devel Subject: Re: Emacs 24.0.50.1, Flyspell, and "blocking call to accept-process-output with quit inhibited!!" Date: Tue, 11 Oct 2011 18:10:57 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6de181e4fb2aa04af0e064e X-Trace: dough.gmane.org 1318374692 21097 80.91.229.12 (11 Oct 2011 23:11:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 23:11:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 12 01:11:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RDlTq-0000gT-Ap for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2011 01:11:26 +0200 Original-Received: from localhost ([::1]:50236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDlTp-00071Z-Ri for ged-emacs-devel@m.gmane.org; Tue, 11 Oct 2011 19:11:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDlTl-00071P-Bs for emacs-devel@gnu.org; Tue, 11 Oct 2011 19:11:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDlTj-0000IB-Gm for emacs-devel@gnu.org; Tue, 11 Oct 2011 19:11:21 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:63171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDlTj-0000I6-51 for emacs-devel@gnu.org; Tue, 11 Oct 2011 19:11:19 -0400 Original-Received: by wyi40 with SMTP id 40so119295wyi.0 for ; Tue, 11 Oct 2011 16:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=kSnFuBDanw8xrBBqzebTlcb71+RkzPx0oeUz1vPkIEg=; b=sfErPPsNvJ0+KHFqNegGYv23ybT/5Gny3kYJdEFCGGfMf0wdLpRAFRNwPe0AB4l5Rd bczxInbTZwk8cVhiiVJjYhzUkf0xhLtwJMEqS4QxHQvD+T7MQscahCg3AH1IyRawKP6x LwNtSudqj8j0dGW8YLTbCNFFQZCNKlDRq1M0o= Original-Received: by 10.216.137.36 with SMTP id x36mr4945105wei.41.1318374677131; Tue, 11 Oct 2011 16:11:17 -0700 (PDT) Original-Received: by 10.216.39.139 with HTTP; Tue, 11 Oct 2011 16:10:57 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: tSchr4TVLcMcASbN28FJ-A7OSDw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144929 Archived-At: --0016e6de181e4fb2aa04af0e064e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Dept. of Linguistics & TESOL - University of Texas at Arlington 132E Hammond Hall | Office Hours: tba [http://ling.uta.edu/~ben/ ] St=C3=A6fcr=C3=A6ft & Vy=C4=81kara=E1=B9=87a (lingblog) - http://staefcraef= t.blogspot.com The Babbage Files (techblog) - http://babbagefiles.blogspot.com ---------------------------------------------------------------------------= -------------------------- Ongietan sceal gleaw h=C3=A6le hu g=C3=A6stlic bi=C3=B0, =C3=BEonne ealre =C3=BEisse worulde wela weste stonde=C3=B0. --*The Wanderer*, ll. 73-4. On 14 September 2011 14:15, Stefan Monnier 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 > > > =3D=3D=3D 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=3D "" (car ispell-filter)))))) > + (not (string=3D "" (car ispell-filter))))) > ;; (ispell-send-string "!\n") > ;; back to terse mode. > ;; Remove leading empty element > > -- --0016e6de181e4fb2aa04af0e064e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Stefan,

When I try to apply the patch you provided, I get error m= essages ("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,=
=C2=A0 --Ben
-------------------------------------------------------= ----------------------------------------------
Dr Benjamin Slade <slade@uta.edu>
Dept. of Linguistics & TESOL - University of Texas at Arlington=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0

132E Hammond = Hall | Office Hours: tba
[http://ling.uta.edu/~ben/]

St=C3=A6fcr=C3=A6ft & Vy=C4=81kara=E1=B9=87a (lingblog) -=C2=A0http://staefcrae= ft.blogspot.com
The Babbage Files (techblog) - http://babbagefiles.blogspot.com=
---------------------------------------------------------------------------= --------------------------
Ongietan sceal gleaw h=C3=A6le=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 hu g=C3=A6stlic bi=C3=B0,
=C3=BEonne e= alre =C3=BEisse worulde wela=C2=A0=C2=A0 weste stonde=C3=B0.
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 --The Wanderer, ll. 73-4.


On 14 September 2011 14:15, Stefan Monni= er <monnier@iro.umontreal.ca> wrote:
> Using Emacs 24.0.50.1 with the flyspell package generates a (cons= tantly
> repeating and annoying) message "blocking call to accept-process-= output with
> quit inhibited!!". It doesn't actually seem to "block&qu= ot; anything as flyspell
> still functions as expected, but it's annoying.

The message simply indicates that the code waits for some external ev= ent
(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?


=C2=A0 =C2=A0 =C2=A0 =C2=A0Stefan


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




--


--0016e6de181e4fb2aa04af0e064e--