* How to get topic name in summary buffer?
@ 2005-12-05 0:11 leon
2005-12-05 11:11 ` Reiner Steib
0 siblings, 1 reply; 5+ messages in thread
From: leon @ 2005-12-05 0:11 UTC (permalink / raw)
Hello,
How can I get the topic name in summary buffer?
What I'm trying to do is writing an archive function which will copy
current article to a nnml group named after the topic name? So groups
under topic 'Science' should be archived to nnml:archive.Science.
Any ideas?
--
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
. * .
. /.\ Merry Christmas .
. /..'\ .
. /'.'\ -- Leon .
. /.''.'\ .
. /.'.'.\ .
. /'.''.'.\ .
. ^^^[_]^^^ .
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get topic name in summary buffer?
2005-12-05 0:11 How to get topic name in summary buffer? leon
@ 2005-12-05 11:11 ` Reiner Steib
2005-12-05 13:06 ` leon
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2005-12-05 11:11 UTC (permalink / raw)
On Mon, Dec 05 2005, leon wrote:
> Hello,
>
> How can I get the topic name in summary buffer?
>
> What I'm trying to do is writing an archive function which will copy
> current article to a nnml group named after the topic name? So groups
> under topic 'Science' should be archived to nnml:archive.Science.
>
> Any ideas?
AFAICS, there's no predefined function for this in Gnus. The
following function should do the trick:
(defun rs-gnus-current-topic (&optional group)
"Return the name of the topic for GROUP.
If GROUP is nil, try `gnus-newsgroup-name'."
(with-current-buffer gnus-group-buffer
(and (not group)
gnus-newsgroup-name
(setq group gnus-newsgroup-name))
(when group
(gnus-group-jump-to-group group))
(gnus-current-topic)))
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get topic name in summary buffer?
2005-12-05 11:11 ` Reiner Steib
@ 2005-12-05 13:06 ` leon
2005-12-05 13:26 ` Reiner Steib
0 siblings, 1 reply; 5+ messages in thread
From: leon @ 2005-12-05 13:06 UTC (permalink / raw)
Reiner Steib <reinersteib+from-uce@imap.cc> writes:
| On Mon, Dec 05 2005, leon wrote:
|
| > Hello,
| >
| > How can I get the topic name in summary buffer?
| >
| > What I'm trying to do is writing an archive function which will copy
| > current article to a nnml group named after the topic name? So groups
| > under topic 'Science' should be archived to nnml:archive.Science.
| >
| > Any ideas?
|
| AFAICS, there's no predefined function for this in Gnus. The
| following function should do the trick:
|
| (defun rs-gnus-current-topic (&optional group)
| "Return the name of the topic for GROUP.
| If GROUP is nil, try `gnus-newsgroup-name'."
| (with-current-buffer gnus-group-buffer
| (and (not group)
| gnus-newsgroup-name
| (setq group gnus-newsgroup-name))
| (when group
| (gnus-group-jump-to-group group))
| (gnus-current-topic)))
|
| Bye, Reiner.
| --
| ,,,
| (o o)
| ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
I bound this function to 'p' in summary mode. But I got an error
message:
"Wrong type argument: commandp, rs-gnus-current-topic"
I'm running cvs emacs 22.0.50.
--
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
. * .
. /.\ Merry Christmas .
. /..'\ .
. /'.'\ -- Leon .
. /.''.'\ .
. /.'.'.\ .
. /'.''.'.\ .
. ^^^[_]^^^ .
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get topic name in summary buffer?
2005-12-05 13:06 ` leon
@ 2005-12-05 13:26 ` Reiner Steib
2005-12-05 17:58 ` Leon
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2005-12-05 13:26 UTC (permalink / raw)
On Mon, Dec 05 2005, leon wrote:
> Reiner Steib <reinersteib+from-uce@imap.cc> writes:
[...]
> | (defun rs-gnus-current-topic (&optional group)
> | "Return the name of the topic for GROUP.
> | If GROUP is nil, try `gnus-newsgroup-name'."
> | (with-current-buffer gnus-group-buffer
> | (and (not group)
> | gnus-newsgroup-name
> | (setq group gnus-newsgroup-name))
> | (when group
> | (gnus-group-jump-to-group group))
> | (gnus-current-topic)))
[...]
> I bound this function to 'p' in summary mode. But I got an error
> message:
>
> "Wrong type argument: commandp, rs-gnus-current-topic"
The function is _not_ interactive because I though it was intended to
be used in a program. If you want to use it interactively, add
(interactive) after the doc string (e.g. before
`with-current-buffer').
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get topic name in summary buffer?
2005-12-05 13:26 ` Reiner Steib
@ 2005-12-05 17:58 ` Leon
0 siblings, 0 replies; 5+ messages in thread
From: Leon @ 2005-12-05 17:58 UTC (permalink / raw)
Reiner Steib <reinersteib+from-uce@imap.cc> writes:
> On Mon, Dec 05 2005, leon wrote:
>
>> Reiner Steib <reinersteib+from-uce@imap.cc> writes:
> [...]
>> | (defun rs-gnus-current-topic (&optional group)
>> | "Return the name of the topic for GROUP.
>> | If GROUP is nil, try `gnus-newsgroup-name'."
>> | (with-current-buffer gnus-group-buffer
>> | (and (not group)
>> | gnus-newsgroup-name
>> | (setq group gnus-newsgroup-name))
>> | (when group
>> | (gnus-group-jump-to-group group))
>> | (gnus-current-topic)))
> [...]
>> I bound this function to 'p' in summary mode. But I got an error
>> message:
>>
>> "Wrong type argument: commandp, rs-gnus-current-topic"
>
> The function is _not_ interactive because I though it was intended to
> be used in a program. If you want to use it interactively, add
> (interactive) after the doc string (e.g. before
> `with-current-buffer').
>
Works like a charm.
Thank you very much for your help.
--
Leon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-12-05 17:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-05 0:11 How to get topic name in summary buffer? leon
2005-12-05 11:11 ` Reiner Steib
2005-12-05 13:06 ` leon
2005-12-05 13:26 ` Reiner Steib
2005-12-05 17:58 ` Leon
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).