unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
@ 2024-04-10 18:24 Markus Triska
  2024-04-10 18:28 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Triska @ 2024-04-10 18:24 UTC (permalink / raw)
  To: 70326

In 19.3.2 Backup Files, we read:

   "Emacs makes a backup for a file only the first time the file is saved
    from a buffer."

However, when I launch Emacs with:

    $ emacs -Q

and then do:

    C-x C-w backup.txt RET

then the file is saved from the buffer as expected, and Emacs tells me:

    "Wrote .../backup.txt"

However, even though this is the first time the file is saved from a
buffer, no backup for a file is created, and buffer-backed-up is nil.

If possible, could you please consider rephrasing the documentation so
that it accurately describes the cases where a backup file is created,
or alternatively adapt the behaviour so that it matches the current
documentation?

Thank you and all the best,
Markus

In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin18.2.0, X toolkit,
 cairo version 1.17.6, Xaw scroll bars) of 2023-09-11 built on
 mac
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description:  Mac OS X 10.14.2





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 18:24 bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour Markus Triska
@ 2024-04-10 18:28 ` Eli Zaretskii
  2024-04-10 18:53   ` Markus Triska
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-04-10 18:28 UTC (permalink / raw)
  To: Markus Triska; +Cc: 70326

tags 70326 notabug
thanks

> From: Markus Triska <triska@metalevel.at>
> Date: Wed, 10 Apr 2024 20:24:53 +0200
> 
> In 19.3.2 Backup Files, we read:
> 
>    "Emacs makes a backup for a file only the first time the file is saved
>     from a buffer."
> 
> However, when I launch Emacs with:
> 
>     $ emacs -Q
> 
> and then do:
> 
>     C-x C-w backup.txt RET

"C-x C-w" is not "saving the file from a buffer".  "C-h c" says that
"C-x C-w runs the command write-file".  So I don't see anything wrong
with what the manual says.





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 18:28 ` Eli Zaretskii
@ 2024-04-10 18:53   ` Markus Triska
  2024-04-10 19:28     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Triska @ 2024-04-10 18:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 70326

Eli Zaretskii <eliz@gnu.org> writes:

> "C-x C-w" is not "saving the file from a buffer".  "C-h c" says that
> "C-x C-w runs the command write-file".  So I don't see anything wrong
> with what the manual says.

To reproduce the issue, you can also type a letter and then use C-x C-s
(i.e., save-buffer), and observe the same effect: A backup file is not
created, even though a file is saved for the first time from a buffer.

All the best,
Markus





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 18:53   ` Markus Triska
@ 2024-04-10 19:28     ` Eli Zaretskii
  2024-04-10 19:46       ` Markus Triska
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-04-10 19:28 UTC (permalink / raw)
  To: Markus Triska; +Cc: 70326

> From: Markus Triska <triska@metalevel.at>
> Cc: 70326@debbugs.gnu.org
> Date: Wed, 10 Apr 2024 20:53:53 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > "C-x C-w" is not "saving the file from a buffer".  "C-h c" says that
> > "C-x C-w runs the command write-file".  So I don't see anything wrong
> > with what the manual says.
> 
> To reproduce the issue, you can also type a letter and then use C-x C-s
> (i.e., save-buffer), and observe the same effect: A backup file is not
> created, even though a file is saved for the first time from a buffer.

That is still not saving the file from its buffer.





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 19:28     ` Eli Zaretskii
@ 2024-04-10 19:46       ` Markus Triska
  2024-04-11  4:00         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-04-11  5:59         ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Markus Triska @ 2024-04-10 19:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 70326

Eli Zaretskii <eliz@gnu.org> writes:

> That is still not saving the file from its buffer.

The documentation does not require "saving the file from its buffer",
but mentions "saving the file from a buffer", and save-buffer is
described as "Save current buffer in visited file". If save-buffer does
not qualify as saving a file from a buffer, then indeed please consider
the issue addressed. Thank you a lot!





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 19:46       ` Markus Triska
@ 2024-04-11  4:00         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-04-11  5:59         ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-11  4:00 UTC (permalink / raw)
  To: Markus Triska; +Cc: Eli Zaretskii, 70326

Markus Triska <triska@metalevel.at> writes:

> The documentation does not require "saving the file from its buffer",
> but mentions "saving the file from a buffer", and save-buffer is
> described as "Save current buffer in visited file".

This argument makes sense to me.  "its" would be better if it is
technically correct enough.

Michael.





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-10 19:46       ` Markus Triska
  2024-04-11  4:00         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-11  5:59         ` Eli Zaretskii
  2024-04-11  6:11           ` Markus Triska
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-04-11  5:59 UTC (permalink / raw)
  To: Markus Triska; +Cc: 70326

> From: Markus Triska <triska@metalevel.at>
> Cc: 70326@debbugs.gnu.org
> Date: Wed, 10 Apr 2024 21:46:59 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > That is still not saving the file from its buffer.
> 
> The documentation does not require "saving the file from its buffer",
> but mentions "saving the file from a buffer", and save-buffer is
> described as "Save current buffer in visited file".

When have you last looked at the documentation in that part of the
manual?





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-11  5:59         ` Eli Zaretskii
@ 2024-04-11  6:11           ` Markus Triska
  2024-04-11  7:38             ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Triska @ 2024-04-11  6:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 70326

Eli Zaretskii <eliz@gnu.org> writes:

> When have you last looked at the documentation in that part of the
> manual?

I last looked at it a few seconds ago to verify that it still reads as I
originally posted it, and indeed it still reads:

    Emacs makes a backup for a file only the first time the file is
    saved from a buffer.

To repeat the original issue, this is not the behaviour I observe: There
are cases where the file is saved from a buffer, and Emacs does not make
a backup. I previously posted an example in this thread, and I hope you
find it useful. Thank you a lot!





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

* bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour
  2024-04-11  6:11           ` Markus Triska
@ 2024-04-11  7:38             ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2024-04-11  7:38 UTC (permalink / raw)
  To: Markus Triska; +Cc: 70326

> From: Markus Triska <triska@metalevel.at>
> Cc: 70326@debbugs.gnu.org
> Date: Thu, 11 Apr 2024 08:11:48 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > When have you last looked at the documentation in that part of the
> > manual?
> 
> I last looked at it a few seconds ago to verify that it still reads as I
> originally posted it, and indeed it still reads:
> 
>     Emacs makes a backup for a file only the first time the file is
>     saved from a buffer.

Here, it says this instead:

  A “backup file” is a copy of the old contents of a file you are editing.
  Emacs makes a backup file the first time you save a buffer into its
  visited file.

> To repeat the original issue, this is not the behaviour I observe: There
> are cases where the file is saved from a buffer, and Emacs does not make
> a backup. I previously posted an example in this thread, and I hope you
> find it useful. Thank you a lot!

In the two cases you posted, the buffer was not saved into the file
visited by the buffer, so this is not "backup" in Emacs terms.





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

end of thread, other threads:[~2024-04-11  7:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 18:24 bug#70326: 30.0.50; Backup Files documentation does not match observed behaviour Markus Triska
2024-04-10 18:28 ` Eli Zaretskii
2024-04-10 18:53   ` Markus Triska
2024-04-10 19:28     ` Eli Zaretskii
2024-04-10 19:46       ` Markus Triska
2024-04-11  4:00         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-11  5:59         ` Eli Zaretskii
2024-04-11  6:11           ` Markus Triska
2024-04-11  7:38             ` Eli Zaretskii

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