emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Herrlin <jherrlin@gmail.com>
To: ian martins <ianxm@jhu.edu>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] ob-java, a proposal on import improvement
Date: Sat, 16 Jan 2021 16:32:20 +0100	[thread overview]
Message-ID: <87wnwcq4n0.fsf@gmail.com> (raw)
In-Reply-To: <CAC=rjb4BV2OockXt8KxsuG-PRskuPiDNj10ude3WudvTvfpKVA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 120 bytes --]


Sorry for latency, 9to5 been killing it. Thx for the feedback, make
sense! Here is a new patch with the improvements.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-java-Include-static-imports-in-regex.patch --]
[-- Type: text/x-patch, Size: 920 bytes --]

From 680e04217c8e4c536875379cac01edccd694c4cb Mon Sep 17 00:00:00 2001
From: John Herrlin <jherrlin@gmail.com>
Date: Sun, 10 Jan 2021 21:47:26 +0100
Subject: [PATCH] ob-java: Include static imports in regex

* lisp/ob-java.el (org-babel-java--imports-re): Include static imports
in Java import regex.

TINYCHANGE
---
 lisp/ob-java.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index f70a50192..c9698bd72 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -87,6 +87,7 @@ like javac -verbose."
 					 (0+ space) ?\; line-end)
   "Regexp for the package statement.")
 (defconst org-babel-java--imports-re (rx line-start (0+ space) "import"
+                                         (opt (1+ space) "static")
 					 (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the fully qualified class name
 					 (0+ space) ?\; line-end)
   "Regexp for import statements.")
-- 
2.30.0


[-- Attachment #3: Type: text/plain, Size: 1260 bytes --]



ian martins <ianxm@jhu.edu> writes:

> John, would you mind if I go ahead and make the change I mentioned and
> push it with you as the author?
>
> On Tue, Jan 12, 2021 at 7:00 AM ian martins <ianxm@jhu.edu> wrote:
>>
>> On Sun, Jan 10, 2021 at 3:55 PM John Herrlin <jherrlin@gmail.com> wrote:
>> > ian martins <ianxm@jhu.edu> writes:
>> > > I think the problem was that I was missing static
>> > > imports, which you fixed in the first chunk of your patch. I don't
>> > > think the rest of the change is necessary. Could you revert the other
>> > > chunks and re-test?
>> >
>> > Thats looks correct! Thanks!
>> >
>> > Here is a patch with the regexp fix.
>>
>> That's great. One small change, though. This only allows for a single
>> space between "import" and "static" so if someone were to put in two
>> it wouldn't work. I actually did the same thing in an earlier version
>> and it caused a problem. Since then I went to =(1+ space)=
>> everywhere. Could you also move the part that you're adding down to
>> the next line. It's not that the line is too long, but it keeps it to
>> one thing per line.
>>
>> The commit message is fine, but the first line shouldn't end in a period.
>>
>> ref: https://orgmode.org/worg/org-contribute.html#commit-messages

  reply	other threads:[~2021-01-16 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 16:28 [PATCH] ob-java, a proposal on import improvement John Herrlin
2021-01-08 22:09 ` Dr. Arne Babenhauserheide
2021-01-09 15:55   ` ian martins
2021-01-09 15:51 ` ian martins
2021-01-10 20:55   ` John Herrlin
2021-01-12 12:00     ` ian martins
2021-01-16 12:56       ` ian martins
2021-01-16 15:32         ` John Herrlin [this message]
2021-01-16 20:49           ` ian martins
2021-04-25  3:42             ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnwcq4n0.fsf@gmail.com \
    --to=jherrlin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ianxm@jhu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).