unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Python mode for emacs?
@ 2020-05-23  1:16 Mark H. David
  2020-05-23 13:58 ` Kévin Le Gouguec
  0 siblings, 1 reply; 3+ messages in thread
From: Mark H. David @ 2020-05-23  1:16 UTC (permalink / raw)
  To: Emacs Development

Sorry to bother this list, as I don't know if it's the right one. If not, can someone point me to the right list or website? I have a few questions and feature requests about Python mode for Emacs.  Like I want to know if there's a way to go forward/backword over parenthesized expressions. In Python mode currently, if you do C-M-B at the end of the following, it goes back to the beginning of the 'if', rather than to the matching (.

if verbose:
    print("blah blah")

Thanks,
-Mark



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

* Re: Python mode for emacs?
  2020-05-23  1:16 Python mode for emacs? Mark H. David
@ 2020-05-23 13:58 ` Kévin Le Gouguec
  2020-05-24  0:45   ` Mark H. David
  0 siblings, 1 reply; 3+ messages in thread
From: Kévin Le Gouguec @ 2020-05-23 13:58 UTC (permalink / raw)
  To: Mark H. David; +Cc: Emacs Development

"Mark H. David" <mhd@yv.org> writes:

>                                                              Like I
> want to know if there's a way to go forward/backword over
> parenthesized expressions. In Python mode currently, if you do C-M-B
> at the end of the following, it goes back to the beginning of the
> 'if', rather than to the matching (.
>
> if verbose:
>     print("blah blah")

I think you'll find this recent bug report of interest:

https://debbugs.gnu.org/41361

tl;dr the current way to change the default behaviour is to add this to
your init file:

(add-hook 'python-mode-hook
          (lambda () (setq-local forward-sexp-function nil)))

(See also "Movement"-related comments in python.el.)

The discussion in the bug report is still ongoing, so don't hesitate to
weigh in, e.g. if you think that the default behaviour should be
changed.



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

* Re: Python mode for emacs?
  2020-05-23 13:58 ` Kévin Le Gouguec
@ 2020-05-24  0:45   ` Mark H. David
  0 siblings, 0 replies; 3+ messages in thread
From: Mark H. David @ 2020-05-24  0:45 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Emacs Development

Wow, apropos... Thanks!

----- Original message -----
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: "Mark H. David" <mhd@yv.org>
Cc: Emacs Development <emacs-devel@gnu.org>
Subject: Re: Python mode for emacs?
Date: Saturday, May 23, 2020 6:58 AM

"Mark H. David" <mhd@yv.org> writes:

>                                                              Like I
> want to know if there's a way to go forward/backword over
> parenthesized expressions. In Python mode currently, if you do C-M-B
> at the end of the following, it goes back to the beginning of the
> 'if', rather than to the matching (.
>
> if verbose:
>     print("blah blah")

I think you'll find this recent bug report of interest:

https://debbugs.gnu.org/41361

tl;dr the current way to change the default behaviour is to add this to
your init file:

(add-hook 'python-mode-hook
          (lambda () (setq-local forward-sexp-function nil)))

(See also "Movement"-related comments in python.el.)

The discussion in the bug report is still ongoing, so don't hesitate to
weigh in, e.g. if you think that the default behaviour should be
changed.



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

end of thread, other threads:[~2020-05-24  0:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23  1:16 Python mode for emacs? Mark H. David
2020-05-23 13:58 ` Kévin Le Gouguec
2020-05-24  0:45   ` Mark H. David

Code repositories for project(s) associated with this public inbox

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

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).