all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Make <delete> save the deleted text into the killing ring
Date: Wed, 14 Dec 2022 18:44:20 +0100	[thread overview]
Message-ID: <87sfhhswwb.fsf@dataswamp.org> (raw)
In-Reply-To: Y5myQnrlltYW0OaW@sipc87.si.ehu.es

aitor wrote:

>> <delete> char is bound to `delete-forward-char` which does
>> not save the deleted text into the kill ring by default.
>> How can I change this behavior and make <delete> actually
>> save the killed text into the ring?
>
> So I've tried stuff like:
>
> (global-set-key [delete]
>                 (lambda (n)
>                   (interactive "p")
>                   (delete-forward-char n t)))
>
> but no luck, the deleted does not appear in the kill ring.

Is this a good idea? Why?

But if you want it, make a command, i.e. an interactive defun
that does it, when it works, bind it to a key ...

-- 
underground experts united
https://dataswamp.org/~incal




  reply	other threads:[~2022-12-14 17:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 11:12 Make <delete> save the deleted text into the killing ring aitor
2022-12-14 11:23 ` aitor
2022-12-14 17:44   ` Emanuel Berg [this message]
2022-12-14 19:52     ` John Haman
2022-12-14 19:58       ` Emanuel Berg
2022-12-14 20:17 ` Gregory Heytings
2022-12-14 20:43   ` Emanuel Berg
2022-12-15  8:40   ` aitor
2022-12-15  8:48     ` Emanuel Berg
2022-12-15  6:14 ` Eli Zaretskii
2022-12-15  6:15   ` Emanuel Berg
2022-12-15  8:31   ` aitor
2022-12-15  9:04     ` Eli Zaretskii
2022-12-15 10:18       ` Thibaut Verron
2022-12-15 10:24         ` Gregory Heytings
2022-12-15 10:46           ` Emanuel Berg

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=87sfhhswwb.fsf@dataswamp.org \
    --to=incal@dataswamp.org \
    --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.