mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 17:56:00 +03:00
[GH-ISSUE #11] [Feature request] URL interaction (and, more generally, content editing) #10
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kabouik on GitHub (Jan 13, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/11
Originally assigned to: @d99kris on GitHub.
Sorry for the numerous feature requests, but those are merely ideas for your to evaluate, I mean no pressure.
Since many emails are sent as HTML (and nmail does a great job dealing with those using Lynx), sometimes it is necessary to open a link to actually read any sensible content — at least when the sender is trustworthy. Yet, at the moment, URLs cannot be interacted with. I know Neomutt uses
urlviewto list all URL's found in the body of the message and offer a dedicated screen to pick the URL to open, but it also allows just clicking (or Ctrl+Clicking) on URLs to open the in the default browser. That would be nice too.Actually, anything not requiring too many external dependencies would be good, as one thing I appreciate with nmail is it is almost self-sufficient (except for Lynx). I know the UNIX way is to have one tool for one function and I appreciate that too, but the fact that nmail does not require many external tools is also a strength since some may or may not be available on some distributions or architectures. It also helps with configuration compared to other MUAs like Neomutt or Sup which depend on several tools and configuration file before being usable.
Something that might be related would be the ability to
Ctrl+ewhen reading an e-mail to edit it, and possibly copy some of its content and save it somewhere else. It would be useful when receiving code bits over e-mail for instance, or some text to be reviewed and edited for a collaborative document. Text selection is possible from the terminal, and one can thenShift+Ctrl+Cto copy, but it is less powerful.@d99kris commented on GitHub (Jan 13, 2020):
Don't worry, all feedback is welcome! I'll address it when (and if) I find time. :)
Yes the missing URL interaction is a good point. Currently for my own use, I rely on the terminal's handling of this (on Mac it's a Cmd + mouse click on URL). But yes, a keyboard oriented interface would be preferred. I'll look into what options there could be.
Regarding opening an email in an editor, nmail lets you view email content in an external viewer/editor by going to the "MsgParts" (same as were attachments are listed) and selecting the "text/plain" or "text/html" part and pressing
>orenter. It will use the configuredext_viewer_cmdto open the content. Would this be sufficient or do you still think aCtrl+e(or equivalent) would be useful when viewing emails?I guess we need to get external viewer
ext_viewer_cmdworking for you before this question can be answered.@Kabouik commented on GitHub (Jan 13, 2020):
For some reason, the terminal's (Tilix here) handling of URLs did not work for me while it did in Neomutt. I did not investigate thoroughly though. Looking closer now, it seems to work on some URLs. I am having a hard time trying to find what differs between those that are clickable and those that are not, but a couple things that might be worth investigating: presence of hyphens in the URL, and whether the URL is in the present mail or in its history. However this needs more testing, including the same URLs from different terminal emulators.
Oh absolutely, you're right about the text as attachment, I forgot about it. Thanks. I see it also allows opening the html version in browser, nice (although opening temporary files does not work for me yet). I think adding
Ctrl+esupport would still be useful for those who want to do as much as possible from terminal, as it would allow using $EDITOR in the same window.@d99kris commented on GitHub (Jan 14, 2020):
Thanks for the additional info! I think there may be some bug with how
nmailbreaks URLs longer than the terminal width, I'll look into that separately as well.Yeah
Ctrl+ecan probably be added, my only concern is what the functionality "means" to a user if presented in the "help bar". They may think they can edit existing emails in their inbox (which can't really be supported in a good way). But yeah I agree it would be a useful functionality also for me sometime, so I'll consider it.@Kabouik commented on GitHub (Jan 14, 2020):
I totally understand your concern about
ctrl+e. Perhaps a less ambiguous way would be to add the option in the help bar of the attachments screen only, so that one can open text files with thectrl+e$EDITOR in addition of the default xdg-open when hittingReturnor>? That way, people would more easily understand they are just editing a MsgPart, not the actual body of the mail, and save it as a file, not an email from the index. It may be kind of awkward still, but editing those would require one to acknowledge they are working on files and not on the index content.@d99kris commented on GitHub (Feb 11, 2020):
With above commit I've implemented support for viewing messages in external viewer. By default it uses
$PAGER, but with the config settingpager_cmdin~/.nmail/main.confone may override it to any command of choice - for example your favourite editor. I figured this would be the most "standards" compliant way to add such functionality. Let me know if it works for you. No rush :)If you think nmail would still benefit from URL navigation "in app" please re-open this issue, or report a new one, and I'll consider it again. Thanks!