Skip to content

Enabling explain-pause-mode causes committing via magit/with-editor over TRAMP to stop working (Root cause: with-editor checks for itself with process-filter, which fails because we wrapped it) #46

@tomfitzhenry

Description

@tomfitzhenry

Steps to reproduce

explain-pause-mode: version 318dace
magit: magit-20200108.532
emacs: 26.3
NixOS 20.03

Set up a git repo on a remote machine:

SERVER=srv
ssh $SERVER "mkdir tmp-git && cd tmp-git && git init

Now try to commit to that repo via magit over TRAMP, when explain-pause-mode is called.

(add-to-list 'load-path "~/.emacs.d/lisp/")

(require 'package)
(require 'explain-pause-mode)
(explain-pause-mode t)
(require 'magit)

(magit-status "/ssh:$SERVER:tmp-git")

To commit, switch to the "magit: tmp-git" buffer, and hit "c c"

Expected

magit's mode for writing commit message is displayed.

Actual

magit's mode for writing commit message is not displayed. The current buffer is still "magit: tmp-git". There is a buffer named "magit-process: git-tmp" which is typically read by with-editor's process filter (which doesn't get executed, when explain-pause-mode is enabled).

Some diagnosis

If I don't execute explain-pause-mode, then I get the expected behaviour.

Attempt at figuring root cause

Using edebug-defun I set edebug to trace calls to explain--wrap-set-process-filter-callback and with-editor-process-filter .

When explain-pause-mode is enabled, I observe only is executed explain--wrap-set-process-filter-callback (notably, with-editor-process-filter is not executed). I expect with-editor-process-filter to also execute, however.

When explain-pause-mode is disabled, I observe with-editor-process-filter is executed, as expected.

More context

#44 (comment)
https://github.com/tomfitzhenry/dotfiles/commit/09d05c4d16a9421b9cb8b9efde550f4549fec4e0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas-reproHas a repro case

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions