From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MPsvLM+b3mL4HgEAbAwnHQ (envelope-from ) for ; Mon, 25 Jul 2022 15:34:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6BQELM+b3mLF+wAAauVa8A (envelope-from ) for ; Mon, 25 Jul 2022 15:34:07 +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 52DBE1F5D9 for ; Mon, 25 Jul 2022 15:34:07 +0200 (CEST) Received: from localhost ([::1]:53892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFyDl-00069z-Lo for larch@yhetil.org; Mon, 25 Jul 2022 09:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyCx-00069l-7L for emacs-orgmode@gnu.org; Mon, 25 Jul 2022 09:33:15 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:34447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyCt-00039r-O1 for emacs-orgmode@gnu.org; Mon, 25 Jul 2022 09:33:14 -0400 Received: by mail-pl1-x62e.google.com with SMTP id z3so10425277plb.1 for ; Mon, 25 Jul 2022 06:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=f9DaLd87RQkE/Uv6ZQUzVaJph12219COXbYQOiOgbIc=; b=muWa0czzsoKEVp3QBYXMeezdsyZfhohDbTeY4WoPZjTMKeWPBI522XXh+hnrogzEvA 5C+Hb6iEYOAL2HxxOFjyb3YzSFxL1DxsdJ/JuUwGQwpVHrk62A5UoIrGHUL+NwXedZnX KtdfBIEPTsdJO+AFcTCpICprDrUmCb2wD67hfmT2nEx57SIOOCpmZjIIRsex0p8ffSW3 2OT/DaNVebkdRis0fkTPXq+MjEODSIjIIBdhO2qwCxf/Nz2nfkmQBt++mRbryOdy2NB7 106inSK/iQ4Ka1iTvQRPN8G8Dskon+qUqtAeg8z5mvH2i352VQXgOiRjnhiRrr6hx5is 8FaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=f9DaLd87RQkE/Uv6ZQUzVaJph12219COXbYQOiOgbIc=; b=UjWQ1fcyWPnE+uHGqqkxoa1oOdyn4d4sEtv/Gi0IF6wJv53mK66Fa0mU30MlGKq8BF sSOrFOujO5Vx+qmf5efyHFTMeBWELBQt6C34BPZ0mYk07q+DgwBQBm2KdUDdBq00sMOz 5D0lkN6wlPX3HqIir+q0/Ye23nDYQcIfu2nijxk6idQMyNncJ3uPDwm9BLMhUC5e5/xP acNO7UcSHHAkyXnMWAvebiR4GgOqko7S0q3rrgLGMXL9zu1KXetPMMaMv1XCntmQdc+w 2BknAJCOJjzndLAnH08fG6Kzfzv+oAU9fGG6YEVH7qCa4dsBzDl9RP24Ye4jvZot19Dt xUdw== X-Gm-Message-State: AJIora8rVbGCFHy65kHOrV2p7X5kHKYJQ4Je3zgZOIcEtcNBDvng7oeJ vCdtWOXiK11802Q085T7DRI= X-Google-Smtp-Source: AGRyM1t1CazwVN3sO3RQW58Uc8BRAABPuwQ7HorDML5wSzq5xXxo+LWqkVktZwClugYFry7nQP95cg== X-Received: by 2002:a17:902:b701:b0:16d:12a7:c2fa with SMTP id d1-20020a170902b70100b0016d12a7c2famr12647386pls.67.1658755989936; Mon, 25 Jul 2022 06:33:09 -0700 (PDT) Received: from localhost ([2409:8a70:217:4f80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id ie15-20020a17090b400f00b001f249f207c2sm7024198pjb.49.2022.07.25.06.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 06:33:09 -0700 (PDT) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments' In-Reply-To: <87k086h96l.fsf@posteo.net> References: <87o7z0tltj.fsf@posteo.net> <87bkuzdahc.fsf@localhost> <87wndna1lp.fsf@posteo.net> <87y1xzq4k9.fsf@localhost> <87o7yvlctx.fsf@posteo.net> <87y1xzwjar.fsf@localhost> <87k086h96l.fsf@posteo.net> Date: Mon, 25 Jul 2022 21:34:12 +0800 Message-ID: <878rohuxij.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1658756047; 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=f9DaLd87RQkE/Uv6ZQUzVaJph12219COXbYQOiOgbIc=; b=Q16Z0Q7HoLX809qoPtR0aDjtCT6SUKjxkoVnoiQSi6tcEKYUwj5GYU/qB55VJKaBXudFVF I3D9p796iYart9ZwyQZ7uXtw4iwKkHMmCQZkMiHIp/Q0xebIKvmxYOsibTgbBytBfWZ3u4 BjpmNyNdDM0Xw6D1QT6kLfeH//VAKubEIaauS+7HpdiobqugebJum+QGuWeo6qGlNkOwh9 UU1QPcbfTqP/kzzq7PdUt8BIb9K7h8Wry6NiapAEZmmeG8oipE/AtnKClW/IajaHjTacrU hf8WfBvpfumOmd0+dk1ZPzSr+5lANbiREnPH7tEW7ZSZkQ6cd5rrKL9AV3+JBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658756047; a=rsa-sha256; cv=none; b=NMC7jXBnvh9UcpaT9EyHljrnRLc++F0HCroQEJRk3ssBw41Xae5xMzb+tLV6hevGAVJtzN /ofDx6UCCBMA+Vj8OoXR0dLTfrXlvop95vkJ1H2AvUESpsMCqMHB16e+rjLg7uEx745jSO nCaC4+g7HEb0QZVoN/7NUDK8bFr5JE8BBynyRNU8lzIoVQ4ObnUE3yJPxU1pYvAXgYpEsa 7eg7uzujXcSKCNcua+keN/GRppn1U68jU8uXBBMO8wtK3dqjHtJHBfIugltIyxe3C8F/P2 /vYFDw4Xq5tKFmyUoY0vCpQQ5xfiX4xkYet6vyPc3o+YjWk9in/0fLYsJnCCZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=muWa0czz; dmarc=pass (policy=none) header.from=gmail.com; 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: -6.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=muWa0czz; dmarc=pass (policy=none) header.from=gmail.com; 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: 52DBE1F5D9 X-Spam-Score: -6.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: y6vjztrZmZSq Juan Manuel Mac=C3=ADas writes: >> Clearly, the "possible after an ASCII export" dropped somewhere in the >> middle. > > New version of the patch attached. > > `:comments org' now produces by default plain text comments previously > exported to ascii from org. Thanks! This change should be in ORG-NEWS. > +(defun org-babel-export-comment-text-as-plain-text (comment) > + "Default function to process raw Org text collected to be > +inserted as comments in tangled source-code files." > + (org-export-string-as comment 'ascii t)) Please document what the function does as the first line and document the arguments. See D.6 Tips for Documentation Strings in Elisp manual. The fact that this function is default for something is secondary for the docstring. If you mention this fact, please also link back to the defcustom. > - (org-back-to-heading t) ; Sets match data > - (match-end 0)) > + (re-search-backward org-heading-regexp) ; Sets match data > + (match-beginning 0)) This will err when the source block is before the first headline in the document. Best, Ihor