From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: salv Date: Mon, 18 Jul 2022 18:54:21 +0000 Message-ID: <87h73e1cbm.fsf@posteo.net> References: <87bktm2vj6.fsf@posteo.net> <8ff5d294-36b3-2dab-ea56-9170fad14b91@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 18 21:27:35 2022 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 1oDWP1-0005hn-5o for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Jul 2022 21:27:35 +0200 Original-Received: from localhost ([::1]:41536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDWOz-0001TO-JN for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Jul 2022 15:27:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDVt1-0007kE-Lm for emacs-devel@gnu.org; Mon, 18 Jul 2022 14:54:31 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:49383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDVsy-0000OP-F9 for emacs-devel@gnu.org; Mon, 18 Jul 2022 14:54:31 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3555F240108 for ; Mon, 18 Jul 2022 20:54:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658170466; bh=epHyAZuPH+2CM838sjG2fhabEeBHen58PNguxzOqX3M=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=FUzQR1SZIER5yY27yVoBw9DArw2TvTmJbGIkk6Bqx6Gm0zipYGSxP7b6lcmcc8D9S kB37qCLPJZr2u7HN+Yw368P0gkr4e0/h6wXwpKjh8R5LEcg9gYGx4EQu0mv+JQrZjs G+KLRYP4yIg1fxILj/IysHLNzUo9XVNV//3gXetyd2Ox6arxe+NRImtEQRuJD31QHw Zufxvpgj8OehwEKtF1FoQ+pe39qz9tQXqlYWwixTsTnxgA/B9h8etBfTQJjZ3ZmHCB NIorOQtDn+QFS1GbbfGcRiZSIaaGriVeDrWqXS9+FRkm6XrG+lBSHviIStnWeLPtSt WK2TApFUpm5dQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LmrjV6lybz6tql; Mon, 18 Jul 2022 20:54:21 +0200 (CEST) In-Reply-To: <8ff5d294-36b3-2dab-ea56-9170fad14b91@alphapapa.net> (Adam Porter's message of "Mon, 18 Jul 2022 13:00:03 -0500") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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" Xref: news.gmane.io gmane.emacs.devel:292241 Archived-At: Adam Porter writes: > Hi Philip, > > On 7/18/22 12:14, Philip Kaludercic wrote: >> Adam Porter writes: >> >>> Hi Stefan, et al, >>> >>> I'd like to submit salv.el [0] to GNU ELPA. The readme describes it >>> like so: >>> >>> Salve, v. t. & i. >>> >>> To save, as a ship or goods, from the perils of the sea. >>> >>> --Webster, 1913 >>> >>> Q: How does this package differ from other ones that automatically >>> save buffers? >>> >>> A: Salve is a buffer-local minor mode, rather than being a global >>> mode. It is activated in buffers the user wants to be saved, >>> rather than in all buffers (requiring the user to exclude ones that >>> aren't to be saved). It uses per-buffer idle timers, rather than a >>> global timer. It only runs a timer when a buffer is modified after >>> being saved, rather than constantly. Because of these >>> characteristics, it's simple and lightweight. >>> >>> Please see the attached patch to elpa-packages. >>> >>> Thanks, >>> Adam >>> >>> 0: https://github.com/alphapapa/salv.el >> Not to sound judgemental, but considering that the real >> functionality of >> the package is about 30-40 lines of code, couldn't this be converted >> into a patch to files.el? > > I've no objection to adding it to core, other than that it wouldn't be > easily available to users until Emacs 29 is released, which will be > quite a while. True, I recognise that issue. > Do you mean that the code should be essentially copied into files.el > as-is, or that other changes should be made accordingly? > > What if salv.el were added to emacs.git as a separate file, so that it > wouldn't need to be loaded unless activated? I was not making a concrete suggestion, I just believe that the feature could be implemented by changing the current way auto-saving is done. E.g. what confuses me about the current implementation is that `auto-save-default' is t by default any way, so just enabling `salv-mode' the way the commentary section describes it wouldn't add anything new? As a quick idea, would it make sense to allow `auto-save-default' to be a function that is called whenever the decision is to be made whether or not a buffer should be auto-saved?