Subject: bug#28700: 25.2; Cannot kill Eshell buffer

From: Live System User <[email-masked]>
Date: Sun, 15 Oct 2017 18:02:54 -0400

Noam Postavsky <[email-masked]> writes:

> Live System User <[email-masked]> writes:
>
>>       Here is some GDB info.
>
>> (gdb) bt
>> #0  text_read_only (propval=propval@entry=XIL(0xb010))
>>     at ../../src/textprop.c:71
>
>> Lisp Backtrace:
>> "eshell-write-history" (0x5642bf38)
>> "run-hooks" (0x5642c020)
>> "eshell-kill-buffer-function" (0x5642c200)
>> "kill-buffer" (0x5642c400)
>> "funcall-interactively" (0x5642c3f8)
>> "call-interactively" (0x5642c660)
>> "command-execute" (0x5642c808)
>
> 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?

      Thanks.

(6 128 .
   [#("ssh localhost ps -efw | grep ssh" 0 1
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      3 4
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      4 5
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      13 14
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      14 15
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      16 17
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      17 18
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      21 22
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      22 23
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      23 24
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      24 25
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      28 29
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      29 30
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      31 32
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t))
    #("ssh localhost ps -efw | grep ssh" 0 1
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      3 4
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      4 5
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      13 14
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      14 15
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      16 17
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      17 18
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      21 22
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      22 23
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      23 24
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      24 25
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      28 29
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      29 30
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      31 32
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t))
    #("ssh localhost ps" 0 1
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      3 4
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      4 5
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      13 14
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      14 15
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      15 16
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t))
    #("ssh localhost " 0 1
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      3 4
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      4 5
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      13 14
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t))
    #("~/" 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))
    #("  env | grep TERM" 2 3
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      5 6
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      6 7
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      7 8
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      8 9
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      12 13
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t)
      13 14
      (rear-nonsticky
       (arg-begin arg-end)
       arg-begin t)
      16 17
      (rear-nonsticky
       (arg-end arg-begin)
       arg-end t))
    "ssh locallhost" "Error: Failed to execute child process \"$SHELL\"
   (No such file or directory)" "ssh locallhost" "ssh locallhost"

[...]