Gnus development mailing list
 help / color / mirror / Atom feed
* New group parameter move-to ?
@ 2002-02-27 12:57 Marco Lonsing
  2002-02-27 13:18 ` ShengHuo ZHU
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-27 12:57 UTC (permalink / raw)


I'm using the following patch to gnus-sum.el to have a group local
variable which determines a default group where copy or move
operations should end up.
Maybe this feature can be incorporated into gnus and 
my-default-archive-group can be made a "real" group-parameter
customisable  via "G c".


---snip---
30a31,34
> ;;default move/copy-to-group
> (defvar my-default-archive-group nil "*copy/move into this group by default")
> (setq my-default-archive-group nil)
> 
8348c8352,8356
< 	     (symbol-value (intern (format "gnus-current-%s-group" action)))
---
>            ;;use my-default-archive-group if not nil
> 	     ;;(symbol-value (intern (format "gnus-current-%s-group" action)))
> 	     (if my-default-archive-group
>  		my-default-archive-group 
>  	        (symbol-value (intern (format "gnus-current-%s-group" action))))
---snip---


-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-27 12:57 New group parameter move-to ? Marco Lonsing
  2002-02-27 13:18 ` ShengHuo ZHU
@ 2002-02-27 13:18 ` ShengHuo ZHU
  2002-02-27 13:38 ` David S. Goldberg
  2002-02-27 13:38 ` David S. Goldberg
  3 siblings, 0 replies; 26+ messages in thread
From: ShengHuo ZHU @ 2002-02-27 13:18 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> I'm using the following patch to gnus-sum.el to have a group local
> variable which determines a default group where copy or move
> operations should end up.
> Maybe this feature can be incorporated into gnus and 
> my-default-archive-group can be made a "real" group-parameter
> customisable  via "G c".

Why not use gnus-move-split-methods ? For example,

(setq gnus-move-split-methods 
    '((".*" "nnml:my.default.archive")))

ShengHuo



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

* Re: New group parameter move-to ?
  2002-02-27 12:57 New group parameter move-to ? Marco Lonsing
@ 2002-02-27 13:18 ` ShengHuo ZHU
  2002-02-27 14:08   ` Marco Lonsing
                     ` (3 more replies)
  2002-02-27 13:18 ` ShengHuo ZHU
                   ` (2 subsequent siblings)
  3 siblings, 4 replies; 26+ messages in thread
From: ShengHuo ZHU @ 2002-02-27 13:18 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> I'm using the following patch to gnus-sum.el to have a group local
> variable which determines a default group where copy or move
> operations should end up.
> Maybe this feature can be incorporated into gnus and 
> my-default-archive-group can be made a "real" group-parameter
> customisable  via "G c".

Why not use gnus-move-split-methods ? For example,

(setq gnus-move-split-methods 
    '((".*" "nnml:my.default.archive")))

ShengHuo



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

* Re: New group parameter move-to ?
  2002-02-27 12:57 New group parameter move-to ? Marco Lonsing
                   ` (2 preceding siblings ...)
  2002-02-27 13:38 ` David S. Goldberg
@ 2002-02-27 13:38 ` David S. Goldberg
  3 siblings, 0 replies; 26+ messages in thread
From: David S. Goldberg @ 2002-02-27 13:38 UTC (permalink / raw)


>>>>> On Wed, 27 Feb 2002 13:57:52 +0100, Marco Lonsing
>>>>> <Marco.Lonsing@ruhr-uni-bochum.de> said:

> I'm using the following patch to gnus-sum.el to have a group local
> variable which determines a default group where copy or move
> operations should end up.
> Maybe this feature can be incorporated into gnus and 
> my-default-archive-group can be made a "real" group-parameter
> customisable  via "G c".

Does gnus-move-split-methods not do what you want?  You can set it
local to each group via group parameters, or, as I do, set it to a
function that picks an appropriate value based in part on the current
group.

-- 
Dave Goldberg
david.goldberg6@verizon.net





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

* Re: New group parameter move-to ?
  2002-02-27 12:57 New group parameter move-to ? Marco Lonsing
  2002-02-27 13:18 ` ShengHuo ZHU
  2002-02-27 13:18 ` ShengHuo ZHU
@ 2002-02-27 13:38 ` David S. Goldberg
  2002-02-27 13:38 ` David S. Goldberg
  3 siblings, 0 replies; 26+ messages in thread
From: David S. Goldberg @ 2002-02-27 13:38 UTC (permalink / raw)


>>>>> On Wed, 27 Feb 2002 13:57:52 +0100, Marco Lonsing
>>>>> <Marco.Lonsing@ruhr-uni-bochum.de> said:

> I'm using the following patch to gnus-sum.el to have a group local
> variable which determines a default group where copy or move
> operations should end up.
> Maybe this feature can be incorporated into gnus and 
> my-default-archive-group can be made a "real" group-parameter
> customisable  via "G c".

Does gnus-move-split-methods not do what you want?  You can set it
local to each group via group parameters, or, as I do, set it to a
function that picks an appropriate value based in part on the current
group.

-- 
Dave Goldberg
david.goldberg6@verizon.net





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

* Re: New group parameter move-to ?
  2002-02-27 13:18 ` ShengHuo ZHU
  2002-02-27 14:08   ` Marco Lonsing
@ 2002-02-27 14:08   ` Marco Lonsing
  2002-02-28 13:35   ` Marco Lonsing
  2002-02-28 13:35   ` Marco Lonsing
  3 siblings, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-27 14:08 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Why not use gnus-move-split-methods ? For example,
>
> (setq gnus-move-split-methods 
>     '((".*" "nnml:my.default.archive")))
>
> ShengHuo

That's it, thank you. I didn't find this option.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-27 13:18 ` ShengHuo ZHU
@ 2002-02-27 14:08   ` Marco Lonsing
  2002-02-27 14:08   ` Marco Lonsing
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-27 14:08 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Why not use gnus-move-split-methods ? For example,
>
> (setq gnus-move-split-methods 
>     '((".*" "nnml:my.default.archive")))
>
> ShengHuo

That's it, thank you. I didn't find this option.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-27 13:18 ` ShengHuo ZHU
  2002-02-27 14:08   ` Marco Lonsing
  2002-02-27 14:08   ` Marco Lonsing
@ 2002-02-28 13:35   ` Marco Lonsing
  2002-02-28 13:35   ` Marco Lonsing
  3 siblings, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-28 13:35 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Why not use gnus-move-split-methods ? For example,
>
> (setq gnus-move-split-methods 
>     '((".*" "nnml:my.default.archive")))

Most of the time I need to copy from nnimap groups to the
corresponding group on an nnml backend I tried 

  (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
                                    gnus-newsgroup-name) "nnml+mail:\\1")))

but the regexp-match isn't recognised in the destination group. Is
there another way to achieve this?

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-27 13:18 ` ShengHuo ZHU
                     ` (2 preceding siblings ...)
  2002-02-28 13:35   ` Marco Lonsing
@ 2002-02-28 13:35   ` Marco Lonsing
  2002-02-28 13:44     ` Sean Neakums
                       ` (5 more replies)
  3 siblings, 6 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-28 13:35 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Why not use gnus-move-split-methods ? For example,
>
> (setq gnus-move-split-methods 
>     '((".*" "nnml:my.default.archive")))

Most of the time I need to copy from nnimap groups to the
corresponding group on an nnml backend I tried 

  (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
                                    gnus-newsgroup-name) "nnml+mail:\\1")))

but the regexp-match isn't recognised in the destination group. Is
there another way to achieve this?

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
  2002-02-28 13:44     ` Sean Neakums
@ 2002-02-28 13:44     ` Sean Neakums
  2002-02-28 13:55     ` ShengHuo ZHU
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: Sean Neakums @ 2002-02-28 13:44 UTC (permalink / raw)


commence  Marco Lonsing quotation:

> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried
>
>   (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
>                                     gnus-newsgroup-name) "nnml+mail:\\1")))
>
> but the regexp-match isn't recognised in the destination group. Is
> there another way to achieve this?

In general, to get the at the subexpressions matched by string-match,
you need to use the match-string function.  So instead of
"nnml+mail:\\1", you might write:

  (concat "nnml+mail:" (string-match 1 gnus-newsgroup-name))

There might be a better way to do that in this specific instance,
though.

-- 
 /////////////////  |                  | The spark of a pin
<sneakums@zork.net> |  (require 'gnu)  | dropping, falling feather-like.
 \\\\\\\\\\\\\\\\\  |                  | There is too much noise.



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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
@ 2002-02-28 13:44     ` Sean Neakums
  2002-02-28 13:47       ` Sean Neakums
  2002-02-28 13:47       ` Sean Neakums
  2002-02-28 13:44     ` Sean Neakums
                       ` (4 subsequent siblings)
  5 siblings, 2 replies; 26+ messages in thread
From: Sean Neakums @ 2002-02-28 13:44 UTC (permalink / raw)


commence  Marco Lonsing quotation:

> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried
>
>   (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
>                                     gnus-newsgroup-name) "nnml+mail:\\1")))
>
> but the regexp-match isn't recognised in the destination group. Is
> there another way to achieve this?

In general, to get the at the subexpressions matched by string-match,
you need to use the match-string function.  So instead of
"nnml+mail:\\1", you might write:

  (concat "nnml+mail:" (string-match 1 gnus-newsgroup-name))

There might be a better way to do that in this specific instance,
though.

-- 
 /////////////////  |                  | The spark of a pin
<sneakums@zork.net> |  (require 'gnu)  | dropping, falling feather-like.
 \\\\\\\\\\\\\\\\\  |                  | There is too much noise.



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

* Re: New group parameter move-to ?
  2002-02-28 13:44     ` Sean Neakums
  2002-02-28 13:47       ` Sean Neakums
@ 2002-02-28 13:47       ` Sean Neakums
  1 sibling, 0 replies; 26+ messages in thread
From: Sean Neakums @ 2002-02-28 13:47 UTC (permalink / raw)


Aargh...

commence  Sean Neakums quotation:

>   (concat "nnml+mail:" (string-match 1 gnus-newsgroup-name))
                          ^^^^^^^^^^^^

That should be match-string, of course.

-- 
 /////////////////  |                  | The spark of a pin
<sneakums@zork.net> |  (require 'gnu)  | dropping, falling feather-like.
 \\\\\\\\\\\\\\\\\  |                  | There is too much noise.



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

* Re: New group parameter move-to ?
  2002-02-28 13:44     ` Sean Neakums
@ 2002-02-28 13:47       ` Sean Neakums
  2002-02-28 13:47       ` Sean Neakums
  1 sibling, 0 replies; 26+ messages in thread
From: Sean Neakums @ 2002-02-28 13:47 UTC (permalink / raw)


Aargh...

commence  Sean Neakums quotation:

>   (concat "nnml+mail:" (string-match 1 gnus-newsgroup-name))
                          ^^^^^^^^^^^^

That should be match-string, of course.

-- 
 /////////////////  |                  | The spark of a pin
<sneakums@zork.net> |  (require 'gnu)  | dropping, falling feather-like.
 \\\\\\\\\\\\\\\\\  |                  | There is too much noise.



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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
  2002-02-28 13:44     ` Sean Neakums
  2002-02-28 13:44     ` Sean Neakums
@ 2002-02-28 13:55     ` ShengHuo ZHU
  2002-02-28 13:55     ` ShengHuo ZHU
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: ShengHuo ZHU @ 2002-02-28 13:55 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>
>> Why not use gnus-move-split-methods ? For example,
>>
>> (setq gnus-move-split-methods 
>>     '((".*" "nnml:my.default.archive")))
>
> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried 
>
>   (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
>                                     gnus-newsgroup-name) "nnml+mail:\\1")))
>
> but the regexp-match isn't recognised in the destination group. Is
> there another way to achieve this?

Try this. Maybe there is a better solution. 

(setq gnus-move-split-methods
      '(((if (string-match "nnimap\\+rub:\\(.*\\)" gnus-newsgroup-name) 
	     (list (replace-match "nnml:\\1" nil nil gnus-newsgroup-name))))))

ShengHuo



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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
                       ` (2 preceding siblings ...)
  2002-02-28 13:55     ` ShengHuo ZHU
@ 2002-02-28 13:55     ` ShengHuo ZHU
  2002-02-28 14:57       ` David S. Goldberg
                         ` (3 more replies)
  2002-02-28 16:50     ` Kai Großjohann
  2002-02-28 16:50     ` Kai Großjohann
  5 siblings, 4 replies; 26+ messages in thread
From: ShengHuo ZHU @ 2002-02-28 13:55 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>
>> Why not use gnus-move-split-methods ? For example,
>>
>> (setq gnus-move-split-methods 
>>     '((".*" "nnml:my.default.archive")))
>
> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried 
>
>   (setq gnus-move-split-methods '(((string-match "nnimap\\+rub:\\(.*\\)"
>                                     gnus-newsgroup-name) "nnml+mail:\\1")))
>
> but the regexp-match isn't recognised in the destination group. Is
> there another way to achieve this?

Try this. Maybe there is a better solution. 

(setq gnus-move-split-methods
      '(((if (string-match "nnimap\\+rub:\\(.*\\)" gnus-newsgroup-name) 
	     (list (replace-match "nnml:\\1" nil nil gnus-newsgroup-name))))))

ShengHuo



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

* Re: New group parameter move-to ?
  2002-02-28 13:55     ` ShengHuo ZHU
  2002-02-28 14:57       ` David S. Goldberg
@ 2002-02-28 14:57       ` David S. Goldberg
  2002-03-01  9:33       ` Marco Lonsing
  2002-03-01  9:33       ` Marco Lonsing
  3 siblings, 0 replies; 26+ messages in thread
From: David S. Goldberg @ 2002-02-28 14:57 UTC (permalink / raw)


For what it's worth, I set gnus-move-split-methods to a function
symbol.  Within that function I have a cond that does all sorts
checks.  The most relevant to this discussion results in this call:

(replace-in-string gnus-newsgroup-name "nnvirtual" "nnml")

I don't know if that's just an XEmacs-ism, though.
-- 
Dave Goldberg
david.goldberg6@verizon.net





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

* Re: New group parameter move-to ?
  2002-02-28 13:55     ` ShengHuo ZHU
@ 2002-02-28 14:57       ` David S. Goldberg
  2002-02-28 14:57       ` David S. Goldberg
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: David S. Goldberg @ 2002-02-28 14:57 UTC (permalink / raw)


For what it's worth, I set gnus-move-split-methods to a function
symbol.  Within that function I have a cond that does all sorts
checks.  The most relevant to this discussion results in this call:

(replace-in-string gnus-newsgroup-name "nnvirtual" "nnml")

I don't know if that's just an XEmacs-ism, though.
-- 
Dave Goldberg
david.goldberg6@verizon.net





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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
                       ` (3 preceding siblings ...)
  2002-02-28 13:55     ` ShengHuo ZHU
@ 2002-02-28 16:50     ` Kai Großjohann
  2002-02-28 16:50     ` Kai Großjohann
  5 siblings, 0 replies; 26+ messages in thread
From: Kai Großjohann @ 2002-02-28 16:50 UTC (permalink / raw)
  Cc: ding

Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>
>> Why not use gnus-move-split-methods ? For example,
>>
>> (setq gnus-move-split-methods 
>>     '((".*" "nnml:my.default.archive")))
>
> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried 

How about using `G c' to set gnus-move-split-methods as a
local variable in that group, with a simple string as the value?

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



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

* Re: New group parameter move-to ?
  2002-02-28 13:35   ` Marco Lonsing
                       ` (4 preceding siblings ...)
  2002-02-28 16:50     ` Kai Großjohann
@ 2002-02-28 16:50     ` Kai Großjohann
  2002-03-01  9:36       ` Marco Lonsing
  2002-03-01  9:36       ` Marco Lonsing
  5 siblings, 2 replies; 26+ messages in thread
From: Kai Großjohann @ 2002-02-28 16:50 UTC (permalink / raw)
  Cc: ding

Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>
>> Why not use gnus-move-split-methods ? For example,
>>
>> (setq gnus-move-split-methods 
>>     '((".*" "nnml:my.default.archive")))
>
> Most of the time I need to copy from nnimap groups to the
> corresponding group on an nnml backend I tried 

How about using `G c' to set gnus-move-split-methods as a
local variable in that group, with a simple string as the value?

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



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

* Re: New group parameter move-to ?
  2002-02-28 13:55     ` ShengHuo ZHU
  2002-02-28 14:57       ` David S. Goldberg
  2002-02-28 14:57       ` David S. Goldberg
@ 2002-03-01  9:33       ` Marco Lonsing
  2002-03-01  9:33       ` Marco Lonsing
  3 siblings, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:33 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Try this. Maybe there is a better solution. 
>
> (setq gnus-move-split-methods
>       '(((if (string-match "nnimap\\+rub:\\(.*\\)" gnus-newsgroup-name) 
> 	     (list (replace-match "nnml:\\1" nil nil gnus-newsgroup-name))))))
>

This is working thank you.
Yesterday I tried the following approach and encountered a strange
error:

I set

(defun my-default-name (group)
  "Return the corresponding nnml+mail group."
   (let ((case-fold-search t))
      (when (string-match "nnimap\\+.*:\\(.*\\)" group)
        (concat "nnml+mail:" (match-string 1 group))
     )))

(setq gnus-move-split-methods '((my-default-name)))

The function "my-default-name" returns the correct group name
e.g. "nnml+mail:test" but when I use this to copy/move mail, the
default suggestion is /home/marco/News/nnml+mail:test. I wasn't able
to debug this yet.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-28 13:55     ` ShengHuo ZHU
                         ` (2 preceding siblings ...)
  2002-03-01  9:33       ` Marco Lonsing
@ 2002-03-01  9:33       ` Marco Lonsing
  2002-03-01  9:50         ` Marco Lonsing
  2002-03-01  9:50         ` Marco Lonsing
  3 siblings, 2 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:33 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> Try this. Maybe there is a better solution. 
>
> (setq gnus-move-split-methods
>       '(((if (string-match "nnimap\\+rub:\\(.*\\)" gnus-newsgroup-name) 
> 	     (list (replace-match "nnml:\\1" nil nil gnus-newsgroup-name))))))
>

This is working thank you.
Yesterday I tried the following approach and encountered a strange
error:

I set

(defun my-default-name (group)
  "Return the corresponding nnml+mail group."
   (let ((case-fold-search t))
      (when (string-match "nnimap\\+.*:\\(.*\\)" group)
        (concat "nnml+mail:" (match-string 1 group))
     )))

(setq gnus-move-split-methods '((my-default-name)))

The function "my-default-name" returns the correct group name
e.g. "nnml+mail:test" but when I use this to copy/move mail, the
default suggestion is /home/marco/News/nnml+mail:test. I wasn't able
to debug this yet.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-28 16:50     ` Kai Großjohann
@ 2002-03-01  9:36       ` Marco Lonsing
  2002-03-01  9:36       ` Marco Lonsing
  1 sibling, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:36 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

>> Most of the time I need to copy from nnimap groups to the
>> corresponding group on an nnml backend I tried 
>
> How about using `G c' to set gnus-move-split-methods as a
> local variable in that group, with a simple string as the value?

This makes sense if I want a specific behaviour for a small number of
groups, but most of the time I want the same behaviour for all imap
groups. 

Marco
-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-02-28 16:50     ` Kai Großjohann
  2002-03-01  9:36       ` Marco Lonsing
@ 2002-03-01  9:36       ` Marco Lonsing
  1 sibling, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:36 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

>> Most of the time I need to copy from nnimap groups to the
>> corresponding group on an nnml backend I tried 
>
> How about using `G c' to set gnus-move-split-methods as a
> local variable in that group, with a simple string as the value?

This makes sense if I want a specific behaviour for a small number of
groups, but most of the time I want the same behaviour for all imap
groups. 

Marco
-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-03-01  9:33       ` Marco Lonsing
@ 2002-03-01  9:50         ` Marco Lonsing
  2002-03-01  9:50         ` Marco Lonsing
  1 sibling, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:50 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> Yesterday I tried the following approach and encountered a strange
> error:
>
> I set
>
> (defun my-default-name (group)
>   "Return the corresponding nnml+mail group."
>    (let ((case-fold-search t))
>       (when (string-match "nnimap\\+.*:\\(.*\\)" group)
>         (concat "nnml+mail:" (match-string 1 group))
>      )))
>
> (setq gnus-move-split-methods '((my-default-name)))
>
> The function "my-default-name" returns the correct group name
> e.g. "nnml+mail:test" but when I use this to copy/move mail, the
> default suggestion is /home/marco/News/nnml+mail:test. I wasn't able
> to debug this yet.

O.K. the problem seems to be in  gnus-get-split-value it calls
my-default-name, which returns a valid group name and pushes
gnus-article-save-directory to this string. This seems to be a
reasonable default for article saving, but not for copying/moving.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* Re: New group parameter move-to ?
  2002-03-01  9:33       ` Marco Lonsing
  2002-03-01  9:50         ` Marco Lonsing
@ 2002-03-01  9:50         ` Marco Lonsing
  1 sibling, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-03-01  9:50 UTC (permalink / raw)


Marco Lonsing <Marco.Lonsing@ruhr-uni-bochum.de> writes:

> Yesterday I tried the following approach and encountered a strange
> error:
>
> I set
>
> (defun my-default-name (group)
>   "Return the corresponding nnml+mail group."
>    (let ((case-fold-search t))
>       (when (string-match "nnimap\\+.*:\\(.*\\)" group)
>         (concat "nnml+mail:" (match-string 1 group))
>      )))
>
> (setq gnus-move-split-methods '((my-default-name)))
>
> The function "my-default-name" returns the correct group name
> e.g. "nnml+mail:test" but when I use this to copy/move mail, the
> default suggestion is /home/marco/News/nnml+mail:test. I wasn't able
> to debug this yet.

O.K. the problem seems to be in  gnus-get-split-value it calls
my-default-name, which returns a valid group name and pushes
gnus-article-save-directory to this string. This seems to be a
reasonable default for article saving, but not for copying/moving.

Marco

-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

* New group parameter move-to ?
@ 2002-02-27 12:57 Marco Lonsing
  0 siblings, 0 replies; 26+ messages in thread
From: Marco Lonsing @ 2002-02-27 12:57 UTC (permalink / raw)


I'm using the following patch to gnus-sum.el to have a group local
variable which determines a default group where copy or move
operations should end up.
Maybe this feature can be incorporated into gnus and 
my-default-archive-group can be made a "real" group-parameter
customisable  via "G c".


---snip---
30a31,34
> ;;default move/copy-to-group
> (defvar my-default-archive-group nil "*copy/move into this group by default")
> (setq my-default-archive-group nil)
> 
8348c8352,8356
< 	     (symbol-value (intern (format "gnus-current-%s-group" action)))
---
>            ;;use my-default-archive-group if not nil
> 	     ;;(symbol-value (intern (format "gnus-current-%s-group" action)))
> 	     (if my-default-archive-group
>  		my-default-archive-group 
>  	        (symbol-value (intern (format "gnus-current-%s-group" action))))
---snip---


-- 
Marco Lonsing
Mathematik XI - Numerik	       email: Marco.Lonsing@ruhr-uni-bochum.de
Ruhr-Universitaet Bochum       phone: +49-234-32-23244
Universitaetsstr. 150	       fax  : +49-234-32-03244
D-44721 Bochum, GERMANY	       www  : http://www.ruhr-uni-bochum.de/num1/marco/



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

end of thread, other threads:[~2002-03-01  9:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27 12:57 New group parameter move-to ? Marco Lonsing
2002-02-27 13:18 ` ShengHuo ZHU
2002-02-27 14:08   ` Marco Lonsing
2002-02-27 14:08   ` Marco Lonsing
2002-02-28 13:35   ` Marco Lonsing
2002-02-28 13:35   ` Marco Lonsing
2002-02-28 13:44     ` Sean Neakums
2002-02-28 13:47       ` Sean Neakums
2002-02-28 13:47       ` Sean Neakums
2002-02-28 13:44     ` Sean Neakums
2002-02-28 13:55     ` ShengHuo ZHU
2002-02-28 13:55     ` ShengHuo ZHU
2002-02-28 14:57       ` David S. Goldberg
2002-02-28 14:57       ` David S. Goldberg
2002-03-01  9:33       ` Marco Lonsing
2002-03-01  9:33       ` Marco Lonsing
2002-03-01  9:50         ` Marco Lonsing
2002-03-01  9:50         ` Marco Lonsing
2002-02-28 16:50     ` Kai Großjohann
2002-02-28 16:50     ` Kai Großjohann
2002-03-01  9:36       ` Marco Lonsing
2002-03-01  9:36       ` Marco Lonsing
2002-02-27 13:18 ` ShengHuo ZHU
2002-02-27 13:38 ` David S. Goldberg
2002-02-27 13:38 ` David S. Goldberg
2002-02-27 12:57 Marco Lonsing

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