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: Sun, 24 Nov 2002 23:02:04 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038179830 31481 80.91.224.249 (24 Nov 2002 23:17:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 24 Nov 2002 23:17:10 +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 18G5zw-0008BW-00 for ; Mon, 25 Nov 2002 00:17:08 +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 18G5zI-0007A2-00; Sun, 24 Nov 2002 18:16:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newspeer1.nac.net!news.stealth.net!news.stealth.net!news.csl-gmbh.net!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1038178855 61762 193.149.49.134 (24 Nov 2002 23:00:55 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 24 Nov 2002 23:00:55 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:107390 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:3942 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3942 Eli Zaretskii wrote on Sun, 24 Nov 2002 08:01:30 +0200 (IST): > On Sat, 23 Nov 2002, Alan Mackenzie wrote: >> I don't see why setting text properties should mark a file as changed. > Text properties are considered an integral part of the buffer's text > because you want them to be copied together with that text. Thus, any > change in text properties causes the buffer to be marked as modified. Hmm... That still doesn't make much sense to me. What does it mean for a buffer to be marked as modified? It surely means "The buffer isn't the same as the file it was loaded from any more.". I think the principal use of text properties is for font-locking. font-lock itself uses a macro "save-buffer-state" to preserve the buffer-modified state whilst applying text properties, and it isn't the only package to do this. Are there any uses of text properties where applying them to an otherwise unmodified buffer would necessitate the buffer being saved to its file? > If you want to put a face or some other display-related feature on a > text, but not have it copied with the text, use overlays. Ah, overlays. What are they? The elisp manual just says "they're a bit like text properties in some ways, but otherwise totally different.". Other than the fact that they don't set the buffer-changed flag, I can't see any uses for them distinct from those of text properties. I suppose I'll need to grep through the emacs /lisp directory to see how they're used. Thanks for the answer. -- 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").