emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [9.4] LOGBOOK visibility


From: Ihor Radchenko
Subject: Re: [9.4] LOGBOOK visibility
Date: Sat, 04 Jul 2020 10:53:56 +0800

> I haven't reached the bottom of this rabbit hole yet.  Since I think
> I've spent all the time I had to spend in this issue for the day, here's
> where I'm at.

There used to be several types of overlays for headline folding, drawer
folding, and block folding. One of the recent commits made all the
overlays use headline type. As a result all the overlays are merged into
a single overlay upon folding. This was done to reduce the total number
of overlays present in an org buffer, which degrades Emacs performance
on huge org files (see the discussion in [1]). 

What you observe is a consequence of that change. Now, all the drawer
overlays are destroyed when you fold a heading. Isearch would
only see a single huge overlay and unfold it alltogether.

I am currently working on a patch to rewrite the whole folding system.
Your issue should disappear once it is applied.

Meanwhile, you may, for example, advice
org-fold--isearch-filter-predicate to re-fold drawers during isearch. 

Best,
Ihor

[1] https://www.mail-archive.com/emacs-orgmode@gnu.org/msg127740.html

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> I haven't reached the bottom of this rabbit hole yet.  Since I think
> I've spent all the time I had to spend in this issue for the day, here's
> where I'm at.
>
> If I open my example file[1] with Org 9.3 and master (86fada6b5), and
> compare the overlays covering the hidden part of the first LOGBOOK
> drawer, like so:
>
> #+begin_src sh
> #!/bin/bash
>
> set -eu
>
> point=67
>
> orgs=(
>     "${path_to_org_9_3}"
>     "${path_to_org_master}"
> )
>
> for o in "${orgs[@]}"
> do
>     emacs -Q -batch \
>           -L "${o}"/lisp \
>           -eval "(find-file \"logbooks.org\")" \
>           -eval "(message org-version)" \
>           -eval "(dolist (o (overlays-at ${point}))
>                    (message \"from %s to %s\" (overlay-start o) (overlay-end 
> o))
>                    (message \"%s\" (overlay-properties o)))"
>     echo
> done
> #+end_src
>
> Here is what I get:
>
>> 9.3
>> from 32 to 2015
>> (evaporate t invisible outline isearch-open-invisible #[lambda gibberish 
>> involving (org-show-context 'isearch)])
>> from 67 to 262
>> (isearch-open-invisible delete-overlay invisible org-hide-drawer evaporate t)
>> 
>> 9.3.7
>> from 32 to 2015
>> (isearch-open-invisible delete-overlay invisible outline evaporate t)
>
> - The LOGBOOK overlay (from 67 to 262) vanished.
>
> - The isearch-open-invisible property of the "project 1" overlay (from
>   32 to 2015) changed from a lambda[2] to just delete-overlay.
>
>
> Again, not sure this shows there's an issue; for all I know Org 9.4 just
> works differently and nothing's wrong there.  I hope someone can chime
> in and take it up from here; otherwise I'll resume my investigations
> sometime later.
>
>
> [1] 87eepuz0bj.fsf@gmail.com/2-logbooks.org">https://orgmode.org/list/87eepuz0bj.fsf@gmail.com/2-logbooks.org
>
> [2] Which I guess is the value of
>     outline-isearch-open-invisible-function, set locally by org-mode in
>     the major mode function?
>

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]