Coder Social home page Coder Social logo

poly-markdown's Introduction

License GPL 3 MELPA

Polymode Logo

Polymode is a framework for multiple major modes (MMM) inside a single Emacs buffer. It is fast and has a simple but flexible object oriented design. Creating new polymodes normally takes a few lines of code.

Installation instructions and the full documentation are available at https://polymode.github.io/.

poly-markdown's People

Contributors

benjamin-philip avatar kiennq avatar vspinu avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

poly-markdown's Issues

breakage of highlighting and `markdown-hide-urls`

I use poly-gfm-mode with highlighting and markdown-hide-urls in order not to see bare URLs but only link names.

In poly-gfm-mode , the highlighting often breaks and links show bare, eg this:
image

or this:
image
The breakage goes for some sentences or paragraphs until it hits a significantly different markup, eg a table or new heading.

This is a transient error. On reload it often but not always disappears. And it may reappear in another spot.

I also notice that font-lock-mode has no effect in poly-gfm-mode: the highlighting always stays.
and poly-lock-mode is not interactive?

Please let me know how I can help you diagnose this!

How to enable Scheme evaluation?

When I press M-n v v in the following code block

```{scheme}
(+ 1 2)
```

I get the following error:

polymode-eval-chunk: Undefined ‘polymode-eval-region-function’ in buffer parse.md[scheme]

How to define the missing function?

Latex (Math) highlight is broken when auctex is installed

two versions of minimal config (one with auctex installed and one without auctex installed)

the first is without auctex installed:

(require 'package)
(setq package-user-dir "~/Downloads/emacs-package-dir")

(setq package-list '(poly-markdown))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

(unless package-archive-contents
  (package-refresh-contents))

(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package)))

(setq markdown-enable-math t)
(setq warning-minimum-level :error)

emacs -Q -l minimal-config.el opens the following rmd file: test.md

$$y = \sum_{i=1}^n sin5x^3 + 2$$

the rendering is the following:

Screen Shot 2022-11-23 at 01 32 26

and if with auctex installed:

(require 'package)
(setq package-user-dir "~/Downloads/emacs-package-dir")

(setq package-list '(poly-R poly-markdown ess))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

(unless package-archive-contents
  (package-refresh-contents))

(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package)))

(setq markdown-enable-math t)
(setq warning-minimum-level :error)

emacs -Q -l minimal-config.el opens the same file, will see that math (latex) highlight is broken:

Screen Shot 2022-11-23 at 01 33 08

It is clearly that the keyword \sum highlight is broken, and variable pitch for superscript and subscript is also broken
polymode/poly-R#35 these two might be actually the same issue

Code folding with RMarkdown

I am using Emacs-polymode-Ess-R writing RMarkdown code to deliver analysis and report. It has been amazing except for several small nuisances. Thank you for the excellent work.

One is about the folding of codes. It is nice to use the tab key to fold by levels, # of the first level, ## of the second level, etc. However, it does not fold the yaml part, the contents contained in ---. Or in other words, it would be nice to have a function to fold the code section, between the two ```.

Another is if there could be a function to select all codes in the chunk or within the boundary of ```. I often narrow down to the current chunk to write or modify codes.

Thanks.

Overly aggressive inline fontification for multi-word inline code

Inline code that contains a space is incorrectly fontified in the "fallback" mode. For example, the inline code git status is interpreted as just status in mode git, which is then incorrectly fontified in the fallback mode. (A workaround for my own documents is to insert a space after the opening backtick, but that's a problem when editing others' documents).

I'm not convinced that inline major-mode-specific fontification is a sensible default. AFAIK, it is not supported by GitHub- or pandoc-flavored markdown, which are two of the most common flavors. Perhaps it would be better to control it via a variable? For instance, something like poly-markdown-inline-modes -- if nil, just use the default Markdown fontification for inline code).

A problem while installing poly-markdown from epla

Hi, I really like the idea of using markdown in emacs and thanks for your great work!

My emacs is 26.1 and I want to install polymode. While compling this package, it gives the error:

Compiling file /home/chenr6/.emacs.d/elpa/poly-markdown-20180905.1437/poly-markdown.el at Wed Sep 5 15:47:39 2018
Entering directory ‘/home/chenr6/.emacs.d/elpa/poly-markdown-20180905.1437/’
poly-markdown.el:124:1:Error: No pm-polymode config object with name ‘pm-poly/pm-poly/markdown’

Please help me! Thanks!

Buffer-font-mode doesn't switch to fixed-pitch for code-blocks

I use poly-markdown and want to use variable-pitch mode fonts for the markdown text, and fixed mode fonts for the code blocks.

Mostly using Julia, but also Python (and others occasionally).

Is it possible to do that? I did try something like:

  (default ((t (:inherit variable-pitch))))
  (markdown-header-face ((t (:inherit serif))))
  (markdown-code-face ((t (:inherit fixed-face))))

in custom faces, but that doesn't seem to do the trick.

It does work in pure markdown-mode, but not in poly-markdown-mode.

Tripple tilde does not work

Markdown allows two styles for code blocks:

  • triple backtick: ```
  • triple tilde: ~~~

Triple backtick works fine:

```{scheme}
(display "works fine\n")
```

But triple tilde does not work:

~~~{scheme}
(display "does not work\n")
~~~

`fill-paragraph` causes Lisp nesting

First thank you for your work. And I used poly-mode to develop my own plugin. The poly-mode is awesome and far better than mmm-mode IMO. I really appreciate it.

I found a bug.

When poly-markdown-mode is enabled, executing fill-paragraph causes the following error:

eieio-oref: Lisp nesting exceeds ‘max-lisp-eval-depth’

Could you please help?

Errors running polymode

I had installed polymode a long time ago manually. Then recently all of a sudden it became very strange: highlighting passages randomly, would move to the end of a chunk instead of indenting the line, etc. So, I decided to update it. I used install-packages and got this result:

poly-R 0.2 installed Various polymodes for R language
markdown-mode 2.3 dependency Major mode for Markdown-formatted text
poly-markdown 0.2 dependency Polymode for markdown-mode
poly-noweb 0.2 dependency Polymode for noweb
polymode 0.2 dependency Extensible framework for multiple major modes

And I added these lines to ~/.emacs:

;;poly-markdown
(setq load-path
(append '("/home/sl70/.emacs.d/elpa/polymode-0.2/" "/home/sl70/.emacs.d/elpa/poly-markdown-0.2/")
load-path))
(require 'poly-markdown)
(add-to-list 'auto-mode-alist '(".md" . poly-markdown-mode))

(add-to-list 'auto-mode-alist '("\.Rmd" . poly-markdown+r-mode))

But when I open an Rmarkdown document I get all kinds of inscrutable errors:
Debugger entered--Lisp error: (invalid-slot-name "#<pm-polymode latex-root>" :lighter) signal(invalid-slot-name ("#<pm-polymode latex-root>" :lighter)) slot-missing(#<pm-polymode latex-root> :lighter oref) eieio-oref(#<pm-polymode latex-root> :lighter) byte-code("\302\303!\210\304\305\306\001J\307\"\304\310\004!\204X\0\003\262\001\002J\304\211\002\203V\0\311\003\312\"\205(\0\306\003\312\"\262\002\0019\203@\0\310\002J!\203@\0\001J\262\007\304\262\003\202\031\0\311\003\313\"\205K\0\306\003\313\"\262\003\314\004\003\"\262\004\202\031\0\266\003\003\204_\0\010\262\004\315\316\002\304\211\317\006\011D$!\210\320\303\321\"\210\322\303\003\011#\266\004\207" [polymode-mode-map poly-noweb-mode-map make-variable-buffer-local poly-noweb-mode nil poly-latex-root-polymode eieio-oref :lighter keymapp slot-boundp :map :parent-instance append (lambda (def-tmp-var) (defvar poly-noweb-mode-map def-tmp-var "Keymap for noweb polymode.")) easy-mmode-define-keymap :inherit defalias #f(compiled-function (&optional arg) "noweb polymode.\n\n\\{poly-noweb-mode-map}" (interactive nil) #<bytecode 0x1085565>) add-minor-mode] 11) require(poly-noweb) byte-code("\300\301!\210\300\302!\210\300\303\304\305#\210\306\307\304\310\311\301%\210\312\313\314\315\316DD\317\311\320\321\322&\007\210\300\323!\210\324\325\326\304#\210\327\211\203Q\0\211@\325\001N\203J\0\326\001N\204J\0\330\326\002\325\004N#\210\001A\266\202\2020\0\210\331\325\326\332#\210\333\326!\207" [require polymode ess-mode ess-r-mode nil t custom-declare-group poly-R "Settings for poly-R polymodes" :group custom-declare-variable poly-r-root-polymode funcall function #f(compiled-function () #<bytecode 0xed8bb5>) "Root polymode with R host intended to be inherited from." polymodes :type object poly-noweb defvaralias pm-inner/noweb-R poly-r-noweb-innermode (saved-value saved-variable-comment) put make-obsolete-variable "v0.2" makunbound] 8) poly-markdown+r-mode() set-auto-mode-0(poly-markdown+r-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(#<buffer measure_summary.Rmd> "~/work/Carnegie/measures-network/measure_summary.Rmd" nil nil "~/work/Carnegie/measures-network/measure_summary.Rmd" (604349673 2054)) find-file-noselect("/home/sl70/work/Carnegie/measures-network/measure_summary.Rmd") #f(compiled-function (displayable-buffers dir line column name) #<bytecode 0x1d9b73>)((nil) "~/work/Carnegie/measures-network/" (0) (0) "measure_summary.Rmd") command-line-1(("measure_summary.Rmd")) command-line() normal-top-level()
I tried searching for the error but couldn't find anything useful. Any help will be very much appreciated.

Raw blocks in pandoc markdown

Pandoc markdown supports 'raw' blocks like this:

```{=latex}
LaTeX code here
```

This is not picked up by polymode-markdown (whereas ```{latex} is). I expect this can be fixed in the regex for the head matcher, but I'm afraid my elisp-fu wasn't up to this.

Invalid slot type: pm-inner-chunkmode, head-matcher

When launching emacs 26.1 with polymode-20180905.1435 and poly-markdown-20180905.1437 (both from MELPA) I get the following error message:

Invalid slot type: pm-inner-chunkmode, head-matcher, (or string symbol cons), #[257 \302\300\301�#\207 [markdown-yaml-metadata-begin nil pm--get-property-nearby] 5 

(fn AHEAD)]

Using --debug-init, the stack trace looks like the following:

Debugger entered--Lisp error: (invalid-slot-type pm-inner-chunkmode head-matcher (or string symbol cons) #f(compiled-function (ahead) #<bytecode 0xc7b021>))
  signal(invalid-slot-type (pm-inner-chunkmode head-matcher (or string symbol cons) #f(compiled-function (ahead) #<bytecode 0xc7b021>)))
  eieio--validate-slot-value(#s(eieio--class :name pm-inner-chunkmode :docstring "Inner-chunkmodes represent innermodes (or sub-modes) within a\nbuffer. Chunks are commonly delimited by head and tail markup but\ncan be delimited by some other logic (e.g. indentation). In the\nlatter case, heads or tails have zero length and are not\nphysically present in the buffer." :parents (#s(eieio--class :name pm-chunkmode :docstring "Generic chunkmode object.\nPlease note that by default :protect-xyz slots are nil in\nhostmodes and t in innermodes." :parents (#s(eieio--class :name pm-root :docstring "Root polymode class." :parents (#s(eieio--class :name eieio-instance-inheritor :docstring "This special class can enable instance inheritance.\nUse `clone' to make a new object that does instance inheritance from\na parent instance.  When a slot in the child is referenced, and has\nnot been set, use values from the parent." :parents nil :slots [#s(cl-slot-descriptor :name parent-instance :initform unbound :type eieio-instance-inheritor :props ((:documentation . "The parent of this instance.\nIf a slot of this class is referenced, and is unbound, then the parent\nis checked for a value.")))] :index-table #<hash-table eq 1/65 0x488399> :children (pm-root) :initarg-tuples ((:parent-instance . parent-instance)) :class-slots [] :class-allocation-values [] :default-object-cache #<eieio-instance-inheritor eieio-instance-inheritor> :options (:custom-groups nil :documentation "This special class can enable instance inheritance.\nUse `clone' to make a new object that does instance inheritance from\na parent instance.  When a slot in the child is referenced, and has\nnot been set, use values from the parent." :abstract t))) :slots [#s(cl-slot-descriptor :name parent-instance :initform unbound :type eieio-instance-inheritor :props ((:documentation . "The parent of this instance.\nIf a slot of this class is referenced, and is unbound, then the parent\nis checked for a value."))) #s(cl-slot-descriptor :name name :initform "UNNAMED" :type string :props ((:documentation . "Name of the object used to for display and info.") (:custom . string) (:group default))) #s(cl-slot-descriptor :name -id :initform 0 :type number :props ((:documentation . "[Internal] Numeric id to track objects. Every object has an id."))) #s(cl-slot-descriptor :name -props :initform 'nil :type list :props ((:documentation . "[Internal] Plist used to store various extra metadata such as user history.\nUse `pm--prop-get' and `pm--prop-put' to place key value pairs\ninto this list.")))] :index-table #<hash-table eq 4/65 0x545309> :children (pm-weaver pm-exporter pm-chunkmode pm-polymode) :initarg-tuples ((:parent-instance . parent-instance) (:name . name)) :class-slots [] :class-allocation-values [] :default-object-cache #<pm-root UNNAMED> :options (:custom-groups (default) :documentation "Root polymode class."))) :slots [#s(cl-slot-descriptor :name parent-instance :initform unbound :type eieio-instance-inheritor :props ((:documentation . "The parent of this instance.\nIf a slot of this class is referenced, and is unbound, then the parent\nis checked for a value."))) #s(cl-slot-descriptor :name name :initform "UNNAMED" :type string :props ((:documentation . "Name of the object used to for display and info.") (:custom . string) (:group default))) #s(cl-slot-descriptor :name -id :initform 0 :type number :props ((:documentation . "[Internal] Numeric id to track objects. Every object has an id."))) #s(cl-slot-descriptor :name -props :initform 'nil :type list :props ((:documentation . "[Internal] Plist used to store various extra metadata such as user history.\nUse `pm--prop-get' and `pm--prop-put' to place key value pairs\ninto this list."))) #s(cl-slot-descriptor :name mode :initform nil :type symbol :props ((:documentation . "Emacs major mode for the chunk's body.\nWhen nil the value of `polymode-default-inner-mode' is used when set;\notherwise `poly-fallback-mode' is used. A special value 'host\nmeans to use the host mode as a fallback in the body of this\nchunk.") (:custom . symbol) (:group default))) #s(cl-slot-descriptor :name indent-offset :initform 0 :type integer :props ((:documentation . "Offset to add when indenting chunk's line.\nTakes effect only when :protect-indent is non-nil.") (:custom . integer) (:group default))) #s(cl-slot-descriptor :name protect-indent :initform nil :type boolean :props ((:documentation . "Whether to narrowing to current span before indent.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name protect-font-lock :initform nil :type boolean :props ((:documentation . "Whether to narrow to span during font lock.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name protect-syntax :initform nil :type boolean :props ((:documentation . "Whether to narrow to span when calling `syntax-propertize-function'.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name adjust-face :initform 'nil :type (or number face list) :props ((:documentation . "Fontification adjustment for the body of the chunk.\nIt should be either, nil, number, face or a list of text\nproperties as in `put-text-property' specification. If nil no\nhighlighting occurs. If a face, use that face. If a number, it is\na percentage by which to lighten/darken the default chunk\nbackground. If positive - lighten the background on dark themes\nand darken on light thems. If negative - darken in dark thems and\nlighten in light thems.") (:custom choice number face sexp) (:group default))) #s(cl-slot-descriptor :name init-functions :initform 'nil :type list :props ((:documentation . "List of functions called after the initialization.\nFunctions are called with one argument TYPE in the buffer\nassociated with this chunkmode's span. TYPE is either 'host,\n'head, 'body or 'tail. All init-functions in the inheritance\nchain are called in parent-first order. Either customize this\nslot or use `object-add-to-list' function.") (:custom . hook) (:group default))) #s(cl-slot-descriptor :name switch-buffer-functions :initform 'nil :type list :props ((:documentation . "List of functions to run at polymode buffer switch.\nEach function is run with two arguments, OLD-BUFFER and\nNEW-BUFFER. In contrast to identically named slot in\n`pm-polymode' class, these functions are run only when NEW-BUFFER\nis of this chunkmode.") (:custom . hook) (:group default))) #s(cl-slot-descriptor :name -buffer :initform nil :type (or null buffer) :props nil)] :index-table #<hash-table eq 13/65 0x3d198d> :children (pm-inner-chunkmode pm-host-chunkmode) :initarg-tuples ((:parent-instance . parent-instance) (:name . name) (:mode . mode) (:indent-offset . indent-offset) (:protect-indent . protect-indent) (:protect-font-lock . protect-font-lock) (:protect-syntax . protect-syntax) (:adjust-face . adjust-face) (:init-functions . init-functions) (:switch-buffer-functions . switch-buffer-functions)) :class-slots [] :class-allocation-values [] :default-object-cache #<pm-chunkmode UNNAMED> :options (:custom-groups (default) :documentation "Generic chunkmode object.\nPlease note that by default :protect-xyz slots are nil in\nhostmodes and t in innermodes."))) :slots [#s(cl-slot-descriptor :name parent-instance :initform unbound :type eieio-instance-inheritor :props ((:documentation . "The parent of this instance.\nIf a slot of this class is referenced, and is unbound, then the parent\nis checked for a value."))) #s(cl-slot-descriptor :name name :initform "UNNAMED" :type string :props ((:documentation . "Name of the object used to for display and info.") (:custom . string) (:group default))) #s(cl-slot-descriptor :name -id :initform 0 :type number :props ((:documentation . "[Internal] Numeric id to track objects. Every object has an id."))) #s(cl-slot-descriptor :name -props :initform 'nil :type list :props ((:documentation . "[Internal] Plist used to store various extra metadata such as user history.\nUse `pm--prop-get' and `pm--prop-put' to place key value pairs\ninto this list."))) #s(cl-slot-descriptor :name mode :initform nil :type symbol :props ((:documentation . "Emacs major mode for the chunk's body.\nWhen nil the value of `polymode-default-inner-mode' is used when set;\notherwise `poly-fallback-mode' is used. A special value 'host\nmeans to use the host mode as a fallback in the body of this\nchunk.") (:custom . symbol) (:group default))) #s(cl-slot-descriptor :name indent-offset :initform 0 :type integer :props ((:documentation . "Offset to add when indenting chunk's line.\nTakes effect only when :protect-indent is non-nil.") (:custom . integer) (:group default))) #s(cl-slot-descriptor :name protect-indent :initform t :type boolean :props ((:documentation . "Whether to narrowing to current span before indent.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name protect-font-lock :initform t :type boolean :props ((:documentation . "Whether to narrow to span during font lock.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name protect-syntax :initform t :type boolean :props ((:documentation . "Whether to narrow to span when calling `syntax-propertize-function'.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name adjust-face :initform 2 :type (or number face list) :props ((:documentation . "Fontification adjustment for the body of the chunk.\nIt should be either, nil, number, face or a list of text\nproperties as in `put-text-property' specification. If nil no\nhighlighting occurs. If a face, use that face. If a number, it is\na percentage by which to lighten/darken the default chunk\nbackground. If positive - lighten the background on dark themes\nand darken on light thems. If negative - darken in dark thems and\nlighten in light thems.") (:custom choice number face sexp) (:group default))) #s(cl-slot-descriptor :name init-functions :initform 'nil :type list :props ((:documentation . "List of functions called after the initialization.\nFunctions are called with one argument TYPE in the buffer\nassociated with this chunkmode's span. TYPE is either 'host,\n'head, 'body or 'tail. All init-functions in the inheritance\nchain are called in parent-first order. Either customize this\nslot or use `object-add-to-list' function.") (:custom . hook) (:group default))) #s(cl-slot-descriptor :name switch-buffer-functions :initform 'nil :type list :props ((:documentation . "List of functions to run at polymode buffer switch.\nEach function is run with two arguments, OLD-BUFFER and\nNEW-BUFFER. In contrast to identically named slot in\n`pm-polymode' class, these functions are run only when NEW-BUFFER\nis of this chunkmode.") (:custom . hook) (:group default))) #s(cl-slot-descriptor :name -buffer :initform nil :type (or null buffer) :props nil) #s(cl-slot-descriptor :name can-nest :initform nil :type boolean :props ((:documentation . "Non-nil if this chunk can nest within other inner modes.\nAll chunks can nest within the host-mode.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name can-overlap :initform nil :type boolean :props ((:documentation . "Non-nil if chunks of this type can overlap with other chunks of the same type.\nSee noweb for an example.") (:custom . boolean) (:group default))) #s(cl-slot-descriptor :name head-mode :initform 'poly-head-tail-mode :type symbol :props ((:documentation . "Chunk's head mode.\nIf set to 'host or 'body use host or body's mode respectively.") (:custom . symbol) (:group default))) #s(cl-slot-descriptor :name tail-mode :initform nil :type symbol :props ((:documentation . "Chunk's tail mode.\nIf set to 'host or 'body use host or body's mode respectively. If\nnil, pick the mode from :head-mode slot.") (:custom choice (const nil :tag "From Head") function) (:group default))) #s(cl-slot-descriptor :name head-matcher :initform nil :type (or string symbol cons) :props ((:documentation . "A regexp, a cons (REGEXP . SUB-MATCH) or a function.\nWhen a function, the matcher must accept one argument that can\ntake either values 1 (forwards search) or -1 (backward search).\nThis function must return either nil (no match) or a (cons BEG\nEND) representing the span of the head or tail respectively. See\nthe code of `pm-fun-matcher' for a simple example.") (:custom choice string (cons string integer) function) (:group default))) #s(cl-slot-descriptor :name tail-matcher :initform nil :type (or string cons symbol) :props ((:documentation . "A regexp, a cons (REGEXP . SUB-MATCH) or a function.\nLike :head-matcher but for the chunk's tail. It is always called\nwith the point at the end of the matched head and with the\npositive argument.") (:custom choice string (cons string integer) function) (:group default))) #s(cl-slot-descriptor :name head-adjust-face :initform 'bold :type (or number face list) :props ((:documentation . "Head's face adjustment.\nCan be a number, a list of properties or a face.") (:custom choice number face sexp) (:group default))) #s(cl-slot-descriptor :name tail-adjust-face :initform nil :type (or null number face list) :props ((:documentation . "Tail's face adjustment.\nA number, a list of properties, a face or nil. When nil, take the\nconfiguration from :head-adjust-face.") (:custom choice (const :tag "From Head" nil) number face sexp) (:group default))) #s(cl-slot-descriptor :name -head-buffer :initform nil :type (or null buffer) :props ((:documentation . "[Internal] This buffer is set automatically to -buffer if\n:head-mode is 'body, and to base-buffer if :head-mode is 'host."))) #s(cl-slot-descriptor :name -tail-buffer :initform nil :type (or null buffer) :props ((:documentation . "[Internal] Same as -head-buffer, but for tail span.")))] :index-table #<hash-table eq 23/65 0x3d2099> :children (pm-inner-auto-chunkmode) :initarg-tuples ((:parent-instance . parent-instance) (:name . name) (:mode . mode) (:indent-offset . indent-offset) (:protect-indent . protect-indent) (:protect-font-lock . protect-font-lock) (:protect-syntax . protect-syntax) (:adjust-face . adjust-face) (:init-functions . init-functions) (:switch-buffer-functions . switch-buffer-functions) (:can-nest . can-nest) (:can-overlap . can-overlap) (:head-mode . head-mode) (:tail-mode . tail-mode) (:head-matcher . head-matcher) (:tail-matcher . tail-matcher) (:head-adjust-face . head-adjust-face) (:tail-adjust-face . tail-adjust-face)) :class-slots [] :class-allocation-values [] :default-object-cache #<pm-inner-chunkmode UNNAMED> :options (:custom-groups (default) :documentation "Inner-chunkmodes represent innermodes (or sub-modes) within a\nbuffer. Chunks are commonly delimited by head and tail markup but\ncan be delimited by some other logic (e.g. indentation). In the\nlatter case, heads or tails have zero length and are not\nphysically present in the buffer.")) 18 #f(compiled-function (ahead) #<bytecode 0xc7b021>) head-matcher)
  eieio-oset(#<pm-inner-chunkmode markdown-yaml-metadata> head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>))
  #f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode 0x51699d>)(#<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  apply(#f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode 0x51699d>) #<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  shared-initialize(#<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  #f(compiled-function (this &optional slots) "Construct the new object THIS based on SLOTS.\nSLOTS is a tagged list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically.  If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from SLOTS." #<bytecode 0x5169c5>)(#<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  apply(#f(compiled-function (this &optional slots) "Construct the new object THIS based on SLOTS.\nSLOTS is a tagged list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically.  If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from SLOTS." #<bytecode 0x5169c5>) #<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  initialize-instance(#<pm-inner-chunkmode markdown-yaml-metadata> (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  #f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode 0x5151e1>)(pm-inner-chunkmode :name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host)
  apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode 0x5151e1>) pm-inner-chunkmode (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  make-instance(pm-inner-chunkmode :name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host)
  apply(make-instance pm-inner-chunkmode (:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host))
  pm-inner-chunkmode(:name "markdown-yaml-metadata" :mode yaml-mode :head-matcher #f(compiled-function (ahead) #<bytecode 0xc7b021>) :tail-matcher #f(compiled-function (ahead) #<bytecode 0xc7b03d>) :head-mode host :tail-mode host)
  (closure (t) nil (pm-inner-chunkmode :name "markdown-yaml-metadata" :mode 'yaml-mode :head-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-begin) :tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end) :head-mode 'host :tail-mode 'host))()
  funcall((closure (t) nil (pm-inner-chunkmode :name "markdown-yaml-metadata" :mode 'yaml-mode :head-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-begin) :tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end) :head-mode 'host :tail-mode 'host)))
  eval((funcall (function (closure (t) nil (pm-inner-chunkmode :name "markdown-yaml-metadata" :mode 'yaml-mode :head-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-begin) :tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end) :head-mode 'host :tail-mode 'host)))))
  custom-initialize-reset(pm-inner/markdown-yaml-metadata (funcall (function (closure (t) nil (pm-inner-chunkmode :name "markdown-yaml-metadata" :mode 'yaml-mode :head-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-begin) :tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end) :head-mode 'host :tail-mode 'host)))))
  custom-declare-variable(pm-inner/markdown-yaml-metadata (funcall (function (closure (t) nil (pm-inner-chunkmode :name "markdown-yaml-metadata" :mode 'yaml-mode :head-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-begin) :tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end) :head-mode 'host :tail-mode 'host)))) "Markdown YAML metadata block." :group poly-innermodes :type object)
  eval-buffer(#<buffer  *load*-147167> nil "/home/jay/.emacs.d/elpa/poly-markdown-20180905.1437/poly-markdown.el" nil t)  ; Reading at buffer position 2258
  load-with-code-conversion("/home/jay/.emacs.d/elpa/poly-markdown-20180905.1437/poly-markdown.el" "/home/jay/.emacs.d/elpa/poly-markdown-20180905.1437/poly-markdown.el" nil t)
  require(poly-markdown)
  eval-buffer(#<buffer  *load*> nil "/home/jay/.emacs.d/init.el" nil t)  ; Reading at buffer position 66
  load-with-code-conversion("/home/jay/.emacs.d/init.el" "/home/jay/.emacs.d/init.el" t t)
  load("/home/jay/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x2601c9>)()
  command-line()
  normal-top-level()

My simple test init.el is the following:

(package-initialize)
(require 'polymode)
(require 'poly-markdown)
;(require 'poly-R)

I have the same problem when trying to load poly-R.

$ character starts latex mode even inside fenced block

When using poly-markdown, the $ character starts LaTex mode even inside fenced block. In a fenced block the $ character is just a literal character and should not start LaTex mode.

I am using poly-markdown-0.1.5 and emacs 26.1

Unable to navigate markdown files

When poly-markdown-mode is enabled, I'm unable to navigate through files containing source code blocks. I'm using evil-mode, and opening a new line, or entering insert mode makes the cursor to go all the way to a code block instead of where the cursor was initially (or going to the new line if pressing o)

Loading code in Agda code blocks removes syntax highlighting from the Markdown text

How to duplicate:

  • Install agda, load agda2-mode
  • Open a file Foo.lagda.md
  • Write some Markdown and a fenced code block with agda language
  • Load the Agda code with C-c C-l.
  • Watch the Markdown highlighting disappear.

Not sure if this is an issue in polymode, poly-markdown or agda2-mode, but I thought to start here and try to find out where the issue is to see if I could help fixing it.

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.