emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>, emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [9.4] LOGBOOK visibility
Date: Sat, 04 Jul 2020 12:57:35 +0800	[thread overview]
Message-ID: <87pn9b98sg.fsf@localhost> (raw)
In-Reply-To: <87r1ts3s8r.fsf@localhost>

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

org-fold--isearch-filter-predicate->isearch-filter-visible


Ihor Radchenko <yantar92@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.
>
> 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] 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

-- 
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	other threads:[~2020-07-04  4:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 10:19 [9.4] LOGBOOK visibility Kévin Le Gouguec
2020-07-03 13:47 ` Kévin Le Gouguec
2020-07-03 18:17   ` Kévin Le Gouguec
2020-07-04  2:53     ` Ihor Radchenko
2020-07-04  4:57       ` Ihor Radchenko [this message]
2020-07-04  8:03       ` Kévin Le Gouguec
2020-07-04  8:08       ` Nicolas Goaziou
2020-07-04  8:28         ` Kévin Le Gouguec
2020-07-04 11:18           ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn9b98sg.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kevin.legouguec@gmail.com \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).