From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Should minibuffer prompt be made intangible by default? (Was debbugs 21874: 25.0.50; point-entered no longer works) Date: Thu, 31 Mar 2016 10:58:39 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f643130c725b8052f5981bc X-Trace: ger.gmane.org 1459436389 18150 80.91.229.3 (31 Mar 2016 14:59:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 14:59:49 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 16:59:44 2016 Return-path: Envelope-to: ged-emacs-devel@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 1ale4V-0002ss-N0 for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 16:59:43 +0200 Original-Received: from localhost ([::1]:60978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ale4U-0005oT-Uo for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 10:59:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ale4E-0005np-Hp for emacs-devel@gnu.org; Thu, 31 Mar 2016 10:59:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ale48-00074i-Cd for emacs-devel@gnu.org; Thu, 31 Mar 2016 10:59:26 -0400 Original-Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:34631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ale48-00074a-4l for emacs-devel@gnu.org; Thu, 31 Mar 2016 10:59:20 -0400 Original-Received: by mail-ob0-x22c.google.com with SMTP id kf9so99896437obc.1 for ; Thu, 31 Mar 2016 07:59:19 -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 :cc; bh=cXKid02nY2j8RWETSUpSoie4UtEojzo+uyxXF2LsdwE=; b=dVMlXTT7otrssQpv5oz4IteL5vrYy+yO9v7xtvB+fN7zEaD74aSnHNGtL+Dnjs7jFj dsped0yGgP97IPY3/ra+IraQthZKZ4IllaFcCdnErNHQpAXsOT29lwSO4xS0NPF5RgDf APStjUXRdWUadSQDrfAQfNgCYAUHLdXz0nAtOqE5kTfCBRuh3wgAiu62LqOSIaBDp611 1RUFhA3ZW/6deVIdMZoa88rLVABIzsFo2EWxMytI+XxkIS8n9s7lnBLXQMYXm1rQTbYi YQ5bJv7Iwi2+IaNzP6nr/BDATtbc2J9kfVCw4RwBECdjLnh4cPMW94okxum/wwWMpNI9 ax7g== 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:cc; bh=cXKid02nY2j8RWETSUpSoie4UtEojzo+uyxXF2LsdwE=; b=SIA5BCyjw+pSBlm597kTAMErn6+XFnQQMTOl92ukq4wu0dAp84ErSlMW3qM67nO8DH fdgqMmoiiXWqYtT9ZaTjj3IOOfLNWXY7w2hkGYqWa5TuTZnThYwA46K6ilBlIRQ65hUr 4BeuABxdQ7LOA0mfL7YBewyiIjINxfOaHA/iIHLl+irm0ZD3UFDLI1mxcLoaaMa/woAM PhCRCJmkm3cyoUxYJeKynDUJ/uNLZS8Ob+SrMScYUnMDkzul7B09Q6q0hN5pA/unPt4o jEBupafGQR4StnYhLwquBU+MD8s0N3IIiTAPxOFsO9z/lFX7ZYb5nkTQY3cDi2fpXUPq EyaQ== X-Gm-Message-State: AD7BkJIpLF6QPxmmdEjzgNBU9E2x1YgeD8qiWGzJv/XK3qnwloDvF05KhUEiwq9KekOI8cIncSANp0H3tKs87w== X-Received: by 10.182.66.116 with SMTP id e20mr526527obt.42.1459436359458; Thu, 31 Mar 2016 07:59:19 -0700 (PDT) Original-Received: by 10.202.204.2 with HTTP; Thu, 31 Mar 2016 07:58:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c01::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202504 Archived-At: --e89a8f643130c725b8052f5981bc Content-Type: text/plain; charset=UTF-8 On Thu, Mar 31, 2016 at 8:38 AM, Stefan Monnier wrote: > > ;; (car (cdr (car (get ..)))) -> (read-only t face > minibuffer-prompt) > ^^^^^^^^ > This "car(cdr" should be spelled "eval" (there's no guarantee that the > arg has always the shape (quote ...something..)). > Thank you. That looks much saner too :) > > > (custom-set-variables '(minibuffer-prompt-properties > > Don't do that. There should only ever be one call to > custom-set-variables, auto-written by Custom itself. As soon as you > move away from that, you're entering dangerous territory. > That was an oversight on my part. I realized the problem practically later on and ended up having what you mentioned below; just that I add cursor-intangible-mode to the hook instead of cursor-sensor-mode. > You should probably use customize-set-variable instead. > > Tho I'd personally recommend that if you don't want to use the Custom > UI, then don't use Custom from Elisp either, and just use straight: > > (setq minibuffer-prompt-properties > (append ... minibuffer-prompt-properties)) > (add-hook 'minibuffer-setup-hook #'cursor-sensor-mode) -- Kaushal Modi --e89a8f643130c725b8052f5981bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Thu, Mar 31, 2016 at 8:38 AM, Stefan Monnier <monnier@iro.umontr= eal.ca> wrote:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0;; (car (cdr (car (get ..)))) -> (r= ead-only t face minibuffer-prompt)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^^^^^^^^
This "car(cdr" should be spelled "eval" (there's no= guarantee that the
arg has always the shape (quote ...something..)).

=
Thank you. That looks much saner too :)
=C2=A0

>=C2=A0 =C2=A0(custom-set-variables '(minibuffer-prompt-properties
Don't do that.=C2=A0 There should only ever be one call to
custom-set-variables, auto-written by Custom itself.=C2=A0 As soon as you move away from that, you're entering dangerous territory.

That was an oversight on my part. I realized the pro= blem practically later on and ended up having what you mentioned below; jus= t that I add cursor-intangible-mode to the hook instead of cursor-sensor-mo= de.
=C2=A0
You should probably use customize-set-variable instead.

Tho I'd personally recommend that if you don't want to use the Cust= om
UI, then don't use Custom from Elisp either, and just use straight:

=C2=A0 =C2=A0 (setq minibuffer-prompt-properties
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (append ... minibuffer-prompt-properties= ))
=C2=A0 =C2=A0 (add-hook 'minibuffer-setup-hook #'cursor-sensor-mode= )


--
Kaushal Modi
--e89a8f643130c725b8052f5981bc--