You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using poetry.el for a while, and it works perfectly.
However, recently I started exploring magit's magit-diff-visit-file, which is bound to RET in a magit diff view such as shown in the status buffer. When on a removed line, it jumps back to the previous blob containing that line, which is handy.
However, when poetry-tracking-mode is active, the command also seems to revert the worktree file to that old blob, discarding any unstaged/uncommitted changes to that file. This happened a couple of times (latest magit and poetry.el), and there is no way to recover the unstaged changes in the reverted worktree file, except for copying back the ~ backup file.
Somehow, when doing magit-diff-visit-file on a removed line, the blob's buffer shows up, followed by messages "Compilation finished" and "Poetry finished", after which the worktree file buffer is reverted.
However, figuring out which specific command actually changes the contents of the worktree file is rather tough to debug. I suspect some kind of hook function, but thus far my hypotheses were not successful.
Any idea what could go wrong?
PS: I'm using poetry.el with the latest lsp-mode on Emacs 29.3.
The text was updated successfully, but these errors were encountered:
I've been using poetry.el for a while, and it works perfectly.
However, recently I started exploring magit's
magit-diff-visit-file
, which is bound to RET in a magit diff view such as shown in the status buffer. When on a removed line, it jumps back to the previous blob containing that line, which is handy.However, when
poetry-tracking-mode
is active, the command also seems to revert the worktree file to that old blob, discarding any unstaged/uncommitted changes to that file. This happened a couple of times (latest magit and poetry.el), and there is no way to recover the unstaged changes in the reverted worktree file, except for copying back the ~ backup file.After a discussion on https://www.reddit.com/r/emacs/comments/1f7nz9e/reverting_to_worktree_version_after/, magit/magit#5218, and some debugging, the culprit issue seems to be at poetry.el's side.
Somehow, when doing
magit-diff-visit-file
on a removed line, the blob's buffer shows up, followed by messages "Compilation finished" and "Poetry finished", after which the worktree file buffer is reverted.However, figuring out which specific command actually changes the contents of the worktree file is rather tough to debug. I suspect some kind of hook function, but thus far my hypotheses were not successful.
Any idea what could go wrong?
PS: I'm using poetry.el with the latest lsp-mode on Emacs 29.3.
The text was updated successfully, but these errors were encountered: