Re: [patch] quote-insert

2004-02-19 Thread Andre Poenitz
On Thu, Feb 19, 2004 at 01:08:14PM +0100, Juergen Spitzmueller wrote:
> Juergen Spitzmueller wrote:
> > OK, here's a patch with the proposed changes and the changes to the ui
> > (qt/xforms document dialogs, bindings [1], menus).
> > Please tell me if this can go in.
> 
> One additional question. ERT allows typographical quotation marks now. I think 
> this is not my doing,

Probably not.

> but I'd like to fix it. What I tried is (in text3.C, LFUN_QUOTE):

This should be handled in the ERTInset's dispatch, or even better,
'forbidden' by LyXFunc::status. And LyXFunc::status should be split into
inset sopecific parts and shifted to the some Inset::status where
appropriate.

Andre'


Re: [patch] tmp file stuff

2004-02-19 Thread Andre Poenitz
On Thu, Feb 19, 2004 at 09:21:58AM +, Angus Leeming wrote:
> Jean-Marc Lasgouttes wrote:
> > Georg> What is difficult: Setting the environment variable, or
> > Georg> determine its value? I guess the latter should be doable
> > Georg> without too much pain with the existing path conversion
> > Georg> routines?
> > 
> > On unix, this is a ":" delimited list of directories. On windows,
> > depending on whether the program uses win32 paths or unix path, it
> > can be a ";" delimited list of directories.
> 
> Is semi-colon an allowable character in a unix path?

In a directory name? Yes. [Everything except a '/', although some
funny chars will produce funny results...]

> Similarly, is colon an allowable character in the win32 path?

Not sure.

> I think that the answer to these questions is "no" and "no", which 
> means that we could use boost::regex to split the list, using "[:;]" 
> as the delimiter.

Not 100% safe...

Andre'


Re: [patch] quote-insert

2004-02-19 Thread Andre Poenitz
On Wed, Feb 18, 2004 at 05:57:30PM +0100, Juergen Spitzmueller wrote:
> As you may have noticed, quote-insert is broken in current cvs (always inserts 
> raw quotes). IMHO this is due to this change:
> http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/text3.C.diff?r1=1.214&r2=1.215
> 
>   BufferParams const & bufparams = bv->buffer()->params();
>   if (style->pass_thru ||
> - pit->getFontSettings(bufparams,pos).language()->lang() == "hebrew" 
> ||
> - !bv->insertInset(new InsetQuotes(c, bufparams)))
> + pit->getFontSettings(bufparams,pos).language()->lang() == "hebrew")
> +   bv->insertInset(new InsetQuotes(c, bufparams));
> + else
>   bv->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\""));
>   break;
>   }
> 
> Should be something like
>   BufferParams const & bufparams = bv->buffer()->params();
> - if (style->pass_thru ||
> - pit->getFontSettings(bufparams,pos).language()->lang() == "hebrew" 
> ||
> - !bv->insertInset(new InsetQuotes(c, bufparams)))
> + if (!style->pass_thru &&
> + pit->getFontSettings(bufparams,pos).language()->lang() != "hebrew")
> +   bv->insertInset(new InsetQuotes(c, bufparams));
> + else
> if I didn't miss all logic.
> 
> I fixed this on the way to a first step towards better quotation mark 
> handling: the attached patch introduces lfun arguments "quote-insert [inner|
> outer]" where single and double quotation marks can be accessed directly.
> I think this is much more convenient than toggling single/double in 
> document->language [1].
> What do you think?

Looks ok.

The bug is my fault. It crept in when removing the return value from insertInset.

Andre'


Re: [patch] quote-insert

2004-02-19 Thread Andre Poenitz
On Wed, Feb 18, 2004 at 06:20:22PM +0100, Juergen Spitzmueller wrote:
> Jean-Marc Lasgouttes wrote:
> > Note however that inner/outer is not the same as single/double. There
> > probably needs to be big changes in insetquote data structures to
> > support this inner/outer stuff properly.
> 
> I can also call the arguments "single|double" (is this better?). This changes 
> are of course only a first step and do not support quote nesting. I just 
> makes the handling of single and double quotes a bit better. I think simple 
> single/double handling will be still useful if we have nifty inner/outer 
> logic eventually.

Such logic will never work

Andre'


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Kayvan A. Sylvan
On Thu, Feb 19, 2004 at 05:17:00PM +0100, Jean-Marc Lasgouttes wrote:
> > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> 
> Lars> | Hmm, why do we have this 'rpmdist' make target, then?
> 
> Lars> That target will create the tar.gz (make dist) and run rpmbuild
> Lars> -ta on it.
> 
> And I need to be root to use that, right?
> 
> JMarc

Not necessarily.

[EMAIL PROTECTED] ~]$ cat ~/.rpmmacros 
%_myrpmdir  /home/kayvan/src/rpm
%_builddir  %{_myrpmdir}/BUILD
%_rpmdir%{_myrpmdir}/RPMS
%_srcrpmdir %{_myrpmdir}/SRPMS
%_specdir   %{_myrpmdir}/SPECS
%_sourcedir %{_myrpmdir}/SOURCES

%_mandir/usr/share/man


-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Kuba Ober
On Thursday 19 February 2004 12:07 pm, Nirmal Govind wrote:
>  > Take  the tarball, put it into /usr/src/redhat/SOURCES
>  > put the spec file in /usr/src/redhat/SPECS and add
>
> latex-xft-fonts as a
>
> Where is this lyx.spec file? Can't find it in the source and I don't
> seem to have an earlier version either.. is this part of cvs? If
> yes, can I download it from somewhere w/o getting all of cvs?

Download the .src.rpm
rpm2cpio lyx-version.src.rpm
then use cpio (man cpio) to get the lyx.spec file out of it

Kuba



Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Kuba Ober
On Thursday 19 February 2004 11:22 am, Lars Gullik Bjønnes wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> >> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> |
> | Lars> | Hmm, why do we have this 'rpmdist' make target, then?
> |
> | Lars> That target will create the tar.gz (make dist) and run rpmbuild
> | Lars> -ta on it.
> |
> | And I need to be root to use that, right?
>
> Unless you have setup your suers to be able to write into
> /usr/src/redhat, yes.

And that's a rather bad default. Several "good" packages like gcc can 
"inadvertently" (ahem) write over your /usr filesystem and stuff, so doing 
rpmbuild as a root is a rather bad idea. I've learned that just recently, I 
admit (gcc 3.3.1 in cross-compilation builds does that). Just

chown yourself:yourself /usr/src/redhat -R

and you're free to go.

Kuba



Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread John Levon
On Thu, Feb 19, 2004 at 06:08:49PM +0100, Jean-Marc Lasgouttes wrote:

> I am willing to do it, but you have to grant me credentials, I think.
> My login name on freshmeat is 'lasgoutt'.

Nope, anyone can edit it now..

BTW, RH9 RPMs in ftp.lyx.org/incoming

john

-- 
"Spammers get STABBED by GOD." - Ron Echeverri


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Chip Cuccio
* Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
  |__ Thu, Feb 19, 2004 at 06:08:49PM +0100:
> > "John" == John Levon <[EMAIL PROTECTED]> writes:
> 
> John> On Thu, Feb 19, 2004 at 12:34:22PM +0100, Jean-Marc Lasgouttes
> John> wrote:
> >> Public release of LyX version 1.3.4
> >> ===
> >> 
> 
> John> Can someone update freshmeat ? I'm a bit busy

Complete. It is in the review process and should appear later on
today.

Cheers...

-- 
Chip Cuccio|  chipster[at]norlug[.]org
NORLUG VP and Sysadmin |  
Northfield Linux Users' Group  |  Northfield, Minnesota USA



Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Nirmal Govind
> There is a file lyx.spec in development/, which is generated from
> lyx.spec.in. Please do not use the lyx.spec which is in the
> distribution, but rather run configure to have a proper one.
Got it! Thanks JMarc..

I tried the 'make dist' method suggested by Lars but looks like I 
messed up somewhere .. I compiled the source and then did a 'make 
dist', which created a tar.gz file but 'rpmbuild -ta' on it didn't 
work cos it wasn't able to find the lyx.xpm file (is this how it's 
supposed to be?). Looking at the Makefile, a softlink seems to be 
created by rpmdist: dist at the beginning and then removed at the 
end of it.. so I tried make rpmdist and that's compiling all over 
again.. will try John's method with the spec file next... (once this 
compile finishes)

nirmal



About the CJK patch to xforms

2004-02-19 Thread Jean-Marc Lasgouttes

Hello cghan,

Just a small message to keep you informed of recent cjk-related
developments. 

There has been a bug reported recently on lyx-devel where german users
of LyX/xforms had strange locale related problems. It turned out that
this bug was related to the cjk patch to xforms that is not included
in suse linux.

As a result, the following patch has been applied to the xforms suse
rpm:

diff -ru xforms-1.0-release.orig/lib/flresource.c
 xforms-1.0-release/lib/flresource.c ---
 xforms-1.0-release.orig/lib/flresource.c   2004-02-10 12:45:01.0 +0100
 +++ xforms-1.0-release/lib/flresource.c2004-02-10 12:47:30.933876558 +0100
 @@ -1035,7 +1035,7 @@
 extern int
 use_fontset()
 {
-   char * loc = setlocale(LC_ALL, "");
+   char * loc = setlocale(LC_CTYPE, NULL);

 if (!strcmp(loc, "ko_KR") || !strcmp(loc, "ko_KR.eucKR") ||
!strcmp(loc, "korean") || !strcmp(loc, "korean_euc") ||

The main difference is that setlocale(LC_foo, NULL) queries the
current locale, while setlocale(LC_foo, "") actually _sets_ it from
the environment. Since I do not think this was your intent, we thought
that this fix was appropriate.

(The Replacement of LC_ALL with LC_CTYPE is because only LC_CTYPE is relevant 
for Fontsets)

Feel free complain loudly if this change was not correct.

JMarc


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "Nirmal" == Nirmal Govind <[EMAIL PROTECTED]> writes:

>> Take the tarball, put it into /usr/src/redhat/SOURCES put the spec
>> file in /usr/src/redhat/SPECS and add latex-xft-fonts
Nirmal> as a

Nirmal> Where is this lyx.spec file? Can't find it in the source and I
Nirmal> don't seem to have an earlier version either.. is this part of
Nirmal> cvs? If yes, can I download it from somewhere w/o getting all
Nirmal> of cvs?

There is a file lyx.spec in development/, which is generated from
lyx.spec.in. Please do not use the lyx.spec which is in the
distribution, but rather run configure to have a proper one.

JMarc


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Thu, Feb 19, 2004 at 12:34:22PM +0100, Jean-Marc Lasgouttes
John> wrote:
>> Public release of LyX version 1.3.4
>> ===
>> 

John> Can someone update freshmeat ? I'm a bit busy

I am willing to do it, but you have to grant me credentials, I think.
My login name on freshmeat is 'lasgoutt'.

JMarc


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Nirmal Govind
> Take  the tarball, put it into /usr/src/redhat/SOURCES
> put the spec file in /usr/src/redhat/SPECS and add 
latex-xft-fonts as a

Where is this lyx.spec file? Can't find it in the source and I don't 
seem to have an earlier version either.. is this part of cvs? If 
yes, can I download it from somewhere w/o getting all of cvs?

Thanks,
nirmal


[ANNOUNCE]: LyX/Mac-1.3.4

2004-02-19 Thread Ronald Florence
LyX/Mac-1.3.4 offers new features and functionality for MacOSX users:

  - The LyX application is now fully self-contained and relocatable;

  - You can drag & drop files onto the open LyX window or select LyX
as the default application to open LyX files in the Finder
(Start-LyX is no longer used); double-clicked files open
substantially faster;
  - Simplified drag & drop installation or upgrade;

  - LyX/Mac sets its own PATH (~/.MacOSX/environment.plist is not
needed);
  - Reverse DVI search (Option-click on a DVI preview jumps to that
point in the LyX file).
The self-installing binary at

  ftp://ftp.lyx.org/pub/lyx/bin/1.3.4/lyx-1.3.4_1macos-aqua.dmg

requires MacOS-10.2 or later and a teTeX installation.  For more
information, see the LyX/Mac Howto in the installation bundle or
.
--

Ronald



Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 16:25, John Levon wrote:
> On Thu, Feb 19, 2004 at 05:06:17PM +0100, Jean-Marc Lasgouttes wrote:
> > Hmm, why do we have this 'rpmdist' make target, then?
>
> Don't trust it personally :)

  In other words: "Too easy, no fun". ;-)

> john

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread John Levon
On Thu, Feb 19, 2004 at 12:34:22PM +0100, Jean-Marc Lasgouttes wrote:

> Public release of LyX version 1.3.4
> ===
> 

Can someone update freshmeat ? I'm a bit busy

thanks
john


Re: Python .pyc files

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 16:04, Jean-Marc Lasgouttes wrote:
[...]
> I think it checks the timestamp.

  Makes sense but I didn't knew that. :-)

[...]
> Jose'> So something like: %.pyc : %.py python -c "import py_compile;
> Jose'> import sys; py_compile.compile(sys.argv[1])" %.py
>
> Jose'>   With the last line indented by a tab, and the %.py in the
> Jose'> same line...
>
> Except that you have to actually tell make that you want the files to
> be generated. They won't appear just by magic.

  Why not add that to the install target...

  Why would this be more difficult than that?

> JMarc

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread John Levon
On Thu, Feb 19, 2004 at 05:06:17PM +0100, Jean-Marc Lasgouttes wrote:

> Hmm, why do we have this 'rpmdist' make target, then?

Don't trust it personally :)

john
-- 
"Spammers get STABBED by GOD." - Ron Echeverri


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
>
| Lars> | Hmm, why do we have this 'rpmdist' make target, then?
>
| Lars> That target will create the tar.gz (make dist) and run rpmbuild
| Lars> -ta on it.
>
| And I need to be root to use that, right?

Unless you have setup your suers to be able to write into
/usr/src/redhat, yes.

-- 
Lgb



Re: Python .pyc files

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 16:07, Lars Gullik Bjønnes wrote:
> | What if they are architecture or system dependent?
>
> Wouldn't that just be another arguemtn to have teh pyc files generated
> by make?

  The only problem I see is that those pyc files are tied with the python 
version.
-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: Python .pyc files

2004-02-19 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Christian Ridderström <[EMAIL PROTECTED]> writes:
Lars> | On Thu, 19 Feb 2004, Jean-Marc Lasgouttes wrote:
>>
>>>  Jose', would it be possible to have these files generated at
>>> 'make' time?
>>
Lars> | What if they are architecture or system dependent?

Lars> Wouldn't that just be another arguemtn to have teh pyc files
Lars> generated by make?

No, the problem is that they should not go in $prefix/share, in this
case... Imagine a site where different architectures have different
python versions.

I think that, unless we prove that compilation matters, we should skip
distribution and installation of .pyc files.

JMarc



Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 16:06, Jean-Marc Lasgouttes wrote:
>
> Hmm, why do we have this 'rpmdist' make target, then?

  It will do the same, but without all the work that John mentioned. :-)

  Also it is not a good policy to build rpm as root. :-)
  It is possible to overcome that with a suitable .rpmrc file, see 
http://freshrpms.net/docs/fight/ if you want more details. :-)

> Thanks for the explanation.
>
> JMarc

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> | Hmm, why do we have this 'rpmdist' make target, then?

Lars> That target will create the tar.gz (make dist) and run rpmbuild
Lars> -ta on it.

And I need to be root to use that, right?

JMarc


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>> "John" == John Levon <[EMAIL PROTECTED]> writes:
>
| John> On Thu, Feb 19, 2004 at 04:59:53PM +0100, Jean-Marc Lasgouttes
| John> wrote:
>>> Thanks. I try to do that, but it seems I do not understand this rpm
>>> business at all...
>
| John> Take the tarball, put it into /usr/src/redhat/SOURCES put the
| John> spec file in /usr/src/redhat/SPECS and add latex-xft-fonts as a
| John> dependency. Put lyx.xpm in /usr/src/redhat/SOURCES/
>
| John> cd /usr/src/redhat/SPECS/ rpmbuild -ba lyx.spec
>
| John> RPMs are in /usr/src/redhat/{S}RPMS
>
| Hmm, why do we have this 'rpmdist' make target, then?

That target will create the tar.gz (make dist) and run rpmbuild -ta on
it.


-- 
Lgb


Re: Python .pyc files

2004-02-19 Thread Lars Gullik Bjønnes
Christian Ridderström <[EMAIL PROTECTED]> writes:

| On Thu, 19 Feb 2004, Jean-Marc Lasgouttes wrote:
>
>> 
>> Jose', would it be possible to have these files generated at 'make'
>> time?
>
| What if they are architecture or system dependent?

Wouldn't that just be another arguemtn to have teh pyc files generated
by make?
>

-- 
Lgb


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Thu, Feb 19, 2004 at 04:59:53PM +0100, Jean-Marc Lasgouttes
John> wrote:
>> Thanks. I try to do that, but it seems I do not understand this rpm
>> business at all...

John> Take the tarball, put it into /usr/src/redhat/SOURCES put the
John> spec file in /usr/src/redhat/SPECS and add latex-xft-fonts as a
John> dependency. Put lyx.xpm in /usr/src/redhat/SOURCES/

John> cd /usr/src/redhat/SPECS/ rpmbuild -ba lyx.spec

John> RPMs are in /usr/src/redhat/{S}RPMS

Hmm, why do we have this 'rpmdist' make target, then?

Thanks for the explanation.

JMarc


Re: Python .pyc files

2004-02-19 Thread Jean-Marc Lasgouttes
> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes:

Jose'>   Also I'm afraid that python could use the wrong version, that
Jose'> is, if the precompiled version is available then use it instead
Jose'> of the original file.

I think it checks the timestamp.

Note that the laternative is to distribute "lyx2lyx/lyx2lyx
lyx2lyx/*.py" instead of "lyx2lyx/*", if we are afraid of .pyc
problems. Does this actually save us time on file conversions? If it
does not, there is little point distributing more files.

Jose'> So something like: %.pyc : %.py python -c "import py_compile;
Jose'> import sys; py_compile.compile(sys.argv[1])" %.py

Jose'>   With the last line indented by a tab, and the %.py in the
Jose'> same line...

Except that you have to actually tell make that you want the files to
be generated. They won't appear just by magic.

JMarc


Re: Python .pyc files

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 15:46, Jean-Marc Lasgouttes wrote:
>
> As you may not know, stuff in $prefix/share is supposed to be
> system-independent, which is not the case with $prefix/bin and
> $prefix/lib.

  As far as I know those files are system independent, but depend on the 
python version used.

  So if you want to be on the safe side then don't include them. :-)

> JMarc

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread John Levon
On Thu, Feb 19, 2004 at 04:59:53PM +0100, Jean-Marc Lasgouttes wrote:

> Thanks. I try to do that, but it seems I do not understand this rpm
> business at all...

Take  the tarball, put it into /usr/src/redhat/SOURCES
put the spec file in /usr/src/redhat/SPECS and add latex-xft-fonts as a
dependency. Put lyx.xpm in /usr/src/redhat/SOURCES/

cd /usr/src/redhat/SPECS/
rpmbuild  -ba lyx.spec

RPMs are in /usr/src/redhat/{S}RPMS

john
-- 
"Spammers get STABBED by GOD." - Ron Echeverri


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Thu, Feb 19, 2004 at 04:45:30PM +0100, Jean-Marc Lasgouttes
John> wrote:
>> relying on people from lyx-devel and lyx-users to do that). I
>> already have the LyX/Mac binary, but it may not be your top
>> priority...
>> 

John> Building a RH9 RPM now

Thanks. I try to do that, but it seems I do not understand this rpm
business at all...

JMarc


Re: Python .pyc files

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 13:44, Jean-Marc Lasgouttes wrote:
> I just nothing some rather unfortunate fact: in the 1.3.4 distribution
> I have:
>
> fantomas[ssh]: ll lyx-1.3.4/lib/lyx2lyx/
> total 113
> -rw-r--r--   1 lasgoutt preval  1232 Feb 10 16:56 error.py
> -rw-r--r--   1 lasgoutt preval  1081 Oct 20 16:17 error.pyc
> -rwxr--r--   1 lasgoutt preval  5071 Feb 10 16:56 lyx2lyx
> -rw-r--r--   1 lasgoutt preval  7103 Feb  9 17:55 lyxconvert_210.py
> -rw-r--r--   1 lasgoutt preval  4395 Feb 10 16:56 lyxconvert_215.py
> -rw-r--r--   1 lasgoutt preval  5587 Jun 17  2003 lyxconvert_215.pyc
> -rw-r--r--   1 lasgoutt preval  9527 Feb 10 16:56 lyxconvert_216.py
> -rw-r--r--   1 lasgoutt preval  8083 Jun 17  2003 lyxconvert_216.pyc
> -rw-r--r--   1 lasgoutt preval  4850 Feb 10 16:56 lyxconvert_217.py
> -rw-r--r--   1 lasgoutt preval  5234 Apr  2  2003 lyxconvert_217.pyc
> -rw-r--r--   1 lasgoutt preval 14645 Feb 10 16:56 lyxconvert_218.py
> -rw-r--r--   1 lasgoutt preval 17120 Dec  4 11:03 lyxconvert_218.pyc
> -rw-r--r--   1 lasgoutt preval  2853 Feb 10 16:56 lyxconvert_220.py
> -rw-r--r--   1 lasgoutt preval  2822 Oct 20 16:17 lyxconvert_220.pyc
> -rw-r--r--   1 lasgoutt preval  4974 Feb 10 16:56 parser_tools.py
> -rw-r--r--   1 lasgoutt preval  9433 Oct 20 16:17 parser_tools.pyc
>
> Or interest here are the various .pyc files with various timestamps.
> AFAIK, they are useful since they are supposed to speed-up the python
> loading. However they are only created when some python script is
> used, whence the irregularity of their creation dates (when they exist
> at all).

  Yes. That is correct.

  Also I'm afraid that python could use the wrong version, that is, if the 
precompiled version is available then use it instead of the original file.

> Unfortunately, a user who do not have write access to lyx_dir/lyx2lyx/
> (that is, most users) will never be able to have these files created.
>
> Jose', would it be possible to have these files generated at 'make'
> time? Alternatively, we could stop distributing them.

  From the python site:

7.1   How do I create a .pyc file?

When a module is imported for the first time (or when the source is more 
recent than the current compiled file) a .pyc file containing the compiled 
code should be created in the same directory as the .py file.

One reason that a .pyc file may not be created is permissions problems with 
the directory. This can happen, for example, if you develop as one user but 
run as another, such as if you are testing with a web server. Creation of 
a .pyc file is automatic if you're importing a module and Python has the 
ability (permissions, free space, etc...) to write the compiled module back 
to the directory.

Running Python on a top level script is not considered an import and no .pyc 
will be created. For example, if you have a top-level module abc.py that 
imports another module xyz.py, when you run abc, xyz.pyc will be created 
since xyz is imported, but no abc.pyc file will be created since abc.py 
isn't being imported.

If you need to create abc.pyc -- that is, to create a .pyc file for a module 
that is not imported -- you can, using the py_compile and compileall 
modules.

The py_compile module can manually compile any module. One way is to use the 
compile() function in that module interactively:

>>> import py_compile
>>> py_compile.compile('abc.py')

This will write the .pyc to the same location as abc.py (or you can override 
that with the optional parameter cfile).

You can also automatically compile all files in a directory or directories 
using the compileall module. You can do it from the shell prompt by running 
compileall.py and providing the path of a directory containing Python files 
to compile:

python compileall.py .

-
  So something like:
%.pyc : %.py
python -c "import py_compile; import sys; py_compile.compile(sys.argv[1])" 
%.py

  With the last line indented by a tab, and the %.py in the same line...

  Notice that we should not apply this to lyx2lyx only to the other files. 
So the above rule is enough. (I don't know how much of a gnuism this 
is) :-)

> JMarc

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread John Levon
On Thu, Feb 19, 2004 at 04:45:30PM +0100, Jean-Marc Lasgouttes wrote:

> relying on people from lyx-devel and lyx-users to do that). I
> already have the LyX/Mac binary, but it may not be your top
> priority...
> 

Building a RH9 RPM now

john

-- 
"Spammers get STABBED by GOD." - Ron Echeverri


Re: Python .pyc files

2004-02-19 Thread Jean-Marc Lasgouttes
> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes:

Jose'> On Thursday 19 February 2004 15:02, Christian Ridderström
Jose'> wrote:
>>  What if they are architecture or system dependent?

Jose'>   But that is the point of make, isn't it? ;-)

Jose'>   I don't think they are system dependent, they are precompiled
Jose'> and then interpreted by python. But in this case that is not
Jose'> the point, because during build time we also create the
Jose'> binaries that I can garantee are system dependent. :-)

As you may not know, stuff in $prefix/share is supposed to be
system-independent, which is not the case with $prefix/bin and
$prefix/lib.

JMarc


Re: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes
> "Paul" == Paul Smith <[EMAIL PROTECTED]> writes:

>> Prebuilt binaries (mainly rpms for linux distributions) should soon
>> be available at ftp://ftp.lyx.org/pub/lyx/bin/1.3.4/

Paul> May I ask you whether you have an estimate of the date?

No, I am just waiting to see how fast they will be coming in (I am
relying on people from lyx-devel and lyx-users to do that). I
already have the LyX/Mac binary, but it may not be your top
priority...

JMarc


RE: [ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Paul Smith
Prebuilt binaries (mainly rpms for linux distributions) should soon be
available at
ftp://ftp.lyx.org/pub/lyx/bin/1.3.4/
May I ask you whether you have an estimate of the date?

Many thanks,

Paul

_
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger



Re: Python .pyc files

2004-02-19 Thread Jose' Matos
On Thursday 19 February 2004 15:02, Christian Ridderström wrote:
>
> What if they are architecture or system dependent?

  But that is the point of make, isn't it? ;-)

  I don't think they are system dependent, they are precompiled and then 
interpreted by python. But in this case that is not the point, because 
during build time we also create the binaries that I can garantee are 
system dependent. :-)

> /Christian

-- 
José Abílio

LyX and docbook, a perfect match. :-)


Re: Python .pyc files

2004-02-19 Thread Christian Ridderström
On Thu, 19 Feb 2004, Jean-Marc Lasgouttes wrote:

> 
> Jose', would it be possible to have these files generated at 'make'
> time?

What if they are architecture or system dependent?

/Christian

-- 
Christian Ridderström   http://www.md.kth.se/~chr




Re: Distribution size trivia

2004-02-19 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| One thing that I did not know actually, is that our po files
| collection still weights more that the source code itself:

I don't think we shoulddo anyting with the distribution, but note that
for a distributor&packager of rpm f.ex. separate packages for teh
different languages is possible. *or one of rall(

*I am using thins strange spanian keyboard with english layout... not
 easy(

-- 
Lgb



Python .pyc files

2004-02-19 Thread Jean-Marc Lasgouttes

I just nothing some rather unfortunate fact: in the 1.3.4 distribution
I have:

fantomas[ssh]: ll lyx-1.3.4/lib/lyx2lyx/   
total 113
-rw-r--r--   1 lasgoutt preval  1232 Feb 10 16:56 error.py
-rw-r--r--   1 lasgoutt preval  1081 Oct 20 16:17 error.pyc
-rwxr--r--   1 lasgoutt preval  5071 Feb 10 16:56 lyx2lyx
-rw-r--r--   1 lasgoutt preval  7103 Feb  9 17:55 lyxconvert_210.py
-rw-r--r--   1 lasgoutt preval  4395 Feb 10 16:56 lyxconvert_215.py
-rw-r--r--   1 lasgoutt preval  5587 Jun 17  2003 lyxconvert_215.pyc
-rw-r--r--   1 lasgoutt preval  9527 Feb 10 16:56 lyxconvert_216.py
-rw-r--r--   1 lasgoutt preval  8083 Jun 17  2003 lyxconvert_216.pyc
-rw-r--r--   1 lasgoutt preval  4850 Feb 10 16:56 lyxconvert_217.py
-rw-r--r--   1 lasgoutt preval  5234 Apr  2  2003 lyxconvert_217.pyc
-rw-r--r--   1 lasgoutt preval 14645 Feb 10 16:56 lyxconvert_218.py
-rw-r--r--   1 lasgoutt preval 17120 Dec  4 11:03 lyxconvert_218.pyc
-rw-r--r--   1 lasgoutt preval  2853 Feb 10 16:56 lyxconvert_220.py
-rw-r--r--   1 lasgoutt preval  2822 Oct 20 16:17 lyxconvert_220.pyc
-rw-r--r--   1 lasgoutt preval  4974 Feb 10 16:56 parser_tools.py
-rw-r--r--   1 lasgoutt preval  9433 Oct 20 16:17 parser_tools.pyc

Or interest here are the various .pyc files with various timestamps.
AFAIK, they are useful since they are supposed to speed-up the python
loading. However they are only created when some python script is
used, whence the irregularity of their creation dates (when they exist
at all).

Unfortunately, a user who do not have write access to lyx_dir/lyx2lyx/
(that is, most users) will never be able to have these files created.

Jose', would it be possible to have these files generated at 'make'
time? Alternatively, we could stop distributing them.

JMarc


Distribution size trivia

2004-02-19 Thread Jean-Marc Lasgouttes

While preparing the 1.3.4 distribution, I have been surprised to see
that its size actually shrunk by 300k:

schuss: ll lyx-1.3.3.tar.gz lyx-1.3.4.tar.gz
-rw-r--r--1 lasgoutt preval7622308 Sep 25 16:15 lyx-1.3.3.tar.gz
-rw-r--r--1 lasgoutt preval7333077 Feb 19 11:22 lyx-1.3.4.tar.gz

On the unpacked source, the difference is actually 1.8M:

schuss: du -s lyx-1.3.3 lyx-1.3.4
36791   lyx-1.3.3
34933   lyx-1.3.4

One reason why this was a surprise to me is that we distribute brand
new basque documents (+900k):

schuss: du -s lyx-1.3.3/lib/doc lyx-1.3.4/lib/doc
8633lyx-1.3.3/lib/doc
9536lyx-1.3.4/lib/doc

Actually, the reason for that is that many badly supported languages
have been removed (-3M):

schuss: du -s lyx-1.3.3/po lyx-1.3.4/po 
10959   lyx-1.3.3/po
7908lyx-1.3.4/po

One thing that I did not know actually, is that our po files
collection still weights more that the source code itself:

schuss: du -s lyx-1.3.4/src
7210lyx-1.3.4/src


JMarc


Re: [patch] quote-insert

2004-02-19 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote:
> OK, here's a patch with the proposed changes and the changes to the ui
> (qt/xforms document dialogs, bindings [1], menus).
> Please tell me if this can go in.

One additional question. ERT allows typographical quotation marks now. I think 
this is not my doing, but I'd like to fix it. What I tried is (in text3.C, 
LFUN_QUOTE):

BufferParams const & bufparams = bv->buffer()->params();
-   if (!style->pass_thru
+   if (!style->pass_thru && 
cur.inset()->insetAllowed(InsetOld::QUOTE_CODE)
&& par.getFontSettings(bufparams, pos).language()->lang() != 
"hebrew") {
string arg = cmd.argument;
if (arg == "single")
cur.insert(new InsetQuotes(c,
bufparams.quotes_language, 
InsetQuotes::SingleQ));
else if (arg == "double")
cur.insert(new InsetQuotes(c,
bufparams.quotes_language, 
InsetQuotes::DoubleQ));
else
cur.insert(new InsetQuotes(c, bufparams));
}
else
bv->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\""));

But this crashes outside insets. What to do?
Jürgen.


[ANNOUNCE] LyX 1.3.4 is released

2004-02-19 Thread Jean-Marc Lasgouttes

Public release of LyX version 1.3.4
===

We are pleased to announce the release of LyX 1.3.4.

This is a maintenance release which improves upon 1.3.3 in
five main areas:
  * It adds support for old files from LyX 0.10.x or 0.12.x;
  * Lyx documents can now be opened and edited even if
they use text classes not present in your latex installation;
  * New Qt features have been added (improved selection,
drag-and-drop);
  * Mac OS X support is much improved;
  * The interface and documentation localization have
been polished.

The complete list of improvements and fixes can be found at the end of
this message.

In case you are wondering what LyX is, here is what
http://www.lyx.org/ has to say on the subject:

   LyX is an advanced open source document processor that encourages
   an approach to writing based on the structure of your documents,
   not their appearance. LyX lets you concentrate on writing, leaving
   details of visual layout to the software.

   LyX runs on many Unix platforms, OS/2, and under Windows/Cygwin
   (this port requires an X server). It can also run natively on Mac
   OS X, thanks to the Qt/Mac library.

You can download LyX 1.3.4 here (the .bz2 are compressed with bzip2,
which yields smaller files) :

ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.3.4.tar.gz
ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.3.4.tar.bz2
ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.3.4.tar.gz
ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.3.4.tar.bz2

and it should propagate shortly to the following mirrors (which will also host
the .bz2 versions):

ftp://ftp.sdsc.edu/pub/other/lyx/stable/lyx-1.3.4.tar.gz
ftp://ftp.lip6.fr/pub/lyx/stable/lyx-1.3.4.tar.gz
ftp://gd.tuwien.ac.at/publishing/tex/lyx/stable/lyx-1.3.4.tar.gz
ftp://ftp.ntua.gr/pub/X11/LyX/stable/lyx-1.3.4.tar.gz
ftp://ftp.icm.edu.pl/vol/rzm0/lyx/stable/lyx-1.3.4.tar.gz


Prebuilt binaries (mainly rpms for linux distributions) should soon be
available at
ftp://ftp.lyx.org/pub/lyx/bin/1.3.4/

If you already have the LyX 1.3.3 sources, you may want to apply one
of the following patches instead
ftp://ftp.lyx.org/pub/lyx/stable/patch-1.3.4.gz
ftp://ftp.lyx.org/pub/lyx/stable/patch-1.3.4.bz2


If you find what you think is a bug in LyX 1.3.4, you may either
e-mail the LyX developers' mailing list ([EMAIL PROTECTED]), or open
a bug report at http://bugzilla.lyx.org

If you're having trouble using the new version of LyX, or have a question,
first check out http://www.lyx.org/help/. If you can't find the answer there,
e-mail the LyX users' list ([EMAIL PROTECTED]).

Enjoy!

The LyX team.

What's new
==

** Updates

- it is now possible to open documents which use a textclass for
  which no LaTeX support is installed. The documents can be normally
  edited, but they can of course be neither previewed nor printed. Note
  that the format of the file .lyx/textclasses.lst has changed as a
  consequence and it is therefore not possible to use LyX 1.3.4 and an
  earlier version with the same .lyx/ directory.

- add support for drag-n-drop opening of lyx files from your favourite
  file manager [Qt only]

- add support for intelligent scrolling with the mouse cursor [Qt only]

- improvements in LyX/Mac: support for opening files with LyX in
  finder; the LyX.app bundle can now be moved around and is
  self-contained with its own fonts (for math equations), support
  files, and PATH

- add support for \boldsymbol in the math editor

- enable lyx to read documents from versions 0.10 and 0.12

- improve support for LaTeX documentclasses: new agums (generic style
  for first-time submissions to AGU editors) and g-brief2 (a nice
  letter class) textclasses; allow optional arguments in Author,
  AuthorAdress and Thanks styles for the elsart layout; add
  Affiliation layout to jgrga textclass

- improve documentation for some languages: basque (new Extended
  Manual and User Guide; updated Intro and Tutorial), german
  (updated User Guide) and norwegian (new Intro)

- update basque, danish, finnish, french, german, italian, nynorsk,
  romanian, spanish and slovenian interface localizations

- remove localization for the following languages, since they were too
  incomplete to be useful: bulgarian, catalan, czech, hebrew,
  hungarian, portuguese, swedish, turkish, walloon


** Bug fixes

- fix a security problem where an evil .lyx file could cause
  arbitrary commands to be executed during processing

- fix a crash when saving a file containing a table (only with some
  compilers) [Bug #1415]

- fix a crash in the math editor when selecting up/down close to
  subscript insets

- several fixes related to old files: silence a bogus warning about
  encoding; fix conversion of tables (out of range error)

- fix warnings for docbook counters

- enable the file dialog to open files with non-latin filenames [Qt only]

- allow the use of some paper sizes (A3, B3

Re: [patch] tmp file stuff

2004-02-19 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Is semi-colon an allowable character in a unix path? Similarly,
Angus> is colon an allowable character in the win32 path?

Angus> I think that the answer to these questions is "no" and "no",

This is what I think too. In particular, win32 uses the colon in its
path syntax (C:\).

Angus> which means that we could use boost::regex to split the list,
Angus> using "[:;]" as the delimiter.

We do not need to split the list, but to build it.

Anyway I do not think that these problems are horrible to solve. I
guess that having a "nativefilename" flag to converters and viewers
should be enough to know which programs need special treatment.

JMarc


Re: [patch] tmp file stuff

2004-02-19 Thread Angus Leeming
Jean-Marc Lasgouttes wrote:
> Georg> What is difficult: Setting the environment variable, or
> Georg> determine its value? I guess the latter should be doable
> Georg> without too much pain with the existing path conversion
> Georg> routines?
> 
> On unix, this is a ":" delimited list of directories. On windows,
> depending on whether the program uses win32 paths or unix path, it
> can be a ";" delimited list of directories.

Is semi-colon an allowable character in a unix path? Similarly, is 
colon an allowable character in the win32 path?

I think that the answer to these questions is "no" and "no", which 
means that we could use boost::regex to split the list, using "[:;]" 
as the delimiter.

-- 
Angus



Re: [patch] tmp file stuff

2004-02-19 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

>> I have been against modifying TEXINPUTS for a long time because it
>> is difficult to do in a portable way. However, I begin to wonder
>> whether it would be a better alternative.

Georg> What is difficult: Setting the environment variable, or
Georg> determine its value? I guess the latter should be doable
Georg> without too much pain with the existing path conversion
Georg> routines?

On unix, this is a ":" delimited list of directories. On windows,
depending on whether the program uses win32 paths or unix path, it
can be a ";" delimited list of directories.

On kpathsea-based program, I know that writing
  TEXINPUTS=/foo/bar:${TEXINPUTS}
(or the equivalent C++ code) is always correct, because an empty path
element is equivalent to "search in default places". Is this true in
other TeX implementations?

This is the kind of questions I do not have good answers for.

JMarc



Re: [patch] quote-insert

2004-02-19 Thread Jean-Marc Lasgouttes
> "Ronald" == Ronald Florence <[EMAIL PROTECTED]> writes:

Ronald> Juergen Spitzmueller wrote:
>> [1] I do not understand aqua.bind. I have added a FIXME there. For
Ronald> the other
>> ones, I have bound single quotes to S-" and raw quote to M-" where
>> possible, because I think single quote is used more frequently.

Ronald> aqua.bind is used only in addition to one of the traditional
Ronald> bind files like cua.bind or emacs.bind (to provide keyboard
Ronald> shortcuts for LyX/Aqua users), so it probably doesn't need
Ronald> this new change for single or double quotes. 

I think it does need a change, since the menu entries are changed by
the patch.

JMarc