Subject: Re: 25.0.50; point-entered no longer works

From: Kaushal Modi <[email-masked]>
Date: Wed, 23 Mar 2016 17:38:10 -0400

On Wed, Mar 23, 2016 at 5:28 PM, Stefan Monnier <[email-masked]>
wrote:

> (defalias 'turn-on-cursor-intangible-mode #'cursor-intangible-mode)
>
> would work just as well.  Better yet: just use `cursor-intangible-mode'
> instead and skip turn-on-cursor-intangible-mode altogether, since it's
> just redundant.
>

Thanks!

> Also, would it be wise to enable cursor-intangible-mode globally? If not,
> > how can we have that mode always enabled in the minibuffer?
> (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)

Yes, that's what I ended up doing :) The last part of my previous email was
an after-thought or an "aha" moment as I was typing the question "how can
we have that mode always enabled in the minibuffer?"

I personally like the fact that I can occasionally move into the prompt
> and copy portions of it like any other chunk of text, so I think we
> should generally (by default) refrain from making text intangible except
> when *really* needed.

OK

> PS: What's with the `point-entered' in the subject?

I believe that the OP (David)'s primary question was how to get the
"cursor-intangible" behavior working in emacs 25.1 because the below does
not work as it used to in emacs 24.5:

(setq minibuffer-prompt-properties '(read-only t point-entered
minibuffer-avoid-prompt))

The secondary question I believe is how to get the above to work in
emacs 25.1 (even though point-entered and minibuffer-avoid-prompt are
obsolete).

@David The fact that the below get the behavior you want, would you
consider this bug as closed?

(progn
  (setq minibuffer-prompt-properties '(read-only t cursor-intangible t
face minibuffer-prompt))
  (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode))

--
Kaushal Modi