graphql-mode icon indicating copy to clipboard operation
graphql-mode copied to clipboard

org-mode fontification error for graphql src blocks

Open danielmai opened this issue 6 years ago • 1 comments

I use Org mode source blocks quite often, and for source code blocks I set org-src-font-natively to t so that source code blocks within an Org buffer get fontified within the org buffer just like they would within its native mode (e.g, json-mode for json source blocks, c-mode for C source blocks, graphql-mode for GraphQL source blocks).

I've only run into a fontification issue with graphql source blocks and I'm not sure why.

The moment I create a block like this in an org file:

#+BEGIN_SRC graphql

#+END_SRC

I get a message in the minibuffer that says:

org-mode fontification error

and the contents of the source block are not fontified. But if I have a new buffer with graphql-mode as the major mode, the fontification works as expected.

danielmai avatar Sep 12 '18 23:09 danielmai

I can reproduce this issue. It seems that if I comment the rule https://github.com/davazp/graphql-mode/blob/master/graphql-mode.el#L339-L340 it works (after restarting emacs).

But I don't know why yet. I can't manage to debug it easily. I'll give another try if I find time.

davazp avatar Sep 15 '18 10:09 davazp