From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: New text property: `inhibit-read-only' Date: Sun, 16 Nov 2014 23:45:30 +0100 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416177968 8331 80.91.229.3 (16 Nov 2014 22:46:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2014 22:46:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 16 23:46:02 2014 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 1Xq8a0-00064f-O1 for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2014 23:46:00 +0100 Original-Received: from localhost ([::1]:45302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq8a0-0002m9-Bw for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2014 17:46:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq8Zq-0002l9-Qd for emacs-devel@gnu.org; Sun, 16 Nov 2014 17:45:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xq8Zk-0003vr-DT for emacs-devel@gnu.org; Sun, 16 Nov 2014 17:45:50 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:45736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq8Zk-0003vk-2g for emacs-devel@gnu.org; Sun, 16 Nov 2014 17:45:44 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xq8Zh-0005xP-OI for emacs-devel@gnu.org; Sun, 16 Nov 2014 23:45:41 +0100 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Nov 2014 23:45:41 +0100 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Nov 2014 23:45:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXFxbRhYlfl49Wlppb4 +PA3NzCBg3VyBxIiAAACSUlEQVQ4jU2UMY/bMAyFeXaQnTWsWdAZnZWo0BzkhO4alDmqEP7/n9BH 2umVCBxbX6hHPouhYnEvGy7hzE7GqZRQCulyWyvAPYQLsxtx01UD96ulBd9bdSOFkLYdfGWkl+0+ r605SVevAHuXm12LgSoppXEADXz7MwBEksjpG9wBLmt7DNG4FgrbP/D5am2kZGD7BiFAoj6JBM08 J4AQ7kWvaG99RKLMIi7SFI7wdOF1iRQTMpjpTTylF6+D5pReTvpKRD54W0fbzUCvwgpo8lOgOb9a rShqB43eMWdtGyArWBvNx3qSdoAhrSMjRQMpdwUi2l9zBhQhgXeA6AZMDoFt30AzmORY153gLXfL EIAx/gMVXf8DmiPyanuAKOiELcfIWSXWuucoELL6ELB8rVYBywHyAZjhN2tOexwg78V3HpmtiEUB XvIOhnDKqqDOZNoVBO6gNoBF0ArqBGCrfW2R1HIcnqE3xGxdfYMZ3s3xAFpVxfOsP9eIM6G49gbq fgw4BcoOGwD0OSU7GzvgtapG3YrHe5n02OOG1BuIGAh+/pg2HRQAdqnDi84PAOzxx4CKLwrwAcAJ o6jD6KHBS4J7ILpV8NPH6Q1gnPrKbCB8/tBptIwd9GpzG8LTxtQy1C6ob+XrCjDe4Dmrt9LdqdzG tAMVcdfPrDMkDNXLspVs/xEKYBASxGHhJ08GbpkVRKgY2H6P53aeMC6fBmhGf07BV5pzxnjK6LRM qPmsFU/ldLuM7HSoktASfJp87uxi/nWLmR96YvP4C64H88q79CEqAAAAAElFTkSuQmCC Mail-Copies-To: never X-Now-Playing: The Cure's _Faith (1)_: "The Funeral Party" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:4/v6hvbrmYWeWRJBCYnBYNBiEDc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:177365 Archived-At: As previously discussed (like a year or two ago), we have certain modes that basically have read-only buffers, but that need certain bits to be writable. eww is one of them -- we need to write things into search fields and the like. So I've just implemented an `inhibit-read-only' text property and pushed it. I'm sure there are cases that I haven't covered yet, so please give it a whirl and let me know where I forgot to add checks. This is a test snippet: (progn (pop-to-buffer "*test*") (insert "This is a test This is a test\nThis is a test This is a test") (put-text-property 10 20 'inhibit-read-only t) (put-text-property 10 20 'face '(:background "red")) (setq buffer-read-only t)) The red text should be editable. Commands like `C-k' and stuff don't really work in this particular scenario, but I don't things that's necessarily a bug. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no