-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Reducing the clutter #13
Comments
Thank you for providing nice comments. I would like to understand your requests in detail. Comment 1: Hiding tree contains COMMET In my understanding, the heading with COMMENT will skip when you move slides. But the heading will appear in the children like:
Your mean line Comment 2: lines starting with "#" should not be shown when org-tree-slide is active You mean it should not be shown like HTML export, right? Comment 3: drawers should not be shown when org-tree-slide is active You mean it should not be shown like HTML export too, right? Comment 4: related org-babel Sorry, I cannot understand the situation. Could you provide some examples? Best, |
Thanks for breaking down my requests. Comment 1: Yes, that's correct.
The problem with the example above is that the code is also shown when
The example above is cleaner. Now, if one needs to edit or show the code during the presentation, s/he could either (1) toggle the code back on with some key-binding, or (2) set the option per entry, like:
Or customize the variable: (setq org-tree-slide-show-code t). |
Is there a variable that toggles visibility of source-blocks headings when in presentation mode? I find the #+BEGIN_SRC ... and the #+END_SRC distracting. |
Currently, not. You mean when you enter presentation mode, source codes should be displayed without any control commands like BEGIN_SRC? |
Exactly, for instance,
would be in presentation mode,
Any plans on adding this functionality? |
Dear nasseralkmim, I find a simple solution to your request. Please introduce (with-eval-after-load "org-tree-slide"
(when (require 'hide-lines nil t)
(defun my:hide-headers ()
(hide-lines-matching "#\\+BEGIN_SRC")
(hide-lines-matching "#\\+END_SRC"))
(add-hook 'org-tree-slide-play-hook 'my:hide-headers)
(add-hook 'org-tree-slide-stop-hook 'hide-lines-show-all))) |
I updated the above code. If you use the latest org-mode, background color can be changed by (with-eval-after-load "org-tree-slide"
(when (require 'hide-lines nil t)
(defvar my:org-src-block-faces nil)
(defun my:show-headers ()
(setq org-src-block-faces 'my:org-src-block-faces)
(hide-lines-show-all))
(defun my:hide-headers ()
(setq my:org-src-block-faces 'org-src-block-faces)
(setq org-src-block-faces
'(("emacs-lisp" (:background "cornsilk"))))
(hide-lines-matching "#\\+BEGIN_SRC")
(hide-lines-matching "#\\+END_SRC"))
(add-hook 'org-tree-slide-play-hook 'my:hide-headers)
(add-hook 'org-tree-slide-stop-hook 'my:show-headers))) |
I updated it again because content of source block will gone when you edit it by (with-eval-after-load "org-tree-slide"
(when (require 'hide-lines nil t)
(defvar my:org-src-block-faces nil)
(defun my:show-headers ()
(setq org-src-block-faces 'my:org-src-block-faces)
(hide-lines-show-all))
(defun my:hide-headers ()
(setq my:org-src-block-faces 'org-src-block-faces)
(setq org-src-block-faces
'(("emacs-lisp" (:background "cornsilk"))))
(hide-lines-matching "#\\+BEGIN_SRC")
(hide-lines-matching "#\\+END_SRC"))
(add-hook 'org-tree-slide-play-hook 'my:hide-headers)
(add-hook 'org-tree-slide-stop-hook 'my:show-headers)
(defun advice:org-edit-src-code (&optional code edit-buffer-name)
(interactive)
(my:show-headers))
(advice-add 'org-edit-src-code :before #'advice:org-edit-src-code)
(defun advice:org-edit-src-exit ()
(interactive)
(my:hide-headers))
(advice-add 'org-edit-src-exit :after #'advice:org-edit-src-exit))) |
I was experiencing the exact behavior you described, now its gone. Thank you for this package, it's great! |
My pleasure. I'll update this package step by step but continuously :-) |
A hint to hide :PROPERTIES: in a slide: |
Gentle nudge that these would be great enhancments for this wonderful package. Thanks so much for your work on this! |
This version seems to be working for me, aside baking-in my favoritisim for
|
|
Thank you so much! :) As part of preparing for EmacsConf I rolled comments from this thread into an init-script. I'll eagerly be watching for your other ideas. to
https://gitlab.com/mplscorwin/dotfiles/-/blob/master/elisp/init-slideshow.el EDIT to reformat above, and add: I did a little more work on this. It may be a good source of inspiration or short term approach. It will:
|
See you in EmacsConf :) |
The variable
org-tree-slide-skip-comments
only skips the content of the** COMMENT
entry, but not the headline itself. I think it would make more sense to hide it completely. I was also expecting#
(comment-dwin
) and property drawers to hide, but they didn't.Using org-babel with large fonts didn't work too well. The screen gets too cluttered. It would be nice to be able to toggle anything that begins with
#+
, although maybe not#+caption
and#+tblname
.The text was updated successfully, but these errors were encountered: