summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authorBosché Aurélien <aurelien_bosche@yahoo.fr>2014-05-21 20:38:19 +0200
committerBosché Aurélien <aurelien_bosche@yahoo.fr>2014-05-21 21:21:02 +0200
commit118ce389a5e65f3a795ab7110eef735e21a33474 (patch)
tree2bd06f5afddbe58c3be55ecd0c705476e06f8166 /mu4e
parentd3122a8927c8cf8fcbdc2fc8ec9bab102cdb3176 (diff)
Various little changes
Diffstat (limited to 'mu4e')
l---------mu4e/.#mu4e-actions.el1
-rw-r--r--mu4e/mu4e-main.el33
2 files changed, 26 insertions, 8 deletions
diff --git a/mu4e/.#mu4e-actions.el b/mu4e/.#mu4e-actions.el
new file mode 120000
index 0000000..b94b1c1
--- /dev/null
+++ b/mu4e/.#mu4e-actions.el
@@ -0,0 +1 @@
+taurgal@freeme.1182:1400696277 \ No newline at end of file
diff --git a/mu4e/mu4e-main.el b/mu4e/mu4e-main.el
index 1f608b7..9bf889e 100644
--- a/mu4e/mu4e-main.el
+++ b/mu4e/mu4e-main.el
@@ -95,9 +95,10 @@ clicked."
(put-text-property (string-match "\\[.+$" newstr)
(- (length newstr) 1) 'mouse-face 'highlight newstr) newstr))
-
-(defun mu4e~main-view ()
- "Show the mu4e main view."
+;; NEW
+;; This is the old `mu4e~main-view' function but without
+;; buffer switching at the end.
+(defun mu4e:main-revert-buffer (ignore-auto noconfirm)
(let ((buf (get-buffer-create mu4e~main-buffer-name))
(inhibit-read-only t))
(with-current-buffer buf
@@ -150,13 +151,23 @@ clicked."
(mu4e~main-action-str "\t* [A]bout mu4e\n" 'mu4e-about)
(mu4e~main-action-str "\t* [H]elp\n" 'mu4e-display-manual)
(mu4e~main-action-str "\t* [q]uit\n" 'mu4e-quit))
- (mu4e-main-mode)
- (switch-to-buffer buf))))
+ )))
+
+(setq revert-buffer-function 'mu4e:main-revert-buffer)
+
+;; NEW
+;; Revert mu main buffer then switch to it
+(defun mu4e~main-view ()
+ "Show the mu4e main view."
+ (mu4e:main-revert-buffer nil nil)
+ (switch-to-buffer mu4e~main-buffer-name))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Interactive functions
+;; NEW
+;; Toggle mail sending mode without switching
(defun mu4e~main-toggle-mail-sending-mode ()
- "Toggle sending mail mode, either queued or direct."
+ "Toggle sending mail mode, either queued or direct (redefined)."
(interactive)
(let ((curpos (point)))
(unless (file-directory-p smtpmail-queue-dir)
@@ -165,8 +176,14 @@ clicked."
(message
(concat "Outgoing mail will now be "
(if smtpmail-queue-mail "queued" "sent directly")))
- (mu4e~main-view)
- ;; "queued" and "direct" have same length.
+ (mu4e:main-revert-buffer nil nil)
(goto-char curpos)))
+;; NEW
+;; Toggle queuing in any mu4e menu
+;; (dolist (keymap '(mu4e-main-mode-map mu4e-view-mode-map mu4e-compose-mode-map mu4e-headers-mode-map))
+;; (progn
+;; (define-key (symbol-value keymap) (kbd "C-c m") 'mu4e~main-toggle-mail-sending-mode))
+;; )
+
(provide 'mu4e-main)