all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: HELP, PLEASE! Syntax problem!
Date: Fri, 27 Nov 2009 10:56:34 +0100	[thread overview]
Message-ID: <87d434qoj1.fsf@lola.goethe.zz> (raw)
In-Reply-To: 20091127091607.GA3245@muc.de

Alan Mackenzie <acm@muc.de> writes:

> On Fri, Nov 27, 2009 at 12:48:33AM +0900, Stephen J. Turnbull wrote:
>> Alan Mackenzie writes:
>
>>  > Just as a matter of interest (ha!) Stephen, does XEmacs have an
>>  > equivalent to the 'category text property?
>
>> No.
>
> That's a shame.
>
>> I'm not sure how much farther you can push that kind of thing, but
>> clearly it works for you now.
>
> Well, for one thing, rather than just having the 'category property,
> you could allow any property to be made "categorical".  Then you could
> introduce all sorts of rules as to which "categorical" property
> prevails when several have conflicting settings of a particular
> property. ... ;-)
>
> But, as RMS would undoubtedly say, there doesn't seem to be any need
> for such an "advanced" feature.
>
>> Eventually I guess we'll have to match the Emacs API, but we don't have
>> it now.
>
> It's more than an API: it's a fundamental feature.  Without it, the
> only way to change a text property on ALL characters of some class is
> to scan through the buffer, which would be unacceptably slow for what
> I need to do.
>
> So, yes, please feel free to get it implemented in XEmacs!

You are underestimating XEmacs.  It has a function iterating over all
extents (their equivalent of both overlays and text properties) in a
half-/open/closed range that have a particular set or state of
properties.  So you can say something like "give me all extents for
which the property 'category happens to be 'text".

Something like
(map-extents (lambda (extent) ...) some-flag (point-min)
             (point-max) another-flag and-yet-another 'category 'text)

You'll be brooding two hours over the documentation of this function,
experiment another half an hour, and you are there.

XEmacs calls something "API" comparable to a mathematician calling a
proof "trivial".  Mostly synonymous with "possible".

Just because XEmacs has a single concept and a single work function for
something does not mean that it can't be made to do a hundred things.
You'll be muttering bad things through your teeth whenever you are
reduced to reverting to map-extents.

But it is there.  And it does almost any job.

-- 
David Kastrup





  reply	other threads:[~2009-11-27  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 12:58 HELP, PLEASE! Syntax problem! Alan Mackenzie
2009-11-25 14:43 ` Stefan Monnier
2009-11-25 20:30   ` Alan Mackenzie
2009-11-25 21:45     ` Stefan Monnier
2009-11-25 22:13       ` Alan Mackenzie
2009-11-26  0:12         ` Stephen J. Turnbull
2009-11-26  8:53           ` Alan Mackenzie
2009-11-26 15:48             ` Stephen J. Turnbull
2009-11-27  9:16               ` Alan Mackenzie
2009-11-27  9:56                 ` David Kastrup [this message]
2009-11-27 10:44                   ` Alan Mackenzie
2009-11-27  8:16 ` A Soare

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=87d434qoj1.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --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 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.