* beginning of a mail in the summary view
@ 2008-04-21 10:54 francois.lagarde
2008-04-21 16:12 ` Peter Jones
0 siblings, 1 reply; 6+ messages in thread
From: francois.lagarde @ 2008-04-21 10:54 UTC (permalink / raw)
To: info-gnus-english
hello,
I would like to customize my summary view in asimilar with the gmail
interface:
subject of the mail followed by (using a different color) the the
first words of the mail.
any ideas?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: beginning of a mail in the summary view
2008-04-21 10:54 beginning of a mail in the summary view francois.lagarde
@ 2008-04-21 16:12 ` Peter Jones
2008-04-21 20:00 ` Ted Zlatanov
2008-04-21 20:03 ` François Lagarde
0 siblings, 2 replies; 6+ messages in thread
From: Peter Jones @ 2008-04-21 16:12 UTC (permalink / raw)
To: info-gnus-english
francois.lagarde@gmail.com writes:
> I would like to customize my summary view in asimilar with the gmail
> interface:
> subject of the mail followed by (using a different color) the the
> first words of the mail.
The manual talks about setting your summary line, and using
user-defined functions. You could write a user function that would
take the first few words from the body of the mail and place it into
the summary line.
,----[ C-h v gnus-summary-line-format RET ]
| gnus-summary-line-format is a variable defined in `gnus.el'.
|
| Documentation:
| *The format specification of the lines in the summary buffer.
|
| It works along the same lines as a normal formatting string,
| with some simple extensions.
|
| [snip]
| %u User defined specifier. The next character in the format string should
| be a letter. Gnus will call the function gnus-user-format-function-X,
| where X is the letter following %u. The function will be passed the
| current header as argument. The function should return a string, which
| will be inserted into the summary just like information from any other
| summary specifier.
| [snip]
`----
--
Peter Jones [pjones at domain below]
pmade inc. - http://pmade.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: beginning of a mail in the summary view
2008-04-21 16:12 ` Peter Jones
@ 2008-04-21 20:00 ` Ted Zlatanov
2008-04-21 20:05 ` François Lagarde
2008-04-21 20:03 ` François Lagarde
1 sibling, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2008-04-21 20:00 UTC (permalink / raw)
To: info-gnus-english
On Mon, 21 Apr 2008 10:12:04 -0600 Peter Jones <dev-null@pmade.com> wrote:
PJ> francois.lagarde@gmail.com writes:
>> I would like to customize my summary view in asimilar with the gmail
>> interface: subject of the mail followed by (using a different color)
>> the the first words of the mail.
PJ> The manual talks about setting your summary line, and using
PJ> user-defined functions. You could write a user function that would
PJ> take the first few words from the body of the mail and place it into
PJ> the summary line.
The problem is that this is a slow operation if you need the message
body over IMAP or NNTP, for example. The data you normally have without
the body are just some headers. I don't know if there's any way to
avoid that. Maybe cache the summary with the gnus-registry?
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: beginning of a mail in the summary view
2008-04-21 16:12 ` Peter Jones
2008-04-21 20:00 ` Ted Zlatanov
@ 2008-04-21 20:03 ` François Lagarde
1 sibling, 0 replies; 6+ messages in thread
From: François Lagarde @ 2008-04-21 20:03 UTC (permalink / raw)
To: info-gnus-english
In the last post, on 04/21 about 06h, "Peter" (Peter Jones) wrote:
Peter> You could write a user function that would take the first few words
Peter> from the body of the mail
I know that my skills in emacs are limited... does anyone has already done this
kind of function.
thanks
--
F. Lagarde
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: beginning of a mail in the summary view
2008-04-21 20:00 ` Ted Zlatanov
@ 2008-04-21 20:05 ` François Lagarde
2008-04-22 15:34 ` Ted Zlatanov
0 siblings, 1 reply; 6+ messages in thread
From: François Lagarde @ 2008-04-21 20:05 UTC (permalink / raw)
To: info-gnus-english
In the last post, on 04/21 about 10h, "Ted" (Ted Zlatanov) wrote:
Ted> The problem is that this is a slow operation if you need the message
Ted> body over IMAP or NNTP, for example.
you are right. Nevertheless I am using fetchmail, so that, all my mails are
local.
--
F. Lagarde
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: beginning of a mail in the summary view
2008-04-21 20:05 ` François Lagarde
@ 2008-04-22 15:34 ` Ted Zlatanov
0 siblings, 0 replies; 6+ messages in thread
From: Ted Zlatanov @ 2008-04-22 15:34 UTC (permalink / raw)
To: info-gnus-english
On Mon, 21 Apr 2008 22:05:02 +0200 firstname.name@gmail.com (François Lagarde) wrote:
FL> In the last post, on 04/21 about 10h, "Ted" (Ted Zlatanov) wrote:
Ted> The problem is that this is a slow operation if you need the message
Ted> body over IMAP or NNTP, for example.
FL> you are right. Nevertheless I am using fetchmail, so that, all my mails are
FL> local.
Oh, that's fine then. You may want to turn it off for non-local groups
though. Here's how I get the article as a string in spam.el:
(defun spam-get-article-as-string (article)
(when (numberp article)
(with-temp-buffer
(gnus-request-article-this-buffer
article
gnus-newsgroup-name)
(buffer-string))))
You just need the article number, which is available from the parameters
of the formatting function. This will work for any backend. I think
you'll get the headers too, so use message-goto-body in the temporary
buffer and then return the substring from the new position to the end.
Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-22 15:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-21 10:54 beginning of a mail in the summary view francois.lagarde
2008-04-21 16:12 ` Peter Jones
2008-04-21 20:00 ` Ted Zlatanov
2008-04-21 20:05 ` François Lagarde
2008-04-22 15:34 ` Ted Zlatanov
2008-04-21 20:03 ` François Lagarde
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).