From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 4PcEGZ25q2X5uAAAqHPOHw:P1 (envelope-from ) for ; Sat, 20 Jan 2024 13:16:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4PcEGZ25q2X5uAAAqHPOHw (envelope-from ) for ; Sat, 20 Jan 2024 13:16:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EdCtM2Ts; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705752989; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KZmuonjq6pudhEhi8gMfrX+rTysGhQngPMEXkCIx/ys=; b=A5DoBreS+v6a7nwnK7yWjTKAY5dBECoiBKcOSY9STJUkUTBwm2tODK3F1dzq9/PwfHteZo PalrVYQ4hCKWMM+/xTa0TO4er9g7ZBTEofX/hb1GtkIPHwSxofvqmvaeuObGa2ekEYUf+0 y8mD2n2pxZW9C4cRh7yxPdKj3HiFg2QbG2PPE5JTKgsn8Wny7FJLAeDTR3EljtsKa98oYF CeY1VPXUL6tVRdyFx+1DFLAHGG64GYAJODiDNQHUwx3hrG2JVT9CfMCguOK40pD1ziV4cp WR+h8uhD1e/pKy1VSTVQYK98zq9rysiHGBvP9onQClsE0fGAYBcmsra98hIOMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EdCtM2Ts; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705752989; a=rsa-sha256; cv=none; b=miGWl4Pvii/3HW4dNp7GG+XCTkct0PkT9LGIHs/A7XKhA64FIwokb/QMcMbzsulT40oUF9 OxyNg06oL8rOGBHulOMx8/aVkdQCainWI8jZurmO8aZ9UTQA7PDSK6CWSMyTozzk34TmCa EVkfxn7cERGOzIo9KSQxTueBMGZsjqxMUlRxqYshSWKMkPTZEHFOuy4mzImL56qlO9QY/i d+cRjnbl1kszy7DN6uQtNIFBI4OX5q06dbB4RIO0wEFXQSRDUdVnicCy7e5zInZCZS+Dr8 E4NWIo0gQD8gIRFHAUyA8Has3u/grBuf/sYd/chXNn0HgFMKjR3ekW3YVg6qRw== 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 84AC068B1D for ; Sat, 20 Jan 2024 13:16:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRAFy-0004nM-D0; Sat, 20 Jan 2024 07:15:26 -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 1rRAFw-0004mh-RB for emacs-orgmode@gnu.org; Sat, 20 Jan 2024 07:15:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRAFt-0003kT-Vd for emacs-orgmode@gnu.org; Sat, 20 Jan 2024 07:15:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 17651240104 for ; Sat, 20 Jan 2024 13:15:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705752917; bh=2rm8HQ9nCZlvfDCAj10TmUS1TGFn07VsqR3aMpW0O3Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=EdCtM2TsOF59nsGecjA066KSmzt2FGGTptPVBjAF9fFhGTmoAfJXHdJF3tuxC8CWL sIMVWPknKD6Q9NC7amGzQXifL8+k6aeegcysy+5t6UXoDPsmHjA9iW98jd+RNsDL3c dyC/YmcVF3dKwfPc1TXYgx8r387I6D4zDlTXQQvFHFS3UqzNNO1vG2u/Mo0c1SbCjz p6Av4LeKU2yrkNNdN3D0CexxFzolRcQTPdBqYlczQmnGmXpAzefHonO8JlNvrK+ZvB 0gAlxdIa22pTniCl8NMtjhikx14//54Auf7QZQbmlpr0jvhzVkN01M7vmPCGAZ2q4j wrOvnBOSGMR6Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4THFmh2bSbz6tvl; Sat, 20 Jan 2024 13:15:16 +0100 (CET) From: Ihor Radchenko To: gerard.vermeulen@posteo.net Cc: Emacs orgmode Subject: Re: [PATCH] Make command org-babel-detangle work interactively In-Reply-To: References: <4e7b198382642ed3572e3fe42e6d1abc@posteo.net> <877ck573jh.fsf@localhost> Date: Sat, 20 Jan 2024 12:18:29 +0000 Message-ID: <874jf86vvu.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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-Spam-Score: -9.89 X-Migadu-Queue-Id: 84AC068B1D X-Spam-Score: -9.89 X-Migadu-Scanner: mx11.migadu.com X-TUID: K9kFd5+QREnn --=-=-= Content-Type: text/plain gerard.vermeulen@posteo.net writes: >> I suspect that you may have some misunderstanding about how >> `org-babel-detangle' works. Its docstring says: >> >> Propagate changes in source file back original to Org file. >> >> So, it is expected to run from the tangled file; not from the Org file. > > Yes, I misunderstood this and I see that my patch breaks this. > > I think there is a typo in the docstring: "original to" must become "to > original" > so that it ends with "back to original Org file". How about the attached patch? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-ob-tangle.el-org-babel-detangle-Improve-docstri.patch >From 65c8ac3bb1a148106b5673d247ecaaddad291704 Mon Sep 17 00:00:00 2001 Message-ID: <65c8ac3bb1a148106b5673d247ecaaddad291704.1705753074.git.yantar92@posteo.net> From: Ihor Radchenko Date: Sat, 20 Jan 2024 13:17:43 +0100 Subject: [PATCH] lisp/ob-tangle.el (org-babel-detangle): Improve docstring --- lisp/ob-tangle.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 933a3eba1..f9953ebed 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -618,9 +618,12 @@ (defun org-babel-tangle-comment-links (&optional info) ;; de-tangling functions (defun org-babel-detangle (&optional source-code-file) - "Propagate changes in source file back original to Org file. + "Propagate changes from current file back to the original Org file. This requires that code blocks were tangled with link comments -which enable the original code blocks to be found." +which enable the original code blocks to be found. + +SOURCE-CODE-FILE is the file path to be used instead of current +buffer." (interactive) (save-excursion (when source-code-file (find-file source-code-file)) -- 2.43.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--