From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Wolfgang Jeltsch Newsgroups: gmane.emacs.help Subject: editing MathML parts with Amaya Date: Sat, 22 Jan 2005 19:59:16 +0100 Message-ID: <200501221959.17518.wolfgang@jeltsch.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1106421562 25048 80.91.229.6 (22 Jan 2005 19:19:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Jan 2005 19:19:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 22 20:19:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CsQmy-0001Qw-00 for ; Sat, 22 Jan 2005 20:19:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CsQz5-0003oR-L2 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Jan 2005 14:31:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CsQy5-0003a4-Jf for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 14:30:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CsQxx-0003XR-3T for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 14:30:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CsQxw-0003PG-TP for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 14:30:36 -0500 Original-Received: from [212.227.126.184] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CsQSs-00087h-U6 for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 13:58:31 -0500 Original-Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CsQSr-0001NF-00 for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 19:58:29 +0100 Original-Received: from [217.87.2.192] (helo=pD95702C0.dip0.t-ipconnect.de) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CsQSq-0000Ic-00 for help-gnu-emacs@gnu.org; Sat, 22 Jan 2005 19:58:29 +0100 Original-To: GNU Emacs Help ML User-Agent: KMail/1.7.2 Content-Disposition: inline X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:979f6495558c984fd6b37bf5c2591014 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23541 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23541 Hello, I'm thinking about editing DocBook XML documents with embedded MathML using Emacs and nXML mode. Alas, MathML is very verbose and therefore not easy to edit with a text editor. So I'd like to edit the MathML parts with an external MathML editor, namely Amaya. What I want is that if I place Emacs' cursor inside a MathML fragment and press a specific key combination, the whole MathML part is copied into a file (with some additional heading lines), Amaya is run on this file, and if Amaya has finished, the file's content (minus the heading lines) is written back into my Emacs buffer. So far, I've written a script which basically puts standard input in a file, invokes Amaya and writes the resulting file content to standard output. If I invoke this from Emacs via shell-command-on-buffer then after finishing Amaya, Emacs crashes with the message: "X protocol error: BadWindow (invalid Window parameter) on protocol request 25". In addition, shell-command-on-buffer doesn't seem to be the right thing because it places the command's output in * Shell Command Output * instead of replacing the text in the file's buffer. So how do I filter parts of a buffer through a shell command so that the respective part of the buffer is replaced by the command's output? Can somebody of you imagine why the above error message appears? Is there a better way to invoke X clients for editing parts of a document? How can I tell Emacs to search for the boundaries of a MathML part the cursor is in, so that I don't have to mark the whole MathML fragment before editing it? Thanks a lot for your answers. Best wishes, Wolfgang