From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uG5bN4ILsWSDDQEASxT56A (envelope-from ) for ; Fri, 14 Jul 2023 10:46:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cFQON4ILsWSxBAEAauVa8A (envelope-from ) for ; Fri, 14 Jul 2023 10:46:58 +0200 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 B414B35F80 for ; Fri, 14 Jul 2023 10:46:58 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKEQL-0006Yf-1I; Fri, 14 Jul 2023 04:45:13 -0400 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 1qKEQJ-0006XS-9K for emacs-orgmode@gnu.org; Fri, 14 Jul 2023 04:45:11 -0400 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 1qKEQH-0004Xk-1b for emacs-orgmode@gnu.org; Fri, 14 Jul 2023 04:45:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2F5BB240104 for ; Fri, 14 Jul 2023 10:45:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689324306; bh=d0gfHQdwydoFESj+07yR81oCTQ7lmXZJYBNORBeIOFc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=laDoS1y4D9Bkq7AqGDFflNyVcK/cjkjZCAKwyvRZBHuBN42DelQV2kEnQJIQXGJkM v0/2ToVa2+tHRNTG7mNg6Ci5g/Kz+UsLdfsn/SOrDGf8sLWZjWcBBOg/iZ8z0FhVx7 fd5WWHzhjRB78AmavndrjEQU7eHF1xb6tueAr5ASG22Y7YB5ENc5QQjptnwqNSA5o/ VQvPpN9P28wEi+5TPJzLRyLaZmj4nbwnFUfLLIR0eUxg7xievKfjcW4yEaSCqsKwg0 dB02CIOEae5gfbtSLFls20vxRt0iX3GiLBGnuP78Jnygb6CuNOEfWSNGy4Kx8InaSh C+eJFp1NSUGKg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R2Q5s19z7z6tyx; Fri, 14 Jul 2023 10:45:05 +0200 (CEST) From: Ihor Radchenko To: Evgenii Klimov Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] ob-tangle.el: Blocks overwrite each other when grouping before tangling In-Reply-To: <87cz0wcbtt.fsf@lipklim.org> References: <87lefkd9tb.fsf@lipklim.org> <87h6q8d9lz.fsf@lipklim.org> <87cz0wcbtt.fsf@lipklim.org> Date: Fri, 14 Jul 2023 08:45:12 +0000 Message-ID: <87ttu6j2zr.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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: -4.00 X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -4.00 X-Migadu-Queue-Id: B414B35F80 X-TUID: tVBMIf0/eu+9 Evgenii Klimov writes: > In this version I just updated the docstrings for the relevant > functions, because prior to that it wasn't clear: does this "default > export file for *all* source blocks" influence blocks with :tangle > "yes"/FILENAME? Thanks for the patch, but we need to be careful changing things in ob-tangle. Not everything is well-documented there. > Optional argument TARGET-FILE can be used to specify a default > -export file for all source blocks. > +export file for all source blocks without :tangle header > +argument. This is confusing. Is :tangle yes "without"? What about inheritance? What about default header args? What if we have :tangle "/path/to/foo" and TARGET-FILE = "/path/to/foo"? What if they are :tangle "./foo" and TARGET-FILE = "/full/path/to/foo"? > (defun org-babel-effective-tangled-filename (buffer-fn src-lang src-tfile) > - "Return effective tangled filename of a source-code block. > + "Return effective tangled absolute filename of a source-code block. This will likely cause breakage. There are two callers of `org-babel-effective-tangled-filename: 1. `org-babel-tangle-collect-blocks' 2. `org-babel-tangle-single-block' `org-babel-tangle-single-block' passes (nth 1 result) as BUFFER-FN. Its value is (if org-babel-tangle-use-relative-file-links (file-relative-name file) file) So, > + (let* ((fnd (file-name-directory (buffer-file-name > + (get-buffer buffer-fn)))) will fail when FILE contains file path. And it does: (file (buffer-file-name (buffer-base-buffer))) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at