Giter Club home page Giter Club logo

Comments (10)

wasamasa avatar wasamasa commented on June 3, 2024 1

Maybe even a tristate:

(defcustom explain-pause-alert-style 'normal
  "How often should explain-pause alert you about long pauses in the mini-buffer?"
  :type '(choice (const :tag "Always" developer)
                 (const :tag "Every now and then" normal)
                 (const :tag "Never" silent)))

from explain-pause-mode.

wasamasa avatar wasamasa commented on June 3, 2024 1

Interesting, didn't know that. I still prefer to be explicit about this.

from explain-pause-mode.

wasamasa avatar wasamasa commented on June 3, 2024

Is there a reason why both can't be disabled by the same customizable?

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

Is there a reason why both can't be disabled by the same customizable?

No reason. At first, I liked the idea that "some messages" are more important than others. But on second thought, you have a point. The profiles and the "alert messages" are basically the same, they are obtrusively interrupting the user.

Now I'm starting to think: really messages shouldn't appear in "normal mode", and occasionally the thing should just say "Hey, emacs was slow N times in the last hour. Check out the report ".

So basically, maybe one main customizable: "developer mode" = like devtools, you get "polite" echo area alerts for both; or "normal mode" = only summary messages every now and again.

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

❤️ 😻 💯

That's so great, thank you for prodding me to remember I'm in emacs and should do things the emacs way. I'll use this entire thing. super appreciate 👍

from explain-pause-mode.

wasamasa avatar wasamasa commented on June 3, 2024

Oh and you probably want to define a group and add all customizables to it for M-x customize-group to work.

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

I think I did the customize-group stuff correctly, but I will be honest I'm literally just following the documentation and grepping what the emacs built-in .el files do, I really am not a elisp developer by any stretch of the imagination... I have this

(defgroup explain-pause nil
  "Explain pauses in Emacs"
  :prefix "explain-pause-")

https://github.com/lastquestion/explain-pause-mode/blob/master/explain-pause-mode.el#L46-L48

which should work, right?

from explain-pause-mode.

wasamasa avatar wasamasa commented on June 3, 2024

Yes, but then you need to use :group explain-pause in every customizable to link them up.

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

So I asked because it seems to work without it :-)

I investigated and discovered this commit emacs-mirror/emacs@805204f in 2016 - which added the text in the docs that I read. The bug report: https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-05/msg00132.html

which seems to be ambivalent on whether it is a good or bad thing that this works.

So I checked elisp dir in emacs itself. of 8210 defcustoms, 6897 have group in their definition with the simple regex search \(defcustom[\s\S]+?:group.

Soooooo OK let's add :group 😀

from explain-pause-mode.

lastquestion avatar lastquestion commented on June 3, 2024

84% of emacs core agrees with you. They probably should just cut the feature, IMHO, but legacy++, that'll never happen now...

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.