From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: A widget-based version of find-cmd Date: Mon, 3 Jun 2019 16:28:03 -0700 (PDT) Message-ID: <0884798f-d83e-4b85-a0dd-fa87833488aa@default> References: <87v9xrfjyj.fsf@web.de> <871s0ap9g7.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="13462"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 04 01:28:27 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXwNO-0003NA-Do for ged-emacs-devel@m.gmane.org; Tue, 04 Jun 2019 01:28:26 +0200 Original-Received: from localhost ([127.0.0.1]:42302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXwNN-0005Ci-6r for ged-emacs-devel@m.gmane.org; Mon, 03 Jun 2019 19:28:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXwNG-0005Cc-WA for emacs-devel@gnu.org; Mon, 03 Jun 2019 19:28:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXwNE-0001jU-Sd for emacs-devel@gnu.org; Mon, 03 Jun 2019 19:28:18 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:49264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXwN9-0001fq-Mp for emacs-devel@gnu.org; Mon, 03 Jun 2019 19:28:13 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x53NO4PR184811; Mon, 3 Jun 2019 23:28:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=3VX14aP9AdPxFLV0a95n5gv6cBQfxmT85BqqUBPR2Ic=; b=ewHKckL6iHbghj+yr8mhLdWULeO3I6LzUW/Lfp5b+nXPTVCmDs8K3bqPhfFtJuUJioZR jgh+kzQJsvhj438U4xNy2yn+rgX1ZhrAc/6kyYtGVc4VB4Sa5+ZP5/oCRDpzSirJ/EF+ lAgD38+0rzkCQ/HHEVWWqkBFbLkgi0pcAFFyQhjVX0BPgxGoE9AiXCAhUsXR5LgT3X/k sC63omc8unlEfRtdKm6h1K62RdDwpSPzhf7BlM5qoPeDhBdAz3g0S/FxZV8qhwtUoiA8 wdsTy37wvkSLUhoFeX8PBxO1WtQg9Ze2jDVnoixwMDsSbqTN/NcoO1GGAYKOB0qXCKi/ Lw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2sugst9vg2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jun 2019 23:28:09 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x53NQFiD105675; Mon, 3 Jun 2019 23:28:09 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2svnn8heah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jun 2019 23:28:09 +0000 Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x53NS452008349; Mon, 3 Jun 2019 23:28:05 GMT In-Reply-To: <871s0ap9g7.fsf@web.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4849.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9277 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906030157 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9277 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906030157 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:237234 Archived-At: > > One of the advantages of a dialog box in such contexts > > is setting it and reusing it for multiple search actions > > (interspersed with other, non-search actions). >=20 > Currently it's only planned to let the buffers stay alive. I dunno if I > can save a buffer showing arbitrary widgets? I guess I would have to > create the widget view from an internal representation, preferably in > the format of a "find" call or the s-exp format used by find-cmd. Keeping the buffer is fine. That's essentially what I meant. A user can access the same buffer later, and just reuse whatever choices were already filled out. > What I want to have is an export to these formats so that you can save > the results in these forms. I guess the reverse should not be too hard. I didn't really mean save persistently. That would be a plus - could also be useful. But what I had in mind was just the fact that the buffer can be kept and reused. The ability to reuse a whole bunch of settings is an advantage that is not really available from having instead completed a whole bunch of inputs. For completion we have only completion/minibuffer histories. And even if someone saves such histories for possible reuse, the entries are not organized together, as a coherent set of, say, search attributes. =20 > > In fact, that's about the only advantage I find for such a dialog box. >=20 > Another advantage is that it can help you to remember what you have > forgotten. I for example repeatedly forget that e.g. for >=20 > -ctime n File's status was last changed n*24 hours ago. See the > comments for -atime to under=E2=80=90 stand how rounding af= fects > the interpretation of file status change times. >=20 > what I want is >=20 > -n for less than n, >=20 > e.g. -ctime -1 for "status changed since last day" but I tend to try > with -ctime 1 and wonder why it fails until I remember that I need "-". > With the widget based version I can force the user to think about the > sign by making it mandatory (with a reasonable default). Yes. Completion can also do that, but much less conveniently. > > > I think you're looking for the `lazy` widget. > > > > Or maybe just split it up, having part of it use `repeat'? >=20 > `lazy' is perfect. AFAIU `repeat' won't do since the syntax of "find" > is actually recursive, so there is no way to avoid recursive widgets. OK; makes sense.