* gnus-secondary-select-methods and use of variables
@ 2010-05-01 17:50 Cecil Westerhof
2010-05-02 5:57 ` Teemu Likonen
0 siblings, 1 reply; 3+ messages in thread
From: Cecil Westerhof @ 2010-05-01 17:50 UTC (permalink / raw)
To: info-gnus-english
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnus-secondary-select-methods and use of variables
2010-05-01 17:50 gnus-secondary-select-methods and use of variables Cecil Westerhof
@ 2010-05-02 5:57 ` Teemu Likonen
2010-05-03 7:30 ` Cecil Westerhof
0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2010-05-02 5:57 UTC (permalink / raw)
To: info-gnus-english
* 2010-05-01 19:50 (+0200), Cecil Westerhof wrote:
> 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))
...))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnus-secondary-select-methods and use of variables
2010-05-02 5:57 ` Teemu Likonen
@ 2010-05-03 7:30 ` Cecil Westerhof
0 siblings, 0 replies; 3+ messages in thread
From: Cecil Westerhof @ 2010-05-03 7:30 UTC (permalink / raw)
To: info-gnus-english
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-03 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-01 17:50 gnus-secondary-select-methods and use of variables Cecil Westerhof
2010-05-02 5:57 ` Teemu Likonen
2010-05-03 7:30 ` Cecil Westerhof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).