Use of Scheme in Search Folder filters

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Use of Scheme in Search Folder filters

davidsum
I am trying to create a filter which, as one condition, excludes
messages with a value > 5.0 in the "X-Spam-Score" header.  

So far as I can see, I would need to use the "Expression" option to do
this.  The manual says "Match a message according to an expression you
write in the Scheme language used to define filters in Evolution",
which seems a bit circular.

I am familiar with Scheme, but there is no indication here about how
the Scheme expression should be formed.  For instance, what is required
might be something such as "(if (> 5.0 X-Spam-Score) #f)", but that one
certainly doesn't work, and there are too many other plausible
possibilities simply to use trial and error.

Can somebody point me to an explanation of how such Scheme expressions
in Evolution should be formed, or perhaps show me how (and whether)
this one can be made to work?

David


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

Gnome Evolution - General mailing list
On Sat, 2020-10-10 at 09:38 +0100, David Sumbler wrote:
> Can somebody point me to an explanation of how such Scheme
> expressions in Evolution should be formed, or perhaps show me how
> (and whether) this one can be made to work?

        Hi,
I do not know whether the 'S' in 'S-Expression' means 'Scheme' (I've
been always wondering what that letter stands for, but I was also
always lazy to figure it out), but I'd rather suggest to use the Free
Form Expression. It's similar, but more user friendly, I hope. In any
case, both the GUI and the Free Form Expressions are converted into the
S-Expression, because it's what is used in the background. The semi-
documentation for the Free Form Expression can be found here:
https://bugzilla.gnome.org/show_bug.cgi?id=550796#c10

The S-Expression doesn't have any documentation. I'm not aware of any
at least. Pointing you into the code might not be the best thing, I
believe.

Maybe it would worth to update the user documentation and add there
some Free Form Expression examples. Such always help.

        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

Andre Klapper
On Sat, 2020-10-10 at 19:54 +0200, Milan Crha via evolution-list wrote:
> Maybe it would worth to update the user documentation and add there
> some Free Form Expression examples. Such always help.

"Help > Contents > Mail Management > Sorting and organizing mail >
Searching mail > Searching Across Messages > Quick Search" bullet point
2 already has info for advanced users which links to the "Free form
expression syntax".

andre

--
Andre Klapper  |  [hidden email]
https://blogs.gnome.org/aklapper/


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

davidsum
In reply to this post by Gnome Evolution - General mailing list

On Sat, 2020-10-10 at 19:54 +0200, Milan Crha via evolution-list wrote:

> On Sat, 2020-10-10 at 09:38 +0100, David Sumbler wrote:
> > Can somebody point me to an explanation of how such Scheme
> > expressions in Evolution should be formed, or perhaps show me how
> > (and whether) this one can be made to work?
>
> Hi,
> I do not know whether the 'S' in 'S-Expression' means 'Scheme' (I've
> been always wondering what that letter stands for, but I was also
> always lazy to figure it out), but I'd rather suggest to use the Free
> Form Expression. It's similar, but more user friendly, I hope. In any
> case, both the GUI and the Free Form Expressions are converted into
> the
> S-Expression, because it's what is used in the background. The semi-
> documentation for the Free Form Expression can be found here:
> https://bugzilla.gnome.org/show_bug.cgi?id=550796#c10
>
> The S-Expression doesn't have any documentation. I'm not aware of any
> at least. Pointing you into the code might not be the best thing, I
> believe.
>
> Maybe it would worth to update the user documentation and add there
> some Free Form Expression examples. Such always help.
>
> Bye,
> Milan

Thank you for your reply.  I had already seen the bugzilla page you
mentioned.  This is rather cryptic for someone like me who doesn't have
any knowledge of the search syntax to start with.  But so far as I can
see, using "Free Form Expression" it is not possible to compare the
value in a specific header to another value, which is what I wanted to
do.

Perhaps it simply can't be done.

I also found this:
https://www.kernel.org/doc/mirror/ols2001/evolution.pdf
Section 4.4 has some examples of "Expressions", but no comprehensive
explanation of what is possible, and again no indication that the value
comparisons that I need can be done.

David


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

Gnome Evolution - General mailing list
In reply to this post by Gnome Evolution - General mailing list
On Sat, 2020-10-10 at 19:54 +0200, Milan Crha via evolution-list wrote:

> I do not know whether the 'S' in 'S-Expression' means 'Scheme' (I've
> been always wondering what that letter stands for, but I was also
> always lazy to figure it out),

An S-expression is a symbolic expression.  The term is from Lisp;
Scheme is a form of Lisp.
    John Sauter ([hidden email])
--
PGP fingerprint E24A D25B E5FE 4914 A603  49EC 7030 3EA1 9A0B 511E


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

Gnome Evolution - General mailing list
In reply to this post by Andre Klapper
        Hi,

On Sat, 2020-10-10 at 20:14 +0200, Andre Klapper wrote:
> "Help > Contents > Mail Management > Sorting and organizing mail >
> Searching mail > Searching Across Messages > Quick Search" bullet
> point 2 already has info for advanced users which links to the "Free
> form expression syntax".

yes, I know. I really meant examples of the expressions for some
common/useful filtering, because the description in bugzilla only
described what is available and the syntax, which is not that easy to
get right from it as it would be from the examples.

Just an idea.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: Use of Scheme in Search Folder filters

Gnome Evolution - General mailing list
In reply to this post by davidsum
On Sat, 2020-10-10 at 19:46 +0100, David Sumbler wrote:
> But so far as I can see, using "Free Form Expression" it is not
> possible to compare the value in a specific header to another value,
> which is what I wanted to do.

        Hi,
I see you are right. There are some terms like 'cast-int', but there is
no 'header-value' term. Would you mind to file a bug for evolution-
data-server [1] to have it added, please? If not possible just let me
know and I'll file it myself (I prefer to fix user bugs, not my own).
        Bye,
        Milan

[1] https://gitlab.gnome.org/GNOME/evolution-data-server/issues/new

P.S.: Reply-To-List (Ctrl+L) works better for me on this mailing list

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list