GNU bug report logs - #50218
28.0.50; org-babel-tangle-file tangles code blocks starting with #+begin_src :tangle no

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: org-mode; Reported by: Tassilo Neubauer <tassilo.neubauer@HIDDEN>; dated Thu, 26 Aug 2021 23:06:01 UTC; Maintainer for org-mode is emacs-orgmode@HIDDEN.

Message received at 50218 <at> debbugs.gnu.org:


Received: (at 50218) by debbugs.gnu.org; 18 Dec 2021 22:16:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 18 17:16:57 2021
Received: from localhost ([127.0.0.1]:44343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myi0e-0006yg-TT
	for submit <at> debbugs.gnu.org; Sat, 18 Dec 2021 17:16:57 -0500
Received: from out2.migadu.com ([188.165.223.204]:22277)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kyle@HIDDEN>) id 1myi0b-0006yX-Qb
 for 50218 <at> debbugs.gnu.org; Sat, 18 Dec 2021 17:16:55 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1;
 t=1639865812;
 h=from:from: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;
 bh=+1NmAsn6Rfs8pCXg652HLkarhBb7eHdGvbYudouVaEg=;
 b=yKHZZunFAKEKiEVPaxwn/Q7l+lI/8ThwWxQWmtCsyOFFttAbFdYZ/aikwPiNGbzJZkAXD5
 Dc7lrAKWXK1AYNQnUAR58W+Z93sksr53dX2dzIE2s1xDwrOG1o7641ycOH1wDJKYK2y9XZ
 l69pCDBCWdorLXX58OREndva048QFYOaam1tfc9YurSVQNIN+vdMP3V16UvxHN3s43jUXw
 TuXsjMInzsRDJlq+7di/EPrvw5dNJYJNbSJeqQ62uW/V5DfQOA6pUSS/HS7dNIgOcTtc1r
 luRbEbT+xY6omljPqg58+fOD7jFaFl01auQrgb3e724kOt0Sr/j6+sCldLvUgw==
From: Kyle Meyer <kyle@HIDDEN>
To: Tassilo Neubauer <tassilo.neubauer@HIDDEN>
Subject: Re: bug#50218: 28.0.50; org-babel-tangle-file tangles code blocks
 starting with #+begin_src :tangle no
In-Reply-To: <9d143449-d2db-179b-24da-b4e4d6a33319@HIDDEN>
References: <9d143449-d2db-179b-24da-b4e4d6a33319@HIDDEN>
Date: Sat, 18 Dec 2021 17:16:50 -0500
Message-ID: <875yrla78t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: kyleam.com
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50218
Cc: 50218 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Tassilo Neubauer writes:

> Hello,
>
> Here are the steps that led to code blocks being tangled I did not 
> expect to:
>
> emacs -Q
> C-x C-h: ~/org-roam/example.org
> content of example.org (excluding "):
> "
> #+begin_src emacs-lisp
> (setq some-emacs-lisp-variable t)
> #+end_src
>
> #+begin_src :tangle no
> ;;This line should not be in the elisp code
> #+end_src
> "

(Sorry for the delayed reply.  This message, unlike the initial post,
will be redirected to the Org list, where you're more likely to get a
response.)

Org sees the last block above as a source block of language ":tangle".
Here's what org-element-at-point reports:

  (src-block (:language ":tangle" :switches nil :parameters "yes"...)

org-lint will complain about this block:

     2 nil   Missing colon in header argument "yes"

And, were you to use a bare source block (i.e. drop ":tangle no"), it
would complain about a missing language:

     2 nil   Missing language in source block

So, I think the source block is mis-specified, and I'm not sure there's
much that Org should do here, but perhaps others will chime in with
their thoughts.




Information forwarded to emacs-orgmode@HIDDEN:
bug#50218; Package org-mode. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Aug 2021 23:05:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 19:05:19 2021
Received: from localhost ([127.0.0.1]:50743 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJOQw-0003aY-Gz
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 19:05:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:44952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tassilo.neubauer@HIDDEN>) id 1mJOF8-0003IX-3O
 for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 18:53:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36546)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tassilo.neubauer@HIDDEN>)
 id 1mJOF7-00089B-Rc
 for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2021 18:53:05 -0400
Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36539)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tassilo.neubauer@HIDDEN>)
 id 1mJOF5-0005OW-Pw
 for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2021 18:53:05 -0400
Received: by mail-wm1-x32b.google.com with SMTP id
 79-20020a1c0452000000b002e6cf79e572so7937827wme.1
 for <bug-gnu-emacs@HIDDEN>; Thu, 26 Aug 2021 15:53:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:subject:from:message-id:date:user-agent:mime-version
 :content-transfer-encoding:content-language;
 bh=mF1oHYqChPqKXMWhaEmyE0XjdW0cBdzQ3bfQNiYDV0o=;
 b=MZZKEqf3l9G8gPW0NxJYTqY5XUjZcX40MBhN33mxpyf2wTsOMfiWwJfuOhsbubVTLr
 rcp69iobNTl6Wk4sFTzBjDaorEJpPkEfUGcFrz8eEsimnAxOHxUvTfkirwFtSb6A0G6A
 ZKs1ygjEtK90DviOnPpNFWhlWpB9hjccF/bYsvjjcN8Q96asfesPT5sE85fB32ITk89u
 gE8+p0wTK9SZqI8scDi8sN8uLJEdNUb1cCXbdBz1LMyHidzgHFwmtPBzxg4Y5Zej7hIC
 Zpv3LAsk6OVZHW38UE3B7q6V6JZ7eH0VV28SSIDhaXD86bt+QHbWYtywHWp/Urq06uhw
 /3RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:subject:from:message-id:date:user-agent
 :mime-version:content-transfer-encoding:content-language;
 bh=mF1oHYqChPqKXMWhaEmyE0XjdW0cBdzQ3bfQNiYDV0o=;
 b=FfT/51bEWSPXbsTskg9jOC9S++Ka2L0I8yqUJU5kLz9OgHeopn0PzorpaoHhS9bsJc
 7BmuAHqEl0vDbc5I+yC9eOUMTP5OP0vJd8spa13VvcjYz11Cv5IJ9ZwZZ8A5D1NxD/E9
 RahsdzsPzJsmtPfUXblNRYKcOhuVnmVRYq6BRf50nCUfwm1C+9cIQ0nrVEfmPo6UgVCv
 EUcW+hfjxNNkVsMXz2t9BFz41y12jd5XaJ/PAsuWm61iCQaq+OtZ7EkWDOYMEYoJx8NH
 RpXbOvrOFcQB8U/vF33Ja9Xj7qh6vv9mtjoe6s6d+sD/v9jXoe00lMq4H7sjKxKI4LK2
 L0Hw==
X-Gm-Message-State: AOAM532vYl0ycKuaHTyu1RQJ8nSgPZOsZpbzt/rrIwGRSHpo52qU8wR7
 /czK2fiYPo+h/mkJcIXy6NwycsO6nEAXGQ==
X-Google-Smtp-Source: ABdhPJxTOLpMmcks4fX3dOfrWcd/NX0L1tjsb4j6nLpGVTgEfnn8cdYjcSWdLWVOMnd4oQ/luxdl1Q==
X-Received: by 2002:a7b:c246:: with SMTP id b6mr16254441wmj.37.1630018381110; 
 Thu, 26 Aug 2021 15:53:01 -0700 (PDT)
Received: from ?IPv6:2001:7c7:20f2:8047:5682:ef6f:3451:6b38?
 ([2001:7c7:20f2:8047:5682:ef6f:3451:6b38])
 by smtp.gmail.com with ESMTPSA id o5sm2666466wra.3.2021.08.26.15.53.00
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 26 Aug 2021 15:53:00 -0700 (PDT)
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; org-babel-tangle-file tangles code blocks starting with
 #+begin_src :tangle no
From: Tassilo Neubauer <tassilo.neubauer@HIDDEN>
Message-ID: <9d143449-d2db-179b-24da-b4e4d6a33319@HIDDEN>
Date: Fri, 27 Aug 2021 00:53:00 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Received-SPF: pass client-ip=2a00:1450:4864:20::32b;
 envelope-from=tassilo.neubauer@HIDDEN; helo=mail-wm1-x32b.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-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 26 Aug 2021 19:05:17 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

Here are the steps that led to code blocks being tangled I did not 
expect to:

emacs -Q
C-x C-h: ~/org-roam/example.org
content of example.org (excluding "):
"
#+begin_src emacs-lisp
(setq some-emacs-lisp-variable t)
#+end_src

#+begin_src :tangle no
;;This line should not be in the elisp code
#+end_src
"

open scratch buffer through menu.
type into scratch buffer:
(org-bable-tangle-file "/home/tassilo/org-roam/example.org"
"/home/tassilo/org-roam/example.el")
M-x:emacs-lisp-mode
Select (with mouse) the above line and evaluate region through menu.
I see in the minibuffer: "Tangled 2 code blocks from example.org"
After typing C-h C-f: ~/org-roam/example.el
I see the file content of "example.el" (excluding "):
"
(setq some-emacs-lisp-variable t)

;;This line should not be in the elisp code

"

This is not what I expected. I would have expected that the code block
with ":tangle no" added would not be tangled. That is how I understood
this section of the org-manual:
(https://orgmode.org/manual/Extracting-Source-Code.html)
"The ‘tangle’ header argument specifies if the code block is exported to
source file(s). [...] 'no' The default. Do not extract the code in a
source code file. Example: ‘:tangle no’."

For more details see content of the dribble file:

org-roam/ex<tab>ample.org<return><help-echo><help-echo><help-echo><menu-bar><buffer><down-mouse-1><mouse-1><down-mouse-3><mouse-3>(org-babl<backspace>el--<backspace>tangle-file 
"/home<tab><tab>/tassilo/org-roam/example.org" 
"/home/tassilo/org-roam/example.el")<down-mouse-1><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><drag-mouse-1><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><down-mouse-1><mouse-1> 
0x8000078emacs-lisp-mode<return><down-mouse-1><down-mouse-1><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><mouse-movement><drag-mouse-1><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><emacs-lisp><Evaluate 
Region><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo>org-o<backspace>roam/ex<tab>ample.el<return><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><file><kill-buffer><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><file><exit-emacs>%



In GNU Emacs 28.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 
3.24.25, cairo version 1.16.0)
of 2021-08-08 built on pop-os
Repository revision: adab672edb3fad0851a52e3b6ccf3ac31c80b025
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Pop!_OS 21.04

Configured using:
'configure --with-native-compilation --with-json'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3
ZLIB

Important settings:
value of $LC_MONETARY: de_DE.UTF-8
value of $LC_NUMERIC: de_DE.UTF-8
value of $LC_TIME: de_DE.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs
password-cache json map text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra
help-mode seq byte-opt gv cl-loaddefs cl-lib bytecomp byte-compile cconv
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 87654 11639)
(symbols 48 7815 1)
(strings 32 21574 2637)
(string-bytes 1 739489)
(vectors 16 16598)
(vector-slots 8 275849 15130)
(floats 8 28 33)
(intervals 56 476 0)
(buffers 992 12))


Cheers,

Tassilo





Acknowledgement sent to Tassilo Neubauer <tassilo.neubauer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50218; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 18 Dec 2021 22:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.