Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the buffer's last command for recompile #58

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changelog.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- Kill process if it's still running before starting a new one in the same
buffer.
- Bugfix: Use the buffer's last command for recompile, not the last one across
all buffers.

* 0.14

Expand Down
2 changes: 1 addition & 1 deletion justl.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
;; buffer via `justl-recipe width`. By default it has a value of 20.
;;
;; You can change the shell between `eshell' and `vterm' using the `justl-shell'
;; variable. Using vterm requires the `vterm' package to be installed.

Check warning on line 67 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

There should be two spaces after a period

Check warning on line 67 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

There should be two spaces after a period

Check warning on line 67 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

There should be two spaces after a period

Check warning on line 67 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

There should be two spaces after a period
;;

;;; Code:
Expand Down Expand Up @@ -119,7 +119,7 @@

(defcustom justl-shell 'eshell
"Shell to use when running recipes.
Can be either Eshell or vterm. Using vterm requires the vterm package to

Check warning on line 122 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

There should be two spaces after a period

Check warning on line 122 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

There should be two spaces after a period

Check warning on line 122 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

There should be two spaces after a period

Check warning on line 122 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

There should be two spaces after a period
be installed."
:type '(choice (const eshell)
(const vterm)))
Expand Down Expand Up @@ -242,7 +242,7 @@
(eq compilation-scroll-output 'first-error))
(set (make-local-variable 'compilation-auto-jump-to-next) t)))))

(defvar justl--compile-command nil
(defvar-local justl--compile-command nil
"Last shell command used to do a compilation; default for next compilation.")

(defun justl--make-process (command &optional args)
Expand Down Expand Up @@ -538,10 +538,10 @@
(interactive)
(unless (require 'vterm nil t)
(user-error "Package `vterm' was not found!"))
(let* ((recipe (justl--get-recipe-under-cursor))

Check warning on line 541 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

Unused lexical variable ‘vterm-buffer-name’
(vterm-buffer-name (format "justl - vterm - %s" (justl--recipe-name recipe)))

Check warning on line 542 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

Unused lexical variable ‘vterm-buffer-name’

Check warning on line 542 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

Unused lexical variable ‘vterm-buffer-name’

Check warning on line 542 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

Unused lexical variable ‘vterm-buffer-name’
(default-directory (f-dirname justl-justfile)))
(vterm)

Check warning on line 544 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

the function ‘vterm’ is not known to be defined.

Check warning on line 544 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

the function ‘vterm’ is not known to be defined.

Check warning on line 544 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

the function ‘vterm’ is not known to be defined.

Check warning on line 544 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

the function ‘vterm’ is not known to be defined.

(let* ((recipe-name (justl--recipe-name recipe))
(recipe-args (justl--recipe-args recipe))
Expand All @@ -550,9 +550,9 @@
(append transient-args
(list recipe-name)
(mapcar 'justl--arg-default recipe-args)))))
(vterm-insert (string-join args-list " ")))

Check warning on line 553 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

the function ‘vterm-insert’ is not known to be defined.

Check warning on line 553 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

the function ‘vterm-insert’ is not known to be defined.

Check warning on line 553 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

the function ‘vterm-insert’ is not known to be defined.

Check warning on line 553 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

the function ‘vterm-insert’ is not known to be defined.
(unless no-send
(vterm-send-return))))

Check warning on line 555 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.3, false)

the function ‘vterm-send-return’ is not known to be defined.

Check warning on line 555 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.2, false)

the function ‘vterm-send-return’ is not known to be defined.

Check warning on line 555 in justl.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

the function ‘vterm-send-return’ is not known to be defined.

Check warning on line 555 in justl.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

the function ‘vterm-send-return’ is not known to be defined.

(defun justl-no-exec-vterm ()
"Open vterm with the recipe but do not execute it."
Expand Down
Loading