Coder Social home page Coder Social logo

Comments (12)

vspinu avatar vspinu commented on June 24, 2024

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

I would need more info on this. The exact smartparens setup and an example of the file where the problem occurs. Could you please provide this info?

from poly-r.

MilesMcBain avatar MilesMcBain commented on June 24, 2024

I use Spacemacs, with no custom smartparens config of my own. I believe the guts of it is here: https://github.com/syl20bnr/spacemacs/blob/master/layers/+spacemacs/spacemacs-editing/packages.el#L254

I have found some interesting further info re reproducing the problem. If you start a new blank .Rmd buffer and insert a single r chunk ie:

```{r}
```

And type () inside the chunk you will not see an error. However once you add a second chunk, you will see the error in the first chunk only and not the second, i.e.:

```{r}
## brackets typed in here cause error
## quotes typed in here do not have match inserted
```
```{r}
## brackets typed in here do not cause error
## quotes typed in here are matched.
```

A pattern appears with n chunks, where the errors appear in all chunks except the nth (last) one in the buffer.

FYI Polymode is not part of Spacemacs, I enabled it myself using this custom layer: https://github.com/MilesMcBain/spacemacs_cfg/blob/master/private/polymode/packages.el

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

This is a bit complex. I have never used spacemacs or evil so it's a bit of high ramp for me. How do you add polymode layer, just put in .emacs.d? Also, is there a way to disable vim shortcuts evil layer in spacemacs?

BTW, if you have toggle-debug-on-error do you see a stacktrace?

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

Also, is there a way to disable vim shortcuts evil layer in spacemacs?

Nevermind about this one. It actually asks at installation startup.

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

Ok, I spent a bit of time with spacemacs and I am afraid I don't see this on emacs27.

This is what I do. I install spacemacs and set dotspacemacs-editing-style' to 'emacs in the .spaceemacs file. Then I add poly-R to dotspacemacs-additional-packagesand add (require 'poly-R)to thedotspacemacs/user-init`. Then I open a tmp.rmd which I attach. Nothing of what you describe happens there. Smartparens mode is enabled in that buffer.

I have discovered an issue with highlight-line mode but that's a different issue.

from poly-r.

MilesMcBain avatar MilesMcBain commented on June 24, 2024

Emacs27! So you mean the master branch of the development version?

I am on 25.2.2, since I am a Debian/Ubuntu user and we're still waiting for 26 to land in the main repos. I'll try to see if I can reproduce using your steps on 25 and then 26.

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

Ah, that's most likely it. There have been notable changes to parse-ppss in emacs 26. Your issue is almost surely related to those syntax caches. There are known issues on emacs 25 (some tests fail) but I don't have time to dig into those atm. Prefer to work for the future.

from poly-r.

MilesMcBain avatar MilesMcBain commented on June 24, 2024

I can confirm the issue goes away with Emacs 26.1. I've created a PR to update the version note in the Polymode installation documentation.

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

I am working at fixing emacs25 issues. Would you mind if I ping you a few times to check if this issue has been resolved? I have made some changes yesterday to how syntax caches are treated on e25. It might have fixed this issue.

from poly-r.

MilesMcBain avatar MilesMcBain commented on June 24, 2024

I'm using the new version and it looks to be fixed on 25.2 πŸ‘

from poly-r.

vspinu avatar vspinu commented on June 24, 2024

Perfect. Thanks for letting me know.

from poly-r.

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.