From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 MFHJHiZtqGIUIAAAbAwnHQ (envelope-from ) for ; Tue, 14 Jun 2022 13:12:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6GmyHiZtqGL6FQAA9RJhRA (envelope-from ) for ; Tue, 14 Jun 2022 13:12:38 +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 90AE738AC0 for ; Tue, 14 Jun 2022 13:12:37 +0200 (CEST) Received: from localhost ([::1]:40920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o14TM-0001rp-JO for larch@yhetil.org; Tue, 14 Jun 2022 07:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14SB-0001ny-Fu for emacs-orgmode@gnu.org; Tue, 14 Jun 2022 07:11:25 -0400 Received: from mout01.posteo.de ([185.67.36.65]:52177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14S2-00019m-GU for emacs-orgmode@gnu.org; Tue, 14 Jun 2022 07:11:20 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1D655240026 for ; Tue, 14 Jun 2022 13:11:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1655205070; bh=PU9QbXuQl6kvS+txA6mCQjvYSGFhAMVC4NpomSdo94U=; h=From:To:Cc:Subject:Date:From; b=rHENmJxYdG0k/36gKnfQBwc5StfP5bkiio5ImXHIIINQnSUuHuIld8dBRvtprop1D Mb3Ek5JNS4JPqACzHu7NEA8vbchWkexnZto8GL/QAP3M8Ec5TXGMTN7FV5qcK5ZyqO uTPoMMoU2qhqRS+P0VLh1wrv6AMhWuTm8FcXQXKzIYG7gQRDGl13mTxYA0ThVuaH01 WZ7UCEC9MjuoqKTg5EEIJHb94BMRgkVWjCmqNpi5mfUocFUvia33mf63BznshWTz8M +tc/MRCna5JnSWgD3A5LO44QueHBAuqe3psR6hhBRB9DcYzJRVOM0DEnj/eb1UOfO2 GVz111lt150yA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LMm2j1Y2sz6tnW; Tue, 14 Jun 2022 13:11:08 +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> <87wndna1lp.fsf@posteo.net> <87y1xzq4k9.fsf@localhost> Date: Tue, 14 Jun 2022 11:11:06 +0000 In-Reply-To: <87y1xzq4k9.fsf@localhost> (Ihor Radchenko's message of "Tue, 14 Jun 2022 11:58:30 +0800") Message-ID: <87o7yvlctx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.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, 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=1655205158; 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=s4UVBaqjamwxC0JR9V6dZeKmiyaRnjkE34Zmw1kNYqY=; b=NzoXuFfNUSBkh79zsRx8VzI7wsr/mkywaaWWLfTBgKN6/m4WB1pQxOuC72lFxcSVVIFVfl 5A2eeZzwluzYcE552FvzRyuK7x69zESfc9CNO3FSsKqAO64fGq8m5x78gTmAd0HHrgOdCG xaZ+oLIy7+yHazN97FX5LLBNEtUrYkd651PLBCqLwyLye7rx40cAnDcPPmW99KQRNhOb0C /K5MPhCNpsjIukgdCzMJZoz1MCciGC/ObqS5PLOJ7AmqbS2Ez73bgyZfBtusQSkCHNvU4r at1OqD+ROFjRBZGMfHG7jjFP4K8k7NSlc6IxXHpO0ss9y0tetVvZ66BsmSiIQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655205158; a=rsa-sha256; cv=none; b=M7Wzg1jhF3dxGxv98Bn3uYv0pZwlGUvM2SgghhA/WtcWggPkz5EstK5BMDqMmXe3u/ghG4 NdAvc5OdMuajFmDtU10CP7Z6gtKQ7w9pcTvmFG9H/ek68e7yNDT6LzDkg9xGHPbRSTSjG1 Se4IMqDcYHYVIvBFBIQ8Am7ezuD/tHhNxcNRI+ie02u3TaeGP2E7Rf2nygUIVStK3461Y9 Z4WUCW9iT/GShixVTiySWFZsMLNFroCqbUruo7pBpEvHzhoa3kr7+WfZv4doU7qPe1t09c LHBpXlBxI86Xn0xqQC1hx8K85g0atkc5hGHI99dvR5vT2ZjQ9fxNIYdwg5NEDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rHENmJxY; 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: -4.19 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rHENmJxY; 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: 90AE738AC0 X-Spam-Score: -4.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: SrkwVAAi+iV/ Ihor Radchenko writes: > I think that the existing code can be improved. Relying on the > undocumented behavior of (org-back-to-heading) is not ideal. Not to > mention code blocks before first headline. > > It would be great if you rewrite the existing code to suite both the > defaults and the proposed behavior. Yes, I agree that this needs a more robust approach. Also, I've noticed that the patch I've proposed has a rather silly bug: replacing the second `match-end 0' with `match-beginning 0' naturally causes intermediate code blocks to be exported as comments (!). Returning it to `match-end 0' everything is OK, but the present approach is still tricky. I'm going to see if I can try something cleaner these days. Ideally, everything should be controlled from org-babel-process-comment-text... On the other hand, I have a curiosity. I understand that the behavior of the `:comments org' option should be left intact to ensure backwards compatibility. But I've always wondered if there is any use case where this value, as it behaves, might be practical. I don't quite understand how useful all the Org metadata in the comments of the tangled file can be. The expectation with `:comments org' is that only the content of the Org document will be rendered (as comments), but not its metadata, that all they do is unnecessarily fatten up the source file. I'm thinking, for example, of headers with lots of properties. or comment blocks, which would be visible in the tangled source file: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 ;; Header =E2=94=82 ;; :PROPERTIES: =E2=94=82 ;; :A_LOT_OF: properties =E2=94=82 ;; :END: =E2=94=82=20 =E2=94=82 ;; #+begin_comment =E2=94=82 ;; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Done= c hendrerit tempor tellus. =E2=94=82 ;; Donec pretium posuere tellus. Proin quam nisl, tincidunt et, m= attis eget, convallis nec, =E2=94=82 ;; purus. Cum sociis natoque penatibus et magnis dis parturient m= ontes, nascetur ridiculus =E2=94=82 ;; mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam n= on turpis. Cras placerat =E2=94=82 ;; accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. =E2=94=82 ;; #+end_comment =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Best regards, Juan Manuel=20