From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 8G5jFUrw12J/NAAAbAwnHQ (envelope-from ) for ; Wed, 20 Jul 2022 14:08:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2Oh5FUrw12ITWgAA9RJhRA (envelope-from ) for ; Wed, 20 Jul 2022 14:08:42 +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 EC38D2D5BF for ; Wed, 20 Jul 2022 14:08:41 +0200 (CEST) Received: from localhost ([::1]:36440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oE8VM-0005yE-Vs for larch@yhetil.org; Wed, 20 Jul 2022 08:08:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oE8Ut-0005wC-IJ for emacs-orgmode@gnu.org; Wed, 20 Jul 2022 08:08:11 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oE8Uo-0001dq-7P for emacs-orgmode@gnu.org; Wed, 20 Jul 2022 08:08:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 98A93240135 for ; Wed, 20 Jul 2022 14:08:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658318884; bh=3DF46hrrzvoYn/NcU6gw8XkX8Ufko9muRjbNerGx+M0=; h=From:To:Cc:Subject:Date:From; b=lNQoVH1ZM7X8qowrIOQ445xbS0uoBpnnpdQvpHXS/cSjMjR2S9zQ0jIlQkAYyG5n8 18KoLWqjAzc0uWRYC0h66jR35xZcDwaio/MlbcmtWs0uXhp4lNIs28tHNUq/cWZ8gG K3vcAK/hYrsVz2reETKJn9s40+PPN7ZigKMz5f1F1MlboWOw+qIRCJj0thKWNVMAWJ g9le90XuJOWan5Z3Sjsu96qvuapNWlF6hPon1tWqKTlCdZOZtOrLLSrCv+oOnxm3yW FJVHsm74C9xPKhmNn7WYcGXNajEeB6ov/8k7lyF6FfF0/s1VMxM3VZwFYk/U6QCKiq Mamo6aMYlk44g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lnvbl6mr8z6tmF; Wed, 20 Jul 2022 14:08:03 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode , "Fraga, Eric" Subject: Re: numbering src blocks in HTML export References: <87bktlm9kv.fsf@ucl.ac.uk> <87mtd5nmue.fsf@posteo.net> <8735exm5ym.fsf@ucl.ac.uk> <87a6944eqi.fsf@localhost> Date: Wed, 20 Jul 2022 12:07:58 +0000 In-Reply-To: <87a6944eqi.fsf@localhost> (Ihor Radchenko's message of "Wed, 20 Jul 2022 11:58:29 +0800") Message-ID: <87h73c3s2p.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=1658318922; 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=ctrC8EE7CD8ARh82mFPKBR6ugKguG1ah15kJAcrFYUk=; b=PYqdLwq2m/OaQk2eb3iVg2FgRPcQdeo3bcwpiFdE91jceZrEzNX/K06xjhq+SiO5aSR3FN Wj5XlY8EtEmoMffJ5T+J7rGRNRfhAnuPxafNR+WXEXJLjTZIYUl2DB29YfpLKSIsBNBt41 Q90xkGFEslmu5gF3JuzNBESoIBgD0dP9+GQ20n9KxYrlH3KyS1SYN/7qjNAne/0bvJieAm lYoGWbpPXsNb8x5WpBiChea8sQy2T0wyVgjeHDj0cMpFgnF6H8vNKJ92i53NYbEJsGzE6+ g35prKQmIlq8jMaBD4Mf7rD3i/om05io49uJmltPUdZlZ3aDXlSfZ8WB0hLKsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658318922; a=rsa-sha256; cv=none; b=VnKFOVVKuW/4jtCDZOyjATbDD1pEW2n6TA/2FGGHwTSiZ/ILEUrWYgcjetfzHSVCJndkNo R1GHAvpuT8W7F3RE+DKrE7jRX+9QokF9eRaw3MsKT6wfY+58EO7HuxUmJa0ZIaVDrUwmJj cL1vTtYjCTuSMqyJRC6w2MhUANumIRcFyLYldCsEuk+jjP45QCAz6IpaNjutQjCcJDNJMp iIbX8UtG0p75wTbu4JC8cbBnKfuZmpNbzyL4KbQULngqNOA4bGGdMnOkLYfUMhjGds8NS1 hQgaB5p8sTFXPUfcbIxSRoA7JTcMk5yTP/FN5F61TEMXy870WV35wZKUyD+D2g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lNQoVH1Z; 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: -3.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lNQoVH1Z; 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: EC38D2D5BF X-Spam-Score: -3.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: eMLzO2eyzXt4 Ihor Radchenko writes: > AFAIU, source block switches are never inherited. > > Dear All, may we should provide a normal header arg as an equivalent of > switches? Honestly, this whole switch syntax sounds unnecessary and only > over-complicates things. I think that web pages or documents that contain several code examples (tutorials, documentation, etc.) tend to unify the style in this regard: either all examples are line-numbered or all examples are unnumbered; therefore, if the first option is chosen, it would be good to have some global setting, when there are many blocks. But I also think this can be easily achieved with some function locally hooked to org-export-before-processing-hook. Or even within the document on the fly. A global 'factory setting' would also have the extra complication that there would be two global numbering versions (at least): a) a separate numbering for each block; b) each block continuing the numbering of the previous block. And there could be a subtype of b) where it is necessary to restart the numbering when starting a new section. Or a) and b) could be arbitrarily mixed in the same document. All this seems complicated to implement... But one thing that could be nice is to give an option (perhaps with a prefix argument) for org-babel-demarcate-block (C-c C-v C-d) to inherit the switches: before: #+begin_src emacs-lisp -n a a a a a a #+end_src after C-c C-v C-d #+begin_src emacs-lisp -n a a a #+end_src #+begin_src emacs-lisp +n b b b #+end_src Best regards, Juan Manuel