diff options
Diffstat (limited to '')
m--------- | spacemacs/.emacs.d/private/ZNC.el | 0 | ||||
-rw-r--r-- | spacemacs/.emacs.d/private/irc/extensions.el | 82 | ||||
-rw-r--r-- | spacemacs/.emacs.d/private/irc/packages.el | 31 | ||||
-rw-r--r-- | spacemacs/.emacs.d/private/mu4e/extensions.el | 33 | ||||
-rw-r--r-- | spacemacs/.emacs.d/private/mu4e/packages.el | 147 |
5 files changed, 0 insertions, 293 deletions
diff --git a/spacemacs/.emacs.d/private/ZNC.el b/spacemacs/.emacs.d/private/ZNC.el deleted file mode 160000 -Subproject 94c8e4cdcfb51b75d5f95cb51ce21c6274325e1 diff --git a/spacemacs/.emacs.d/private/irc/extensions.el b/spacemacs/.emacs.d/private/irc/extensions.el deleted file mode 100644 index 47b48b1..0000000 --- a/spacemacs/.emacs.d/private/irc/extensions.el +++ /dev/null @@ -1,82 +0,0 @@ -;;; extensions.el --- irc Layer extensions File for Spacemacs -;; -;; Copyright (c) 2012-2014 Sylvain Benner -;; Copyright (c) 2014-2015 Sylvain Benner & Contributors -;; -;; Author: Sylvain Benner <sylvain.benner@gmail.com> -;; URL: https://github.com/syl20bnr/spacemacs -;; -;; This file is not part of GNU Emacs. -;; -;; vbe* functions for reading passwords from authinfo by Vincent Bernat -;; -;;; License: GPLv3 - -(setq irc-pre-extensions - '( - ;; pre extension names go here - )) - -(setq irc-post-extensions - '( - ;; post extension names go here - znc - )) - -;; For each extension, define a function irc/init-<extension-name> -;; -(defun irc/init-znc () - "Initialize znc" - (use-package znc - :load-path "private/ZNC.el" - :commands (znc-erc znc-all) - :defer t - :init (evil-leader/set-key - "aize" 'znc-erc - "aiza" 'znc-all) - :config - (progn - (defun vbe:znc-add-server (server port user networks) - "Add a server to the list of ZNC servers. -We use SSL inconditionaly. Moreover, we don't store the password -but put nil instead. At least, we tweak the username to contain -the network name later, this will be separated again." - (add-to-list 'znc-servers - (list server - port - t ; SSL enabled - (mapcar (function (lambda (slug) (list slug - (format "%s/%s" user slug) - nil))) - networks)))) - - (defun vbe:znc-erc-ssl-connector (&rest R) - "Connect to ERC using SSL and retrieve password with `auth-source-search'. -Moreover, handle multiple networks by sending the password with -the appropriate network slug that we extract from the nick." - (let* ((user (nth 0 (split-string (plist-get R :nick) "/"))) - (slug (nth 1 (split-string (plist-get R :nick) "/"))) - (found (nth 0 (auth-source-search :host (plist-get R :server) - :user user - :require '(:user :secret) - :max 1)))) - (if found - (let ((password (let ((secret (plist-get found :secret))) - (if (functionp secret) - (funcall secret) - secret)))) - (plist-put R :password (format "%s/%s:%s" user slug password)) - (plist-put R :nick user) - (apply 'erc-tls R))))) - (setq znc-erc-ssl-connector 'vbe:znc-erc-ssl-connector) - - ;; Define networks - (vbe:znc-add-server "aminb.org" 6697 "aminb" - '(freenode mozilla)) - ) - ) - ) -;; -;; Often the body of an initialize function uses `use-package' -;; For more info on `use-package', see readme: -;; https://github.com/jwiegley/use-package diff --git a/spacemacs/.emacs.d/private/irc/packages.el b/spacemacs/.emacs.d/private/irc/packages.el deleted file mode 100644 index d8cba40..0000000 --- a/spacemacs/.emacs.d/private/irc/packages.el +++ /dev/null @@ -1,31 +0,0 @@ -;;; packages.el --- irc Layer packages File for Spacemacs -;; -;; Copyright (c) 2012-2014 Sylvain Benner -;; Copyright (c) 2014-2015 Sylvain Benner & Contributors -;; -;; Author: Sylvain Benner <sylvain.benner@gmail.com> -;; URL: https://github.com/syl20bnr/spacemacs -;; -;; This file is not part of GNU Emacs. -;; -;;; License: GPLv3 - -;; List of all packages to install and/or initialize. Built-in packages -;; which require an initialization must be listed explicitly in the list. -(setq irc-packages - '( - ;; package names go here - )) - -;; List of packages to exclude. -(setq irc-excluded-packages '()) - -;; For each package, define a function irc/init-<package-name> -;; -;; (defun irc/init-my-package () -;; "Initialize my package" -;; ) -;; -;; Often the body of an initialize function uses `use-package' -;; For more info on `use-package', see readme: -;; https://github.com/jwiegley/use-package diff --git a/spacemacs/.emacs.d/private/mu4e/extensions.el b/spacemacs/.emacs.d/private/mu4e/extensions.el deleted file mode 100644 index a6adea8..0000000 --- a/spacemacs/.emacs.d/private/mu4e/extensions.el +++ /dev/null @@ -1,33 +0,0 @@ -;;; extensions.el --- mu4e Layer extensions File for Spacemacs -;; -;; Copyright (c) 2012-2014 Sylvain Benner -;; Copyright (c) 2014-2015 Sylvain Benner & Contributors -;; -;; Author: Sylvain Benner <sylvain.benner@gmail.com> -;; URL: https://github.com/syl20bnr/spacemacs -;; -;; This file is not part of GNU Emacs. -;; -;;; License: GPLv3 - -(defvar mu4e-pre-extensions - '( - ;; pre extension mu4es go here - ) - "List of all extensions to load before the packages.") - -(defvar mu4e-post-extensions - '( - ;; post extension mu4es go here - ) - "List of all extensions to load after the packages.") - -;; For each extension, define a function mu4e/init-<extension-mu4e> -;; -;; (defun mu4e/init-my-extension () -;; "Initialize my extension" -;; ) -;; -;; Often the body of an initialize function uses `use-package' -;; For more info on `use-package', see readme: -;; https://github.com/jwiegley/use-package diff --git a/spacemacs/.emacs.d/private/mu4e/packages.el b/spacemacs/.emacs.d/private/mu4e/packages.el deleted file mode 100644 index c01640e..0000000 --- a/spacemacs/.emacs.d/private/mu4e/packages.el +++ /dev/null @@ -1,147 +0,0 @@ -;;; packages.el --- mu4e Layer packages File for Spacemacs -;; -;; Copyright (c) 2012-2014 Sylvain Benner -;; Copyright (c) 2014-2015 Sylvain Benner & Contributors -;; Copyright (c) 2015 Amin Bandali -;; -;; Authors: Amin Bandali <me@aminb.org> -;; Sylvain Benner <sylvain.benner@gmail.com> -;; URL: https://github.com/aminb/dotfiles -;; -;; This file is not part of GNU Emacs; nor that of spacemacs. -;; -;;; License: GPLv3 - -(defvar mu4e-packages - '( - ;; mu4e is not in any repos, so it's commented - ;; mu4e - smtpmail - ) - "List of all packages to install and/or initialize. Built-in packages -which require an initialization must be listed explicitly in the list.") - -(defvar mu4e-excluded-packages '() - "List of packages to exclude.") - -(defun get-string-from-file (filePath) - "Return filePath's file content." - (with-temp-buffer - (insert-file-contents filePath) - (buffer-string))) -;; thanks to “Pascal J Bourguignon” and “TheFlyingDutchman -;; 〔zzbba…@aol.com〕”. 2010-09-02 - -(defun get-passwd-file (name) - "Return name's passwd file content" - (get-string-from-file (concat "/home/amin/.passwd/" name))) - -(require 'mu4e) -(require 'smtpmail) - -;; path to our Maildir directory -(setq mu4e-maildir "/home/amin/.mail") - -(setq - mu4e-get-mail-command "mbsync -aq" ;; or fetchmail, or ... - mu4e-update-interval 300 ;; update every 5 minutes - mu4e-sent-folder "/aminb/Sent" - mu4e-drafts-folder "/aminb/Drafts" - mu4e-trash-folder "/aminb/Trash" - user-mail-address (get-passwd-file "aminb-mail") - mu4e-compose-signature - (concat - "Amin Bandali\n" - "<aminb.org>\n") - smtpmail-default-smtp-server "mail.aminb.org" - smtpmail-local-domain "aminb.org" - smtpmail-smtp-server "mail.aminb.org" - smtpmail-stream-type 'ssl - smtpmail-smtp-service 465) - -(defvar my-mu4e-account-alist - '(("aminb" - (mu4e-sent-folder "/aminb/Sent") - (mu4e-drafts-folder "/aminb/Drafts") - (mu4e-trash-folder "/aminb/Trash") - (user-mail-address (get-passwd-file "aminb-mail")) - (user-full-name "Amin Bandali") - (smtpmail-default-smtp-server "mail.aminb.org") - (smtpmail-local-domain "aminb.org") - (smtpmail-smtp-user (get-passwd-file "aminb-user")) - (smtpmail-smtp-server "mail.aminb.org") - (smtpmail-stream-type ssl) - (smtpmail-smtp-service 465)) - (user-mail-address (get-passwd-file "gmail-mail")) - ("gmail" - (mu4e-sent-folder "/gmail/[Gmail].Sent Mail") - (mu4e-drafts-folder "/gmail/Drafts") - (mu4e-trash-folder "/gmail/Trash") - (user-full-name "Amin Bandali") - (smtpmail-default-smtp-server "smtp.gmail.com") - (smtpmail-local-domain "gmail.com") - (smtpmail-smtp-user (get-passwd-file "gmail-mail")) - (smtpmail-smtp-server "smtp.gmail.com") - (smtpmail-stream-type ssl) - (smtpmail-smtp-service 465)))) - -(defun my-mu4e-set-account () - "Set the account for composing a message." - (let* ((account - (if mu4e-compose-parent-message - (let ((maildir (mu4e-message-field mu4e-compose-parent-message :maildir))) - (string-match "/\\(.*?\\)/" maildir) - (match-string 1 maildir)) - (completing-read (format "Compose with account: (%s) " - (mapconcat #'(lambda (var) (car var)) - my-mu4e-account-alist "/")) - (mapcar #'(lambda (var) (car var)) my-mu4e-account-alist) - nil t nil nil (caar my-mu4e-account-alist)))) - (account-vars (cdr (assoc account my-mu4e-account-alist)))) - (if account-vars - (mapc #'(lambda (var) - (set (car var) (cadr var))) - account-vars) - (error "No email account found")))) - -(add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account) - - -;; Shortcut for mu4e. -(global-set-key (kbd "C-c m") 'mu4e) -(evil-leader/set-key "am" 'mu4e) - - -;; A special version of the gnus-dired-mail-buffers function -;; that understands mu4e buffers as well -(require 'gnus-dired) -;; make the `gnus-dired-mail-buffers' function also work on -;; message-mode derived modes, such as mu4e-compose-mode -(defun gnus-dired-mail-buffers () - "Return a list of active message buffers." - (let (buffers) - (save-current-buffer - (dolist (buffer (buffer-list t)) - (set-buffer buffer) - (when (and (derived-mode-p 'message-mode) - (null message-sent-message-via)) - (push (buffer-name buffer) buffers)))) - (nreverse buffers))) - -(setq gnus-dired-mail-mode 'mu4e-user-agent) -(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) - -(require 'mu4e-contrib) -(setq mu4e-html2text-command 'mu4e-shr2text - mu4e-view-html-plaintext-ratio-heuristic 10 - mu4e-view-prefer-html t) - -;; For each package, define a function mu4e/init-<package-mu4e> -;; -;; (defun mu4e/init-my-package () -;; "Initialize my package" -;; ) -;; -;; Often the body of an initialize function uses `use-package' -;; For more info on `use-package', see readme: -;; https://github.com/jwiegley/use-package |