Skip to content

Make hooks to set up extensions removable #261

Description

@josephmturner

Hi @nobiot!

@riscy suggested in this comment that hyperdrive-org-transclusion add hooks in a mode or setup function so that merely requiring the library doesn't irrevocably affect the Emacs runtime. After reading Chris's comment, I moved the add-hook form into a minor mode which can be disabled to remove the hook.

Would you be open to making a change like this in org-transclusion so that the built-in extensions can be enabled/disabled with autoloaded minor modes?

The downside I see is that the setup instructions would have to change. For example, setting up org-transclusion-indent-mode extension would require users to change

(with-eval-after-load 'org-transclusion
     (add-to-list 'org-transclusion-extensions 'org-transclusion-indent-mode)
     (require 'org-transclusion-indent-mode))

to

(with-eval-after-load 'org-transclusion
    (org-transclusion-indent-mode +1))

I'm willing to draft a patchset. Are you open to such a breaking change?

Thank you!

Joseph

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions