From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#41361: Fwd: Re: python.el: improve sexp-based navigation or make it optional? Date: Sun, 17 May 2020 16:12:45 +0200 Message-ID: <7e0e2951-a346-4d4f-421e-7a59ab1dd4ae@online.de> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------090EFF54015ED832D80EB3BA" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="1419"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 To: 41361@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 17 16:06:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaJve-0000G8-7z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 May 2020 16:06:10 +0200 Original-Received: from localhost ([::1]:41734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaJvd-0007T9-Ar for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 May 2020 10:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaJvW-0007T0-Ha for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 10:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaJvW-0005JK-8V for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 10:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaJvW-0002lV-4A for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 10:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 May 2020 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41361 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158972431610569 (code B ref -1); Sun, 17 May 2020 14:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 May 2020 14:05:16 +0000 Original-Received: from localhost ([127.0.0.1]:44210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaJum-0002kP-CU for submit@debbugs.gnu.org; Sun, 17 May 2020 10:05:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaJuk-0002kI-Ve for submit@debbugs.gnu.org; Sun, 17 May 2020 10:05:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaJuk-0007GU-Nv for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 10:05:14 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:46861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaJuj-00057K-H0 for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 10:05:14 -0400 Original-Received: from [192.168.178.39] ([94.134.177.135]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MtO06-1inRqz1ls6-00up4m for ; Sun, 17 May 2020 16:05:11 +0200 X-Forwarded-Message-Id: In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:kbBizrlX2rrsEIPt3mTR9rwObStUlh/8XA90WNbr2DjYx2gf7vF ZUR/ahSTgGW7ZDrGd62/fff9aOUj8n/MVH5g8+vTs1TBGc5h9x5Ajq9lBlu14PwdFFIn3rR 83T+R/xaGH4PhsS7KbsGSFO8lVFS41AaR1G0UiBe9gPOj7riGhZgsVGjhHWLgnhyUUTa1fM lj0HIb9HKmh15sNwZsvjA== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ho6O2hjeK7I=:Sr9TfGdSTA6mZCRYwiA5T0 b2RkUs60jNkhAQy0q614ierZgNg2CUfcNq2jLffRHXvCYds1vLY6cRhDpDA4j9abymKxMKYoE 0wi3TnmWzXgK+0NmzUJHZBgtUaWPKZHXe3Y/otKe9K5qvpE5qfpHkRguRZCikXnGjwCz5X1Ow g8aafgcXd4872QPsAXt1PbuXt1GOFmpWQj0Br8yFHqiLkl5AUD7gKifGI/b+2xPWJUstJ1Sm+ P5CaQPSypAToREiCrugaZjNGsK+6yh2GRmXJJqw2nMYfbWtvgc8Ns7YqJfNbKqjHTYoJ8c9q0 e5XAQ2e5sx4T/2uzJj1jJVsVLekAWyQzxk5+AoKdsPREqXOd7fWBTRFDOaot/c+XMRnTv5N0r CQ+bVS1gBpB3R2poPIQg6wUPqGeJGmvE1Lij1x+esPx/fNnmyGYbUlEy9TwnAcx3Ur8evjECA 8M2ym58KjThWsEW0tFB/01+xn5aiCE6pnD0sUqGnS0/jVxKPmZDYqiQUYr6dyylmhkY9uzUR8 EpntNNCgokzmqsAVKrnxmPZ0jjXzctjE/NcSMHVbXeWqycQEa7LGa0iodsZ5LRAbK0Noa/jOt SwTu9LqA/m3h6bNvYyQ4xq7hACTFBr+XsH4TuHNOLn3jgGbhwCfM0vMxe0dJvA9S7uwBjUcpC ep7TMVBN79imtUIZuUgM3Sk2dKOd4e9rfuSeWSCKj8ALrDugE/L9/HHFV814/ypadhRYc25OX MghcyIU4lQPiV1WC6g5hIca+zv5u2mUSaqoAoeB2jGXI+tHSDtYXkIufrdaINCzNbPe8W63z Received-SPF: pass client-ip=212.227.126.130; envelope-from=andreas.roehler@online.de; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/17 10:05:11 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180464 Archived-At: This is a multi-part message in MIME format. --------------090EFF54015ED832D80EB3BA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, maybe make forward-sexp-function customizable. Currently that var is set inside the derived mode:   (set (make-local-variable 'forward-sexp-function)        'python-nav-forward-sexp) and comment section in python.el head contains: If you prefer `cc-mode'-like ;; `forward-sexp' movement, setting `forward-sexp-function' to nil is ;; enough, You can do that using the `python-mode-hook': ;; (add-hook 'python-mode-hook ;;           (lambda () (setq forward-sexp-function nil))) Thread is here: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02196.html Thanks, Andreas -------- Forwarded Message -------- Subject: Re: python.el: improve sexp-based navigation or make it optional? Date: Sat, 16 May 2020 21:11:51 +0200 From: Andreas Röhler To: emacs-devel@gnu.org CC: immerrr again , Stefan Kangas On 16.05.20 15:16, immerrr again wrote: > In absence of such mode, I wonder if it would be a welcome addition to > introduce a configuration parameter that at least disables the smart > navigation, making sexp skip one symbol or explicitly > parenthesized/bracketed expression at a time. Maybe that does it?: (from python.el) If you prefer `cc-mode'-like ;; `forward-sexp' movement, setting `forward-sexp-function' to nil is ;; enough, You can do that using the `python-mode-hook': ;; (add-hook 'python-mode-hook ;;           (lambda () (setq forward-sexp-function nil))) --------------090EFF54015ED832D80EB3BA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,

maybe make forward-sexp-function customizable. Currently that var is set inside the derived mode:

  (set (make-local-variable 'forward-sexp-function)
       'python-nav-forward-sexp)

and comment section in python.el head contains:


If you prefer `cc-mode'-like
;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
;; enough, You can do that using the `python-mode-hook':

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

Thread is here:


Thanks,
Andreas

-------- Forwarded Message --------
Subject: Re: python.el: improve sexp-based navigation or make it optional?
Date: Sat, 16 May 2020 21:11:51 +0200
From: Andreas Röhler <andreas.roehler@online.de>
To: emacs-devel@gnu.org
CC: immerrr again <immerrr@gmail.com>, Stefan Kangas <stefankangas@gmail.com>



On 16.05.20 15:16, immerrr again wrote:
In absence of such mode, I wonder if it would be a welcome addition to
introduce a configuration parameter that at least disables the smart
navigation, making sexp skip one symbol or explicitly
parenthesized/bracketed expression at a time.

Maybe that does it?: (from python.el)

If you prefer `cc-mode'-like
;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
;; enough, You can do that using the `python-mode-hook':

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


--------------090EFF54015ED832D80EB3BA--