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.devel Subject: RE: [External] : Turning on savehist-mode by default Date: Sun, 19 Nov 2023 16:42:35 +0000 Message-ID: References: <87wmufm7r7.fsf@catern.com> <87edgmq601.fsf@posteo.net> <87jzqeybz8.fsf@posteo.net> <86cyw6wb27.fsf@mail.linkov.net> 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="1604"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , "sbaugh@catern.com" , "emacs-devel@gnu.org" To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 19 17:43:48 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r4ktg-0000CE-33 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Nov 2023 17:43:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4ksn-0002Ex-TB; Sun, 19 Nov 2023 11:42:54 -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 1r4ksm-0002Ej-Id for emacs-devel@gnu.org; Sun, 19 Nov 2023 11:42:52 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4ksh-0003Lo-DY for emacs-devel@gnu.org; Sun, 19 Nov 2023 11:42:52 -0500 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AJGfgFj029880; Sun, 19 Nov 2023 16:42:39 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-2023-03-30; bh=xc1YC8CReIW78MgwsxeyFzM6hvxHIZ8SU62Z5JMB3qA=; b=m9cQsJUzf3gIFvz9FSHuUZPMN5maJKXYJkAk7/F5s1RObq1so16UNT2bQPqn0S8UqXTo 6UByF70EhwlRtltXvrI6dL8wAk32nkDFYoUKKXK1oxsa0oEPEPUpsJ4fqyFgpKF9hJlb AtEkmeVA8+TtNFrdRJ6UIW0Ml+rdBIrI7zy0ajI50tOT+VSWj1QCJjMmoiP5GA6NER0o Wq1g2zVSyzQpM4pRtozOYsAup6G5NTymllg4MVhDDo8TDKxFY8DyhC/ThC+5alJnpb0q CSk4umg9ZOssEp/TMPqQDOLsHTrEHOHHSbvmEBgnxLLkDi4vPdIr5fOEL1yiWos6eqPu wQ== Original-Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uem24sd4r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 19 Nov 2023 16:42:38 +0000 Original-Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AJEcwfW037450; Sun, 19 Nov 2023 16:42:38 GMT Original-Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uekq4e7cc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 19 Nov 2023 16:42:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mYIeEFF4NioiyIMzeeo6NFFKCHGsjnJE72d2dAIerXJ9Phhmdy/x513cZLNFF2jxgdrcPik041HAEH5nlr3jEKcrGdpNUFgb0kjZc8RL0SXZA0fzNiwZ6rMT54x68NZbbuZEWQMo6KCACyeTSs9r0sD1kMHSkXFEt6Y7eD7ttRyzUZCvnTU/Tk8iD6m1CqwMKbK2Sm4HmgxPdTVGIlLfeAugJPbRsCgLSdq5bVLTeX2aMFVFD3KdPWlmW2wwq2JC5XFvuSBCBFrLKJEya5pQhas4hp3UStClqJk8aY4gHcaVUucdDyVEYeyioH8tnpUWUc2NGg21nJPO6KhQ0sTBWA== 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=xc1YC8CReIW78MgwsxeyFzM6hvxHIZ8SU62Z5JMB3qA=; b=Z6o7iqtcCOMA/KruSHGGEMowXwPLAs2aNeH2dV2CpXoiGSxRneZVZYDncNVUqLr82ht755F0sjphxwrdvhy2lxijpR6BM64NxeHVSzFNQAb0X3ErM0mIiHdTbCo/fU8Ak65QpQm9M5WvO4/s42SG9/Ve6o6ESEuuimMGXNA/D3ilr02U57T9c98v+NBSl1uIyCGqGud/Pp//QOXODoRRudtSPIyVoiwTXQoghhWXBehPB5oWa6dZyOhVJsejiU5MK93ERCcDQuaEx9m23fCPaznEOH2f8I9DUCkwu4Yv7Fyc10mrywF2bi1OEgn5ymIaymQTV+9VIB72vBxfROBSXw== 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=xc1YC8CReIW78MgwsxeyFzM6hvxHIZ8SU62Z5JMB3qA=; b=hYVaWI8ufMLamwAMXB4Hylwut91onXSWpdAX3qOFLMfFyXcvfqa4S04nn7uqg8fi/Q223gMROTHhFgaEAkn63PeZmjqeB7EywROIdpuWOiDCHB0WfwOFjCTgkfRpZTbOGZr1GmTGHWb1OXfT0LCM3nMalX0lDYiHRACXmLELyJw= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by PH0PR10MB4629.namprd10.prod.outlook.com (2603:10b6:510:31::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.25; Sun, 19 Nov 2023 16:42:36 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4%7]) with mapi id 15.20.7002.026; Sun, 19 Nov 2023 16:42:36 +0000 Thread-Topic: [External] : Turning on savehist-mode by default Thread-Index: AQHaGrd+EJR3ynDKpEehpn4hvqL4zbCByb/w In-Reply-To: <86cyw6wb27.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|PH0PR10MB4629:EE_ x-ms-office365-filtering-correlation-id: e26c1e2d-ff81-42df-122d-08dbe91e88d3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YaZUtPL+oeJQAYfkYE4GQu+NsYMWf5EblsYzFGCoByoIfyrvNJaJuZ8zk6kiI+yw1+sHD+g3IQtGe1y+dupmL5lZ7YWZVT0/Qoa932/+SjM51ZW9N3PCZSA2K0B+Lk+U5XXrzVDHSPkDvDS+wsxsurTwVTXef55Ac1GpXxE2kGHswTf0FmA1kuMH4oTwQIVrfQO0rjJjM6Nz67Dy67LM0zOi5EQAjS5BicocKWVKIjrQwfPl9pSlxmk0/YX70Ae7BBuT8kmo+l41BNJnP4WKhbY58QsxLu5ayJWnn/lNeKJnLSCmnmXNbXRTTK7dP730Y9bBqzkHxki0CrBkgYmQLCaBTl2VGQEbAXnmM/7SYY9pCjqWE9POYvkfpyDBrcXF2IMH+CH2JwcQ3IfIDh8Zb470iIEHkNH/bBEMSM+1tU0Ftc9XphsL6B2I8Dhya5Pw8KeVCFmPKcKuokhw3QsFlidxH+I/e1aMGqO31wI5rNPvqbigoKpQuv5rI/vxZsErXt52nSnSiRFqkGsYfIGKDWmiB6RApf0zJm4/zU7tQD9GK+f6l1VW9zb/WiDb2Uzz88ahOw8qh++vM4kbwpy4lRzc1mRltp3KmovkmRN9lzmWTC2fpt5GAfWdaH6Z9rcl 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:(13230031)(376002)(346002)(136003)(366004)(396003)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(33656002)(316002)(66446008)(6916009)(64756008)(54906003)(26005)(122000001)(41300700001)(7696005)(6506007)(9686003)(55016003)(38070700009)(66476007)(83380400001)(2906002)(71200400001)(5660300002)(52536014)(44832011)(86362001)(66946007)(76116006)(66556008)(38100700002)(478600001)(4326008)(8676002)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SKw+ci45vY1MpGF2mpOqTnS3kBLb7Di/9pUH7lfxNaHjjTff2+uQnsbp+wHX?= =?us-ascii?Q?3cttCyanu2BGj/uGRylyRgYi8KToNjHPg0tJ6kMC5J4b1kDfqmEwtJoi0Gtg?= =?us-ascii?Q?u6Pl27h4Qiu6pMu1bwhsegOXddZvanxc+MGESp49BuAXymA7il72uocZS41K?= =?us-ascii?Q?65W0AzIxw5L7h/tL4P+3+SodJeXnsOMP1mjpzch2OSNTSuwLTSgw8tRAcPpb?= =?us-ascii?Q?+1tKYMk5lKqhscYOqnyMJ3V0mbpZxhiNYRAGHZjKzo203HpXfvRHf3tNRY+O?= =?us-ascii?Q?Qe4itaDxf+IRqMr+VYREPTyU3h3htJtKSZJjeN8uj02g6+ew10S61X+qs+yL?= =?us-ascii?Q?3hPkfe+qsDUsJ7kVFs2k9RTjf6h6bRlBTRr7Bsa6B0Rnwvm9+hLz1kB4irh4?= =?us-ascii?Q?MJ3phfBsJU9sidvWig+S1A3aev9fbTYQDjDfp5hnaqDyKTAxqQDMSgMvpRiN?= =?us-ascii?Q?QJuxfkCIs+ojG0VOSzLdoS/Hkma+u7y2SbldM6tm8HQpVVOCVuVSaNmaCOzM?= =?us-ascii?Q?Oe8dbhkTSQE6H5o050XXm2PIFQVo74KRT6wHKK6IYwwtFe20P/s9VuZsrt7n?= =?us-ascii?Q?+gjiICpd13CSBCkXhZ+lYLdDqA3bHmVl98tAXWfLdTtOywWdwf7qV6sq8uuL?= =?us-ascii?Q?Cm X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: rC40GfKPMD8aW8qFKYvlXNc+umJWrnJCz/EU22ZyqdNh8QsI66A4z+scFsW1lPMFeNqRuuj/FkdoVZHSo5naeXxAL0JWpzEJQJL7AO+lsU69ZOhIQsq/B1xeHjMg/vIEO6/oZAa7fx69SG8g7phBjgLeFqH/dH9pN+weTGM+j4YXFB3b7dF5jfsNK4at/yS7du3nJ2Ax1TmCLMVM1+GazXngVYvrZeWEcbZRoJaTXYO2JPdLB6P1i7Nh2tUsNhx3mpqQ8ai42ETaQj1GYRGI/GrGKZnf8k4plZneJnL1R0ngw1NpB2z8bvCV+tClIxL792YKCuYqpwIV44UlP04lue5IvjeViTqRwd2NtWCZlJMIY1nwTjqC+zW1BbTqFvHe/fWsWVWgaa+/psslao8FL86XXC940MMURvN0TGL0YSVY6r2cls2bC48koz6WMiadPSmpaaRuR923rLhBTpCgeboIwiN4LuytlMjNeLnArNLZ98F8QqV/xG98YglVEu4pGI+PrE1s9ATscOdDAPISr9df4SUVrcgjBrYfOgs/sAusChDdDz9JOLvBXNj/bok9reZR5SRwHj/Wpjtgc67fGKBPZwTOYGiDGfjtxFvChirOB1SPv3aNn9SIuyFMnJl5/NyFWiGvi3klE4uk1ZTXkVKUa5ezwVYZj4MbGHZFd3KSHxr4USMFHoPUq5Ib+fpteYBhdhAuISYgucZVFBcB+AikmJho7vcVbb6k5OD5FjFi9T iBwZ6PHaDAe9nvs6rWOXF34jN+KLo/TUO1+arR3AkIK9q3I3wrUpEEPfWpyoeXdjerF+3vhWKxXQISgXSvudjWnku/Zot6cire 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: e26c1e2d-ff81-42df-122d-08dbe91e88d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2023 16:42:35.6577 (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: lk3cCPc7esP5dykqblghSA6PYhulgTDb5ncZIohScdXemgTP+hxNq39wLiobD5vq3ieJzb3J6nQg4r+m+SNfpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4629 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-19_15,2023-11-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=915 adultscore=0 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311190127 X-Proofpoint-GUID: Rd4ChrmGZxPa3cqEukkQNWKz-kqs66-7 X-Proofpoint-ORIG-GUID: Rd4ChrmGZxPa3cqEukkQNWKz-kqs66-7 Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313002 Archived-At: > > FWIW, `savehist.el' is a general way to save variable > > values, not just a way to save values of minibuffer > > history variables. It's often recommended (including > > by me) as a way to persist any variables you like. >=20 > Please don't forget there is also `desktop.el' > that is a superset of `savehist.el' Oh, I don't forget. That has advantages and disadvantages compared to savehist. You can have any number of desktop files, which can be in different directories (+). But it (always?) saves a lot more than just vars (-, if you just want to save vars). > > Why isn't it written with that foremost in mind, i.e., > > as a general variable-persisting feature? >=20 > A general variable-persisting feature already exists: > `define-multisession-variable'. Looks like that Emacs 29+ feature (like desktop but in other ways) is also more than, or different from, just saving vars. You need to define those vars - and even access them - in special ways - they're not ordinary vars. And it looks like (?) each such var is stored in its own file (or in a DB). I looked at it superficially, however. It really looks like overkill for just saving variables. The use cases we're talking about, I think, include saving ordinary variables, of any kind, anytime. When I mentioned having a simple feature for just persisting/restoring variables I meant a simple feature - something like what savehist does, without separating out `savehist-additional-variables'. ___ But the existence of multiple ways of persisting variables suggests that maybe we should have a doc section about the topic in the Elisp manual. That could include simple, ad hoc, saving: write one or more vars to a file (e.g. `with-temp-file'); std ways to save a set of vars (e.g. savehist), std way to define, save, access `multisession' vars; std ways to save vars along with other stuff (e.g. desktop). ___ There are also bookmarks (in Bookmark+, at least) that just save sets of vars. You can have multiple bookmark files, anywhere, and they can, but need not, be limited to variable-set bookmarks. Just jump to a bookmark to restore a set of vars. (It's also Bookmark+ that lets you create desktop files anywhere, including multiple ones in the same directory. And lets you bookmark desktops - just jump to restore.)