unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: sql-mode and LaTeX
@ 2004-02-25 17:33 Joe Corneli
  2004-02-25 20:19 ` Roger Mason
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Corneli @ 2004-02-25 17:33 UTC (permalink / raw)
  Cc: Roger Mason

What query were you talking about?  I think you omitted that.  I
don't know sql, but your code does sounds interesting.  However it
is going to be too hard for me to help debug when I can't see it.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* sql-mode and LaTeX
@ 2004-02-25 14:28 Roger Mason
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Mason @ 2004-02-25 14:28 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-27 14:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.468.1077720063.340.help-gnu-emacs@gnu.org>
2004-02-26  7:04 ` sql-mode and LaTeX Kai Grossjohann
2004-02-26 11:53   ` Roger Mason
     [not found]   ` <mailman.563.1077796563.340.help-gnu-emacs@gnu.org>
2004-02-27 12:28     ` Kai Grossjohann
2004-02-27 14:08       ` Roger Mason
2004-02-25 17:33 Joe Corneli
2004-02-25 20:19 ` Roger Mason
  -- strict thread matches above, loose matches on Subject: below --
2004-02-25 14:28 Roger Mason

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).