<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">In the example, reftex is supposed to take the string "text" from the *.rip file and replace all instances of the string in a document's *.tex file(s) with some sort of indexing markup, indicated by the possibilities listed at the top of the *.rip file and indexed by the letter at the start of the line that contains "text" in the *.rip file.  Reftex summarizes what it intends to do when given the Ctrl-x, Ctrl-i command; in this example it says it will replace one instance of "text" with "\index{text}text".  What happens, only in Aquamacs and not in Carbon Emacs on the Mac or in emacs running on Gnu/Linux, is that more than one "replacement" is made, with the additional, spurious "replacements" made near the top of the file.  In the instance I reported below, there is one spurious replacement; this number is variable, however, and I have had up to three or four spurious replacements in Aquamacs, one following the other near the top of the file, as in the example below.<div><br></div><div>If this is not some kind of configuration problem (I agree with you that it probably is not), then the mechanism that reftex uses to keep track of replacement targets either relies on emacs behavior that Aquamacs changes, or the mechanism itself, perhaps a list of file names and offsets, gets hosed somewhere between reporting what it is going to do and actually doing it.  If this is what happens, then my tests and Ralf Angeli's report indicate that it is Aquamacs doing the hosing, rather than the underlying emacs.</div><div><br></div><div>I'm afraid I can't suggest anything in the way of a fix.  I read a couple of Paul Graham's Lisp books shortly after they were published when I was programming in a dialect, now defunct, called Lisp-Stat, but my efforts there were fairly crude, far short of the skill level needed to contribute to efforts along the lines of emacs, reftex, and Aquamacs, which are all terrific (and complex) pieces of software.<br><div><br></div><div>All the best,</div><div>Tom</div><div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Thomas S. Dye, Ph.D.</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">T. S. Dye & Colleagues, Archaeologists, Inc.</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Phone: (808) 529-0866 Fax: (808) 529-0884</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><a href="http://www.tsdye.com"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; "><span class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">http://www.tsdye.com</span></span></a></p><br class="Apple-interchange-newline"></span></span></div></span> </div><br><div><div>On Jul 20, 2009, at 8:05 PM, David Reitter wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I don't use reftex much and can't tell from your message what the desired result would be, i.e. what the bug is.  All you are saying is "Note the "replacement" in the top line of the file.".<br><br>I don't think there is much in the way of configuration for reftex that Aquamacs provides.  What kind of configuration do you suggest?<br><br><br>--<br><a href="http://aquamacs.org">http://aquamacs.org</a> -- Aquamacs: Emacs on Mac OS X<br><a href="http://aquamacs.org/donate">http://aquamacs.org/donate</a> -- Could we help you? Return the favor and support the Aquamacs Project!<br><br><br>On Jul 21, 2009, at 3:31 AM, Thomas S. Dye wrote:<br><br><blockquote type="cite">Aloha all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I installed Carbon Emacs and verified that the reftex behavior I reported below does not occur there.<br></blockquote><blockquote type="cite">It appears to be related to Aquamacs.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">All the best<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Tom<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thomas S. Dye, Ph.D.<br></blockquote><blockquote type="cite">T. S. Dye & Colleagues, Archaeologists, Inc.<br></blockquote><blockquote type="cite">Phone: (808) 529-0866 Fax: (808) 529-0884<br></blockquote><blockquote type="cite"><a href="http://www.tsdye.com">http://www.tsdye.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Begin forwarded message:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">From: "Thomas S. Dye" <<a href="mailto:tsd@tsdye.com">tsd@tsdye.com</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Date: July 19, 2009 10:21:20 AM HST<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To: Emacs on Mac OS X Mailing List <<a href="mailto:macosx-emacs@email.esm.psu.edu">macosx-emacs@email.esm.psu.edu</a>><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Subject: reftex configuration problem?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Aloha all,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">reftex index phrases doesn't behave as I expect.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\documentclass{article}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\begin{document}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Some text.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\end{document}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ctrl-C \ on "text."  Mark entry as i.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">% -*- mode: reftex-index-phrases; TeX-master: "test_reftex.tex" -*-<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">%                              Key      Macro Format            Repeat<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">%---------------------------------------------------------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">INDEX_MACRO_DEFINITION:<span class="Apple-tab-span" style="white-space:pre"> </span>i<span class="Apple-tab-span" style="white-space:pre">   </span>\index{%s}          <span class="Apple-tab-span" style="white-space:pre">   </span>t<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">INDEX_MACRO_DEFINITION:<span class="Apple-tab-span" style="white-space:pre">    </span>g<span class="Apple-tab-span" style="white-space:pre">   </span>\glossary{%s}       <span class="Apple-tab-span" style="white-space:pre">  </span>t<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">%---------------------------------------------------------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">i<span class="Apple-tab-span" style="white-space:pre">    </span>text<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ctrl-C Ctrl-i indicates one match in one file.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ctrl-C Ctrl-a ! replaces two occurrences<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\documentc\index{text}text{article}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\begin{document}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Some \index{text}text.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">\end{document}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Note the "replacement" in the top line of the file.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I posted this message to gnu.emacs.help and Ralf Angeli responded:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I cannot reproduce this issue with Emacs on GNU/Linux.  Does it work in<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">your case if you use Emacs (perhaps started with -Q) instead of<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Aquamacs?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I launched Aquamacs like this:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"/Applications/Aquamacs Emacs.app/Contents/MacOS/Aquamacs Emacs" -q<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">and got the same results.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Perhaps reftex isn't configured properly in Aquamacs?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">All the best,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Tom<br></blockquote></blockquote><br>_____________________________________________________________<br>MacOSX-Emacs mailing list<br><a href="mailto:MacOSX-Emacs@email.esm.psu.edu">MacOSX-Emacs@email.esm.psu.edu</a><br>http://email.esm.psu.edu/mailman/listinfo/macosx-emacs<br>List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx<br></div></blockquote></div><br></div></div></body></html>