summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/mm-projects.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/modules/mm-projects.el')
-rw-r--r--.config/emacs/modules/mm-projects.el56
1 files changed, 33 insertions, 23 deletions
diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el
index be80789..02d7af4 100644
--- a/.config/emacs/modules/mm-projects.el
+++ b/.config/emacs/modules/mm-projects.el
@@ -19,24 +19,19 @@ This is intended to be called interactively via
(project-find-file "Find File" ?f)
(mm-projects-project-magit-status "Git Status" ?s)))
:config
- (unless mm-darwin-p
+ (unless mm-humanwave-p
(if-let ((repo-directory (getenv "REPODIR")))
- (with-eval-after-load 'async
- (async-start
- (lambda ()
- (require 'project)
- (let* ((list-dir
- (lambda (path)
- (directory-files path :full "\\`[^.]")))
- (directories
- (cl-loop for author in (funcall list-dir (getenv "REPODIR"))
- append (cl-loop for path in (funcall list-dir author)
- collect (list (concat path "/"))))))
- (with-temp-buffer
- (prin1 directories (current-buffer))
- (write-file project-list-file))))
- (lambda (_proc)
- (project--read-project-list))))
+ (let* ((list-dir
+ (lambda (path)
+ (directory-files path :full "\\`[^.]")))
+ (directories
+ (cl-loop for author in (funcall list-dir (getenv "REPODIR"))
+ append (cl-loop for path in (funcall list-dir author)
+ collect (list (concat path "/"))))))
+ (with-temp-buffer
+ (prin1 directories (current-buffer))
+ (write-file project-list-file))
+ (project--read-project-list))
(warn "The REPODIR environment variable is not set."))))
@@ -52,9 +47,10 @@ This is intended to be called interactively via
(use-package magit
:ensure t
- :bind ( :map magit-status-mode-map
- ("[" . magit-section-backward-sibling)
- ("]" . magit-section-forward-sibling))
+ :bind (("C-c b" . magit-blame-addition)
+ :map magit-status-mode-map
+ ("[" . magit-section-backward-sibling)
+ ("]" . magit-section-forward-sibling))
:custom
(git-commit-style-convention-checks
'(non-empty-second-line overlong-summary-line))
@@ -75,11 +71,18 @@ This is intended to be called interactively via
"push" "-v" args remote
(format "refs/heads/%s:refs/heads/%s" branch branch)))))
(transient-append-suffix #'magit-push '(1 -1)
- '("a" "all remotes" mm-projects-magit-push-current-to-all-remotes)))
+ '("a" "all remotes" mm-projects-magit-push-current-to-all-remotes))
+ (add-to-list 'magit-blame-styles
+ '(margin
+ (show-lines . t)
+ (margin-format . (" %C %a" " %s%f" " "))
+ (margin-width . 73)
+ (margin-face . magit-blame-margin)
+ (margin-body-face . (magit-blame-dimmed)))))
(use-package magit-repos
:ensure nil ; Part of ‘magit’
- :if (not mm-darwin-p)
+ :if (not mm-humanwave-p)
:commands (magit-list-repositories)
:init
(if-let ((directory (getenv "REPODIR")))
@@ -101,4 +104,11 @@ This is intended to be called interactively via
(require 'ansi-color)
(add-hook 'compilation-filter-hook #'ansi-color-compilation-filter))
-(provide 'mm-projects) \ No newline at end of file
+
+;;; GitHub Pull Requests
+
+(require 'gh)
+(keymap-global-set "C-c p c" #'gh-create-pr)
+(keymap-global-set "C-c p o" #'gh-open-previous-pr)
+
+(provide 'mm-projects)