Giter Club home page Giter Club logo

Comments (8)

condy0919 avatar condy0919 commented on June 3, 2024 2
Explain-pause-mode: please report this bug by creating a Github
issue at https://github.com/lastquestion/explain-pause-mode. Explain-pause-mode
is now _disabled_ so you can continue to hopefully use Emacs. Info follows:


frames do not match in 'not top level in wrap-native for #<subr read-event>'
current:
#s(explain-pause-command-record root-emacs nil nil 1146334 (24320 27529 114676 750000) nil nil nil nil 0)
test:
#s(explain-pause-command-record root-emacs nil nil 1146334 (24320 27529 114676 750000) nil nil nil nil 0)


Backtrace:
  backtrace()
  explain-pause-report-measuring-bug("not top level in wrap-native for #<subr read-event..." #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 1146334 :entry-snap (24320 27529 114676 750000) :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0) #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 1146334 :entry-snap (24320 27529 114676 750000) :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0))
  explain-pause--wrap-native(#<subr read-event> nil t 3)
  apply(explain-pause--wrap-native #<subr read-event> (nil t 3))
  read-event(nil t 3)
  sit-for(3)
  flyspell-check-word-p()
  flyspell-post-command-hook()

May be helpful.

from explain-pause-mode.

nolanl avatar nolanl commented on June 3, 2024 1

Wow, fast turnaround. Thanks!

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

Hi, I literally just discovered this also just now while trying to make a video for the README.

Uh, I tested new frames and emacsclient in windowed mode, I tested emacsclient in TTY, but I didn't test TTY emacsclient when you "create a new TTY window", because, I didn't know that feature existed.... O.o

I already have a fix halfway written... thanks for reporting ❤️ should have that done in a couple hours...

Also, this backtrace shows I need to update the README even more and make sure people bytecompile, it's way faster bytecompiled now.

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

Further details:

  1. If explain-pause-mode is activated AND HOOKS before server-start, then the server-process-filter will be hooked, and everything works.
  2. IF:
    a) You run explain-pause-mode AFTER server-start, you're screwed.
    b) If explain-pause-mode is activated in init.el, it will not hook until emacs-startup-hook is run, because of the exact problem of read-event which is exactly what this bug is about! https://github.com/lastquestion/explain-pause-mode/blob/master/explain-pause-mode.el#L3253-L3258, so if you run server-start in init.el, you're screwed.
    c) Running with --daemon or --fg-daemon in the command line means server-start happens after init.el is loaded. But, before emacs-startup-hook`. You're screwed again.

Conclusions:

  1. emacs-startup-hook is too late. Handle terminal-init-xterm specially, and insert a frame just for it, so that the subsequent read-events have a non-root parent frame. Then we can finish hooking during init.el, which resolves cases (b) and (c).
  2. Still, if you install explain-pause-mode after some existing processes are running, we shouldn't crash. When installing, find every existing process using process-list and wrap their filters if existing with wrappers. This fixes (a).

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

hi @nolanl , this should fix it #53, I'd like to add tests before merging to master, but the branch does fix the problem if you need it now. Thanks for reporting this bug!! ❤️

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

@condy0919 let me move this bug into another bug. I am going to merge this bug fix today as I wrote a test case for it and it will automatically close the issue when the PR is merged. Plus it’s a different bug - the call stack indicates it’s in post command hook - I know what’s wrong, fix it today. Sorry for breaking all the things in that big PR :( at least I added a bug report feature HAHA

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

I've merged this, @nolanl let me know if it works or not. I did manually test emacsclient -nw and it works, so I believe so :_)

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

I felt embarrassment for missing that especially after writing so many tests 🤣

from explain-pause-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.