From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help,gmane.comp.python.general Subject: Re: writing Python in Emacs Date: Sat, 19 Jan 2008 21:41:59 +0100 Message-ID: <87zlv14kfc.fsf@thievol.homelinux.org> References: <160ed936-c8c0-432e-81c8-c62b8f164136@s13g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200774891 653 80.91.229.12 (19 Jan 2008 20:34:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2008 20:34:51 +0000 (UTC) Cc: python-list@python.org, help-gnu-emacs@gnu.org To: terry@jon.es Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 19 21:35:09 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JGKPD-0002H7-SC for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jan 2008 21:35:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGKOo-0005wB-Jq for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jan 2008 15:34:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JGKOR-0005s2-T0 for help-gnu-emacs@gnu.org; Sat, 19 Jan 2008 15:34:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JGKOR-0005rg-6w for help-gnu-emacs@gnu.org; Sat, 19 Jan 2008 15:34:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGKOQ-0005ra-VZ for help-gnu-emacs@gnu.org; Sat, 19 Jan 2008 15:34:19 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.154]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JGKOQ-0001hA-JK for help-gnu-emacs@gnu.org; Sat, 19 Jan 2008 15:34:18 -0500 Original-Received: by fg-out-1718.google.com with SMTP id d23so1543703fga.30 for ; Sat, 19 Jan 2008 12:34:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=iRW7ektNrHut3lT+JYcdKXDcTtjCBbZ6He5D9gUJTUA=; b=AVXEBCotmfO6jrtNZ76Dyof+vcZjvAN00ApFTc4AnL5VEjsWft7gX730WzpAwk0sBSTLVlsNbgirqqn6Av2n01mEVS92+rtsNRL1tIljIPzm0olEClsk1RgMGAhaRUTBe6sXJ2sPu1gC1XbNpJfcokiHE3P+q4XUWddIG8n3iSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=oBNfiBQ23BDs71cOO0W4Xo6azyKzSz0XkQ6rwT+HOZR8ITN99XUSMyk4zRiP9hkyJ358PflWFu6j1ICZlN+sgGGnd103o1Pl/EuEtPw4GTSW+yQ8SBJrQ+M13nFLpi9b8JdUTdnUZJU2ygHSLPsqL4vVqDcZ/GmrcV78629fCJY= Original-Received: by 10.86.65.11 with SMTP id n11mr4565808fga.26.1200774857446; Sat, 19 Jan 2008 12:34:17 -0800 (PST) Original-Received: from thievol.homelinux.org ( [78.114.32.42]) by mx.google.com with ESMTPS id e11sm6098759fga.5.2008.01.19.12.34.10 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 Jan 2008 12:34:11 -0800 (PST) In-Reply-To: (Terry Jones's message of "Sat, 19 Jan 2008 17:51:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50830 gmane.comp.python.general:555593 Archived-At: I add just a note about ipython: if you use a version > 0.6.15 may be you will have a bad output on error like: == " ": instead of: if __name__ == "__main__": all the characters are missing. To avoid that, run in ipython: %upgrade -nolegacy uncomment in ~/.ipython/ipy_user_config.py: import ipy_defaults restart emacs and try a .py with some syntax errors. It should be ok now. Terry Jones writes: >>>>>> "Richard" == Richard Szopa writes: > > Richard> I am a devoted Emacs user and I write a lot in Python. > > Me too. > > Richard> I need the following features: > > Richard> 1) Tab completion, ideally Slime like. That is, when there's not > Richard> enough letters to unambiguously complete a symbol, I want it to > Richard> show a buffer (w/o taking the focus) w/ the possible > Richard> completions. In an ideal world, it would be able to complete > Richard> fo.ba to foo.bar. I imagine this would require quite tight > Richard> Emacs-Python integration. > > I know this is not what you want, but I use hippie expand (M-/) to cycle > through possible completions. It's not Python aware, but it is of some use. > > Richard> 2) Sending the toplevel definition (class or function) to the Python > Richard> buffer. > > I switched to IPython to have better interaction with a spawned Python. > > To use IPython you need to use the Python mode that is NOT the one from > (endorsed?) by the FSF. It gives you some completion (at least in the > *Python* buffer) and you can send pieces of the buffer to the python > process, via py-send-region (C-c |), py-execute-def-or-class (M-C-x), etc. > > Richard> 3) Hints on function/method arguments. IDLE has this done nearly > Richard> right, but the hints are a bit too intrusive for me. I would like to > Richard> see them in the minibuffer. > > I don't have this. > > Richard> 4) (optional) I would like to see the definition of a function > Richard> function or class by hitting M-. on its name. (I understand that > Richard> this may be impossible for methods, as Emacs would have to > Richard> automagically infer the type of the object). > > This is just an emacs tag file need. Have you googled for something like > emacs tags python? The issue of methods might be overcome by just moving > through tags with the same name. Yes, that requires _you_ to know when > you've hit the right thing. That's not optimal, but it's better than > nothing. Ideally you could send the definition to IPython, ask it for the > class info, and use that to jump to the right tag. > > Richard> I have tried a couple of times both python-modes (the one shipped w/ > Richard> Python and the one shipped w/ Emacs), pymacs and stuff like that... > Richard> And, as I said, never got it right. But, maybe I just cannot find the > Richard> way to configure it, and some configuration hints will be enough... > > If you have the time, please summarize your findings. The emacs/python > world has always seemed quite amorphous to me too. > > Terry > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > -- A + Thierry Pub key: http://pgp.mit.edu