Skip to content

Revert "gptel-rewrite: Diff buffers, not files (#731)"#1096

Open
aagit wants to merge 1 commit intokarthink:masterfrom
aagit:diff-files
Open

Revert "gptel-rewrite: Diff buffers, not files (#731)"#1096
aagit wants to merge 1 commit intokarthink:masterfrom
aagit:diff-files

Conversation

@aagit
Copy link
Copy Markdown
Contributor

@aagit aagit commented Oct 9, 2025

This reverts commit 0ce917a.

The above commit while not wrong per se, prevents to use diff-mode to apply hunks, which makes it not a good tradeoff.

This reverts commit 0ce917a.

The above commit while not wrong per se, prevents to use diff-mode to
apply hunks, which makes it not a good tradeoff.
@karthink
Copy link
Copy Markdown
Owner

If possible, I would rather find a way to get diff-mode to apply the hunks to buffers. I'll look into it, but if you've studied this already you can let me know if this is possible.

@aagit
Copy link
Copy Markdown
Contributor Author

aagit commented Oct 25, 2025

That I would prefer too indeed. It didn't appear possible, but I didn't spend much time trying.

@pabl0
Copy link
Copy Markdown
Contributor

pabl0 commented Mar 22, 2026

Isn't this possible in ediff?

@aagit
Copy link
Copy Markdown
Contributor Author

aagit commented Mar 28, 2026

I'm sorry I don't find ediff a good alternative. One thing is to review code one thing is to review what changed. In this case I need to review what changed, akin to git log. When I do conflict resolution I prefer to see code not diffs as I need to review code as well not just what changed. ediff is not my favorite interface in general. diff mode is also quite nice in how it allows to split a diff and selectively apply or drop hunks.

@pabl0
Copy link
Copy Markdown
Contributor

pabl0 commented Mar 29, 2026

How about two separate actions: diff (buf), diff files, or something along those lines? Too confusing?

@aagit
Copy link
Copy Markdown
Contributor Author

aagit commented Mar 29, 2026

a diff files option sounds great with me.... it's a workaround, but it's certainly simpler than a upstream diff-mode change. It should be simple to drop if diff-mode is improved later.

The biggest upstream shortfall is not diff-mode but the scrolling over overlays, I really really would like the inference to keep showing the last character of the overlay in my window with auto scrolling, I don't even pretend to move the pointer inside the overlay if I could just show it automatically as it is extended by the inference.... Similarly to what you can achieve with gptel-auto-scroll. Alternatively if it's simpler it should be possible to move the pointer through the overlay with up/down pgup/pgdown. So I don't think it's worth spending time on diff-mode when there's a bigger usability problem in the core.

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

Successfully merging this pull request may close these issues.

3 participants