Closed danielkrajnik closed 1 year ago
Yes, there is a keyboard binding and config option for opening.
søn. 4. jun. 2023, 00:37 skrev danielkrajnik @.***>:
Does astroid allow for opening attachments? Seems like clicking on the attachment doesn't have any effect. This system does have a default pdf reader that should handle this. When clicking no output is shown in the console from where astroid was started neither.
[image: image] https://user-images.githubusercontent.com/15096799/243137276-feadabd7-f276-43e6-89f7-f482a6de5b1f.png
— Reply to this email directly, view it on GitHub https://github.com/astroidmail/astroid/issues/729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN362S3IW7XGCFUUMRSALXJO4CBANCNFSM6AAAAAAYZRMOBM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank you. Thanks to your tip I've managed to open the attachment by focusing on it and pressing Enter, but I couldn't find a specific keybinding to open attachments (if that's what you meant)?
Generating keybindings templates and grepping for "attach":
src/astroid/devel/get_keys.py > ~/.config/astroid/keybindings.orig
# edit_message.attach=a # Attach file, default: a
# edit_messsage.attach_mids=A # Attach messages by mids, default: A
# thread_index.forward_attached=UnboundKey () # Forward last message in thread attached, no defaults.
# thread_view.save=s # Save attachment or message, default: s
# thread_view.delete_attachment=d # Delete attachment (if editing), default: d
# thread_view.save_all_attachments=S # Save all attachments, default: S
# thread_view.forward_attached=UnboundKey () # Forward current message as attachment, no defaults.
none of them seem to open
attachments? Or do you need to configure it first?
You can choose the external open command: https://github.com/astroidmail/astroid/blob/master/src/chunk.cc#L585 with a config option.
I'm pretty sure the wiki has some more stuff here on how to do antivirus and making this more robust.
You can also save the attachment with another key.
søn. 4. jun. 2023, 16:31 skrev danielkrajnik @.***>:
Thank you. Thanks to your tip I've managed to open the attachment by focusing on it and pressing Enter, but I couldn't find specific keybindings to open attachments?
Generating keybindings templates and grepping for "attach": src/astroid/devel/get_keys.py > ~/.config/astroid/keybindings.orig
edit_message.attach=a # Attach file, default: a
edit_messsage.attach_mids=A # Attach messages by mids, default: A
thread_index.forward_attached=UnboundKey () # Forward last message in thread attached, no defaults.
thread_view.save=s # Save attachment or message, default: s
thread_view.delete_attachment=d # Delete attachment (if editing), default: d
thread_view.save_all_attachments=S # Save all attachments, default: S
thread_view.forward_attached=UnboundKey () # Forward current message as attachment, no defaults.
none of them seem to open attachments?
— Reply to this email directly, view it on GitHub https://github.com/astroidmail/astroid/issues/729#issuecomment-1575591213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN3647H3NNEHZACI5BNWTXJSL5TANCNFSM6AAAAAAYZRMOBM . You are receiving this because you commented.Message ID: @.***>
No, that's just for choosing which program opens it. The key is enter, or the activate element key.
tir. 6. jun. 2023, 02:19 skrev danielkrajnik @.***>:
Sorry, I may be doing something wrong, but are you saying that adding this line: attachment.external_open_cmd=C-O
to .config/astroid/keybindings should assign it a keybinding? I've tried it just now (with a few combinations), but none of them seem to do anything. Opening a mail with an attachment and pressing this keybinding didn't seem to work?
— Reply to this email directly, view it on GitHub https://github.com/astroidmail/astroid/issues/729#issuecomment-1577720811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN365DWERA5KSWIT5FFWLXJZZSZANCNFSM6AAAAAAYZRMOBM . You are receiving this because you commented.Message ID: @.***>
thanks for clarifying and sorry, I've removed my last reply shortly after posting it (incorrectly asking if attachment.external_open_cmd
was part of the keybindings
file before realizing that it sits in the config). No worries, I agree that just highlighting an attachment and pressing enter should be fine.
Does astroid allow for opening attachments? Seems like clicking on the attachment doesn't have any effect. This system does have a default pdf reader that should handle this. When clicking no output is shown in the console from where astroid was started.