From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?B?UGF3ZcWC?= Ostrowski Newsgroups: gmane.emacs.bugs Subject: patch: fix read-abbrev-file cant read files produced by write-abbrev-file Date: Thu, 15 Nov 2007 15:46:39 +0100 Message-ID: <20071115144639.GA22309@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cWoXeonUoKmBZSoM" X-Trace: ger.gmane.org 1195138028 19813 80.91.229.12 (15 Nov 2007 14:47:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 14:47:08 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 15 15:47:13 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Isfzj-0002PL-QB for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2007 15:47:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsfzW-0005gI-UA for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2007 09:46:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsfzQ-0005gC-8a for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:46:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsfzO-0005g0-RP for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:46:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsfzO-0005fx-Mz for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:46:42 -0500 Original-Received: from ehh58.internetdsl.tpnet.pl ([83.15.37.58] helo=srv.tls.pl) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IsfzN-0000oy-QO for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:46:42 -0500 Original-Received: from localhost.localdomain (srv.tls.pl [127.0.0.1]) by srv.tls.pl (8.12.11/8.12.11) with SMTP id lAFEmKL4032621; Thu, 15 Nov 2007 15:48:21 +0100 Original-Received: (nullmailer pid 22392 invoked by uid 1000); Thu, 15 Nov 2007 14:46:39 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16985 Archived-At: --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by srv.tls.pl id lAFEmKL4032621 Hello, Emacs version: latest CVS, GNU Emacs 23.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2007-11-14 on paszaibm Configured with: --prefix=3D/home/pasza/tmp/emacs_cvs Source modifications: no modifications at all Bug description: read-abbrev-file has problems reading file written with write-abbrev-file. I get the following message: "define-abbrev: Wrong type argument: stringp, po" ..and the following backtrace: Debugger entered--Lisp error: (wrong-type-argument stringp po) intern(po [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0= 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]) define-abbrev([ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0= 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] po "Pawe\x51062 Ostrowski= " nil 1) apply(define-abbrev [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0= 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] (po "Pawe\x51062 Os= trowski" nil 1)) define-abbrev-table(global-abbrev-table ((po "Pawe\x51062 Ostrowski" ni= l 1))) eval-buffer(# nil "/home/pasza/.abbrevs" nil t) ; Read= ing at buffer position 408 load-with-code-conversion("/home/pasza/.abbrevs" "/home/pasza/.abbrevs"= nil nil) load("~/.abbrevs" nil nil) read-abbrev-file("~/.abbrevs") call-interactively(read-abbrev-file) execute-extended-command(nil) call-interactively(execute-extended-command) Indeed abbrev names in files produced by write-abbrev-file miss surrounding quotes, e.g.: (define-abbrev-table 'global-abbrev-table '( (po "My Expansion".. ^^ Abbrevs stored in the file are not loaded. Bug may be easily reproduced: define an abbrev, write-abbrev-file, read-abbrev-file. Fix description: I added (symbol-name) around abbrev symbol in abbrev.el (abbrev--write). Now files produced by write-abbrev-file look like they used to in old emacs (my is 21.4.1) and load without problems. --=20 Pawe=C5=82 Ostrowski pasza at zodiac mimuw edu pl --cWoXeonUoKmBZSoM Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="abbrevs.patch" Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.12211 diff -u -p -c -r1.12211 ChangeLog *** lisp/ChangeLog 15 Nov 2007 06:04:31 -0000 1.12211 --- lisp/ChangeLog 15 Nov 2007 10:35:10 -0000 *************** *** 1,3 **** --- 1,7 ---- + 2007-11-15 + + * abbrev.el (abbrev--write): use (symbol-name) to write abbrev name. + 2007-11-15 Jay Belanger * calc/calc-menu.el: New file. Index: lisp/abbrev.el =================================================================== RCS file: /sources/emacs/emacs/lisp/abbrev.el,v retrieving revision 1.62 diff -u -p -c -r1.62 abbrev.el *** lisp/abbrev.el 9 Nov 2007 16:07:17 -0000 1.62 --- lisp/abbrev.el 15 Nov 2007 10:35:11 -0000 *************** Only writes the non-system abbrevs. *** 825,831 **** Presumes that `standard-output' points to `current-buffer'." (unless (or (null (symbol-value sym)) (abbrev-get sym :system)) (insert " (") ! (prin1 sym) (insert " ") (prin1 (symbol-value sym)) (insert " ") --- 825,831 ---- Presumes that `standard-output' points to `current-buffer'." (unless (or (null (symbol-value sym)) (abbrev-get sym :system)) (insert " (") ! (prin1 (symbol-name sym)) (insert " ") (prin1 (symbol-value sym)) (insert " ") --cWoXeonUoKmBZSoM--