From: Eli Zaretskii <eliz@is.elta.co.il>
Subject: Re: Loading files at startup (desktop) and revert-buffer leave buffers **.
Date: Wed, 27 Nov 2002 08:14:39 +0200 (IST) [thread overview]
Message-ID: <Pine.SUN.3.91.1021127080856.8482D-100000@is> (raw)
In-Reply-To: <7jbura.v5.ln@acm.acm>
On Mon, 25 Nov 2002, Alan Mackenzie wrote:
> > In other words, the connection with the file the buffer is visiting is
> > not the only one. There are other examples of this in Emacs. For
> > starters, a buffer does not need to be visiting a file. More to the
> > point, text is decoded when it's read from file, so in general the
> > buffer _never_ holds the same stuff as the file.
>
> I disagree.
It's okay to disagree. I didn't design most of that stuff anyway, so I
might not have all the definitive answers. I just tried to explain to
you the logic of the current design. Text properties are _conceptually_
part of the buffer text, while overlays aren't.
> > As another example, "C-x RET f" also marks the buffer modified,
> > although it does nothing to the buffer contents. Etc., etc.
>
> set-buffer-file-coding-system - This is the converse case. It should
> indeed mark the buffer modified, since if the buffer is now saved, the
> new file will (in general) be different from the old file.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exactly! In general, the file will be different, but in any particular
case, it might be identical. E.g., you could try setting the encoding to
the same value, or to something that will leave the file's contents, when
written, with no change. Nonetheless, Emacs marks the buffer modified
because the file _could_ be changed.
> I mean, Emacs is an editor, and editors are for changing files. If a
> file's not going to get changed, why mark it's buffer as changed?
Again, that indication tells you that the _text_ of the buffer has
changed in some way. It doesn't necessarily tells you that the file will
be different when written.
next prev parent reply other threads:[~2002-11-27 6:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1038205410.31195.help-gnu-emacs@gnu.org>
2002-11-25 23:26 ` Loading files at startup (desktop) and revert-buffer leave buffers ** Alan Mackenzie
2002-11-27 6:14 ` Eli Zaretskii [this message]
2002-11-27 6:52 ` Miles Bader
[not found] <mailman.1038117744.12302.help-gnu-emacs@gnu.org>
2002-11-24 23:02 ` Alan Mackenzie
2002-11-25 6:22 ` Eli Zaretskii
[not found] <j7phha.ab.ln@acm.acm>
2002-11-23 15:27 ` Alan Mackenzie
2002-11-24 6:01 ` Eli Zaretskii
2002-11-25 17:02 ` Kevin Rodgers
2002-11-25 22:45 ` Alan Mackenzie
2002-11-27 6:20 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1021127080856.8482D-100000@is \
--to=eliz@is.elta.co.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).