unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49193: Document require-final-newline vs. readonly files
@ 2021-06-23 15:14 積丹尼 Dan Jacobson
  2021-06-23 18:06 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-06-23 15:14 UTC (permalink / raw)
  To: 49193

(info "(emacs) Customize Save") says:
   If the value of the variable ‘require-final-newline’ is ‘t’, saving or
   writing a file silently puts a newline at the end if there isn’t already
   one there.  If the value is ‘visit’, Emacs adds a newline at the end of
   any file that doesn’t have one, just after it visits the file...

OK, but mention if this even affects readonly files / owned by other users
that we visit.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-23 15:14 bug#49193: Document require-final-newline vs. readonly files 積丹尼 Dan Jacobson
@ 2021-06-23 18:06 ` Eli Zaretskii
  2021-06-23 19:22   ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-06-23 18:06 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 49193

> From: 積丹尼 Dan Jacobson
>  <jidanni@jidanni.org>
> Date: Wed, 23 Jun 2021 23:14:56 +0800
> 
> (info "(emacs) Customize Save") says:
>    If the value of the variable ‘require-final-newline’ is ‘t’, saving or
>    writing a file silently puts a newline at the end if there isn’t already
>    one there.  If the value is ‘visit’, Emacs adds a newline at the end of
>    any file that doesn’t have one, just after it visits the file...
> 
> OK, but mention if this even affects readonly files / owned by other users
> that we visit.

There's nothing to mention, because this feature doesn't change how
saving to an unwritable file behaves in Emacs.  The feature works on
the buffer text, not on the buffer's file.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-23 18:06 ` Eli Zaretskii
@ 2021-06-23 19:22   ` 積丹尼 Dan Jacobson
  2021-06-24  5:55     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-06-23 19:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 49193

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: 積丹尼 Dan Jacobson
>> <jidanni@jidanni.org>
>> Date: Wed, 23 Jun 2021 23:14:56 +0800
>> 
>> (info "(emacs) Customize Save") says:
>> If the value of the variable ‘require-final-newline’ is ‘t’, saving or
>> writing a file silently puts a newline at the end if there isn’t already
>> one there.  If the value is ‘visit’, Emacs adds a newline at the end of
>> any file that doesn’t have one, just after it visits the file...
>> 
>> OK, but mention if this even affects readonly files / owned by other users
>> that we visit.

EZ> There's nothing to mention, because this feature doesn't change how
EZ> saving to an unwritable file behaves in Emacs.  The feature works on
EZ> the buffer text, not on the buffer's file.

Ah, that clears things up.
So please mention that.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-23 19:22   ` 積丹尼 Dan Jacobson
@ 2021-06-24  5:55     ` Eli Zaretskii
  2021-06-24 22:08       ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-06-24  5:55 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 49193-done

> From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Cc: 49193@debbugs.gnu.org
> Date: Thu, 24 Jun 2021 03:22:22 +0800
> 
> EZ> There's nothing to mention, because this feature doesn't change how
> EZ> saving to an unwritable file behaves in Emacs.  The feature works on
> EZ> the buffer text, not on the buffer's file.
> 
> Ah, that clears things up.
> So please mention that.

I don't see a reason to mention that feature A doesn't change how
feature B works, for every combination of A and B.

So I'm closing this bug report.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-24  5:55     ` Eli Zaretskii
@ 2021-06-24 22:08       ` Michael Heerdegen
  2021-06-25  6:07         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2021-06-24 22:08 UTC (permalink / raw)
  To: 49193; +Cc: jidanni

Eli Zaretskii <eliz@gnu.org> writes:

> > From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> > Cc: 49193@debbugs.gnu.org
> > Date: Thu, 24 Jun 2021 03:22:22 +0800
> > 
> > EZ> There's nothing to mention, because this feature doesn't change how
> > EZ> saving to an unwritable file behaves in Emacs.  The feature works on
> > EZ> the buffer text, not on the buffer's file.
> > 
> > Ah, that clears things up.
> > So please mention that.
>
> I don't see a reason to mention that feature A doesn't change how
> feature B works, for every combination of A and B.

If you want a second opinion: That's not the source of my confusion
about the text:

| If the value is ‘visit’, Emacs adds a newline at the end of any file
| that doesn’t have one, just after it visits the file...

But that's not true, is it?  The file is not touched.  Is the newline
still added to the file's buffer?  Or not even that (because the buffer
is read-only)?

Would

| [...] Emacs adds a newline at the end of any file's buffer that
| doesn’t have one, just after it visits the file...

be clearer?


Thanks,

Michael.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-24 22:08       ` Michael Heerdegen
@ 2021-06-25  6:07         ` Eli Zaretskii
  2021-06-26 17:18           ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-06-25  6:07 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 49193, jidanni

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: eliz@gnu.org,  jidanni@jidanni.org
> Date: Fri, 25 Jun 2021 00:08:34 +0200
> 
> | If the value is ‘visit’, Emacs adds a newline at the end of any file
> | that doesn’t have one, just after it visits the file...
> 
> But that's not true, is it?  The file is not touched.  Is the newline
> still added to the file's buffer?  Or not even that (because the buffer
> is read-only)?
> 
> Would
> 
> | [...] Emacs adds a newline at the end of any file's buffer that
> | doesn’t have one, just after it visits the file...
> 
> be clearer?

Depends on the beholder, I guess.  Many newbies don't understand the
fine difference, and have trouble with the idea that Emacs doesn't
generally manipulate files for editing.





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

* bug#49193: Document require-final-newline vs. readonly files
  2021-06-25  6:07         ` Eli Zaretskii
@ 2021-06-26 17:18           ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 7+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-06-26 17:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Heerdegen, 49193

>> Would
>> 
>> | [...] Emacs adds a newline at the end of any file's buffer that
>> | doesn’t have one, just after it visits the file...
>> 
>> be clearer?

Better say **buffer** or BUFFER, not just plain buffer.

EZ> Depends on the beholder, I guess.  Many newbies don't understand the
EZ> fine difference, and have trouble with the idea that Emacs doesn't
EZ> generally manipulate files for editing.

It's correct that they don't understand the difference, so it would be
great if the manual helped a little to explain it, right there on that
page too in fact.





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

end of thread, other threads:[~2021-06-26 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 15:14 bug#49193: Document require-final-newline vs. readonly files 積丹尼 Dan Jacobson
2021-06-23 18:06 ` Eli Zaretskii
2021-06-23 19:22   ` 積丹尼 Dan Jacobson
2021-06-24  5:55     ` Eli Zaretskii
2021-06-24 22:08       ` Michael Heerdegen
2021-06-25  6:07         ` Eli Zaretskii
2021-06-26 17:18           ` 積丹尼 Dan Jacobson

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