From 7e3849be670e05c17a123d199e02a25bfd71025b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 20 Oct 2019 12:51:33 -0400 Subject: [PATCH] lang/org: remove unnecessary toc-org advice It was initially written to avoid the cursor hopping about the buffer when regenerating the table of contents. This isn't really an issue anymore. Although, I would like to prevent emacs from adding adding an undo step when it is regenerated... --- modules/lang/org/config.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 6cab4b62e..76de3c19b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -878,12 +878,7 @@ compelling reason, so..." ;;; Packages (after! toc-org - (setq toc-org-hrefify-default "gh") - (defadvice! +org--unfold-toc-a (&rest _) - :before #'toc-org-insert-toc - (save-excursion - (when (re-search-forward toc-org-toc-org-regexp (point-max) t) - (+org/open-fold))))) + (setq toc-org-hrefify-default "gh")) (use-package! org-pdfview :when (featurep! :tools pdf)