Subject: 24.1; Completion cycling completely broken in shell

From: Milan Zamazal <[email-masked]>
Date: Mon, 30 Jul 2012 13:24:40 +0200

When completion-cycle-threshold is set to a non-nil value, completion
starts doing weird things in interactive shells and becomes unusable.
Just one example:

  M-x set-variable RET completion-cycle-threshold RET t RET   (enable completion cycling)
  M-x shell RET   (start an interactive shell)
  cd /usr/   (type in a partial command line)
  TAB   (initial completion; `../ ' is inserted which is fine)
  TAB   (repeated completion; `../ ' is replaced with `.' and an error is signalled)

The error message is something like:

  minibuffer-force-complete: Args out of range: 615, 618

In GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-29 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11201902
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-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/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -O2'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

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