[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 215de6176b: Partially revert "org-mode: Make local
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 215de6176b: Partially revert "org-mode: Make local variables effective during Org startup" |
Date: |
Fri, 5 Aug 2022 07:58:13 -0400 (EDT) |
branch: externals/org
commit 215de6176b22a0d22af59fd1286a87cbddde5a0b
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Partially revert "org-mode: Make local variables effective during Org
startup"
This reverts commit e22b4eb7aab9668826dc8ba76ea1d1d7b144a856.
See
https://list.orgmode.org/87r11wkmew.fsf@ucl.ac.uk/T/#mab6359ed2107d5515c6bb6b266551f0c5049ceca
The problem with the commit is that correctly loading local variables
early requires re-implementing all the built-in tricks done by Emacs,
like not enabling local variables in temp buffers or non-file buffers.
In addition, even if we call `hack-local-variables' manually, Emacs
will repeat the normal call later, possibly asking for non-safe
variables twice.
In conclusion, the whole idea of manual triggering local variables is
fragile and should better be handled by Emacs itself via stable API.
testing/.dir-locals.el is kept.
---
lisp/org.el | 64 +++++++++++++++++++++-----------------------------
testing/.dir-locals.el | 5 ----
2 files changed, 27 insertions(+), 42 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 7da6f46b9f..4b14bcbf00 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4712,43 +4712,33 @@ The following commands are available:
\\{org-mode-map}"
(setq-local org-mode-loading t)
- ;; Disable `font-lock-mode' temporarily to delay fontification in case if
- ;; `hack-local-variables' shows a popup window. Such a popup causes
- ;; redisplay and triggers fontification too early.
- (let ((org-font-lock-enabled-p font-lock-mode))
- (font-lock-mode -1)
- ;; Apply file-local and directory-local variables, so that Org
- ;; startup respects them. See
- ;;
https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u
- (hack-local-variables 'ignore-mode-settings)
- (org-load-modules-maybe)
- (org-install-agenda-files-menu)
- (when (and org-link-descriptive
- (eq org-fold-core-style 'overlays))
- (add-to-invisibility-spec '(org-link)))
- (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal ""
org-ellipsis)) org-ellipsis)
- "..."))
- (make-local-variable 'org-link-descriptive)
- (when (eq org-fold-core-style 'overlays) (add-to-invisibility-spec
'(org-hide-block . t)))
- (if org-link-descriptive
- (org-fold-core-set-folding-spec-property (car
org-link--link-folding-spec) :visible nil)
- (org-fold-core-set-folding-spec-property (car
org-link--link-folding-spec) :visible t))
- (setq-local outline-regexp org-outline-regexp)
- (setq-local outline-level 'org-outline-level)
- (when (and (stringp org-ellipsis) (not (equal "" org-ellipsis)))
- (unless org-display-table
- (setq org-display-table (make-display-table)))
- (set-display-table-slot
- org-display-table 4
- (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis))
- org-ellipsis)))
- (setq buffer-display-table org-display-table))
- (org-set-regexps-and-options)
- (org-set-font-lock-defaults)
- (when (and org-tag-faces (not org-tags-special-faces-re))
- ;; tag faces set outside customize.... force initialization.
- (org-set-tag-faces 'org-tag-faces org-tag-faces))
- (font-lock-mode org-font-lock-enabled-p))
+ (org-load-modules-maybe)
+ (org-install-agenda-files-menu)
+ (when (and org-link-descriptive
+ (eq org-fold-core-style 'overlays))
+ (add-to-invisibility-spec '(org-link)))
+ (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal ""
org-ellipsis)) org-ellipsis)
+ "..."))
+ (make-local-variable 'org-link-descriptive)
+ (when (eq org-fold-core-style 'overlays) (add-to-invisibility-spec
'(org-hide-block . t)))
+ (if org-link-descriptive
+ (org-fold-core-set-folding-spec-property (car
org-link--link-folding-spec) :visible nil)
+ (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec)
:visible t))
+ (setq-local outline-regexp org-outline-regexp)
+ (setq-local outline-level 'org-outline-level)
+ (when (and (stringp org-ellipsis) (not (equal "" org-ellipsis)))
+ (unless org-display-table
+ (setq org-display-table (make-display-table)))
+ (set-display-table-slot
+ org-display-table 4
+ (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis))
+ org-ellipsis)))
+ (setq buffer-display-table org-display-table))
+ (org-set-regexps-and-options)
+ (org-set-font-lock-defaults)
+ (when (and org-tag-faces (not org-tags-special-faces-re))
+ ;; tag faces set outside customize.... force initialization.
+ (org-set-tag-faces 'org-tag-faces org-tag-faces))
;; Calc embedded
(setq-local calc-embedded-open-mode "# ")
;; Modify a few syntax entries
diff --git a/testing/.dir-locals.el b/testing/.dir-locals.el
deleted file mode 100644
index 6c957fc64a..0000000000
--- a/testing/.dir-locals.el
+++ /dev/null
@@ -1,5 +0,0 @@
-;;; Directory Local Variables
-;;; For more information see (info "(emacs) Directory Variables")
-
-;; Stub directory-local file to avoid tests being affected by upper-level
settings.
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 215de6176b: Partially revert "org-mode: Make local variables effective during Org startup",
ELPA Syncer <=