[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: salv

From: Philip Kaludercic
Subject: Re: [ELPA] New package: salv
Date: Mon, 18 Jul 2022 18:54:21 +0000

Adam Porter <adam@alphapapa.net> writes:

> Hi Philip,
> On 7/18/22 12:14, Philip Kaludercic wrote:
>> Adam Porter <adam@alphapapa.net> 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]