Gnus development mailing list
 help / color / mirror / Atom feed
* Is Username Expansion possible in GNUS?
@ 1996-06-13 21:47 Danny Siu
  1996-06-14  0:32 ` Lars Magne Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Danny Siu @ 1996-06-13 21:47 UTC (permalink / raw)



There is a very nice feature of Pine which can be included in GNUS message
mode .  When composing a message in Pine, just type in the username, for
example, "dsiu", and Pine will expend it to full name and uid@FQDN, like
"Danny Siu <dsiu@adobe.com>".  

It is particularly useful when you are not certain about the email address of
someone in your school or company when you email him.

Is this possible in GNUS?

-- 
                                                                ^..^
 '/..\"                                                        ( oo )  )~
m( oo )m                                                         ,,  ,,
/=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\
|  Danny Dick-Fung Siu                http://www-leland.stanford.edu/~dsiu |
|  Reference System Group             http://www.csua.berkeley.edu/~dsiu   |
|  Adobe Systems Incorporated       E-Mail:<dsiu@alumni.eecs.berkeley.edu> |
|       "What do you expect from a         <dsiu@leland.stanford.edu>      |
|          Cal. Berkeley grad.?"           <dsiu@adobe.com>                |
\=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-13 21:47 Is Username Expansion possible in GNUS? Danny Siu
@ 1996-06-14  0:32 ` Lars Magne Ingebrigtsen
  1996-06-14 22:36   ` Danny Siu
  1996-06-14 13:08 ` David Worenklein
  1996-06-14 15:45 ` Kai Grossjohann
  2 siblings, 1 reply; 22+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-14  0:32 UTC (permalink / raw)


Danny Siu <dsiu@mv.us.adobe.com> writes:

> There is a very nice feature of Pine which can be included in GNUS message
> mode .  When composing a message in Pine, just type in the username, for
> example, "dsiu", and Pine will expend it to full name and uid@FQDN, like
> "Danny Siu <dsiu@adobe.com>".  

Put something like:

alias dsiu "Danny Siu <dsiu@adobe.com>"

in your .mailrc file.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-13 21:47 Is Username Expansion possible in GNUS? Danny Siu
  1996-06-14  0:32 ` Lars Magne Ingebrigtsen
@ 1996-06-14 13:08 ` David Worenklein
  1996-06-14 15:45 ` Kai Grossjohann
  2 siblings, 0 replies; 22+ messages in thread
From: David Worenklein @ 1996-06-14 13:08 UTC (permalink / raw)


Danny Siu <dsiu@mv.us.adobe.com> writes:

> There is a very nice feature of Pine which can be included in GNUS message
> mode .  When composing a message in Pine, just type in the username, for
> example, "dsiu", and Pine will expend it to full name and uid@FQDN, like
> "Danny Siu <dsiu@adobe.com>".  

Mew, by Kazuhiko Yamamoto <kazu@is.aist-nara.ac.jp>, offers
tab-completion based on your MH aliases.  I patched it to all support
sun YP aliases, but that is not (yet?) part of the official Mew
distribution.

The code is pretty straight forward.  May Kazuhiko will let you (Lars)
use it.
--
 David C. Worenklein                                       GREENWICH   CAPITAL
 Operations Support                                        M a r k e t s,  Inc
 =============================================================================
 phone: 203-625-2945                                                      ====
 fax:   203-629-2535                                                      ====
 e-mail: dcw@gcm.com                                                      ====


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-13 21:47 Is Username Expansion possible in GNUS? Danny Siu
  1996-06-14  0:32 ` Lars Magne Ingebrigtsen
  1996-06-14 13:08 ` David Worenklein
@ 1996-06-14 15:45 ` Kai Grossjohann
  1996-06-17  5:30   ` Mark Breslauer
  2 siblings, 1 reply; 22+ messages in thread
From: Kai Grossjohann @ 1996-06-14 15:45 UTC (permalink / raw)
  Cc: ding

>>>>> On 13 Jun 1996 14:47:13 -0700, Danny Siu <dsiu@mv.us.adobe.com>
>>>>> said:

  Danny> There is a very nice feature of Pine which can be included in
  Danny> GNUS message mode .  When composing a message in Pine, just
  Danny> type in the username, for example, "dsiu", and Pine will
  Danny> expend it to full name and uid@FQDN, like "Danny Siu
  Danny> <dsiu@adobe.com>".

I use BBDB which lets you hit M-TAB to expand.  BBDB watches incoming
news and mail messages and records people it finds there.  You can
also store other information about people.  Of course, it is fully
customizable with regard to when and how things are added to its
database and a lot of other things.

Recommended.

kai
-- 
Life is hard and then you die.


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-14  0:32 ` Lars Magne Ingebrigtsen
@ 1996-06-14 22:36   ` Danny Siu
  1996-06-14 23:02     ` Eric Hendrickson
  0 siblings, 1 reply; 22+ messages in thread
From: Danny Siu @ 1996-06-14 22:36 UTC (permalink / raw)


Lars Magne Ingebrigtsen writes:

  Lars> Danny Siu <dsiu@mv.us.adobe.com> writes:
  >> There is a very nice feature of Pine which can be included in GNUS
  >> message mode .  When composing a message in Pine, just type in the
  >> username, for example, "dsiu", and Pine will expend it to full name and
  >> uid@FQDN, like "Danny Siu <dsiu@adobe.com>".

  Lars> Put something like:

  Lars> alias dsiu "Danny Siu <dsiu@adobe.com>"

  Lars> in your .mailrc file.

Well, I don't think it's something I want to do since there are ~2000 people
at Adobe.  I am using .mailrc file now for aliases of my friends and group
aliases.

Also I am using BBDB which works wonderful!  It automatically learns the
name and email address of people whom I received mail from.

Prehaps I didn't state my question clearly.  For the people at Adobe whom I
have never received any mail from (hence no BBDB record), what I want is to
be able to expend their username (eg: jwz) to full name (first and last
name) so that I know I spell their email address right.

I don't know how Pine does that.  Maybe it looks up somewhere in the net and
give me fullname after I type in the email address.  Does anyone know how
Pine works this wonder?

-- 
                                                                ^..^
 '/..\"                                                        ( oo )  )~
m( oo )m                                                         ,,  ,,
/=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\
|  Danny Dick-Fung Siu                http://www-leland.stanford.edu/~dsiu |
|  Reference System Group             http://www.csua.berkeley.edu/~dsiu   |
|  Adobe Systems Incorporated       E-Mail:<dsiu@alumni.eecs.berkeley.edu> |
|       "What do you expect from a         <dsiu@leland.stanford.edu>      |
|          Cal. Berkeley grad.?"           <dsiu@adobe.com>                |
\=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-14 22:36   ` Danny Siu
@ 1996-06-14 23:02     ` Eric Hendrickson
  1996-06-15  1:44       ` Sudish Joseph
  1996-06-15  1:51       ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 22+ messages in thread
From: Eric Hendrickson @ 1996-06-14 23:02 UTC (permalink / raw)
  Cc: ding

a little birdie reports that Danny Siu said:

> Prehaps I didn't state my question clearly.  For the people at Adobe whom I
> have never received any mail from (hence no BBDB record), what I want is to
> be able to expend their username (eg: jwz) to full name (first and last
> name) so that I know I spell their email address right.
> 
> I don't know how Pine does that.  Maybe it looks up somewhere in the net and
> give me fullname after I type in the email address.  Does anyone know how
> Pine works this wonder?

I think what he is talking about, for those of you who haven't used pine (I
haven't but I've seen a few friends do this), is where in the To: or Cc:
field, a user can type the username of the addressee, and after moving to
another field, Pine expands it out to ``username@FQDN (Addressee's Full
Name)''.  I'm sure it gets this straight from the passwd file.  It probably
only does this for those that aren't in the .mailrc (.pinerc?) or those
that don't already have a '@' in the address.

I guess it would be kinda cool if Gnus did that, but I'm no expert since I
still haven't moved to Gnus for mail-reading from VM yet 8) (and VM doesn't
do this anyway).  It might be slow if the passwd file is big, though on the
machines where I've seen Pine do this, it is very quick and the passwd file
has about 40000 (yes, 40k) entries....

		Eric
-- 
Q:	How do you play religious roulette?
A:	You stand around in a circle and blaspheme and see who gets
	struck by lightning first.

Eric D. Hendrickson              Computational Biology Centers/Medical School
Senior Analyst/Programmer           University of Minnesota, Twin Cities, USA
612/625-3644 (phone)           <a href="http://umn.edu/~edh">Crystal Cave</a>
612/626-0623 (fax)        Damnit!  I can't stop the heterocyclic declination!


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-14 23:02     ` Eric Hendrickson
@ 1996-06-15  1:44       ` Sudish Joseph
  1996-06-15 19:06         ` Hallvard B Furuseth
  1996-06-15  1:51       ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 22+ messages in thread
From: Sudish Joseph @ 1996-06-15  1:44 UTC (permalink / raw)
  Cc: Danny Siu, ding

Eric Hendrickson <edh@lenti.med.umn.edu> writes:
> do this anyway).  It might be slow if the passwd file is big, though on the
> machines where I've seen Pine do this, it is very quick and the passwd file
> has about 40000 (yes, 40k) entries....

You don't need to parse the whole file yourself, a getpwnam() call is
all that's needed.  

Unfortunately, Emacs doesn't offer much of an interface to getpw*().
All the functions under user-* operate on your current (r|e)uid,
except for user-login name, which lets you specify an arbitrary uid.
Useless, without a way to map from a name to a uid.

Sucking in the whole password file and using re-search-forward
wouldn't be slow in itself, but it might make you thrash on big passwd
files and be totally useless in the face of NIS.  A subprocess running
egrep seems the best bet, if you -really- want to do this. :-)

-Sudish 


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-14 23:02     ` Eric Hendrickson
  1996-06-15  1:44       ` Sudish Joseph
@ 1996-06-15  1:51       ` Lars Magne Ingebrigtsen
  1996-06-16 21:27         ` Mark Eichin
  1 sibling, 1 reply; 22+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-15  1:51 UTC (permalink / raw)


Eric Hendrickson <edh@lenti.med.umn.edu> writes:

> I think what he is talking about, for those of you who haven't used pine (I
> haven't but I've seen a few friends do this), is where in the To: or Cc:
> field, a user can type the username of the addressee, and after moving to
> another field, Pine expands it out to ``username@FQDN (Addressee's Full
> Name)''.  

Seems way neat and all that, but what's the point?  If you're mailing
something to a local user, why would you want to expand the user name
in this manner?

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-15  1:44       ` Sudish Joseph
@ 1996-06-15 19:06         ` Hallvard B Furuseth
  0 siblings, 0 replies; 22+ messages in thread
From: Hallvard B Furuseth @ 1996-06-15 19:06 UTC (permalink / raw)
  Cc: Eric Hendrickson, Danny Siu, ding

Sudish Joseph <sudish@mindspring.com> writes:
>Eric Hendrickson <edh@lenti.med.umn.edu> writes:
>> do this anyway).  It might be slow if the passwd file is big, though on the
>> machines where I've seen Pine do this, it is very quick and the passwd file
>> has about 40000 (yes, 40k) entries....
> 
> You don't need to parse the whole file yourself, a getpwnam() call is
> all that's needed.  (...)  A subprocess running
> egrep seems the best bet, if you -really- want to do this. :-)

If you make a subprocess, it can just as well be written to do
getpwnam() directly.


Regards,

Hallvard


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-15  1:51       ` Lars Magne Ingebrigtsen
@ 1996-06-16 21:27         ` Mark Eichin
  1996-06-17  2:33           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 22+ messages in thread
From: Mark Eichin @ 1996-06-16 21:27 UTC (permalink / raw)
  Cc: ding


> Seems way neat and all that, but what's the point?  If you're mailing
> something to a local user, why would you want to expand the user name
> in this manner?

I've often used it (or rather, a different local binding that's been
around for 5 or 6 years) just to double check that I spelled the
username right. This is particularly important at a large site, like
MIT, where you have dozens of smiths and hundreds of chens... and a
one character typo can often yield a valid username, or worse a
mailing list.

I don't miss it all that much currently (I haven't gotten around to
hooking it into message mode yet) so it's not *important* but it can
be useful if ts there.


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-16 21:27         ` Mark Eichin
@ 1996-06-17  2:33           ` Lars Magne Ingebrigtsen
  1996-06-17 18:21             ` Edward J. Sabol
  0 siblings, 1 reply; 22+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-17  2:33 UTC (permalink / raw)


Mark Eichin <eichin@cygnus.com> writes:

> I've often used it (or rather, a different local binding that's been
> around for 5 or 6 years) just to double check that I spelled the
> username right. This is particularly important at a large site, like
> MIT, where you have dozens of smiths and hundreds of chens... and a
> one character typo can often yield a valid username, or worse a
> mailing list.

That makes sense.  I sure could use it sometimes -- I often send test
mails to myself, and my user name is "larsi".  I often forget the "i"
part, and I think the user who has the user name "lars" must be
getting rather tider of getting mail from me.  :-)

We do definitely need getpwnam(3) support in Emacs, then.  Anybody
want to write it and send patches to RMS and Chuck?

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-14 15:45 ` Kai Grossjohann
@ 1996-06-17  5:30   ` Mark Breslauer
  1996-06-17 14:23     ` BBDB and Gnus 5.2 Jack Vinson
                       ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Mark Breslauer @ 1996-06-17  5:30 UTC (permalink / raw)
  Cc: Danny Siu, ding

Kai Grossjohann <grossjoh@charly.informatik.uni-dortmund.de> writes:

> I use BBDB which lets you hit M-TAB to expand.  BBDB watches incoming
> news and mail messages and records people it finds there.  You can
> also store other information about people.  Of course, it is fully
> customizable with regard to when and how things are added to its
> database and a lot of other things.
> 
> Recommended.
> 
> kai
> -- 
> Life is hard and then you die.
> 
I started using BBDB recently and found that, while it works great
with the current version of VM, it has trouble with the current Gnus.

If it isn't too much bother could you let me know what sort of
invocations do you use in either ~/gnus or ~/.emacs to have BBDB work
well with Gnus?

Thanks

-- 
Mark Breslauer
markbres@aimnet.com		415.424.0649
mbreslauer@idgbooks.com		415.655.3124


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

* Re: BBDB and Gnus 5.2
  1996-06-17  5:30   ` Mark Breslauer
@ 1996-06-17 14:23     ` Jack Vinson
  1996-06-17 16:14     ` Is Username Expansion possible in GNUS? Kai Grossjohann
  1996-06-18 14:55     ` Hans de Graaff
  2 siblings, 0 replies; 22+ messages in thread
From: Jack Vinson @ 1996-06-17 14:23 UTC (permalink / raw)
  Cc: ding

>>>>> "MB" == Mark Breslauer <markbres@aimnet.com> writes:

MB> I started using BBDB recently and found that, while it works great
MB> with the current version of VM, it has trouble with the current Gnus.

There are a few small changes that need to be made for BBDB to deal with
Gnus 5.2.  These should all be documented in

http://www.cs.ubc.ca/spider/edmonds/usenet/gnus/gnus-bbdb.el 


There are a few enhancements in there as well.  These are not necessary to
the use of BBDB with Gnus.

-- 
Jack Vinson                       jvinson@cheux.ecs.umass.edu
"I wish I were spatial, but I'm a plane." - Radiohead (sorta)


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-17  5:30   ` Mark Breslauer
  1996-06-17 14:23     ` BBDB and Gnus 5.2 Jack Vinson
@ 1996-06-17 16:14     ` Kai Grossjohann
  1996-06-18 14:55     ` Hans de Graaff
  2 siblings, 0 replies; 22+ messages in thread
From: Kai Grossjohann @ 1996-06-17 16:14 UTC (permalink / raw)
  Cc: Kai Grossjohann, Danny Siu, ding

>>>>> On 16 Jun 1996 22:30:49 -0700, Mark Breslauer
>>>>> <markbres@aimnet.com> said:

  Mark> If it isn't too much bother could you let me know what sort of
  Mark> invocations do you use in either ~/gnus or ~/.emacs to have
  Mark> BBDB work well with Gnus?

I'm sure that Jack's answer (which I received before your message --
strange, strange) is much more complete.  I use something simple:

(define-key message-mode-map "\e\t" 'bbdb-complete-name)

Further, I set gnus-interactive-post or something to nil.

kai
-- 
Life is hard and then you die.


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-17  2:33           ` Lars Magne Ingebrigtsen
@ 1996-06-17 18:21             ` Edward J. Sabol
  1996-06-18  2:38               ` Sudish Joseph
  0 siblings, 1 reply; 22+ messages in thread
From: Edward J. Sabol @ 1996-06-17 18:21 UTC (permalink / raw)


Excerpts from [ding]: (17-Jun-96) Re: Is Username Expansion possible in GNUS? by Lars Magne Ingebrigtsen
> Mark Eichin <eichin@cygnus.com> writes:
>> I've often used it (or rather, a different local binding that's been
>> around for 5 or 6 years) just to double check that I spelled the username
>> right. This is particularly important at a large site, like MIT, where you
>> have dozens of smiths and hundreds of chens... and a one character typo
>> can often yield a valid username, or worse a mailing list.
>
> That makes sense. I sure could use it sometimes -- I often send test
> mails to myself, and my user name is "larsi". I often forget the "i"
> part, and I think the user who has the user name "lars" must be getting
> rather tider of getting mail from me. :-)
>
> We do definitely need getpwnam(3) support in Emacs, then. Anybody want
> to write it and send patches to RMS and Chuck?

I think all the necessary support is already in mailalias.el which is
distributed with Emacs. For /etc/passwd look-ups, check out:

(defun mail-get-names (pattern)
  "Fetch local users and global mail adresses for completion.
Consults `/etc/passwd' and a directory service if one is set up via
`mail-directory-function'."

It doesn't use getpwnam(3); instead it loads /etc/passwd into a buffer and
searches that.

For large sites, one is more likely to use YP, NIS, NIS+, Ph, or Kerberos to
look up such information. In such case, I believe you can even set up
arbitrary e-mail address look-up methods by intelligently setting the
variables `mail-directory-function', `mail-directory-requery', and
`mail-directory-process' to something useful. But maybe I'm wrong. I've never
used it that way personally. Check out:

(defvar mail-directory-function nil
  "Function to get completions from directory service or `nil' for none.
See `mail-directory-requery'.")

;; This is for when the directory is huge, or changes frequently.
(defvar mail-directory-requery nil
  "When non-`nil' call `mail-directory-function' for each completion.
In that case, one argument gets passed to the function, the partial string
entered so far.")

(defvar mail-directory-process nil
  "Unix command when `mail-directory-function' is `mail-directory-process'.
This is a list of the form (COMMAND ARG ...), where each of the list elements
is evaluated.  When `mail-directory-requery' is non-`nil', during
evaluation the variable `pattern' contains the partial input being completed.
This might look like
  '(remote-shell-program \"HOST\" \"-nl\" \"USER\" \"COMMAND\")
or
  '(remote-shell-program \"HOST\" \"-n\" \"COMMAND '^\" pattern \"'\")")

This probably isn't as user-friendly as it could be. For example, something
like a YP/NIS look-up could probably be offered as a default method. Then
users could just set some variables to the hostname of their YP/NIS server.

Later,
Ed


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-17 18:21             ` Edward J. Sabol
@ 1996-06-18  2:38               ` Sudish Joseph
  1996-06-18 16:33                 ` Hallvard B Furuseth
  0 siblings, 1 reply; 22+ messages in thread
From: Sudish Joseph @ 1996-06-18  2:38 UTC (permalink / raw)


"Edward J. Sabol" <sabol@thuban.gsfc.nasa.gov> writes:
> It doesn't use getpwnam(3); instead it loads /etc/passwd into a
> buffer and searches that.
> 
> For large sites, one is more likely to use YP, NIS, NIS+, Ph, or
> Kerberos to look up such information. In such case, I believe you

Isn't getpwnam() supposed to work under all those conditions?
Hallvard Furuseth's idea was cool, so I did it using perl.  Not
beautiful, but it works.

-Sudish


(defun getpwnam (name)
  "Results of getpwnam(name) as a list of 9 strings; nil on failure"
  (save-excursion
    (set-buffer (get-buffer-create " *getpwnam*"))
    (if (or (/= 0
		(call-process "perl" nil t nil "-e"
			      (format "print join ':', getpwnam('%s')"
				      name)))
	    (bobp))
	(not (kill-buffer (current-buffer))) ; crockery
      (goto-char 1)
      (save-match-data
	(looking-at "\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\)")
	(let ((l (list
		  (match-string 1) (match-string 2) (match-string 3)
		  (match-string 4) (match-string 5) (match-string 6)
		  (match-string 7) (match-string 8) (match-string 9))))
	  (kill-buffer (current-buffer))
	  l)))))


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-17  5:30   ` Mark Breslauer
  1996-06-17 14:23     ` BBDB and Gnus 5.2 Jack Vinson
  1996-06-17 16:14     ` Is Username Expansion possible in GNUS? Kai Grossjohann
@ 1996-06-18 14:55     ` Hans de Graaff
  1996-06-18 15:57       ` Jack Vinson
  2 siblings, 1 reply; 22+ messages in thread
From: Hans de Graaff @ 1996-06-18 14:55 UTC (permalink / raw)


Mark Breslauer <markbres@aimnet.com> writes:

> I started using BBDB recently and found that, while it works great
> with the current version of VM, it has trouble with the current Gnus.
> 
> If it isn't too much bother could you let me know what sort of
> invocations do you use in either ~/gnus or ~/.emacs to have BBDB work
> well with Gnus?

In addition to gnus-bbdb.el, which Jack Vinson already mentioned, I
can tell you what I have in my .gnus. This is with BBDB-1.51.

;; This hooks M-Tab into BBDB's file completion in message mode
(defun bbdb-insinuate-message ()
  "Call this function to hook BBDB completion into message"
  (define-key message-mode-map "\M-\t" 'bbdb-complete-name))
(add-hook 'message-mode-hook 'bbdb-insinuate-message)

;; Code for BBDB coupling using gnus-bbdb.el
(require 'gnus-bbdb) 
(gnus-bbdb-insinuate-summary-buffer)
(bbdb-insinuate-gnus)

This causes people who are in BBDB to be shown with a '+', ':' gets
their record in a separate buffer (or adds them if no record is
found), and ';' edits their comment.


BTW, Jack, I noticed in gnus-bbdb.el that you mention that scoring on
people in BBDB doesn't work yet. Is this still true? Will it get
fixed?

Hans
-- 
Hans de Graaff                              J.J.deGraaff@TWI.TUDelft.NL
Delft University of Technology        Department of Information Systems
---- <a href="http://is.twi.tudelft.nl/~graaff/">Hans de Graaff</a> ---


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-18 14:55     ` Hans de Graaff
@ 1996-06-18 15:57       ` Jack Vinson
  1996-06-25 17:11         ` Brian Edmonds
  0 siblings, 1 reply; 22+ messages in thread
From: Jack Vinson @ 1996-06-18 15:57 UTC (permalink / raw)
  Cc: ding

>>>>> "HdG" == Hans de Graaff <J.J.deGraaff@twi.tudelft.nl> writes:

HdG> BTW, Jack, I noticed in gnus-bbdb.el that you mention that scoring on
HdG> people in BBDB doesn't work yet. Is this still true? Will it get
HdG> fixed?

I don't use that piece of the code, so I have no idea.  Anyone out there
using BBDB to modify scores?  I prefer to use adaptive scoring and
permanent entries in SCORE files, if necessary.

BTW, I didn't write the gnus-bbdb.el, nor do I even maintain it.  Brian
Edmonds keeps it on his web site.  I just happen to be permanently glued to
my terminal, so I can respond to articles before you even send them.  :-)

-- 
Jack Vinson                       jvinson@cheux.ecs.umass.edu
"I wish I were spatial, but I'm a plane." - Radiohead (sorta)


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-18  2:38               ` Sudish Joseph
@ 1996-06-18 16:33                 ` Hallvard B Furuseth
  1996-06-18 16:56                   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 22+ messages in thread
From: Hallvard B Furuseth @ 1996-06-18 16:33 UTC (permalink / raw)
  Cc: ding

> Not beautiful, but it works.

Well, if you want to nice it up a bit...
BTW, replaced : with \n to speed up the regexp.

(defun getpwnam (name)
  "Results of getpwnam(name) as a list of 9 strings; nil on failure"
  (save-excursion
    (set-buffer (get-buffer-create " *getpwnam*"))
    (erase-buffer)		; Just in case
    (prog1 (and (zerop (call-process "perl" nil t nil "-e"
				     (format "print join '\n', getpwnam('%s')"
					     name)))
		(not (bobp))
		(progn
		  (goto-char 1)
		  (progn;save-match-data
		    (and (looking-at "\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)\n\\(.*\\)")
			 (mapcar 'match-string '(1 2 3 4 5 6 7 8 9))))))
      (kill-buffer (current-buffer)))))



Regards,

Hallvard


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-18 16:33                 ` Hallvard B Furuseth
@ 1996-06-18 16:56                   ` Lars Magne Ingebrigtsen
  1996-06-18 17:15                     ` Hallvard B Furuseth
  0 siblings, 1 reply; 22+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-06-18 16:56 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> Well, if you want to nice it up a bit...

But shouldn't we really, really, really be adding getpwnam support to
the Emacs/XEmacs C code?  

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-18 16:56                   ` Lars Magne Ingebrigtsen
@ 1996-06-18 17:15                     ` Hallvard B Furuseth
  0 siblings, 0 replies; 22+ messages in thread
From: Hallvard B Furuseth @ 1996-06-18 17:15 UTC (permalink / raw)
  Cc: ding

> But shouldn't we really, really, really be adding getpwnam support to
> the Emacs/XEmacs C code?  

"We"?  No.  "They"?  Yes.  But I wouldn't hold my breath...

BTW, I wrote:             (mapcar 'match-string '(1 2 3 4 5 6 7 8 9))))))
which of course should be (mapcar 'match-string '[1 2 3 4 5 6 7 8 9])))))
which saves *several* C operations and chunks of memory:-)


Regards,

Hallvard


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

* Re: Is Username Expansion possible in GNUS?
  1996-06-18 15:57       ` Jack Vinson
@ 1996-06-25 17:11         ` Brian Edmonds
  0 siblings, 0 replies; 22+ messages in thread
From: Brian Edmonds @ 1996-06-25 17:11 UTC (permalink / raw)


>>>>> "Jack" == Jack Vinson <jvinson@cheux.ecs.umass.edu> writes:
>>>>> "HdG" == Hans de Graaff <J.J.deGraaff@twi.tudelft.nl> writes:

HdG> BTW, Jack, I noticed in gnus-bbdb.el that you mention that scoring
HdG> on people in BBDB doesn't work yet. Is this still true? Will it get
HdG> fixed?

Jack> I don't use that piece of the code, so I have no idea.

Hey, I wrote it, and even I don't use it.  I thought it was a good idea
at the time, but after playing with it a bit, I agree with Jack that
adaptive scoring and a few static scores seems to work just fine.  If
someone puts in the time to get it working though, I'll gladly roll the
patch into the distributed file.

When I get back from AnimeExpo, I'll probably get around to upgrading to
5.2 finally, and maybe I'll feel inspired to add more features then...

Brian.


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

end of thread, other threads:[~1996-06-25 17:11 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-13 21:47 Is Username Expansion possible in GNUS? Danny Siu
1996-06-14  0:32 ` Lars Magne Ingebrigtsen
1996-06-14 22:36   ` Danny Siu
1996-06-14 23:02     ` Eric Hendrickson
1996-06-15  1:44       ` Sudish Joseph
1996-06-15 19:06         ` Hallvard B Furuseth
1996-06-15  1:51       ` Lars Magne Ingebrigtsen
1996-06-16 21:27         ` Mark Eichin
1996-06-17  2:33           ` Lars Magne Ingebrigtsen
1996-06-17 18:21             ` Edward J. Sabol
1996-06-18  2:38               ` Sudish Joseph
1996-06-18 16:33                 ` Hallvard B Furuseth
1996-06-18 16:56                   ` Lars Magne Ingebrigtsen
1996-06-18 17:15                     ` Hallvard B Furuseth
1996-06-14 13:08 ` David Worenklein
1996-06-14 15:45 ` Kai Grossjohann
1996-06-17  5:30   ` Mark Breslauer
1996-06-17 14:23     ` BBDB and Gnus 5.2 Jack Vinson
1996-06-17 16:14     ` Is Username Expansion possible in GNUS? Kai Grossjohann
1996-06-18 14:55     ` Hans de Graaff
1996-06-18 15:57       ` Jack Vinson
1996-06-25 17:11         ` Brian Edmonds

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