projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
19740fc
)
[emacs][wip] a/async-babel-tangle: add option to byte-recompile-file
author
Amin Bandali
<bandali@gnu.org>
Mon, 24 Dec 2018 23:17:32 +0000
(18:17 -0500)
committer
Amin Bandali
<bandali@gnu.org>
Mon, 24 Dec 2018 23:17:32 +0000
(18:17 -0500)
init.org
patch
|
blob
|
blame
|
history
diff --git
a/init.org
b/init.org
index
3d29991
..
3cf7343
100644
(file)
--- a/
init.org
+++ b/
init.org
@@
-897,9
+897,12
@@
file.
(defvar a/show-async-tangle-time nil
"Show the time spent tangling the file.")
(defvar a/show-async-tangle-time nil
"Show the time spent tangling the file.")
- (defvar a/async-tangle-post-compile
"make ti"
+ (defvar a/async-tangle-post-compile
nil
"If non-nil, pass to `compile' after successful tangle.")
"If non-nil, pass to `compile' after successful tangle.")
+ (defvar a/async-tangle-byte-recompile t
+ "If non-nil, byte-recompile the file on successful tangle.")
+
(defun a/async-babel-tangle ()
"Tangle org file asynchronously."
(interactive)
(defun a/async-babel-tangle ()
"Tangle org file asynchronously."
(interactive)
@@
-907,7
+910,7
@@
file.
(file (buffer-file-name))
(file-nodir (file-name-nondirectory file))
;; (async-quiet-switch "-q")
(file (buffer-file-name))
(file-nodir (file-name-nondirectory file))
;; (async-quiet-switch "-q")
- )
+
(file-noext (file-name-sans-extension file))
)
(async-start
`(lambda ()
(require 'org)
(async-start
`(lambda ()
(require 'org)
@@
-916,6
+919,7
@@
file.
`(lambda (result)
(if result
(progn
`(lambda (result)
(if result
(progn
+ (setq byte-compile-warnings '(not noruntime unresolved))
(message "Tangled %s%s"
,file-nodir
(if a/show-async-tangle-time
(message "Tangled %s%s"
,file-nodir
(if a/show-async-tangle-time
@@
-924,7
+928,9
@@
file.
',file-tangle-start-time)))
""))
(when a/async-tangle-post-compile
',file-tangle-start-time)))
""))
(when a/async-tangle-post-compile
- (compile a/async-tangle-post-compile)))
+ (compile a/async-tangle-post-compile))
+ (when a/async-tangle-byte-recompile
+ (byte-recompile-file (concat ,file-noext ".el"))))
(message "Tangling %s failed" ,file-nodir))))))))
(add-to-list
(message "Tangling %s failed" ,file-nodir))))))))
(add-to-list
@@
-2432,6
+2438,6
@@
Display how long it took to load the init file.
* COMMENT Local Variables :ARCHIVE:
# Local Variables:
* COMMENT Local Variables :ARCHIVE:
# Local Variables:
-# eval:
;;
(add-hook 'after-save-hook #'a/async-babel-tangle 'append 'local)
+# eval: (add-hook 'after-save-hook #'a/async-babel-tangle 'append 'local)
# eval: (typo-mode -1)
# End:
# eval: (typo-mode -1)
# End: