From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Terry Jones Newsgroups: gmane.emacs.help,gmane.comp.python.general Subject: Re: writing Python in Emacs Date: Sat, 19 Jan 2008 17:51:50 +0100 Message-ID: References: <160ed936-c8c0-432e-81c8-c62b8f164136@s13g2000prd.googlegroups.com> Reply-To: terry@jon.es NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200771906 24692 80.91.229.12 (19 Jan 2008 19:45:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2008 19:45:06 +0000 (UTC) Cc: python-list@python.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 19 20:45:25 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 1JGJd2-0004PD-9V for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jan 2008 20:45:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGJcd-0005Ij-61 for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jan 2008 14:44:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail X-Spam-Status: OK 0.002 Original-Newsgroups: comp.lang.python,gnu.emacs.help In-Reply-To: Your message at 04:01:48 on Saturday, 19 January 2008 X-Mailer: VM 7.19 under Emacs 22.1.50.1 X-Identified-User: {880:host126.hostmonster.com:fluidinf:fluidinfo.com} {sentby:bopbeforesmtp 84.77.246.231 authed with fluidinfo.com} X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.9 Precedence: list Original-Lines: 55 Original-NNTP-Posting-Host: 194.109.207.14 Original-X-Trace: 1200761535 news.xs4all.nl 85781 [::ffff:194.109.207.14]:35894 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: shelby.stanford.edu comp.lang.python:528013 gnu.emacs.help:155419 X-Originally-To: Richard Szopa X-Mailman-Approved-At: Sat, 19 Jan 2008 14:44:37 -0500 X-BeenThere: help-gnu-emacs@gnu.org 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:50827 gmane.comp.python.general:555590 Archived-At: >>>>> "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