unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Emacs-devel@gnu.org
Subject: Re: Error text-read-only in shell-command
Date: Thu, 13 Jan 2011 08:47:38 +0100	[thread overview]
Message-ID: <87r5chz1lx.fsf@member.fsf.org> (raw)
In-Reply-To: <87ei8iqyvs.fsf@member.fsf.org> (Tassilo Horn's message of "Wed,  12 Jan 2011 10:01:27 +0100")

Tassilo Horn <tassilo@member.fsf.org> 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



      reply	other threads:[~2011-01-13  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12  9:01 Error text-read-only in shell-command Tassilo Horn
2011-01-13  7:47 ` Tassilo Horn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5chz1lx.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --cc=Emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).