[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnus-secondary-select-methods and use of variables
From: |
Cecil Westerhof |
Subject: |
Re: gnus-secondary-select-methods and use of variables |
Date: |
Mon, 03 May 2010 09:30:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Teemu Likonen <tlikonen@iki.fi> writes:
>> I would like to do something like the following:
>> (setq gnus-secondary-select-methods
>> '(
>> (nnimap "gmail"
>> (nnimap-address "imap.gmail.com")
>> (nnimap-stream ssl)
>> (nnimap-authinfo-file (symbol-value imap-authinfo-file))
>> )
>> (nnimap "e-mail"
>> (nnimap-address (symbol-value imap-own-server))
>> (nnimap-stream tls)
>> (nnimap-authinfo-file (symbol-value imap-authinfo-file))
>> )
>> ))
>>
>> I need to use the real values. Is there a way I could use variables to
>> set gnus-secondary-select-methods?
>
> I'm not sure what "the real values" are but if I understand correctly,
> your question is more about Lisp rather than about Gnus. Do you want to
> evaluate some variables (expressions) in a list that is mostly constant?
> Like this:
>
> `(foo ,gnus-version bar)
> => (foo "Gnus v5.13" bar)
>
> Inside `-quotation ,-prefixed expressions are evaluated. Everything else
> is taken literally. So maybe you want something like this:
>
> (setq gnus-secondary-select-methods
> `((nnimap "gmail"
> (nnimap-address "imap.gmail.com")
> (nnimap-stream ssl)
> (nnimap-authinfo-file ,some-variable))
> ...))
That is exactly what I want. Thanks.
In my .gnus it always uses '( instead of `(. The difference is in the
evaluation of ,-prefixed expressions:
`(foo ,gnus-version bar) => (foo "Gnus v5.13" bar)
'(foo ,gnus-version bar) => (foo \,gnus-version bar)
Is it a good idea to change all my '( to `(, or is there a -good- reason
to use '( instead of `(?
The same for 'string and `string.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof