Commit Graph

542 Commits

Author SHA1 Message Date
attila f5a5cde965 Fix core dump in mu-server (at least) for cmd:extract index:0 ... 2015-06-30 16:28:26 -05:00
djcb 7eb244b3b0 mu: don't use __FUNCTION__, use __func__
__FUNCTION__ is deprecated and gives compilation warnings. __func__ is
standardized in c99.
2015-04-22 21:06:31 +03:00
djcb 455582401e date-parsing: don't lowercase date range strings
Allow them to be received unmolested in mu_date_parse_hdwmy
2015-03-22 10:24:14 +02:00
djcb 3c104dfdf4 mu: deactivate unit test for mu_util_dir_expand
The test fails in some cases with interesting directory setups, although
the function does work. So de-activate the test for now, until we come
up with a better one.
2015-03-15 13:26:56 +02:00
djcb 9d8dfcaedd Merge branch 'master' of github.com:djcb/mu 2015-03-06 00:14:59 +02:00
djcb baebd53fb8 Fix a core dump under OpenBSD
Based on a patch by StAlphonsos
2015-03-06 00:12:34 +02:00
djcb d3457ec56c fix compiler warning 2015-02-21 14:18:24 -08:00
Sebastien Le Maguer 2e027c57ed fix for #587 2015-02-20 14:50:11 +01:00
Foivos S. Zakkak 3cfb5b0795 Add FIXME comment for lost "signed" flag 2015-02-16 02:12:16 +02:00
Foivos S. Zakkak edd463186e Fix handling of only signed messages 2015-02-16 01:56:11 +02:00
Foivos S. Zakkak 8456c1c2dc Fix #280
Since `parent` is not really used as a parent, I use it as the last
visited encrypted part while going down the parts-tree.

At the decryption of a part (`mu_msg_crypto_decrypt_part`) I check,
through the GMimeDecryptResult, for signatures (`check_decrypt_result`)
and add them to the part (`tag_with_sig_status`).  Any nested parts hold
that encrypted part as their parent.  Finally at `handle_part`, for each
part I check if it a descendent of an encrypted part.  If so, I proceed
checking for signatures and adding them to the `msgpart`.
2015-02-16 01:19:32 +02:00
djcb c6dd538975 mu-msg-part.c: some cosmetic changes 2014-10-19 11:38:49 +03:00
Foivos S. Zakkak 8f8bc52023 Revert "Do not handle signature parts after verification"
This reverts commit 6e9b9ad2d0.

Unfortunately the reverted commit breaks the Signature field for
encrypted and, at the same time, signed messages.

TODO: details button in the Signatures field does not work for such
cases because the signature is encrypted.

Conflicts:
	lib/mu-msg-part.c
2014-10-19 03:39:32 +03:00
Foivos S. Zakkak 2d843ca887 Add Decryption field
Add a decryption field of the form

Decryption: 2 part(s) decrypted 1 part(s) failed

Meaning that 2 encrypted mime parts where successfully decrypted and 1
part failed.  Note that the number 2 refers to the number of
successfully decrypted mime parts and not the number of successfully
decrypted encryptes multiparts, i.e., if an encrypted multipart
contains 4 parts and decryption is successful the field will be

Decryption: 4 part(s) decrypted

TODO: Add details button listing the names and indexes of the
decrypted (or not) mime-parts
2014-10-19 03:27:58 +03:00
Dirk-Jan C. Binnema ae75060b6a Merge pull request #498 from zakkak/skip_signatures
Do not handle signature parts after verification
2014-10-18 13:16:44 +03:00
Foivos S. Zakkak 6e9b9ad2d0 Do not handle signature parts after verification
Since signatures are not listed as attachments there is no reason to
handle them after the verification.
2014-10-18 12:44:33 +03:00
Foivos S. Zakkak a79cd23cd1 Improve decrypt failure handling
On failure to decrypt, list the encrypted part as an attachment
2014-10-18 12:33:20 +03:00
Foivos S. Zakkak c40522b632 Fix #494. Start indexing from 1 instead of 0 2014-10-17 15:53:32 +03:00
Dirk-Jan C. Binnema ee7eb9c142 Merge pull request #487 from zakkak/master
Fix encrypted multiparts and attachments indexing
2014-10-14 11:46:39 +03:00
Foivos S. Zakkak a6a58b65f1 Remove left over argument from merge 2014-10-13 13:27:47 +03:00
djcb ace922317f threader: try to handle pathless messages 2014-10-13 09:56:39 +03:00
Foivos S. Zakkak 6f50298667 Fix encrypted multiparts and attachments indexing
Pull request #483 does not handle encrypted multiparts properly.  It
used to just verify the signature and not process the parts of the
multipart.  This commit resolves this issue.

Additionally it did not index attachments properly and in the case of a
multipart directly containing more than one multiparts resulted on non
unique indexing of attachments/parts.  This commit resolves this issue
as well.
2014-10-12 22:43:58 +03:00
djcb ac023b74a7 mu-msg-crypto: give better error when gpg is not found
also fixes some other warnings
2014-10-11 14:05:08 +03:00
djcb 99f08c50c4 mu-threader: debugging for some reported problem in find_or_create 2014-10-11 14:04:17 +03:00
Foivos S. Zakkak 51037be7fb Fix #186 Part 3
This patch fixes the attachment extraction (open, save, temp) when using
`mu4e`.  `mu4e` used to not notify the mu-server about the
mu4e-decryption-policy.  As a result mu-server did not decrypt the
attachments for extract, open, or temp.
2014-10-10 18:34:57 +03:00
Foivos S. Zakkak 29e53d2eba Fix gpg decryption (#186)
After a multipart/encrypted part gets decrypted the result is usually a
`multipart/mixed` part (see enigmail).

Before this commit mime multiparts where handled only by
`g_mime_message_foreach`.  As a result the decrypted mime multiparts
where not processed.

This patch handles mime multiparts explicitly by removing the
`g_mime_message_foreach` invocations.  This might come at the cost of
reduced maintainability, in the case of radical gmime changes.  However,
gmime is pretty stable and that scenario is highly unlikely.

TODO: After decryption make any attachments available
2014-10-10 07:48:24 +03:00
djcb ff25bf1a25 Don't use g_clear_pointer yet, it's too new.
Do it the old way.
2014-09-26 15:22:07 +03:00
djcb 3c7061338d Rework getting database version (#469)
It seems we don't get the correct database version in some case with
some compilers, optimization flags. Suspecting some stale ->c_str().
2014-09-23 07:32:39 +03:00
Jakub Sitnicki c9cb27be11 mu: Make mu_container_splice_grandchildren() do only one thing
Don't kill the resultant childless container when promoting its
children. This unifies the behavior of mu_container_splice_*()
functions.
2014-08-15 10:11:21 +02:00
Jakub Sitnicki bb0cc542b8 mu: Prune empty containers from the root set after splicing their children
When the root set contains only one empty container with one child
first promote the child container to the root set and only then
remove the empty parent container so that the root set never goes
empty.

Also make mu_container_splice_children() do only one thing, that is
promote one container's children to be another container's siblings.
The resultant childless container is no longer removed by this
function.

Fixes #460.
2014-08-15 10:10:39 +02:00
Jakub Sitnicki ede481d4c0 mu: Test splicing child containers when there is only one thread
This test reproduces a regression introduced by commit 97101f1f82
("mu: Prune empty container when an only child gets promoted to the
root set").

When the results of a mu-find query contain only a one thread:

$ mu find --threads --fields 'd s' ''
Sat 09 Aug 2014 07:00:00 PM CEST [mu4e] Test Message
  `-> Sat 09 Aug 2014 08:30:00 PM CEST Re: [mu4e] Test Message

... and we narrow down the query in such a way that the root message
gets excluded, then a crash occurs:

$ mu find --threads --fields 'd s' '' date:2014-08-09/20:00..2014-08-09/21:00
**
ERROR:mu-container.c:117:mu_container_append_siblings: assertion failed: (c)
Aborted (core dumped)

Reported-by: Josiah Schwab <jschwab@gmail.com>
2014-08-15 10:10:39 +02:00
Jakub Sitnicki 32f5c8b1f6 mu: Sort containers by comparing their subtree leaders
Traverse the container tree depth first and for each container find
the node in the subtree rooted at this container which comes first in
the descending sort order. Remember it as the subtree leader. Then,
while sorting siblings, compare their subtree leaders instead of the
sibling containers themselves.

IOW, make threads containing the newest message float to the top when
sorting by date in the descending order.

There is no significant performance degradation when sorting a
mailbox with ~16k messages:

$ mu find maildir:/INBOX | wc -l
16503

Current state:

$ perf stat --event=task-clock --repeat=10 -- \
  mu find maildir:/INBOX -n 1 -t > /dev/null

 Performance counter stats for 'mu find maildir:/INBOX -n 1 -t' (10 runs):

       1231.761588      task-clock (msec)         #    0.996 CPUs utilized            ( +-  1.02% )

       1.236209133 seconds time elapsed                                          ( +-  1.08% )

With patch applied:

$ perf stat --event=task-clock --repeat=10 -- \
  mu find maildir:/INBOX -n 1 -t > /dev/null

 Performance counter stats for 'mu find maildir:/INBOX -n 1 -t' (10 runs):

       1459.883316      task-clock (msec)         #    0.998 CPUs utilized            ( +-  0.72% )

       1.462540088 seconds time elapsed                                          ( +-  0.77% )

This implements https://github.com/djcb/mu/issues/164.
2014-07-15 07:25:51 +02:00
Jakub Sitnicki 619fb86885 mu: Update container's pointer to last sibling when converting from a list 2014-07-15 07:25:51 +02:00
Jakub Sitnicki 97101f1f82 mu: Prune empty container when an only child gets promoted to the root set 2014-07-15 07:25:51 +02:00
Jakub Sitnicki f724f4a57d mu: Consider an empty container to be less than anything else
Reasoning being that, arguably, it is the least surprising thing to do.
2014-07-15 07:25:50 +02:00
Jakub Sitnicki dc3be515af mu: Extract function for comparing two containers 2014-07-15 07:25:50 +02:00
Jakub Sitnicki d93b8135a6 Revert "* bugfix for issue 164"
This reverts commit c7b28419ab.

The reverted change fails to sort threads correctly when there is an
empty container, serving as a parent to orphan messages, in the thread
tree as demonstrated by the test in commit f49296759e ("tests:
threads: Test if orphan message promotes its thread").

Also, the reverted commit introduces a performance hit. The time it
takes to sort threads has increased roughly by a factor of 4.

Current state:

$ perf stat --event=task-clock --repeat=10 -- \
  mu find maildir:/INBOX -n 1 -t > /dev/null

 Performance counter stats for 'mu find maildir:/INBOX -n 1 -t' (10 runs):

       4967.692519      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.14% )

       4.969247128 seconds time elapsed                                          ( +-  0.14% )

With the reverted patch applied:

$ perf stat --event=task-clock --repeat=10 -- \
  mu find maildir:/INBOX -n 1 -t > /dev/null

 Performance counter stats for 'mu find maildir:/INBOX -n 1 -t' (10 runs):

       1231.761588      task-clock (msec)         #    0.996 CPUs utilized            ( +-  1.02% )

       1.236209133 seconds time elapsed                                          ( +-  1.08% )

The benchmark was ran on a maildir with ~16k messages:

$ mu find maildir:/INBOX | wc -l
16503
2014-07-15 07:24:56 +02:00
Jakub Sitnicki 856a651d38 tests: threads: Test if grandchild message promotes only its subthread 2014-07-15 07:24:47 +02:00
Jakub Sitnicki cbfe28b885 tests: threads: Test if grandchild message promotes its thread 2014-07-15 07:24:21 +02:00
Jakub Sitnicki b0357a2d7a tests: threads: Test if child message doesn't promote its thread 2014-07-15 07:23:53 +02:00
Jakub Sitnicki c5d4f7f338 tests: threads: Test if 2nd child message promotes its subthread 2014-07-15 07:22:53 +02:00
Jakub Sitnicki 22927a7dcf tests: threads: Test if 1st child message promotes its thread 2014-07-15 07:22:11 +02:00
David C Sterratt f0510fbf35 Potential fix for issue #433: make check fails on Scientific Linux 6 2014-06-05 14:07:13 +01:00
Alex Bennée 29a16d7ae1 lib/mu-str.c: squash white space ctrl chars to spaces
When processing multiple lines for a subject line separated by TAB
characters we don't want to eliminate the control character totally but
replace it with a simple space. I've left the control handling as before
for non-white space characters.

Signed-off-by: Alex Bennée <alex@bennee.com>
2014-05-06 10:04:26 +01:00
djcb 0c18a0b816 * mu: store date as 0 if it does not exist; this allows searching 2014-03-22 18:51:39 +02:00
omfgroflbbq c7b28419ab * bugfix for issue 164 2014-03-20 16:22:50 +01:00
djcb 3edf950fc2 * mu_str_asciify_in_place: fix test to decide whether to replace 2014-02-15 13:20:17 +02:00
djcb 599d641034 * lib: fix broken unit test 2014-01-15 21:27:18 +02:00
djcb 0277967b53 * mu-store-read: cleanup function a bit
(fruitlessly trying to track down
       https://code.google.com/p/mu0/issues/detail?id=80)
2013-12-21 10:14:31 -08:00
djcb c48d290699 * minor update 2013-12-21 10:01:04 -08:00
djcb 0364433cc1 * minor 2013-12-01 20:21:44 +02:00
djcb c36030a086 * handle message-ids a bit specially, update unit tests 2013-10-13 20:05:29 +03:00
djcb edfdef44a4 index: improve error message when file does not seem to be an email 2013-10-13 19:58:25 +03:00
djcb c898265ee5 * use timegm instead of the tzset hack 2013-10-07 00:50:36 +03:00
djcb cdb1af046f * fix the mu_util_fputs_encoded/bsd heisenbug
it seems g_locale_from_utf8 behaves a bit differently on bsd/macosx,
  causing a segfault (but when run under gdb!). this code path was hit
  for messages with encoding problems in non-utf8 locales
2013-09-07 18:39:00 +03:00
djcb af55f4cf9e * update mu_date_str_to_time_t for macos
at macos this function /seemed/ to massively leak, when looking at the
  valgrind output on macos (but not linux). with this update, this
  leak(?) is gone.
2013-09-07 13:12:28 +03:00
djcb 827dfbecdb * mu-date: small optimization 2013-09-07 12:57:53 +03:00
djcb 13bad9a889 * better error message for some broken queries 2013-09-07 09:43:33 +03:00
djcb c30ffeea72 * small cleanups (macos) 2013-08-25 20:05:57 +03:00
djcb f89447e65c * mu_util_fputs_encoded: updated; perhaps helps with freebsd crash? 2013-08-14 21:59:31 +03:00
djcb 885554757a * mu: some improvement in script handling 2013-07-23 22:23:27 +03:00
djcb b7324d5af6 * cleanup: drop gmime-2.4 support 2013-07-21 14:44:44 +03:00
djcb b17f26537b * mu: unbreak unit test after flag changes (fixes #247) 2013-07-07 10:46:35 +03:00
djcb 312c3a4b20 * cosmetic 2013-07-03 21:56:42 +03:00
djcb 3c3cd31607 * mu-str: fix a leak 2013-07-03 21:56:04 +03:00
djcb 1fcedf742c * mu-mgs-store: support the MU_FLAG_LIST flag 2013-07-03 21:55:41 +03:00
djcb 3eb748737c * mu-msg-file: set the MU_FLAG_LIST flag, if the message looks like an ML-message 2013-07-03 21:55:17 +03:00
djcb 81c3e11c48 * mu-flags: add MU_FLAG_LIST, clean-up code a bit 2013-07-03 21:54:08 +03:00
djcb 7fe37334b5 * cosmetics 2013-06-24 22:44:36 +03:00
djcb 97909566df * mu-contacts, mu-msg-file: better deal with contacts with control chars 2013-06-24 22:42:18 +03:00
djcb 6783e448aa * mu-str: add mu_str_remove_ctrl_in_place 2013-06-24 22:41:34 +03:00
djcb bfe74d1d11 * mu: add the backend for freq information for contacts 2013-06-16 23:02:19 +03:00
djcb 42604fee00 * lib: mu-contacts: store frequency 2013-06-16 13:14:39 +03:00
djcb fa514435ea * merge branch 'master' of github.com:djcb/mu 2013-06-13 23:56:35 +03:00
djcb 13efc74793 * mu-query: better handle empty lhs/rhs in date intervals 2013-06-03 22:29:50 +03:00
djcb 844790a2df * lib: mu date: better handling of date fields in newer xapians 2013-06-01 07:40:15 -07:00
djcb d57b109557 * mu-str: treat '..' in non-range fields differently 2013-06-01 06:07:29 -07:00
djcb e7c63cee47 * update some unit tests 2013-05-30 06:15:22 -07:00
djcb b136ca0411 * try harder to match special strings 2013-05-29 07:33:17 -07:00
djcb e97ec2d51c * fix matching backslashes, add some tests 2013-05-27 05:49:43 -07:00
djcb bdf7ca65c7 * test-mu-maildir: fix regexp 2013-05-27 05:48:19 -07:00
djcb c50c0695e4 * fix CSV quoting (fields with commas) 2013-05-27 04:23:49 -07:00
djcb 3dae623879 * add mu_str_replace 2013-05-26 11:16:02 -07:00
djcb ad6b3d8f0f * add unit test for the optional message file renaming 2013-05-25 19:28:40 +03:00
djcb 7cb3bb9e36 * lib: make renaming messages upon moving them optional 2013-05-25 19:27:54 +03:00
djcb 33e6bf0184 * mu-str: comment-out debug print 2013-05-23 07:47:39 +03:00
djcb 2ae389afe1 * typo 2013-05-22 00:07:01 +03:00
djcb 89bdaafb15 * create a new filename (basename) when copying 2013-05-22 00:06:10 +03:00
djcb 10b64bb654 * cosmetic 2013-05-21 08:05:14 +03:00
djcb e70101f058 * lib: fix compiler warning 2013-05-20 05:15:11 +03:00
djcb 59f855b39b * lib: add mu_str_parse_arglist + unit tests 2013-05-20 05:14:35 +03:00
djcb a2eef4fa41 * handle invalid utf8; fixes #211 (hopefully) 2013-05-15 21:36:27 +03:00
djcb f270847182 * lib: fix body layout 2013-05-15 00:42:33 +03:00
djcb 00d0cb0f28 * the query parser update (few commits back) fixes #210 too, this is unit test for it. 2013-05-15 00:17:36 +03:00
djcb f787f3b9ee * lib: cleanup header fields a bit more; fixes #209 2013-05-15 00:08:38 +03:00
djcb 24fa47dbef * cosmetics 2013-05-15 00:05:21 +03:00
djcb 50fc992ae2 * fix list parsing 2013-05-13 23:01:53 +03:00
djcb 4174ac7ed2 * fix a few compiler warnings 2013-05-13 22:30:27 +03:00
djcb ba2a56a9dd * lib: fix list parsing 2013-05-13 00:26:14 +03:00
djcb 5d069e786f * lib: updates for mu-msg-field / mu-str updates 2013-05-13 00:03:47 +03:00
djcb 31c3c3cfda * mu-msg-fields.[ch]: cleanup a bit 2013-05-13 00:03:06 +03:00
djcb ea67447a98 * some cleanups 2013-05-13 00:02:39 +03:00
djcb d26f3c0bae * mu-str: simplify, cleanup string pre-processing functions 2013-05-13 00:01:49 +03:00
djcb 5c95a1851d * lib: update comment 2013-05-04 14:14:58 +03:00
djcb 057fa6430e * mu: fix duplicate detection 2013-04-30 21:53:16 +03:00
djcb 7d48ed53a7 * mu: (re)add special handling for '$' (fixes #193) 2013-04-28 21:54:25 +03:00
djcb 3327a5566f * minor 2013-04-18 20:31:42 +03:00
djcb f8719ba263 * mu: treat as \ as special, too 2013-04-18 20:31:28 +03:00
djcb 55acd92bd9 * mu: fix some valgrind reports 2013-04-18 00:12:37 +03:00
djcb 88520e45ec * mu-store-write: fix small leak 2013-04-17 00:16:26 +03:00
djcb a5001acff0 * mu: more 'fixing'/'massaging' of queries 2013-04-17 00:09:08 +03:00
djcb 8c0b7eb92a * mu-msg-part: don't free wrapper, we don't own it 2013-04-17 00:07:05 +03:00
djcb 7c53aa327c * mu: handle addresses thay go beyond xapian's max term length (fixes issue #183)
(we truncate them)
2013-04-09 22:01:36 +03:00
djcb 3dc98724b3 * mu: provide fake-msgids for messages without; this fixes the problem where e.g. draft messages
were not visible when using --include-related
2013-04-09 21:20:25 +03:00
djcb 21a216acd2 * cosmetic 2013-04-07 16:05:10 +03:00
djcb 26b184c710 * mu-store-priv: when rebuilding, remove the contacts-cache file, too 2013-04-07 16:04:49 +03:00
djcb f19500a1eb * mu-str: fix potential leak 2013-04-07 16:04:20 +03:00
djcb a8489dc048 * mu-msg: initialize potentially uninitialized var 2013-04-07 16:04:00 +03:00
djcb 4cfeb201af * mu-contacts: convert the domain part of ascii-domains to lowercase 2013-04-07 16:03:25 +03:00
djcb 1f24e224a9 * more more copyright year updates 2013-03-30 11:38:01 +02:00
djcb 855e81db99 * update copyright years 2013-03-30 11:32:07 +02:00
djcb 22a30bf30b * mu: allow for searching the mailing-list field (list:/v:) 2013-03-17 12:20:10 +02:00
djcb 342195a248 * mu: fix pre-condition warning when getting related messages without threads 2013-03-16 18:25:19 +02:00
djcb 332554c2b0 * mu: update unit test (after more eager address matching) 2013-02-12 00:00:40 +02:00
djcb 564d3a3cd7 * cosmetic 2013-02-11 23:40:26 +02:00
djcb 89c555d047 * minor 2013-01-13 22:50:07 +02:00
djcb bb2b65220a * for email address foo@bar.com, also save "foo" and "bar.com" so you can
search for them
2013-01-13 22:49:49 +02:00
djcb f5f8d6de70 * mu_store_needs_upgrade --> mu_store_versions_match 2013-01-06 15:53:42 +02:00
djcb e8f4f5976d * some minor updates in mu-store version check 2013-01-06 12:40:49 +02:00
djcb 9beed7042b * mu-store-write.cc: fix handling of str_list fields during indexing (Abdo Roig-Maranges) 2013-01-04 21:10:39 +02:00
djcb 70356a62f5 * mu-query/mu-msg-iter: when showing related message (--include-related),
favor the ones that were in the original set
2012-12-28 14:48:00 +02:00
djcb a0d8d4f5da * use Abdo's threading improvements 2012-12-28 12:50:29 +02:00
djcb f176c025d3 * add references unit test 2012-12-28 12:50:02 +02:00
djcb deb862a488 * fix broken references: don't comma-separate 2012-12-28 12:49:31 +02:00
djcb 12f307c1b3 * mu-query: no need for sorting the first query when we do the sorting later 2012-12-27 16:00:13 +02:00
djcb 3d875307e2 * mu-msg-iter: temporarily disable skipping duplicates when threading
(we need thread-info for all duplicates too, since we do not know which one
  will end up in the final result set)
2012-12-27 15:59:15 +02:00
djcb 5310930ab8 * make sure tags are store in the database; this prevents reading the message
file when getting headers
2012-12-27 15:57:17 +02:00
djcb 05b04bdaed * mu-msg-iter.cc: don't skip dups on when threading
(due to sorting, we do not know if the same message are 'dup' or 'original'
  in the final results, so we need to calculate threading info for both)
2012-12-27 12:07:43 +02:00
djcb c6a4e8f9ad * mu-query: re-introduce MU_QUERY_FLAG_THREADS, and only calculate threads for
the _second_ query when doing an --include-related query
2012-12-27 11:09:05 +02:00
djcb 99f473945e * mu-msg-iter: re-introduce MU_MSG_ITER_FLAG_THREADS, and special-case queries
with thread support
2012-12-27 11:07:52 +02:00
djcb e387311c72 * mu-msg-file: guess 'mailing list' for feed2imap messages 2012-12-26 12:48:32 +02:00
djcb e456998e7d * mu-query: create the query in a smarter way, which makes --include-related *much* faster 2012-12-26 10:12:25 +02:00
djcb 27a80dcb67 * handle the no-matches-found case correctly 2012-12-25 20:33:02 +02:00
djcb c0a9102c6b * cosmetic 2012-12-25 19:43:06 +02:00
djcb f525c54356 * mu-msg-iter.cc: get /all/ matches on the first go, thread those, then return
maxnum

  in situations where the number of matches is significantly greater than
  maxnum, results are much better this way.
2012-12-25 18:49:14 +02:00
djcb 7856ac939e * mu-query: implement MU_QUERY_FLAG_INCLUDE_RELATED, make threading non-optional 2012-12-25 17:34:24 +02:00
djcb 03921e6cf1 * mu-msg-iter: add mu_msg_iter_get_thread_id, make using threads non-optional 2012-12-25 17:32:43 +02:00
djcb 1a14d19cad * mu-util: add mu_util_get_hash (refactored) 2012-12-25 16:45:05 +02:00
djcb 19a0c1c478 * mu-msg, mu-msg-file: update doc for get_references a bit 2012-12-25 16:44:26 +02:00
djcb a625371da2 * lib/: a the thread-id field, store it in the database 2012-12-25 16:43:34 +02:00
djcb 58f5e39d34 * add support for finding related messages to mu-find, mu4e, this does *not*
include the actual implementation though
2012-12-25 11:58:32 +02:00
djcb f366c0f680 * mu-msg-iter: add mu_msg_iter_get_msgid and mu_msg_iter_get_refs 2012-12-24 14:59:48 +02:00
djcb 836c932f2a * mu-msg-iter.cc: cleanup the skip-dup checking a bit; in particular, include
the first one
2012-12-24 12:06:09 +02:00
djcb c36906a254 * mu-msg-iter.cc: if we're using threaded search results, get *all* matches,
calculate threads and then return maxnum matches
2012-12-23 16:42:44 +02:00
djcb d17dba683f * mu-script: don't use getline, use GIOChannel 2012-12-23 15:24:52 +02:00
djcb 5d63663ac6 * back out the threading patch for now, it gives errors
ERROR:mu-container.c:182:mu_container_append_children: assertion failed: (c != child)
2012-12-23 01:14:00 +02:00
djcb c5f8ea6451 * use AM_CPPFLAGS instead of INCLUDES 2012-12-22 22:54:50 +02:00
djcb 4f37e979e1 * some small improvements for the mailing list support 2012-12-22 21:57:49 +02:00
djcb 4c47b0b122 * mu-msg-iter.cc: improve dup checking 2012-12-22 21:12:11 +02:00
djcb a287074f7b * match all fields in query with explicit prefix 2012-12-22 11:47:20 +02:00
djcb 90b2228b2e * match all fields in query with explicit prefix 2012-12-22 11:46:36 +02:00
djcb d6332f3cc8 * mu-query: minor updates 2012-12-20 23:37:04 +02:00
djcb e883ef5a07 * mu-msg-sexp: propagate mailing list info to mu4e 2012-12-20 23:36:28 +02:00
djcb d47a687a4d * lib/: add support for getting mailing lists 2012-12-20 23:35:53 +02:00
djcb 7053582dd7 * add skipping-dups support to mu4e 2012-12-17 22:30:26 +02:00
djcb 76adc694c0 * add basic support for skipping dups, unreadable messages in mu-msg-iter 2012-12-17 22:29:39 +02:00
djcb 1872d210c9 * add support for searching the mailing list of a message 2012-12-17 22:24:19 +02:00
djcb 2f9dd78bb0 * add query flags (which match msgiterflags) to mu_query_run, update callers 2012-12-16 15:08:34 +02:00
djcb 8fdd82d549 * mu-msg-iter.{cc,h}: make flag names a bit clearer 2012-12-16 15:08:03 +02:00
djcb 4ccfe56e41 * cosmetic 2012-12-16 14:18:31 +02:00
djcb 9c0ec479f5 * mu-query: update for mu-msg-iter updates 2012-12-16 14:18:22 +02:00
djcb 50f5c7affb * mu-msg-iter: add basic implemenation of checking for msgid dups, msg file
existence
2012-12-16 14:17:58 +02:00
djcb cbbb23c13f * Fixes for the threading algorithm (thanks to Abdó Roig)
The problem was that once a container got a parent, it did not change it anymore
  due to the child_elligible condition, but the parent might have been assigned
  from an incomplete References sequence.

  Now, we make sure the last reference gets to be the message's parent (following
  the JWZ's algorithm), reparenting the message if necessary. This makes sense, as
  the last parent-child relationship (between last ref and the message) is the
  most reliable piece of info here.

  Instead of child_elligible, we now only check that the new parent is not a
  descendant of the current message, to prevent making a loop. Everything else is
  fine, as it only moves a subtree around.
2012-12-09 13:48:22 +02:00
djcb 241af50e97 * update / add testcases for string normalization 2012-12-09 13:34:16 +02:00
djcb 58599ab8f9 * fix bug normalizing mixed (e.g. Latin etc. and Cyrillic) uf8 text 2012-12-09 13:33:45 +02:00
djcb 30f93663b0 * lib: do some more escaping of body text 2012-11-18 22:09:56 +02:00
djcb ef1791ec7c * support single dates (shortcut for ranges) in queries (thanks to Eygene Ryabinkin) 2012-11-17 21:25:09 +02:00
djcb 8e60018176 * fix test-mu-maildir unit test for running as root 2012-11-08 22:31:51 +02:00
djcb 89c78d6767 * fix typo 2012-11-08 22:20:31 +02:00
djcb e5425081cc * remove hard dependency on wordexp.h (OpenBSD does not have it) 2012-11-08 22:19:28 +02:00
djcb aaec71634e * cosmetics 2012-10-31 20:36:02 +02:00
djcb 32c0173b4e * lib: doxygen support (WIP, just starting...) 2012-10-27 14:42:21 +03:00
djcb ec25124693 * cosmetic / minor 2012-10-27 14:41:20 +03:00
djcb 412de6f4aa * mu: allow 'recip:' in queries as a shortcut for "to:foo OR cc:foo OR bcc:foo" 2012-10-25 12:28:55 +03:00
djcb f19ede80ce * mu: small error-handling improvement 2012-10-24 23:49:54 +03:00
djcb a01196499f * mu-cfind: some cleanups / better help 2012-10-24 23:47:47 +03:00
djcb b2b18aee75 * lib: fix mu-script for !BUILD_GUILE 2012-10-24 15:48:07 +03:00
djcb 11ecc65109 * update (C) years 2012-10-24 11:42:57 +03:00
djcb 94fcf1c5ad * mu: small cleanups to pass 'make cc10', 'make line35' 2012-10-23 20:57:46 +03:00
djcb bc90df6c53 * cosmetics / minor 2012-10-23 20:29:24 +03:00
djcb 07890463a7 * mu: express tags in mu-msg-sexp (thanks to Abdó Roig) 2012-10-22 23:52:17 +03:00
djcb 5c301f71ec * mu: update mu script 2012-10-22 23:16:01 +03:00
djcb 34f47ae5ca * cosmetics 2012-10-22 23:15:28 +03:00
djcb 12eebbcc23 * mu: support description fields in stat scripts, some refactoring 2012-10-21 17:20:20 +03:00
djcb 80099e6f19 * mu: refactor mu-script (stats) a bit 2012-10-21 15:52:34 +03:00
djcb 7915cafdee * mu: add the 'mu stats' command (WIP) + some refactoring 2012-10-19 00:51:04 +03:00
djcb da9c4bf4f7 * lib: add mu_util_support and mu_util_program_in_path + unit tests 2012-10-18 12:11:43 +03:00
djcb 48467099b5 * mu: add 'contact:' as an alias for to:/from:/cc:/bcc: 2012-10-17 18:35:23 +03:00
djcb 8ad01e4aa8 * lib: threading: pre-sort the threaded results, add some more comments 2012-10-17 17:59:33 +03:00
djcb 542043989d * lib/mu-log: allow for arbitrary long log lines 2012-10-03 10:36:36 +03:00
djcb af5ad981a2 * some line35 fixes 2012-09-27 21:52:54 +03:00
djcb ab431a4a69 * lib: don't be too picky considering what's an attachment 2012-09-27 17:31:49 +03:00
djcb 506f26a342 * mu4e: unbreak attachments in forwarded messages 2012-09-25 15:20:26 +03:00
djcb 18096f326a * mu4e: allow message attachment to be viewed with mu4e (WIP) 2012-09-21 12:35:53 +03:00
djcb 3fe6eec8e0 * cosmetics 2012-09-20 21:25:55 +03:00
djcb d7ef2166a7 * mu-log: add pid to log lines 2012-09-20 21:24:49 +03:00
djcb 01f37d6b40 mu-log: add pid to log lines 2012-09-20 21:24:03 +03:00
djcb 28136a4e04 * cosmetics 2012-09-19 16:56:25 +03:00
djcb 6c071d940b * lib: for sorting dates, use the strings as recorded in Xapian, rather than
converting to time_t; this saves ~ 5% when we list threaded results
2012-09-19 16:55:44 +03:00
djcb 1ef9dae6bd * crypto: improved signature / verify output 2012-09-19 11:36:02 +03:00
djcb e483291a1d * lib/mu-container: remove some O(n*n) behavior from threading
mu_container_append_siblings was showing up high in profiles as it has to
  walk chains of next->next->next->... pointers to find the last one. we now
  cache the last link in the chain. for listing ~ 23K messages, this saves
  about 20%.
2012-09-17 17:45:59 +03:00
djcb 7fe594fb2a * cosmetics 2012-09-17 17:42:56 +03:00
djcb 2db1606a36 * lib: refactor mu-log a bit 2012-09-17 13:17:49 +03:00
djcb ac12d0c8aa * lib/mu-runtime: fix broken error handling 2012-09-17 13:05:49 +03:00
djcb 3759436a37 * cosmetics 2012-09-17 12:44:08 +03:00
djcb cc59c83756 * lib: mu-msg-part: improve handling of b0rked messages, s/HAVE_CRYPTO/BUILD_CRYPTO/ 2012-09-17 12:43:53 +03:00
djcb 0b32a63537 * guile: fix getting message bodies 2012-09-17 11:13:37 +03:00
djcb cd506d6d79 * add missing ifdef BUILD_CRYPTO block, so things build without crypto, too 2012-09-17 10:07:26 +03:00
djcb 55f7ecd362 * mu: try harder to create temp files for images (so we can show them in mu4e) 2012-09-16 23:10:23 +03:00
djcb b4219bd06b * minor 2012-09-16 18:00:51 +03:00
djcb 6bff28a6ff * cosmetics 2012-09-16 13:16:01 +03:00
djcb 87e61b7a3e * mu-maildir: hide some innocent errors 2012-09-15 18:03:23 +03:00
djcb 5b0d056f58 * lib/mu-runtime: update for logging changes 2012-09-15 17:59:21 +03:00
djcb 04523b4cd1 * lib/mu-log: cleanups and some improvements
use an option enum instead of boolean args for code clarity; allow for
  printing an \n before logging to tty (improved mu-index output). allow
  for color in logging to tty
2012-09-15 17:58:37 +03:00
djcb 211635b18b * mu-msg-crypto: improve comments 2012-09-14 12:17:52 +03:00
djcb cb810010e1 * mu-msg-part: some refactoring, warn user about gmime pw bug 2012-09-14 12:17:40 +03:00
djcb 70824bf978 * mu_util_read_password: fix mem mgmt 2012-09-14 12:16:53 +03:00
djcb 6a4b094ac9 * some refactoring for line35 2012-09-14 10:06:14 +03:00
djcb 61ade73332 * lib: add support for asking user for password from console 2012-09-13 22:57:04 +03:00
djcb 52bc720258 * lib/mu-util: add mu_util_read_password 2012-09-13 22:56:08 +03:00
djcb ac1d1b2ed8 * cosmetics 2012-09-13 21:12:12 +03:00
djcb 70c76459a9 * lib/mu-msg-crypto: correct mem handling (after discussion with gmime dev) 2012-09-13 21:11:26 +03:00
djcb 0445d87ab9 * lib/mu-msg-part.c: enable decryption (WIP) 2012-09-12 12:12:24 +03:00
djcb 1e4f94f9ae * mu-msg-priv.h: use G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT for some funcs 2012-09-12 12:11:47 +03:00
djcb 6470ff989a * mu-msg.c: return NULL rather than "" if there is no body (get_body) 2012-09-12 12:11:02 +03:00
djcb 8109410c58 * mu-msg.h: use G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT for mu_msg_to_sexp 2012-09-12 12:10:17 +03:00
djcb 325d596c0a * fix make-dist 2012-09-09 16:14:41 +03:00
djcb 7cdb72ddd5 * lib/Makefile.am: fix make-dist (remove mu-msg-crypto.h) 2012-09-09 16:14:39 +03:00
djcb cd0589b1b3 * lib: consider more things to be attachments 2012-09-08 12:46:55 +03:00
djcb 58a90e4a5d * lib/mu-contacts: make address comparison case-insensitive 2012-09-05 01:24:18 +03:00
djcb cf143667e8 * cosmetics 2012-09-05 01:23:00 +03:00
djcb e63ed13f5f * mu-msg-sexp: support signature checking, remove elvis code 2012-09-01 20:04:24 +03:00
djcb 9d6ef76f5f * crypto: improve signature checking code 2012-09-01 20:03:48 +03:00
djcb 7b39d56c99 * mu-query.cc: fix cc10 2012-08-31 00:22:18 +03:00
djcb 14661a6d7b * restore mu-verify (WIP) 2012-08-30 20:26:35 +03:00
djcb adc23614a1 * enable signature verification (WIP) 2012-08-30 12:53:52 +03:00
djcb 57e5f7b56f * lib: better error checking for message date / size when creating sexp 2012-08-28 18:28:18 +03:00
djcb dcda69e459 * lib: don't check for bogus error 2012-08-23 00:00:28 +03:00
djcb 93171a5b90 * lib: try to reopen database when it got updated from the outside (for guile) 2012-08-19 09:57:49 +03:00
djcb 90674172b9 * mu-store-write: use 'Xapian:WritableDatabase::commit' rather than '...flush' 2012-08-19 09:56:38 +03:00