Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Small change to message-tab to allow completion of mail aliases
       [not found] <t5x63svsvc4.fsf@notch.damtp.cam.ac.uk>
@ 2008-05-30 17:14 ` Reiner Steib
  2008-05-30 22:47   ` Dave Goldberg
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2008-05-30 17:14 UTC (permalink / raw)
  To: Stephen Eglen; +Cc: ding

On Fri, May 30 2008, Stephen Eglen wrote:

> Thanks for fixing the typo in message.el;  as I'm new to using GNUS
> (for reading/writing email, I've used it for news for ages), I just also
> found the following; is gnu.emacs.gnus a sensible place, or is the ding
> maillist more suitable?

The ding list (cc-ed) is more suitable.

(BTW, your message didn't appear on
<http://news.gmane.org/gmane.emacs.gnus.user> yet, which is feed from
the news2mail gateway gnu.emacs.gnus <-> info-gnus-english@gnu).

> From: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>   
> Subject: Small change to message-tab to allow completion of mail aliases
> Newsgroups: gnu.emacs.gnus
> Date: Thu, 29 May 2008 19:28:05 +0200
> Organization: University of Cambridge, England
> Message-ID: <t5x1w3lt3yy.fsf@notch.damtp.cam.ac.uk>
> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
>
> Would it be worth making the following small change to
> message-expand-name, so that TAB on a To: field will allow for
> completion of mail aliases, rather than just expansion of complete mail
> aliases.  All that has changed is expand-abbrev has been changed to
> mail-abbrev-complete-alias
>
> (e.g. if you have the alias "moderator", and no other alias starting
> "mo", then "mo TAB" would complete to moderator)

Does this change have any drawbacks?  I always use the bbdb code path,
so I'm not familiar with the current and proposed behavior.

> (defun message-expand-name ()
>   (cond ((and (memq 'eudc message-expand-name-databases)
> 		    (boundp 'eudc-protocol)
> 		    eudc-protocol)
> 	 (eudc-expand-inline))
> 	((and (memq 'bbdb message-expand-name-databases)
> 	      (fboundp 'bbdb-complete-name))
> 	 (bbdb-complete-name))
> 	(t
> 	 (mail-abbrev-complete-alias))))
>          ;;(expand-abbrev))))

BTW (for future suggestions): sending a unified diff is
encouraged.  Like this:

--- message.el	29 May 2008 20:10:06 +0200	7.263
+++ message.el	30 May 2008 19:02:56 +0200	
@@ -7651,7 +7651,7 @@
 	      (fboundp 'bbdb-complete-name))
 	 (bbdb-complete-name))
 	(t
-	 (expand-abbrev))))
+	 (mail-abbrev-complete-alias))))
 
 ;;; Help stuff.

Could you also provide a ChangeLog entry describing the change?

Bye, Reiner
-- 
PGP key available                               http://rsteib.home.pages.de/



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

* Re: Small change to message-tab to allow completion of mail aliases
  2008-05-30 17:14 ` Small change to message-tab to allow completion of mail aliases Reiner Steib
@ 2008-05-30 22:47   ` Dave Goldberg
  2008-05-31  9:17     ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Goldberg @ 2008-05-30 22:47 UTC (permalink / raw)
  To: ding; +Cc: Stephen Eglen

>>>>> On Fri, 30 May 2008 19:14:50 +0200, Reiner Steib <reinersteib+gmane@imap.cc> said:

> Does this change have any drawbacks?  I always use the bbdb code path,
> so I'm not familiar with the current and proposed behavior.

>> (defun message-expand-name ()
>> (cond ((and (memq 'eudc message-expand-name-databases)
>> (boundp 'eudc-protocol)
>> eudc-protocol)
>> (eudc-expand-inline))
>> ((and (memq 'bbdb message-expand-name-databases)
>> (fboundp 'bbdb-complete-name))
>> (bbdb-complete-name))
>> (t
>> (mail-abbrev-complete-alias))))
>> ;;(expand-abbrev))))

Unless my packages are out of date (entirely possible), mail-abbrev-complete-alias is not available in XEmacs 21.4.21.

-- 
Dave Goldberg
david.goldberg6@verizon.net



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

* Re: Small change to message-tab to allow completion of mail aliases
  2008-05-30 22:47   ` Dave Goldberg
@ 2008-05-31  9:17     ` Reiner Steib
  2008-05-31 16:19       ` Dave Goldberg
  2008-06-02 18:29       ` Stephen Eglen
  0 siblings, 2 replies; 5+ messages in thread
From: Reiner Steib @ 2008-05-31  9:17 UTC (permalink / raw)
  To: Dave Goldberg; +Cc: ding, Stephen Eglen

On Sat, May 31 2008, Dave Goldberg wrote:

>>>>>> On Fri, 30 May 2008 19:14:50 +0200, Reiner Steib <reinersteib+gmane@imap.cc> said:
>
>> Does this change have any drawbacks?  I always use the bbdb code path,
>> so I'm not familiar with the current and proposed behavior.

We need to update message.texi (info "(message)Mail Aliases") as
well.  Stephen, could you provide a patch, please?

>>> (defun message-expand-name ()
[...]
>>> (t
>>> (mail-abbrev-complete-alias))))
>>> ;;(expand-abbrev))))
>
> Unless my packages are out of date (entirely possible),
> mail-abbrev-complete-alias is not available in XEmacs 21.4.21.

If it's not available in the current packages, you can ask the XEmacs
package maintainer to update it (in Emacs it is in
`mail/mailabbrev.el').

But we can use test if it is available so that it still works with
(your) current XEmacs:

--- message.el	29 May 2008 20:10:06 +0200	7.263
+++ message.el	31 May 2008 11:04:08 +0200	
@@ -7650,6 +7650,9 @@
 	((and (memq 'bbdb message-expand-name-databases)
 	      (fboundp 'bbdb-complete-name))
 	 (bbdb-complete-name))
+	((fboundp 'mail-abbrev-complete-alias)
+	 ;; Complete partial mail aliases as well.  (Not available in XEmacs?)
+	 (mail-abbrev-complete-alias))
 	(t
 	 (expand-abbrev))))

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: Small change to message-tab to allow completion of mail aliases
  2008-05-31  9:17     ` Reiner Steib
@ 2008-05-31 16:19       ` Dave Goldberg
  2008-06-02 18:29       ` Stephen Eglen
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Goldberg @ 2008-05-31 16:19 UTC (permalink / raw)
  To: ding; +Cc: Stephen Eglen

>>>>> On Sat, 31 May 2008 11:17:56 +0200, Reiner Steib <reinersteib+gmane@imap.cc> said:

> If it's not available in the current packages, you can ask the XEmacs
> package maintainer to update it (in Emacs it is in
> `mail/mailabbrev.el').

Unfortunately the mailabbrev (Emacs) vs mail-abbrev (XEmacs) has yet to be resolved.  A quick google search for mailabbrev and xemacs shows quite a bit of conversation on it, including some of my own very old messages on the bbdb list.  I guess the best way around is to test for the existence of the function.

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



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

* Re: Small change to message-tab to allow completion of mail aliases
  2008-05-31  9:17     ` Reiner Steib
  2008-05-31 16:19       ` Dave Goldberg
@ 2008-06-02 18:29       ` Stephen Eglen
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Eglen @ 2008-06-02 18:29 UTC (permalink / raw)
  To: Dave Goldberg; +Cc: ding, Stephen Eglen


> We need to update message.texi (info "(message)Mail Aliases") as
> well.  Stephen, could you provide a patch, please?

sure -- attached.  Sorry for delay; it only handles the Emacs case, I'm
sorry that I can't help with XEmacs, but it looks like only mailabbrev
is supported anyway currently within GNUS.

*** /tmp/ediff8624LpA	Mon Jun  2 19:26:51 2008
--- /data/notch/PUBLIC/sje30/NOBACKUP/compiles/emacs/doc/misc/message.texi	Mon Jun  2 19:26:28 2008
***************
*** 1273,1279 ****
  
  After adding lines like this to your @file{~/.mailrc} file, you should
  be able to just write @samp{lmi} in the @code{To} or @code{Cc} (and so
! on) headers and press @kbd{SPC} to expand the alias.
  
  No expansion will be performed upon sending of the message---all
  expansions have to be done explicitly.
--- 1273,1281 ----
  
  After adding lines like this to your @file{~/.mailrc} file, you should
  be able to just write @samp{lmi} in the @code{To} or @code{Cc} (and so
! on) headers and press @kbd{SPC} to expand the alias.  Completion of mail
! aliases is also available, so if @samp{lmi} is the only alias beginning
! with l, then typing @samp{l} followed by @kbd{TAB} will expand the alias.
  
  No expansion will be performed upon sending of the message---all
  expansions have to be done explicitly.



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

end of thread, other threads:[~2008-06-02 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <t5x63svsvc4.fsf@notch.damtp.cam.ac.uk>
2008-05-30 17:14 ` Small change to message-tab to allow completion of mail aliases Reiner Steib
2008-05-30 22:47   ` Dave Goldberg
2008-05-31  9:17     ` Reiner Steib
2008-05-31 16:19       ` Dave Goldberg
2008-06-02 18:29       ` Stephen Eglen

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