Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* use gnus-agent-fetch-selected-article only in certain groups
@ 2004-12-13 11:06 Uwe Brauer
  2004-12-13 12:26 ` Reiner Steib
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Brauer @ 2004-12-13 11:06 UTC (permalink / raw)



Hello

I know that for the  setting
(add-hook 'gnus-select-article-hook 'gnus-agent-fetch-selected-article)	

every selected message gets downloaded. Now I want this only for
certain groups and thought of using gnus-group-customize.

The only relevant entry seems to be:
Set variables local to the group you are entering. *
[INS]

However this entry is for a variable and not for setting hooks to
functions. So I am not sure how to proceed. Most likely I have not
fully understood the logic of hooks.

Thanks


Uwe Brauer 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: use gnus-agent-fetch-selected-article only in certain groups
  2004-12-13 11:06 use gnus-agent-fetch-selected-article only in certain groups Uwe Brauer
@ 2004-12-13 12:26 ` Reiner Steib
       [not found]   ` <v9u0qqrput.fsf@marauder.physik.uni-ulm.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2004-12-13 12:26 UTC (permalink / raw)


On Mon, Dec 13 2004, Uwe Brauer wrote:

> I know that for the  setting
> (add-hook 'gnus-select-article-hook 'gnus-agent-fetch-selected-article)	
>
> every selected message gets downloaded. Now I want this only for
> certain groups and thought of using gnus-group-customize.

(Ab)using `eval' in `gnus-parameters' might do the trick:

(require 'gnus-sum) ;; gnus-select-article-hook is defined there.
(setq gnus-parameters
      '(("certain\\.group"
	 (eval
	  (add-to-list (make-local-variable 'gnus-select-article-hook)
		       'gnus-agent-fetch-selected-article)))))

Probably you can also use `add-hook' instead of `add-to-list' here (I
didn't try).  Does it work?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: use gnus-agent-fetch-selected-article only in certain groups
       [not found]     ` <86fz29du6m.fsf@mat.ucm.es>
@ 2004-12-14 13:50       ` Reiner Steib
  0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2004-12-14 13:50 UTC (permalink / raw)


On Tue, Dec 14 2004, Uwe Brauer wrote:

> (setq gnus-parameters
>           '(("^nnimap.*"
>     	 (eval
>     	  (add-to-list (make-local-variable 'gnus-select-article-hook)
>     		       'gnus-agent-fetch-selected-article)))))
>
> _Does not work_ for me in the sense that nothing is added to my
> gnus-select-article-hook. 

On Tue, Dec 14 2004, Uwe Brauer wrote:

> Using 
> and adding in the field Unknown entries
> Lisp expression
> (eval
>      	  (add-to-list (make-local-variable 'gnus-select-article-hook)
>      		       'gnus-agent-fetch-selected-article))
>
> Does the trick.

Hm, I don't see any difference.  Is nnimap your primary server
(gnus-select-method)?

> Interesting to note that you have set
>     Reiner> (setq X-gnus-select-article-hook nil)
> BTW what is the X-gnus-select-article-hook, it seems not to exist in
> my gnus snapshot.

`X-gnus-select-article-hook' was just an otherwise non-existing
variable for testing this.  Therefore I had to define it first (using
setq).

> [1]   mixing up key F with R (not the first time, thanks for pointing
> out the variable gnus-confirm-mail-reply-to-news'?

Another possibility is to use `F' all the time.  :-)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-14 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13 11:06 use gnus-agent-fetch-selected-article only in certain groups Uwe Brauer
2004-12-13 12:26 ` Reiner Steib
     [not found]   ` <v9u0qqrput.fsf@marauder.physik.uni-ulm.de>
     [not found]     ` <86fz29du6m.fsf@mat.ucm.es>
2004-12-14 13:50       ` Reiner Steib

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).