From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.bugs Subject: Re: problem with text properties whose names aren't symbols Date: Mon, 12 Dec 2005 11:48:20 -0500 (EST) Message-ID: <20051212164820.1E5588191@planetmath.cc.vt.edu> References: <20051212024921.DBF2881A3@planetmath.cc.vt.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1134419330 9953 80.91.229.2 (12 Dec 2005 20:28:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2005 20:28:50 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 12 21:28:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EluFT-0004To-SV for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Dec 2005 21:26:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EluFz-0003Lv-4V for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Dec 2005 15:26:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ElrcS-00037Q-9a for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2005 12:37:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ElrcN-00035Q-Tu for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2005 12:37:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElqrE-0003Vb-Ns for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2005 11:49:01 -0500 Original-Received: from [198.82.161.133] (helo=planetmath.cc.vt.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Elqsy-00083P-Mh for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2005 11:50:49 -0500 Original-Received: by planetmath.cc.vt.edu (Postfix, from userid 1025) id 1E5588191; Mon, 12 Dec 2005 11:48:20 -0500 (EST) Original-To: bug-gnu-emacs@gnu.org In-reply-to: (message from Andreas Schwab on Mon, 12 Dec 2005 12:04:12 +0100) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:14625 Archived-At: This is not a bug, because '(example name) and '(example name) are distinct objects: ELISP> (eq '(example name) '(example name)) nil OK, thanks for the tip. I guess this could be filed under "feature request"; compare my request of Aug. 8 for property search with user-defined predicates. http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-08/msg00068.html In the current case the request becomes "enable the use of a user-defined :test for comparing names stored by `put-text-property'." On the other hand, there is (again) a work-around, following along the lines of Andreas's suggestion: (progn (put-text-property (point) (1+ (point)) '(example name) t) (let ((props (text-properties-at (point)))) (put-text-property (point) (1+ (point)) (car (member '(example name) props)) nil)) (text-properties-at (point)))