[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-auto-tangle d3036a040a 12/56: moved the method definat
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-auto-tangle d3036a040a 12/56: moved the method definations to top level to remove error warnings |
Date: |
Mon, 6 Jun 2022 11:58:52 -0400 (EDT) |
branch: elpa/org-auto-tangle
commit d3036a040a4f9a448e3c1317a1d46b7e9886b1d8
Author: Unknown <domatropic@localhost.localdomain>
Commit: Unknown <domatropic@localhost.localdomain>
moved the method definations to top level to remove error warnings
---
org-auto-tangle.el | 53 +++++++++++++++++++++++++++--------------------------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index 08bcd19fe0..781c8452d4 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -59,35 +59,36 @@
:type 'boolean
:group 'auto-tangle)
+(defun org-auto-tangle-find-value (buffer)
+ "Search the `auto_tangle' property in BUFFER and extracts it when found."
+ (with-current-buffer buffer
+ (save-restriction
+ (widen)
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "^#\\+auto_tangle: \\(.*\\)" nil :noerror)
+ (match-string 1))))))
+
+(defun org-auto-tangle-async (file)
+ "Invoke `org-babel-tangle-file' asynchronously."
+ (message "Tangling %s..." (buffer-file-name))
+ (async-start
+ (let ((args (list file)))
+ `(lambda ()
+ (require 'org)
+ (let ((start-time (current-time)))
+ (apply #'org-babel-tangle-file ',args)
+ (format "%.2f" (float-time (time-since start-time))))))
+ (let ((message-string (format "Tangling %S completed after " file)))
+ `(lambda (tangle-time)
+ (message (concat ,message-string
+ (format "%s seconds" tangle-time)))))))
+
+
+
(add-hook 'org-mode-hook
(lambda ()
(when org-auto-tangle-tangle-on-save
- (defun org-auto-tangle-find-value (buffer)
- "Search the `auto_tangle' property in BUFFER and extracts it
when found."
- (with-current-buffer buffer
- (save-restriction
- (widen)
- (save-excursion
- (goto-char (point-min))
- (when (re-search-forward "^#\\+auto_tangle: \\(.*\\)" nil
:noerror)
- (match-string 1))))))
-
-
- (defun org-auto-tangle-async (file)
- "Invoke `org-babel-tangle-file' asynchronously."
- (message "Tangling %s..." (buffer-file-name))
- (async-start
- (let ((args (list file)))
- `(lambda ()
- (require 'org)
- (let ((start-time (current-time)))
- (apply #'org-babel-tangle-file ',args)
- (format "%.2f" (float-time (time-since start-time))))))
- (let ((message-string (format "Tangling %S completed after "
file)))
- `(lambda (tangle-time)
- (message (concat ,message-string
- (format "%s seconds" tangle-time)))))))
-
(add-hook 'after-save-hook
(lambda () (when (and (org-auto-tangle-find-value
(current-buffer))
(not (string=
(org-auto-tangle-find-value(current-buffer)) "nil")))
- [nongnu] elpa/org-auto-tangle 7896c0efe0 11/56: Merge pull request #1 from syohex/dependencies, (continued)
- [nongnu] elpa/org-auto-tangle 7896c0efe0 11/56: Merge pull request #1 from syohex/dependencies, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 0add68b91c 17/56: corrected the doc string issue raised by checkdoc, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle b23eafd743 05/56: corrected the variable name in conditialal when, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 0e67925941 06/56: removed unecessary line space in the code block, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ac0458b251 10/56: Add package dependency to Package-Requires header, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 34e63c2754 23/56: matched license in org-auto-tangle.el match that of License.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5ffbe41243 39/56: Add org-auto-tangle-default variable, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ec4341f844 47/56: moved (require 'org) to global instead of inline, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5da721fff9 40/56: Update readme to correct grammatical issues., ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle fbdd38d11e 55/56: Added Safe-list usage to readme, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle d3036a040a 12/56: moved the method definations to top level to remove error warnings,
ELPA Syncer <=
- [nongnu] elpa/org-auto-tangle 2e4a664210 19/56: moved the anonymous function inside the hooks to a named function, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle eed3601f4b 25/56: added syntax highlighting and some spelling corrections, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ade8d90ecf 34/56: changed quotes for functions with a sharp quote, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle dc7eb11e6a 45/56: Merge pull request #7 from zzamboni/master, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5d9f2734c9 54/56: Update License.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle cedd4dc41f 46/56: Update org-auto-tangle.el, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 6c0786d863 14/56: modified the readme to reflect the changes, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 70e5e3d131 13/56: move the whole thing into a minor mode, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 2e97156230 32/56: Merge pull request #2 from kamoii/patch-1, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle be9007a23a 43/56: corrected the arguments to org-auto-tangle-find-value function call, ELPA Syncer, 2022/06/06