From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Maguire, Andrew (GE Infra, Energy)" Newsgroups: gmane.emacs.bugs Subject: bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion Date: Mon, 12 Apr 2010 13:28:50 +0200 Message-ID: References: <87vdbzjnuq.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1271073567 11921 80.91.229.12 (12 Apr 2010 11:59:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Apr 2010 11:59:27 +0000 (UTC) Cc: Chong Yidong , 5805@debbugs.gnu.org To: "Stefan Monnier" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 12 13:59:25 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O1IIW-00018l-Cp for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Apr 2010 13:59:24 +0200 Original-Received: from localhost ([127.0.0.1]:50386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1IIV-0003gR-V0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Apr 2010 07:59:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1II1-0003U4-Ss for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2010 07:58:53 -0400 Original-Received: from [140.186.70.92] (port=55573 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1II0-0003TS-Fj for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2010 07:58:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1IHx-0002wQ-18 for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2010 07:58:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49727) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1IHw-0002wK-RK for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2010 07:58:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O1Hq7-00051V-Kf; Mon, 12 Apr 2010 07:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Maguire, Andrew (GE Infra, Energy)" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Apr 2010 11:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5805-submit@debbugs.gnu.org id=B5805.127107176119236 (code B ref 5805); Mon, 12 Apr 2010 11:30:03 +0000 Original-Received: (at 5805) by debbugs.gnu.org; 12 Apr 2010 11:29:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1HpP-00050D-Ve for submit@debbugs.gnu.org; Mon, 12 Apr 2010 07:29:20 -0400 Original-Received: from exprod5og109.obsmtp.com ([64.18.0.188]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1HpO-000507-5Z for 5805@debbugs.gnu.org; Mon, 12 Apr 2010 07:29:18 -0400 Original-Received: from source ([4.79.213.129]) (using TLSv1) by exprod5ob109.postini.com ([64.18.4.12]) with SMTP ID DSNKS8MEBwU3InEZ1JWvriPAlOR9Xkk8jL+V@postini.com; Mon, 12 Apr 2010 04:29:18 PDT Original-Received: from unknown (HELO ALPMLEF02.e2k.ad.ge.com) ([3.159.18.11]) by Alpmlip08.e2k.ad.ge.com with ESMTP; 12 Apr 2010 07:29:11 -0400 Original-Received: from BUDMLVEM09.e2k.ad.ge.com ([3.159.52.69]) by ALPMLEF02.e2k.ad.ge.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 Apr 2010 07:29:11 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion Thread-Index: AcrY4XhOQO0Oo/IGSKGdLE/wI60b6QBUL/vA X-OriginalArrivalTime: 12 Apr 2010 11:29:11.0152 (UTC) FILETIME=[5F5BCF00:01CADA33] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 12 Apr 2010 07:30:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36200 Archived-At: I do appreciate the need for some abbrevs to move point and that I am reporting a perceived change in behaviour. However, the question is whether the change in behaviour is deliberate or not. If a user wishes to create an abbrev that requires point to move presumably they have to create the abbrev in a certain way. The example you give below would still require user code to move point to between the LaTeX statements. i.e If I created a simple global abbrev to expand "begi" point would be left after the \end{itemize}^ So how should I fix my code that uses expand-abbrev to work in Emacs 23? It currently works as is in Emacs 20, 21 and 22. Thanks, Andrew -----Original Message----- From: Stefan Monnier [mailto:monnier@iro.umontreal.ca]=20 Sent: 10 April 2010 20:10 To: Maguire, Andrew (GE Infra, Energy) Cc: Chong Yidong; 5805@debbugs.gnu.org Subject: Re: bug#5805: 23.1; abbrev-insert does not protext itself with save-excursion > Create a global abbrev, abbrv =3D> abbrev > Type the following, ^ indicating point location. > abbrv () > ^ > Then press C-x ' to expand the abbrev on the line. > abbrev () > ^ > Observe that point ^ is now before the ()s. Right. The question now is: why is that a problem? I ask because for some abbrevs, moving point isa feature, e.g. an abbrev that uses skeletons to expand begi ^ into \begin{itemize} \end{itemize} ^ so maybe the problem is that your code makes unwarranted assumptions about what abbrevs can do, or maybe your code knows that it won't encounter such abbreviations or that it wouldn't care about their point-placement feature, so it could/should use save-excursion. > ;; Emacs 23 has a lisp implementation for abbrevs. BTW, the problem is not that the implementation is in Lisp, but that it behaves differently. Stefan