From vincent.belaiche@gmail.com Sun Sep 6 03:28:37 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2009 10:28:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.6 required=4.0 tests=AWL,FOURLA,MURPHY_DRUGS_REL8, MURPHY_SEX_L2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n86ASaLm016678 for ; Sun, 6 Sep 2009 03:28:37 -0700 Received: from mx10.gnu.org ([199.232.76.166]:35981) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MkEz3-0000GG-Me for emacs-pretest-bug@gnu.org; Sun, 06 Sep 2009 06:28:34 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MkEz1-0005PU-Sk for emacs-pretest-bug@gnu.org; Sun, 06 Sep 2009 06:28:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:56433) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MkEz1-0005Oi-E5 for emacs-pretest-bug@gnu.org; Sun, 06 Sep 2009 06:28:31 -0400 Received: from smtp2f.orange.fr ([80.12.242.152]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MkEyw-0003fm-WD for emacs-pretest-bug@gnu.org; Sun, 06 Sep 2009 06:28:27 -0400 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2f21.orange.fr (SMTP Server) with ESMTP id 2EC2C80000BD for ; Sun, 6 Sep 2009 12:28:22 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2f21.orange.fr (SMTP Server) with ESMTP id 230E18000320 for ; Sun, 6 Sep 2009 12:28:22 +0200 (CEST) Received: from COCOTTE (ARennes-256-1-128-203.w90-32.abo.wanadoo.fr [90.32.127.203]) by mwinf2f21.orange.fr (SMTP Server) with ESMTP id A8A0580000BD for ; Sun, 6 Sep 2009 12:28:21 +0200 (CEST) X-ME-UUID: 20090906102821690.A8A0580000BD@mwinf2f21.orange.fr From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: emacs-pretest-bug@gnu.org Subject: 23.1.50; expand-abbrev changes point erroneously Date: Sun, 06 Sep 2009 12:30:26 +0200 Message-ID: <87ljksuzzx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Here is the bug description. I found this editing some Visual Basic file with using http://www.emacswiki.org/emacs/visual-basic-mode.el If for instance I type after (--!-- showing point when I type ): MyVar =3D MyFun(1,True)--!-- Then in visual basic mode visual-basic-newline-and-indent is called, which in turn calls (expand-abbrev). After (expand-abbrev) is called, point will be moved as follows:=20 MyVar =3D MyFun(1,True--!--)=20 because `True' is one abbreviation. I have patched visual-basic mode, so that a save-excursion encloses the call of expand-abbrev, otherwise I would get: MyVar =3D MyFun(1,True --!--)=20 which is not wanted. Stefan Monnier (monnier@IRO.UMontreal.CA) confirmed this is a bug of expand-abbrev, and asked me to repport it. The wanted behaviour would be that after expanding `True', point would come back to after the `)' where it originally was. BR, Vincent. ----------------------------------------------------------------------- If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file d:/Programme/GNU/Emacs/etc/DEBUG for instructions. In GNU Emacs 23.1.50.1 (i386-mingw-nt5.0.2195) of 2009-07-25 on COCOTTE Windowing system distributor `Microsoft Corp.', version 5.0.2195 configured using `configure --with-gcc (3.4)' 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: FRA value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: recentf-mode: t mail-abbrevs-mode: t iswitchb-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-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 1 C-SPC =20 C-x b * s c ( r e q u i r e SPC '=20 c a l c - e x t ) ( l a t SPC ( =20 e t SPC ( c a l=20 c - c o m m a n d ) C-h f C-g C-h=20 v c a l c - c o =20 =20 C-g (=20 c a l c - r a d i x SPC 1 7 ) =20 ( c a l c - e v a l SPC 1 0 =E0 ) =20 ) " " SPC $ =20 ) M-x e v a l - b u f C-x C-e =20 C-h f C-h i m d =20 c a l C-x 1 =20 C-s=20 c a l c e v m e=20 v a l C-x b =20 =20 C-x C-e =20 C-y C-k C-k =20 C-k C-k C-k C-k =20 ( m e s s a g z e SPC =20 e SPC " 1 0 SPC e n SPC b a s e SPC 7 =3D=20 % s " SPC ) M-x =20 C-SPC M-x r e p o r=20 b e m Recent messages: Composing main Info directory...done Mark set Mark saved where search started Mark set [2 times] Number radix is 7 "7#13" Mark set 10 en base 7=3D7#13 Mark set Making completion list... Load-path shadows: d:/Programme/GNU/emacs-extension/cedet/speedbar/speedbar hides d:/Programme= /GNU/Emacs/lisp/speedbar d:/Programme/GNU/emacs-extension/cedet/speedbar/sb-image hides d:/Programme= /GNU/Emacs/lisp/sb-image d:/Programme/GNU/emacs-extension/cedet/common/ezimage hides d:/Programme/GN= U/Emacs/lisp/ezimage d:/Programme/GNU/emacs-extension/cedet/speedbar/dframe hides d:/Programme/G= NU/Emacs/lisp/dframe c:/Documents and Settings/Vincent/Application Data/.emacs.d/etc/custom hide= s d:/Programme/GNU/Emacs/lisp/custom From monnier@iro.umontreal.ca Tue Sep 15 19:46:08 2009 Received: (at 4356) by emacsbugs.donarmstrong.com; 16 Sep 2009 02:46:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8G2k6Dp017501 for <4356@emacsbugs.donarmstrong.com>; Tue, 15 Sep 2009 19:46:08 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAM7tr0pFpZBe/2dsb2JhbACBU91JhBcFh3o X-IronPort-AV: E=Sophos;i="4.44,394,1249272000"; d="scan'208";a="45748721" Received: from 69-165-144-94.dsl.teksavvy.com (HELO ceviche.home) ([69.165.144.94]) by ironport2-out.pppoe.ca with ESMTP; 15 Sep 2009 22:46:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id EC50DB449F; Tue, 15 Sep 2009 22:46:00 -0400 (EDT) From: Stefan Monnier To: Vincent =?iso-8859-1?Q?Bela=EFche?= Cc: 4356@debbugs.gnu.org Subject: Re: bug#4356: 23.1.50; expand-abbrev changes point erroneously Message-ID: References: <87ljksuzzx.fsf@gmail.com> Date: Tue, 15 Sep 2009 22:46:00 -0400 In-Reply-To: <87ljksuzzx.fsf@gmail.com> ("Vincent =?iso-8859-1?Q?Bela=EFch?= =?iso-8859-1?Q?e=22's?= message of "Sun, 06 Sep 2009 12:30:26 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Here is the bug description. I found this editing some Visual Basic file > with using http://www.emacswiki.org/emacs/visual-basic-mode.el > If for instance I type after (--!-- showing point when I type ): > MyVar = MyFun(1,True)--!-- > Then in visual basic mode visual-basic-newline-and-indent is called, > which in turn calls (expand-abbrev). After (expand-abbrev) is called, > point will be moved as follows: > MyVar = MyFun(1,True--!--) > because `True' is one abbreviation. I have patched visual-basic mode, so > that a save-excursion encloses the call of expand-abbrev, otherwise I > would get: > MyVar = MyFun(1,True > --!--) > which is not wanted. Stefan Monnier (monnier@IRO.UMontreal.CA) confirmed > this is a bug of expand-abbrev, and asked me to repport it. > The wanted behaviour would be that after expanding `True', point would > come back to after the `)' where it originally was. Having looked into it some more, I'm not 100% convinced it's a bug any more. Here's why: `expand-abbrev' may run arbitrary code, and some abbrevs don't just replace text with something else but also prompt and/or move point (e.g. skeletons). So running expand-abbrev from visual-basic-newline-and-indent just doesn't sound right since it may conflict with user-defined abbreviations. I.e. the problem you're seeing can also happen in Emacs-22 depending on the user's own abbreviations. So the VBM code either needs a save-excursion, or needs to refrain from calling expand-abbrev from visual-basic-newline-and-indent. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 23:53:08 2011 Received: (at control) by debbugs.gnu.org; 6 Oct 2011 03:53:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBf19-0004a5-Ks for submit@debbugs.gnu.org; Wed, 05 Oct 2011 23:53:08 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBf13-0004Zd-NU; Wed, 05 Oct 2011 23:53:02 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBf0w-0008IS-Mg; Wed, 05 Oct 2011 23:52:54 -0400 From: Glenn Morris To: 4356-done@debbugs.gnu.org Subject: Re: bug#4356: 23.1.50; expand-abbrev changes point erroneously References: <87ljksuzzx.fsf@gmail.com> X-Spook: AUTODIN military pre-emptive halcon Arnett e-cash Janet X-Ran: Q~ma}.BF}e"W@f?N&l(A-*PZGzf!LqI[nAv|2SV1OF^>/uP&y7*u:|Ym:?[$lCK]o7)6X4 X-Hue: white X-Attribution: GM Date: Wed, 05 Oct 2011 23:52:54 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 15 Sep 2009 22:46:00 -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: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) tags 4356 wontfix stop Closing based on this: > Having looked into it some more, I'm not 100% convinced it's a bug > any more. Here's why: > > `expand-abbrev' may run arbitrary code, and some abbrevs don't just > replace text with something else but also prompt and/or move point > (e.g. skeletons). So running expand-abbrev from > visual-basic-newline-and-indent just doesn't sound right since it may > conflict with user-defined abbreviations. > > I.e. the problem you're seeing can also happen in Emacs-22 depending on > the user's own abbreviations. So the VBM code either needs > a save-excursion, or needs to refrain from calling expand-abbrev from > visual-basic-newline-and-indent. From unknown Sat Aug 16 18:38:01 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, 03 Nov 2011 11:24:06 +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