From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 SAVNA9kVmmOneAAAbAwnHQ (envelope-from ) for ; Wed, 14 Dec 2022 19:28:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sMutIdgVmmMBHwAAauVa8A (envelope-from ) for ; Wed, 14 Dec 2022 19:28:40 +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 3066C1B6FE for ; Wed, 14 Dec 2022 19:28:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5WUA-00042r-Eg; Wed, 14 Dec 2022 13:28:06 -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 1p5WU7-00042c-Vd for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 13:28:03 -0500 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5WU4-0005Jw-Rj for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 13:28:03 -0500 Received: by mail-oi1-x234.google.com with SMTP id v70so3349180oie.3 for ; Wed, 14 Dec 2022 10:28:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ywsxdCI+Vy6vFTYJ99Df9zKI4bmFa/qZ6tr07EWnTvY=; b=Ti6NZaS2Nw28aVdfOEGhtXInwayNDUrpUxDzVKp9r5V2qxTjFaIvu4ayAY1GCqXCFJ i4SIcS4YZF2yVXhYCujyG8TkZapT5fOrbykNGpmxN9b/eGyUFXDJbyoWPcS5ZSLb4aT9 r6fbyZNotfBVhukVVssu7spcRaRynCGMh7Z62rnJ6HlAZFw7lHhuFcYTTJSbQs2xmNn7 t+1QkEKCZwNAUdEEx2iwPbpbl+ELv6Bej7fpaO9f4OoCPO9iFsO2ScOYWRnh209WUZlU 7OTYpBz7sMSk5S+OhEb4KTnYuuzAxhjo0/imNtO/BISoe+wbvuDLX5BZLHNGVHwBFeq7 rv5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ywsxdCI+Vy6vFTYJ99Df9zKI4bmFa/qZ6tr07EWnTvY=; b=b1RE2hPTyeSN6EsudDlYwr4TlyPJOVIwhGgTo+7Dowp8/6TW4eF5NtpFwkcqDGiAIY xIZDdixfAor5KKuDD1dS8IxvWSUHMDIjop/sPABiBPFxnEqbUCjb2fl6Mh+ScgMti5p/ vcIYgPZBlVph3SoACf+ZX7uSR2flkK77odEZNNx1WWQ+lcIKL3HgAIfs3SpB4qYf4nSi uMT/qp8alftu2JaDiau6Oaf5/HUrinYBQSOOsq6Q9xrs+tghI/cLBwoAre0ew16hlb/i cHqIO6B4qNqfZZJUxtmug8jGG0Rc/Y/FVd6yBxWUbsG+9z9/sVW7qD6bA2mOy1GfrUsO /Zig== X-Gm-Message-State: ANoB5pmPzPp0i6hBJA2sSpEoYIXQYJACetmVMQQBu2k+ay2k0X7m8/PG +C7Za7R6ZcfEtEnoNIOg31KF7ZitzCbNrVZn X-Google-Smtp-Source: AA0mqf4A3iJamMCQInYMck27VQSKdjBxWQyjRdYsegfrSdwzU9gJVkAyrxO91hk8Xk+XTA6EHSD9yw== X-Received: by 2002:a05:6808:4297:b0:35e:be43:f6e4 with SMTP id dq23-20020a056808429700b0035ebe43f6e4mr2414896oib.41.1671042479093; Wed, 14 Dec 2022 10:27:59 -0800 (PST) Received: from smtpclient.apple ([2804:14c:101:8547:249f:91a:974a:9d39]) by smtp.gmail.com with ESMTPSA id r18-20020a4a3712000000b0049f0671a23asm2552991oor.9.2022.12.14.10.27.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2022 10:27:58 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Completely hide properties drawer in 9.6 From: Sterling Hooten In-Reply-To: <87bko6t3tb.fsf@localhost> Date: Wed, 14 Dec 2022 15:27:55 -0300 Cc: emacs-orgmode@gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <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> To: Ihor Radchenko X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::234; envelope-from=hooten@gmail.com; helo=mail-oi1-x234.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1671042520; 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=ywsxdCI+Vy6vFTYJ99Df9zKI4bmFa/qZ6tr07EWnTvY=; b=t6EwGZhQmP28v9M2/wEfcHxlv3I4hbY7qoZoNsvkMoufFlrRMK1D//SsIk8FWr9rNWWa9S H6VaBqMpsqw3yoOrrzyfGLqrQaWksGbyvARe00hwyLMHC/l/3CG9l5wsUWam7cLJVavPqy wSoJl/vzhXSiHnscNDQBr+HvqYJNbOcr4aekECmK3QxenDdoDRm9eNplBm+g2+h9pxyq3U yjMBgXIOtvDaAUDDawcq1oIdbVx5wOWSLjxDpq5kLsgz/GGzF30MdJssj8tfHmnI8dgA3j 84elIB9Dko7jE9z3Wt9XlxCx2CiW7fYDu0J5FqJWE4lT5v0/ljKWZy5MzGx9yg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ti6NZaS2; 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-Seal: i=1; s=key1; d=yhetil.org; t=1671042520; a=rsa-sha256; cv=none; b=TBpXU6BjfjL+6iF5gFzsiTWEbDPeQLZSVruc1Q5FiIsw2UUy86Y7JuMVHppXKSwDmgb1Bf 0k7i4WzJl+nu9W9jdwkSzvEP2BWXm5tggwiuKmZPXuZTCHaVyOxmxFj9CV/RT+U7uL/d68 vkM1zqaLhV2NVYvYMJeGRv7qB5MoyfpNJz2poFnxb1Hq6H1SFGxFfg4iGNeCEk1hG/LDb+ 9olHIuDfDct5H6Lz1utv5Ow44MdpTUC9ZFw6yrSebhDPHBpEkSwV16DbMuSdbk6mIpUbas 49ahro0g6HohWKf//n1aPMfZ4QhFwniPC5vc21Gvt87JwGF576MzV5wHY7dzyQ== X-Migadu-Spam-Score: -5.45 X-Spam-Score: -5.45 X-Migadu-Queue-Id: 3066C1B6FE X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ti6NZaS2; 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 X-TUID: Xj+qQL53qGxV I was able to get a very rough version working to fold and hide=20 the properties drawer completely at point. #+begin_src emacs-lisp (defun swh-org-hide-properties-drawer () "Completely hide the property drawer in heading at point." (org-fold-add-folding-spec 'org-hide-property-drawer '((:ellipsis . nil) (:isearch-open . t)) nil 'append) (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? This is a step in the right direction, but it seems too sensitive to = accidental editing. 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. 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? 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? > On 2022-12-14, at 12:14, Ihor Radchenko wrote: >=20 > I tried my best to explain the design in the top comment. You may also > look into `org-fold-initialize'.