Giter VIP home page Giter VIP logo

Comments (11)

ibnHatab avatar ibnHatab commented on June 10, 2024

Same function runtime issue. 'pcase is not defined.
If you rewrite rules in other style it should solve runtime problem:

(defun vki-elixir-smie-rules (kind token)
  (case kind
    (:elem
     (cond
      ((equal basic) elixir-smie-indent-basic)))
    (:after
     (cond
      ((equal token "OP") elixir-smie-indent-basic)
      ((equal token "->") elixir-smie-indent-basic)))
    (:before
     (cond
      ((equal token "OP") elixir-smie-indent-basic)
      ))
    ))

For compilation problem I still can't figure whats wrong with coma here: (:list-intro . ,(or "do"))`

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

It appears pcase was introduced in Emacs 24. The latest official version is 24.3, released in March 2013. I think for now I am going to mark this ticket as closed, and recommend you upgrade to the latest version (if you haven't already, by now).

from emacs-elixir.

GoNZooo avatar GoNZooo commented on June 10, 2024

So the only robust 'solution' to this is to upgrade to Emacs24? I have other plug-ins that don't play nicely with that version, so presumably I either choose elixir-mode or these other plug-ins?

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

Yes, unfortunately.

Alternatively you could contribute a patch that adds support for emacs 23

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

Here's the source for pcase, which as far as I can tell is the source of the issue. If you wanted, we can talk about a patch that includes this... or perhaps another approach to write smie-rules functions that is compatible with Emacs 23. (Assuming that's the only issue.)

from emacs-elixir.

GoNZooo avatar GoNZooo commented on June 10, 2024

In theory, could this pcase macro just be bundled and required as appropriate, i.e. even adding it separately in your loadpath?

Also, is there a surefire fix for the ". in wrong context" error? Could it be consolidated somehow?

Is this a potential summary of where something has to be done to remedy the error on load?

gonz@rooftrellen ~/.e/emacs-elixir> grep -Pn "`\(.*? \." *.el
elixir-smie.el:80:    (pushnew `(,',regex-name . ,(upcase (symbol-name ',name))) elixir-syntax class-names))))
elixir-smie.el:297:    (`(:after . "STRING")
elixir-smie.el:301:    (`(:elem . basic)
elixir-smie.el:305:    (`(:after . "OP")
elixir-smie.el:308:    (`(:before . "def") elixir-smie-indent-basic)
elixir-smie.el:313:    (`(:after . "->")
elixir-smie.el:318:    (`(,_ . ,(or `"COMMA")) (smie-rule-separator kind))
elixir-smie.el:319:    (`(:after . "=") elixir-smie-indent-basic)
elixir-smie.el:320:    (`(:after . "end") 0)
elixir-smie.el:321:    (`(:after . ,(or `"do"))
elixir-smie.el:323:    (`(:list-intro . ,(or `"do" `";")) t)))

I am not well versed enough in elisp, elixir or this emacs-plugin to know what to do with this.

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

This syntax is called a cons cell:

(x . y)

I am operating under the assumption that the . in wrong context error is an error that cascades down from pcase not existing, or an earlier version of it that had different syntax, or something.

from emacs-elixir.

GoNZooo avatar GoNZooo commented on June 10, 2024

I am aware of what a cons cell is, but clearly these are not working just like regular cons cells in the context of the errors.

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

I'm not sure. I'll try to look into this this weekend on emacs 23

from emacs-elixir.

mattdeboard avatar mattdeboard commented on June 10, 2024

Actually, if you're interested in running this to ground I'll re-open the ticket. Unfortunately I don't have the bandwidth to add support for another emacs version, not to say it's not objectively worthwhile.

from emacs-elixir.

GoNZooo avatar GoNZooo commented on June 10, 2024

I wouldn't advise that. I'm sure the time and effort is better spent elsewhere.

from emacs-elixir.

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.