From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id S8xNNRY0R2H6NgEAgWs5BA (envelope-from ) for ; Sun, 19 Sep 2021 14:59:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CLxvMBY0R2HkCQAAB5/wlQ (envelope-from ) for ; Sun, 19 Sep 2021 12:59:02 +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 307A610B65 for ; Sun, 19 Sep 2021 14:59:02 +0200 (CEST) Received: from localhost ([::1]:51422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRwPM-0001mz-Oc for larch@yhetil.org; Sun, 19 Sep 2021 08:59:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRwOf-0001ml-8S for emacs-orgmode@gnu.org; Sun, 19 Sep 2021 08:58:17 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:41599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRwOb-0004RE-Hj for emacs-orgmode@gnu.org; Sun, 19 Sep 2021 08:58:15 -0400 Received: by mail-pj1-x1029.google.com with SMTP id m21-20020a17090a859500b00197688449c4so10764073pjn.0 for ; Sun, 19 Sep 2021 05:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=bayF7jF/p+u/lhUnlG5+isTXfMxWikTJblTMAjXpCNE=; b=VJUQbV3Q8j/i/3H+wnq7sD9+WK3H2uvOBEuzBm6gv9Wae8n2WHtegzcnb9SaOJVYcV dH2RRrY2tMR+EXNQ0WJg/bzHf7DNVXpOG9BqkZLbFs1Ed7mrSMqXNXac4t6gdfTmD9pT w/yXMVj1tSexb8C3HQjci6r2eTTnz85NCPBhVmSI/AHHpgPRfXCyAp7CXjKOi+o9+AsG kcxRQNH/xSAkNC+Tt+oyvXhQH4U/JTBAXo6MsWvID1QrSx9FgMw7sJ6wX8V4ud4rVtPD v4Zc5qQetV4ADvmj9uIrOrEeIc1CvOrnIhTCdWGqJsHLQ81QLmqysljGY6xyC69Yaz10 eDsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=bayF7jF/p+u/lhUnlG5+isTXfMxWikTJblTMAjXpCNE=; b=Ewi8YcdIFXRkYK9c5/P+MW5ExY8dvU2j3JQNWFStWWPTFIiLLLlh3VxQ+mpHb1VtKX CknG4mKpOltY/14AKcp4n8jBYWwChn1SI/xjcrozJIGcmnss6KFyFbmh/BRHbGte+bbR /a80KKcg968wjX4eVrKXeWILYp2MdhadwZbkssJiy4fxGy4lMljmQ2C9eCsEV0waOV/H cjtqtdJdw9+M6giO34erUdw104RGdrb8IY0vr4oR4LmyXc6GPMt+jKp/6nuuXlUTYXwf F8EvhkaQGXEkMLz0RZ7/R8Ad1ADTnqbi+3/JIGxgMo3Tp8Vp6DkOwLyEIACwySZW4/ge 7C9Q== X-Gm-Message-State: AOAM531/VP0yAYrfx8wfbnmlT7stJOc9PGydLC+Pz1cVx9ESnMomMkrW Ru5LkG8Z3JB7j36PeeE9MU5wWgE47X0= X-Google-Smtp-Source: ABdhPJywtE7hnUXdWyyMKe7xeAL9NDMele3JO9FgMxfLRUSmPyAcBshIbXBrtwAUBf1oONUW3bzrJw== X-Received: by 2002:a17:902:684c:b0:13a:709b:dfaa with SMTP id f12-20020a170902684c00b0013a709bdfaamr18134237pln.61.1632056291646; Sun, 19 Sep 2021 05:58:11 -0700 (PDT) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id g12sm15567025pja.28.2021.09.19.05.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 05:58:10 -0700 (PDT) References: User-agent: mu4e 1.6.5; emacs 28.0.50 From: Timothy To: markgdawson@gmail.com Subject: Re: [PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit buffer Date: Sun, 19 Sep 2021 20:57:40 +0800 In-reply-to: Message-ID: <871r5ken8g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x1029.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@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632056342; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=bayF7jF/p+u/lhUnlG5+isTXfMxWikTJblTMAjXpCNE=; b=Veo9q1NdJrY1p4p4YVOnvSaXlU2W4GxugZRVmOQctBR3HAd13ydW8cQeMBYBwJ+1DfbCCR CbVNbsk7Y8lf+xPfTFq+WmVvf3oV8bOJKzfCkL768RDgQ2ZalS5PV0uq24PjuZlt0Xrg8b HZYnX3Xnqdtxo45P2Cs7S/L2/YFDZ1bB3o59NMhLNHWVLe4l18jM5Xk49oRzEDy7Lfu7l2 znKzK1V67k3TRsLgWTIKbzrGkBg3LCNkOPR2Zh8z/B0w0/raWH8rXEZR6wp5yr2nxtub55 pIm21jG8CVVn6Ws+FJ7ne/rJGVSzFzEbB+NFKArTT8/x88BCoJtcwM/EAvFZhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632056342; a=rsa-sha256; cv=none; b=p46GWu3NmjsF2NkFHjgrzx7RImPZPMVcJNHj1rFxC0B0qFGKwgmKHnZoJOd3w6/2M+xU4K z+hQCTEVrT2JseXI4ZZnL96KVBQ8j5ZIfsgiGB2w3MaBK+E7SfasZyWgFhfEO+EVBS6wyU VO9vCr+EOUUnXEmqxOIOUP8/nrodmFgqvJqB6LDgpmYfUmOLWBG1+TEhDCUq0p3EhoNXtO Ae6p/IAjv3UhSGz9uv6yxAHlzMuDPIIkEZv6T3u2UMVWQ8l0IQ6pR4znDE2SEfsgbABN6D zFhIp4o+D6jAdVVUa1XpGKeh1CKxTts7/Vm0ryhbdIKSJfd+SRvzqUre7rIysQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VJUQbV3Q; 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-Migadu-Spam-Score: -3.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VJUQbV3Q; 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-Migadu-Queue-Id: 307A610B65 X-Spam-Score: -3.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: FVAi/DqJg7j6 Hi Mark, Many thanks for not only tracking down this problem but making a fix and submitting it =F0=9F=99=82. I've just pushed this as 986341b with minor twe= aks to the commit message. Mark Dawson writes: > [PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit > buffer > > (org-babel-tangle) : Fix stringp error which happens when confirming > successful tangle when `org-babel-tangle` is called from an org-src edit > buffer. > > TINYCHANGE > --- > lisp/ob-tangle.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el > index 2f60ef9a4..0768c8588 100644 > --- a/lisp/ob-tangle.el > +++ b/lisp/ob-tangle.el > @@ -281,7 +281,10 @@ matching a regular expression." > (if (=3D block-counter 1) "" "s") > (file-name-nondirectory > (buffer-file-name > - (or (buffer-base-buffer) (current-buffer))))) > + (or (buffer-base-buffer) > + (current-buffer) > + (and (org-src-edit-buffer-p) > + (org-src-source-buffer)))))) > ;; run `org-babel-post-tangle-hook' in all tangled files > (when org-babel-post-tangle-hook > (mapc -- Timothy