* XEmacs text props
@ 1996-05-17 14:12 Lars Magne Ingebrigtsen
1996-05-17 21:18 ` Steven L Baur
0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-05-17 14:12 UTC (permalink / raw)
I have been unable to do anything sensible with the `start-closed'
text/extent property. Whatever I do, I just can't seem to get those
pesky props to close. I've tried `put-text-property' and
`map-extents'/`set-extent-propery' on all the extents, but they still
remain stubbornly open. Which makes the topic display look kinda
yucky.
I'm sure I'm doing something silly, since I seem to remember Ben
saying this should be working...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@ifi.uio.no * Lars Ingebrigtsen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: XEmacs text props
1996-05-17 14:12 XEmacs text props Lars Magne Ingebrigtsen
@ 1996-05-17 21:18 ` Steven L Baur
1996-05-18 6:46 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Steven L Baur @ 1996-05-17 21:18 UTC (permalink / raw)
>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
Lars> I have been unable to do anything sensible with the
Lars> `start-closed' text/extent property. Whatever I do, I just
Lars> can't seem to get those pesky props to close. I've tried
Lars> `put-text-property' and `map-extents'/`set-extent-propery' on
Lars> all the extents, but they still remain stubbornly open. Which
Lars> makes the topic display look kinda yucky.
Lars> I'm sure I'm doing something silly, since I seem to remember Ben
Lars> saying this should be working...
He fixed the test case I posted which illustrated the original problem.
You want the end points open not closed. The terminology here looks
very badly worded:
> Whether the extent overlaps its endpoints is governed by its
> `start-open' and `end-open' properties. Insertion of a character at a
> closed endpoint will expand the extent to include that character;
> insertion at an open endpoint will not. Similarly, functions such as
> `extent-at' that scan over all extents overlapping a particular
> position will include extents with a closed endpoint at that position,
> but not extents with an open endpoint.
What's wrong with doing something like:
(defun test-text-properties ()
(interactive)
(let ((beg (point)))
(save-excursion
(insert "This is a test.\n")
(add-text-properties beg (point) (list 'start-open t
'face 'italic
'start-closed nil
'steve-property "Emacs Rules"))))
(let ((beg (point)))
(save-excursion
(insert "This is some more text.\n")
(add-text-properties beg (point) (list 'start-open t
'start-closed nil
'end-open t
'end-closed nil
'face 'bold)))))
In other words, brute force it.
The original test case (which doesn't work at all in 19.13) looked like:
(defun test-text-properties ()
(interactive)
(let ((beg (point)))
(save-excursion
(insert "This is a test.\n")
(add-text-properties beg (point) (list 'start-open t
'face 'italic
'start-closed nil
'steve-property "Emacs Rules"))))
(insert "This is some more text.\n"))
--
steve@miranova.com baur
Unsolicited commercial e-mail will be proofread for $250/hour.
Andrea Seastrand: For your vote on the Telecom bill, I will vote for anyone
except you in November.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: XEmacs text props
1996-05-17 21:18 ` Steven L Baur
@ 1996-05-18 6:46 ` Lars Magne Ingebrigtsen
1996-05-18 14:00 ` Per Abrahamsen
1996-05-18 16:47 ` Steven L Baur
0 siblings, 2 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-05-18 6:46 UTC (permalink / raw)
Steven L Baur <steve@miranova.com> writes:
> You want the end points open not closed.
Whee! I changed `start-closed' to `start-open', and now everything
works!
> The terminology here looks
> very badly worded:
>
> > Whether the extent overlaps its endpoints is governed by its
> > `start-open' and `end-open' properties. Insertion of a character at a
> > closed endpoint will expand the extent to include that character;
> > insertion at an open endpoint will not. Similarly, functions such as
> > `extent-at' that scan over all extents overlapping a particular
> > position will include extents with a closed endpoint at that position,
> > but not extents with an open endpoint.
Hm. When a text property is open, insertion at end points will not
expand the prop. Uhum. Yup. :-)
Well, anyways, now that I understand that I didn't understand the
terminology, we should have seen the end of those numerous text prop
bleeds that have plagued Gnus under XEmacs.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@ifi.uio.no * Lars Ingebrigtsen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: XEmacs text props
1996-05-18 6:46 ` Lars Magne Ingebrigtsen
@ 1996-05-18 14:00 ` Per Abrahamsen
1996-05-19 8:12 ` Lars Magne Ingebrigtsen
1996-05-18 16:47 ` Steven L Baur
1 sibling, 1 reply; 6+ messages in thread
From: Per Abrahamsen @ 1996-05-18 14:00 UTC (permalink / raw)
Think about ranges in math. An open range does not include the
endpoints while a closed range does. Open and closed extents in
XEmacs are similar, only the closed extents include the endpoints.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: XEmacs text props
1996-05-18 6:46 ` Lars Magne Ingebrigtsen
1996-05-18 14:00 ` Per Abrahamsen
@ 1996-05-18 16:47 ` Steven L Baur
1 sibling, 0 replies; 6+ messages in thread
From: Steven L Baur @ 1996-05-18 16:47 UTC (permalink / raw)
>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
Lars> Well, anyways, now that I understand that I didn't understand the
Lars> terminology, we should have seen the end of those numerous text prop
Lars> bleeds that have plagued Gnus under XEmacs.
The properties still bleed in the *Summary* buffer when pseudo
articles are created by X u. The *Group Topic* buffer has been
corrected, though.
--
steve@miranova.com baur
Unsolicited commercial e-mail will be proofread for $250/hour.
Andrea Seastrand: For your vote on the Telecom bill, I will vote for anyone
except you in November.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: XEmacs text props
1996-05-18 14:00 ` Per Abrahamsen
@ 1996-05-19 8:12 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-05-19 8:12 UTC (permalink / raw)
Per Abrahamsen <abraham@dina.kvl.dk> writes:
> Think about ranges in math. An open range does not include the
> endpoints while a closed range does. Open and closed extents in
> XEmacs are similar, only the closed extents include the endpoints.
That makes sense, now that you mention it.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@ifi.uio.no * Lars Ingebrigtsen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1996-05-19 8:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-17 14:12 XEmacs text props Lars Magne Ingebrigtsen
1996-05-17 21:18 ` Steven L Baur
1996-05-18 6:46 ` Lars Magne Ingebrigtsen
1996-05-18 14:00 ` Per Abrahamsen
1996-05-19 8:12 ` Lars Magne Ingebrigtsen
1996-05-18 16:47 ` Steven L Baur
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 NNTP newsgroup(s).