unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luke Hutchison <lukeh@email.byu.edu>
Subject: Feature request: yank-with-replace
Date: 08 Nov 2002 14:02:27 -0700	[thread overview]
Message-ID: <1036789346.1215.107.camel@localhost.localdomain> (raw)

I have a request for a small feature that I think would be very useful. 
(I hope this is the right list for it!)

It would be very nice to replace values as a region is being yanked: for
example, you have some code that performs operations on the
x-coordinates of something, and you want to duplicate the code for the
y-coordinates, so you select it, kill it, yank it and then go back and
change all the 'x's to 'y's.  This can leave you with inconsistent code,
if you don't catch them all (ever hear the expression, "Cut'n'paste gets
you every time"?)...

I propose adding yank-with-replace, which asks you for a search and
replace string before the kill buffer is yanked-from, to take care of
situations like this.  yank-with-replace-query-regexp would probably be
useful too, which would yank and then run a query-regexp on the region
that you just yanked.

I can't seem to find this feature in emacs, and don't have any emacs
development background, but I imagine that adding this would be trivial
for an emacs programmer.

Does it seem that this feature would be useful?

Thanks,
Luke Hutchison.

             reply	other threads:[~2002-11-08 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 21:02 Luke Hutchison [this message]
2002-11-09  4:11 ` Feature request: yank-with-replace Miles Bader
2002-11-10 18:07 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1036789346.1215.107.camel@localhost.localdomain \
    --to=lukeh@email.byu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).