emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: ian martins <ianxm@jhu.edu>
To: John Herrlin <jherrlin@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] ob-java: Allow import to end with asterisk
Date: Sat, 30 Jan 2021 05:50:47 -0500	[thread overview]
Message-ID: <CAC=rjb4YjSC8DPonVT2mvdzdJOpWuL6=3c_7955-3CdMCf43cg@mail.gmail.com> (raw)
In-Reply-To: <875z3gde25.fsf@gmail.com>

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	other threads:[~2021-01-30 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26  7:53 [PATCH] ob-java: Allow import to end with asterisk John Herrlin
2021-01-27  3:21 ` ian martins
2021-01-27  7:24   ` John Herrlin
2021-01-28 20:03   ` John Herrlin
2021-01-30 10:50     ` ian martins [this message]
2021-04-25  3:43       ` Timothy
2021-04-25 10:40         ` ian martins
2021-04-26  6:52           ` Bastien

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='CAC=rjb4YjSC8DPonVT2mvdzdJOpWuL6=3c_7955-3CdMCf43cg@mail.gmail.com' \
    --to=ianxm@jhu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jherrlin@gmail.com \
    /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).