From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roger Mason Newsgroups: gmane.emacs.help Subject: sql-mode and LaTeX Date: Wed, 25 Feb 2004 10:58:48 -0330 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077720232 13866 80.91.224.253 (25 Feb 2004 14:43:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2004 14:43:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 15:43:40 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aw0GB-0004fa-00 for ; Wed, 25 Feb 2004 15:43:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Aw0F4-0002Yf-7W for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2004 09:42:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Aw0Db-00024a-4Q for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 09:40:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Aw0D1-0001u3-O5 for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 09:40:56 -0500 Original-Received: from [134.153.37.4] (helo=minnie.esd.mun.ca) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Aw020-0000En-NF for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 09:29:00 -0500 Original-Received: from minnie.esd.mun.ca (minnie.esd.mun.ca [134.153.37.4]) by minnie.esd.mun.ca (8.8.7/8.8.7) with ESMTP id KAA27163 for ; Wed, 25 Feb 2004 10:58:51 -0330 Original-To: help-gnu-emacs@gnu.org User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.1 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17201 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17201 Hello, I have written some lisp functions that allow the output from an SQL buffer to be redirected to another buffer. It is designed to work with Alex Schroeder's sql-mode and Postgres. The original intent was to be able to formulate queries in, say, a LaTeX-mode buffer and have the results returned there for subsequent formatting with latex. If it ever works reliably I intend to make it available to the Emacs community. The problem I am having is that when the output appears in the latex (AucTeX) buffer the column headings are lost. For example, this query, executed in an sql-mode buffer and returning the output to that buffer produces this output: -- This outputs the preamble select'\\documentclass{article} \\title{GAC Budget 2004} \\author{Roger Mason \\\\ (with help from Karen Johnston \\& Karen Dawe)} \\usepackage{float} \\begin{document} \\maketitle\n'; ?column? --------------------------------------------------------------------------------------------------------------------------------------------------------------------- \documentclass{article} \title{GAC Budget 2004} \author{Roger Mason \\ (with help from Karen Johnston \& Karen Dawe)} \usepackage{float} \begin{document} \maketitle (1 row) Apart from the ^M (which is easy to clean up), this is the normal, expected output. The same query, with output redirected to a LaTeX buffer produces this: ... --------------------------------------------------------------------------------------------------------------------------------------------------------------------- \documentclass{article} \title{GAC Budget 2004} \author{Roger Mason \\ (with help from Karen Johnston \& Karen Dawe)} \usepackage{float} \begin{document} \maketitle (1 row) 'C-x =' on the ... and ^M characters yields: RET. Only in the LaTeX buffer does this character suppress the rest of the line. I have looked at the coding systems for the LaTeX and sql-mode buffers with describe-current-coding-system: they are identical. If anyone has any idea how to fix this problem I'd be most grateful. Thanks, Roger Mason