From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff B Newsgroups: gmane.emacs.bugs Subject: bug#14320: 24.3; delete-region is altering the kill ring Date: Mon, 29 Apr 2013 23:36:55 -0400 Message-ID: <517F3C57.3000902@myLetters.US> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367294634 1226 80.91.229.3 (30 Apr 2013 04:03:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Apr 2013 04:03:54 +0000 (UTC) Cc: kqr147@member.fsf.org To: 14320@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 06:03:53 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UX1nE-000458-2h for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2013 06:03:52 +0200 Original-Received: from localhost ([::1]:49096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1nD-0000tP-My for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2013 00:03:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1n7-0000tE-7P for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2013 00:03:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UX1n4-0007o8-53 for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2013 00:03:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX1n4-0007o4-1f for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2013 00:03:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UX1nO-0007B3-Jd for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2013 00:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeff B Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Apr 2013 04:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14320 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136729460127520 (code B ref -1); Tue, 30 Apr 2013 04:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Apr 2013 04:03:21 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-Received: (qmail 2363 invoked from network); 30 Apr 2013 03:37:00 -0000 Original-Received: by simscan 1.4.0 ppid: 10021, pid: 23614, t: 0.3879s scanners: clamav: 0.88.2/m:52/d:13513 Original-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 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 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-Mailman-Approved-At: Tue, 30 Apr 2013 00:03:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73841 Archived-At: 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)