unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* c library for handling backup files?
@ 2022-09-21 12:34 Alfred M. Szmidt
  2022-09-21 13:06 ` Philip Kaludercic
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alfred M. Szmidt @ 2022-09-21 12:34 UTC (permalink / raw)
  To: emacs-devel

Does anyone know of a C library for handling Emacs-like backup files?
E.g., if writing a file, the function would do the right thing.

And all the other nice things that come with Emacs.



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

* Re: c library for handling backup files?
  2022-09-21 12:34 c library for handling backup files? Alfred M. Szmidt
@ 2022-09-21 13:06 ` Philip Kaludercic
  2022-09-21 13:14 ` Andreas Schwab
  2022-09-21 13:15 ` Eli Zaretskii
  2 siblings, 0 replies; 9+ messages in thread
From: Philip Kaludercic @ 2022-09-21 13:06 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: emacs-devel

"Alfred M. Szmidt" <ams@gnu.org> writes:

> Does anyone know of a C library for handling Emacs-like backup files?
> E.g., if writing a file, the function would do the right thing.
>
> And all the other nice things that come with Emacs.

I know that GNU Indent uses a similar backup system, and looking at
their backup code[0] it seems fairly self-contained.  Perhaps it could
be extracted into a separate library?

[0] https://git.savannah.gnu.org/cgit/indent.git/tree/src/backup.c



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

* Re: c library for handling backup files?
  2022-09-21 12:34 c library for handling backup files? Alfred M. Szmidt
  2022-09-21 13:06 ` Philip Kaludercic
@ 2022-09-21 13:14 ` Andreas Schwab
  2022-09-21 13:29   ` Alfred M. Szmidt
  2022-09-21 13:15 ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2022-09-21 13:14 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: emacs-devel

On Sep 21 2022, Alfred M. Szmidt wrote:

> Does anyone know of a C library for handling Emacs-like backup files?

There is backupfile in gnulib.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

* Re: c library for handling backup files?
  2022-09-21 12:34 c library for handling backup files? Alfred M. Szmidt
  2022-09-21 13:06 ` Philip Kaludercic
  2022-09-21 13:14 ` Andreas Schwab
@ 2022-09-21 13:15 ` Eli Zaretskii
  2022-09-21 19:11   ` Thierry Volpiatto
  2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-09-21 13:15 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: emacs-devel

> From: "Alfred M. Szmidt" <ams@gnu.org>
> Date: Wed, 21 Sep 2022 08:34:35 -0400
> 
> Does anyone know of a C library for handling Emacs-like backup files?
> E.g., if writing a file, the function would do the right thing.

Coreutils do that, no?  E.g., "cp -b".

> And all the other nice things that come with Emacs.

_All_ of them?  That's Emacs, I guess.



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

* Re: c library for handling backup files?
  2022-09-21 13:14 ` Andreas Schwab
@ 2022-09-21 13:29   ` Alfred M. Szmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Alfred M. Szmidt @ 2022-09-21 13:29 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

   > Does anyone know of a C library for handling Emacs-like backup files?

   There is backupfile in gnulib.

Bingo! Thank you!



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

* Re: c library for handling backup files?
  2022-09-21 13:15 ` Eli Zaretskii
@ 2022-09-21 19:11   ` Thierry Volpiatto
  2022-09-21 19:21     ` Alfred M. Szmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Thierry Volpiatto @ 2022-09-21 19:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Alfred M. Szmidt, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Alfred M. Szmidt" <ams@gnu.org>
>> Date: Wed, 21 Sep 2022 08:34:35 -0400
>> 
>> Does anyone know of a C library for handling Emacs-like backup files?
>> E.g., if writing a file, the function would do the right thing.
>
> Coreutils do that, no?  E.g., "cp -b".

dired-async.el provides a backup function similar to
cp -f --backup=numbered from to.

-- 
Thierry



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

* Re: c library for handling backup files?
  2022-09-21 19:11   ` Thierry Volpiatto
@ 2022-09-21 19:21     ` Alfred M. Szmidt
  2022-09-21 20:50       ` Thierry Volpiatto
  2022-09-22  4:43       ` tomas
  0 siblings, 2 replies; 9+ messages in thread
From: Alfred M. Szmidt @ 2022-09-21 19:21 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: eliz, emacs-devel

   >> From: "Alfred M. Szmidt" <ams@gnu.org>
   >> Date: Wed, 21 Sep 2022 08:34:35 -0400
   >> 
   >> Does anyone know of a C library for handling Emacs-like backup files?
   >> E.g., if writing a file, the function would do the right thing.
   >
   > Coreutils do that, no?  E.g., "cp -b".

   dired-async.el provides a backup function similar to
   cp -f --backup=numbered from to.

You might want to go to the optician, so you can Cee what you missed
in my message ... ;-)



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

* Re: c library for handling backup files?
  2022-09-21 19:21     ` Alfred M. Szmidt
@ 2022-09-21 20:50       ` Thierry Volpiatto
  2022-09-22  4:43       ` tomas
  1 sibling, 0 replies; 9+ messages in thread
From: Thierry Volpiatto @ 2022-09-21 20:50 UTC (permalink / raw)
  To: Alfred M. Szmidt; +Cc: eliz, emacs-devel

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


"Alfred M. Szmidt" <ams@gnu.org> writes:

>    >> From: "Alfred M. Szmidt" <ams@gnu.org>
>    >> Date: Wed, 21 Sep 2022 08:34:35 -0400
>    >> 
>    >> Does anyone know of a C library for handling Emacs-like backup files?
>    >> E.g., if writing a file, the function would do the right thing.
>    >
>    > Coreutils do that, no?  E.g., "cp -b".
>
>    dired-async.el provides a backup function similar to
>    cp -f --backup=numbered from to.
>
> You might want to go to the optician, so you can Cee what you missed
> in my message ... ;-)

Probably you can say instead: Thank you for your answer but it is not
what I am looking for.

Have a good evening.

-- 
Thierry

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

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

* Re: c library for handling backup files?
  2022-09-21 19:21     ` Alfred M. Szmidt
  2022-09-21 20:50       ` Thierry Volpiatto
@ 2022-09-22  4:43       ` tomas
  1 sibling, 0 replies; 9+ messages in thread
From: tomas @ 2022-09-22  4:43 UTC (permalink / raw)
  To: emacs-devel

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

On Wed, Sep 21, 2022 at 03:21:36PM -0400, Alfred M. Szmidt wrote:
>    >> From: "Alfred M. Szmidt" <ams@gnu.org>
>    >> Date: Wed, 21 Sep 2022 08:34:35 -0400
>    >> 
>    >> Does anyone know of a C library for handling Emacs-like backup files?
>    >> E.g., if writing a file, the function would do the right thing.
>    >
>    > Coreutils do that, no?  E.g., "cp -b".
> 
>    dired-async.el provides a backup function similar to
>    cp -f --backup=numbered from to.
> 
> You might want to go to the optician, so you can Cee what you missed
> in my message ... ;-)

Isn't everything C, if you squint a bit? (Now i'll have all the SBCL,
Haskell and Rust folks all over me -- but definitely, Emacs lisp
is C at a lower layer ;-)

But seriously: you could have been nicer in response to a honest
mistake.

Cheers
-- 
t

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

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

end of thread, other threads:[~2022-09-22  4:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 12:34 c library for handling backup files? Alfred M. Szmidt
2022-09-21 13:06 ` Philip Kaludercic
2022-09-21 13:14 ` Andreas Schwab
2022-09-21 13:29   ` Alfred M. Szmidt
2022-09-21 13:15 ` Eli Zaretskii
2022-09-21 19:11   ` Thierry Volpiatto
2022-09-21 19:21     ` Alfred M. Szmidt
2022-09-21 20:50       ` Thierry Volpiatto
2022-09-22  4:43       ` tomas

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