* patch: fix read-abbrev-file cant read files produced by write-abbrev-file
@ 2007-11-15 11:06 Paweł Ostrowski
0 siblings, 0 replies; 2+ messages in thread
From: Paweł Ostrowski @ 2007-11-15 11:06 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]
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=/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 Ostrowski" nil 1))
define-abbrev-table(global-abbrev-table ((po "Pawe\x51062 Ostrowski" nil 1)))
eval-buffer(#<buffer *load*> nil "/home/pasza/.abbrevs" nil t) ; Reading 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.
--
Paweł Ostrowski
pasza at zodiac mimuw edu pl
[-- Attachment #2: abbrevs.patch --]
[-- Type: text/x-diff, Size: 1433 bytes --]
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 <pawel.ostrowski@gmail.com>
+
+ * abbrev.el (abbrev--write): use (symbol-name) to write abbrev name.
+
2007-11-15 Jay Belanger <jay.p.belanger@gmail.com>
* 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 " ")
^ permalink raw reply [flat|nested] 2+ messages in thread
* patch: fix read-abbrev-file cant read files produced by write-abbrev-file
@ 2007-11-15 14:46 Paweł Ostrowski
0 siblings, 0 replies; 2+ messages in thread
From: Paweł Ostrowski @ 2007-11-15 14:46 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]
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=/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 Ostrowski" nil 1))
define-abbrev-table(global-abbrev-table ((po "Pawe\x51062 Ostrowski" nil 1)))
eval-buffer(#<buffer *load*> nil "/home/pasza/.abbrevs" nil t) ; Reading 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.
--
Paweł Ostrowski
pasza at zodiac mimuw edu pl
[-- Attachment #2: abbrevs.patch --]
[-- Type: text/x-diff, Size: 1433 bytes --]
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 <pawel.ostrowski@gmail.com>
+
+ * abbrev.el (abbrev--write): use (symbol-name) to write abbrev name.
+
2007-11-15 Jay Belanger <jay.p.belanger@gmail.com>
* 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 " ")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-15 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 11:06 patch: fix read-abbrev-file cant read files produced by write-abbrev-file Paweł Ostrowski
-- strict thread matches above, loose matches on Subject: below --
2007-11-15 14:46 Paweł Ostrowski
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).