Subject: bug#12440: 24.2; process-send-string only sends 4K for long strings

From: Hendrik Tews <[email-masked]>
Date: Fri, 14 Sep 2012 11:08:00 +0200

Hi,

in Emacs 24.2, the following code

  (let* ((process-connection-type t)
         (process (start-process "cat" (current-buffer) "cat")))
    (process-send-string process (format "%s\n" (make-string 6000 ?a))))

inserts only 4095 characters in the current buffer. Setting
process-connection-type to nil will insert all characters. In Emacs 23
the code works always as expected.

This is probably related to Emacs bug #7078. I cannot reproduce the
problem described there (with 257 characters), probably because the
buffer size was increased to 4K.

Bye,

Hendrik Tews

In GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-13 on blau
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40300000
Configured using:
 `configure '--prefix' '/usr/local/stow/emacs-24.2' '--with-xpm=no'
 '--with-jpeg=no' '--with-gif=no' '--with-tiff=no''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> C-x s ! ! <backspace> C-x s ! <f9> C-x b T 
O <tab> <return> C-x C-v <return> <down> <down> <down> 
<down> <down> <down> <down> C-SPC <down> <down> M-w 
C-x b <return> <backspace> C-y <left> C-j M-x e m a 
c s - v e r <tab> <return> <up> <up> <down> <down> 
<down> C-k C-k <up> <up> <up> <M-right> <M-right> <M-right> 
<M-right> <M-right> <M-right> <M-right> <M-right> <M-right> 
<M-right> <backspace> <backspace> <backspace> 6 0 0 
0 C-e C-j <down> <down> <down> C-SPC C-e M-= M-< A-f 
<down> <down> <down> <C-down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <up> <M-right> * <right> <right> C-o ( p r o 
c e s s - c o n n M-/ <left> <left> C-h v <return> 
C-e SPC n i l ) <down> <tab> C-e <backspace> ) <down> 
<down> <down> <down> <down> <down> C-a C-k <up> <up> 
<up> <up> <up> C-e <backspace> ) C-j C-x 1 <down> <down> 
<down> <down> <down> <down> C-SPC C-e M-= C-a C-k <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> C-e <left> 
<M-backspace> t <down> <down> C-e C-j <down> <down> 
<down> <down> <down> <down> <down> <down> <down> C-SPC 
C-e M-= C-a C-SPC <right> M-= C-a C-SPC C-e M-= C-a 
M-f C-a M-1 C-f C-a M-4 M-0 M-9 M-6 C-f C-a <up> C-a 
M-4 M-0 M-9 M-5 C-f C-a <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <down> C-k 
C-k C-k C-k C-k C-x b T O <tab> <return> <up> <up> 
C-y <return> C-k C-k C-k C-k C-o C-x C-s <up> <up> 
<up> <up> <down> M-x e m a c s - v e r <tab> <return> 
M-x r e p o r t - e m <tab> <return>

Recent messages:
Mark set
Region has 1 line, 1 word, and 4095 characters.
Mark activated
Region has 1 line, 1 word, and 1 character.
Mark activated
Region has 1 line, 1 word, and 4095 characters.
Mark set
Saving file /home/tews/src/pg/TODO...
Wrote /home/tews/src/pg/TODO
GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-13 on blau

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils jka-compr find-func etags debug dabbrev parse-time
vc-cvs tabulated-list pp help-mode view which-func imenu coq edmacro
kmacro coq-smie-lexer smie coq-indent coq-abbrev coq-local-vars
local-vars-list coq-syntax regexp-opt coq-db holes proof proof-shell
pg-user completion pg-goals pg-response proof-toolbar pg-assoc
proof-tree proof-script proof-menu cus-edit cus-start cus-load wid-edit
span proof-auxmodes proof-utils scomint proof-syntax advice help-fns
advice-preload bufhist easy-mmode ring proof-splash derived pg-custom
proof-config proof-faces proof-useropts pg-pamacs proof-compat easymenu
proof-site proof-autoloads cl pg-vars misearch multi-isearch time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)