Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hiding complete source blocks #28

Open
alwyn opened this issue Mar 2, 2020 · 3 comments
Open

Support hiding complete source blocks #28

alwyn opened this issue Mar 2, 2020 · 3 comments

Comments

@alwyn
Copy link

alwyn commented Mar 2, 2020

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
Copy link
Author

alwyn commented Mar 3, 2020

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

@Inc0n
Copy link

Inc0n commented May 18, 2022

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

@eyJhb
Copy link

eyJhb commented Oct 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants