Questions tagged [polymode]

Polymode is an emacs package that offers generic support for multiple major modes inside a single emacs buffer.

Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

Can't install code as package

I've recently started to look into the Blazor framework and noticed there is no available major-mode for editing .razor files, which are essentially a mix of C# and HTML. I then started creating a ...
user avatar
0 votes
1 answer
33 views

Indentation in HEREDOC

I'm looking for a way to make the indentation in HEREDOCs better. In my case, it's specifically in Ruby, but maybe this is a general question. Basically, I have the following situation: in our tests, ...
user avatar
  • 501
0 votes
0 answers
26 views

polymode: Is it possible to refer to :head-matcher in :tail-matcher?

I'm searching for a good mode for editing reveal.js presentations which mix HTML and markdown. In reveal, markdown content is enclosed in HTML elements with the data-markdown attribute. <section>...
user avatar
1 vote
0 answers
28 views

add personal template directory to poly-R

I'm trying to migrate my R workflow totally to emacs (my experience with emacs is very basic), so I installed ESS and poly-markdown and poly-R among other things. When working in rmarkdown files I ...
user avatar
  • 111
1 vote
1 answer
29 views

Poly-Markdown+R does not find the right version of R for R code chunks

I am working on a Rmarkdown document and I have R 4.0.4 running in a buffer. I try to export the document with M-n e and it finds R 3.6.3 sessionInfo() R version 3.6.3 This meant that I had a lot of ...
user avatar
2 votes
0 answers
123 views

Styled components with polymode

Can I use polymode for styled components inside tsx or jsx files? For example: // MyComponent.tsx const x = 1; const y = 2; const myStyle = css` background-color: red; padding: ${x + y}; ...
user avatar
1 vote
0 answers
120 views

Polymode very slow in Rmd files

I am struggling with emacs constantly hanging as soon as I move the cursor into a code chunk in Rmd files. It spends about two seconds moving the cursor after I hit an arrow key. Can you help me get ...
user avatar
3 votes
1 answer
107 views

Unexpected indentation in python chunks

Already one year ago, I described a problem on github with polymode and unexpected indents. Since there was no answer there so far and the problem is really annoying, I ask here for ideas for a ...
user avatar
  • 977
0 votes
0 answers
151 views

Broken syntax highlighting in polymode

I defined a polymode with julia-mode as the inner mode. It works well but sometimes syntax highlighting goes wrong and it can be fixed only by restarting emacs. I haven't figured out how I can ...
user avatar
  • 1
0 votes
1 answer
84 views

Elisp to get the language mode for the current ein cell?

When I'm using ein to run a python jupyter notebook, the major-mode variable is just "ein:notebook-multilang-mode" which makes it ambiguous what the current language is. I have elisp that only ...
user avatar
2 votes
0 answers
636 views

Markdown and Latex highlighting (font lock) in R Markdown file

I am using polymode to edit rmarkdown files. Exporting to e.g. pdf is super simple and works very well. R code chunks are also properly highlighted. But: I do quite often use latex code inside (r)...
user avatar
  • 21
7 votes
1 answer
484 views

Can we get inline results with polymode for Rmd files?

As a new Emacs user, I've recently learned how to use polymode to handle R code in org-mode. I'm happy with it, since I get the same features than those implemented for example in Rstudio for Rmd ...
user avatar
  • 1,014
1 vote
0 answers
125 views

How to specify a pdf viewer for ess mode

I have set the variable ess-pdf-viewer-pref to "evince" But when I export any Rnw file using M-n e, instead of displaying the pdf in evince it is displayed inside Emacs. How can I stop Emacs ...
user avatar
  • 113
0 votes
1 answer
84 views

Text entered right-to-left in chunks using polymode

I use polymode when editing Rmarkdown files in Emacs 26.1 and have the following problem. I visit a new file, test.Rmd, and type the following at the top of the file (this creates a yaml chunk): --- ...
user avatar
2 votes
1 answer
161 views

Polymode changes from ESS-mode to Markdown-mode whenever I press enter

When I am editing .Rmd file within a polymode chunk, the mode switches from ESS to Markdown mode whenever I press enter. However, it switches back to ess-mode whenver I save the file. I will try ...
user avatar
2 votes
0 answers
528 views

Missing RMarkdown templates with poly-R

I use the ess, polymode, and poly-R packages together to work with RMarkdown files. I have also installed the R packages rmarkdown and tufte in my R library. While these R packages provide ".Rmd" ...
user avatar
  • 183
3 votes
1 answer
934 views

ESS poly-R issue

I am trying to setup ESS with polymode and poly-markdown I have the following in my myinit.org file which becomes compiled into init.el ;; https://polymode.github.io/installation/ (use-package ...
user avatar
3 votes
1 answer
772 views

Symbol's value as variable is void: polymode-mode-map

I define a function ess-rmarkdown to compile RMarkdown documents with polymode. (use-package polymode :ensure t :config (use-package poly-R) (use-package poly-markdown) ;;; MARKDOWN (add-...
user avatar
  • 145
2 votes
1 answer
94 views

Syntactic fontification of diff hunks

I'm looking for a multiple-major-modes package that doesn't remove fontification of the host mode from its inner submodes? I tried MMM Mode and Polymode, but they remove the initial fontification and ...
user avatar
  • 1,016
6 votes
1 answer
460 views

ESS freezes on startup with ess-tracebug mode enabled

I am currently running R 3.3.1 in emacs 25.1.1, ESS 16.10, and polymode 20160805.448 installed via MELPA on Mac OS Sierra. Whenever I try to open an interactive R console using M-x R, it freezes ...
user avatar
11 votes
1 answer
2k views

Insert code chunk in R Markdown with yasnippet and polymode

I am trying to write a yasnippet to insert code chunks into an R Markdown file. I use polymode to have multiple major modes (markdown, ESS[S]) in a single file. This is my snippet: # -*- mode: ...
user avatar
  • 412
1 vote
0 answers
37 views

Polymode: customise buffer names

Polymode creates a distinct buffer for each mode involved. Some use really inconvenient names, where the mode part of the name is easily longer than the actual document name itself, e.g. foo.Rmd[poly-...
user avatar
  • 1,638
1 vote
0 answers
93 views

Good way to match symmetric delimiters

I am trying to match $$ resp $ pairs to switch into latex-mode via polymode in a markdown file. $$ is the delimiter for displayed math in this case and $ for inline math. I know that this is not a ...
user avatar
  • 977
6 votes
1 answer
1k views

How to set PDF export in polymode-mode to use xelatex engine?

Consider the below MWE of .Rmd file containing Arabic text which needs xelatex engine to be rendered by pandoc. As the documentation of the latter says putting this option would make it: --latex-...
user avatar
  • 1,622
1 vote
0 answers
82 views

Does SyncTeX work with Emacs polymode?

Specifically, I want to sync an Rnoweb (Rnw) source with a PDF opened in either Skim or Evince using polymode. Note that I have no problem weaving or exporting Rnw files and viewing PDFs with Skim. ...
user avatar
2 votes
0 answers
30 views

polymode with fsharp-mode has trouble sending last line in code block to interactive

I just started setting up polymode I got ESS and r going nicely with markdown. (use-package markdown-mode) (use-package polymode) (require 'poly-R) (require 'poly-markdown) I was able to put r code ...
user avatar
  • 151
4 votes
1 answer
951 views

Polymode with python and latex-mode

The polymode manual suggests that creating new polymodes should be very easy: Creating new polymodes typically takes a few lines of code. I wanted to set it up to make emacs to switch to python ...
user avatar
  • 977
6 votes
1 answer
733 views

What is the difference between the knitR and knitR-ESS for polymode?

I have recently setup polymode for use with Rnw and Rmd files. When it came to knit/weave a document I was given the choice of four defaults; knitR-ESS, Sweave, knitR and Sweave-ESS. I usually use ...
user avatar
3 votes
1 answer
575 views

Polymode appears in minibuffer but does not weave into a file on Windows, why?

This is a follow-up post to Polymode installation on Windows machine. Accordingly I installed polymode using this code in the init.el file after ESS code: (require 'poly-R) (require 'poly-markdown)...
user avatar
  • 1,622
3 votes
1 answer
578 views

Polymode installation on Windows machine

Polymode is very promising to handle the integration of R chunks using different modes. I went through the documentation and it works well when I am inside .Rmd file but not inside .Rnw. In the .Rnw I ...
user avatar
  • 1,622