unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Annoying message "Text is read only"
Date: Tue, 16 Sep 2008 23:11:02 +1000	[thread overview]
Message-ID: <87abe8me1l.fsf@rimspace.net> (raw)
In-Reply-To: d304c6cd-3e2e-4438-b86f-c7e30f78f5e3@i20g2000prf.googlegroups.com

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	other threads:[~2008-09-16 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16  5:52 Annoying message "Text is read only" Davin Pearson
2008-09-16  6:26 ` Pascal J. Bourguignon
2008-09-16  7:29   ` Daniel Pittman
     [not found]   ` <mailman.19335.1221550525.18990.help-gnu-emacs@gnu.org>
2008-09-16  8:44     ` Davin Pearson
2008-09-16 13:11       ` Daniel Pittman [this message]
2008-09-16 20:38     ` Xah
2008-09-16  8:57   ` Lennart Borgman (gmail)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87abe8me1l.fsf@rimspace.net \
    --to=daniel@rimspace.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).