From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: info-gnus-english@gnu.org
Subject: Re: nnmail split multi-byte bug or feature?
Date: Mon, 02 Aug 2010 15:00:30 +0900 [thread overview]
Message-ID: <b4mk4o91rlt.fsf@jpl.org> (raw)
In-Reply-To: <b4mocdlkfz8.fsf@jpl.org>
Newsgroups: gnu.emacs.gnus
Cc: info-gnus-english@gnu.org
Katsumi Yamaoka wrote:
> stormwatch wrote:
>> BTW, I'd like to change gnus-subscribe-options-newsgroup-method to
>> 'gnus-subscribe-topics. Some time ago I tried to add a topic parameter
>> in my .gnus with no success, forcing me to edit the topic parameters
>> interactively each time I reinstalled or moved my os. Is it possible
>> to add something like '(("utn" (subscribe . "\\.utn"))) to gnus-
>> parameters? ("utn" being the topic name).
> I'll try it.
There seems to be no other way than to modify `gnus-topic-topology'
(~/.newsrc.eld specifies its value). How about this?
--8<---------------cut here---------------start------------->8---
(require 'gnus-topic)
(add-hook
'gnus-setup-news-hook
(lambda ()
;; Create the "utn" topic if needed.
(unless (member "utn" (gnus-topic-list))
(gnus-topic-create-topic "utn" (caar gnus-topic-topology)))
;; Add `(subscribe . "\\.utn")' parameter to the "utn" topic if needed.
(let* ((subscribe '((subscribe . "\\.utn")))
(topology (cadr (gnus-topic-find-topology "utn")))
(len (length topology))
(params (car (nthcdr 3 topology))))
(cond ((= len 1)
(setcdr topology `(visible nil ,subscribe)))
((= len 2)
(setcdr (cdr topology) `(nil ,subscribe)))
((or (= len 3) (equal params '(nil)) (not (consp params)))
(setcdr (cddr topology) `(,subscribe)))
((not (assq 'subscribe params))
(setcdr params (copy-sequence params))
(setcar params subscribe))))))
--8<---------------cut here---------------end--------------->8---
If you want to set the group level, try adding this one:
--8<---------------cut here---------------start------------->8---
(add-hook
'gnus-setup-news-hook
(lambda ()
;; Add `(subscribe-level . 1)' parameter to the "utn" topic if needed.
(let ((params (car (nthcdr 3 (cadr (gnus-topic-find-topology "utn"))))))
(unless (assq 'subscribe-level params)
(setcdr params (copy-sequence params))
(setcar params '(subscribe-level . 1)))
params))
'append)
--8<---------------cut here---------------end--------------->8---
prev parent reply other threads:[~2010-08-02 6:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 11:56 stormwatch
2010-07-28 0:04 ` Katsumi Yamaoka
[not found] ` <mailman.20.1280275492.14690.info-gnus-english@gnu.org>
[not found] ` <3b440960-4153-4dff-8971-db813ea29aa3@f6g2000yqa.googlegroups.com>
2010-07-29 1:09 ` Katsumi Yamaoka
2010-07-30 2:09 ` Katsumi Yamaoka
[not found] ` <mailman.6.1280455794.998.info-gnus-english@gnu.org>
2010-08-01 0:06 ` stormwatch
2010-08-02 0:36 ` Katsumi Yamaoka
2010-08-02 6:00 ` Katsumi Yamaoka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mk4o91rlt.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).