From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#62106: 29.0.60; Emacs 29 changing user option values (?) Date: Sat, 11 Mar 2023 17:09:42 +0000 Message-ID: References: <87jzzot17n.fsf@web.de> <87mt4jfdry.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5534"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "62106-done@debbugs.gnu.org" <62106-done@debbugs.gnu.org> To: Michael Albinus , Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 18:10:29 2023 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 1pb2jj-0001E2-TV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 18:10:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb2jM-0005rw-Iw; Sat, 11 Mar 2023 12:10:05 -0500 Original-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 1pb2jK-0005rj-N1 for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pb2jK-0000Q0-EP for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb2jK-0002VE-0J for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62106 X-GNU-PR-Package: emacs Original-Received: via spool by 62106-done@debbugs.gnu.org id=D62106.16785545889573 (code D ref 62106); Sat, 11 Mar 2023 17:10:01 +0000 Original-Received: (at 62106-done) by debbugs.gnu.org; 11 Mar 2023 17:09:48 +0000 Original-Received: from localhost ([127.0.0.1]:58557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb2j5-0002UJ-FX for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:09:47 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:48516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb2j3-0002UA-Pe for 62106-done@debbugs.gnu.org; Sat, 11 Mar 2023 12:09:46 -0500 Original-Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32B1XwZt010454; Sat, 11 Mar 2023 17:09:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=WWovImYmdoVJGcN+fpuj4dtmw72RgJVk+cQQ4a63AWw=; b=spyScRaQx/IZEgXlqnJQnnlMOp+YoBRR0Pm6MnKvwVf/ygHmdJpBkmmYYL4zde6Z0CtX fqKshbgiMhVJM1mkLdeNkh7xOTLaucRW7FgcZ8zuH27bNi78dBqvmP6S4UVL+Wj9Xwae HtFDn7KC/XT84W2WQKbWcg6MgQul5Xbvesp8w6QQk8fzOs4xqI81wIX5YIeivMcU0wu9 bm60PrFtl1MCGD1ZVS2LfQ25IVT3ohuxNVPdAM8qihM1wkJT05ra5iTwfAGcSSDMv6Fc UiUHYPP8uJ165ycoav7dDsp915gEMtvbACOf5MOG/4+M7iRoJJsiQ9HJ6pQ8l1HxMZgi uw== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3p8g2dgn1w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 Mar 2023 17:09:44 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32BEoWn5007491; Sat, 11 Mar 2023 17:09:44 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3p8g39r6m0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 Mar 2023 17:09:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4C8Ge3W/GuJgZ7nab8d+nZGbzFczvPqOn1K/nZSEN71X7MntDligBg2M0hR28nsZJuKsO+nKch6mJfnztyzJYFGJurGHmD89NiJRF3FsyDAFjGsfEqvfuFNKfrrRoMNvn40KTzhXMNCnJNGdAUYQYEwckjWu4qHD/v2mqZ9Qug4GdLCnTD0xu2SXtJrqcmBPJdGtXAbkl7iRgZEbhNuuYL63hj8DHehneTi8g1o69s5N5EMV/wLav3/E+YwKh1GnlC/27ZH1spldezNPpY1UZpc98aokwuYWDQi6liMpWsIgxg8BQR7ltC6vtjmuvfrRUq8eqZ/bHLXFCaVltXXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WWovImYmdoVJGcN+fpuj4dtmw72RgJVk+cQQ4a63AWw=; b=Ex3YRd8TXsNK88crpGfUaTXSToFVQON/VCvhRgI2dBIDcZGWszr538DuLA41D6tE9Q09JvSTjaxD5IWoaXKGe8MPAW4p1MVKNCu3IjiWoiZVW5f55znrlClxA4YERcJC+6APtGxn+SeCSZ89pifdogiLleTmcXqDaFhra+zYbpwf/uODel7aKIENpHBFiJdTDllpnSasBWu/hmBNXXnBlQwijrnNi43LecY0WgRpO+XEOg2Y3EQhvPquXImt7SsJXZAO/Ki5ZuK4b4t21wGWVeQWWTRdKVfc+za+1yj4LULuY3otNll9f6KrQsmGLvDEUlbIyzop124zq2/A2v4PEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WWovImYmdoVJGcN+fpuj4dtmw72RgJVk+cQQ4a63AWw=; b=iejyGlTi1yz9BseRP0SThHZgeryYOOfeDTYVDmmFssKtObMlvW9bZJXpmO4CzYUByH3TVeUd3GTE46uHW6dWMnB3WlECJFpCxVMqgZ2JRZSGM2Ilwk7ZyiMg27jODzYFu//lWHMFCBLWQKH/SQJ/G0YjFh6gb36nKD/p5FgIjTU= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM4PR10MB6136.namprd10.prod.outlook.com (2603:10b6:8:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Sat, 11 Mar 2023 17:09:42 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::32a3:707b:94c1:6e29]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::32a3:707b:94c1:6e29%8]) with mapi id 15.20.6178.022; Sat, 11 Mar 2023 17:09:42 +0000 Thread-Topic: [External] : Re: bug#62106: 29.0.60; Emacs 29 changing user option values (?) Thread-Index: AQHZVDdSVbwNHI8siE2qjgfhkXAvma71yL0w In-Reply-To: <87mt4jfdry.fsf@gmx.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DM4PR10MB6136:EE_ x-ms-office365-filtering-correlation-id: 506bd18a-973d-4a10-d338-08db225367d4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +I28VyJzikGMkcdOKWcC1n+tX/movWZGbkUvoqtt+fM8SAS64LGd7pfUk9Y9BzESK9tlC0yBSfvVNtdpcQlSV+1AO9wMJIdop1LphGo/Q5Sz6nnEjy8FD9E5Nthya8z9xZ9KYSXkB92J04wWw8JsKFth0XjNQPRZFegF0Ax8tNMi4hqJxIqp/9p2ir+qbCDbseL4LpF9m3to9Qp6FLbEimfwYq0XD+ax0wT9YQ/jqLgKVpNy+/ATh4O3EPJvJl3bFDYYR80WlQ1zLk6zpEjugNVSC6NUpmUpFKebCcd7YtfXzsucrbeZr2RrFAfQVhtnHX2C2bemXLQFmZU+QNkNkfrMHy+KFLgvXkIopviyJAqXugQHCc5qOs8zo4zh3LrCrjuI+kqCaoQK+7cL94JcnN665BdWQDaNysvzO8pRQiLjrntIX0wd6NQeWC/7SkiQ1hjnh0KTVu9CYZokJnRP2mL2rcIYgrUR3kPoNmbLxj9FIgwdXFFtEkeP6jIkYV4xxAjvbHHqPtJHRgbUPVa0BWdh/d11lacA6NgycwHlxb/X/HsTKKJPucSJg4Oa3SceQBfPhAAY2Ke0s16iECYYgOof8JKRjhwB0mM5O5OAJRLpmj5VZkRL8fpMaNwMPojaxU/P89uBDr+meFWYeOdmauiPPmS4N8jIIqj//z/T7aRnqZLa1oyagt21KqKMmGXV x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(39860400002)(366004)(396003)(136003)(376002)(346002)(451199018)(71200400001)(66446008)(66476007)(33656002)(4326008)(66946007)(41300700001)(66556008)(44832011)(8936002)(8676002)(86362001)(76116006)(38100700002)(52536014)(38070700005)(2906002)(122000001)(478600001)(26005)(316002)(110136005)(64756008)(55016003)(966005)(5660300002)(83380400001)(9686003)(7696005)(6506007)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: tpPmLEPv6yaBJ1ubvZDkmVw5CAmIidi4vw9yzFvhyK6pD63z7CKYV+qYy+qNu8ylEOlWELGGBhgxl68roVSE5WskuRjzYD5mU7twKxlel1ACBWbPtaTVdrDeOMk6Mr9bm/rPRBP2ytgPfdbqje02GhqT77HtQpQxOU7HXhIwKWTLocYtoeAwag8ep6qDVd/kTg/blkKBF8ZB/16wfXUxZ9bx0VHhJ4Z0HaAE7E+5OaBHWwhbIfWig6o8r19t+sVfxj4uhJnva6SHvBCKfLkImQXXRp9wWGBXp170yDnUB17nBa0hC7UtOtvkUJ292fD/tg+ANVFadIOCspOZHf7EyVU6Xto2gjlTqFmS9lfWestYTtB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2ghgWWtl31PL/Q4NktVcvULcF1xXXKKAA/XCt7QBr/P5V3vAQs46DBM9+tRotDI5cbpM0PMvLjj4gnAgrnFfA+tGJ66HVC8hr30U5My2Su8BsTSx9rtVWyEkotrKXRu2+vQCQ0UPjus1LUzjDeNObevEHQJhkyq9mk/cvyI6ceoK6qkbR9ge7J8nncs/45/8NMIpJQAAfH5dR+xQbPUHR/1oQFUhf/9AGNYalg7jXBIJhF0eqN/ rLaKHcvlmYoJxJg4lWeBXRqe7vh9fXBxGX04FQxy3EWa1CaGxuLw1gGL8t17g= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 506bd18a-973d-4a10-d338-08db225367d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2023 17:09:42.2063 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: csM0t9fCtPrA1+yY8BROa6JOrTM6GC7i3Vh+VUWks3U4KBrRiR0IHJ26jeGL27m7IDbk5la/jmNjqLc/6f15ZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6136 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-11_04,2023-03-10_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=941 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303110154 X-Proofpoint-GUID: ET5_Wc4xvX3SRx9UMNb2eJbgREekET-m X-Proofpoint-ORIG-GUID: ET5_Wc4xvX3SRx9UMNb2eJbgREekET-m 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257810 Archived-At: > > Dunno what the intention was - could we use `setopt' here? >=20 > `setopt' does not really help. Using `customize-save-variable' instead > of `customize-set-variable' does the trick. >=20 > Pushed to the emacs-29 branch, closing the bug. Pls reply if it doesn't > work as expected. Thanks for working on this. Without studying this at all, I'm guessing tha= t `customize-save-variable' is the wrong thing to do. Doesn't that mean th= at you're not only changing a user-option value, but you're also doing so p= ermanently (persistently)? If so, isn't that even _worse_? Wouldn't this be better - pseudo-saving, i.e., making Customize treat a cha= nged option as if it were unchanged, _without_ saving it? (put SYMBOL 'saved-value (list (custom-quote (default-value SYMBOL))))) _________ FWIW, I define these functions (commands), based on that. ;; Use this one anywhere. ;; (defun customize-consider-all-vars-unchanged () "Consider all customizable variables as saved, without saving them." (interactive) (when (interactive-p) (message "Please wait...")) (mapatoms (lambda (symbol) (when (and (or (custom-variable-p symbol) (user-variable-p symbol)) (default-boundp symbol) ; Value neither saved nor standard. (not (member (list (custom-quote (default-value symbol))) (list (get symbol 'saved-value) (get symbol 'standard-value))))) ;; Pretend the current value has been saved. (put symbol 'saved-value (list (custom-quote (default-value symbol))= ))) (put symbol 'customized-value nil) (when (get symbol 'customized-variable-comment) (put symbol 'saved-variable-comment (get symbol 'customized-variable-comment))) (put symbol 'customized-variable-comment nil))) (message "All variables are now considered unchanged (\"saved\"),\ but they were not saved.")) ________________ ;; Use this in the Customize UI. ;; (defun Custom-consider-unchanged (&rest _IGNORED) "Consider all preferences here as being unchanged now. This does not save the current values; it just considers them to be unchanged values. If no further changes are made to any of these preferences, then after doing this, `customize-customize' will not display any of these preferences, since they were considered unchanged." (interactive) (if (not (y-or-n-p "All of these values will be considered \ unchanged now, without being saved. Continue? ")) (message nil) (message "Please wait...") (let ((children custom-options)) (dolist (child children) (let ((symbol (widget-get-tag-or-value child))) (cond ((custom-facep symbol) (custom-consider-face-unchanged child)) ((custom-variable-p symbol) (custom-consider-variable-unchanged child)))))) (message "Current values here are now considered unchanged.\ They were not saved."))) ;; Inspired from `custom-variable-save'. ;; Due to a `cus-edit.el' bug (hidden widgets are not saved), we need to te= mporarily ;; show hidden widgets. ;; ;; Should we (put symbol 'saved-value...) only if not ;; (eq (widget-get widget :custom-state) 'standard), as in `custom-face-sav= e'? ;; (defun custom-consider-variable-unchanged (widget) "Consider this variable as being unchanged now. This does not save the current value; it just considers the value to be unchanged. If no further changes are made to this variable, then after doing this, `customize-customize' will not display this variable, since it was considered unchanged." (message "Please wait...") (let ((form (widget-get widget :custom-form)) (hidden-p (eq (widget-get widget :custom-state) 'hidden))) (when hidden-p ; Show it. (widget-put widget :custom-state 'unknown) (custom-redraw widget) (setq form (widget-get widget :custom-form))) (let ((child (car (widget-get widget :children))) (symbol (widget-value widget))) (cond ((memq form '(lisp mismatch)) (put symbol 'saved-value (list (widget-value child)))) (t (put symbol 'saved-value (list (custom-quote (widget-value child)))))) (put symbol 'customized-value nil) (put symbol 'customized-variable-comment nil)) (widget-put widget :custom-state 'saved) (when hidden-p ; Hide it again. (widget-put widget :documentation-shown nil) (widget-put widget :custom-state 'hidden) (custom-redraw widget))) (custom-redraw-magic widget) (message "Current variable value is now considered unchanged.\ It was not saved.")) _______ https://www.emacswiki.org/emacs/download/cus-edit%2b.el