Newsgroups: comp.emacs
Path: utzoo!utgpu!cunews!bnrgate!bwdls61!bwdls49!jsparkes
From: jsparkes@bwdls49.bnr.ca (Jeff Sparkes)
Subject: Re: mail aliases
Message-ID: <jsparkes.671304305@bwdls49>
Sender: usenet@bwdls61.bnr.ca (Use Net)
Organization: Bell-Northern Research, Ottawa, Canada
References: <786@mlfarm.com> <BREEN.91Apr8174702@skyler.arc.ab.ca>
Date: 10 Apr 91 17:25:05 GMT

In <BREEN.91Apr8174702@skyler.arc.ab.ca> breen@skyler.arc.ab.ca (Breen Liblong) writes:

>I would also like to know of any attempts to make mailalias.el
>handle aliases with full names.  I'm hacking something together
>right now to make it work, but I'd appreciate anyone's elisp code
>where some thought has gone into making it work right.

>I suspect many others out there are suffering from the same lack of
>functionality.  Please post all reasonable attempts to me, in addition
>to ron and/or the net.

Well, here's quick hack to use only commas as separators, not white space.
It helps, but is far from a good solution....

*** /usr/gnu/lib/emacs/lisp/mailalias.el	Wed Jan  9 17:01:44 1991
--- mailalias.el	Mon Apr  1 17:28:24 1991
***************
*** 109,115 ****
  		     (re-search-forward "^g\\(roup\\|\\)[ \t]+" nil t))
  	    (re-search-forward "[^ \t]+")
  	    (let* ((name (buffer-substring (match-beginning 0) (match-end 0)))
! 		   (start (progn (skip-chars-forward " \t") (point))))
  	      (end-of-line)
  	      (define-mail-alias
  		name
--- 109,115 ----
  		     (re-search-forward "^g\\(roup\\|\\)[ \t]+" nil t))
  	    (re-search-forward "[^ \t]+")
  	    (let* ((name (buffer-substring (match-beginning 0) (match-end 0)))
! 		   (start (progn (skip-chars-forward ",") (point))))
  	      (end-of-line)
  	      (define-mail-alias
  		name
***************
*** 132,138 ****
    (let (tem)
      ;; ~/.mailrc contains addresses separated by spaces.
      ;; mailers should expect addresses separated by commas.
!     (while (setq tem (string-match "[^ \t,][ \t,]+" definition tem))
        (if (= (match-end 0) (length definition))
  	  (setq definition (substring definition 0 (1+ tem)))
  	(setq definition (concat (substring definition
--- 132,138 ----
    (let (tem)
      ;; ~/.mailrc contains addresses separated by spaces.
      ;; mailers should expect addresses separated by commas.
!     (while (setq tem (string-match "[^,][,]+" definition tem))
        (if (= (match-end 0) (length definition))
  	  (setq definition (substring definition 0 (1+ tem)))
  	(setq definition (concat (substring definition
--
Jeff Sparkes jsparkes@bnr.ca	Bell-Northern Research, Ottawa (613)765-2503
Never trust a psychic who hasn't won the lottery.  Twice.
