shackra
shackra

Reputation: 366

Emacs View Mail: trouble using vm-imap-account-alist

I have a little problem with ViewMail. In a separate file I'm defining variables with the account information of my email accounts, something like this:

(setq secret-mail-account-list-1 "imap-ssl:imap.aaa.com:993:*:login:[email protected]:password")
;;; other email accounts are defined as well

I do this to keep my password away from being recorded by Mercurial.

Then, I do write this into vm-imap-account-alist in another file:

(setq vm-imap-account-alist
      '(
        (secret-mail-account-list-1 "aaamail")
        ;;; other email accounts are here
        )
      )

But, after starting ViewMail with AltXvmEnter↵ I get the following error:

vm-imap-parse-spec-to-list: Wrong type argument: sequencep, secret-mail-account-list-1

How do I set the string to a variable so it is of the correct type for vm-imap-parse-spec-to-list?

Upvotes: 0

Views: 67

Answers (1)

Dan
Dan

Reputation: 5369

I presume you got this from the EmacsWiki page. It looks like you want to pass the value of secret-mail-account-list-1 to vm-imap-account-alist rather than the symbol itself. To do so, you need to backquote the alist and unquote the symbol with a comma to get its value:

(setq vm-imap-account-alist
      `((,secret-mail-account-list-1 "aaamail") ; notice ` and ,
        ;;; other email accounts are here
        ))

At any rate, it helps to explain your error message: it looks like vm-imap-parse-spec-to-list expects a sequence (hence sequencep) such as a string which it converts to a list. Symbols are not sequences, but the content of yours is.

Upvotes: 1

Related Questions