Commit Graph

691 Commits

Author SHA1 Message Date
12b34be3cf mu: allow for code-coverage reports 2020-01-01 15:56:48 +02:00
ad63044915 mu: Fix some compiler warnings 2020-01-01 15:56:48 +02:00
80c5e25b08 mu: move mu/mu/tests, lib/tests one level up
Makes it easier to generator code-coverage reports
2020-01-01 15:56:48 +02:00
97afdd9e3c lib: Use Mu:Error exception
Where applicable.
2020-01-01 13:25:07 +02:00
dfafecaf0c utils: add Mu::Error (runtime exception) 2020-01-01 13:25:07 +02:00
b1d4c5af79 mu: fix list-post email regexp
'_' is valid in email addresses.

Fix courtesy of jaknel; fixes #1529.
2019-12-22 15:26:45 +02:00
9f93526884 move parser/utils to utils, Mux->Mu
Move the parser utils to utils/ and rename the Mux namespace into Mu.
2019-12-22 15:26:45 +02:00
b55e191421 update for lib/utils split
Update sources with the new paths
2019-12-22 15:26:45 +02:00
e5337e7658 lib: split out utils to lib/utils 2019-12-22 15:26:45 +02:00
0c7831b5c9 Merge pull request #1511 from derekschrock/test-mu-maildir
lib: Allow hostname of newbase to match alnum
2019-11-17 14:20:17 +02:00
7d439928f5 lib: Use more portable locale en_US.UTF-8
On some systems (FreeBSD) en_US.utf8 doesn't exist.  Use a portable
locale en_US.UTF-8.
2019-11-16 23:01:18 -05:00
1585b933fb lib: Allow hostname of newbase to match alnum
Possible hostnames might have digits and - in them.  Crude regex to
allow hostnames that start with alnum followed by alnum or "-".

Fixes #1399
2019-11-16 22:59:04 -05:00
0dab2b0faf Merge pull request #1507 from tarsiiformes/typos
Fix typos
2019-11-09 13:06:23 +02:00
5a450b1aee Treat text/markdown as plain text for issue #1503 2019-11-07 15:03:36 +10:30
f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00
b609080d77 Process personal flag when adding new contacts 2019-08-16 13:06:12 +02:00
230df78780 Avoid wrong type/warning in comparison 2019-08-16 11:50:40 +02:00
b71b60704b Update internal cache in set_personal_addresses 2019-08-16 11:44:35 +02:00
74f9f78ec0 lib: Don't use Xapian::DatabaseNotFoundError, it's too new
Xapian::DatabaseNotFoundError only arrived with Xapian 1.4.10.
2019-08-03 11:06:50 +03:00
63b556da6d mu-util: fix warning 2019-08-01 22:44:03 +03:00
fc0ea805f5 mu-msg-fields: Mark contact fields as phrase-enabled 2019-08-01 22:11:39 +03:00
a8752e28c3 mu-store.hh: add it; it was missing 2019-07-31 17:19:23 +03:00
be4860befe tests: update for lib/mu-store changes 2019-07-30 08:51:04 +03:00
83d6484f86 lib/mu-store: rework implementation
* mu-store.h, mu-store-read.cc, mu-store-write.cc, mu-store-priv.hh have been reworked
   in mu-store.{cc,hh}, it the mix of c/c++ improved
 * update all the dependent modules
 * make it easier to upgrade an database in place (without user intervention)
 * remove the xbatch-size option
2019-07-30 08:51:04 +03:00
b7cda29b96 mu-runtime: include string
Was missing, and breaks compilation in some environments.
2019-07-18 16:17:04 +03:00
632f383c38 mu: Default to XDG Base Directory Specification
Instead of using ~/.mu, use the XDG Base Directory Specification, typically:
  ~/.cache/xapian
  ~/.cache/mu.log
  ~/.cache/parts
  ~/.config/bookmarks

Update dependencies, documentation.
2019-07-13 16:00:28 +03:00
69229a4228 mu: remove contacts-path leftovers
The contacts are now embedded in the xapian database, so we don't need
the contact-path anymore. Let's remove some leftovers.
2019-07-13 13:43:57 +03:00
125176d397 mu/lib: merge mu-contacts.h => mu-contacts.hh 2019-07-13 13:43:57 +03:00
8ec8ab5380 mu-contacts: remove newlines from addresses
Seems gmime passes them on; and it causes havoc with our contacts cache.

Bump database schema version to force an rebuild (since that's what's
required.)
2019-07-11 23:30:27 +03:00
5440747ba4 mu: require glib >= 2.38; remove g_type_init calls
Minor cleanup.
2019-07-11 23:30:27 +03:00
dc271f4721 mu-contacts: fix some compiler warnings 2019-05-25 10:39:40 +03:00
9edcae0203 update store, msg for new contacts-cache handling 2019-05-11 13:41:03 +03:00
bd52902290 contacts: update test cases for updated contacts
Remove the old ones, add new ones.
2019-05-11 13:41:03 +03:00
8193cc3e4c contacts: rework: install in database
Rewrite the contacts-cache backend in c++

Store the contacts as metadata in the xapian database, rather than in a
separate file.

Update the Store to deal with this.
2019-05-11 13:41:03 +03:00
0cc94468b3 Fix pedantic -Wparentheses warning emitted by gcc 9.0 2019-05-06 07:58:37 -07:00
6e8378ddcd mu: update crypto verify test 2019-03-24 11:54:12 +02:00
bc891030f6 mu: fix utf-8 flatten 2019-03-24 11:43:51 +02:00
da10f30adf utils: small optimization in utf8_flatten
In the common path, avoid building an unneeded std::string. This should
up in some profiles.
2019-03-23 17:00:25 +02:00
9bffb465bd mu: don't include text attachments as part of body
It's somewhat nice in some case, but not generally so; so let's not do
it.
2019-02-18 08:30:55 +02:00
d41242ff6c Merge pull request #1359 from OnkelUlla/fix_compiler_warnings
Fix compiler warnings
2019-01-17 22:26:50 +02:00
0903eaba79 Merge pull request #1284 from nicolasavru/limit-threading-set
Perform threading calculation on related set instead of entire result.
2019-01-13 22:53:45 +02:00
d37a961c8f parser: fix clang-7.0.1 warnings
Without this commit clang++-7.0.1 whines

|   CXX      parser.lo
| parser.cc:138:15: warning: braces around scalar initializer [-Wbraced-scalar-init]
|         return Tree({{Node::Type::Range},
|                      ^~~~~~~~~~~~~~~~~~~
2019-01-11 06:49:01 +01:00
493a9efa7a mu, tests: fix gcc-8.2.0 warnings
Without this commit gcc-8.2.0 whines

|   CC       mu-msg-json.lo
| mu-msg-json.c: In function ‘get_temp_file_maybe’:
| mu-msg-json.c:254:14: warning: unused variable ‘tmpfile’ [-Wunused-variable]
|   char *tmp, *tmpfile;
|               ^~~~~~~
| mu-msg-json.c:254:8: warning: unused variable ‘tmp’ [-Wunused-variable]
|   char *tmp, *tmpfile;
|         ^~~
| mu-msg-json.c: In function ‘add_part_crypto’:
| mu-msg-json.c:276:21: warning: unused variable ‘s’ [-Wunused-variable]
|   char    *signers, *s;
|                      ^
| mu-msg-json.c:276:11: warning: unused variable ‘signers’ [-Wunused-variable]
|   char    *signers, *s;
|            ^~~~~~~
| mu-msg-json.c: In function ‘each_part’:
| mu-msg-json.c:332:14: warning: variable ‘cid’ set but not used [-Wunused-but-set-variable]
|   const char *cid;
|               ^~~

and

|   CC       test-mu-str.o
| test-mu-str.c: In function ‘test_mu_str_subject_normalize’:
| test-mu-str.c:282:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "test123", "test123" },
|      ^~~~~~~~~
| test-mu-str.c:282:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "test123", "test123" },
|                 ^~~~~~~~~
| test-mu-str.c:283:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re:test123", "test123" },
|      ^~~~~~~~~~~~
| test-mu-str.c:283:19: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re:test123", "test123" },
|                    ^~~~~~~~~
| test-mu-str.c:284:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re: Fwd: test123", "test123" },
|      ^~~~~~~~~~~~~~~~~~
| test-mu-str.c:284:25: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re: Fwd: test123", "test123" },
|                          ^~~~~~~~~
| test-mu-str.c:285:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re[3]: Fwd: test123", "test123" },
|      ^~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:285:28: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re[3]: Fwd: test123", "test123" },
|                             ^~~~~~~~~
| test-mu-str.c:286:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "operation: mindcrime", "operation: mindcrime" }, /*...*/
|      ^~~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:286:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "operation: mindcrime", "operation: mindcrime" }, /*...*/
|                              ^~~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:287:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "", "" }
|      ^~
| test-mu-str.c:287:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "", "" }
|          ^~
2019-01-11 06:48:51 +01:00
53c1b0a069 mu: make attachment test a bit looser
Consider all 'inline' text parts attachments too, unless they're
'text/plain' or something that looks like a signature.

It's a heuristic so we might get some new corner-cases.. let's see.
2018-12-30 18:46:43 +02:00
7b6bccd49a parser: avoid query parsing error
See #1261.
2018-11-11 13:15:08 +02:00
a19b4ddb2d mu: implement mu_msg_to_json
Follows mu_msg_to_sexp, but instead uses json as the output format,
using json-glib.
2018-11-11 12:47:47 +02:00
93bd1b8ce7 mu: add soft dependency on json-glib
If it's available it will be used.
2018-11-11 12:12:36 +02:00
2aa299b3ac mu: add mu_msg_iter_is_(first|last)
This makes it a bit easier to process the output.
2018-11-11 12:11:06 +02:00
e321d15c2a mu: fake reply-to for mailing-list posts
Some mailing lists do _not_ set reply-to, see e.g.,
   https://github.com/djcb/mu/pull/1278

In that case, use the 'List-Post' address instead, so the behavior is
the same (in mu4e) as for other mailing lists.
2018-11-04 12:31:32 +02:00
052a228be7 add optional support for building with asan 2018-11-04 12:31:32 +02:00