Commit Graph

7828 Commits

Author SHA1 Message Date
bb57f7a226 scm: add utc-offset and date-object methods
Add methods for getting the utc-offset of message, and get the sent-date
as an SRFI-19 date object.
2026-08-20 15:05:31 -07:00
0bea84adce message: add utc-offset field
Add a new db field for storing UTC-offset for the Date: field.
2026-08-20 15:05:31 -07:00
501d27ad89 mu-server: tweak server
Try to set a larger pipe size (on Linux); and only show the mu-prompt
when talking to a tty.
2026-08-20 15:05:31 -07:00
ca5e1d64c1 mu4e: use buffer for reading server output
mu4e used strings processing the server output (from mu4e server) and
interpreting the s-expressions, but it's cleaner and slightly faster to
use a buffer instead. So that is what we do now.
2026-08-20 15:05:31 -07:00
702da53ad9 scm: implement field / fields procedures
Add procedures field & fields to get information about mu's database
fields, similar to "mu info fields".

Add docs & tests as well.
2026-08-20 15:05:31 -07:00
5235e16f54 scm: support configuration
Support a configuration function, with the system-configuration.

Update docs.

Add a tests for language, using the configuration to see if we support
it.
2026-08-20 15:05:31 -07:00
31b0fd45c2 scm: improve store->alist
Include all non-internal properties in the output alist.

Clean up some of the type-conversion (using concepts)

Fix conversion to bool
2026-08-20 15:05:31 -07:00
ae8607093b scm: avoid finalizer race with message-map
Let guile handle the message-map (with weak-hash-table), so we avoid the
cleanup race.

Better handle the fd handling (and avoid calling gc() each time when
we're nearing the limit)
2026-08-20 15:05:31 -07:00
b29e8cb37b scm: fix some issues in scm implementation
- Fix some comment copy-pasta
- Fix some typos
- Make write-to-file exception safe
- Make plist->alist O(n) rather than O(n*n)
2026-08-20 15:05:31 -07:00
60ed8f1a12 scm/c++: fix review issues in handler code
- Fix comments and some debug strings (copy-pasta)
- Fix mime-stream destruction (g_object_unref)
- Fix type-checking of scm types
2026-08-20 15:05:31 -07:00
2c2bc317f3 NEWS.org: update 2026-08-20 15:05:31 -07:00
e585d60511 build: bump version to 1.14.3-pre4 2026-08-20 15:05:31 -07:00
0b725f6c81 man: fix typos / omissions
Update the man-pages for various small error / inconsistencies / typos
etc.
2026-08-20 15:05:31 -07:00
6b1358ea48 mu: tidy up commands
Fix some typos, small errors, debug leftovers. Removed unused
mu-cmd-count.cc. Improve test-coverage. Fix manpage.

Make the errors for unknown commands a little friendlier.
2026-08-20 15:05:31 -07:00
9cf9531acc mu: improve command-line handling
- Remove some dead code
- Make error messages a bit more user-friendly.
- Small cleanups
- Add unit tests and actually run them
2026-08-20 15:05:31 -07:00
497b3db074 docs: fix some typos
Signed-off-by: John E <jeis4wpi@outlook.com>
2026-08-20 15:05:31 -07:00
4489d513be migrate to std::ranges
Move the various seq_ functions, as well as std::(stable_)sort,
std::accumulate, std::transform, std::find, std::find_if to their C++20
std::ranges counterparts.
2026-08-20 15:05:31 -07:00
1b42ad6099 mu-query: cleanups
Cleanup the query running and handling the results.

- in threading, use stable_sort
- remove dead code
- fix indentation in a few places
- don't need Option in various run_... in mu-query.cc
2026-08-20 15:05:31 -07:00
1e1311fc39 mu-utils: cleanups
Fix some types

Improve error handling

Remove dead/unused code
2026-08-20 15:05:31 -07:00
975dbfa367 mu4e: update label handling
- Fix typos
- Sync up with C++
- Fix cl-pushnew usage
2026-08-20 15:05:31 -07:00
03021df79d build: set BUILD_SCM to 0 when there is no guile
As per #2938
2026-08-20 15:05:31 -07:00
57ce31876f build: bump version to 1.14.3-pre3 2026-08-20 15:05:31 -07:00
bed72e5b5c mu-option/-result: tidy-ups
Small tweaks to avoid copying; add [[nodiscard]] .
2026-08-20 15:05:31 -07:00
7e83f5e4b0 mu-regex: add match_groups, use everywhere
Add match_groups to Mu::Regex, and update old "raw" GRegex users.
2026-08-20 15:05:31 -07:00
31e5c7b34e mu-message: various small tweaks
- Remove possible cache-dir
- Retain Personal flag
- Handle some corner cases
2026-08-20 15:05:31 -07:00
a9a57d0511 mu-message-file/-part: small fixes
Handle is_new in all cases.

Use starts_with where applicable (C++20)

Update unit-tests
2026-08-20 15:05:31 -07:00
51d5ab3163 mu-mime-object: improve error-handling
Fix possible UAF in write_to_stream

Fix a few typos.
2026-08-20 15:05:31 -07:00
877b946539 mu-document: fix phrase-queries, small o10ns
Fix the phrase-query term-generator

Avoid double utf8_flatten
2026-08-20 15:05:31 -07:00
f9ad65423e mu-fields: const correctness, o18n
Don't copy strings when unneeded.
2026-08-20 15:05:31 -07:00
8208639c49 mu-labels: fix comment 2026-08-20 15:05:31 -07:00
0658f18062 mu-flags: ensure shortcut is single-char
And add some tests. Use std::popcount.
2026-08-20 15:05:31 -07:00
2750fe9f27 mu-contact: move ctor parameters
Small optimization; and remove some dead-code; use is_ascii_cntrl.
2026-08-20 15:05:31 -07:00
19b2bdd6e4 mu-priority: make to_string inline
And remove some dead code.
2026-08-20 15:05:31 -07:00
a03fd48551 utils: support negative lexnums
We use "lexnums" to efficiently/sortably store numbers >= 0; let's
support negative numbers as well (albeit not very optimal in size yet)
2026-08-20 15:05:31 -07:00
51a2bc5f60 cld2: unit-test fix
Fix inverted HAVE_CLD2 test
2026-08-20 15:05:31 -07:00
ca881a6e83 cld2: fix macos unit-test on ci 2026-08-20 15:05:31 -07:00
40ee042b6d scm: fix build-scm check 2026-08-20 15:05:31 -07:00
391cc3c556 cld2: fix language-detector
Inverted #if check.
2026-08-20 15:05:30 -07:00
91ad1c4478 cld2: fix HAVE_CLD2 test
It _is_ defined (as 0) when there is no CLD2.
2026-08-20 15:05:30 -07:00
ffa110d08d dir-locals: avoid warnings
Some names changed, making new enough emacs unhappy.
2026-08-20 15:05:30 -07:00
d24347bad6 lib: rename support-ngrams => ngrams-enabled
For consistency.
2026-08-20 15:05:30 -07:00
a347d3ada0 properties: support system-properties
Support "system" properties, i.e., library versions, whether
language-detection, scm is supported.

Make these more generic (with display strings), so we can handle them
more automatic int mu-cmd-info.
2026-08-20 15:05:30 -07:00
f3361b9cee server: small tweaks
Handle a few small issues / typos, make the code a little clearer and
add some comments. Remove some dead code.
2026-08-20 15:05:30 -07:00
da2995a768 mu-sexp: improve corner-cases, performance
Some C++20 updates; use the new ascii/ctype functions. Avoid unlimited
recursion. Speed-up conversion to_string

Update unit-tests.
2026-08-20 15:05:30 -07:00
dfdd943817 utils: html-to-text: fix some issues, update tests
Improve handling of some corner-cases, and add more unit-tests for
things that were broken before.
2026-08-20 15:05:30 -07:00
500bf400c3 mu-query-parser: handle corner case / complexity
Some improvements:

- Fix or/xor chains (use left-associativity).
- Fix quote handling
- Make parsing O(n) rather than quadratic; limit recursion depth

And update tests.
2026-08-20 15:05:30 -07:00
809b9e4f4a utils: read_from_stdin: avoid reading nuls
We should read the actual written size, not the allocated size.
2026-08-20 15:05:30 -07:00
39c8472dba build: bump version to 1.14.3-pre2 2026-08-20 15:05:30 -07:00
7d60d2728a index: generalize pre-fetch paths
We already pre-fetched db file paths for the cleanup-case (since
cdb619e4f), now let's generalize this to all indexing.

For now this is mostly performance-neutral (lazy-rescan is slightly
faster); however, this simplifies the code.
2026-08-20 15:05:30 -07:00
86464cd083 modernization: tweaks for c++20
Update various places for what we can do with C++20:

- ends_with / starts_with
- std::to_array
- using instead of typedef
- designated initializers
- "[[maybe_unused]]" instead of G_GNUC_UNUSED

Also remove some unnecessary 'static'
2026-08-20 15:05:30 -07:00