emacs-orgmode
[Top][All Lists]
Advanced

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

Re: BUG: org-cycle does not unfold some subtrees


From: Thomas Dye
Subject: Re: BUG: org-cycle does not unfold some subtrees
Date: Sat, 13 May 2023 06:36:03 +0900

Apologies. This message sent from my phone. Yes, I use swiper. My folding 
problems went away when I set org-fold-core-style to ‘overlay. Limited testing. 

Tom

> On May 13, 2023, at 6:14 AM, Ihor Radchenko <yantar92@posteo.net> wrote:
> 
> William Denton <wtd@pobox.com> writes:
> 
>> No and no, but now that I'm thinking about searching, I remember I use 
>> Swiper 
>> (and Ivy and Counsel).¹  C-s runs =swiper=, which is =isearch-forward= "with 
>> an overview," as it 
>> describes itself.
>> 
>> If we've narrowed it down to searching, could it be connected to that?  To 
>> the 
>> other people with this problem: do you use Swiper?
> 
> I am looking at
> https://github.com/abo-abo/swiper/blob/master/swiper.el#L980 and I note
> that swiper calls `isearch-filter-predicate', but not
> `isearch-mode-end-hook', which indeed explains why the isearch overlays
> are not converted back to proper Org folds.
> 
> Does it help if you try the following variant of 
> `org-fold-core--isearch-filter-predicate-overlays':
> 
> (defun org-fold-core--isearch-filter-predicate-overlays (beg end)
>  "Return non-nil if text between BEG and END is deemed visible by isearch.
> This function is intended to be used as `isearch-filter-predicate'."
>  (when isearch-mode (org-fold-core--create-isearch-overlays beg end)) ;; 
> trick isearch by creating overlays in place of invisible text
>  (isearch-filter-visible beg end))
> 
> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
> 




reply via email to

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