From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Run hook when variable is set Date: Sun, 01 Feb 2015 09:58:52 +0100 Message-ID: <87iofmvwhf.fsf@fencepost.gnu.org> References: <7Dw4GTuMVOnntNGptSuTBkSMdmkHqNdTLkatZ8yKiM7@local> <87oapecrpm.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422781155 30380 80.91.229.3 (1 Feb 2015 08:59:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2015 08:59:15 +0000 (UTC) Cc: Alexis , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 01 09:59:10 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YHqN4-0001Ha-6r for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 09:59:10 +0100 Original-Received: from localhost ([::1]:43974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHqN3-00043b-Dq for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 03:59:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHqN0-000423-9z for emacs-devel@gnu.org; Sun, 01 Feb 2015 03:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHqMz-0001Hg-A5 for emacs-devel@gnu.org; Sun, 01 Feb 2015 03:59:06 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHqMz-0001Hc-70 for emacs-devel@gnu.org; Sun, 01 Feb 2015 03:59:05 -0500 Original-Received: from localhost ([127.0.0.1]:48547 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHqMy-0005cf-Me; Sun, 01 Feb 2015 03:59:05 -0500 Original-Received: by lola (Postfix, from userid 1000) id 0E935E66BC; Sun, 1 Feb 2015 09:58:52 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Sat, 31 Jan 2015 23:05:08 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:182167 Archived-At: Stefan Monnier writes: >>> For the same reason I want to kill the `intangible' text-property: >>> this operates at too-low a level, so it's bound to introduce buggy >>> interactions between unsuspecting packages. >> So what is now the best way to achieve the same effects/behaviours as >> the 'intangible' text-property? > > You can use a post-command-hook or pre-redisplay-function, for example. > > We already have code to do those kinds of things for properties such as > `invisible' (run right after post-command-hook, under the control of > disable-point-adjustment) and we should extend it for a new property, > which we could call `cursor-intangible'. The cursor does not "tangle" anything anyway. It's more like a "no-parking" or "get-off-my" property. > Exactly: like 99.99% of all uses of `intangible', you use it to affect > cursor motion, i.e. motion at the command level, whereas intangible > affects motion at the function level (i.e. motions that happen within > commands, sometimes thousands of such motions within a single command, > some of those motions may happen in different buffers). preview-latex (part of AUCTeX) implements such machinery. Some of it probably is no longer strictly necessary as Emacs has gained some more automatic move-out semantics since early Emacs-21. But it may well be needed as fallback for XEmacs. -- David Kastrup