summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-07-02 21:15:42 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-07-02 21:16:44 +0200
commit20a68166d0c05a18932bc784da5fe060fd3f32ae (patch)
treea872db1c4294d4e6a6e14675ba4bdc8b800af927
parent82e47962fc16c037b8b7c6864dfee3a0eedaf183 (diff)
downloadgeiser-chez-20a68166d0c05a18932bc784da5fe060fd3f32ae.tar.gz
geiser-chez-20a68166d0c05a18932bc784da5fe060fd3f32ae.tar.bz2
Real solution for the non-ascii-history problem
We were using a history entry separator including \0 that wasn't writeable as an utf-8 file. Changing the separator to \n}{\n allows using UTF-8 characters in the REPL which are correctly read back.
-rw-r--r--NEWS2
-rw-r--r--elisp/geiser-repl.el6
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 03cedd1..a97af0a 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@
Bug fixes:
- Autodoc for Guile 2.0.9+'s subr fixed, thanks to Ludovic Courtès.
+ - Fixed problem when saving REPL history that contained non-ASCII
+ chars: all UTF-8 characters should be fair game now.
- Fixed problems with geiser-doc's history being handled by
session.el (by not letting the latter handle it).
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 324f93a..f0c495e 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -404,7 +404,7 @@ module command as a string")
;;; REPL history
-(defconst geiser-repl--history-separator "\n\0\n")
+(defconst geiser-repl--history-separator "\n}{\n")
(defsubst geiser-repl--history-file ()
(format "%s.%s" geiser-repl-history-filename geiser-impl--implementation))
@@ -412,13 +412,13 @@ module command as a string")
(defun geiser-repl--read-input-ring ()
(let ((comint-input-ring-file-name (geiser-repl--history-file))
(comint-input-ring-separator geiser-repl--history-separator)
- (buffer-file-coding-system 'raw-text))
+ (buffer-file-coding-system 'utf-8))
(comint-read-input-ring t)))
(defun geiser-repl--write-input-ring ()
(let ((comint-input-ring-file-name (geiser-repl--history-file))
(comint-input-ring-separator geiser-repl--history-separator)
- (buffer-file-coding-system 'raw-text))
+ (buffer-file-coding-system 'utf-8))
(comint-write-input-ring)))
(defun geiser-repl--history-setup ()