From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4051 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: add-text-properties -vs- set-extent-property (XEmacs) Date: 19 Nov 1995 20:53:30 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035144855 28393 80.91.224.250 (20 Oct 2002 20:14:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:14:15 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id VAA23546 for ; Sun, 19 Nov 1995 21:31:44 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 20 Nov 1995 05:53:33 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id UAA23207; Sun, 19 Nov 1995 20:53:32 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ Original-Lines: 37 X-Mailer: September Gnus v0.14 Xref: main.gmane.org gmane.emacs.gnus.general:4051 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4051 The compatibility problem is this, when XEmacs puts properties on text the properties get propagated when text is inserted at the front. This causes various kinds of wierdness in gnus-topic (my patch of yesterday will still break due to this), and also pseudo articles in the *Summary* buffer (off the top of my head). Here is a short illustration: ;;; This example follows existing Gnus practice ;;; Both strings get inserted with properties attached to the first string (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")) ;;; This example is non-portable to GNU Emacs, but works (defun test-text-properties-2 () (interactive) (let ((beg (point)) extent) (save-excursion (insert "This is a test.\n") (setq extent (make-extent beg (point))) (set-extent-property extent 'start-open t) (set-extent-property extent 'steve-property "Emacs Rules!") (set-extent-property extent 'face 'italic))) (insert "This is some more text, should be excluded from previous.\n")) -- steve@miranova.com baur