From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Hepburn Newsgroups: gmane.emacs.bugs Subject: bug#12785: [octave-mod] Changed behaviour of octave-mark-block? Date: Wed, 5 Dec 2012 10:23:22 +1100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04462f0ee6562304d00f2606 X-Trace: ger.gmane.org 1354663443 14744 80.91.229.3 (4 Dec 2012 23:24:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 23:24:03 +0000 (UTC) Cc: 12785@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 00:24:15 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 1Tg1qZ-0004ul-C9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2012 00:24:15 +0100 Original-Received: from localhost ([::1]:40018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg1qN-0002yu-ET for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 18:24:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg1qJ-0002rn-Pb for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 18:24:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tg1qI-0005mo-7W for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 18:23:59 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tg1qI-0005mk-2u for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 18:23:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tg1qL-0007pb-N1 for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 18:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark Hepburn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2012 23:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12785-submit@debbugs.gnu.org id=B12785.135466341230068 (code B ref 12785); Tue, 04 Dec 2012 23:24:01 +0000 Original-Received: (at 12785) by debbugs.gnu.org; 4 Dec 2012 23:23:32 +0000 Original-Received: from localhost ([127.0.0.1]:53805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg1ps-0007ov-1V for submit@debbugs.gnu.org; Tue, 04 Dec 2012 18:23:32 -0500 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:50358) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg1pp-0007ok-Cx for 12785@debbugs.gnu.org; Tue, 04 Dec 2012 18:23:30 -0500 Original-Received: by mail-ob0-f172.google.com with SMTP id za17so4251082obc.3 for <12785@debbugs.gnu.org>; Tue, 04 Dec 2012 15:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kAbVO4dxFjKKljsX9UQ6NRq5vp3hsPyG0ZgNN7NKVec=; b=SP3Wmq97h/G+E6hSa+pOG1b3HdS6vUzGFiLfiORsKnuXI7kxKNDFrx00ddZSEX8FZ5 +CUhyh+hZnlhwf7a/6DbhTa9MZc0j3woTcOW+qxj7tEt5WBTXTDl+RGg91GcRmtfrklw xcFTYmi2sMFjX+aEsGF6TK/2+KS0tJs7y52GACm6fjC3X4lvgIkBixkPKJK1mWE7rJp+ jyXyiHVJ2/KqGfpA8qndYuixL4gKix9qYs+VK9qCOIdJMG4WyqmBC3bDgSSoQNvhJq/R Pz44g+DhqKHOXhmnxRHi8QZbHY6sxYLEJWaQcUg4HwIDUHwNvNNn9oN6xfrIHonm5p0n UD3A== Original-Received: by 10.182.38.69 with SMTP id e5mr9372969obk.79.1354663402558; Tue, 04 Dec 2012 15:23:22 -0800 (PST) Original-Received: by 10.182.67.168 with HTTP; Tue, 4 Dec 2012 15:23:22 -0800 (PST) In-Reply-To: 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:67932 Archived-At: --f46d04462f0ee6562304d00f2606 Content-Type: text/plain; charset=ISO-8859-1 Hi, Thanks for your reply. Regarding the "end|" case, the old mode wouldn't mark the block, and I feel that's correct behaviour. In the "|for" case as I mentioned, the old mode _did_ mark the block (not the enclosing one), but I agree that marking the enclosing block is probably preferable and more consistent. In my case I was trying to get the same behaviour in some related code -- expand-region.el -- across both versions, but that has been resolved via other means anyway. Cheers, Mark. On 5 December 2012 09:02, Stefan Monnier wrote: > > for i=1:n, something; end; > > > If octave-mark-block is invoked with the cursor anywhere inside the > > 'for' token, it will fail ("unbalanced parentheses"). The following > > situations all fail in the recent version, but succeed in the older > > version: |for, f|or, fo|r. > > For the "|for" case I think the behavior makes sense (it will try to > mark the enclosing block). But maybe indeed it's an accidental change. > > For the "f|or" and "fo|r" cases, indeed the smie primitives assume the > cursor is not within a token, so they get all confused. Shouldn't be > too hard to fix. > > What should be the behavior when point is at "end|"? Should it mark > this block or the enclosing one? > > > Stefan > -- Where the hell is Mark: http://blog.everythingtastesbetterwithchilli.com/ --f46d04462f0ee6562304d00f2606 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

Thanks for your reply.

Rega= rding the "end|" case, the old mode wouldn't mark the block, = and I feel that's correct behaviour. =A0In the "|for" case as= I mentioned, the old mode _did_ mark the block (not the enclosing one), bu= t I agree that marking the enclosing block is probably preferable and more = consistent.

In my case I was trying to get the same behaviour in so= me related code -- expand-region.el -- across both versions, but that has b= een resolved via other means anyway.

Cheers, Mark.=



On 5 December 2012 09:02, Stefan Monnier <monnier@iro.umontreal.c= a> wrote:
> for i=3D1:n, something; end;

> If octave-mark-block is invoked with the cursor anywhere inside the > 'for' token, it will fail ("unbalanced parentheses")= . =A0The following
> situations all fail in the recent version, but succeed in the older > version: |for, f|or, fo|r.

For the "|for" case I think the behavior makes sense (it will try= to
mark the enclosing block). =A0But maybe indeed it's an accidental chang= e.

For the "f|or" and "fo|r" cases, indeed the smie primit= ives assume the
cursor is not within a token, so they get all confused. =A0Shouldn't be=
too hard to fix.

What should be the behavior when point is at "end|"? =A0Should it= mark
this block or the enclosing one?


=A0 =A0 =A0 =A0 Stefan



-- Where the hell is Mark:
http://blog.everythingtastesbetterwithchi= lli.com/
--f46d04462f0ee6562304d00f2606--