(setq post-uses-fill-mode nil)
)
#+END_SRC
+** Mutt
+*** Message-mode
+#+BEGIN_SRC emacs-lisp
+ (use-package message-mode
+
+ :mode "muttng-[a-z0-9]+-[0-9]+-"
+ :mode "mutt-[a-z0-9]+-[0-9]+-"
+ :hook 'my-message-mode-settings
+ :config
+ (defun my-message-mode-settings ()
+ (font-lock-add-keywords nil
+ '(("^[ \t]*>[ \t]*>[ \t]*>.*$"
+ (0 'message-multiply-quoted-text-face))
+ ("^[ \t]*>[ \t]*>.*$"
+ (0 'message-double-quoted-text-face))))
+ (local-set-key (kbd "C-c C-a") 'my-post-attach-file)
+ )
+
+ (defun my-post-attach-file ()
+ "Prompt for an attachment."
+ (interactive)
+ (let ((file (read-file-name "Attach file: " nil nil t nil))
+ (description (string-read "Description: ")))
+ (my-header-attach-file file description)))
+
+ (symbol-function 'my-post-attach-file)
+
+ (defun my-header-attach-file (file description)
+ "Attach a FILE to the current message (works with Mutt).
+ Argument DESCRIPTION MIME description."
+ (interactive "fAttach file: \nsDescription: ")
+ (when (> (length file) 0)
+ (save-excursion
+ (save-match-data
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (search-forward-regexp "^$")
+ (insert (concat "Attach: " (replace-regexp-in-string "\\([[:space:]\\]\\)" "\\\\\\1" (file-truename file)) " "
+ description "\n"))
+ (message (concat "Attached '" file "'."))
+ (setq post-has-attachment t))))))
+
+
+
+ (setq mail-yank-prefix "> ")
+ )
+#+END_SRC
+*** Muttrc mode
+#+BEGIN_SRC emacs-lisp
+ (use-package muttrc-mode
+ :mode "muttngrc"
+ :mode "muttrc"
+ )
+
+#+END_SRC
* Org Mode
** Use-package and load things
#+BEGIN_SRC emacs-lisp
;; tramp configuration
(setq tramp-use-ssh-controlmaster-options nil)
- ; mail configuration
- (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . message-mode))
- (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
-
- (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . message-mode))
- (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode))
- (defun my-message-mode-settings ()
- (font-lock-add-keywords nil
- '(("^[ \t]*>[ \t]*>[ \t]*>.*$"
- (0 'message-multiply-quoted-text-face))
- ("^[ \t]*>[ \t]*>.*$"
- (0 'message-double-quoted-text-face))))
- (local-set-key (kbd "C-c C-a") 'my-post-attach-file)
- )
- (add-hook 'message-mode-hook 'my-message-mode-settings)
-
- (defun my-post-attach-file ()
- "Prompt for an attachment."
- (interactive)
- (let ((file (read-file-name "Attach file: " nil nil t nil))
- (description (string-read "Description: ")))
- (my-header-attach-file file description)))
-
- (symbol-function 'my-post-attach-file)
-
- (defun my-header-attach-file (file description)
- "Attach a FILE to the current message (works with Mutt).
- Argument DESCRIPTION MIME description."
- (interactive "fAttach file: \nsDescription: ")
- (when (> (length file) 0)
- (save-excursion
- (save-match-data
- (save-restriction
- (widen)
- (goto-char (point-min))
- (search-forward-regexp "^$")
- (insert (concat "Attach: " (replace-regexp-in-string "\\([[:space:]\\]\\)" "\\\\\\1" (file-truename file)) " "
- description "\n"))
- (message (concat "Attached '" file "'."))
- (setq post-has-attachment t))))))
-
-
-
- (setq mail-yank-prefix "> ")
-
;; self-insert-command hack.
;; Without this, "if<SP>" expands to
;; if ( -!-) {