[ESS] ESS copies anything I highlight with the curser, and I don't want it to
nshephard at gmail.com
Fri Nov 12 09:14:27 CET 2010
On Fri, Nov 12, 2010 at 6:40 AM, Chris Howden
<chris at trickysolutions.com.au> wrote:
> Hi everyone,
> ESS seems to copy anything I highlight. This is quite annoying if I want
> to replace using paste the same thing a few times.
> EG In the code below I want to replace the variable "landunit" with
> "elevation". So I type in 'elevation' once and then try to copy and paste
> it into each incidence of 'landunit'...it works once, but then it doesn't
> anymore. It seems that once I highlight "landunit" to replace it with
> 'elevation' it replaces 'elevation' with 'landunit' on my clipboard!!!!!
> Does anyone have a suggestion on what I can do to fix this? I've tried
> looking on the web but couldn't find anything.
You don't state which OS you're using, if you're on *NIX/X11 then
there are two places (cut buffers) where things might be copied to,
the Clipboard or Primary (see
http://www.jwz.org/doc/x-cut-and-paste.html for an explanation).
Regardless, this is the sort of behaviour I'd expect but more
basically it seems a rather convoluted way of replacing things, why
not just use Find & Replace?
Depends on the key mapping, but Alt-Shift-% starts things on my
systems, enter 'landunit' and hit return, then enter 'elevation' and
hit return, Emacs will then search forwards from where the cursor is,
highlight each instance of landunit, and you hit space if you want to
change a given instance, or 'Del' if you want to skip it then Emacs
moves to the next instance and you repeat (or hit '!' if you know you
want to replace all instances).
You can extend this further by searching and replacing regexp's too.
Lots of info on the Emacs wiki at
"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Email - nshephard at gmail.com
Website - http://kimura-no-ip.org/
Photos - http://www.flickr.com/photos/slackline/
More information about the ESS-help