Comments (1)
Sorry for not coming to this earlier. Polymode was rewritten and your example seem to work as expected. If you are still interested here is the new way of doing it:
(require 'org-src)
(require 'polymode)
(defcustom pm-inner/java+org
(pm-inner-chunkmode :name "java+org"
:mode 'org-mode
:head-matcher "/\\*[ \t]*org[ \t]*\n"
:tail-matcher "\\*/"
:head-mode 'host
:tail-mode 'host)
"Java comment as Org-Mode."
:group 'poly-innermodes
:type 'object)
;;;###autoload (autoload 'poly-java+org-mode "poly-java")
(define-polymode poly-java+org-mode
:hostmode 'pm-host/java
:innermodes '(pm-inner/java+org))
(add-hook 'poly-java+org-mode-hook #'poly-java+org-remove-hooks)
(defun poly-java+org-remove-hooks (_)
;; get rid of awfull hooks
(remove-hook 'text-mode-hook 'variable-pitch-mode))
(add-to-list 'auto-mode-alist '("\\.orgjava$" . poly-java+org-mode))
It works fine for me. In case you are still interested and it works well for you I would be willing to add it to poly-org as a generic minor mode in the sense that any host mode could use ORG within comments. But of course the host should be able to have multi-line comments supported.
from polymode.
Related Issues (20)
- Debugger entered--Lisp error: (void-variable polymode-run-these-before-change-functions-in-other-buffers) HOT 4
- Detecting that I'm in an inner chunk, from a major mode hook HOT 2
- On entering emacs lisp source block, text at top of org file is underlined in yellow/red by flycheck HOT 1
- unable to install manually HOT 2
- Help with a (hopefully) simple polymode?
- Reproducible error: stuck in latex-mode
- Starting polymode with lsp, makes the cursor to jump to the end of buffer HOT 10
- can't find polymode via package-install? HOT 1
- electric-indent-mode
- How to run a function is indirect buffers with the same major mode only?
- Typescript-xml polymode
- Setting mode file local variable to polymode applies itself recursively infinitely until cancelled
- Background Adjustment when Background Unspecified
- polymode creates additional [web] buffer
- Interaction with nix-mode: font-lock broken HOT 4
- Chunks not following automatic Emacs switch to light/dark theme HOT 5
- Polymode, Poly-COMEEGA and COMEEGA (Collaborative Org Mode Enhanced Emacs Generalized Authorship)
- inner mode indentation not works on the first line after head mark
- org-mode links become invisible HOT 3
- Polymode does not work in org-edit-special
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polymode.