* Trouble setting up Gnus
@ 2012-07-19 7:24 arnaud.oqube
2012-07-19 14:14 ` Tassilo Horn
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: arnaud.oqube @ 2012-07-19 7:24 UTC (permalink / raw)
To: ding
Hello,
I have been using Gnus for several years in the 2000's but then switched
to web-based clients, having to work behind closed walls in corporate
settings where strange MUAs (eg. anything not Outlook) are not well
appreciated.
I am back again trying to setting up Gnus as my mail reader and I
encounter some annoying things I cannot explain. My setting is rather
simple:
- I use offlineimap to fetch data for 2 accounts (Gmail + Office365)
- I configured Gnus to read this mails using mmmaildir.
Here are a list of concerns:
- when I open gnus, although I added 'gnus-topic-mode as a hook, groups
do not appear classified by topics but in plain list form,
- again when I open gnus, groups' status does not appear to have been
saved and I got all my groups in the following format:
*: INBOX.linkedin
*: INBOX.kanbandev
*: INBOX.jsdoc
*: INBOX.js
*: INBOX.ieee-acm
- groups are never updated in the group buffer. I need enter them and
explicitly do M-g to update
- bbdb does nothing, although I configured it to insinuate gnus: My
.bbdb is never updated (maybe not gnus related)
Thanks in advance for any help.
Here is my gnus configuration:
;; bbdb
(require 'bbdb)
;; mostly from http://www.mostlymaths.net/2010/12/emacs-30-day-challenge-glimpse-of-bbdb.html
(bbdb-initialize 'gnus 'message)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(add-hook 'gnus-startup-hook 'gnus-topic-mode)
(setq bbdb-send-mail-style 'gnus)
(setq bbdb-complete-name-full-completion t)
(setq bbdb-completion-type 'primary-or-name)
(setq bbdb-complete-name-allow-cycling t)
(setq
bbdb-offer-save 1
bbdb-use-pop-up t
bbdb-electric-p t
bbdb-popup-target-lines 1
bbdb-use-pop-up nil
)
;; GNUS
(require 'gnus)
(setq gnus-select-method
'(nnmaildir "GMail"
(directory "~/Mail/")
(directory-files nnheader-directory-files-safe)
(get-new-mail nil)))
(define-key gnus-group-mode-map (kbd "vo")
'(lambda ()
(interactive)
(shell-command "offlineimap&" "*offlineimap*" nil)))
(setq gnus-user-date-format-alist
'(((gnus-seconds-today) . "Today, %H:%M")
((+ 86400 (gnus-seconds-today)) . "Yesterday, %H:%M")
(604800 . "%A %H:%M") ;;that's one week
((gnus-seconds-month) . "%A %d")
((gnus-seconds-year) . "%B %d")
(t . "%B %d '%y"))) ;;this one is used when no other does match
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
gnus-summary-line-format "%U%R%z %~(pad-right 20)&user-date; %~(pad-right 8)k %I%(%[%4L: %-23,23f%]%) %s\n"
gnus-summary-mode-line-format "Gnus: %p [%A / Sc:%4z] %Z"
gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))
;; using W3M to display HTML messages - from http://norman.walsh.name/2011/03/10/w3m
(setq gnus-mime-display-multipart-related-as-mixed nil)
(setq mm-text-html-renderer 'w3m)
(setq mm-inline-text-html-with-images t)
(setq mm-inline-text-html-with-w3m-keymap nil)
;; Make Gnus NOT ignore [Gmail] mailboxes
(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
(setq mm-attachment-override-types '("image/.*"))
(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
(setq message-alternative-emails
(regexp-opt '(...)))
;; from http://emacswiki.org/emacs/MultipleSMTPAccounts
;; using other method from http://www.mostlymaths.net/2010/12/emacs-30-day-challenge-using-gnus-to.html
(require 'smtpmail)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
mail-from-style nil
user-full-name "Arnaud Bailly"
smtpmail-debug-info t
smtpmail-debug-verb t)
(defun set-smtp
(mech user server port)
"Set related SMTP variables for supplied parameters."
(setq smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials "~/.authinfo.gpg"
smtpmail-auth-supported (list mech)
smtpmail-starttls-credentials nil)
(message "Setting SMTP server to `%s:%s' for user `%s'."
server port user))
(defun set-smtp-ssl
(user server port &optional key cert)
"Set related SMTP and SSL variables for supplied parameters."
(setq starttls-use-gnutls t
starttls-gnutls-program "gnutls-cli"
starttls-extra-arguments nil
smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials "~/.authinfo.gpg"
smtpmail-starttls-credentials (list (list server port key cert)))
(message
"Setting SMTP server to `%s:%s' for user `%s'. (SSL enabled.)" server port user))
(defun change-smtp ()
"Change the SMTP server according to the current from line."
(save-excursion
(loop with from = (save-restriction
(message-narrow-to-headers)
(message-fetch-field "from"))
for (auth-mech user server port) in smtp-accounts
when (string-match user from)
do (cond
((memq auth-mech '(cram-md5 plain login))
(return (apply 'set-smtp (list auth-mech user server port))))
((eql auth-mech 'ssl)
(return (apply 'set-smtp-ssl (list user server port))))
(t (error "Unrecognized SMTP auth. mechanism: '%s'." auth-mech)))
finally (error "Cannot infer SMTP information."))))
;; The previous function will complain if you fill the from field with
;; an account not present in smtp-accounts.
(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))
(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(with-current-buffer smtpmail-text-buffer
(change-smtp))
(funcall (symbol-value '%smtpmail-via-smtp) recipient
smtpmail-text-buffer))
;; activate demon to fetch new mail
(gnus-demon-init)
(gnus-demon-add-handler 'gnus-demon-scan-news 5 t)
;; speeding up gnus
;; http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
(gnus-compile)
(setq gc-cons-threshold 3500000)
(setq gnus-use-correct-string-widths nil)
(bbdb-insinuate-message)
--
Arnaud
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 7:24 Trouble setting up Gnus arnaud.oqube
@ 2012-07-19 14:14 ` Tassilo Horn
2012-07-19 14:30 ` arnaud.oqube
2012-07-23 8:27 ` Gnus working better with nnimap arnaud.oqube
2012-07-19 14:23 ` Trouble setting up Gnus Christopher Schmidt
2012-07-19 14:55 ` Adam Sjøgren
2 siblings, 2 replies; 12+ messages in thread
From: Tassilo Horn @ 2012-07-19 14:14 UTC (permalink / raw)
To: arnaud.oqube; +Cc: ding
arnaud.oqube@gmail.com writes:
> I am back again trying to setting up Gnus as my mail reader and I
> encounter some annoying things I cannot explain. My setting is rather
> simple:
> - I use offlineimap to fetch data for 2 accounts (Gmail + Office365)
> - I configured Gnus to read this mails using mmmaildir.
There are many people that either use IMAP directly (Gnus has become
very good at IMAP) if they don't need to access all their mails when
being offline, or use offlineimap to synchronize several remote IMAP
accounts with a local dovecot IMAP server.
I think, I'd recommend one of those approaches over syncing to
nnmaildir.
> Here are a list of concerns:
> - when I open gnus, although I added 'gnus-topic-mode as a hook, groups
> do not appear classified by topics but in plain list form,
You have to create topics first.
,----[ (info "(gnus)Topic Commands") ]
| Here is a list of the basic keys that you might need to set up topics
| the way you like.
|
| `T n'
| Prompt for a new topic name and create it
| (`gnus-topic-create-topic').
| [...]
`----
> - again when I open gnus, groups' status does not appear to have been
> saved and I got all my groups in the following format:
>
> *: INBOX.linkedin
> *: INBOX.kanbandev
> *: INBOX.jsdoc
> *: INBOX.js
> *: INBOX.ieee-acm
I only use nntp and nnimap, so I'm not sure about this one...
> - groups are never updated in the group buffer. I need enter them and
> explicitly do M-g to update
So `g' in *Group* does nothing? No output at all?
> - bbdb does nothing, although I configured it to insinuate gnus:
What does "does nothing" mean exactly? Don't you have completion in
To:/Cc: in message-mode buffers?
> My .bbdb is never updated (maybe not gnus related)
I think, you have to hit `:' on a message in summary buffer to add a new
contact. (But I don't use BBDB, so it might be some other key...)
Bye,
Tassilo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 7:24 Trouble setting up Gnus arnaud.oqube
2012-07-19 14:14 ` Tassilo Horn
@ 2012-07-19 14:23 ` Christopher Schmidt
2012-07-19 14:26 ` Christopher Schmidt
2012-07-19 14:55 ` Adam Sjøgren
2 siblings, 1 reply; 12+ messages in thread
From: Christopher Schmidt @ 2012-07-19 14:23 UTC (permalink / raw)
To: ding
arnaud.oqube@gmail.com writes:
[...]
> - again when I open gnus, groups' status does not appear to have been
> saved and I got all my groups in the following format:
>
> *: INBOX.linkedin
> *: INBOX.kanbandev
> *: INBOX.jsdoc
> *: INBOX.js
> *: INBOX.ieee-acm
>
> - groups are never updated in the group buffer. I need enter them and
> explicitly do M-g to update
What's the level of these groups? You can examine and change the level
with S l. It should be less or equal than gnus-level-subscribed.
[...]
> ;; mostly from http://www.mostlymaths.net/2010/12/emacs-30-day-challenge-glimpse-of-bbdb.html
> (bbdb-initialize 'gnus 'message)
> (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
> (add-hook 'gnus-startup-hook 'gnus-topic-mode)
^^^^^^^^^^^^^^^^^
Try gnus-group-mode-hook.
[...]
Christopher
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 14:23 ` Trouble setting up Gnus Christopher Schmidt
@ 2012-07-19 14:26 ` Christopher Schmidt
0 siblings, 0 replies; 12+ messages in thread
From: Christopher Schmidt @ 2012-07-19 14:26 UTC (permalink / raw)
To: ding
Christopher Schmidt <christopher@ch.ristopher.com> writes:
> What's the level of these groups? You can examine and change the
> level with S l. It should be less or equal than
> gnus-level-subscribed.
^^^^^^^^^^^^^^^^^^^^^
s/gnus-level-subscribed/gnus-activate-level
Christopher
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 14:14 ` Tassilo Horn
@ 2012-07-19 14:30 ` arnaud.oqube
2012-07-19 15:02 ` Tassilo Horn
2012-07-23 8:27 ` Gnus working better with nnimap arnaud.oqube
1 sibling, 1 reply; 12+ messages in thread
From: arnaud.oqube @ 2012-07-19 14:30 UTC (permalink / raw)
To: Tassilo Horn; +Cc: arnaud.oqube, ding
Hello,
Tassilo Horn <tassilo@member.fsf.org> writes:
> There are many people that either use IMAP directly (Gnus has become
> very good at IMAP) if they don't need to access all their mails when
> being offline, or use offlineimap to synchronize several remote IMAP
> accounts with a local dovecot IMAP server.
>
> I think, I'd recommend one of those approaches over syncing to
> nnmaildir.
>
OK. That is my plan B :-)
>> - when I open gnus, although I added 'gnus-topic-mode as a hook, groups
>> do not appear classified by topics but in plain list form,
>
> You have to create topics first.
>
So I did.
>
>> - groups are never updated in the group buffer. I need enter them and
>> explicitly do M-g to update
>
> So `g' in *Group* does nothing? No output at all?
>
Well, not really not output, it sometimes updates the groups. But it
never update them with new messages.
>> - bbdb does nothing, although I configured it to insinuate gnus:
>
> What does "does nothing" mean exactly? Don't you have completion in
> To:/Cc: in message-mode buffers?
>
No. I do not.
>> My .bbdb is never updated (maybe not gnus related)
>
> I think, you have to hit `:' on a message in summary buffer to add a new
> contact. (But I don't use BBDB, so it might be some other key...)
ah! ah! Did not know this one. Last time I used this, mails were
automatically scrapped from the Article buffer.
Thanks for your interest.
--
Arnaud
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 7:24 Trouble setting up Gnus arnaud.oqube
2012-07-19 14:14 ` Tassilo Horn
2012-07-19 14:23 ` Trouble setting up Gnus Christopher Schmidt
@ 2012-07-19 14:55 ` Adam Sjøgren
2012-07-19 21:07 ` Steinar Bang
2 siblings, 1 reply; 12+ messages in thread
From: Adam Sjøgren @ 2012-07-19 14:55 UTC (permalink / raw)
To: ding
On Thu, 19 Jul 2012 09:24:20 +0200, arnaud.oqube@gmail.com wrote:
> (add-hook 'gnus-startup-hook 'gnus-topic-mode)
I have this instead:
; Use topics per default:
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
> ;; using W3M to display HTML messages - from http://norman.walsh.name/2011/03/10/w3m
Note that the newer Gnusae have a new HTML renderer (shr) built in as
the default; it might be worth trying.
I don't use maildir, so I am at a loss there...
Best regards,
Adam
--
"You know, if the sun was an oboe, what would you do?" Adam Sjøgren
asjo@koldfront.dk
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 14:30 ` arnaud.oqube
@ 2012-07-19 15:02 ` Tassilo Horn
2012-07-19 15:36 ` arnaud.oqube
0 siblings, 1 reply; 12+ messages in thread
From: Tassilo Horn @ 2012-07-19 15:02 UTC (permalink / raw)
To: arnaud.oqube; +Cc: ding
arnaud.oqube@gmail.com writes:
>>> - when I open gnus, although I added 'gnus-topic-mode as a hook, groups
>>> do not appear classified by topics but in plain list form,
>>
>> You have to create topics first.
>
> So I did.
>
>>> - groups are never updated in the group buffer. I need enter them and
>>> explicitly do M-g to update
>>
>> So `g' in *Group* does nothing? No output at all?
Do I get you right that you created Topics, but they aren't there after
restarting Gnus, and after restarting all message counts are gone, and
there's also this update issue?
If so, at least the topics and read counts are stored in ~/.newsrc.eld
(`gnus-startup-file'). So maybe there's something wrong with this?
(Accidentally deleted, I don't know...)
>>> - bbdb does nothing, although I configured it to insinuate gnus:
>>
>> What does "does nothing" mean exactly? Don't you have completion in
>> To:/Cc: in message-mode buffers?
>
> No. I do not.
Maybe you also need (bbdb-insinuate-message) for that.
>>> My .bbdb is never updated (maybe not gnus related)
>>
>> I think, you have to hit `:' on a message in summary buffer to add a new
>> contact. (But I don't use BBDB, so it might be some other key...)
>
> ah! ah! Did not know this one. Last time I used this, mails were
> automatically scrapped from the Article buffer.
No, I don't think it has ever acted this way without configuring it
explicitly.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 15:02 ` Tassilo Horn
@ 2012-07-19 15:36 ` arnaud.oqube
2012-07-19 21:05 ` Steinar Bang
0 siblings, 1 reply; 12+ messages in thread
From: arnaud.oqube @ 2012-07-19 15:36 UTC (permalink / raw)
To: Tassilo Horn; +Cc: arnaud.oqube, ding
Tassilo Horn <tassilo@member.fsf.org> writes:
>
> Do I get you right that you created Topics, but they aren't there after
> restarting Gnus, and after restarting all message counts are gone, and
> there's also this update issue?
>
Topics are there if I activate them with 't'. And yes, all messages
counts are gone, replaced with a star. And yes again, typing 'g' in
Group folder does not really update the groups, at least no new messages
appear until I go into the group.
> If so, at least the topics and read counts are stored in ~/.newsrc.eld
> (`gnus-startup-file'). So maybe there's something wrong with this?
> (Accidentally deleted, I don't know...)
>
I though about this, but this file is fine AFAICT.
>
> Maybe you also need (bbdb-insinuate-message) for that.
>
got it in my .emacs.
>
> No, I don't think it has ever acted this way without configuring it
> explicitly.
>
Might be a flag, or a custom configuration I lost, then.
Thanks.
--
Arnaud
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 15:36 ` arnaud.oqube
@ 2012-07-19 21:05 ` Steinar Bang
0 siblings, 0 replies; 12+ messages in thread
From: Steinar Bang @ 2012-07-19 21:05 UTC (permalink / raw)
To: ding
>>>>> arnaud.oqube@gmail.com:
> Topics are there if I activate them with 't'. And yes, all messages
> counts are gone, replaced with a star.
I think that may be caused of the Gnus groups looking in the wrong
place...? Ie where they are looking, they don't find what the expect
from a maildir group.
Maybe...?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 14:55 ` Adam Sjøgren
@ 2012-07-19 21:07 ` Steinar Bang
2012-07-20 12:22 ` Adam Sjøgren
0 siblings, 1 reply; 12+ messages in thread
From: Steinar Bang @ 2012-07-19 21:07 UTC (permalink / raw)
To: ding
>>>>> asjo@koldfront.dk (Adam Sjøgren):
> Note that the newer Gnusae have a new HTML renderer (shr) built in as
> the default; it might be worth trying.
FYI I think the new HTML renderer requires emacs24 linked with libxml2.
Ie. I think the new HTML renderer won't run in emacs23.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Trouble setting up Gnus
2012-07-19 21:07 ` Steinar Bang
@ 2012-07-20 12:22 ` Adam Sjøgren
0 siblings, 0 replies; 12+ messages in thread
From: Adam Sjøgren @ 2012-07-20 12:22 UTC (permalink / raw)
To: ding
On Thu, 19 Jul 2012 23:07:52 +0200, Steinar wrote:
>>>>>> asjo@koldfront.dk (Adam Sjøgren):
>> Note that the newer Gnusae have a new HTML renderer (shr) built in as
>> the default; it might be worth trying.
> FYI I think the new HTML renderer requires emacs24 linked with libxml2.
> Ie. I think the new HTML renderer won't run in emacs23.
Ah, yes, I think you are correct, sorry - I didn't notice that Arnaud
runs Emacs 23.
Best regards,
Adam
--
"You know, if the sun was an oboe, what would you do?" Adam Sjøgren
asjo@koldfront.dk
^ permalink raw reply [flat|nested] 12+ messages in thread
* Gnus working better with nnimap
2012-07-19 14:14 ` Tassilo Horn
2012-07-19 14:30 ` arnaud.oqube
@ 2012-07-23 8:27 ` arnaud.oqube
1 sibling, 0 replies; 12+ messages in thread
From: arnaud.oqube @ 2012-07-23 8:27 UTC (permalink / raw)
To: ding
Hello,
I have replaced my nnmaildir based setting using offlineimap with nnimap
through dovecot + offlineimap, and it works much better. I can now
update all my groups from the Group buffer and have a much saner
behaviour for read/expired/new emails.
Thanks for your advices,
--
Arnaud
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-07-23 8:27 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 7:24 Trouble setting up Gnus arnaud.oqube
2012-07-19 14:14 ` Tassilo Horn
2012-07-19 14:30 ` arnaud.oqube
2012-07-19 15:02 ` Tassilo Horn
2012-07-19 15:36 ` arnaud.oqube
2012-07-19 21:05 ` Steinar Bang
2012-07-23 8:27 ` Gnus working better with nnimap arnaud.oqube
2012-07-19 14:23 ` Trouble setting up Gnus Christopher Schmidt
2012-07-19 14:26 ` Christopher Schmidt
2012-07-19 14:55 ` Adam Sjøgren
2012-07-19 21:07 ` Steinar Bang
2012-07-20 12:22 ` Adam Sjøgren
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).