From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 3L2EDmvcEGBudwAA0tVLHw (envelope-from ) for ; Wed, 27 Jan 2021 03:22:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eJ7QCWvcEGBqGgAAB5/wlQ (envelope-from ) for ; Wed, 27 Jan 2021 03:22:19 +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 0003A9402C2 for ; Wed, 27 Jan 2021 03:22:14 +0000 (UTC) Received: from localhost ([::1]:33300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4bPI-0004ca-6H for larch@yhetil.org; Tue, 26 Jan 2021 22:22:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4bOT-0004cC-2Z for emacs-orgmode@gnu.org; Tue, 26 Jan 2021 22:21:22 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:38524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4bOQ-0003ZD-Ns for emacs-orgmode@gnu.org; Tue, 26 Jan 2021 22:21:20 -0500 Received: by mail-ed1-f44.google.com with SMTP id s11so654877edd.5 for ; Tue, 26 Jan 2021 19:21:17 -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=oPLuggE3RlN85CZ8hhLEzUpn9kPcemcu0fBFzGzDbPY=; b=OdAd++LBMBv/L1Qw+LdIMnt16fcfilWvFCSu1ynBbWgDWRvJGz70BjPMg+NqBpCmlo 3YeUAc2goDZdSMAaB42JJLC1hTBVBW39HY/8vpinUMwlqkE2CsdkwliIotbFywCyF3Qk BDWNCwjKM9e2tPuEAuMQPTZRwU+TGH/rzbYfh2MdFP3r2x5HbHSmeFIVS1fvpEoL1ov/ pWML8BR65lq+h4zatIkSm8uDQeMva7PD7XZTstQOl3jSsDCXBbNnzUvohB5bFr08tV5c eqhEo6jWA10CJnFxN/OHdES7qegrhvgNnTnnh+vSHB9LlycJturZjg+nfjWtRXPGfrAi Cqiw== X-Gm-Message-State: AOAM531yJ/gVzEzezmAC7VaBJh49Gw6wfBMvEagoKjgf/FTrfkgrCkEP yVp/g4p2QkXJomY33gYkU53cFTYm9Q7w3ilw0LY= X-Google-Smtp-Source: ABdhPJxsu4VwdNNmUi08bcFS+j0hbuyDh/fFfjTT3J8i5J4Yr1cyDhqK+2rDfJ7UTwtpJeYghtpGry45VCYqLFyY/Qk= X-Received: by 2002:a50:a086:: with SMTP id 6mr6959848edo.70.1611717676755; Tue, 26 Jan 2021 19:21:16 -0800 (PST) MIME-Version: 1.0 References: <87sg6o6sn2.fsf@gmail.com> In-Reply-To: <87sg6o6sn2.fsf@gmail.com> From: ian martins Date: Tue, 26 Jan 2021 22:21:05 -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.44; envelope-from=ianxm1@gmail.com; helo=mail-ed1-f44.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.25, 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: 0003A9402C2 X-Spam-Score: -2.25 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7acA02+cYP6I > 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