mirror of
https://github.com/larstvei/dot-emacs.git
synced 2024-11-26 07:28:31 +00:00
Mail and Matlab (and added a mac-specific setting).
This commit is contained in:
parent
0baec2b264
commit
8f6f8558e7
41
init.el
41
init.el
@ -80,6 +80,10 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
echo-keystrokes 0.1 ; Show keystrokes asap.
|
echo-keystrokes 0.1 ; Show keystrokes asap.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Some mac-bindings interfere with Emacs bindings.
|
||||||
|
(when (boundp 'mac-pass-command-to-system)
|
||||||
|
(setq mac-pass-command-to-system nil))
|
||||||
|
|
||||||
(setq-default fill-column 76 ; Maximum line width.
|
(setq-default fill-column 76 ; Maximum line width.
|
||||||
indent-tabs-mode nil ; Use spaces instead of tabs.
|
indent-tabs-mode nil ; Use spaces instead of tabs.
|
||||||
split-width-threshold 100 ; Split verticly by default.
|
split-width-threshold 100 ; Split verticly by default.
|
||||||
@ -177,6 +181,41 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
calendar-longitude 10.7
|
calendar-longitude 10.7
|
||||||
calendar-location-name "Oslo, Norway")
|
calendar-location-name "Oslo, Norway")
|
||||||
|
|
||||||
|
(let ((load-mail-setup nil))
|
||||||
|
(when load-mail-setup
|
||||||
|
;; Dependent on both mu4e and smtpmail (for sending only).
|
||||||
|
(require 'mu4e)
|
||||||
|
(require 'smtpmail)
|
||||||
|
|
||||||
|
;; Some basic mu4e settings.
|
||||||
|
(setq mu4e-maildir "~/.ifimail" ; top-level Maildir
|
||||||
|
mu4e-sent-folder "/INBOX.Sent" ; folder for sent messages
|
||||||
|
mu4e-drafts-folder "/INBOX.Drafts" ; unfinished messages
|
||||||
|
mu4e-trash-folder "/INBOX.Trash" ; trashed messages
|
||||||
|
mu4e-refile-folder "/INBOX.Archive" ; saved messages
|
||||||
|
mu4e-get-mail-command "offlineimap" ; use offlineimap to fetch mail
|
||||||
|
mu4e-view-show-images t ; view images
|
||||||
|
mu4e-html2text-command
|
||||||
|
"html2text -utf8" ; use utf-8
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Setup for sending mail.
|
||||||
|
(setq user-full-name
|
||||||
|
"Lars Tveito" ; Your full name
|
||||||
|
user-mail-address
|
||||||
|
"larstvei@ifi.uio.no" ; And email-address
|
||||||
|
smtpmail-smtp-server
|
||||||
|
"smtp.uio.no" ; Host to mail-server
|
||||||
|
smtpmail-smtp-service 465 ; Port to mail-server
|
||||||
|
smtpmail-stream-type 'ssl ; Protocol used for sending
|
||||||
|
send-mail-function 'smtpmail-send-it ; Use smpt to send
|
||||||
|
mail-user-agent 'mu4e-user-agent ; Use mu4e!
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Register file types that can be handled by ImageMagick.
|
||||||
|
(when (fboundp 'imagemagick-register-types)
|
||||||
|
(imagemagick-register-types))))
|
||||||
|
|
||||||
(add-hook 'text-mode-hook 'turn-on-flyspell)
|
(add-hook 'text-mode-hook 'turn-on-flyspell)
|
||||||
|
|
||||||
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
|
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
|
||||||
@ -342,3 +381,5 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
|
|
||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.m$" . octave-mode))
|
||||||
|
59
init.org
59
init.org
@ -147,6 +147,11 @@
|
|||||||
doc-view-continuous t ; At page edge goto next/previous.
|
doc-view-continuous t ; At page edge goto next/previous.
|
||||||
echo-keystrokes 0.1 ; Show keystrokes asap.
|
echo-keystrokes 0.1 ; Show keystrokes asap.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Some mac-bindings interfere with Emacs bindings.
|
||||||
|
(when (boundp 'mac-pass-command-to-system)
|
||||||
|
(setq mac-pass-command-to-system nil))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Some variables are buffer-local, so changing them using =setq= will only
|
Some variables are buffer-local, so changing them using =setq= will only
|
||||||
@ -357,6 +362,50 @@
|
|||||||
calendar-location-name "Oslo, Norway")
|
calendar-location-name "Oslo, Norway")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Mail
|
||||||
|
|
||||||
|
I use [[http://www.djcbsoftware.nl/code/mu/mu4e.html][mu4e]] (which is a part of [[http://www.djcbsoftware.nl/code/mu/][mu]]) along with [[http://docs.offlineimap.org/en/latest/][offlineimap]] on one of my
|
||||||
|
computers. Because the mail-setup wont work without these programs
|
||||||
|
installed we bind =load-mail-setup= to =nil=. If the value is changed to
|
||||||
|
a =non-nil= value mail is setup.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||||
|
(let ((load-mail-setup nil))
|
||||||
|
(when load-mail-setup
|
||||||
|
;; Dependent on both mu4e and smtpmail (for sending only).
|
||||||
|
(require 'mu4e)
|
||||||
|
(require 'smtpmail)
|
||||||
|
|
||||||
|
;; Some basic mu4e settings.
|
||||||
|
(setq mu4e-maildir "~/.ifimail" ; top-level Maildir
|
||||||
|
mu4e-sent-folder "/INBOX.Sent" ; folder for sent messages
|
||||||
|
mu4e-drafts-folder "/INBOX.Drafts" ; unfinished messages
|
||||||
|
mu4e-trash-folder "/INBOX.Trash" ; trashed messages
|
||||||
|
mu4e-refile-folder "/INBOX.Archive" ; saved messages
|
||||||
|
mu4e-get-mail-command "offlineimap" ; use offlineimap to fetch mail
|
||||||
|
mu4e-view-show-images t ; view images
|
||||||
|
mu4e-html2text-command
|
||||||
|
"html2text -utf8" ; use utf-8
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Setup for sending mail.
|
||||||
|
(setq user-full-name
|
||||||
|
"Lars Tveito" ; Your full name
|
||||||
|
user-mail-address
|
||||||
|
"larstvei@ifi.uio.no" ; And email-address
|
||||||
|
smtpmail-smtp-server
|
||||||
|
"smtp.uio.no" ; Host to mail-server
|
||||||
|
smtpmail-smtp-service 465 ; Port to mail-server
|
||||||
|
smtpmail-stream-type 'ssl ; Protocol used for sending
|
||||||
|
send-mail-function 'smtpmail-send-it ; Use smpt to send
|
||||||
|
mail-user-agent 'mu4e-user-agent ; Use mu4e!
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Register file types that can be handled by ImageMagick.
|
||||||
|
(when (fboundp 'imagemagick-register-types)
|
||||||
|
(imagemagick-register-types))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Flyspell
|
** Flyspell
|
||||||
|
|
||||||
Flyspell offers on-the-fly spell checking. We can enable flyspell for all
|
Flyspell offers on-the-fly spell checking. We can enable flyspell for all
|
||||||
@ -729,3 +778,13 @@
|
|||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
||||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Matlab
|
||||||
|
|
||||||
|
Matlab is very similar to Octave, which is supported by Emacs. We just
|
||||||
|
need to let =.m=-files be associated with =octave-mode=.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.m$" . octave-mode))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user