Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect language from parent source block in Org-like modes #13

Open
angrybacon opened this issue May 16, 2017 · 3 comments
Open

Detect language from parent source block in Org-like modes #13

angrybacon opened this issue May 16, 2017 · 3 comments

Comments

@angrybacon
Copy link

angrybacon commented May 16, 2017

Org org-mode

#+BEGIN_SRC emacs-lisp
;; Code
#+END_SRC

Markdown markdown-mode

```elisp
;; Code
```

Stack Overflow

Not sure this is an actual thing or just their own.

<!-- language: lang-el -->

    ;; Code

There are also reStructuredText and Sphinx which are probably less used.

@angrybacon angrybacon changed the title Detect language from Org source block data Detect language from parent source block in Org-like modes May 16, 2017
@dieggsy
Copy link

dieggsy commented May 18, 2017

Least for org-mode, there's org-in-src-block-p and org-eldoc-get-src-lang.

@etu
Copy link
Owner

etu commented May 18, 2017

Good to know, thanks :)

@hendursaga
Copy link

There is also e.g. markdown-code-block-lang, markdown-code-block-at-point, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants