diff options
author | William Carroll <wpcarro@gmail.com> | 2019-01-13T19·33-0500 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2019-01-13T19·45-0500 |
commit | 481df5a3855ccd5ea3bf4d5f41ae780f4773b7b4 (patch) | |
tree | 3aeb7e20eaba176536cb8d10ba531ac39674fc4a /configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el | |
parent | 18b9930b8604134f087ca61fe94740b31f94327c (diff) |
Remove Emacs spam
My inconsistent git history-keeping is coming to bite me here. At the moment, I can only speculate about what went wrong here. The gist is this: I unintentionally committed files that were supposed to be ignored This commit removes those files which includes: - auto-save-list - elpa packages - quelpa packages - misc
Diffstat (limited to 'configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el')
-rw-r--r-- | configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el b/configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el deleted file mode 100644 index b3fc1b41203d..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/slack-20180913.651/slack-action.el +++ /dev/null @@ -1,90 +0,0 @@ -;;; slack-action.el --- -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 - -;; Author: <yuya373@yuya373> -;; Keywords: - -;; 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 <https://www.gnu.org/licenses/>. - -;;; Commentary: - -;; - -;;; Code: -(require 'slack-util) - -(defvar slack-action-keymap - (let ((keymap (make-sparse-keymap))) - (define-key keymap (kbd "RET") #'slack-action-run) - (define-key keymap [mouse-1] #'slack-action-run) - keymap)) - -(defface slack-message-action-face - '((t (:box (:line-width 1 :style released-button)))) - "Face used to action." - :group 'slack) - -(defun slack-message-run-action () - (interactive) - (slack-if-let* ((buffer slack-current-buffer) - (room (oref buffer room)) - (ts (slack-get-ts)) - (message (slack-room-find-message room ts)) - (_not-ephemeral-messagep (not (oref message is-ephemeral)))) - (slack-buffer-execute-message-action buffer ts))) - -(defun slack-action-run () - (interactive) - (slack-if-let* ((bot (get-text-property (point) 'bot)) - (payload (get-text-property (point) 'payload)) - (buffer slack-current-buffer) - (team (oref buffer team))) - (let ((url "https://slack.com/api/chat.action") - (params (list (cons "bot" bot) - (cons "payload" payload)))) - (cl-labels - ((log-error (err) (format "Error: %s, URL: %s, PARAMS: %s" - err - url - params)) - (on-success (&key data &allow-other-keys) - (slack-request-handle-error - (data "slack-action-run" #'log-error)))) - (slack-request - (slack-request-create - url - team - :type "POST" - :params params - :success #'on-success)))))) - -(defun slack-display-inline-action () - (goto-char (point-min)) - (let ((regexp "<slack-action://\\(.*?\\)/\\(.*?\\)|\\(.*?\\)>")) - (while (re-search-forward regexp (point-max) t) - (let ((bot (match-string 1)) - (payload (match-string 2)) - (label (match-string 3)) - (beg (- (match-beginning 1) 16)) - (end (+ (match-end 3) 1))) - (replace-match (propertize label - 'face 'slack-message-action-face - 'bot bot - 'payload payload - 'org-text (match-string 0) - 'keymap slack-action-keymap)))))) - -(provide 'slack-action) -;;; slack-action.el ends here |