Comments (11)
Oh, very cool! I'll check it out when I get a chance. I'll also add a link
or howto to the traad project site.
Austin
On Mon, Jun 24, 2013 at 12:35 PM, Takafumi Arakaki <[email protected]
wrote:
I made virtualenv wrapper for Emacs Lisp to help installation of Emacs
packages relying on Python modules: python-environment.elhttps://github.com/tkf/emacs-python-environment.
I think it would help Traad installation.You can just define a command like the following so that user can just do M-x
traad-make-env to setup Python side of Traad.(defun traad-make-env ()
(interactive)
(python-environment-run (list "pip" "install" traad-path-to-source)))I am requesting for comment before fixing the API. If you are interested,
please come in: tkf/emacs-python-environment#1tkf/emacs-python-environment#1—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50
.
from traad.
I'm glad that you are interested in. Well, unfortunately it is not as simple as putting it in README. You also need to set traad-server-program
using (python-environment-bin "traad")
. So you need to edit traad.el a little bit.
from traad.
I don't think I want to make python-environment a hard requirement for
traad, so what I was imagining is that I could tell people how to use
python-environment and traad together if they wanted. Surely they can set
traad-server-program in their configuration without me needing to modify
traad.el, right?
Austin
On Mon, Jun 24, 2013 at 9:55 PM, Takafumi Arakaki
[email protected]:
I'm glad that you are interested in. Well, unfortunately it is not as
simple as putting it in README. You also need to set traad-server-programusing (python-environment-bin
"traad"). So you need to edit traad.el a little bit.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-19931346
.
from traad.
Yes of course. But there are a few edge cases (e.g., python-environment-bin returns nil when traad is not installed) and people will need to take their time to see what is happening unless you write very well documentation (still they waste their time reading the doc). I think it's just you waste your time to edit a few lines of code or many people waste their time editing and debugging their configuration. I believe uninteresting thing like dependency resolution should be done behind the scenes.
If you don't like hard dependency, you can make python-environment.el as a soft dependency. You can define command above and call require
inside of the command instead of the top-level of traad.el. You may need a bit of coding for the default traad-server-program
also.
from traad.
I saw you added a note on python-environment.el. I think people can use my library whatever they like as it is a free software, but note that this is not the intended usecase. My intention was to make one easy way to setup Python environment for Emacs, not add another hard-to-setup one, as I thought:
% python -m this | grep 'only one'
There should be one-- and preferably only one --obvious way to do it.
That's just my two cents.
from traad.
I tried integrating python-environment into traad in some way that made
sense for me, but I just couldn't do it comfortably. For example, I
regularly need to switch between python2 and python3, both system
installations and virtual environments. I also need this to work across
work and home machines. In the end it was just simpler for me to manage
virtual environments manually than to try to bake it into my emacs
configuration...separation of concerns and so forth.
In the event that users of traad find common patterns with
python-environment, then I'll be happy to consider building it in. I don't
have a problem with it, and I'm sure it helps with certain workflows and
environments, but just not for me. In fact it may just be that I work in a
weird way, and maybe I'll learn something new. On that note, if you want to
submit a patch or something more concrete for integrating traad with
python-environment, I'm more than happy to consider it.
Austin
On Fri, Jul 5, 2013 at 4:58 PM, Takafumi Arakaki
[email protected]:
I saw you added a note on python-environment.el. I think people can use my
library whatever they like as it is a free software, but note that this is
not the intended usecase. My intention was to make one easy way to setup
Python environment for Emacs, not add another hard-to-setup one, as I
thought:% python -m this | grep 'only one'
There should be one-- and preferably only one --obvious way to do it.That's just my two cents.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-20523111
.
from traad.
switch between python2 and python3
You can have any number of virtualenv using python-environment.el. You just have to define a root directory and a corresponding virtualenv command. It could be something like ~/.emacs.d/traad-env/pyXY
like the one in tox.
Re: patch. I am working on (pythonista.el)[https://github.com/tkf/emacs-pythonista] to setup everything you need for Python environment in Emacs. Current situation for Python programmer is not ideal because you need to install many packages and put them together by yourself. My goal is to install everything by M-x package-install pythonista
and setup everything by just (require 'pythonista)
. I am still not sure about whether to use ropemacs or traad. (If I am going to use traad I think it worth implementing it.) I've never seriously compare ropemacs and traad and I don't find any "vs ropemacs" in README. Can you describe some pros and cons? It would be nice to see these things in README.
from traad.
Traad vs. ropemacs is not an easy question. All I can say is that I tried
using ropemacs several times, and never with much success. The problem as I
recall was not to do with ropemacs itself, but with pymacs. I could never
get pymacs to behave sensibly with multiple python versions and across
environments. Even when I thought I had it working, it would stop working
for mysterious reasons. A lot of this may have been user error, but in the
end I spent many hours trying to get it working with nothing to show for
it.
Also, the design of pymacs strikes me as weird. As I understand it, it
translates between elisp and python, relying on a separate Python process,
pipes, etc. It feels awkward. So, because of that, and because I thought it
would be fun to write a tool myself, I wrote traad.
The short answer, then, is that I don't know if traad is necessarily better
or worse than ropemacs. Ropemacs is probably better supported, tested, etc.
than traad. For the most part, since I get very little feedback from users,
I just treat traad as my own private tool. If it ever gets bigger, I'll
probably change that attitude.
You'll need to evaluate the tools on their merits and decide which one fits
better into the design of pythonista (which I'm looking forward to, by the
way.) If you have any questions about traad, I'll of course be happy to
answer them. You're an incredibly energetic emacs developer, and I want to
support what you're doing!
Austin
On Fri, Jul 5, 2013 at 7:29 PM, Takafumi Arakaki
[email protected]:
switch between python2 and python3
You can have any number of virtualenv using python-environment.el. You
just have to define a root directory and a corresponding virtualenv
command. It could be something like ~/.emacs.d/traad-env/pyXY like the
one in tox.Re: patch. I am working on (pythonista.el)[
https://github.com/tkf/emacs-pythonista] to setup everything you need for
Python environment in Emacs. Current situation for Python programmer is not
ideal because you need to install many packages and put them together by
yourself. My goal is to install everything by M-x package-install
pythonista and setup everything by just (require 'pythonista). I am still
not sure about whether to use ropemacs or traad. (If I am going to use
traad I think it worth implementing it.) I've never seriously compare
ropemacs and traad and I don't find any "vs ropemacs" in README. Can you
describe some pros and cons? It would be nice to see these things in README.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-20530190
.
from traad.
I could never get pymacs to behave sensibly with multiple python versions and across environments.
I think this is a good point. From what I know, I think using several Python versions with Pymacs requires you to install different build of Pymacs (because you need to "compile" Pymacs Python module) and use it with different Emacs processes. But why do you need to use rope with different Python version? Can't Pymacs run with Python 2.7 treat Python 3.3 source code?
from traad.
As far as I can tell, the version of Python running rope needs to match the
version of Python syntax in the file you're refactoring. I ran a few
experiments to try to verify this a year or so ago, and it certainly seemed
to be true. It may be that rope is actually smarter than that now, or that
I wasn't using rope properly.
It's worth investigating this a bit more, but I honestly don't have much
time for that right now. I just started a new company, and I'm up to my
eyeballs in work!
Austin
On Sun, Jul 7, 2013 at 2:27 PM, Takafumi Arakaki
[email protected]:
I could never get pymacs to behave sensibly with multiple python versions
and across environments.I think this is a good point. From what I know, I think using several
Python versions with Pymacs requires you to install different build of
Pymacs (because you need to "compile" Pymacs Python module) and use it with
different Emacs processes. But why do you need to use rope with different
Python version? Can't Pymacs run with Python 2.7 treat Python 3.3 source
code?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-20570008
.
from traad.
That's informative. Thanks. I'll let you know when I make some progress around python-environment.el stuff. And good luck with your new company :)
from traad.
Related Issues (20)
- rename-resource doesn't seem to work HOT 1
- Connecting to traad server seems broken in emacs HOT 4
- Split emacs client code out HOT 1
- "Error (error) while connecting" and "task-id is nil" HOT 1
- stop_app is not defined in server.py HOT 3
- Multiple projects - multiple traad servers? HOT 4
- Company-mode plugin HOT 1
- RuntimeError: Request context not initialized [python 3] HOT 7
- Support rope.refactor.change_signature ArgumentAdd to add an argument
- Consider using an asyncio-based http server HOT 1
- Consider using pytest for the tests HOT 2
- Support for inlining of variables HOT 7
- AttributeError: 'Call' object has no attribute 'starargs' HOT 4
- Iterator / context manager extraction HOT 1
- Refresh/revalidate server when necessary HOT 1
- Implement auto-termination HOT 1
- Three undefined names HOT 1
- Depends on bind-map HOT 1
- traad does not work with conda environments
- Can not install server and need to make it with pyenv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traad.