From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: mailabbrev fix from Jan 2005 now broken in latest CVS Date: Sun, 12 Aug 2007 20:52:18 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1186966157 14889 80.91.229.12 (13 Aug 2007 00:49:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2007 00:49:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 13 02:49:15 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IKO7O-0003Xg-Vo for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2007 02:49:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IKO7O-0005DA-JT for ged-emacs-devel@m.gmane.org; Sun, 12 Aug 2007 20:49:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IKO78-0004uQ-RF for emacs-devel@gnu.org; Sun, 12 Aug 2007 20:48:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IKO78-0004th-CG for emacs-devel@gnu.org; Sun, 12 Aug 2007 20:48:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IKO78-0004tZ-0C for emacs-devel@gnu.org; Sun, 12 Aug 2007 20:48:58 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IKO77-0003uI-D2 for emacs-devel@gnu.org; Sun, 12 Aug 2007 20:48:57 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IKOAM-0000L9-JT; Sun, 12 Aug 2007 20:52:18 -0400 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76414 Archived-At: Would someone please fix this, then ack? To: emacs-devel@gnu.org From: John Owens Date: Wed, 1 Aug 2007 18:22:26 +0000 (UTC) Lines: 82 Message-ID: References: Subject: Re: mailabbrev fix from Jan 2005 now broken in latest CVS Richard Stallman 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