Closed codeasone closed 8 months ago
Hmm, I can't reproduce this. I already manage the excursion and restriction with org-with-wide-buffer
when saving the buffer. This macro is included with Org:
(defmacro org-with-wide-buffer (&rest body)
"Execute body while temporarily widening the buffer."
(declare (debug (body)))
`(save-excursion
(save-restriction
(widen)
,@body)))
But it looks like it's not working for you. Does adding an additional save-excursion on top fix it?
I didn't realise org-with-wide-buffer
was doing a save-excursion
. That should be sufficient. I'll check I can repro the issue I was having without the details of my personal config muddying things, and get back to you shortly.
@karthink I re-evaluated with a minimal dotemacs and couldn't reproduce the problem either, meaning it's an own goal related to the peculiarities of my broader configuration.
Apologies for not assessing that before raising the PR. Thank you for developing gptel
it's fitting into my workflow really well!
I was using
gptel-mode
when editingorg-roam
files and noticed point was moving to the top of the buffer on save, not returning to where I was last editing the file as expected