From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: 10998@debbugs.gnu.org
Subject: bug#10998: Allow movements in bookmark-bmenu-search
Date: Mon, 01 Oct 2012 10:53:47 -0400 [thread overview]
Message-ID: <jwv391y6ytm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zk46hbyx.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 01 Oct 2012 09:45:42 +0200")
>> I agree with Stefan that this is not an ideal solution, by the way, and
>> have left a comment in the patch below to that effect.
> Keep in mind that this is not a real minibuffer.
AFAICT the fact that it's not a minibuffer is an implementation detail.
IOW it currently isn't a minibuffer, but it could/should be changed to
be one.
See example below.
Stefan
(defun bookmark-bmenu-search ()
"Incremental search of bookmarks, hiding the non-matches as we go."
(interactive)
(let ((bmk (bookmark-bmenu-bookmark))
(timer nil))
(unwind-protect
(minibuffer-with-setup-hook
(lambda ()
(setq timer (run-with-idle-timer
bookmark-search-delay 'repeat
#'(lambda (buf)
(with-current-buffer buf
(bookmark-bmenu-filter-alist-by-regexp
(minibuffer-contents))))
(current-buffer))))
(read-string "Pattern: ")
(when timer (cancel-timer timer) (setq timer nil)))
(when timer ;; Signalled an error or a `quit'.
(cancel-timer timer)
(bookmark-bmenu-list)
(bookmark-bmenu-goto-bookmark bmk)))))
next prev parent reply other threads:[~2012-10-01 14:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 6:08 bug#10998: Allow movements in bookmark-bmenu-search Thierry Volpiatto
2012-03-12 12:31 ` Stefan Monnier
2012-03-12 12:49 ` Thierry Volpiatto
2012-03-12 15:52 ` Stefan Monnier
2012-03-13 15:34 ` Thierry Volpiatto
2012-10-01 4:35 ` Karl Fogel
2012-10-01 7:45 ` Thierry Volpiatto
2012-10-01 14:53 ` Stefan Monnier [this message]
2012-10-01 15:11 ` Thierry Volpiatto
2012-10-02 2:47 ` Stefan Monnier
2019-06-12 16:28 ` Stefan Kangas
2019-06-12 20:30 ` npostavs
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv391y6ytm.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=10998@debbugs.gnu.org \
--cc=thierry.volpiatto@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.