all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Support for new Python 3.5 async/await keywords
@ 2015-09-25  7:40 Lele Gaifax
  2015-09-25 12:05 ` tomas
  0 siblings, 1 reply; 3+ messages in thread
From: Lele Gaifax @ 2015-09-25  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I started using Python 3.5 in a new project, taking advantage of its new
async/await keywords. The python.el mode distributed with Emacs 24.5 of course
does not know how to handle the new syntax, and fails to properly indent the
following code:

  async def foo(bar):
  |

where the '|' represent the cursor position.

I guess there's no configuration I could tweak that would give a better
experience, but I'd like to have confirmation on this.

I also switched my local Emacs source tree to the master[*], just to see if
something happened to the forthcoming Emacs 25 python.el in this area, and it
does not seem there is any (good) news (a quick inspection of python-mode.el
sources gave the same impression).

Is there any planned path to add support for properly indent the "async"
variants of "def|with|for|whatever"?

Thanks in advance,
ciao, lele.

[*] FYI, just for fun, I also tried to build it, doing a bootstrap on a clean
    tree, but the compilation failed with an error when temacs tried to load
    "cl-preloaded.el":

    Loading /home/lele/wip/emacs/lisp/emacs-lisp/nadvice.el (source)...
    Warning: Unknown macro property gv-expander in gv-synthetic-place
    Warning: Unknown macro property gv-expander in gv-delay-error
    Loading /home/lele/wip/emacs/lisp/emacs-lisp/cl-preloaded.el (source)...
    Warning: Eager macro-expansion skipped due to cycle:
      … => (load "cl-macs.el") => (macroexpand-all (define-inline cl-typep …)) => (load "cl-macs.el")
    macroexp--expand-all: (void-function define-inline)
    ...
    Compiler-macro error for cl-typep: (void-function cl--compiler-macro-typep)
    Symbol’s function definition is void: define-inline
    Makefile:706: set di istruzioni per l'obiettivo "bootstrap-emacs" non riuscito
    make[2]: *** [bootstrap-emacs] Errore 255
    make[2]: uscita dalla directory "/home/lele/wip/emacs/src"
    Makefile:398: set di istruzioni per l'obiettivo "src" non riuscito
    make[1]: *** [src] Errore 2
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support for new Python 3.5 async/await keywords
  2015-09-25  7:40 Support for new Python 3.5 async/await keywords Lele Gaifax
@ 2015-09-25 12:05 ` tomas
  2015-09-25 15:12   ` Lele Gaifax
  0 siblings, 1 reply; 3+ messages in thread
From: tomas @ 2015-09-25 12:05 UTC (permalink / raw)
  To: Lele Gaifax; +Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Sep 25, 2015 at 09:40:46AM +0200, Lele Gaifax wrote:

[no idea about the Python thing]

> [*] FYI, just for fun, I also tried to build it, doing a bootstrap on a clean
>     tree, but the compilation failed with an error when temacs tried to load
>     "cl-preloaded.el":

Perhaps a previous "make clean" helps. It helped in my case a couple
of times already (my unconfirmed hunch is that the build is picking
up some compiled .elc it shouldn't).

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYFOHkACgkQBcgs9XrR2kZ05wCffDAp2RmQLSL4Flg/oAGeyNod
OZAAn2MjX7sCLWxHRRptdRG8RqeVbAQd
=obAo
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support for new Python 3.5 async/await keywords
  2015-09-25 12:05 ` tomas
@ 2015-09-25 15:12   ` Lele Gaifax
  0 siblings, 0 replies; 3+ messages in thread
From: Lele Gaifax @ 2015-09-25 15:12 UTC (permalink / raw)
  To: help-gnu-emacs

<tomas@tuxteam.de> writes:

> Perhaps a previous "make clean" helps. It helped in my case a couple
> of times already (my unconfirmed hunch is that the build is picking
> up some compiled .elc it shouldn't).

Thank you, "make maintainer-clean" did the trick (I did execute a "make
distclean", and wrongly assumed that targets *.elc too, but it does not
(strangely, it removes them *only* in the admin/unidata dir)... I
should have checked!).

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-25 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25  7:40 Support for new Python 3.5 async/await keywords Lele Gaifax
2015-09-25 12:05 ` tomas
2015-09-25 15:12   ` Lele Gaifax

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.