Subject: 23.2; Filter function causes flickering in minibuffer

From: Sean McLaughlin <[email-masked]>
Date: Mon, 26 Mar 2012 13:43:03 -0700

1) Create a file count.sh

#!/bin/bash

ctr=0

while true; do
    sleep 1
    echo "ctr = $ctr"
    ctr=$(( ctr + 1 ))
done

2) Create a buffer called *count*

3) Start count asyncronously from a clean emacs (-q)

(defun Tmp.filter-fun (proc s)
  (with-current-buffer "*count*"
    (insert s)))

(defun Tmp.count ()
  (interactive)
  (let ((process
         (start-process
          "count"
          "*count*"
          "/home/seanmcl/bin/count")))
    (set-process-filter process 'Tmp.filter-fun)))

4) Type C-x

This will cause C-x to show up in the minibuffer.  Every time a
line is filtered from count, the C-x flickers in the minibuffer,
sometimes moving a character to the right and then back to the
left.

In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--build' 'i486-linux-gnu' '--build'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g'
'CPPFLAGS=''

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.utf8
  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
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x r e p o r t SPC e m SPC <return>

Recent messages:
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...
Loading /usr/local/share/emacs/23.2/site-lisp/haskell-mode/haskell-site-file.el
(source)...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
Loading /etc/emacs/site-start.d/50sml-mode.el (source)...
Loading /usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-mode-startup.el
(source)...done
Loading /etc/emacs/site-start.d/50sml-mode.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-defs hides
/usr/share/emacs23/site-lisp/sml-mode/sml-defs
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-util hides
/usr/share/emacs23/site-lisp/sml-mode/sml-util
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-mode-startup hides
/usr/share/emacs23/site-lisp/sml-mode/sml-mode-startup
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-mode hides
/usr/share/emacs23/site-lisp/sml-mode/sml-mode
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-compat hides
/usr/share/emacs23/site-lisp/sml-mode/sml-compat
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-move hides
/usr/share/emacs23/site-lisp/sml-mode/sml-move
/usr/local/share/emacs/23.2/site-lisp/sml-mode/sml-proc hides
/usr/share/emacs23/site-lisp/sml-mode/sml-proc
/usr/share/emacs23/site-lisp/emacs-goodies-el/highlight-beyond-fill-column
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/highlight-beyond-fill-column
/usr/share/emacs23/site-lisp/emacs-goodies-el/keydef hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/keydef
/usr/share/emacs23/site-lisp/emacs-goodies-el/todoo hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/todoo
/usr/share/emacs23/site-lisp/emacs-goodies-el/home-end hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/home-end
/usr/share/emacs23/site-lisp/emacs-goodies-el/emacs-goodies-el hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/emacs-goodies-el
/usr/share/emacs23/site-lisp/emacs-goodies-el/show-wspace hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/show-wspace
/usr/share/emacs23/site-lisp/emacs-goodies-el/bm hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/bm
/usr/share/emacs23/site-lisp/emacs-goodies-el/obfusurl hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/obfusurl
/usr/share/emacs23/site-lisp/emacs-goodies-el/dedicated hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/dedicated
/usr/share/emacs23/site-lisp/emacs-goodies-el/pack-windows hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/pack-windows
/usr/share/emacs23/site-lisp/emacs-goodies-el/folding hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/folding
/usr/share/emacs23/site-lisp/emacs-goodies-el/ascii hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/ascii
/usr/share/emacs23/site-lisp/emacs-goodies-el/toggle-option hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/toggle-option
/usr/share/emacs23/site-lisp/emacs-goodies-el/slang-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/slang-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/protocols hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/protocols
/usr/share/emacs23/site-lisp/emacs-goodies-el/htmlize hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/htmlize
/usr/share/emacs23/site-lisp/emacs-goodies-el/pp-c-l hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/pp-c-l
/usr/share/emacs23/site-lisp/emacs-goodies-el/rfcview hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/rfcview
/usr/share/emacs23/site-lisp/emacs-goodies-el/bar-cursor hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/bar-cursor
/usr/share/emacs23/site-lisp/emacs-goodies-el/xrdb-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/xrdb-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/cwebm hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/cwebm
/usr/share/emacs23/site-lisp/emacs-goodies-el/tc hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/tc
/usr/share/emacs23/site-lisp/emacs-goodies-el/csv-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/csv-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/maplev hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/maplev
/usr/share/emacs23/site-lisp/emacs-goodies-el/sys-apropos hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/sys-apropos
/usr/share/emacs23/site-lisp/emacs-goodies-el/mutt-alias hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/mutt-alias
/usr/share/emacs23/site-lisp/emacs-goodies-el/tail hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/tail
/usr/share/emacs23/site-lisp/emacs-goodies-el/initsplit hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/initsplit
/usr/share/emacs23/site-lisp/emacs-goodies-el/color-theme-library
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/color-theme-library
/usr/share/emacs23/site-lisp/emacs-goodies-el/browse-kill-ring hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/browse-kill-ring
/usr/share/emacs23/site-lisp/emacs-goodies-el/setnu hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/setnu
/usr/share/emacs23/site-lisp/emacs-goodies-el/thinks hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/thinks
/usr/share/emacs23/site-lisp/emacs-goodies-el/projects hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/projects
/usr/share/emacs23/site-lisp/emacs-goodies-el/egocentric hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/egocentric
/usr/share/emacs23/site-lisp/emacs-goodies-el/dict hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/dict
/usr/share/emacs23/site-lisp/emacs-goodies-el/ff-paths hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/ff-paths
/usr/share/emacs23/site-lisp/emacs-goodies-el/df hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/df
/usr/share/emacs23/site-lisp/emacs-goodies-el/framepop hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/framepop
/usr/share/emacs23/site-lisp/emacs-goodies-el/matlab hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/matlab
/usr/share/emacs23/site-lisp/emacs-goodies-el/tabbar hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/tabbar
/usr/share/emacs23/site-lisp/emacs-goodies-el/emacs-goodies-custom
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/emacs-goodies-custom
/usr/share/emacs23/site-lisp/emacs-goodies-el/filladapt hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/filladapt
/usr/share/emacs23/site-lisp/emacs-goodies-el/dir-locals hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/dir-locals
/usr/share/emacs23/site-lisp/emacs-goodies-el/browse-huge-tar hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/browse-huge-tar
/usr/share/emacs23/site-lisp/emacs-goodies-el/session hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/session
/usr/share/emacs23/site-lisp/emacs-goodies-el/auto-fill-inhibit hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/auto-fill-inhibit
/usr/share/emacs23/site-lisp/emacs-goodies-el/pod-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/pod-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/color-theme_seldefcustom
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/color-theme_seldefcustom
/usr/share/emacs23/site-lisp/emacs-goodies-el/joc-toggle-buffer hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/joc-toggle-buffer
/usr/share/emacs23/site-lisp/emacs-goodies-el/color-theme hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/color-theme
/usr/share/emacs23/site-lisp/emacs-goodies-el/upstart-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/upstart-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/under hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/under
/usr/share/emacs23/site-lisp/emacs-goodies-el/lcomp hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/lcomp
/usr/share/emacs23/site-lisp/emacs-goodies-el/services hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/services
/usr/share/emacs23/site-lisp/emacs-goodies-el/shell-command hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/shell-command
/usr/share/emacs23/site-lisp/emacs-goodies-el/joc-toggle-case hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/joc-toggle-case
/usr/share/emacs23/site-lisp/emacs-goodies-el/floatbg hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/floatbg
/usr/share/emacs23/site-lisp/emacs-goodies-el/diminish hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/diminish
/usr/share/emacs23/site-lisp/emacs-goodies-el/edit-env hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/edit-env
/usr/share/emacs23/site-lisp/emacs-goodies-el/twiddle hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/twiddle
/usr/share/emacs23/site-lisp/emacs-goodies-el/silly-mail hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/silly-mail
/usr/share/emacs23/site-lisp/emacs-goodies-el/coffee hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/coffee
/usr/share/emacs23/site-lisp/emacs-goodies-el/highlight-current-line
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/highlight-current-line
/usr/share/emacs23/site-lisp/emacs-goodies-el/all hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/all
/usr/share/emacs23/site-lisp/emacs-goodies-el/highlight-completion
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/highlight-completion
/usr/share/emacs23/site-lisp/emacs-goodies-el/markdown-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/markdown-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/apache-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/apache-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/minibuf-electric hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/minibuf-electric
/usr/share/emacs23/site-lisp/emacs-goodies-el/minibuffer-complete-cycle
hides /usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/minibuffer-complete-cycle
/usr/share/emacs23/site-lisp/emacs-goodies-el/protbuf hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/protbuf
/usr/share/emacs23/site-lisp/emacs-goodies-el/boxquote hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/boxquote
/usr/share/emacs23/site-lisp/emacs-goodies-el/tld hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/tld
/usr/share/emacs23/site-lisp/emacs-goodies-el/tlc hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/tlc
/usr/share/emacs23/site-lisp/emacs-goodies-el/ctypes hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/ctypes
/usr/share/emacs23/site-lisp/emacs-goodies-el/graphviz-dot-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/graphviz-dot-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/map-lines hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/map-lines
/usr/share/emacs23/site-lisp/emacs-goodies-el/clipper hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/clipper
/usr/share/emacs23/site-lisp/emacs-goodies-el/quack hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/quack
/usr/share/emacs23/site-lisp/emacs-goodies-el/keywiz hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/keywiz
/usr/share/emacs23/site-lisp/emacs-goodies-el/muttrc-mode hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/muttrc-mode
/usr/share/emacs23/site-lisp/emacs-goodies-el/marker-visit hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/marker-visit
/usr/share/emacs23/site-lisp/emacs-goodies-el/align-string hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/align-string
/usr/share/emacs23/site-lisp/emacs-goodies-el/miniedit hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/miniedit
/usr/share/emacs23/site-lisp/emacs-goodies-el/perldoc hides
/usr/local/share/emacs/23.2/site-lisp/emacs-goodies-el/perldoc
/usr/local/share/emacs/23.2/site-lisp/rst hides
/usr/share/emacs/23.2/lisp/textmodes/rst
/usr/local/share/emacs/23.2/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/23.2/lisp/textmodes/ispell
/usr/local/share/emacs/23.2/site-lisp/dictionaries-common/flyspell
hides /usr/share/emacs/23.2/lisp/textmodes/flyspell

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)