From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Error text-read-only in shell-command Date: Thu, 13 Jan 2011 08:47:38 +0100 Message-ID: <87r5chz1lx.fsf@member.fsf.org> References: <87ei8iqyvs.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294904873 7267 80.91.229.12 (13 Jan 2011 07:47:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Jan 2011 07:47:53 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 13 08:47:48 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PdHuO-00052E-L6 for ged-emacs-devel@m.gmane.org; Thu, 13 Jan 2011 08:47:48 +0100 Original-Received: from localhost ([127.0.0.1]:42706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdHuO-0006GF-1p for ged-emacs-devel@m.gmane.org; Thu, 13 Jan 2011 02:47:48 -0500 Original-Received: from [140.186.70.92] (port=46538 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdHuJ-0006G0-0s for Emacs-devel@gnu.org; Thu, 13 Jan 2011 02:47:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdHuH-0004b7-Hm for Emacs-devel@gnu.org; Thu, 13 Jan 2011 02:47:42 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:12536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdHuH-0004am-9e for Emacs-devel@gnu.org; Thu, 13 Jan 2011 02:47:41 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id E25C278017A7 for ; Thu, 13 Jan 2011 08:47:39 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22205-02 for ; Thu, 13 Jan 2011 08:47:39 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 2E40F78017A2 for ; Thu, 13 Jan 2011 08:47:39 +0100 (CET) In-Reply-To: <87ei8iqyvs.fsf@member.fsf.org> (Tassilo Horn's message of "Wed, 12 Jan 2011 10:01:27 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134483 Archived-At: Tassilo Horn writes: Hi again, > I've just dired and opened acroread using & on a pdf file to fill out > some forms. After closing that, I wanted to open another file with an > external app using &. But then I got an text-read-only error. > > I've tracked it down to the call to `erase-buffer' in `shell-command'. > That fails, because although buffer-read-only is set to nil explicitly, > parts of the output acroread produced in *Async Shell Command Output* > has the read-only text property set to 'fence (whatever that means). > (The linebreaks have that property...) Hm, acroread is not the only app raising that issue. In fact, it seems to happen with any GTK app I use (OO.org or GIMP). Those issue some GTK theme warning on startup --8<---------------cut here---------------start------------->8--- /usr/share/themes/MurrinaAquaIsh/gtk-2.0/gtkrc:50: Murrine configuration option "scrollbar_color" is no longer supported and will be ignored. /usr/share/themes/MurrinaAquaIsh/gtk-2.0/gtkrc:50: Murrine configuration option "scrollbar_color" is no longer supported and will be ignored. --8<---------------cut here---------------end--------------->8--- and the last char of both lines has the read-only display property set to fence in *Async Shell Command*. So if nobody objects, I'll commit that patch later today. Bye, Tassilo > The following patch fixes the issue. Ok to commit? > > === modified file 'lisp/simple.el' > --- lisp/simple.el 2011-01-02 20:28:40 +0000 > +++ lisp/simple.el 2011-01-12 08:53:08 +0000 > @@ -2341,7 +2341,10 @@ > (error "Shell command in progress"))) > (with-current-buffer buffer > (setq buffer-read-only nil) > - (erase-buffer) > + ;; Setting buffer-read-only to nil doesn't help for > + ;; characters with read-only text property. > + (let ((inhibit-read-only t)) > + (erase-buffer)) > (display-buffer buffer) > (setq default-directory directory) > (setq proc (start-process "Shell" buffer shell-file-name