unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: A widget-based version of find-cmd
Date: Tue, 04 Jun 2019 00:53:28 +0200	[thread overview]
Message-ID: <871s0ap9g7.fsf@web.de> (raw)
In-Reply-To: <aa8312ee-8707-44f4-a32c-fac7abef35df@default> (Drew Adams's message of "Mon, 3 Jun 2019 13:41:33 -0700 (PDT)")

Drew Adams <drew.adams@oracle.com> writes:

> 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.

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.

> 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).

> > 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.

Thanks,

Michael.



  reply	other threads:[~2019-06-03 22:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  2:15 A widget-based version of find-cmd Michael Heerdegen
2019-06-03 19:07 ` Stefan Monnier
2019-06-03 20:41   ` Drew Adams
2019-06-03 22:53     ` Michael Heerdegen [this message]
2019-06-03 23:28       ` Drew Adams
2019-06-13 23:35         ` Michael Heerdegen
2019-09-05 15:04           ` Michael Heerdegen
2019-09-05 17:10             ` Drew Adams
2019-09-05 21:26               ` Michael Heerdegen
2019-09-06 12:39             ` local binding ineffective inside widget Stefan Monnier
2019-09-06 14:10               ` Michael Heerdegen
2019-09-24  9:28                 ` Michael Heerdegen
2019-06-03 22:40   ` A widget-based version of find-cmd Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s0ap9g7.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).