-
Notifications
You must be signed in to change notification settings - Fork 19
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
Ways to edit attachments #182
Comments
After implementing #10, I think what would be useful to add in the configuration is a: Map ContentType (ProcessConfig ()()()) Meaning, if we can lookup the ProcessConfig type (which supports Perhaps a Plugin could be later utilized which could for example parse an existing |
I looked into this. The tricky bit could be
It seems |
@romanofski I think we want a richer type anyway - one that we can easily convert into a Alternatively, just make the |
I tried the latter, but that means I can pattern match on the |
@romanofski write the Push your WIP and let me help if you are unsure how to continue. |
Cheers! I'll try it out. I'll finish #263 off first since it's mostly mechanical work ... |
This adds a proof of concept mailcap declaration. If we can lookup a command, use it as a preference otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the input editor to a different keystroke tho. This patch would also fix #174 since it is now possible to automatically invoke a program to see HTML output. Fixes #182 and #174
This adds a proof of concept mailcap declaration. If we can lookup a command, use it as a preference otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the input editor to a different keystroke tho. This patch would also fix #174 since it is now possible to automatically invoke a program to see HTML output. Fixes #182 and #174
This adds a proof of concept mailcap declaration. If the lookup for a content type is successful, we use the mapped command, otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the previous open action to a different keystroke. A sample mailcap is used and adds a mapping from text/html, application/pdf to xdg-open. This patch would also fix #174 since it is now possible to automatically invoke a program to view an HTML attachment. Fixes #182 and #174
This adds a proof of concept mailcap declaration. If the lookup for a content type is successful, we use the mapped command, otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the previous open action to a different keystroke. A sample mailcap is used and adds a mapping from text/html, application/pdf to xdg-open. This patch would also fix #174 since it is now possible to automatically invoke a program to view an HTML attachment. Fixes #182 and #174
If the lookup for a content type is successful, we use the mapped command, otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the previous open action to a different keystroke. A sample mailcap is used and adds a mapping from text/html to elinks and a catch all to xdg-open. This patch would also fix #174 since it is now possible to automatically invoke a program to view an HTML attachment. Fixes #182 and #174 erasf
If the lookup for a content type is successful, we use the mapped command, otherwise show an input editor. Keep the possibility to open the attachment with a different command by binding the previous open action to a different keystroke. A sample mailcap is used and adds a mapping from text/html to elinks and a catch all to xdg-open. This patch would also fix #174 since it is now possible to automatically invoke a program to view an HTML attachment. Fixes #182 and #174 erasf
Will have to open this, since I filed this when I was hacking on listing attachments. I stumbled over a comment: -- in src/UI/Actions.hs
Nothing -> pure $ setError (GenericError "No file selected to edit") s
Just (_, m) -> case preview (headers . contentDisposition . dispositionType) m of
(Just Inline) -> invokeEditor' s
_ -> pure $ setError (GenericError "Not implemented. See #182") s Stumbling over this FIXME string actually reminded me of what #182 originally was intended when I filed it: The ability that the author of an e-mail can edit attachments on a newly composed email. We currently support only text/plain editing of the inline body, but this issue was intended that any attachment can be edited, saved and updated on composed mail. |
I'm thinking of adding an additional mailcap setting for editing attachments, e.g. data MailViewSettings = MailViewSettings
{ -- [...]
, _mvMailcap :: [(ContentType -> Bool, MailcapHandler)]
} to data MailViewSettings = MailViewSettings
{ -- [...]
, _mvOpenMailcap :: [(ContentType -> Bool, MailcapHandler)]
, _mvEditMailcap :: [(ContentType -> Bool, MailcapHandler)]
} and use |
We need a way to view/edit attachments.
My initial thoughts were to add a parser for a mailcap file, but in 2018 perhaps there are better ways.
The text was updated successfully, but these errors were encountered: