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

issue with org-hide-emphasis-markers #74

Closed
emacsbliss opened this issue Jan 16, 2024 · 6 comments
Closed

issue with org-hide-emphasis-markers #74

emacsbliss opened this issue Jan 16, 2024 · 6 comments

Comments

@emacsbliss
Copy link

emacsbliss commented Jan 16, 2024

It maybe somewhat related to #56 but I'm not entirely sure.

Basically say I have following function to setup things before presentation starts:

(defun my/present-start ()
  (setq-local org-hide-emphasis-markers t))

and following one to revert the settings:

(defun my/present-stop ()
  (setq-local org-hide-emphasis-markers nil))

then configure package as below:

(use-package org-tree-slide
  :straight t
  :commands (org-tree-slide-mode)
  :custom
  (org-tree-slide-heading-emphasis t)
  (org-tree-slide-cursor-init t)
  (org-tree-slide-slide-in-effect t)
  (org-tree-slide-modeline-display nil)
  (org-tree-slide-activate-message " ")
  (org-tree-slide-deactivate-message " ")
  :config
  :hook (org-tree-slide-play . my/present-start)
  :hook (org-tree-slide-stop . my/present-stop))

Then we I start the presentation with command org-tree-slide-mode, I can still see things like =key=, which should be rendered as key (with different font face).

I tried org-present and it works.

In my org mode configuration, I have org-hide-emphasis-markers set to nil by default since I only want this behavior during presentation.

M-x emacs-version produces this:

GNU Emacs 29.1.90 (build 1, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2 (Build 23C64)) of 2023-12-16

Could you help with this? Thanks!

@takaxp
Copy link
Owner

takaxp commented Jan 17, 2024

Are you using DOOM?

@emacsbliss
Copy link
Author

no, I'm using configuration I build myself..

@takaxp
Copy link
Owner

takaxp commented Jan 17, 2024

Thanks, I'll try to investigate the issue.

@takaxp
Copy link
Owner

takaxp commented Jan 17, 2024

BTW, I'm currently using https://github.com/awth13/org-appear to hide the markups.

@takaxp
Copy link
Owner

takaxp commented Jan 17, 2024

The following code works for me.

  1. enable font-lock-mode
  2. call font-lock-flush after changing org-hide-emphasis-markers
  3. use proper hooks org-tree-slide-play-hook and org-tree-slide-stop-hook (maybe not appropriate comment since I'm not familiar to use-package.el)
(defun my-present-start ()
  (setq org-hide-emphasis-markers t)
  (font-lock-flush))
(defun my-present-stop ()
  (setq org-hide-emphasis-markers nil)
  (font-lock-flush))

(setq org-tree-slide-heading-emphasis t)
(setq org-tree-slide-cursor-init t)
(setq org-tree-slide-slide-in-effect t)
(setq org-tree-slide-modeline-display nil)
(setq org-tree-slide-activate-message " ")
(setq org-tree-slide-deactivate-message " ")

(add-hook 'org-tree-slide-play-hook #'my-present-start)
(add-hook 'org-tree-slide-stop-hook #'my-present-stop)
(add-hook 'org-mode-hook #'turn-on-font-lock)

@emacsbliss
Copy link
Author

great, this works! thanks a lot!

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

2 participants