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 Xh18AX0tmV8zGgAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 08:36:13 +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 IJhuOHwtmV/afgAA1q6Kng (envelope-from ) for ; Wed, 28 Oct 2020 08:36: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 7E0959404C7 for ; Wed, 28 Oct 2020 08:36:12 +0000 (UTC) Received: from localhost ([::1]:37828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXgwF-0005Zw-An for larch@yhetil.org; Wed, 28 Oct 2020 04:36:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXgqr-0002gd-SC for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 04:30:37 -0400 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]:41862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXgqp-0006RG-PR for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 04:30:37 -0400 Received: by mail-il1-x12e.google.com with SMTP id x20so3933518ilj.8 for ; Wed, 28 Oct 2020 01:30:34 -0700 (PDT) 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:content-transfer-encoding; bh=ByVcOozmHtmwZ7W08h1ovbub2p3ae+63sqGNoifFOBg=; b=ISmhlonU5COoCYdUXaJD+xPwboVmCtpYeIxjigVxkjnMudloL38dfZwhz/zmr48j+h g8HGZFPWfqRNfhDZo9xFzzzzoTUX+lUuNHujzu1+VAYXXh8Ct9OJReEGmrjkMguONcbX 5Uiakl06ifn2so+ADhfdM6g1tmoJVzj4yajx8wNqNoHOprxaE40mo3BGdmx086tR+C61 bhlRrsOb9PxftfYBSI1dMqSNOAGN7NBrVeO/9zSus6ptP7iBr0+B7uTXohMVPMuQUguL sWG+Q2SuM/PUOtnFKgOsAmH1nQRJWpzdl3TLd1XJUJO3FWcwWWjkwS09QmgCxLSO8os1 tPmQ== 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:content-transfer-encoding; bh=ByVcOozmHtmwZ7W08h1ovbub2p3ae+63sqGNoifFOBg=; b=ATPX4Hvf1dv09MCi18j0iOZWm3UEUyKqCyGwqHm92T+8N2P9fFW0nenwFVbX6P3ZDV QliOgz7SwHuNKFXCAZ4epqGtb6wS3K89rHIbTxCkWmZhlxkAfX7xmHtcCuoDCcRnr5bs cuZcS5V8H2CqnAQRbZjkeDeeXEm45wCPDsqB4rJDez1ZAK8v+iZhl+Kl2sw5Lk7aUGHw QHYs9QVUGww6J20xoZtbUAx5lgGk4GVfzkYIyOFkNBc/oHOVLcyK7GnnSikThABEZZgR hTXd37nRmwoi7Ief/8dqiVgAbZexX3XWcQZMZH3LgJkFtTdbfb4gO3E3e+//Zcyd2DcM vCzA== X-Gm-Message-State: AOAM5337E5LO7gygecNwNsXdlna0qHf6lbhbpDbmJUqWEXufkCCz91VX mneuNbO4UqstSq+ZReZ4nGaDnxPyzYIVk1DMqQ== X-Google-Smtp-Source: ABdhPJxa8v4A+qNqWi3/YkGUDuNDweyhSrjBvSGmPGFTuh8ptwH8sfI+MQhBpbiy5X6m6q5SeUnSMb7A/9o2xjHq/Vs= X-Received: by 2002:a05:6e02:cc8:: with SMTP id c8mr5168844ilj.132.1603873833722; Wed, 28 Oct 2020 01:30:33 -0700 (PDT) MIME-Version: 1.0 References: <1695924.1602785484@apollo2.minshall.org> <3230eeefc0b0f156fbe85cd1d48e501e@isnotmyreal.name> <87mu079ucj.fsf@web.de> In-Reply-To: <87mu079ucj.fsf@web.de> From: Immanuel Litzroth Date: Wed, 28 Oct 2020 09:29:57 +0100 Message-ID: Subject: Re: best practices query: non-emacs packages based on tangled source To: "Dr. Arne Babenhauserheide" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::12e; envelope-from=immanuel.litzroth@gmail.com; helo=mail-il1-x12e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: TRS-80 , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ISmhlonU; 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-Spam-Score: -1.71 X-TUID: 4j7fuBTIaoUW I think the org way of tangling just doesn't work well for compiled languag= es. Here are some reasons: - Not possible to tangle all code going to a specified file - Not possible to add line directives without major surgery - Not all language modes do the correct thing - No way to prevent overwriting an unchanged file - Special casing e.g. Don=E2=80=99t tangle to a file called =E2=80=98no=E2= =80=99. Specific gripe: - :prologue and :epilogue are not honoured by all modes >>> #+ BEGIN_SRC emacs-lisp :prologue "hello" :epilogue "goodbye" :tangle ex1.e= l (+ 1 2) #+ END_SRC #+ BEGIN_SRC haskell :tangle ex1.hs :prologue "hello" :epilogue "goodbye" hey #+ END_SRC hey #+HEADER: :tangle ex1.cpp #+ BEGIN_SRC cpp :prologue "hello" :epilogue "goodbye" main() {} #+ END_SRC #+ BEGIN_SRC bash :tangle ex1.bash :prologue "hello" :epilogue "goodbye" aha #+ END_SRC >>> Based on the org machinery I've written a simple tangler which addresses so= me of these shortcomings. It can add line directives to recursively expanded n= oweb references -- and get that right. It can also take any action at the end of tangling like comparing your tangled file to the one on disk and not overwrite if it's the same, or just sending your tangled buffer to an interpreter not writing it to file (remember that error references point back to the .org file). Also it can tangle all blocks going to the same file. This has been tested for Haskell, C++ and elisp. It's in a private repo on github because it's not ready for release yet, but if someone is interested I can give them access. Immanuel On Tue, Oct 27, 2020 at 11:30 PM Dr. Arne Babenhauserheide wrote: > > > TRS-80 writes: > > > Therefore, any stuff I plan on releasing publicly, I do not do in > > literate style (JMHO). However if you are dead set on doing literate > > paradigm, then maybe my experience is invalid for your use-case. > > My experience is that literate style works very well for tutorials, but > whenever I developed a larger program within org-mode, I tangled it once > I had to start debugging and then kept it as separate source. > > Once the code becomes complex, I want to stay in one programming > language without outside features that also add extra complexity. > > That said, for simple code the additional freedom of multi-language > programming in org-mode is awesome. I=E2=80=99m using that to create rand= om > roleplaying characters directly from random tables in org-mode, with > those tables being the primary source (because the book is the most > important product, not the code). > > Best wishes, > Arne > -- > Unpolitisch sein > hei=C3=9Ft politisch sein > ohne es zu merken --=20 -- Researching the dual problem of finding the function that has a given point as fixpoint.