larstvei / Focus

Dim the font color of text in surrounding paragraphs
470 stars 14 forks source link

Possible helm incompatibility. #13

Closed FrancisMurillo closed 7 years ago

FrancisMurillo commented 7 years ago

A non-fatal error occurs when I execute the following steps with the helm interface:

  1. Trigger focus-mode
  2. Make sure the surrounding text is dimmed
  3. Trigger M-x or execute-extended-command with helm
  4. Cancel with C-g
  5. On returning to original buffer, the error message is triggered and the surrounding text is lightened or not dimmed.

It is not fatal but toggling the mode is an inconvenience. 😄

Error Message:

Error in post-command-hook (focus-move-focus): (wrong-type-argument overlayp nil)
larstvei commented 7 years ago

Thanks for reporting, and sorry for a late response (this one flew right past me).

I've been able to reproduce this, and it truly is annoying. It seems that the local variables of focus get killed when helm-M-x quits. I'm not sure if this is buggy behavior from helm or a focus bug. Is this something that has sprung up recently, or has the bug always been there? I'm a long-time user of helm, and I think I would have discovered this bug if it was present at the time of developing focus.

My initial efforts to fix this has not been successful, but I'll give it another go soon.

larstvei commented 7 years ago

Hi!

I just wanted to give you a quick update. The source of the error is that something kills the buffer-local variables of focus, but I have no idea what causes this. The bug is a bit tricky to track down because it occurs in a hook, which does not provide a stack trace.

Sorry for not being able to provide a quick fix.

larstvei commented 7 years ago

Hi!

a84ade0 should resolve the issue.

Thanks for reporting this! It was an important bug to sort out. I'll close the issue, but let me know if you still experience issues with this!