Subject: Re: bug#18246: enriched-encode: should set inhibit-point-motion-hooks, too

From: Ivan Shmakov <[email-masked]>
Date: Mon, 11 Aug 2014 18:57:46 +0000

>>>>> Stefan Monnier <[email-masked]> writes:

 >> the encoded part, it doesn’t yet set inhibit-point-motion-hooks,
 >> which easily results in incorrect encoding should text being encoded
 >> contain parts protected with the ‘intangible’ property.

 > `intangible' is evil, nasty, and sucks rocks.  Your patch is probably
 > OK, but even better would be to fix the code that uses `intangible'.

 > So, do you happen to know why there was a `intangible' in the way?

	Of the packages I use, ERC and Gnus make use of ‘intangible’ by
	default.  Specifically, the default for erc-timestamp-intangible
	is ‘t’, and for gnus-hidden-properties it’s ‘invisible t
	intangible t’ – which, per (elisp.info) Special Properties,
	is also unnecessary:

    […] A common misuse is to put an intangible property on invisible
    text, which is actually unnecessary since the command loop will move
    point outside of the invisible text at the end of each command
    anyway.  […]

	Gnus, however, appears to use overlays extensively for
	highlighting, while overlays, in turn, seem to be completely
	ignored by enriched.el, thus making enriched-encode unlikely to
	cause issues when called over Gnus buffers.

	It seems that the property is also used by RefTeX and SES, but I
	haven’t found any use to either yet.

$ grep -irE --include=\*.el -- "put-text-property\\s.*'intangible" lisp
lisp/erc/erc-stamp.el:	(erc-put-text-property from (1+ (point)) 'intangible t)))))
lisp/erc/erc-stamp.el:	     (erc-put-text-property 0 (length ts) 'intangible t ts))
lisp/textmodes/reftex-toc.el:      (put-text-property (point-min) (point) 'intangible t)
lisp/textmodes/reftex-index.el:      (put-text-property 1 (point) 'intangible t)
lisp/ses.el:	(put-text-property startpos (point) 'intangible
lisp/ses.el:	(put-text-property pos end 'intangible sym)))
lisp/ses.el:      (put-text-property pos end 'intangible new-name))
lisp/gnus/gnus-uu.el:	      (put-text-property (point-min) (point-max) 'intangible nil))
$ 

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A