From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id STqID+JSUV+VLgAA0tVLHw (envelope-from ) for ; Thu, 03 Sep 2020 20:32:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OHPMCuJSUV8TDwAAB5/wlQ (envelope-from ) for ; Thu, 03 Sep 2020 20:32:34 +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 56993940538 for ; Thu, 3 Sep 2020 20:32:33 +0000 (UTC) Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDvuK-0003vl-31 for larch@yhetil.org; Thu, 03 Sep 2020 16:32:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDvts-0003vO-4X for emacs-orgmode@gnu.org; Thu, 03 Sep 2020 16:32:04 -0400 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:39090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDvtp-0002fj-5i for emacs-orgmode@gnu.org; Thu, 03 Sep 2020 16:32:03 -0400 Received: by mail-qk1-x72f.google.com with SMTP id w12so4383675qki.6 for ; Thu, 03 Sep 2020 13:32:00 -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; bh=vZTzfgcSvj3Fob6UMaO1KVYiBD3i5u5Az1ooKC90Rhg=; b=nKBkqDCTOUJYEqWjCvFAFYp4OxjGckcYmeqChH2FutntiZ5yVU+kgZg/cxftbVSpnk s0OWeQx5qjggWBRN9R+XpgUsKujEsZBN9cqdK6Mv4HRoDTH/GDhf7RAjENX2s1UCwnyf duhPWYcaMjNGnv0xVooe1ku13q2PzvFIo7345rrhMmRvZDavazQMmfuFDaO1Z08aiXGM kxE6cWzETWNMHn/GYVydm7isna+Lo+v5FUzemrs88Cz1Y7hmD81XIsDaOAhrf+VWGtbc X6XsdCBrRvziqEKpn4Nc/Cn03XIDZJqRawSlE8et+nxLlFKWSewh7/ZIF4YND/oUBeqT yigA== 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; bh=vZTzfgcSvj3Fob6UMaO1KVYiBD3i5u5Az1ooKC90Rhg=; b=DvqIXF1CRl94GvmYEnicTD2Z1h/gHbV1ZkJ6xpZqheKCldqbw613ChZ7p+XbeVEnqE 6GWGJ2Qyg4TZ6dSOIxCv89H/LuTEzvzdeZdhP+jhS9ZO4oMTrdBqTSZy5IsUjzdro+fZ M1HW/bMShXtPhIWwyAuNSOJX5cFTSKRw12Xfx6ARFd7gE3vtTChY4AuK2E+zN5axO5X9 EPj3+GY1MiMF7iMLFvjYjzzxodgZL2Wdb0HyqDAjpv9X2l53KsOBwjxHx0e7gvyi3x+w s7gbBIRhf8uBrw+3k0S4ZJ1io9gBLIa+LuCawTiFuES37SPzE57F8+h9lVDgRnIZJAWB 5siw== X-Gm-Message-State: AOAM530LG+/H+zHM1WM+Ij+TdHaC3tJZXKY9/Q6UWYpphml23YG4you6 G4GyJURayT+5rYzoeB4TFJIENrDFB58lsYq4Ag== X-Google-Smtp-Source: ABdhPJzsQTMZ0S5CL0+RgU1DIW+emToWnVQpkMfcgoV6afAnNljhbdsAb7PUucvEh4WH5tUHmZgzM7zWC3D5xsoMdwk= X-Received: by 2002:a37:4a94:: with SMTP id x142mr4718118qka.27.1599165120068; Thu, 03 Sep 2020 13:32:00 -0700 (PDT) MIME-Version: 1.0 References: <72B34378-D53B-4A76-95D1-B6903EE38C26@health.ucsd.edu> In-Reply-To: <72B34378-D53B-4A76-95D1-B6903EE38C26@health.ucsd.edu> From: Enze Chi Date: Fri, 4 Sep 2020 06:31:23 +1000 Message-ID: Subject: Re: Bug: Source blocks before first ":tangle yes" are not tangled to file [9.4 (nil @ /Users/ezchi/.emacs.d/.local/straight/build/org-mode/)] To: "Berry, Charles" Content-Type: multipart/alternative; boundary="000000000000eb40c005ae6ea40b" Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=enze.chi@gmail.com; helo=mail-qk1-x72f.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, HTML_MESSAGE=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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nKBkqDCT; 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: -0.71 X-TUID: mn39vDGMRhcK --000000000000eb40c005ae6ea40b Content-Type: text/plain; charset="UTF-8" Hi Charles: Thanks for the clear explanation. Add default ":tangle yes" does what I expected. But when I try to tangle it to a file like this (with default ":tangle no"): (org-babel-tangle nil "foo.el") I end up get 2 files: foo.el: (setq foo "hello") test_tangle.el: (setq bar "world") Should I expect only: foo.el: (setq bar "world") On Fri, Sep 4, 2020 at 3:10 AM Berry, Charles wrote: > Not a bug. See inline. > > > On Sep 3, 2020, at 12:37 AM, Enze Chi wrote: > > > > > > Remember to cover the basics, that is, what you expected to happen and > > what in fact did happen. You don't know how to make a good report? See > > > > https://orgmode.org/manual/Feedback.html#Feedback > > > > Your bug report will be posted to the Org mailing list. > > ------------------------------------------------------------------------ > > > > I have a org file like this (test_tangle.org): > > > > #+begin_src emacs-lisp > > (setq foo "hello") ; > > #+end_src > > > > There was no :tangle header arg specified for this block. Hence it is > never tangled. I believe this is well documented in the manual. > > Running `org-babel-view-src-block-info' (C-c C-v C-i) with point in the > src block will confirm this this by listing the header args including > `:tangle no' > > If you want all src blocks to be tangled, you should study > > (info "(org) Using Header Arguments") > > to set a system-wide or buffer wide default. > > HTH, > > Chuck > > > > #+begin_src emacs-lisp :tangle yes > > (setq bar "world") > > #+end_src > > > > > > After I run "(org-babel-tangle nil nil)" > > > > I expect both of them are tangled to "test_tangle.el": > > > > (setq foo "hello") > > (setq bar "world") > > > > > > But I only got: > > > > (setq bar "world") > > > > > > > > Emacs : GNU Emacs 27.1.50 (build 1, x86_64-apple-darwin19.6.0, NS > appkit-1894.60 Version 10.15.6 (Build 19G73)) > > of 2020-08-14 > > Package: Org mode version 9.4 (nil @ > /Users/ezchi/.emacs.d/.local/straight/build/org-mode/) > > > > current state: > > ============== > > (setq > > org-src-mode-hook '(org-src-babel-configure-edit-buffer > > org-src-mode-configure-edit-buffer) > > org-link-shell-confirm-function 'yes-or-no-p > > org-metadown-hook '(org-babel-pop-to-session-maybe) > > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) > > org-mode-hook '(#[0 "\300\301\302\303\304$\207" > > [add-hook change-major-mode-hook org-show-all append local] > > 5] > > #[0 "\300\301\302\303\304$\207" > > [add-hook change-major-mode-hook org-babel-show-result-all > > append local] > > 5] > > org-babel-result-hide-spec org-babel-hide-all-hashes) > > org-archive-hook '(org-attach-archive-delete-maybe) > > org-confirm-elisp-link-function 'yes-or-no-p > > org-agenda-before-write-hook '(org-agenda-add-entry-text) > > org-metaup-hook '(org-babel-load-in-session-maybe) > > org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 > "\n\n(fn ENTRY)"] > > org-babel-pre-tangle-hook '(save-buffer) > > org-tab-first-hook '(org-babel-hide-result-toggle-maybe > > org-babel-header-arg-expand) > > org-agenda-loop-over-headlines-in-active-region nil > > org-occur-hook '(org-first-headline-recenter) > > org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers > > org-cycle-show-empty-lines > > org-optimize-window-after-visibility-change) > > org-speed-command-hook '(org-speed-command-activate > > org-babel-speed-command-activate) > > org-export-before-parsing-hook '(org-attach-expand-links) > > org-confirm-shell-link-function 'yes-or-no-p > > org-link-parameters '(("attachment" :follow org-attach-follow :complete > > org-attach-complete-link) > > ("id" :follow org-id-open) > > ("eww" :follow org-eww-open :store org-eww-store-link) > > ("rmail" :follow org-rmail-open :store > > org-rmail-store-link) > > ("mhe" :follow org-mhe-open :store org-mhe-store-link) > > ("irc" :follow org-irc-visit :store org-irc-store-link > > :export org-irc-export) > > ("info" :follow org-info-open :export org-info-export > > :store org-info-store-link) > > ("gnus" :follow org-gnus-open :store > > org-gnus-store-link) > > ("docview" :follow org-docview-open :export > > org-docview-export :store org-docview-store-link) > > ("bibtex" :follow org-bibtex-open :store > > org-bibtex-store-link) > > ("bbdb" :follow org-bbdb-open :export org-bbdb-export > > :complete org-bbdb-complete-link :store > > org-bbdb-store-link) > > ("w3m" :store org-w3m-store-link) ("file+sys") > > ("file+emacs") ("shell" :follow org-link--open-shell) > > ("news" :follow > > #[514 "\301\300\302Q\"\207" > > ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] > > ) > > ("mailto" :follow > > #[514 "\301\300\302Q\"\207" > > ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] > > ) > > ("https" :follow > > #[514 "\301\300\302Q\"\207" > > ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] > > ) > > ("http" :follow > > #[514 "\301\300\302Q\"\207" > > ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] > > ) > > ("ftp" :follow > > #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] > > 6 "\n\n(fn URL ARG)"] > > ) > > ("help" :follow org-link--open-help) > > ("file" :complete org-link-complete-file) > > ("elisp" :follow org-link--open-elisp) > > ("doi" :follow org-link--open-doi)) > > org-link-elisp-confirm-function 'yes-or-no-p > > ) > > > > > --000000000000eb40c005ae6ea40b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Charles:

Thank= s for the clear explanation. Add default ":tangle yes" does what = I expected.=C2=A0

But when I try to tangle it to a= file like this (with default ":tangle no"):
(org-babel= -tangle nil "foo.el")

I end up get 2 fil= es:
foo.el:
(setq foo "hello")

=
test_tangle.el:
(setq bar "world")

Should I expect only:
foo.el:
(setq bar= "world")



On Fri, Sep 4, 2020 = at 3:10 AM Berry, Charles <cc= berry@health.ucsd.edu> wrote:
Not a bug. See inline.

> On Sep 3, 2020, at 12:37 AM, Enze Chi <enze.chi@gmail.com> wrote:
>
>
> Remember to cover the basics, that is, what you expected to happen and=
> what in fact did happen.=C2=A0 You don't know how to make a good r= eport?=C2=A0 See
>
>=C2=A0 =C2=A0 =C2=A0 https://orgmode.org/manual= /Feedback.html#Feedback
>
> Your bug report will be posted to the Org mailing list.
> ----------------------------------------------------------------------= --
>
> I have a org file like this (test_tangle.org):
>
> #+begin_src emacs-lisp
>=C2=A0 =C2=A0(setq foo "hello") ;
> #+end_src
>

There was no :tangle header arg specified for this block. Hence it is never= tangled.=C2=A0 I believe this is well documented in the manual.

Running `org-babel-view-src-block-info' (C-c C-v C-i) with point in the= src block will confirm this this by listing the header args including `:ta= ngle no'

If you want all src blocks to be tangled, you should study

(info "(org) Using Header Arguments")

to set a system-wide or buffer wide default.

HTH,

Chuck


> #+begin_src emacs-lisp :tangle yes
>=C2=A0 =C2=A0(setq bar "world")
> #+end_src
>
>
> After I run "(org-babel-tangle nil nil)"
>
> I expect both of them are tangled to "test_tangle.el":
>
> (setq foo "hello")
> (setq bar "world")
>
>
> But I only got:
>
> (setq bar "world")
>
>
>
> Emacs=C2=A0 : GNU Emacs 27.1.50 (build 1, x86_64-apple-darwin19.6.0, N= S appkit-1894.60 Version 10.15.6 (Build 19G73))
>=C2=A0 of 2020-08-14
> Package: Org mode version 9.4 (nil @ /Users/ezchi/.emacs.d/.local/stra= ight/build/org-mode/)
>
> current state:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> (setq
>=C2=A0 org-src-mode-hook '(org-src-babel-configure-edit-buffer
>=C2=A0 =C2=A0 =C2=A0org-src-mode-configure-edit-buffer)
>=C2=A0 org-link-shell-confirm-function 'yes-or-no-p
>=C2=A0 org-metadown-hook '(org-babel-pop-to-session-maybe)
>=C2=A0 org-clock-out-hook '(org-clock-remove-empty-clock-drawer) >=C2=A0 org-mode-hook '(#[0 "\300\301\302\303\304$\207" >=C2=A0 =C2=A0[add-hook change-major-mode-hook org-show-all append local= ]
>=C2=A0 =C2=A05]
> #[0 "\300\301\302\303\304$\207"
>=C2=A0 =C2=A0[add-hook change-major-mode-hook org-babel-show-result-all=
>=C2=A0 =C2=A0 append local]
>=C2=A0 =C2=A05]
> org-babel-result-hide-spec org-babel-hide-all-hashes)
>=C2=A0 org-archive-hook '(org-attach-archive-delete-maybe)
>=C2=A0 org-confirm-elisp-link-function 'yes-or-no-p
>=C2=A0 org-agenda-before-write-hook '(org-agenda-add-entry-text) >=C2=A0 org-metaup-hook '(org-babel-load-in-session-maybe)
>=C2=A0 org-bibtex-headline-format-function #[257 "\300\236A\207&qu= ot; [:title] 3 "\n\n(fn ENTRY)"]
>=C2=A0 org-babel-pre-tangle-hook '(save-buffer)
>=C2=A0 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>=C2=A0 =C2=A0 =C2=A0 org-babel-header-arg-expand)
>=C2=A0 org-agenda-loop-over-headlines-in-active-region nil
>=C2=A0 org-occur-hook '(org-first-headline-recenter)
>=C2=A0 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-= hide-drawers
>=C2=A0 org-cycle-show-empty-lines
>=C2=A0 org-optimize-window-after-visibility-change)
>=C2=A0 org-speed-command-hook '(org-speed-command-activate
>=C2=A0 org-babel-speed-command-activate)
>=C2=A0 org-export-before-parsing-hook '(org-attach-expand-links) >=C2=A0 org-confirm-shell-link-function 'yes-or-no-p
>=C2=A0 org-link-parameters '(("attachment" :follow org-at= tach-follow :complete
> org-attach-complete-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("id" :follow org-id-open)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("eww" :follow org-eww-open :store= org-eww-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("rmail" :follow org-rmail-open :s= tore
> org-rmail-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("mhe" :follow org-mhe-open :store= org-mhe-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("irc" :follow org-irc-visit :stor= e org-irc-store-link
> :export org-irc-export)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("info" :follow org-info-open :exp= ort org-info-export
> :store org-info-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("gnus" :follow org-gnus-open :sto= re
> org-gnus-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("docview" :follow org-docview-ope= n :export
> org-docview-export :store org-docview-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("bibtex" :follow org-bibtex-open = :store
> org-bibtex-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("bbdb" :follow org-bbdb-open :exp= ort org-bbdb-export
> :complete org-bbdb-complete-link :store
> org-bbdb-store-link)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("w3m" :store org-w3m-store-link) = ("file+sys")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("file+emacs") ("shell" = :follow org-link--open-shell)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("news" :follow
> #[514 "\301\300\302Q\"\207"
>=C2=A0 ["news" browse-url ":"] 6 "\n\n(fn URL = ARG)"]
> )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("mailto" :follow
> #[514 "\301\300\302Q\"\207"
>=C2=A0 ["mailto" browse-url ":"] 6 "\n\n(fn UR= L ARG)"]
> )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("https" :follow
> #[514 "\301\300\302Q\"\207"
>=C2=A0 ["https" browse-url ":"] 6 "\n\n(fn URL= ARG)"]
> )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("http" :follow
> #[514 "\301\300\302Q\"\207"
>=C2=A0 ["http" browse-url ":"] 6 "\n\n(fn URL = ARG)"]
> )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("ftp" :follow
> #[514 "\301\300\302Q\"\207" ["ftp" browse-url= ":"]
>=C2=A0 6 "\n\n(fn URL ARG)"]
> )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("help" :follow org-link--open-hel= p)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("file" :complete org-link-complet= e-file)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("elisp" :follow org-link--open-el= isp)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0("doi" :follow org-link--open-doi)= )
>=C2=A0 org-link-elisp-confirm-function 'yes-or-no-p
>=C2=A0 )
>


--000000000000eb40c005ae6ea40b--