unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51807: [PATCH] Fix customization group of python-forward-sexp-function
@ 2021-11-13  9:54 Kévin Le Gouguec
  2021-11-14  1:30 ` Lars Ingebrigtsen
  2021-11-14 16:55 ` Kévin Le Gouguec
  0 siblings, 2 replies; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-11-13  9:54 UTC (permalink / raw)
  To: 51807

[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]

Tags: patch

Version: 28.0.60

python-forward-sexp-function was introduced in 2021-07-31 "Add new user
option python-forward-sexp-function" (2dcb0f8f52); due to where it was
inserted in python.el, it is currently sorted in the python-flymake
customization group, which AFAICT is not what we want.

Here are the "design considerations" that went into this patch:

1. Should the defcustom be moved?

I'm leaning toward yes; as things stand it was lost in the middle of
unrelated flymake code.  IMO the places that make the most sense are
either (1) the ";;; Navigation" subsection or (2) closer to the
definition of python-mode, where the option is actually used.

Of course, it could also be left in its current position, and have an
explicit :group clause.  Which leads to…

2. Should the defcustom have an explicit :group clause?

I'm leaning toward no: (1) it's not needed if we move it to an earlier
subsection, (2) M-s o defcustom\|:group shows that a bunch of options
use implicit groups already, (3) AFAICT the repo history shows a clear
trend toward removing "redundant" :group clauses.


Thanks for your time.


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
 of 2021-10-30 built on amdahl30
Repository revision: c30f95078c0735447c0bf293f2e6f573bc7057a3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: openSUSE Tumbleweed

Configured using:
 'configure --with-cairo --with-gconf'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-customization-group-of-python-forward-sexp-funct.patch --]
[-- Type: text/patch, Size: 1813 bytes --]

From b36c7934ee42b97429d5651b74a5f7e35ed61440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@gmail.com>
Date: Sat, 13 Nov 2021 10:26:59 +0100
Subject: [PATCH] Fix customization group of python-forward-sexp-function

* lisp/progmodes/python.el (python-forward-sexp-function): Move from
the "Flymake integration" subsection to the "Navigation" subsection,
so that the option is sorted into the 'python' group rather than the
'python-flymake' group.
---
 lisp/progmodes/python.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f1c3e75bb7..16b5176be8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1427,6 +1427,13 @@ python-mark-defun
 \f
 ;;; Navigation
 
+(defcustom python-forward-sexp-function #'python-nav-forward-sexp
+  "Function to use when navigating between expressions."
+  :version "28.1"
+  :type '(choice (const :tag "Python blocks" python-nav-forward-sexp)
+                 (const :tag "CC-mode like" nil)
+                 function))
+
 (defvar python-nav-beginning-of-defun-regexp
   (python-rx line-start (* space) defun (+ space) (group symbol-name))
   "Regexp matching class or function definition.
@@ -5569,13 +5576,6 @@ python-flymake-msg-alist
   :type '(alist :key-type (regexp)
                 :value-type (symbol)))
 
-(defcustom python-forward-sexp-function #'python-nav-forward-sexp
-  "Function to use when navigating between expressions."
-  :version "28.1"
-  :type '(choice (const :tag "Python blocks" python-nav-forward-sexp)
-                 (const :tag "CC-mode like" nil)
-                 function))
-
 (defvar-local python--flymake-proc nil)
 
 (defun python--flymake-parse-output (source proc report-fn)
-- 
2.33.1


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

* bug#51807: [PATCH] Fix customization group of python-forward-sexp-function
  2021-11-13  9:54 bug#51807: [PATCH] Fix customization group of python-forward-sexp-function Kévin Le Gouguec
@ 2021-11-14  1:30 ` Lars Ingebrigtsen
  2021-11-14  8:38   ` Kévin Le Gouguec
  2021-11-14 16:55 ` Kévin Le Gouguec
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-14  1:30 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 51807

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> python-forward-sexp-function was introduced in 2021-07-31 "Add new user
> option python-forward-sexp-function" (2dcb0f8f52); due to where it was
> inserted in python.el, it is currently sorted in the python-flymake
> customization group, which AFAICT is not what we want.

Thanks; applied to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#51807: [PATCH] Fix customization group of python-forward-sexp-function
  2021-11-14  1:30 ` Lars Ingebrigtsen
@ 2021-11-14  8:38   ` Kévin Le Gouguec
  2021-11-14 17:52     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-11-14  8:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51807

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
>
>> python-forward-sexp-function was introduced in 2021-07-31 "Add new user
>> option python-forward-sexp-function" (2dcb0f8f52); due to where it was
>> inserted in python.el, it is currently sorted in the python-flymake
>> customization group, which AFAICT is not what we want.
>
> Thanks; applied to Emacs 29.

Thanks!

I know we don't want to shake up the release branch too much, but this
user option has just been added for Emacs 28; wouldn't it make sense to
fix the customization group there too?





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

* bug#51807: [PATCH] Fix customization group of python-forward-sexp-function
  2021-11-13  9:54 bug#51807: [PATCH] Fix customization group of python-forward-sexp-function Kévin Le Gouguec
  2021-11-14  1:30 ` Lars Ingebrigtsen
@ 2021-11-14 16:55 ` Kévin Le Gouguec
  1 sibling, 0 replies; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-11-14 16:55 UTC (permalink / raw)
  To: 51807

found 51807 28.0.60
thanks

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> Tags: patch
>
> Version: 28.0.60

(
    Not sure why Debbugs did not seem to recognize this Version
    pseudo-header.

    For some reason I went with submit-emacs-patch instead of
    report-emacs-bug ("because I had a patch", I guess); the former does
    not add the version to the subject, so I figured I would use a
    pseudo-header; and then submit-emacs-patch's lambda in
    message-send-hook inserted the Tags pseudo-header as well as the
    extra blank line, which maybe is the issue?

    🤷

    Hopefully fixed this blunder by bcc'ing control@debbugs.gnu.org with
    this message.
)





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

* bug#51807: [PATCH] Fix customization group of python-forward-sexp-function
  2021-11-14  8:38   ` Kévin Le Gouguec
@ 2021-11-14 17:52     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-14 17:52 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 51807

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> I know we don't want to shake up the release branch too much, but this
> user option has just been added for Emacs 28; wouldn't it make sense to
> fix the customization group there too?

Even though the potential for breakage is very small, I'd rather leave
it as is in emacs-28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-11-14 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13  9:54 bug#51807: [PATCH] Fix customization group of python-forward-sexp-function Kévin Le Gouguec
2021-11-14  1:30 ` Lars Ingebrigtsen
2021-11-14  8:38   ` Kévin Le Gouguec
2021-11-14 17:52     ` Lars Ingebrigtsen
2021-11-14 16:55 ` Kévin Le Gouguec

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