aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--elisp/journalctl.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/elisp/journalctl.el b/elisp/journalctl.el
index f36ebc1..c95c564 100644
--- a/elisp/journalctl.el
+++ b/elisp/journalctl.el
@@ -148,21 +148,6 @@ It seems I must kill the buffer for tramp to behave correctly on the new calls."
(delq nil)
(completing-read "Unit: ")))))
-(defun journalctl (host options)
- "Query the log of HOST given OPTIONS."
- (interactive
- (let* ((picked-host (completing-read "Tramp host: " journalctl-hosts))
- (default-options `(("--unit" ,(journalctl-system-units picked-host)) ("--follow"))))
- (list picked-host default-options)))
- (let ((buffer (journalctl--clean-buffer))
- (default-directory host))
- (apply #'start-file-process "Journal" buffer "journalctl" (flatten-tree options))
- (with-current-buffer buffer
- (journalctl-mode)
- (setq-local journalctl-current-host host)
- (setq-local journalctl-current-opts options))
- (switch-to-buffer buffer)))
-
(defun journalctl-remove-opt (opt)
"Remove an OPT flag from the journal query."
(interactive (list (completing-read "remove option" (mapcar #'car journalctl-current-opts) nil t)))
@@ -219,6 +204,21 @@ If OPT is set, remove this option."
map)
"Keymap for journalctl mode.")
+(defun journalctl (host options)
+ "Query the log of HOST given OPTIONS."
+ (interactive
+ (let* ((picked-host (completing-read "Tramp host: " journalctl-hosts))
+ (default-options `(("--unit" ,(journalctl-system-units picked-host)) ("--follow"))))
+ (list picked-host default-options)))
+ (let ((buffer (journalctl--clean-buffer))
+ (default-directory host))
+ (apply #'start-file-process "Journal" buffer "journalctl" (flatten-tree options))
+ (with-current-buffer buffer
+ (journalctl-mode)
+ (setq-local journalctl-current-host host)
+ (setq-local journalctl-current-opts options))
+ (switch-to-buffer buffer)))
+
;;;###autoload
(define-derived-mode journalctl-mode fundamental-mode "journalctl"
"Major mode for viewing journalctl output."