Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
On Thu, Apr 09, 2015 at 05:22:07PM +0200, Markus Mohrhard wrote:
>Hey,
> 
>As you are discussing this on the developer list and not in bugzilla I
>have to assume that you plan to work on resolving that issue. You
>already got a few interesting code pointers pointing to libxml2 in the
>filter detection code with missing overwritten error handlers.
>If you need more code pointers after debugging please feel free to ask.
>If you just want to raise an issue please move it to bugzilla.
>
>Regards,
>Markus

Done: https://bugs.documentfoundation.org/show_bug.cgi?id=90528

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Markus Mohrhard
Hey,

On Thu, Apr 9, 2015 at 5:13 PM, Jens Tröger 
wrote:

> On Thu, Apr 09, 2015 at 11:42:07AM +0300, Tor Lillqvist wrote:
> >>   release builds should not print red herrings on stdout/stderr;
> >
> >But running soffice from the command line on OS X is not the right
> >thing to do anyway (unless you are a developer debugging something),
> so
> >debating what it should or should not do in such a case is a bit
> >pointless. And thus also passing a --help option on the command line
> is
> >a bit pointless.
>
> This conversation is getting off-topic now.  Matter of fact is: there is
> output which has not yet been nailed to a root cause, and that output
> contradicts what LO eventually does.  The output also indicates that
> something goes awry during the load of a plain-text document which
> happens to contain LaTeX commands.
>
> IMO this is an issue that needs resolution.  (Which is why I started
> this thread.)
>
> Jens
>

As you are discussing this on the developer list and not in bugzilla I have
to assume that you plan to work on resolving that issue. You already got a
few interesting code pointers pointing to libxml2 in the filter detection
code with missing overwritten error handlers.

If you need more code pointers after debugging please feel free to ask. If
you just want to raise an issue please move it to bugzilla.

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
On Thu, Apr 09, 2015 at 11:42:07AM +0300, Tor Lillqvist wrote:
>>   release builds should not print red herrings on stdout/stderr;
> 
>But running soffice from the command line on OS X is not the right
>thing to do anyway (unless you are a developer debugging something), so
>debating what it should or should not do in such a case is a bit
>pointless. And thus also passing a --help option on the command line is
>a bit pointless.

This conversation is getting off-topic now.  Matter of fact is: there is
output which has not yet been nailed to a root cause, and that output
contradicts what LO eventually does.  The output also indicates that
something goes awry during the load of a plain-text document which
happens to contain LaTeX commands.

IMO this is an issue that needs resolution.  (Which is why I started
this thread.)

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
Tor,

On Thu, Apr 09, 2015 at 11:28:46AM +0300, Tor Lillqvist wrote:
>Note that you are running the soffice binary from the command-line,
>which obviously is not at all a normal way to run LibreOffice on OS
>X.

What is "normal" is not the question.  I run most of my stuff out of a
terminal _because_ I get additional output; often applications quit
silently which is irritating.  On Linux, running out of a shell is
"normal", and LO dumps the same there.

Furthermore, I also run LO headless in a server environment, and such
output pollutes the server logs.  This is why I became aware of this
problem in the first place.

>One could even say that by doing so, you by definition are asking
>for "odd output"... 

Disagree.

>Any messages printed to standard output or standard error are easy
>to misinterpret,

Hence my question to the developers as to how to interpret this
particular message.

>and unless you plan to investigate yourself what is going on, you
>should ignore them.

I disagree with this statement.  The point of starting this thread is to
raise awareness to the devs who know and own the code that something odd
is going on here, so that this issue can be discussed and resolved by
those who have the appropriate knowledge.

Expecting people who have no experience with the code base to
investigate is a waste of everybody's time, and will lead to false
diagnoses and inappropriate fixes.

>It is quite likely that the "Document is empty" message is a red
>herring.

Speculation.

>You didn't tell what eventually happens, anyway? Does LibreOffice
>open the file (as plain text) or not? If not, what actual error
>message intended for the user (in the GUI) does it display?

It does open the file as plain text, and LO does not give any further
GUI warnings.

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
On Thu, Apr 09, 2015 at 10:43:16AM +0200, David Tardon wrote:
> Hi,
> 
> Also, we do not know which version of libreoffice this is. The message
> could come from libetonyek, for example. Early versions did not handle
> non-XML input correctly.
> 
> D.

This is with LO 4.3.5.2, whichever build you can download from the
website.  Same happens with the latest 4.4.2, just downloaded from the
website.

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
On Thu, Apr 09, 2015 at 06:54:11AM -0400, Andrew Pitonyak wrote:
> What happens of you rename the file to have a .txt file extension?


Then it works fine without any output.

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Andrew Pitonyak
What happens of you rename the file to have a .txt file extension?

On Apr 9, 2015 3:44 AM, =?ISO-8859-1?Q?Jens_Tr=F6ger?= 
 wrote:
>
> Hi, 
>
> I'm not sure if this is the right place to post this.  After running LO 
> I loaded a LaTeX file: 
>
>   http://www.math.duke.edu/computing/tex/templates/samplefile.tex 
>
> which gave me the following terminal output: 
>
>   savage@pooh ~ > /Applications/LibreOffice64.app/Contents/MacOS/soffice 
>   :1: parser error : Document is empty 
>   \documentclass{article} 
>   ^ 
>
> I have noticed similar and more on Linux LO.  What's that about?  Can 
> and should I ignore this? 
>
> Cheers, 
> Jens 
>
> -- 
> Jens Tröger 
> http://savage.light-speed.de/ 
> ___ 
> LibreOffice mailing list 
> LibreOffice@lists.freedesktop.org 
> http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread David Tardon
Hi,

On Thu, Apr 09, 2015 at 11:27:16AM +0300, Tor Lillqvist wrote:
> Note that you are running the soffice binary from the command-line, which
> obviously is not at all a normal way to run LibreOffice on OS X. Any
> messages printed to standard output or standard error are easy to
> misinterpret, and unless you plan to investigate yourself what is going on,
> you should ignore them. It is quite likely that the "Document is empty"
> message is a red herring.

Also, we do not know which version of libreoffice this is. The message
could come from libetonyek, for example. Early versions did not handle
non-XML input correctly.

D.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
> release builds should not print red herrings on stdout/stderr;


But running soffice from the command line on OS X is not the right thing to
do anyway (unless you are a developer debugging something), so debating
what it should or should not do in such a case is a bit pointless. And thus
also passing a --help option on the command line is a bit pointless.

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Michael Stahl
On 09.04.2015 10:27, Tor Lillqvist wrote:
> Note that you are running the soffice binary from the command-line,
> which obviously is not at all a normal way to run LibreOffice on OS X.
> Any messages printed to standard output or standard error are easy to
> misinterpret, and unless you plan to investigate yourself what is going
> on, you should ignore them. It is quite likely that the "Document is
> empty" message is a red herring.

release builds should not print red herrings on stdout/stderr; if it's
not a debug build it should not print anything unless given something
like --help.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
> Note that you are running the soffice binary from the command-line,
>

One could even say that by doing so, you by definition are asking for "odd
output"...

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
Note that you are running the soffice binary from the command-line, which
obviously is not at all a normal way to run LibreOffice on OS X. Any
messages printed to standard output or standard error are easy to
misinterpret, and unless you plan to investigate yourself what is going on,
you should ignore them. It is quite likely that the "Document is empty"
message is a red herring.

You didn't tell what eventually happens, anyway? Does LibreOffice open the
file (as plain text) or not? If not, what actual error message intended for
the user (in the GUI) does it display?

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Michael Stahl
On 09.04.2015 09:56, Jens Tröger wrote:
> That it's loading the file as a normal text document.  Instead, the
> 'parser' tells me that the document I'm loading is empty
> 
>   :1: parser error : Document is empty
> 
> which it is not, and then it flags a LaTeX command.  How am I supposed
> to interpret this output?  If it has no significance, then why is that
> output there?

the string occurs in libxml2.so so most likely explanation is that
during type detection one of the services uses libxml2 under the hood
and does not properly override its error callbacks so the default
libxml2 error handler dumps this message to stderr.  should not be hard
to track that down with gdb.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
> The minimum expectation I have on any application that can edit text

But LibreOffice Writer is not really intended to edit "text". It is
intended to edit word processing documents in various formats. That one
can, barely, use it to edit "plain text" is actually a misfeature in my
opinion.

Anyway, unless you are going to actually work on fixing this issue and want
help in that, this mailing list is not the right channel for reporting bugs
or complaining.

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
On Thu, Apr 09, 2015 at 11:05:05AM +0300, Tor Lillqvist wrote:
>  That it's loading the file as a normal text document.
> 
>But LibreOffice is not a text editor.
> 
>   Instead, the 'parser' tells me that the document I'm loading is empty
> 
>Most likely some filter misrecognises the LaTeX source as its own
>format, but then when it actually tries to load it, it (of course)
>fails. Not sure which filter it is.
>Unfortunately I think that the way the recognition of input formats
>work, it is not possible once LO has decided which filter to use for
>loading a document, to regret the decision if the filter notices that
>the document isn't what it thought after all.
>Probably the fix for this (minor, but probably irritating to some)
>problem is to make the filter that thinks it has recognised the LaTeX
>source as suitable for itself more strict.
>Anyway, don't you need to be a bit tricky on OS X to convince
>LibreOffice to even attempt opening a .tex file?
>--tml

The minimum expectation I have on any application that can edit text is
to load a plain text file.  A LaTeX file is plain text.  I would expect
LO to be able to handle a plain text file.

On OS X it was simple: load the file with the normal "Open File" dialog.
On OS X and Linux, I could also load that same file through the UNO API
without any problems.

Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
> That it's loading the file as a normal text document.


But LibreOffice is not a text editor.

  Instead, the
> 'parser' tells me that the document I'm loading is empty
>

Most likely some filter misrecognises the LaTeX source as its own format,
but then when it actually tries to load it, it (of course) fails. Not sure
which filter it is.

Unfortunately I think that the way the recognition of input formats work,
it is not possible once LO has decided which filter to use for loading a
document, to regret the decision if the filter notices that the document
isn't what it thought after all.

Probably the fix for this (minor, but probably irritating to some) problem
is to make the filter that thinks it has recognised the LaTeX source as
suitable for itself more strict.

Anyway, don't you need to be a bit tricky on OS X to convince LibreOffice
to even attempt opening a .tex file?

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
That it's loading the file as a normal text document.  Instead, the
'parser' tells me that the document I'm loading is empty

  :1: parser error : Document is empty

which it is not, and then it flags a LaTeX command.  How am I supposed
to interpret this output?  If it has no significance, then why is that
output there?

Jens


On Thu, Apr 09, 2015 at 10:53:13AM +0300, Tor Lillqvist wrote:
>What did you expect to happen?
>--tml

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Loading LaTeX document results in odd output

2015-04-09 Thread Tor Lillqvist
What did you expect to happen?

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Loading LaTeX document results in odd output

2015-04-09 Thread Jens Tröger
Hi,

I'm not sure if this is the right place to post this.  After running LO
I loaded a LaTeX file:

  http://www.math.duke.edu/computing/tex/templates/samplefile.tex

which gave me the following terminal output:

  savage@pooh ~ > /Applications/LibreOffice64.app/Contents/MacOS/soffice 
  :1: parser error : Document is empty
  \documentclass{article}
  ^

I have noticed similar and more on Linux LO.  What's that about?  Can
and should I ignore this?

Cheers,
Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice