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 OAIKKqTLD2C6IwAA0tVLHw (envelope-from ) for ; Tue, 26 Jan 2021 07:58:28 +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 8NrrJaTLD2BRZAAAB5/wlQ (envelope-from ) for ; Tue, 26 Jan 2021 07:58:28 +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 7F93F9402C2 for ; Tue, 26 Jan 2021 07:58:27 +0000 (UTC) Received: from localhost ([::1]:49426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4JF4-0002QJ-GX for larch@yhetil.org; Tue, 26 Jan 2021 02:58:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4JAX-0000eu-Vo for emacs-orgmode@gnu.org; Tue, 26 Jan 2021 02:53:46 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:38837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4JAW-0005LE-Bv for emacs-orgmode@gnu.org; Tue, 26 Jan 2021 02:53:45 -0500 Received: by mail-lj1-x22f.google.com with SMTP id f19so9512367ljn.5 for ; Mon, 25 Jan 2021 23:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=3BNmUhGPz2Ye9TRziJD1uplkC+vluk81ZpAU3xn3LX4=; b=Lf13/vAov/VCeJQYYsfrtLakcBlCWiGTe4pH9Ck5jU4BWRP+8pbEb/eHYdfXTxT+/F ZYYh2C0lN40dGPhBtrbV3RQhu6Y46Eh8epmD8Nl9Cgzfsx/falsuVbOzHjpkGvKq0qxe GvZdxszGlV0PTUFO+pVrIqBNYlvM1InfT/ZaEfksCThzfWNTU7L2vUr0tKXFBfmyYIrX s6Z9zgsZxsCBw/5r3eRBcQalj6ehHpSt7CAOrC8VwSt8d2sDnh+oySScaqhmXrkM2UUF BSvOxDk5iXnEcrMQisEMs7fxur2zd++gZA4SBH8LD7wKfP3H5eI4wFhq9TiLdv0tEjVI pYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:message-id:date :mime-version; bh=3BNmUhGPz2Ye9TRziJD1uplkC+vluk81ZpAU3xn3LX4=; b=Kz67pkY62E/VeuFN9Wb21+q05C8RthJ3eoCKBNiZj0vK5tG3So7lY8N2hNpqCS2yqm 7ENjxKUb5BvvbYrkiJqql0Fhv8sx6Py4rLAZH3ALvxLVQJg6b7OyXaveeQuN0FtX8N/8 +aLwKPUNhkCvAy0MCPKO/xaKJqyUPsZxmUBDdJ6s2Ot5nhhMafvyeDhsfaifOtDk0CcE pGFQaHN9CCqT+PPt43O7mQVIlQ839jmgOFSFfRkSTimxnsCxV4sLZxEhJGN+oOSHq23G BNYpucCcBGe/NgpwYAiTmT1Jekm102lXjL+AAj0noSNlWh12FTPEZGXfWu1RU/Gwfi3f mpLA== X-Gm-Message-State: AOAM530qberIKL3wTCz++2wB5CeMERMHbFDmRRcqU6utDN3Tk0vBOjcB 6hnGZ9i4c4USRn3XbkEuS/jTMxgDl6Y= X-Google-Smtp-Source: ABdhPJwVCEXcim7nq/uJMqUbN9pCvjGaCefeVM+p269Wne9Hj0/Q3y/jN5Kq3tmspVV4Xy8Prq4sYA== X-Received: by 2002:a2e:9086:: with SMTP id l6mr2218312ljg.510.1611647621336; Mon, 25 Jan 2021 23:53:41 -0800 (PST) Received: from fnox (h-160-111.A147.priv.bahnhof.se. [85.24.160.111]) by smtp.gmail.com with ESMTPSA id o27sm1531206lfb.126.2021.01.25.23.53.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 23:53:40 -0800 (PST) User-agent: mu4e 1.4.13; emacs 27.1 From: John Herrlin To: org-mode-email Subject: [PATCH] ob-java: Allow import to end with asterisk Message-ID: <87sg6o6sn2.fsf@gmail.com> Date: Tue, 26 Jan 2021 08:53:38 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=jherrlin@gmail.com; helo=mail-lj1-x22f.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: , 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="Lf13/vAo"; 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: 7F93F9402C2 X-Spam-Score: -3.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: MQU5Pgn7+LkT --=-=-= Content-Type: text/plain Hey, I found this case: #+BEGIN_SRC java import static java.lang.System.*; out.println("Hejsan"); #+END_SRC And it seems to me that the import regex dont see the asterisk. I attached a possible patch. Stay safe! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ob-java-Allow-import-to-end-with-asterisk.patch >From a9c37a8a56fd1f91f4a2789b0d7d983fec9a2c1f Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Tue, 26 Jan 2021 08:19:19 +0100 Subject: [PATCH] ob-java: Allow import to end with asterisk * lisp/ob-java.el (org-babel-java--imports-re): Allow import to end with asterisk. 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 07ff8e9ab..b205eacd6 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -88,7 +88,7 @@ like javac -verbose." "Regexp for the package statement.") (defconst org-babel-java--imports-re (rx line-start (0+ space) "import" (opt (1+ space) "static") - (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the fully qualified class name + (1+ space) (group (1+ (in alnum ?_ ?. ?*))) ; capture the fully qualified class name (0+ space) ?\; line-end) "Regexp for import statements.") (defconst org-babel-java--class-re (rx line-start (0+ space) (opt (seq "public" (1+ space))) -- 2.30.0 --=-=-=--