Gijs Hillenius | 18 Nov 12:18 2014
Picon

resend message: Wrong type argument: stringp, mail-user-name

Hi

This is most likely a local bug: when I want to resend an email, I do
`SDr`. Invariably, when hitting C-c C-c, the result is
"message-make-from: Wrong type argument: stringp, mail-user-name"

Alternatively, SDe just works.

Debugger entered--Lisp error: (wrong-type-argument stringp mail-user-name)
  string-match("[^- !#-'*+/-9=?A-Z^-~]" mail-user-name)
  message-make-from()
  message-generate-headers(((optional . References)))
  message-setup-1(((To . "some name <some <at> name.example>")) nil nil nil)
  message-setup(((To . "some name <some <at> name.example>")))
  message-resend("some name <some <at> name.example>")
  gnus-summary-resend-message("some name <some <at> name.example>" nil)
  call-interactively(gnus-summary-resend-message nil nil)
  command-execute(gnus-summary-resend-message)

anybody an idea?

--

-- 
BOFH excuse #341:

HTTPD Error 666 : BOFH was here
Emanuel Berg | 17 Nov 23:09 2014
Picon
Picon

Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list

Denis Bitouzé <dbitouze <at> wanadoo.fr> writes:

>> Again, Elisp doesn't have to be your mother tongue
>> for this. However, if you are a perfectionist (as I
>> am, so I'm not criticizing) perhaps you should make
>> it your mother tongue...
>
> Well, in another life, maybe ;)

I'm saying, if you get bugged by details, it is a good
idea to start working on how to fix them, because if
you cannot there are a zillion details to bug you.

> With which keybinding?

gnus-article-reply-dwim is what you want to use. It is
the one defun interactive so the only one that can be
called with a keybinding or from the M-x prompt.

If you want to play with it, here is how to set it to
"R" (note: capital) in `gnus-article-mode-map' - if it
works, perhaps should be made available from
`gnus-summary-mode' (`gnus-summary-mode-map') as
well...

(define-key gnus-article-mode-map "R" 'gnus-article-reply-dwim)

> - for mailing lists, `F` doesn't work (ML address in
> CC only) and `R` does work, - for newsgroups, `F`
> does work and `R` doesn't work (I'm asked if I
(Continue reading)

Emanuel Berg | 15 Nov 14:20 2014
Picon
Picon

Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list

Denis Bitouzé <dbitouze <at> wanadoo.fr> writes:

> Meanwhile, I noticed that `R` gives the expected
> result (To: is the mailing address). But what is
> still annoying me is to be careful to the keybinding
> I have to use depending on whether I'm answering a
> mail or a usenet article.

Yes, I agree that isn't good. In terms of programming,
it is super-easy to fix as well. It is more an issue
of knowing the domains (mails, listbots, news, and
Gnus), which might not be that easy... like, at all!

> Unfortunately, elisp is not my mother tongue.
> Suppose I'd like to use `R` as unique keybinding
> both in `debian.user` group (mailing list) and in
> `nntp+gmane:gmane.emacs.gnus.user` group (usenet
> forum), what would be the corresponding code?

Again, Elisp doesn't have to be your mother tongue for
this. However, if you are a perfectionist (as I am, so
I'm not criticizing) perhaps you should make it your
mother tongue...

But try this:

(require 'gnus-msg)

(defun gnus-article-reply-dwim ()
  (interactive)
(Continue reading)

mikael.svahnberg | 11 Nov 09:29 2014
Picon

Batch IMAP jobs?

Hi,

I primarily use gnus to read my gmail, and one of the things I like is the ability to quickly and easily mark all
the mails that I don't want/need to read and move them away from the inbox (to be compatible with other mail
readers e.g. on my phone, I can't just keep them as old articles and let gnus simply not show them).

Any given morning this means that I select 10-20 messages and execute a move command. This is a slow
operation and may sometimes take a couple of minutes.

I have a sneaking suspicion (no proof, though) that gnus/nnimap issues one move command per message.

(a) is this true?

(b) if (a), is there a way to change this behaviour so that a single move command for all the selected messages
is issued?

(c) if (b), would it make any difference on the speed?

On a side note, when I search messages with (M-s), I get the impression that this is done in the same way (i.e.
one IMAP search command is issued for each message), so it ought to be possible to speed things up here too...

/Mikael
Emanuel Berg | 7 Nov 20:25 2014
Picon
Picon

Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list

Denis Bitouzé <dbitouze <at> wanadoo.fr> writes:

> I guess so. I'll have a look at splitting mail.

Here is an example of how to split - for different
reasons, in including to get individual groups for
listbots. Note though that many listbots are available
as newsgroups so unless you already subscribe in an
unorganized way instead of splitting, I'd find the
"real" groups.

(setq nnmail-split-methods
 '(("zsh"          "^\\(Cc\\|\\(Resent-\\)?To\\):.*zsh-\\(announce\\|workers\\|users\\) <at> zsh\.org.*")
   ("debian.user"  "^\\(Cc\\|\\(Resent-\\)?To\\):.*debian-user <at> lists\.debian\.org.*")
   ("cc"           "^\\(Cc\\|\\(Resent-\\)?To\\):.*\\(help-gnu-emacs\\|info-gnus-english\\) <at> gnu\.org.*")
   ("spam-ooa"     "^\\(Cc\\|\\(Resent-\\)?To\\):.*l4-hackers <at> os\.inf\.tu-dresden\.de.*")
   ("emacs-w3m"    "^Subject: \\[emacs-w3m.*")
   ("mail.misc"    "") ))

Accidently, you can implement a DWIM `r' and `F' based
on what group you are in = find out with
`gnus-group-group-name' - as in, something like,

(if (member (gnus-group-group-name) '("nnml:mail.sent"
                                      "nndraft:drafts")
                                      ) ...

If you want to stick with the header extraction idea
this might help you:

(Continue reading)

Damien Wyart | 7 Nov 10:09 2014
Picon

Re: Make `r` and `F` behave as `S L` when replying to a message from a mailing list

* Denis Bitouzé <dbitouze <at> wanadoo.fr> in gnu.emacs.gnus:
> What do you mean by "Gnus" groups? Newsgroups, as provided by gmane
> for instance?

No, the notion of group in Gnus also applies to email messages. It is
just a container of messages, either stored locally or accessed through
IMAP for mails, or read via NNTP for News (the Agent also plays a role
by caching locally, but let's keep things simple :).

If you use Gnus to read email, you use mail groups, even if you do not
know it :).

See for example:
https://www.gnu.org/software/emacs/manual/html_node/gnus/Splitting-Mail.html
https://www.gnu.org/software/emacs/manual/html_node/gnus/Choosing-a-Mail-Back-End.html
https://www.gnu.org/software/emacs/manual/html_node/gnus/Using-IMAP.html

> > I think the simplest solution is to play with the corresponding group
> > parameter to-address (and broken-reply-to if needed). See:
> > https://www.gnu.org/software/emacs/manual/html_node/gnus/Group-Parameters.html

> Unfortunately, some of the lists I'm subscribed to don't have any
> newsgroup counterpart.

How do you read them? If each list doesn't have its own group, you might
need to configure splitting. Having a group per list is very convenient.

> A further check of the list's headers puzzled me: `Reply-To:` is the
> list address, not the sender's one. Why Gnus doesn't take it into
> account when I reply with `r` or `F`?
(Continue reading)

Emanuel Berg | 6 Nov 00:57 2014
Picon
Picon

Re: IMAP copies of usenet posts in exactly the same format

"Andrzej A. Filip" <andrzej.filip <at> gmail.com> writes:

> How to make gnus store copies of usent posts in IMAP
> folder in exactly the same format as they are sent
> to usenet?

There are several ways to do that, though I don't know
exactly what you mean by "exactly the same format".

The best and most "automatic" way I've found is to set
`gnus-message-archive-group'. In my case, as I use
nnml for mail, it looks like this:

    (setq gnus-message-archive-group "nnml:mail.sent")

This will insert a Gcc header to your outgoing
messages:

    Gcc: nnml:mail.sent

In effect, you are archiving your outgoings by sending
them to yourself.

As for the "same format", in nnml you get a file on
your filesystem for each message. With the 'file'
command, it tells me the files are "news or mail,
ASCII text" - all files (mails and news), so that's
pretty much the same format, I'd say. (Of course, most
often I access them from Gnus, but sometimes as
filesystem files, yes.)
(Continue reading)

Emanuel Berg | 6 Nov 00:41 2014
Picon
Picon

Re: Using lisp code in query-replace-regexp

Julien Cubizolles <j.cubizolles <at> free.fr> writes:

> I used replace-match-maybe-edit because I wanted to
> be prompted for each replacement, and replace-match
> wouldn't allow it. However with
> replace-match-maybe-edit, the excursion is messed up
> at the end. It wasn't the case with replace-match.

How do you mean messed up? You are using
`save-excursion' outside of `save-restriction' just as
you should.

--

-- 
underground experts united
Andrey Lisin | 5 Nov 18:14 2014
Picon

How to show all messages in threads where unread exist

Hello,

Probably it's silly question, but I didn't find the answer in the Gnus
documentation. How to show all messages in threads, where unread
messages exist?

Thank you.

Andrzej A. Filip | 5 Nov 15:26 2014
Picon

IMAP copies of usenet posts in exactly the same format

How to make gnus store copies of usent posts in IMAP folder in exactly the same
format as they are sent to usenet?

Storing copies works in my case but copies are saved as quoted-printable and
posts go as 8bit.  O would like to limit mail format change only to usenet
posts copies.

Emanuel Berg | 4 Nov 20:57 2014
Picon
Picon

Re: Using lisp code in query-replace-regexp

Julien Cubizolles <j.cubizolles <at> free.fr> writes:

> I can use the following replace string (for lack of
> a better term) with query-replace-regexp

Yes, you can do that.

Check out this:

(while (re-search-forward REGEXP nil t)
  (replace-match TO-STRING nil nil))

from the help of `replace-regexp'.

So instead of the `replace-match' stuff above, you
write a function that examines `match-beginning',
`match-end', and `match-string', and then use that as
input to your Elisp, to produce the on-the-fly
TO-STRING (in the phrasing of the above Elisp).

Good luck! When you get it to work, post it here :)

--

-- 
underground experts united

Gmane