A bug in livemd mode has been fixed
This commit is contained in:
parent
25eb2facdf
commit
85eb203e1a
|
@ -33,6 +33,7 @@
|
||||||
'common-lisp
|
'common-lisp
|
||||||
'python
|
'python
|
||||||
'arduino
|
'arduino
|
||||||
|
'racket
|
||||||
'irc
|
'irc
|
||||||
'latex)
|
'latex)
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
(depends-on 'flycheck-clojure)
|
(depends-on 'flycheck-clojure)
|
||||||
(depends-on 'clj-refactor)
|
(depends-on 'clj-refactor)
|
||||||
(depends-on 'let-alist)
|
(depends-on 'let-alist)
|
||||||
(depends-on 'flycheck-clojure)
|
|
||||||
(depends-on 'clojure-mode-extra-font-locking)
|
(depends-on 'clojure-mode-extra-font-locking)
|
||||||
|
|
||||||
;(depends-on 'core-async-mode)
|
;(depends-on 'core-async-mode)
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Realtime Markdown previews for Emacs.
|
;; Realtime Markdown previews for Emacs.
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup livemd nil
|
(defgroup livemd nil
|
||||||
"Realtime Markdown previews"
|
"Realtime Markdown previews"
|
||||||
:group 'livemd
|
:group 'livemd
|
||||||
|
@ -49,15 +48,7 @@
|
||||||
(defun livemd-preview ()
|
(defun livemd-preview ()
|
||||||
"Preview the current file in livemd."
|
"Preview the current file in livemd."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
||||||
(call-process-shell-command (format "livedown stop --port %s &" livemd-port))
|
(call-process-shell-command (format "livedown stop --port %s &" livemd-port))
|
||||||
|
|
||||||
(message (format "%s start %s --port %s %s %s "
|
|
||||||
livedown-path
|
|
||||||
buffer-file-name
|
|
||||||
livemd-port
|
|
||||||
(if livemd-browser (concat "--browser " livemd-browser) "")
|
|
||||||
(if livemd-open "--open" "")))
|
|
||||||
(start-process-shell-command
|
(start-process-shell-command
|
||||||
"livedown"
|
"livedown"
|
||||||
"*fg42-livemd-buffer*"
|
"*fg42-livemd-buffer*"
|
||||||
|
@ -66,9 +57,11 @@
|
||||||
buffer-file-name
|
buffer-file-name
|
||||||
livemd-port
|
livemd-port
|
||||||
(if livemd-browser (concat "--browser " livemd-browser) "")
|
(if livemd-browser (concat "--browser " livemd-browser) "")
|
||||||
(if livemd-open "--open" ""))))
|
(if livemd-open "--open" "")))
|
||||||
|
|
||||||
|
(add-hook 'kill-emacs-query-functions (lambda () (livemd-kill t)))
|
||||||
|
(print (format "%s rendered @ %s" buffer-file-name livemd-port) (get-buffer "emacs-livemd-buffer")))
|
||||||
|
|
||||||
;; (print (format "%s rendered @ %s" buffer-file-name livemd-port) (get-buffer "emacs-livemd-buffer")))
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun livemd-kill (&optional async)
|
(defun livemd-kill (&optional async)
|
||||||
"Stop the livemd process ASYNC or otherwise."
|
"Stop the livemd process ASYNC or otherwise."
|
||||||
|
@ -76,11 +69,6 @@
|
||||||
(let ((stop-livemd (if async 'async-shell-command 'call-process-shell-command)))
|
(let ((stop-livemd (if async 'async-shell-command 'call-process-shell-command)))
|
||||||
(funcall stop-livemd (format "%s stop --port %s &" livedown-path livemd-port))))
|
(funcall stop-livemd (format "%s stop --port %s &" livedown-path livemd-port))))
|
||||||
|
|
||||||
(if livemd-autostart
|
|
||||||
(eval-after-load 'markdown-mode '(livemd-preview)))
|
|
||||||
|
|
||||||
(add-hook 'kill-emacs-query-functions (lambda () (livemd-kill t)))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'extensions/development/livemd)
|
(provide 'extensions/development/livemd)
|
||||||
;;; livemd.el ends here
|
;;; livemd.el ends here
|
||||||
|
|
Loading…
Reference in New Issue