From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QMwCKMUYmmMKkgAAbAwnHQ (envelope-from ) for ; Wed, 14 Dec 2022 19:41:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0Be0J8UYmmN2PAAAauVa8A (envelope-from ) for ; Wed, 14 Dec 2022 19:41:09 +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 7FCC183CA for ; Wed, 14 Dec 2022 19:41:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5Wg6-0002CV-W9; Wed, 14 Dec 2022 13:40:27 -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 1p5Wg2-0002AT-QE for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 13:40:23 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5Wfx-0002Rx-9U for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 13:40:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 80AFF240101 for ; Wed, 14 Dec 2022 19:40:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671043209; bh=c4xXEotnQockMhUeVVsFLYn5eHR9z7u38wKaAErUENw=; h=From:To:Cc:Subject:Date:From; b=CkJotmeb/b7BiTg5LAoJT5NYRg5R2mc/i9Y9H8nTvs1gyu3zWL+HFr2guU/cMWr80 JxZMweJBvDGj0+62pdfL3A2QDwhzJXp+MA59H1FQ3DN98tiTNlfP///BaPlSdhwqPi n44SCs04uxSK5XejX+LYKmuc1+QH2AmRR5q39qzuiCbdH/o/SCznBbiv7VXT1fnVYW YQ5pqgfWwI8dBK+RCw3u+aB63PFe43R89SApyVc9VrncCuab6v6sxs+pwGoS8SM8sH gEPfE/cIFoK73twggO48EFRQnq4ovsU0soDrPH9XsjDMnV9Umj2rXLVebiRor/bnaV EWeIvy9mpxxWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NXPLG3xPRz9rxB; Wed, 14 Dec 2022 19:40:06 +0100 (CET) From: Ihor Radchenko To: Sterling Hooten Cc: emacs-orgmode@gnu.org Subject: Re: Completely hide properties drawer in 9.6 In-Reply-To: <25EC8C19-CFD9-4973-8F5B-896AF45C7002@gmail.com> References: <4CC6A1F4-0B08-44E0-AE4D-60CA11636663@gmail.com> <87k02uqrbw.fsf@localhost> <3B566A00-1AAB-4CFC-96C2-C25D05AD5855@gmail.com> <87bko6t3tb.fsf@localhost> <25EC8C19-CFD9-4973-8F5B-896AF45C7002@gmail.com> Date: Wed, 14 Dec 2022 18:40:01 +0000 Message-ID: <87tu1xx20u.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@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 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671043269; 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=ToHzNqk9+ni3hhLCB3ZFGjbge6/US3iOCvkbkTuYZ+0=; b=YOFj5ifjyFaqrNiBXj0uXwLWZfcOLPXBag6EWUIJFkCId9AohRcFoi/R3PKb5HJHc3ADgu Jw56Gy+zI3CCVG4aNA920yASEIRIIC90EkPgmQMtbxc1ZkMVb+FQpzAN39JIm9VORGcLXh PN84aRoBDl+njYMyQUhxHrIhZvhTfnRctlK0+j2h43w/PrIaqLNaZz7yI9efga1+wphQ0D N8FzYBC2y/lIep2zNkH9lEZ2G+90KIN0PTQQBbYEG/H1M4fC/IVJfxkW3JsoXemIOur4tl xGziLa/jSG4nt4JSel9GXn3gJcBO+Z9iiD8HbkT8xh7EJiMPfGe0kSJByEXcfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CkJotmeb; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671043269; a=rsa-sha256; cv=none; b=hwEvIX4OYK8l3LWzFCLSomnfhvl7Skp/0MaNJP6fFSqP5P4zEs1IUunzPYI2FJy5Uq8o55 4WRZw+urS864yx6Nvzfv9xFrDimj5gc8g76iZshN25Rc01WQGQO1hFWPz5m6TbD7QvU6aF 1OXlc+tvZlI0zdQZd/RVcn7CxaOTsR9wGxADI+RqXCtcOVLXghan0UOO/+O5pUOYdd6B1g 7pEiR0d70LqJji7pRbYBY4m4AFsk46nOv2HlKh0vpa0cstGIwpXwYSDJTpeR/AX2uaWL1c Y4JoQLhFIifkV9PHdOAor77EDrUN8Jol7nWVsENwrn4EVxeZ+q7HAa1e+4xDAg== X-Migadu-Spam-Score: -10.97 X-Spam-Score: -10.97 X-Migadu-Queue-Id: 7FCC183CA X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CkJotmeb; 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=posteo.net X-TUID: 6DAZayya4ojw Sterling Hooten writes: > (let* ((block (org-get-property-block)) > ;; Extremely hacky way to get the whole property drawer > (beg (- (car block) 14)) > (end (+ (cdr block) 5))) > (with-silent-modifications > (org-fold-region beg end t 'org-hide-property-drawer)))) > #+end_src > > Is there a better way to get the beginning and end=20 > of the property drawer more robustly? org-element-at-point > This is a step in the right direction, but it seems too sensitive to acci= dental editing. See :fragile in org-fold-core--specs. > This should be impervious to most types of user interaction, > and prevent accidentally deleting or abutting anything > up against either the start or end of the properties box. which is part of the reason why the proposal was rejected. Though Org tries hard in org-catch-invisible-edits. > I tried setting `org-fold-catch-invisible-edits' to different values, but= even > with set to nil I can backward delete and erase some invisible > text. Is this dependent on their being an ellipsis? Or is there > another way to make this impervious to most edits? It's just because only a fixed set of folds is caught in the invisible edits check now. > When adding a property with `org-property-put=E2=80=99 this would need > to be called again, is there a way to do that robustly? I should not need to be called again once you set :front-sticky/:rear-sticky folding spec property. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at