From unknown Thu Jun 19 13:59:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14320 <14320@debbugs.gnu.org> To: bug#14320 <14320@debbugs.gnu.org> Subject: Status: 24.3; delete-region is altering the kill ring Reply-To: bug#14320 <14320@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:59:56 +0000 retitle 14320 24.3; delete-region is altering the kill ring reassign 14320 emacs submitter 14320 Jeff B severity 14320 normal tag 14320 moreinfo unreproducible thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 00:03:21 2013 Received: (at submit) by debbugs.gnu.org; 30 Apr 2013 04:03:21 +0000 Received: from localhost ([127.0.0.1]:51321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UX1mh-00079m-01 for submit@debbugs.gnu.org; Tue, 30 Apr 2013 00:03:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45588) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UX1Nn-00069G-ME for submit@debbugs.gnu.org; Mon, 29 Apr 2013 23:37:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UX1NP-0000qC-5N for submit@debbugs.gnu.org; Mon, 29 Apr 2013 23:37:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1NP-0000q8-21 for submit@debbugs.gnu.org; Mon, 29 Apr 2013 23:37:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1NK-0004dk-Kc for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 23:37:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UX1NH-0000ns-EY for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 23:37:06 -0400 Received: from asbnvacz-mailrelay01.megapath.net ([207.145.128.243]:34423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1NH-0000ni-9T for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2013 23:37:03 -0400 Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.52]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 5791F1EE5071 for ; Mon, 29 Apr 2013 23:37:01 -0400 (EDT) Received: (qmail 2363 invoked from network); 30 Apr 2013 03:37:00 -0000 Received: by simscan 1.4.0 ppid: 10021, pid: 23614, t: 0.3879s scanners: clamav: 0.88.2/m:52/d:13513 Received: from unknown (HELO [192.168.37.118]) (Jeff.Barry.01720@[66.92.68.86]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 30 Apr 2013 03:37:00 -0000 Message-ID: <517F3C57.3000902@myLetters.US> Date: Mon, 29 Apr 2013 23:36:55 -0400 From: Jeff B User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.3; delete-region is altering the kill ring Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 30 Apr 2013 00:03:17 -0400 Cc: kqr147@member.fsf.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, A while back I upgraded my Linux installation to the latest version of Slackware. With that came a new Emacs. Right away two of my eLisp functions failed. I use them all the time and they have been working for years. I was unable to get a reproducible fault sequence out of them so I just kind of ignored the problem by not using those functions. Then I was loaned a Windows laptop to do some work I had to do on Windows so I installed the latest Emacs there and noticed that my two functions were working. So I came back to my Linux machine (from which this eMail is coming) and installed the latest Emacs here thinking that the bug was fixed. No such luck. The simpler of the two functions is this: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Convenience function to delete words without a trace, like delete-char does ;; not (normally) alter kill ring or mark. (defun my-erase-word (count) " Erases forward words without affecting the kill ring or mark. Useful for deleting words after inserting new words in front of the old." (interactive "p") (mark-word count) (delete-region (mark) (point)) (set-mark-command 2) ) (global-set-key [kp-delete] 'my-erase-word) ;; Conveniently next to [kp-insert] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Usually I use the above to replace a string or strings of words with a single string I have copied onto the kill ring. It's kind of like query-replace except that I can be replacing different things. It's convenient too: Left hand on mouse, right hand on keypad Ins/Del. Anyway delete-region seems to be making a record of what it deletes the first time I do the delete after the first insert so that when I do the second insert it gives me the first thing I deleted. Usually. It will rarely do what it used to do and is supposed to do. The first thing I delete with the function above does not show up in the kill ring until AFTER I do the second insert. ???? Anyway delete-region is documented as not affecting the kill ring, (delete-region START END) Delete the text between START and END. If called interactively, delete the region between point and mark. This command deletes buffer text without modifying the kill ring. which is why I used it in the first place. It didn't used to affect the kill ring and so each insert would get me the original string which I wanted to use over and over. Now clearly somehow delete-region does set something up to go into the kill ring, tho as I've said above it doesn't appear there until I do the second insert. Mostly. I need to emphasize that this problem is NOT ALWAYS reproducible (which is why I gave up trying to send you something nice and neat to fix back when I first ran into the problem) and that what shows up in the kill ring can be different from test to test. Thanks for looking at this. I wish I could give you better information. Jeff Barry kqr147@member.fsf.org ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 24.3.1 (i486-slackware-linux-gnu, GTK+ Version 2.24.17) of 2013-04-23 on hive Windowing system distributor `The X.Org Foundation', version 11.0.11203000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--program-prefix=' '--program-suffix=' '--mandir=/usr/man' '--infodir=/usr/info' '--without-gconf' '--without-gsettings' '--with-x' '--with-x-toolkit=gtk2' '--build=i486-slackware-linux' 'build_alias=i486-slackware-linux' 'CFLAGS=-O2 -march=i486 -mtune=i686'' Important settings: value of $LC_COLLATE: C value of $LANG: en_US locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-s C-s C-s C-x 1 C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z d C-y C-f d x y a n k - p o p C-z C-z C-z d C-y C-f d x y a n k - p o p C-z 4 x d p f m K a r + F * ^ & v i n 3 = m a g i k SPC C-s f s f x r e p o r t C-x b C-x b q b . x l k j s a d l j k s d l j r e p o r t Recent messages: Mark set Making completion list... yank-pop: Previous command was not a yank Undo! byte-code: Beginning of buffer [3 times] Mark set Modification-flag cleared Mark set [3 times] Done! Mark saved where search started byte-code: Command attempted to use minibuffer while in minibuffer Load-path shadows: /usr/share/emacs/site-lisp/t-mouse hides /usr/share/emacs/24.3/lisp/t-mouse Features: (shadow sort gnus-util mail-extr emacsbug message idna cl-macs gv format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils info cus-edit cus-start cus-load wid-edit apropos misearch multi-isearch help-mode parse-time vc-cvs uniquify advice help-fns advice-preload cc-langs cl cl-lib cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-stamp jka-compr time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 12:12:08 2013 Received: (at 14320) by debbugs.gnu.org; 30 Apr 2013 16:12:08 +0000 Received: from localhost ([127.0.0.1]:52476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXD9x-0005la-4i for submit@debbugs.gnu.org; Tue, 30 Apr 2013 12:12:07 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39593) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXD9t-0005lA-D2 for 14320@debbugs.gnu.org; Tue, 30 Apr 2013 12:12:02 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UXD9U-0004DG-KD; Tue, 30 Apr 2013 12:11:36 -0400 From: Glenn Morris To: Jeff B Subject: Re: bug#14320: 24.3; delete-region is altering the kill ring References: <517F3C57.3000902@myLetters.US> X-Spook: government lock picking number key AMEMB Glock airframe X-Ran: >azRx;DQ<\*yp/$/Ei|{Z:)hQa8viQ{0Pa6EunJB}V`@T9QqCP4JT)qzO(~Z9%>lK<3h~f X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 30 Apr 2013 12:11:36 -0400 In-Reply-To: <517F3C57.3000902@myLetters.US> (Jeff B.'s message of "Mon, 29 Apr 2013 23:36:55 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -7.5 (-------) X-Debbugs-Envelope-To: 14320 Cc: kqr147@member.fsf.org, 14320@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.4 (---------) Jeff B wrote: > Anyway delete-region seems to be making a record of what it deletes the > first time I do the delete after the first insert so that when I do the > second insert it gives me the first thing I deleted. Usually. It will > rarely do what it used to do and is supposed to do. The first thing I > delete with the function above does not show up in the kill ring until > AFTER I do the second insert. ???? [...] > Now clearly somehow delete-region does set something up to go into the > kill ring, tho as I've said above it doesn't appear there until I do the > second insert. Mostly. > > I need to emphasize that this problem is NOT ALWAYS reproducible (which > is why I gave up trying to send you something nice and neat to fix back > when I first ran into the problem) and that what shows up in the kill > ring can be different from test to test. Sorry, I can't see how delete-region could affect the kill-ring by itself. So without that minimal reproducible recipe, I don't think we can do anything for you. I'm guessing it is something in your configuration somewhere. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 05 19:05:55 2014 Received: (at control) by debbugs.gnu.org; 6 Feb 2014 00:05:56 +0000 Received: from localhost ([127.0.0.1]:51509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBCTb-0002Kx-Mn for submit@debbugs.gnu.org; Wed, 05 Feb 2014 19:05:55 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59072) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBCTZ-0002Kp-VJ for control@debbugs.gnu.org; Wed, 05 Feb 2014 19:05:54 -0500 Received: from [204.14.154.233] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WBCTL-0007O3-Lu for control@debbugs.gnu.org; Thu, 06 Feb 2014 01:05:40 +0100 Date: Wed, 05 Feb 2014 16:04:37 -0800 Message-Id: <87iost14yy.fsf@building.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14320 X-MailScanner-ID: 1WBCTL-0007O3-Lu X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1392249940.97694@7Zji8SfPy83ANaqd5V+/JA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) close 14320 From unknown Thu Jun 19 13:59:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Mar 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator