tags 28700 = patch quit Live System User writes: >> Thanks, my guess is you have some string with a read-only property in >> eshell history (probably introduced by copying from another buffer), and >> this is tripping up eshell-write-history. >> >> Can you post the result of >> >> M-x pp-eval-expression RET eshell-history-ring RET >> >> If my guess is correct there should be some strings of the form >> >> #("some command" 0 11 (read-only t)) > > Yes. So how do I deal wi'th? > #("~/" 0 1 > (rear-nonsticky > (arg-begin arg-end) > read-only t arg-begin t) > 1 2 > (rear-nonsticky > (arg-end arg-begin) > read-only t arg-end t)) Ah, there we are. I can't quite work out exactly how you managed to get such a string, but stripping properties in eshell-write-history should take care of it regardless. If you evaluate the following defun in your emacs session, it should be able to exit: (defun eshell-write-history (&optional filename append) "Writes the buffer's `eshell-history-ring' to a history file. The name of the file is given by the variable `eshell-history-file-name'. The original contents of the file are lost if `eshell-history-ring' is not empty. If `eshell-history-file-name' is nil this function does nothing. Useful within process sentinels. See also `eshell-read-history'." (let ((file (or filename eshell-history-file-name))) (cond ((or (null file) (equal file "") (null eshell-history-ring) (ring-empty-p eshell-history-ring)) nil) ((not (file-writable-p file)) (message "Cannot write history file %s" file)) (t (let* ((ring eshell-history-ring) (index (ring-length ring))) ;; Write it all out into a buffer first. Much faster, but ;; messier, than writing it one line at a time. (with-temp-buffer (while (> index 0) (setq index (1- index)) (let ((start (point))) ;; Remove properties before inserting, to avoid trouble ;; with read-only strings (Bug#28700). (insert (substring-no-properties (ring-ref ring index)) ?\n) (subst-char-in-region start (1- (point)) ?\n ?\177))) (eshell-with-private-file-modes (write-region (point-min) (point-max) file append 'no-message)))))))) Here's the corresponding patch: