emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: A widget-based version of find-cmd


From: Drew Adams
Subject: RE: A widget-based version of find-cmd
Date: Mon, 3 Jun 2019 16:28:03 -0700 (PDT)

> > 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).
> 
> 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.
 
> > In fact, that's about the only advantage I find for such a dialog box.
> 
> Another advantage is that it can help you to remember what you have
> forgotten.  I for example repeatedly forget that e.g. for
> 
>        -ctime n File's status was last changed n*24 hours ago.  See the
>               comments for -atime to under‐ stand how rounding affects
>               the interpretation of file status change times.
> 
> what I want is
> 
>        -n     for less than n,
> 
> 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'?
> 
> `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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]