emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ob-java: Allow import to end with asterisk


From: John Herrlin
Subject: Re: [PATCH] ob-java: Allow import to end with asterisk
Date: Wed, 27 Jan 2021 08:24:52 +0100
User-agent: mu4e 1.4.13; emacs 27.1

Thank you for the guidence! I will try to figure it out and sending a
updated patch soon.

ian martins <ianxm@jhu.edu> writes:

>> I found this case:
>> And it seems to me that the import regex dont see the asterisk.
>>
>> I attached a possible patch.
>
> Thanks again, John.  You're right the regex is missing the asterisk
> include. Thanks for the patch fixing. This works but it will add
> redundant includes if the source block includes something that is also
> in the list of classes to automatically include.
>
> for example, this:
>
>     #+begin_src java :results value
>       import java.util.*;
>       return "test";
>     #+end_src
>
> will end up pulling in
>
>     import java.util.List;
>     import java.util.*;
>
> It wouldn't hurt anything, but could probably be prevented by changing
> the regexp in =org-babel-java--import-maybe= to look for asterisk as
> well as =class=.  Do you feel like updating the patch?
>
> [1] https://code.orgmode.org/bzg/org-mode/src/master/lisp/ob-java.el#L314



reply via email to

[Prev in Thread] Current Thread [Next in Thread]