Gnus development mailing list
 help / color / mirror / Atom feed
* hack of .overview files
@ 1998-03-03 15:59 Mark Moll
  1998-03-03 16:04 ` Stefan Waldherr
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Mark Moll @ 1998-03-03 15:59 UTC (permalink / raw)


If I am the sender of a message, I'd rather see the recipient than my own
name in the summary. That's how I used to have it configured with VM and MH.
With USENET news that's kinda hard to do, but mail .overview files can be
hacked. That's exactly what I did; a quick and dirty hack:

> diff -c nnheader.el.orig nnheader.el
*** nnheader.el.orig     Sun Mar  1 10:25:55 1998
--- nnheader.el Tue Mar  3 10:49:39 1998
***************
*** 205,212 ****
           ;; From.
           (progn
             (goto-char p)
!            (if (search-forward "\nfrom: " nil t)
!                (nnheader-header-value) "(nobody)"))
           ;; Date.
           (progn
             (goto-char p)
--- 205,219 ----
           ;; From.
           (progn
             (goto-char p)
!            (cond ((string-match (user-full-name)
!                                 (if (search-forward "\nfrom: " nil t)
!                                     (nnheader-header-value) "(nobody)"))
!                   (goto-char p)
!                   (if (search-forward "\nto: " nil t)
!                       (concat "To:" (nnheader-header-value)) "To:(nobody)"))
!                  (t (goto-char p)
!                     (if (search-forward "\nfrom: " nil t)
!                         (nnheader-header-value) "(nobody)"))))
           ;; Date.
           (progn
             (goto-char p)

(I know the "from" header should only be checked once, but I am a total
elisp illiterate.) Is there any reason why this is a bad idea? If not, is it
worth making this behavior an option?

-- 
Mark Moll    


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

* Re: hack of .overview files
  1998-03-03 15:59 hack of .overview files Mark Moll
@ 1998-03-03 16:04 ` Stefan Waldherr
  1998-03-03 16:42 ` Wes Hardaker
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Stefan Waldherr @ 1998-03-03 16:04 UTC (permalink / raw)


>>>>> "Mark" == Mark Moll <mmoll@cs.cmu.edu> writes:

  Mark> (I know the "from" header should only be checked once, but I am a
  Mark> total elisp illiterate.) Is there any reason why this is a bad idea?
  Mark> If not, is it worth making this behavior an option?

Yes pleaz. I was about to hack the summary buffer of my outbox but now ...

Stefan.
-- 
Stefan Waldherr                office +1 (412) 268-3837
                                  fax +1 (412) 268-5576
                               e-Mail swa@cs.cmu.edu
                                  www http://www.waldherr.org/


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

* Re: hack of .overview files
  1998-03-03 15:59 hack of .overview files Mark Moll
  1998-03-03 16:04 ` Stefan Waldherr
@ 1998-03-03 16:42 ` Wes Hardaker
  1998-03-03 17:37 ` Per Abrahamsen
  1998-03-03 19:55 ` hack of .overview files [take 2] Mark Moll
  3 siblings, 0 replies; 9+ messages in thread
From: Wes Hardaker @ 1998-03-03 16:42 UTC (permalink / raw)
  Cc: ding

>>>>> On 03 Mar 1998 10:59:28 -0500, Mark Moll <mmoll@cs.cmu.edu> said:

MM> !            (cond ((string-match (user-full-name)

A definitely good idea.  However, you might want to match on something 
other than just user-full-name, as "Mike Smith" might get kind of
annoyed with this feature.  Probably a combination of that and
user-mail-address or something would be better.

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


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

* Re: hack of .overview files
  1998-03-03 15:59 hack of .overview files Mark Moll
  1998-03-03 16:04 ` Stefan Waldherr
  1998-03-03 16:42 ` Wes Hardaker
@ 1998-03-03 17:37 ` Per Abrahamsen
  1998-03-03 19:55 ` hack of .overview files [take 2] Mark Moll
  3 siblings, 0 replies; 9+ messages in thread
From: Per Abrahamsen @ 1998-03-03 17:37 UTC (permalink / raw)


Mark Moll <mmoll@cs.cmu.edu> writes:

> (I know the "from" header should only be checked once, but I am a total
> elisp illiterate.) Is there any reason why this is a bad idea? If not, is it
> worth making this behavior an option?

There is a standard format for `.overview'.  The format is extensible,
so you _could_ add the "To: " header.

I'd feel bad about adding an (even optional) kludge that breaks a
standard file format, especially when the file format is flexible
enough to add the extra information without breaking it.


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

* Re: hack of .overview files [take 2]
  1998-03-03 15:59 hack of .overview files Mark Moll
                   ` (2 preceding siblings ...)
  1998-03-03 17:37 ` Per Abrahamsen
@ 1998-03-03 19:55 ` Mark Moll
  1998-03-04 11:16   ` Per Abrahamsen
  3 siblings, 1 reply; 9+ messages in thread
From: Mark Moll @ 1998-03-03 19:55 UTC (permalink / raw)


Okay, here's my second try. This time it looks (hopefully) somewhat less
like a hack, but more like a real feature. (Yes, more features is a good
thing :-) ). By default the behavior is *not* turned on, you have to set 
nnheader-nov-uses-to to t.

> diff -c nnheader.el.orig nnheader.el
*** nnheader.el.orig     Sun Mar  1 10:25:55 1998
--- nnheader.el Tue Mar  3 14:47:01 1998
***************
*** 54,59 ****
--- 54,67 ----
  
  \(setq nnheader-file-name-translation-alist '((?: . ?_)))")
  
+ (defvar nnheader-user-address-regexp (user-full-name)
+   "*Regexp matching the user's name and/or address as it appears in the
+ \"From:\" header.")
+ 
+ (defvar nnheader-nov-uses-to nil
+   "*If nnheader-nov-uses-to is t, the recipient will be listed in the summary
+ if the \"From:\" field matches nnheader-user-address-regexp.")
+ 
  (eval-and-compile
   (autoload 'nnmail-message-id "nnmail")
   (autoload 'mail-position-on-field "sendmail")
***************
*** 205,212 ****
           ;; From.
           (progn
             (goto-char p)
!            (if (search-forward "\nfrom: " nil t)
!                (nnheader-header-value) "(nobody)"))
           ;; Date.
           (progn
             (goto-char p)
--- 213,228 ----
           ;; From.
           (progn
             (goto-char p)
!            (let (from)
!              (setq from (if (search-forward "\nfrom: " nil t)
!                             (nnheader-header-value) "(nobody)"))
!              (cond ((and nnheader-nov-uses-to
!                         (string-match nnheader-user-address-regexp from))
!                     (goto-char p)
!                     (if (search-forward "\nto: " nil t)
!                         (concat "To:" (nnheader-header-value))
!                       "To:(nobody)"))
!                    (t from))))
           ;; Date.
           (progn
             (goto-char p)

-- 
Mark Moll    


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

* Re: hack of .overview files [take 2]
  1998-03-03 19:55 ` hack of .overview files [take 2] Mark Moll
@ 1998-03-04 11:16   ` Per Abrahamsen
  1998-03-05 11:20     ` threading emails (Was: hack of .overview...) Steinar Bang
  1998-03-07 12:59     ` hack of .overview files [take 2] Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Per Abrahamsen @ 1998-03-04 11:16 UTC (permalink / raw)



Mark Moll <mmoll@cs.cmu.edu> writes:

> Okay, here's my second try. This time it looks (hopefully) somewhat less
> like a hack, but more like a real feature.

It still unnecessarily breaks the NOV format.

The right way would be to add an extra field to the end of each line
in the .overview file, like this:

	[...]	Xref: blah blah blah	To: ding@gnus.org

and then add a new escape to `gnus-summary-line-format' with semantics
like 

	%X	Name of the poster unless it matches
	        `gnus-uninteresting-senders', content of the From:
	        header otherwise.

Personally, I split in and outgoing mail into the same folders, so my
email conversations are in one place, nicely threaded.


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

* threading emails (Was: hack of .overview...)
  1998-03-04 11:16   ` Per Abrahamsen
@ 1998-03-05 11:20     ` Steinar Bang
  1998-03-05 13:07       ` Per Abrahamsen
  1998-03-07 12:59     ` hack of .overview files [take 2] Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Steinar Bang @ 1998-03-05 11:20 UTC (permalink / raw)


>>>>> Per Abrahamsen <abraham@dina.kvl.dk>:

[...]
> Personally, I split in and outgoing mail into the same folders, so my
> email conversations are in one place, nicely threaded.
                                               ^^^^^^^^

Yes... if the other party isn't using one of:
 - MSOutlook, MSExchange, MSMail 
 - Eudora
 - Sun Mailtool
 - RMAIL (for me, currently with qgnus 0.34.  Used to work.  larsi
   can't reproduce the behaviour)

In which case 
	T ^
comes in handy (but it's still annoying...).


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

* Re: threading emails (Was: hack of .overview...)
  1998-03-05 11:20     ` threading emails (Was: hack of .overview...) Steinar Bang
@ 1998-03-05 13:07       ` Per Abrahamsen
  0 siblings, 0 replies; 9+ messages in thread
From: Per Abrahamsen @ 1998-03-05 13:07 UTC (permalink / raw)



Steinar Bang <sb@metis.no> writes:

> >>>>> Per Abrahamsen <abraham@dina.kvl.dk>:
> 
> [...]
> > Personally, I split in and outgoing mail into the same folders, so my
> > email conversations are in one place, nicely threaded.
>                                                ^^^^^^^^
> 
> Yes... if the other party isn't using one of:
>  - MSOutlook, MSExchange, MSMail 
>  - Eudora
>  - Sun Mailtool

Still, they will be grouped together and sorted.

>  - RMAIL (for me, currently with qgnus 0.34.  Used to work.  larsi
>    can't reproduce the behaviour)

Gnus bug.  Dave Love posted a fix for it.  A workaround is

	(setq nnml-nov-is-evil nil)


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

* Re: hack of .overview files [take 2]
  1998-03-04 11:16   ` Per Abrahamsen
  1998-03-05 11:20     ` threading emails (Was: hack of .overview...) Steinar Bang
@ 1998-03-07 12:59     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-07 12:59 UTC (permalink / raw)


Per Abrahamsen <abraham@dina.kvl.dk> writes:

> The right way would be to add an extra field to the end of each line
> in the .overview file, like this:
> 
> 	[...]	Xref: blah blah blah	To: ding@gnus.org
> 
> and then add a new escape to `gnus-summary-line-format' with semantics
> like 
> 
> 	%X	Name of the poster unless it matches
> 	        `gnus-uninteresting-senders', content of the From:
> 	        header otherwise.

Yup.  Doing something like this has been on the todo list for eons.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1998-03-07 12:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-03 15:59 hack of .overview files Mark Moll
1998-03-03 16:04 ` Stefan Waldherr
1998-03-03 16:42 ` Wes Hardaker
1998-03-03 17:37 ` Per Abrahamsen
1998-03-03 19:55 ` hack of .overview files [take 2] Mark Moll
1998-03-04 11:16   ` Per Abrahamsen
1998-03-05 11:20     ` threading emails (Was: hack of .overview...) Steinar Bang
1998-03-05 13:07       ` Per Abrahamsen
1998-03-07 12:59     ` hack of .overview files [take 2] Lars Magne Ingebrigtsen

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