From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help Subject: Re: Some frameworks smartness Date: Mon, 02 Aug 2010 20:02:24 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280773640 2637 80.91.229.12 (2 Aug 2010 18:27:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 18:27:20 +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 Aug 02 20:27:17 2010 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.69) (envelope-from ) id 1OfzjG-0002ZU-LG for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 20:27:14 +0200 Original-Received: from localhost ([127.0.0.1]:41718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfzPI-00067t-ED for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 14:06:36 -0400 Original-Received: from [140.186.70.92] (port=43713 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfzOZ-00062i-Dd for help-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:05:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfzLU-00083D-78 for help-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:02:41 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:49242) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfzLT-00082y-RK for help-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:02:40 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OfzLQ-0005Vp-Bx for help-gnu-emacs@gnu.org; Mon, 02 Aug 2010 20:02:36 +0200 Original-Received: from xdsl-89-0-22-160.netcologne.de ([89.0.22.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 20:02:36 +0200 Original-Received: from andrea.crotti.0 by xdsl-89-0-22-160.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 20:02:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-89-0-22-160.netcologne.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Cancel-Lock: sha1:69OlBELQpZ1tuRmMVBt7L9AFz+o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:74386 Archived-At: Andrea Crotti writes: > I'm working with turbogears and thinking that it could be much more > simple. > > I tend to forget after a while I don't use the various commands I have > to give (python setup.py update-catalog... etc) so I really think that > emacs could come into help. > > I didn't find any useful packages about this or any framework in > general, but I can do it myself maybe. > > Before I do maybe you have some advices or some hints on something > already done... > Thanks Reading this nice article [fn:1] I started to write something. First we have to activate the correct python executable, so --8<---------------cut here---------------start------------->8--- (require 'python-mode) (defun virtual-set-interpreter () (interactive) (let ((interpreter (expand-file-name "bin/python"))) (if (file-exists-p "bin/python") (progn (message "setting the local interpreter") (setq py-python-command interpreter)) (message "not found")))) (defun virtual-deactivate () (interactive) (message "deactivate the environment") (py-toggle-shells 1)) (provide 'virtual) --8<---------------cut here---------------end--------------->8--- Even though I'm not sure is a good idea to change globally the python interpreter. On other buffers I still maybe would like to use the default cython, how can it be done in a less intrusive way? Then maybe I have to setup the exec path also and some commands which are shortcuts for the various operations normally done... Footnotes: [fn:1] http://jesselegg.com/archives/2010/03/14/emacs-python-programmers-2-virtualenv-ipython-daemon-mode/