* pymacs
@ 2013-06-09 19:35 daniel
2013-06-09 22:19 ` pymacs andrea crotti
2013-06-10 5:20 ` pymacs Andreas Röhler
0 siblings, 2 replies; 12+ messages in thread
From: daniel @ 2013-06-09 19:35 UTC (permalink / raw)
To: help-gnu-emacs
Anyone using pymacs here? A very powerful way to program for emacs.
But there are few resources available about it. And the main site is
offline now - http://pymacs.progiciels-bpi.ca/pymacs.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-09 19:35 pymacs daniel
@ 2013-06-09 22:19 ` andrea crotti
2013-06-09 22:37 ` pymacs daniel
2013-06-10 5:20 ` pymacs Andreas Röhler
1 sibling, 1 reply; 12+ messages in thread
From: andrea crotti @ 2013-06-09 22:19 UTC (permalink / raw)
To: daniel; +Cc: help-gnu-emacs@gnu.org
I'm using jedi now
http://tkf.github.io/emacs-jedi/
which I like much more actually and it works very well..
2013/6/9 daniel <idnael@gmail.com>
> Anyone using pymacs here? A very powerful way to program for emacs.
>
> But there are few resources available about it. And the main site is
> offline now - http://pymacs.progiciels-bpi.ca/pymacs.html
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-09 22:19 ` pymacs andrea crotti
@ 2013-06-09 22:37 ` daniel
2013-06-10 3:13 ` pymacs Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: daniel @ 2013-06-09 22:37 UTC (permalink / raw)
To: andrea crotti; +Cc: help-gnu-emacs@gnu.org
That is interesting. (but doesn't work in my Emacs installation yet...)
Anyway, it is not related to my question!
"""Pymacs is a powerful tool which, once started from Emacs, allows
both-way communication between Emacs Lisp and Python."""
2013/6/9 andrea crotti <andrea.crotti.0@gmail.com>
> I'm using jedi now
> http://tkf.github.io/emacs-jedi/
> which I like much more actually and it works very well..
>
>
> 2013/6/9 daniel <idnael@gmail.com>
>
>> Anyone using pymacs here? A very powerful way to program for emacs.
>>
>> But there are few resources available about it. And the main site is
>> offline now - http://pymacs.progiciels-bpi.ca/pymacs.html
>>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-09 22:37 ` pymacs daniel
@ 2013-06-10 3:13 ` Eric Abrahamsen
2013-06-10 10:54 ` pymacs daniel
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2013-06-10 3:13 UTC (permalink / raw)
To: help-gnu-emacs
daniel <idnael@gmail.com> writes:
> That is interesting. (but doesn't work in my Emacs installation yet...)
>
> Anyway, it is not related to my question!
> """Pymacs is a powerful tool which, once started from Emacs, allows
> both-way communication between Emacs Lisp and Python."""
I use pymacs and rope, and like them quite a bit, but I remember it was
a real pain in the rear to get everything installed and talking
together. I'm on arch, so there are often confusions about python 2 vs 3
(3 is the default), and I think I was trying to install too many things
manually. Arch turned out to have readymade packages for pymacs,
python2-rope and python2-ropemode, and it all worked better.
Depending on your system, I'd definitely look for packages. Pymacs is
also available through Emacs' package manager, which might be the safest
option: install it from there, and do the usual initialization dance in
a python-mode load hook:
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
What else do you need to know?
Eric
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 3:13 ` pymacs Eric Abrahamsen
@ 2013-06-10 10:54 ` daniel
2013-06-10 13:12 ` pymacs daniel
0 siblings, 1 reply; 12+ messages in thread
From: daniel @ 2013-06-10 10:54 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: help-gnu-emacs
2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>
> What else do you need to know?
>
>
In Ubuntu it is easy to install Pymacs because it is on the standard
repository.
The question is about passing values from python and elisp and the opposite
way.
# A function that receives a elisp variable name and returns it's value:
from pymacs import lisp
def tvar(n):
return lisp[n].value()
AND IN ELISP:
(pymacs-load "pymacs_teste")
(setq PTEST "string")
(pymacs-teste-tvar "PTEST") ;; returns "string" Ok!
(setq PTEST (list 1 2 3))
(pymacs-teste-tvar "PTEST") ;; returns (lambda (&rest arguments)
(pymacs-apply (quote (pymacs-python . 4543)) arguments))
When python calls lisp[n].value() it returns a kind of wrapper which works
well inside python. But if I return it back to elisp, it doesn't work.
If I do instead
def tvar(n):
return list( lisp[n].value() )
It works perfectly.
But I don't know what to do if PTEST contains a elisp symbol.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 10:54 ` pymacs daniel
@ 2013-06-10 13:12 ` daniel
2013-06-10 13:37 ` pymacs Eric Abrahamsen
0 siblings, 1 reply; 12+ messages in thread
From: daniel @ 2013-06-10 13:12 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: help-gnu-emacs@gnu.org
To put it more simple, the problem is when a python function returns a
elisp symbol back to elisp:
def teste():
symb = lisp.simbolo
OR symb = lisp["simbolo"]
OR symb = lisp("'simbolo")
#str(symb) gives " 'simbolo "
return symb
When the function is invoked from elisp it doesn't return the symbol.
I need this for a python program that creates an emacs menu. And the menu
structure need to have these symbols that are the functions to be called
when an menu item is selected.
2013/6/10 daniel <idnael@gmail.com>
>
>
>
> 2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>
>>
>> What else do you need to know?
>>
>>
> In Ubuntu it is easy to install Pymacs because it is on the standard
> repository.
>
> The question is about passing values from python and elisp and the
> opposite way.
>
> # A function that receives a elisp variable name and returns it's value:
> from pymacs import lisp
> def tvar(n):
> return lisp[n].value()
>
>
> AND IN ELISP:
>
> (pymacs-load "pymacs_teste")
>
> (setq PTEST "string")
> (pymacs-teste-tvar "PTEST") ;; returns "string" Ok!
>
> (setq PTEST (list 1 2 3))
> (pymacs-teste-tvar "PTEST") ;; returns (lambda (&rest arguments)
> (pymacs-apply (quote (pymacs-python . 4543)) arguments))
>
> When python calls lisp[n].value() it returns a kind of wrapper which works
> well inside python. But if I return it back to elisp, it doesn't work.
>
> If I do instead
> def tvar(n):
> return list( lisp[n].value() )
>
> It works perfectly.
>
> But I don't know what to do if PTEST contains a elisp symbol.
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 13:12 ` pymacs daniel
@ 2013-06-10 13:37 ` Eric Abrahamsen
2013-06-10 17:50 ` pymacs daniel
0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2013-06-10 13:37 UTC (permalink / raw)
To: help-gnu-emacs
daniel <idnael@gmail.com> writes:
> To put it more simple, the problem is when a python function returns a
> elisp symbol back to elisp:
>
> def teste():
> symb = lisp.simbolo
> OR symb = lisp["simbolo"]
> OR symb = lisp("'simbolo")
> #str(symb) gives " 'simbolo "
> return symb
>
> When the function is invoked from elisp it doesn't return the symbol.
>
> I need this for a python program that creates an emacs menu. And the menu
> structure need to have these symbols that are the functions to be called
> when an menu item is selected.
Ah, can't help you there, I've never done anything fancy with pymacs.
What happens when you call `pymacs-eval' on the return value from the
python function?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 13:37 ` pymacs Eric Abrahamsen
@ 2013-06-10 17:50 ` daniel
2013-06-10 18:03 ` pymacs Andreas Röhler
0 siblings, 1 reply; 12+ messages in thread
From: daniel @ 2013-06-10 17:50 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: help-gnu-emacs@gnu.org
2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>
> Ah, can't help you there, I've never done anything fancy with pymacs.
> What happens when you call `pymacs-eval' on the return value from the
> python function
>
Doesn't work because it is not a string. It looks to be an elisp lambda
expression . But doesn't work with the elisp eval function.
I will have to use strings instead of symbols and convert then on the elisp
side.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 17:50 ` pymacs daniel
@ 2013-06-10 18:03 ` Andreas Röhler
2013-06-10 22:43 ` pymacs Kyle Machulis
0 siblings, 1 reply; 12+ messages in thread
From: Andreas Röhler @ 2013-06-10 18:03 UTC (permalink / raw)
To: help-gnu-emacs
Am 10.06.2013 19:50, schrieb daniel:
> 2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>
>>
>> Ah, can't help you there, I've never done anything fancy with pymacs.
>> What happens when you call `pymacs-eval' on the return value from the
>> python function
>>
>
> Doesn't work because it is not a string. It looks to be an elisp lambda
> expression . But doesn't work with the elisp eval function.
>
> I will have to use strings instead of symbols and convert then on the elisp
> side.
>
BTW Pymacs has it's own mailing list
pymacs-devel@googlegroups.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 18:03 ` pymacs Andreas Röhler
@ 2013-06-10 22:43 ` Kyle Machulis
2013-06-16 20:38 ` pymacs daniel
0 siblings, 1 reply; 12+ messages in thread
From: Kyle Machulis @ 2013-06-10 22:43 UTC (permalink / raw)
Cc: help-gnu-emacs
There's now also elpy, which allows does some of the heavy setup for you
and allows you to choose which engine you want to use (pymacs/rope or
jedi):
http://blog.jorgenschaefer.de/2013/04/elpy-10-released.html
On Mon, Jun 10, 2013 at 11:03 AM, Andreas Röhler <
andreas.roehler@easy-emacs.de> wrote:
> Am 10.06.2013 19:50, schrieb daniel:
>
> 2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>>
>>
>>> Ah, can't help you there, I've never done anything fancy with pymacs.
>>> What happens when you call `pymacs-eval' on the return value from the
>>> python function
>>>
>>>
>> Doesn't work because it is not a string. It looks to be an elisp lambda
>> expression . But doesn't work with the elisp eval function.
>>
>> I will have to use strings instead of symbols and convert then on the
>> elisp
>> side.
>>
>>
> BTW Pymacs has it's own mailing list
>
> pymacs-devel@googlegroups.com
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-10 22:43 ` pymacs Kyle Machulis
@ 2013-06-16 20:38 ` daniel
0 siblings, 0 replies; 12+ messages in thread
From: daniel @ 2013-06-16 20:38 UTC (permalink / raw)
To: Kyle Machulis; +Cc: help-gnu-emacs@gnu.org
after installing pymacs 0.25 the problem seems to be solved
2013/6/10 Kyle Machulis <kyle@nonpolynomial.com>
> There's now also elpy, which allows does some of the heavy setup for you
> and allows you to choose which engine you want to use (pymacs/rope or
> jedi):
>
> http://blog.jorgenschaefer.de/2013/04/elpy-10-released.html
>
>
> On Mon, Jun 10, 2013 at 11:03 AM, Andreas Röhler <
> andreas.roehler@easy-emacs.de> wrote:
>
> > Am 10.06.2013 19:50, schrieb daniel:
> >
> > 2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
> >>
> >>
> >>> Ah, can't help you there, I've never done anything fancy with pymacs.
> >>> What happens when you call `pymacs-eval' on the return value from the
> >>> python function
> >>>
> >>>
> >> Doesn't work because it is not a string. It looks to be an elisp lambda
> >> expression . But doesn't work with the elisp eval function.
> >>
> >> I will have to use strings instead of symbols and convert then on the
> >> elisp
> >> side.
> >>
> >>
> > BTW Pymacs has it's own mailing list
> >
> > pymacs-devel@googlegroups.com
> >
> >
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: pymacs
2013-06-09 19:35 pymacs daniel
2013-06-09 22:19 ` pymacs andrea crotti
@ 2013-06-10 5:20 ` Andreas Röhler
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Röhler @ 2013-06-10 5:20 UTC (permalink / raw)
To: help-gnu-emacs
Am 09.06.2013 21:35, schrieb daniel:
> Anyone using pymacs here? A very powerful way to program for emacs.
>
> But there are few resources available about it. And the main site is
> offline now - http://pymacs.progiciels-bpi.ca/pymacs.html
>
Pymacs is here:
https://github.com/pinard/Pymacs
Several programs rely on Pymacs for auto-completion.
If you don't want install Pymacs via `make' --which is the recommended way--
https://github.com/pdee/pdee
comes with an inlined Pymacs. It provides company-based auto-completion.
At an experimental state however, for experienced users/developers only.
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-06-16 20:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-09 19:35 pymacs daniel
2013-06-09 22:19 ` pymacs andrea crotti
2013-06-09 22:37 ` pymacs daniel
2013-06-10 3:13 ` pymacs Eric Abrahamsen
2013-06-10 10:54 ` pymacs daniel
2013-06-10 13:12 ` pymacs daniel
2013-06-10 13:37 ` pymacs Eric Abrahamsen
2013-06-10 17:50 ` pymacs daniel
2013-06-10 18:03 ` pymacs Andreas Röhler
2013-06-10 22:43 ` pymacs Kyle Machulis
2013-06-16 20:38 ` pymacs daniel
2013-06-10 5:20 ` pymacs Andreas Röhler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).