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: ian martins
Subject: Re: [PATCH] ob-java: Allow import to end with asterisk
Date: Sat, 30 Jan 2021 05:50:47 -0500

Thanks. And thanks for taking the time to fix issues that you find. It
continues to improve because of your contributions.
The patch looks good. Applied.

On Thu, Jan 28, 2021 at 3:04 PM John Herrlin <jherrlin@gmail.com> wrote:
>
>
> 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
>
> Here is an updated patch. It seems to work on my cases.
>
> Of topic, I am very happy with the latest updates on ob-java and I think
> it works really good! Thanks for the awesome work Ian!
>
> Stay safe!
>



reply via email to

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