GNU logs - #19908, boring messages


Message sent to fgallina@HIDDEN, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#19908: python.el: minimal cython indentation support
Resent-From: Carlos Pita <carlosjosepita@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: fgallina@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 20 Feb 2015 00:28:02 +0000
Resent-Message-ID: <handler.19908.B.142439207024079 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 19908
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 19908 <at> debbugs.gnu.org
Cc: fgallina@HIDDEN
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: fgallina@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.142439207024079
          (code B ref -1); Fri, 20 Feb 2015 00:28:02 +0000
Received: (at submit) by debbugs.gnu.org; 20 Feb 2015 00:27:50 +0000
Received: from localhost ([127.0.0.1]:49012 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YObRe-0006GI-DE
	for submit <at> debbugs.gnu.org; Thu, 19 Feb 2015 19:27:50 -0500
Received: from eggs.gnu.org ([208.118.235.92]:51222)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRd-0006GB-0U
 for submit <at> debbugs.gnu.org; Thu, 19 Feb 2015 19:27:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRb-0004h4-Q1
 for submit <at> debbugs.gnu.org; Thu, 19 Feb 2015 19:27:48 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33630)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRb-0004h0-N8
 for submit <at> debbugs.gnu.org; Thu, 19 Feb 2015 19:27:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52938)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRa-0007Nx-RS
 for bug-gnu-emacs@HIDDEN; Thu, 19 Feb 2015 19:27:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRZ-0004go-V3
 for bug-gnu-emacs@HIDDEN; Thu, 19 Feb 2015 19:27:46 -0500
Received: from mail-la0-x233.google.com ([2a00:1450:4010:c03::233]:34595)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1YObRZ-0004gk-MH
 for bug-gnu-emacs@HIDDEN; Thu, 19 Feb 2015 19:27:45 -0500
Received: by labhs14 with SMTP id hs14so3180494lab.1
 for <bug-gnu-emacs@HIDDEN>; Thu, 19 Feb 2015 16:27:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to:content-type;
 bh=+VsNfgxciwm2h2HuAl4a0ZGOGeZcbFaD/t1dmHuRioM=;
 b=uDsyQLbv/H1F6sH7+plwhZK1XgyVeCC2/0SC1rPrJ1Y+8qX/qOMZw7v3qmoqtmCdMB
 sreeqweOBQpkSe8pfWPZLQ1tYTKpI2bXUveULlS1DSJGlm5mouX68bjuK6YlwkvT8pD3
 LojnitNVq8WZltCFck7UGoEB4hCrf4idETSmgZ/jvzHIRgduszj792ivLKWS1c8RwLkr
 D5935tRrYdnYZ5hAI8Dwnfv2h4SndR7gGbYqhrgKBffOKJtyZ4qVwcVOlCqkcf++efo1
 Vmhi5aw/PYnpEbbI8clrdYWOPLZuMjHIYqfpd3dzlwlBxvP4mMi1pcqG/5c+QQyW7cdj
 QiRw==
X-Received: by 10.112.126.98 with SMTP id mx2mr6267448lbb.52.1424392064067;
 Thu, 19 Feb 2015 16:27:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.112.6.74 with HTTP; Thu, 19 Feb 2015 16:27:23 -0800 (PST)
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Thu, 19 Feb 2015 21:27:23 -0300
Message-ID: <CAELgYhdCywg3aHSBFV-VmBURaeqTcNbReH6fgMBdnDqrmhX9Mg@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

X-Debbugs-CC: fgallina@HIDDEN

This isn't a bug in python.el at all. But as it tries to be so smart at
indenting it could be difficult for inherited modes to leverage this
cleverness.

What is needed for cython-mode indentation to work (AFAICS):

* To add cdef, cpdef, enum, struct, union, IF, ELIF and ELSE as
  block starters.

* To add ELIF and ELSE as dedenters.

* To add cdef and cpdef as defuns.

Hopefully the above will also make navigation commands to work with
cython source.

It would be pretty easy to add this directly into python.el (but a
kludge, except you plan to support cython directly). I've done it in my
working copy of python.el and seems to do the job quite well.

This report is about finding a good extension point for the above, in
order to make possible cython-mode to better extend
python-mode. Briefly, it's necessary to extend python-rx-constituents
some way, and at compilation time. Maybe it's already possible in a
clean way I'm not aware of. Or maybe you plan to support cython directly
(+1 it shouldn't be difficult at all).

I will gladly add a pull request to the cython project in github with
the result of the discussion and suggestions here. Or help integrating
cython-mode.el into python.el. In it's current shape cython-mode
indentation and navigation really sucks.

Cheers
--
Carlos




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Carlos Pita <carlosjosepita@HIDDEN>
Subject: bug#19908: Acknowledgement (python.el: minimal cython indentation
 support)
Message-ID: <handler.19908.B.142439207024079.ack <at> debbugs.gnu.org>
References: <CAELgYhdCywg3aHSBFV-VmBURaeqTcNbReH6fgMBdnDqrmhX9Mg@HIDDEN>
X-Gnu-PR-Message: ack 19908
X-Gnu-PR-Package: emacs
Reply-To: 19908 <at> debbugs.gnu.org
Date: Fri, 20 Feb 2015 00:28:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  fgallina@HIDDEN
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 19908 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
19908: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19908
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#19908: python.el: minimal cython indentation support
References: <CAELgYhdCywg3aHSBFV-VmBURaeqTcNbReH6fgMBdnDqrmhX9Mg@HIDDEN>
In-Reply-To: <CAELgYhdCywg3aHSBFV-VmBURaeqTcNbReH6fgMBdnDqrmhX9Mg@HIDDEN>
Resent-From: Nathan Weston <nweston@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 14 Aug 2015 17:12:02 +0000
Resent-Message-ID: <handler.19908.B19908.143957228412458 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 19908
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 19908 <at> debbugs.gnu.org
Received: via spool by 19908-submit <at> debbugs.gnu.org id=B19908.143957228412458
          (code B ref 19908); Fri, 14 Aug 2015 17:12:02 +0000
Received: (at 19908) by debbugs.gnu.org; 14 Aug 2015 17:11:24 +0000
Received: from localhost ([127.0.0.1]:55948 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZQIVo-0003Es-6K
	for submit <at> debbugs.gnu.org; Fri, 14 Aug 2015 13:11:24 -0400
Received: from hq.genarts.com ([173.9.65.1]:59030 helo=mail.hq.genarts.com)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <nweston@HIDDEN>) id 1ZQIKp-0002wG-R0
 for 19908 <at> debbugs.gnu.org; Fri, 14 Aug 2015 13:00:06 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id E6DA5BE1157
 for <19908 <at> debbugs.gnu.org>; Fri, 14 Aug 2015 13:00:02 -0400 (EDT)
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id gX8nTMt-FjrP for <19908 <at> debbugs.gnu.org>;
 Fri, 14 Aug 2015 12:59:58 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 442C5BE10FE
 for <19908 <at> debbugs.gnu.org>; Fri, 14 Aug 2015 12:59:58 -0400 (EDT)
X-Virus-Scanned: amavisd-new at mail.hq.genarts.com
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id yd6ZZ8kP8pXI for <19908 <at> debbugs.gnu.org>;
 Fri, 14 Aug 2015 12:59:58 -0400 (EDT)
Received: from [192.168.1.148]
 (146-115-181-71.c3-0.wtr-ubr1.sbo-wtr.ma.cable.rcn.com [146.115.181.71])
 by mail.hq.genarts.com (Postfix) with ESMTPSA id 10E69BE10D8
 for <19908 <at> debbugs.gnu.org>; Fri, 14 Aug 2015 12:59:58 -0400 (EDT)
Message-ID: <55CE1E8D.9090303@HIDDEN>
Date: Fri, 14 Aug 2015 12:59:57 -0400
From: Nathan Weston <nweston@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Mailman-Approved-At: Fri, 14 Aug 2015 13:11:22 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

I've encountered similar problems writing a mode for Enaml.

What I really want is to override python-rx for enaml-mode, while 
leaving the original definition for python-mode. But that doesn't seem 
to be possible.

For Enaml, I was able to get indentation working by advising 
python-indent-context, but it's not particularly elegant. And other 
function which use (python-rx 'block-start) don't work correctly in 
enaml-mode.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.