GNU bug report logs - #21874
`backward-char' can move point into minibuffer prompt by default

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, David Reitter <david.reitter <at> gmail.com>
Cc: 21874 <at> debbugs.gnu.org
Subject: bug#21874: 25.0.50; point-entered no longer works
Date: Wed, 23 Mar 2016 17:55:10 -0400
[Message part 1 (text/plain, inline)]
@Stefan With respect to:

>
> 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.


How about setting the below as default:

    (setq minibuffer-prompt-properties '(read-only t cursor-intangible t
face minibuffer-prompt))

I find having the above very risky in user config because it simply
overrides whatever the default value of minibuffer-prompt-properties would
be. Also using setq/defcustom is the best way; append/add-to-list/setcdr
will not work very well because of the format of this variable's value.
What I mean is that the list manipulation would have been much more
convenient from the user end without risking complete override of the
default value, had it been in an alist format like below:

    (setq minibuffer-prompt-properties '((read-only t)
                                         (cursor-intangible t)
                                         (face minibuffer-prompt)))


The user then needs to add just one line to their config if they want to
make the minibuffer prompts untouchable.

    (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)

If you don't have that add-hook in your config, you will get the behavior
you want, correct?

Summary:
(1) Proposal to set the default value of minibuffer-prompt-properties
to '(read-only
t cursor-intangible t face minibuffer-prompt). I believe this should go in
emacs-25, not master.
(2) User can then put the following in their config to get untouchable
minibuffer prompts: (add-hook 'minibuffer-setup-hook
#'cursor-intangible-mode)
[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.