First of all, thanks to everyone for working on 9.6! I'm trying to clone Lotus notes in Org mode. This requires certain properties to be generated for every heading (e.g., ID, creation time, modification time, etc.). But these are mainly used for searching and sorting, and rarely of interest to me during editing. For this reason I would like to /completely/ hide the properties box (not just the individual properties).
This has been discussed multiple times before in this list. The general sentiment has been to reject adding it to Org as hiding things ompletely from the user might be confusing, but it's also been brought up enough times independently to demonstrate a latent demand for this behavior, and a working example would be very useful for those of us who wish to have a cleaner interface and editing experience. Alternative suggestions have been to change the face to make the properties box appear smaller, but this interferes with movement from the heading to the body, and the ability to toggle the visibility of a property box would make this is redundant. In <https://list.orgmode.org/87zh9ecfgc.fsf@localhost/> Ihor suggested adding `org-custom-properties-hide-emptied-drawers', this was rejected, but is pretty close to the desired behavior, except it's still global. I was unable to get this working in release 9.6. Prior to 9.6 I overwrote org-cycle-heading to hide the properties box using overlays. This worked alright but had slowdowns on larger files and affected typing cadence noticeably. Org 9.6 is now relying on text properties instead of overlays, and I would like help replicating (and improving) that behavior. Part of the complication comes from updating modified timestamps in the properties of each heading. This drives the need for hiding to be fast so as not to bog down the editing experience when triggered by `after-change-functions'. The constant updating of a modification timestamp system puts some constraints on the property hiding system. From working in 9.5 I believe the relevant requirements are: • Ability to add or modify properties with `org-entry-put' and maintain the state of being hidden or visible • E.g., Updating the ":MODIFIED:" property to a hidden property drawer should keep the drawer hidden. • Toggle on and off hiding globally (perhaps in a minor mode) • Moving headings around with `org-metaup' etc preserves the visibility state • A hidden property drawer should stay hidden when the outline is rearranged • Resistant to changes with undo etc • Undoing a change should cause the contet to revert to the same visibility state it had at time of change. • Don't overwrite when editing normally • With the point at the end of a heading and immediately before an ellipsis, typing "j" should result in the character being inserted with the face of the heading, and not overwrite or otherwise disturb the invisible text. `org-fold-catch-invisible-edits' might be relevant here. • Reveal or hide just the property drawer of the heading at point and not the whole buffer • This is partially for speed reasons (to handle modified timestamp updates), but also because revealing all property drawers is extremely annoying when the surrounding headings in the buffer have headings with >10 properties. • Fast enough to use with `after-change-functions' • The modification timestamp setup I'm using is triggered by buffer changes, and thus when typing runs after every keystroke. To keep this smooth and not be a bottleneck it would need `(benchmark 100 'org-hide-properties)' to be less than .1s on an Org file with >20,000 lines and >1,000 headings. • Ability to reveal just a subset of property lines • e.g., `org-bibtex' creates many properties to store bibliographic data. It would be useful to have enough control over hiding of properties such that if only ":BIB_FIELD:" properties of. • Hide ellipsis unless body text is present • If all the headings have properties then the default folding behavior will place ellipses at the end of each heading, thus destroying the informational value of the ellipsis as an indication of folded but displayable content. It would be useful if instead the ellipsis would only be present when there's body text. Any help would be greatly appreciated as things have changed in 9.6 and I'm not sure where the opportunities are to leverage the improvements (e.g., are text properties now the way? Or should I still implement it with faces?). Thanks!