Gnus development mailing list
 help / color / mirror / Atom feed
* Summary format question
@ 1997-05-27 14:44 Nelson Jose dos Santos Ferreira
  1997-05-27 16:07 ` Kai Grossjohann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nelson Jose dos Santos Ferreira @ 1997-05-27 14:44 UTC (permalink / raw)



Hi all...

I'm storing mails and my replies in the same group.
To my questions could you give an hint ? (RTFM or RFTF ok...)

How to

1. Set Gcc replies for mail folders to that folder.
2. Make the scan-mail daemon handler update the group buffer.

BTW, is there a function to extract the value of a specified header ?
I want to use the %u specifier to extract the From, check for one of my
addresses. If it's me output -> and the contents of the To: header.
I'd like to do the same translation as the %a does.

BTW, can we customize the %a translation ? I sometimes receive mail from
people which have words in parentesis which describe their "group", i.e. all
sysadm have (SYSADM) appended and I'd like to ignore that and give the other
components of the name.

Thanks in advance,
	Nelson
---
Nelson Jose dos Santos Ferreira |  .  .  .  | INESC/PT-SVC   Lisbon,PORTUGAL
                                | |. /  / . | PT-Servicos
mailto:Nelson.Ferreira@inesc.pt |.||\| | /  | Phone:+351 (1) 3100063
http://ccae-sv.inesc.pt/~njsf   | .|<:/  \. | Fax  :+351 (1) 3100008


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

* Re: Summary format question
  1997-05-27 14:44 Summary format question Nelson Jose dos Santos Ferreira
@ 1997-05-27 16:07 ` Kai Grossjohann
  1997-05-27 17:46 ` Lars Magne Ingebrigtsen
  1997-05-27 18:10 ` Sudish Joseph
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 1997-05-27 16:07 UTC (permalink / raw)


>>>>> Nelson Jose dos Santos Ferreira writes:

  Nelson> 1. Set Gcc replies for mail folders to that folder.

I use the following:

,-----
| (defun kai-gnus-outgoing-message-group ()                          
|   (cond ((and gnus-newsgroup-name                                  
|               (stringp gnus-newsgroup-name)                        
|               (string-match "^nnml" gnus-newsgroup-name))          
|          gnus-newsgroup-name)                                      
|         (t "nnml:mail.misc")))                                     
| (setq gnus-outgoing-message-group 'kai-gnus-outgoing-message-group)
`-----

I also have the following function bound to a key in message mode.

,-----
| (defun message-toggle-gcc ()         
|   (interactive)                      
|   (save-excursion                    
|     (save-restriction                
|       (let ((pmin (progn (beginning-of-buffer) (point)))
|             (pmax (progn             
|                     (beginning-of-buffer)
|                     (re-search-forward (concat "^" mail-header-separator
|                                                "$"))
|                     (beginning-of-line)
|                     (point))))       
|         (beginning-of-buffer)        
|         (narrow-to-region pmin pmax) 
|         (if (re-search-forward "^gcc: .*" nil t)
|             (progn                   
|               (beginning-of-line)    
|               (kill-line 1))         
|           (goto-char pmax)           
|           (insert (concat "Gcc: "    
|                           (kai-gnus-outgoing-message-group)
|                           "\n")))))))
`-----

hth,
kai
-- 
Life is hard and then you die.


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

* Re: Summary format question
  1997-05-27 14:44 Summary format question Nelson Jose dos Santos Ferreira
  1997-05-27 16:07 ` Kai Grossjohann
@ 1997-05-27 17:46 ` Lars Magne Ingebrigtsen
  1997-05-27 18:10 ` Sudish Joseph
  2 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-05-27 17:46 UTC (permalink / raw)


Nelson Jose dos Santos Ferreira <Nelson.Ferreira@inesc.pt> writes:

> BTW, is there a function to extract the value of a specified header ?

Use `mail-header-from' (etc.) on the header parameter passed to the
function pointed to by the %u spec.

> I want to use the %u specifier to extract the From, check for one of my
> addresses. If it's me output -> and the contents of the To: header.
> I'd like to do the same translation as the %a does.

The definition of %a is

(or (car (funcall gnus-extract-address-components gnus-tmp-from))
    gnus-tmp-from)

> BTW, can we customize the %a translation ? I sometimes receive mail from
> people which have words in parentesis which describe their "group", i.e. all
> sysadm have (SYSADM) appended and I'd like to ignore that and give the other
> components of the name.

Quoth the manual:

   Gnus will use the value of the `gnus-extract-address-components'
variable as a function for getting the name and address parts of a
`From' header.  Two pre-defined function exist:
`gnus-extract-address-components', which is the default, quite fast,
and too simplistic solution; and `mail-extract-address-components',
which works very nicely, but is slower.  The default function will
return the wrong answer in 5% of the cases.  If this is unacceptable to
you, use the other function instead.

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


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

* Re: Summary format question
  1997-05-27 14:44 Summary format question Nelson Jose dos Santos Ferreira
  1997-05-27 16:07 ` Kai Grossjohann
  1997-05-27 17:46 ` Lars Magne Ingebrigtsen
@ 1997-05-27 18:10 ` Sudish Joseph
  2 siblings, 0 replies; 4+ messages in thread
From: Sudish Joseph @ 1997-05-27 18:10 UTC (permalink / raw)


Nelson Jose dos Santos Ferreira writes:
> 2. Make the scan-mail daemon handler update the group buffer.

(gnus-demon-add-handler 'sj/gnus-demon-scan-news 20 5)
(defun sj/gnus-demon-scan-news ()
  (when (gnus-alive-p)
    (save-window-excursion
      (save-excursion
	(set-buffer gnus-group-buffer)
	(gnus-group-get-new-news 2)))))


> BTW, is there a function to extract the value of a specified header ?
> I want to use the %u specifier to extract the From, check for one of my
> addresses. If it's me output -> and the contents of the To: header.
> I'd like to do the same translation as the %a does.

The mail-header-* macros in nnheader.el should be able pick apart the
header passed to a gnus-user-format-function-.  Don't forget to
byte-compile anything you do with %u or summary generation might slow
down drastically.

-Sudish


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

end of thread, other threads:[~1997-05-27 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-27 14:44 Summary format question Nelson Jose dos Santos Ferreira
1997-05-27 16:07 ` Kai Grossjohann
1997-05-27 17:46 ` Lars Magne Ingebrigtsen
1997-05-27 18:10 ` Sudish Joseph

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