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 4uU0GKyGLV84ZQAA0tVLHw (envelope-from ) for ; Fri, 07 Aug 2020 16:51:56 +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 0BevE6yGLV9jfQAAB5/wlQ (envelope-from ) for ; Fri, 07 Aug 2020 16:51:56 +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 5C590940214 for ; Fri, 7 Aug 2020 16:51:55 +0000 (UTC) Received: from localhost ([::1]:39734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k45ay-0005un-RL for larch@yhetil.org; Fri, 07 Aug 2020 12:51:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k45aa-0005ug-Vl for emacs-orgmode@gnu.org; Fri, 07 Aug 2020 12:51:29 -0400 Received: from mx0a-00395d01.pphosted.com ([148.163.133.170]:25614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k45aX-0004T6-S3 for emacs-orgmode@gnu.org; Fri, 07 Aug 2020 12:51:28 -0400 Received: from pps.filterd (m0173167.ppops.net [127.0.0.1]) by mx0a-00395d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 077Gof61015293; Fri, 7 Aug 2020 09:51:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsd.edu; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=campus; bh=Z89xwWowc4Bh6uiV43VXHQa3MtGalrl4k8bT3F7ISLo=; b=n30gidbo6GiqIuAomCOMkd9DmbwBJeeDlnmOV/PSJyY77nobvH1mDf6UI0csfwlstlJP tA7BM0u/j3RwuP/CzmXHjWP+Cs4adRV5Xy+yxkE67/YzgLWODtr8U/qcuRk+uhi/RJFu wBHgoriy8L/IPTmfqeXEdk8ATIZTaA9hhudF7/gngWZ3CjMuKXpIkRPNbNB0LBoZOjiF tVynl+Yz/C3Q8fFHVz5zZFdKfA8+b7XZ1ETB59rFXxkW0STHghUp5kj58jpuPXbQ5Iey xgBa9G8N416sCRJ/sfKSE+f1PahLS8mbl5Q37Z7MbPWRljywC9wiHE1339pirhaJ2YYM zg== Received: from secdlpezp05.ucsd.edu ([40.112.251.180]) by mx0a-00395d01.pphosted.com with ESMTP id 32saj2r1eb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Aug 2020 09:51:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ERMGp/HELGXwkOOYA96ZyflzLYNisHrnsAp/m+A8Zhax706q9Yo3g/YbJQqWiFlYxBfr+FNO3KR3UkN7/jGY0ZBPDckw8UWDoz8fIQzBRGjql/+DhxEuJLD24H/fQRFNIB1DPZ/A66WiOsoIGA3KCfidq+fxhLRSndwNqwdkqhAJENSkZzps4oDvCzzTxvyndTBOMFBqLTLh9Ve+nPYdvHikwsxP1fU7u/N47hAOvpYJn628Y5fcqkTRRGDgFCq1dlR/lvrux0+y+Y3cmRQpdoCjworuEpzEkDiscz/U1qqdcHZl5I6MqJFh3PgpCgMcGGv1HzMhJd1ZQhA3tdtW3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z89xwWowc4Bh6uiV43VXHQa3MtGalrl4k8bT3F7ISLo=; b=fO6iySDPaiPEmWGpNIrWjTmrA9rcnIaldzWkB4nPDvWWqFDbxiFh4eI26CIQIqhkXOwkuXMRT+E5mfetbEmaDEeaOow8ZfB9Hy8oPGAoFOIeZ1EgWvEgaceGOvxeqxMNDv8qBH5zmBSr56gRWNUR/xlxQjLzjqyPG0lyA/3oBStvqvCqC/GSQlpt8vNmPZrTKsAzIaU7Lw//MLYXb6q1BLd0f4G7qdzn3pgpvCM5Kfe2NBzviRxYJ5+XxZMV7o04YKg1JxV1xHje8nRBvHYzNSf6wsMbqM9Pqxm5H7siVKva4BDM9vb8aFScFBrZV/6aKtd4dex4I4heHZdcRtnhuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=health.ucsd.edu; dmarc=pass action=none header.from=health.ucsd.edu; dkim=pass header.d=health.ucsd.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsdhs.onmicrosoft.com; s=selector2-ucsdhs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z89xwWowc4Bh6uiV43VXHQa3MtGalrl4k8bT3F7ISLo=; b=qT7j+DXJaCMyzW/mp1b/s+7wciLhdLqZaD//f2ARz+nik8qa1BPM7K/+jcC8nItsT9beijmJWiLGjE1SG3Rz7o6qs83RNqtCl5GhK0bcfgONMAkOubmgwcK9EihNlSgH7Iqxecl3qcDO+RxrmChBMi18Fzj054rfrafSJMyeMI4= To: William McCoy Subject: Re: Can you automatically noweb include? Thread-Topic: Can you automatically noweb include? Thread-Index: AQHWbNr5ZmlzGNpFsEa2rSXpSlnFCg== Date: Fri, 7 Aug 2020 16:51:20 +0000 Message-ID: <3D721ED9-B51F-47D2-B2D4-7017FCA5F95C@health.ucsd.edu> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2600:1702:1021:b0:e05a:4d98:7b85:8d06] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b31a6abe-bcec-4f53-90a2-08d83af21c5b x-ms-traffictypediagnostic: BN6PR19MB1489: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V0IVEtb84O/r12iNzROPz6ri8HYvbn0nbiqvdt99u8GNdWjCe4SYtMYJl30vmoZozbCBOdzqWynuU9pChj3W3tDFeoGy3sYHHMqk0jFqH8EC08gFDOQUUHHygxrMeuJg2Msf3KNguykYaVd684K7YKEQM0MpCRujPxn0U7OpvZs3Frp23mojKR0c8fTvsjQyLqlIyQoptz791wH3K230O8SPeinux7FxMQGIfSiFYRFqeET9qmK4onmYc5IXx6W14a8CIw1PfxMxgCZMnqTdn9rlb/ooyMkyG/JrvYcINJuSSBB5pxKBFZBRpYyxBjxjsogPp0rgo5wt4Xt3JdIGGA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR19MB2882.namprd19.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(136003)(376002)(396003)(346002)(53546011)(6506007)(8936002)(86362001)(316002)(5660300002)(8676002)(786003)(6512007)(2906002)(66556008)(33656002)(6916009)(71200400001)(83380400001)(478600001)(6486002)(91956017)(66946007)(186003)(66476007)(76116006)(4326008)(2616005)(64756008)(66446008)(75432002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: KtcwwBpp7fouajOAeDVnQKpUa3i2BSd4T1vX+ygKy3eZ5aEXxv6XE4zjvwkAG6VLq5xYonO6XdHccWlfgknD9zMuL0ZR1y6QEmnGjol5fuLwh2bw5zDIQsTH3/rqA4fOYmNhdBG47fGDC5dGdTOyaaNnO91fbzUM+0dh6dtCaa+54nSl1duF076jY5A99o2z8of5kL7LTGi0FL8wbg0or782bRRIvzhI7O+PxenH6yFkec/36h5uG9pxSaQZk4pMKS5Lamib5cY7i5t+mtpYTpfavY1iGsSHueAgseojmJXkYxPOkmTBpbdYp6Xds+XKc9hB75GK/xMR5tQQZm9Ev/yyhZwQnTyJOZgyXThzEGF1PfZj1DXJzW9lOawsAH1hmrLirMyx7WDq2IRjon3WPlV+NJDuWsRCu9icKJ9mEvtgrdUbPvbSWF3aNqiyhAu0LbcfdYKrEq6qg5+fuO5YI1xmmkNnJwqZP7EoGvz6p5I6TJ5/6ICUN2Dx8WzSZvxCwLe8820DUJoH/EC7KCUULanvy7JpI2ogzXNSXTe+FjQEOw2G6HVnNlM4UgEms5a7p+lY/ZaSobCs22WVf6T54HcQ/0knaIi5FWpM5rfobuRpf7kgR8YdLpc0brP907VNR/jMm64hg0p9ZPyDb1aWkvlZpywzcASDZFurSPl8y1w3nNkd7OAPYFpRrvF6Y17WCTHdwT+C9ilvK0/GyhhFNQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: health.ucsd.edu X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR19MB2882.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b31a6abe-bcec-4f53-90a2-08d83af21c5b X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2020 16:51:20.3895 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e470d736-e7f7-41a8-8eab-dad544b2b579 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: COAX0ol7Lo2t/5Om7VvsC/FlBxKR1mlDwfBL5eQ6i2zJhJcN3Vf4fCgeLjweJUaBHU3uWwLJMlb4aIZ5vc6Huw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR19MB1489 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-07_15:2020-08-06, 2020-08-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 suspectscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008070118 Received-SPF: pass client-ip=148.163.133.170; envelope-from=ccberry@health.ucsd.edu; helo=mx0a-00395d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/07 12:51:23 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 mailing list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" Reply-to: "Berry, Charles" From: "Berry, Charles" via "General discussions about Org-mode." X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=ucsd.edu header.s=campus header.b=n30gidbo; dkim=fail (rsa verify failed) header.d=ucsdhs.onmicrosoft.com header.s=selector2-ucsdhs-onmicrosoft-com header.b=qT7j+DXJ; dmarc=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-Spam-Score: 2.99 X-TUID: lun97IwGoBrU > On Aug 7, 2020, at 8:39 AM, William McCoy wrote: >=20 > This use of :prologue appeared to me to be very useful. But for some rea= son when I try it out it does not work for me. I just get a message that t= he code block produced no output and that 'np' is not defined. Just to che= ck, when I put the import statements directly within my code block it works= fine. >=20 > I am running: Org mode version 9.3.7 (9.3.7-16-g521d7f-elpa >=20 > Any idea what I'm doing wrong? >=20 >=20 It is sometimes useful to use C-c C-v C-i to see what header args org has d= etected for a source block. Misspelled words sometimes wreak havoc and invi= sible characters can cause real pain. Also, it helps to use C-c C-v C-v to to see the expanded code block. When I= do this with Kens' ECM, I get import numpy as np; import os print(np.__version__) in the preview buffer. HTH, Chuck > On 8/6/20 2:12 PM, Ken Mankoff wrote: >> Actual example: >>=20 >>=20 >> * Prologue test >> :PROPERTIES: >> :header-args:python+: :prologue "import numpy as np; import os" >> :END: >>=20 >> #+BEGIN_SRC python :results output >> print(np.__version__) >> #+END_SRC >>=20 >> #+RESULTS: >> : 1.18.4 >>=20 >>=20 >>=20 >>=20 >> On Wed, Aug 5, 2020 at 3:03 PM Ken Mankoff wrote: >> What about using :pre or :prologue and setting it at the header or docum= ent level? >>=20 >> Please excuse brevity. Sent from tiny pocket computer with non-haptic-fe= edback keyboard. >>=20 >> On Wed, Aug 5, 2020, 14:22 George Mauer wrote: >> Use case: >>=20 >> I'm using ob-racket but this would apply just as well to a few other wor= kflows I have with python or js. >>=20 >> I would like to write a helper function in a src block and then automati= cally have access to it in other src blocks further down the document. I do= n't really want a stateful session (nor does ob-racket support sessions) so= I essentially want the equivalent of automatically including it everywhere= so I don't have to type it out all the time (and have it screw up syntax c= oloring/indentation). >>=20 >> Is this currently possible? Does anyone have any ideas for how to extend= things so it is? >=20