emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dtache 1878cefb2f 038/158: Remove embark dependency


From: ELPA Syncer
Subject: [elpa] externals/dtache 1878cefb2f 038/158: Remove embark dependency
Date: Wed, 19 Jan 2022 18:57:43 -0500 (EST)

branch: externals/dtache
commit 1878cefb2f8075cb0c29cc6e1b516a58497f397b
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Remove embark dependency
---
 README.org       |  6 +++---
 dtache.el        | 15 +++++++++++++++
 embark-dtache.el | 56 --------------------------------------------------------
 guix.scm         |  2 --
 4 files changed, 18 insertions(+), 61 deletions(-)

diff --git a/README.org b/README.org
index 25c7f0773b..8e34f5c40c 100644
--- a/README.org
+++ b/README.org
@@ -115,11 +115,11 @@ Commands to be used in shell buffers.
 
 ** Embark
 
-Add [[https://github.com/oantolin/embark/][embark]] actions to 
=dtache-open-session=.
+Add [[https://github.com/oantolin/embark/][embark]] actions to 
=dtache-open-session= by adding the following to the configuration.
 
 #+begin_src elisp
-  (use-package embark-dtache
-    :after (dtache embark))
+  (defvar embark-dtache-map (make-composed-keymap dtache-action-map 
embark-general-map))
+  (add-to-list 'embark-keymap-alist '(dtache . embark-dtache-map))
 #+end_src
 
 * Tips & Tricks
diff --git a/dtache.el b/dtache.el
index 4e00d91dc8..00d5cf0142 100644
--- a/dtache.el
+++ b/dtache.el
@@ -79,6 +79,7 @@
   "Hooks to run when compiling a session.")
 (defvar dtache-metadata-annotators-alist nil
   "An alist of annotators for metadata.")
+
 (defvar dtache-annotation-format
   `((:width 3 :function dtache--active-str :face dtache-active-face)
     (:width 3 :function dtache--status-str :face dtache-failure-face)
@@ -90,6 +91,20 @@
     (:width 12 :function dtache--creation-str :face dtache-creation-face))
   "The format of the annotations.")
 
+(defvar dtache-action-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "c" #'dtache-compile-session)
+    (define-key map "d" #'dtache-remove-session)
+    (define-key map "i" #'dtache-insert-session-command)
+    (define-key map "k" #'dtache-kill-session)
+    (define-key map "o" #'dtache-open-output)
+    (define-key map "r" #'dtache-rerun-session)
+    (define-key map "t" #'dtache-tail-output)
+    (define-key map "w" #'dtache-copy-session-command)
+    (define-key map "W" #'dtache-copy-session-output)
+    (define-key map "=" #'dtache-diff-session)
+    map))
+
 ;;;;; Faces
 
 (defgroup dtache-faces nil
diff --git a/embark-dtache.el b/embark-dtache.el
deleted file mode 100644
index 537fe970e6..0000000000
--- a/embark-dtache.el
+++ /dev/null
@@ -1,56 +0,0 @@
-;;; embark-dtache.el --- Dtache Embark integration -*- lexical-binding: t -*-
-
-;; Copyright (C) 2020-2021 Niklas Eklund
-
-;; Author: Niklas Eklund <niklas.eklund@posteo.net>
-;; URL: https://www.gitlab.com/niklaseklund/dtache.git
-;; Version: 0.1
-;; Package-Requires: ((emacs "27.1"))
-;; Keywords: convenience processes
-
-;; This file is not part of GNU Emacs.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; This package provides `embark' actions to operate on a `dtache' session.
-
-;;; Code:
-
-;;;; Requirements
-
-(require 'dtache)
-(require 'embark)
-
-;;;; Keymap
-
-(embark-define-keymap embark-dtache-map
-  "Keymap for Embark dtache actions."
-  ("c" dtache-compile-session)
-  ("d" dtache-remove-session)
-  ("i" dtache-insert-session-command)
-  ("k" dtache-kill-session)
-  ("o" dtache-open-output)
-  ("r" dtache-rerun-session)
-  ("t" dtache-tail-output)
-  ("w" dtache-copy-session-command)
-  ("W" dtache-copy-session-output)
-  ("=" dtache-diff-session))
-
-(add-to-list 'embark-keymap-alist '(dtache . embark-dtache-map))
-
-(provide 'embark-dtache)
-
-;;; embark-dtache.el ends here
diff --git a/guix.scm b/guix.scm
index 3f65f203ca..b76838f33f 100644
--- a/guix.scm
+++ b/guix.scm
@@ -35,8 +35,6 @@
          "0yvkygdqghrp8xn7nfgfq3x5y913r6kasqndxy3fr2dqpxxb941a"))
        (file-name (git-file-name name version))))
      (build-system emacs-build-system)
-     (propagated-inputs
-      `(("emacs-embark" ,emacs-embark)))
      (native-inputs
       `(("emacs-ert-runner" ,emacs-ert-runner)))
      (inputs `(("dtach" ,dtach)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]