Coder Social home page Coder Social logo

Comments (6)

seagle0128 avatar seagle0128 commented on August 16, 2024 2

In my understanding, your case is to integrate compilation process into mode-line. The original design is porting from doom-emacs. I think the better solution is add a new segment process.

The screenshot is like this:
image

Is it what you need?

from doom-modeline.

seagle0128 avatar seagle0128 commented on August 16, 2024

Hello @CeleritasCelery ,
doom-modeline doesn't support compilation process. The code snippets you mentioned are for flycheck. It seems you are requesting a new feature, right? PRs are welcome.

from doom-modeline.

CeleritasCelery avatar CeleritasCelery commented on August 16, 2024

Sorry, I highlighted the wrong line in my link. I really meant Line 610 (fixed above).

Here is the code:

(doom-modeline-def-segment major-mode
  "The major mode, including process, environment and text-scale info."
  (propertize
   (concat (format-mode-line mode-name)
           (when (stringp mode-line-process)
             mode-line-process)
           (when doom-modeline-env-version
             (concat " " doom-modeline-env-version))
           (and (featurep 'face-remap)
                (/= text-scale-mode-amount 0)
                (format
                 (if (> text-scale-mode-amount 0)
                     " (%+d)"
                   " (%-d)")
                 text-scale-mode-amount)))
   'face (if (doom-modeline--active) 'doom-modeline-buffer-major-mode)))

you can see that the doom-modeline is trying to support mode-line-process, but is expecting it to be a string. AFAICT, this is never the case. I have never found a buffer or mode where mode-line-process is a string and therefore actually added to the modeline.

Given that we are now looking at the right section of code, this seems less like a feature request and more of a bug.

I would be happy to open a PR but I have tried to modify the "major-mode" segment to correctly handle this and nothing I have done has worked. Any suggestions?

from doom-modeline.

seagle0128 avatar seagle0128 commented on August 16, 2024

Understood completely now. Thanks for the detailed explanations!
Actually it's as designed, but I'm glad to see the improvements. So please proceed your PR. Let's move on.

from doom-modeline.

CeleritasCelery avatar CeleritasCelery commented on August 16, 2024

I have tried to make it work without success. Do you know why it is not recognized as a string? To me, the example I gave above looks like a string with text properties, but that seems to not be the case. How does mode-line-process need to be transformed so it will will work with doom-modeline?

from doom-modeline.

CeleritasCelery avatar CeleritasCelery commented on August 16, 2024

Thanks, that worked.

from doom-modeline.

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.