From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yKllGXl/pGKZIwAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 13:41:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kGImGXl/pGLSggEAauVa8A (envelope-from ) for ; Sat, 11 Jun 2022 13:41:45 +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 CB0151334C for ; Sat, 11 Jun 2022 13:41:44 +0200 (CEST) Received: from localhost ([::1]:42418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzzUt-0003fX-VU for larch@yhetil.org; Sat, 11 Jun 2022 07:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzzA2-0000Up-Ci for emacs-orgmode@gnu.org; Sat, 11 Jun 2022 07:20:11 -0400 Received: from mout02.posteo.de ([185.67.36.66]:45037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzzA0-0004yL-3K for emacs-orgmode@gnu.org; Sat, 11 Jun 2022 07:20:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 97BAD240107 for ; Sat, 11 Jun 2022 13:20:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1654946405; bh=NSwa0YaeC1ts/bLz6htiq0yxo+nzoFx8mIBBr6CDTuA=; h=From:To:Cc:Subject:Date:From; b=Unvq3yGvgg5SK9QCl3obXOi1bOS6kEPvdkWX83H+WQ9m5OSdaS4HXpolz3SWGx+6p tk5hPfFqhCAGsOBzGY3JAZVP2XFDhHxQR0JlxIVm8DINjHKuYvGcLT1XT5Wnblp7yG qdxXxw1RNSn2zRWik/I8tTfk8LHXVd2EcaeojG5Ck3WOtVpfC4mEinqPsATTvD6GV3 brCAz6nKEIx9lvP0EEgA14XCvwBg+pndlb63l+JEtSIxIUZ3k6zRlmOtDUKFbJ615l v55knrfczAeA6WdDL/vnVgA2sn4CmKzj3cdHBrXUonMNVwEst40vZMBrUxH1KDq+P6 F8itpItMdSdTQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LKwNN66Dgz6tmR; Sat, 11 Jun 2022 13:20:04 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode Subject: Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments' References: <87o7z0tltj.fsf@posteo.net> <87bkuzdahc.fsf@localhost> Date: Sat, 11 Jun 2022 11:20:02 +0000 In-Reply-To: <87bkuzdahc.fsf@localhost> (Ihor Radchenko's message of "Sat, 11 Jun 2022 13:39:59 +0800") Message-ID: <87wndna1lp.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@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_H2=-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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654947705; 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=haL8GQV5MoAOVEaQBwOOzp8a51qp9hmZVFCoXGkvIu4=; b=CS+/G3dG9np4cACXGyKyTzR7M5Ti31vKpvy8bhhftfkwQWpeyv2CYEngDT/YD91LROkpVA v7wiiJL654MBh2n+nrYe0azSFS+kyrix3k4sVDbTf37G3AJNWVS38xKcqMgH5cn6wme5T+ Wpr7MS5PGVMQx5dWHvERq0qB4OBF/MHx9lK5eNeFHfIFX0IszvVDIqWu76cTmO6gUWhlmk /dIDSFzc8GflxKIUk7VTSbdCair7yn3HV8TWRJUmfFO9iRYPiELVgbgBSXuLUwJlZmAdzA ffVLYf9PlXyOC2tnC2ig8PcObEAPJcjy7KY/tM+YDU74/NTjIQ7Mr2o81pumoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654947705; a=rsa-sha256; cv=none; b=P/LDRei21/PhcPYkhJ1zd9ID4TByM583eCZZf3XN5B1fH2pEb3SLkZ9Uwrp/BfZbGCG/GT /aV84PqD31u5XiLcHreok14PFcHTH3icPA42FkNlVGpAI7PeCMWY+kPuU6yLvtk5G4SMaV vHrd007n7PuP2IE49sbHaU1gTwABz2vwK4U82xxLWo0z1saPQCYy1A2QuOrj0SIEKZB6E8 FE6oBnltOtSztTDgyeVPs7VtWlIXeN+JcBtBc7HbHFF7llfimCfEEdj9JFIVkXZcUgS5I1 nG+efWm/uUUuyHaNqkZEwPjoQ8xoy6k9F4M90oGgHD5g0fFx8LftGJB9Y3Ev8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Unvq3yGv; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -5.98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Unvq3yGv; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: CB0151334C X-Spam-Score: -5.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: sqvxslLiMiAL Hi, Ihor, thanks for your comments, Ihor Radchenko writes: > Wouldn't it be better to supply a customization for > org-babel-process-comment-text instead? > > I do not feel that per-src-block control on the comment type makes much > sense here. My first approach was actually to define some options for org-babel-process-comment. But I noticed that a header with properties, for example: * Header :PROPERTIES: :FOO: var :END: is interpreted as: ;; Header ;; :FOO: var I think the culprit is the '(match-end 0)' in org-babel-tangle-single-block: ... (comment (when (or (string= "both" (cdr (assq :comments params))) (string= "org" (cdr (assq :comments params)))) ;; From the previous heading or code-block end (funcall org-babel-process-comment-text (buffer-substring (max (condition-case nil (save-excursion (org-back-to-heading t) ; Sets match data (match-end 0)) ;; <========= (error (point-min))) (save-excursion (if (re-search-backward org-babel-src-block-regexp nil t) (match-end 0) ;; <========= (point-min)))) (point))))) ... So I couldn't think of any other solution than to put the change there, so as not to break backwards compatibility. But it is a somewhat tricky solution... Best regards, Juan Manuel