Re: More /.{I->-1} craziness

*To*: mathgroup at smc.vnet.net*Subject*: [mg106529] Re: More /.{I->-1} craziness*From*: AES <siegman at stanford.edu>*Date*: Fri, 15 Jan 2010 03:20:47 -0500 (EST)*Organization*: Stanford University*References*: <200912300915.EAA17299@smc.vnet.net> <hhhmn8$o9t$1@smc.vnet.net> <hhpl28$9lf$1@smc.vnet.net>

In article <hhpl28$9lf$1 at smc.vnet.net>, Leonid Shifrin <lshifr at gmail.com> wrote: > > I stick to my view of replacement rules as being aimed primarily at advanced > users, or at least as a tool that should be used with much care. But on the other hand, innumerable software apps of all varieties and at all levels down to the most elementary (e.g., nearly all word processors, text editors, graphics programs, spreadsheet programs, email programs, and so on) include "Find and Replace" capabilities. These capabilities frequently have varied options: "Find Next" "Replace and Find" "As Word" "Start at Top" "Replace All" "In Selection Only" and so on. Many have optional GREP abilities. So: 1) Most any computer user at even a very elementary level knows about these tools, rather expects to have them available, and expects them to function as they in fact do function. 2) In particular, they operate (visibly!) on what you see -- not some arcane internal representation. 3) So, if such a novice user goes to Mathematica, it's only to be expected that this user will thnik that Mathematica's ReplaceAll should function in a similar fashion (and, helpfully, Mathematic's /. operator most of the time does function in that way) (sarcasm mode in that parens). 4) So why can't Mathematica also have a TextReplace[ ] function, or something similar, that would function in that way _on what the user sees or has typed (or copied and pasted) into a selected cell_. Given such a function my input would be Find " I " and replace it with " (-I) ".