Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created January 24, 2013 15:02
Show Gist options
  • Select an option

  • Save jorgenschaefer/4622692 to your computer and use it in GitHub Desktop.

Select an option

Save jorgenschaefer/4622692 to your computer and use it in GitHub Desktop.
;; On Emacs 23, this returns "Received 5001 bytes, should be 5001"
;; On Emacs 24.3.50, this returns "Received 4096 bytes, should be 5001"
(let* ((buffer (generate-new-buffer "*bug-test*"))
(proc (start-process "cat" buffer "cat")))
(with-current-buffer buffer
(erase-buffer)
(process-send-string proc (concat (make-string 5000 ?a) "\n"))
(while (not (progn
(goto-char (point-min))
(re-search-forward "\n" nil t)))
(accept-process-output proc))
(format "Received %i bytes, should be 5001!"
(- (point-max) 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment