unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	David Reitter <david.reitter@gmail.com>
Cc: 21874@debbugs.gnu.org
Subject: bug#21874: 25.0.50; point-entered no longer works
Date: Wed, 23 Mar 2016 17:55:10 -0400	[thread overview]
Message-ID: <CAFyQvY3arVawuxbp2MdtvrGoTJ-8OGSyX=T-nvfX3k1j_wbROA@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3iAJoN7F_nNhFjoo+T+c1Ork=9nGJAfgqxgvBjpvtT7Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

@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)

[-- Attachment #2: Type: text/html, Size: 2776 bytes --]

  reply	other threads:[~2016-03-23 21:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 23:27 bug#21874: 25.0.50; point-entered no longer works David Reitter
2016-03-23 20:06 ` Kaushal Modi
2016-03-23 20:30   ` Kaushal Modi
2016-03-23 21:28     ` Stefan Monnier
2016-03-23 21:38       ` Kaushal Modi
2016-03-23 21:55         ` Kaushal Modi [this message]
2016-03-24  0:27           ` Stefan Monnier
2016-03-24  2:14         ` David Reitter
2016-05-22  2:13 ` Paul Eggert
2022-02-15 10:52 ` bug#21874: `backward-char' can move point into minibuffer prompt by default Lars Ingebrigtsen

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='CAFyQvY3arVawuxbp2MdtvrGoTJ-8OGSyX=T-nvfX3k1j_wbROA@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=21874@debbugs.gnu.org \
    --cc=david.reitter@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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