From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Loading files at startup (desktop) and revert-buffer leave buffers **. Date: Wed, 27 Nov 2002 08:14:39 +0200 (IST) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <7jbura.v5.ln@acm.acm> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1038377681 19602 80.91.224.249 (27 Nov 2002 06:14:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 27 Nov 2002 06:14:41 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18GvT5-00055i-00 for ; Wed, 27 Nov 2002 07:14:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18GvTl-0001nh-00; Wed, 27 Nov 2002 01:15:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18GvTD-0001ZB-00 for help-gnu-emacs@gnu.org; Wed, 27 Nov 2002 01:14:47 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18GvT9-0001Yy-00 for help-gnu-emacs@gnu.org; Wed, 27 Nov 2002 01:14:46 -0500 Original-Received: from is.elta.co.il ([199.203.121.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18GvT8-0001Y4-00 for help-gnu-emacs@gnu.org; Wed, 27 Nov 2002 01:14:42 -0500 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA08761 for ; Wed, 27 Nov 2002 08:14:39 +0200 (IST) X-Sender: eliz@is Original-To: help-gnu-emacs@gnu.org In-Reply-To: <7jbura.v5.ln@acm.acm> Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4086 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4086 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.