unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Devel" <emacs-devel@gnu.org>
Subject: RE: saving buffer with text properties
Date: Sun, 3 Jun 2007 07:15:54 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMEEAKDCAA.drew.adams@oracle.com> (raw)
In-Reply-To: <87r6ot1icv.fsf@ambire.localdomain>

>    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
file.)

> 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	other threads:[~2007-06-03 14:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03  2:33 saving buffer with text properties Drew Adams
2007-06-03  9:45 ` Thien-Thi Nguyen
2007-06-03 14:15   ` Drew Adams [this message]
2007-06-03 14:47     ` Chong Yidong
2007-06-03 16:20       ` Drew Adams
2007-06-03 17:05         ` Chong Yidong
2007-06-03 17:15           ` Drew Adams
2007-06-03 16:43     ` Thien-Thi Nguyen
2007-06-03 17:08       ` Drew Adams
2007-06-03 21:27 ` Richard Stallman
2007-06-03 22:09   ` Drew Adams
2007-06-04  5:01     ` Richard Stallman
2007-06-04  7:38       ` M Jared Finder
2007-06-04 23:20         ` Richard Stallman
2007-06-04  6:29   ` Jason Rumney
2007-06-04 23:20     ` Richard Stallman
2007-06-05  1:32 ` Michael Olson

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=EIENLHALHGIMHGDOLMIMEEAKDCAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).