Giter Site home page Giter Site logo

Comments (10)

darth10 avatar darth10 commented on July 2, 2024 2

Done in #146.

from god-mode.

andyjda avatar andyjda commented on July 2, 2024 1

thanks for flagging this @tangxinfa!
I'm fairly certain this will be fixed with an unwind-protect form. I was not aware of this form when I wrote the god-mode-describe-key function: it should remove the hook in all situations. Please try to reproduce your error with the updated code and let me know your experience.

@darth10 I have created a pull request with my fix, let me know your thoughts

from god-mode.

darth10 avatar darth10 commented on July 2, 2024

Great idea @andyjda!
This is currently a limitation of God mode, but it's something that can be improved.

from god-mode.

andyjda avatar andyjda commented on July 2, 2024

Great!
Do you know if there could be a more elegant/effective way to do this?
I'm not too familiar with the code, but I couldn't think of a way to achieve points 1) and 2) (as mentioned above) without overhauling a bit of the package. I'm not sure that'd be worth it.

If this is as good as we can get for now, should we include it in the code? Let me know if you have any edits/suggestions: I can write it up and do a pull-request (I think I'll also edit the README to outline the updated behavior for describe-key)

from god-mode.

darth10 avatar darth10 commented on July 2, 2024

I think advice functions are fine as long as they're removed when the mode is switched off.
But you're right, they can help with describe-key without a major overhaul of the codebase.

I'll get to this soon, but am more than happy to accept any contributions for this improvement.

from god-mode.

andyjda avatar andyjda commented on July 2, 2024

that's a great point, I'll make sure to remove the advice when the mode switches off.
I can work on this and get you a working solution in a few days. I'll let you know when it's ready

from god-mode.

andyjda avatar andyjda commented on July 2, 2024

Hey @darth10 here's my PR for this feature: #146
I think I got closer to my initial idea. All the useful information is now displayed in the Help buffer.

Also, while working on it I noticed a few minor compilation/flycheck warnings. I took the liberty of fixing these and made a separate PR for them: #147

Hope this is helpful! Let me know your thoughts

from god-mode.

darth10 avatar darth10 commented on July 2, 2024

Thanks for those PRs @andyjda!
I haven't had a chance to look at them as I'm travelling, but I'll take a look this weekend.

from god-mode.

andyjda avatar andyjda commented on July 2, 2024

sounds great, no rush! happy travels

from god-mode.

tangxinfa avatar tangxinfa commented on July 2, 2024

I found in rare cases god-mode--help-fn-describe-function is leave in
help-fns-describe-function-functions hook, break the system's describe-key
and describe-function functioning in other non god-mode buffers.

error message:

god-mode--help-fn-describe-function: Wrong type argument: number-or-marker-p, nil

from god-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.