From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fred Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#1948: confusion and bug in dabbrev.el Date: Wed, 12 Sep 2012 21:22:25 +0200 Organization: % tar -jx < *.bz Message-ID: <5aefaa82797fd967d495a5eebc1ec81f@mail.priv.fperrin.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347477865 26062 80.91.229.3 (12 Sep 2012 19:24:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2012 19:24:25 +0000 (UTC) To: <1948@debbugs.gnu.org>, Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 21:24:28 2012 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 1TBsXv-00057W-GY for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 21:24:23 +0200 Original-Received: from localhost ([::1]:52700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBsXr-000716-T3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 15:24:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBsXo-00070o-7W for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 15:24:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBsXm-0006w2-KM for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 15:24:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBsXm-0006vy-HC for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 15:24:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TBsYX-0001XO-Pf for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2012 15:25:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Fred Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Sep 2012 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1948 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1948-submit@debbugs.gnu.org id=B1948.13474778775857 (code B ref 1948); Wed, 12 Sep 2012 19:25:01 +0000 Original-Received: (at 1948) by debbugs.gnu.org; 12 Sep 2012 19:24:37 +0000 Original-Received: from localhost ([127.0.0.1]:57711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBsY8-0001WP-T2 for submit@debbugs.gnu.org; Wed, 12 Sep 2012 15:24:37 -0400 Original-Received: from fperrin.net ([87.98.132.43]:42806 helo=mail.fperrin.net) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBsWp-0001UC-Ve for 1948@debbugs.gnu.org; Wed, 12 Sep 2012 15:23:17 -0400 Original-Received: from www-insecure.fperrin.net (www-insecure.priv.fperrin.net [IPv6:fd93:c8e5:9cb3:666::8080]) by mail.fperrin.net (Postfix) with ESMTP id 903933AA9; Wed, 12 Sep 2012 21:22:26 +0200 (CEST) Original-Received: (from www@localhost) by www-insecure.fperrin.net (8.14.5/8.14.5/Submit) id q8CJMP5H005129; Wed, 12 Sep 2012 21:22:25 +0200 (CEST) (envelope-from fred@fperrin.net) X-Authentication-Warning: www-insecure.priv.fperrin.net: www set sender to fred@fperrin.net using -f X-PHP-Originating-Script: 0:main.inc X-Sender: fred@fperrin.net User-Agent: Roundcube Webmail/0.7.2 X-Mailman-Approved-At: Wed, 12 Sep 2012 15:24:35 -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 (newer, 2) 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:64210 gmane.emacs.devel:153256 Archived-At: Follow-up to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1948 I seem to be experiencing a bad version of this bug. In some instances, dabbrev seems to feel like not only inserting text at point (which is expected) but also modifying some text in other parts of the buffer. For some reason, TCL code seems to trigger the bug quite easily. To see what I experienced: Save the following as blah.tcl: ====== beginning of blah.tcl proc check { topology } { set network [ blahblah ] preconfig $topology $networks do_check $topology $networks } # Apply the default pre-config steps for each device proc preconfig { topology networks } { foreach node [ keylkeys topology ] { set config [ get_config -device $node -type pre ] apply_config $node $config } } # do the actual check proc do_check { ====== end of blah.tcl Start `emacs -Q', and either look at the `view-lossage' output included below, or in plain English: - Open blah.tcl - Put the point after the opening brace of do_check; - Insert `SPC top' and complete with `dabbrev-expand' (M-/) to get `topology'; - Insert `SPC' and try to complete (M-/) until you get `topology network'. Expected: After a round or two, dabbrev inserts networks, based on the prototype of `preconfig'. At worse, it inserts rubbish and I have to give a longer hint to dabbrev. Actual result: Some text after the last occurence of `topology' is replaced, point has been moved, and procedure prototype has not been completed. With Peter Tury's patch to `dabbrev--substitute-expansion', point does not seem to start jumping around, replacing text in remote places (though I don't have the correct replacement, but whatever) In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 on trouble, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11203902 Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Tcl 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 font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f / t m p / b l a h . t c l C-s d o _ c C-s C-e SPC t o p M-/ SPC M-/ M-/ C-/ C-/ M-x r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark saved where search started Undo! [2 times] Making completion list... Load-path shadows: /usr/share/emacs/24.2/site-lisp/flim/hex-util hides /usr/share/emacs/24.2/lisp/hex-util /usr/share/emacs/24.2/site-lisp/flim/md4 hides /usr/share/emacs/24.2/lisp/md4 /usr/share/emacs/24.2/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.2/lisp/textmodes/flyspell /usr/share/emacs/24.2/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.2/lisp/textmodes/ispell /usr/share/emacs/24.2/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.2/lisp/net/sasl-ntlm /usr/share/emacs/24.2/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.2/lisp/net/sasl-digest /usr/share/emacs/24.2/site-lisp/flim/hmac-def hides /usr/share/emacs/24.2/lisp/net/hmac-def /usr/share/emacs/24.2/site-lisp/flim/sasl hides /usr/share/emacs/24.2/lisp/net/sasl /usr/share/emacs/24.2/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.2/lisp/net/hmac-md5 /usr/share/emacs/24.2/site-lisp/flim/ntlm hides /usr/share/emacs/24.2/lisp/net/ntlm /usr/share/emacs/24.2/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.2/lisp/net/sasl-cram Features: (shadow sort gnus-util mail-extr emacsbug message 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 help-mode view dabbrev misearch multi-isearch tcl easymenu comint regexp-opt ansi-color ring time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe 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 files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- Fred -- http://tar-jx.bz