Commit Graph

2282 Commits

Author SHA1 Message Date
Manos Pitsidianakis
3e9144657b
meli: store children process metadata
Store children process metadata. Pid and command lines can then be shown
in the UI and in logs.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-23 10:43:58 +02:00
Manos Pitsidianakis
35a9f33aab
listing: extract common FlagString logic
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-21 21:04:22 +02:00
Manos Pitsidianakis
475609fe92
listing: make {prev,next}_entry shortcut behavior consistent
prev_entry, next_entry shortcuts (default bindings: Ctrl+p and Ctrl+n)
were not behaving consistently in all different listing index styles. In
particular in some conditions the switch entry shortcuts worked at most
once because the cursor position was not updated properly. This commit
fixes that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-21 13:35:41 +02:00
Manos Pitsidianakis
38bca8f8bc
docs/meli.conf.5: mention use_oauth2=true for gmail oauth2
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-17 14:07:07 +02:00
Manos Pitsidianakis
ec01a4412a
melib/imap: turn some sync connections to unsync
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 23:47:30 +02:00
Manos Pitsidianakis
4e941a9e8b
accounts: add default_mailbox setting
Add a default mailbox setting:

> The mailbox that is the default to open / view for this account. Must be
> a valid mailbox name.
>
> If not specified, the default is [`Self::root_mailbox`].

Closes: #350
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 18:16:05 +02:00
Manos Pitsidianakis
742f038f74
accounts: move sent_mailbox to settings
In the next commits we will add a `default_mailbox` field. Instead of
poluting the `Account` struct with more setting fields, consolidate them
on its `settings`.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 18:15:51 +02:00
Manos Pitsidianakis
484712b0c3
accounts: check for unrecoverable errors in is_online
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 18:15:50 +02:00
Manos Pitsidianakis
264782d228
Various unimportant minor style/doc fixups
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 18:15:50 +02:00
Manos Pitsidianakis
41e965b8a3
meli/accounts: split mbox/job stuff in submodules
accounts.rs is getting rather long (almost 3K lines) so split standalone
stuff in submodules.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-16 12:48:57 +02:00
Manos Pitsidianakis
f31b5c4000
melib/connections: don't print raw bytes as escaped unicode
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-15 13:20:07 +02:00
Manos Pitsidianakis
8014af2563
imap/protocol_parser: reduce debug prints
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-15 13:19:26 +02:00
Manos Pitsidianakis
4ce616aeca
CI: fix lints.yaml rustup install step
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-15 11:42:58 +02:00
Manos Pitsidianakis
a3aaec382a
melib/conf: remove unused imports
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-14 19:18:23 +02:00
Manos Pitsidianakis
b8b24282a0
Update all instances of old domains with meli-email.org
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-10 21:38:12 +02:00
Manos Pitsidianakis
e481880321
Various manpage touchups and URL updates
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-10 21:34:46 +02:00
Geert Stappers
a88b8c5ea0 debian/changelog warning fix
Added
- actual change log entries
- a space in front of hyphen hyphen
- empty lines

Signed-off-by: Geert Stappers <stappers@stappers.it>
2024-03-10 16:43:51 +02:00
Manos Pitsidianakis
b820bd6d9c
melib/imap: remove unused imap_trace! and fix comp
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-10 13:08:58 +02:00
Manos Pitsidianakis
3b93fa8e7c
state.rs: don't draw messages above embedded terminal
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-08 16:56:47 +02:00
Manos Pitsidianakis
634bd1917a
melib/imap: convert log prints to traces
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-08 16:56:33 +02:00
Manos Pitsidianakis
b5fd3f57a7
listing.rs: make self.view an Option
Prevent accessing a ThreadView if it has not been initialized by making
an uninitialized ThreadView impossible.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-08 16:56:01 +02:00
Manos Pitsidianakis
1fcb1d59b8
build.rs: remove rerun when build.rs changes
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-08 16:55:28 +02:00
Manos Pitsidianakis
e2cdebe89c
Add option to highlight self in mailing list threads
Use under `listing` options such as:

globally
========

  [listing]
  highlight_self = true

per-account
===========

  [accounts.work]
  root_mailbox = '[Gmail]'
  format = "imap"
  subscribed_mailboxes = ["*"]
  listing.index_style = "compact"
  listing.highlight_self = true

per-mailbox
===========

  [accounts.work.mailboxes]
  "INBOX/Lists/project-devel" = { listing.highlight_self=true }

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-06 17:39:28 +02:00
Manos Pitsidianakis
3884c0da1f
docs/meli.conf.5: small typographic fixups
- Add macro for literal string values to enable showing unicode
 literal characters
- Fix bool/boolean inconsistency
- Fix "true" / true inconsistency
- Add macro for horizontal rule in subsections
- Add terminal subsection about unicode modifier / combining marks for
  emojis

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-06 17:39:28 +02:00
Manos Pitsidianakis
26928e3ae9
terminal: fix compilation for macos
Fixes: 70fc2b455c ("Update nix dependency to 0.27")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-03 22:57:09 +02:00
Manos Pitsidianakis
070930e671
meli/sqlite3: Fix auto index build when missing
An error was returned from the db_path function, preventing the issuing
of the reindex command in the background.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-03 22:57:09 +02:00
Manos Pitsidianakis
c7aee72525
melib: add clippy::doc_markdown
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-03 22:57:09 +02:00
Manos Pitsidianakis
30a3205e4f
meli: Add clippy::doc_markdown
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-03 11:38:57 +02:00
Manos Pitsidianakis
9af284b8db
listing: Don't hide unread count for mailboxes that are partly truncated
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-03-01 17:14:05 +02:00
Manos Pitsidianakis
62aee4644b
Add subcommand to print log file location
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-29 12:04:49 +02:00
Manos Pitsidianakis
5af2e1ee66
Add subcommand to print config file location
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-29 11:53:30 +02:00
Manos Pitsidianakis
4e7b665672
sqlite caching refactor
General refactoring to make blocking operations use special blocking
thread workers, SQL operations to use transactions, and setting up WAL
journal mode mode to minimize locking.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-24 19:16:42 +02:00
Manos Pitsidianakis
fd64fe0bf8
README.md: update codeberg.org URL
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-21 19:54:50 +02:00
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