Discussion:
Mutt/Gnus hybrid for mail?
Peter Davis
2014-12-08 13:20:05 UTC
Permalink
I hope this isn't too radical an idea for this group. For email, I like
some things about mutt, and some things about gnus, and I'm trying to
find a way to make a hybrid of these two. In particular, I think a good
start would be to run mutt in an emacs window, and have the messages
open in another window in Article mode.

I know mutt lets you set the 'pager', but I'm not sure if I can get
emacs to open the message in Article mode.

Has anyone done this? Any pitfalls I'm overlooking?

Of course, I also want to compose messages in Message mode, but that's a
solved problem.

Thanks very much!

-pd
Peter Münster
2014-12-08 20:06:41 UTC
Permalink
For email, I like some things about mutt,
Hi,

What things?
--
Peter
Peter Davis
2014-12-08 22:47:00 UTC
Permalink
Post by Peter Münster
For email, I like some things about mutt,
Hi,
What things?
Most significantly, since I only use mutt or gnus for email, I find mutt
more intuitive, since its commands, etc. were designed for email. "Delete"
instead of "Expire", etc. (BTW, I'm using both with Fastmail.fm IMAP.)

Also, when I delete/expire a message, mutt automatically displays the
next unread message in the folder. Gnus requires another keystroke. (Not
a big deal, but annoying.)

I have not managed to get gnus to display previously read messages in a
thread automatically, though I've messed around with
(setq gnus-fetch-old-headers t). I gather this is inconsistent on IMAP
servers, and slow.

I realize I could customize gnus to behave exactly the way I want, but
I'm not a much of a lisper, so it would take me a fair bit of
effort. Anyway, customatizations are unlikely to improve
performance. Mutt seems faster at downloading messages, etc.

I'm certainly open to suggestions on how to improve any of these.

Thanks,
-pd
Peter Münster
2014-12-08 23:25:59 UTC
Permalink
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically displays the
next unread message in the folder. Gnus requires another keystroke. (Not
a big deal, but annoying.)
This sets the expire mark with the "d" key and goes to next message:

--8<---------------cut here---------------start------------->8---
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down]))

(defun pm/alter-article-map ()
(local-set-key "d" "MMeen"))

(add-hook 'gnus-summary-mode-hook 'pm/alter-summary-map)
(add-hook 'gnus-article-mode-hook 'pm/alter-article-map)
--8<---------------cut here---------------end--------------->8---
Post by Peter Davis
I have not managed to get gnus to display previously read messages in a
thread automatically,
You mean, display all messages of a thread, when it has at least one new
message? I'm sure, that this is possible and you would get a solution
here...

If you want it with a key-press: it's "A T".
Post by Peter Davis
I realize I could customize gnus to behave exactly the way I want, but
I'm not a much of a lisper, so it would take me a fair bit of
effort.
Elisp is very useful, not only in Gnus. And you can get help here.
Post by Peter Davis
Anyway, customatizations are unlikely to improve performance. Mutt
seems faster at downloading messages, etc.
Perhaps. But the Mutt-macros are *very* limited and when you want to
display something else than plain text, Mutt needs external programs,
where the key-bindings are completely different and you can't control Mutt
anymore...
After having switched from Mutt to Gnus, I've just thought:
"Why haven't I done that earlier...?!"

I'm sure, that you'll spend more time integrating Mutt into Emacs the
way you like, than reading the Gnus manual.
--
Peter
Peter Davis
2014-12-09 00:15:17 UTC
Permalink
Post by Peter Münster
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically displays the
next unread message in the folder. Gnus requires another keystroke. (Not
a big deal, but annoying.)
Thanks, Peter. I'll give that a try.
Post by Peter Münster
Post by Peter Davis
I have not managed to get gnus to display previously read messages in a
thread automatically,
You mean, display all messages of a thread, when it has at least one new
message? I'm sure, that this is possible and you would get a solution
here...
If you want it with a key-press: it's "A T".
Yes the 'A T' sequence works, but it should be possible to have the
whole thread included for each new message when I open the
group/folder. The gnus-fetch-old-headers is supposed to do that, but I
have not managed to make it work. Also, mutt maintains a header cache so
that this is very fast. I'm not aware of a way to do this in gnus.
Post by Peter Münster
Elisp is very useful, not only in Gnus. And you can get help here.
Granted. I wish I had time to learn it.
Post by Peter Münster
Post by Peter Davis
Anyway, customatizations are unlikely to improve performance. Mutt
seems faster at downloading messages, etc.
Perhaps. But the Mutt-macros are *very* limited and when you want to
display something else than plain text, Mutt needs external programs,
where the key-bindings are completely different and you can't control Mutt
anymore...
True. I do have some mutt macros that pipe messages to perl scripts to
do what I need. But yes, displaying HTML, etc. is very limited, which
was why I started this thread. (BTW, I think gnus uses w3m for HTML, but
not with the -dump switch.)
Post by Peter Münster
"Why haven't I done that earlier...?!"
I've used a slew of mail clients over the years, but have yet to find
one that has it all. Probably gnus is the most customizable, and
therefore potentially the best, but it takes a fair bit of work to get
everything set. I'm always concerned that when I move to another
machine, I'll have to figure it out all over again.
Post by Peter Münster
I'm sure, that you'll spend more time integrating Mutt into Emacs the
way you like, than reading the Gnus manual.
Probably. That's why I was hoping to find an existing solution. But
maybe I should just stick with gnus and gradually figure out how to make
it work the way I want.

-pd
Peter Davis
2014-12-09 00:51:06 UTC
Permalink
Post by Peter Münster
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down]))
(defun pm/alter-article-map ()
(local-set-key "d" "MMeen"))
(add-hook 'gnus-summary-mode-hook 'pm/alter-summary-map)
(add-hook 'gnus-article-mode-hook 'pm/alter-article-map)
This seems to make 'd' the same as 'E' ... it expires the message and
moves the cursor, but it doesn't display the next unread message.

Thank you.

-pd
Peter Münster
2014-12-09 08:00:13 UTC
Permalink
Post by Peter Davis
Post by Peter Münster
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down]))
(defun pm/alter-article-map ()
(local-set-key "d" "MMeen"))
(add-hook 'gnus-summary-mode-hook 'pm/alter-summary-map)
(add-hook 'gnus-article-mode-hook 'pm/alter-article-map)
This seems to make 'd' the same as 'E' ... it expires the message and
moves the cursor, but it doesn't display the next unread message.
Sorry, yes, in summary mode it moves only the cursor, because with my
setup, the article is not displayed then...
--
Peter
Jorge A. Alfaro-Murillo
2014-12-09 00:20:29 UTC
Permalink
Post by Peter Davis
Most significantly, since I only use mutt or gnus for email, I
find mutt more intuitive, since its commands, etc. were designed
for email. "Delete" instead of "Expire", etc. (BTW, I'm using
both with Fastmail.fm IMAP.)
If you use IMAP perhaps you should move the messages to the Trash
group instead of expiring them.

I think that expiring fits more to handling your email like news,
meaning, you only read what it is not read, and leave everything
in the server. You don't worry about deleting things and just for
space issues you expire things that are very old. Of course there
are things that require your attention later, and that you want to
keep showing as news. For those you use ticks (key "!").
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically
displays the next unread message in the folder. Gnus requires
another keystroke. (Not a big deal, but annoying.)
You could assign a key to a function like this:

#+BEGIN_SRC emacs-lisp
(defun my-gnus-summary-delete-article ()
(interactive)
(gnus-summary-move-article nil "nnimap+Fastmail.fm:Trash")
(gnus-summary-next-unread-article))

#+END_SRC

"nnimap+Fastmai.fml:Trash" is just a guess, you should use
whatever your group is called.
Post by Peter Davis
I have not managed to get gnus to display previously read
messages in a thread automatically, though I've messed around
with (setq gnus-fetch-old-headers t). I gather this is
inconsistent on IMAP servers, and slow.
Maybe try setting

#+BEGIN_SRC emacs-lisp
(setq gnus-refer-thread-use-nnir t)

#+END_SRC

And then use "A T" when you need it. With 99% of the people using
a TOFU (Text Over, Fullquote Under) style, most of the time you do
not need to see the whole thread since it appears in the latest
email.
Post by Peter Davis
Anyway, customatizations are unlikely to improve performance.
Mutt seems faster at downloading messages, etc.
I would also like to hear about ways to improve performance.

Best,
--
Jorge.
Peter Davis
2014-12-09 00:47:14 UTC
Permalink
Post by Jorge A. Alfaro-Murillo
Post by Peter Davis
Most significantly, since I only use mutt or gnus for email, I
find mutt more intuitive, since its commands, etc. were designed
for email. "Delete" instead of "Expire", etc. (BTW, I'm using
both with Fastmail.fm IMAP.)
If you use IMAP perhaps you should move the messages to the Trash
group instead of expiring them.
I do have the expiry target set to INBOX.Trash
Post by Jorge A. Alfaro-Murillo
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically
displays the next unread message in the folder. Gnus requires
another keystroke. (Not a big deal, but annoying.)
#+BEGIN_SRC emacs-lisp
(defun my-gnus-summary-delete-article ()
(interactive)
(gnus-summary-move-article nil "nnimap+Fastmail.fm:Trash")
(gnus-summary-next-unread-article))
#+END_SRC
"nnimap+Fastmai.fml:Trash" is just a guess, you should use
whatever your group is called.
Worth a try. Does this actually display the next unread message, or just
move the cursor to it?
Post by Jorge A. Alfaro-Murillo
Post by Peter Davis
I have not managed to get gnus to display previously read
messages in a thread automatically, though I've messed around
with (setq gnus-fetch-old-headers t). I gather this is
inconsistent on IMAP servers, and slow.
Maybe try setting
#+BEGIN_SRC emacs-lisp
(setq gnus-refer-thread-use-nnir t)
#+END_SRC
And then use "A T" when you need it. With 99% of the people using
a TOFU (Text Over, Fullquote Under) style, most of the time you do
not need to see the whole thread since it appears in the latest
email.
Using 'A T' works, but I don't want to do that. I want all messages in
any threads with unread articles to just be there when I enter the group.
Post by Jorge A. Alfaro-Murillo
Post by Peter Davis
Anyway, customatizations are unlikely to improve performance.
Mutt seems faster at downloading messages, etc.
I would also like to hear about ways to improve performance.
Yes, I'm always glad to learn ways to make gnus faster or more usable.

Thank you.

-pd
Charles Philip Chan
2014-12-09 03:57:42 UTC
Permalink
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically displays the
next unread message in the folder. Gnus requires another
keystroke. (Not a big deal, but annoying.)
So set the groups to either auto-expire or total-expire and use the
spacebar to read your mail.

https://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
Post by Peter Davis
I have not managed to get gnus to display previously read messages in
a thread automatically, though I've messed around with (setq
gnus-fetch-old-headers t). I gather this is inconsistent on IMAP
servers, and slow.
Set the variable "gnus-build-sparse-threads"

https://www.gnu.org/software/emacs/manual/html_node/gnus/Filling-In-Threads.html

Charles
--
"Linux: the operating system with a CLUE...
Command Line User Environment".
(seen in a posting in comp.software.testing)
Charles Philip Chan
2014-12-09 04:04:41 UTC
Permalink
Post by Charles Philip Chan
So set the groups to either auto-expire or total-expire and use the
spacebar to read your mail.
https://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
I should you don't need to set expiry for the spacebar to work.

Charles
--
"If you want to travel around the world and be invited to speak at a lot
of different places, just write a Unix operating system."
(By Linus Torvalds)
Eric S Fraga
2014-12-09 10:46:34 UTC
Permalink
On Monday, 8 Dec 2014 at 17:47, Peter Davis wrote:

[...]
Post by Peter Davis
Most significantly, since I only use mutt or gnus for email, I find mutt
more intuitive, since its commands, etc. were designed for email. "Delete"
instead of "Expire", etc. (BTW, I'm using both with Fastmail.fm IMAP.)
As others have said, you can bind keys to whatever you want. For
instance,

#+begin_src emacs-lisp
(defun esf/alter-summary-map ()
(local-set-key "d" 'gnus-summary-delete-article)
(local-set-key "e" 'gnus-summary-mark-as-expirable)
(local-set-key "u" 'gnus-summary-put-mark-as-unread)
(local-set-key "w" 'gnus-article-fill-long-lines)
)
(add-hook 'gnus-summary-mode-hook 'esf/alter-summary-map)
#+end_src
Post by Peter Davis
Also, when I delete/expire a message, mutt automatically displays the
next unread message in the folder. Gnus requires another keystroke. (Not
a big deal, but annoying.)
Gnus displays the next article for me if I am displaying an
article and hit "n", " " or "e". Otherwise not. If I am not displaying
an article, "n" and " " display the next article.
Post by Peter Davis
I have not managed to get gnus to display previously read messages in a
thread automatically, though I've messed around with
(setq gnus-fetch-old-headers t). I gather this is inconsistent on IMAP
servers, and slow.
I use the agent and, in combination with settings gnus-fetch-old-headers
to t, I get the ancestors of any email shown in the summary window. I
don't know if the agent is key here but it probably helps with speed.
Post by Peter Davis
I realize I could customize gnus to behave exactly the way I want, but
I'm not a much of a lisper, so it would take me a fair bit of
effort. Anyway, customatizations are unlikely to improve
performance. Mutt seems faster at downloading messages, etc.
Mutt *is* faster but *I* am faster with gnus than with mutt in terms of
productivity. YMMV, of course :) I used mutt for years before
switching to gnus maybe 8 years ago now and haven't looked back.

HTH,
eric
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.4.1 + Ma Gnus v0.12 + evil-git-d432ec2
: BBDB version 3.1.2 (2014-04-27 15:05:20 -0500)
Peter Davis
2014-12-09 12:49:21 UTC
Permalink
Thanks very much for all the excellent suggestions. However, I think
perhaps I need to clarify what I'm missing.

1) Deleting

In mutt, when I'm looking at a message with what mutt calls the "index"
at the top, and "pager" at the bottom, analagous to gnus' Summary and
Article buffers, I can, with a single keystroke

1) move to and read the next message, or
2) move to and read the next unread message, or
3) delete the current message, and move to and read the next message.

I want to be able to either save or delete (expire) a message and open
the next one automatically. Frankly, it seems weird to me that gnus
moves the cursor in the Summary buffer to the next message, but still
displays the message I just expired in the Article buffer.

If I'm on the last message in the mutt index and I delete that, mutt
simply closes the 'pager' view and just displays the index view for the
whole screen.

2) Opening a group/mailbox

In mutt, when I open a mailbox (group), I see an index of all the
messages in the mailbox, with the cursor positioned at the first unread,
if any. I like that, but I'd settle for seeing all of the threads
containing any unread messages. As I understand it,
gnus-fetch-old-headers is supposed to do that, but I haven't found a way
to make it work, at least with Fastmail.fm IMAP.

For extra credit, in mutt's index (Summar) view, I can very easily
filter the list of messages with a few keystrokes. For instance, if I
type lpfd, I'll see just a list of messages whose headers contain
"pfd". Of course, this is not especially useful in gnus since the
Summary buffer doesn't show me a long list of earlier messages, but if I
could make that happen, it would be very useful.

Thanks again!

-pd
Eric S Fraga
2014-12-09 14:10:08 UTC
Permalink
Post by Peter Davis
Thanks very much for all the excellent suggestions. However, I think
perhaps I need to clarify what I'm missing.
1) Deleting
In mutt, when I'm looking at a message with what mutt calls the "index"
at the top, and "pager" at the bottom, analagous to gnus' Summary and
Article buffers, I can, with a single keystroke
1) move to and read the next message, or
N
Post by Peter Davis
2) move to and read the next unread message, or
n
Post by Peter Davis
3) delete the current message, and move to and read the next message.
E

These commands do exactly what you want, for me, when both summary and
article windows are displayed and summary window is selected.
Post by Peter Davis
If I'm on the last message in the mutt index and I delete that, mutt
simply closes the 'pager' view and just displays the index view for the
whole screen.
In gnus, if you hit space or n to go to the next email, and if you
happen to be at the last message, gnus will prompt to go to the next
group if you hit the same key again.
Post by Peter Davis
2) Opening a group/mailbox
In mutt, when I open a mailbox (group), I see an index of all the
messages in the mailbox, with the cursor positioned at the first unread,
if any. I like that,
gnus does exactly this for me.
Post by Peter Davis
but I'd settle for seeing all of the threads
containing any unread messages. As I understand it,
gnus-fetch-old-headers is supposed to do that, but I haven't found a way
to make it work, at least with Fastmail.fm IMAP.
nothing to do with the source of emails. have you tried enabling the
gnus agent?
Post by Peter Davis
For extra credit, in mutt's index (Summar) view, I can very easily
filter the list of messages with a few keystrokes. For instance, if I
type lpfd, I'll see just a list of messages whose headers contain
"pfd". Of course, this is not especially useful in gnus since the
Summary buffer doesn't show me a long list of earlier messages, but if I
could make that happen, it would be very useful.
/spfd RET should do what you want. You may need to /o first. then /w
to pop back to previous view.

maybe post your .gnus.el?
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.4.1 + Ma Gnus v0.12 + evil-git-d432ec2
: BBDB version 3.0.50 (2013-11-16 11:30:49 -0600)
Peter Davis
2014-12-09 14:34:10 UTC
Permalink
Thanks, Eric,

Comments below ...
Post by Eric S Fraga
Post by Peter Davis
3) delete the current message, and move to and read the next message.
E
These commands do exactly what you want, for me, when both summary and
article windows are displayed and summary window is selected.
The 'E' command does not open the next message. It merely moves the
cursor in the Summary buffer. The Article buffer still displays the
just-expired message content. I have to press the spacebar to see the
next message. This may seem like a small point, but if I'm trying to
bang through lots of messages, it's an annoyance. Mutt wins on this.
Post by Eric S Fraga
Post by Peter Davis
If I'm on the last message in the mutt index and I delete that, mutt
simply closes the 'pager' view and just displays the index view for the
whole screen.
In gnus, if you hit space or n to go to the next email, and if you
happen to be at the last message, gnus will prompt to go to the next
group if you hit the same key again.
Yes, I'm aware of that. I mentioned this mutt behavior because, if I can
somehow get gnus to actually display the next message, then being on the
last message in the Summary would require special handling.
Post by Eric S Fraga
Post by Peter Davis
2) Opening a group/mailbox
In mutt, when I open a mailbox (group), I see an index of all the
messages in the mailbox, with the cursor positioned at the first unread,
if any. I like that,
gnus does exactly this for me.
For me, Summary only shows the unread messages, and not even the rest of
the threads they belong to (unless I type 'A T').
Post by Eric S Fraga
Post by Peter Davis
but I'd settle for seeing all of the threads
containing any unread messages. As I understand it,
gnus-fetch-old-headers is supposed to do that, but I haven't found a way
to make it work, at least with Fastmail.fm IMAP.
nothing to do with the source of emails. have you tried enabling the
gnus agent?
Post by Peter Davis
For extra credit, in mutt's index (Summar) view, I can very easily
filter the list of messages with a few keystrokes. For instance, if I
type lpfd, I'll see just a list of messages whose headers contain
"pfd". Of course, this is not especially useful in gnus since the
Summary buffer doesn't show me a long list of earlier messages, but if I
could make that happen, it would be very useful.
/spfd RET should do what you want. You may need to /o first. then /w
to pop back to previous view.
The 'l' command in mutt is not search, it's limit ... it limits the
display to messages matching some criteria. Admittedly I haven't
searched exhaustively for gnus features to mimic this, but I didn't see
any obvious ones. Of course, as I said, since only unread messages show
up in the Summary, this is not very useful in gnus.
Post by Eric S Fraga
maybe post your .gnus.el?
Sure. Here it is. It's cobbled together from bits and pieces I found in
various places, so I'm sure it's not optimal.

--8<---------------cut here---------------start------------->8---
;; @see http://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
;; press 'E' to expire email
(setq nnmail-expiry-target "INBOX.Trash")
(setq nnmail-expiry-wait 'immediate)
(setq user-mail-address "***@pfdstudio.com")
(setq user-full-name "Peter Davis")
(setq gnus-fetch-old-headers t)

(setq gnus-select-method
'(nnimap "Fastmail" ; primary email
(nnimap-address "mail.messagingengine.com")
(nnimap-server-port 993)
(nnimap-authenticator login)
(nnimap-expunge-on-close 'never)
(nnimap-stream ssl)
))

(setq gnus-article-browse-delete-temp t)
(setq gnus-fetch-old-headers t)
(setq message-sendmail-envelope-from 'header)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "smtps-proxy.messagingengine.com"
smtpmail-smtp-server "smtps-proxy.messagingengine.com"
smtpmail-smtp-service 80
smtpmail-starttls-credentials '(("smtps-proxy.messagingengine.com" 80 nil nil)))
(setq smtpmail-stream-type 'tls)

(setq fill-flowed-display-column nil)

(add-hook 'gnus-article-mode-hook
(lambda ()
(setq
truncate-lines nil
word-wrap t)))

(setq gnus-posting-styles
'((".*"
(name "Peter Davis")
(address "***@pfdstudio.com")
(BCC "***@pfdstudio.com"))))

(setq gnus-html-frame-width 180)
(defun my-message-mode-setup ()
(setq fill-column 72)
(turn-on-auto-fill))
(add-hook 'message-mode-hook 'my-message-mode-setup)

;;switch to gnus group buffer or start gnus
(defun my-switch-to-gnus-group-buffer ()
"Switch to gnus group buffer if it exists, otherwise start gnus"
(interactive)
(if (or (not (fboundp 'gnus-alive-p))
(not (gnus-alive-p)))
(gnus)
(switch-to-buffer "*Group*")))
(global-set-key (kbd "C-c n") 'my-switch-to-gnus-group-buffer)

(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
gnus-thread-sort-functions '(gnus-thread-sort-by-date)
gnus-sum-thread-tree-false-root ""
gnus-sum-thread-tree-indent " "
gnus-sum-thread-tree-leaf-with-other "├► "
gnus-sum-thread-tree-root ""
gnus-sum-thread-tree-single-leaf "└► "
gnus-sum-thread-tree-vertical "│")
--8<---------------cut here---------------end--------------->8---
Eric S Fraga
2014-12-09 16:15:51 UTC
Permalink
On Tuesday, 9 Dec 2014 at 09:34, Peter Davis wrote:

[...]
Post by Peter Davis
Post by Eric S Fraga
E
These commands do exactly what you want, for me, when both summary and
article windows are displayed and summary window is selected.
The 'E' command does not open the next message. It merely moves the
cursor in the Summary buffer. The Article buffer still displays the
True. Sorry about that. I don't often type E as I have total expire
set and all my read messages automatically expire...
Post by Peter Davis
Yes, I'm aware of that. I mentioned this mutt behavior because, if I can
somehow get gnus to actually display the next message, then being on the
last message in the Summary would require special handling.
Does it not display the next message with n or space? Is it only when
you type E that you don't get the behaviour you want? Maybe do as
others have suggested and look at automatic expiration of emails.
Post by Peter Davis
For me, Summary only shows the unread messages, and not even the rest of
the threads they belong to (unless I type 'A T').
Again, have you tried the agent?

[...]
Post by Peter Davis
Post by Eric S Fraga
/spfd RET should do what you want. You may need to /o first. then /w
to pop back to previous view.
The 'l' command in mutt is not search, it's limit ... it limits the
From C-h c / s:

/ s runs the command gnus-summary-limit-to-subject

i.e. not search but limit so the same as mutt. There are a whole set of
/ options. Type / C-h in the summary window and you'll see them
all. Unlike mutt (IIRC), these are cumulative but you can pop back out
of each one.
Post by Peter Davis
;; press 'E' to expire email
(setq nnmail-expiry-target "INBOX.Trash")
(setq nnmail-expiry-wait 'immediate)
You can set individual configurations for groups in the Group buffer by
typing "G c" to bring up a configuration window.
Post by Peter Davis
(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
I use 'gnus-gather-threads-by-subject. Maybe try this to see if the
threads get built up for you?

Are you actually in threaded mode, by the way? What happens if you type
T T?
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.1 + Ma Gnus v0.12 + evil-git-d432ec2
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
Peter Davis
2014-12-09 17:42:44 UTC
Permalink
Post by Eric S Fraga
Post by Peter Davis
Yes, I'm aware of that. I mentioned this mutt behavior because, if I can
somehow get gnus to actually display the next message, then being on the
last message in the Summary would require special handling.
Does it not display the next message with n or space? Is it only when
you type E that you don't get the behaviour you want? Maybe do as
others have suggested and look at automatic expiration of emails.
Assuming that I can find some way to program a key to expire a message
and open the next one (ie, display it in the Article buffer)
automatically, it would need to be aware that if I expire the last
message in the summary, there's no next message to display, so it should
just do nothing in that case. That's what I was trying to convey.

I'm not interested in auto expiry. I want to look at each message and
choose to either save or delete it and move on to the next. That's all
I'm trying to do. In mutt, this is easy.
Post by Eric S Fraga
Post by Peter Davis
For me, Summary only shows the unread messages, and not even the rest of
the threads they belong to (unless I type 'A T').
Again, have you tried the agent?
No, I have not tried agent. I'm not really looking for unplugged use,
but perhaps that's the workaround for getting gnus to display the
already read messages.
Post by Eric S Fraga
/ s runs the command gnus-summary-limit-to-subject
i.e. not search but limit so the same as mutt. There are a whole set of
/ options. Type / C-h in the summary window and you'll see them
all. Unlike mutt (IIRC), these are cumulative but you can pop back out
of each one.
Nice. Thanks! If I ever get gnus to display more in the Summary buffer,
this will be useful.
Post by Eric S Fraga
Post by Peter Davis
;; press 'E' to expire email
(setq nnmail-expiry-target "INBOX.Trash")
(setq nnmail-expiry-wait 'immediate)
You can set individual configurations for groups in the Group buffer by
typing "G c" to bring up a configuration window.
Post by Peter Davis
(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
I use 'gnus-gather-threads-by-subject. Maybe try this to see if the
threads get built up for you?
Are you actually in threaded mode, by the way? What happens if you type
T T?
I think I've tried most of these combinations, but I'll keep at it.

Thanks,
-pd
Adam Sjøgren
2014-12-09 18:26:22 UTC
Permalink
Post by Peter Davis
Assuming that I can find some way to program a key to expire a message
and open the next one (ie, display it in the Article buffer)
automatically, it would need to be aware that if I expire the last
message in the summary, there's no next message to display, so it
should just do nothing in that case. That's what I was trying to
convey.
You can do this with a little configation and an "advice".

First, set gnus-summary-goto-unread to t, which makes 'E' jump to the
next unread article, rather than just the next article:

(setq gnus-summary-goto-unread t)

(I assume this is what you mean by "the next one", otherwise, you can
simply leave this out.)

Then tell Gnus that when you press 'E', which jumps to the next (unread)
article, you also want to automatically do the same as pressing 'g'
(i.e. display the article you are on in the summary):

(defadvice gnus-summary-mark-as-expirable (after show-article last activate)
(gnus-summary-show-article))


Best regards,

Adam
--
"Smilies are extremely moist." Adam Sjøgren
***@koldfront.dk
Peter Davis
2014-12-09 19:56:39 UTC
Permalink
Post by Adam Sjøgren
Then tell Gnus that when you press 'E', which jumps to the next (unread)
article, you also want to automatically do the same as pressing 'g'
Aha! Adding this to Peter Münster's suggested code, I get:

--8<---------------cut here---------------start------------->8---
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down ?g]))
--8<---------------cut here---------------end--------------->8---


which works!

Thank you!

-pd
Adam Sjøgren
2014-12-09 20:16:50 UTC
Permalink
Post by Peter Münster
Post by Adam Sjøgren
Then tell Gnus that when you press 'E', which jumps to the next (unread)
article, you also want to automatically do the same as pressing 'g'
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down ?g]))
which works!
Using 'd' as 'E' seems weird to me, but whatever floats your boat.


:-),

Adam
--
"I'm a dreamer - a loser Adam Sjøgren
I'm going 'till the going is gone" ***@koldfront.dk
Peter Münster
2014-12-09 21:21:05 UTC
Permalink
Post by Adam Sjøgren
Post by Peter Münster
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down ?g]))
which works!
You're on the right track! ;)
Post by Adam Sjøgren
Using 'd' as 'E' seems weird to me, but whatever floats your boat.
Old habits from mutt/alpine: d = delete...
--
Peter
Charles Philip Chan
2014-12-09 21:20:57 UTC
Permalink
Post by Peter Davis
For me, Summary only shows the unread messages, and not even the rest
of the threads they belong to (unless I type 'A T').
For me, I have Gnus set to see unread/ticked article and threads that
have unread and ticked articles. I have

1. "gnus-fetch-old-headers" set to "some".
2. "gnus-build-sparse-threads" set to "some".

It is much cleaner this way, since it is not cluttered with articles of
no interest. If I want to see old read one, I just use "/o".
Post by Peter Davis
but I'd settle for seeing all of the threads containing any unread
messages. As I understand it, gnus-fetch-old-headers is supposed to
do that, but I haven't found a way to make it work, at least with
Fastmail.fm IMAP.
I do use imap- a local Dovecot server.
Post by Peter Davis
The 'l' command in mutt is not search, it's limit ... it limits the
display to messages matching some criteria. Admittedly I haven't
searched exhaustively for gnus features to mimic this, but I didn't
see any obvious ones. Of course, as I said, since only unread messages
show up in the Summary, this is not very useful in gnus.
In Gnus "/" is "limited to". It is very powerful:

https://www.gnu.org/software/emacs/manual/html_node/gnus/Limiting.html
Peter Davis
2014-12-09 22:46:35 UTC
Permalink
Post by Charles Philip Chan
Post by Peter Davis
For me, Summary only shows the unread messages, and not even the rest
of the threads they belong to (unless I type 'A T').
For me, I have Gnus set to see unread/ticked article and threads that
have unread and ticked articles. I have
1. "gnus-fetch-old-headers" set to "some".
2. "gnus-build-sparse-threads" set to "some".
It is much cleaner this way, since it is not cluttered with articles of
no interest. If I want to see old read one, I just use "/o".
I just tried this, but it it's not doing anything for me. I'm still only
seeing individual unread messages and not the threads they belong to.

Thanks,
-pd
Charles Philip Chan
2014-12-10 00:19:37 UTC
Permalink
Post by Peter Davis
I just tried this, but it it's not doing anything for me. I'm still
only seeing individual unread messages and not the threads they belong
to.
Did you forget to set "gnus-show-threads" to "t"?

Charles
--
"It's God. No, not Richard Stallman, or Linus Torvalds, but God."
(By Matt Welsh)
Peter Davis
2014-12-10 00:25:45 UTC
Permalink
Post by Charles Philip Chan
Post by Peter Davis
I just tried this, but it it's not doing anything for me. I'm still
only seeing individual unread messages and not the threads they belong
to.
Did you forget to set "gnus-show-threads" to "t"?
It is set to t.

Thanks,
-pd
Charles Philip Chan
2014-12-10 01:35:03 UTC
Permalink
Post by Peter Davis
Post by Charles Philip Chan
Did you forget to set "gnus-show-threads" to "t"?
It is set to t.
Hum, what happens when you press

C-M-t

?

Charles
--
We are MicroSoft. You will be assimilated. Resistance is futile.
(Attributed to B.G., Gill Bates)
Peter Davis
2014-12-10 02:01:37 UTC
Permalink
Post by Charles Philip Chan
Post by Peter Davis
Post by Charles Philip Chan
Did you forget to set "gnus-show-threads" to "t"?
It is set to t.
Hum, what happens when you press
C-M-t
?
I did check it with C-h v gnus-show-threads, but typing C-M-t toggles
threading first off, and then on, as does 'T T'.

-pd

Loading...