From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SOKEFPrmiGVgAwAAkFu2QA (envelope-from ) for ; Mon, 25 Dec 2023 03:20:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QGL9D/rmiGXiTwAAqHPOHw (envelope-from ) for ; Mon, 25 Dec 2023 03:20:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SpauhKFV; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703470842; 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=KDo8lon5X/g/N2QfNIAJwe34TdvUCFEYXLWFahJOM1M=; b=QHkIg5CQ2FXQ9HB9fp7T3qdLD2FirgaW1u2ujujqoxJUqNkCzpLgWCCwJMvIF9UewxJIY9 j8zZ2LJXe3o3sbX7QwN8NjeEXcZOFqLWKtzhLbx/3LJHsxb00NAua1TaLm8LN1xXRs0fc5 5E8GW9iDD9KGZ2C2qkuL13Efs4P1nKAlYpa8xGyKSGDE7qCmN9YzPnsuRpgQdvp2spKEOJ nYZwQo/o8mu6PXVP9f2l6B9j+nN9dDXlUtTxzIy7PY2dlizPdCphjgEWnm3z3KYBXme6hi LNz/9a6j/gxl7n09rUg3ejFO62IqQIkA9x6jZGZGmdjiiH+U2IKxMLjtyOKq6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703470842; a=rsa-sha256; cv=none; b=HZUVSEYiG71dIfMqaGol7FfqYoB4U1Naf3YM08Z8MoMz2gFW82Wq6qpZj1zpCN1Ui/KAgH Lcag8BFTkJRleWzBWqBZF5gBEVpO6sHWN6S6AKRHqSjdhxrGeNC+9zu/aavYhGX+n8/hUE xU1PW+YoBlS0kUx465i4Tnx2WL99ZK7SjJQXcvwB2jzCZu5BFIspG7+CopA8UC0kSrP4at 7eA4jy90I06vZc4T3iRw2ltKKjQb5PWlmt4LqjeryQTjE024Daf1Zcmurso0pc2IHBfb4z W3I1qo0AfcjvaL0EbZdCkjCaT1aCRSWmzNoWX6E23/6CYvEORdTNpFRrd6HNdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SpauhKFV; 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"; dmarc=pass (policy=none) header.from=gmail.com 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 A0BA918FE4 for ; Mon, 25 Dec 2023 03:20:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHaZD-0002xT-57; Sun, 24 Dec 2023 21:19:43 -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 1rHaZB-0002xF-Gs for emacs-orgmode@gnu.org; Sun, 24 Dec 2023 21:19:41 -0500 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rHaZA-0001U2-2b for emacs-orgmode@gnu.org; Sun, 24 Dec 2023 21:19:41 -0500 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7ba8f20df13so24891839f.0 for ; Sun, 24 Dec 2023 18:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703470777; x=1704075577; darn=gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=KDo8lon5X/g/N2QfNIAJwe34TdvUCFEYXLWFahJOM1M=; b=SpauhKFVEvrsWYvj1E0GpRJ4RXQGcWX7PlsdBwgOhZuKG/b0bOtEWKzlHri7z5/AfW PEmijE5fhifz3xIVxvRHegeEyOq65YEeFbujDd8ajAcu+dyiNmRgTLpDCeddRSdRueeO OAIpMjEZKZUFOQdeqL/lYbB0AqbaTbdMBwqe8UuttP5CE44g54k2kF4POZD84PyE0m9K Mp/7qX2CJyWUj4zmE8GpUafpvbSyp/KpvqZQtscopFFmcqzH3MJVGAL5+2jiTNZp9TQs 6iaDIhrgzOL9qUd1Ur2bXueuMj3K+0KBLd46q8uamhyilvHaLaM5FVUoq4mD8wPXowC/ q16w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703470777; x=1704075577; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KDo8lon5X/g/N2QfNIAJwe34TdvUCFEYXLWFahJOM1M=; b=MZ5rn/AARW3dBo/H1mnxsxkFuKjUwqx0BFkZgTKCxp7vlBU2nx7pz/ArsPxvpw6jvE GPTf5sd0Wxu4XIs6uwRCzTBPXS7CetP3FmQjZLQtbz7DWUrPFYsHm4JV292brVXaE3ER CYB9IIG62NMP8DO1X5ERQmHac/uDiZ7N4c9aC+Z8Yi3Y5HPoxTUDCdjh7MQrlQEfAeNR fgg4oAW6RwN+GEa/18FVOhlyHncI/o5XfhYI0OKchaH65y7TjPM6eqoGJHLet7MpoPpk 50GarmWPHUpb7aYjzLGBkPrGM0c9A7w/R7MuHKN+/0h+I2eKlGJr6TzU0rJoVjUxuZdR sJdA== X-Gm-Message-State: AOJu0YyK0KeTQUWlNQcO6dR46BzL1JcGSEEc7093FmYpkKNITLhnXdWC PerOz9osPkjnK7uFA7pfRTjGzrqQ564= X-Google-Smtp-Source: AGHT+IFt4OGbyMAUx/cnt7PE0YMheQZ0+7nesUAqwyckg6YQULtwT5qANiH5BuTJshqfWanOywf8Tg== X-Received: by 2002:a05:6e02:1b82:b0:35f:fa79:644 with SMTP id h2-20020a056e021b8200b0035ffa790644mr1623528ili.3.1703470777600; Sun, 24 Dec 2023 18:19:37 -0800 (PST) Received: from entropy ([2601:243:283:930::3985]) by smtp.gmail.com with ESMTPSA id p23-20020a02b897000000b0046d3729a8d8sm179681jam.89.2023.12.24.18.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 18:19:37 -0800 (PST) References: <874jpuijpc.fsf@gmail.com> <87y1n6igvo.fsf@localhost> <878rev1q0k.fsf@gmail.com> <877cueonkj.fsf@localhost> <87zg6dez93.fsf@gmail.com> <871qjobhwa.fsf@localhost> <877ct5fzt6.fsf@gmail.com> <87a5y1mnj0.fsf@localhost> <87msvcgjgv.fsf@gmail.com> <87le9wq2dg.fsf@localhost> User-agent: mu4e 1.8.13; emacs 30.0.50 From: Nathaniel Nicandro To: Ihor Radchenko Cc: Nathaniel Nicandro , emacs-orgmode Subject: Re: [PATCH] Highlight ANSI sequences in the whole buffer (was [PATCH] ANSI color on example blocks and fixed width elements) Date: Sun, 24 Dec 2023 06:49:56 -0600 In-reply-to: <87le9wq2dg.fsf@localhost> Message-ID: <87bkafgh1k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::d30; envelope-from=nathanielnicandro@gmail.com; helo=mail-io1-xd30.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=no 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 X-Migadu-Spam-Score: -6.57 X-Spam-Score: -6.57 X-Migadu-Queue-Id: A0BA918FE4 X-Migadu-Scanner: mx12.migadu.com X-TUID: bSp/TDfxZOX2 Ihor Radchenko writes: > It runs fine on my side, although I am not sure if things are working as > expected for all the cases. For example, headlines never got fontified > on my side when I tried your patch on top of the latest main branch. Yes, the headlines are currently not fontified since, with this patch, I was mainly looking to satisfy the initial set of rules you laid out which didn't mention headlines as being a fontifiable element for ANSI sequences, or at least I didn't get that from my reading of them. It does make sense, however, to be able to add headlines to the `org-ansi-highlightable-elements` variable so that they are fontified if the user wishes. Although doing so with this patch wouldn't work. > Also, it looks like you simply made the ASCII sequences invisible, which > causes funky behaviour when trying to edit the text around. What we may > need instead is something similar to hidden parts of the links that get > revealed when we try to edit the invisible text. See > `org-catch-invisible-edits' variable and the functions that examine it. I agree that we should reveal the invisible sequence when trying to edit it. Thanks for the tip about `org-catch-invisible-edits', it led me to `org-fold-show-set-visibility' which I think is the appropriate place to reveal a hidden sequence. > You may use `org-fontify-extend-region' to handle such scenarios if you > mark the ANSI highlights with a special text property. Thanks for the tip, I'll look into it. -- Nathaniel