emacs-devel
[Top][All Lists]
Advanced

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

Re: process output has become a bit random...


From: Kim F. Storm
Subject: Re: process output has become a bit random...
Date: 29 Jul 2004 16:58:34 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> David Kastrup <address@hidden> writes:
>
> > David Kastrup <address@hidden> writes:
> >
> > > Ralf Angeli <address@hidden> writes:
> > >
> > > Yes, that's it.  Even though the very last line would appear to be a
> > > preview-latex internal bug.  If you take a look at the run buffer
> > > (C-c C-l) and search for, say, "Snippet 8", you will find that some
> > > passages around the matches are replicated.
> > >
> > > It is probably some change in process.c or coding.c in the last
> > > month or so.  If you use gcc-3.3.4, at least it does not seem to be
> > > gcc-3.4-related like I feared at first.
> >
> > The error first appears with version 1.431 of process.c.
>
> Could you try to set readmax to 1024 ?
>
> That may break UDP packet receive, but it isn't relevant for this case.


Could you also try the following patch (with readmax=4096).

I don't expect it to make a lot of difference, but just to rule out
the obvious...


*** process.c   19 Jul 2004 12:02:56 +0200      1.433
--- process.c   29 Jul 2004 16:46:31 +0200      
***************
*** 4762,4777 ****
    if (DATAGRAM_CHAN_P (channel))
      {
        int len = datagram_address[channel].len;
!       nbytes = recvfrom (channel, chars + carryover, readmax - carryover,
                         0, datagram_address[channel].sa, &len);
      }
    else
  #endif
    if (proc_buffered_char[channel] < 0)
      {
!       nbytes = emacs_read (channel, chars + carryover, readmax - carryover);
  #ifdef ADAPTIVE_READ_BUFFERING
!       if (!NILP (p->adaptive_read_buffering))
        {
          int delay = XINT (p->read_output_delay);
          if (nbytes < 256)
--- 4762,4777 ----
    if (DATAGRAM_CHAN_P (channel))
      {
        int len = datagram_address[channel].len;
!       nbytes = recvfrom (channel, chars + carryover, readmax,
                         0, datagram_address[channel].sa, &len);
      }
    else
  #endif
    if (proc_buffered_char[channel] < 0)
      {
!       nbytes = emacs_read (channel, chars + carryover, readmax);
  #ifdef ADAPTIVE_READ_BUFFERING
!       if (nbytes > 0 && !NILP (p->adaptive_read_buffering))
        {
          int delay = XINT (p->read_output_delay);
          if (nbytes < 256)
***************
*** 4783,4789 ****
                  delay += READ_OUTPUT_DELAY_INCREMENT * 2;
                }
            }
!         else if (delay > 0 && (nbytes == readmax - carryover))
            {
              delay -= READ_OUTPUT_DELAY_INCREMENT;
              if (delay == 0)
--- 4783,4789 ----
                  delay += READ_OUTPUT_DELAY_INCREMENT * 2;
                }
            }
!         else if (delay > 0 && (nbytes == readmax))
            {
              delay -= READ_OUTPUT_DELAY_INCREMENT;
              if (delay == 0)
***************
*** 4802,4808 ****
      {
        chars[carryover] = proc_buffered_char[channel];
        proc_buffered_char[channel] = -1;
!       nbytes = emacs_read (channel, chars + carryover + 1,  readmax - 1 - 
carryover);
        if (nbytes < 0)
        nbytes = 1;
        else
--- 4802,4808 ----
      {
        chars[carryover] = proc_buffered_char[channel];
        proc_buffered_char[channel] = -1;
!       nbytes = emacs_read (channel, chars + carryover + 1,  readmax - 1);
        if (nbytes < 0)
        nbytes = 1;
        else

--
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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