[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: saving buffer with text properties

From: Drew Adams
Subject: RE: saving buffer with text properties
Date: Sun, 3 Jun 2007 07:15:54 -0700

>    Is there any plan to enable users to save text
>    with all of its properties?
> "all" is a big word!

Perhaps. If a text property were represented in the saved form by its
property name as well as its value, why couldn't arbitrary, user-defined
properties be accomodated too? That's a question, not a claim; I'm no expert
in this. (`buffer-invisiblity-spec' would also need to be saved in the

> on the trunk, see (info "(elisp) Format Conversion").

Good to know. IIUC, that explains how one might implement what I'm asking
for, and it is not specific to text properties. I was wondering if there was
already a plan to define a saved representation that would take text
properties into account - similar to (or perhaps an extension of) enriched
text, for instance.

> perhaps if/when you write code to handle your specific
> properties, we can look at their generality and extend
> emacs w/ that functionality.

My code just uses:

* a `face' property
* a `highlight' property with the same value as `face'
* possibly an `invisible' property

(Likewise for overlays, with a priority also, but I'm thinking only about
text properties here.)

The `highlight' property is just so the code can distinguish face properties
that it manages from other face properties. The code doesn't do anything
special. It just lets you easily apply highlighting in different faces and
then show/hide it.

User can already do some of these things from the Special Properties menu of
Text Properties; my code just tries to add a little flexibility, letting you
show/hide a given face or set of faces everywhere, in a region, etc.

The code is here: http://www.emacswiki.org/cgi-bin/wiki/highlight.el.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]