Coder Social home page Coder Social logo

Comments (9)

vspinu avatar vspinu commented on July 3, 2024

This one is a bad one. I don't know how to fix this generically without complicating the span logic by a huge extent. I guess I will just restrict the markdown math span to single lines for now.

from poly-markdown.

vspinu avatar vspinu commented on July 3, 2024

Ok. I figured out a simple solutions. Thanks for reporting this.

from poly-markdown.

jrvarma avatar jrvarma commented on July 3, 2024

Could you please push this into Melpa Stable or at least into Melpa. If this is not likely to happen soon, then I can try installing manually using git clone.

from poly-markdown.

vspinu avatar vspinu commented on July 3, 2024

It's always on Melpa. I will tag for Melpa Stable tomorrow.

from poly-markdown.

jrvarma avatar jrvarma commented on July 3, 2024

Problem persists after upgrading polymode, poly-markdown, poly-R and poly-noweb to 0.2 from Melpa Stable.

Minimal working example of the problem is

echo $PATH
  • As I type echo $PATH inside the fenced block in a markdown file, polymode switches the buffer mode from Markdown PM to LaTex/P PM as soon as I type the $.
  • It will come back to Markdown PM if I type another $ without any intervening spaces or new line (say echo $PATH$)
  • But if instead I start a new line and I type a $ on the new line (say, echo $HOME), it does not return to Markdown PM.
  • The result is that after one line in a fenced block containing a single $, the buffer remains in LaTex/P PM mode till the end of the file regardless of how many more $'s it contains.

I have confirmed this behaviour with emacs -Q after running the following in a scratch buffer

(require 'package)
(package-initialize nil)

from poly-markdown.

vspinu avatar vspinu commented on July 3, 2024

This is only in unnamed blocks right? In named ones things behave as expected right?

from poly-markdown.

jrvarma avatar jrvarma commented on July 3, 2024

Absolutely. Never thought that just naming the block would solve the problem!

from poly-markdown.

vspinu avatar vspinu commented on July 3, 2024

The unnamed blocks (aka those without an explicit mode) are not treated by polymode in any special way. This is why you get this results. Fixing this is a bit tricky mostly for reasons described in #9 but should be possible after the recent core rewrite.

from poly-markdown.

jrvarma avatar jrvarma commented on July 3, 2024

Using an explicit mode is good practice in any case, and also makes editing the block in emacs easier. If nothing else, one can always use text as the mode. I am happy with the current solution.

Thanks again for a wonderful emacs package.

from poly-markdown.

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.