unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: mouse and Delete key
Date: Sat, 30 Jul 2005 17:35:55 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICEEAOCLAA.drew.adams@oracle.com> (raw)
In-Reply-To: <87ack4q7dk.fsf@wash.edu>

    I was reading the node on the mouse commands, this is not working,

Very good to hear that you are reading the doc! Good initiative.

    Mouse Commands for Editing
    ==========================
    ...
       If you select a region with any of these mouse commands, and then
    immediately afterward type the <DELETE> function key, it deletes the
    region that you selected.

The text goes on to say this (next sentence):

 The <BACKSPACE> function key and the ASCII
 character <DEL> do not do this; if you type any other key in between
 the mouse command and <DELETE>, it does not do this.

    I mouse-1 say at the beginning of a line and mouse-3 past the end char.
    then hit the <Delete> key. it does not delete the line "region" but
    only the last character.

    what am I doing wrong, how can I delete a region. I usually do
    C-w but that puts it in the kill buffer.

This kind of info always helps us help you: What emacs version are you
running? Do this to find out: `C-h v emacs-version' (or choose Help>About
Emacs in the menu).

I'd guess that you are trying to use the Backspace key, also known as `DEL',
not the Delete key. On my (PC) keyboard, the Delete key is labeled "Delete"
and is just below the Insert key in the middle keypad (which is just to the
left of the numeric keypad).

An alternative to using Delete is to use `C-d'. If you don't have a Delete
key, try that.

Try this: `C-h k <hit the key that you _think_ is "Delete">

It should say something like this:

 C-d (translated from <delete>) runs the command delete-char
    which is an interactive built-in function in `C source code'.
 It is bound to C-d, <deletechar>.
 (delete-char n &optional killflag)

 Delete the following n characters (previous if n is negative).
 Optional second arg killflag non-nil means kill instead (save in kill
ring).
 Interactively, n is the prefix arg, and killflag is set if
 n was explicitly specified.

Keep reading and experimenting - you're on the right track now.

BTW - If you are using the mouse anyway, the quickest way to delete the
selection (region) you've created is just to click mouse-3 again, without
moving the mouse. For example: mouse-1; move mouse; mouse-3; mouse-3.

This does put the region in the kill ring. But so does the method above:
mouse-1; move mouse; mouse-3; <Delete>.

Why don't you want the region in the kill ring? Are you aware that you can
get to (that is, paste) older kill-ring entries by using `C-y M-y M-y...'?

HTH

  reply	other threads:[~2005-07-31  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-30 22:03 mouse and Delete key Baloff
2005-07-31  0:35 ` Drew Adams [this message]
     [not found] <mailman.2135.1122770344.20277.help-gnu-emacs@gnu.org>
2005-07-31  3:23 ` Baloff

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=DNEMKBNJBGPAOPIJOOICEEAOCLAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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.
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).