From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IAO8Agc6SWQwaAEASxT56A (envelope-from ) for ; Wed, 26 Apr 2023 16:49:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uKjFAQc6SWSbjAAAG6o9tA (envelope-from ) for ; Wed, 26 Apr 2023 16:49:43 +0200 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 AB5C84F83 for ; Wed, 26 Apr 2023 16:49:42 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=OtRczGBk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682520582; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=J2uKQGMTLCQVYPFr475hHzKKGPE/AnbpEED2AkZTFr8=; b=aqF6aOmbyb5usNUgQ89MUnv6VQqYio5DS/GXtEsubmcWCwFOjYjYdD0PO/7k/cu9BL6q9l LQgjBI0nh7mS4T62X/EB2RobkwZqoazl+9IOdiEUSvQuZV38moWA1AWzoqQQwDnzw9h9U4 FgTEPp11rG7HjVHGy3dNxZkrjn0mqiNHpfy3rSPnYu4MSYD9uzHN8qpbFPjUjNzut/IuS/ bEPPS+fwkHYBNRP15SBsd5iW9hhBYNHfzG+dwZyUtTyhq4ta0UOnAl2xygQGP63Nn0uQru GHWuBfL9selRkFLMZTlCv++GAwqDBDZn8NGgZejHBC4g9vOxq+TM2/abe1WjYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=OtRczGBk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682520582; a=rsa-sha256; cv=none; b=Il2ar8+ItTDGtSL5V4PGYpqotEkP9+MzfEuDLkuGmYTPZ/Fi0PnZ2QZcPk2mCjAsQ36lGS JckkmEQII3EAazvQhKg8c0l4bGWV1bIKGuiw9YjS+BEbRKJRqgp6ZNRNLPgyNGZQdIqUCl 1/tYqKCM+FhOXNzz+lN+SGY/VR4cFp6lOg05VKJ7J/9TtNGZBqhwPzDYocOd2fbqPSeCtA gpMZ5ym025S/ZVisdQQcCryAHY9gUVJbkv+FPnuLvtDsgJ0qe+bF240Q8wuVOHxWUso3N7 pVzCmwuFVXDW3mkOWXIlv+3XYkxoK4e2ExFeQnX1vqFwZG7HKvKHmJdkvHoy1Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prgS0-0000SM-VA; Wed, 26 Apr 2023 10:48:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prgRx-0000S5-Iv for emacs-orgmode@gnu.org; Wed, 26 Apr 2023 10:48:54 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prgRv-000456-A1 for emacs-orgmode@gnu.org; Wed, 26 Apr 2023 10:48:53 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4efeea05936so4511633e87.2 for ; Wed, 26 Apr 2023 07:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682520529; x=1685112529; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=J2uKQGMTLCQVYPFr475hHzKKGPE/AnbpEED2AkZTFr8=; b=OtRczGBkT77H4DQ1+pAY1vJACCXE6VZN1ZD4Pg8hUvrzZ1ruRN7H++/zZs8tUI0ALL xCN2CzseJ0Hby6L3hBHwHboZCmG2Jn+TyY0eM+W2S/YzCPG4iUv62wkYIAxWJTVIEiP2 z/ulmTP6BDqCmYIShEQn4xgeEJVRQh0u+qrm5Axh+ih8CrYzzoBfv+Mld4jHwbzuHnI2 WdOk2TFLrwuVgI8ckq6WR34OfIwmJwuxx4/7qA7L2yxQfxs5arbZT2Q0vH/2PYwl7ZtR l+xbh6TaxgGJEYw1aDB8NFRJukjq4Gfw8QbPHuPIrGCl1fBfa9K1qOslun5f1lljgXf/ GuUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682520529; x=1685112529; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=J2uKQGMTLCQVYPFr475hHzKKGPE/AnbpEED2AkZTFr8=; b=OcxRoUhLzDHyf8tJTEw/osuIQE+YkPcRyV0RV2GUXchIuszZskDrXxRCYx4agvt8YT e7/q9xUct0UBocIpFIQqOOV3P9VTVng/Vv0zSFmnsjw82K6/NHPqd9bIGEdcdP+A2o+W Npo340i8BMFiEaSae3nHenU1BmgEsc2xc1Ei22ZRe2fprjoXp9WFz/brxlw1z9WNtDZD YMQCFNI7/mdU0TC3TcnNlxuYdAqqKam6faIrM4hGXZBIK5fjSjstyIXez5V6zusW/Xl+ +mnRZqDT8DSJr6WV30scMB6biPlD4gbJH/cru5Gdtb9oVM2YoB/za9qhsG6mAWJ+FYTI o/Qg== X-Gm-Message-State: AAQBX9eJJg8srEvvGC1wyS+h9qHjb1c6+CGAUy29ndZFIpTiEe8QsVQf 8+3CSJDArm6NLPZqAmsI4ypTxpUo/XUidM53byE3Pw/t4Gs= X-Google-Smtp-Source: AKy350aHQWrv9kf/J5eL6kjWQvhzfH45LLTBslYiDGhuVeGEpfxjK2lZa8DobMkjzGe5n5aG0Ua4sYledRavfL+WVsg= X-Received: by 2002:a2e:3019:0:b0:2a8:b2e5:4f65 with SMTP id w25-20020a2e3019000000b002a8b2e54f65mr4360217ljw.14.1682520528792; Wed, 26 Apr 2023 07:48:48 -0700 (PDT) MIME-Version: 1.0 From: Mehmet Tekman Date: Wed, 26 Apr 2023 16:48:12 +0200 Message-ID: Subject: [ANN] lisp/ob-tangle-sync.el To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="0000000000007264b005fa3e563a" Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=mtekman89@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: UNKNOWN X-Migadu-Spam-Score: -4.07 X-Spam-Score: -4.07 X-Migadu-Queue-Id: AB5C84F83 X-Migadu-Scanner: in3.migadu.com X-TUID: kJHbjtEccq6v --0000000000007264b005fa3e563a Content-Type: text/plain; charset="UTF-8" Dear fellow org-users, I would like to contribute some a new library into org-mode, which performs automatic synchronization between tangled files and their org-mode source blocks via a global minor mode `org-babel-tangle-sync-mode' which uses the after-save-hook. Full disclosure: I created a MELPA package with similar functionality 3 years ago, but it did not use the existing org libraries much and needlessly reinvented many wheels: https://gitlab.com/mtekman/org-tanglesync.el This is a complete (and very concise) rewrite that uses the org framework and that I wish to incorporate into org-mode itself. My changes to the org-mode main branch can be found here: https://gitlab.com/mtekman/org-mode (ob-tangle-sync branch) A toy example of what this does would be as follows: - Source =emacs_conf= org-mode file #+begin_src bash :comments yes :tangle ~/.bashrc export PATH=$PATH:/opt/bin #+end_src - Tangled =~/.bashrc= file #+begin_src bash # [[file:repos/_mtekman/emacs_conf.org::*bashrc][bashrc:1]] export PATH=$PATH:/opt/bin #+end_src By activating =org-babel-tangle-sync-mode=, I can edit either of those buffers and every time that I save it would automatically update the other. If I add the header argument =:tangle-sync = then I can specify an action of: - skip :: do nothing, just save the buffer, even if the sync mode is active - pull :: only pull changes from =~/.bashrc= into the Emacs_conf org-mode file - export :: only export changes from Emacs_conf to =~/.bashrc=, even if called from =~/.bashrc= - both :: (default) synchronize freely between tangled file and source block (the is also the nil value) By default, the mode acts on any org-mode source block with =:tangle= headers and any tangled file with file comments. This can be changed by setting a list of "sync files" via =org-babel-tangle-sync-files= which only acts if the source block exists in a file given in that custom variable. I'm currently trying to write tests for the library, but I would also greatly welcome any feedback and comments on the currently written code (attached as a diff, and also available in the above org-mode repo) As this is also my first time submitting directly to GNU Emacs, I, um, might also need some hand-holding. I think I've followed the main org-contribute guidelines, but I've likely missed or glossed over a step or two. Cheerful regards, Mehmet --0000000000007264b005fa3e563a Content-Type: text/x-emacs-lisp; charset="UTF-8"; name="lisp_ob-tangle-sync.el" Content-Disposition: attachment; filename="lisp_ob-tangle-sync.el" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lgxt2wcf0 ZGlmZiAtLWdpdCBhL2xpc3Avb2ItdGFuZ2xlLXN5bmMuZWwgYi9saXNwL29iLXRhbmdsZS1zeW5j LmVsCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAwMC4uNjFjMjNmNjQ3Ci0tLSAv ZGV2L251bGwKKysrIGIvbGlzcC9vYi10YW5nbGUtc3luYy5lbApAQCAtMCwwICsxLDE3MiBAQAor Ozs7IG9iLXRhbmdsZS1zeW5jLmVsIC0tLSBTeW5jaHJvbml6ZSBTb3VyY2UgQ29kZSBhbmQgT3Jn IEZpbGVzIC0qLSBsZXhpY2FsLWJpbmRpbmc6IHQ7IC0qLQorCis7OyBDb3B5cmlnaHQgKEMpIDIw MDktMjAyMyBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KKworOzsgQXV0aG9yOiBNZWht ZXQgVGVrbWFuCis7OyBLZXl3b3JkczogbGl0ZXJhdGUgcHJvZ3JhbW1pbmcsIHJlcHJvZHVjaWJs ZSByZXNlYXJjaAorOzsgVVJMOiBodHRwczovL29yZ21vZGUub3JnCisKKzs7IFRoaXMgZmlsZSBp cyBwYXJ0IG9mIEdOVSBFbWFjcy4KKworOzsgR05VIEVtYWNzIGlzIGZyZWUgc29mdHdhcmU6IHlv dSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKKzs7IGl0IHVuZGVyIHRoZSB0ZXJt cyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Cis7OyB0 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AgIDs7IEV4YW1pbmUgdGhlIGJsb2NrOiBHZXQgdGhlIHNvdXJjZSBmaWxl IGFuZCB0aGUgZGVzaXJlZCB0YW5nbGUtc3luYyBhY3Rpb24KKyAgICAgICAgKGxldCogKChwYXJz ZWQtbGluayAod2l0aC10ZW1wLWJ1ZmZlcgorCSAgICAgICAgICAgICAgICAgICAgICAobGV0ICgo b3JnLWluaGliaXQtc3RhcnR1cCBuaWwpKQorCSAgICAgICAgICAgICAgICAgICAgICAgIChpbnNl cnQgbGluaykKKwkgICAgICAgICAgICAgICAgICAgICAgICAob3JnLW1vZGUpCisJICAgICAgICAg ICAgICAgICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkKKwkgICAgICAgICAgICAgICAg ICAgICAgICAob3JnLWVsZW1lbnQtbGluay1wYXJzZXIpKSkpCisgICAgICAgICAgICAgICAoc291 cmNlLWZpbGUgKGV4cGFuZC1maWxlLW5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KG9yZy1lbGVtZW50LXByb3BlcnR5IDpwYXRoIHBhcnNlZC1saW5rKSkpCisgICAgICAgICAgICAg ICAoc3luYy1hY3Rpb24gKHNhdmUtd2luZG93LWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvcmct YmFiZWwtdGFuZ2xlLXN5bmMtLWJhYmVsLXRhbmdsZS1qdW1wIGxpbmsgYmxvY2stbmFtZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFsaXN0LWdldCA6dGFuZ2xlLXN5bmMKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobnRoIDIgKG9yZy1iYWJl bC1nZXQtc3JjLWJsb2NrLWluZm8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICduby1ldmFsKSkpKSkpKQorICAgICAgICAgIDs7IERlLXRhbmdsZSBm aWxlIGJhY2sgdG8gc291cmNlIGJsb2NrIGlmOgorICAgICAgICAgIDs7IC0gbWVtYmVyIG9mIHN5 bmMgZmlsZSBsaXN0IChvciBsaXN0IGlzIGVtcHR5KQorICAgICAgICAgIDs7IC0gc291cmNlIGZp bGUgdGFuZ2xlLXN5bmMgYWN0aW9uIGlzbid0ICJza2lwIiBvciAiZXhwb3J0IiwKKyAgICAgICAg ICAoaWYgKG9yIChudWxsIG9yZy1iYWJlbC10YW5nbGUtc3luYy1maWxlcykKKyAgICAgICAgICAg ICAgICAgIChtZW1iZXIgc291cmNlLWZpbGUgb3JnLWJhYmVsLXRhbmdsZS1zeW5jLWZpbGVzKSkK KyAgICAgICAgICAgICAgKGNvbmQgKChzdHJpbmc9IHN5bmMtYWN0aW9uICJza2lwIikgbmlsKQor ICAgICAgICAgICAgICAgICAgICAoKHN0cmluZz0gc3luYy1hY3Rpb24gImV4cG9ydCIpCisgICAg ICAgICAgICAgICAgICAgICAoc2F2ZS13aW5kb3ctZXhjdXJzaW9uCisgICAgICAgICAgICAgICAg ICAgICAgIChwcm9nbiAob3JnLWJhYmVsLXRhbmdsZS1zeW5jLS1iYWJlbC10YW5nbGUtanVtcCBs aW5rIGJsb2NrLW5hbWUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGV0ICgoY3Vy cmVudC1wcmVmaXgtYXJnICcoMTYpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KGNhbGwtaW50ZXJhY3RpdmVseSAnb3JnLWJhYmVsLXRhbmdsZSkpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAobWVzc2FnZSAiRXhwb3J0ZWQgZnJvbSAlcyIgc291cmNlLWZpbGUpKSkp CisgICAgICAgICAgICAgICAgICAgICh0CisgICAgICAgICAgICAgICAgICAgICAoc2F2ZS13aW5k b3ctZXhjdXJzaW9uCisgICAgICAgICAgICAgICAgICAgICAgIChvcmctYmFiZWwtZGV0YW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gICAgICAgICAgICAgICAoY29uZCAoKHN0cmluZz0g dGFuZ2xlLWFjdGlvbiAicHVsbCIpIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3JnLWJhYmVsLWRldGFuZ2xl IHRhbmdsZS1maWxlKSkpCisgICAgICAgICAgICAgICAgICAgICAgKChzdHJpbmc9IHRhbmdsZS1h Y3Rpb24gInNraXAiKSBuaWwpCisgICAgICAgICAgICAgICAgICAgICAgKHQgKGxldCAoKGN1cnJl bnQtcHJlZml4LWFyZyAnKDE2KSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FsbC1p bnRlcmFjdGl2ZWx5ICdvcmctYmFiZWwtdGFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgOzsgUmV2ZXJ0IHRvIHNlZSBjaGFuZ2VzLCB0aGVuIHJlLWVuYWJsZSB0aGUgbW9kZQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHdpdGgtY3VycmVudC1idWZmZXIgKGdldC1maWxlLWJ1 ZmZlciB0YW5nbGUtZmlsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJldmVydC1i dWZmZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvcmctYmFiZWwtdGFuZ2xlLXN5 bmMtbW9kZSB0KSkpKSkpKSkpKSkpCisKKyhwcm92aWRlICdvYi10YW5nbGUtc3luYykKKworOzs7 IG9iLXRhbmdsZS1zeW5jLmVsIGVuZHMgaGVyZQo= --0000000000007264b005fa3e563a--