-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Support xdg-email
via mailto:
scheme
#162
Comments
Maybe we should introduce a new subcommand (let's say |
I would disagree. As a user, if I saw a application menu item for Himalaya (ala the Start menu in Windows), I would expect:
This is what the default action should probably be (which is why
Docs show:
which is just handed off to the default That last command for reference: $ xdg-email --subject 'Your password is about to expire' \
'[email protected]' '[email protected]' '[email protected]'
error: Found argument 'mailto:[email protected]?subject=Your%20password%20is%20about%20to%20expire&[email protected]&[email protected]' which wasn't expected, or isn't valid in this context
USAGE:
himalaya [OPTIONS] [SUBCOMMAND]
For more information try --help Other effects: I would assume this is similar if not exactly what a browser would give you too which is another common vector for opening the TUI. Thoughts? |
I have never written C but here's what NeoMutt appears to be doing https://github.com/neomutt/neomutt/blob/a5f8317a52aca8dee96335888eb17ac53c959805/main.c#L865 And it being in the |
I totally agree with you. Thank you for your deep analysis. The template API I refactored recently really looks like the |
After diving into this issue, I realize that a simple bridge will not be enough. In fact we need to be able to parse the mailto URL scheme (which is specified in the RFC2368). I did not find a crate doing this job. I'm thinking about creating a special crate for this purpose, what do you think @toastal? |
Wait, in fact I just tried with https://crates.io/crates/url and it works well. I thought it was only for URLs, but it seems to be more generic. Good news! |
Good to hear! |
I just pushed a first attempt. Could you try and let me know? Notice that attachments are not handled yet (I would like to validate the model with you first). |
Oops, I forgot the |
Can this be closed or does this issue still exist? |
Well, I would like to wait for @toastal to approve the fix whenever he can. It's been a while tho. Let's wait a bit more before closing! |
Approve what? I haven't seen a new release cut, so I'm still on the latest stable from my package manager. |
The master branch has been merged with my PR with several changes. So it might fix your issue as well. Could you please try it again with the master branch? |
I was referring to this comment of mine: #162 (comment). I can also put this feature in the next release and I will let you open an issue if sth does not work as expected? I just wanted to be sure to have implemented the thing correctly (as you described). |
As I described? 😅 I'm no expert; I was just relaying what other mail apps were doing/expecting. I only vaguely know Rust, but it seems okay. A faster, even slightly broken release would be preferable. Currently the app is mildly broken on Linux because of the |
Alright, then let's see the result in the next release. Thanks! |
https://www.systutorials.com/docs/linux/man/1-xdg-email/
By using the
himalaya.desktop
file, I discovered new errorsThis looks like the
mailto:
protocol you might see on an HTML anchor<a href="mailto:[email protected]?body=xx&cc=yy">mail it</a>
. With this being the XDG standard, it would be nice if thismailto:
were given a special case and handed off tohimalaya write
. What this would then allow is downstream scripts to hand-off email duty to whatever tool the user has set.The text was updated successfully, but these errors were encountered: