Commit Graph

697 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 48d3f9cfab tests: move to subdir, move to meson
De-clutter the source directories a bit. Ensure tests build with meson, and
remove from autotools in a few places (no need to do things twice).
2021-11-08 23:58:05 +02:00
Dirk-Jan C. Binnema 6bea54805f build: fix compiler warning
guile: some clang warning

and ensure we get the right Xapian in all places, and fileno is defined.
2021-11-05 09:02:24 +02:00
Dirk-Jan C. Binnema 1c851315ca build: ensure correct xapian.h is found 2021-11-03 22:13:49 +02:00
Dirk-Jan C. Binnema 8028f88a51 mu: rework xapian dependencies a bit
Reduce the places where we need to include Xapian, and add a few places where
the (meson build) didn't explicitly have a Xapian dep where needed.
2021-11-03 12:34:08 +02:00
Dirk-Jan C. Binnema 388f18a278 utils: add from_gchars
To copy into a std::string & free.
2021-11-02 22:24:17 +02:00
Dirk-Jan C. Binnema 4e6f2a3c26 mu: remove some unneeded code
Dead code, and replace mu_canonicalize_filename with g_canonicalize_filename.
2021-11-02 22:20:58 +02:00
Dirk-Jan C. Binnema 9a2fd441c5 mu-query: honor maxnum in threaded queries 2021-10-23 11:06:45 +03:00
Dirk-Jan C. Binnema f17995b113 lib/server: send query results in batches
Instead of one message (header) at a time, send batches of them; this allows for
much faster handling in mu4e.
2021-10-22 08:33:51 +03:00
Dirk-Jan C. Binnema e46347aa54 lib/index/scanner: tidy up a bit
Use strcmp instead of hand-optimized. Avoid tmp/ directories.
2021-10-22 08:33:51 +03:00
Dirk-Jan C. Binnema 428dddd74e lib/mu: fix a few leaks
Thanks to valgrind
2021-10-20 23:06:28 +03:00
Dirk-Jan C. Binnema 701ca75536 mu4e/server: split message / metadata
Split message and metadata, so we can use pristine (possibly pre-cached)
messages. Update dependencies.
2021-10-20 22:41:48 +03:00
Dirk-Jan C. Binnema 89014ecd06 index/store: simplify transaction handling
only have transactions for indexing, and make it opportunistic. All other ops do
not use transactions.
2021-10-20 20:14:25 +03:00
Dirk-Jan C. Binnema 3dd721d5a3 clang-format: update c/cc coding style
Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.

For comparing old changes with git blame, we can disregard this one using
--ignore-rev

(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
2021-10-20 12:26:16 +03:00
Dirk-Jan C. Binnema 3e4771ad1c mu-options: avoid clang warning 2021-10-18 22:32:46 +03:00
Dirk-Jan C. Binnema 49637dbc3a lib: replace CATCH_BLOCK macros with template magic 2021-10-18 21:52:37 +03:00
Dirk-Jan C. Binnema 672d0c7238 store: don't try to commit when there's no transaction
Avoids some error warning.
2021-10-16 11:15:19 +03:00
Dirk-Jan C. Binnema 1a449dd885 meson.build: Improve guile detection 2021-10-16 11:15:12 +03:00
Dirk-Jan C. Binnema 9bcebb5cf8 build: avoid some compiler warnings 2021-09-02 23:36:43 +03:00
Dirk-Jan C. Binnema 87ac89b082 index: rely less on dir tstamp when indexing
Let's use the _current time_ (time(NULL)) instead of the dir-tstamp for a maildir;
this avoids re-indexing mail where the mails have a newer time, but their
directory hasn't (e.g. 'touch')

Experimental, let see how this works.
2021-09-02 23:16:24 +03:00
Dirk-Jan C. Binnema e3080e39ab lib/mu-server: remove unneeded code
With the demise of the old mu4e-view, we can get rid of extract / verify.
2021-08-29 21:40:42 +03:00
Dirk-Jan C. Binnema b465c1f779 index: make lazy check less lazy
We got many reports where the 'lazy check' didn't work too well for
people... so make it a bit less lazy, so it'll just work for more
people.

In practice, never skip _directories_ unless they're leaf directories;
this avoids the mtime-does-not-bubble-up problem.
2021-08-12 17:56:00 +03:00
Dirk-Jan C. Binnema ab51f1553b thread-subject: make even laxer:
compare subject from the *last* plus any spaces.
2021-08-11 22:24:28 +03:00
Dirk-Jan C. Binnema 9a31225ef4 thread-subject: ignore '<prefix>:' when comparing
Should catch most cases.

Fixes: #2083.
2021-08-11 15:16:54 +03:00
Dirk-Jan C. Binnema b7844358d2 threads: recurse thread-subject check
Not only check for duplicate subjects in *siblings*, also recurse into
the children. This remove some clutter from deeply nested threads.

Fixes: #2078.
2021-08-10 22:10:39 +03:00
Dirk-Jan C. Binnema 16a2cffc11 utils: use _GNU_SOURCE for S_ISLINK on freebsd
Unbreak FreeBSD build.

Fixes: #2079.
2021-08-08 15:15:51 +03:00
Dirk-Jan C. Binnema e52683f0ed server: when marking-as-read, include duplicates
When marking a message a read, do the same for the duplicates; this
was the old behavior and the intention of the new behavior but didn't
quite work.

Fixes: #2071.
2021-08-04 23:55:41 +03:00
Dirk-Jan C. Binnema e26767b842 mu-server: mark _all_ messages with message-id as read
Not just the one we're viewing.
2021-08-03 22:17:56 +03:00
Dirk-Jan C. Binnema 78ef8ddcbb mu-store: fix warning schema mismatch message
Fixes: #2069.
2021-07-31 17:54:33 +03:00
Dirk-Jan C. Binnema fd9cc6bcc4 mu-store: improve database schema error
Tell user they should mu-init
2021-07-31 01:47:21 +03:00
Dirk-Jan C. Binnema 34fae2c072 mu-store: update whitespace 2021-07-31 01:45:22 +03:00
Dirk-Jan C. Binnema 1998505679 index: update removed value in progress report
Fixes: #2016
2021-07-29 23:26:40 +03:00
Dirk-Jan C. Binnema c8a2151cb9 mu: use g_strerror instead of strerror
Some #includes were missing for the latter (but only noticeable on some
systems - e.g., build breaks on Cygwin).

So let's replace with something that works equally everywhere.

Fixes: #2060
2021-07-29 00:02:30 +03:00
Dirk-Jan C. Binnema 7fa80f77e9 index: don't assume very fast machine cfg drive
The scanner had a timeout for scanning, which doesn't work too well with
machine with rel. fast disks / rel. slow machines. Which I don't happen
to have!

Let's remove the timeout, should help with getting unwanted timeouts
which would cut short the indexing.
2021-07-28 17:04:39 +03:00
Nicolas Avrutin ee4bf5664a query: fix include-related.
mu-query.cc:
- make_related_enquire: don't include first query in qvec, we already have all
  thread IDs we need to query in thread_ds.
- run_related: always sort first query by date, explained by the comment.
- run_related: include qflags (in particular ascending vs descending) in
  leader_qflags.
- run_theaded: don't limit results to maxnum, that results in threads
  potentially being cut off.

mu-server.cc:
- output_sexp: don't limit results to maxnum so as to match the behaviour of
  mu find (and avoid cuttong off threads).

Fixes #1924 and #1911.
2021-07-11 16:23:39 -04:00
Dirk-Jan C. Binnema 619509eb56 query-results: remove GatherThreadIds
We can't really do that in the match-decider, since we get _all_ messages
there, not the <n>-limited.

And some whitespace changes.
2021-06-17 20:54:59 +03:00
Dirk-Jan C. Binnema 6caa9acb34 query-match-deciders: whitespace 2021-06-17 20:54:59 +03:00
Dirk-Jan C. Binnema 047c10453a query: gather related ids from mset, not match-decider
Since we only want the (smaller) set from the mset, not the (full) set
that the match-decider sees.
2021-06-04 00:54:28 +03:00
Dirk-Jan C. Binnema 473d3998ce mu: calculate thread subjects
Calculate the thread subject, that is, the subject of the (sub)thread _or_
empty if it's the same as the previous subject.

This is for the UI feature of _not_ showing the subject when it's just
repeating from the previous.
2021-05-04 17:34:47 +03:00
Dirk-Jan C. Binnema 8c9430a09a query: improve thread-date handling
And make it available in query_match, so we can expose it to elisp.
2021-05-02 23:30:32 +03:00
Dirk-Jan C. Binnema bed6058fdc mu-server: add thread-date as emacs timestamp
So we can more easily deal with it from elisp.
2021-05-02 23:30:32 +03:00
Dirk-Jan C. Binnema b8f8ffa967 mu-sexp: make lists printable
And some typo fixes
2021-05-02 23:30:32 +03:00
Dirk-Jan C. Binnema 38f7075daa mu-server: use orphan, not empty-parent
So we use only one term.
2021-05-02 23:30:32 +03:00
Nicolas Avrutin 8ccd8f5425 threads: fix flag handling of orphan children
Even if a container has no query_match, it may still have children that need to
have flags applied.

This was broken by 6ff9829ce1.

Fixes: #1995
2021-05-02 14:27:11 -04:00
Derek Zhou dc6f76d74d seperate Mu::format and Mu::vformat 2021-04-22 18:32:38 +00:00
Dirk-Jan C. Binnema 750a9d1626 query: Better debug logging 2021-03-17 18:33:45 +02:00
Dirk-Jan C. Binnema 08890dee2d lib/sexp: Clean up contact name/email
Don't allow control characters.

Fixes: #1944.
2021-03-16 17:10:35 +02:00
Dirk-Jan C. Binnema f56aca7c23 lib/contacts: Use remove_ctrl
Use the new helper function rather than `wash'.
2021-03-16 17:09:37 +02:00
Dirk-Jan C. Binnema 15aca5e396 utils: cleanup whitespace 2021-03-16 17:07:39 +02:00
Dirk-Jan C. Binnema 725826231f utils: Add remove_ctrl
Add a helper function to remove control characters / multi-spaces, and a
test.
2021-03-16 16:51:01 +02:00
Dirk-Jan C. Binnema 6e9a60c385 mu: fix some compiler warnings
and whitespace.
2021-03-12 22:20:48 +02:00