From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 yKk8C6l4kGPGDwAAbAwnHQ (envelope-from ) for ; Wed, 07 Dec 2022 12:27:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oONxCql4kGNlaQAAG6o9tA (envelope-from ) for ; Wed, 07 Dec 2022 12:27:37 +0100 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 4B9B4F9CB for ; Wed, 7 Dec 2022 12:27:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2sZp-00018Y-PD; Wed, 07 Dec 2022 06:27:01 -0500 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 1p2sZm-00017n-Ox for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 06:26:59 -0500 Received: from whuk14.whukhost.com ([5.77.41.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2sZi-0006wz-4G for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 06:26:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=heagren.com ; s=default; h=Content-Transfer-Encoding:Content-Type:Message-ID:Subject:To: From:Date:MIME-Version:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=i1WxynHNsL5V6NNyUp8X/0MgphM5YONSfVU6S6jXzJI=; b=pATYlO88U7p/kYVf3ezqJgq9nq ETXs5sFH++ZXz5u3XtdlrsSFa838cQ1ykADgsKPq7F0/2rCzWnJd5viLUUrj5ekPdoBaKmhCwthPw CXBjM46vZXrlGO67a62H1cfbyN2g2/u4ge3IPU8P+eTnxpyjbgRHyS12lAWs77x1s5NYGslkdnlb/ 1loETlp9ZD0DiEBohchLwOYiQK8n4atUuvPQrM7R6RkUfClUpTvVjc/7KgqfUh3Suej0cQ7FdTGCI x3Mk49GLO/Kp/1kmoiTA9jk0obGDCtj71eQT7DmE0tWf67RoTpLuV2U5bzxcNw9J5BRKGSpNBHHmK vZBUy9+g==; Received: from [::1] (port=39790 helo=whuk14.whukhost.com) by whuk14.whukhost.com with esmtpa (Exim 4.95) (envelope-from ) id 1p2sYw-0066za-V8 for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 11:26:06 +0000 MIME-Version: 1.0 Date: Wed, 07 Dec 2022 11:26:06 +0000 From: hugo@heagren.com To: Emacs Orgmode Subject: Proposal: folding stacked `#+header:' lines in src blocks User-Agent: Roundcube Webmail/1.5.2 Message-ID: <754970738d6c5abc27c61180d356cd4f@heagren.com> X-Sender: hugo@heagren.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - whuk14.whukhost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heagren.com X-Get-Message-Sender-Via: whuk14.whukhost.com: authenticated_id: hugo@heagren.com X-Authenticated-Sender: whuk14.whukhost.com: hugo@heagren.com X-Source: X-Source-Args: X-Source-Dir: Received-SPF: pass client-ip=5.77.41.174; envelope-from=hugo@heagren.com; helo=whuk14.whukhost.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670412455; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=i1WxynHNsL5V6NNyUp8X/0MgphM5YONSfVU6S6jXzJI=; b=LHa5uahSHHdu07wGpvmlgLWEAaAcSPdwSDsvib9WbtpwJZqusCTYUYxzpZ8a0aNMf09XRA 00YveJvMGOwtWzJg2JosNk7i+r/O3uGeMH3/hRo2DNRL0xrRuCzxJVYMBAcOD5ZZoFh2Bl DPFvkIhknFrnUN6V+yK3ZGeEh0D/xQL8r7xZkwuXGhoU85Qug5RXw1CgwdfohZd0dUQZUj u7vMP8NvFduJzrY5rLtudA7ob9wNOVl6NgC9U0I+MoCKVXFrIy0W6zvJxCJOxiJpCcSMWH pPJFpeGwjGQoUHe560kfBw9OVRfnfsh+snEAuFmBvGxGT1Ut5hEKM6PdqfdsTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670412455; a=rsa-sha256; cv=none; b=KhWRqW1JRvRAXkO6U+oIZ9bdPDvtSw3A6qjN0OIuVZLPuTkY8NweMMdYnJ4ns4XIvGFNeA UcbuV7GfHT4BN5YraZLrah6WM7OK99kAKlsuFess2b3KwvvmBbw8b6AMp+bdYbfH+bNPQ/ O/caw4Tf90/+ewANTisYnCkAUU1M7yRfY1ZNxk8axqm6ywj7plrdizIZbggH9JdOXAWxmK uItR/NmO6GtCwzRPBKWIE3F3gNiPz1gRPxRYGTgbXAIiCAhduaZBE56vJgMzhyGW1EXqiG gs/72WB8wKiP6v/F6bt7F/pWAcoVYLze+gJ6//rujzhwy5JRinYwCzIcGNyCkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=heagren.com header.s=default header.b=pATYlO88; dmarc=none; 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: 2.74 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=heagren.com header.s=default header.b=pATYlO88; dmarc=none; 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: 4B9B4F9CB X-Spam-Score: 2.74 X-Migadu-Scanner: scn1.migadu.com X-TUID: WPiNVHwj2FNT Sometimes I deal with large blocks (generally src blocks) with a lot of header arguments. To deal with this, I stack them up in `#+header:' lines. Real example from a file I have: ,---- | #+header: :results (if (org-export-derived-backend-p org-export-current-backend 'latex) "latex" "file raw") | #+header: :file (if (org-export-derived-backend-p org-export-current-backend 'latex) nil "foo.png") | #+header: :packages '((nil "tikz" t)) | #+header: :imagemagick t :fit t | #+header: :headers '("\\usetikzlibrary{calc,positioning,patterns}") | #+begin_src latex | | #+end_src `---- This is fine, but the height of the header lines often rather gets in the way when I'm working (once I've written them out, or expanded them from a snippet, I don't want to see them again). Thus, I propose that stacked `#+header:' line on top of blocks be foldable. I'm thinking of this as roughly analagous to folding property drawers under headlines. That is: - the header stack should be foldable independently of the block's content. That is, I should be able to fold up my stack of five header lines into one line, without folding my block. - the header lines should be folded by default when the block is folded - there should be a variable (corresponding to `org-cycle-hide-drawer-startup') controlling wether the header stacks are shown on startup or not. - /unlike/ property drawer folding, I think it would be good if hitting repeatedly cycled the block through three states: - everything unfolded - header folded and content open - everything folded. First question: what do people think of this, do people support this as an idea? If so, second question: I think this would be implemented by altering `org-fold--hide-wrapper-toggle' to treat blocks specially with a cyclic folding system. Is this right? If other people think this is a good idea, and that's roughly the way to go, I'll try to make a patch at some point. Any thoughts welcome! Hugo