search command does not work #100

Open
opened 10 months ago by Who23 · 7 comments
Who23 commented 10 months ago

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.
Owner

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?)
Poster

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?
Owner

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

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

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.
Poster

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?
Poster

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" ```
Owner

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!
epilys added the
bug
label 2 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.