Re: Annoying message "Text is read only"
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Annoying message "Text is read only"         

Group: gnu.emacs.help · Group Profile
Author: Daniel Pittman
Date: Sep 16, 2008 06:11

Davin Pearson gmail.com> writes:
> On Sep 16, 7:29 pm, Daniel Pittman rimspace.net> wrote:
>> This is a traditional default; try:
>>
>>    M-x customize-variable minibuffer-prompt-properties
>>
>> Enable the "Don't Enter" option and save your changes, which will
>> implement what you expect.  (Well, no beep, but you can't move over the
>> text any longer.)
>
> The following code appears to work:
>
> (setq minibuffer-prompt-properties (remove 'read-only minibuffer-
> prompt-properties))

Ouch. That risks causing *serious* breakage:
`minibuffer-prompt-properties' is a plist, which means that it needs to
have an even number of elements.

You just removed one, potentially leaving an odd number, which could be
bad. (As in, nothing that tries to prompt in the minibuffer works any
more bad.)

Anyway, as far as I can tell that would allow you to edit the prompt
text, which probably isn't as desirable as not being able to move
there. I use:

(plist-put minibuffer-prompt-properties
'point-entered 'minibuffer-avoid-prompt)

That has the same effect as the custom stuff, but is plist safe and
avoids the cursor getting in there in the first place.

Regards,
Daniel
no comments
diggit! del.icio.us! reddit!