GithubHelp home page GithubHelp logo

elm-mode's Introduction

Melpa Status Melpa Stable Status Build Status

elm-mode

Elm mode for Emacs.

Features

  1. Syntax highlighting.
  2. Intelligent indentation.
  3. Integration with elm-make
  4. Integration with elm-repl
  5. Integration with elm-reactor
  6. Integration with elm-package
  7. Integration with elm-format
  8. Integration with elm-test

Indentation

elm-mode indentation is based on cycling: every time you insert a new line there will be one or more indentation levels available for you to choose from. The exact number is printed in the minibuffer either as Sole indentation or Indent cycle (n)... where n is the number of available indentations to choose from. If the automatic indentation level was not the one you expected simply hit TAB to cycle through the list (note that hitting any other key will cancel the cycle).

Simpler indentation

There is also a simpler indentation mode, Elm Indent Simple which doesn't try to be as smart as the default one. The benefit of this mode is that it works a little more similarly to how more conventional editors handle indentation: indent one step forward by pressing TAB, one step backward with S-TAB.

It tries to be a little smart, however, and guess the easiest to determine indentation levels.

You can enable it by setting a variable, elm-mode-indent-mode to #'elm-indent-simple-mode, for example by doing this:

  (setq elm-mode-hook '(elm-indent-simple-mode))

Installation

This package requires Emacs 25.1 or later.

MELPA

You can install elm-mode from the package in MELPA. This is by far the most straightforward and recommended installation method.

From source

Add this repo to your load-path and (require 'elm-mode). Ensure that you have installed all the dependencies listed in the Package-Requires header of elm-mode.el.

Bindings

The following bindings are available in elm-mode:

TAGS

Keybinding Description
C-c M-t Generate a TAGS file for the current project.
M-. Jump to tag at point.
M-, Jump to previous location after visiting a tag.

TAGS file generation requires that the UNIX find, egrep commands and the Emacs etags command be available in your path.

Set or customize elm-tags-on-save to t to generate a new TAGS file for the current project on every save.

Set or customize elm-tags-exclude-elm-stuff to nil to include source files inside elm-stuff directories when generating the TAGS file.

elm-make

Keybinding Description
C-c C-c Compile the current buffer.
C-u C-c C-c Compile the current buffer, specifying the output file.
C-c M-c Compile the main elm file.
C-u C-c M-c Compile the main elm file, specifying the output file.
C-c C-a Add missing type annotations to the current buffer.
C-u C-c C-a Add missing type annotations to the current buffer, prompting before each change.
C-c C-r Clean up imports in the current buffer.
C-u C-c C-r Clean up imports in the current buffer, prompting before each change.

elm-repl

Keybinding Description
C-c C-l Load the current file in a REPL.
C-c C-p Push the current region to a REPL.
C-c C-e Push the current decl. to a REPL (requires haskell-mode).

elm-reactor

Keybinding Description
C-c C-n Preview the current buffer in a browser.
C-u C-c C-n Preview the current buffer in a browser in debug mode.
C-c C-m Preview the main elm file in a browser.
C-u C-c C-m Preview the main elm file in a browser in debug mode.

elm-package

Keybinding Description
C-c C-d View a function's documentation in a browser.
C-c C-i Import a module from one of the dependencies.
C-c C-s Sort the imports in the current file.
C-c M-k Open the package catalog.
C-u C-c M-k Open the package catalog, refreshing the package list first.

The following bindings are available in the package list buffer:

Keybinding Description
g Refresh package list.
n Next package.
p Previous package.
v View package in browser.
m Mark package for installation.
i Mark package for installation.
u Unmark package.
x Install marked packages.

Set or customize elm-sort-imports-on-save to t to apply elm-sort-imports on the current buffer on every save.

Completion for Elm >= 0.19

To obtain completion, code navigation and other niceties, use elm-language-server and an LSP package. eglot is a lightweight LSP front-end package for Emacs, and has built-in support for elm-language-server. Some users might prefer the rather larger and more opinionated lsp-mode.

elm-format

The following functionality requires elm-format to be installed. elm-format does not come with the Elm installer so you will have to install it manually.

Keybinding Description
C-c C-f Automatically format the current buffer.

Enable elm-format-on-save-mode to apply elm-format on the current buffer on every save. You might like to add it to your elm-mode-hook:

(add-hook 'elm-mode-hook 'elm-format-on-save-mode)

Alternatively, you can enable it on a per-project basis by including an entry like the following in your .dir-locals.el:

(elm-mode (mode . elm-format-on-save))

elm-test

The following functionality requires elm-test to be installed. elm-test does not come with the Elm installer so you will have to install it manually.

Keybinding Description
C-c C-v Run the test suite for the current project.

elm-mode's People

Contributors

515hikaru avatar akoppela avatar appleby avatar avh4 avatar berkan avatar bogdanp avatar chalmagean avatar crodjer avatar donataswix avatar ento avatar frandibar avatar ikr avatar jcollard avatar jsoo1 avatar juanedi avatar kritzcreek avatar m4b avatar marcowahl avatar mattjbray avatar menschenkindlein avatar mewa avatar osnr avatar pastelinc avatar purcell avatar rjosephwright avatar rntz avatar savuori avatar theothornhill avatar wobh avatar yasuyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elm-mode's Issues

fill-paragraph on a function's doc comment fills the function body too

When I write a multi-line doc comment just before a function I often want to use fill-paragraph to recalculate the line breaks so that it fills neatly. But when I do that the fill-paragraph function fills the function body along with the comment text. I have to add a blank line between the doc comment and the function declaration first to get just the comment to be modified. Can we do something such that fill-paragraph can be applied directly to a doc comment?

The following code sample can be used to see the problem. If I position the emacs cursor in that multiple line comment and run (fill-paragraph) (via M-q) then the comment and function are wrapped together, losing the line breaks and indentation of the function.

module Test exposing (..)

{-| module comment
-}


{-| This is a comment long enough that we want to wrap it over multiple
lines. This is a comment long enough that we want to wrap it over multiple
lines. This is a comment long enough that we want to wrap it over multiple
lines.
-}
main : { a : Int, b : Int }
main =
    { a = 1
    , b = 2
    }

Compile buffer and preview buffer create local elm artifacts

I have the following project structure:

|_ elm-package.json
|_ elm-stuff
    |
    |_ (various depedencies)
|_ src
    |_ MyFile.elm

When I compile the MyFile.elm buffer, the process generates a new elm-package.json and elm-stuff directory; this also happens for previewing. When I run elm-make src/MyFile.elm, these artifacts are not created.

I'm fairly sure that I'm missing something, I'm just not sure what it is. Thanks.

Indentation isn't working properly

After installing elm-mode, I made a new elm file and typed:

main : Element

and then hit enter. The next line was automatically indented 5 spaces, when it shouldn't have been indented at all. I then typed main = and hit tab twice, which unindented the line to the beginning, which is what I want. I then typed out the rest of the line, hit enter, and the line was again indented to 5 spaces.

This is obviously not the correct functionality. Are you experiencing this too, or is it just me?

Visualize indentation levels in a cycle

One of the things I love with haskell-mode is the ability to view the various indentation levels available for a given cycle without necessarily cycling through them. For example:

screen shot 2016-05-11 at 4 43 33 pm

When my cursor is on the second line of code here (cursor not shown in the screenshot), the various indentation levels available are shown by rendering _'s underneath the relevant characters, and cycling through them works the same way as in elm-mode. This is a lovely feature, and I'd be thrilled to have the option to display this in elm-mode as well.

#22 causes spurious repetition of function name

Consider this state:

f x = 
     ^

where ^ indicates cursor position. Starting a new line results in this state:

f x =
f 
  ^

which is never correct. Furthermore, using tab to cycle through tab stops does not remove f, as it did before #22 if you tabbed through this option.

Indentation seems to be inconsistent with Elm example code

First off, let me say I really like the cycles-based indentation approach used by elm-mode. I've used a similar one in haskell-mode before, and it works really nicely with this kind of language (in fact haskell-mode renders _'s underneath the various levels in the cycle as well, which would be nice to have in this mode as well, but I digress...) :)

However, it seems the indentation level is a bit inconsistent with all of the Elm example code I see elsewhere. It seems that most example code just uses two spaces for an indentation "level", yet the various levels in the cycles provided by this plugin seem more arbitrary.

For example, here's a simple main definition in one of my projects, indented by hand to match what I believe is the standard with Elm example code:

main =
  App.program
    { init = init
    , update = update
    , subscriptions = \_ -> Sub.none
    , view = view
    }

However, when I use the levels provided by this mode, it looks like this:

main =
  App.program
       { init = init
       , update = update
       , subscriptions = \_ -> Sub.none
       , view = view
       }

Notice the extra spaces in the record value lines. The only options for indentation the mode provides in the first record line (starting with {) are either no indentation, or the indentation shown above. Before inserting the { character, it gives me either no indentation or the position directly under the . from the line above, which is also wrong (3 spaces from the line above instead of 2). This is just one example, but the problem seems to manifest in many places and in many different ways.

Is there a specific reason this style was chosen? It appears to be inconsistent with both other Elm code I see around, and also what haskell-mode does (though I may be wrong).

Indenting not consistent with elm-format, even with cycling

If I write main = div [] [] then elm-format will render it as

main =
  div
    []
    []

When I try to enter code that way using elm-mode I cannot get the arguments to div to be indented by 2 relative to it no matter how I cycle by hitting the tab key. The closest I can get is this:

main =
  div
  []
  []

I'm using elm-mode-20160104.233.

Disable indenting current line on enter

Say I am in this situation:

Action = Connect String
       | Send String
       | Receive String
       | Disconnect

update : Action -> Model -> Model -- cursor here

When I press enter, it indents the type definition according to the previous block:

Action = Connect String
       | Send String
       | Receive String
       | Disconnect

         update : Action -> Model -> Model
                            -- cursor here now.

I have noticed that the post line indentation is almost always wrong, so is there a way to disable it?

Identifiers with primes in them are colored incorrectly

At the top level, writing

foo = 1
foo' = 2

foo is colored, and the foo in foo' is also colored, but the ' is not. Identifiers like foo' and foo'bar' should all be colored correctly.

Similarly, type' has type highlighted as a keyword and then the ' colored as normal text, when type' is a normal identifier.

Annoying warning message

When I lounch "elm-preview-buffer" appear this message:

"If is part of a 3rd party library, its need to be declared as a dependency of your project's elm_depencies.json"

how can I turn off elm-indent-mode?

image

The indent is so strange , and I found turn off the elm-indent mode by hand is more better, so, how to turn elm-indent-mode off automatic?

Auto indents too far

I'm an emacs newb so perhaps it's that but I enabled the elm layer in spacemacs and when I enter a new line the indentation doesn't line up properly. I get:

module Bingo where

import Html
import String

main =
  "bingo"
    |> String.toUpper
       |> String.trimRight
          |> Html.text

Instead of the desired result:

module Bingo where

import Html
import String

title =
  "bingo!"
  |> String.toUpper
  |> String.trimRight
  |> Html.text

main =
  title

Is there something i'm doing wrong here? Also using ctrl = to auto indent makes it go out of whack as well. It produces:

module Bingo where

  import Html
    import String

      title =
        "bingo!"
          |> String.toUpper
          |> String.trimRight
  |> Html.text

main =
  title

Warnings when compiling during installation

I see the following warnings when I install:

Compiling no file at Fri Dec 18 11:37:55 2015
Leaving directory `d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57'

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-font-lock.el at Fri Dec 18 11:37:55 2015
Entering directory `d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/'

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-format.el at Fri Dec 18 11:37:56 2015

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-indent.el at Fri Dec 18 11:37:56 2015

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-interactive.el at Fri Dec 18 11:37:56 2015

In elm-oracle--completions-select:
elm-interactive.el:596:24:Warning: function `remove-if-not' from cl package
    called at runtime
elm-interactive.el:683:22:Warning: reference to free variable `elm'

In elm-oracle-setup-ac:
elm-interactive.el:691:17:Warning: reference to free variable `ac-sources'
elm-interactive.el:691:17:Warning: assignment to free variable `ac-sources'

In end of data:
elm-interactive.el:713:1:Warning: the function `ac-define-source' is not known
    to be defined.

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-mode.el at Fri Dec 18 11:37:56 2015

Compiling file d:/dev/msys64/home/adi/.emacs.d/elpa/elm-mode-20151218.57/elm-util.el at Fri Dec 18 11:37:56 2015

In end of data:
elm-util.el:116:1:Warning: the following functions are not known to be defined:
    haskell-ds-backward-decl, haskell-ds-forward-decl,
    inferior-haskell-flash-decl

Not sure if you want to do something about them, but here's an issue for tracking.

No keybinding to stop elm reactor

The elm bindings are great to start up an elm reactor and navigate to it in a browser, but I'm having issues once I'm navigating to new projects. I'm finding that I have to manually kill the process otherwise it will continue to open the previously opened project. Perhaps I missing something how to kill the proccess or something?

elm-oracle + eldoc?

The title says it all. It'd be cool to see type signatures when near/inside of functions. This code almost does it:

 (add-hook 'elm-mode-hook                                                                               
    (lambda ()                                                                                                
      (set (make-local-variable 'eldoc-documentation-function)                                           
        'elm-oracle-type-at-point)))  

But needs to be cleaned up:

  • Avoid showing Unknown type. I think it's okay to just show a blank minibuffer if the type is unknown
  • Show the type of the nearest function. Don't show Unknown type when pointing at something like False

Help with Auto-Complete

I can't figure out how to get auto-complete working. I prefer auto-complete to company because the screenshot of it in action is great. I'm using spacemacs.

I follow the instruction and added the following to .spacemacs file.

(add-hook 'elm-mode-hook #'elm-oracle-setup-completion)
(add-hook 'elm-mode-hook #'elm-oracle-setup-ac)

Then I use M-x auto-complete-mode. It tells me that auto-complete-mode is enabled. But I don't get the autocomplete like you shown in the screenshot.

I noticed when I do M-x auto-complete gives me this error.

Error in post-command-hook (evil-repeat-post-hook): (wrong-type-argument number-or-marker-p nil)

Use `defcustom` where appropriate

It would be nice if some of the variables in elm-mode were declared with defcustom rather than defvar to simplify customization. For example, I'd like to be able to customize elm-compile-arguments sometimes. I'd be happy to provide patches, but I wanted to see if you were interested in such changes before I went to the effort.

Also, thanks for elm-mode! It's great, and it's really made learning elm a joy :)

company-elm backend is active in all buffers; whether elm-based or not

The company-elm backend does not perform checks to see if the current buffer is in elm-mode.

This means that, if users follow the wiki-recommended technique of having all of their backends in the list at all times, they get an error on every keypress:

Completion only works inside Elm projects. Create one with M-x elm-create-package RET

Other backends, like company-ghc, check the buffer mode and only returns a non-nil value if the buffer is in an appropriate mode:

(defun company-ghc (command &optional arg &rest ignored)
  "`company-mode' completion back-end for `haskell-mode' via ghc-mod.
Provide completion info according to COMMAND and ARG.  IGNORED, not used."
  (interactive (list 'interactive))
  (cl-case command
    (init (when (and (derived-mode-p 'haskell-mode) company-ghc-autoscan)
            (company-ghc-scan-modules)
            (add-hook 'after-save-hook #'company-ghc-scan-modules nil t)))
    (interactive (company-begin-backend 'company-ghc))
    (prefix (and (derived-mode-p 'haskell-mode)
                 (company-ghc-prefix)))
    (candidates (company-ghc-candidates arg))
    (meta (company-ghc-meta arg))
    (doc-buffer (company-ghc-doc-buffer arg))
    (location (company-ghc-location arg))
    (annotation (company-ghc-annotation arg))
    (sorted t)))

Can't import file into elm-repl

What I did

I created a new elm file in emacs with elm-mode turned on:

-- Play.elm
module Play where

import String

longestName : List String -> Maybe Int
longestName names =
  List.maximum (List.map String.length names)

I ran C-c C-c to compile the file followed by C-c C-l to load the file in elm-repl.

What I expected

A new buffer running elm-repl successfully imports my file

What I actually got

screen shot 2016-04-13 at 8 22 47 pm

Why can't the 'Play' module be found?

Indent cycle

I find emacs keep crashing when I try to copy and paste in Elm. This is my view code and I want to move all the styles to the bottom of the file.

view : Signal.Address Action -> Model -> Ui.NativeUi
view address model =
  NativeUi.Elements.view
    [ componentStyle ]
    [ image
        [ imageStyle
        , source model.image
        ]
        []
    , NativeUi.Elements.view
        [ Ui.style [ Style.flex 1 ] ]
        [ text
            [ Ui.style
                [ Style.fontSize 20
                , Style.marginBottom 8
                , Style.textAlign "center"
                ]
            ]
            [ Ui.string model.title ]
        , text
            [ Ui.style
                [ Style.textAlign "center"
                ]
            ]
            [ Ui.string model.year ]
        ]
    ]

So when I try to cut and paste the following code to the bottom of file, it goes into "Indent cycle (2)" (infinite loop I guess) and Emacs just stop responding. I had to kill emacs. (I'm using spacemacs)

Ui.style
                [ Style.fontSize 20
                , Style.marginBottom 8
                , Style.textAlign "center"
                ]

Thanks.

letrec in aquamacs

Thx for elm-mode

I am using aquamacs and I type C-c C-l to get the interactive elm-repl buffer,
it complains about the missing symbol letrec. What should I do to get a correct
definition of this symbol?

Relevant message :
Symbol's function definition is void: letrec

Aquamacs version:
GNU Emacs 23.4.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-06-14 on acs-trailblazer.ist.psu.edu - Aquamacs Distribution 2.5

Relevant Messages extract
Loading /Users/cog/git/elm-mode/elm-map.el (source)...done
Invalid face reference: quote [115 times]
run-elm-repl: Symbol's function definition is void: letrecInvalid face reference: quote
Invalid face reference: quote [160 times]

Error with C-c C-n on OS X with aquamacs

When I try C-c C-n on OS X 10.9 with aquamacs 3.0 preview (which is based on emacs24), I get the following error message:

error message

This was for a file called Demo.elm that contained only main = asText 42. Do I need to add a elm_dependencies.json file to create a "root"? Is this connected to #8?

Setting flags for the repl

Is there a way to automatically pass certain flags to the repl? i.e. When the file loaded into the repl is in a subdirectory, have the repl activated with :flags add --src-dir=src or something like this.

PS I'm not able to do this even manually right no (elm make complains when trying to import any module after altering --src-dir in this way, so I guess I'm missing something...

elm-oracle doesn't work with elm-mode (Windows)

Hello,

I am using Windows 8.1 x64, my emacs version is 24.5.1 and I have the latest Elm and elm-mode versions. I am trying to configure elm-mode on emacs. So far everything seems to work fine.

Except that "elm-oracle" part. I cannot get it to work.

I installed elm-oracle and then I tried adding (add-hook 'elm-mode-hook #'elm-oracle-setup-completion) or (add-hook 'elm-mode-hook #'elm-oracle-setup-ac) on my .emacs file but I just cannot get it to work.

Am I missing something or there is an actual problem here?

Sublime like Elm-Oracle mode?

I tried out sublime today and I must say I really the way they display elm-oracle. So once turned on, it will display the entire elm-oracle output in the split window below for the word under the cursor. In this example, my cursor was on show.

screenshot 2016-04-15 17 26 13

I know it's a big ask, but can you do this for emacs as well??

Tries to use elm-repl :change-root command

My setup: OS X 10.9 with the latest Aquamacs (based on emacs 24)

When I open the REPL with C-c C-l, I get the following message:

> Could not parse command 'change-root "/Users/evan/Desktop/test/"':

with some more elaboration about the parse error. I took this out of the 0.2 release because I did not understand what it was for, and after that, the REPL seem to work fine despite the fact that the command fails.

Is this command needed? Is there a way to get around it?

Support Elm 0.15

I am not entirely sure if this is because of newer import syntax in Elm 0.15 (if any), but indentation is not working properly. In the attached screenshot you will notice that hitting ENTER after the type Coin line indents it for no apparent reason.

screen shot 2015-05-06 at 11 55 38 pm

Indentation breaks on first line of file

Given

|
module Foo where
...

where | denotes point, indentation raises an error:

Debugger entered: ((cl-assertion-failed (<= start end) nil))
  cl--assertion-failed((<= start end))
  elm-indent-in-comment(2 1)
  elm-indent-indentation-info()
  elm-indent-cycle()
  indent-for-tab-command(nil)
  funcall-interactively(indent-for-tab-command nil)
  #<subr call-interactively>(indent-for-tab-command nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> indent-for-tab-command nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (indent-for-tab-command nil nil))
  call-interactively(indent-for-tab-command nil nil)
  command-execute(indent-for-tab-command)

This appears to be because - in elm-indent-indentation-info, elm-indent-start-of-def returns a position greater than (point). Not obvious to me what the most correct fix for this would be, sorry.

No Comment Syntax Defined

Running the command comment-region in elm-mode prompts the user to provide a comment syntax. This should be built into the mode.

elm-compile-buffer with output argument fails

Problem seems to be in how the argument list is modified in elm-compile--command. Compile output below. PR forthcoming.

elm-make HelloWorld.elm --output=~/gdrive/src/elm_by_example/HelloWorld.html --yes --warn --output=elm.js
elm-make 0.16 (Elm Platform 0.16.0)

Usage: elm-make [FILES...] [--output FILE] [--yes] [--report FORMAT] [--warn]
                [--docs FILE]
  build Elm projects

Available options:
  -h,--help                Show this help text
  --output FILE            Write result to the given .html or .js FILE.
  --yes                    Reply 'yes' to all automated prompts.
  --report FORMAT          Format of error and warning reports (e.g.
                           --report=json)
  --warn                   Report warnings to improve code quality.
  --docs FILE              Write documentation to FILE as JSON.

Examples:
  elm-make Main.elm                     # compile to HTML in index.html
  elm-make Main.elm --output main.html  # compile to HTML in main.html
  elm-make Main.elm --output elm.js     # compile to JS in elm.js
  elm-make Main.elm --warn              # compile and report warnings

Full guide to using elm-make at <https://github.com/elm-lang/elm-make>

Compilation exited abnormally with code 1 at Wed Dec 23 22:31:10

getting error on company auto complete

just getting started with elm and elm-mode

Oracle auto-completion is working (although I can't yet see how C-c C-t is supposed to work)

However, when I tried to use only company, not Oracle:
(add-to-list 'company-backends 'company-elm)

with debugging enabled, I get the following stack trace after entering three characters "cou" of
an existing symbol:

stacktrace.txt

elm-format dumps into the buffer

Running elm-format on a buffer which hasn't been saved yet spits the following

Could not find any .elm files on the specified paths:

    /home/caleb/dumb.elm

Please check the given paths.

out at your cursor.
Similarly, formatting a file with a syntax error places

Processing file /home/caleb/dumb.elm
ERRORS

at your cursor.

To reproduce, create a new empty file test.elm and then hit C-c C-f.
Also, save the file and hit C-c C-f.

(void-variable elm)

Every time after I update my packages with cask and there is a new version of elm-mode when I (require 'elm-mode) I get (void-variable elm). This is from my init:

Debugger entered--Lisp error: (void-variable elm) #[nil "\302�\303\304 BD\"\207" [elm elm-oracle--pattern ac-define-source (candidates elm-oracle--get-completions ac-prefix t) prefix] 5]() eval-after-load(auto-complete #[nil "\302�\303\304 BD\"\207" [elm elm-oracle--pattern ac-define-source (candidates elm-oracle--get-completions ac-prefix t) prefix] 5]) require(elm-interactive) byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require elm-tags elm-format elm-indent elm-interactive elm-font-lock] 2) require(elm-mode) eval-buffer(#<buffer *load*-256167> nil "/home/caisah/.emacs.d/config/programming/elm-config.el" nil t) ; Reading at buffer position 93 load-with-code-conversion("/home/caisah/.emacs.d/config/programming/elm-config.el" "/home/caisah/.emacs.d/config/programming/elm-config.el" nil t) require(elm-config) eval-buffer(#<buffer *load*-429947> nil "/home/caisah/.emacs.d/config/general-settings.el" nil t) ; Reading at buffer position 2796 load-with-code-conversion("/home/caisah/.emacs.d/config/general-settings.el" "/home/caisah/.emacs.d/config/general-settings.el" nil t) require(general-settings) eval-buffer(#<buffer *load*> nil "/home/caisah/.emacs.d/init.el" nil t) ; Reading at buffer position 313 load-with-code-conversion("/home/caisah/.emacs.d/init.el" "/home/caisah/.emacs.d/init.el" t t) load("/home/caisah/.emacs.d/init" t t) #[0 "�\205\262 \306=\203�\307�\310Q\202; \311=\204�\307�\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB�\321\202;\316\322�\323�\322\211#\210�\322=\203a\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203��\210�\203\243\330�!\331\232\203\243\332�!\211\333P\334�!\203}\211\202\210\334�!\203\207�\202\210\314\262��\203\241\335��"\203\237\336\337��#\210\340\341!\210��\266�\f?\205\260\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "" "/_emacs" windows-nt "/.emacs" directory-files nil "^\.emacs\(\.elc?\)?$" "/.emacs" "^_emacs\(\.elc?\)?$" (initialization "_emacs' init file is deprecated, please use .emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
command-line()
normal-top-level()`

I have to delete the package and install it via package to get it working. Do you have any ideas why this may happen? Is it a problem with elm-mode or cask? How could I fix it? Thanks!

Compiling buffer with --output filename

I can see that the interactive functions support passing an OUTPUT file name for compilation, but not sure how to use it. Coming a buffer always yields "elm.js" rather than "<buffer/file-name>.js"...

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.