From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EHONFzQ6FWC5ZwAA0tVLHw (envelope-from ) for ; Sat, 30 Jan 2021 10:51:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sCI4EzQ6FWC3fAAAbx9fmQ (envelope-from ) for ; Sat, 30 Jan 2021 10:51:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C5219940105 for ; Sat, 30 Jan 2021 10:51:31 +0000 (UTC) Received: from localhost ([::1]:57682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5nqj-0004hS-B6 for larch@yhetil.org; Sat, 30 Jan 2021 05:51:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5nqM-0004fu-S5 for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 05:51:06 -0500 Received: from mail-ed1-f47.google.com ([209.85.208.47]:33420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5nqI-00005x-Qn for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 05:51:05 -0500 Received: by mail-ed1-f47.google.com with SMTP id c6so13491275ede.0 for ; Sat, 30 Jan 2021 02:51:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L4FQ/vyLwFyzV3V/CTOObUehaoweWzJ0ZIBnki5rDyg=; b=l2JCY+5F/8HF9K9kIUKzqkIUdAuUTl0FfeNGm3AKvc3uuYmfm0yGso3RS9JJNDyI9G jHZaHKmW5vtzItMGTGG+3HCASgXKn2BzP61W/CS2gA7s+zsjCCjnMOShg2mrj/Npv2Vz YZCohYqRvwENHboYNBLJDHAn++8gJpajPAn4bnDVMWQn7l4/39YgvhlZNwa/gL5DXmu+ inpsXqlyhij4KxPahTNi9AcDKJ067sjWmslpKtFLBXA7w025Lk/jYj7baJeKOT7mR6tu VYs8AI8NB+VE8xs44awpgiQhcsVeOE7+vKEc1NSXerU68pWX2zD/VhwLNiUFjLmOEq/4 cVhw== X-Gm-Message-State: AOAM532gAaU8ZS6028x5xtHfrl7rWE2QBt0V1JLnOccdgS2xlQnis4Cq PxuXeKtz45A20NI7PQsXSVo9RDqo1B2TJpOyfAk= X-Google-Smtp-Source: ABdhPJwJKEQXYf/QmDDMMDfzUySbP6pwNRbR9RURgnkyb7Bw4pzAD7ZWnZV0H/vE9pnVndM4ji5K8X2Ojn6Bz3hoM44= X-Received: by 2002:a05:6402:558:: with SMTP id i24mr9605748edx.141.1612003859207; Sat, 30 Jan 2021 02:50:59 -0800 (PST) MIME-Version: 1.0 References: <87sg6o6sn2.fsf@gmail.com> <875z3gde25.fsf@gmail.com> In-Reply-To: <875z3gde25.fsf@gmail.com> From: ian martins Date: Sat, 30 Jan 2021 05:50:47 -0500 Message-ID: Subject: Re: [PATCH] ob-java: Allow import to end with asterisk To: John Herrlin Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.47; envelope-from=ianxm1@gmail.com; helo=mail-ed1-f47.google.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.25 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=jhu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: C5219940105 X-Spam-Score: -2.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0t/uk4qJ9opS 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 wrote: > > > ian martins 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! >