Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rather than have a special modeline element #12

Closed
wants to merge 2 commits into from

Conversation

pragdave
Copy link
Contributor

@pragdave pragdave commented Nov 3, 2014

(which actually gets lost on my narrow display), change the face of the Elixir major mode itself.

To try this, run a mix command with some Elixir buffers visible. The mode name "Elixir" should change color in all buffers in Elixir mode.

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

Hey @pragdave

I think it doesn't work as expected.

What I got is the following:

  • When I open a test and run for example alchemist-mix-test, not the "Elixir" text for the major mode elixir-mode got the specific color. Instead the exit code from the execute shell command got integrated and colored.

Major Mode Name

Also just the mode-line where the compilation is running will be updated, the other buffers will not be touched. So thats also means that you wont see any kind of information when you use the run tests on save hook for examples. Because this wont display or pop the buffer where the tests run.

What If we try to update the mode-line the way that the information will be at the front of the mode-line, so you wont ever lose it? Or I'll try to investigate a bit more into the deep shadows of the emacs mode-line and try to find a way with that you already implemented? :)

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

I think one of the issues is also that the mode-name variable is just set local for the compilation buffer which runs the test.

We have to update it through the elixir-mode itself. I will look around for some example code and try to find some solutions.

@pragdave
Copy link
Contributor Author

pragdave commented Nov 3, 2014

Did you try running my code? It works...

I did it by using :eval as the mode name, and having it that set text
properties from a variable set by the compilation. The result is that each
buffer that has an Elixir mode and alchemist minor mode has the mode name
change color.

Honest.

On Mon, Nov 3, 2014 at 12:13 AM, Samuel Tonini notifications@github.com
wrote:

I think one of the issues is also that the mode-name variable is just set
local for the compilation buffer which runs the test.

We have to update it through the elixir-mode itself. I will look around
for some example code and try to find some solutions.


Reply to this email directly or view it on GitHub
#12 (comment).

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

ah I think I got the problem. I have no hook added which loads the (alchemist-mode 1) everytime the elixir-mode is loaded.

Maybe we should add that as a default behavior of alchemist, that he loads with the major mode?

@pragdave
Copy link
Contributor Author

pragdave commented Nov 3, 2014

I think that would be a good idea. I have

(add-hook 'elixir-mode-hook 'alchemist-mode)

in my .emacs

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

I will put it into the alchemist.el so it will be loaded if not already done.

@pigmej
Copy link

pigmej commented Nov 3, 2014

+1

-----Original Message-----
From: Samuel Tonini notifications@github.com
Date: Sun, 02 Nov 2014 22:26:53
To: tonini/alchemist.elalchemist.el@noreply.github.com
Reply-To: "tonini/alchemist.el" reply@reply.github.com
Subject: Re: [alchemist.el] Rather than have a special modeline element (#12)

ah I think I got the problem. I have no hook added which loads the (alchemist-mode 1) everytime the elixir-mode is loaded.

Maybe we should add that as a default behavior of alchemist, that he loads with the major mode?


Reply to this email directly or view it on GitHub:
#12 (comment)

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

fixed through #13

@tonini
Copy link
Owner

tonini commented Nov 3, 2014

Thanks a lot Dave! 👍

@tonini tonini closed this Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants