Skip to content

consult-preview with poly-org don't work #47

@Cletip

Description

@Cletip

Hi everyone!

I was doing some testing, and it's impossible to get poly-org with the preview feature. I think the problem comes from the fact that consult needs, in the "consult-preview-allowed-hooks" variable, a function like "global-org-modern-mode-check-buffers", which means that poly-org must also be in "global" mode. I've already done this, but without success (and I don't understand why... perhaps I've misunderstood something).

(require 'poly-org)

(define-globalized-minor-mode global-poly-org-mode
  poly-org-mode poly-org--on
  :group 'poly-org
  )

(defun poly-org--on ()
  "Enable `org-modern' in every Org buffer."
  (when (derived-mode-p #'org-mode)
    (poly-org-mode)))
    
    ;; not activate poly-org with this temporaly
;;(setq auto-mode-alist (remove '("\\.org\\'" . poly-org-mode) auto-mode-alist))

(add-to-list 'consult-preview-allowed-hooks 'global-poly-org-mode-check-buffers)

Hope that can help ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions