From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#59668: 29.0.50; [PATCH] Make 'server-stop-automatically' into a defcustom Date: Mon, 28 Nov 2022 20:23:17 -0800 Message-ID: <155f479d-3bae-c327-47a3-7b58daf912c0@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------JdPxMcdoofZo9WJZFNYSIyKJ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2971"; mail-complaints-to="usenet@ciao.gmane.io" To: 59668@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 05:24:21 2022 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 1ozsAP-0000do-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 05:24:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozsA9-0007gY-3X; Mon, 28 Nov 2022 23:24: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 1ozsA7-0007gB-EI for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 23:24:03 -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 1ozsA6-0004EP-Uj for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 23:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozsA5-0002zk-QE for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 23:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 04:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59668 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166969580611503 (code B ref -1); Tue, 29 Nov 2022 04:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 04:23:26 +0000 Original-Received: from localhost ([127.0.0.1]:52890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozs9V-0002zT-Br for submit@debbugs.gnu.org; Mon, 28 Nov 2022 23:23:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozs9T-0002zN-Fu for submit@debbugs.gnu.org; Mon, 28 Nov 2022 23:23:24 -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 1ozs9T-0007dm-7y for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 23:23:23 -0500 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozs9Q-000488-Eu for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 23:23:22 -0500 Original-Received: by mail-pl1-x635.google.com with SMTP id d3so7257704plr.10 for ; Mon, 28 Nov 2022 20:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:content-language:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=iYEae16H58/LE3Q9VIDAucma7ppwiDfEZw/rWyZosLY=; b=Qumnw+I1cmfQN4zKgaRlblcXw9ufBq23hTfRUHkCuuToCgr8FpXqdqcae+IDAwVGfm 8q+PrmUup05IrGSeXCNY9qHYPx1mkwMt4m50cDodUROwYDtCSvhISX0LJiuMGuG9hyRg ZLg2d3XqpDt9q73W4g7rnjRZ9+ZsR5UFt5cm8tNajcNZmpsDjjumku7v0o9HyDCj7mzx RGoLAvWOI0JimrRuhGTlIfUL/55JVAhIqm2zvdAlnbR1t+TKS3Lq/+hh+Gue3lqhZEJz VkopM0iDg74IWAV17mTo1vABHeW/UyH5sHLk88jn/OI9XmxqFH5pq8a9aqGYjAo2rA2S VzTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iYEae16H58/LE3Q9VIDAucma7ppwiDfEZw/rWyZosLY=; b=GJCGqkIGGp/Rntdo3TPgXhhZAmrj5DKMXzxfHvZBfvJsrbpfd4E9an7lu9c5XwYQhf lQPCOU8ZXmzzvtU3laiFvgZ6gF1FbK5rulka+kyu0UUFgr/DZ4RmW8GS6Uso36rwn1gD iBIRNrICBCU/jheqZSm0lEEitbUBvgLJfgqWdlDSXN1zpkWDsdZGjOF2lqjom4ROvARf nCWOwDQhD7siHfwIsOvSJGL8s+F2xDreC4oXnL4+ETAfhLXM/3AvQXBDAJf3kUgcAiw6 Bb4qUtuuDhfZguFjd9Cp0pPPKLO3D0x/HWnP0Utn3O/Q8sZNoCNqweWq7nKfug0B2ASn Sy+Q== X-Gm-Message-State: ANoB5pnMEOS/63RpkvLvfzheAVvLAph2i6+dxzcjxXtTe4LZYAH0RPjI e2XEcL3yeW1DZLZwMBmRhAZSx6Buda8= X-Google-Smtp-Source: AA0mqf6aLUaMkDNvYG4i4ZETXzEfvG3lHgMnCrLUpBY3PooHNC5oKmXLd9PxpRheprRyZ8FIOOZDcA== X-Received: by 2002:a17:903:25cf:b0:189:9dae:6f18 with SMTP id jc15-20020a17090325cf00b001899dae6f18mr715652plb.161.1669695798398; Mon, 28 Nov 2022 20:23:18 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id j4-20020a170903028400b00189651e5c26sm8063075plr.236.2022.11.28.20.23.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 20:23:17 -0800 (PST) X-Mozilla-News-Host: news://news.gmane.io:119 Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x635.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-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:249363 Archived-At: This is a multi-part message in MIME format. --------------JdPxMcdoofZo9WJZFNYSIyKJ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit The manual says: The Emacs server can optionally be stopped automatically when certain conditions are met. To do this, call the function @code{server-stop-automatically} in your init file (@pxref{Init File}), with one of the following arguments... It'd be nice if this were a defcustom so that people who prefer the Customize interface could use that instead of editing their init files. Here's a patch for that. I've tried to make sure this is as robust as possible, so that everything is always properly set, especially when adjusting the value in the Customize UI. It should even work correctly if a user stopped the server temporarily and restarted it (you might do this to clear out old clients, do some work, and then make the server available again). Maybe this last bit is a little paranoid, but it was minimal extra work compared to getting the Customize part working. One question though: should this only go on the master branch, or should it go into the 29 branch? To me, it seems like it could go either way, though I think it'd be nice to make this easier for users in 29. I'll do whatever the maintainers think is best though. If it goes on the master branch only, I'll add back the function form of 'server-stop-automatically' for compatibility, and then mark it obsolete. --------------JdPxMcdoofZo9WJZFNYSIyKJ Content-Type: text/plain; charset=UTF-8; name="0001-Make-server-stop-automatically-into-a-defcustom.patch" Content-Disposition: attachment; filename*0="0001-Make-server-stop-automatically-into-a-defcustom.patch" Content-Transfer-Encoding: base64 RnJvbSBkMTI3M2FkMzE3MDUxNGJjMjg0NjBiMzI4ODZhNmI0ZDc2MTU3NDJiIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IFN1biwgMjcgTm92IDIwMjIgMjI6MjE6MTAgLTA4MDAKU3ViamVjdDogW1BB VENIXSBNYWtlICdzZXJ2ZXItc3RvcC1hdXRvbWF0aWNhbGx5JyBpbnRvIGEgZGVmY3VzdG9t CgoqIGxpc3Avc2VydmVyLmVsIChzZXJ2ZXItc3RvcC1hdXRvbWF0aWNhbGx5KTogQ29udmVy dCB0aGUgdmFyaWFibGUgdG8KYSBkZWZjdXN0b20uICBSZW1vdmUgdGhlIGZ1bmN0aW9uLgoo c2VydmVyLX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XBlbmRpbmcgb24gdGhlIHdoZXRoZXIKK3RoZSBzZXJ2ZXIgaXMgcnVubmluZyBv ciBub3QuICBUaGlzIGZ1bmN0aW9uIG9ubHkgYXBwbGllcyB3aGVuCitydW5uaW5nIEVtYWNz IGFzIGEgZGFlbW9uLiIKKyAgKHdoZW4gKGRhZW1vbnApCisgICAgKGxldCAoZW1wdHktdGlt ZXItcCBkZWxldGUtZnJhbWUtcCkKKyAgICAgICh3aGVuIHNlcnZlci1wcm9jZXNzCisgICAg ICAgIChwY2FzZSBzZXJ2ZXItc3RvcC1hdXRvbWF0aWNhbGx5CisgICAgICAgICAgKCdlbXB0 eSAgICAgICAgKHNldHEgZW1wdHktdGltZXItcCB0KSkKKyAgICAgICAgICAoJ2RlbGV0ZS1m cmFtZSAoc2V0cSBkZWxldGUtZnJhbWUtcCB0KSkpKQorICAgICAgOzsgU3RhcnQgb3Igc3Rv cCB0aGUgdGltZXIuCisgICAgICAoaWYgZW1wdHktdGltZXItcAorICAgICAgICAgICh1bmxl c3Mgc2VydmVyLXN0b3AtYXV0b21hdGljYWxseS0tdGltZXIKKyAgICAgICAgICAgIChzZXRx IHNlcnZlci1zdG9wLWF1dG9tYXRpY2FsbHktLXRpbWVyCisgICAgICAgICAgICAgICAgICAo cnVuLXdpdGgtdGltZXIKKyAgICAgICAgICAgICAgICAgICAxMCAyCisJCSAgICMnc2VydmVy LXN0b3AtYXV0b21hdGljYWxseS0tbWF5YmUta2lsbC1lbWFjcykpKQorICAgICAgICAod2hl biBzZXJ2ZXItc3RvcC1hdXRvbWF0aWNhbGx5LS10aW1lcgorICAgICAgICAgIChjYW5jZWwt dGltZXIgc2VydmVyLXN0b3AtYXV0b21hdGljYWxseS0tdGltZXIpCisgICAgICAgICAgKHNl dHEgc2VydmVyLXN0b3AtYXV0b21hdGljYWxseS0tdGltZXIgbmlsKSkpCisgICAgICA7OyBB ZGQgb3IgcmVtb3ZlIHRoZSBkZWxldGUtZnJhbWUgaG9vay4KKyAgICAg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sgJ2RlbGV0ZS1mcmFtZS1mdW5jdGlvbnMKLQkJIydz ZXJ2ZXItc3RvcC1hdXRvbWF0aWNhbGx5LS1oYW5kbGUtZGVsZXRlLWZyYW1lKSkKLSAgICAg KChlcSBhcmcgJ2tpbGwtdGVybWluYWwpKQotICAgICAodAotICAgICAgKGVycm9yICJVbmV4 cGVjdGVkIGFyZ3VtZW50IikpKSkpCitmbGFnIGNhbiBiZSBzdG9wcGVkLCBhbmQgaWYgc28s IHN0b3AgdGhlIHNlcnZlciBpdHNlbGYuIgorICA6dHlwZSAnKGNob2ljZQorICAgICAgICAg IChjb25zdCA6dGFnICJOZXZlciIgbmlsKQorICAgICAgICAgIChjb25zdCA6dGFnICJXaGVu IGVtcHR5IiBlbXB0eSkKKyAgICAgICAgICAoY29uc3QgOnRhZyAiV2hlbiBraWxsaW5nIGxh c3QgdGVybWluYWwiIGtpbGwtdGVybWluYWwpCisgICAgICAgICAgKGNvbnN0IDp0YWcgIldo ZW4ga2lsbGluZyBsYXN0IHRlcm1pbmFsIG9yIGZyYW1lIiBkZWxldGUtZnJhbWUpKQorICA6 c2V0IChsYW1iZGEgKHN5bWJvbCB2YWx1ZSkKKyAgICAgICAgIChzZXQtZGVmYXVsdCBzeW1i b2wgdmFsdWUpCisgICAgICAgICAoc2VydmVyLWFwcGx5LXN0b3AtYXV0b21hdGljYWxseSkp CisgIDp2ZXJzaW9uICIyOS4xIikKIAogKGRlZmluZS1rZXkgY3RsLXgtbWFwICIjIiAnc2Vy dmVyLWVkaXQpCiAKLS0gCjIuMjUuMQoK --------------JdPxMcdoofZo9WJZFNYSIyKJ--