unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30685: end-of-file mode should respect read-only mode
@ 2018-03-02 23:34 積丹尼 Dan Jacobson
  2018-03-03  8:31 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2018-03-02 23:34 UTC (permalink / raw)
  To: 30685

In the modeline the curious user sees a ":" and clicks it.
and sees [DOS], [Mac], etc.

Frightened, the user keeps clicking until he cycles back to its original
":" state, and breathes a sigh of relief.

But wait, it's time for lunch and time to close the editor program.

But now it's asking him about saving the file.

"I thought that -r--r--r-- file owned by the boss and which I viewed in
read-only mode, or even view-mode, was understood by everybody to be
something I didn't intend to meddle with." "Now it thinks I wanted to
modify it..."

Now with extra sweat dripping, he hits undo,

    command-execute: Buffer is read-only: #<buffer boss's_secret_employee_evaluations.txt>

"G*d@*m it, half of the editor knows things are read-only, the other
half doesn't."

Sure, he can just answer "no" when asked to save the file. But why
embroil him this way in the first place. Readonly should be Readonly.

Now Curious Other User 2 also clicks the ":".
At the end when closing emacs she is asked if she wants to save the
file, to which she agrees. Which results in even more warnings and
eventual failure to save the file anyway...





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

* bug#30685: end-of-file mode should respect read-only mode
  2018-03-02 23:34 bug#30685: end-of-file mode should respect read-only mode 積丹尼 Dan Jacobson
@ 2018-03-03  8:31 ` Eli Zaretskii
  2018-03-06 20:35   ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2018-03-03  8:31 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 30685

> From: 積丹尼 Dan Jacobson
> 	<jidanni@jidanni.org>
> Date: Sat, 03 Mar 2018 07:34:10 +0800
> 
> In the modeline the curious user sees a ":" and clicks it.
> and sees [DOS], [Mac], etc.
> 
> Frightened, the user keeps clicking until he cycles back to its original
> ":" state, and breathes a sigh of relief.
> 
> But wait, it's time for lunch and time to close the editor program.
> 
> But now it's asking him about saving the file.
> 
> "I thought that -r--r--r-- file owned by the boss and which I viewed in
> read-only mode, or even view-mode, was understood by everybody to be
> something I didn't intend to meddle with." "Now it thinks I wanted to
> modify it..."
> 
> Now with extra sweat dripping, he hits undo,
> 
>     command-execute: Buffer is read-only: #<buffer boss's_secret_employee_evaluations.txt>
> 
> "G*d@*m it, half of the editor knows things are read-only, the other
> half doesn't."
> 
> Sure, he can just answer "no" when asked to save the file. But why
> embroil him this way in the first place. Readonly should be Readonly.
> 
> Now Curious Other User 2 also clicks the ":".
> At the end when closing emacs she is asked if she wants to save the
> file, to which she agrees. Which results in even more warnings and
> eventual failure to save the file anyway...

If the user had Read the Fine Manual, she'd have known that just two
characters to the right, there's that "*" indicator, clicking on which
would make the buffer not-modified, and that would have solved all her
problems.





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

* bug#30685: end-of-file mode should respect read-only mode
  2018-03-03  8:31 ` Eli Zaretskii
@ 2018-03-06 20:35   ` 積丹尼 Dan Jacobson
  2018-03-07 22:58     ` Richard Stallman
  2018-03-08 15:48     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2018-03-06 20:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 30685

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> If the user had Read the Fine Manual...

(info "(emacs) Misc Buffer")
A buffer can be “read-only”, which means that commands to change its
contents are not allowed.

So add:

"'Contents' do not include end-of-line conventions. There is currently
no way to protect against them getting changed."





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

* bug#30685: end-of-file mode should respect read-only mode
  2018-03-06 20:35   ` 積丹尼 Dan Jacobson
@ 2018-03-07 22:58     ` Richard Stallman
  2018-03-08 15:47       ` Eli Zaretskii
  2018-03-08 15:48     ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2018-03-07 22:58 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 30685

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

In general, modes and settings of a buffer are not part of
its contents.  The contents of a buffer are the characters
and their text properties.

I see the manual doesn't state this basic point anywhere,
so would someone please install this patch?

I think it belongs in the Emacs 26 manual as well as the current
manual.


diff -u /home/rms/emacs-git/build-nov-15/doc/emacs/buffers.texi.\~1\~ /home/rms/emacs-git/build-nov-15/doc/emacs/buffers.texi
--- /home/rms/emacs-git/build-nov-15/doc/emacs/buffers.texi.~1~	2017-11-09 12:20:47.729828394 -0500
+++ /home/rms/emacs-git/build-nov-15/doc/emacs/buffers.texi	2018-03-07 04:43:40.211708142 -0500
@@ -32,6 +32,12 @@
 that window is current.  When there are multiple windows, the buffer
 displayed in the @dfn{selected window} is current.  @xref{Windows}.
 
+@cindex buffer contents
+@cindex contents of a buffer
+  A buffer's @dfn{contents} consist of a series of characters, each of
+which optionally carries a set of text properties (@pxref{Enriched Text})
+which can specify more information about that character.
+
   Aside from its textual contents, each buffer records several pieces
 of information, such as what file it is visiting (if any), whether it
 is modified, and what major mode and minor modes are in effect

Diff finished.  Wed Mar  7 04:43:48 2018

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.






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

* bug#30685: end-of-file mode should respect read-only mode
  2018-03-07 22:58     ` Richard Stallman
@ 2018-03-08 15:47       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2018-03-08 15:47 UTC (permalink / raw)
  To: rms; +Cc: jidanni, 30685

> From: Richard Stallman <rms@gnu.org>
> CC: eliz@gnu.org, 30685@debbugs.gnu.org
> Date: Wed, 07 Mar 2018 17:58:02 -0500
> 
> I see the manual doesn't state this basic point anywhere,
> so would someone please install this patch?

Done.





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

* bug#30685: end-of-file mode should respect read-only mode
  2018-03-06 20:35   ` 積丹尼 Dan Jacobson
  2018-03-07 22:58     ` Richard Stallman
@ 2018-03-08 15:48     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2018-03-08 15:48 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 30685-done

> From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Cc: 30685@debbugs.gnu.org
> Date: Wed, 07 Mar 2018 04:35:15 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> EZ> If the user had Read the Fine Manual...
> 
> (info "(emacs) Misc Buffer")
> A buffer can be “read-only”, which means that commands to change its
> contents are not allowed.
> 
> So add:
> 
> "'Contents' do not include end-of-line conventions. There is currently
> no way to protect against them getting changed."

I clarified this in a different way.

Thanks.





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

end of thread, other threads:[~2018-03-08 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 23:34 bug#30685: end-of-file mode should respect read-only mode 積丹尼 Dan Jacobson
2018-03-03  8:31 ` Eli Zaretskii
2018-03-06 20:35   ` 積丹尼 Dan Jacobson
2018-03-07 22:58     ` Richard Stallman
2018-03-08 15:47       ` Eli Zaretskii
2018-03-08 15:48     ` 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).