Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy)

From: Michael Heerdegen <[email-masked]>
Date: Sun, 06 Sep 2020 23:50:06 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> I don't really want to be typing in pcase forms in the minibuffer

The prompt has Elisp mode bindings and a separate history.  M-RET to
start occur.  If you really want everything to be non-interactive

> and I just want to get a occur-like buffer in one step.  Is that
> possible?
>
> That would allow the users (i.e., programmers) to just put the stuff in
> a function and use at will.  For instance
>
> (el-search-occurs
>   "~/src/emacs/trunk/lisp"
>   '`(read-string ,(pred stringp) nil ,_ ,t)
>   'recursive)

I didn't have this use case in mind.  The current way to do this would
write like

#+begin_src emacs-lisp
(el-search--occur
 (el-search-make-search
  '`(read-string ,(pred stringp) nil ,_ ,t)
  (lambda ()
    (el-search-stream-of-directory-files
     (expand-file-name "~/src/emacs/trunk/lisp")))))
#+end_src

I think.  Do you think this is worth an own defun?

Michael.