unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mailabbrev fix from Jan 2005 now broken in latest CVS
@ 2007-07-31  3:46 John Owens
  2007-08-01  5:39 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: John Owens @ 2007-07-31  3:46 UTC (permalink / raw)
  To: emacs-devel

Greetings, I use the "wanderlust" mailer in emacs and asked for some
changes in January 2005 in "mailabbrev" to support auto-completion.
When I type an alias, if that alias has a '-' in it, it autocompleted
when the - is typed. The fix corrected this problem. Now the 
problem has returned.

Here was the original fix:

http://thread.gmane.org/gmane.emacs.devel/31657

(That actually fixed the problem of typing a '@' causing an autocomplete
so if you had an alias 'mark' and typed 'mark@foo.com', it would
autocomplete your 'mark' alias when you typed the '@'. But as I recall,
there was a '-' completion problem as well.)

It appears that revision 1.75 fixed this:

http://cvs.savannah.gnu.org/viewvc/emacs/lisp/mail/mailabbrev.el?revision=1.75&root=emacs&view=markup

(sendmail-pre-abbrev-expand-hook):
Don't expand if the character is @, period, dash, etc.

The only major change between now and then was rms's 1.82.2.1 / 1.83
change, and I'm suspecting that caused it. I confirmed that this
is the case by installing the previous version (the one right
before the 1.82.2.1 / 1.83 fix) 1.68.2.10, which does not exhibit
the problem. 

I can reproduce by calling compose-mail and typing an alias to be
expanded that has a '-' in it - it currently expands when the '-' 
is typed even if the alias continues after the '-' ('mark-h' for
instance).

JDO

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: mailabbrev fix from Jan 2005 now broken in latest CVS
@ 2007-08-13  0:52 Richard Stallman
  2007-08-15  2:07 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2007-08-13  0:52 UTC (permalink / raw)
  To: emacs-devel

Would someone please fix this, then ack?

To: emacs-devel@gnu.org
From: John Owens <john_owens@yahoo.com>
Date: Wed, 1 Aug 2007 18:22:26 +0000 (UTC)
Lines: 82
Message-ID: <loom.20070801T202014-229@post.gmane.org>
References: <loom.20070731T053637-971@post.gmane.org>
	<E1IG6vT-0005Si-TM@fencepost.gnu.org>
Subject: Re: mailabbrev fix from Jan 2005 now broken in latest CVS

Richard Stallman <rms <at> gnu.org> writes:
> 
> Could you please send me a *precise* test case for this bug?  The test
> case should start with `emacs -q', so that your .emacs file does not
> affect it, and it should show exactly what text to put in the buffer,
> what commands to execute, and how and where to click.  Also please say
> exactly what incorrect results you get.

Thanks for your reply, and your detailed description of what you need
to take a closer look. Here are the steps I use to reproduce the
problem. There is probably a much more efficient way for me to do the
init than what I've done (having to set the load-path and manually add
the paths to the load-library calls seems kludgey), so please clue me
in.

I am using Carbon Emacs on OS X, though my best guess is that this
problem would also be present on other platforms.

GNU Emacs 22.1.1 (i386-apple-darwin8.9.1, Carbon Version 1.6.0) of
2007-06-16 on localhost

It uses what appears to be the latest cvs mailabbrev (the changes in
1.82.2.1 / 1.83) and almost certainly uses a mid-June drop of emacs
from cvs.

First, I defined the following file, ~/test-mailabbrev.el.

======

;;; begin test-mailabbrev.el

(setq load-path 
      '("/Applications/Emacs.app/Contents/Resources/lisp"
	"/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp"
	"/Applications/Emacs.app/Contents/Resources/lisp/mail"))

;; load compose-mail
(load-library 
 "/Applications/Emacs.app/Contents/Resources/lisp/simple.el")

;; load mailabbrev
(load-library
 "/Applications/Emacs.app/Contents/Resources/lisp/mail/mailabbrev.el")

(define-mail-abbrev "rms" "rms@gnu.org")
(define-mail-abbrev "rms-other" "rms@other.org")
(add-hook 'mail-mode-hook 'mail-abbrevs-setup)

;;; end test-mailabbrev.el

======

Then I reproduce using the following sequence:

======

/* launch emacs with -q */
$ /Applications/Emacs.app/Contents/MacOS/bin/emacs -q    

/* within emacs, type everything before the ;; */
M-x load-library ~/test-mailabbrev.el
M-x compose-mail  ;; this places point after "To: " 
rms,        ;; this properly expands "rms" to "rms@gnu.org"
            ;; "To" line is now "To: rms@gnu.org,"
rms-        ;; this should NOT expand the rms alias but does
            ;; I would like to finish the alias "rms-" to "rms-other"
            ;; "To" line is now "To: rms@gnu.org,rms@gnu.org-"
            ;; Desired "To" line is "To: rms@gnu.org,rms-"
            ;; with an unexpanded "rms-"

======

If I use the previous 1.68.2.10 version of mailabbrev (load it instead
of the one in cvs), the problem does not appear. Instead it does NOT
expand rms- with rms's alias and waits until the end of the alias (a
comma or a space) to expand rms-other. 

One-sentence summary: The character '-' should not cause an alias
expansion via mailabbrev.

JDO

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

end of thread, other threads:[~2007-08-15  3:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31  3:46 mailabbrev fix from Jan 2005 now broken in latest CVS John Owens
2007-08-01  5:39 ` Richard Stallman
2007-08-01 18:22   ` John Owens
  -- strict thread matches above, loose matches on Subject: below --
2007-08-13  0:52 Richard Stallman
2007-08-15  2:07 ` Glenn Morris
2007-08-15  3:35   ` John Owens

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).