Skip to content
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

[Feature request] Suggesting/Edit-mode for ChatGPT response to help with proofreading texts #127

Open
mfasold opened this issue Jul 12, 2023 · 5 comments

Comments

@mfasold
Copy link

mfasold commented Jul 12, 2023

It might be a bit far-fetched, but per this reddit thread I still try to post my feature idea here.

The main concept is this: I would like to use ChatGPT to proofread texts using prompts like "Proofread this text: [TEXT]". Essentially, this would be a combination of spellcheck, grammar check, and style check. Some argue that it works better than Grammarly. The idea is that one could highlight a text in Emacs, send it to ChatGPT with the proofread prompt prefix, and receive a [PROOFREAD_TEXT]. It would then be useful to compare the [PROOFREAD_TEXT] with the original [TEXT], enabling the user to accept or decline each of the suggestions, similar to the suggest mode in text processors like Word, Google Docs, or Libre Office. The browser plugin EditGPT does this. It would be great to have a similar feature in Emacs. I believe that an edit-mode for ChatGPT-suggested changes could have many applications, including improving code, prose, and documentation.

@xenodium
Copy link
Owner

Thanks for filing the feature request. chatgpt-shell-proofread-region currently proofreads a region (presenting result in separate buffer), but lacks the interactive application of diff hunks. Do you happen to know another Emacs package that has this functionality (interactively apply patches)?

@mfasold
Copy link
Author

mfasold commented Jul 14, 2023

I did some research, but - surprising enough - I did not find such a package. I was actually looking for the Grammar/Style checkers, but they mostly seem to rely on Flycheck to Flymake to mark the issues, without the possibility to apply patches.

Furthermore, I just did another search based on your freshly introduced keywords, and found that Emacs diff mode obviously supports interactive application of hunks.

My feeling is, however, that the line-based approach implicated by "diff hunks" would not work well as the proofread text might have a different line structure. Hence, one needs to identify the text changes using something like Levenshtein-Edits or the Needleman-Wunsch algorithm.

@xenodium xenodium changed the title Idea: Suggesting/Edit-mode for ChatGPT response to help with proofreading texts [Feature request] Suggesting/Edit-mode for ChatGPT response to help with proofreading texts Oct 4, 2024
@xenodium
Copy link
Owner

You might find the new generic M-x chatgpt-shell-quick-modify-region useful. Beware: It's still very fresh.

proofread_x1 2

@mfasold
Copy link
Author

mfasold commented Oct 23, 2024

Nice! It just tried and it works nicely. The highlighting of changes looks good, too. My first impression is that a point-by-point suggest/approve of changes could be beneficial for longer paragraphs. But I shall first test this new functionality for a couple of weeks to be able to judge if this is really so.

@xenodium
Copy link
Owner

I'm thinking along the same lines. Maybe extend the options of keep change? (y/n) to offer that interactivity. May take me a little while to get there. Working on internal cleanups to enable more things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants