Git Product home page Git Product logo

Comments (12)

fommil avatar fommil commented on July 21, 2024 2

hmm, I think this sounds familiar as documented Emacs behaviour due to the load order of .dir-locals.el. The relevant part of my init.el points at https://emacs.stackexchange.com/questions/7743 as an example, also see the docs of hack-local-variables-hook.

from dante.

fommil avatar fommil commented on July 21, 2024 2

@michalrus no problem, I hope to one day be a) a haskell developer b) using this mode.

from dante.

fommil avatar fommil commented on July 21, 2024 1

btw, it sounds hacky, but I'm actually fine with the Emacs approach. I don't believe anybody has solved the generic problem of load order for any customisable system automatically. Even my xbox computer games have a "load order" for mods, which is the same problem, in a different guise. When customising a core tool, we have to open up the hood sometimes.

FYI additional thing... when I load whitespace-mode and want to use local variables I use this alternative function instead of the default hook loader.

(defun whitespace-mode-with-local-variables ()
  "A variant of `whitespace-mode' that can see local variables."
  (add-hook 'hack-local-variables-hook 'whitespace-mode nil t))

Which is the escape hatch.

from dante.

fommil avatar fommil commented on July 21, 2024 1

the other thing dante could do would be to make dante-target buffer local by default, e.g. https://stackoverflow.com/questions/21917049 i.e. call (make-variable-buffer-local 'dante-target) immediately after defining it.

(users must then use setq-default instead of setq) and also add to the safe-local-variable list. Example from another project: Wilfred/ag.el#145

I recommend that anything project-specific be made buffer local in a similar fashion.

from dante.

themoritz avatar themoritz commented on July 21, 2024

Just learned that the order of the hooks matters. The issue is only there if the flycheck-mode hook comes after the dante-mode hook.

from dante.

michalrus avatar michalrus commented on July 21, 2024

Emacs is depressing. #ihatemyeditor

Thank you very much, tho.

from dante.

joehealy avatar joehealy commented on July 21, 2024

Did you get to the bottom of why the flycheck-mode hook was needed?

from dante.

michalrus avatar michalrus commented on July 21, 2024

No, right now I have an “if it works I freakin’ don’t care” relation w/ Emacs. :throw_up:

But I think I remember a similar problem with Scala and its ENSIME. Maybe let’s… /cc @fommil?

from dante.

themoritz avatar themoritz commented on July 21, 2024

@joehealy I actually found out that the hook wasn't really necessary for me in the first place. 😕

from dante.

michalrus avatar michalrus commented on July 21, 2024

@fommil, thank you for all the details! =)

from dante.

michalrus avatar michalrus commented on July 21, 2024

I very much recommend the switch. It’s been an amazing experience so far for me. ^.^

from dante.

fommil avatar fommil commented on July 21, 2024

it's my employers who need to be convinced...

from dante.

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.