all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: text_property_stickiness() ignores `text-property-default-nonsticky'
Date: Tue, 05 Jul 2011 08:13:27 +0400	[thread overview]
Message-ID: <87mxgt5pqw.fsf@gmail.com> (raw)
In-Reply-To: <jwv39ilv17b.fsf-monnier+emacs@gnu.org>

On Mon, 04 Jul 2011 23:50:41 -0400, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > 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.

Hm... I guess I miss something here.  Can you provide an example here?

> But I guess we could export get_pos_property to Elisp.
> 

Perhaps there should be `get-char-property-sticky' (and similar)
functions that do the same as non-sticky counterparts but check for
sticky properties additionally.

Then `widget-field-at' would use such function to get the `field'
property instead of `get-char-property'.  That should fix the issue with
`widget-field-activate' I described above.

Regards,
  Dmitry

> 
>         Stefan



      reply	other threads:[~2011-07-05  4:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 23:56 text_property_stickiness() ignores `text-property-default-nonsticky' Dmitry Kurochkin
2011-07-04 16:53 ` Stefan Monnier
2011-07-05  2:15   ` Dmitry Kurochkin
2011-07-05  3:50     ` Stefan Monnier
2011-07-05  4:13       ` Dmitry Kurochkin [this message]

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=87mxgt5pqw.fsf@gmail.com \
    --to=dmitry.kurochkin@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.