Gnus development mailing list
 help / color / mirror / Atom feed
* add a gcc field according to bbdb entry
@ 2006-05-25 10:59 Uwe Brauer
  2006-05-25 12:44 ` Sam Steingold
  2006-05-26  2:57 ` Dave Goldberg
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Brauer @ 2006-05-25 10:59 UTC (permalink / raw)


Hello

Does anybody know about a function which would insert a gcc field,
according to a relevant BBDB entry?
Example the entry 
gnus-folder: nnimap+myserverimap.here.net:Gnus
would insert
Ccc: nnimap+myserverimap.here.net:Gnus

I played a little around, but it seems not that trivial.

Thanks 

Uwe Brauer




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

* Re: add a gcc field according to bbdb entry
  2006-05-25 10:59 add a gcc field according to bbdb entry Uwe Brauer
@ 2006-05-25 12:44 ` Sam Steingold
  2006-05-25 14:07   ` Uwe Brauer
  2006-05-26  2:57 ` Dave Goldberg
  1 sibling, 1 reply; 5+ messages in thread
From: Sam Steingold @ 2006-05-25 12:44 UTC (permalink / raw)


> * Uwe Brauer <bho@zng.hpz.rf> [2006-05-25 12:59:21 +0200]:
>
> Does anybody know about a function which would insert a gcc field,
> according to a relevant BBDB entry?
> Example the entry 
> gnus-folder: nnimap+myserverimap.here.net:Gnus
> would insert
> Ccc: nnimap+myserverimap.here.net:Gnus

check out gnus-mail-save-name and gnus-file-save-name.

-- 
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://dhimmi.com http://thereligionofpeace.com http://truepeace.org
http://pmw.org.il http://mideasttruth.com http://iris.org.il
Bus error -- please leave by the rear door.




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

* Re: add a gcc field according to bbdb entry
  2006-05-25 12:44 ` Sam Steingold
@ 2006-05-25 14:07   ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2006-05-25 14:07 UTC (permalink / raw)


>>>>> "Sam" == Sam Steingold <sds@podval.org> writes:

   >> * Uwe Brauer <bho@zng.hpz.rf> [2006-05-25 12:59:21 +0200]:
   >> 
   >> Does anybody know about a function which would insert a gcc field,
   >> according to a relevant BBDB entry?
   >> Example the entry 
   >> gnus-folder: nnimap+myserverimap.here.net:Gnus
   >> would insert
   >> Ccc: nnimap+myserverimap.here.net:Gnus

   Sam> check out gnus-mail-save-name and gnus-file-save-name.

Could you please be a little bit more specific. How should I set 
these variables? The documentation just tells me:
,----
| `gnus-file-save-name' is a variable declared in Lisp.
|   -- loaded from "gnus-art"
| 
| Value: gnus-numeric-save-name
| 
| Documentation:
| A function generating a file name to save articles in article format.
| The function is called with NEWSGROUP, HEADERS, and optional
| LAST-FILE.
`----


,----
| `gnus-file-save-name' is a variable declared in Lisp.
|   -- loaded from "gnus-art"
| 
| Value: gnus-numeric-save-name
| 
| Documentation:
| A function generating a file name to save articles in article format.
| The function is called with NEWSGROUP, HEADERS, and optional
| LAST-FILE.
`----


Uwe 




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

* Re: add a gcc field according to bbdb entry
  2006-05-25 10:59 add a gcc field according to bbdb entry Uwe Brauer
  2006-05-25 12:44 ` Sam Steingold
@ 2006-05-26  2:57 ` Dave Goldberg
  2006-05-26 15:28   ` Uwe Brauer
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Goldberg @ 2006-05-26  2:57 UTC (permalink / raw)


>>>>> On Thu, 25 May 2006 12:59:21 +0200, Uwe Brauer <oub@mat.ucm.es> said:

> Hello
> Does anybody know about a function which would insert a gcc field,
> according to a relevant BBDB entry?
> Example the entry 
> gnus-folder: nnimap+myserverimap.here.net:Gnus
> would insert
> Ccc: nnimap+myserverimap.here.net:Gnus

I don't understand exactly how you plan for this to work.  Do you want
a function that looks up whatever's on, say, the To line and pulls the
gnus-folder record for that bbdb record?  Or do you want a posting
style (but what you search for in that case?)  Anyway, the functions
you want are bbdb-search (use the result of bbdb-records as the first
argument) and then bbdb-record-getprop against the record that matches
your query.  An example off the top of my head, and which is
completely untried would be something like this:

(defun get-folder-for-address (TO)
  "Get gnus-folder record for the bbdb entry with TO in the net
address"
  (let ((rec (car (bbdb-search (bbdb-records) nil nil TO nil nil))))
    (bbdb-record-getprop rec 'gnus-folder)))

And then you'd do something like

(message-insert-header "Gcc" 
  (get-folder-for-address (message-fetch-field "To")))

Again, off the top of my head. Odds are there's some tweaking needed.

hth,
-- 
Dave Goldberg
david.goldberg6@verizon.net




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

* Re: add a gcc field according to bbdb entry
  2006-05-26  2:57 ` Dave Goldberg
@ 2006-05-26 15:28   ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2006-05-26 15:28 UTC (permalink / raw)


>>>>> "Dave" == Dave Goldberg <david.goldberg6@verizon.net> writes:
Hello

   Dave> I don't understand exactly how you plan for this to work.  Do
   Dave> you want a function that looks up whatever's on, say, the To
   Dave> line and pulls the gnus-folder record for that bbdb record?
Right, more or less. I have set via   `gnus-group-customize'
set the CGG to the current group.

So if I send a mail Joe Doe, in the group, which is called say  
nnimap+myserverimap.here.net:Gnus, then 
nnimap+myserverimap.here.net:Gnus, is inserted in the Ccc field.

However sometimes I want to send a message to Joe Doe from a different
group, but I want to have the Gcc nnimap+myserverimap.here.net:Gnus.

So suppose I add  to Joe Doe's bbdb entry, the field gnus-folder (it
could be called different of course). That field has the value
nnimap+myserverimap.here.net:Gnus. 
So if I had an a interactive function which would allow me to modify
the gcc, and yank the gcc field from that bbdb entry, I would be done


   Dave> And then you'd do something like

   Dave> (message-insert-header "Gcc" 
   Dave>   (get-folder-for-address (message-fetch-field "To")))

   Dave> Again, off the top of my head. Odds are there's some tweaking needed.

Thanks very much but it did not work, it returns error, so I continue
trying.

Uwe 




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

end of thread, other threads:[~2006-05-26 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-25 10:59 add a gcc field according to bbdb entry Uwe Brauer
2006-05-25 12:44 ` Sam Steingold
2006-05-25 14:07   ` Uwe Brauer
2006-05-26  2:57 ` Dave Goldberg
2006-05-26 15:28   ` Uwe Brauer

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