Skip to content

Conversation

pabl0
Copy link
Contributor

@pabl0 pabl0 commented Feb 7, 2025

  • gptel-transient.el (gptel--read-crowdsourced-prompt, gptel--edit-directive, gptel--suffix-system-message): Deactivate the mark after entering the prompt-edit buffer for a crowdsourced prompt (gptel-transient: Improve directive/system message editing #616). This behaviour was introduced in commit cc53a81, but it did not actually work since deactivate-mark' was called after returning from gptel--read-crowdsourced-prompt', when it was too late.

(Also a slight indentation adjusment, @karthink are you editing elisp with some non-standard indentation mode?)

@karthink
Copy link
Owner

karthink commented Feb 7, 2025

There is one more use of gptel--edit-directive in gptel-rewrite.el. Please modify that call too.

* gptel-transient.el (gptel--read-crowdsourced-prompt,
gptel--edit-directive, gptel--suffix-system-message): Deactivate the
mark after entering the prompt-edit buffer for a crowdsourced
prompt (karthink#616). This behaviour was introduced in commit cc53a81, but
it did not actually work since `deactivate-mark' was called after
returning from `gptel--read-crowdsourced-prompt', when it was too
late.

* gptel-rewrite.el (gptel--suffix-rewrite-directive): Call
`gptel--rewrite-directive' with mark activation enabled.
@pabl0
Copy link
Contributor Author

pabl0 commented Feb 8, 2025

There is one more use of gptel--edit-directive in gptel-rewrite.el. Please modify that call too.

Good catch, will fix, thx.

@pabl0 pabl0 force-pushed the really-deactivate branch from 35d86ff to eb498f6 Compare February 8, 2025 08:13
@karthink karthink merged commit ae1cc57 into karthink:master Feb 8, 2025
@karthink
Copy link
Owner

karthink commented Feb 8, 2025

Thanks @pabl0! Also thanks for adhering to gptel's never-formally-specified commit message format. Did you write it that way for gptel specifically, or do you use a similar format elsewhere?

@pabl0
Copy link
Contributor Author

pabl0 commented Feb 8, 2025

Thanks @pabl0! Also thanks for adhering to gptel's never-formally-specified commit message format. Did you write it that way for gptel specifically, or do you use a similar format elsewhere?

😎 Yes, generally it's best to follow the commit message style used by a project's main authors. This format appears to be similar to that used by the GNU Emacs developers. (Which I believe is still used to generate the old-school ChangeLog when a new version is released, omitting some trivial changes.)

marcbowes pushed a commit to marcbowes/gptel that referenced this pull request Mar 19, 2025
)

* gptel-transient.el (gptel--read-crowdsourced-prompt,
gptel--edit-directive, gptel--suffix-system-message): Deactivate the
mark after entering the prompt-edit buffer for a crowdsourced
prompt (karthink#616). This behaviour was introduced in commit cc53a81, but
it did not actually work since `deactivate-mark' was called after
returning from `gptel--read-crowdsourced-prompt', when it was too
late.

* gptel-rewrite.el (gptel--suffix-rewrite-directive): Call
`gptel--rewrite-directive' with mark activation enabled.
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