[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-transclusion 56f5c4602c 2/2: fix: follow-up on the
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-transclusion 56f5c4602c 2/2: fix: follow-up on the previous fix |
Date: |
Wed, 29 Dec 2021 12:57:38 -0500 (EST) |
branch: externals/org-transclusion
commit 56f5c4602c3a4a64b97edad9581b5040a436ef2a
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix: follow-up on the previous fix
The previous one does not address the case where the second Emacs session
was a
manual one not batch job for make, etc. The second call to remove-all is
good
as it address the issue of live-sync mentioned in the docstring as well as
this
new case that is now identified for the second Emacs session.
---
org-transclusion.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/org-transclusion.el b/org-transclusion.el
index a0f351c0e7..cee7d0f9e0 100644
--- a/org-transclusion.el
+++ b/org-transclusion.el
@@ -741,20 +741,18 @@ set in `before-save-hook'. It also move the point back to
"Remove transclusions before `kill-buffer' or `kill-emacs'.
Intended to be used with `kill-buffer-hook' and `kill-emacs-hook'
to clear the file of the transcluded text regions. This function
-also flags the buffer modified and `save-buffer'. Calling
-`save-buffer' after remove-all and live-sync ensures the clearing
-process to occur. This is reqiured because during live-sync,
-some hooks that manage the clearing process are temporarily
-turned off (removed)."
+also flags the buffer modified and `save-buffer'. Calling the
+second `org-transclusion-remove-all' ensures the clearing process
+to occur. This is reqiured because during live-sync, some hooks
+that manage the clearing process are temporarily turned
+off (removed)."
;; Remove transclusions first. To deal with an edge case where transclusions
;; were added for a capture buffer -- e.g. `org-capture' or
`org-roam-catpure'
;; --, check is done for `buffer-file-name' to see if there is a file visited
;; by the buffer. If a "temp" buffer, there is no file being visited.
(when (and (org-transclusion-remove-all)
- (buffer-file-name)
- (buffer-modified-p))
- (restore-buffer-modified-p t)
- (save-buffer)))
+ (buffer-file-name))
+ (org-transclusion-remove-all)))
;;;;---------------------------------------------------------------------------
;;;; Functions for Transclude Keyword