2 days ago
pager.rs: don't set self dirty after filter selector

After generating a filter selector global dialog, there's no need to
set self as dirty.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 days ago
main.rs: always send a JobFinished event to all components

JobFinished events were sent from account job handlers, but that means
the events would never be generated when using meli without accounts
e.g. with the `view` subcommand.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 days ago
view: fix nested filter jobs never being completed

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 days ago
Add listing.thread_layout config flag

Allows the user to set the default thread layout and takes the values
"auto" | "vertical" | "horizontal". The layout can always be changed at
runtime with the `listing.toggle_layout` shortcut.

Closes #484

Resolves: <https://git.meli-email.org/meli/meli/issues/484>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 days ago
conf::data_types: minor style and error msg fixups

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
4 days ago
listing: always show mail_view_divider

`mail_view_divider` was only drawn in the path where the sidebar was
visible.

Concerns #483

Fixes: 719e2eb271a099f1ac912050c500a26b67bdec42 ("listing: add customizable view divider like sidebar's")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
5 days ago
listing: add customizable view divider like sidebar's

Closes #483

Resolves: <https://git.meli-email.org/meli/meli/issues/483>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Comment out `svgfeature`; no need to ship it

Svg feature was meant for taking SVG screenshots for the readme/website.
There's no real need to ship it, considering a lot of distros enable all
features by default.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Remove unused/obsolete plugins code and mentions

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Update debian/meli.{docs,examples} and Cargo exclude

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Fix new clippy lints

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Add vCard exports

Add shortcut to export contact under cursor in the contact list as a
.vcf file (default: `E`).

Also add an export button in the contact editor form.

Closes #424

Resolves: <https://git.meli-email.org/meli/meli/issues/424>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
contacts/editor: Use FormButtonAction in form

Instead of bool.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Vendor vobject crate

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Add a "move to Trash" shortcut

Add send_to_trash shortcut (default value: `D`) to send an entry or
selected entries to the Trash folder.

Closes #389

Resolves: <https://git.meli-email.org/meli/meli/issues/389>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Add human-readable identifiers in temp draft files

Draft files that are created in temp directories to be opened and edited
by the user's editor get UUID filenames with the `.eml` extension. Give
them filenames with the draft subject, recipient and date to make it
easier to discern a file's identity on the filesystem.

Closes #466

Resolves: <https://git.meli-email.org/meli/meli/issues/466>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
melib/maildr: add rename_regex config option

Add optional rename_regex configuration option to allow stripping
patterns from pathnames when renaming them. This is useful when other
programs depend on specific substrings being unique like mbsync which
erroneously assumes UIDs are unique instead of UID+UIDVALIDITY+mailbox
name like the IMAP standard specifies.

Closes #463

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
melib: `#[ignore]` shellexpand tests

These tests fail sometimes, #[ignore] them until the bug is found.

Closes #442

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
Add transpose shortcut and tests for text field

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
terminal: add QuerySynchronizedOutputSupport WIP

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
docs: add meli.conf.examples(5) WIP

Closes #461

Resolves: <https://git.meli-email.org/meli/meli/issues/461>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
imap: cache miss if row env hash != row hash

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
logging: disable `tracing` from output

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 days ago
terminal: color report WIP

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
Retry loading mailbox on recoverable error

If a mailbox status is an error and it is recoverable (e.g. a connection
time-out) allow retrying.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
melib: add JsContact module

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
command: alias `pwd` to `cwd`

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
view: show signature verification properly

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
melib: Use IndexMap in VCard

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
subcommands: Fix wrong help info in imap-shell prompt

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
debian: update meli.docs and add meli.manpages

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
imap: fix minor clippy lint

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
Update smol dependency from "1" to "2"

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
Update polling dependency from "2.8" to "3"

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
docs/historical-manpages: add DEP5 copyright file

Add debian copyright file for historical manpages. Copyright was
mentioned in the manpage comments, but wasn't otherwise visible.

While at it, make files ending up at .gz actually gzip'ed.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
scripts/make_html_manual_page.py: don't prettify

Prettify in beautifulsoup4 messes up with newlines, which alters the
html content.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
mailto: rewrite parsing

Rewrite parsing to fix error on escaped ampersands as html entities in
mailto value.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 week ago
meli.conf.5: Fix wrong default value type in default_header_values

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
listing: fix highlight_self flag off by one error

highlight_self flag was not shown if row had the maximum amount of
visible flags in the current page, because the width of the highlight_self
flag was not taken into account for the maximum column width.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
nntp: don't needlessly select group before ARTICLE

GROUP was sent before ARTICLE every time even if the group was already
selected. Use Connection's `select_group` method that makes sure the
group is not re-selected needlessly.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
mail/listing: pre-lookup conf values

Lookup conf values out of the for loop.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap: interpret empty server response as BYE

This should trigger a reconnect to the IMAP server.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap: resync cache first when fetching a mailbox

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap/protocol_parser: also populate other_headers

Also populate other_headers when creating a new Envelope

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap: use BTreeMap for message sequence number store

Populating the message sequence number runtime store is not performed in
order, so inserting UIDs in a vec can fail when we want to insert a
number higher than the current maximum. This could lead to panics when
inserting to a vec at an index above its length.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap: code style fixups

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
imap: return cached response in {select,examine}_mailbox()

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
CI: Update cargo-derivefmt version

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
Fix cargo-derivefmt lints

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
sqlite: fix database reset sequence

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
Impl From<&[u8]> for u64-based hash newtypes

`<_>::from_bytes(bytes: &[u8]) -> Self` already exists, so add
`From<&[u8]>` also.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
gpgme: refactor Rust interface, add tests

- Refactor gpgme wrapper interface to use more robust reference counting
  for the gpgme context object
- Add SAFETY comments to unsafe {} blocks
- Add tests

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
Add sealed_test dependency

Some tests needs a standalone environment because they mess with
variables that other tests need too. sealed_test runs the tests in a
forked process so that there are no issues with that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
listing: clear count modifier on Home/End

Home/End count as page/scroll movements, but they'd not clear the
modifier buffer since they weren't using it.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
Add missing ComponentUnrealize handlers

Dialog widgets require their parent components to handle their
ComponentUnrealize events, otherwise they'd not be removed if user
selects 'Cancel'.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
text/line_break: fix ReflowState::{No,All} break

It could split text on non-char boundaries. Check before return.

Closes #476

Resolves: https://git.meli-email.org/meli/meli/issues/476
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
sqlite3: add optional directory field in DatabaseDescription

Databases described by `DatabaseDescription` are created in XDG Data
directories by default. Add an optional explicit directory field so that
tests and other API consumers can override that location.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
address: add `separator` argument to display_slice()

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2 weeks ago
email/address: Refactor References struct

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
Use create_new to avoid overwriting files

Use File::options()..create_new() to avoid overwriting files when saving
attachments or exporting stuff.

File::create_new was added in 1.77 which is after our current MSRV, so
use OpenOptions instead.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
Replace Envelope::message_id_display() with Display impls

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
search: add Message-ID, and other header search support

Add support for searching by Message-ID, In-Reply-To, References, or any
header with the following keywords:

- "message-id:term", "msg-id:term"
- "in-reply-to:term"
- "references:term"
- "header:title,value"

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
Fix some borrow checker error/warnings from upcoming 2024 edition

Mostly unsafe_op_in_unsafe_fn lint, but also std::env functions becoming
unsafe.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
mail/view: do not highlight reply subjects in thread

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
mail/view: try cancel env fetch on Drop

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
accounts: make mailbox available as soon as possible

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
accounts: cancel any previous mailbox fetches

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
jmap: fetch mailbox with receivedAt descending sort

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
jobs: make `cancel` flag an AtomicBool

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
utils: add unix file locks module

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
Update nix dependency to 0.29.0

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 weeks ago
Manpage fixes

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
meli: use itoa to format offset indices in listings

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
samples: add ibm-modern theme

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Print clickable path links with subcommands

Print clickable path links when printings paths via subcommands like
print-log-path.

Part of #445 ("Add OSC8 terminal hyperlink support")

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
themes: add inheritance, and use themes when initializing grids

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Update serde dependency to 1.0.205

This release solves a clippy lint warning for code that will get
introduced in the next commit.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
error: add ErrorChainDisplay struct for better output

Add an ErrorChainDisplay struct that borrows an error and prints the
list of chained errors one by one, showing relationships and metadata
for each error.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Remove pcre feature/dependency

Crate regex is used by default in builds, so there's no need for an
optional libpcre2 dependency

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Replace Escape ascii char with hex literal

rustfmt was acting weird with it

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
conf: refactor into submodules

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/error: add related_path field

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/error.rs: move network stuff to submodule

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib: use IndexMap in conf fields

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Fix invalid cfg feature combinations for macos

NOTMUCH_ERROR_DETAILS was defined twice for macos from "unix"
target_family and target_os = "macos".

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
embedded: prevent double-close of pty fd

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
jmap: detect supported Auth schemes on connect

When 401 is returned by an HTTP server, the WWW-Authenticate header must
be present. The values represent the supported Authentication schemes of
the server.

This commit detects them and reports the appropriate error to the user.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
CI: unpin rust version after updating `time` dependency

This reverts commit 8a74920d (CI: pin rust version to 1.79.0, 2024-07-28).

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Fix 1.80.0 clippy lints

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Update `time` dep to fix 1.80.0 breakage

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
CI: remove env vars from action names

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Implement mailbox renaming command

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
meli/jobs: refactor spawn_{blocking,specialized} to spawn()

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/jmap: implement mailbox rename

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/jmap: do not serialize server-set fields in Set create

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/jmap: refactor some parser imports

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Update futures dependency to 0.3.30

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Cargo.tomls: make formatting more consistent

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
Update indexmap dep to 2.3.0

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1 month ago
melib/imap: renamed cache module to sync

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>