Re: JDEE and emacs-wiki
Well, I've found some more info on this error. emacs-wiki defines a line-beginning-position function with 1 optional argument, and jde-bug defines a function with the same name but no arguments. In emacs-wiki.el: (unless (fboundp 'line-beginning-position) (defsubst line-beginning-position (optional N) (save-excursion (beginning-of-line N) (point In jde-bug.el: (when jde-xemacsp (defun line-beginning-position () (point-at-bol)) (defun line-end-position () (point-at-eol))) How can I solve this conflict? Thanks for any help. On Mon, 2002-10-28 at 15:29, Daniel Serodio wrote: Hi! I'm a long-time user of JDEE, and I've just downloaded emacs-wiki.el When I first called 'emacs-wiki-find-file', I got an error. So I launched XEmacs with -vanilla, and tried again. No error this time. So I commented out all of my .emacs and began uncommenting line-by-line to find where the problem was. To my surprise, it is caused by JDEE! I can use emacs-wiki ok, but when I (require 'jde), I get the following error: (warning/warning) Error caught in `font-lock-pre-idle-hook': (wrong-number-of-arguments line-beginning-position 1) Is anyone able to use emacs-wiki with jde require'd? -- []'s Daniel Serodio -- []'s Daniel Serodio
Re: JDEE and emacs-wiki
Daniel == Daniel Serodio [EMAIL PROTECTED] writes: Daniel Well, I've found some more info on this error. emacs-wiki Daniel defines a line-beginning-position function with 1 optional Daniel argument, and jde-bug defines a function with the same name Daniel but no arguments. Daniel In emacs-wiki.el: Daniel (unless (fboundp 'line-beginning-position) Daniel (defsubst line-beginning-position (optional N) Daniel (save-excursion (beginning-of-line N) (point Daniel In jde-bug.el: Daniel (when jde-xemacsp Daniel (defun line-beginning-position () Daniel (point-at-bol)) Daniel (defun line-end-position () Daniel (point-at-eol))) Daniel How can I solve this conflict? Thanks for any help. Sadly you can't. Really the best way to do these things would to remove (when jde-xemacsp (defun line-beginning-position... and instead have (defun jde-line-beginning-position() (or (when jde-xemacsp (point-at-bol) (line-beginning-position or some such. Obviously you would also need to change every reference to line-beginning-position in JDE, but it would resolve the name clash. Alternatively after loading JDE you could do (defsubst line-beginning-position (optional N) (save-excursion (beginning-of-line N) (point which will force the definition of the function with the optional argument. From a quick look at the definitions it should all work. The other option would be to change all the references to line-beginning-position in JDE to point-at-bol, as an alias for this (to line-beginning-position) already exists in Emacs. Wow. Complicated eh? Phil
Re: JDEE and emacs-wiki
Ok, I researched a little more, and found out that line-beginning-position is a GNU emacs function that doesn't exist in XEmacs, and that the GNU emacs function takes an optional parameter. So, jde-bug's definition of this function is wrong. I patched jde-bug.el to use the same function definition as emacs-wiki.el, and everything seems to be fine. No more errors. Patch attached. On Tue, 2002-10-29 at 09:40, Daniel Serodio wrote: Well, I've found some more info on this error. emacs-wiki defines a line-beginning-position function with 1 optional argument, and jde-bug defines a function with the same name but no arguments. In emacs-wiki.el: (unless (fboundp 'line-beginning-position) (defsubst line-beginning-position (optional N) (save-excursion (beginning-of-line N) (point In jde-bug.el: (when jde-xemacsp (defun line-beginning-position () (point-at-bol)) (defun line-end-position () (point-at-eol))) How can I solve this conflict? Thanks for any help. On Mon, 2002-10-28 at 15:29, Daniel Serodio wrote: Hi! I'm a long-time user of JDEE, and I've just downloaded emacs-wiki.el When I first called 'emacs-wiki-find-file', I got an error. So I launched XEmacs with -vanilla, and tried again. No error this time. So I commented out all of my .emacs and began uncommenting line-by-line to find where the problem was. To my surprise, it is caused by JDEE! I can use emacs-wiki ok, but when I (require 'jde), I get the following error: (warning/warning) Error caught in `font-lock-pre-idle-hook': (wrong-number-of-arguments line-beginning-position 1) Is anyone able to use emacs-wiki with jde require'd? -- []'s Daniel Serodio -- []'s Daniel Serodio -- []'s Daniel Serodio --- jde-bug.el.orig Tue Oct 29 09:46:05 2002 +++ jde-bug.el Tue Oct 29 09:47:42 2002 -39,10 +39,12 (require 'jde-dbs) (when jde-xemacsp - (defun line-beginning-position () -(point-at-bol)) - (defun line-end-position () -(point-at-eol))) + (unless (fboundp 'line-end-position) +(defsubst line-end-position (optional N) + (save-excursion (end-of-line N) (point + (unless (fboundp 'line-beginning-position) +(defsubst line-beginning-position (optional N) + (save-excursion (beginning-of-line N) (point) (defgroup jde-bug nil JDEbug General Options -2814,4 +2816,4 ;; ;; Revision 1.1 1999/08/10 09:59:59 paulk ;; Initial revision -;; \ No newline at end of file +;;
Re: JDEE and emacs-wiki
Daniel Serodio writes: Well, I've found some more info on this error. emacs-wiki defines a line-beginning-position function with 1 optional argument, and jde-bug defines a function with the same name but no arguments. In emacs-wiki.el: (unless (fboundp 'line-beginning-position) (defsubst line-beginning-position (optional N) (save-excursion (beginning-of-line N) (point In jde-bug.el: (when jde-xemacsp (defun line-beginning-position () (point-at-bol)) (defun line-end-position () (point-at-eol))) How can I solve this conflict? Thanks for any help. I apparently created this code because XEmacs does not (or did not) define these functions. I should have included the optional argument, which I will do in the next release. Meanwhile, you can just edit jde-bug.el to read: (when jde-xemacsp (defun line-beginning-position () (point-at-bol)) (defun line-end-position () (point-at-eol))) How can I solve this conflict? Thanks for any help. (when jde-xemacsp (defun line-beginning-position (optional N) (point-at-bol)) (defun line-end-position (optional N) (point-at-eol))) - Paul On Mon, 2002-10-28 at 15:29, Daniel Serodio wrote: Hi! I'm a long-time user of JDEE, and I've just downloaded emacs-wiki.el When I first called 'emacs-wiki-find-file', I got an error. So I launched XEmacs with -vanilla, and tried again. No error this time. So I commented out all of my .emacs and began uncommenting line-by-line to find where the problem was. To my surprise, it is caused by JDEE! I can use emacs-wiki ok, but when I (require 'jde), I get the following error: (warning/warning) Error caught in `font-lock-pre-idle-hook': (wrong-number-of-arguments line-beginning-position 1) Is anyone able to use emacs-wiki with jde require'd? -- []'s Daniel Serodio -- []'s Daniel Serodio
Re[2]: JDEE and emacs-wiki
Paul Kinnucan [EMAIL PROTECTED] seems to think that: Daniel Serodio writes: Well, I've found some more info on this error. emacs-wiki defines a line-beginning-position function with 1 optional argument, and jde-bug defines a function with the same name but no arguments. In emacs-wiki.el: (unless (fboundp 'line-beginning-position) (defsubst line-beginning-position (optional N) (save-excursion (beginning-of-line N) (point In jde-bug.el: (when jde-xemacsp (defun line-beginning-position () (point-at-bol)) (defun line-end-position () (point-at-eol))) How can I solve this conflict? Thanks for any help. I apparently created this code because XEmacs does not (or did not) define these functions. I should have included the optional argument, which I will do in the next release. Meanwhile, you can just edit jde-bug.el to read: [ ... ] It is much safer to wrap such functions under new names like this: (if (not (fboundp 'whatever)) (defun jde-whatever () (code)) (defalias 'jde-whatever 'whatever)) and you avoid all upgrade problems. My packages were often being whacked by random tools that redefine code like this, including XEmacs' own compatibility layer that wasn't that compatible a few years ago. I haven't had problems since I started doing the above. Eric -- Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED] Home: http://www.ludlam.netSiege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org
ClasspathNotFoundException when use javac server option
jdk1.3.1, jdee2.2.9beta12. javac compiler option works fine. When use javac server compiler option, I get exception as following. java.lang.ClassNotFoundException: com.sun.tools.javac.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at jde.util.CompileServer.clinit(CompileServer.java:46) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at bsh.BshClassManager.plainClassForName(BshClassManager.java:143) at bsh.classpath.ClassManagerImpl.getClassForName(ClassManagerImpl.java:165) at bsh.BshClassManager.classForName(BshClassManager.java:123) at bsh.NameSpace.classForName(NameSpace.java:622) at bsh.NameSpace.getClassImpl(NameSpace.java:612) at bsh.NameSpace.getClass(NameSpace.java:521) at bsh.Name.consumeNextObjectField(Name.java:283) at bsh.Name.toObject(Name.java:206) at bsh.Name.toObject(Name.java:189) at bsh.Name.invokeMethod(Name.java:649) at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:53) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:69) at bsh.Interpreter.run(Interpreter.java:411) at bsh.Interpreter.main(Interpreter.java:361 Compilation exited abnormally with code ) at Tue Oct 29 13:08:29
ClasspathNotFoundException when use javac server option
Kevin Zou writes: jdk1.3.1, jdee2.2.9beta12. javac compiler option works fine. When use javac server compiler option, I get exception as following. java.lang.ClassNotFoundException: com.sun.tools.javac.Main The beanshell vm cannot find javac. It is located in the tools.jar file in the lib subdirectory of the JDK. If the JDEE can find tools.jar, it includes it in the beanshell's classpath. If not, it signals an error. Since the JDEE did not signal an error, it must have found tools.jar and put it in the beanshell classpath. I am therefore puzzled as to why you are getting this error. Without more information, I cannot help you. - Paul at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at jde.util.CompileServer.clinit(CompileServer.java:46) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at bsh.BshClassManager.plainClassForName(BshClassManager.java:143) at bsh.classpath.ClassManagerImpl.getClassForName(ClassManagerImpl.java:165) at bsh.BshClassManager.classForName(BshClassManager.java:123) at bsh.NameSpace.classForName(NameSpace.java:622) at bsh.NameSpace.getClassImpl(NameSpace.java:612) at bsh.NameSpace.getClass(NameSpace.java:521) at bsh.Name.consumeNextObjectField(Name.java:283) at bsh.Name.toObject(Name.java:206) at bsh.Name.toObject(Name.java:189) at bsh.Name.invokeMethod(Name.java:649) at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:53) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:69) at bsh.Interpreter.run(Interpreter.java:411) at bsh.Interpreter.main(Interpreter.java:361 Compilation exited abnormally with code ) at Tue Oct 29 13:08:29