GNU bug report logs -
#21874
`backward-char' can move point into minibuffer prompt by default
Previous Next
Reported by: David Reitter <david.reitter <at> gmail.com>
Date: Tue, 10 Nov 2015 23:28:01 UTC
Severity: wishlist
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 21874 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Mar 23, 2016 at 5:28 PM, Stefan Monnier <monnier <at> iro.umontreal.ca>
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
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 158 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.