Opened 15 years ago
Last modified 4 years ago
#5141 new enhancement
Generating queries for related mails in Mail — at Initial Version
Reported by: | humdinger | Owned by: | bga |
---|---|---|---|
Priority: | normal | Milestone: | R1.1 |
Component: | Applications/Mail | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This ticket is the result of discussions on the [http://www.freelists.org/post/haiku-development/Working-on-Haikus-Mail-app dev mailing list] and [http://www.freelists.org/post/haiku-cdt/Mail-GUI-and-Queries-was-haikudevelopment-Re-Working-on-Haikus-Mail-app cdt mailing list].
The idea behind this ticket is to integrate queries with the Mail application.
Often when reading a mail, you're interested in all mails with the same subject (thread) or the same sender (or, when writing a mail, the same recipient). Sometimes it's also useful to limit the search to a certain timeframe (mostly when querying a very active sender).
Creating a query for those is unnecessarily cumbersome. As the currently open mail already has all the needed info, launching a query (via Tracker scripting?) from within Mail makes sense.
We already have a (non-working) Queries menu (ticket #1208) and could use an additional Queries toolbar button (which is not strictly necessary, but users relying on the toolbar would also want to access queries from there, I imagine).
Another option is to also provide a context menu on header information, so a right-click on e.g. the sender would show the below discussed menu item (here: "Same Sender... >") in addition to other options, like "Copy to Clipboard", "Add New People File" (if it doesn't already exist) etc.
The queries menu
____________ |_Queries___|_____________ | | | Same Subject... > | | Same Sender... > | | Same Mailing List... > | | Same Status... > | |------------------------| | All in Timeframe > | |------------------------| | { User Query 1 }... > | | { User Query 2 }... > | | { User Query 3 }... > | | { User Query 4 }... > | |------------------------| | Edit User Queries... | |________________________|
What exact queries will be provided remains to be discussed. "Same Mailing List" appears only if the To:-field and your Account:-field don't match - a sign of a mailing list. The menu also changes when writing a new mail: here "Same Sender" is replaced with "Same Recipient".
Besides the default queries, you can add user queries which are any query you put in "~/config/settings/Mail/User Queries". Only the empty attribute fields of those queries are replaced with the corresponding values of the current mail. Filled in values will remain untouched.
That way more complex queries can be used, like "Same Subject && Same Sender" or "Same Sender && Subject!="*[haiku-commits]*"".
Every menu item has a submenu to optionally limit the query to a certain timeframe.
You don't have to enter the submenu, if you just click on "Same Subject..." the query starts immediately showing all mail of that subject without timeframe limit. ("All in Timeframe" being the exception, of course...). This is similar to the "Open... >" menu in other apps, that provide a submenu with recent documents, but show the open file dialog when just clicking the menu item.
The timeframe submenu
____________ |_Queries___|_____________ | ___|_______________ | Same Subject... |_____Timeframe_____| | Same Sender... | | | Same Mailing List..| Since 4 hours > | | Same Status... | Today > | |--------------------| Since 3 days > | | All in Timeframe | Since 2 weeks > | |--------------------| Since 6 months > | | { User Query 1 }...|___________________| | { User Query 2 }... > | | { User Query 3 }... > | | { User Query 4 }... > | |------------------------| | Edit User Queries... | |________________________|
The timefame submenu of every menu item only provides Today and the units hours/days/weeks/months. The value is set in the next deeper submenu. These values are remembered for each menu item.
I expect a user to mostly reuse the once set value as it's only meant to roughly limit the timeframe of his query results.
The value submenu
____________ |_Queries___|_____________ | ___|_______________ | Same Subject... |_____Timeframe_____| | Same Sender... | | | Same Mailing List..| Since 4 hours >_|_ | Same Status... | Today | 1 | |--------------------| Since 3 days | 2 | | All in Timeframe | Since 2 weeks | 3 | |--------------------| Since 6 months | 4 | | { User Query 1 }...|________________| 5 | | { User Query 2 }... > | |_6_| | { User Query 3 }... > | | { User Query 4 }... > | |------------------------| | Edit User Queries... | |________________________|
Depending on the unit, more or fewer values should be provided.
- hours: 1,2,3,4,5,6,9,12 (then you can switch to today)
- days: 1,2,3,4,5,6 (then you can switch to week)
- weeks: 1,2,3 (then you can switch to month)
- months: 1,2,3,6,12 (then you'll skip the timeframe altogether)
Fuzzy Query
Before the query string is generated, it should be "fuzzied". For example:
If the from-field is "Stephan Assmus <superstippi@…>" the query should be for "Stephan Assmus" ||
"superstippi@…".
If the subject is "[haiku-3rdparty-dev] Re: Capturing the "NTCH" message" it should be stripped to a significant part "Capturing the "NTCH" message". So, for example, everything in front of and including a "Re:" or "Fwd:" and other possibly localized abbreviations generated by some mail client, is replaced with a "*".
Plus, any special characters that apparently happen to be inserted, have to be cleaned first.