unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#727: compilation-disable-input
@ 2008-08-14 21:17 Perry Smith
  0 siblings, 0 replies; 4+ messages in thread
From: Perry Smith @ 2008-08-14 21:17 UTC (permalink / raw)
  To: bug-gnu-emacs

I'm not sure what this is intended to do.  Sending just one EOF  
character to a process creates one EOF if many conditions are met.   
But a second read from the same pty will continue to look for input.

The following code:
	      (when compilation-disable-input
                 (condition-case nil
                     (process-send-eof proc)
                   ;; The process may have exited already.
                   (error nil)))

Causes my grep buffer to start with a ^D (the EOF character that  
process-send-eof sends).  This goofs up the parsing of the lines.

If you really do not want input, you need to close stdin.  This could  
be done in various ways but this is not the way to do it.

Perry Smith
pedzan@austin.ibm.com










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

* bug#727: compilation-disable-input
@ 2008-08-21 23:30 Chong Yidong
  2008-09-04 16:10 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2008-08-21 23:30 UTC (permalink / raw)
  To: Perry Smith; +Cc: 727

> I'm not sure what this is intended to do.  Sending just one EOF  
> character to a process creates one EOF if many conditions are met.   
> But a second read from the same pty will continue to look for input.
>
> The following code:
> 	      (when compilation-disable-input
>                 (condition-case nil
>                     (process-send-eof proc)
>                   ;; The process may have exited already.
>                   (error nil)))
>
> Causes my grep buffer to start with a ^D (the EOF character that  
> process-send-eof sends).  This goofs up the parsing of the lines.

I can't reproduce this (I don't see any ^D character in grep buffers).
Could you send a recipe for reproducing this bug, as well as your system
specs?






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

* bug#727: compilation-disable-input
  2008-08-21 23:30 bug#727: compilation-disable-input Chong Yidong
@ 2008-09-04 16:10 ` Stefan Monnier
  2015-12-29  4:52   ` Andrew Hyatt
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-09-04 16:10 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Perry Smith, 727

>> I'm not sure what this is intended to do.  Sending just one EOF  
>> character to a process creates one EOF if many conditions are met.   
>> But a second read from the same pty will continue to look for input.
>> 
>> The following code:
>> (when compilation-disable-input
>> (condition-case nil
>> (process-send-eof proc)
>> ;; The process may have exited already.
>> (error nil)))
>> 
>> Causes my grep buffer to start with a ^D (the EOF character that  
>> process-send-eof sends).  This goofs up the parsing of the lines.

> I can't reproduce this (I don't see any ^D character in grep buffers).
> Could you send a recipe for reproducing this bug, as well as your system
> specs?

I remember seeing exactly these kinds of ^D under Mac OS X where
process-send-eof causes them (either for pipes or for ttys, can't
remember which).

I even added a workaround for this problem in pcvs.el's
cvs-parse-process:

  (when (eq system-type 'darwin)
    ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on MacOSX
    ;; because of the call to `process-send-eof'.
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward "^\\^D\b+" nil t)
	(let ((inhibit-read-only t))
	  (delete-region (match-beginning 0) (match-end 0))))))

Not sure if it's related.


        Stefan






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

* bug#727: compilation-disable-input
  2008-09-04 16:10 ` Stefan Monnier
@ 2015-12-29  4:52   ` Andrew Hyatt
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Hyatt @ 2015-12-29  4:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Chong Yidong, 727, Perry Smith


Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>> I'm not sure what this is intended to do.  Sending just one EOF  
>>> character to a process creates one EOF if many conditions are met.   
>>> But a second read from the same pty will continue to look for input.
>>> 
>>> The following code:
>>> (when compilation-disable-input
>>> (condition-case nil
>>> (process-send-eof proc)
>>> ;; The process may have exited already.
>>> (error nil)))
>>> 
>>> Causes my grep buffer to start with a ^D (the EOF character that  
>>> process-send-eof sends).  This goofs up the parsing of the lines.
>
>> I can't reproduce this (I don't see any ^D character in grep buffers).
>> Could you send a recipe for reproducing this bug, as well as your system
>> specs?
>
> I remember seeing exactly these kinds of ^D under Mac OS X where
> process-send-eof causes them (either for pipes or for ttys, can't
> remember which).
>
> I even added a workaround for this problem in pcvs.el's
> cvs-parse-process:
>
>   (when (eq system-type 'darwin)
>     ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on MacOSX
>     ;; because of the call to `process-send-eof'.
>     (save-excursion
>       (goto-char (point-min))
>       (while (re-search-forward "^\\^D\b+" nil t)
> 	(let ((inhibit-read-only t))
> 	  (delete-region (match-beginning 0) (match-end 0))))))
>
> Not sure if it's related.
>
>
>         Stefan

I can't reproduce this in Emacs 25, on Mac OS X (although, as Yidong
noted, we don't have clear reproducible steps). Due to all that, and as
the original author hasn't replied in the last 7 years. I'm closing this
as unreproducible, but please re-open if it still exists.





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

end of thread, other threads:[~2015-12-29  4:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-21 23:30 bug#727: compilation-disable-input Chong Yidong
2008-09-04 16:10 ` Stefan Monnier
2015-12-29  4:52   ` Andrew Hyatt
  -- strict thread matches above, loose matches on Subject: below --
2008-08-14 21:17 Perry Smith

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