Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* moving articles from mail groups
@ 2015-05-23 18:03 Hikaru Ichijyo
  2015-05-24  0:00 ` Emanuel Berg
  2015-05-24 12:34 ` Dan Christensen
  0 siblings, 2 replies; 6+ messages in thread
From: Hikaru Ichijyo @ 2015-05-23 18:03 UTC (permalink / raw)
  To: info-gnus-english

This is a small problem, but I'd still like to fix it...

I have the following in my ~/.gnus.el, to help me with saving messages:

      gnus-update-message-archive-method t
      gnus-default-article-saver 'gnus-summary-save-in-mail
      gnus-prompt-before-saving t
      gnus-message-archive-method
          '(nnfolder "archive"
		     (nnfolder-directory "~/Mail")
		     (nnfolder-active-file "~/Mail/.active")
		     (nnfolder-nov-is-evil t)
		     (nnfolder-get-new-mail nil))
      gnus-message-archive-group "sent-mail"
      gnus-gcc-mark-as-read t
      gnus-move-split-methods
           '(("^X-Gnus-.*\\(analog\\|digital\\|linux-audio\\|ensoniq\\|akai\\)"
                                          "nnfolder:synth")
             ("^X-Gnus-.*gentoo"          "nnfolder:gentoo")
	     ("^X-Gnus-.*\\(cde\\|sun\\)" "nnfolder:freenet")
	     ("^From:.*uchicago"          "nnfolder:uchicago")
             (""                          "nnfolder:saved-messages"))

With that setup, when I use gnus-summary-move-article (B m) to move an
article from my mail groups into one of these nnfolder files, I get
prompted like this:

         Move this article to (default nnfolder:freenet): nnmbox:

Yes, that "nnmbox:" part gets printed by the system (not by me).  I end
up having to delete back over it every time I want to do this.  Then,
when the line is cleared, I can hit return and it will do the right
thing as suggested by the default in parenthesis ("default
nnfolder:freenet)").  It saves into the folder I want it to, but I have
to get rid of "nnmbox:" at the end every time.

Is there a way I can make it stop doing that?

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
					--Thomas Paine

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

* Re: moving articles from mail groups
  2015-05-23 18:03 moving articles from mail groups Hikaru Ichijyo
@ 2015-05-24  0:00 ` Emanuel Berg
  2015-05-24  7:47   ` Hikaru Ichijyo
  2015-05-24 12:34 ` Dan Christensen
  1 sibling, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2015-05-24  0:00 UTC (permalink / raw)
  To: info-gnus-english

Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:

> I have the following in my ~/.gnus.el, to help me with
> saving messages:
>
>      gnus-update-message-archive-method t
>      gnus-default-article-saver 'gnus-summary-save-in-mail
>      ...

It is better to use separate `setq's. Easier to see
what is what. More control.

> With that setup, when I use
> gnus-summary-move-article (B m) to move an article
> from my mail groups into one of these nnfolder
> files, I get prompted like this:
>
>          Move this article to (default
> nnfolder:freenet): nnmbox:
>
> Yes, that "nnmbox:" part gets printed by the system
> (not by me).

Why do you want to store the messages using
another backend?

And why do you want to do this manually by hitting
`B-m' each time? If you are fine with that, why are
you not fine with hitting M-DEL each time as well?

Better to automatize. For example, you can send a copy
of all messages sent to yourself, then split it to
archive folders based on header data.

-- 
underground experts united
http://user.it.uu.se/~embe8573

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

* Re: moving articles from mail groups
  2015-05-24  0:00 ` Emanuel Berg
@ 2015-05-24  7:47   ` Hikaru Ichijyo
  2015-05-24 20:08     ` Emanuel Berg
  2015-05-24 23:11     ` Emanuel Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Hikaru Ichijyo @ 2015-05-24  7:47 UTC (permalink / raw)
  To: info-gnus-english

Emanuel Berg <embe8573@student.uu.se> writes:

> Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:
>> With that setup, when I use
>> gnus-summary-move-article (B m) to move an article
>> from my mail groups into one of these nnfolder
>> files, I get prompted like this:
>>
>>          Move this article to (default
>> nnfolder:freenet): nnmbox:
>>
>> Yes, that "nnmbox:" part gets printed by the system
>> (not by me).
>
> Why do you want to store the messages using
> another backend?

The manual uses nnfolder as an example of how a user may keep an archive
of mailboxes all in a subdirectory for mail they may keep.  I couldn't
see anything wrong with the idea.  In fact, the syntax for how I've done
this is mostly taken from the manual.

> And why do you want to do this manually by hitting
> `B-m' each time? If you are fine with that, why are
> you not fine with hitting M-DEL each time as well?
>
> Better to automatize. For example, you can send a copy
> of all messages sent to yourself, then split it to
> archive folders based on header data.

This is not for saving *every* message.  This is only for saving
particular messages I come across that I want to save.  Because it is
only me deciding which messages those should be, it has to be manual.
Do you know why it's double-prompting me this way, or how to stop it?

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
					--Thomas Paine

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

* Re: moving articles from mail groups
  2015-05-23 18:03 moving articles from mail groups Hikaru Ichijyo
  2015-05-24  0:00 ` Emanuel Berg
@ 2015-05-24 12:34 ` Dan Christensen
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Christensen @ 2015-05-24 12:34 UTC (permalink / raw)
  To: info-gnus-english

Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:

...

> With that setup, when I use gnus-summary-move-article (B m) to move an
> article from my mail groups into one of these nnfolder files, I get
> prompted like this:
>
>          Move this article to (default nnfolder:freenet): nnmbox:
>
> Yes, that "nnmbox:" part gets printed by the system (not by me).  I end
> up having to delete back over it every time I want to do this.  Then,
> when the line is cleared, I can hit return and it will do the right
> thing as suggested by the default in parenthesis ("default
> nnfolder:freenet)").

Have you tried just hitting return with "nnmbox:" showing?  In my
experience, if you don't edit the provided prefix, it uses the default.

If that doesn't work, you can also change the prefix shown with
the following:

(setq gnus-move-group-prefix-function 'my-move-group-prefix)
(defun my-move-group-prefix (dummy) "anything you want")

Maybe you want to use "" or "nnfolder:" for the prefix.

Dan



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

* Re: moving articles from mail groups
  2015-05-24  7:47   ` Hikaru Ichijyo
@ 2015-05-24 20:08     ` Emanuel Berg
  2015-05-24 23:11     ` Emanuel Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2015-05-24 20:08 UTC (permalink / raw)
  To: info-gnus-english

Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:

> The manual uses nnfolder as an example of how a user
> may keep an archive of mailboxes all in
> a subdirectory for mail they may keep. I couldn't
> see anything wrong with the idea. In fact, the
> syntax for how I've done this is mostly taken from
> the manual.

I don't use either of your backends (I use nnml) which
is perhaps a lame excuse for not being able to give
a to-the-point answer, however that said I still don't
see why you'd want to change backend if there is no
apparent reason other than reorganizing (uniform)
material into several groups, which seems to lend
itself to just creating new groups of the
same backend.

Besides making sense intuitively that would solve this
specific issue as well, and possibly more future issue
unknown at this point.

> This is not for saving *every* message. This is only
> for saving particular messages I come across that
> I want to save. Because it is only me deciding which
> messages those should be, it has to be manual.

If you don't want this for every message, and if
you're OK doing it manually, why don't just hit M-DEL
each time as well to remove the prefix?

> Do you know why it's double-prompting me this way,
> or how to stop it?

The reason the prefix appears is because it
makes sense.

I do know how to stop it in theory, but I decline to
take action (at this point at least) because I think
first it should be explored if the same backend can be
used, second it should be reconsidered if this really
is a problem to be fix.

Only at that point I would write an Elisp wrapper,
a new interface to the old function, so that function
in turn would be invoked non-interactively, with the
data as arguments. That way you don't have to bother
with that interface at all, and your own interface can
be as fast/specific as you write it to be.

-- 
underground experts united
http://user.it.uu.se/~embe8573



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

* Re: moving articles from mail groups
  2015-05-24  7:47   ` Hikaru Ichijyo
  2015-05-24 20:08     ` Emanuel Berg
@ 2015-05-24 23:11     ` Emanuel Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2015-05-24 23:11 UTC (permalink / raw)
  To: info-gnus-english

Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:

> Do you know why it's double-prompting me this way,
> or how to stop it?

Try this - only exchange the three occurrences of
"nnml" to suit your situation:

(defun gnus-summary-move-nnml (group)
  (interactive "snnml group: ")
  (gnus-summary-move-article 1 (format "nnml:%s" group)) )

If you want to do it on many articles with one
invocation you have to replace the "1" with a prefix
argument (which defaults to 1).

-- 
underground experts united
http://user.it.uu.se/~embe8573

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

end of thread, other threads:[~2015-05-24 23:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-23 18:03 moving articles from mail groups Hikaru Ichijyo
2015-05-24  0:00 ` Emanuel Berg
2015-05-24  7:47   ` Hikaru Ichijyo
2015-05-24 20:08     ` Emanuel Berg
2015-05-24 23:11     ` Emanuel Berg
2015-05-24 12:34 ` Dan Christensen

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