From: egarrulo <egarrulo@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Incremental search of a package
Date: Sat, 23 Jul 2016 23:33:33 +0200 [thread overview]
Message-ID: <f2410c41-9176-6d2c-9cb3-2d89d874d5d6@gmail.com> (raw)
In-Reply-To: <86h9bgyv4b.fsf@student.uu.se>
On 23/07/16 22:09, Emanuel Berg wrote:
> egarrulo wrote:
>
>> Is there a more straightforward way? If not,
>> is it possible to write a command that
>> performs the steps 1 and 2, so that you only
>> need to start typing the name of the package?
>
> ... why can't you just do that?
I have tried, but the following code makes Emacs loop on an error
(therefore save your work before trying it):
(defun isearch-forward-package ()
(interactive)
(add-hook 'isearch-mode-hook 'yank-package-line-regexp nil t)
(unwind-protect
(isearch-forward-regexp)
(remove-hook 'isearch-mode-hook 'yank-package-line-regexp t)))
(defun yank-package-line-regexp ()
(isearch-yank-string "^ "))
next prev parent reply other threads:[~2016-07-23 21:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 16:42 Incremental search of a package egarrulo
2016-07-23 20:09 ` Emanuel Berg
2016-07-23 21:33 ` egarrulo [this message]
2016-07-23 21:55 ` Emanuel Berg
2016-07-23 22:10 ` Emanuel Berg
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=f2410c41-9176-6d2c-9cb3-2d89d874d5d6@gmail.com \
--to=egarrulo@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.