From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#21874: 25.0.50; point-entered no longer works Date: Wed, 23 Mar 2016 16:30:05 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140e84c556e3b052ebd34b9 X-Trace: ger.gmane.org 1458765089 22808 80.91.229.3 (23 Mar 2016 20:31:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 20:31:29 +0000 (UTC) To: 21874@debbugs.gnu.org, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 21:31:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aipQu-0006Ma-Ne for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 21:31:12 +0100 Original-Received: from localhost ([::1]:45946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aipQu-0005YK-20 for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 16:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aipQq-0005YD-0c for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 16:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aipQl-0004xv-0c for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 16:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aipQk-0004xr-S1 for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 16:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aipQk-0005UE-Fr for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Mar 2016 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21874-submit@debbugs.gnu.org id=B21874.145876505220598 (code B ref 21874); Wed, 23 Mar 2016 20:31:02 +0000 Original-Received: (at 21874) by debbugs.gnu.org; 23 Mar 2016 20:30:52 +0000 Original-Received: from localhost ([127.0.0.1]:34813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aipQa-0005Lg-8n for submit@debbugs.gnu.org; Wed, 23 Mar 2016 16:30:52 -0400 Original-Received: from mail-oi0-f53.google.com ([209.85.218.53]:35617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aipQY-0005FW-Rq for 21874@debbugs.gnu.org; Wed, 23 Mar 2016 16:30:51 -0400 Original-Received: by mail-oi0-f53.google.com with SMTP id w20so36649153oia.2 for <21874@debbugs.gnu.org>; Wed, 23 Mar 2016 13:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=w3gJJ5aHImr0EFLzKGvlJ2gPvHx2lukWj8SeOSdHWTA=; b=F0J6mpC4fGONxeUBKnerLEzjdrcWKBAWrzW1nm8ELx8UKkCSKVUHEPNe6elIkbHtR7 i6p7JCniYmHEealFfAh5AVpyTfrA0ssv6kJc7mlDdLo8k9EVZmHHouJ2+hk/NuN3YZ+a rWbf2lrYH2F5hcFCeX7yMPnOy+wecPvAW8euHQdy1AGIp9kN453tyAsrwDr1xokc2GEr fvW+jMOSCWLR7NjAPY0MTtK0M3g/2o6fvsdYmyo7iTtw9m+g+hqsoY+/IdWRmQYMJ6Kb N1iesoyr2yySba0Z/ik/59j/b+QDOvdyh7jYLeJwaRbfaR39SU7RaFYlrPv61ZSBfFcV UCEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=w3gJJ5aHImr0EFLzKGvlJ2gPvHx2lukWj8SeOSdHWTA=; b=NaL94DBLMWhkk6bpwTGE76jVQRTs/ljTycPo/T/nVbLHZ4u99KbA9GTRizUSmU4NSB NZ9ewc2o67mzEPgrae/m4BExYJgfmyXzjWVK4YjNjIYLRoR2QzJA0MFRDa6HgDb8N/l9 mz5FgpAtCrpA7utAQo4TpaDzw1w3NPHJqzrDaC53oLV1DpRZyUGH4QC86cVySeAyEsmX Xvj+j32aC6agrTrMp8SKBc/oHu/TiXxG9XLjXZ9DaFamtogWQZk/vCsPaoVqhX+Nk5sb 0yi8HAGnS2v8VQvK8pzBAzwHlDMRxcoNR4jhL95EpD7uwGg2XobdhbqM/NiHEfx0kJDK MNnw== X-Gm-Message-State: AD7BkJJRxoCpYK4P0TBy8iEW4I4Dp4VdUnNk7FJbg7O5ibVidBTba5uq4PY32p3Ey9r/VPhSFG4SunXCuiIjuA== X-Received: by 10.157.16.1 with SMTP id h1mr2586837ote.185.1458765045262; Wed, 23 Mar 2016 13:30:45 -0700 (PDT) Original-Received: by 10.202.172.198 with HTTP; Wed, 23 Mar 2016 13:30:05 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115414 Archived-At: --001a1140e84c556e3b052ebd34b9 Content-Type: text/plain; charset=UTF-8 Then I tried the below (which sort of works): (progn (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) (defun turn-on-cursor-intangible-mode () "Turns on cursor-intangible-mode." (interactive) (cursor-intangible-mode 1)) (define-globalized-minor-mode global-cursor-intangible-mode cursor-intangible-mode turn-on-cursor-intangible-mode) (global-cursor-intangible-mode 1)) Start emacs -Q and eval the above progn form. The caveat is (and I cannot understand why) is that the cursor intangibility does not kick in when you do C-x C-f for the first time! It kicks in only from the second C-x C-f onwards. The following steps try to explain what I mean (on latest build of emacs-25): 1. emacs -Q 2. Eval the above progn form 3. C-x C-f C-x h (The read-only portion also gets selected!) 4. C-g 5. C-x C-f C-x h (NOW the read-only portion does not get selected as expected) So why is the cursor-intangible-mode not enabled in the minibuffer the first time (Step 3)? Also, would it be wise to enable cursor-intangible-mode globally? If not, how can we have that mode always enabled in the minibuffer? ------------------------- On the other hand, I have tested the below as an alternate solution (probably better too as I am not enabling the mode globally) to always work: (progn (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)) If we want emacs to "do the right thing", should the above be made default? --001a1140e84c556e3b052ebd34b9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Then I tried the below (which s= ort of works):

(progn
= =C2=A0 (setq minibuffer-prompt-properties '(read-only t cursor-intangib= le t face minibuffer-prompt))

=C2=A0 (defun turn-on-cursor-intangible-mode ()
=C2=A0 =C2=A0 "Turns on cursor-intangible= -mode."
=C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 (cursor-intangible-mode 1))
=C2=A0 (define-globalized-minor-mode global-cu= rsor-intangible-mode cursor-intangible-mode turn-on-cursor-intangible-mode)=

=C2= =A0 (global-cursor-intangible-mode 1))

=
Start emacs -Q and eval the above progn fo= rm.
The caveat is (and I cannot understand = why) is that the cursor intangibility does not kick in when you do C-x C-f = for the first time! It kicks in only from the second C-x C-f onwards.
=

The followi= ng steps try to explain what I mean (on latest build of emacs-25):
1. emacs -Q
2. Eval= the above progn form
3. C-x C-f C-x h (The= read-only portion also gets selected!)
4. = C-g
5. C-x C-f C-x h (NOW the read-only por= tion does not get selected as expected)
So why is the cursor-intangible-mode not = enabled in the minibuffer the first time (Step 3)?

Also, would it be wise to enab= le cursor-intangible-mode globally? If not, how can we have that mode alway= s enabled in the minibuffer?=C2=A0


---------= ----------------

On the other hand, I have tested the below as an alternate solut= ion (probably better too as I am not enabling the mode globally) to always = work:

=
(progn
=C2=A0 (s= etq minibuffer-prompt-properties '(read-only t cursor-intangible t face= minibuffer-prompt))
=C2=A0 (add-hook '= minibuffer-setup-hook #'cursor-intangible-mode))

If we want emacs to "do= the right thing", should the above be made default?

--001a1140e84c556e3b052ebd34b9--