-
Notifications
You must be signed in to change notification settings - Fork 413
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
Promote a subset of the files + emacs integration #1192
Changes from all commits
42b8749
f10e77f
7c2834e
b037c83
dc1d1c2
c5f88fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
;;; dune.el --- Align words in an intelligent way | ||
|
||
;; Copyright 2018 Jane Street Group, LLC <opensource@janestreet.com> | ||
;; URL: https://github.com/ocaml/dune | ||
;; Version: 1.0 | ||
|
||
;;; Commentary: | ||
|
||
;; This package provides helper functions for interacting with the | ||
;; dune build system from emacs. | ||
|
||
;; Installation: | ||
;; You need to install the OCaml program ``dune''. The | ||
;; easiest way to do so is to install the opam package manager: | ||
;; | ||
;; https://opam.ocaml.org/doc/Install.html | ||
;; | ||
;; and then run "opam install dune". | ||
|
||
;;; Code: | ||
|
||
(defgroup dune nil | ||
"Integration with the dune build system." | ||
:tag "Dune build system." | ||
:version "1.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This version is for melpa, the emacs package manager. It needs to be in plain text in the git repository (melpa will fetch it directly from github). It also needs to be independent of the main dune version, otherwise this will cause a lot of spurious upgrades for emacs users. |
||
:group 'align) | ||
|
||
(defcustom dune-command "dune" | ||
"The dune command." | ||
:type 'string | ||
:group 'dune) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I didn't know that. Could you submit a PR to remove them? |
||
|
||
;;;###autoload | ||
(defun dune-promote () | ||
"Promote the correction for the current file." | ||
(interactive) | ||
(if (buffer-modified-p) | ||
(error "Cannot promote as buffer is modified.") | ||
(shell-command | ||
(format "%s promote %s" | ||
dune-command | ||
(file-name-nondirectory (buffer-file-name)))) | ||
(revert-buffer nil t))) | ||
|
||
;;;###autoload | ||
(defun dune-runtest-and-promote () | ||
"Run tests in the current directory and promote the current buffer." | ||
(interactive) | ||
(compile (format "%s build @@runtest" dune-command)) | ||
(dune-promote)) | ||
|
||
(provide 'dune) | ||
|
||
;;; dune.el ends here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark about
subst
.