Translate popup - #161
Open
agzam wants to merge 3 commits into
Open
Conversation
agzam
added a commit
to agzam/.doom.d
that referenced
this pull request
Feb 13, 2026
atykhonov/google-translate#161 And may take a while to see it merged, for now I'm consuming it from my own fork
The context-aware popup detected paragraphs and sentences with mode-agnostic movement, which misfired in Org and Markdown: a heading grabbed the body paragraph below it, list items collapsed to a single word, and sentences beginning on a wrapped line were missed. Detection is now major-mode aware. Headings resolve to a clean title (Org via org-element raw-value, Markdown ATX/Setext), paragraphs and list items are bounded through org-element and Markdown-aware movement with bullets and checkboxes excluded, and sentence starts are matched across a single line break. Priority is region > heading > paragraph/item > sentence > word.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A while ago I built a posframe popup that piggybacks on google-translate.el and it's been working beautifully. I thought it should be the part of the package rather than sitting in my config - no good for anyone but me.
It's great for when reading books, works in markdown and org-modes, etc. Here's an example of how it looks:
I'm willing to pledge maintenance and support for this feature, please give it a consideration. Otherwise I'll just keep it in my fork and people interested in using it will have to fetch the package from there.