The delete-region
command in Emacs doesn't behave as expected. It sends the region to the kill-ring
, even though it shouldn't.
While deleting one character at a time with delete-backward-char
works as expected, i.e. it doesn't send the character to the kill-ring
. delete-region
sends the highlighted text to the kill-ring
. Note that delete-forward-char
also works fine. I have identified the problematic behavior by directly calling the command, using M-x delete-region
.
I simply wish to delete a region without sending the content of that region to the kill-ring
. This follows a litany of queries of a similar flavor. I have already consulted several posts on this topic, including
136581,
637351,
17914475, and
1257365, but none of the proposed solutions work because they tend to solve the problem by referring to using the delete-region
command. I have also checked the relevant entry in the emacswiki, but this is not addressing the issue, either.
Here is the description of the command within Emacs:
delete-region
is an interactive built-in function in ‘C source code’.
(delete-region START END)
Delete the text between
START
andEND
. If called interactively, delete the region between point and mark. This command deletes buffer text without modifying the kill ring.
My experience is that this description is incorrect. I'm using Emacs 25.2.2 on Ubuntu 18.04.
Any help would be very much appreciated.