From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: text_property_stickiness() ignores `text-property-default-nonsticky' Date: Mon, 04 Jul 2011 23:50:41 -0400 Message-ID: References: <87aacuq5p2.fsf@gmail.com> <87tyb15v6s.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309837864 8304 80.91.229.12 (5 Jul 2011 03:51:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2011 03:51:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Kurochkin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 05 05:50:57 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdwf3-0003dC-In for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2011 05:50:57 +0200 Original-Received: from localhost ([::1]:55510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdwf2-0003l5-Sb for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2011 23:50:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdwep-0003kv-GB for emacs-devel@gnu.org; Mon, 04 Jul 2011 23:50:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdweo-0002cJ-K7 for emacs-devel@gnu.org; Mon, 04 Jul 2011 23:50:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:8551 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdweo-0002cF-G0 for emacs-devel@gnu.org; Mon, 04 Jul 2011 23:50:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAAiJEk5FxIxr/2dsb2JhbABTp3x4iHrDJIY2BJpMhBCELA X-IronPort-AV: E=Sophos;i="4.65,477,1304308800"; d="scan'208";a="120498789" Original-Received: from 69-196-140-107.dsl.teksavvy.com (HELO ceviche.home) ([69.196.140.107]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Jul 2011 23:50:41 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 84371660F8; Mon, 4 Jul 2011 23:50:41 -0400 (EDT) In-Reply-To: <87tyb15v6s.fsf@gmail.com> (Dmitry Kurochkin's message of "Tue, 05 Jul 2011 06:15:55 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141567 Archived-At: > The patch below would not work because it checks for nil in > `text-property-default-nonsticky' instead of 't. Yes, as you noticed, I caught it before committing. > But your commit r104949 fixes the issue. Thank you! Will it get > included in some bugfix emacs release anytime soon? Or only Emacs24? The next Emacs release should be 24.1 (there are no more planned 23.N). > It seems that text_property_stickiness() or get_pos_property() or some > other elisp interface to get "what inherited property value for PROP is > at this POS" would be useful. For example, `widget-field-activate' > should work at the end of widget. Currently, `widget-field-activate' is > called at the end of widget, because keymap is rear-sticky but it does > not call widget's action because `widget-field-at' does not respect > stickiness. What do you think? At the C level, we have `get_pos_property' which returns the value of a property at that position (i.e. between the char before the position and the char after that position). Note that since stickiness can vary between properties, get_pos_property could still return a value inconsistent with the keymap used. But I guess we could export get_pos_property to Elisp. Stefan