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 12:06:42 +0100 Message-ID: <20071115110642.GA20386@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" X-Trace: ger.gmane.org 1195145366 16769 80.91.229.12 (15 Nov 2007 16:49:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 16:49:26 +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 17:49:32 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 1Ishu4-0007FQ-Pq for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2007 17:49:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ishtn-0001G7-PU for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2007 11:49:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsfUW-00029j-LF for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:14:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsfUS-0001zv-Lo for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:14:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsfUS-0001zV-Ac for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:14:44 -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 1IsfUR-0000Hm-9T for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2007 09:14:43 -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 lAFEGLg9030070 for ; Thu, 15 Nov 2007 15:16:22 +0100 Original-Received: (nullmailer pid 22014 invoked by uid 1000); Thu, 15 Nov 2007 14:14:40 -0000 Resent-From: pasza@srv.tls.pl Resent-Date: Thu, 15 Nov 2007 15:14:40 +0100 Resent-Message-ID: <20071115141440.GA21949@localhost.localdomain> Resent-To: bug-gnu-emacs@gnu.org Original-Received: from students.mimuw.edu.pl [193.0.96.129] by localhost with POP3 (fetchmail-6.3.6) for (single-drop); Thu, 15 Nov 2007 12:09:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1] ident=NO-USER) by rainbow.mimuw.edu.pl (Postfix) with ESMTP id 0C25E80009D for ; Thu, 15 Nov 2007 12:07:00 +0100 (CET) X-Virus-Scanned: amavisd-new at mimuw.edu.pl Original-Received: from rainbow.mimuw.edu.pl ([127.0.0.1]) by localhost (rainbow.mimuw.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7A09Fmp-8EcK for ; Thu, 15 Nov 2007 12:06:48 +0100 (CET) X-Students-Not-Authenticated: sender was not authenticated at students.mimuw.edu.pl Original-Received: from srv.tls.pl (ehh58.internetdsl.tpnet.pl [83.15.37.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rainbow.mimuw.edu.pl (Postfix) with ESMTP for ; Thu, 15 Nov 2007 12:06:48 +0100 (CET) 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 lAFB8OGU015642; Thu, 15 Nov 2007 12:08:24 +0100 Original-Received: (nullmailer pid 20506 invoked by uid 1000); Thu, 15 Nov 2007 11:06:42 -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) Resent-Date: Thu, 15 Nov 2007 09:14:48 -0500 X-Mailman-Approved-At: Thu, 15 Nov 2007 11:48:12 -0500 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:16986 Archived-At: --YZ5djTAD1cGYuMQK 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 lAFEGLg9030070 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 --YZ5djTAD1cGYuMQK 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 " ") --YZ5djTAD1cGYuMQK--