From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Loading files at startup (desktop) and revert-buffer leave buffers **. Date: Sat, 23 Nov 2002 15:27:35 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-admin@gnu.org Message-ID: <7p6ora.r5.ln@acm.acm> References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038075942 12296 80.91.224.249 (23 Nov 2002 18:25:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 23 Nov 2002 18:25:42 +0000 (UTC) Return-path: Original-Received: from hermes.netfonds.no ([80.91.224.195]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18FeyL-0003CC-00 for ; Sat, 23 Nov 2002 19:25:41 +0100 Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173]) by hermes.netfonds.no (8.12.1/8.12.1) with ESMTP id gANIRgr4010445 for ; Sat, 23 Nov 2002 19:27:43 +0100 (CET) Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18Feyy-0006zU-00; Sat, 23 Nov 2002 13:26:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news-mue1.dfn.de!news-stu1.dfn.de!news.belwue.de!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1038075329 92253 193.149.49.134 (23 Nov 2002 18:15:29 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 23 Nov 2002 18:15:29 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:107330 Original-To: help-gnu-emacs@gnu.org 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:3885 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3885 Alan Mackenzie wrote on Mon, 22 Jul 2002 20:16:51 +0000: > Emacs 21.1. > I am using desktop (i.e. I have > (load "desktop") > (desktop-load-default) > (desktop-read) > in my .emacs) > Some of my files which get loaded continually (and which I rarely/never > save) are marked as changed in the mode-line ("**") each time I start > emacs. > Whenever I perform a revert-buffer for any of these files, the buffer > gets reverted, yet the mode-line continues to display "**". > For what it's worth, there is a file called #filename# for each of these > files. > Is this a bug, or have I misunderstood something? > Thanks in advance. Hi, everybody. My problem was nothing whatsoever to do with desktop. What was happening was that I was setting text properties on these files' buffers immediately after loading them (I think that loading a file counts as a "change" for after-change-functions). Setting text properties marks a file as changed. I don't see why setting text properties should mark a file as changed. It seems to me that text properties are more an internal lisp structure, and the buffer-changed flag should reflect only changes to the contents of the buffer - i.e. that were the buffer to be saved, it would have different contents from the file that had been loaded. What is the thinking behind this use of the buffer-changed flag? Anyhow, apologies to anybody I sent off on a wild goose chase tracking down this non-existent bug. -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").