"has-label"

1,617 views
Skip to first unread message

Kendel

unread,
Aug 29, 2004, 3:16:56 PM8/29/04
to gmail...@googlegroups.com
When doing filters, one can do things like "is:unread" or "from:" or the like.

Is there a way to filter on "has-label:" without actually including
all of the criteria of the label in question?

Ie.,

if I have a label "bob" and, a filter for "from:bob OR to:bob OR
subject:bob" goes into the bob label, can I do "show everything
labelled bob or about bob that isn't from me" -- say, "has-label:bob
NOT from:me" -- instead if having to explicitly say "(from:bob OR
to:bob OR subject:bob) NOT from:me"?

--
Kendel

T. M. Tracy

unread,
Aug 29, 2004, 3:17:51 PM8/29/04
to gmail...@googlegroups.com
I think just label: with nothing after it works. I could be wrong. try it.
--
T. M. Tracy
www.phstheatre.org

Kendel

unread,
Aug 29, 2004, 3:23:39 PM8/29/04
to gmail...@googlegroups.com
> I think just label: with nothing after it

Well, bloody hell.

This has been your weekly reminder of "K.I.S.S." folks.

Thanks, T.M.

T. M. Tracy

unread,
Aug 29, 2004, 3:24:53 PM8/29/04
to gmail...@googlegroups.com
Lol. yes. =) welcome.

Kendel

unread,
Aug 29, 2004, 3:28:17 PM8/29/04
to gmail...@googlegroups.com
Okay, these work:

label:bill
label:jeremy
label:[words]

But not these:

label:"[Gmail Users]"
"label:[Gmail Users]"
label:" Attachments"

etc.,.

Translation: it works fine unless the label has a space in it.

Any thoughts on how to include spaces in such a search?

T. M. Tracy

unread,
Aug 29, 2004, 3:30:20 PM8/29/04
to gmail...@googlegroups.com
you have to use a hyphen for a space

Kendel

unread,
Aug 29, 2004, 3:31:00 PM8/29/04
to gmail...@googlegroups.com
> you have to use a hyphen for a space

In the label name? or the search?

Kendel

unread,
Aug 29, 2004, 3:31:34 PM8/29/04
to gmail...@googlegroups.com
> > you have to use a hyphen for a space
>
> In the label name? or the search?

Answer: in the search.

Thanks, man.


--
Kendel

T. M. Tracy

unread,
Aug 29, 2004, 3:32:04 PM8/29/04
to gmail...@googlegroups.com
lol, yeah. no problem

Fanis Hatzidakis

unread,
Aug 29, 2004, 10:50:08 PM8/29/04
to gmail...@googlegroups.com
What happens if the label has a space? I had Gmail-users and couldn't
find a way to search in it when I was trying to figure out that
"search all unlabeled emails" problem that was posed to the list a few
days back. I tried

(label:Gmail-users) like google syntax says, along with the above that
Kendel mentioned, but without luck. I eventually just renamed to
gmailusers

Fanis

T. M. Tracy

unread,
Aug 29, 2004, 11:03:51 PM8/29/04
to gmail...@googlegroups.com
label:[gmail-users] works for me...when you are searching... I don't
know what happened to you.

Kendel

unread,
Aug 30, 2004, 8:31:25 AM8/30/04
to gmail...@googlegroups.com
I followed T.M.Tracy's earlier information and it works fine for me:

A "Gmail Users" label can be searched for like this:

label:gmail-users

Similarly:

bob jones university --> label:bob-jones-university

Dunno what happened with you.

Kendel

unread,
Aug 30, 2004, 9:25:32 AM8/30/04
to gmail...@googlegroups.com
Okayyyy....

How about "does NOT have label"??

I've tried:

is:unread AND -label:somelabel
is:unread AND -(label:somelabel)
is:unread NOT label:somelabel
is:unread NOT (label:somelabel)

What I am wanting is NOT things that are labelled something other than
"somelabel" as they may still be labelled "somelabel" as well. I am
looking for things that are labelled or unlabelled, so long as they
are in no way labelled "somelabel".




--
Kendel

T. M. Tracy

unread,
Aug 30, 2004, 1:07:33 PM8/30/04
to gmail...@googlegroups.com
-(label:[gmail-users]) works for me. but this is what I found out.
If there is a message in the conversation that isn't labeled, then it
shows up. For instance, I ran : gmail -(label:[gmail-users]) and a
few messages labeled [gmail-users] showed up. I looked at them and
there was someone who's name showed up and not the list...so I assume
his message didn't hit my filters... but as far as I can see
-(label:[gmail-users]) works

The Other Gretchen

unread,
Aug 30, 2004, 1:09:58 PM8/30/04
to gmail...@googlegroups.com
On Mon, 30 Aug 2004 09:25:32 -0400, Kendel <kke...@gmail.com> wrote:
>
> Okayyyy....
>
> How about "does NOT have label"??

From the Advanced Search help, they say that there is no search option
for unlabelled messages:

http://gmail.google.com/support/bin/answer.py?answer=7190&query=label&topic=&type=f

They also don't support regexp or wildcard search strings in labels.

So you can only scan for unlabelled mail by explicitly excluding all
labels in the search.

--Gretchen

T. M. Tracy

unread,
Aug 30, 2004, 1:16:24 PM8/30/04
to gmail...@googlegroups.com
Gretchen.
I think he wasn't asking about no label at all. He said that as in
does not have -labelnamehere- label. Or that's how I took it after
reading a few times. That's what I thought at first, but it seems he
is looking to exclude a labels name

The Other Gretchen

unread,
Aug 30, 2004, 1:29:10 PM8/30/04
to gmail...@googlegroups.com
On Mon, 30 Aug 2004 12:16:24 -0500, T. M. Tracy <tmt...@gmail.com> wrote:
> Gretchen.
> I think he wasn't asking about no label at all. He said that as in
> does not have -labelnamehere- label. Or that's how I took it after
> reading a few times. That's what I thought at first, but it seems he
> is looking to exclude a labels name

Oh! That's just -label:whatever and whatever other search options you
like. Just don't OR it.

Kendel

unread,
Aug 30, 2004, 1:31:34 PM8/30/04
to gmail...@googlegroups.com
That must be it (though I canot figure out why so many messages would
not be tagged).

But I just tried

label:jeremy -(label:maria)

and it worked as desired, giving me anything labelled JEREMY that was
not also labelled MARIA.

Now to figure out how the labelling in the other ones got mangled.

Kendel

unread,
Aug 30, 2004, 1:35:46 PM8/30/04
to gmail...@googlegroups.com
Duh.

The problem is the search function is searching for MESSAGES, and not
CONVERSATIONS.

There should be a way to tell it to widen its criteria to cover the
whole conversation, rather than looking at individual messages, as the
messages will drag along the rest of the conversation, regardless of
the labelling.



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