all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie<none@example.invalid>
Subject: Re: Loading files at startup (desktop) and revert-buffer leave buffers **.
Date: Sun, 24 Nov 2002 23:02:04 +0000	[thread overview]
Message-ID: <cplrra.r5.ln@acm.acm> (raw)
In-Reply-To: mailman.1038117744.12302.help-gnu-emacs@gnu.org

Eli Zaretskii <eliz@is.elta.co.il> 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").

       reply	other threads:[~2002-11-24 23:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1038117744.12302.help-gnu-emacs@gnu.org>
2002-11-24 23:02 ` Alan Mackenzie [this message]
2002-11-25  6:22   ` Loading files at startup (desktop) and revert-buffer leave buffers ** Eli Zaretskii
     [not found] <mailman.1038205410.31195.help-gnu-emacs@gnu.org>
2002-11-25 23:26 ` Alan Mackenzie
2002-11-27  6:14   ` Eli Zaretskii
2002-11-27  6:52   ` Miles Bader
     [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cplrra.r5.ln@acm.acm \
    --to=none@example.invalid \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.