Skip to content

Quote reply to the complete response with R#513

Open
martenlienen wants to merge 2 commits into
xenodium:mainfrom
martenlienen:quote-reply
Open

Quote reply to the complete response with R#513
martenlienen wants to merge 2 commits into
xenodium:mainfrom
martenlienen:quote-reply

Conversation

@martenlienen
Copy link
Copy Markdown
Contributor

Add a keybinding R in view-mode to quote reply to the complete response without having to mark it first. This is useful when one wants to respond to many points by the agent in detail.

This is a follow-up to #512, so includes those changes as well. It makes sure not to show the response as context at the top, because it is all quoted anyway.

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I've added tests where applicable.
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

@martenlienen martenlienen changed the title Quote reply Quote reply to the complete response with R Apr 9, 2026
Copy link
Copy Markdown
Owner

@xenodium xenodium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Looks like a nice addition. Went to try it out, but I'm missing agent-shell-viewport-quote-reply. Am I missing a piece from PR?

Comment thread agent-shell-viewport.el
@martenlienen
Copy link
Copy Markdown
Contributor Author

Sorry for that oversight. I lost the function while juggling all of these PRs in my local repository and moving a patch between them. Now everything should be here.

@martenlienen
Copy link
Copy Markdown
Contributor Author

Hey @xenodium did you have a chance to look at this again? This PR and the included changes from #512 are features that I rely on every day and they improve the viewport flow significantly for me, so I think it would be great for the community to have them merged.

@xenodium
Copy link
Copy Markdown
Owner

Thanks for the ping and apologies for the delay. I'm gradually getting back to agent-shell work, but still finding my footing due to #500.

I had a play with it. I really like R and agent-shell-viewport-quote-reply but found that #512 makes my reply buffers a little busy by default. I'm gonna use it a little more to see if I can get used to it, but gut feeling at the moment is to keep #513 and possibly drop #512. At present, the compose buffers can easily access previous pages and even remember drafts if you happen to want to go back and forth.

@martenlienen
Copy link
Copy Markdown
Contributor Author

I agree that it the look is not as nice as before where the reply buffer is completely clean. However, I reference the last agent message so often to write my reply that it is worth it to me to have it always visible without having to peek.

My mental model is as follows. If we denote user messages as U and agent messages as A, viewport lets us focus on [U A] pairs of messages in a long chat U A U A U A [U A]. With #512, we are only moving forward a half step [A U'] while drafting message U' instead of having the viewport at [U' _] with a non-existing agent response. I have also thought about advising f and b to allow to navigate through the history by half steps in general, i.e. make U A U [A U] A U A a legal viewport state, but I have not tried that yet.

I think what makes sense for the user depends on how they think about the agent interaction. If the mental model is that the user sends a request and the model a response, then it makes sense to only allow to look at [U A] pairs of messages. But if the user message can also be a response to what the agent said, then it also makes sense for the user to want to look at [A U] pairs in the viewport.

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.

2 participants