about summary refs log tree commit diff
path: root/tools/emacs/config
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-11T17·32+0100
committerVincent Ambo <mail@tazj.in>2020-06-11T17·32+0100
commit820f591cbbf911f881d5735358cd448df3eef0a7 (patch)
tree0b19ee07d975c45e7873d7b2903eab58e4be8c92 /tools/emacs/config
parent9ed7f13ab99dda722bb43d86fdcec71324c3664f (diff)
chore(tools/emacs): Remove unused #'notmuch-depot-apply-patch r/893
Diffstat (limited to 'tools/emacs/config')
-rw-r--r--tools/emacs/config/functions.el23
1 files changed, 1 insertions, 22 deletions
diff --git a/tools/emacs/config/functions.el b/tools/emacs/config/functions.el
index 24d998ed9e37..cc94cc287b62 100644
--- a/tools/emacs/config/functions.el
+++ b/tools/emacs/config/functions.el
@@ -43,7 +43,7 @@
 ;; Open my monorepo in magit
 (defun depot-status ()
   (interactive)
-  (magit-status "~/depot"))
+  (magit-status "/depot"))
 
 ;; Get the nix store path for a given derivation.
 ;; If the derivation has not been built before, this will trigger a build.
@@ -242,27 +242,6 @@
   (if prefix (text-scale-adjust 0)
     (set-face-attribute 'default nil :height (or to 120))))
 
-(defun notmuch-depot-apply-patch ()
-  "Apply the currently opened notmuch message as a patch on the
-  depot."
-
-  (interactive)
-  ;; The implementation works by letting notmuch render a raw message
-  ;; and capturing it by overriding the `view-buffer' function it
-  ;; calls after rendering.
-  ;;
-  ;; The buffer is then passed to `git-am'.
-  (cl-letf (((symbol-function 'view-buffer)
-             (lambda (buffer &optional exit-action) buffer)))
-    (if-let ((raw-buffer (notmuch-show-view-raw-message)))
-        (progn
-          (with-current-buffer raw-buffer
-            (call-shell-region (point-min) (point-max) "git am -C ~/depot")
-            (message "Patch applied!")
-            (kill-buffer))
-          (magit-status "~/depot"))
-      (warn "notmuch failed to render the raw message buffer"))))
-
 (defun scrot-select ()
   "Take a screenshot based on a mouse-selection and save it to
   ~/screenshots."