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

notmuch-mode #997

Closed
timmydo opened this issue Aug 24, 2023 · 5 comments
Closed

notmuch-mode #997

timmydo opened this issue Aug 24, 2023 · 5 comments
Labels

Comments

@timmydo
Copy link
Contributor

timmydo commented Aug 24, 2023

I'm currently using Emacs and notmuch (https://notmuchmail.org/) to read my email. I was interested in trying to port this UI from emacs to Common Lisp/Lem.

Notmuch is basically a command line tool that indexes a maildir into a xapian DB and lets you run commands on it. It comes with an emacs mode which provides a UI. Code: https://git.notmuchmail.org/git?p=notmuch;a=tree;f=emacs;h=ae8088e5ef4543c53edb6e2e24bf368a64097993;hb=HEAD.

If I was to make a notmuch package for Lem, what's the right way to host it? Would it be an external package or would it be in the Lem git repository?

Does lem have the right primitives for creating a UI for reading/writing mail?

@vindarel
Copy link
Collaborator

Does lem have the right primitives for creating a UI for reading/writing mail?

Hello, I'd say yes, because Lem has many primitives to display and write text. You can use plain buffers or windows (like the grep interface), you can associate attributes to text and run a command when a key is pressed on this text depending on the attribute (buttons, essentially) (grep, legit interface), you have completion windows, window popups, etc.

Lem has no text folding yet (it's in the works), same for a spell checker.

@timmydo
Copy link
Contributor Author

timmydo commented Aug 27, 2023

I was able to get some very basic stuff in a couple of hours this weekend... c7af615

image
image

It seems lem-button is nice but I'd like to be able to pass all the context I have to the same method call when I press Return on it in the buffer.

@vindarel
Copy link
Collaborator

nice!

in a couple of hours

that's the magic of Lem. I felt the codebase very approachable, discoverable, and I felt very productive when I dived into writing my first module.

lem-button

I actually didn't know the lem/button package O_o so can't help here. However, when hearing "full context", I think "use a closure?".

@timmydo
Copy link
Contributor Author

timmydo commented Aug 30, 2023

Regarding closures, I think that would work for lem-button's click event but I'm not sure how to invoke the click event from a key press in the buffer when the key press happens over the button. If I could do that, then I wouldn't need two different code paths for invoking it. It's probably possible didn't see stumble on it when I was working on it. Will take a look next time I get a chance.

@Sasanidas
Copy link
Member

Given that the worked has been moved to a PR, I'll close this issue so the development can be follow on the PR #1048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants