unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ELPA] New package: salv
@ 2022-07-18 17:02 Adam Porter
  2022-07-18 17:14 ` Philip Kaludercic
  2022-07-18 17:27 ` Akib Azmain Turja
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Porter @ 2022-07-18 17:02 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

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

[-- Attachment #2: 0001-elpa-packages-salv-New-package.patch --]
[-- Type: text/x-patch, Size: 830 bytes --]

From 7a17fd7067126a3c5d6f3252947eb765e13b4a99 Mon Sep 17 00:00:00 2001
From: Adam Porter <adam@alphapapa.net>
Date: Mon, 18 Jul 2022 12:00:24 -0500
Subject: [PATCH] * elpa-packages (salv): New package

---
 elpa-packages | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 073a1b3a1c..4c6071c552 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -593,6 +593,10 @@
  ("rt-liberation"	:url "https://git.savannah.nongnu.org/git/rtliber"
   :auto-sync t)
  ("rudel"		:url nil) ;; Was bzr::bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk
+ ("salv"                :url "https://github.com/alphapapa/salv.el.git"
+  :ignored-files ("LICENSE")
+  :doc "README.org"
+  :auto-sync t)
  ("satchel"		:url "https://git.sr.ht/~theo/satchel"
   :ignored-files ("LICENSE")
   :auto-sync t)
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 17:02 [ELPA] New package: salv Adam Porter
@ 2022-07-18 17:14 ` Philip Kaludercic
  2022-07-18 17:24   ` Akib Azmain Turja
  2022-07-18 18:00   ` Adam Porter
  2022-07-18 17:27 ` Akib Azmain Turja
  1 sibling, 2 replies; 10+ messages in thread
From: Philip Kaludercic @ 2022-07-18 17:14 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

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?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 17:14 ` Philip Kaludercic
@ 2022-07-18 17:24   ` Akib Azmain Turja
  2022-07-18 18:00   ` Adam Porter
  1 sibling, 0 replies; 10+ messages in thread
From: Akib Azmain Turja @ 2022-07-18 17:24 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Adam Porter, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> 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?
>

That's a good idea IMHO.

-- 
Akib Azmain Turja

Find me on Mastodon at @akib@hostux.social.

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 17:02 [ELPA] New package: salv Adam Porter
  2022-07-18 17:14 ` Philip Kaludercic
@ 2022-07-18 17:27 ` Akib Azmain Turja
  1 sibling, 0 replies; 10+ messages in thread
From: Akib Azmain Turja @ 2022-07-18 17:27 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

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
>
>

What is the name, "Salv" or "Salve"?  You say "Salv" in the title, but
in the Q/A quoted from your README, you say "Salve".

-- 
Akib Azmain Turja

Find me on Mastodon at @akib@hostux.social.

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 17:14 ` Philip Kaludercic
  2022-07-18 17:24   ` Akib Azmain Turja
@ 2022-07-18 18:00   ` Adam Porter
  2022-07-18 18:54     ` Philip Kaludercic
                       ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Adam Porter @ 2022-07-18 18:00 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

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.

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?

Thanks for your feedback.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 18:00   ` Adam Porter
@ 2022-07-18 18:54     ` Philip Kaludercic
  2022-07-18 19:21       ` Adam Porter
  2022-07-18 23:39     ` Stefan Kangas
  2022-07-19  5:43     ` Richard Stallman
  2 siblings, 1 reply; 10+ messages in thread
From: Philip Kaludercic @ 2022-07-18 18:54 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

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?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 18:54     ` Philip Kaludercic
@ 2022-07-18 19:21       ` Adam Porter
  2022-07-19  2:28         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Porter @ 2022-07-18 19:21 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

On 7/18/22 13:54, Philip Kaludercic wrote:
> 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?

salv-mode saves buffers to their visited files by calling
save-buffer.  It doesn't have anything to do with "auto-save" to backup 
files.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 18:00   ` Adam Porter
  2022-07-18 18:54     ` Philip Kaludercic
@ 2022-07-18 23:39     ` Stefan Kangas
  2022-07-19  5:43     ` Richard Stallman
  2 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2022-07-18 23:39 UTC (permalink / raw)
  To: Adam Porter, Philip Kaludercic; +Cc: emacs-devel

Adam Porter <adam@alphapapa.net> writes:

> 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.

Yes, that's unfortunately true for any new feature we add to Emacs.
OTOH, everyone will have it once it's released.

To my mind, it should be feasible to release a forwards-compatibility
package with just the new behavior, if there's demand for it on Emacs 28
or older.

> 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 wonder why `auto-save-visited-mode' is not just changed to fit your
needs here.

The main difference I can see is that it is not a local minor mode?  I
do think a local mode would be useful for adding to mode hooks, etc.  So
how about just adding a new local mode `auto-save-visited-local-mode'?
Would that cover your use-case(s)?

See also the new options `remote-file-name-inhibit-auto-save-visited'
and `auto-save-visited-predicate' that were inspired by the recent
discussion about `super-saver-mode' and `salve' on /r/emacs.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 19:21       ` Adam Porter
@ 2022-07-19  2:28         ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2022-07-19  2:28 UTC (permalink / raw)
  To: Adam Porter; +Cc: philipk, emacs-devel

> Date: Mon, 18 Jul 2022 14:21:35 -0500
> Cc: emacs-devel <emacs-devel@gnu.org>
> From: Adam Porter <adam@alphapapa.net>
> 
> salv-mode saves buffers to their visited files by calling
> save-buffer.

So does auto-save-visited-mode.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ELPA] New package: salv
  2022-07-18 18:00   ` Adam Porter
  2022-07-18 18:54     ` Philip Kaludercic
  2022-07-18 23:39     ` Stefan Kangas
@ 2022-07-19  5:43     ` Richard Stallman
  2 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2022-07-19  5:43 UTC (permalink / raw)
  To: Adam Porter; +Cc: philipk, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I wonder if this ought to be transformed into some separately-settable
parameters controlling how auto-save works on any give buffer.
Would that make sense?  Would that be an improvement?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-19  5:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 17:02 [ELPA] New package: salv Adam Porter
2022-07-18 17:14 ` Philip Kaludercic
2022-07-18 17:24   ` Akib Azmain Turja
2022-07-18 18:00   ` Adam Porter
2022-07-18 18:54     ` Philip Kaludercic
2022-07-18 19:21       ` Adam Porter
2022-07-19  2:28         ` Eli Zaretskii
2022-07-18 23:39     ` Stefan Kangas
2022-07-19  5:43     ` Richard Stallman
2022-07-18 17:27 ` Akib Azmain Turja

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).