W dniu 09/27/2013 05:33 PM, T. V. Raman pisze:
I've checked in a slightly fixed-up version of your patch -- note the following: The empty string is not "false" in lisp --
You are right, when you corrected my defvar. That's how I intended it to work.
However replacing 2 calls to start-process with a single one having "" argument as a fallback does not work. It is a different thing to call a program with no arguments and with an empty string as an argument. So it needs a correction.
I discovered also additional things:1. No need to check if the path is absolute, because expand-file-name leaves absolute file names untouched. So it was my mistake to introduce additional variable for that
2. Current solution always passes a single argument, so if, hypothetically, we had espeak program as server, it would be impossible to launch it with 2 arguments, for example "-veurope/pl --path /new/path".
I see now the following choices, please choose the one:A. Revert to r8406. We would still have the ability to pass absolute file name as server, so any script files or batch files would work. The problem under windows would be that the server has to be called through a "bat" file. This was the thing I tried to avoid, because sometimes these batch files create dummy console windows. But I guess I made an attempt with a bat file and on my system it didn't create the unwanted window.
B. Leave things as they are being consious that using DTK_PROGRAM_ARGS is possible with only single argument and that it has bug passing single empty string parameter instead of no parameters. Maybe currently it does not crash any server, but potentially it could do harm.
C. Slightly correct the start-process call, to remove the empty string bug. Insert a comment, that only 1 argument may be passed to the server using DTK_PROGRAM_ARGS
D. I should prepare a full patch that would provide possibility to split-string of arguments into a list of arguments. The list would be later passed to the start-process with "apply" or "funcall". Parsing the string instead of simple splitting should also allow to pass arguments with spaces inside. That would force me to create a complicated parsing procedure, probably not worth this work. Anyway it is my need and my fault, so no problem with that. The problem is having some extra code in emacspeak.
Raman, I'm sorry for the mess I introduced with the patch. Now when you know the exact purpose of the patch, you have a better view on which way to choose.
Jarek ----------------------------------------------------------------------------- To unsubscribe from the emacspeak list or change your address on the emacspeak list send mail to "email@example.com" with a subject of "unsubscribe" or "help".
If you have questions about this archive or had problems using it, please send mail to:firstname.lastname@example.org No Soliciting!
Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998
Emacspeak Files | Emacspeak Blog | Search the archive