diff --git a/init.el b/init.el index ad45079..568f35c 100644 --- a/init.el +++ b/init.el @@ -197,6 +197,7 @@ PACKAGE is installed and the current version is deleted." mu4e-view-show-images t ; view images mu4e-html2text-command "html2text -utf8" ; use utf-8 + mu4e-compose-signature "- Lars" ; Sign my name ) ;; Setup for sending mail. @@ -216,9 +217,14 @@ PACKAGE is installed and the current version is deleted." (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) - ;; Overwrite the native 'compose-mail' binding to 'mu4e'. - (global-set-key (kbd "C-x m") 'mu4e) - )) + ;; A function to show mu4e and nothing else! + (defun show-mu4e () + (interactive) + (mu4e) + (delete-other-windows)) + + ;; Overwrite the native 'compose-mail' binding to 'show-mu4e'. + (global-set-key (kbd "C-x m") 'show-mu4e))) (add-hook 'text-mode-hook 'turn-on-flyspell) @@ -271,13 +277,6 @@ PACKAGE is installed and the current version is deleted." (whitespace-cleanup) (untabify beg (if (< end (point-max)) end (point-max))))) -(defadvice mu4e (after show-only-mu4e (background) activate) - "When evoking the mu4e command, delete all other windows. If - BACKGROUND is non-nil we don't want to change the functions - behaviour." - (unless background - (delete-other-windows))) - (global-set-key (kbd "C-'") 'er/expand-region) (global-set-key (kbd "C-;") 'er/contract-region) diff --git a/init.org b/init.org index b6615c2..c62aae5 100644 --- a/init.org +++ b/init.org @@ -386,6 +386,7 @@ mu4e-view-show-images t ; view images mu4e-html2text-command "html2text -utf8" ; use utf-8 + mu4e-compose-signature "- Lars" ; Sign my name ) ;; Setup for sending mail. @@ -405,9 +406,14 @@ (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) - ;; Overwrite the native 'compose-mail' binding to 'mu4e'. - (global-set-key (kbd "C-x m") 'mu4e) - )) + ;; A function to show mu4e and nothing else! + (defun show-mu4e () + (interactive) + (mu4e) + (delete-other-windows)) + + ;; Overwrite the native 'compose-mail' binding to 'show-mu4e'. + (global-set-key (kbd "C-x m") 'show-mu4e))) #+END_SRC ** Flyspell @@ -514,18 +520,6 @@ (untabify beg (if (< end (point-max)) end (point-max))))) #+END_SRC - When browsing mail with =mu4e= I find it best not to have other windows - visible. - - #+BEGIN_SRC emacs-lisp :tangle yes - (defadvice mu4e (after show-only-mu4e (background) activate) - "When evoking the mu4e command, delete all other windows. If - BACKGROUND is non-nil we don't want to change the functions - behaviour." - (unless background - (delete-other-windows))) - #+END_SRC - ** Key bindings Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].