From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rjd Newsgroups: gmane.emacs.help Subject: Re: pYthon indentation Date: Mon, 26 Oct 2015 11:52:21 +0000 (UTC) Message-ID: References: <871tcman8r.fsf@alphaville.usersys.redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1445860403 2850 80.91.229.3 (26 Oct 2015 11:53:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Oct 2015 11:53:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 26 12:53:13 2015 Return-path: Envelope-to: geh-help-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 1ZqgKr-00045f-SK for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Oct 2015 12:53:10 +0100 Original-Received: from localhost ([::1]:52208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqgKr-0002HH-Cx for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Oct 2015 07:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqgKO-0001yx-PY for help-gnu-emacs@gnu.org; Mon, 26 Oct 2015 07:52:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqgKL-0001NB-J9 for help-gnu-emacs@gnu.org; Mon, 26 Oct 2015 07:52:40 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqgKL-0001N4-D5 for help-gnu-emacs@gnu.org; Mon, 26 Oct 2015 07:52:37 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZqgKJ-0003bR-K4 for help-gnu-emacs@gnu.org; Mon, 26 Oct 2015 12:52:35 +0100 Original-Received: from http-v.fe.bosch.de ([194.39.218.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Oct 2015 12:52:35 +0100 Original-Received: from ryan.dixon by http-v.fe.bosch.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Oct 2015 12:52:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 60 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 194.39.218.10 (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107820 Archived-At: Nick Dokos gmail.com> writes: > There are two competing python modes for emacs, python-mode.el (which is > what you are talking about IIUC) and python.el which comes with the > emacs distro. I was using python-mode.el for a while and I always seemed > to have small annoyances crop up at a regular rate (although I must > admit, I never did much to improve the situation: they usually cropped > up when I was under time pressure, so I would just bulldoze my way > through - by the time I *could* do something about it, I had forgotten > what the annoyance was - until the next time something bit me...) > > So at some point, I chucked it and started using the built-in python.el. > I'm sure it too has its share of faults, but so far at least (I've been > using it for the past year or so), I don't remember being really annoyed > with it, so I'm sticking with it. > > My 2 cents and of course, YMMV. > -- > Nick > > This was the confusion. The error I am talking about is clearly with python.el. I have never used python-mode.el until trying to solve this indentation issue. The steps to reproduce on Windows 7 (64bit): i. I downloaded http://ftp.gnu.org/gnu/emacs/windows/emacs-24.5-bin-i686-mingw32.zip. ii. I extracted zip file to temp folder; completely unmodified. iii. I opened an MSYS shell and cd'd into the temp/bin folder. iv. I ran ./emacs.exe -Q. v. I C-x C-f and call the new file temp.py vi. I type the following up UNTIL % - which represents the cursor position: import re as myre var = [ % vii. I then press TAB and get the following message in the mini buffer: python-indent--calculate-indentation: Wrong type argument: number-or-marker-p, nil viii. The debug information shows: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) python-indent-context() python-indent--calculate-indentation() python-indent-calculate-indentation(nil) python-indent-line(nil) python-indent-line-function() indent-for-tab-command(nil) call-interactively(indent-for-tab-command nil nil) command-execute(indent-for-tab-command)