From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CDL4HRlq+18cbwAA0tVLHw (envelope-from ) for ; Sun, 10 Jan 2021 20:56:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iLXGGRlq+193dwAA1q6Kng (envelope-from ) for ; Sun, 10 Jan 2021 20:56:57 +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 E9AA4940111 for ; Sun, 10 Jan 2021 20:56:56 +0000 (UTC) Received: from localhost ([::1]:33444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyhlf-0000kv-JK for larch@yhetil.org; Sun, 10 Jan 2021 15:56:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyhkg-0000jz-2O for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 15:55:57 -0500 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:39935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyhke-0003qw-CL for emacs-orgmode@gnu.org; Sun, 10 Jan 2021 15:55:53 -0500 Received: by mail-lj1-x230.google.com with SMTP id b10so1372037ljp.6 for ; Sun, 10 Jan 2021 12:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=HOmThryvAoCwcCEJxFeyN+kNqVtzZf+8UTsjJ7PauqA=; b=HZNKVUBJV71OWlRWQ83IyUjrMGjswwQbR08ulwGnq4BkG9JXfQb/4lLaj4+4HuWYNK G1xePkx33C75WaiqkdB4SwyrzIOS0H4dbPI+jRgqXFfrb54Z42JdhcWslaaw8UgU96gT yYzsAiU/RNg2dctwPKglcNOf7ylI4wRcCnnkwuOrcm1R+wZFl0lyuf8bB0ltjOLpvR54 rba0KE2PcbBdt4WAkPzN2HfhHuO7XsI5XoF6gM2GkkS2Xs9DeWvrSBfEpVW5hvL1ws9W OXAuPQgxs+Bz+h2km78J2ixcmf/5Ncweo6ay7EZ3f3sWVZyhH5AD7U+T62/LXCypi+VK wWkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=HOmThryvAoCwcCEJxFeyN+kNqVtzZf+8UTsjJ7PauqA=; b=W5jF50DP7g1v9hI8qxYGAPP/+51AiE17nLAmP4RQlJT0boxD9ndyIK4sBtVEqc+dY1 L3NWKo3EJNJbh+Z3NTjskYUNGfCvEt4z0YWg0w82DIJ6GYxDX6S4u2k1PK71yHnMevaL /Vsiolf+u80LzGqeamLeo5G4Am7/ZRiU4u4LM3wFP71iu8GWBja6B5nVpnboL6MxHcNt 6UOxQabHjavsFPmt9SyIC2TqheOXzMLtd2YpnUNxO8xW+LwOZZMDtpyAEYBFeZg2qvFT eOXl/dRIeigWKB5HpCtP2NbXisjWM+uu+r88lII1VA+HxCKl/PvElr4VBgf9ofogq9X0 rmgg== X-Gm-Message-State: AOAM530Kr+X4rvi4fp9BzFjNwXGNoh0WSXtpt2jfVIODf6Y0b4tk+1L8 WbzBKH458wnjjRLo0bl3XxnI7J8/cuU= X-Google-Smtp-Source: ABdhPJyZM8DhEhP/kmVqUNPAncushkQzeaFpmtUxUusUu83pwSUmQ56eJ3SrXJEFBaI/gAphiL1XiA== X-Received: by 2002:a2e:164e:: with SMTP id 14mr6311565ljw.482.1610312149906; Sun, 10 Jan 2021 12:55:49 -0800 (PST) Received: from fnox (h-160-111.A147.priv.bahnhof.se. [85.24.160.111]) by smtp.gmail.com with ESMTPSA id p24sm2862842lfh.70.2021.01.10.12.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 12:55:48 -0800 (PST) References: <87o8hzv1e8.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: John Herrlin To: ian martins Subject: Re: [PATCH] ob-java, a proposal on import improvement In-reply-to: Message-ID: <87lfd0v7e6.fsf@gmail.com> Date: Sun, 10 Jan 2021 21:55:47 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=jherrlin@gmail.com; helo=mail-lj1-x230.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: -3.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=HZNKVUBJ; dmarc=pass (policy=none) header.from=gmail.com; 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: E9AA4940111 X-Spam-Score: -3.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: lMb/RvxZgS63 --=-=-= Content-Type: text/plain ian martins writes: > On Fri, Jan 8, 2021 at 11:28 AM John Herrlin wrote: > >> I would like to combine imports from header-args with imports from a >> source block. >> ... >> I didnt get the to work so I made a patch. > > John, Sorry that wasn't working. Thanks for investigating and > submitting a fix. I think the problem was that I was missing static > imports, which you fixed in the first chunk of your patch. I don't > think the rest of the change is necessary. Could you revert the other > chunks and re-test? Thats looks correct! Thanks! Here is a patch with the regexp fix. Take care! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ob-java-Include-static-imports-in-regex.patch >From 3de5cf1c3173285a7f51ab436f02419f8c9f5ffb Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Sun, 10 Jan 2021 21:47:26 +0100 Subject: [PATCH] ob-java: Include static imports in regex * lisp/ob-java.el (org-babel-java--imports-re): Include static imports in Java import regex. TINYCHANGE --- lisp/ob-java.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index f70a50192..05f591ee3 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -86,7 +86,7 @@ like javac -verbose." (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the package name (0+ space) ?\; line-end) "Regexp for the package statement.") -(defconst org-babel-java--imports-re (rx line-start (0+ space) "import" +(defconst org-babel-java--imports-re (rx line-start (0+ space) "import" (opt space "static") (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the fully qualified class name (0+ space) ?\; line-end) "Regexp for import statements.") -- 2.30.0 --=-=-=--