all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* New text property: `inhibit-read-only'
@ 2014-11-16 22:45 Lars Magne Ingebrigtsen
  2014-11-17  4:30 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-11-16 22:45 UTC (permalink / raw
  To: emacs-devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-17 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-16 22:45 New text property: `inhibit-read-only' Lars Magne Ingebrigtsen
2014-11-17  4:30 ` Stefan Monnier
2014-11-17  7:47   ` Lars Brinkhoff
2014-11-17 10:20   ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.