Agroups has the capability of applying a regular expression to the entry ids of the current group to describe a subset. The regular expression can then be applied to an Agroups operation that operates on one or more entries, but in the case of the regular expression operates only on the subset described by the regular expression. For example the user could specify a regular expression to display all entries in a group that match that regular expression or use a regular expression to move all matched entries in a group to someplace else.
We use the Emacs abbreviation of "regexp" in this chapter where a regular expression needs to be formed by the user. If you don't know how to form regular expressions or what they mean you should read the chapter in the Emacs manual on Regular Expressions.
The following operation allows you to create a regexp and apply it to some operation
Apply regular eXpression to operation (keys: x)
This works as sort of an operation prefix on some other operation
KA KO x <regexp> <some operation>
where the user enters the regexp followed by a RET and then some operation. That operation will then be applied to the subset of entries described by the regexp applied to the ids of the entries of the current group. For example while
KA KO d
would display all of the entries in the current group, the following
KA KO x [Ww]ork RET d
would display the subset of all those entries with the words "Work" or "work" in their ids. In a similar way the keys
KA KO x [Ww]ork RET m
would move that subset of entries to a selected group.
The previous section describes how to apply a regexp to the entry ids of the current group for some operation. When this is done that regexp is recorded as the "last regular expression". The last regular expression can then be used with the operation
Apply last regular eXpression to operation (keys: C-x)
It works exactly the same way as the x operation in the previous section but the regexp does not have to be reentered. For example if, as in the previous section, the user typed
KA KO x [Ww]ork RET d
to display the subset of entries that match the regexp "[Ww]ork" then subsequently the user could type simply
KA KO C-x m
to move that subset to another group,
The last regexp expression keeps its status until another regexp is entered with the x operation described in the previous section.
Although applying regexps to operations is pretty straight forward some things need to be mentioned about some of the specifics for various operations.
On move operations when a subset of entries is moved they can never be moved to the top level even if there are groups in that subset. Also when a regexp subset is moved no ambiguous keys resolution is performed on the target group, See section Ambiguous Keys Resolution.
On the edit entry operation the regexp subset of entries will be asked to be edited successively. You can abort out of this editing loop with a C-g as usual.
Go to the first, previous, next, last section, table of contents.