From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EOucJtBuqmV5VwAAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Jan 2024 13:45:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EOucJtBuqmV5VwAAqHPOHw (envelope-from ) for ; Fri, 19 Jan 2024 13:45:04 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="O6/2+CpJ"; dmarc=pass (policy=none) header.from=posteo.net; 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=1705668304; 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=5GDKflyL5tz/YKnC00DVwIUKm+MqFR+sR5jG8fytYsk=; b=e3BFdW23VMXQpZPNxbqvQqPrxplwuADAkZiK4tFtEitZt6yXk6KatM4Gz3FZnph8sANVqP 4qikxUzz2l5PV38l+G/y2EdTUxIdff9K5ROLRdrTyOTAyxNoIAc2NWgfQdrWJOeZQCjwcD wZTrJF/W6ItfTcJHcMbcLZ95nICV0x6zamwZA0voFA9m6V+lW+rMG66RCe44NilcDB73Hv +V9k6VoMexxsIJyAJIcXMRySXk/xnAIeOppxDG6TPv8sYYxYaDBfQkionXL1opoLiQctwJ yW2UWTWFRxmUwGbcHmfWQCx9Zp6lxYB+XfAJfaGLVn6iJHkmD3JFHegOPYaXbw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705668304; a=rsa-sha256; cv=none; b=Iw4azyNfjwthkJyWyJvcyEvx2/zE0KDyJZqLrRIDwhawnVm524p7sWyJe9yERJKGy36O8J xHUjMxfG4jZbvNfn9kJAtOQXnWIazjiRZMGiLxoUdozAxpFNqEmxgfxpz2siff4gJhesx3 FJ0GfXTNYxNclfQMVyxVXgXXlHxToxlNwN5VVZH/XLuU/LK52Fl9U4Ad+T6mfqXZy51iG5 0O/fl4AnXICYIJa41DeTVd3HK6l6ML9/W24wo/W2wP5QSlnI+hsFCJQfrTJAh0QqyLJDUL nluOwwKNK1Xca2U3FyQUDox58L/LbkYeKaZiIbm6KWw0T7B2M4cr+N0Xg07/Iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="O6/2+CpJ"; dmarc=pass (policy=none) header.from=posteo.net; 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" 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 53C9E72D0A for ; Fri, 19 Jan 2024 13:45:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQoEI-0007kk-Q1; Fri, 19 Jan 2024 07:44:14 -0500 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 1rQoE8-0007ev-Kd for emacs-orgmode@gnu.org; Fri, 19 Jan 2024 07:44:06 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQoE5-000655-2g for emacs-orgmode@gnu.org; Fri, 19 Jan 2024 07:44:03 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 674B3240027 for ; Fri, 19 Jan 2024 13:43:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705668238; bh=5GDKflyL5tz/YKnC00DVwIUKm+MqFR+sR5jG8fytYsk=; h=MIME-Version:Content-Type:Date:From:To:Subject:Message-ID:From; b=O6/2+CpJ/10aBJy6c1RvWq4GlC+T0suP/Zec6GGNQVELXq/mODE8Q6ApPdjdA0H5E Y13/UKFKAmPxLj5Fiyi0lTKqxWNf0SCiLmnuKu9p36RxK3xJkTaZiS1oRawdAtSmc0 KgVBP74Tl0yRX5s4xlWNz4X8pFX6X0HD/FFrctXYo2bsr5Nb0F25fH1Uz46sc2zTPZ tGgC4cZs6LEsCiXpNAWnPVX7P/Z/b+5sQRjNsVD+25EtYhL9LuvEOF+x5FY4+ZCqYe SElyDczZ71BvryQsqlIaiuNHYDi2bMzYh4bKF8wSQ9LTrqSEnFqGkPp+1D4pgM3wJO JZQ9O0JnWN9hg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGfSF6JlDz9rxB for ; Fri, 19 Jan 2024 13:43:57 +0100 (CET) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_09d085714c50efe5b6b3064639c28db8" Date: Fri, 19 Jan 2024 12:43:57 +0000 From: gerard.vermeulen@posteo.net To: Emacs orgmode Subject: [PATCH] Make command org-babel-detangle work interactively Message-ID: <4e7b198382642ed3572e3fe42e6d1abc@posteo.net> Received-SPF: pass client-ip=185.67.36.65; envelope-from=gerard.vermeulen@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.03 X-Spam-Score: -9.03 X-Migadu-Queue-Id: 53C9E72D0A X-TUID: CW9jFYOQXKO6 --=_09d085714c50efe5b6b3064639c28db8 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi, org-babel-detangle is an interactive command but M-x org-babel-detangle always replies "Detangled 0 code blocks" This patch makes org-babel-detangle prompt for a source code file. Obviously, I got bitten by this. The patch contains (user-error "Source code file does %S not exist" source-code-file) so it may break code that uses org-babel-detangle in a loop. I prefer an user-error, but others may not. Regards -- Gerard --=_09d085714c50efe5b6b3064639c28db8 Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name=0001-Make-command-org-babel-detangle-work-interactively.patch Content-Disposition: attachment; filename=0001-Make-command-org-babel-detangle-work-interactively.patch; size=2877 RnJvbSA3NTQ5MTY1NDUxYjFlY2IxYjdkMmFkN2E5NzE4ZDFhYTk4YWEyOGZlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBHZXJhcmQgVmVybWV1bGVuIDxnZXJhcmQudm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kpCi0gICAgICAocHJvZzEgY291bnRlciAobWVzc2FnZSAiRGV0YW5nbGVk ICVkIGNvZGUgYmxvY2tzIiBjb3VudGVyKSkpKSkKKyAgKHVubGVzcyBzb3VyY2UtY29kZS1maWxl CisgICAgKHNldHEgc291cmNlLWNvZGUtZmlsZSAocmVhZC1maWxlLW5hbWUgIlNvdXJjZSBjb2Rl IGZpbGU6ICIpKSkKKyAgKGlmIChmaWxlLWV4aXN0cy1wIHNvdXJjZS1jb2RlLWZpbGUpCisgICAg ICAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAgKGZpbmQtZmlsZSBzb3VyY2UtY29kZS1maWxlKQor ICAgICAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQorICAgICAgICAobGV0ICgoY291bnRlciAw KSBuZXctYm9keSBlbmQpCisgICAgICAgICAgKHdoaWxlIChyZS1zZWFyY2gtZm9yd2FyZCBvcmct bGluay1icmFja2V0LXJlIG5pbCB0KQorICAgICAgICAgICAgKGlmIChhbmQgKG1hdGNoLXN0cmlu ZyAyKQorCQkgICAgIChyZS1zZWFyY2gtZm9yd2FyZAorCQkgICAgICAoY29uY2F0ICIgIiAocmVn ZXhwLXF1b3RlIChtYXRjaC1zdHJpbmcgMikpICIgZW5kcyBoZXJlIikKKyAgICAgICAgICAgICAg ICAgICAgICBuaWwgdCkpCisJICAgICAgICAocHJvZ24gKHNldHEgZW5kIChtYXRjaC1lbmQgMCkp CisJCSAgICAgICAoZm9yd2FyZC1saW5lIC0xKQorCQkgICAgICAgKHNhdmUtZXhjdXJzaW9uCisJ CSAgICAgICAgICh3aGVuIChzZXRxIG5ldy1ib2R5IChvcmctYmFiZWwtdGFuZ2xlLWp1bXAtdG8t b3JnKSkKKwkJICAgICAgICAgICAob3JnLWJhYmVsLXVwZGF0ZS1ibG9jay1ib2R5IG5ldy1ib2R5 KSkpCisJCSAgICAgICAoc2V0cSBjb3VudGVyICgrIDEgY291bnRlcikpKQorCSAgICAgIChzZXRx IGVuZCAocG9pbnQpKSkKKyAgICAgICAgICAgIChnb3RvLWNoYXIgZW5kKSkKKyAgICAgICAgICAo cHJvZzEgY291bnRlciAobWVzc2FnZSAiRGV0YW5nbGVkICVkIGNvZGUgYmxvY2tzIiBjb3VudGVy KSkpKQorICAgICh1c2VyLWVycm9yICJTb3VyY2UgY29kZSBmaWxlIGRvZXMgJVMgbm90IGV4aXN0 IiBzb3VyY2UtY29kZS1maWxlKSkpCiAKIChkZWZ1biBvcmctYmFiZWwtdGFuZ2xlLWp1bXAtdG8t b3JnICgpCiAgICJKdW1wIGZyb20gYSB0YW5nbGVkIGNvZGUgZmlsZSB0byB0aGUgcmVsYXRlZCBP cmcgbW9kZSBmaWxlLiIKLS0gCjIuNDIuMAoK --=_09d085714c50efe5b6b3064639c28db8--