Subject: bug#18447: 24.3; transfer case doesn't work in some instances

From: Randy Yates <[email-masked]>
Date: Wed, 10 Sep 2014 13:09:16 -0400

(defun transfer-case-test ()
  (let ((case-fold-search t)
        (case-replace t))
  (with-current-buffer (current-buffer) 
    (insert "x86_64")(newline)
    (insert "X86_64")(newline)
    (goto-char (point-min))
    (perform-replace "x86_64" "armv7l" t nil nil nil nil nil nil))))

Evaluate transfer-case-test in a new emacs -Q to see the problem. The
resulting text in the buffer will by "armv7l\n armv7l" instead of the
expected "armv7l\n ARMV7L".

--Randy

In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9)
 of 2014-08-18 on buildvm-21.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11404000
System Description:	Fedora release 20 (Heisenbug)

Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
 -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Apropos

Minor modes in effect:
  shell-dirtrack-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-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
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<backspace> s a m e SPC o n SPC f e d o r a / e m a 
c s SPC 2 4 M-x e m a c s - v e r s i o n <return> 
C-g C-g . 3 . 1 ) <return> i SPC w o u l d SPC e x 
a <backspace> p e c t SPC X 8 6 _ 6 4 C-a i n SPC t 
h a t SPC c a s e , SPC C-e SPC t o SPC b e SPC r e 
p l a c e d SPC w i t h SPC A R M V 7 L <return> i 
t s SPC <backspace> <backspace> SPC s n o t e . <backspace> 
<backspace> . <return> <help-echo> <help-echo> C-x 
b * G r <tab> <return> C-p M-g C-p C-u <return> 4 0 
<return> C-n C-p # # # C-e C-a C-n # # B m <return> 
SPC C-x o <help-echo> <help-echo> <help-echo> <help-echo> 
C-x o C-p C-p C-p SPC C-x o K H q y C-p M-g C-p C-u 
C-g C-x b <return> C-r y a t e s <return> C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-v C-v M-> C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p M-% 
C-g C-g C-g C-h f b u g <return> <tab> m o d e <tab> 
<return> M-x C-g C-g C-h a r e p o r t <return> C-x 
o C-s b u g C-s C-s C-s C-s C-s C-s C-s C-s C-s C-r 
C-r <return> C-a C-p <return> C-x o C-n C-n C-n q M-: 
( <backspace> C-g M-x r e p o r t - e m a c s - b <tab> 
<return>

Recent messages:
Quit
Mark saved where search started
Mark set
Quit [3 times]
Making completion list...
Type C-x 1 to delete the help window.
Quit [2 times]
Mark saved where search started
Note: file is write protected
Type "q" in help window to restore its previous buffer.
Quit

Load-path shadows:
/usr/share/emacs/site-lisp/site-start.d/maxima-modes hides /usr/share/emacs/site-lisp/maxima/site_start.d/maxima-modes
/home/yates/.emacs.d/elpa/org-20140602/ob-tangle hides /usr/share/emacs/24.3/lisp/org/ob-tangle
/home/yates/.emacs.d/elpa/org-20140602/ob-mscgen hides /usr/share/emacs/24.3/lisp/org/ob-mscgen
/home/yates/.emacs.d/elpa/org-20140602/ob-js hides /usr/share/emacs/24.3/lisp/org/ob-js
/home/yates/.emacs.d/elpa/org-20140602/org-bibtex hides /usr/share/emacs/24.3/lisp/org/org-bibtex
/home/yates/.emacs.d/elpa/org-20140602/ob-sqlite hides /usr/share/emacs/24.3/lisp/org/ob-sqlite
/home/yates/.emacs.d/elpa/org-20140602/org-archive hides /usr/share/emacs/24.3/lisp/org/org-archive
/home/yates/.emacs.d/elpa/org-20140602/ob-shen hides /usr/share/emacs/24.3/lisp/org/ob-shen
/home/yates/.emacs.d/elpa/org-20140602/org-src hides /usr/share/emacs/24.3/lisp/org/org-src
/home/yates/.emacs.d/elpa/org-20140602/org-mouse hides /usr/share/emacs/24.3/lisp/org/org-mouse
/home/yates/.emacs.d/elpa/org-20140602/org-capture hides /usr/share/emacs/24.3/lisp/org/org-capture
/home/yates/.emacs.d/elpa/org-20140602/ob-latex hides /usr/share/emacs/24.3/lisp/org/ob-latex
/home/yates/.emacs.d/elpa/org-20140602/ob-C hides /usr/share/emacs/24.3/lisp/org/ob-C
/home/yates/.emacs.d/elpa/org-20140602/ob hides /usr/share/emacs/24.3/lisp/org/ob
/home/yates/.emacs.d/elpa/org-20140602/ob-perl hides /usr/share/emacs/24.3/lisp/org/ob-perl
/home/yates/.emacs.d/elpa/org-20140602/ob-sh hides /usr/share/emacs/24.3/lisp/org/ob-sh
/home/yates/.emacs.d/elpa/org-20140602/ob-exp hides /usr/share/emacs/24.3/lisp/org/ob-exp
/home/yates/.emacs.d/elpa/org-20140602/ob-octave hides /usr/share/emacs/24.3/lisp/org/ob-octave
/home/yates/.emacs.d/elpa/org-20140602/org-rmail hides /usr/share/emacs/24.3/lisp/org/org-rmail
/home/yates/.emacs.d/elpa/org-20140602/org hides /usr/share/emacs/24.3/lisp/org/org
/home/yates/.emacs.d/elpa/org-20140602/ob-sql hides /usr/share/emacs/24.3/lisp/org/ob-sql
/home/yates/.emacs.d/elpa/org-20140602/ob-css hides /usr/share/emacs/24.3/lisp/org/ob-css
/home/yates/.emacs.d/elpa/org-20140602/org-ctags hides /usr/share/emacs/24.3/lisp/org/org-ctags
/home/yates/.emacs.d/elpa/org-20140602/org-element hides /usr/share/emacs/24.3/lisp/org/org-element
/home/yates/.emacs.d/elpa/org-20140602/ob-keys hides /usr/share/emacs/24.3/lisp/org/ob-keys
/home/yates/.emacs.d/elpa/org-20140602/ob-python hides /usr/share/emacs/24.3/lisp/org/ob-python
/home/yates/.emacs.d/elpa/org-20140602/ob-plantuml hides /usr/share/emacs/24.3/lisp/org/ob-plantuml
/home/yates/.emacs.d/elpa/org-20140602/org-table hides /usr/share/emacs/24.3/lisp/org/org-table
/home/yates/.emacs.d/elpa/org-20140602/ob-lob hides /usr/share/emacs/24.3/lisp/org/ob-lob
/home/yates/.emacs.d/elpa/org-20140602/ob-ruby hides /usr/share/emacs/24.3/lisp/org/ob-ruby
/home/yates/.emacs.d/elpa/org-20140602/org-bbdb hides /usr/share/emacs/24.3/lisp/org/org-bbdb
/home/yates/.emacs.d/elpa/org-20140602/org-footnote hides /usr/share/emacs/24.3/lisp/org/org-footnote
/home/yates/.emacs.d/elpa/org-20140602/org-faces hides /usr/share/emacs/24.3/lisp/org/org-faces
/home/yates/.emacs.d/elpa/org-20140602/org-feed hides /usr/share/emacs/24.3/lisp/org/org-feed
/home/yates/.emacs.d/elpa/org-20140602/ob-matlab hides /usr/share/emacs/24.3/lisp/org/ob-matlab
/home/yates/.emacs.d/elpa/org-20140602/org-colview hides /usr/share/emacs/24.3/lisp/org/org-colview
/home/yates/.emacs.d/elpa/org-20140602/ob-scala hides /usr/share/emacs/24.3/lisp/org/ob-scala
/home/yates/.emacs.d/elpa/org-20140602/org-inlinetask hides /usr/share/emacs/24.3/lisp/org/org-inlinetask
/home/yates/.emacs.d/elpa/org-20140602/org-w3m hides /usr/share/emacs/24.3/lisp/org/org-w3m
/home/yates/.emacs.d/elpa/org-20140602/ob-picolisp hides /usr/share/emacs/24.3/lisp/org/ob-picolisp
/home/yates/.emacs.d/elpa/org-20140602/ob-asymptote hides /usr/share/emacs/24.3/lisp/org/ob-asymptote
/home/yates/.emacs.d/elpa/org-20140602/org-pcomplete hides /usr/share/emacs/24.3/lisp/org/org-pcomplete
/home/yates/.emacs.d/elpa/org-20140602/org-list hides /usr/share/emacs/24.3/lisp/org/org-list
/home/yates/.emacs.d/elpa/org-20140602/org-version hides /usr/share/emacs/24.3/lisp/org/org-version
/home/yates/.emacs.d/elpa/org-20140602/org-irc hides /usr/share/emacs/24.3/lisp/org/org-irc
/home/yates/.emacs.d/elpa/org-20140602/org-protocol hides /usr/share/emacs/24.3/lisp/org/org-protocol
/home/yates/.emacs.d/elpa/org-20140602/org-datetree hides /usr/share/emacs/24.3/lisp/org/org-datetree
/home/yates/.emacs.d/elpa/org-20140602/org-agenda hides /usr/share/emacs/24.3/lisp/org/org-agenda
/home/yates/.emacs.d/elpa/org-20140602/org-attach hides /usr/share/emacs/24.3/lisp/org/org-attach
/home/yates/.emacs.d/elpa/org-20140602/org-plot hides /usr/share/emacs/24.3/lisp/org/org-plot
/home/yates/.emacs.d/elpa/org-20140602/org-id hides /usr/share/emacs/24.3/lisp/org/org-id
/home/yates/.emacs.d/elpa/org-20140602/ob-haskell hides /usr/share/emacs/24.3/lisp/org/ob-haskell
/home/yates/.emacs.d/elpa/org-20140602/org-eshell hides /usr/share/emacs/24.3/lisp/org/org-eshell
/home/yates/.emacs.d/elpa/org-20140602/ob-lisp hides /usr/share/emacs/24.3/lisp/org/ob-lisp
/home/yates/.emacs.d/elpa/org-20140602/org-indent hides /usr/share/emacs/24.3/lisp/org/org-indent
/home/yates/.emacs.d/elpa/org-20140602/ob-ledger hides /usr/share/emacs/24.3/lisp/org/ob-ledger
/home/yates/.emacs.d/elpa/org-20140602/ob-scheme hides /usr/share/emacs/24.3/lisp/org/ob-scheme
/home/yates/.emacs.d/elpa/org-20140602/org-habit hides /usr/share/emacs/24.3/lisp/org/org-habit
/home/yates/.emacs.d/elpa/org-20140602/ob-awk hides /usr/share/emacs/24.3/lisp/org/ob-awk
/home/yates/.emacs.d/elpa/org-20140602/ob-java hides /usr/share/emacs/24.3/lisp/org/ob-java
/home/yates/.emacs.d/elpa/org-20140602/ob-calc hides /usr/share/emacs/24.3/lisp/org/ob-calc
/home/yates/.emacs.d/elpa/org-20140602/ob-comint hides /usr/share/emacs/24.3/lisp/org/ob-comint
/home/yates/.emacs.d/elpa/org-20140602/ob-fortran hides /usr/share/emacs/24.3/lisp/org/ob-fortran
/home/yates/.emacs.d/elpa/org-20140602/ob-io hides /usr/share/emacs/24.3/lisp/org/ob-io
/home/yates/.emacs.d/elpa/org-20140602/org-timer hides /usr/share/emacs/24.3/lisp/org/org-timer
/home/yates/.emacs.d/elpa/org-20140602/org-entities hides /usr/share/emacs/24.3/lisp/org/org-entities
/home/yates/.emacs.d/elpa/org-20140602/ob-ocaml hides /usr/share/emacs/24.3/lisp/org/ob-ocaml
/home/yates/.emacs.d/elpa/org-20140602/ob-table hides /usr/share/emacs/24.3/lisp/org/ob-table
/home/yates/.emacs.d/elpa/org-20140602/org-info hides /usr/share/emacs/24.3/lisp/org/org-info
/home/yates/.emacs.d/elpa/org-20140602/org-docview hides /usr/share/emacs/24.3/lisp/org/org-docview
/home/yates/.emacs.d/elpa/org-20140602/org-compat hides /usr/share/emacs/24.3/lisp/org/org-compat
/home/yates/.emacs.d/elpa/org-20140602/ob-clojure hides /usr/share/emacs/24.3/lisp/org/ob-clojure
/home/yates/.emacs.d/elpa/org-20140602/ob-screen hides /usr/share/emacs/24.3/lisp/org/ob-screen
/home/yates/.emacs.d/elpa/org-20140602/org-mhe hides /usr/share/emacs/24.3/lisp/org/org-mhe
/home/yates/.emacs.d/elpa/org-20140602/ob-sass hides /usr/share/emacs/24.3/lisp/org/ob-sass
/home/yates/.emacs.d/elpa/org-20140602/ob-maxima hides /usr/share/emacs/24.3/lisp/org/ob-maxima
/home/yates/.emacs.d/elpa/org-20140602/ob-lilypond hides /usr/share/emacs/24.3/lisp/org/ob-lilypond
/home/yates/.emacs.d/elpa/org-20140602/org-crypt hides /usr/share/emacs/24.3/lisp/org/org-crypt
/home/yates/.emacs.d/elpa/org-20140602/ob-org hides /usr/share/emacs/24.3/lisp/org/ob-org
/home/yates/.emacs.d/elpa/org-20140602/ob-ref hides /usr/share/emacs/24.3/lisp/org/ob-ref
/home/yates/.emacs.d/elpa/org-20140602/org-clock hides /usr/share/emacs/24.3/lisp/org/org-clock
/home/yates/.emacs.d/elpa/org-20140602/ob-dot hides /usr/share/emacs/24.3/lisp/org/ob-dot
/home/yates/.emacs.d/elpa/org-20140602/ob-R hides /usr/share/emacs/24.3/lisp/org/ob-R
/home/yates/.emacs.d/elpa/org-20140602/org-mobile hides /usr/share/emacs/24.3/lisp/org/org-mobile
/home/yates/.emacs.d/elpa/org-20140602/org-install hides /usr/share/emacs/24.3/lisp/org/org-install
/home/yates/.emacs.d/elpa/org-20140602/org-loaddefs hides /usr/share/emacs/24.3/lisp/org/org-loaddefs
/home/yates/.emacs.d/elpa/org-20140602/ob-gnuplot hides /usr/share/emacs/24.3/lisp/org/ob-gnuplot
/home/yates/.emacs.d/elpa/org-20140602/org-gnus hides /usr/share/emacs/24.3/lisp/org/org-gnus
/home/yates/.emacs.d/elpa/org-20140602/ob-emacs-lisp hides /usr/share/emacs/24.3/lisp/org/ob-emacs-lisp
/home/yates/.emacs.d/elpa/org-20140602/ob-eval hides /usr/share/emacs/24.3/lisp/org/ob-eval
/home/yates/.emacs.d/elpa/org-20140602/ob-ditaa hides /usr/share/emacs/24.3/lisp/org/ob-ditaa
/home/yates/.emacs.d/elpa/org-20140602/org-macs hides /usr/share/emacs/24.3/lisp/org/org-macs

Features:
(shadow emacsbug apropos rcirc jka-compr find-func help-fns canlock
novice gnus-dup flow-fill mm-archive gnus-async gnus-bcklg gnus-ml
disp-table mailalias qp mail-extr sort pp gnus-cite nndraft nnmh utf-7
gnutls nnimap utf7 nnfolder parse-time netrc network-stream starttls tls
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap nntp
gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
gnus-start gnus-spec gnus-int gnus-range message cl-macs format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader wid-edit
server mule-util browse-url pcmpl-unix edmacro c-comment-edit cc-langs
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs goto-addr noutline outline view kmacro image-mode
sgml-mode misearch multi-isearch make-mode log-edit easy-mmode pcvs-util
add-log vc-bzr vc-sccs vc-svn vc-cvs vc-rcs help-mode thingatpt dired
vc-git tex-mode compile shell pcomplete comint ansi-color ring latexenc
paren time delsel cus-start cus-load vc vc-dispatcher derived my-slime
solarized-dark-theme solarized my-color-theme my-tags my-packages
my-grep-find-file my-dictionary my-compile gv my-project smtpmail
auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util
password-cache sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils my-gnus my-git my-utils ido email-html cl cl-lib
magit-autoloads org-autoloads info easymenu package time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment 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 macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)