all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Flaschen <matthew.flaschen@gatech.edu>
To: emacs <help-gnu-emacs@gnu.org>
Subject: Re: Erase Region and paste in once?
Date: Wed, 04 Apr 2007 13:52:30 -0400	[thread overview]
Message-ID: <4613E5DE.3080708@gatech.edu> (raw)
In-Reply-To: <87vegcie8e.fsf@Sun.COM>

Alexander Zhukov wrote:
>>>>>> Samuel Karl Peterson (SKP) writes:
> 
>  SKP> "Daniel" <hanmoai@gmail.com> on 3 Apr 2007 18:33:47 -0700 didst
>  SKP> step forth and proclaim thus:
> 
>  >> Hi all,
>  >> 
>  >> In general editors, I do copy (ctrl-c) some text in firefox and make
>  >> a region in a editor where I want to replace and paste(ctrl-v) it.
>  >> 
>  >> I tried to do in emacs, but I can't find a way to overwrite a
>  >> certain region by doing yank at one time.
>  >> 
>  >> Is it possible to do it in emacs?
> 
>  SKP> Anything's possible in Emacs ;)
> 
>  SKP> Behold my lisp snippet:
> 
>  SKP> (defun sams-zap-yank (beg end) (interactive "r") (delete-region
>  SKP> beg end) (yank))
> 
>  SKP> Assign it to a key such as:
> 
>  SKP> (global-set-key "\C-cv" 'sams-zap-yank)
> 
>  SKP> Who knows, Emacs may have already had this functionality. I may
>  SKP> have just reinvented the wheel, but eh, it was a small wheel.
> 
> I use this:
> 
> (delete-selection-mode 1)
> 
> Here is description:
> 
> delete-selection-mode is an interactive compiled Lisp function in
> `delsel.el'.  (delete-selection-mode &optional arg)
> 
> Toggle Delete Selection mode.
> With prefix arg, turn Delete Selection mode on if and only if arg is
> positive.

Interesting.  I'll try it out for a while.

Matt Flaschen

      parent reply	other threads:[~2007-04-04 17:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04  1:33 Erase Region and paste in once? Daniel
2007-04-04  3:08 ` Eli Zaretskii
2007-04-04  3:18   ` Matthew Flaschen
     [not found] ` <mailman.1733.1175656317.7795.help-gnu-emacs@gnu.org>
2007-04-04  4:37   ` Daniel
2007-04-04 10:28     ` cmr.Pent
2007-04-04  9:37 ` Samuel Karl Peterson
2007-04-04 11:13   ` Alexander Zhukov
2007-04-04 16:24     ` Daniel
2007-04-04 16:41       ` Drew Adams
2007-04-04 17:52     ` Matthew Flaschen [this message]

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

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

  git send-email \
    --in-reply-to=4613E5DE.3080708@gatech.edu \
    --to=matthew.flaschen@gatech.edu \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.