GNOME Bugzilla – Bug 714494
Extended search specifiers
Last modified: 2013-12-17 19:43:31 UTC
---- Reported by jim@yorba.org 2013-04-18 18:00:00 -0700 ---- Original Redmine bug id: 6834 Original URL: http://redmine.yorba.org/issues/6834 Searchable id: yorba-bug-6834 Original author: Jim Nelson Original description: Additional search specifies should be added to allow searching only to:, from:, cc:, and so on. We can consider using the search scope drop-down (#6832) to give the user a form to make this easier. Otherwise, they can be specified using string prefixes. Related issues: related to geary - Feature #6832: Basic search scopes (Open) related to geary - 7182: unread message count includes messages which haven't been... (Invalid) related to geary - Feature #6314: Conversation list sorting options (was: old unread conver... (Invalid) related to geary - Feature #7692: Local-only Starred folder for servers without Starred/Fla... (Open) ---- Additional Comments From geary-maint@gnome.bugs 2013-10-09 17:59:00 -0700 ---- ### History #### #1 Updated by Jim Nelson 4 months ago * **Assignee** set to _Charles Lindsay_ A first round of easy specifiers we could consider for this release: * to: * cc: * bcc: * from: * subject: * body: * attachment: It'd be nice to include these in 0.4. Other specifiers will be ticketed later. #### #2 Updated by Charles Lindsay 4 months ago I've got a decent start on this up at `bug/6834-search-columns`, if someone wants to pick it up while I'm gone. Some notes: * I might be over half way done, not counting testing? I didn't take a good inventory of what all code would need to change, but I think I'm more than half done with ImapDB.Account. * I'm not really happy with Geary.SearchQuery, but it solves all the problems we have right now (I think). * It did end up making it quicker to ignore quotes when looking at which words in the query string go toward specific fields, but given how we massage the query string to turn words into prefixes, it seems awfully limiting. * Due to how we strip bcc and don't do our own storing of sent messages on the server, the bcc column specifier will largely be useless for Geary-sent emails. It looks like in gmail, the bcc field is kept intact for your own sent mail (only verified this on emails sent to myself, might be worth more investigation). Might be worth looking at what Thunderbird-sent emails look like here. #### #3 Updated by Jim Nelson 3 months ago At #6314, a user has also requested something akin to Gmail's "is:unread". #### #4 Updated by Charles Lindsay 3 months ago * **Assignee** deleted (<strike>_Charles Lindsay_</strike>) #### #5 Updated by Jim Nelson 3 months ago * **Tracker** changed from _Bug_ to _Feature_ * **Target version** changed from _0.4.0_ to _0.5.0_ Charles got some preliminary work finished, but this isn't going to make it in to 0.4. #### #6 Updated by Charles Lindsay about 1 month ago I just rebased this branch (`bug/6834-search-columns`) on current master, in case we pick this back up soon. --- Bug imported by chaz@yorba.org 2013-11-21 20:26 UTC --- This bug was previously known as _bug_ 6834 at http://redmine.yorba.org/show_bug.cgi?id=6834 Unknown milestone "unknown in product geary. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution
There's a preliminary fix for this ticket up at wip/search-columns-714494. Some caveats: * The only supported fields are: * attachment: * bcc: * body: * cc: * from: * subject: * to: In particular, we don't support in: or account:, or has:attachment or any other fancy specifier. * We don't handle quotes very well. It would be great to be able to say [from:"some sender"], but that's impossible right now. You can't even say ["from:some sender"]; there's just no syntax for quotes if you're using :. We need to rewrite the query massager using a more sophisticated grammar.
Looks great and works great! I went ahead and filed tickets to support quoting in the extended search specifier syntax (bug #720621), "has:attachment" (bug #720624) (which isn't covered by basic search scopes (bug #714496)) and to document the new specifiers (bug #720625). Commit!
Fixed in commit:aac2956.