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: [PATCH] Run hook when variable is set Date: Sat, 31 Jan 2015 23:05:08 -0500 Message-ID: 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 1422763551 20900 80.91.229.3 (1 Feb 2015 04:05:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2015 04:05:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 01 05:05:51 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 1YHlnB-00086Y-4P for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 05:05:49 +0100 Original-Received: from localhost ([::1]:43476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHlnA-0004jM-6W for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 23:05:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHlmc-0004Oc-8U for emacs-devel@gnu.org; Sat, 31 Jan 2015 23:05:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHlmZ-0003Qi-1b for emacs-devel@gnu.org; Sat, 31 Jan 2015 23:05:14 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHlmY-0003Qd-Ul for emacs-devel@gnu.org; Sat, 31 Jan 2015 23:05:10 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflTO+LUv/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBCAEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE X-IPAS-Result: AjsPAOwQflTO+LUv/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBCAEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="109344185" Original-Received: from 206-248-181-47.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.181.47]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Jan 2015 23:05:08 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C820BAE11B; Sat, 31 Jan 2015 23:05:08 -0500 (EST) In-Reply-To: <87oapecrpm.fsf@gmail.com> (Alexis's message of "Sun, 01 Feb 2015 13:04:37 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:182158 Archived-At: >> 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'. > One of the packages i maintain uses 'intangible' on some text in > a minibuffer, to facilitate movement between the two fields whose > contents users can modify: left- and right-movement doesn't move point > through individual characters of non-modifiable text, but moves point > past the entirety of that text. 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). Stefan