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

ian martins <ia...@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