From: SourceForge.net <no...@so...> - 2009-08-02 18:20:29
|
Bugs item #2729908, was opened at 2009-04-04 05:07 Message generated for change (Comment added) made by mtgavin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=2729908&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: editor core Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Matthew Gavin (mtgavin) Assigned to: Nobody/Anonymous (nobody) Summary: Can only supply eight files on command line Initial Comment: Running linux, jedit 4.3pre16. I am seeing that jedit will only open the first eight files I supply to it on the command line. If I supply any more than that, the files after the first eight, are simply not opened. I can open as many as I want, using the mouse (directory/file browser), once I am in the editor. Unfortunately I often need to supply a large number of files on the command line. This behavior did not occur in 4.2. In 4.2 you can supply as many files as you want on the command line, and they all get opened. So if I want to open more than 8 files on the command line, I use 4.2. ---------------------------------------------------------------------- >Comment By: Matthew Gavin (mtgavin) Date: 2009-08-02 18:20 Message: shlomy - my script is identical to yours. On my linux system (Red Hat Enterprise release 4, Nahant Update 4), after it executes the first iteration of the 'while' loop (brings up jedit, with 9 files) it does not do anything else. So, it blocks after the first instance of the 'while' loop, leaving me with only the first 9 files open. I am not sure why the script is trying to do things this way, it seems to be much simpler to use the $@ parameter. What are we intending to accomplish with this looping? How is this better than simply using the $@ parameter, as dennis_shell indicated? ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2009-08-02 05:24 Message: Can you attach your jEdit invocation script? Mine has the following, which is fine, because it invokes jEdit with "-reuseView" multiple times if there are more than 9 arguments on the command-line: while [ $# -gt 9 ]; do exec "$JAVA_HOME/bin/java" -Xmx${JAVA_HEAP_MAX_SIZE}M -jar /mnt/home/sreinste/jedit/4.3pre16/jedit.jar -reuseview "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" shift 9 done ---------------------------------------------------------------------- Comment By: Matthew Gavin (mtgavin) Date: 2009-08-02 04:29 Message: After reading Dennis post, dated 2009-07-26 15:19, and shlomy: you are right, the problem was in my jedit script, very similar to what Dennis described. Somehow my jedit invocation script (looks very similar to Dennis' post) changed from 4.2 to 4.3, to only call out 9 params ($1...$9) in the 4.3 version. This 4.3 version did not use the $@ parameter. I would not have modified that so I think this may bear some investigation on your end, as to how that could have happened. I suspect that the 4,3 package I downloaded may have had this mod in it. So please take a look at the jedit invocation script supplied by your linux install tarball, and double-check that it is still using $@. Once you clarify that you can close this. Thanks for the help. ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2009-07-26 18:36 Message: If jEdit only opens 8 files from the command-line, it's probably due to the batch file (or alias?) named 'jedit'. Please add the contents of this alias / batch file. In Linux you can usually get this using: cat `which jedit` ---------------------------------------------------------------------- Comment By: Daniel Johnson (delvinj) Date: 2009-07-26 15:32 Message: Works fine for me, windows XP. Here is the contents of the batch file I use: start /b javaw -cp "C:\Documents and Settings\djohnson\workspace\jEdit\build\jedit.jar;C:\jEdit\build\looks.jar" -Xmx256M org.gjt.sp.jedit.jEdit -reuseview %* ---------------------------------------------------------------------- Comment By: Dennis Sheil (dennis_sheil) Date: 2009-07-26 15:19 Message: I have been having trouble dupicating the problem. mtgavin, what operating system are you running on? I am running Linux, more specifically the deltah version of Gnewsense, which is heavily based on Ubuntu Hardy. My shell is bash 3.2.33. With both 4.3.pre13 and 4.3.pre18, I can load more than eight files from the command line, with either method you mention, either wildcard or explicitly. If you're running on a UNIX, what shell are you using? I assume you're not running this from a MacOS X command line or an MS-DOS prompt or the like. Since you're running this as "jedit" and not "java -jar jedit.jar", I assume you're using the jedit installed by the OS flavor's package. When I do a "which jedit" it shows /usr/bin/jedit as my shell script, when I do a "tail -1 /usr/bin/jedit" it says exec $JAVA -Xms${JAVA_HEAP_INIT_SIZE}M -Xmx${JAVA_HEAP_MAX_SIZE}M -jar /usr/share/jedit/jedit.jar -reuseview "$@" & That "$@" at the end means pass all arguments passed to this shell script, which is part of what allows me to load 9, 10, 11 files from the command line. ---------------------------------------------------------------------- Comment By: Matthew Gavin (mtgavin) Date: 2009-04-04 15:59 Message: Nothing out of the ordinary (I don't think, anyway.) jedit <file1> <file2> <file3>..... <file_n> I also do stuff like 'jedit *.txt' so the wildcrad matches a (potentially large) number of text files.. Neither one will load anything more than the first eight files specified. This is consistent behavior with 4.3pre16 - happens to me EVERY time - you should be able to reproduce this quickly. If you are not able to reproduce this quickly then this could be difficult to isolate. Again, this worked flawlessly with 4.2. ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2009-04-04 14:06 Message: What is the command-line that you use to launch jEdit with a specified list of files? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=2729908&group_id=588 |