emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 22 lockup + CCL: Quited.


From: Kenichi Handa
Subject: Re: Emacs 22 lockup + CCL: Quited.
Date: Mon, 10 Mar 2008 21:20:48 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

In article <address@hidden>, address@hidden (Johan Bockg$(D+)(Brd) writes:

> Glenn Morris <address@hidden> writes:
> > Chong Yidong wrote:
> >
>>> "Kim F. Storm" <address@hidden> writes:
>>> 
>>>> I'm using an Emacs 22 built a few days ago, and today it has started
>>>> to lockup for long periods of time (many seconds) and even hitting C-g
>>>> does not bring it back to life.  
>>>> 
>>>> But after some time has elapsed, it inserts "CCL:Quitted" in the buffer,
>>>> and it becomes responsive again...
> >
> > Sounds like this issue from the trunk in September?
> >
> > http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01314.html

> The problem I saw was simply that the error message was inserted into
> the current buffer.  Emacs is admittedly sluggish when operating on this
> huge text, but I didn't consider that in itself to be a bug.  And I
> don't think that the patch changed anything in this respect (but let's
> hear what Handa says).

Yes, the change installed was just to avoid the unnecessary
call of CCL.  If you reads a huge file with CCL-based coding
system, Emacs still runs a CCL code long time, and when you
hit C-g, Emacs reports it that way (i.e. insert "CCL:
Quited" in a buffer).  I agree that it's not a good way of
reporting that decoding was quitted.

I've just installed this change for EMACS_22_BASE.  Could
someone please improve the way of reporting `quit'?

---
Kenichi Handa
address@hidden

Index: fileio.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fileio.c,v
retrieving revision 1.580.2.11
retrieving revision 1.580.2.12
diff -c -r1.580.2.11 -r1.580.2.12
*** fileio.c    7 Mar 2008 15:42:30 -0000       1.580.2.11
--- fileio.c    10 Mar 2008 12:19:35 -0000      1.580.2.12
***************
*** 4632,4639 ****
--- 4632,4650 ----
      {
        if (CODING_MAY_REQUIRE_DECODING (&coding))
        {
+         if (coding.type == coding_type_ccl)
+           coding.spec.ccl.decoder.quit_silently = 1;
          code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted,
                               &coding, 0, 0);
+         if (coding.type == coding_type_ccl)
+           coding.spec.ccl.decoder.quit_silently = 0;
+         if (coding.result == CODING_FINISH_INTERRUPT)
+           {
+             /* Fixme: It is better that we report that the decoding
+                was interruppted by the user, and the current buffer
+                contents doesn't reflect the file correctly.  */
+             Fsignal (Qquit, Qnil);
+           }
          inserted = coding.produced_char;
        }
        else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]