org-present icon indicating copy to clipboard operation
org-present copied to clipboard

Support hiding complete source blocks

Open alwyn opened this issue 4 years ago • 3 comments

Hi,

I am currently using source blocks to generate plantuml diagrams. Ideally I do not want to see the source blocks in my presentation.

I'm thinking hiding all of them would not work that well since you may have a mix of different types of blocks, some of which you want to see the source.

Maybe we need some kind of marker to indicate which source blocks should be hidden?

I do not know much about the functions org provide or elisp for that matter, please correct me if there's another way of doing this.

alwyn avatar Mar 02 '20 16:03 alwyn

Of course there is an easy workaround for my case which is to generate the images externally.

alwyn avatar Mar 03 '20 16:03 alwyn

It may be worthy consider using a workaround, i.e. to collaspe all src blocks when org-present is enabled.

Inc0n avatar May 18 '22 00:05 Inc0n

I've made this, which does not hide it, but just folds it.

  (defun eyjhb/org-present-hide-plantuml ()
    (interactive)
    (beginning-of-buffer)
    (while (re-search-forward "begin_src plantuml" nil t) (org-fold-hide-block-toggle t)))

Could be run as a hook or something. Still trying to figure out how I want everything to work, but thought this might be useful for someone else.

This is ran after the buffer is narrowed.

eyJhb avatar Oct 10 '23 15:10 eyJhb