search command does not work #130

Closed
opened 2021-02-19 18:20:51 +02:00 by Who23 · 8 comments

I'm having problems with the search command in meli. I've checked the man pages for how to search so I think I'm doing it correctly.

When I type 'search "not flags:seen"' in the command mode, nothing changes. The listings in the current mailbox are the same, nothing has been highlighted as far as I can tell. Meli also doesn't say anything about the command being invalid, like it usually does if somehting is wrong.

However, when I put the filter = "not flags:seen" into my config.yml, the mailbox listings are changed as expected - only the unseen mail is shown.

For context, I am using a Maildir mailbox.

I'm having problems with the search command in meli. I've checked the man pages for how to search so I think I'm doing it correctly. When I type 'search "not flags:seen"' in the command mode, nothing changes. The listings in the current mailbox are the same, nothing has been highlighted as far as I can tell. Meli also doesn't say anything about the command being invalid, like it usually does if somehting is wrong. However, when I put the filter = "not flags:seen" into my config.yml, the mailbox listings are changed as expected - only the unseen mail is shown. For context, I am using a Maildir mailbox.

Hello, are you using quotes for the search term? Does "search not flags:seen" work? (Also, try latest version?)

Hello, are you using quotes for the search term? Does "search not flags:seen" work? (Also, try latest version?)

I'm using qutoes, yes. I've just updated to the master branch, and unfortunately search "not flags:seen" doesn't work. Though the putting the filter option under the listing section in the config still does work. I wonder if it has something to do with search backends? I have not configured any search backend for meli. Does the search command alter the listing, or am I looking for another command?

I'm using qutoes, yes. I've just updated to the master branch, and unfortunately `search "not flags:seen"` doesn't work. Though the putting the filter option under the listing section in the config still does work. I wonder if it has something to do with search backends? I have not configured any search backend for meli. Does the search command alter the listing, or am I looking for another command?

have you tried without quotes at all?
search not flags:seen

have you tried without quotes at all? `search not flags:seen`

Yes, I have, still does not work sadly. In a few hours, I can provide you my config + screenshots.

Yes, I have, still does not work sadly. In a few hours, I can provide you my config + screenshots.

Hey, I've attached images and my config.toml to this comment. search.jpg is my search command, after.jpg is after searching. filter.jpg is after uncommenting the last line in the config.toml and what I expect from the search command.

Let me know if you need anything else and if you're able to reproduce the issue. I'm on macOS, might have something to do with it?

Hey, I've attached images and my config.toml to this comment. `search.jpg` is my search command, `after.jpg` is after searching. `filter.jpg` is after uncommenting the last line in the `config.toml` and what I expect from the search command. Let me know if you need anything else and if you're able to reproduce the issue. I'm on macOS, might have something to do with it?

My config.toml isn't attaching, so I'll just paste it here:

[accounts.ACCOUNTNAME]
root_mailbox = "PATH_TO_MAIL/gmail"
format = "Maildir"
index_style = "Conversations" 
identity="ACCOUNTNAME@gmail.com"
subscribed_mailboxes = ["gmail/all", "gmail/inbox", "gmail/sent", "gmail/trash"]

[shortcuts.listing]
prev_page = "PageUp"
next_page = "PageDown"
prev_mailbox = 'K'
next_mailbox = 'J'
prev_account = 'l'
next_account = 'h'
new_mail = 'm'
set_seen = 'n'

[shortcuts.pager]
scroll_up = 'k'
scroll_down = 'j'
page_up = "PageUp"
page_down = "PageDown"

[pager]
html_filter = "w3m -I utf-8 -T text/html"

[composing]
send_mail = 'sendmail -t'
editor_command = 'nvim'

[terminal]
theme = "dark"

[listing]
# filter = "not flags:seen"
My config.toml isn't attaching, so I'll just paste it here: ``` [accounts.ACCOUNTNAME] root_mailbox = "PATH_TO_MAIL/gmail" format = "Maildir" index_style = "Conversations" identity="ACCOUNTNAME@gmail.com" subscribed_mailboxes = ["gmail/all", "gmail/inbox", "gmail/sent", "gmail/trash"] [shortcuts.listing] prev_page = "PageUp" next_page = "PageDown" prev_mailbox = 'K' next_mailbox = 'J' prev_account = 'l' next_account = 'h' new_mail = 'm' set_seen = 'n' [shortcuts.pager] scroll_up = 'k' scroll_down = 'j' page_up = "PageUp" page_down = "PageDown" [pager] html_filter = "w3m -I utf-8 -T text/html" [composing] send_mail = 'sendmail -t' editor_command = 'nvim' [terminal] theme = "dark" [listing] # filter = "not flags:seen" ```

This is weird behavior, there should have been a clear message shown when the search doesn't work for some reason. I think it's what you said here:

Though the putting the filter option under the listing section in the config still does work. I wonder if it has something to do with search backends? I have not configured any search backend for meli. Does the search command alter the listing, or am I looking for another command?

The filter setting is read while making the mail list shown in the terminal, whereas the search is sent to the mail backend. Setting up an sqlite3 backend and building the index should work.

But yeah, in this case an error should be shown. Apologies for the confusion!

This is weird behavior, there should have been a clear message shown when the search doesn't work for some reason. I think it's what you said here: > Though the putting the filter option under the listing section in the config still does work. I wonder if it has something to do with search backends? I have not configured any search backend for meli. Does the search command alter the listing, or am I looking for another command? The filter setting is read while making the mail list shown in the terminal, whereas the search is sent to the mail backend. Setting up an sqlite3 backend and building the index *should* work. But yeah, in this case an error should be shown. Apologies for the confusion!
Manos Pitsidianakis added the
bug
label 2021-09-26 14:09:52 +03:00

I believe this was caused by a combination of things:

  1. search error wasn't propagated as a notification event
  2. notifications won't show up if meli doesn't have a dbus connection and doesn't have a notification command set.

I believe these two things are fixed by the following commits I just pushed:

  • bde87af387 Refactor filter() method in Listing trait
  • a42a6ca868 notifications.rs: show notifications in terminal if no alternative

Closing this issue but if the problem persists please re-open it.

I believe this was caused by a combination of things: 1. search error wasn't propagated as a notification event 2. notifications won't show up if meli doesn't have a dbus connection and doesn't have a notification command set. I believe these two things are fixed by the following commits I just pushed: - bde87af387 Refactor filter() method in Listing trait - a42a6ca868 notifications.rs: show notifications in terminal if no alternative Closing this issue but if the problem persists please re-open it.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#130
There is no content yet.