LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   emacs start up file will not parse (https://www.linuxquestions.org/questions/linux-software-2/emacs-start-up-file-will-not-parse-4175543567/)

mtdew3q 05-25-2015 04:28 PM

emacs start up file will not parse
 
Hi-

I have a simple emacs start up file. I am trying to do mail with mu4e.

Code:

;; example configuration for mu4e
(require 'mu4e)

;; path to our Maildir directory
(setq mu4e-maildir "/home/min4rj3xe/Maildir")

;; the next are relative to `mu4e-maildir'
;; instead of strings, they can be functions too, see
;; their docstring or the chapter 'Dynamic folders'
(setq mu4e-sent-folder  "/sent"
      mu4e-drafts-folder "/drafts"
      mu4e-trash-folder  "/trash")

;; the maildirs you use frequently; access them with 'j' ('jump')
(setq  mu4e-maildir-shortcuts
    '(("/archive"    . ?a)
      ("/inbox"      . ?i)
      ("/work"        . ?w)
      ("/sent"        . ?s)))

;; a  list of user's e-mail addresses
(setq mu4e-user-mail-address-list '("thirdshiftcoder@yahoo.com" "thirdshiftcoder@gmail.com")

;; when you want to use some external command for text->html
;; conversion, e.g. the 'html2text' program
;; (setq mu4e-html2text-command "html2text")

;; the headers to show in the headers list -- a pair of a field
;; and its width, with `nil' meaning 'unlimited'
;; (better only use that for the last field.
;; These are the defaults:
;; (setq mu4e-headers-fields
;;    '( (:date          .  25)    ;; alternatively, use :human-date
;;      (:flags        .  6)
;;      (:from          .  22)
;;      (:subject      .  nil))) ;; alternatively, use :thread-subject

;; program to get mail; alternatives are 'fetchmail', 'getmail'
;; isync or your own shellscript. called when 'U' is pressed in
;; main view.

;; If you get your mail without an explicit command,
;; use "true" for the command (this is the default)
;; (setq mu4e-get-mail-command "offlineimap")

;; general emacs mail settings; used when composing e-mail
;; the non-mu4e-* stuff is inherited from emacs/message-mode
;; (setq mu4e-reply-to-address "thirdshiftcoder@yahoo.com"
;;      user-mail-address "thirdshiftcoder@yahoo.com"
;;      user-full-name  "J. McNamara")
;; (setq mu4e-compose-signature
;;  "3rdshiftcoder\nhttp://www.3rdshiftcoder.net\n")

;; smtp mail setting
 (setq send-mail-function    'smtpmail-send-it
 smtpmail-auth-credentials '(("smtp.mail.yahoo.com" 465 "address@hidden"
 nil))
        smtpmail-smtp-server  "smtp.mail.yahoo.com"
          smtpmail-stream-type  'ssl
        smtpmail-smtp-service 465))
         
  ;; if you need offline mode, set these -- and create the queue dir
  ;; with 'mu mkdir', i.e.. mu mkdir /home/user/Maildir/queue
  ;; smtpmail-queue-mail  nil
  ;; smtpmail-queue-dir  "/home/user/Maildir/queue/cur")

;; don't keep message buffers around
(setq message-kill-buffer-on-exit t)

I get this message when I try to run emacs:

Quote:

Wrong type argument: symbolp, (setq send-mail-function (quote smtpmail-send-it) smtpmail-auth-credentials (quote ((smtp.mail.yahoo.com 465 address@hidden nil))) smtpmail-smtp-server smtp.mail.yahoo.com smtpmail-stream-type (quote ssl) smtpmail-smtp-service 465)
I think the syntax for emacs lisp is killing me. I think I may have the correct settings for yahoo but it isn't parsing right.

Please assist if any emacs gurus!

thanks

mtdew3q 05-25-2015 04:39 PM

Hi -

I tried using this instead which is a little neater to read:

(setq send-mail-function 'smtpmail-send-it
smtpmail-smtp-server "smtp.mail.yahoo.com"
smtpmail-stream-type 'ssl
smtpmail-smtp-service 465)

I still get
Quote:

End of file during parsing
:


Not sure why it is at the end of the file not finished. I missed something.

thanks

mtdew3q 05-25-2015 04:45 PM

I got it to parse. I missed a parenthesis on this line:

;; a list of user's e-mail addresses
(setq mu4e-user-mail-address-list '("thirdshiftcoder@yahoo.com" "thirdshiftcoder@gmail.com")

that line needed a second closing parenthesis.

Now I am getting a second error message sending failed with exit value 75.

Back to the drawing board.

thanks

ntubski 05-25-2015 04:46 PM

EDIT: well it looks like you found the problems just a few seconds before I did...

Code:

(setq mu4e-user-mail-address-list '("thirdshiftcoder@yahoo.com" "thirdshiftcoder@gmail.com")
You missed a closing paren here.

Code:

;; smtp mail setting
 (setq send-mail-function    'smtpmail-send-it
 smtpmail-auth-credentials '(("smtp.mail.yahoo.com" 465 "address@hidden"
 nil))
        smtpmail-smtp-server  "smtp.mail.yahoo.com"
          smtpmail-stream-type  'ssl
        smtpmail-smtp-service 465))

And added an extra paren at the end here. This could be indented nicer too, after C-M-\ (indent-region):
Code:

(setq send-mail-function    'smtpmail-send-it
      smtpmail-auth-credentials '(("smtp.mail.yahoo.com" 465 "address@hidden"
                                  nil))
      smtpmail-smtp-server  "smtp.mail.yahoo.com"
      smtpmail-stream-type  'ssl
      smtpmail-smtp-service 465)


mtdew3q 05-25-2015 06:37 PM

thanks!


All times are GMT -5. The time now is 03:18 AM.