Commit Graph

6766 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 455119f695 Merge branch 'wip/djcb/html-to-text' 2023-07-26 19:11:41 +03:00
Dirk-Jan C. Binnema 21a760d2c7 NEWS.org: update 2023-07-26 19:10:36 +03:00
Dirk-Jan C. Binnema 30b0209f8d mu-info: add 'topic mu' information; improve manpage
Show some more runtime information in the 'mu' topic, and make that the
default. Update manpage.
2023-07-26 19:09:18 +03:00
Dirk-Jan C. Binnema 3aecaca9b9 build: bump version to 1.11.11 2023-07-26 19:06:04 +03:00
Dirk-Jan C. Binnema da290c21a9 benchmark: improve setup
Add some useful make targets, and separate (optimized) build.
2023-07-25 23:56:19 +03:00
Dirk-Jan C. Binnema 4c0b7db3d8 store: add 'add_document' optimization, use it
*Usually* we need Xapian's replace_document() API, but when we know a
document (message) is completely new, we can use the faster
add_document(). That is the case with the initial (re)indexing, when
start with an empty database.

Also a few smaller cleanups.
2023-07-25 23:56:19 +03:00
Dirk-Jan C. Binnema 4d8ba5f579 index/scanner: implement i-node sorting
On rotational devices (HDD) processing direntries is much faster when
doing so sorted by i-node for the dir-entries. This is an old
optimization (perhaps mu <= 1.6 or so?) that was implemented yet after
indexing changed, likely because my systems use SDDs instead!

But, let's restore that optimization; the sorting is fast enough that we
don't care for SDDs; on HDD it should be quite a bit faster.
2023-07-25 22:39:12 +03:00
Dirk-Jan C. Binnema b795242d5a message: use html-to-text scraper for html parts
We were dumping the HTML-parts as-is in the Xapian indexer; however,
it's better to remove the html decoration first, and just pass the text.

We use the new built-in html->text scraper for that.
2023-07-25 21:26:36 +03:00
Dirk-Jan C. Binnema 56b8fad89e utils: implement html-to-text
Implement a crude html-to-text scraper function, to extract plain text
from html messages, so we can use it for indexing.
2023-07-25 21:26:36 +03:00
Dirk-Jan C. Binnema 23ba61a650 mu-find: internal cleanups / modernization
use fmt and Result-based APIs.
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema 11c807f955 utils/readline: use fmt-based apis 2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema 9580d11fef utils/result: add std::move version of Err
Avoid a copy in some situations
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema dcf2298680 mu: use fmt-based apis in mu index/server and options
iostream is so 1998.
2023-07-25 21:11:56 +03:00
Dirk-Jan C. Binnema 85a2490300 mu-init: improve user output 2023-07-25 11:11:53 +03:00
Dirk-Jan C. Binnema 3337c9babb mu-view: add --format=html
Support showing the HTML body (if any) instead of the default plain-text
body.

Update manpage.
2023-07-23 21:04:26 +03:00
Dirk-Jan C. Binnema 72f43f11df lib: improve store error messages
Use xapian_try_result
2023-07-23 21:04:26 +03:00
Dirk-Jan C. Binnema d374d94031 clang: avoid some build warnings 2023-07-23 21:04:26 +03:00
Dirk-Jan C. Binnema 7b38f094c4 migrate some more code to mu_format / join_paths
Let's modernize a bit.
2023-07-20 23:14:29 +03:00
Dirk-Jan C. Binnema 8c11f6f71f
Merge pull request #2522 from a3a3el/guile-mu-installation-fix
Install Guile extension into Guile's extension directory
2023-07-20 09:05:19 +03:00
Jeremy Sowden d1b8b79aa6 Install Guile extension into Guile's extension directory 2023-07-19 23:39:59 +01:00
Dirk-Jan C. Binnema b08fe636f3 man: update mu mkdir manpage 2023-07-19 08:48:57 +03:00
Dirk-Jan C. Binnema ecb3c9139f mu-mkdir: add unit tests 2023-07-19 08:48:44 +03:00
Dirk-Jan C. Binnema e2de72e747 build: improve 'dist' target
Ensure we compile first.
2023-07-18 23:21:28 +03:00
Dirk-Jan C. Binnema 6ad5cccc53 store/index: and unit test for circular symlink
Check that we bail out early
2023-07-18 23:18:21 +03:00
Dirk-Jan C. Binnema 885903c496 index: limit length of maildir path to MaxTermLength
This limit was already in place, but now we detect it a bit earlier (in
the indexer). We _could_ increase it (by using hashes for dirstamps), but
right now it's a good catch for circular symlinks.
2023-07-18 23:18:21 +03:00
Dirk-Jan C. Binnema f3c303106d man: update mu-index manpage 2023-07-18 23:14:25 +03:00
Dirk-Jan C. Binnema 0cb78fe4d1 mu-remove: add unit test 2023-07-18 21:33:59 +03:00
Dirk-Jan C. Binnema 8b66491a72 mu-add: update unit test 2023-07-18 21:33:33 +03:00
Dirk-Jan C. Binnema cf6c5a36d7 utils: rework running system commands
Use g_spawn and pass arguments, so we don't involve a shell that needs
escaping etc.

Improve error handling.
2023-07-18 20:19:27 +03:00
Dirk-Jan C. Binnema 5efd0a61aa build: improve 'coverage' target
Ensure we compile everything first.
2023-07-18 19:08:16 +03:00
Dirk-Jan C. Binnema e8462e0204 lib/index: add rudimentary scanner test
Make the defunct existing one a working test.
2023-07-18 19:08:16 +03:00
Dirk-Jan C. Binnema 224bbfe5cc
Merge pull request #2521 from mssdvd/add-default-notification-action
mu4e-notifications: add default action
2023-07-18 19:06:33 +03:00
Dirk-Jan C. Binnema 535ab6e010 mu4e-view: avoid getting gnus markers in m-v-message-text
We don't need that here (when replying to email).
2023-07-18 18:31:48 +03:00
Davide Masserut 7cc4804d47 mu4e-notifications: add default action 2023-07-18 12:18:54 +02:00
Dirk-Jan C. Binnema 67f95eac63 build: bump version to 1.11.10 2023-07-17 21:53:42 +03:00
Dirk-Jan C. Binnema 56cea76b8d mu4e-view: don't set gnus-article-emulate-mime by default
This triggers excessive CPU-load in some corner-case messages.

Make it a 'massage' option instead.

Fixes #2515.
2023-07-17 21:53:42 +03:00
Dirk-Jan C. Binnema c263e4c4d7 mu4e-view: fix mu4e-view-refresh
It's didn't quite work in the post-mu4e-window world
2023-07-17 21:53:42 +03:00
Dirk-Jan C. Binnema c19c011b0b mu4e/NEWS.org: document updated MIME-part handling in view 2023-07-17 21:53:42 +03:00
Dirk-Jan C. Binnema 993f16522a mu4e: split off mime-handling from mu4e-view & improve
Split off the MIME-handling from mu4e-view.el into its own
mu4e-mime-parts.el

Improve the implementation, updating completions with annotations.
Support "Pick all" for completing attachments and MIME-types.

Both attachment/inline disposition MIME-type with a file name are
considered "attachment" now.

Allow MIME-part actions to target multiple MIME-parts.
2023-07-17 21:53:42 +03:00
Dirk-Jan C. Binnema 3b93863f15 mu4e: use mu4e-determine-attachment-dir
Make the old internal mu4e~get-attachment-dir a public function,
improve documentation. Update callers.
2023-07-16 13:19:35 +03:00
Dirk-Jan C. Binnema 66e113ef2a man: mu-init: document --max-message-size and --batch-size
They were missing.
2023-07-16 13:19:35 +03:00
Dirk-Jan C. Binnema 3c9d1f1ab1 mu: cmd-init: fix batch-size typo
Copy-pasta
2023-07-16 13:19:35 +03:00
Dirk-Jan C. Binnema 99a0eaaa76 lib/store: improve dirstamp / set_dirstamp code
Modernize.
2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema 545494225a lib/contacts-cache: improve code 2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema 4a405ff4d4 build: better coverage/valgrind targets 2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema 6f69f5d482 utils/mu-regex: add move constructor 2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema f3bfdf5add lib/maildir: use mv for moving to avoid warnings
using gio gives some (false, we assume) valgrind warnings, so for now
use 'mv' instead.

Also slightly update the code with some mu_format overtaking format.
2023-07-10 23:17:06 +03:00
Dirk-Jan C. Binnema 18490a818d store/server: centralize docids-for-msgid
No need for two near-identical impls

Remove some dead declarations.
2023-07-10 23:17:06 +03:00
Dirk-Jan C. Binnema 0b4f7c4cbe lib: xapian-db/store: simplify
No need for "pimpl" in xapian-db; keep it simple.
2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema a32b924692 mu: add "unit" tests for 'mu add' 2023-07-10 23:15:40 +03:00