From unknown Mon Aug 18 02:05:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77173 <77173@debbugs.gnu.org> To: bug#77173 <77173@debbugs.gnu.org> Subject: Status: [PATCH] Instruct users to use customize or setopt for user options that have :set-er Reply-To: bug#77173 <77173@debbugs.gnu.org> Date: Mon, 18 Aug 2025 09:05:24 +0000 retitle 77173 [PATCH] Instruct users to use customize or setopt for user op= tions that have :set-er reassign 77173 emacs submitter 77173 Visuwesh severity 77173 normal tag 77173 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 08:20:55 2025 Received: (at submit) by debbugs.gnu.org; 22 Mar 2025 12:20:55 +0000 Received: from localhost ([127.0.0.1]:41379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvxqN-0002Dn-G6 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 08:20:55 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42778) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvxqL-0002DV-59 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 08:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvxqE-0005Pu-9N for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2025 08:20:42 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tvxqB-0004kn-En for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2025 08:20:42 -0400 Received: by mail-pl1-x644.google.com with SMTP id d9443c01a7336-22423adf751so56725505ad.2 for ; Sat, 22 Mar 2025 05:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742646037; x=1743250837; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=08j85q4RCMh6rKzPe3+DK08TGJNUfAEPWfVSQ0/boOk=; b=EvQy6gQUf93LCXsM446SFRkQ69w4OdSwQ8x7oHduyGTIM43QWENXRPS0FfWwq8FUZh JR0hZEmXsbF0/5MuUsvRFiWZ6c43DRpC+8dBThpkIer06k7UEULxkZmNHYBtSvJt4gd1 6lN5iHlKYn1F21bn3rtH/1GhVyDqsc7qoAkGPsbcv99t1xFo5W0xWmawaNFtgFmV/LFa kO5PXo9zy8THJRpi3ljZCRu3CsQjBsO/nrVhdxO7Dru1cMffa9AF79vTxKMKHoj/PxSb 2FXvZoYKXj086XBdln/He7pC8HyehLwIdJGJzaFXitYzPbsj/BnNh6tXxuBeC9eOFtYw hvqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742646037; x=1743250837; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=08j85q4RCMh6rKzPe3+DK08TGJNUfAEPWfVSQ0/boOk=; b=mTdVE+FC5w2U05PyvP4LcrcGb4ny+nRXj71YgbTr96m3goNtiZMQNmzaoCC9G19GfB JIYAkAR51a8Cj1rOxWRD6UuYW75a4xLn7CHCSXNmDHdBYZMxDpY+xYgsFdhjqyqh2Uhw fWs+zEO/jJ/9vMIxg/QC0KEaXsbHo20wMMWVXz+RWSN0z1D3Ea3w85yDyxZnq5nv4iGK xIF4zCeDSFDuD54YVmmuGfBUmCx+TWP8L2k+kxmNAFE7P8CFID9nwxtcZ4va4rladd14 oj0+QOGOnpIBRz/cKKVRSCY57BdRFAxSNdHwrqVhlngbO00sAxJBpvuFRsVh683VhN9M cWeg== X-Gm-Message-State: AOJu0YxO3rS8cC9eLcRFqcPvSFvWY85aaazLdMcGC1TDyNSnrb+DLwCM g8wCnLXKavoaX4QwnOY+D+RYTriL3UB91wHGrlCP9MZJ6hRLsvLfUpRlrwYu X-Gm-Gg: ASbGncvueNAH/hfFtPKcmDEOJK1xXvAPeK9+UM2Y0l+b+26nr3wGBvI2teFnpMJqNeO CRVweArjAlkk3cFxSyXdeTEnUz+67emc7XGePd9UAgUv0GgD+MC1A7ne5sbJKeI3cZotMvRNDqa qSzEScNp4r/MauVwp9Ng8PxehkpB6SDJ0DZcbGTSHX4xgH+AXhawM/M0j/7RgO3zaRBDkCZS6r+ aiPvyu8Gi3aeo1qhwVGH9zEvrab4GiQIeZH5kSxX9rBhyEzJ8bGe3sODnv622OQ3ySeFLb8/sOl eUt9mb9ZD7/Vdh7pFU0TbEEe1yv2VFbUkFo5yhEcHNP5NqmJ3F2R X-Google-Smtp-Source: AGHT+IHcaCI7gmFF875YbE2VUan59CuUe3EwVnwwgY5W21JVjwfdENCK7ZwEe9CLuGfXxeinXm2N5w== X-Received: by 2002:a17:903:40cb:b0:224:1c41:a4cd with SMTP id d9443c01a7336-22780c50d38mr99340835ad.3.1742646036778; Sat, 22 Mar 2025 05:20:36 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-3030f806fa3sm3950203a91.42.2025.03.22.05.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 05:20:35 -0700 (PDT) From: Visuwesh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Instruct users to use customize or setopt for user options that have :set-er X-Debbugs-Cc: Date: Sat, 22 Mar 2025 17:50:31 +0530 Message-ID: <87v7s1cl4g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x644.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Seeing the discussion in bug#77157, and another recent discussion about the same, WDYT about the attached that automatically adds the "use setopt" filler text? This is what doc-view-epub-font-size says with the patch applied: doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.el= =E2=80=99. Its value is nil Font size in points for EPUB layout. This variable was introduced, or its default value was changed, in version 29.1 of Emacs. You can customize this variable. Setting this variable directly will not usually take effect; use either customize or =E2=80=98setopt=E2=80=99, or call =E2=80=98do= c-view-custom-set-epub-font-size=E2=80=99. The word 'customize' in the last line is buttonised the same way as the one in "You can customize this variable'. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=custom-set.diff diff --git a/lisp/help-fns.el b/lisp/help-fns.el index bbc7700c49e..32a68d37b61 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1620,12 +1620,18 @@ help-fns--run-describe-functions (defun help-fns--customize-variable (variable &optional text) ;; Make a link to customize if this variable can be customized. (when (custom-variable-p variable) - (let ((customize-label "customize")) + (let ((customize-label "customize") + (custom-set (get variable 'custom-set))) (princ (concat " You can " customize-label (or text " this variable."))) + (when custom-set + (princ (concat "\n Setting this variable directly will not usually take effect;" + "\n use either customize or " (substitute-quotes "`setopt'") + ", or call " + (substitute-quotes (concat "`" (symbol-name custom-set) "'."))))) (with-current-buffer standard-output (save-excursion - (re-search-backward (concat "\\(" customize-label "\\)")) - (help-xref-button 1 'help-customize-variable variable))) + (while (re-search-backward (concat "\\(" customize-label "\\)") nil t) + (help-xref-button 1 'help-customize-variable variable)))) (terpri)))) (add-hook 'help-fns-describe-variable-functions --=-=-= Content-Type: text/plain In GNU Emacs 31.0.50 (build 39, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw scroll bars) of 2025-03-11 built on astatine Repository revision: 7ba62284137ba162df16f55c75bda4d56da7dfe7 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101015 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d --without-gconf --without-libsystemd --with-cairoCFLAGS=-g3' --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 08:27:38 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 12:27:38 +0000 Received: from localhost ([127.0.0.1]:41401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvxwv-0002Vj-Ia for submit@debbugs.gnu.org; Sat, 22 Mar 2025 08:27:37 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:58642) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvxwo-0002VM-EB for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 08:27:30 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5e8be1c6ff8so5078675a12.1 for <77173@debbugs.gnu.org>; Sat, 22 Mar 2025 05:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742646444; x=1743251244; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=zPrq/4RahKAMkIy54cOpOMKazXS+QM0qYmAX0yKWHi4=; b=f8g4TdQVyfut/m39OVvAu1LPJuN9dPF3rUbZbioHIH+vhTPtvqJWIsqdv1/27331zz QpLvaY0lhLBolrdAv/bx68pMMccIja4rghQ27XzbvBtKUqx/0MyOJNsSRyL3SUkTY4qA PEPqf4wPM5/zBkrqD5Cchht9IppvHgUa75jEXqtl1D7WAtTWJGhS4O+fNfpttHMna/P1 KwOmZt5S+qZhVajV20d/lym/w3C7+BOeVyUuJo/mLeRMA/myxuDI9HAxMY7eAW7YVMlX q9Kds2Oi8qvieU060alpMnMFol3ErTDh9OpkUNgAtw4jnQnGMUd+xvJgvmximFeCKwm+ etlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742646444; x=1743251244; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=zPrq/4RahKAMkIy54cOpOMKazXS+QM0qYmAX0yKWHi4=; b=OEcg6U6ezovK4FgNjio1+ITTm9NqlIUw8AHTqPjyVIaZCl3wt/1cNybDaVTKzwFxXd HOVfjQz4rTE0cyKcfdFOMxJWOsK9ODk9cWoN8t0m/JnrlGBBUAKHRPPqAl0JFHOqxddZ pm14orpBLm43WPqWaOOS1SY3oT7uTLb3D/oA6vQVKfeGMaRy84wF+DespassDLYdDyIk L3Se7m9TdORReIzVHcyHhP8lAGEilSJaPzYUm+0fy+HP+YuECKO/T1OfJh8QfirqHNaM /Bjh5vtTYKVzrBizVLHkZu7H976QA2Oon4EwXzPFR+CVBhS5hEQ2J48QRVKTzD5YTfKQ 6lPQ== X-Forwarded-Encrypted: i=1; AJvYcCVB0TKsPgP+qAGIZH7mN66PkOpYXVy/BYVYqgtdSfg77vL1K8SnD8//t2VweJoIMQLPKq0Srw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywt58UKnnnW2IpPM6V1TQhJ7NZA9/jr11P/S81QGa6F1if2lwsP gzU7082G/AEjKTedcxlWoYKN5rvlXE7NaTzBQENvctQmbSTYUnfDl+g46bfm8ooOgoHhISB4JPt vy4A9TPFNa1kgJiqpdauS5WSVnaI= X-Gm-Gg: ASbGncvUv7JN6pFYl5XDiMZpX9myBSVfnrLi/eyxoLM8ANs+5v6tp53HKlccxe9H3Z4 NbiqoghfeRHhMOuylw6Z4mOYRNY0/8YivjrPfYn+mLb5SGNpnMFDUq9M2XOwpLJ/s9YZTwEvMgY kMDKNehhD1oMFviwD5ZgrOnLLjITL+dleP4DMPAQ== X-Google-Smtp-Source: AGHT+IG0XZz7/JLUpw61koRtrxc/thFAlxA91lin7bA/yJ2Yt6xCOFVjXtZLiWzp/CCkxF5S6170Q8aPMMJXhUoOFjA= X-Received: by 2002:a05:6402:42cb:b0:5e7:dcab:1df8 with SMTP id 4fb4d7f45d1cf-5ebcd4fa834mr4442758a12.26.1742646443404; Sat, 22 Mar 2025 05:27:23 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Mar 2025 07:27:23 -0500 From: Stefan Kangas In-Reply-To: <87v7s1cl4g.fsf@gmail.com> References: <87v7s1cl4g.fsf@gmail.com> MIME-Version: 1.0 Date: Sat, 22 Mar 2025 07:27:23 -0500 X-Gm-Features: AQ5f1JqtM9nXSyeq8y4AFxSrtdzXFy6bwl-FkWka-wJCWwUGiIdVH29Hd3Z0kHI Message-ID: Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er To: Visuwesh , 77173@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77173 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Visuwesh writes: > Tags: patch > > Seeing the discussion in bug#77157, and another recent discussion about > the same, WDYT about the attached that automatically adds the "use > setopt" filler text? > > This is what doc-view-epub-font-size says with the patch applied: > > doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.el= =E2=80=99. > > Its value is nil > > Font size in points for EPUB layout. > > This variable was introduced, or its default value was changed, in > version 29.1 of Emacs. > You can customize this variable. > Setting this variable directly will not usually take effect; > use either customize or =E2=80=98setopt=E2=80=99, or call =E2=80=98= doc-view-custom-set-epub-font-size=E2=80=99. Thanks. Are you on a current master? It currently says this: doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.el= =E2=80=99. Its value is nil Font size in points for EPUB layout. This variable was introduced, or its default value was changed, in version 29.1 of Emacs. You can customize this variable. Setting this variable with =E2=80=98setq=E2=80=99 has no effect; use ei= ther =E2=80=98setopt=E2=80=99 or M-x customize-option to change its value. The formatting could use improving though. > The word 'customize' in the last line is buttonised the same way as the > one in "You can customize this variable'. Neat. > diff --git a/lisp/help-fns.el b/lisp/help-fns.el > index bbc7700c49e..32a68d37b61 100644 > --- a/lisp/help-fns.el > +++ b/lisp/help-fns.el > @@ -1620,12 +1620,18 @@ help-fns--run-describe-functions > (defun help-fns--customize-variable (variable &optional text) > ;; Make a link to customize if this variable can be customized. > (when (custom-variable-p variable) > - (let ((customize-label "customize")) > + (let ((customize-label "customize") > + (custom-set (get variable 'custom-set))) > (princ (concat " You can " customize-label (or text " this variab= le."))) > + (when custom-set > + (princ (concat "\n Setting this variable directly will not usua= lly take effect;" > + "\n use either customize or " (substitute-quotes= "`setopt'") > + ", or call " > + (substitute-quotes (concat "`" (symbol-name custo= m-set) "'."))))) > (with-current-buffer standard-output > (save-excursion > - (re-search-backward (concat "\\(" customize-label "\\)")) > - (help-xref-button 1 'help-customize-variable variable))) > + (while (re-search-backward (concat "\\(" customize-label "\\)"= ) nil t) > + (help-xref-button 1 'help-customize-variable variable)))) > (terpri)))) > > (add-hook 'help-fns-describe-variable-functions > From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 08:59:38 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 12:59:38 +0000 Received: from localhost ([127.0.0.1]:41477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvyRt-0003xZ-TN for submit@debbugs.gnu.org; Sat, 22 Mar 2025 08:59:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50766) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvyRq-0003xD-48 for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 08:59:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvyRk-0007lV-Jp; Sat, 22 Mar 2025 08:59:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tge+fJ92NDKEuXxjx5pjPGgmAx53QezFrL6OeLEAu/U=; b=C2PWnrfNJypciwCUpo9v 43F4zalALOywlUxcwimFSFfXSBftDEvVO3L9Y/ulPdl5HoaPK2sRf4CEJSjccx0pU/5bBD+P2gFmB SfFgsFuPzZVA8OjNj5FQlr+cxzdh9ZwicF9mAJiBEc+/bnQoYb1m5yOePVRyxH1cudczj2RtmNEEI /c6FXol8lpXLqQaV2+OD8s4wkfCenK9qLtHsM/jxbmXmTHdo6cu018fiQqa/qE65JHM7nZRqOKI1/ A30GwmCr7E2wUiXwu5pPI5m/IT83eL8ZZEqyyggU1iaEMy2qF9dT/WSyrZ5b9tnQHqiyHRE4logyq ApFd24bS3ENtxQ==; Date: Sat, 22 Mar 2025 14:59:23 +0200 Message-Id: <86r02pi5lg.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87v7s1cl4g.fsf@gmail.com> (message from Visuwesh on Sat, 22 Mar 2025 17:50:31 +0530) Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er References: <87v7s1cl4g.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Date: Sat, 22 Mar 2025 17:50:31 +0530 > > Seeing the discussion in bug#77157, and another recent discussion about > the same, WDYT about the attached that automatically adds the "use > setopt" filler text? > > This is what doc-view-epub-font-size says with the patch applied: > > doc-view-epub-font-size is a variable defined in ‘doc-view.el’. > > Its value is nil > > Font size in points for EPUB layout. > > This variable was introduced, or its default value was changed, in > version 29.1 of Emacs. > You can customize this variable. > Setting this variable directly will not usually take effect; > use either customize or ‘setopt’, or call ‘doc-view-custom-set-epub-font-size’. > > The word 'customize' in the last line is buttonised the same way as the > one in "You can customize this variable'. What does this do when the setter is an anonymous function? We have quite a lot of these when a defcustom needs a :set function. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 09:47:15 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 13:47:15 +0000 Received: from localhost ([127.0.0.1]:41616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvzBy-0006Yz-Rv for submit@debbugs.gnu.org; Sat, 22 Mar 2025 09:47:15 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:55343) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvzBv-0006Yj-R9 for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 09:47:12 -0400 Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-2240b4de12bso32660765ad.2 for <77173@debbugs.gnu.org>; Sat, 22 Mar 2025 06:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742651226; x=1743256026; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k5Tp9Xij7B0wwDUA/Zb6+se5BogpNaXCTZuszBweV8E=; b=eMdJ86xmKuuCk4QS7HSOAFLOb3mQNUGEHTxn5QaLiUIxM7ppIxgVTs8fwR+LvgK44C OzwAEKU5LB3PmRK/mVVNNu6o66mfJpIN8LY1v5WjvLhbncPzAa2lfq+90UULQYvHTg3a YF+LLXLwHKsgPUjnEEz2C4IyqMRQR89Um7bxFeDEgx88/58xSW5EaVOyKUB6sd+oW05C WBe01+T0mvC06zClqKjmyu6/rF013xPENKyaMnEoTzODSc3HW51wNPQW5hDYHrzJTprU hO0Invfo1X5UxQFzU8ihZ9eAhSLeETQ4RYJo5guTW6sd0CUF2/JTPokEwawoKSSA2wrb KH3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742651226; x=1743256026; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=k5Tp9Xij7B0wwDUA/Zb6+se5BogpNaXCTZuszBweV8E=; b=ggho8uCXKdSIQGB70HggckRZwgTKCL9HDm16avEY1DZ1E00WW6awXol3lZFQKnI8Qi JV5GIVRSvtA8anUHkoCgcAqzZGFRGt4ano0HO82MXrRLVnKoceVtvXMF4Ss56T2OMcJA frmW6SlFrQHMqTDrIVN7vCpgEbnW077QsMrquUu/ihFjcIZIphei1V9Cc5Ca8xDLwff0 y8joNe33B4Dd5U2e/4TYJ+oqh3RdL8eAjlpSbaahU5gNmsmxYmRuzugmSmRQ8ogx/2GQ c+rLoyGJrtn11LHi9A/a3USuSbZtDGpuiaNklwC7/fRGPAvQPtz7o+irtcMiyK7zLfZL YC6w== X-Gm-Message-State: AOJu0YxwUaob/gHiyYyLR1jsAdBYS+VtIBRZ0UZBps9CQcjRr+Bd5OMU Z1P8hJHxHN5R2cbJNLhIHEDuRp44H+AX1iEdRDRlYsHmP3MvqHqz X-Gm-Gg: ASbGnctJ21+p8dI+5kHkBYcYNMsPlcQ7LHLA52mtzdCbmpQa4WA/9icLbu1P3Zxp45L CyTUZKs1P8FjIraAbhsdKs8jHSPgqMgDsrLcJaMvVxUUEP+z6d2oyEg0jEj33wockAyzU02Kzwy fxc1o979PMiXeImXLwGECjCs7KF35IiCgtrJVhNml6/gTkg7pg7NMMHhfrziI0iccATOT8Sp7Ty LMuesUTZoqOobvsAGzyQFTtatWDXJSDH68Q4vwwh05Lga0bN8J2u9hIzYlojniSeVwmpEJgRwvs qoa0acx5hgztBiDCq/6gHoSQiKgloCSHhge8lfD+yA== X-Google-Smtp-Source: AGHT+IGr7vR14DL7ekX6uuiGgUD8rLmqMqiudlw02GWnWmENTelulNiys3AL0/I6ERWuISVwEDHbFA== X-Received: by 2002:a05:6a00:8017:b0:736:4536:26cc with SMTP id d2e1a72fcca58-73905a2786bmr12263406b3a.23.1742651225439; Sat, 22 Mar 2025 06:47:05 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-73905fd5752sm4004017b3a.42.2025.03.22.06.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 06:47:05 -0700 (PDT) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er In-Reply-To: <86r02pi5lg.fsf@gnu.org> References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> Date: Sat, 22 Mar 2025 19:17:01 +0530 Message-ID: <87r02pch4a.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [Saturday March 22, 2025] Eli Zaretskii wrote: >> From: Visuwesh >> Date: Sat, 22 Mar 2025 17:50:31 +0530 >>=20 >> Seeing the discussion in bug#77157, and another recent discussion about >> the same, WDYT about the attached that automatically adds the "use >> setopt" filler text? >>=20 >> This is what doc-view-epub-font-size says with the patch applied: >>=20 >> doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.e= l=E2=80=99. >>=20 >> Its value is nil >>=20 >> Font size in points for EPUB layout. >>=20 >> This variable was introduced, or its default value was changed, in >> version 29.1 of Emacs. >> You can customize this variable. >> Setting this variable directly will not usually take effect; >> use either customize or =E2=80=98setopt=E2=80=99, or call =E2=80= =98doc-view-custom-set-epub-font-size=E2=80=99. >>=20 >> The word 'customize' in the last line is buttonised the same way as the >> one in "You can customize this variable'. > > What does this do when the setter is an anonymous function? We have > quite a lot of these when a defcustom needs a :set function. It currently does nothing, thanks for catching this. I forgot to consider lambdas when I wrote the patch earlier. I think we can leave out the "or call XXX" part if :set is a function? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 09:51:30 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 13:51:30 +0000 Received: from localhost ([127.0.0.1]:41635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvzG5-0006mE-Jk for submit@debbugs.gnu.org; Sat, 22 Mar 2025 09:51:29 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:49424) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvzG2-0006lx-0L for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 09:51:26 -0400 Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-227a8cdd241so727345ad.3 for <77173@debbugs.gnu.org>; Sat, 22 Mar 2025 06:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742651480; x=1743256280; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AasPRM+Fjms7K3I+dbsxsl5QGz+onu0at15TRZKpM98=; b=Ho4r5MK32a8xqXwQRAteHYyKe75AjavyqpN8T0AO2yVJ3C6PGE6UtswGGQQWLTceiw j51v0+t+5hNub5dW560J4iSclUt91S87W1a3Grkmnh/DSnU5R7ezsUpSD3KXEf1dCNuU LrSgGe22wYBkYfGlG+teWtBUemJ5d0T9HhqPdhvb9ONiL66KytyV5nbBwR7qEikDXH4V TgdKF2myQ6aAYE+0Ksc15loybws0Ht/NmFvouY6yU0UNe1TyCYOQjLAeyRprArRMvi1w VVEqHI5o0cWAlnr4+yNeCdcW02noJ/Zg5a4r2fJxjGccyY+E2h+n7cnN1F4UtwrDf/eP 5reA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742651480; x=1743256280; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AasPRM+Fjms7K3I+dbsxsl5QGz+onu0at15TRZKpM98=; b=GszArTQ/xSa5zOSDrsgNP/2FYVRYVsaNQIPHK1+Zb5COOIHE4XXq9QyAjkY6bNgV4V vAn59m3Mj8Ulx7o4CbiFa88ePE5xM2p2DSCI3v1YsuTve7VfwlpfZm7+YZBmnN/sW9GK YKUkAqNCI/th3IwG+tJvBB+CBVOqVB3N2g5gvz8wCkFfVZ4MGMg1Ph7QdwIrtZa3ZSd/ TgjaQKtUPDU4mfYp03w4UaVzSxQWVCjJafmEv3oGM2EKiBZXDapi0YxKdXlx89IixBcM 9kemLP0gkTsqNlUj8frdaKwJrAUl/avwsd64d0nw1firzurf2Gkiz3CukmUZN3nibKRv vguQ== X-Gm-Message-State: AOJu0YyLzVUSho+fxdLQlftCOq9IZcLOr5dOFi9/gVUjz/hvpw4EAOwx HOs3nfS4Z8H4L90yyeesKJf6aCdZcw70PdFthJSncE1LUGFKXshUk1Eeg+68 X-Gm-Gg: ASbGncvJZeF+xdy/JCgU2N2pteNMOYnDNWhUIX6UsU5CMnu3R0FMOjVANSnER1yeiQB 9X2BjdOX/oCDIhP3XMhQYXAdiYV7QwlPUPLb6EgmWpfyXagETxxSkjw9PK0SDvFqWpKsmzFddCF mIZizgtDCWpTkwAC8ccOIjCV+zKMCKCei1rqZwFH0XGyrQxjR3qJYe/kp00iXoOomd7PXnat6ba rRY7J/AMK70iiuyqmfUTDUVAdySAJ4fBfwU3MdYGZpK4DYia4RtMowpKAA5Fv/PD0yEzXvJ9j73 u1caaFeNY3Efse43jMEFNKPKRTe7CTNgTdtH5OwvoJw6OQ== X-Google-Smtp-Source: AGHT+IGdLAB/o62xgwiSgMVYaPYsYIZcbEeR/3+A8doOWrkoiat7Pw2l9dOCLQwiM2G1XHt9rUjZzg== X-Received: by 2002:a17:902:e844:b0:220:e896:54e1 with SMTP id d9443c01a7336-22780d8c42emr113839965ad.26.1742651479770; Sat, 22 Mar 2025 06:51:19 -0700 (PDT) Received: from localhost ([1.7.159.71]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-227811f44d7sm35723215ad.225.2025.03.22.06.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 06:51:19 -0700 (PDT) From: Visuwesh To: Stefan Kangas Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er In-Reply-To: References: <87v7s1cl4g.fsf@gmail.com> Date: Sat, 22 Mar 2025 19:21:16 +0530 Message-ID: <87msddcgx7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [Saturday March 22, 2025] Stefan Kangas wrote: > Visuwesh writes: > >> Tags: patch >> >> Seeing the discussion in bug#77157, and another recent discussion about >> the same, WDYT about the attached that automatically adds the "use >> setopt" fil [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [1.7.159.71 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [Saturday March 22, 2025] Stefan Kangas wrote: > Visuwesh writes: > >> Tags: patch >> >> Seeing the discussion in bug#77157, and another recent discussion about >> the same, WDYT about the attached that automatically adds the "use >> setopt" fil [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [1.7.159.71 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager [Saturday March 22, 2025] Stefan Kangas wrote: > Visuwesh writes: > >> Tags: patch >> >> Seeing the discussion in bug#77157, and another recent discussion about >> the same, WDYT about the attached that automatically adds the "use >> setopt" filler text? >> >> This is what doc-view-epub-font-size says with the patch applied: >> >> doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.e= l=E2=80=99. >> >> Its value is nil >> >> Font size in points for EPUB layout. >> >> This variable was introduced, or its default value was changed, in >> version 29.1 of Emacs. >> You can customize this variable. >> Setting this variable directly will not usually take effect; >> use either customize or =E2=80=98setopt=E2=80=99, or call =E2=80= =98doc-view-custom-set-epub-font-size=E2=80=99. > > Thanks. Are you on a current master? I haven't pulled for a few weeks now. Should I rework the patch on top of yours? I think adding this bit to help-fns--customize-variable would be cleaner, but happy to change the function you wrote instead. > It currently says this: > > doc-view-epub-font-size is a variable defined in =E2=80=98doc-view.el= =E2=80=99. > > Its value is nil > > Font size in points for EPUB layout. > > This variable was introduced, or its default value was changed, in > version 29.1 of Emacs. > You can customize this variable. > Setting this variable with =E2=80=98setq=E2=80=99 has no effect; use = either =E2=80=98setopt=E2=80=99 > or M-x customize-option to change its value. > > The formatting could use improving though. Yea, I am out of ideas for the wording too. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 10:12:42 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 14:12:42 +0000 Received: from localhost ([127.0.0.1]:44465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvzab-00032c-SO for submit@debbugs.gnu.org; Sat, 22 Mar 2025 10:12:42 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:57785) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvzaZ-00032O-On for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 10:12:40 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e5e22e6ed2so4398616a12.3 for <77173@debbugs.gnu.org>; Sat, 22 Mar 2025 07:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742652753; x=1743257553; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=ykVYOuD96DimAlAYNKFQuTCAWRGRRqKEgs3+dAI8QZw=; b=jZT66o+7rUFyTcHz7orLBmPm34jFeewu7zUPNvkfjRYZrpNDIKanysLDHP8JdhY/LW Ju4aXQ7Js/zE4qhMMmtktF5XtwMaDDsINMxF6m0Tt5tp/pWrocAAcotDL653e341SepK skCtMMWx2F83XIxFbm8DXD83E+Jo3QW5mvWnFZix1qV8ouE1PKpsznXqWxa2a8aZD/4T 68HnUhGpw0Nc1/ny5DncFGDyqbN23G9ZQpdSG8GW+9oGrb6K6F0/XIOL4XrpNSS7xT/0 kcLqRFsfRl7rqaQFe4WICWgFwG3DbyGe9vGIOFO0Kcji8GhzVEpq8j6MK+IlQf6ggcv9 IzbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742652753; x=1743257553; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ykVYOuD96DimAlAYNKFQuTCAWRGRRqKEgs3+dAI8QZw=; b=n0HgnM87S9bnPpBqBx6DVYzz/5egg47bYAhHDsTNEiM7q4atL3CDfTqXH4P7aT2sqT ZZgTW7MplBR0DuoTmroG/1JNY4Xt9bOXSydkMkig7LNg9LxCuwZSkPW0yS5wYC9KSOlC mT87GcNtfIMfQuCIqxPX57CYh1Y5WjDLm4pwzAX+7S/cyi19AoPDbllRz9ZzTwc4iQ7r 4Wf1KRR1e3a6eUT+R1WWARL19O/ztb/t+4NbS13zyBz+7FtPowm5krKJv3+TpHUCNC5P CdgxtRnaMbkIRaF/QbVZeHKZLGu2Ru1pgWQNYZ8gq/5p18YnINFQu7ytoA5HWH32BjUX +KsA== X-Gm-Message-State: AOJu0Yxrl+WWNDK+5g4gFIe0ueoNfi+7JWuRgOJOfgYy63haLXbj/jHN DqK0UJae7N2FMbKDocrt4Ml4WVoP7qDYWYe+UWx14bGc+q02Fdpe+zH1B442PVoX9VWZQxKxOMh R8A2J1DkuVFzYjl0JlOH9XocvFWg= X-Gm-Gg: ASbGncsGrH1UPksC0DeumFvtl/KSHu+JzAANCzi9F5oEoUXAlqVvBukPWo90hzVInP+ zQe/V3P/mkUO62qEUfg1JH1lC5sPrg+DPffQfUr9bFzMUz4jYSp6Do+93X4IlIdYWsbr9M+pub5 pTlPm0Ys7khOPX4zJyMws/czC6sQS2ThAgCQDZyQ== X-Google-Smtp-Source: AGHT+IHFjL1WOgkI4JNcHDyI53jv0E+BCN7vwlyX3XMgZos6JqCr9wPtBHLBmW/f/3lfp1dKjn6I7wqZ3LfIAIGFDns= X-Received: by 2002:a05:6402:27d1:b0:5e5:bfab:51f with SMTP id 4fb4d7f45d1cf-5ebcd247cf0mr6172510a12.0.1742652753115; Sat, 22 Mar 2025 07:12:33 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Mar 2025 14:12:32 +0000 From: Stefan Kangas In-Reply-To: <87msddcgx7.fsf@gmail.com> References: <87v7s1cl4g.fsf@gmail.com> <87msddcgx7.fsf@gmail.com> MIME-Version: 1.0 Date: Sat, 22 Mar 2025 14:12:32 +0000 X-Gm-Features: AQ5f1JpPWyhbjR7hFxh8XWV0l3zbc_U5T2gviaMW9cLeCUyNwtviIXyUPs6cJO8 Message-ID: Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er To: Visuwesh Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Visuwesh writes: > [Saturday March 22, 2025] Stefan Kangas wrote: > >> Thanks. Are you on a current master? > > I haven't pulled for a few weeks now. Should I rework the patch on top > of yours? I think adding this bit to help-fns--customize-variable would > be cleaner, but happy to change the function you wrote instead. Yes, please. Feel free to suggest something cleaner. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 11:29:10 2025 Received: (at 77173) by debbugs.gnu.org; 22 Mar 2025 15:29:10 +0000 Received: from localhost ([127.0.0.1]:44691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw0mb-0001Lq-TU for submit@debbugs.gnu.org; Sat, 22 Mar 2025 11:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41374) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tw0ma-0001Ld-CH for 77173@debbugs.gnu.org; Sat, 22 Mar 2025 11:29:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tw0mV-0006zb-0O; Sat, 22 Mar 2025 11:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OJTrvbNwHxdzOoR58FyBchxD1GNGvQ3S9Ixp6V88CVs=; b=WyWD5vsjYWErtERumt9m dOTuADVZxeT9W+FECA5xmsamZg0NQxT/UxJVCeGhxKQ/ieeEamwaf7vcpnMHB2Rcl35X3bM0k6iYg v2Fu3sUmrxjwaqIiWoJZMOSMuQdX7j76RFOllQUidF0AZ799pCSb2KzaJ3s0iOYn+gZafzxd8Oayk jjfh3e8JajtLk97ima8ygAIbS5oVrvz9VDkJVsF06vTbjbtG12aX+ZLcIECuhp+Wfnym/HH912ngR 1P2BMUBFHB8tbmlBBcb1+UpHndWcdUYTCAAG8ap8dC1UwJzVBZKtgbl3OpfAss1r7drGVgV5O9/Ul 9o8kgdlQxpxG+Q==; Date: Sat, 22 Mar 2025 17:29:00 +0200 Message-Id: <86msddhyo3.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87r02pch4a.fsf@gmail.com> (message from Visuwesh on Sat, 22 Mar 2025 19:17:01 +0530) Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> <87r02pch4a.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: 77173@debbugs.gnu.org > Date: Sat, 22 Mar 2025 19:17:01 +0530 > > [Saturday March 22, 2025] Eli Zaretskii wrote: > > >> From: Visuwesh > >> Date: Sat, 22 Mar 2025 17:50:31 +0530 > >> > >> Seeing the discussion in bug#77157, and another recent discussion about > >> the same, WDYT about the attached that automatically adds the "use > >> setopt" filler text? > >> > >> This is what doc-view-epub-font-size says with the patch applied: > >> > >> doc-view-epub-font-size is a variable defined in ‘doc-view.el’. > >> > >> Its value is nil > >> > >> Font size in points for EPUB layout. > >> > >> This variable was introduced, or its default value was changed, in > >> version 29.1 of Emacs. > >> You can customize this variable. > >> Setting this variable directly will not usually take effect; > >> use either customize or ‘setopt’, or call ‘doc-view-custom-set-epub-font-size’. > >> > >> The word 'customize' in the last line is buttonised the same way as the > >> one in "You can customize this variable'. > > > > What does this do when the setter is an anonymous function? We have > > quite a lot of these when a defcustom needs a :set function. > > It currently does nothing, thanks for catching this. I forgot to > consider lambdas when I wrote the patch earlier. I think we can leave > out the "or call XXX" part if :set is a function? I don't see any reasonable alternative. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 23 01:59:07 2025 Received: (at 77173) by debbugs.gnu.org; 23 Mar 2025 05:59:07 +0000 Received: from localhost ([127.0.0.1]:47022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1twEMV-0006Qb-7E for submit@debbugs.gnu.org; Sun, 23 Mar 2025 01:59:07 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:48311) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1twEMT-0006PC-3P for 77173@debbugs.gnu.org; Sun, 23 Mar 2025 01:59:06 -0400 Received: by mail-pj1-x1043.google.com with SMTP id 98e67ed59e1d1-2ff80290e44so6954224a91.0 for <77173@debbugs.gnu.org>; Sat, 22 Mar 2025 22:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742709539; x=1743314339; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KK/u5YeIaLm9fbHAsEAptE25Bu5A3iqH7AS10USHzak=; b=PAAapQsniDqWVnCVMApmb0nYckToMIcOIrGidz/2oxPkT5qwDf8Kfr+xVCi5guJgbz z4OX+MrnAhb9NSYKz4/rRveQjMgh8hsote7siINDcakAgF7Tt9ljbpGKO24A8dCcqVTp 7s8lWrOHVNw8hzoHY8I8vvxB9M0cor0CCMTJ9jeNQjbQ3Aez/mRjySd+N+nMeApPAK91 1JXZCQF4uCMAJeLaj9J2Kqu2Sz9iuZqXr25Lm2iN+WwubTApQoxPQ0N0Sc5hxL3ERglO E6v1DgmfUt1W2vcid1NjU2YP3RWUu0h3bid314Pg5IFEc0e5FYd3L9iPuUryLKMt8uTa ENvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742709539; x=1743314339; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KK/u5YeIaLm9fbHAsEAptE25Bu5A3iqH7AS10USHzak=; b=GrtMstoZdpzPKyy7gepSbCoJbYRGOY0ohJjPqA7/4sMGTg+k8M3YGb/vcQGrsrRee2 2d1lgvpaD0YAfSvEIVOnkSCGdtK7mZ+z8LowDf/sLf8udQOPqVtkjwRSEzFKTa1hi/Uh PBoT8ONFC6C8xd8Ya40BESoNHBsako9khpfQaEAIVU8yX7ohqJyI6oFY7XihTG3OuIKn ob1nPS/7NUMdSN/xyqy2eN/xC4euKK2opUvZiX+SFQ/Pqk0nqJBaNwMI4jv0FCNjahKt tB9q4bY7BvhGVJe4lrC/DPFuUuWBY+0DJSqeddB6ecv24PCHWDRbjqtH15fdlS7dZBko +RyQ== X-Gm-Message-State: AOJu0YwitdciVHZJvfTJWx3K4+T6SYtegpZGVpwLSMm2IlFMS+Kk4ec2 /hgH1aKfNcg3/Rfcf/gpEsqmzwpWa9F9bayV7lG30vGNcJy3hG1z X-Gm-Gg: ASbGncs0sKtpwEiUOy53dsB3v3TJJJoM58OJUq3QjxYQAFQsaIpgI6Z+DoGeE4d4bgy XcX2K5R+9gV4mNbSiqflb3qY+5rApooHN8NrmU+zYHooixTb++Omn9sYgc9HUU5GbwCyIUR9leR Z4w8d+D8Hz+yk44uid7bJA7eS5sNOIfCcYjhUKg5hOr58+YzmvELAAJxbsvVvK1VM+uu9NKAlB3 Gexd2LCkV8DiRiZmUnRS/7HdUTQ7gQF8CNpNhnNbecj061o21oeLm1mku/kFz+GUaiT8ip6AdCd XL49agsLOVk0SCcwn9cbCb0b3lt2Ev34iMrHxt/GdlejQQ== X-Google-Smtp-Source: AGHT+IHr3BCK8XSIEMoovFdwKkbKcflekXIuNeIbsv9BqJ9rb2qa9kHBbrkQ2yxIpGC/Oa65L2U4Ow== X-Received: by 2002:a17:90b:3e8a:b0:2ee:5958:828 with SMTP id 98e67ed59e1d1-3030fe99310mr14832814a91.9.1742709538622; Sat, 22 Mar 2025 22:58:58 -0700 (PDT) Received: from localhost ([1.7.159.71]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-3030f3efbabsm5291242a91.0.2025.03.22.22.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 22:58:57 -0700 (PDT) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er In-Reply-To: <86msddhyo3.fsf@gnu.org> References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> <87r02pch4a.fsf@gmail.com> <86msddhyo3.fsf@gnu.org> Date: Sun, 23 Mar 2025 11:28:53 +0530 Message-ID: <87iko0cmoy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [Saturday March 22, 2025] Eli Zaretskii wrote: >> > What does this do when the setter is an anonymous function? We have >> > quite a lot of these when a defcustom needs a :set function. >> >> It currently does nothing, thanks for catching this. I [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [1.7.159.71 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [Saturday March 22, 2025] Eli Zaretskii wrote: >> > What does this do when the setter is an anonymous function? We have >> > quite a lot of these when a defcustom needs a :set function. >> >> It currently does nothing, thanks for catching this. I [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [1.7.159.71 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain [Saturday March 22, 2025] Eli Zaretskii wrote: >> > What does this do when the setter is an anonymous function? We have >> > quite a lot of these when a defcustom needs a :set function. >> >> It currently does nothing, thanks for catching this. I forgot to >> consider lambdas when I wrote the patch earlier. I think we can leave >> out the "or call XXX" part if :set is a function? > > I don't see any reasonable alternative. Thanks, now done in the attached. I hope symbolp is good enough to test if :set is a named function. [Saturday March 22, 2025] Stefan Kangas wrote: > Visuwesh writes: > >> [Saturday March 22, 2025] Stefan Kangas wrote: >> >>> Thanks. Are you on a current master? >> >> I haven't pulled for a few weeks now. Should I rework the patch on top >> of yours? I think adding this bit to help-fns--customize-variable would >> be cleaner, but happy to change the function you wrote instead. > > Yes, please. Feel free to suggest something cleaner. > > Thanks. Thanks, I moved the setopt suggestion to help-fns--customize-variable to keep related code in the same function. In this process, I removed the top TODO comment, should we keep it around? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-formatting-of-setopt-suggestion-in-Help-buff.patch >From e619d54ee3cf5b49a5ac4348e85e2ab40085bb38 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Sun, 23 Mar 2025 11:28:16 +0530 Subject: [PATCH] Improve formatting of 'setopt' suggestion in *Help* buffer * lisp/help-fns.el (help--recommend-setopt): Remove function, and... (help-fns--customize-variable): ... move the relevant code here to keep related code in the same place. Change the formatting to also include the :set function if it is set to a named function. (Bug#77173) --- lisp/help-fns.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index fabdda521dc..fe37a954409 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -868,20 +868,6 @@ help-fns--disabled (function-get function 'disabled)) (insert " This function is disabled.\n"))) -(add-hook 'help-fns-describe-variable-functions #'help--recommend-setopt) -(defun help--recommend-setopt (symbol) - ;; TODO: This would be better if added to the docstring itself, but I - ;; ran into `byte-compile-dynamic-docstring' and gave up. - (when (and (get symbol 'custom-set) - ;; Don't override manually written documentation. - (not (string-match (rx word-start "setopt" word-end) - (documentation-property - symbol 'variable-documentation)))) - ;; FIXME: `princ` removes text properties added by s-c-k. - (princ (substitute-command-keys "\ -Setting this variable with `setq' has no effect; use either `setopt' -or \\[customize-option] to change its value.\n\n")))) - (defun help-fns--first-release-regexp (symbol) (let* ((name (symbol-name symbol)) (quoted (regexp-quote name))) @@ -1593,12 +1579,26 @@ help-fns--run-describe-functions (defun help-fns--customize-variable (variable &optional text) ;; Make a link to customize if this variable can be customized. (when (custom-variable-p variable) - (let ((customize-label "customize")) + (let ((customize-label "customize") + (custom-set (get variable 'custom-set))) (princ (concat " You can " customize-label (or text " this variable."))) + (when (and custom-set + ;; Don't override manually written documentation. + (not (string-match (rx word-start "setopt" word-end) + (documentation-property + variable 'variable-documentation)))) + (princ (substitute-quotes + (concat "\n Setting this variable directly with `setq' will not usually take effect;" + "\n use either customize or `setopt'" + ;; Skip text if `custom-set' property is an + ;; anonymous function. + (when (symbolp custom-set) + (concat ", or call `" (symbol-name custom-set) "'")) + ".")))) (with-current-buffer standard-output (save-excursion - (re-search-backward (concat "\\(" customize-label "\\)")) - (help-xref-button 1 'help-customize-variable variable))) + (while (re-search-backward (concat "\\(" customize-label "\\)") nil t) + (help-xref-button 1 'help-customize-variable variable)))) (terpri)))) (add-hook 'help-fns-describe-variable-functions -- 2.47.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 25 16:01:20 2025 Received: (at 77173) by debbugs.gnu.org; 25 Mar 2025 20:01:20 +0000 Received: from localhost ([127.0.0.1]:40121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1txASd-0007Mw-WA for submit@debbugs.gnu.org; Tue, 25 Mar 2025 16:01:20 -0400 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]:60735) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1txASa-0007MV-M5 for 77173@debbugs.gnu.org; Tue, 25 Mar 2025 16:01:17 -0400 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id DDA021383A07; Tue, 25 Mar 2025 16:01:10 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 25 Mar 2025 16:01:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1742932870; x=1743019270; bh=HUQOiDxfEVp8k2CUtcBds31K+vnP0hzO lk/N9cGYT40=; b=TTWbU8q7Op58IWWwLoCM8ldgRxCCoZJ0//S8ctiCQeNxedQc 7QWQdUcYeZ5v475NZIyNcQYh8+Yo+Dy8/i8TJHnBxlIkg5QreJhaUwfKg5IVFgEU aH1Cv4ZT6jGQ+SOmU+he1lr+vnZ8ysjjxSs6bE1xLy+gD+JfF6esn/hCW1PWAO4R 64YlsPJv5dwd5RCAWXOkQqh3m0M+6VFbC9IZJMIqKihcH0n1LiCwyb1dT+vwhlV9 YPJ/wC2KaczrO8BJG04fmZW/nDcYH5zOIG+UabRJ2jaXdN2dOa+fRiGCcAzPYpaZ Rr7gHdk2g8g5iGbTqVAe+Kj9rBj0T28MXWlHZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1742932870; x= 1743019270; bh=HUQOiDxfEVp8k2CUtcBds31K+vnP0hzOlk/N9cGYT40=; b=N g+/L/onjon9XT8vhxZiBVNjbx0n2lOt4lRrB+oP2rK7UQPZIb/Ih1H0dbrTYg3KL 9nyX0MbMDs7NRuPUuI4pYwv7V8IaVgjHdPr5OZ1uXCrqi1DPF1CA2+QkYyBbvW91 MdEWNU5rxEMbjfBDtpH0ZInntZoFUpB/bhHfIpEgfLcqba1utva5dglokW0qS+68 EITxw6dAOoG/wQ1LZglMgga+mH0/vCCG6FjPve8NK50YBXmeD0hT8Y0UNRfJVBIw WlQXzVmzTwLHyf45/dEMuG7woonmRkQceRDMQXbEShoUuPSEmV1R0MwetedMiStz t3Ksyak6DJjy0hplD6Awg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieefheehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtgfesthhqredttddt jeenucfhrhhomheptfhuugholhhfucetuggrmhhkohhvihgtuceorhhuugholhhfsegrug grmhhkohhvihgtrdhorhhgqeenucggtffrrghtthgvrhhnpeeiueetheffudfghfeggeev heevvddtkefflefhueeludfgtefgffeltdfhudejgeenucffohhmrghinheprggurghmkh hovhhitgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehruhguohhlfhesrggurghmkhhovhhitgdrohhrghdpnhgspghrtghpthhtoh epfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjeejudejfeesuggvsggsuhhg shdrghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtth hopehvihhsuhifvghshhhmsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i88214938:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Mar 2025 16:01:09 -0400 (EDT) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: Visuwesh , Eli Zaretskii Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er In-Reply-To: <87iko0cmoy.fsf@gmail.com> References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> <87r02pch4a.fsf@gmail.com> <86msddhyo3.fsf@gnu.org> <87iko0cmoy.fsf@gmail.com> Date: Tue, 25 Mar 2025 21:01:08 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77173 Cc: 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Visuwesh writes: > + ... will not usually take effect; ... Perhaps "may not take effect"? Rudy --=20 "'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.'" --- Lewis Carroll, Through the Looking Glass, 1871/1872 Rudolf Adamkovi=C4=8D [he/him] http://adamkovic.org From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 25 23:53:48 2025 Received: (at 77173) by debbugs.gnu.org; 26 Mar 2025 03:53:48 +0000 Received: from localhost ([127.0.0.1]:40777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1txHps-0005I3-7H for submit@debbugs.gnu.org; Tue, 25 Mar 2025 23:53:48 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:55412) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1txHpp-0005Hf-Ou for 77173@debbugs.gnu.org; Tue, 25 Mar 2025 23:53:46 -0400 Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-2240b4de12bso64657035ad.2 for <77173@debbugs.gnu.org>; Tue, 25 Mar 2025 20:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742961219; x=1743566019; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2E6xoJ/q32IK19Tjs8OubzA/aT5EBSYyk9VrefzVwYU=; b=CUxOuBbbZCTnALMvdeeJFJmtXPVv5g7A+eL5g12XsfT94ND6QyNj0a7AKQFpP6hF1N LVamRerKMwBvqJHcubHvhGyO5AtdoRXi2wUEogsrNt3kQ/cG+ZYcCkjHAJFoKNRdd0/a b6GgFDlS2aiI6DG5XQiL6VXTYRMdSbHtSzBp1Z0lweICxqnmWGBhLfjx0ByEw1QOuHj+ OuRJ3na3rLS0QMh77g83JF/gkq6voBa/fXyZ8RGFY4BVSwF97BhBD7qhP8R0uTzV+AGo oAkV0ZWJme0sC0YyAcqjVrkHbhMw/KqRREVDh8oekp77bXgrSyKExX2cGGkuJZKmvsMP zYew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742961219; x=1743566019; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2E6xoJ/q32IK19Tjs8OubzA/aT5EBSYyk9VrefzVwYU=; b=b1iZhJKXEyuioNBNeCF3g2A0PZKfjvD2Izmy5Z2xEeZkT3mlwxezlFvssli0HhRk4l TGChtBDRg4f8GaGz5/rWiscFaYc0oVFVkXXpN08jtAW2WJuxqe3QfBAwmURLknlcXv8L CHEUxoSV//PmpRAnVPVbhhcD9guFdkSxsY1Qp1mgm8Gu/MgxclsSrUqYgM2mjdl6a/sR BictnNbeZ5YNTVtOe/YWfDOTbZBzMHVDKqpUXNtXcGq6WpIrTa2Iixa8iz6bBnnI9Lya Hh4KGcce78ykAGML1oV+FUuYtFvV0PIJ64yiSpHuar+t9ZUUmpa01ReVPN1DwTox+XCW r1UA== X-Forwarded-Encrypted: i=1; AJvYcCW/uL3NZqr0oP8cLh1wI9ME14ZYYCjj+3y3urrlE6HqJ/IZV4Daun7ACZPZEFZRqHVvCM7Blg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyQo/dNANu6Ce/4AJIbYedXT+TAh66MEwi0dDOL+G0Dyq6ppP7z uQf+dxbGo+s4pE3Qe9o03qNvFsomsR16YDYe8CZ0YQJ4L3D3H2O6 X-Gm-Gg: ASbGnctLV6KA7SW3QGLSTyRUDt8myXG9fDstZegkH7VYJuldDGVCgQPHykKU0rOhciY l+CpI18DohQWnNPaPSav4XTVH4l5SPpuH0O1S/mRVYbXiB3Dql9VBB2CoojTsnumJL9WTuxsw9M tVzT+o1T+clggZEXSg51tC/k8U1PsrtyqEbnqnu0/g4+zEQwwaOB/ixUx3q5ECbICEBcrbiPLJq vm4iAJtPI8hvDlkDyD1XNnqeH3H8IvfrxfTQP6L0md7JN6S8nO+O048ZInAXLcvqgYyRx0SSxN+ D+8HHJUZP0eHXeDERDZrBylbqF2RTU8bTny4YrBonA== X-Google-Smtp-Source: AGHT+IHUsxxQD5eAcJ6rmm7aPwRuKgpI4IukWwAuYo6KlEP3UU48WF1QpFModv6Oiz2TH801dqeuiQ== X-Received: by 2002:a17:902:d487:b0:224:de2:7fd6 with SMTP id d9443c01a7336-22780da8656mr296987645ad.25.1742961219365; Tue, 25 Mar 2025 20:53:39 -0700 (PDT) Received: from localhost ([115.240.90.130]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-22780f3a2b5sm99140715ad.50.2025.03.25.20.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 20:53:38 -0700 (PDT) From: Visuwesh To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er In-Reply-To: References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> <87r02pch4a.fsf@gmail.com> <86msddhyo3.fsf@gnu.org> <87iko0cmoy.fsf@gmail.com> Date: Wed, 26 Mar 2025 09:23:34 +0530 Message-ID: <87ecykcurl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77173 Cc: Eli Zaretskii , 77173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [Tuesday March 25, 2025] Rudolf Adamkovi=C4=8D wrote: > Visuwesh writes: > >> + ... will not usually take effect; ... > > Perhaps "may not take effect"? Thanks, that's better. Updated patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-formatting-of-setopt-suggestion-in-Help-buff.patch >From 8cc5ff7a3f216b09dd5fff8b1344f97ea5464a31 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Sun, 23 Mar 2025 11:28:16 +0530 Subject: [PATCH] Improve formatting of 'setopt' suggestion in *Help* buffer * lisp/help-fns.el (help--recommend-setopt): Remove function, and... (help-fns--customize-variable): ... move the relevant code here to keep related code in the same place. Change the formatting to also include the :set function if it is set to a named function. (Bug#77173) --- lisp/help-fns.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index fabdda521dc..46316665dda 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -868,20 +868,6 @@ help-fns--disabled (function-get function 'disabled)) (insert " This function is disabled.\n"))) -(add-hook 'help-fns-describe-variable-functions #'help--recommend-setopt) -(defun help--recommend-setopt (symbol) - ;; TODO: This would be better if added to the docstring itself, but I - ;; ran into `byte-compile-dynamic-docstring' and gave up. - (when (and (get symbol 'custom-set) - ;; Don't override manually written documentation. - (not (string-match (rx word-start "setopt" word-end) - (documentation-property - symbol 'variable-documentation)))) - ;; FIXME: `princ` removes text properties added by s-c-k. - (princ (substitute-command-keys "\ -Setting this variable with `setq' has no effect; use either `setopt' -or \\[customize-option] to change its value.\n\n")))) - (defun help-fns--first-release-regexp (symbol) (let* ((name (symbol-name symbol)) (quoted (regexp-quote name))) @@ -1593,12 +1579,26 @@ help-fns--run-describe-functions (defun help-fns--customize-variable (variable &optional text) ;; Make a link to customize if this variable can be customized. (when (custom-variable-p variable) - (let ((customize-label "customize")) + (let ((customize-label "customize") + (custom-set (get variable 'custom-set))) (princ (concat " You can " customize-label (or text " this variable."))) + (when (and custom-set + ;; Don't override manually written documentation. + (not (string-match (rx word-start "setopt" word-end) + (documentation-property + variable 'variable-documentation)))) + (princ (substitute-quotes + (concat "\n Setting this variable directly with `setq' may not take effect;" + "\n use either customize or `setopt'" + ;; Skip text if `custom-set' property is an + ;; anonymous function. + (when (symbolp custom-set) + (concat ", or call `" (symbol-name custom-set) "'")) + ".")))) (with-current-buffer standard-output (save-excursion - (re-search-backward (concat "\\(" customize-label "\\)")) - (help-xref-button 1 'help-customize-variable variable))) + (while (re-search-backward (concat "\\(" customize-label "\\)") nil t) + (help-xref-button 1 'help-customize-variable variable)))) (terpri)))) (add-hook 'help-fns-describe-variable-functions -- 2.47.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 05 04:47:23 2025 Received: (at 77173-done) by debbugs.gnu.org; 5 Apr 2025 08:47:23 +0000 Received: from localhost ([127.0.0.1]:41462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0zBT-0005WQ-2y for submit@debbugs.gnu.org; Sat, 05 Apr 2025 04:47:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35988) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0zBQ-0005WB-Kb for 77173-done@debbugs.gnu.org; Sat, 05 Apr 2025 04:47:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0zBK-0004ud-7P; Sat, 05 Apr 2025 04:47:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/J6Psxm5RhyyuOi+6Ra3w467HsT09NKlVqtDVludok8=; b=CdeC74+IEdiPKEAkXsWa rdOqiOJGtTujyFZXjR7t0al7RFJI5Sz8zDdqc/cgkgfD5nXEMsMyGv3mgiP6tSh6JR4uaXZ+GOa6V gQGe9P2ud6rBCRR6XHqdxg8xgjZRAe3dF4tav9fUv9ndaSt5Zjo17FBeFXIOOTT+2Tp1pMgdi3p+5 mRZSPvozL79Ja/8qKdihSGznT8php6/9+HRPf06M3WSUx9/9fKY9tumjyPCMLpTDm5Mmn/I7xWgru OIeL/xFRXoJCwanq+Hqz5Dng/OC+ZIvGVRgB+RzvK/8+t3xYuzdFd9F25ygdLPPMoRq3p17KCVCBe 8LiqrbAdfGyrZw==; Date: Sat, 05 Apr 2025 11:47:07 +0300 Message-Id: <864iz3xaes.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87ecykcurl.fsf@gmail.com> (message from Visuwesh on Wed, 26 Mar 2025 09:23:34 +0530) Subject: Re: bug#77173: [PATCH] Instruct users to use customize or setopt for user options that have :set-er References: <87v7s1cl4g.fsf@gmail.com> <86r02pi5lg.fsf@gnu.org> <87r02pch4a.fsf@gmail.com> <86msddhyo3.fsf@gnu.org> <87iko0cmoy.fsf@gmail.com> <87ecykcurl.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77173-done Cc: rudolf@adamkovic.org, 77173-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: Eli Zaretskii , 77173@debbugs.gnu.org > Date: Wed, 26 Mar 2025 09:23:34 +0530 > > [Tuesday March 25, 2025] Rudolf Adamkovič wrote: > > > Visuwesh writes: > > > >> + ... will not usually take effect; ... > > > > Perhaps "may not take effect"? > > Thanks, that's better. Updated patch attached. Thanks, installed on the master branch, and closing the bug. From unknown Mon Aug 18 02:05:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 May 2025 11:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator