Subject: bug#12838: closed (Re: bug#12838: pcomplete on a path with ~ in eshell fails with "Text is read-only")

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 19 Nov 2012 19:25:02 +0000

Your bug report

#12838: pcomplete on a path with ~ in eshell fails with "Text is read-only"

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
12838: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12838
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#12838: pcomplete on a path with ~ in eshell fails with "Text is read-only"
From: Stefan Monnier <[email-masked]>
To: Glenn Morris <[email-masked]>
Cc: [email-masked], Tuomas Kuismin <[email-masked]>
Date: Mon, 19 Nov 2012 14:22:58 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

> I installed a workaround in emacs-24 for eshell.
> Hopefully someone will fix it properly at some point.

Thanks.  The completion-at-point version of pcomplete works here, so
I installed a different workaround, and the "fix it properly" will be to
move to completion-at-point.

        Stefan

Subject: pcomplete on a path with ~ in eshell fails with "Text is read-only"
From: Tuomas Kuismin <[email-masked]>
To: [email-masked]
Date: Thu, 08 Nov 2012 11:44:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Package: Emacs
Version: 24.2

Reproducing:
+ Start emacs with "emacs -Q"
+ Start eshell with M-x eshell
+ Ignore case in eshell completion with M-x set-variable -> eshell-cmpl-ignore-case -> t
+ Exit eshell with the command "exit"
+ Restart eshell with M-x eshell
+ Create a file in your home directory with the command "touch ~/foo"
+ Try to complete said file (in eshell) by typing "cat ~/f" and pressing TAB

Result: No completion is done, message "Text is read-only" appears.
Expected result: "cat ~/foo" appears on screen.

Workaround: Add the following to your init file:
(add-hook 'eshell-mode-hook (lambda () (setq pcomplete-expand-before-complete t)))
This results in the ~ being expanded (removed) from the path before completing, thus circumventing the issue.

To my knowledge, this bug exists on Linux and Mac, Emacs 24.2 and the repository.