From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id W9UIIiKKaV8sSgAA0tVLHw (envelope-from ) for ; Tue, 22 Sep 2020 05:22:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OFmIHSKKaV85NQAAbx9fmQ (envelope-from ) for ; Tue, 22 Sep 2020 05:22:42 +0000 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 826059402B2 for ; Tue, 22 Sep 2020 05:22:41 +0000 (UTC) Received: from localhost ([::1]:57962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKalD-0007fP-56 for larch@yhetil.org; Tue, 22 Sep 2020 01:22:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKakn-0007fE-6b for emacs-orgmode@gnu.org; Tue, 22 Sep 2020 01:22:13 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:59115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKakj-0001mU-QG for emacs-orgmode@gnu.org; Tue, 22 Sep 2020 01:22:12 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 51377732DE; Tue, 22 Sep 2020 01:22:05 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=iwgfNUoxSVxkae6vyqwDmYunLSo=; b=VjZotJ AWsZPO+r42+qBL+FIvyFsa2U6GN1Xwlj/iIsYZzZ/ZqXXzqwgYIE9rAXhqCQyFBv h5lcmm2Mt8WP7fTe+Ldc07/Y/0xVNNuyV0WHD9H1arj49d2HYxvocDXAuxyNRNXa ihZBgYVKGcqjDFBKbW8Tlr9p+ZXKPrLzyxyPA= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 484D2732DD; Tue, 22 Sep 2020 01:22:05 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=AyN2fiSDceaOaZNf2TVlEtE8IbSLb9KyFCLrvN15aAc=; b=G6er8o2VSbDs0DyXtayomfw2CUZJZkoW714CHVSPm3/lfKb65QiyVIAy8DCbreaSAFL5zDwWr8GP8FCoTIGNhwSTnW6QWDv0430lW4QXcZWyQhUFvNA3b7ZA/owp/49r4T7pyDla/XQeziNQcBULVMNtplFTUO13vsLIh2WjiD0= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 7A476732DC; Tue, 22 Sep 2020 01:22:04 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Nicholas Savage Subject: Re: [PATCH] (org-remove-occur-highlights) Implements option to remove highlights between points In-Reply-To: References: Date: Tue, 22 Sep 2020 01:22:03 -0400 Message-ID: <87blhywflw.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 8D0EE57A-FC93-11EA-90C3-2F5D23BA3BAF-24757444!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com; helo=pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/22 01:22:06 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=VjZotJ A; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=G6er8o2V; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: 1uh9yv45f6qx Nicholas Savage writes: > I realize now that I messed up sending this patch yesterday so it > didn't show up on updates.orgmode.org. I just wanted to repost it with > a correct subject to make sure it didn't get lost. My original message > follows. This topic is now split across three separate threads: https://orgmode.org/list/d4e1e166-8da2-4c1f-8d90-1671a6541992@www.fastmail.com https://orgmode.org/list/54ebdcc2-c17a-445a-9599-2bfc90e64e5d@www.fastmail.com https://orgmode.org/list/b204da05-85f3-43af-bbf0-ed7149b300af@www.fastmail.com Please avoid doing that in the future. It invites confusion and redundant responses. > I posted earlier about why org-remove-occur-highlights ignored it's > options of beg and end. I'm fairly sure it was so they could be > implemented later. At least one reason that those parameters exist is to allow org-remove-occur-highlights to be used as a member of before-change-functions. I suspect it's _the_ reason. > I wanted to use this functionality, so I've > implemented it. This should not change any current behaviour. If beg > and end are nil, it will run the same way as before. This is called as > part of org-sparse-tree, and my changes do not affect that. When beg > and end are non-nil, it checks which overlays are between those two > points and deletes them. I've ensured that 'make test' still passes > and believe I've formatted my changelog entry as required. > > If I'm missing something about how this should be working, please let > me know. Thanks for sending the patch. Unfortunately, it breaks the org-remove-highlights-with-change functionality, which depends on org-remove-occur-highlights not paying attention to the BEG and END arguments. Take this Org file: --8<---------------cut here---------------start------------->8--- * a | target --8<---------------cut here---------------end--------------->8--- Call org-sparse-tree and enter "target" as the regular expression. Then, with point at "|", hit, say, C-o. When org-remove-highlights-with-change is non-nil, the highlighting should go away. With your patch, it doesn't. It might be worth stepping back and describing what your use case for this change is, and considering other ways to address it (not necessarily as a change to Org itself).