How to negate searches or exclude patterns from results buffer

20 views
Skip to first unread message

Dan Davison

unread,
Jun 28, 2016, 1:45:53 PM6/28/16
to emacs-helm
I would like to exclude results that match a certain pattern. Two ways that occur to me are

1. The search syntax entered in the minibuffer allows me to tell the search backend to apply the exclusion
2. Some way to apply a persistent exclusion filter to the results buffer in the front end

I've googled a bit and searched the code quickly, and I see this has come up in the context of fuzzy matching, and in issue #908, but would someone mind summarizing the situation for me? 

Michael Heerdegen

unread,
Jun 28, 2016, 9:30:05 PM6/28/16
to emacs...@googlegroups.com
Dan Davison <danda...@gmail.com>
writes:

> I would like to exclude results that match a certain pattern.

Where? For all of Helm, or for a Helm command you want to implement?


Michael.

Thierry Volpiatto

unread,
Jun 29, 2016, 12:17:43 AM6/29/16
to emacs...@googlegroups.com

A side note for the engines based on perl regexps that work in helm
(ack-grep, ag) you can write something like this:

def(?!var|face)

which will match all strings starting by def but not matching var or
face (Note that the parenthesis are not quoted).

--
Thierry
Reply all
Reply to author
Forward
0 new messages