emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH 2-v1] New: auto display inline images under subtree when `org-cyc


From: Christopher M. Miles
Subject: [PATCH 2-v1] New: auto display inline images under subtree when `org-cycle'.
Date: Wed, 28 Sep 2022 20:55:00 +0800
User-agent: mu4e 1.8.9; emacs 29.0.50

Ok, I created the patch for subtree cycling display inline images.
Tested by edebug when org cycling, it should works fine. I don't know
how to write test for this.

But I got a little problem:

When ~org-fold-core-style~ is ~'overlays~, the ~delete-overlay~ will
cause subtree unfolded. More detailed check out the "org.el" function
~org-remove-inline-images~ in my patch.

Attachment: 0001-org.el-Support-auto-display-inline-images-when-cycli.patch
Description: Text Data

Ihor Radchenko <yantar92@gmail.com> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> I checked out your patch, it's fine to me. Should be fine to apply.
>
> Done.
> Applied onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=95df82c5fcf926088da2aaab9354a902956ae881
>
> Going back to cycling inline image visibility now.
>
> I think that the first step should be extending
> `org-remove-inline-images' and `org-display-inline-images' to work on
> regions. `org-display-inline-images' already provides BEG and END
> optional arguments, but it currently clears all the images in buffer
> unconditionally.
>
> We will need to make `org-remove-inline-images' work on region and
> modify `org-display-inline-images' to not affect images outside the
> provided region.
>
> Then, we can modify `org-toggle-inline-images' accordingly and make use
> of it in org-cycle.el to toggle images in section/subtree.


-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

Attachment: signature.asc
Description: PGP signature


reply via email to

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