-
Notifications
You must be signed in to change notification settings - Fork 70
Add java support. #142
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
base: master
Are you sure you want to change the base?
Add java support. #142
Conversation
The envelope system definitely needs a better way of manually (via dir locals or explicit code) of creating them, so there is no easy way of doing this right now (beyond patching it into the variable and manually running the registry code.) |
Thanks for contributing. Can you please also write tests? They are very, very easy to write: https://github.com/mickeynp/combobulate/wiki/Adding-a-New-Language-to-Combobulate Has a big chapter on how. |
Thanks. I will check. |
Hm. If I run |
sounds odd. does that happen in the container? |
Yes, it works with emacs 29 in container image [1]. Otherwise I'm using emacs from master branch. [1] Dockerfile need a little patch: From 9271b85fc7e1f33786b3a3b06f9e64cd6dd669ea Mon Sep 17 00:00:00 2001
From: Matija Obid <[email protected]>
Date: Tue, 1 Jul 2025 20:05:29 +0200
Subject: [PATCH] Dockerfile
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 86e0168..7a69341 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,7 +8,7 @@ LABEL MAINTAINER "Mickey Petersen at mastering emacs"
ENV DEBIAN_FRONTEND=noninteractive
-RUN sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list \
+RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources \
&& apt-get update \
&& apt-get build-dep -y emacs
--
2.49.0 |
Are tests now ok? |
Provided they all pass in the image, then yes. The test looks good. You will want tests for the other sibling procedures and for hierarchical navigation, etc. I take it you're using the code that helps build tests from example code, right? It's listed in the wiki article; it simplifies things a lot. Should not take long to do the rest if you use that method. I do encourage you to use 'real' code and not just the same thing pasted again and again. Have an LLM write out a bunch of example code for you: "write an example java program that expresses as many unique syntactic features as possible" is a starting point. |
I made some more expressive tests. I used code from wiki to make a tests, like: (combobulate-test-mark-according-to-procedure "my-file.java" (combobulate-read procedures-sibling)) Is there any interactive way to call this? It work's fine, except when combobulate jump into list (with C-M-d, when |
There should be a button in the popup buffer when you use the test function to test a procedure. It has a hyperlink to automatically insert jump points. |
2d698b9
to
1094939
Compare
I tried movement, envelopes, marking and they work just fine.
Also, one question: Is it possible to define envelope in user configuration or .dir-locals.el file?