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 QB5EDfisyl9ZRgAA0tVLHw (envelope-from ) for ; Fri, 04 Dec 2020 21:41:12 +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 8EwKCfisyl/2dAAAB5/wlQ (envelope-from ) for ; Fri, 04 Dec 2020 21:41:12 +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 C43179400D3 for ; Fri, 4 Dec 2020 21:41:11 +0000 (UTC) Received: from localhost ([::1]:54188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klIpC-0001BK-9A for larch@yhetil.org; Fri, 04 Dec 2020 16:41:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klIlQ-00070U-RM for emacs-orgmode@gnu.org; Fri, 04 Dec 2020 16:37:16 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klIlO-00081i-28 for emacs-orgmode@gnu.org; Fri, 04 Dec 2020 16:37:16 -0500 Received: by mail-wr1-x42d.google.com with SMTP id s8so6667675wrw.10 for ; Fri, 04 Dec 2020 13:37:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hEgHhVyXXy5aizMC5JQRpm3Cfukfr0JnEjxE0jVSQaU=; b=G/XgmeylXQjWIWRNOymy8YiFvSCvTdbedxh78W71u3/YJmlZ95OjdMx08Yo5RPTLI1 OSnnw59X+TN3+/WYVfuaEs+arAafZOR8IZndp0kBxh6D9QRrJczhTYUJr7lj0WASOqRz 58rEu+1nZtP/vmg8EhlnWbV19L/2nW0UpFpZkbXWX1Xe4N0Hq/DMasRyasztLaiLNM70 DSvA9J7nqLn8rHM+fGVvG0Y8L+Lj1GL8hREBA5toOAARMPZiE+Grtza0AOfXnKF61Zfg AItDtUDJRwofsCfasHGpjCgS+VbFZyVtZ4yV2mAzCmb4zZfmMFqy72OWgCIW9VFJIobr gajA== 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=hEgHhVyXXy5aizMC5JQRpm3Cfukfr0JnEjxE0jVSQaU=; b=a5/RgLPPSUTkbMkGEPnlgYEFqMIMGYfzepuW63K3rj1rJGdA4P2nXI5qKb3fTyiysm As8sc1a1fmN/hUplp4NLZP1Pdr8TsmQMZpup86ztQgCDiGN6Wzg3GeqRX0oAMGrQzf0r Jsm9jA3v81YiNuoORxjhdGilzR2VoYS0WsgtCaf7vd6ksLqCQfmjOGIf3P4qVIzpRUhQ 1+OVaeuEZSi66lsQYsOHUBxLLfAC3zU+zPKdRGENlZ4PSAECaAZCPFASLZcSoyeAb3fQ h0O9yCoS9paEKADx14MBt/FyBPttWx8UGHUWcv1Vd7td89ZpRc0Y/r/itKtOPtDlgmDs VQMw== X-Gm-Message-State: AOAM531yQeE8TQpd1KSkXOlHwTTLsuSQuotjR1jRxQcf+CL1XBISYYg4 hmDaInEFZUO9NVNFNbKfMWH/EmAcVwZh/We+oTI= X-Google-Smtp-Source: ABdhPJwlrpWMf9etJPx1rhgOQzC247G4MP2WISuhUTkyzRpSu6RbUWUjT4bWmb0cDKGLtpM2YsSBiQhERRJzy+e6fxU= X-Received: by 2002:adf:e611:: with SMTP id p17mr6954901wrm.180.1607117831906; Fri, 04 Dec 2020 13:37:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Tom Gillespie Date: Fri, 4 Dec 2020 16:37:00 -0500 Message-ID: Subject: Re: How to evaluate source code while in the edit buffer? To: gmauer@gmail.com Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42d.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: emacs-orgmode , Mirko Vukovic Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.19 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=G/Xgmeyl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: C43179400D3 X-Spam-Score: -0.19 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: Kd4bovEgKxqI While we're on the subject of execution in the edit buffer, it is not entirely clear what such execution would mean. Mirko's desire seems to be to execute the buffer directly without org-babel as an intermediary. However, the most consistent approach would be a command to pop back to the source buffer from the edit buffer and use org-babel-execute-src-block to run the code. If org were to provide edit buffer evaluation it would likely have to be that. The reason for this is that direct execution of code in the major mode of the edit buffer is not well defined. For some languages (e.g. racket) there is no easy way to evaluate a buffer that does not correspond directly to a file on the file system, which is part of why org babel exists in the first place (to define those semantics). In theory babel languages could provide an alternate implementation for how an edit buffer can be run, but absent such an implementation it would be up to the user to figure out the semantics for each of the languages they wanted to evaluate directly. Best, Tom