"J.D. Smith" <[email protected]> writes: >> That is only commented out for the purposes of 'invisible stickiness. >> But we can limit stickiness to 'cursor-sensor-functions by setting the >> value of 'rear-nonsticky to a list of properties. > > I don't follow you here. Beyond cursor-sensor-functions, we do in fact > need to add 'invisible non-stickiness at visible-beg/end locations, to > achieve normal point adjustment driven movement on each side. On v31+, > the latter (visible-end) is already done for us by:
I see. I thought that you only need this for 'cursor-sensor-functions. I am a bit confused why you need read-nonsticky for invisible. It is commented now and does not cause any issues. Does org-inside change anything in this regard? > To summarize, we need: > > 1. cursor sensor functions from visible-beg to (1+) visible-end (the 1+ > only for emacs <31) > 2. rns += 'invisible at visible-beg (this is what the commented out line > would do) > 3. rns += 'invisible at visible end, for emacs <31. > > Are you proposing to uncomment the line in org.el: > > ;; (org-rear-nonsticky-at (match-end 3)) > > That would remove the need for #2, not the others. Or something else? I am proposing (add-text-properties (1- pos) pos (delq 'invisible (list 'rear-nonsticky org-nonsticky-props))) The reason that line is commented is the problem discussed in the linked bug report where M-b behaves differently depending on whether we hide or do not hide emphasis markers. >> where you apply 'org-emphasis to (match-beginning 2) ... venv >> while it was (match-beginning 2) ... (match-end 3) in the past. > > I understood this, but you are not being specific about your concern(s). > > You point to the distinction between: > > + (put-text-property (match-beginning 2) vend 'org-emphasis t) > > - (put-text-property (match-beginning 2) (match-end 3) > - 'org-emphasis t) > > but note the enclosing: > > (let* ((vend (match-end 3)) ... > > So these are identical. Well. Missed that let. So, the code is fine. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
