Manos Pitsidianakis
51e3f163d4
melib/jmap: Use Url instead of String in deserializing
...
Catch invalid URLs at the parsing stage.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-13 14:13:53 +02:00
Manos Pitsidianakis
417b24cd84
meli: print invalid command on error
...
Instead of printing just "invalid command", print the command as well.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-13 14:13:52 +02:00
Manos Pitsidianakis
873a67d0fb
Replace erroneous use of set_err_kind with set_kind
...
set_err_kind() is a method of the IntoError trait, not an Error method;
it is meant to be used for any error type that can be converted into
Error. Since melib::Error implements Into<melib::Error> tautologically,
this was not a compilation error. Nevertheless, the correct thing to do
is use the type method directly to set ErrorKind.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis
c332c2f5ff
Fix new clippy lints (mostly clippy::blocks_in_conditions)
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis
1048ce6824
melib/utils: add hostname() utility function
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis
70fc2b455c
Update nix dependency to 0.27
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis
8de8addd11
melib/datetime: add cfg for musl builds
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis
1fe3619208
conf: Make conf validation recognize AccountSettings extra keys
...
AccountSettings extra keys like `vcard_folder` were not taken into
account when validating a config.
This commit introduces an AccountSettings::validate_config() method that
checks for the presence and validity of this key value.
Fixes #349
https://git.meli-email.org/meli/meli/issues/349
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-04 14:52:06 +02:00
Manos Pitsidianakis
0b468d88ad
addressbook/vcard: improve Error messages
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-04 14:52:06 +02:00
Manos Pitsidianakis
1eca34b398
Set lowest priority to shortcut command UIEvents
...
Commit (a37d5fc1
conf/shortcuts: implement
a key to command mapping) introduced shortcuts that expand to user
defined commands. To allow already existing shortcuts to take
precedence, the check for the user-defined shortcuts should be the last
one in the evaluation order.
Example problem scenario:
- Press new_mail shortcut (e.g. `m`)
- Code in listing.rs searches if it matches any of the commands, and
regardless if it matches or not, stops the evaluation and returns.
- New mail composer never shows up.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-21 12:03:40 +02:00
Manos Pitsidianakis
5afc078587
Update README.md, DEVELOPMENT.md and create BUILD.md
...
README.md is quite lengthy so split extraneous info to other `.md`
files.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-20 12:09:34 +02:00
Guillaume Ranquet
a37d5fc1d1
conf/shortcuts: implement a key to command mapping
...
Permits users to map keys in their configuration file to an array of meli commands
e.g:
[shortcuts.listing]
commands = [ { command = [ "tag remove trash", "flag unset trash" ], shortcut = "D" },
{ command = [ "tag add trash", "flag set trash" ], shortcut = "d" } ]
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2024-01-18 15:53:35 +01:00
Manos Pitsidianakis
60f26f9dae
melib: Fix some old pre-intradoc rustdoc links
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-11 09:22:28 +02:00
Ethra
e80ea9c9de
Changed default manpage install path
2024-01-11 05:08:58 +03:00
Manos Pitsidianakis
64e60cb0ee
listing: fix select modifier regression
...
Commit 61a0c3c27f
("listing: do not clear
selection after action") broke select/jump modifiers (e.g. prefixing a
jump with a number).
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-08 12:32:50 +02:00
Manos Pitsidianakis
81d1c0536b
scripts: add mandoc_lint.sh
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-06 16:22:16 +02:00
Manos Pitsidianakis
cd448924ed
listing: add clear-selection command
...
Add a command that performs what Escape does: clears the selection.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-06 15:35:56 +02:00
Manos Pitsidianakis
61a0c3c27f
listing: do not clear selection after action
...
Clear selection only when Escape is pressed, not after action is
completed. The user might want to perform further actions on the
selection.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-06 15:20:00 +02:00
Manos Pitsidianakis
7952006870
melib/percent_encoding: remove doctests, add tests module
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-04 10:41:00 +02:00
Manos Pitsidianakis
ddab3179c2
melib/wcwidth: move tests to tests module
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-04 10:40:31 +02:00
Manos Pitsidianakis
7861fb0402
Fix typos found with typos
tool
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-03 11:08:55 +02:00
Manos Pitsidianakis
148f0433d9
meli: implement flag set/unset action in UI
...
Also document it in manpages meli.1 and meli.7
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 21:28:21 +02:00
Manos Pitsidianakis
8185f2cf7d
meli: add deny clippy lints and fix them
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 15:59:13 +02:00
Manos Pitsidianakis
0270db0123
melib: From<&[u8]> -> From<B: AsRef<[u8]>>
...
This change allows byte literals to be used with the from trait method.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 15:16:47 +02:00
Manos Pitsidianakis
8ddd673dd8
melib/imap/untagged: update all mailboxes
...
When receiving an envelope event (deleted, or changed flags), update all
mailboxes that contain that envelope hash; not just the currently
selected mailbox.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 14:36:29 +02:00
Manos Pitsidianakis
e3351d2755
melib/imap: fix set unseen updating all mboxes
...
When manually setting an envelope as not seen, all mailboxes had their
unseen count increased. This commit updates only those that include the
envelope in the first place.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 14:34:50 +02:00
Manos Pitsidianakis
31401fa35c
melib/backends: add LazyCountSet::contains method
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 14:34:05 +02:00
Manos Pitsidianakis
33408146a1
Fix feature permutation mis-compilations found with cargo-hack
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 11:38:42 +02:00
Manos Pitsidianakis
8a95febb78
CI: set debuginfo=0 in test/lint builds
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 11:03:29 +02:00
Manos Pitsidianakis
73d5b24e98
melib/tests: merge integration tests in one crate
...
Saves about 0.5 seconds from compilation and runtime.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-01 10:44:31 +02:00
Manos Pitsidianakis
0da97dd8c1
mail/listing: check row_updates in is_dirty()
...
If there are row_updates, it means we need to redraw. But in the draw()
call, we check is_dirty() to decide whether to proceed drawing. Add
row_updates not being empty into the dirty conditions.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 20:02:58 +02:00
Manos Pitsidianakis
933bf157ae
melib/email/parser: ack \ as an atom
...
I think this is not spec compliant but the MIME spec (rfc6068 - The
'mailto' URI Scheme) uses it for "valid" addresses.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:56:52 +02:00
Manos Pitsidianakis
f685726eac
melib/email/parser: add backtrace field to ParsingError
...
Add backtrace field to ParsingError when the build is for testing or
documentation.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:56:52 +02:00
Manos Pitsidianakis
ab1b946fd9
melib/error: don't print details if it's an empty string.
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:56:52 +02:00
Manos Pitsidianakis
ce4ba06ce9
command: add a flag set/unset command
...
e.g. "flag unset draft"
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:51:45 +02:00
Manos Pitsidianakis
bebb473d1b
melib/mbox: derive extra traits for enums
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:51:45 +02:00
Manos Pitsidianakis
f0866a3965
meli: make config error more user-friendly
...
If `send_mail` is incorrect, display a long-ish list of valid examples.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:51:45 +02:00
Manos Pitsidianakis
f63774fa6d
Fix new clippy lints (1.75)
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-29 19:51:44 +02:00
Manos Pitsidianakis
808aa4942d
melib: rename text_processing to text for the whole brevity thing
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-26 16:47:42 +02:00
Manos Pitsidianakis
08518e1ca8
terminal: remove obsolete position.rs module
...
The functions in terminal::position were pretty much obsolete after
commit
0e3a0c4b70
Add safe UI widget area drawing API
So this commit does a little cleanup and removes the module.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 19:49:23 +02:00
Manos Pitsidianakis
34a2d52e7e
Fix rustdoc::redundant_explicit_links
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 19:14:00 +02:00
Manos Pitsidianakis
4026e25428
melib/notmuch: add some doc comments
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 19:13:15 +02:00
Manos Pitsidianakis
ca7d7bb95d
melib/notmuch: use message freeze/thaw for flag changes
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 19:12:45 +02:00
Manos Pitsidianakis
ebe1b3da7e
melib/notmuch: wrap *mut struct fields in NonNull<_>
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 18:50:23 +02:00
Manos Pitsidianakis
506ae9f594
melib/error: Add ErrorKind::LinkedLibrary variant
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 18:43:12 +02:00
Manos Pitsidianakis
b6f769b2f4
mail/listing: add field names to row_attr! bool values
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 18:35:09 +02:00
Manos Pitsidianakis
3691cd2962
accounts.rs: send EnvelopeUpdate event after self.collection.update_flags()
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-17 18:20:14 +02:00
Manos Pitsidianakis
97eb636375
Makefile: add dpkg --print-architecture to deb filename
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-13 15:43:00 +02:00
Manos Pitsidianakis
b3079715f6
melib/smtp: disable flakey test_smtp()
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-13 09:45:17 +02:00
Manos Pitsidianakis
86bbf1ea57
melib/notmuch: refresh NotmuchMailbox counts when setting flags
...
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-12 20:03:14 +02:00