Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview mailboxes with telescope #69

Merged
merged 6 commits into from
Apr 8, 2021
Merged

Preview mailboxes with telescope #69

merged 6 commits into from
Apr 8, 2021

Conversation

AckslD
Copy link
Contributor

@AckslD AckslD commented Apr 6, 2021

I started adding preview of mailboxes using telescope. It works well, see (blurred) screencapture below. The only issue is when a mailbox is empty since there is then an error somewhere in the vimscripts I think. @soywod Is there a way to capture this error or perhaps check beforehand if the mailbox is empty or not?

himalaya

@soywod soywod added enhancement New feature or request vim labels Apr 6, 2021
vim/autoload/himalaya/shared/log.vim Outdated Show resolved Hide resolved
@AckslD
Copy link
Contributor Author

AckslD commented Apr 8, 2021

@soywod I updated the himalaya#msg#list-function now, let me know what you think. One thing to point out is that I added a redraw call in the preview function to avoid the Press ENTER or type command to continue-message when there is an error. The message Fetching <mailbox> messages [<status>]-message will then not be showed in case of error but instead printed in the preview buffer.

I also change how errors are thrown in himalaya#shared#cli#call in order to get the error message in the preview buffer.

Copy link
Member

@soywod soywod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are almost good :) thanks for your awesome work!

vim/autoload/himalaya/msg.vim Outdated Show resolved Hide resolved
vim/autoload/himalaya/shared/cli.vim Outdated Show resolved Hide resolved
@soywod
Copy link
Member

soywod commented Apr 8, 2021

Looks good to me, I guess we can merge. Thanks for your contribution!

@soywod soywod merged commit e15acc3 into pimalaya:master Apr 8, 2021
@AckslD
Copy link
Contributor Author

AckslD commented Apr 8, 2021

Cool 🎉 I'm happy that I could contribute :)

@AckslD AckslD deleted the 61-telescope-preview branch April 8, 2021 16:53
@soywod
Copy link
Member

soywod commented Apr 11, 2021

@AckslD I opened an issue related to this feature: #92. Feel free to contribute if you want (since you already worked on this part) 😃.

@soywod soywod added this to the v1.0.0 milestone Apr 17, 2021
koalp pushed a commit to koalp/himalaya that referenced this pull request Sep 17, 2021
* Preview mailboxes with telescope

* Output error message in preview

* Throw error

* Refactored himalaya#msg#list and handle errors in telescope preview

* Changes based on feedback

* Added argument should_throw to cli function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants