GNU logs - #12066, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12066: 24.1; Customize :type `restricted-sexp' :tag - use it for prompt
Resent-From: "Drew Adams" <drew.adams@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 27 Jul 2012 06:04:02 +0000
Resent-Message-ID: <handler.12066.B.134336900414361 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 12066
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 12066 <at> debbugs.gnu.org
X-Debbugs-Original-To: <bug-gnu-emacs@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.134336900414361
          (code B ref -1); Fri, 27 Jul 2012 06:04:02 +0000
Received: (at submit) by debbugs.gnu.org; 27 Jul 2012 06:03:24 +0000
Received: from localhost ([127.0.0.1]:42672 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Suddz-0003ja-GS
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 02:03:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43254)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <drew.adams@HIDDEN>) id 1Suddx-0003jT-ND
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 02:03:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <drew.adams@HIDDEN>) id 1SudXD-0002eg-2q
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 01:56:27 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,
	UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:59724)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <drew.adams@HIDDEN>) id 1SudXC-0002ec-Vz
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 01:56:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60795)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <drew.adams@HIDDEN>) id 1SudX9-00031U-1O
	for bug-gnu-emacs@HIDDEN; Fri, 27 Jul 2012 01:56:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <drew.adams@HIDDEN>) id 1SudX7-0002e1-W2
	for bug-gnu-emacs@HIDDEN; Fri, 27 Jul 2012 01:56:18 -0400
Received: from rcsinet15.oracle.com ([148.87.113.117]:24835)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <drew.adams@HIDDEN>) id 1SudX7-0002dn-P5
	for bug-gnu-emacs@HIDDEN; Fri, 27 Jul 2012 01:56:17 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
	by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with
	ESMTP id q6R5uF0r017920
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <bug-gnu-emacs@HIDDEN>; Fri, 27 Jul 2012 05:56:16 GMT
Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158])
	by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	q6R5uEXF012421
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <bug-gnu-emacs@HIDDEN>; Fri, 27 Jul 2012 05:56:15 GMT
Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67])
	by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	q6R5uEOm011630
	for <bug-gnu-emacs@HIDDEN>; Fri, 27 Jul 2012 00:56:14 -0500
Received: from dradamslap1 (/71.202.147.44)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Thu, 26 Jul 2012 22:56:14 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
Date: Thu, 26 Jul 2012 22:56:13 -0700
Message-ID: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: Ac1rvIcyPdOfiGG1TA+CYS9+pC/8Ag==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.1 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.1 (------)

Enhancement request:
 
Customize :type `restricted-sexp' is the most general composite type
construct.  As a result, programmers often use :tag to give some
indication to users what kind of Lisp sexp is acceptable.
 
But even if :tag is used, the prompt for the sexp is hard-coded as "Lisp
expression: ".  This makes little sense.  It makes more sense for the
:tag string to be used also as the prompt string.
 
At the least, this should be an option.
 
The prompt is too general.  Users customizing a particular
`restricted-sexp' are not necessarily even thinking that they are
entering a Lisp sexp, especially since the sexp is only read and not
evaluated.  The interface should be able to keep them thinking in terms
of the forms that are acceptable, i.e., the particular kind of Lisp
sexp.
 
Here is an example, where the sexp can be a character class.  The user
should think in terms of a character class, not just a "Lisp
expression".
 
(restricted-sexp :tag "Character class (e.g., [:space:])"
 :match-alternatives
 ((lambda (xx)
    (let (name)
      (and (vectorp xx)
           (= 1 (length xx))
           (symbolp (setq name  (aref xx 0)))
           (setq name  (symbol-name name))
           (eq ?: (aref name 0))
           (eq ?: (aref name (1- (length name)))))))))
 

In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600)
 of 2012-06-10 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'
 





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.428 (Entity 5.428)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: "Drew Adams" <drew.adams@HIDDEN>
Subject: bug#12066: Acknowledgement (24.1; Customize :type `restricted-sexp'
 :tag - use it for prompt)
Message-ID: <handler.12066.B.134336900414361.ack <at> debbugs.gnu.org>
References: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN>
X-Gnu-PR-Message: ack 12066
X-Gnu-PR-Package: emacs
Reply-To: 12066 <at> debbugs.gnu.org
Date: Fri, 27 Jul 2012 06:04:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 12066 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
12066: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12066
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12066: 24.1; Customize :type `restricted-sexp' :tag - use it for prompt
Resent-From: Andreas Schwab <schwab@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 27 Jul 2012 08:10:01 +0000
Resent-Message-ID: <handler.12066.B12066.134337655125352 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12066
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: "Drew Adams" <drew.adams@HIDDEN>
Cc: 12066 <at> debbugs.gnu.org
Received: via spool by 12066-submit <at> debbugs.gnu.org id=B12066.134337655125352
          (code B ref 12066); Fri, 27 Jul 2012 08:10:01 +0000
Received: (at 12066) by debbugs.gnu.org; 27 Jul 2012 08:09:11 +0000
Received: from localhost ([127.0.0.1]:42814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Sufbj-0006ar-76
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 04:09:11 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:51099)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <whitebox@HIDDEN>) id 1Sufbh-0006aj-8o
	for 12066 <at> debbugs.gnu.org; Fri, 27 Jul 2012 04:09:10 -0400
Received: from frontend1.mail.m-online.net (unknown [192.168.8.180])
	by mail-out.m-online.net (Postfix) with ESMTP id 3Wk2hN5QFnz4KKLh;
	Fri, 27 Jul 2012 10:02:11 +0200 (CEST)
X-Auth-Info: QBnbJDKhWDPI70vvAosZw2qPoWLIefDSWML42bYF3Ts=
Received: from igel.home (ppp-93-104-129-67.dynamic.mnet-online.de
	[93.104.129.67])
	by mail.mnet-online.de (Postfix) with ESMTPA id 3Wk2hM5Jkwzbbjy;
	Fri, 27 Jul 2012 10:02:11 +0200 (CEST)
Received: by igel.home (Postfix, from userid 501)
	id 08FEACA2A4; Fri, 27 Jul 2012 10:02:10 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
References: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN>
X-Yow: Fold, fold, FOLD!!  FOLDING many items!!
Date: Fri, 27 Jul 2012 10:02:10 +0200
In-Reply-To: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN> (Drew Adams's
	message of "Thu, 26 Jul 2012 22:56:13 -0700")
Message-ID: <m2a9ylpr7h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

"Drew Adams" <drew.adams@HIDDEN> writes:

> (restricted-sexp :tag "Character class (e.g., [:space:])"

That's not a sexp.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12066: 24.1; Customize :type `restricted-sexp' :tag - use it for prompt
Resent-From: "Drew Adams" <drew.adams@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 27 Jul 2012 09:35:02 +0000
Resent-Message-ID: <handler.12066.B12066.13433816863751 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12066
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: <12066 <at> debbugs.gnu.org>
Received: via spool by 12066-submit <at> debbugs.gnu.org id=B12066.13433816863751
          (code B ref 12066); Fri, 27 Jul 2012 09:35:02 +0000
Received: (at 12066) by debbugs.gnu.org; 27 Jul 2012 09:34:46 +0000
Received: from localhost ([127.0.0.1]:42990 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SugwY-0000yS-8u
	for submit <at> debbugs.gnu.org; Fri, 27 Jul 2012 05:34:46 -0400
Received: from acsinet15.oracle.com ([141.146.126.227]:42804)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <drew.adams@HIDDEN>) id 1SugwW-0000yK-3M
	for 12066 <at> debbugs.gnu.org; Fri, 27 Jul 2012 05:34:44 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
	by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with
	ESMTP id q6R9RjJw005916
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <12066 <at> debbugs.gnu.org>; Fri, 27 Jul 2012 09:27:46 GMT
Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158])
	by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	q6R9RiE2022125
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <12066 <at> debbugs.gnu.org>; Fri, 27 Jul 2012 09:27:45 GMT
Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70])
	by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	q6R9Rij7012673
	for <12066 <at> debbugs.gnu.org>; Fri, 27 Jul 2012 04:27:44 -0500
Received: from dradamslap1 (/71.202.147.44)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Fri, 27 Jul 2012 02:27:44 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
References: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN>
Date: Fri, 27 Jul 2012 02:27:41 -0700
Message-ID: <7B2264BA4D104FA488427D8664FF5665@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <8071B1FC8E764E37AA6BE5474AD5A563@HIDDEN>
Thread-Index: Ac1rvIcyPdOfiGG1TA+CYS9+pC/8AgAGjUOQ
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-Spam-Score: -6.9 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

The behavior I described is no doubt not what is seen with emacs -Q.

In emacs -Q the sexp is not read in the minibuffer.  In my setup it is.  =
I'm not
sure why, but if there is no case with vanilla Emacs where the sexp is =
read in
the minibuffer then this request can be closed.

In the example I was using for testing, the :type was actually a =
`choice', only
one choice of which was the `restrictive-sexp' as presented.

In my setup, when I choose that choice in Value Menu the sexp is read in =
the
minibuffer.  After it is read, the editable field has been created and =
populated
with the sexp read.  And thereafter `read' uses that field for the sexp. =
 IOW,
the field is not there at first, and the first `read' reads from the =
minibuffer.
Perhaps this behavior has something to do with my using a standalone =
minibuffer
frame - dunno.

In emacs -Q, when I choose that choice in Value Menu the editable field =
is
displayed immediately and the sexp is then read from there.

I don't know what causes this difference.

Here is a backtrace from my setup showing the call to `read'.  The =
prompt
appears when `minibuffer-depth-setup' is called (just before, =
presumably).

Debugger entered--entering a function:
* minibuffer-depth()
* minibuffer-depth-setup()
* #<subr read>(nil)
* apply(#<subr read> nil)
  read(nil)
* #[514 "\300=01!\207" [read] 4 "\n\n(fn WIDGET =
VALUE)"]((restricted-sexp :tag
"Character class (e.g., [:space:])" :match-alternatives ((lambda (xx) =
(let
(name) (and (vectorp xx) (=3D 1 (length xx)) (symbolp (setq name (aref =
xx 0)))
(setq name (symbol-name name)) (eq 58 (aref name 0)) (eq 58 (aref name =
(1-
...))))))) :value nil) nil)
  widget-apply((restricted-sexp :tag "Character class (e.g., [:space:])"
:match-alternatives ((lambda (xx) (let (name) (and (vectorp xx) (=3D 1 =
(length
xx)) (symbolp (setq name (aref xx 0))) (setq name (symbol-name name)) =
(eq 58
(aref name 0)) (eq 58 (aref name (1- ...))))))) :value nil) =
:value-to-external
nil)
  widget-default-get((restricted-sexp :tag "Character class (e.g., =
[:space:])"
:match-alternatives ((lambda (xx) (let (name) (and (vectorp xx) (=3D 1 =
(length
xx)) (symbolp (setq name (aref xx 0))) (setq name (symbol-name name)) =
(eq 58
(aref name 0)) (eq 58 (aref name (1- ...))))))) :value nil))
  widget-choice-action((choice :args ((character :value "

I do not see where this is done by my code, but if it is, then this can =
be
closed.  It's not clear to me what is invoking `read' in this way, so =
that it
reads a sexp from the minibuffer.  (The debugger shows `read' called =
with nil as
arg, but the doc of `read' says that it uses the minibuffer (only) when =
its arg
is t.)

It's also not clear where in the code emacs -Q creates the editable =
field
immediately, so that it can read from there, vs what I see in my setup, =
which is
that there is no editable field at first and the first `read' takes =
place in the
minibuffer.






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.