Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Gnus works `at it is' but isn't that a coincidence?
@ 2010-05-17 17:38 Merciadri Luca
       [not found] ` <87fx1qcpnr.fsf@topper.koldfront.dk>
  2010-12-09 16:07 ` Tassilo Horn
  0 siblings, 2 replies; 6+ messages in thread
From: Merciadri Luca @ 2010-05-17 17:38 UTC (permalink / raw)
  To: info-gnus-english

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I like to understand how things work. My Gnus works perfectly now, but
I still do not understand how it can work. You might file the description of
my .emacs and .gnus files at
http://www.student.montefiore.ulg.ac.be/~merciadri/emacs.php.

1. I am personally mixing nnml and nnmail. It looks like I am only
using nnml, because

==
(setq nnmail-spool-file "/var/mail/merciadriluca")
==
seems to do no effect, as I do not even have a `merciadriluca'
directory in /var/mail/.

2. What's the interest of gnus-select-method? Is it the `primary'
method? I think so, but then, what is the interest of defining a
secondary method? What is the difference in their order? I define

==
(setq gnus-select-method '((nntp "news.stuff.com")))
(setq gnus-secondary-select-methods '((nnml "")))
==

but I do not know what they do exactly.

3. If I define

==
(setq message-directory "~/.Mail/")
(setq nnml-directory "~/Mail/")
==

what will be the difference between both concepts?

4. To me,

==
(setq mail-sources
   (list '(directory
             :path "~/Mail/"
             :suffix "" 
          )
   )
)
==
simply tells Gnus to fetch e-mails at ~/Mail/: it tells it `okay,
messages are there. There is a MUA which brings them there, and do not
try to understand it further.' Am I right?

5. Is there an interesting in defining iso-8859-15 as a charset, such
as in

==
(defun mm-read-charset (prompt)
   "Return a charset."
   'iso-8859-15)
 (setq gnus-default-posting-charset (quote iso-8859-15))
==
?

6. I use

==
(setq message-send-mail-function 'smtpmail-send-it); For message-mode
(setq send-mail-function 'smtpmail-send-it); ditto
(setq send-mail-command 'smtpmail-send-it); For mail-mode (Rmail)
==

but why do I need the three ones to make the whole stuff work?

7. What's the interest of `my-signature' in

==
(setq message-signature 'my-signature)
(setq gnus-signature-separator '("^-- $"))
==
?

8. I set

==
(setq nntp-authinfo-file ".someauthfile.gpg")
(setq smtpmail-auth-credentials ".someauthfile.gpg")
==

but what's the difference between them?

9. Providing that the whole stuff works as it is, what is the scheme
which is done when I want to fetch e-mails, or when I want to send an
e-mail, both through Gnus?

Thanks.

- -- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.
- -- 

 If it's too good to be true, then it probably is.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkvxfy8ACgkQM0LLzLt8Mhw2qgCdEAgM6mr7iJYwrfziCz4311B8
Sa8An3M5fS4VmQSjsSziyetSBZMn0bCG
=RuGx
-----END PGP SIGNATURE-----

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

* Re: Gnus works `at it is' but isn't that a coincidence?
       [not found] ` <87fx1qcpnr.fsf@topper.koldfront.dk>
@ 2010-05-17 19:51   ` Merciadri Luca
  2010-05-18  9:01     ` Uday S Reddy
  2010-12-09 16:20     ` Tassilo Horn
  0 siblings, 2 replies; 6+ messages in thread
From: Merciadri Luca @ 2010-05-17 19:51 UTC (permalink / raw)
  To: info-gnus-english

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

asjo@koldfront.dk (Adam Sjøgren) writes:

> On Mon, 17 May 2010 19:38:55 +0200, Merciadri wrote:
>
>> I like to understand how things work.
>
> Good thing you've got the source code and manual for Gnus at your fingertips!
>
> :-)
Yes. Sorry, I should have taken more than an eye into it.

>> (setq nnmail-spool-file "/var/mail/merciadriluca")
>
> This variable was removed in Gnus 5.9, so it isn't a big wonder that it
> doesn't do much in your Gnus 5.11 :-)
Okay. I removed it, and, effectively, it does no(t) harm.
>
> Where did you pick it up?
>
>> 2. What's the interest of gnus-select-method?
>
> What do you mean?
Solved by your following answers.

>> Is it the `primary' method?
>
> Yes.
>
>> I think so, but then, what is the interest of defining a secondary
>> method?
>
> So you can have more than one? I connect to three nntp-servers, for
> instance.
>
>> What is the difference in their order? I define
>
> The primary method isn't prefixed. The secondary ones are.
Prefixed? Huh? In which way? You meant that if method1 is stuff1 and
method2 is stuff2, stuff1 is not prefixed, and, thus, everything
calling stuff1 without prefix will call stuff1, but, to call stuff2,
one needs to add some prefix before operations?

>> (setq gnus-select-method '((nntp "news.stuff.com")))
>> (setq gnus-secondary-select-methods '((nnml "")))
>
>> but I do not know what they do exactly.
>
> This means that you can refer to groups on news.stuff.com by just their
> name, say a.group.name, instead of by nntp+news.stuff.com:a.group.name,
> and that you refer to your mail-groups as nnml:a.mailgroup.name
Thanks.

>> 3. If I define
>
>> ==
>> (setq message-directory "~/.Mail/")
>> (setq nnml-directory "~/Mail/")
>> ==
>
>> what will be the difference between both concepts?
>
> ,----[ C-h v message-directory RET ]
> | `message-directory' is a variable declared in Lisp.
> |   -- loaded from "message"
> | 
> | Value: "~/Mail/"
> | 
> | Documentation:
> | *Directory from which all other mail file variables are derived.
> `----
>
> ,----[ C-h v nnml-directory RET ]
> | `nnml-directory' is a variable declared in Lisp.
> |   -- loaded from "nnml"
> | 
> | Value: "~/Mail/"
> | 
> | Documentation:
> | Spool directory for the nnml mail backend.
> | 
> | This is a Gnus server variable.  See Info node `(gnus)Select Methods'.
> `----
Thanks.

>> 4. To me,
>
>> ==
>> (setq mail-sources
>>    (list '(directory
>>              :path "~/Mail/"
>>              :suffix ""
>>           )
>>    )
>> )
>> ==
>> simply tells Gnus to fetch e-mails at ~/Mail/: it tells it `okay,
>> messages are there. There is a MUA which brings them there, and do not
>> try to understand it further.' Am I right?
>
> I think it means "pick up new emails from ~/Mail/" - which is probably a
> bad idea if that is also where you store your emails.
That might explain the total mess it currently does on my HDD.

> On my machine emails are delivered to an mbox file in /var/mail/, and I
> simply use the mail-source ((file)).
Not a bad idea.

>> 5. Is there an interesting in defining iso-8859-15 as a charset, such
>> as in
>
>> ==
>> (defun mm-read-charset (prompt)
>>    "Return a charset."
>>    'iso-8859-15)
>>  (setq gnus-default-posting-charset (quote iso-8859-15))
>> ==
>> ?
>
> Eh, what?
Sorry, I wanted to say `[...] an _interest_ in defining [...]'. Is it
more clear, now? I mean... utf-8 is widely accepted, but is there some
reason why Gnus should use iso8859-1? What is its default setting? I
guess utf-8, but to be sure.

>> 7. What's the interest of `my-signature' in
>
> What do you mean by 'interest' here?
For me, `my-signature' was some homemade variable, and I was asking
why I would have ever defined such a variable if there was already one
which was made for it (i.e. a default one).

>> ==
>> (setq message-signature 'my-signature)
>> (setq gnus-signature-separator '("^-- $"))
>> ==
>> ?
>
> You must have defined my-signature somewhere previously?
No, as you can see on http://www.student.montefiore.ulg.ac.be/~merciadri/emacs.php.

> Why are you customizing gnus-signature-separator?!
Isn't that necessary? That could be what causes my signatures' problems.
>
>> 8. I set
>
>> ==
>> (setq nntp-authinfo-file ".someauthfile.gpg")
>> (setq smtpmail-auth-credentials ".someauthfile.gpg")
>> ==
>
>> but what's the difference between them?
>
> Looks like one is for nntp, the other is for smtp? You can get help on
> any variable by pressing 'C-h v' and then typing the name of the
> variable (tab-completion works).
Both give [no match] in my Emacs. And I never found any interesting
answer about it, on the Internet too.

>> 9. Providing that the whole stuff works as it is, what is the scheme
>> which is done when I want to fetch e-mails, or when I want to send an
>> e-mail, both through Gnus?
>
> Are you asking for someone to paraphrase what Gnus does when you go 'g'
> in the group buffer and when you go 'm', write an email and then go 'C-c
> C-c'?
>
> I'm afraid I don't understand the question :-)
According to the settings of my .gnus, I would like, to be sure to
have understood the whole process, to know how it manages to post some
message using nnml/nnmail. The nntp method is not a problem for me; I
understand how it works, but, for the e-mail, I still mix all the
directories. I have specified many directories in my .gnus, but I
cannot judge if they are reasonably set, i.e. if respective stuff
needs to be there. What I can see is that I have two directories in
~/:

==
$ ls -al | grep Mail
drwxr-xr-x  5 merciadriluca merciadriluca     4096 2010-05-17 21:35 Mail
drwxr-xr-x  3 merciadriluca merciadriluca     4096 2010-05-08 21:23 .Mail
==

with

==
~/Mail$ ls -al
total 180
drwxr-xr-x  5 merciadriluca merciadriluca  4096 2010-05-17 21:35 .
drwxr-xr-x 98 merciadriluca merciadriluca 20480 2010-05-17 21:39 ..
- -rw-r--r--  1 merciadriluca merciadriluca    34 2010-05-17 21:35 active
drwxr-xr-x  2 merciadriluca merciadriluca  4096 2009-11-01 19:11 drafts
- -rw-------  1 merciadriluca merciadriluca  4854 2009-12-05 21:18 Incoming42160BS
- -rw-r--r--  1 merciadriluca merciadriluca 19765 2009-12-05 21:18 Incoming4216n3L
- -rw-------  1 merciadriluca merciadriluca  2427 2009-12-05 21:18 Incoming4318Hte
- -rw-r--r--  1 merciadriluca merciadriluca  2730 2009-12-05 21:18 Incoming4339aFM
drwxr-xr-x  3 merciadriluca merciadriluca  4096 2009-11-01 18:40 mail
drwxr-xr-x  2 merciadriluca merciadriluca 12288 2010-05-17 21:35 posted
- -rw-------  1 merciadriluca merciadriluca 91953 2010-05-13 10:33 .procmail.log
==

and

==
~/.Mail$ ls -al
total 47456
drwxr-xr-x  3 merciadriluca merciadriluca     4096 2010-05-08 21:23 .
drwxr-xr-x 98 merciadriluca merciadriluca    20480 2010-05-17 21:39 ..
drwxr-xr-x  2 merciadriluca merciadriluca     4096 2009-11-01 18:40 archive
- -rw-------  1 merciadriluca mail            847264 2010-05-08 21:23 Incoming194817BJ
- -rw-r--r--  1 merciadriluca merciadriluca  3146079 2010-05-08 21:16 Incoming194818tz
- -rw-r--r--  1 merciadriluca merciadriluca 31749839 2010-05-08 21:23 Incoming19481u3C
- -rw-r--r--  1 merciadriluca merciadriluca 12748754 2010-05-08 21:14 Incoming19481vjt
==

Thanks for your help.

- -- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- -- 

 Don't take life too seriously; you'll never get out of it alive.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkvxnjcACgkQM0LLzLt8MhwCZQCcCA+sTLF0RzwnJBbCDDvztdDz
73gAn3iCS8FrnB9ZlVB9aoD6AlLAL9sQ
=RowF
-----END PGP SIGNATURE-----

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

* Re: Gnus works `at it is' but isn't that a coincidence?
  2010-05-17 19:51   ` Merciadri Luca
@ 2010-05-18  9:01     ` Uday S Reddy
  2010-12-10  6:58       ` Tassilo Horn
  2010-12-09 16:20     ` Tassilo Horn
  1 sibling, 1 reply; 6+ messages in thread
From: Uday S Reddy @ 2010-05-18  9:01 UTC (permalink / raw)
  To: info-gnus-english

Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> writes:

>> The primary method isn't prefixed. The secondary ones are.
>
> Prefixed? Huh? In which way? You meant that if method1 is stuff1 and
> method2 is stuff2, stuff1 is not prefixed, and, thus, everything
> calling stuff1 without prefix will call stuff1, but, to call stuff2,
> one needs to add some prefix before operations?

I suppose what he means is that running `M-x gnus' connects to the
primary method, but giving a prefix argument `C-u M-x gnus' allows you
to connect to the other methods.  You have to type in the method you
want to connect to and the group name in the minibuffer.  

I suppose this is a hang-over from the old days when people just used
the local news server and they went to the other news servers only if
the local server was down or something.  I don't think it makes sense
any more to split things into a "primary" method and "secondary"
methods.  But old habits die hard...

Cheers,
Uday Reddy

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

* Re: Gnus works `at it is' but isn't that a coincidence?
  2010-05-17 17:38 Gnus works `at it is' but isn't that a coincidence? Merciadri Luca
       [not found] ` <87fx1qcpnr.fsf@topper.koldfront.dk>
@ 2010-12-09 16:07 ` Tassilo Horn
  1 sibling, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2010-12-09 16:07 UTC (permalink / raw)
  To: info-gnus-english

Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> writes:

Hi!

First, the link to your emacs init file is broken...

> 2. What's the interest of gnus-select-method? Is it the `primary'
> method? I think so, but then, what is the interest of defining a
> secondary method? What is the difference in their order? I define
>
> ==
> (setq gnus-select-method '((nntp "news.stuff.com")))
> (setq gnus-secondary-select-methods '((nnml "")))
> ==
>
> but I do not know what they do exactly.

Basically, there's no real difference between the "main" select method
and secondary ones.  I guess, the former was implemented first, and then
someone argued that having many select methods would be good.  So the
secondary ones were invented in order not to break the existing
interface.  But that's just a blind guess.

Anyway, for you as a user, there are no differences.  In fact, I've set
my `gnus-select-method' to nnil (a backend that does nothing) and only
use secondary select methods.

> 6. I use
>
> ==
> (setq message-send-mail-function 'smtpmail-send-it); For message-mode
> (setq send-mail-function 'smtpmail-send-it); ditto
> (setq send-mail-command 'smtpmail-send-it); For mail-mode (Rmail)
> ==
>
> but why do I need the three ones to make the whole stuff work?

Since Emacs 23.2, you don't need the former, because the default is to
send by using smtpmail.

The second is needed for mail modes that don't use message-mode.  With
very recent emacs snapshots, Rmail uses message-mode, too, so that won't
be needed.  But probably you need it with VM or Wanderlust...

The third is totally unneeded.  There is no variable send-mail-command
at all. ;-)

> 7. What's the interest of `my-signature' in
>
> ==
> (setq message-signature 'my-signature)
> (setq gnus-signature-separator '("^-- $"))
> ==
> ?

That variable can be a string (your signature), nil (don't use a
signature), a form (eval it and use the result as signature), or a
symbol corresponding to some function which is called to produce the
signature.  So you either have a function `my-signature', or you've
stolen an incomplete snippet. ;-)

> 8. I set
>
> ==
> (setq nntp-authinfo-file ".someauthfile.gpg")
> (setq smtpmail-auth-credentials ".someauthfile.gpg")
> ==
>
> but what's the difference between them?

One applies to nntp only, the latter to smtp.  Since Emacs 23.2, you'd
normally only set the variable `auth-sources'.

> 9. Providing that the whole stuff works as it is, what is the scheme
> which is done when I want to fetch e-mails, or when I want to send an
> e-mail, both through Gnus?

I think, I don't get your question.

Bye,
Tassilo

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

* Re: Gnus works `at it is' but isn't that a coincidence?
  2010-05-17 19:51   ` Merciadri Luca
  2010-05-18  9:01     ` Uday S Reddy
@ 2010-12-09 16:20     ` Tassilo Horn
  1 sibling, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2010-12-09 16:20 UTC (permalink / raw)
  To: info-gnus-english

Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> writes:

Hi!

>> The primary method isn't prefixed. The secondary ones are.
>
> Prefixed? Huh? In which way?

The groups from the primary select method show up as

    foo.bar.baz

whereas the same group on a secondary server would show up as

    nntp+MyNewsServer:foo.bar.baz

>> Why are you customizing gnus-signature-separator?!
>
> Isn't that necessary? That could be what causes my signatures'
> problems.

Just a general comment: Never ever modify any variables unless you know
what you are doing.  And don't borrow code you've found on the net,
unless you can understand it!

Gnus (all of Emacs) has sane default values for anything.  Start with
them.  Of course, when you want to use Gnus, you have some initial setup
to do, but only for telling it where to get mail/news and how to send
it.

For example, to use Gnus for reading mail on an IMAP server (IMO, the
times of storing mail only locally are dead and gone), simply add
something like

  (setq gnus-select-method '(nnimap "imap.gmail.com"))

to your ~/.gnus.el, and login/password into ~/.authinfo.gpg.  Basically,
that should be everything you need to do, at least with very recent gnus
versions.

Bye,
Tassilo

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

* Re: Gnus works `at it is' but isn't that a coincidence?
  2010-05-18  9:01     ` Uday S Reddy
@ 2010-12-10  6:58       ` Tassilo Horn
  0 siblings, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2010-12-10  6:58 UTC (permalink / raw)
  To: info-gnus-english

Uday S Reddy <u.s.reddy@cs.bham.ac.uk> writes:

Hi Uday,

>> Prefixed? Huh? In which way? You meant that if method1 is stuff1 and
>> method2 is stuff2, stuff1 is not prefixed, and, thus, everything
>> calling stuff1 without prefix will call stuff1, but, to call stuff2,
>> one needs to add some prefix before operations?
>
> I suppose what he means is that running `M-x gnus' connects to the
> primary method, but giving a prefix argument `C-u M-x gnus' allows you
> to connect to the other methods.  You have to type in the method you
> want to connect to and the group name in the minibuffer.

No, secondary methods are just handled like the primary one, but the
primary one is not prefixed with it's server and method name in the
*Group* buffer.

> I don't think it makes sense any more to split things into a "primary"
> method and "secondary" methods.  But old habits die hard...

Yes, so many people set the primary to nnnil and only use the secondary
ones.

Bye,
Tassilo

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

end of thread, other threads:[~2010-12-10  6:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-17 17:38 Gnus works `at it is' but isn't that a coincidence? Merciadri Luca
     [not found] ` <87fx1qcpnr.fsf@topper.koldfront.dk>
2010-05-17 19:51   ` Merciadri Luca
2010-05-18  9:01     ` Uday S Reddy
2010-12-10  6:58       ` Tassilo Horn
2010-12-09 16:20     ` Tassilo Horn
2010-12-09 16:07 ` Tassilo Horn

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