help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Annoying message "Text is read only"


From: Daniel Pittman
Subject: Re: Annoying message "Text is read only"
Date: Tue, 16 Sep 2008 23:11:02 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux)

Davin Pearson <davin.pearson@gmail.com> writes:
> On Sep 16, 7:29 pm, Daniel Pittman <dan...@rimspace.net> wrote:
>> This is a traditional default; try:
>>
>>    M-x customize-variable <RET> minibuffer-prompt-properties <RET>
>>
>> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]